From ee680967da249409bbcf653367c372206c1d0c2e Mon Sep 17 00:00:00 2001 From: infojunkie Date: Sun, 20 Oct 2024 21:45:36 -0700 Subject: [PATCH] Fix TypeScript and add cli test --- README.md | 12 +- build/ireal-musicxml.cjs | 1576 +++++++ build/ireal-musicxml.js | 8288 ++++++++++++++++++++++++++++++++++- build/ireal-musicxml.js.map | 6 +- package-lock.json | 195 +- package.json | 23 +- src/cli/cli.js | 5 +- src/node/loader.js | 18 - test/cli.spec.js | 15 + test/index.spec.ts | 41 +- tsconfig.json | 15 +- 11 files changed, 10120 insertions(+), 74 deletions(-) create mode 100644 build/ireal-musicxml.cjs delete mode 100644 src/node/loader.js create mode 100644 test/cli.spec.js diff --git a/README.md b/README.md index 1573399..d538f7a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ iReal Pro to MusicXML converter. # Demo -[Check out the demo!](https://blog.karimratib.me/demos/musicxml/) You can upload one of the [iReal Pro main playlists](https://www.irealpro.com/main-playlists/) as a test. +[Check out the demo!](https://blog.karimratib.me/demos/chirp/) You can upload one of the [iReal Pro main playlists](https://www.irealpro.com/main-playlists/) as a test. # Usage @@ -35,18 +35,22 @@ const playlistAsync = await iRealMusicXml.convert(ireal) const playlistManual = new iRealMusicXml.Playlist(ireal) // => Same as above minus `musicXml` attribute -const musicXml = iRealMusicXml.MusicXML.convert(playlistManual.songs[0]) + +const musicXml = iRealMusicXml.Converter.convert(playlistManual.songs[0]) // => MusicXML output ``` +```bash +$ ireal-musicxml test/data/jazz.txt --songs=Blues +``` + # Development -`xmllint` is required to run tests and the demo cli tool (but NOT for the library). Tests are used to ensure that the generated MusicXML is valid. +`xmllint` is required to run tests and the cli tool (but NOT for the library). Tests are used to ensure that the generated MusicXML is valid. ``` npm install npm run test -./demo/cli/ireal-musicxml.js test/data/jazz.txt --songs=Blues --validate ``` # Documentation diff --git a/build/ireal-musicxml.cjs b/build/ireal-musicxml.cjs new file mode 100644 index 0000000..e3d3ba0 --- /dev/null +++ b/build/ireal-musicxml.cjs @@ -0,0 +1,1576 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/lib/index.js +var lib_exports = {}; +__export(lib_exports, { + Cell: () => Cell, + Chord: () => Chord, + Converter: () => Converter, + LogLevel: () => LogLevel, + Playlist: () => Playlist, + Song: () => Song, + Version: () => Version, + convert: () => convert, + convertSync: () => convertSync +}); +module.exports = __toCommonJS(lib_exports); +var import_promise = __toESM(require("promise"), 1); + +// src/lib/parser.js +var import_fast_diff = __toESM(require("fast-diff"), 1); +var Playlist = class { + constructor(ireal) { + const playlistEncoded = /.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(ireal); + const playlist = decodeURIComponent(playlistEncoded[2]); + const parts = playlist.split("==="); + if (parts.length > 1) this.name = parts.pop(); + this.songs = parts.map((part) => { + try { + return new Song(part, playlistEncoded[1] === "irealbook"); + } catch (error) { + const parts2 = part.split("="); + const title = Song.parseTitle(parts2[0].trim()); + console.error(`[ireal-musicxml] [${title}] ${error}`); + return null; + } + }).filter((song) => song !== null).reduce((songs, song) => { + if (songs.length > 0) { + const diffs = (0, import_fast_diff.default)(songs[songs.length - 1].title, song.title); + if (diffs[0][0] === 0 && diffs.every((d) => d[0] === 0 || d[1].match(/^\d+$/))) { + songs[songs.length - 1].cells = songs[songs.length - 1].cells.concat(song.cells); + return songs; + } + } + songs.push(song); + return songs; + }, []); + } +}; +var Cell = class { + constructor() { + this.annots = []; + this.comments = []; + this.bars = ""; + this.spacer = 0; + this.chord = null; + } +}; +var Chord = class { + constructor(note, modifiers = "", over = null, alternate = null) { + this.note = note; + this.modifiers = modifiers; + this.over = over; + this.alternate = alternate; + } +}; +var Song = class _Song { + constructor(ireal, oldFormat = false) { + this.cells = []; + this.musicXml = ""; + if (!ireal) { + this.title = ""; + this.composer = ""; + this.style = ""; + this.key = ""; + this.transpose = 0; + this.groove = ""; + this.bpm = 0; + this.repeats = 0; + return; + } + const parts = ireal.split("="); + if (oldFormat) { + this.title = _Song.parseTitle(parts[0].trim()); + this.composer = _Song.parseComposer(parts[1].trim()); + this.style = parts[2].trim(); + this.key = parts[3]; + this.cells = this.parse(parts[5]); + } else { + this.title = _Song.parseTitle(parts[0].trim()); + this.composer = _Song.parseComposer(parts[1].trim()); + this.style = parts[3].trim(); + this.key = parts[4]; + this.transpose = +parts[5] || 0; + this.groove = parts[7]; + this.bpm = +parts[8]; + this.repeats = +parts[9] || 3; + const music = parts[6].split("1r34LbKcu7"); + this.cells = this.parse(unscramble(music[1])); + } + } + /** + * The RegExp for a complete chord. The match array contains: + * 1 - the base note + * 2 - the modifiers (+-ohd0123456789 and su for sus) + * 3 - any comments (may be e.g. add, sub, or private stuff) + * 4 - the "over" part starting with a slash + * 5 - the top chord as (chord) + * @type RegExp + */ + static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\-^\dhob#])*)(\*.+?\*)*(\/[A-G][#b]?)?(\(.*?\))?/; + static chordRegex2 = /^([ Wp])()()(\/[A-G][#b]?)?(\(.*?\))?/; + // need the empty captures to match chordRegex + static regExps = [ + /^\*[a-zA-Z]/, + // section + /^T\d\d/, + // time measurement + /^N./, + // repeat marker + /^<.*?>/, + // comments + _Song.chordRegex, + // chords + _Song.chordRegex2 + // space, W and p (with optional alt chord) + ]; + /** + * The parser cracks up the raw music string into several objects, + * one for each cell. iReal Pro works with rows of 16 cell each. The result + * is stored at song.cells. + * + * Each object has the following properties: + * + * chord: if non-null, a chord object with these properties: + * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord) + * modifiers - the modifiers, like 7, + o etc (string) + * over - if non-null, another chord object for the under-note + * alternate - if non-null another chord object for the alternate chord + * annots: annotations, a string of: + * *x - section, like *v, *I, *A, *B etc + * Nx - repeat bots (N1, N2 etc) + * Q - coda + * S - segno + * Txx - measure (T44 = 4/4 etc, but T12 = 12/8) + * U - END + * f - fermata + * l - (letter l) normal notes + * s - small notes + * comments: an array of comment strings + * bars: bar specifiers, a string of: + * | - single vertical bar, left + * [ - double bar, left + * ] - double bar, right + * { - repeat bar, left + * } - repeat bar, right + * Z - end bar, right + * spacer - a number indicating the number of vertical spacers above this cell + * + * @returns [Cell] + */ + parse(ireal) { + let text = ireal.trim(); + const arr = []; + while (text) { + let found = false; + for (let i = 0; i < _Song.regExps.length; i++) { + const match = _Song.regExps[i].exec(text); + if (match) { + found = true; + if (match.length <= 2) { + arr.push(match[0]); + text = text.substr(match[0].length); + } else { + arr.push(match); + text = text.substr(match[0].length); + } + break; + } + } + if (!found) { + if (text[0] !== ",") + arr.push(text[0]); + text = text.substr(1); + } + } + const cells = []; + let obj = this.newCell(cells); + let prevobj = null; + for (let i = 0; i < arr.length; i++) { + let cell = arr[i]; + if (cell instanceof Array) { + obj.chord = this.parseChord(cell); + cell = " "; + } + switch (cell[0]) { + case "{": + // open repeat + case "[": + if (prevobj) { + prevobj.bars += ")"; + prevobj = null; + } + obj.bars = cell; + cell = null; + break; + case "|": + if (prevobj) { + prevobj.bars += ")"; + prevobj = null; + } + obj.bars = "("; + cell = null; + break; + case "]": + // close double bar + case "}": + // close repeat + case "Z": + if (prevobj) { + prevobj.bars += cell; + prevobj = null; + } + cell = null; + break; + case "n": + obj.chord = new Chord(cell[0]); + break; + case ",": + cell = null; + break; + // separator + case "S": + // segno + case "T": + // time measurement + case "Q": + // coda + case "N": + // repeat + case "U": + // END + case "s": + // small + case "l": + // normal + case "f": + // fermata + case "*": + obj.annots.push(cell); + cell = null; + break; + case "Y": + obj.spacer++; + cell = null; + prevobj = null; + break; + case "r": + case "x": + case "W": + obj.chord = new Chord(cell); + break; + case "<": + cell = cell.substr(1, cell.length - 2); + obj.comments.push(cell); + cell = null; + break; + default: + } + if (cell && i < arr.length - 1) { + prevobj = obj; + obj = this.newCell(cells); + } + } + return cells; + } + /** + * The title had "A" and "The" at the back (e.g. "Gentle Rain, The") + */ + static parseTitle(title) { + return title.replace(/(.*)(, )(A|The)$/g, "$3 $1"); + } + /** + * The composer is reversed (last first) if it only has 2 names :shrug: + */ + static parseComposer(composer) { + const parts = composer.split(/(\s+)/); + if (parts.length == 3) { + return parts[2] + parts[1] + parts[0]; + } + return composer; + } + parseChord(chord) { + var note = chord[1] || " "; + var modifiers = chord[2] || ""; + var comment = chord[3] || ""; + if (comment) + modifiers += comment.substr(1, comment.length - 2); + var over = chord[4] || ""; + if (over[0] === "/") + over = over.substr(1); + var alternate = chord[5] || null; + if (alternate) { + chord = _Song.chordRegex.exec(alternate.substr(1, alternate.length - 2)); + if (!chord) + alternate = null; + else + alternate = this.parseChord(chord); + } + if (note === " " && !alternate && !over) + return null; + if (over) { + var offset = over[1] === "#" || over[1] === "b" ? 2 : 1; + over = new Chord(over.substr(0, offset), over.substr(offset), null, null); + } else + over = null; + return new Chord(note, modifiers, over, alternate); + } + newCell(cells) { + var obj = new Cell(); + cells.push(obj); + return obj; + } +}; +function unscramble(s) { + let r = "", p; + while (s.length > 51) { + p = s.substring(0, 50); + s = s.substring(50); + r = r + obfusc50(p); + } + r = r + s; + r = r.replace(/Kcl/g, "| x").replace(/LZ/g, " |").replace(/XyQ/g, " "); + return r; +} +function obfusc50(s) { + const newString = s.split(""); + for (let i = 0; i < 5; i++) { + newString[49 - i] = s[i]; + newString[i] = s[49 - i]; + } + for (let i = 10; i < 24; i++) { + newString[49 - i] = s[i]; + newString[i] = s[49 - i]; + } + return newString.join(""); +} + +// src/lib/converter.js +var import_jstoxml = __toESM(require("jstoxml"), 1); +var import_chord_symbol = __toESM(require("chord-symbol"), 1); + +// package.json +var package_default = { + name: "ireal-musicxml", + version: "2.0.0", + description: "iReal Pro to MusicXML converter.", + author: "Karim Ratib (https://github.com/infojunkie)", + license: "GPL-3.0-only", + repository: { + type: "git", + url: "https://github.com/infojunkie/ireal-musicxml" + }, + homepage: "https://github.com/infojunkie/ireal-musicxml", + type: "module", + types: "./src/types/ireal-musicxml.d.ts", + files: [ + "LICENSE.txt", + "build/*", + "src/*" + ], + bin: { + "ireal-musicxml": "./src/cli/cli.js" + }, + exports: { + import: "./build/ireal-musicxml.js", + require: "./build/ireal-musicxml.cjs" + }, + scripts: { + build: "npm run build:esm && npm run build:cjs", + "build:esm": "esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js", + "build:cjs": "esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs", + test: "npm run test:lint && npm run test:spec && npm run test:ts", + "test:spec": "node --test", + "test:ts": "npm run build && node --test --loader=ts-node/esm --require ts-node/register test/**/*.spec.ts", + "test:lint": "eslint src --fix" + }, + devDependencies: { + "@types/node": "^22.7.7", + "@xmldom/xmldom": "^0.8.0", + esbuild: "0.24.0", + eslint: "^9.13.0", + resolve: "^1.22.8", + "sanitize-filename": "^1.6.3", + "ts-node": "^10.9.2", + typescript: "^4.9.5", + "validate-with-xmllint": "^1.2.0", + "xpath.js": "^1.1.0" + }, + dependencies: { + "chord-symbol": "^3.0.0", + "fast-diff": "^1.2.0", + jstoxml: "^2.0.6", + promise: "^8.1.0" + } +}; + +// src/lib/version.js +var Version = class { + static name = package_default.name; + static version = package_default.version; + static author = package_default.author; + static description = package_default.description; +}; + +// src/lib/converter.js +var { chordParserFactory, chordRendererFactory } = import_chord_symbol.default; +var LogLevel = class { + static Debug = 0; + static Info = 1; + static Warn = 2; + static Error = 3; + static None = 4; +}; +var MUSICXML_VERSION = "4.0"; +var SCALING_MM = 7; +var SCALING_TENTHS = 40; +var Converter = class _Converter { + static defaultOptions = { + "divisions": 768, + // same as used by iReal + "notation": "rhythmic", + // 'rhythmic' for rhythmic notation, 'slash' for slash notation + "step": "B", + // chord note + "octave": 4, + // chord note octave + "notehead": "slash", + // chord note head + "noteheadSize": "large", + // size of chord note head + "date": true, + // include encoding date + "clef": false, + // hide clef by default + "keySignature": false, + // hide key signature by default + "pageWidth": 210, + // mm (A4) + "pageHeight": 297, + // mm (A4) + "pageMargin": 15, + // mm + "logLevel": LogLevel.Warn + }; + static sequenceAttributes = [ + // Expected order of attribute elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/ + "divisions", + "key", + "time", + "staves", + "part-symbol", + "instruments", + "clef", + "staff-details", + "transpose", + "directive", + "measure-style" + ]; + static sequenceNote = [ + // Expected order of note elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/ + "cue", + "pitch", + "rest", + "unpitched", + "duration", + "tie", + "voice", + "type", + "dot", + "accidental", + "time-modification", + "stem", + "notehead", + "notehead-text", + "staff", + "beam", + "notations", + "lyric", + "play" + ]; + static sequenceNotations = [ + // Expected order of notations elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/ + "accidental-mark", + "arpeggiate", + "articulations", + "dynamics", + "fermata", + "glissando", + "non-arpeggiate", + "ornaments", + "other-notation", + "slide", + "slur", + "technical", + "tied", + "tuplet" + ]; + static sequenceBarline = [ + // Expected order of barline elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/ + "bar-style", + "footnote", + "level", + "wavy-line", + "segno", + "coda", + "fermata", + "ending", + "repeat" + ]; + static mapAlter = { + "#": 1, + "b": -1 + }; + static mapFifthsToAlters = { + "sharp": ["F", "C", "G", "D", "A", "E", "B"], + "flat": ["B", "E", "A", "D", "G", "C", "F"] + }; + static mapRepeats = { + "D.C. al Coda": _Converter.prototype.convertDaCapo, + "D.C. al Fine": _Converter.prototype.convertDaCapo, + "D.C. al 1st End.": _Converter.prototype.convertDaCapo, + "D.C. al 2nd End.": _Converter.prototype.convertDaCapo, + "D.C. al 3rd End.": _Converter.prototype.convertDaCapo, + "D.S. al Coda": _Converter.prototype.convertDalSegno, + "D.S. al Fine": _Converter.prototype.convertDalSegno, + "D.S. al 1st End.": _Converter.prototype.convertDalSegno, + "D.S. al 2nd End.": _Converter.prototype.convertDalSegno, + "D.S. al 3rd End.": _Converter.prototype.convertDalSegno, + "Fine": _Converter.prototype.convertFine, + "3x": _Converter.prototype.convertRepeatNx, + "4x": _Converter.prototype.convertRepeatNx, + "5x": _Converter.prototype.convertRepeatNx, + "6x": _Converter.prototype.convertRepeatNx, + "7x": _Converter.prototype.convertRepeatNx, + "8x": _Converter.prototype.convertRepeatNx + }; + static convert(song, options = {}) { + const realOptions = Object.assign({}, this.defaultOptions, options); + return new _Converter(song, realOptions).convert(); + } + constructor(song, options) { + this.song = song; + this.options = options; + this.time = { beats: 4, beatType: 4 }; + this.fifths = null; + this.measure = null; + this.barRepeat = 0; + this.codas = []; + this.repeats = 0; + this.emptyCells = 0; + this.emptyCellNewSystem = false; + this.cellWidth = (this.options.pageWidth - 2 * this.options.pageMargin) / 16; + this.parseChord = chordParserFactory({ "altIntervals": [ + "b5", + "b9" + ] }); + this.renderChord = chordRendererFactory({ + useShortNamings: true, + printer: "raw" + }); + } + convert() { + return import_jstoxml.default.toXML(this.convertSong(), { + header: ` + + + `.trim(), + indent: " " + }); + } + convertSong() { + return { + _name: "score-partwise", + _attrs: { "version": MUSICXML_VERSION }, + _content: [{ + "work": { + "work-title": this.song.title + } + }, { + "identification": [{ + _name: "creator", + _attrs: { "type": "composer" }, + _content: this.song.composer + }, { + "encoding": [{ + "software": `@infojunkie/ireal-musicxml ${Version.version}` + }, { ...this.options.date && { + "encoding-date": _Converter.convertDate(/* @__PURE__ */ new Date()) + } }, { + _name: "supports", + _attrs: { "element": "accidental", "type": "no" } + }, { + _name: "supports", + _attrs: { "element": "transpose", "type": "no" } + }, { + _name: "supports", + _attrs: { "attribute": "new-page", "element": "print", "type": "yes", "value": "yes" } + }, { + _name: "supports", + _attrs: { "attribute": "new-system", "element": "print", "type": "yes", "value": "yes" } + }] + }] + }, { + "defaults": { + "scaling": { + "millimeters": SCALING_MM, + "tenths": SCALING_TENTHS + }, + "page-layout": { + "page-height": _Converter._mmToTenths(this.options.pageHeight), + "page-width": _Converter._mmToTenths(this.options.pageWidth), + "page-margins": { + "left-margin": _Converter._mmToTenths(this.options.pageMargin, 4), + "right-margin": _Converter._mmToTenths(this.options.pageMargin, 4), + "top-margin": _Converter._mmToTenths(this.options.pageMargin, 4), + "bottom-margin": _Converter._mmToTenths(this.options.pageMargin, 4) + } + } + } + }, { + "part-list": { + _name: "score-part", + _attrs: { "id": "P1" }, + _content: { + _name: "part-name", + _attrs: { "print-object": "no" }, + _content: "Lead Sheet" + } + } + }, { + _name: "part", + _attrs: { "id": "P1" }, + _content: this.convertMeasures() + }] + }; + } + // Date in yyyy-mm-dd + // https://stackoverflow.com/a/50130338/209184 + static convertDate(date) { + return new Date(date.getTime() - date.getTimezoneOffset() * 6e4).toISOString().split("T")[0]; + } + static Measure = class { + constructor(number) { + this.body = { + _name: "measure", + _attrs: { "number": number }, + _content: [] + }; + this.attributes = []; + this.chords = []; + this.barlines = []; + this.barEnding = null; + } + number() { + return this.body["_attrs"]["number"]; + } + assemble() { + if (this.attributes.length) { + this.body["_content"].push({ + "attributes": _Converter.reorderSequence(this, this.attributes, _Converter.sequenceAttributes) + }); + } + this.chords.forEach((chord) => { + this.body["_content"].push({ + "harmony": chord.harmony + }, ...chord.notes.map((note) => { + return { + "note": note + }; + })); + }); + this.barlines[0]["_content"] = _Converter.reorderSequence(this, this.barlines[0]["_content"], _Converter.sequenceBarline); + this.body["_content"].splice(1, 0, this.barlines[0]); + this.barlines[1]["_content"] = _Converter.reorderSequence(this, this.barlines[1]["_content"], _Converter.sequenceBarline); + this.body["_content"].push(this.barlines[1]); + return this.body; + } + }; + static Chord = class { + constructor(harmony, notes, ireal) { + this.harmony = harmony; + this.notes = notes; + this.ireal = ireal; + this.spaces = 0; + this.fermata = false; + } + }; + convertMeasures() { + const isNewSystem = (cellIndex) => cellIndex > 0 && cellIndex % 16 === 0; + const measures = this.song.cells.reduce((measures2, cell, cellIndex) => { + if (cell.bars.match(/\(|\{|\[/) || !this.measure && (cell.chord || cell.annots.length || cell.comments.length)) { + if (this.measure) { + this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`); + this.measure.barlines.push(this.convertBarline("", "right")); + if (this.adjustChordsDuration(this.measure)) { + measures2.push(this.measure); + } + } + this.measure = new _Converter.Measure(measures2.length + 1, this.options); + if (!measures2.length) { + this.measure.attributes.push({ + "divisions": this.options.divisions + }, { + _name: "clef", + _attrs: [{ "print-object": this.options.clef ? "yes" : "no" }], + _content: [{ + "sign": "G" + }, { + "line": 2 + }] + }, { + "staff-details": { + "staff-lines": 0 + } + }, { + "measure-style": [{ + _name: "slash", + _attrs: { "type": "start", "use-stems": this.options.notation === "rhythmic" ? "yes" : "no" } + }] + }, this.convertKey()); + if (this.song.bpm) { + this.measure.body["_content"].push(this.convertTempo(this.song.bpm)); + } + this.measure.body["_content"].push(this.convertStyleAndGroove(this.song.style, this.song.groove)); + } + this.measure.barlines.push(this.convertBarline(cell.bars, "left")); + if (this.barRepeat) { + this.measure.chords = [...measures2[measures2.length - this.barRepeat - 1].chords]; + } + } + if (!this.measure) { + if (cell.chord || cell.annots.length || cell.comments.length || cell.bars && cell.bars !== ")") { + this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures2[measures2.length - 1]); + } + this.emptyCells++; + if (isNewSystem(cellIndex)) { + this.emptyCellNewSystem = true; + } + return measures2; + } + if (isNewSystem(cellIndex) || this.emptyCellNewSystem) { + this.measure.body["_content"].splice(0, 0, { + _name: "print", + _attrs: { "new-system": "yes" }, + _content: { ...this.emptyCellNewSystem && { + "system-layout": { + "system-margins": [{ + "left-margin": _Converter._mmToTenths(this.cellWidth * this.emptyCells) + }, { + "right-margin": "0.00" + }] + } + } } + }); + } + if (!this.emptyCellNewSystem && this.emptyCells > 0) { + if (this.measure.body["_content"][0]?.["_name"] === "print" && this.measure.body["_content"][0]["_attrs"]?.["new-system"] === "yes") { + measures2[measures2.length - 1].body["_content"].splice(0, 0, { + _name: "print", + _content: { + "system-layout": { + "system-margins": [{ + "left-margin": "0.00" + }, { + "right-margin": _Converter._mmToTenths(this.cellWidth * this.emptyCells) + }] + } + } + }); + } else { + this.measure.body["_content"].splice(0, 0, { + _name: "print", + _content: { + "measure-layout": { + "measure-distance": _Converter._mmToTenths(this.cellWidth * this.emptyCells) + } + } + }); + } + } + this.emptyCellNewSystem = false; + this.emptyCells = 0; + if (cell.chord) { + switch (cell.chord.note) { + case "x": { + this.barRepeat = 1; + this.measure.chords = [...measures2[measures2.length - this.barRepeat].chords]; + break; + } + case "r": { + this.barRepeat = 2; + this.measure.chords = [...measures2[measures2.length - this.barRepeat].chords]; + break; + } + case "p": + if (this.measure.chords.length) { + this.measure.chords[this.measure.chords.length - 1].spaces++; + break; + } + // Fall into case 'W'. + case "W": { + let target = this.measure; + if (!target.chords.length) { + target = measures2.slice().reverse().find((m) => m.chords.length); + if (!target) { + this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`); + } + } + if (target) { + const chord = target.chords[target.chords.length - 1].ireal; + chord.over = cell.chord.over; + chord.alternate = cell.chord.alternate; + this.measure.chords.push(this.convertChord(chord)); + } + break; + } + case " ": { + this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`); + break; + } + default: { + this.measure.chords.push(this.convertChord(cell.chord)); + } + } + } else if (!this.barRepeat) { + if (this.measure.chords.length) { + this.measure.chords[this.measure.chords.length - 1].spaces++; + } + } + cell.annots.forEach((annot) => { + switch (annot[0]) { + case "*": { + const section = annot.slice(1); + this.measure.body["_content"].push(this.convertSection(section)); + break; + } + case "T": { + const time = annot.slice(1); + this.measure.attributes.push(this.convertTime(time)); + break; + } + case "S": { + this.measure.body["_content"].push(this.convertSegno()); + break; + } + case "N": { + let ending = parseInt(annot.slice(1)); + if (ending < 1) { + const target = measures2.slice().reverse().find((m) => !!m.barEnding); + ending = target?.barEnding ?? 0 + 1; + } + this.measure.barlines[0]["_content"].push(this.convertEnding(ending, "start")); + if (ending > 1) { + measures2[measures2.length - 1].barlines[1]["_content"].push(this.convertEnding(ending - 1, "stop")); + const target = measures2.slice().reverse().find((m) => m.barEnding === ending - 1); + if (!target) { + this._log(LogLevel.Error, `Cannot find ending ${ending - 1} in right barline of any measure`); + } else { + const index = target.barlines[1]["_content"].findIndex((b) => !!b && b["_name"] === "ending"); + if (index === -1) { + this._log(LogLevel.Error, `Cannot find ending ${ending - 1} in right barline`, target); + } + delete target.barlines[1]["_content"][index]; + } + } + this.measure.barEnding = ending; + break; + } + case "Q": { + this.measure.body["_content"].push(this.convertToCoda()); + this.codas.push(this.measure); + break; + } + // Ignore small and large chord renderings. + case "l": + case "s": + break; + case "f": { + this.measure.chords[this.measure.chords.length - 1].fermata = true; + break; + } + case "U": { + this.measure.body["_content"].push(this.convertFine("END")); + break; + } + default: + this._log(LogLevel.Warn, `Unhandled annotation "${annot}"`); + } + }); + cell.comments.map((c) => c.trim()).forEach((comment) => { + const repeatFn = this._map(_Converter.mapRepeats, comment); + if (repeatFn) { + this.measure.body["_content"].push(repeatFn.call(this, comment)); + } else { + this.measure.body["_content"].push(this.convertComment(comment)); + } + }); + if (cell.bars.match(/\)|\}|\]|Z/) && this.measure.chords.length) { + this.measure.barlines.push(this.convertBarline(cell.bars, "right")); + if (this.measure.barEnding) { + this.measure.barlines[1]["_content"].push(this.convertEnding(this.measure.barEnding, "discontinue")); + } + if (this.adjustChordsDuration(this.measure)) { + measures2.push(this.measure); + } + this.measure = null; + if (this.barRepeat) this.barRepeat--; + } + return measures2; + }, []); + const remainingCells = this.song.cells.length % 16 - this.emptyCells; + if (remainingCells > 0 && measures.length > 0) { + measures[measures.length - 1].body["_content"].splice(0, 0, { + _name: "print", + _content: { + "system-layout": { + "system-margins": [{ + "left-margin": "0.00" + }, { + "right-margin": _Converter._mmToTenths(this.cellWidth * remainingCells) + }] + } + } + }); + } + if (this.codas.length) { + const target = this.codas[this.codas.length - 1]; + const direction = target.body["_content"].findIndex( + (d) => d["_name"] === "direction" && Array.isArray(d["_content"]) && d["_content"].some( + (s) => s["_name"] === "sound" && Object.keys(s["_attrs"]).includes("tocoda") + ) + ); + if (direction === -1) { + this._log(LogLevel.Warn, `Cannot find sound direction`, target); + } + target.body["_content"][direction] = this.convertCoda(); + } + return measures.map((measure) => measure.assemble()); + } + // Fix order of elements according to sequence as specified by an xs:sequence. + // @param {array} elements - Array of elements to sort. + // @param {array} sequence - Array of element names in order of xs:sequence. + // @return {array} Ordered array of elements. + static reorderSequence(measure, elements, sequence) { + return elements.filter((a) => Object.keys(a).length).sort((a1, a2) => { + let k1 = Object.keys(a1)[0]; + if (k1 === "_name") k1 = a1[k1]; + let k2 = Object.keys(a2)[0]; + if (k2 === "_name") k2 = a2[k2]; + const i1 = sequence.indexOf(k1); + const i2 = sequence.indexOf(k2); + if (i1 === -1) { + this._log(LogLevel.Warn, `Unrecognized element "${k1}"`, measure); + } + if (i2 === -1) { + this._log(LogLevel.Warn, `Unrecognized element "${k2}"`, measure); + } + return i1 - i2; + }); + } + convertRepeatNx(comment) { + let repeats = null; + if (null !== (repeats = comment.match(/(\d+)x/))) { + this.repeats = repeats[1]; + } + } + convertFine(comment) { + return { + _name: "direction", + _attrs: { "placement": "below" }, + _content: [{ + "direction-type": { + "words": comment + } + }, { + _name: "sound", + _attrs: { "fine": "yes" } + }] + }; + } + convertDaCapo(comment) { + return { + _name: "direction", + _attrs: { "placement": "below" }, + _content: [{ + "direction-type": { + "words": comment + } + }, { + _name: "sound", + _attrs: { "dacapo": "yes" } + }] + }; + } + convertDalSegno(comment) { + return { + _name: "direction", + _attrs: { "placement": "below" }, + _content: [{ + "direction-type": { + "words": comment + } + }, { + _name: "sound", + _attrs: { "dalsegno": "yes" } + }] + }; + } + convertComment(comment) { + return { + _name: "direction", + _attrs: { "placement": comment[0] === "*" ? "above" : "below" }, + _content: { + "direction-type": { + "words": comment[0] === "*" ? comment.slice(3) : comment + } + } + }; + } + convertEnding(ending, type) { + return { + _name: "ending", + _attrs: { "number": ending, "type": type }, + _content: `${ending}.` + }; + } + convertBarline(bars, location) { + let style = "regular"; + let repeat = null; + if (bars.match(/\[|\]/)) { + style = "light-light"; + } else if (bars.match(/Z/)) { + style = "light-heavy"; + } else if (bars.match(/\{|\}/)) { + style = location === "left" ? "heavy-light" : "light-heavy"; + repeat = location === "left" ? "forward" : "backward"; + } + if (repeat === "forward") { + this.repeats = 2; + } + return { + _name: "barline", + _attrs: { "location": location }, + _content: [{ + "bar-style": style + }, { ...repeat && { + _name: "repeat", + _attrs: { "direction": repeat, ...repeat === "backward" && { "times": this.repeats } } + } }] + }; + } + convertSection(section) { + if (section === "i") section = "Intro"; + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: { + "direction-type": { + "rehearsal": section + } + } + }; + } + convertSegno() { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": { + _name: "segno" + } + }, { + _name: "sound", + _attrs: { "segno": "segno" } + }] + }; + } + convertCoda() { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": { + "_name": "coda" + } + }, { + _name: "sound", + _attrs: { "coda": "coda" } + // TODO: We assume a single coda + }] + }; + } + convertToCoda() { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": { + "words": "To Coda" + } + }, { + _name: "sound", + _attrs: { "tocoda": "coda" } + // TODO: We assume a single coda + }] + }; + } + convertTempo(bpm) { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": [{ + _name: "metronome", + _attrs: { "parentheses": "no" }, + _content: [{ + "beat-unit": this.calculateChordDuration(1)[0].type + }, { + "per-minute": bpm + }] + }] + }, { + _name: "sound", + _attrs: { "tempo": bpm } + }] + }; + } + convertTime(time) { + let beats = parseInt(time[0]); + let beatType = parseInt(time[1]); + if (time === "12") { + beats = 12; + beatType = 8; + } + this.time = { beats, beatType }; + return { + "time": [{ + "beats": beats + }, { + "beat-type": beatType + }] + }; + } + adjustChordsDuration(measure) { + if (measure.chords.length > this.time.beats) { + this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure); + return true; + } + let beats = measure.chords.reduce((beats2, chord) => beats2 + 1 + chord.spaces, 0); + if (!beats) { + this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure); + return false; + } + if (beats > this.time.beats) { + let chordIndex = 0; + while (beats > this.time.beats) { + if (measure.chords[chordIndex].spaces > 0) { + measure.chords[chordIndex].spaces--; + beats--; + } + chordIndex = (chordIndex + 1) % measure.chords.length; + } + } else { + let chordIndex = 0; + while (beats < this.time.beats) { + measure.chords[chordIndex].spaces++; + beats++; + chordIndex = (chordIndex + 1) % measure.chords.length; + } + } + measure.chords = measure.chords.map((chord) => { + chord.notes = this.calculateChordDuration(1 + chord.spaces).map( + (duration, i, ds) => this.convertChordNote( + duration, + i === ds.length - 1 ? chord.fermata : false, + // Possible fermata on last chord note only + this.options.notation === "rhythmic" && ds.length > 1 ? i > 0 ? "stop" : "start" : null + // Possible tie in case of rhythmic notation + ) + ); + return chord; + }); + return true; + } + calculateChordDuration(beats) { + const mapDuration = { + "1": [{ t: "eighth", d: 0, b: 1 }], + "2": [{ t: "quarter", d: 0, b: 2 }], + "3": [{ t: "quarter", d: 1, b: 3 }], + "4": [{ t: "half", d: 0, b: 4 }], + "5": [{ t: "quarter", d: 1, b: 3 }, { t: "quarter", d: 0, b: 2 }], + "6": [{ t: "half", d: 1, b: 6 }], + "7": [{ t: "half", d: 2, b: 7 }], + "8": [{ t: "whole", d: 0, b: 8 }], + "9": [{ t: "half", d: 1, b: 6 }, { t: "quarter", d: 1, b: 3 }], + "10": [{ t: "half", d: 1, b: 6 }, { t: "half", d: 0, b: 4 }], + "11": [{ t: "half", d: 2, b: 7 }, { t: "half", d: 0, b: 4 }], + "12": [{ t: "whole", d: 1, b: 12 }], + "13": [{ t: "half", d: 2, b: 7 }, { t: "half", d: 1, b: 6 }], + "14": [{ t: "whole", d: 2, b: 14 }], + "15": [{ t: "whole", d: 0, b: 8 }, { t: "half", d: 2, b: 7 }] + }; + if (this.options.notation === "slash") { + const index = 1 * 8 / this.time.beatType; + return Array(beats).fill( + this._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`).map((duration) => { + return { + duration: duration.b * this.options.divisions / 2, + type: duration.t, + dots: duration.d + }; + })[0] + // We're sure to get only one entry in this case. + ); + } else { + const index = beats * 8 / this.time.beatType; + return this._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`).map((duration) => { + return { + duration: duration.b * this.options.divisions / 2, + type: duration.t, + dots: duration.d + }; + }); + } + } + convertChordNote(duration, fermata = false, tie = null) { + const altered = _Converter.mapFifthsToAlters[this.fifths >= 0 ? "sharp" : "flat"].slice(0, Math.abs(this.fifths)); + const noteType = { + _name: "pitch", + _content: [{ + "step": this.options.step + }, { + "alter": altered.includes(this.options.step) ? this.fifths > 0 ? 1 : -1 : 0 + }, { + "octave": this.options.octave + }] + }; + const notations = []; + if (fermata) { + notations.push({ _name: "fermata" }); + } + if (tie) { + notations.push({ _name: "tied", _attrs: { "type": tie } }); + } + return _Converter.reorderSequence(this.measure, [noteType, { + _name: "cue" + }, { + _name: "notehead", + _content: this.options.notehead, + _attrs: [{ "font-size": this.options.noteheadSize }] + }, { + "duration": duration.duration + }, { + "voice": 1 + }, { + _name: "type", + _attrs: { "size": "full" }, + _content: duration.type + }, { ...notations.length && { + "notations": _Converter.reorderSequence(this.measure, notations, _Converter.sequenceNotations) + } }].concat(Array(duration.dots).fill({ _name: "dot" })), _Converter.sequenceNote); + } + convertChordDegree(value, type, alter) { + return { + _name: "degree", + _attrs: { "print-object": "no" }, + _content: [{ + "degree-value": value + }, { + "degree-alter": alter + }, { + "degree-type": type + }] + }; + } + convertChordSymbol(chord) { + const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`)); + if (!parsedChord) { + this._log(LogLevel.Warn, `Unrecognized chord "${chord.note}${chord.modifiers}"`); + return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null }; + } + const rootStep = parsedChord.input.rootNote[0]; + const rootAlter = this._map(_Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord "${parsedChord.input.rootNote}"`); + const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join(""); + const mapKind = { + "major": "major", + "major6": "major-sixth", + "major7": "major-seventh", + "dominant7": "dominant", + "minor": "minor", + "minor6": "minor-sixth", + "minor7": "minor-seventh", + "minorMajor7": "major-minor", + "augmented": "augmented", + "diminished": "diminished", + "diminished7": "diminished-seventh", + "power": "power" + }; + let chordKind = this._map(mapKind, parsedChord.normalized.quality, "", `Unrecognized chord quality "${parsedChord.normalized.quality}"`); + if (parsedChord.normalized.extensions.length) { + const extension = Math.max(...parsedChord.normalized.extensions.map((e) => parseInt(e))).toString(); + const mapExtensionKind = { + "9": "-ninth", + "11": "-11th", + "13": "-13th" + }; + chordKind = chordKind.split("-")[0] + this._map(mapExtensionKind, extension, "", `Unhandled extension ${extension}`); + if (chordKind === "dominant-11th") { + parsedChord.normalized.isSuspended = false; + } + } + [ + { intervals: ["1", "4", "5"], kind: "suspended-fourth", strict: true }, + { intervals: ["1", "5", "9"], kind: "suspended-second", strict: true }, + { intervals: ["1", "b3", "b5", "b7"], kind: "half-diminished", strict: true }, + { intervals: ["1", "3", "#5", "b7"], kind: "augmented-seventh", strict: false } + ].some((chord2) => { + if ((!chord2.strict || parsedChord.normalized.intervals.length === chord2.intervals.length) && chord2.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])) { + chordKind = chord2.kind; + chord2.intervals.forEach((i) => { + parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter((p) => p === i); + parsedChord.normalized.adds = parsedChord.normalized.adds.filter((p) => p === i); + parsedChord.normalized.omits = parsedChord.normalized.omits.filter((p) => p === i); + }); + parsedChord.normalized.intervals.forEach((i) => { + if (!chord2.intervals.includes(i)) { + parsedChord.normalized.adds.push(i); + } + }); + return true; + } + }); + const chordDegrees = []; + if (parsedChord.normalized.isSuspended && !chordKind.includes("suspended")) { + parsedChord.normalized.adds.push("4"); + if (!parsedChord.normalized.adds.includes("3")) { + parsedChord.normalized.omits.push("3"); + } + } + parsedChord.normalized.alterations.forEach((alteration) => { + const degree = alteration.slice(1); + chordDegrees.push( + this.convertChordDegree( + degree, + degree === "5" || parsedChord.normalized.extensions.includes(degree) ? "alter" : "add", + this._map(_Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in "${alteration}"`) + ) + ); + }); + parsedChord.normalized.adds.forEach((add) => { + const alteration = Object.keys(_Converter.mapAlter).includes(add[0]) ? add[0] : null; + const degree = alteration ? add.slice(1) : add; + chordDegrees.push( + this.convertChordDegree(degree, "add", this._map(_Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in "${add}"`)) + ); + }); + parsedChord.normalized.omits.forEach((omit) => { + const alteration = Object.keys(_Converter.mapAlter).includes(omit[0]) ? omit[0] : null; + const degree = alteration ? omit.slice(1) : omit; + chordDegrees.push( + this.convertChordDegree(degree, "subtract", this._map(_Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in "${omit}"`)) + ); + }); + return { rootStep, rootAlter, chordKind, chordDegrees, chordText }; + } + convertChord(chord) { + let harmony = null; + if (chord.note === "n") { + harmony = [{ + "root": [{ + _name: "root-step", + _attrs: { "text": "" }, + _content: this.options.step + }] + }, { + _name: "kind", + _attrs: { "text": "N.C." }, + _content: "none" + }]; + } else { + const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord); + const bass = !chord.over ? null : [{ + "bass-step": chord.over.note[0] + }, { ...chord.over.note[1] && { + "bass-alter": this._map(_Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note "${chord.over.note}"`) + } }]; + harmony = [{ + "root": [{ + "root-step": rootStep + }, { ...rootAlter && { + // Don't generate the root-alter entry if rootAlter is blank + "root-alter": rootAlter + } }] + }, { + _name: "kind", + _attrs: { "text": chordText, "use-symbols": "no" }, + _content: chordKind + }, { ...bass && { + "bass": bass + } }].concat(chordDegrees); + } + if (chord.alternate) { + this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`); + } + return new _Converter.Chord( + harmony, + // Initial chord duration is 1 beat + this.calculateChordDuration(1).map((duration) => this.convertChordNote(duration)), + chord + ); + } + convertKey() { + const mapKeys = { + // Major keys + "C": 0, + "G": 1, + "D": 2, + "A": 3, + "E": 4, + "B": 5, + "F#": 6, + "C#": 7, + "F": -1, + "Bb": -2, + "Eb": -3, + "Ab": -4, + "Db": -5, + "Gb": -6, + "Cb": -7, + // Minor keys + "A-": 0, + "E-": 1, + "B-": 2, + "F#-": 3, + "C#-": 4, + "G#-": 5, + "D#-": 6, + "A#-": 7, + "D-": -1, + "G-": -2, + "C-": -3, + "F-": -4, + "Bb-": -5, + "Eb-": -6, + "Ab-": -7 + }; + this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature "${this.song.key}"`); + return { + _name: "key", + _attrs: [{ "print-object": this.options.keySignature ? "yes" : "no" }], + _content: [{ + "fifths": this.fifths + }, { + "mode": this.song.key.slice(-1) === "-" ? "minor" : "major" + }] + }; + } + convertStyleAndGroove(style, groove) { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": [{ + "words": style + }] + }, { + "sound": [{ + "play": [{ + _name: "other-play", + _attrs: { "type": "groove" }, + _content: groove || style + }] + }] + }] + }; + } + _log(logLevel, message, measure = this.measure) { + if (logLevel < this.options.logLevel) return; + const log = `[ireal-musicxml] [${this.song.title}${measure ? "#" + measure.number() : ""}] ${message}`; + let method = "warn"; + switch (logLevel) { + case LogLevel.Debug: + method = "debug"; + break; + case LogLevel.Info: + method = "info"; + break; + case LogLevel.Warn: + method = "warn"; + break; + case LogLevel.Error: + method = "error"; + break; + } + console[method](log); + } + _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) { + if (!key) return defaultValue; + if (!(key in map)) { + if (message) { + this._log(logLevel, message, measure); + } + return defaultValue || null; + } + return map[key]; + } + static _mmToTenths(mm, decimals = 2) { + const value = mm * SCALING_TENTHS / SCALING_MM; + const power = Math.pow(10, decimals); + return Math.round(value * power) / power; + } +}; + +// src/lib/index.js +function convertSync(ireal, options = {}) { + const playlist = new Playlist(ireal); + playlist.songs.forEach((song) => { + song.musicXml = Converter.convert(song, options); + }); + return playlist; +} +async function convert(ireal, options = {}) { + return new import_promise.default((resolve) => resolve(convertSync(ireal, options))); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Cell, + Chord, + Converter, + LogLevel, + Playlist, + Song, + Version, + convert, + convertSync +}); diff --git a/build/ireal-musicxml.js b/build/ireal-musicxml.js index fc63d6f..1f56041 100644 --- a/build/ireal-musicxml.js +++ b/build/ireal-musicxml.js @@ -1,14 +1,8278 @@ -(()=>{var bi=Object.create;var zr=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var xi=Object.getOwnPropertyNames;var Si=Object.getPrototypeOf,Ai=Object.prototype.hasOwnProperty;var vt=(s,p)=>()=>(p||s((p={exports:{}}).exports,p),p.exports);var Oi=(s,p,u,g)=>{if(p&&typeof p=="object"||typeof p=="function")for(let e of xi(p))!Ai.call(s,e)&&e!==u&&zr(s,e,{get:()=>p[e],enumerable:!(g=yi(p,e))||g.enumerable});return s};var Ie=(s,p,u)=>(u=s!=null?bi(Si(s)):{},Oi(p||!s||!s.__esModule?zr(u,"default",{value:s,enumerable:!0}):u,s));var ar=vt((is,Hr)=>{"use strict";Hr.exports=nr;function nr(s){_t.length||(De(),Br=!0),_t[_t.length]=s}var _t=[],Br=!1,De,Rt=0,Ti=1024;function Lr(){for(;Rt<_t.length;){var s=Rt;if(Rt=Rt+1,_t[s].call(),Rt>Ti){for(var p=0,u=_t.length-Rt;p{"use strict";var ji=ar();function Ne(){}var le=null,fe={};function Ci(s){try{return s.then}catch(p){return le=p,fe}}function Ei(s,p){try{return s(p)}catch(u){return le=u,fe}}function Fi(s,p,u){try{s(p,u)}catch(g){return le=g,fe}}Xr.exports=bt;function bt(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof s!="function")throw new TypeError("Promise constructor's argument is not a function");this._x=0,this._y=0,this._z=null,this._A=null,s!==Ne&&Wr(s,this)}bt._B=null;bt._C=null;bt._D=Ne;bt.prototype.then=function(s,p){if(this.constructor!==bt)return Ii(this,s,p);var u=new bt(Ne);return Pe(this,new Kr(s,p,u)),u};function Ii(s,p,u){return new s.constructor(function(g,e){var i=new bt(Ne);i.then(g,e),Pe(s,new Kr(p,u,i))})}function Pe(s,p){for(;s._y===3;)s=s._z;if(bt._B&&bt._B(s),s._y===0){if(s._x===0){s._x=1,s._A=p;return}if(s._x===1){s._x=2,s._A=[s._A,p];return}s._A.push(p);return}Di(s,p)}function Di(s,p){ji(function(){var u=s._y===1?p.onFulfilled:p.onRejected;if(u===null){s._y===1?ir(p.promise,s._z):ce(p.promise,s._z);return}var g=Ei(u,s._z);g===fe?ce(p.promise,le):ir(p.promise,g)})}function ir(s,p){if(p===s)return ce(s,new TypeError("A promise cannot be resolved with itself."));if(p&&(typeof p=="object"||typeof p=="function")){var u=Ci(p);if(u===fe)return ce(s,le);if(u===s.then&&p instanceof bt){s._y=3,s._z=p,sr(s);return}else if(typeof u=="function"){Wr(u.bind(p),s);return}}s._y=1,s._z=p,sr(s)}function ce(s,p){s._y=2,s._z=p,bt._C&&bt._C(s,p),sr(s)}function sr(s){if(s._x===1&&(Pe(s,s._A),s._A=null),s._x===2){for(var p=0;p{"use strict";var Vr=kt();Yr.exports=Vr;Vr.prototype.done=function(s,p){var u=arguments.length?this.then.apply(this,arguments):this;u.then(null,function(g){setTimeout(function(){throw g},0)})}});var Jr=vt((us,Qr)=>{"use strict";var Re=kt();Qr.exports=Re;Re.prototype.finally=function(s){return this.then(function(p){return Re.resolve(s()).then(function(){return p})},function(p){return Re.resolve(s()).then(function(){throw p})})}});var en=vt((cs,tn)=>{"use strict";var k=kt();tn.exports=k;var Pi=qt(!0),Ni=qt(!1),Ri=qt(null),_i=qt(void 0),Mi=qt(0),zi=qt("");function qt(s){var p=new k(k._D);return p._y=1,p._z=s,p}k.resolve=function(s){if(s instanceof k)return s;if(s===null)return Ri;if(s===void 0)return _i;if(s===!0)return Pi;if(s===!1)return Ni;if(s===0)return Mi;if(s==="")return zi;if(typeof s=="object"||typeof s=="function")try{var p=s.then;if(typeof p=="function")return new k(p.bind(s))}catch(u){return new k(function(g,e){e(u)})}return qt(s)};var pe=function(s){return typeof Array.from=="function"?(pe=Array.from,Array.from(s)):(pe=function(p){return Array.prototype.slice.call(p)},Array.prototype.slice.call(s))};k.all=function(s){var p=pe(s);return new k(function(u,g){if(p.length===0)return u([]);var e=p.length;function i(a,n){if(n&&(typeof n=="object"||typeof n=="function"))if(n instanceof k&&n.then===k.prototype.then){for(;n._y===3;)n=n._z;if(n._y===1)return i(a,n._z);n._y===2&&g(n._z),n.then(function(h){i(a,h)},g);return}else{var o=n.then;if(typeof o=="function"){var l=new k(o.bind(n));l.then(function(h){i(a,h)},g);return}}p[a]=n,--e===0&&u(p)}for(var t=0;t{"use strict";var rn=ar(),_e=[],ur=[],Gi=rn.makeRequestCallFromTimer(Bi);function Bi(){if(ur.length)throw ur.shift()}an.exports=cr;function cr(s){var p;_e.length?p=_e.pop():p=new nn,p.task=s,rn(p)}function nn(){this.task=null}nn.prototype.call=function(){try{this.task.call()}catch(s){cr.onerror?cr.onerror(s):(ur.push(s),Gi())}finally{this.task=null,_e[_e.length]=this}}});var cn=vt((fs,un)=>{"use strict";var te=kt(),lr=sn();un.exports=te;te.denodeify=function(s,p){return typeof p=="number"&&p!==1/0?$i(s,p):Ui(s)};var on="function (err, res) {if (err) { rj(err); } else { rs(res); }}";function $i(s,p){for(var u=[],g=0;g "+p+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+on+";","var res;","switch (argLength) {",u.concat(["extra"]).map(function(i,t){return"case "+t+":res = fn.call("+["self"].concat(u.slice(0,t)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],e)(te,s)}te.nodeify=function(s){return function(){var p=Array.prototype.slice.call(arguments),u=typeof p[p.length-1]=="function"?p.pop():null,g=this;try{return s.apply(this,arguments).nodeify(u,g)}catch(e){if(u===null||typeof u>"u")return new te(function(i,t){t(e)});lr(function(){u.call(g,e)})}}};te.prototype.nodeify=function(s,p){if(typeof s!="function")return this;this.then(function(u){lr(function(){s.call(p,null,u)})},function(u){lr(function(){s.call(p,u)})})}});var fn=vt((ps,ln)=>{"use strict";var pt=kt();ln.exports=pt;pt.enableSynchronous=function(){pt.prototype.isPending=function(){return this.getState()==0},pt.prototype.isFulfilled=function(){return this.getState()==1},pt.prototype.isRejected=function(){return this.getState()==2},pt.prototype.getValue=function(){if(this._y===3)return this._z.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._z},pt.prototype.getReason=function(){if(this._y===3)return this._z.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._z},pt.prototype.getState=function(){return this._y===3?this._z.getState():this._y===-1||this._y===-2?0:this._y}};pt.disableSynchronous=function(){pt.prototype.isPending=void 0,pt.prototype.isFulfilled=void 0,pt.prototype.isRejected=void 0,pt.prototype.getValue=void 0,pt.prototype.getReason=void 0,pt.prototype.getState=void 0}});var hn=vt((hs,pn)=>{"use strict";pn.exports=kt();Zr();Jr();en();cn();fn()});var mn=vt((ds,dn)=>{"use strict";dn.exports=hn()});var jn=vt((ms,wn)=>{var yt=-1,ht=1,it=0;function Se(s,p,u,g,e){if(s===p)return s?[[it,s]]:[];if(u!=null){var i=Ji(s,p,u);if(i)return i}var t=pr(s,p),a=s.substring(0,t);s=s.substring(t),p=p.substring(t),t=Me(s,p);var n=s.substring(s.length-t);s=s.substring(0,s.length-t),p=p.substring(0,p.length-t);var o=Hi(s,p);return a&&o.unshift([it,a]),n&&o.push([it,n]),hr(o,e),g&&Xi(o),o}function Hi(s,p){var u;if(!s)return[[ht,p]];if(!p)return[[yt,s]];var g=s.length>p.length?s:p,e=s.length>p.length?p:s,i=g.indexOf(e);if(i!==-1)return u=[[ht,g.substring(0,i)],[it,e],[ht,g.substring(i+e.length)]],s.length>p.length&&(u[0][0]=u[2][0]=yt),u;if(e.length===1)return[[yt,s],[ht,p]];var t=Wi(s,p);if(t){var a=t[0],n=t[1],o=t[2],l=t[3],h=t[4],c=Se(a,o),m=Se(n,l);return c.concat([[it,h]],m)}return Ki(s,p)}function Ki(s,p){for(var u=s.length,g=p.length,e=Math.ceil((u+g)/2),i=e,t=2*e,a=new Array(t),n=new Array(t),o=0;ou)m+=2;else if(E>g)c+=2;else if(h){var _=i+l-S;if(_>=0&&_=F)return gn(s,p,j,E)}}}for(var I=-y+v;I<=y-x;I+=2){var _=i+I,F;I===-y||I!==y&&n[_-1]u)x+=2;else if(z>g)v+=2;else if(!h){var A=i+l-I;if(A>=0&&A=F)return gn(s,p,j,E)}}}}return[[yt,s],[ht,p]]}function gn(s,p,u,g){var e=s.substring(0,u),i=p.substring(0,g),t=s.substring(u),a=p.substring(g),n=Se(e,i),o=Se(t,a);return n.concat(o)}function pr(s,p){if(!s||!p||s.charAt(0)!==p.charAt(0))return 0;for(var u=0,g=Math.min(s.length,p.length),e=g,i=0;ug?s=s.substring(u-g):up.length?s:p,g=s.length>p.length?p:s;if(u.length<4||g.length*2=m.length?[j,E,_,F,A]:null}var i=e(u,g,Math.ceil(u.length/4)),t=e(u,g,Math.ceil(u.length/2)),a;if(!i&&!t)return null;t?i?a=i[4].length>t[4].length?i:t:a=t:a=i;var n,o,l,h;s.length>p.length?(n=a[0],o=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],n=a[2],o=a[3]);var c=a[4];return[n,o,l,h,c]}function Xi(s){for(var p=!1,u=[],g=0,e=null,i=0,t=0,a=0,n=0,o=0;i0?u[g-1]:-1,t=0,a=0,n=0,o=0,e=null,p=!0)),i++;for(p&&hr(s),Zi(s),i=1;i=m?(c>=l.length/2||c>=h.length/2)&&(s.splice(i,0,[it,h.substring(0,c)]),s[i-1][1]=l.substring(0,l.length-c),s[i+1][1]=h.substring(c),i++):(m>=l.length/2||m>=h.length/2)&&(s.splice(i,0,[it,l.substring(0,m)]),s[i-1][0]=ht,s[i-1][1]=h.substring(0,h.length-m),s[i+1][0]=yt,s[i+1][1]=l.substring(m),i++),i++}i++}}var bn=/[^a-zA-Z0-9]/,yn=/\s/,xn=/[\r\n]/,Vi=/\n\r?\n$/,Yi=/^\r?\n\r?\n/;function Zi(s){function p(m,v){if(!m||!v)return 6;var x=m.charAt(m.length-1),y=v.charAt(0),S=x.match(bn),A=y.match(bn),j=S&&x.match(yn),E=A&&y.match(yn),_=j&&x.match(xn),F=E&&y.match(xn),I=_&&m.match(Vi),z=F&&v.match(Yi);return I||z?5:_||F?4:S&&!j&&E?3:j||E?2:S||A?1:0}for(var u=1;u=h&&(h=c,n=g,o=e,l=i)}s[u-1][1]!=n&&(n?s[u-1][1]=n:(s.splice(u-1,1),u--),s[u][1]=o,l?s[u+1][1]=l:(s.splice(u+1,1),u--))}u++}}function hr(s,p){s.push([it,""]);for(var u=0,g=0,e=0,i="",t="",a;u=0&&Tn(s[n][1])){var o=s[n][1].slice(-1);if(s[n][1]=s[n][1].slice(0,-1),i=o+i,t=o+t,!s[n][1]){s.splice(n,1),u--;var l=n-1;s[l]&&s[l][0]===ht&&(e++,t=s[l][1]+t,l--),s[l]&&s[l][0]===yt&&(g++,i=s[l][1]+i,l--),n=l}}if(On(s[u][1])){var o=s[u][1].charAt(0);s[u][1]=s[u][1].slice(1),i+=o,t+=o}}if(u0||t.length>0){i.length>0&&t.length>0&&(a=pr(t,i),a!==0&&(n>=0?s[n][1]+=t.substring(0,a):(s.splice(0,0,[it,t.substring(0,a)]),u++),t=t.substring(a),i=i.substring(a)),a=Me(t,i),a!==0&&(s[u][1]=t.substring(t.length-a)+s[u][1],t=t.substring(0,t.length-a),i=i.substring(0,i.length-a)));var h=e+g;i.length===0&&t.length===0?(s.splice(u-h,h),u=u-h):i.length===0?(s.splice(u-h,h,[ht,t]),u=u-h+1):t.length===0?(s.splice(u-h,h,[yt,i]),u=u-h+1):(s.splice(u-h,h,[yt,i],[ht,t]),u=u-h+2)}u!==0&&s[u-1][0]===it?(s[u-1][1]+=s[u][1],s.splice(u,1)):u++,e=0,g=0,i="",t="";break}}s[s.length-1][1]===""&&s.pop();var c=!1;for(u=1;u=55296&&s<=56319}function An(s){return s>=56320&&s<=57343}function On(s){return An(s.charCodeAt(0))}function Tn(s){return Sn(s.charCodeAt(s.length-1))}function Qi(s){for(var p=[],u=0;u0&&p.push(s[u]);return p}function fr(s,p,u,g){return Tn(s)||On(g)?null:Qi([[it,s],[yt,p],[ht,u],[it,g]])}function Ji(s,p,u){var g=typeof u=="number"?{index:u,length:0}:u.oldRange,e=typeof u=="number"?null:u.newRange,i=s.length,t=p.length;if(g.length===0&&(e===null||e.length===0)){var a=g.index,n=s.slice(0,a),o=s.slice(a),l=e?e.index:null;t:{var h=a+t-i;if(l!==null&&l!==h||h<0||h>t)break t;var c=p.slice(0,h),m=p.slice(h);if(m!==o)break t;var v=Math.min(a,h),x=n.slice(0,v),y=c.slice(0,v);if(x!==y)break t;var S=n.slice(v),A=c.slice(v);return fr(x,S,A,o)}t:{if(l!==null&&l!==a)break t;var j=a,c=p.slice(0,j),m=p.slice(j);if(c!==n)break t;var E=Math.min(i-j,t-j),_=o.slice(o.length-E),F=m.slice(m.length-E);if(_!==F)break t;var S=o.slice(0,o.length-E),A=m.slice(0,m.length-E);return fr(n,S,A,_)}}if(g.length>0&&e&&e.length===0)t:{var x=s.slice(0,g.index),_=s.slice(g.index+g.length),v=x.length,E=_.length;if(t{(function(s,p){if(typeof define=="function"&&define.amd)define(["exports"],p);else if(typeof Be<"u")p(Be);else{var u={exports:{}};p(u.exports),s.jstoxml=u.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Be,function(s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.toXML=s.default=void 0;function p(P){return i(P)||e(P)||g(P)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(P,O){if(P){if(typeof P=="string")return t(P,O);var D=Object.prototype.toString.call(P).slice(8,-1);if(D==="Object"&&P.constructor&&(D=P.constructor.name),D==="Map"||D==="Set")return Array.from(P);if(D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D))return t(P,O)}}function e(P){if(typeof Symbol<"u"&&P[Symbol.iterator]!=null||P["@@iterator"]!=null)return Array.from(P)}function i(P){if(Array.isArray(P))return t(P)}function t(P,O){(O==null||O>P.length)&&(O=P.length);for(var D=0,Y=new Array(O);D0&&arguments[0]!==void 0?arguments[0]:"",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return O.repeat(D)},F=function(O){return Array.isArray(O)&&h||l(O)===y&&O!==null&&O._name&&S||O instanceof Date&&m||O===null&&v||l(O)},I=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof O!="string")return O;var Y=new RegExp("(".concat(Object.keys(D).join("|"),")(?!(\\w|#)*;)"),"g");return String(O).replace(Y,function(at,et){return D[et]||""})},z=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=arguments.length>1?arguments[1]:void 0,Y=[];if(Array.isArray(O))Y=O.map(function(et){var mt=Object.keys(et)[0],Tt=et[mt],Mt=D?I(Tt,D):Tt,Ut=Mt===!0?"":'="'.concat(Mt,'"');return"".concat(mt).concat(Ut)});else{var at=Object.keys(O);Y=at.map(function(et){var mt=D?I(O[et],D):O[et],Tt=O[et]===!0?"":'="'.concat(mt,'"');return"".concat(et).concat(Tt)})}return Y},M=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=arguments.length>1?arguments[1]:void 0,Y=z(O,D);if(Y.length===0)return"";var at=Y.join(" ");return" ".concat(at)},H=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(O).map(function(D){return{_name:D,_content:O[D]}})},L=[A,x,c],X=function(O){return L.includes(F(O))},$=[].concat(L,[m,S]),U=function(O){return $.includes(F(O))},Q=function(O){return!O.match("<")},V='',st=function(O){var D=O.header,Y=O.indent,at=O.isOutputStart,et=D&&at;if(!et)return"";var mt=l(D)===c;return mt?V:D},G={"<":"<",">":">","&":"&"},q=function P(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=D.depth,at=Y===void 0?0:Y,et=D.indent,mt=D._isFirstItem,Tt=D._isOutputStart,Mt=Tt===void 0?!0:Tt,Ut=D.header,Ht=D.attributesFilter,Kt=Ht===void 0?{}:Ht,re=D.filter,wt=re===void 0?{}:re,W=typeof Kt=="boolean"&&!Kt,Wt=W?{}:n(n(n({},G),{'"':"""}),Kt),xt=typeof wt=="boolean"&&!wt,Xt=xt?{}:n(n({},G),wt),ne=_(et,at),he=F(O),Vt=st({header:Ut,indent:et,depth:at,isOutputStart:Mt}),T=Mt&&!Vt&&mt&&at===0,ft="";switch(he){case"special-object":{var K=O._name,Z=O._content;if(Z===null){ft=K;break}var St=Array.isArray(Z)&&Z.every(X);if(St){var de=Z.map(function(lt){return P({_name:K,_content:lt},n(n({},D),{},{depth:at,_isOutputStart:!1}))});return de.join("")}if(K.match(E))break;var jt=P(Z,n(n({},D),{},{depth:at+1,_isOutputStart:T})),At=F(jt),ut=Q(jt),It=et&&!T?` -`:"",rt="".concat(It).concat(ne);if(K==="_comment"){ft+="".concat(rt,"");break}var ae=At==="undefined"||jt==="",Dt=l(O._selfCloseTag)===c?ae&&O._selfCloseTag:ae,Ct=Dt?"/":"",ie=M(O._attrs,Wt),zt="<".concat(K).concat(ie).concat(Ct,">"),me=et&&!ut?` -`.concat(ne):"",se=Dt?"":"".concat(jt).concat(me,"");ft+="".concat(rt).concat(zt).concat(se);break}case"object":{var gt=Object.keys(O),Et=gt.map(function(lt,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===gt.length,_isOutputStart:T}),Zt={_name:lt};if(F(O[lt])==="object"){j.forEach(function(ve){var je=O[lt][ve];typeof je<"u"&&(Zt[ve]=je,delete O[lt][ve])});var nt=typeof O[lt]._content<"u";if(nt&&Object.keys(O[lt]).length>1){var Qt=Object.assign({},O[lt]);delete Qt._content,Zt._content=[].concat(p(H(Qt)),[O[lt]._content])}}typeof Zt._content>"u"&&(Zt._content=O[lt]);var Ke=P(Zt,ge,lt);return Ke},D);ft=Et.join("");break}case"function":{var Ue=O(D);ft=P(Ue,D);break}case"array":{var He=O.map(function(lt,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===O.length,_isOutputStart:T});return P(lt,ge)});ft=He.join("");break}default:{ft=I(O,Xt);break}}return"".concat(Vt).concat(ft)};s.toXML=q;var ot={toXML:q};s.default=ot})});var Fn=vt((Oe,dr)=>{(function(p,u){typeof Oe=="object"&&typeof dr=="object"?dr.exports=u():typeof define=="function"&&define.amd?define([],u):typeof Oe=="object"?Oe["chord-symbol"]=u():p["chord-symbol"]=u()})(typeof self<"u"?self:Oe,function(){return(()=>{var s={8552:(e,i,t)=>{var a=t(852),n=t(5639),o=a(n,"DataView");e.exports=o},1989:(e,i,t)=>{var a=t(1789),n=t(401),o=t(7667),l=t(1327),h=t(1866);function c(m){var v=-1,x=m==null?0:m.length;for(this.clear();++v{var a=t(7040),n=t(4125),o=t(2117),l=t(7518),h=t(4705);function c(m){var v=-1,x=m==null?0:m.length;for(this.clear();++v{var a=t(852),n=t(5639),o=a(n,"Map");e.exports=o},3369:(e,i,t)=>{var a=t(4785),n=t(1285),o=t(6e3),l=t(9916),h=t(5265);function c(m){var v=-1,x=m==null?0:m.length;for(this.clear();++v{var a=t(852),n=t(5639),o=a(n,"Promise");e.exports=o},8525:(e,i,t)=>{var a=t(852),n=t(5639),o=a(n,"Set");e.exports=o},8668:(e,i,t)=>{var a=t(3369),n=t(619),o=t(2385);function l(h){var c=-1,m=h==null?0:h.length;for(this.__data__=new a;++c{var a=t(8407),n=t(7465),o=t(3779),l=t(7599),h=t(4758),c=t(4309);function m(v){var x=this.__data__=new a(v);this.size=x.size}m.prototype.clear=n,m.prototype.delete=o,m.prototype.get=l,m.prototype.has=h,m.prototype.set=c,e.exports=m},2705:(e,i,t)=>{var a=t(5639),n=a.Symbol;e.exports=n},1149:(e,i,t)=>{var a=t(5639),n=a.Uint8Array;e.exports=n},577:(e,i,t)=>{var a=t(852),n=t(5639),o=a(n,"WeakMap");e.exports=o},6874:e=>{function i(t,a,n){switch(n.length){case 0:return t.call(a);case 1:return t.call(a,n[0]);case 2:return t.call(a,n[0],n[1]);case 3:return t.call(a,n[0],n[1],n[2])}return t.apply(a,n)}e.exports=i},7412:e=>{function i(t,a){for(var n=-1,o=t==null?0:t.length;++n{function i(t,a){for(var n=-1,o=t==null?0:t.length,l=0,h=[];++n{var a=t(2118);function n(o,l){var h=o==null?0:o.length;return!!h&&a(o,l,0)>-1}e.exports=n},1196:e=>{function i(t,a,n){for(var o=-1,l=t==null?0:t.length;++o{var a=t(2545),n=t(5694),o=t(1469),l=t(4144),h=t(5776),c=t(6719),m=Object.prototype,v=m.hasOwnProperty;function x(y,S){var A=o(y),j=!A&&n(y),E=!A&&!j&&l(y),_=!A&&!j&&!E&&c(y),F=A||j||E||_,I=F?a(y.length,String):[],z=I.length;for(var M in y)(S||v.call(y,M))&&!(F&&(M=="length"||E&&(M=="offset"||M=="parent")||_&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||h(M,z)))&&I.push(M);return I}e.exports=x},9932:e=>{function i(t,a){for(var n=-1,o=t==null?0:t.length,l=Array(o);++n{function i(t,a){for(var n=-1,o=a.length,l=t.length;++n{function i(t,a){for(var n=-1,o=t==null?0:t.length;++n{var a=t(9465),n=t(7813),o=Object.prototype,l=o.hasOwnProperty;function h(c,m,v){var x=c[m];(!(l.call(c,m)&&n(x,v))||v===void 0&&!(m in c))&&a(c,m,v)}e.exports=h},8470:(e,i,t)=>{var a=t(7813);function n(o,l){for(var h=o.length;h--;)if(a(o[h][0],l))return h;return-1}e.exports=n},4037:(e,i,t)=>{var a=t(8363),n=t(3674);function o(l,h){return l&&a(h,n(h),l)}e.exports=o},3886:(e,i,t)=>{var a=t(8363),n=t(1704);function o(l,h){return l&&a(h,n(h),l)}e.exports=o},9465:(e,i,t)=>{var a=t(8777);function n(o,l,h){l=="__proto__"&&a?a(o,l,{configurable:!0,enumerable:!0,value:h,writable:!0}):o[l]=h}e.exports=n},5990:(e,i,t)=>{var a=t(6384),n=t(7412),o=t(4865),l=t(4037),h=t(3886),c=t(4626),m=t(278),v=t(8805),x=t(1911),y=t(8234),S=t(6904),A=t(4160),j=t(3824),E=t(9148),_=t(8517),F=t(1469),I=t(4144),z=t(6688),M=t(3218),H=t(2928),L=t(3674),X=t(1704),$=1,U=2,Q=4,V="[object Arguments]",st="[object Array]",G="[object Boolean]",q="[object Date]",ot="[object Error]",P="[object Function]",O="[object GeneratorFunction]",D="[object Map]",Y="[object Number]",at="[object Object]",et="[object RegExp]",mt="[object Set]",Tt="[object String]",Mt="[object Symbol]",Ut="[object WeakMap]",Ht="[object ArrayBuffer]",Kt="[object DataView]",re="[object Float32Array]",wt="[object Float64Array]",W="[object Int8Array]",Wt="[object Int16Array]",xt="[object Int32Array]",Xt="[object Uint8Array]",ne="[object Uint8ClampedArray]",he="[object Uint16Array]",Vt="[object Uint32Array]",T={};T[V]=T[st]=T[Ht]=T[Kt]=T[G]=T[q]=T[re]=T[wt]=T[W]=T[Wt]=T[xt]=T[D]=T[Y]=T[at]=T[et]=T[mt]=T[Tt]=T[Mt]=T[Xt]=T[ne]=T[he]=T[Vt]=!0,T[ot]=T[P]=T[Ut]=!1;function ft(K,Z,St,de,jt,At){var ut,It=Z&$,rt=Z&U,ae=Z&Q;if(St&&(ut=jt?St(K,de,jt,At):St(K)),ut!==void 0)return ut;if(!M(K))return K;var Dt=F(K);if(Dt){if(ut=j(K),!It)return m(K,ut)}else{var Ct=A(K),ie=Ct==P||Ct==O;if(I(K))return c(K,It);if(Ct==at||Ct==V||ie&&!jt){if(ut=rt||ie?{}:_(K),!It)return rt?x(K,h(ut,K)):v(K,l(ut,K))}else{if(!T[Ct])return jt?K:{};ut=E(K,Ct,It)}}At||(At=new a);var zt=At.get(K);if(zt)return zt;At.set(K,ut),H(K)?K.forEach(function(gt){ut.add(ft(gt,Z,St,gt,K,At))}):z(K)&&K.forEach(function(gt,Et){ut.set(Et,ft(gt,Z,St,Et,K,At))});var me=ae?rt?S:y:rt?X:L,se=Dt?void 0:me(K);return n(se||K,function(gt,Et){se&&(Et=gt,gt=K[Et]),o(ut,Et,ft(gt,Z,St,Et,K,At))}),ut}e.exports=ft},3118:(e,i,t)=>{var a=t(3218),n=Object.create,o=function(){function l(){}return function(h){if(!a(h))return{};if(n)return n(h);l.prototype=h;var c=new l;return l.prototype=void 0,c}}();e.exports=o},731:(e,i,t)=>{var a=t(8668),n=t(7443),o=t(1196),l=t(9932),h=t(1717),c=t(4757),m=200;function v(x,y,S,A){var j=-1,E=n,_=!0,F=x.length,I=[],z=y.length;if(!F)return I;S&&(y=l(y,h(S))),A?(E=o,_=!1):y.length>=m&&(E=c,_=!1,y=new a(y));t:for(;++j{function i(t,a,n,o){for(var l=t.length,h=n+(o?1:-1);o?h--:++h{var a=t(2488),n=t(7285);function o(l,h,c,m,v){var x=-1,y=l.length;for(c||(c=n),v||(v=[]);++x0&&c(S)?h>1?o(S,h-1,c,m,v):a(v,S):m||(v[v.length]=S)}return v}e.exports=o},8483:(e,i,t)=>{var a=t(5063),n=a();e.exports=n},7816:(e,i,t)=>{var a=t(8483),n=t(3674);function o(l,h){return l&&a(l,h,n)}e.exports=o},7786:(e,i,t)=>{var a=t(1811),n=t(327);function o(l,h){h=a(h,l);for(var c=0,m=h.length;l!=null&&c{var a=t(2488),n=t(1469);function o(l,h,c){var m=h(l);return n(l)?m:a(m,c(l))}e.exports=o},4239:(e,i,t)=>{var a=t(2705),n=t(9607),o=t(2333),l="[object Null]",h="[object Undefined]",c=a?a.toStringTag:void 0;function m(v){return v==null?v===void 0?h:l:c&&c in Object(v)?n(v):o(v)}e.exports=m},13:e=>{function i(t,a){return t!=null&&a in Object(t)}e.exports=i},2118:(e,i,t)=>{var a=t(1848),n=t(2722),o=t(2351);function l(h,c,m){return c===c?o(h,c,m):a(h,n,m)}e.exports=l},8975:(e,i,t)=>{var a=t(7816);function n(o,l,h,c){return a(o,function(m,v,x){l(c,h(m),v,x)}),c}e.exports=n},9454:(e,i,t)=>{var a=t(4239),n=t(7005),o="[object Arguments]";function l(h){return n(h)&&a(h)==o}e.exports=l},939:(e,i,t)=>{var a=t(2492),n=t(7005);function o(l,h,c,m,v){return l===h?!0:l==null||h==null||!n(l)&&!n(h)?l!==l&&h!==h:a(l,h,c,m,o,v)}e.exports=o},2492:(e,i,t)=>{var a=t(6384),n=t(7114),o=t(8351),l=t(6096),h=t(4160),c=t(1469),m=t(4144),v=t(6719),x=1,y="[object Arguments]",S="[object Array]",A="[object Object]",j=Object.prototype,E=j.hasOwnProperty;function _(F,I,z,M,H,L){var X=c(F),$=c(I),U=X?S:h(F),Q=$?S:h(I);U=U==y?A:U,Q=Q==y?A:Q;var V=U==A,st=Q==A,G=U==Q;if(G&&m(F)){if(!m(I))return!1;X=!0,V=!1}if(G&&!V)return L||(L=new a),X||v(F)?n(F,I,z,M,H,L):o(F,I,U,z,M,H,L);if(!(z&x)){var q=V&&E.call(F,"__wrapped__"),ot=st&&E.call(I,"__wrapped__");if(q||ot){var P=q?F.value():F,O=ot?I.value():I;return L||(L=new a),H(P,O,z,M,L)}}return G?(L||(L=new a),l(F,I,z,M,H,L)):!1}e.exports=_},5588:(e,i,t)=>{var a=t(4160),n=t(7005),o="[object Map]";function l(h){return n(h)&&a(h)==o}e.exports=l},2958:(e,i,t)=>{var a=t(6384),n=t(939),o=1,l=2;function h(c,m,v,x){var y=v.length,S=y,A=!x;if(c==null)return!S;for(c=Object(c);y--;){var j=v[y];if(A&&j[2]?j[1]!==c[j[0]]:!(j[0]in c))return!1}for(;++y{function i(t){return t!==t}e.exports=i},8458:(e,i,t)=>{var a=t(3560),n=t(5346),o=t(3218),l=t(346),h=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,m=Function.prototype,v=Object.prototype,x=m.toString,y=v.hasOwnProperty,S=RegExp("^"+x.call(y).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function A(j){if(!o(j)||n(j))return!1;var E=a(j)?S:c;return E.test(l(j))}e.exports=A},9221:(e,i,t)=>{var a=t(4160),n=t(7005),o="[object Set]";function l(h){return n(h)&&a(h)==o}e.exports=l},8749:(e,i,t)=>{var a=t(4239),n=t(1780),o=t(7005),l="[object Arguments]",h="[object Array]",c="[object Boolean]",m="[object Date]",v="[object Error]",x="[object Function]",y="[object Map]",S="[object Number]",A="[object Object]",j="[object RegExp]",E="[object Set]",_="[object String]",F="[object WeakMap]",I="[object ArrayBuffer]",z="[object DataView]",M="[object Float32Array]",H="[object Float64Array]",L="[object Int8Array]",X="[object Int16Array]",$="[object Int32Array]",U="[object Uint8Array]",Q="[object Uint8ClampedArray]",V="[object Uint16Array]",st="[object Uint32Array]",G={};G[M]=G[H]=G[L]=G[X]=G[$]=G[U]=G[Q]=G[V]=G[st]=!0,G[l]=G[h]=G[I]=G[c]=G[z]=G[m]=G[v]=G[x]=G[y]=G[S]=G[A]=G[j]=G[E]=G[_]=G[F]=!1;function q(ot){return o(ot)&&n(ot.length)&&!!G[a(ot)]}e.exports=q},7206:(e,i,t)=>{var a=t(1573),n=t(6432),o=t(6557),l=t(1469),h=t(9601);function c(m){return typeof m=="function"?m:m==null?o:typeof m=="object"?l(m)?n(m[0],m[1]):a(m):h(m)}e.exports=c},280:(e,i,t)=>{var a=t(5726),n=t(6916),o=Object.prototype,l=o.hasOwnProperty;function h(c){if(!a(c))return n(c);var m=[];for(var v in Object(c))l.call(c,v)&&v!="constructor"&&m.push(v);return m}e.exports=h},313:(e,i,t)=>{var a=t(3218),n=t(5726),o=t(3498),l=Object.prototype,h=l.hasOwnProperty;function c(m){if(!a(m))return o(m);var v=n(m),x=[];for(var y in m)y=="constructor"&&(v||!h.call(m,y))||x.push(y);return x}e.exports=c},1573:(e,i,t)=>{var a=t(2958),n=t(1499),o=t(2634);function l(h){var c=n(h);return c.length==1&&c[0][2]?o(c[0][0],c[0][1]):function(m){return m===h||a(m,h,c)}}e.exports=l},6432:(e,i,t)=>{var a=t(939),n=t(7361),o=t(9095),l=t(5403),h=t(9162),c=t(2634),m=t(327),v=1,x=2;function y(S,A){return l(S)&&h(A)?c(m(S),A):function(j){var E=n(j,S);return E===void 0&&E===A?o(j,S):a(A,E,v|x)}}e.exports=y},371:e=>{function i(t){return function(a){return a?.[t]}}e.exports=i},9152:(e,i,t)=>{var a=t(7786);function n(o){return function(l){return a(l,o)}}e.exports=n},5976:(e,i,t)=>{var a=t(6557),n=t(5357),o=t(61);function l(h,c){return o(n(h,c,a),h+"")}e.exports=l},6560:(e,i,t)=>{var a=t(5703),n=t(8777),o=t(6557),l=n?function(h,c){return n(h,"toString",{configurable:!0,enumerable:!1,value:a(c),writable:!0})}:o;e.exports=l},2545:e=>{function i(t,a){for(var n=-1,o=Array(t);++n{var a=t(2705),n=t(9932),o=t(1469),l=t(3448),h=1/0,c=a?a.prototype:void 0,m=c?c.toString:void 0;function v(x){if(typeof x=="string")return x;if(o(x))return n(x,v)+"";if(l(x))return m?m.call(x):"";var y=x+"";return y=="0"&&1/x==-h?"-0":y}e.exports=v},7561:(e,i,t)=>{var a=t(7990),n=/^\s+/;function o(l){return l&&l.slice(0,a(l)+1).replace(n,"")}e.exports=o},1717:e=>{function i(t){return function(a){return t(a)}}e.exports=i},5652:(e,i,t)=>{var a=t(8668),n=t(7443),o=t(1196),l=t(4757),h=t(3593),c=t(1814),m=200;function v(x,y,S){var A=-1,j=n,E=x.length,_=!0,F=[],I=F;if(S)_=!1,j=o;else if(E>=m){var z=y?null:h(x);if(z)return c(z);_=!1,j=l,I=new a}else I=y?[]:F;t:for(;++A{function i(t,a){return t.has(a)}e.exports=i},1811:(e,i,t)=>{var a=t(1469),n=t(5403),o=t(5514),l=t(9833);function h(c,m){return a(c)?c:n(c,m)?[c]:o(l(c))}e.exports=h},4318:(e,i,t)=>{var a=t(1149);function n(o){var l=new o.constructor(o.byteLength);return new a(l).set(new a(o)),l}e.exports=n},4626:(e,i,t)=>{e=t.nmd(e);var a=t(5639),n=i&&!i.nodeType&&i,o=n&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===n,h=l?a.Buffer:void 0,c=h?h.allocUnsafe:void 0;function m(v,x){if(x)return v.slice();var y=v.length,S=c?c(y):new v.constructor(y);return v.copy(S),S}e.exports=m},7157:(e,i,t)=>{var a=t(4318);function n(o,l){var h=l?a(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.byteLength)}e.exports=n},3147:e=>{var i=/\w*$/;function t(a){var n=new a.constructor(a.source,i.exec(a));return n.lastIndex=a.lastIndex,n}e.exports=t},419:(e,i,t)=>{var a=t(2705),n=a?a.prototype:void 0,o=n?n.valueOf:void 0;function l(h){return o?Object(o.call(h)):{}}e.exports=l},7133:(e,i,t)=>{var a=t(4318);function n(o,l){var h=l?a(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.length)}e.exports=n},278:e=>{function i(t,a){var n=-1,o=t.length;for(a||(a=Array(o));++n{var a=t(4865),n=t(9465);function o(l,h,c,m){var v=!c;c||(c={});for(var x=-1,y=h.length;++x{var a=t(8363),n=t(9551);function o(l,h){return a(l,n(l),h)}e.exports=o},1911:(e,i,t)=>{var a=t(8363),n=t(1442);function o(l,h){return a(l,n(l),h)}e.exports=o},4429:(e,i,t)=>{var a=t(5639),n=a["__core-js_shared__"];e.exports=n},5063:e=>{function i(t){return function(a,n,o){for(var l=-1,h=Object(a),c=o(a),m=c.length;m--;){var v=c[t?m:++l];if(n(h[v],v,h)===!1)break}return a}}e.exports=i},7740:(e,i,t)=>{var a=t(7206),n=t(8612),o=t(3674);function l(h){return function(c,m,v){var x=Object(c);if(!n(c)){var y=a(m,3);c=o(c),m=function(A){return y(x[A],A,x)}}var S=h(c,m,v);return S>-1?x[y?c[S]:S]:void 0}}e.exports=l},7779:(e,i,t)=>{var a=t(8975);function n(o,l){return function(h,c){return a(h,o,l(c),{})}}e.exports=n},3593:(e,i,t)=>{var a=t(8525),n=t(308),o=t(1814),l=1/0,h=a&&1/o(new a([,-0]))[1]==l?function(c){return new a(c)}:n;e.exports=h},8777:(e,i,t)=>{var a=t(852),n=function(){try{var o=a(Object,"defineProperty");return o({},"",{}),o}catch{}}();e.exports=n},7114:(e,i,t)=>{var a=t(8668),n=t(2908),o=t(4757),l=1,h=2;function c(m,v,x,y,S,A){var j=x&l,E=m.length,_=v.length;if(E!=_&&!(j&&_>E))return!1;var F=A.get(m),I=A.get(v);if(F&&I)return F==v&&I==m;var z=-1,M=!0,H=x&h?new a:void 0;for(A.set(m,v),A.set(v,m);++z{var a=t(2705),n=t(1149),o=t(7813),l=t(7114),h=t(8776),c=t(1814),m=1,v=2,x="[object Boolean]",y="[object Date]",S="[object Error]",A="[object Map]",j="[object Number]",E="[object RegExp]",_="[object Set]",F="[object String]",I="[object Symbol]",z="[object ArrayBuffer]",M="[object DataView]",H=a?a.prototype:void 0,L=H?H.valueOf:void 0;function X($,U,Q,V,st,G,q){switch(Q){case M:if($.byteLength!=U.byteLength||$.byteOffset!=U.byteOffset)return!1;$=$.buffer,U=U.buffer;case z:return!($.byteLength!=U.byteLength||!G(new n($),new n(U)));case x:case y:case j:return o(+$,+U);case S:return $.name==U.name&&$.message==U.message;case E:case F:return $==U+"";case A:var ot=h;case _:var P=V&m;if(ot||(ot=c),$.size!=U.size&&!P)return!1;var O=q.get($);if(O)return O==U;V|=v,q.set($,U);var D=l(ot($),ot(U),V,st,G,q);return q.delete($),D;case I:if(L)return L.call($)==L.call(U)}return!1}e.exports=X},6096:(e,i,t)=>{var a=t(8234),n=1,o=Object.prototype,l=o.hasOwnProperty;function h(c,m,v,x,y,S){var A=v&n,j=a(c),E=j.length,_=a(m),F=_.length;if(E!=F&&!A)return!1;for(var I=E;I--;){var z=j[I];if(!(A?z in m:l.call(m,z)))return!1}var M=S.get(c),H=S.get(m);if(M&&H)return M==m&&H==c;var L=!0;S.set(c,m),S.set(m,c);for(var X=A;++I{var a=typeof t.g=="object"&&t.g&&t.g.Object===Object&&t.g;e.exports=a},8234:(e,i,t)=>{var a=t(8866),n=t(9551),o=t(3674);function l(h){return a(h,o,n)}e.exports=l},6904:(e,i,t)=>{var a=t(8866),n=t(1442),o=t(1704);function l(h){return a(h,o,n)}e.exports=l},5050:(e,i,t)=>{var a=t(7019);function n(o,l){var h=o.__data__;return a(l)?h[typeof l=="string"?"string":"hash"]:h.map}e.exports=n},1499:(e,i,t)=>{var a=t(9162),n=t(3674);function o(l){for(var h=n(l),c=h.length;c--;){var m=h[c],v=l[m];h[c]=[m,v,a(v)]}return h}e.exports=o},852:(e,i,t)=>{var a=t(8458),n=t(7801);function o(l,h){var c=n(l,h);return a(c)?c:void 0}e.exports=o},5924:(e,i,t)=>{var a=t(5569),n=a(Object.getPrototypeOf,Object);e.exports=n},9607:(e,i,t)=>{var a=t(2705),n=Object.prototype,o=n.hasOwnProperty,l=n.toString,h=a?a.toStringTag:void 0;function c(m){var v=o.call(m,h),x=m[h];try{m[h]=void 0;var y=!0}catch{}var S=l.call(m);return y&&(v?m[h]=x:delete m[h]),S}e.exports=c},9551:(e,i,t)=>{var a=t(4963),n=t(479),o=Object.prototype,l=o.propertyIsEnumerable,h=Object.getOwnPropertySymbols,c=h?function(m){return m==null?[]:(m=Object(m),a(h(m),function(v){return l.call(m,v)}))}:n;e.exports=c},1442:(e,i,t)=>{var a=t(2488),n=t(5924),o=t(9551),l=t(479),h=Object.getOwnPropertySymbols,c=h?function(m){for(var v=[];m;)a(v,o(m)),m=n(m);return v}:l;e.exports=c},4160:(e,i,t)=>{var a=t(8552),n=t(7071),o=t(3818),l=t(8525),h=t(577),c=t(4239),m=t(346),v="[object Map]",x="[object Object]",y="[object Promise]",S="[object Set]",A="[object WeakMap]",j="[object DataView]",E=m(a),_=m(n),F=m(o),I=m(l),z=m(h),M=c;(a&&M(new a(new ArrayBuffer(1)))!=j||n&&M(new n)!=v||o&&M(o.resolve())!=y||l&&M(new l)!=S||h&&M(new h)!=A)&&(M=function(H){var L=c(H),X=L==x?H.constructor:void 0,$=X?m(X):"";if($)switch($){case E:return j;case _:return v;case F:return y;case I:return S;case z:return A}return L}),e.exports=M},7801:e=>{function i(t,a){return t?.[a]}e.exports=i},222:(e,i,t)=>{var a=t(1811),n=t(5694),o=t(1469),l=t(5776),h=t(1780),c=t(327);function m(v,x,y){x=a(x,v);for(var S=-1,A=x.length,j=!1;++S{var a=t(4536);function n(){this.__data__=a?a(null):{},this.size=0}e.exports=n},401:e=>{function i(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}e.exports=i},7667:(e,i,t)=>{var a=t(4536),n="__lodash_hash_undefined__",o=Object.prototype,l=o.hasOwnProperty;function h(c){var m=this.__data__;if(a){var v=m[c];return v===n?void 0:v}return l.call(m,c)?m[c]:void 0}e.exports=h},1327:(e,i,t)=>{var a=t(4536),n=Object.prototype,o=n.hasOwnProperty;function l(h){var c=this.__data__;return a?c[h]!==void 0:o.call(c,h)}e.exports=l},1866:(e,i,t)=>{var a=t(4536),n="__lodash_hash_undefined__";function o(l,h){var c=this.__data__;return this.size+=this.has(l)?0:1,c[l]=a&&h===void 0?n:h,this}e.exports=o},3824:e=>{var i=Object.prototype,t=i.hasOwnProperty;function a(n){var o=n.length,l=new n.constructor(o);return o&&typeof n[0]=="string"&&t.call(n,"index")&&(l.index=n.index,l.input=n.input),l}e.exports=a},9148:(e,i,t)=>{var a=t(4318),n=t(7157),o=t(3147),l=t(419),h=t(7133),c="[object Boolean]",m="[object Date]",v="[object Map]",x="[object Number]",y="[object RegExp]",S="[object Set]",A="[object String]",j="[object Symbol]",E="[object ArrayBuffer]",_="[object DataView]",F="[object Float32Array]",I="[object Float64Array]",z="[object Int8Array]",M="[object Int16Array]",H="[object Int32Array]",L="[object Uint8Array]",X="[object Uint8ClampedArray]",$="[object Uint16Array]",U="[object Uint32Array]";function Q(V,st,G){var q=V.constructor;switch(st){case E:return a(V);case c:case m:return new q(+V);case _:return n(V,G);case F:case I:case z:case M:case H:case L:case X:case $:case U:return h(V,G);case v:return new q;case x:case A:return new q(V);case y:return o(V);case S:return new q;case j:return l(V)}}e.exports=Q},8517:(e,i,t)=>{var a=t(3118),n=t(5924),o=t(5726);function l(h){return typeof h.constructor=="function"&&!o(h)?a(n(h)):{}}e.exports=l},7285:(e,i,t)=>{var a=t(2705),n=t(5694),o=t(1469),l=a?a.isConcatSpreadable:void 0;function h(c){return o(c)||n(c)||!!(l&&c&&c[l])}e.exports=h},5776:e=>{var i=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function a(n,o){var l=typeof n;return o=o??i,!!o&&(l=="number"||l!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n{var a=t(1469),n=t(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;function h(c,m){if(a(c))return!1;var v=typeof c;return v=="number"||v=="symbol"||v=="boolean"||c==null||n(c)?!0:l.test(c)||!o.test(c)||m!=null&&c in Object(m)}e.exports=h},7019:e=>{function i(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}e.exports=i},5346:(e,i,t)=>{var a=t(4429),n=function(){var l=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}();function o(l){return!!n&&n in l}e.exports=o},5726:e=>{var i=Object.prototype;function t(a){var n=a&&a.constructor,o=typeof n=="function"&&n.prototype||i;return a===o}e.exports=t},9162:(e,i,t)=>{var a=t(3218);function n(o){return o===o&&!a(o)}e.exports=n},7040:e=>{function i(){this.__data__=[],this.size=0}e.exports=i},4125:(e,i,t)=>{var a=t(8470),n=Array.prototype,o=n.splice;function l(h){var c=this.__data__,m=a(c,h);if(m<0)return!1;var v=c.length-1;return m==v?c.pop():o.call(c,m,1),--this.size,!0}e.exports=l},2117:(e,i,t)=>{var a=t(8470);function n(o){var l=this.__data__,h=a(l,o);return h<0?void 0:l[h][1]}e.exports=n},7518:(e,i,t)=>{var a=t(8470);function n(o){return a(this.__data__,o)>-1}e.exports=n},4705:(e,i,t)=>{var a=t(8470);function n(o,l){var h=this.__data__,c=a(h,o);return c<0?(++this.size,h.push([o,l])):h[c][1]=l,this}e.exports=n},4785:(e,i,t)=>{var a=t(1989),n=t(8407),o=t(7071);function l(){this.size=0,this.__data__={hash:new a,map:new(o||n),string:new a}}e.exports=l},1285:(e,i,t)=>{var a=t(5050);function n(o){var l=a(this,o).delete(o);return this.size-=l?1:0,l}e.exports=n},6e3:(e,i,t)=>{var a=t(5050);function n(o){return a(this,o).get(o)}e.exports=n},9916:(e,i,t)=>{var a=t(5050);function n(o){return a(this,o).has(o)}e.exports=n},5265:(e,i,t)=>{var a=t(5050);function n(o,l){var h=a(this,o),c=h.size;return h.set(o,l),this.size+=h.size==c?0:1,this}e.exports=n},8776:e=>{function i(t){var a=-1,n=Array(t.size);return t.forEach(function(o,l){n[++a]=[l,o]}),n}e.exports=i},2634:e=>{function i(t,a){return function(n){return n==null?!1:n[t]===a&&(a!==void 0||t in Object(n))}}e.exports=i},4523:(e,i,t)=>{var a=t(8306),n=500;function o(l){var h=a(l,function(m){return c.size===n&&c.clear(),m}),c=h.cache;return h}e.exports=o},4536:(e,i,t)=>{var a=t(852),n=a(Object,"create");e.exports=n},6916:(e,i,t)=>{var a=t(5569),n=a(Object.keys,Object);e.exports=n},3498:e=>{function i(t){var a=[];if(t!=null)for(var n in Object(t))a.push(n);return a}e.exports=i},1167:(e,i,t)=>{e=t.nmd(e);var a=t(1957),n=i&&!i.nodeType&&i,o=n&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===n,h=l&&a.process,c=function(){try{var m=o&&o.require&&o.require("util").types;return m||h&&h.binding&&h.binding("util")}catch{}}();e.exports=c},2333:e=>{var i=Object.prototype,t=i.toString;function a(n){return t.call(n)}e.exports=a},5569:e=>{function i(t,a){return function(n){return t(a(n))}}e.exports=i},5357:(e,i,t)=>{var a=t(6874),n=Math.max;function o(l,h,c){return h=n(h===void 0?l.length-1:h,0),function(){for(var m=arguments,v=-1,x=n(m.length-h,0),y=Array(x);++v{var a=t(1957),n=typeof self=="object"&&self&&self.Object===Object&&self,o=a||n||Function("return this")();e.exports=o},619:e=>{var i="__lodash_hash_undefined__";function t(a){return this.__data__.set(a,i),this}e.exports=t},2385:e=>{function i(t){return this.__data__.has(t)}e.exports=i},1814:e=>{function i(t){var a=-1,n=Array(t.size);return t.forEach(function(o){n[++a]=o}),n}e.exports=i},61:(e,i,t)=>{var a=t(6560),n=t(1275),o=n(a);e.exports=o},1275:e=>{var i=800,t=16,a=Date.now;function n(o){var l=0,h=0;return function(){var c=a(),m=t-(c-h);if(h=c,m>0){if(++l>=i)return arguments[0]}else l=0;return o.apply(void 0,arguments)}}e.exports=n},7465:(e,i,t)=>{var a=t(8407);function n(){this.__data__=new a,this.size=0}e.exports=n},3779:e=>{function i(t){var a=this.__data__,n=a.delete(t);return this.size=a.size,n}e.exports=i},7599:e=>{function i(t){return this.__data__.get(t)}e.exports=i},4758:e=>{function i(t){return this.__data__.has(t)}e.exports=i},4309:(e,i,t)=>{var a=t(8407),n=t(7071),o=t(3369),l=200;function h(c,m){var v=this.__data__;if(v instanceof a){var x=v.__data__;if(!n||x.length{function i(t,a,n){for(var o=n-1,l=t.length;++o{var a=t(4523),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,l=a(function(h){var c=[];return h.charCodeAt(0)===46&&c.push(""),h.replace(n,function(m,v,x,y){c.push(x?y.replace(o,"$1"):v||m)}),c});e.exports=l},327:(e,i,t)=>{var a=t(3448),n=1/0;function o(l){if(typeof l=="string"||a(l))return l;var h=l+"";return h=="0"&&1/l==-n?"-0":h}e.exports=o},346:e=>{var i=Function.prototype,t=i.toString;function a(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}e.exports=a},7990:e=>{var i=/\s/;function t(a){for(var n=a.length;n--&&i.test(a.charAt(n)););return n}e.exports=t},6678:(e,i,t)=>{var a=t(5990),n=4;function o(l){return a(l,n)}e.exports=o},361:(e,i,t)=>{var a=t(5990),n=1,o=4;function l(h){return a(h,n|o)}e.exports=l},5703:e=>{function i(t){return function(){return t}}e.exports=i},1966:(e,i,t)=>{var a=t(731),n=t(1078),o=t(5976),l=t(9246),h=o(function(c,m){return l(c)?a(c,n(m,1,l,!0)):[]});e.exports=h},7813:e=>{function i(t,a){return t===a||t!==t&&a!==a}e.exports=i},3311:(e,i,t)=>{var a=t(7740),n=t(998),o=a(n);e.exports=o},998:(e,i,t)=>{var a=t(1848),n=t(7206),o=t(554),l=Math.max;function h(c,m,v){var x=c==null?0:c.length;if(!x)return-1;var y=v==null?0:o(v);return y<0&&(y=l(x+y,0)),a(c,n(m,3),y)}e.exports=h},7361:(e,i,t)=>{var a=t(7786);function n(o,l,h){var c=o==null?void 0:a(o,l);return c===void 0?h:c}e.exports=n},9095:(e,i,t)=>{var a=t(13),n=t(222);function o(l,h){return l!=null&&n(l,h,a)}e.exports=o},6557:e=>{function i(t){return t}e.exports=i},3137:(e,i,t)=>{var a=t(5703),n=t(7779),o=t(6557),l=Object.prototype,h=l.toString,c=n(function(m,v,x){v!=null&&typeof v.toString!="function"&&(v=h.call(v)),m[v]=x},a(o));e.exports=c},5694:(e,i,t)=>{var a=t(9454),n=t(7005),o=Object.prototype,l=o.hasOwnProperty,h=o.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(m){return n(m)&&l.call(m,"callee")&&!h.call(m,"callee")};e.exports=c},1469:e=>{var i=Array.isArray;e.exports=i},8612:(e,i,t)=>{var a=t(3560),n=t(1780);function o(l){return l!=null&&n(l.length)&&!a(l)}e.exports=o},9246:(e,i,t)=>{var a=t(8612),n=t(7005);function o(l){return n(l)&&a(l)}e.exports=o},4144:(e,i,t)=>{e=t.nmd(e);var a=t(5639),n=t(5062),o=i&&!i.nodeType&&i,l=o&&!0&&e&&!e.nodeType&&e,h=l&&l.exports===o,c=h?a.Buffer:void 0,m=c?c.isBuffer:void 0,v=m||n;e.exports=v},8446:(e,i,t)=>{var a=t(939);function n(o,l){return a(o,l)}e.exports=n},3560:(e,i,t)=>{var a=t(4239),n=t(3218),o="[object AsyncFunction]",l="[object Function]",h="[object GeneratorFunction]",c="[object Proxy]";function m(v){if(!n(v))return!1;var x=a(v);return x==l||x==h||x==o||x==c}e.exports=m},1780:e=>{var i=9007199254740991;function t(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=i}e.exports=t},6688:(e,i,t)=>{var a=t(5588),n=t(1717),o=t(1167),l=o&&o.isMap,h=l?n(l):a;e.exports=h},3218:e=>{function i(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}e.exports=i},7005:e=>{function i(t){return t!=null&&typeof t=="object"}e.exports=i},2928:(e,i,t)=>{var a=t(9221),n=t(1717),o=t(1167),l=o&&o.isSet,h=l?n(l):a;e.exports=h},3448:(e,i,t)=>{var a=t(4239),n=t(7005),o="[object Symbol]";function l(h){return typeof h=="symbol"||n(h)&&a(h)==o}e.exports=l},6719:(e,i,t)=>{var a=t(8749),n=t(1717),o=t(1167),l=o&&o.isTypedArray,h=l?n(l):a;e.exports=h},3674:(e,i,t)=>{var a=t(4636),n=t(280),o=t(8612);function l(h){return o(h)?a(h):n(h)}e.exports=l},1704:(e,i,t)=>{var a=t(4636),n=t(313),o=t(8612);function l(h){return o(h)?a(h,!0):n(h)}e.exports=l},8306:(e,i,t)=>{var a=t(3369),n="Expected a function";function o(l,h){if(typeof l!="function"||h!=null&&typeof h!="function")throw new TypeError(n);var c=function(){var m=arguments,v=h?h.apply(this,m):m[0],x=c.cache;if(x.has(v))return x.get(v);var y=l.apply(this,m);return c.cache=x.set(v,y)||x,y};return c.cache=new(o.Cache||a),c}o.Cache=a,e.exports=o},308:e=>{function i(){}e.exports=i},9601:(e,i,t)=>{var a=t(371),n=t(9152),o=t(5403),l=t(327);function h(c){return o(c)?a(l(c)):n(c)}e.exports=h},479:e=>{function i(){return[]}e.exports=i},5062:e=>{function i(){return!1}e.exports=i},8601:(e,i,t)=>{var a=t(4841),n=1/0,o=17976931348623157e292;function l(h){if(!h)return h===0?h:0;if(h=a(h),h===n||h===-n){var c=h<0?-1:1;return c*o}return h===h?h:0}e.exports=l},554:(e,i,t)=>{var a=t(8601);function n(o){var l=a(o),h=l%1;return l===l?h?l-h:l:0}e.exports=n},4841:(e,i,t)=>{var a=t(7561),n=t(3218),o=t(3448),l=NaN,h=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,m=/^0o[0-7]+$/i,v=parseInt;function x(y){if(typeof y=="number")return y;if(o(y))return l;if(n(y)){var S=typeof y.valueOf=="function"?y.valueOf():y;y=n(S)?S+"":S}if(typeof y!="string")return y===0?y:+y;y=a(y);var A=c.test(y);return A||m.test(y)?v(y.slice(2),A?2:8):h.test(y)?l:+y}e.exports=x},9833:(e,i,t)=>{var a=t(531);function n(o){return o==null?"":a(o)}e.exports=n},4908:(e,i,t)=>{var a=t(5652);function n(o){return o&&o.length?a(o):[]}e.exports=n},2569:(e,i,t)=>{var a=t(731),n=t(5976),o=t(9246),l=n(function(h,c){return o(h)?a(h,c):[]});e.exports=l}},p={};function u(e){var i=p[e];if(i!==void 0)return i.exports;var t=p[e]={id:e,loaded:!1,exports:{}};return s[e](t,t.exports,u),t.loaded=!0,t.exports}u.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return u.d(i,{a:i}),i},u.d=(e,i)=>{for(var t in i)u.o(i,t)&&!u.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:i[t]})},u.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),u.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),u.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var g={};return(()=>{"use strict";u.r(g),u.d(g,{chordParserFactory:()=>Er,chordRendererFactory:()=>gi});function e(r,f){return r.reduce(function(d,b){return d?b(d):null},f)}var i=u(361),t=u.n(i),a=function(f){if(!Array.isArray(f))throw new TypeError("customFilters should be given as an array");if(f.some(function(d){return typeof d!="function"}))throw new TypeError("The given filter is not a function");return!0};let n=a;function o(r,f){var d=Object.keys(r);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(r);f&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(r,C).enumerable})),d.push.apply(d,b)}return d}function l(r){for(var f=1;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function P(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function O(r,f){return O=Object.setPrototypeOf||function(b,C){return b.__proto__=C,b},O(r,f)}function D(r){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},D(r)}var Y=function(r){U(d,r);var f=Q(d);function d(){var b;return $(this,d),b=f.call(this,"The given symbol is not a valid string"),b.name="InvalidInput",b}return X(d)}(G(Error)),at=function(r){U(d,r);var f=Q(d);function d(){var b;$(this,d);var C="An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?";return b=f.call(this,C),b.name="UnexpectedError",b}return X(d)}(G(Error)),et=function(r){U(d,r);var f=Q(d);function d(b,C,R){var B;return $(this,d),B=f.call(this,b),B.name=R,B.chord=C,B}return X(d)}(G(Error)),mt=function(r){U(d,r);var f=Q(d);function d(b){$(this,d);var C='"'.concat(b.input.symbol,'" does not seems to be a chord');return f.call(this,C,b,"NoSymbolFound")}return X(d)}(et),Tt=function(r){U(d,r);var f=Q(d);function d(b,C){$(this,d);var R='The chord descriptor "'.concat(b.input.descriptor,'" contains unknown or duplicated modifiers: "').concat(C,'"');return f.call(this,R,b,"InvalidModifier")}return X(d)}(et),Mt=function(r){U(d,r);var f=Q(d);function d(b,C){$(this,d);var R='"'.concat(b.input.symbol,'" describes a chord with an invalid intervals combo: ')+C.join(" and ");return f.call(this,R,b,"InvalidIntervals")}return X(d)}(et),Ut=u(1469),Ht=u.n(Ut),Kt=u(8446),re=u.n(Kt);function wt(r,f){var d=Ht()(f)?f:[f];return re()(r,d)}function W(r,f){return Xt(r,f,"oneOf")}function Wt(r,f){return Xt(r,f,"all")}function xt(r,f){return Xt(r,f,"none")}function Xt(r,f,d){var b=Ht()(f)?f:[f],C=d==="oneOf"?"some":"every";return b[C](function(R){return d==="none"?!r.includes(R):r.includes(R)})}var ne=[["2","3"],["2","9"],["3","b3"],["4","11"],["5","b5"],["5","#5"],["b6","#5"],["b6","6"],["b6","13"],["6","13"],["b7","bb7"],["7","b7"],["9","b9"],["9","#9"],["11","#11"],["13","b13"]];function he(r){var f=r.normalized.intervals,d=ne.find(function(b){return Wt(f,b)});if(d)throw new Mt(r,d);return r}function Vt(r){var f=r.formatted,d=f.rootNote,b=f.bassNote,C=f.descriptor,R=f.chordChanges,B=d;return C&&(B+=C),R&&R.length&&(B+="("+R.join(",")+")"),b&&(B+="/"+b),r.formatted.symbol=B,r}var T={ma:"major",ma6:"major6",ma7:"major7",dom7:"dominant7",mi:"minor",mi6:"minor6",mi7:"minor7",miMa7:"minorMajor7",aug:"augmented",dim:"diminished",dim7:"diminished7",power:"power",bass:"bass"},ft=[T.ma,T.ma6,T.ma7,T.dom7,T.aug],K=[T.mi,T.mi6,T.mi7,T.miMa7,T.dim,T.dim7],Z;function St(r){return ut(r)||At(r)||jt(r)||de()}function de(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jt(r,f){if(r){if(typeof r=="string")return It(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return It(r,f)}}function At(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function ut(r){if(Array.isArray(r))return It(r)}function It(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0;return{input:{symbol:f},normalized:{},formatted:{},parserConfiguration:t()(r)}}var nt;function Qt(r){return Mn(r)||je(r)||ve(r)||Ke()}function Ke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(r,f){if(r){if(typeof r=="string")return We(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return We(r,f)}}function je(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Mn(r){if(Array.isArray(r))return We(r)}function We(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);dr.length)&&(f=r.length);for(var d=0,b=new Array(f);dr.length)&&(f=r.length);for(var d=0,b=new Array(f);d0)throw new Tt(r,R);return d}function wa(r,f){return r.includes(N.power)?["1","5"]:r.includes(N.bass)?["1"]:mr()(["1"].concat(Gt(ja(r)),Gt(Ca(r)),Gt(Ea(r,f)),Gt(Fa(r)),Gt(Ia(r)),Gt(Da(r,f)),Gt(Pa(r,f)),Gt(Na(r,f)))).sort(function(d,b){return Ee[d]-Ee[b]})}function ja(r){var f=[];return r.includes(N.omit3)?[]:(W(r,[N.sus,N.sus2])||(Je(r)?r.includes(N.eleventh)||f.push("3"):f.push("b3")),r.includes(N.add3)&&f.push("3"),f)}function Ca(r){var f=[];return W(r,[N.sus,N.add4])&&f.push("4"),f}function Ea(r,f){var d=[];return r.includes(N.omit5)?[]:((W(r,[N.dim,N.halfDim,N.fifthFlat])||ue(r,f,"b5"))&&d.push("b5"),(W(r,[N.aug,N.fifthSharp])||ue(r,f,"#5"))&&d.push("#5"),!d.length&&!r.includes(N.thirteenthFlat)&&d.push("5"),d)}function Fa(r){var f=[];return W(r,[N.addb6])&&f.push("b6"),W(r,[N.add6,N.add69])&&!jr(r)&&!W(r,[N.halfDim])&&f.push("6"),f}function Ia(r){var f=[];return W(r,[N.alt])&&f.push("b7"),W(r,[N.seventh,N.halfDim])?r.includes(N.dim)?f.push("bb7"):r.includes(N.halfDim)?f.push("b7"):f.push(wr(r)):W(r,[N.ninth,N.eleventh,N.thirteenth])&&f.push(wr(r)),r.includes(N.add7)&&f.push("7"),f}function wr(r){return r.includes(N.ma)?"7":"b7"}function Da(r,f){var d=[];return W(r,[N.add69,N.ninth,N.eleventh,N.thirteenth])&&xt(r,[N.ninthFlat,N.ninthSharp])&&d.push("9"),W(r,[N.sus2,N.add9])&&d.push("9"),(W(r,[N.ninthFlat])||ue(r,f,"b9"))&&d.push("b9"),(W(r,[N.ninthSharp])||ue(r,f,"#9"))&&d.push("#9"),d}function Pa(r,f){var d=[];return(W(r,[N.thirteenth])&&!Je(r)||W(r,[N.eleventh,N.add11]))&&d.push("11"),(W(r,[N.eleventhSharp])||ue(r,f,"#11"))&&d.push("#11"),d}function Na(r,f){var d=[];return(W(r,[N.add13,N.thirteenth])||W(r,[N.add6,N.add69])&&jr(r)||W(r,[N.add6,N.add69])&&W(r,[N.halfDim]))&&d.push("13"),(W(r,[N.thirteenthFlat])||ue(r,f,"b13"))&&d.push("b13"),d}function ue(r,f,d){return r.includes(N.alt)&&f.includes(d)}function Je(r){return xt(r,[N.mi,N.dim,N.dim7,N.halfDim])}function jr(r){return W(r,[N.seventh,N.ninth,N.eleventh,N.thirteenth])}function Ra(r){return r.replace(/[.\-*+?^${}()|[\]\\]/g,"\\$&")}function _a(r){return r.map(function(f){return Ee[f]}).sort(function(f,d){return f-d})}function Ma(r){return{major:Je(r),eleventh:r.includes(N.eleventh),alt:r.includes(N.alt)}}function za(r){return $a(r)||Ba(r)||Ga(r)||La()}function La(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ga(r,f){if(r){if(typeof r=="string")return ke(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return ke(r,f)}}function Ba(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function $a(r){if(Array.isArray(r))return ke(r)}function ke(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=["b5","#5","b9","#9","#11","b13"],d=["english","german","latin"],b=r.notationSystems,C=b===void 0?t()(d):b,R=r.altIntervals,B=R===void 0?t()(f):R,J=r.customFilters,dt=J===void 0?[]:J;return Ha(B,f),Ka(C,d),n(dt),Ft;function Ft(Jt){var Pt=[];if(!Wa(Jt)){var be=new Y;Pt.push(qe(be))}var ye=t()(M).filter(function(Nt){return C.includes(Nt.name)}),Bt,xe,$t;if(!Pt.length)for(;ye.length&&!Bt;){$t=ye.shift(),xe=[Zt.bind(null,r),da.bind(null,$t.notes),Ue,Oa.bind(null,B),he,Bn,yr,Ct,Vt,Xe].concat(za(dt));try{Bt=e(xe,Jt),Bt?Bt.input.notationSystem=$t.name:Pt.push(Xa($t.name))}catch(Nt){Pt.push(qe(Nt,$t.name))}}return Bt||{error:Pt}}}function Ha(r,f){Cr("altIntervals",r,f,!0)}function Ka(r,f){Cr("notationSystems",r,f)}function Cr(r,f,d,b){if(!Array.isArray(f))throw new TypeError("'".concat(r,"' should be an array"));if(!b&&f.length===0)throw new TypeError("'".concat(r,"' cannot be empty"));f.forEach(function(C){if(!d.includes(C))throw new TypeError("'".concat(C,"' is not a valid value for ").concat(r))})}function Wa(r){return typeof r=="string"&&r.length>0}function Xa(r){var f=new at;return qe(f,r)}function qe(r,f){return{type:r.name,chord:r.chord,message:r.message,notationSystem:f}}let Er=Ua;function Fr(r,f){var d=Object.keys(r);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(r);f&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(r,C).enumerable})),d.push.apply(d,b)}return d}function Fe(r){for(var f=1;f0&&arguments[0]!==void 0?arguments[0]:"none",f=arguments.length>1?arguments[1]:void 0;if(r==="none")return f;var d={max:["4","b5","#5","6","bb7","b7","7","b9","9","#9","11","#11","b13","13"],core:["4","b9","9","#9","11","#11","b13","13"]},b=ti()(f.normalized.intervals,d[r]);xt(b,["b3","3"])&&b.push(f.normalized.intents.major?"3":"b3"),xt(b,["b5","5","#5"])&&b.push("5"),f.normalized.intervals=b,f.normalized.semitones=b.map(function(R){return Ee[R]}),f.normalized.intents.eleventh=!1,f.normalized.intents.alt=!1,r==="max"&&delete f.normalized.bassNote;var C=[yr,Ct,Xe];return e(C,f)}var ri=u(3137),ni=u.n(ri),Ir=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Dr={"C#":"Db","D#":"Eb","F#":"Gb","G#":"Ab","A#":"Bb"},ai=ni()(Dr);function ii(r,f,d){var b=d.normalized,C=b.rootNote,R=b.bassNote,B=Nr(C);if(d.normalized.rootNote=Pr(B,r,f),d.formatted.rootNote=d.normalized.rootNote,R){var J=Nr(R);d.normalized.bassNote=Pr(J,r,f),d.formatted.bassNote=d.normalized.bassNote}return Xe(d)}function Pr(r,f,d){var b=Ir.indexOf(r),C=b+f,R=Math.floor(C/12),B=C-R*12,J=Ir[B];return d&&Dr[J]||J}function Nr(r){return ai[r]||r}var tr={german:{Ab:"As",A:"A","A#":"Ais",Bb:"Hes",B:"H",C:"C","C#":"Cis",Db:"Des",D:"D","D#":"Dis",Eb:"Es",E:"E",F:"F","F#":"Fis",Gb:"Ges",G:"G","G#":"Gis"},latin:{Ab:"Lab",A:"La","A#":"La#",Bb:"Sib",B:"Si",C:"Do","C#":"Do#",Db:"Reb",D:"Re","D#":"Re#",Eb:"Mib",E:"Mi",F:"Fa","F#":"Fa#",Gb:"Solb",G:"Sol","G#":"Sol#"}},si=Object.keys(tr);function oi(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"english",f=arguments.length>1?arguments[1]:void 0,d=r==="auto"?f.input.notationSystem:r;return d==="english"?f:si.includes(d)?(f.formatted.rootNote=tr[d][f.formatted.rootNote],f.formatted.bassNote&&(f.formatted.bassNote=tr[d][f.formatted.bassNote]),f):null}function Rr(r){return r&&r.formatted&&r.formatted.symbol?r.formatted.symbol:null}function ui(r){delete r.parserConfiguration.notationSystems;var f=t()(r),d=Rr(r),b=Er(r.parserConfiguration),C=b(d);return f.input=C.input,f}function er(r){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},er(r)}function ci(r){return hi(r)||pi(r)||fi(r)||li()}function li(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fi(r,f){if(r){if(typeof r=="string")return rr(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return rr(r,f)}}function pi(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function hi(r){if(Array.isArray(r))return rr(r)}function rr(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=r.useShortNamings,d=f===void 0?!1:f,b=r.simplify,C=b===void 0?"none":b,R=r.transposeValue,B=R===void 0?0:R,J=r.harmonizeAccidentals,dt=J===void 0?!1:J,Ft=r.useFlats,Jt=Ft===void 0?!1:Ft,Pt=r.printer,be=Pt===void 0?"text":Pt,ye=r.notationSystem,Bt=ye===void 0?"english":ye,xe=r.customFilters,$t=xe===void 0?[]:xe;n($t);var Nt=[];return["max","core"].includes(C)&&Nt.push(ei.bind(null,C)),(dt||B!==0)&&Nt.push(ii.bind(null,B,Jt)),d&&Nt.push(Ya),Nt.push.apply(Nt,[oi.bind(null,Bt),Vt].concat(ci($t))),vi;function vi(_r){if(!mi(_r))return null;var Mr=e(Nt,t()(_r));return be==="raw"?ui(Mr):Rr(Mr)}}var mi=function(f){return f&&er(f)==="object"&&!f.error&&f.input};let gi=di})(),g})()})});var _n=Ie(mn(),1);var Cn=Ie(jn(),1),Le=class{constructor(p){let u=/.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(p),e=decodeURIComponent(u[2]).split("===");e.length>1&&(this.name=e.pop()),this.songs=e.map(i=>{try{return new Ae(i,u[1]==="irealbook")}catch(t){let a=i.split("="),n=Ae.parseTitle(a[0].trim());return console.error(`[ireal-musicxml] [${n}] ${t}`),null}}).filter(i=>i!==null).reduce((i,t)=>{if(i.length>0){let a=(0,Cn.default)(i[i.length-1].title,t.title);if(a[0][0]===0&&a.every(n=>n[0]===0||n[1].match(/^\d+$/)))return i[i.length-1].cells=i[i.length-1].cells.concat(t.cells),i}return i.push(t),i},[])}},Ge=class{constructor(){this.annots=[],this.comments=[],this.bars="",this.spacer=0,this.chord=null}},ee=class{constructor(p,u="",g=null,e=null){this.note=p,this.modifiers=u,this.over=g,this.alternate=e}},Ae=class s{constructor(p,u=!1){if(this.cells=[],this.musicXml="",!p){this.title="",this.composer="",this.style="",this.key="",this.transpose=0,this.groove="",this.bpm=0,this.repeats=0;return}let g=p.split("=");if(u)this.title=s.parseTitle(g[0].trim()),this.composer=s.parseComposer(g[1].trim()),this.style=g[2].trim(),this.key=g[3],this.cells=this.parse(g[5]);else{this.title=s.parseTitle(g[0].trim()),this.composer=s.parseComposer(g[1].trim()),this.style=g[3].trim(),this.key=g[4],this.transpose=+g[5]||0,this.groove=g[7],this.bpm=+g[8],this.repeats=+g[9]||3;let e=g[6].split("1r34LbKcu7");this.cells=this.parse(ki(e[1]))}}static chordRegex=/^([A-G][b#]?)((?:sus|alt|add|[+\-^\dhob#])*)(\*.+?\*)*(\/[A-G][#b]?)?(\(.*?\))?/;static chordRegex2=/^([ Wp])()()(\/[A-G][#b]?)?(\(.*?\))?/;static regExps=[/^\*[a-zA-Z]/,/^T\d\d/,/^N./,/^<.*?>/,s.chordRegex,s.chordRegex2];parse(p){let u=p.trim(),g=[];for(;u;){let a=!1;for(let n=0;n51;)u=s.substring(0,50),s=s.substring(50),p=p+qi(u);return p=p+s,p=p.replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," "),p}function qi(s){let p=s.split("");for(let u=0;u<5;u++)p[49-u]=s[u],p[u]=s[49-u];for(let u=10;u<24;u++)p[49-u]=s[u],p[u]=s[49-u];return p.join("")}var Nn=Ie(En(),1),Rn=Ie(Fn(),1);var Te={name:"ireal-musicxml",version:"2.0.0",description:"iReal Pro to MusicXML converter.",author:"Karim Ratib (https://github.com/infojunkie)",license:"GPL-3.0-only",repository:{type:"git",url:"https://github.com/infojunkie/ireal-musicxml"},homepage:"https://github.com/infojunkie/ireal-musicxml",type:"module",main:"build/ireal-musicxml.js",types:"build/ireal-musicxml.d.ts",files:["LICENSE.txt","build/*","src/*"],bin:{"ireal-musicxml":"src/cli/cli.js"},scripts:{build:"esbuild src/lib/index.js --bundle --minify --sourcemap --outfile=build/ireal-musicxml.js && cp src/types/* build/",test:"npm run test:lint && npm run test:spec","test:spec":"node --test","test:typescript":"npm run build && ts-mocha test/**/*.spec.ts","test:lint":"eslint src --fix"},devDependencies:{"@xmldom/xmldom":"^0.8.0",esbuild:"0.24.0",eslint:"^9.13.0",resolve:"^1.22.8","sanitize-filename":"^1.6.3",typescript:"^4.3.2","validate-with-xmllint":"^1.2.0","xpath.js":"^1.1.0"},dependencies:{"chord-symbol":"^3.0.0","fast-diff":"^1.2.0",jstoxml:"^2.0.6",promise:"^8.1.0"}};var we=class{static name=Te.name;static version=Te.version;static author=Te.author;static description=Te.description};var{chordParserFactory:es,chordRendererFactory:rs}=Rn.default,tt=class{static Debug=0;static Info=1;static Warn=2;static Error=3;static None=4},In="4.0",Dn=7,Pn=40,$e=class s{static defaultOptions={divisions:768,notation:"rhythmic",step:"B",octave:4,notehead:"slash",noteheadSize:"large",date:!0,clef:!1,keySignature:!1,pageWidth:210,pageHeight:297,pageMargin:15,logLevel:tt.Warn};static sequenceAttributes=["divisions","key","time","staves","part-symbol","instruments","clef","staff-details","transpose","directive","measure-style"];static sequenceNote=["cue","pitch","rest","unpitched","duration","tie","voice","type","dot","accidental","time-modification","stem","notehead","notehead-text","staff","beam","notations","lyric","play"];static sequenceNotations=["accidental-mark","arpeggiate","articulations","dynamics","fermata","glissando","non-arpeggiate","ornaments","other-notation","slide","slur","technical","tied","tuplet"];static sequenceBarline=["bar-style","footnote","level","wavy-line","segno","coda","fermata","ending","repeat"];static mapAlter={"#":1,b:-1};static mapFifthsToAlters={sharp:["F","C","G","D","A","E","B"],flat:["B","E","A","D","G","C","F"]};static mapRepeats={"D.C. al Coda":s.prototype.convertDaCapo,"D.C. al Fine":s.prototype.convertDaCapo,"D.C. al 1st End.":s.prototype.convertDaCapo,"D.C. al 2nd End.":s.prototype.convertDaCapo,"D.C. al 3rd End.":s.prototype.convertDaCapo,"D.S. al Coda":s.prototype.convertDalSegno,"D.S. al Fine":s.prototype.convertDalSegno,"D.S. al 1st End.":s.prototype.convertDalSegno,"D.S. al 2nd End.":s.prototype.convertDalSegno,"D.S. al 3rd End.":s.prototype.convertDalSegno,Fine:s.prototype.convertFine,"3x":s.prototype.convertRepeatNx,"4x":s.prototype.convertRepeatNx,"5x":s.prototype.convertRepeatNx,"6x":s.prototype.convertRepeatNx,"7x":s.prototype.convertRepeatNx,"8x":s.prototype.convertRepeatNx};static convert(p,u={}){let g=Object.assign({},this.defaultOptions,u);return new s(p,g).convert()}constructor(p,u){this.song=p,this.options=u,this.time={beats:4,beatType:4},this.fifths=null,this.measure=null,this.barRepeat=0,this.codas=[],this.repeats=0,this.emptyCells=0,this.emptyCellNewSystem=!1,this.cellWidth=(this.options.pageWidth-2*this.options.pageMargin)/16,this.parseChord=es({altIntervals:["b5","b9"]}),this.renderChord=rs({useShortNamings:!0,printer:"raw"})}convert(){return Nn.default.toXML(this.convertSong(),{header:` +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// node_modules/asap/browser-raw.js +var require_browser_raw = __commonJS({ + "node_modules/asap/browser-raw.js"(exports, module) { + "use strict"; + module.exports = rawAsap; + function rawAsap(task) { + if (!queue.length) { + requestFlush(); + flushing = true; + } + queue[queue.length] = task; + } + var queue = []; + var flushing = false; + var requestFlush; + var index = 0; + var capacity = 1024; + function flush() { + while (index < queue.length) { + var currentIndex = index; + index = index + 1; + queue[currentIndex].call(); + if (index > capacity) { + for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { + queue[scan] = queue[scan + index]; + } + queue.length -= index; + index = 0; + } + } + queue.length = 0; + index = 0; + flushing = false; + } + var scope = typeof global !== "undefined" ? global : self; + var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver; + if (typeof BrowserMutationObserver === "function") { + requestFlush = makeRequestCallFromMutationObserver(flush); + } else { + requestFlush = makeRequestCallFromTimer(flush); + } + rawAsap.requestFlush = requestFlush; + function makeRequestCallFromMutationObserver(callback) { + var toggle = 1; + var observer = new BrowserMutationObserver(callback); + var node = document.createTextNode(""); + observer.observe(node, { characterData: true }); + return function requestCall() { + toggle = -toggle; + node.data = toggle; + }; + } + function makeRequestCallFromTimer(callback) { + return function requestCall() { + var timeoutHandle = setTimeout(handleTimer, 0); + var intervalHandle = setInterval(handleTimer, 50); + function handleTimer() { + clearTimeout(timeoutHandle); + clearInterval(intervalHandle); + callback(); + } + }; + } + rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer; + } +}); + +// node_modules/promise/lib/core.js +var require_core = __commonJS({ + "node_modules/promise/lib/core.js"(exports, module) { + "use strict"; + var asap = require_browser_raw(); + function noop() { + } + var LAST_ERROR = null; + var IS_ERROR = {}; + function getThen(obj) { + try { + return obj.then; + } catch (ex) { + LAST_ERROR = ex; + return IS_ERROR; + } + } + function tryCallOne(fn, a) { + try { + return fn(a); + } catch (ex) { + LAST_ERROR = ex; + return IS_ERROR; + } + } + function tryCallTwo(fn, a, b) { + try { + fn(a, b); + } catch (ex) { + LAST_ERROR = ex; + return IS_ERROR; + } + } + module.exports = Promise3; + function Promise3(fn) { + if (typeof this !== "object") { + throw new TypeError("Promises must be constructed via new"); + } + if (typeof fn !== "function") { + throw new TypeError("Promise constructor's argument is not a function"); + } + this._x = 0; + this._y = 0; + this._z = null; + this._A = null; + if (fn === noop) return; + doResolve(fn, this); + } + Promise3._B = null; + Promise3._C = null; + Promise3._D = noop; + Promise3.prototype.then = function(onFulfilled, onRejected) { + if (this.constructor !== Promise3) { + return safeThen(this, onFulfilled, onRejected); + } + var res = new Promise3(noop); + handle(this, new Handler(onFulfilled, onRejected, res)); + return res; + }; + function safeThen(self2, onFulfilled, onRejected) { + return new self2.constructor(function(resolve2, reject2) { + var res = new Promise3(noop); + res.then(resolve2, reject2); + handle(self2, new Handler(onFulfilled, onRejected, res)); + }); + } + function handle(self2, deferred) { + while (self2._y === 3) { + self2 = self2._z; + } + if (Promise3._B) { + Promise3._B(self2); + } + if (self2._y === 0) { + if (self2._x === 0) { + self2._x = 1; + self2._A = deferred; + return; + } + if (self2._x === 1) { + self2._x = 2; + self2._A = [self2._A, deferred]; + return; + } + self2._A.push(deferred); + return; + } + handleResolved(self2, deferred); + } + function handleResolved(self2, deferred) { + asap(function() { + var cb = self2._y === 1 ? deferred.onFulfilled : deferred.onRejected; + if (cb === null) { + if (self2._y === 1) { + resolve(deferred.promise, self2._z); + } else { + reject(deferred.promise, self2._z); + } + return; + } + var ret = tryCallOne(cb, self2._z); + if (ret === IS_ERROR) { + reject(deferred.promise, LAST_ERROR); + } else { + resolve(deferred.promise, ret); + } + }); + } + function resolve(self2, newValue) { + if (newValue === self2) { + return reject( + self2, + new TypeError("A promise cannot be resolved with itself.") + ); + } + if (newValue && (typeof newValue === "object" || typeof newValue === "function")) { + var then = getThen(newValue); + if (then === IS_ERROR) { + return reject(self2, LAST_ERROR); + } + if (then === self2.then && newValue instanceof Promise3) { + self2._y = 3; + self2._z = newValue; + finale(self2); + return; + } else if (typeof then === "function") { + doResolve(then.bind(newValue), self2); + return; + } + } + self2._y = 1; + self2._z = newValue; + finale(self2); + } + function reject(self2, newValue) { + self2._y = 2; + self2._z = newValue; + if (Promise3._C) { + Promise3._C(self2, newValue); + } + finale(self2); + } + function finale(self2) { + if (self2._x === 1) { + handle(self2, self2._A); + self2._A = null; + } + if (self2._x === 2) { + for (var i = 0; i < self2._A.length; i++) { + handle(self2, self2._A[i]); + } + self2._A = null; + } + } + function Handler(onFulfilled, onRejected, promise) { + this.onFulfilled = typeof onFulfilled === "function" ? onFulfilled : null; + this.onRejected = typeof onRejected === "function" ? onRejected : null; + this.promise = promise; + } + function doResolve(fn, promise) { + var done = false; + var res = tryCallTwo(fn, function(value) { + if (done) return; + done = true; + resolve(promise, value); + }, function(reason) { + if (done) return; + done = true; + reject(promise, reason); + }); + if (!done && res === IS_ERROR) { + done = true; + reject(promise, LAST_ERROR); + } + } + } +}); + +// node_modules/promise/lib/done.js +var require_done = __commonJS({ + "node_modules/promise/lib/done.js"(exports, module) { + "use strict"; + var Promise3 = require_core(); + module.exports = Promise3; + Promise3.prototype.done = function(onFulfilled, onRejected) { + var self2 = arguments.length ? this.then.apply(this, arguments) : this; + self2.then(null, function(err) { + setTimeout(function() { + throw err; + }, 0); + }); + }; + } +}); + +// node_modules/promise/lib/finally.js +var require_finally = __commonJS({ + "node_modules/promise/lib/finally.js"(exports, module) { + "use strict"; + var Promise3 = require_core(); + module.exports = Promise3; + Promise3.prototype.finally = function(f) { + return this.then(function(value) { + return Promise3.resolve(f()).then(function() { + return value; + }); + }, function(err) { + return Promise3.resolve(f()).then(function() { + throw err; + }); + }); + }; + } +}); + +// node_modules/promise/lib/es6-extensions.js +var require_es6_extensions = __commonJS({ + "node_modules/promise/lib/es6-extensions.js"(exports, module) { + "use strict"; + var Promise3 = require_core(); + module.exports = Promise3; + var TRUE = valuePromise(true); + var FALSE = valuePromise(false); + var NULL = valuePromise(null); + var UNDEFINED = valuePromise(void 0); + var ZERO = valuePromise(0); + var EMPTYSTRING = valuePromise(""); + function valuePromise(value) { + var p = new Promise3(Promise3._D); + p._y = 1; + p._z = value; + return p; + } + Promise3.resolve = function(value) { + if (value instanceof Promise3) return value; + if (value === null) return NULL; + if (value === void 0) return UNDEFINED; + if (value === true) return TRUE; + if (value === false) return FALSE; + if (value === 0) return ZERO; + if (value === "") return EMPTYSTRING; + if (typeof value === "object" || typeof value === "function") { + try { + var then = value.then; + if (typeof then === "function") { + return new Promise3(then.bind(value)); + } + } catch (ex) { + return new Promise3(function(resolve, reject) { + reject(ex); + }); + } + } + return valuePromise(value); + }; + var iterableToArray = function(iterable) { + if (typeof Array.from === "function") { + iterableToArray = Array.from; + return Array.from(iterable); + } + iterableToArray = function(x) { + return Array.prototype.slice.call(x); + }; + return Array.prototype.slice.call(iterable); + }; + Promise3.all = function(arr) { + var args = iterableToArray(arr); + return new Promise3(function(resolve, reject) { + if (args.length === 0) return resolve([]); + var remaining = args.length; + function res(i2, val) { + if (val && (typeof val === "object" || typeof val === "function")) { + if (val instanceof Promise3 && val.then === Promise3.prototype.then) { + while (val._y === 3) { + val = val._z; + } + if (val._y === 1) return res(i2, val._z); + if (val._y === 2) reject(val._z); + val.then(function(val2) { + res(i2, val2); + }, reject); + return; + } else { + var then = val.then; + if (typeof then === "function") { + var p = new Promise3(then.bind(val)); + p.then(function(val2) { + res(i2, val2); + }, reject); + return; + } + } + } + args[i2] = val; + if (--remaining === 0) { + resolve(args); + } + } + for (var i = 0; i < args.length; i++) { + res(i, args[i]); + } + }); + }; + function onSettledFulfill(value) { + return { status: "fulfilled", value }; + } + function onSettledReject(reason) { + return { status: "rejected", reason }; + } + function mapAllSettled(item) { + if (item && (typeof item === "object" || typeof item === "function")) { + if (item instanceof Promise3 && item.then === Promise3.prototype.then) { + return item.then(onSettledFulfill, onSettledReject); + } + var then = item.then; + if (typeof then === "function") { + return new Promise3(then.bind(item)).then(onSettledFulfill, onSettledReject); + } + } + return onSettledFulfill(item); + } + Promise3.allSettled = function(iterable) { + return Promise3.all(iterableToArray(iterable).map(mapAllSettled)); + }; + Promise3.reject = function(value) { + return new Promise3(function(resolve, reject) { + reject(value); + }); + }; + Promise3.race = function(values) { + return new Promise3(function(resolve, reject) { + iterableToArray(values).forEach(function(value) { + Promise3.resolve(value).then(resolve, reject); + }); + }); + }; + Promise3.prototype["catch"] = function(onRejected) { + return this.then(null, onRejected); + }; + function getAggregateError(errors) { + if (typeof AggregateError === "function") { + return new AggregateError(errors, "All promises were rejected"); + } + var error = new Error("All promises were rejected"); + error.name = "AggregateError"; + error.errors = errors; + return error; + } + Promise3.any = function promiseAny(values) { + return new Promise3(function(resolve, reject) { + var promises = iterableToArray(values); + var hasResolved = false; + var rejectionReasons = []; + function resolveOnce(value) { + if (!hasResolved) { + hasResolved = true; + resolve(value); + } + } + function rejectionCheck(reason) { + rejectionReasons.push(reason); + if (rejectionReasons.length === promises.length) { + reject(getAggregateError(rejectionReasons)); + } + } + if (promises.length === 0) { + reject(getAggregateError(rejectionReasons)); + } else { + promises.forEach(function(value) { + Promise3.resolve(value).then(resolveOnce, rejectionCheck); + }); + } + }); + }; + } +}); + +// node_modules/asap/browser-asap.js +var require_browser_asap = __commonJS({ + "node_modules/asap/browser-asap.js"(exports, module) { + "use strict"; + var rawAsap = require_browser_raw(); + var freeTasks = []; + var pendingErrors = []; + var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError); + function throwFirstError() { + if (pendingErrors.length) { + throw pendingErrors.shift(); + } + } + module.exports = asap; + function asap(task) { + var rawTask; + if (freeTasks.length) { + rawTask = freeTasks.pop(); + } else { + rawTask = new RawTask(); + } + rawTask.task = task; + rawAsap(rawTask); + } + function RawTask() { + this.task = null; + } + RawTask.prototype.call = function() { + try { + this.task.call(); + } catch (error) { + if (asap.onerror) { + asap.onerror(error); + } else { + pendingErrors.push(error); + requestErrorThrow(); + } + } finally { + this.task = null; + freeTasks[freeTasks.length] = this; + } + }; + } +}); + +// node_modules/promise/lib/node-extensions.js +var require_node_extensions = __commonJS({ + "node_modules/promise/lib/node-extensions.js"(exports, module) { + "use strict"; + var Promise3 = require_core(); + var asap = require_browser_asap(); + module.exports = Promise3; + Promise3.denodeify = function(fn, argumentCount) { + if (typeof argumentCount === "number" && argumentCount !== Infinity) { + return denodeifyWithCount(fn, argumentCount); + } else { + return denodeifyWithoutCount(fn); + } + }; + var callbackFn = "function (err, res) {if (err) { rj(err); } else { rs(res); }}"; + function denodeifyWithCount(fn, argumentCount) { + var args = []; + for (var i = 0; i < argumentCount; i++) { + args.push("a" + i); + } + var body = [ + "return function (" + args.join(",") + ") {", + "var self = this;", + "return new Promise(function (rs, rj) {", + "var res = fn.call(", + ["self"].concat(args).concat([callbackFn]).join(","), + ");", + "if (res &&", + '(typeof res === "object" || typeof res === "function") &&', + 'typeof res.then === "function"', + ") {rs(res);}", + "});", + "};" + ].join(""); + return Function(["Promise", "fn"], body)(Promise3, fn); + } + function denodeifyWithoutCount(fn) { + var fnLength = Math.max(fn.length - 1, 3); + var args = []; + for (var i = 0; i < fnLength; i++) { + args.push("a" + i); + } + var body = [ + "return function (" + args.join(",") + ") {", + "var self = this;", + "var args;", + "var argLength = arguments.length;", + "if (arguments.length > " + fnLength + ") {", + "args = new Array(arguments.length + 1);", + "for (var i = 0; i < arguments.length; i++) {", + "args[i] = arguments[i];", + "}", + "}", + "return new Promise(function (rs, rj) {", + "var cb = " + callbackFn + ";", + "var res;", + "switch (argLength) {", + args.concat(["extra"]).map(function(_, index) { + return "case " + index + ":res = fn.call(" + ["self"].concat(args.slice(0, index)).concat("cb").join(",") + ");break;"; + }).join(""), + "default:", + "args[argLength] = cb;", + "res = fn.apply(self, args);", + "}", + "if (res &&", + '(typeof res === "object" || typeof res === "function") &&', + 'typeof res.then === "function"', + ") {rs(res);}", + "});", + "};" + ].join(""); + return Function( + ["Promise", "fn"], + body + )(Promise3, fn); + } + Promise3.nodeify = function(fn) { + return function() { + var args = Array.prototype.slice.call(arguments); + var callback = typeof args[args.length - 1] === "function" ? args.pop() : null; + var ctx = this; + try { + return fn.apply(this, arguments).nodeify(callback, ctx); + } catch (ex) { + if (callback === null || typeof callback == "undefined") { + return new Promise3(function(resolve, reject) { + reject(ex); + }); + } else { + asap(function() { + callback.call(ctx, ex); + }); + } + } + }; + }; + Promise3.prototype.nodeify = function(callback, ctx) { + if (typeof callback != "function") return this; + this.then(function(value) { + asap(function() { + callback.call(ctx, null, value); + }); + }, function(err) { + asap(function() { + callback.call(ctx, err); + }); + }); + }; + } +}); + +// node_modules/promise/lib/synchronous.js +var require_synchronous = __commonJS({ + "node_modules/promise/lib/synchronous.js"(exports, module) { + "use strict"; + var Promise3 = require_core(); + module.exports = Promise3; + Promise3.enableSynchronous = function() { + Promise3.prototype.isPending = function() { + return this.getState() == 0; + }; + Promise3.prototype.isFulfilled = function() { + return this.getState() == 1; + }; + Promise3.prototype.isRejected = function() { + return this.getState() == 2; + }; + Promise3.prototype.getValue = function() { + if (this._y === 3) { + return this._z.getValue(); + } + if (!this.isFulfilled()) { + throw new Error("Cannot get a value of an unfulfilled promise."); + } + return this._z; + }; + Promise3.prototype.getReason = function() { + if (this._y === 3) { + return this._z.getReason(); + } + if (!this.isRejected()) { + throw new Error("Cannot get a rejection reason of a non-rejected promise."); + } + return this._z; + }; + Promise3.prototype.getState = function() { + if (this._y === 3) { + return this._z.getState(); + } + if (this._y === -1 || this._y === -2) { + return 0; + } + return this._y; + }; + }; + Promise3.disableSynchronous = function() { + Promise3.prototype.isPending = void 0; + Promise3.prototype.isFulfilled = void 0; + Promise3.prototype.isRejected = void 0; + Promise3.prototype.getValue = void 0; + Promise3.prototype.getReason = void 0; + Promise3.prototype.getState = void 0; + }; + } +}); + +// node_modules/promise/lib/index.js +var require_lib = __commonJS({ + "node_modules/promise/lib/index.js"(exports, module) { + "use strict"; + module.exports = require_core(); + require_done(); + require_finally(); + require_es6_extensions(); + require_node_extensions(); + require_synchronous(); + } +}); + +// node_modules/promise/index.js +var require_promise = __commonJS({ + "node_modules/promise/index.js"(exports, module) { + "use strict"; + module.exports = require_lib(); + } +}); + +// node_modules/fast-diff/diff.js +var require_diff = __commonJS({ + "node_modules/fast-diff/diff.js"(exports, module) { + var DIFF_DELETE = -1; + var DIFF_INSERT = 1; + var DIFF_EQUAL = 0; + function diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) { + if (text1 === text2) { + if (text1) { + return [[DIFF_EQUAL, text1]]; + } + return []; + } + if (cursor_pos != null) { + var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos); + if (editdiff) { + return editdiff; + } + } + var commonlength = diff_commonPrefix(text1, text2); + var commonprefix = text1.substring(0, commonlength); + text1 = text1.substring(commonlength); + text2 = text2.substring(commonlength); + commonlength = diff_commonSuffix(text1, text2); + var commonsuffix = text1.substring(text1.length - commonlength); + text1 = text1.substring(0, text1.length - commonlength); + text2 = text2.substring(0, text2.length - commonlength); + var diffs = diff_compute_(text1, text2); + if (commonprefix) { + diffs.unshift([DIFF_EQUAL, commonprefix]); + } + if (commonsuffix) { + diffs.push([DIFF_EQUAL, commonsuffix]); + } + diff_cleanupMerge(diffs, _fix_unicode); + if (cleanup) { + diff_cleanupSemantic(diffs); + } + return diffs; + } + function diff_compute_(text1, text2) { + var diffs; + if (!text1) { + return [[DIFF_INSERT, text2]]; + } + if (!text2) { + return [[DIFF_DELETE, text1]]; + } + var longtext = text1.length > text2.length ? text1 : text2; + var shorttext = text1.length > text2.length ? text2 : text1; + var i = longtext.indexOf(shorttext); + if (i !== -1) { + diffs = [ + [DIFF_INSERT, longtext.substring(0, i)], + [DIFF_EQUAL, shorttext], + [DIFF_INSERT, longtext.substring(i + shorttext.length)] + ]; + if (text1.length > text2.length) { + diffs[0][0] = diffs[2][0] = DIFF_DELETE; + } + return diffs; + } + if (shorttext.length === 1) { + return [ + [DIFF_DELETE, text1], + [DIFF_INSERT, text2] + ]; + } + var hm = diff_halfMatch_(text1, text2); + if (hm) { + var text1_a = hm[0]; + var text1_b = hm[1]; + var text2_a = hm[2]; + var text2_b = hm[3]; + var mid_common = hm[4]; + var diffs_a = diff_main(text1_a, text2_a); + var diffs_b = diff_main(text1_b, text2_b); + return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b); + } + return diff_bisect_(text1, text2); + } + function diff_bisect_(text1, text2) { + var text1_length = text1.length; + var text2_length = text2.length; + var max_d = Math.ceil((text1_length + text2_length) / 2); + var v_offset = max_d; + var v_length = 2 * max_d; + var v1 = new Array(v_length); + var v2 = new Array(v_length); + for (var x = 0; x < v_length; x++) { + v1[x] = -1; + v2[x] = -1; + } + v1[v_offset + 1] = 0; + v2[v_offset + 1] = 0; + var delta = text1_length - text2_length; + var front = delta % 2 !== 0; + var k1start = 0; + var k1end = 0; + var k2start = 0; + var k2end = 0; + for (var d = 0; d < max_d; d++) { + for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) { + var k1_offset = v_offset + k1; + var x1; + if (k1 === -d || k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1]) { + x1 = v1[k1_offset + 1]; + } else { + x1 = v1[k1_offset - 1] + 1; + } + var y1 = x1 - k1; + while (x1 < text1_length && y1 < text2_length && text1.charAt(x1) === text2.charAt(y1)) { + x1++; + y1++; + } + v1[k1_offset] = x1; + if (x1 > text1_length) { + k1end += 2; + } else if (y1 > text2_length) { + k1start += 2; + } else if (front) { + var k2_offset = v_offset + delta - k1; + if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) { + var x2 = text1_length - v2[k2_offset]; + if (x1 >= x2) { + return diff_bisectSplit_(text1, text2, x1, y1); + } + } + } + } + for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) { + var k2_offset = v_offset + k2; + var x2; + if (k2 === -d || k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1]) { + x2 = v2[k2_offset + 1]; + } else { + x2 = v2[k2_offset - 1] + 1; + } + var y2 = x2 - k2; + while (x2 < text1_length && y2 < text2_length && text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)) { + x2++; + y2++; + } + v2[k2_offset] = x2; + if (x2 > text1_length) { + k2end += 2; + } else if (y2 > text2_length) { + k2start += 2; + } else if (!front) { + var k1_offset = v_offset + delta - k2; + if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) { + var x1 = v1[k1_offset]; + var y1 = v_offset + x1 - k1_offset; + x2 = text1_length - x2; + if (x1 >= x2) { + return diff_bisectSplit_(text1, text2, x1, y1); + } + } + } + } + } + return [ + [DIFF_DELETE, text1], + [DIFF_INSERT, text2] + ]; + } + function diff_bisectSplit_(text1, text2, x, y) { + var text1a = text1.substring(0, x); + var text2a = text2.substring(0, y); + var text1b = text1.substring(x); + var text2b = text2.substring(y); + var diffs = diff_main(text1a, text2a); + var diffsb = diff_main(text1b, text2b); + return diffs.concat(diffsb); + } + function diff_commonPrefix(text1, text2) { + if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) { + return 0; + } + var pointermin = 0; + var pointermax = Math.min(text1.length, text2.length); + var pointermid = pointermax; + var pointerstart = 0; + while (pointermin < pointermid) { + if (text1.substring(pointerstart, pointermid) == text2.substring(pointerstart, pointermid)) { + pointermin = pointermid; + pointerstart = pointermin; + } else { + pointermax = pointermid; + } + pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + } + if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) { + pointermid--; + } + return pointermid; + } + function diff_commonOverlap_(text1, text2) { + var text1_length = text1.length; + var text2_length = text2.length; + if (text1_length == 0 || text2_length == 0) { + return 0; + } + if (text1_length > text2_length) { + text1 = text1.substring(text1_length - text2_length); + } else if (text1_length < text2_length) { + text2 = text2.substring(0, text1_length); + } + var text_length = Math.min(text1_length, text2_length); + if (text1 == text2) { + return text_length; + } + var best = 0; + var length = 1; + while (true) { + var pattern = text1.substring(text_length - length); + var found = text2.indexOf(pattern); + if (found == -1) { + return best; + } + length += found; + if (found == 0 || text1.substring(text_length - length) == text2.substring(0, length)) { + best = length; + length++; + } + } + } + function diff_commonSuffix(text1, text2) { + if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) { + return 0; + } + var pointermin = 0; + var pointermax = Math.min(text1.length, text2.length); + var pointermid = pointermax; + var pointerend = 0; + while (pointermin < pointermid) { + if (text1.substring(text1.length - pointermid, text1.length - pointerend) == text2.substring(text2.length - pointermid, text2.length - pointerend)) { + pointermin = pointermid; + pointerend = pointermin; + } else { + pointermax = pointermid; + } + pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); + } + if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) { + pointermid--; + } + return pointermid; + } + function diff_halfMatch_(text1, text2) { + var longtext = text1.length > text2.length ? text1 : text2; + var shorttext = text1.length > text2.length ? text2 : text1; + if (longtext.length < 4 || shorttext.length * 2 < longtext.length) { + return null; + } + function diff_halfMatchI_(longtext2, shorttext2, i) { + var seed = longtext2.substring(i, i + Math.floor(longtext2.length / 4)); + var j = -1; + var best_common = ""; + var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b; + while ((j = shorttext2.indexOf(seed, j + 1)) !== -1) { + var prefixLength = diff_commonPrefix( + longtext2.substring(i), + shorttext2.substring(j) + ); + var suffixLength = diff_commonSuffix( + longtext2.substring(0, i), + shorttext2.substring(0, j) + ); + if (best_common.length < suffixLength + prefixLength) { + best_common = shorttext2.substring(j - suffixLength, j) + shorttext2.substring(j, j + prefixLength); + best_longtext_a = longtext2.substring(0, i - suffixLength); + best_longtext_b = longtext2.substring(i + prefixLength); + best_shorttext_a = shorttext2.substring(0, j - suffixLength); + best_shorttext_b = shorttext2.substring(j + prefixLength); + } + } + if (best_common.length * 2 >= longtext2.length) { + return [ + best_longtext_a, + best_longtext_b, + best_shorttext_a, + best_shorttext_b, + best_common + ]; + } else { + return null; + } + } + var hm1 = diff_halfMatchI_( + longtext, + shorttext, + Math.ceil(longtext.length / 4) + ); + var hm2 = diff_halfMatchI_( + longtext, + shorttext, + Math.ceil(longtext.length / 2) + ); + var hm; + if (!hm1 && !hm2) { + return null; + } else if (!hm2) { + hm = hm1; + } else if (!hm1) { + hm = hm2; + } else { + hm = hm1[4].length > hm2[4].length ? hm1 : hm2; + } + var text1_a, text1_b, text2_a, text2_b; + if (text1.length > text2.length) { + text1_a = hm[0]; + text1_b = hm[1]; + text2_a = hm[2]; + text2_b = hm[3]; + } else { + text2_a = hm[0]; + text2_b = hm[1]; + text1_a = hm[2]; + text1_b = hm[3]; + } + var mid_common = hm[4]; + return [text1_a, text1_b, text2_a, text2_b, mid_common]; + } + function diff_cleanupSemantic(diffs) { + var changes = false; + var equalities = []; + var equalitiesLength = 0; + var lastequality = null; + var pointer = 0; + var length_insertions1 = 0; + var length_deletions1 = 0; + var length_insertions2 = 0; + var length_deletions2 = 0; + while (pointer < diffs.length) { + if (diffs[pointer][0] == DIFF_EQUAL) { + equalities[equalitiesLength++] = pointer; + length_insertions1 = length_insertions2; + length_deletions1 = length_deletions2; + length_insertions2 = 0; + length_deletions2 = 0; + lastequality = diffs[pointer][1]; + } else { + if (diffs[pointer][0] == DIFF_INSERT) { + length_insertions2 += diffs[pointer][1].length; + } else { + length_deletions2 += diffs[pointer][1].length; + } + if (lastequality && lastequality.length <= Math.max(length_insertions1, length_deletions1) && lastequality.length <= Math.max(length_insertions2, length_deletions2)) { + diffs.splice(equalities[equalitiesLength - 1], 0, [ + DIFF_DELETE, + lastequality + ]); + diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; + equalitiesLength--; + equalitiesLength--; + pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1; + length_insertions1 = 0; + length_deletions1 = 0; + length_insertions2 = 0; + length_deletions2 = 0; + lastequality = null; + changes = true; + } + } + pointer++; + } + if (changes) { + diff_cleanupMerge(diffs); + } + diff_cleanupSemanticLossless(diffs); + pointer = 1; + while (pointer < diffs.length) { + if (diffs[pointer - 1][0] == DIFF_DELETE && diffs[pointer][0] == DIFF_INSERT) { + var deletion = diffs[pointer - 1][1]; + var insertion = diffs[pointer][1]; + var overlap_length1 = diff_commonOverlap_(deletion, insertion); + var overlap_length2 = diff_commonOverlap_(insertion, deletion); + if (overlap_length1 >= overlap_length2) { + if (overlap_length1 >= deletion.length / 2 || overlap_length1 >= insertion.length / 2) { + diffs.splice(pointer, 0, [ + DIFF_EQUAL, + insertion.substring(0, overlap_length1) + ]); + diffs[pointer - 1][1] = deletion.substring( + 0, + deletion.length - overlap_length1 + ); + diffs[pointer + 1][1] = insertion.substring(overlap_length1); + pointer++; + } + } else { + if (overlap_length2 >= deletion.length / 2 || overlap_length2 >= insertion.length / 2) { + diffs.splice(pointer, 0, [ + DIFF_EQUAL, + deletion.substring(0, overlap_length2) + ]); + diffs[pointer - 1][0] = DIFF_INSERT; + diffs[pointer - 1][1] = insertion.substring( + 0, + insertion.length - overlap_length2 + ); + diffs[pointer + 1][0] = DIFF_DELETE; + diffs[pointer + 1][1] = deletion.substring(overlap_length2); + pointer++; + } + } + pointer++; + } + pointer++; + } + } + var nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/; + var whitespaceRegex_ = /\s/; + var linebreakRegex_ = /[\r\n]/; + var blanklineEndRegex_ = /\n\r?\n$/; + var blanklineStartRegex_ = /^\r?\n\r?\n/; + function diff_cleanupSemanticLossless(diffs) { + function diff_cleanupSemanticScore_(one, two) { + if (!one || !two) { + return 6; + } + var char1 = one.charAt(one.length - 1); + var char2 = two.charAt(0); + var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_); + var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_); + var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_); + var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_); + var lineBreak1 = whitespace1 && char1.match(linebreakRegex_); + var lineBreak2 = whitespace2 && char2.match(linebreakRegex_); + var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_); + var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_); + if (blankLine1 || blankLine2) { + return 5; + } else if (lineBreak1 || lineBreak2) { + return 4; + } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) { + return 3; + } else if (whitespace1 || whitespace2) { + return 2; + } else if (nonAlphaNumeric1 || nonAlphaNumeric2) { + return 1; + } + return 0; + } + var pointer = 1; + while (pointer < diffs.length - 1) { + if (diffs[pointer - 1][0] == DIFF_EQUAL && diffs[pointer + 1][0] == DIFF_EQUAL) { + var equality1 = diffs[pointer - 1][1]; + var edit = diffs[pointer][1]; + var equality2 = diffs[pointer + 1][1]; + var commonOffset = diff_commonSuffix(equality1, edit); + if (commonOffset) { + var commonString = edit.substring(edit.length - commonOffset); + equality1 = equality1.substring(0, equality1.length - commonOffset); + edit = commonString + edit.substring(0, edit.length - commonOffset); + equality2 = commonString + equality2; + } + var bestEquality1 = equality1; + var bestEdit = edit; + var bestEquality2 = equality2; + var bestScore = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2); + while (edit.charAt(0) === equality2.charAt(0)) { + equality1 += edit.charAt(0); + edit = edit.substring(1) + equality2.charAt(0); + equality2 = equality2.substring(1); + var score = diff_cleanupSemanticScore_(equality1, edit) + diff_cleanupSemanticScore_(edit, equality2); + if (score >= bestScore) { + bestScore = score; + bestEquality1 = equality1; + bestEdit = edit; + bestEquality2 = equality2; + } + } + if (diffs[pointer - 1][1] != bestEquality1) { + if (bestEquality1) { + diffs[pointer - 1][1] = bestEquality1; + } else { + diffs.splice(pointer - 1, 1); + pointer--; + } + diffs[pointer][1] = bestEdit; + if (bestEquality2) { + diffs[pointer + 1][1] = bestEquality2; + } else { + diffs.splice(pointer + 1, 1); + pointer--; + } + } + } + pointer++; + } + } + function diff_cleanupMerge(diffs, fix_unicode) { + diffs.push([DIFF_EQUAL, ""]); + var pointer = 0; + var count_delete = 0; + var count_insert = 0; + var text_delete = ""; + var text_insert = ""; + var commonlength; + while (pointer < diffs.length) { + if (pointer < diffs.length - 1 && !diffs[pointer][1]) { + diffs.splice(pointer, 1); + continue; + } + switch (diffs[pointer][0]) { + case DIFF_INSERT: + count_insert++; + text_insert += diffs[pointer][1]; + pointer++; + break; + case DIFF_DELETE: + count_delete++; + text_delete += diffs[pointer][1]; + pointer++; + break; + case DIFF_EQUAL: + var previous_equality = pointer - count_insert - count_delete - 1; + if (fix_unicode) { + if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) { + var stray = diffs[previous_equality][1].slice(-1); + diffs[previous_equality][1] = diffs[previous_equality][1].slice( + 0, + -1 + ); + text_delete = stray + text_delete; + text_insert = stray + text_insert; + if (!diffs[previous_equality][1]) { + diffs.splice(previous_equality, 1); + pointer--; + var k = previous_equality - 1; + if (diffs[k] && diffs[k][0] === DIFF_INSERT) { + count_insert++; + text_insert = diffs[k][1] + text_insert; + k--; + } + if (diffs[k] && diffs[k][0] === DIFF_DELETE) { + count_delete++; + text_delete = diffs[k][1] + text_delete; + k--; + } + previous_equality = k; + } + } + if (starts_with_pair_end(diffs[pointer][1])) { + var stray = diffs[pointer][1].charAt(0); + diffs[pointer][1] = diffs[pointer][1].slice(1); + text_delete += stray; + text_insert += stray; + } + } + if (pointer < diffs.length - 1 && !diffs[pointer][1]) { + diffs.splice(pointer, 1); + break; + } + if (text_delete.length > 0 || text_insert.length > 0) { + if (text_delete.length > 0 && text_insert.length > 0) { + commonlength = diff_commonPrefix(text_insert, text_delete); + if (commonlength !== 0) { + if (previous_equality >= 0) { + diffs[previous_equality][1] += text_insert.substring( + 0, + commonlength + ); + } else { + diffs.splice(0, 0, [ + DIFF_EQUAL, + text_insert.substring(0, commonlength) + ]); + pointer++; + } + text_insert = text_insert.substring(commonlength); + text_delete = text_delete.substring(commonlength); + } + commonlength = diff_commonSuffix(text_insert, text_delete); + if (commonlength !== 0) { + diffs[pointer][1] = text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1]; + text_insert = text_insert.substring( + 0, + text_insert.length - commonlength + ); + text_delete = text_delete.substring( + 0, + text_delete.length - commonlength + ); + } + } + var n = count_insert + count_delete; + if (text_delete.length === 0 && text_insert.length === 0) { + diffs.splice(pointer - n, n); + pointer = pointer - n; + } else if (text_delete.length === 0) { + diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]); + pointer = pointer - n + 1; + } else if (text_insert.length === 0) { + diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]); + pointer = pointer - n + 1; + } else { + diffs.splice( + pointer - n, + n, + [DIFF_DELETE, text_delete], + [DIFF_INSERT, text_insert] + ); + pointer = pointer - n + 2; + } + } + if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) { + diffs[pointer - 1][1] += diffs[pointer][1]; + diffs.splice(pointer, 1); + } else { + pointer++; + } + count_insert = 0; + count_delete = 0; + text_delete = ""; + text_insert = ""; + break; + } + } + if (diffs[diffs.length - 1][1] === "") { + diffs.pop(); + } + var changes = false; + pointer = 1; + while (pointer < diffs.length - 1) { + if (diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) { + if (diffs[pointer][1].substring( + diffs[pointer][1].length - diffs[pointer - 1][1].length + ) === diffs[pointer - 1][1]) { + diffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring( + 0, + diffs[pointer][1].length - diffs[pointer - 1][1].length + ); + diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1]; + diffs.splice(pointer - 1, 1); + changes = true; + } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) == diffs[pointer + 1][1]) { + diffs[pointer - 1][1] += diffs[pointer + 1][1]; + diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1]; + diffs.splice(pointer + 1, 1); + changes = true; + } + } + pointer++; + } + if (changes) { + diff_cleanupMerge(diffs, fix_unicode); + } + } + function is_surrogate_pair_start(charCode) { + return charCode >= 55296 && charCode <= 56319; + } + function is_surrogate_pair_end(charCode) { + return charCode >= 56320 && charCode <= 57343; + } + function starts_with_pair_end(str) { + return is_surrogate_pair_end(str.charCodeAt(0)); + } + function ends_with_pair_start(str) { + return is_surrogate_pair_start(str.charCodeAt(str.length - 1)); + } + function remove_empty_tuples(tuples) { + var ret = []; + for (var i = 0; i < tuples.length; i++) { + if (tuples[i][1].length > 0) { + ret.push(tuples[i]); + } + } + return ret; + } + function make_edit_splice(before, oldMiddle, newMiddle, after) { + if (ends_with_pair_start(before) || starts_with_pair_end(after)) { + return null; + } + return remove_empty_tuples([ + [DIFF_EQUAL, before], + [DIFF_DELETE, oldMiddle], + [DIFF_INSERT, newMiddle], + [DIFF_EQUAL, after] + ]); + } + function find_cursor_edit_diff(oldText, newText, cursor_pos) { + var oldRange = typeof cursor_pos === "number" ? { index: cursor_pos, length: 0 } : cursor_pos.oldRange; + var newRange = typeof cursor_pos === "number" ? null : cursor_pos.newRange; + var oldLength = oldText.length; + var newLength = newText.length; + if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) { + var oldCursor = oldRange.index; + var oldBefore = oldText.slice(0, oldCursor); + var oldAfter = oldText.slice(oldCursor); + var maybeNewCursor = newRange ? newRange.index : null; + editBefore: { + var newCursor = oldCursor + newLength - oldLength; + if (maybeNewCursor !== null && maybeNewCursor !== newCursor) { + break editBefore; + } + if (newCursor < 0 || newCursor > newLength) { + break editBefore; + } + var newBefore = newText.slice(0, newCursor); + var newAfter = newText.slice(newCursor); + if (newAfter !== oldAfter) { + break editBefore; + } + var prefixLength = Math.min(oldCursor, newCursor); + var oldPrefix = oldBefore.slice(0, prefixLength); + var newPrefix = newBefore.slice(0, prefixLength); + if (oldPrefix !== newPrefix) { + break editBefore; + } + var oldMiddle = oldBefore.slice(prefixLength); + var newMiddle = newBefore.slice(prefixLength); + return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter); + } + editAfter: { + if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) { + break editAfter; + } + var cursor = oldCursor; + var newBefore = newText.slice(0, cursor); + var newAfter = newText.slice(cursor); + if (newBefore !== oldBefore) { + break editAfter; + } + var suffixLength = Math.min(oldLength - cursor, newLength - cursor); + var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength); + var newSuffix = newAfter.slice(newAfter.length - suffixLength); + if (oldSuffix !== newSuffix) { + break editAfter; + } + var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength); + var newMiddle = newAfter.slice(0, newAfter.length - suffixLength); + return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix); + } + } + if (oldRange.length > 0 && newRange && newRange.length === 0) { + replaceRange: { + var oldPrefix = oldText.slice(0, oldRange.index); + var oldSuffix = oldText.slice(oldRange.index + oldRange.length); + var prefixLength = oldPrefix.length; + var suffixLength = oldSuffix.length; + if (newLength < prefixLength + suffixLength) { + break replaceRange; + } + var newPrefix = newText.slice(0, prefixLength); + var newSuffix = newText.slice(newLength - suffixLength); + if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) { + break replaceRange; + } + var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength); + var newMiddle = newText.slice(prefixLength, newLength - suffixLength); + return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix); + } + } + return null; + } + function diff2(text1, text2, cursor_pos, cleanup) { + return diff_main(text1, text2, cursor_pos, cleanup, true); + } + diff2.INSERT = DIFF_INSERT; + diff2.DELETE = DIFF_DELETE; + diff2.EQUAL = DIFF_EQUAL; + module.exports = diff2; + } +}); + +// node_modules/jstoxml/dist/jstoxml.js +var require_jstoxml = __commonJS({ + "node_modules/jstoxml/dist/jstoxml.js"(exports) { + (function(global2, factory) { + if (typeof define === "function" && define.amd) { + define(["exports"], factory); + } else if (typeof exports !== "undefined") { + factory(exports); + } else { + var mod = { + exports: {} + }; + factory(mod.exports); + global2.jstoxml = mod.exports; + } + })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : exports, function(_exports) { + "use strict"; + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.toXML = _exports.default = void 0; + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + function _typeof(obj) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { + return typeof obj2; + } : function(obj2) { + return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }, _typeof(obj); + } + var ARRAY = "array"; + var BOOLEAN = "boolean"; + var DATE = "date"; + var NULL = "null"; + var NUMBER = "number"; + var OBJECT = "object"; + var SPECIAL_OBJECT = "special-object"; + var STRING = "string"; + var PRIVATE_VARS = ["_selfCloseTag", "_attrs"]; + var PRIVATE_VARS_REGEXP = new RegExp(PRIVATE_VARS.join("|"), "g"); + var getIndentStr = function getIndentStr2() { + var indent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; + var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + return indent.repeat(depth); + }; + var getType = function getType2(val) { + return Array.isArray(val) && ARRAY || _typeof(val) === OBJECT && val !== null && val._name && SPECIAL_OBJECT || val instanceof Date && DATE || val === null && NULL || _typeof(val); + }; + var filterStr = function filterStr2() { + var inputStr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; + var filter = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + if (typeof inputStr !== "string") { + return inputStr; + } + var regexp = new RegExp("(".concat(Object.keys(filter).join("|"), ")(?!(\\w|#)*;)"), "g"); + return String(inputStr).replace(regexp, function(str, entity) { + return filter[entity] || ""; + }); + }; + var getAttributeKeyVals = function getAttributeKeyVals2() { + var attributes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var filter = arguments.length > 1 ? arguments[1] : void 0; + var keyVals = []; + if (Array.isArray(attributes)) { + keyVals = attributes.map(function(attr) { + var key = Object.keys(attr)[0]; + var val = attr[key]; + var filteredVal = filter ? filterStr(val, filter) : val; + var valStr = filteredVal === true ? "" : '="'.concat(filteredVal, '"'); + return "".concat(key).concat(valStr); + }); + } else { + var keys = Object.keys(attributes); + keyVals = keys.map(function(key) { + var filteredVal = filter ? filterStr(attributes[key], filter) : attributes[key]; + var valStr = attributes[key] === true ? "" : '="'.concat(filteredVal, '"'); + return "".concat(key).concat(valStr); + }); + } + return keyVals; + }; + var formatAttributes = function formatAttributes2() { + var attributes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var filter = arguments.length > 1 ? arguments[1] : void 0; + var keyVals = getAttributeKeyVals(attributes, filter); + if (keyVals.length === 0) return ""; + var keysValsJoined = keyVals.join(" "); + return " ".concat(keysValsJoined); + }; + var objToArray = function objToArray2() { + var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + return Object.keys(obj).map(function(key) { + return { + _name: key, + _content: obj[key] + }; + }); + }; + var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN]; + var isPrimitive = function isPrimitive2(val) { + return PRIMITIVE_TYPES.includes(getType(val)); + }; + var SIMPLE_TYPES = [].concat(PRIMITIVE_TYPES, [DATE, SPECIAL_OBJECT]); + var isSimpleType = function isSimpleType2(val) { + return SIMPLE_TYPES.includes(getType(val)); + }; + var isSimpleXML = function isSimpleXML2(xmlStr) { + return !xmlStr.match("<"); + }; + var DEFAULT_XML_HEADER = ''; + var getHeaderString = function getHeaderString2(_ref) { + var header = _ref.header, indent = _ref.indent, isOutputStart = _ref.isOutputStart; + var shouldOutputHeader = header && isOutputStart; + if (!shouldOutputHeader) return ""; + var shouldUseDefaultHeader = _typeof(header) === BOOLEAN; + return shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header; + }; + var defaultEntityFilter = { + "<": "<", + ">": ">", + "&": "&" + }; + var toXML = function toXML2() { + var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var _config$depth = config.depth, depth = _config$depth === void 0 ? 0 : _config$depth, indent = config.indent, _isFirstItem = config._isFirstItem, _config$_isOutputStar = config._isOutputStart, _isOutputStart = _config$_isOutputStar === void 0 ? true : _config$_isOutputStar, header = config.header, _config$attributesFil = config.attributesFilter, rawAttributesFilter = _config$attributesFil === void 0 ? {} : _config$attributesFil, _config$filter = config.filter, rawFilter = _config$filter === void 0 ? {} : _config$filter; + var shouldTurnOffAttributesFilter = typeof rawAttributesFilter === "boolean" && !rawAttributesFilter; + var attributesFilter = shouldTurnOffAttributesFilter ? {} : _objectSpread(_objectSpread(_objectSpread({}, defaultEntityFilter), { + '"': """ + }), rawAttributesFilter); + var shouldTurnOffFilter = typeof rawFilter === "boolean" && !rawFilter; + var filter = shouldTurnOffFilter ? {} : _objectSpread(_objectSpread({}, defaultEntityFilter), rawFilter); + var indentStr = getIndentStr(indent, depth); + var valType = getType(obj); + var headerStr = getHeaderString({ + header, + indent, + depth, + isOutputStart: _isOutputStart + }); + var isOutputStart = _isOutputStart && !headerStr && _isFirstItem && depth === 0; + var outputStr = ""; + switch (valType) { + case "special-object": { + var _name = obj._name, _content = obj._content; + if (_content === null) { + outputStr = _name; + break; + } + var isArrayOfPrimitives = Array.isArray(_content) && _content.every(isPrimitive); + if (isArrayOfPrimitives) { + var primitives = _content.map(function(a) { + return toXML2({ + _name, + _content: a + }, _objectSpread(_objectSpread({}, config), {}, { + depth, + _isOutputStart: false + })); + }); + return primitives.join(""); + } + if (_name.match(PRIVATE_VARS_REGEXP)) break; + var newVal = toXML2(_content, _objectSpread(_objectSpread({}, config), {}, { + depth: depth + 1, + _isOutputStart: isOutputStart + })); + var newValType = getType(newVal); + var isNewValSimple = isSimpleXML(newVal); + var preIndentStr = indent && !isOutputStart ? "\n" : ""; + var preTag = "".concat(preIndentStr).concat(indentStr); + if (_name === "_comment") { + outputStr += "".concat(preTag, ""); + break; + } + var valIsEmpty = newValType === "undefined" || newVal === ""; + var shouldSelfClose = _typeof(obj._selfCloseTag) === BOOLEAN ? valIsEmpty && obj._selfCloseTag : valIsEmpty; + var selfCloseStr = shouldSelfClose ? "/" : ""; + var attributesString = formatAttributes(obj._attrs, attributesFilter); + var tag = "<".concat(_name).concat(attributesString).concat(selfCloseStr, ">"); + var preTagCloseStr = indent && !isNewValSimple ? "\n".concat(indentStr) : ""; + var postTag = !shouldSelfClose ? "".concat(newVal).concat(preTagCloseStr, "") : ""; + outputStr += "".concat(preTag).concat(tag).concat(postTag); + break; + } + case "object": { + var keys = Object.keys(obj); + var outputArr = keys.map(function(key, index) { + var newConfig = _objectSpread(_objectSpread({}, config), {}, { + _isFirstItem: index === 0, + _isLastItem: index + 1 === keys.length, + _isOutputStart: isOutputStart + }); + var outputObj = { + _name: key + }; + if (getType(obj[key]) === "object") { + PRIVATE_VARS.forEach(function(privateVar) { + var val = obj[key][privateVar]; + if (typeof val !== "undefined") { + outputObj[privateVar] = val; + delete obj[key][privateVar]; + } + }); + var hasContent = typeof obj[key]._content !== "undefined"; + if (hasContent) { + if (Object.keys(obj[key]).length > 1) { + var newContentObj = Object.assign({}, obj[key]); + delete newContentObj._content; + outputObj._content = [].concat(_toConsumableArray(objToArray(newContentObj)), [obj[key]._content]); + } + } + } + if (typeof outputObj._content === "undefined") outputObj._content = obj[key]; + var xml = toXML2(outputObj, newConfig, key); + return xml; + }, config); + outputStr = outputArr.join(""); + break; + } + case "function": { + var fnResult = obj(config); + outputStr = toXML2(fnResult, config); + break; + } + case "array": { + var _outputArr = obj.map(function(singleVal, index) { + var newConfig = _objectSpread(_objectSpread({}, config), {}, { + _isFirstItem: index === 0, + _isLastItem: index + 1 === obj.length, + _isOutputStart: isOutputStart + }); + return toXML2(singleVal, newConfig); + }); + outputStr = _outputArr.join(""); + break; + } + // number, string, boolean, date, null, etc + default: { + outputStr = filterStr(obj, filter); + break; + } + } + return "".concat(headerStr).concat(outputStr); + }; + _exports.toXML = toXML; + var _default = { + toXML + }; + _exports.default = _default; + }); + } +}); + +// node_modules/chord-symbol/lib/chord-symbol.js +var require_chord_symbol = __commonJS({ + "node_modules/chord-symbol/lib/chord-symbol.js"(exports, module) { + (function webpackUniversalModuleDefinition(root, factory) { + if (typeof exports === "object" && typeof module === "object") + module.exports = factory(); + else if (typeof define === "function" && define.amd) + define([], factory); + else if (typeof exports === "object") + exports["chord-symbol"] = factory(); + else + root["chord-symbol"] = factory(); + })(typeof self !== "undefined" ? self : exports, function() { + return ( + /******/ + (() => { + var __webpack_modules__ = { + /***/ + 8552: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getNative = __webpack_require__2(852), root = __webpack_require__2(5639); + var DataView = getNative(root, "DataView"); + module2.exports = DataView; + } + ), + /***/ + 1989: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var hashClear = __webpack_require__2(1789), hashDelete = __webpack_require__2(401), hashGet = __webpack_require__2(7667), hashHas = __webpack_require__2(1327), hashSet = __webpack_require__2(1866); + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + module2.exports = Hash; + } + ), + /***/ + 8407: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var listCacheClear = __webpack_require__2(7040), listCacheDelete = __webpack_require__2(4125), listCacheGet = __webpack_require__2(2117), listCacheHas = __webpack_require__2(7518), listCacheSet = __webpack_require__2(4705); + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + module2.exports = ListCache; + } + ), + /***/ + 7071: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getNative = __webpack_require__2(852), root = __webpack_require__2(5639); + var Map2 = getNative(root, "Map"); + module2.exports = Map2; + } + ), + /***/ + 3369: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var mapCacheClear = __webpack_require__2(4785), mapCacheDelete = __webpack_require__2(1285), mapCacheGet = __webpack_require__2(6e3), mapCacheHas = __webpack_require__2(9916), mapCacheSet = __webpack_require__2(5265); + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + module2.exports = MapCache; + } + ), + /***/ + 3818: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getNative = __webpack_require__2(852), root = __webpack_require__2(5639); + var Promise3 = getNative(root, "Promise"); + module2.exports = Promise3; + } + ), + /***/ + 8525: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getNative = __webpack_require__2(852), root = __webpack_require__2(5639); + var Set = getNative(root, "Set"); + module2.exports = Set; + } + ), + /***/ + 8668: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var MapCache = __webpack_require__2(3369), setCacheAdd = __webpack_require__2(619), setCacheHas = __webpack_require__2(2385); + function SetCache(values) { + var index = -1, length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + module2.exports = SetCache; + } + ), + /***/ + 6384: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var ListCache = __webpack_require__2(8407), stackClear = __webpack_require__2(7465), stackDelete = __webpack_require__2(3779), stackGet = __webpack_require__2(7599), stackHas = __webpack_require__2(4758), stackSet = __webpack_require__2(4309); + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + module2.exports = Stack; + } + ), + /***/ + 2705: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var root = __webpack_require__2(5639); + var Symbol2 = root.Symbol; + module2.exports = Symbol2; + } + ), + /***/ + 1149: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var root = __webpack_require__2(5639); + var Uint8Array2 = root.Uint8Array; + module2.exports = Uint8Array2; + } + ), + /***/ + 577: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getNative = __webpack_require__2(852), root = __webpack_require__2(5639); + var WeakMap = getNative(root, "WeakMap"); + module2.exports = WeakMap; + } + ), + /***/ + 6874: ( + /***/ + (module2) => { + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + module2.exports = apply; + } + ), + /***/ + 7412: ( + /***/ + (module2) => { + function arrayEach(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + module2.exports = arrayEach; + } + ), + /***/ + 4963: ( + /***/ + (module2) => { + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + module2.exports = arrayFilter; + } + ), + /***/ + 7443: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIndexOf = __webpack_require__2(2118); + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + module2.exports = arrayIncludes; + } + ), + /***/ + 1196: ( + /***/ + (module2) => { + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + module2.exports = arrayIncludesWith; + } + ), + /***/ + 4636: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseTimes = __webpack_require__2(2545), isArguments = __webpack_require__2(5694), isArray = __webpack_require__2(1469), isBuffer = __webpack_require__2(4144), isIndex = __webpack_require__2(5776), isTypedArray = __webpack_require__2(6719); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + module2.exports = arrayLikeKeys; + } + ), + /***/ + 9932: ( + /***/ + (module2) => { + function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + module2.exports = arrayMap; + } + ), + /***/ + 2488: ( + /***/ + (module2) => { + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + module2.exports = arrayPush; + } + ), + /***/ + 2908: ( + /***/ + (module2) => { + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + module2.exports = arraySome; + } + ), + /***/ + 4865: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseAssignValue = __webpack_require__2(9465), eq = __webpack_require__2(7813); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + module2.exports = assignValue; + } + ), + /***/ + 8470: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var eq = __webpack_require__2(7813); + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + module2.exports = assocIndexOf; + } + ), + /***/ + 4037: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var copyObject = __webpack_require__2(8363), keys = __webpack_require__2(3674); + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + module2.exports = baseAssign; + } + ), + /***/ + 3886: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var copyObject = __webpack_require__2(8363), keysIn = __webpack_require__2(1704); + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + module2.exports = baseAssignIn; + } + ), + /***/ + 9465: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var defineProperty = __webpack_require__2(8777); + function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty) { + defineProperty(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } + } + module2.exports = baseAssignValue; + } + ), + /***/ + 5990: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Stack = __webpack_require__2(6384), arrayEach = __webpack_require__2(7412), assignValue = __webpack_require__2(4865), baseAssign = __webpack_require__2(4037), baseAssignIn = __webpack_require__2(3886), cloneBuffer = __webpack_require__2(4626), copyArray = __webpack_require__2(278), copySymbols = __webpack_require__2(8805), copySymbolsIn = __webpack_require__2(1911), getAllKeys = __webpack_require__2(8234), getAllKeysIn = __webpack_require__2(6904), getTag = __webpack_require__2(4160), initCloneArray = __webpack_require__2(3824), initCloneByTag = __webpack_require__2(9148), initCloneObject = __webpack_require__2(8517), isArray = __webpack_require__2(1469), isBuffer = __webpack_require__2(4144), isMap = __webpack_require__2(6688), isObject = __webpack_require__2(3218), isSet = __webpack_require__2(2928), keys = __webpack_require__2(3674), keysIn = __webpack_require__2(1704); + var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; + var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== void 0) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || isFunc && !object) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key2) { + result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? void 0 : keysFunc(value); + arrayEach(props || value, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value[key2]; + } + assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + return result; + } + module2.exports = baseClone; + } + ), + /***/ + 3118: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isObject = __webpack_require__2(3218); + var objectCreate = Object.create; + var baseCreate = /* @__PURE__ */ function() { + function object() { + } + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = void 0; + return result; + }; + }(); + module2.exports = baseCreate; + } + ), + /***/ + 731: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var SetCache = __webpack_require__2(8668), arrayIncludes = __webpack_require__2(7443), arrayIncludesWith = __webpack_require__2(1196), arrayMap = __webpack_require__2(9932), baseUnary = __webpack_require__2(1717), cacheHas = __webpack_require__2(4757); + var LARGE_ARRAY_SIZE = 200; + function baseDifference(array, values, iteratee, comparator) { + var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee == null ? value : iteratee(value); + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + module2.exports = baseDifference; + } + ), + /***/ + 1848: ( + /***/ + (module2) => { + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + module2.exports = baseFindIndex; + } + ), + /***/ + 1078: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var arrayPush = __webpack_require__2(2488), isFlattenable = __webpack_require__2(7285); + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + module2.exports = baseFlatten; + } + ), + /***/ + 8483: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var createBaseFor = __webpack_require__2(5063); + var baseFor = createBaseFor(); + module2.exports = baseFor; + } + ), + /***/ + 7816: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseFor = __webpack_require__2(8483), keys = __webpack_require__2(3674); + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + module2.exports = baseForOwn; + } + ), + /***/ + 7786: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var castPath = __webpack_require__2(1811), toKey = __webpack_require__2(327); + function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; + } + module2.exports = baseGet; + } + ), + /***/ + 8866: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var arrayPush = __webpack_require__2(2488), isArray = __webpack_require__2(1469); + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + module2.exports = baseGetAllKeys; + } + ), + /***/ + 4239: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Symbol2 = __webpack_require__2(2705), getRawTag = __webpack_require__2(9607), objectToString = __webpack_require__2(2333); + var nullTag = "[object Null]", undefinedTag = "[object Undefined]"; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + module2.exports = baseGetTag; + } + ), + /***/ + 13: ( + /***/ + (module2) => { + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + module2.exports = baseHasIn; + } + ), + /***/ + 2118: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseFindIndex = __webpack_require__2(1848), baseIsNaN = __webpack_require__2(2722), strictIndexOf = __webpack_require__2(2351); + function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); + } + module2.exports = baseIndexOf; + } + ), + /***/ + 8975: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseForOwn = __webpack_require__2(7816); + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object2) { + setter(accumulator, iteratee(value), key, object2); + }); + return accumulator; + } + module2.exports = baseInverter; + } + ), + /***/ + 9454: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGetTag = __webpack_require__2(4239), isObjectLike = __webpack_require__2(7005); + var argsTag = "[object Arguments]"; + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + module2.exports = baseIsArguments; + } + ), + /***/ + 939: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsEqualDeep = __webpack_require__2(2492), isObjectLike = __webpack_require__2(7005); + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + module2.exports = baseIsEqual; + } + ), + /***/ + 2492: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Stack = __webpack_require__2(6384), equalArrays = __webpack_require__2(7114), equalByTag = __webpack_require__2(8351), equalObjects = __webpack_require__2(6096), getTag = __webpack_require__2(4160), isArray = __webpack_require__2(1469), isBuffer = __webpack_require__2(4144), isTypedArray = __webpack_require__2(6719); + var COMPARE_PARTIAL_FLAG = 1; + var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + module2.exports = baseIsEqualDeep; + } + ), + /***/ + 5588: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getTag = __webpack_require__2(4160), isObjectLike = __webpack_require__2(7005); + var mapTag = "[object Map]"; + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + module2.exports = baseIsMap; + } + ), + /***/ + 2958: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Stack = __webpack_require__2(6384), baseIsEqual = __webpack_require__2(939); + var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) { + return false; + } + } + } + return true; + } + module2.exports = baseIsMatch; + } + ), + /***/ + 2722: ( + /***/ + (module2) => { + function baseIsNaN(value) { + return value !== value; + } + module2.exports = baseIsNaN; + } + ), + /***/ + 8458: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isFunction = __webpack_require__2(3560), isMasked = __webpack_require__2(5346), isObject = __webpack_require__2(3218), toSource = __webpack_require__2(346); + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var funcProto = Function.prototype, objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + module2.exports = baseIsNative; + } + ), + /***/ + 9221: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getTag = __webpack_require__2(4160), isObjectLike = __webpack_require__2(7005); + var setTag = "[object Set]"; + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + module2.exports = baseIsSet; + } + ), + /***/ + 8749: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGetTag = __webpack_require__2(4239), isLength = __webpack_require__2(1780), isObjectLike = __webpack_require__2(7005); + var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + module2.exports = baseIsTypedArray; + } + ), + /***/ + 7206: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseMatches = __webpack_require__2(1573), baseMatchesProperty = __webpack_require__2(6432), identity = __webpack_require__2(6557), isArray = __webpack_require__2(1469), property = __webpack_require__2(9601); + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + module2.exports = baseIteratee; + } + ), + /***/ + 280: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isPrototype = __webpack_require__2(5726), nativeKeys = __webpack_require__2(6916); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + module2.exports = baseKeys; + } + ), + /***/ + 313: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isObject = __webpack_require__2(3218), isPrototype = __webpack_require__2(5726), nativeKeysIn = __webpack_require__2(3498); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + module2.exports = baseKeysIn; + } + ), + /***/ + 1573: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsMatch = __webpack_require__2(2958), getMatchData = __webpack_require__2(1499), matchesStrictComparable = __webpack_require__2(2634); + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + module2.exports = baseMatches; + } + ), + /***/ + 6432: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsEqual = __webpack_require__2(939), get = __webpack_require__2(7361), hasIn = __webpack_require__2(9095), isKey = __webpack_require__2(5403), isStrictComparable = __webpack_require__2(9162), matchesStrictComparable = __webpack_require__2(2634), toKey = __webpack_require__2(327); + var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + module2.exports = baseMatchesProperty; + } + ), + /***/ + 371: ( + /***/ + (module2) => { + function baseProperty(key) { + return function(object) { + return object == null ? void 0 : object[key]; + }; + } + module2.exports = baseProperty; + } + ), + /***/ + 9152: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGet = __webpack_require__2(7786); + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + module2.exports = basePropertyDeep; + } + ), + /***/ + 5976: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var identity = __webpack_require__2(6557), overRest = __webpack_require__2(5357), setToString = __webpack_require__2(61); + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ""); + } + module2.exports = baseRest; + } + ), + /***/ + 6560: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var constant = __webpack_require__2(5703), defineProperty = __webpack_require__2(8777), identity = __webpack_require__2(6557); + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, "toString", { + "configurable": true, + "enumerable": false, + "value": constant(string), + "writable": true + }); + }; + module2.exports = baseSetToString; + } + ), + /***/ + 2545: ( + /***/ + (module2) => { + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + module2.exports = baseTimes; + } + ), + /***/ + 531: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Symbol2 = __webpack_require__2(2705), arrayMap = __webpack_require__2(9932), isArray = __webpack_require__2(1469), isSymbol = __webpack_require__2(3448); + var INFINITY = 1 / 0; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = baseToString; + } + ), + /***/ + 7561: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var trimmedEndIndex = __webpack_require__2(7990); + var reTrimStart = /^\s+/; + function baseTrim(string) { + return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; + } + module2.exports = baseTrim; + } + ), + /***/ + 1717: ( + /***/ + (module2) => { + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + module2.exports = baseUnary; + } + ), + /***/ + 5652: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var SetCache = __webpack_require__2(8668), arrayIncludes = __webpack_require__2(7443), arrayIncludesWith = __webpack_require__2(1196), cacheHas = __webpack_require__2(4757), createSet = __webpack_require__2(3593), setToArray = __webpack_require__2(1814); + var LARGE_ARRAY_SIZE = 200; + function baseUniq(array, iteratee, comparator) { + var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + module2.exports = baseUniq; + } + ), + /***/ + 4757: ( + /***/ + (module2) => { + function cacheHas(cache, key) { + return cache.has(key); + } + module2.exports = cacheHas; + } + ), + /***/ + 1811: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isArray = __webpack_require__2(1469), isKey = __webpack_require__2(5403), stringToPath = __webpack_require__2(5514), toString = __webpack_require__2(9833); + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + module2.exports = castPath; + } + ), + /***/ + 4318: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Uint8Array2 = __webpack_require__2(1149); + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array2(result).set(new Uint8Array2(arrayBuffer)); + return result; + } + module2.exports = cloneArrayBuffer; + } + ), + /***/ + 4626: ( + /***/ + (module2, exports2, __webpack_require__2) => { + module2 = __webpack_require__2.nmd(module2); + var root = __webpack_require__2(5639); + var freeExports = exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && true && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); + return result; + } + module2.exports = cloneBuffer; + } + ), + /***/ + 7157: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var cloneArrayBuffer = __webpack_require__2(4318); + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + module2.exports = cloneDataView; + } + ), + /***/ + 3147: ( + /***/ + (module2) => { + var reFlags = /\w*$/; + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + module2.exports = cloneRegExp; + } + ), + /***/ + 419: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Symbol2 = __webpack_require__2(2705); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + module2.exports = cloneSymbol; + } + ), + /***/ + 7133: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var cloneArrayBuffer = __webpack_require__2(4318); + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + module2.exports = cloneTypedArray; + } + ), + /***/ + 278: ( + /***/ + (module2) => { + function copyArray(source, array) { + var index = -1, length = source.length; + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + module2.exports = copyArray; + } + ), + /***/ + 8363: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var assignValue = __webpack_require__2(4865), baseAssignValue = __webpack_require__2(9465); + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + if (newValue === void 0) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + module2.exports = copyObject; + } + ), + /***/ + 8805: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var copyObject = __webpack_require__2(8363), getSymbols = __webpack_require__2(9551); + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + module2.exports = copySymbols; + } + ), + /***/ + 1911: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var copyObject = __webpack_require__2(8363), getSymbolsIn = __webpack_require__2(1442); + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + module2.exports = copySymbolsIn; + } + ), + /***/ + 4429: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var root = __webpack_require__2(5639); + var coreJsData = root["__core-js_shared__"]; + module2.exports = coreJsData; + } + ), + /***/ + 5063: ( + /***/ + (module2) => { + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + module2.exports = createBaseFor; + } + ), + /***/ + 7740: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIteratee = __webpack_require__2(7206), isArrayLike = __webpack_require__2(8612), keys = __webpack_require__2(3674); + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : void 0; + }; + } + module2.exports = createFind; + } + ), + /***/ + 7779: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseInverter = __webpack_require__2(8975); + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + module2.exports = createInverter; + } + ), + /***/ + 3593: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Set = __webpack_require__2(8525), noop = __webpack_require__2(308), setToArray = __webpack_require__2(1814); + var INFINITY = 1 / 0; + var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values) { + return new Set(values); + }; + module2.exports = createSet; + } + ), + /***/ + 8777: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getNative = __webpack_require__2(852); + var defineProperty = function() { + try { + var func = getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + module2.exports = defineProperty; + } + ), + /***/ + 7114: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var SetCache = __webpack_require__2(8668), arraySome = __webpack_require__2(2908), cacheHas = __webpack_require__2(4757); + var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result; + } + module2.exports = equalArrays; + } + ), + /***/ + 8351: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Symbol2 = __webpack_require__2(2705), Uint8Array2 = __webpack_require__2(1149), eq = __webpack_require__2(7813), equalArrays = __webpack_require__2(7114), mapToArray = __webpack_require__2(8776), setToArray = __webpack_require__2(1814); + var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]"; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert2 = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert2 || (convert2 = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack.set(object, other); + var result = equalArrays(convert2(object), convert2(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + module2.exports = equalByTag; + } + ), + /***/ + 6096: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getAllKeys = __webpack_require__2(8234); + var COMPARE_PARTIAL_FLAG = 1; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result; + } + module2.exports = equalObjects; + } + ), + /***/ + 1957: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var freeGlobal = typeof __webpack_require__2.g == "object" && __webpack_require__2.g && __webpack_require__2.g.Object === Object && __webpack_require__2.g; + module2.exports = freeGlobal; + } + ), + /***/ + 8234: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGetAllKeys = __webpack_require__2(8866), getSymbols = __webpack_require__2(9551), keys = __webpack_require__2(3674); + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + module2.exports = getAllKeys; + } + ), + /***/ + 6904: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGetAllKeys = __webpack_require__2(8866), getSymbolsIn = __webpack_require__2(1442), keysIn = __webpack_require__2(1704); + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + module2.exports = getAllKeysIn; + } + ), + /***/ + 5050: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isKeyable = __webpack_require__2(7019); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + module2.exports = getMapData; + } + ), + /***/ + 1499: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isStrictComparable = __webpack_require__2(9162), keys = __webpack_require__2(3674); + function getMatchData(object) { + var result = keys(object), length = result.length; + while (length--) { + var key = result[length], value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + module2.exports = getMatchData; + } + ), + /***/ + 852: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsNative = __webpack_require__2(8458), getValue = __webpack_require__2(7801); + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + module2.exports = getNative; + } + ), + /***/ + 5924: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var overArg = __webpack_require__2(5569); + var getPrototype = overArg(Object.getPrototypeOf, Object); + module2.exports = getPrototype; + } + ), + /***/ + 9607: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Symbol2 = __webpack_require__2(2705); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var nativeObjectToString = objectProto.toString; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + module2.exports = getRawTag; + } + ), + /***/ + 9551: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var arrayFilter = __webpack_require__2(4963), stubArray = __webpack_require__2(479); + var objectProto = Object.prototype; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + module2.exports = getSymbols; + } + ), + /***/ + 1442: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var arrayPush = __webpack_require__2(2488), getPrototype = __webpack_require__2(5924), getSymbols = __webpack_require__2(9551), stubArray = __webpack_require__2(479); + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + module2.exports = getSymbolsIn; + } + ), + /***/ + 4160: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var DataView = __webpack_require__2(8552), Map2 = __webpack_require__2(7071), Promise3 = __webpack_require__2(3818), Set = __webpack_require__2(8525), WeakMap = __webpack_require__2(577), baseGetTag = __webpack_require__2(4239), toSource = __webpack_require__2(346); + var mapTag = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]"; + var dataViewTag = "[object DataView]"; + var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise3), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); + var getTag = baseGetTag; + if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise3 && getTag(Promise3.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) { + getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + module2.exports = getTag; + } + ), + /***/ + 7801: ( + /***/ + (module2) => { + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + module2.exports = getValue; + } + ), + /***/ + 222: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var castPath = __webpack_require__2(1811), isArguments = __webpack_require__2(5694), isArray = __webpack_require__2(1469), isIndex = __webpack_require__2(5776), isLength = __webpack_require__2(1780), toKey = __webpack_require__2(327); + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + module2.exports = hasPath; + } + ), + /***/ + 1789: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var nativeCreate = __webpack_require__2(4536); + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + module2.exports = hashClear; + } + ), + /***/ + 401: ( + /***/ + (module2) => { + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + module2.exports = hashDelete; + } + ), + /***/ + 7667: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var nativeCreate = __webpack_require__2(4536); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + module2.exports = hashGet; + } + ), + /***/ + 1327: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var nativeCreate = __webpack_require__2(4536); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + module2.exports = hashHas; + } + ), + /***/ + 1866: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var nativeCreate = __webpack_require__2(4536); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + module2.exports = hashSet; + } + ), + /***/ + 3824: ( + /***/ + (module2) => { + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function initCloneArray(array) { + var length = array.length, result = new array.constructor(length); + if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { + result.index = array.index; + result.input = array.input; + } + return result; + } + module2.exports = initCloneArray; + } + ), + /***/ + 9148: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var cloneArrayBuffer = __webpack_require__2(4318), cloneDataView = __webpack_require__2(7157), cloneRegExp = __webpack_require__2(3147), cloneSymbol = __webpack_require__2(419), cloneTypedArray = __webpack_require__2(7133); + var boolTag = "[object Boolean]", dateTag = "[object Date]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + case mapTag: + return new Ctor(); + case numberTag: + case stringTag: + return new Ctor(object); + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor(); + case symbolTag: + return cloneSymbol(object); + } + } + module2.exports = initCloneByTag; + } + ), + /***/ + 8517: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseCreate = __webpack_require__2(3118), getPrototype = __webpack_require__2(5924), isPrototype = __webpack_require__2(5726); + function initCloneObject(object) { + return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; + } + module2.exports = initCloneObject; + } + ), + /***/ + 7285: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Symbol2 = __webpack_require__2(2705), isArguments = __webpack_require__2(5694), isArray = __webpack_require__2(1469); + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + module2.exports = isFlattenable; + } + ), + /***/ + 5776: ( + /***/ + (module2) => { + var MAX_SAFE_INTEGER = 9007199254740991; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + module2.exports = isIndex; + } + ), + /***/ + 5403: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isArray = __webpack_require__2(1469), isSymbol = __webpack_require__2(3448); + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + module2.exports = isKey; + } + ), + /***/ + 7019: ( + /***/ + (module2) => { + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + module2.exports = isKeyable; + } + ), + /***/ + 5346: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var coreJsData = __webpack_require__2(4429); + var maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + module2.exports = isMasked; + } + ), + /***/ + 5726: ( + /***/ + (module2) => { + var objectProto = Object.prototype; + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + module2.exports = isPrototype; + } + ), + /***/ + 9162: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isObject = __webpack_require__2(3218); + function isStrictComparable(value) { + return value === value && !isObject(value); + } + module2.exports = isStrictComparable; + } + ), + /***/ + 7040: ( + /***/ + (module2) => { + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + module2.exports = listCacheClear; + } + ), + /***/ + 4125: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var assocIndexOf = __webpack_require__2(8470); + var arrayProto = Array.prototype; + var splice = arrayProto.splice; + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + module2.exports = listCacheDelete; + } + ), + /***/ + 2117: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var assocIndexOf = __webpack_require__2(8470); + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + module2.exports = listCacheGet; + } + ), + /***/ + 7518: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var assocIndexOf = __webpack_require__2(8470); + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + module2.exports = listCacheHas; + } + ), + /***/ + 4705: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var assocIndexOf = __webpack_require__2(8470); + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + module2.exports = listCacheSet; + } + ), + /***/ + 4785: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var Hash = __webpack_require__2(1989), ListCache = __webpack_require__2(8407), Map2 = __webpack_require__2(7071); + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + module2.exports = mapCacheClear; + } + ), + /***/ + 1285: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getMapData = __webpack_require__2(5050); + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + module2.exports = mapCacheDelete; + } + ), + /***/ + 6e3: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getMapData = __webpack_require__2(5050); + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + module2.exports = mapCacheGet; + } + ), + /***/ + 9916: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getMapData = __webpack_require__2(5050); + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + module2.exports = mapCacheHas; + } + ), + /***/ + 5265: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getMapData = __webpack_require__2(5050); + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + module2.exports = mapCacheSet; + } + ), + /***/ + 8776: ( + /***/ + (module2) => { + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + module2.exports = mapToArray; + } + ), + /***/ + 2634: ( + /***/ + (module2) => { + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); + }; + } + module2.exports = matchesStrictComparable; + } + ), + /***/ + 4523: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var memoize = __webpack_require__2(8306); + var MAX_MEMOIZE_SIZE = 500; + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; + } + module2.exports = memoizeCapped; + } + ), + /***/ + 4536: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var getNative = __webpack_require__2(852); + var nativeCreate = getNative(Object, "create"); + module2.exports = nativeCreate; + } + ), + /***/ + 6916: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var overArg = __webpack_require__2(5569); + var nativeKeys = overArg(Object.keys, Object); + module2.exports = nativeKeys; + } + ), + /***/ + 3498: ( + /***/ + (module2) => { + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + module2.exports = nativeKeysIn; + } + ), + /***/ + 1167: ( + /***/ + (module2, exports2, __webpack_require__2) => { + module2 = __webpack_require__2.nmd(module2); + var freeGlobal = __webpack_require__2(1957); + var freeExports = exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && true && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + }(); + module2.exports = nodeUtil; + } + ), + /***/ + 2333: ( + /***/ + (module2) => { + var objectProto = Object.prototype; + var nativeObjectToString = objectProto.toString; + function objectToString(value) { + return nativeObjectToString.call(value); + } + module2.exports = objectToString; + } + ), + /***/ + 5569: ( + /***/ + (module2) => { + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + module2.exports = overArg; + } + ), + /***/ + 5357: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var apply = __webpack_require__2(6874); + var nativeMax = Math.max; + function overRest(func, start, transform) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + module2.exports = overRest; + } + ), + /***/ + 5639: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var freeGlobal = __webpack_require__2(1957); + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + module2.exports = root; + } + ), + /***/ + 619: ( + /***/ + (module2) => { + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + module2.exports = setCacheAdd; + } + ), + /***/ + 2385: ( + /***/ + (module2) => { + function setCacheHas(value) { + return this.__data__.has(value); + } + module2.exports = setCacheHas; + } + ), + /***/ + 1814: ( + /***/ + (module2) => { + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + module2.exports = setToArray; + } + ), + /***/ + 61: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseSetToString = __webpack_require__2(6560), shortOut = __webpack_require__2(1275); + var setToString = shortOut(baseSetToString); + module2.exports = setToString; + } + ), + /***/ + 1275: ( + /***/ + (module2) => { + var HOT_COUNT = 800, HOT_SPAN = 16; + var nativeNow = Date.now; + function shortOut(func) { + var count = 0, lastCalled = 0; + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(void 0, arguments); + }; + } + module2.exports = shortOut; + } + ), + /***/ + 7465: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var ListCache = __webpack_require__2(8407); + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + module2.exports = stackClear; + } + ), + /***/ + 3779: ( + /***/ + (module2) => { + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; + } + module2.exports = stackDelete; + } + ), + /***/ + 7599: ( + /***/ + (module2) => { + function stackGet(key) { + return this.__data__.get(key); + } + module2.exports = stackGet; + } + ), + /***/ + 4758: ( + /***/ + (module2) => { + function stackHas(key) { + return this.__data__.has(key); + } + module2.exports = stackHas; + } + ), + /***/ + 4309: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var ListCache = __webpack_require__2(8407), Map2 = __webpack_require__2(7071), MapCache = __webpack_require__2(3369); + var LARGE_ARRAY_SIZE = 200; + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + module2.exports = stackSet; + } + ), + /***/ + 2351: ( + /***/ + (module2) => { + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + module2.exports = strictIndexOf; + } + ), + /***/ + 5514: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var memoizeCapped = __webpack_require__2(4523); + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result; + }); + module2.exports = stringToPath; + } + ), + /***/ + 327: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isSymbol = __webpack_require__2(3448); + var INFINITY = 1 / 0; + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = toKey; + } + ), + /***/ + 346: ( + /***/ + (module2) => { + var funcProto = Function.prototype; + var funcToString = funcProto.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + module2.exports = toSource; + } + ), + /***/ + 7990: ( + /***/ + (module2) => { + var reWhitespace = /\s/; + function trimmedEndIndex(string) { + var index = string.length; + while (index-- && reWhitespace.test(string.charAt(index))) { + } + return index; + } + module2.exports = trimmedEndIndex; + } + ), + /***/ + 6678: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseClone = __webpack_require__2(5990); + var CLONE_SYMBOLS_FLAG = 4; + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + module2.exports = clone; + } + ), + /***/ + 361: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseClone = __webpack_require__2(5990); + var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + module2.exports = cloneDeep; + } + ), + /***/ + 5703: ( + /***/ + (module2) => { + function constant(value) { + return function() { + return value; + }; + } + module2.exports = constant; + } + ), + /***/ + 1966: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseDifference = __webpack_require__2(731), baseFlatten = __webpack_require__2(1078), baseRest = __webpack_require__2(5976), isArrayLikeObject = __webpack_require__2(9246); + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; + }); + module2.exports = difference; + } + ), + /***/ + 7813: ( + /***/ + (module2) => { + function eq(value, other) { + return value === other || value !== value && other !== other; + } + module2.exports = eq; + } + ), + /***/ + 3311: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var createFind = __webpack_require__2(7740), findIndex = __webpack_require__2(998); + var find = createFind(findIndex); + module2.exports = find; + } + ), + /***/ + 998: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseFindIndex = __webpack_require__2(1848), baseIteratee = __webpack_require__2(7206), toInteger = __webpack_require__2(554); + var nativeMax = Math.max; + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); + } + module2.exports = findIndex; + } + ), + /***/ + 7361: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGet = __webpack_require__2(7786); + function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; + } + module2.exports = get; + } + ), + /***/ + 9095: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseHasIn = __webpack_require__2(13), hasPath = __webpack_require__2(222); + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + module2.exports = hasIn; + } + ), + /***/ + 6557: ( + /***/ + (module2) => { + function identity(value) { + return value; + } + module2.exports = identity; + } + ), + /***/ + 3137: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var constant = __webpack_require__2(5703), createInverter = __webpack_require__2(7779), identity = __webpack_require__2(6557); + var objectProto = Object.prototype; + var nativeObjectToString = objectProto.toString; + var invert = createInverter(function(result, value, key) { + if (value != null && typeof value.toString != "function") { + value = nativeObjectToString.call(value); + } + result[value] = key; + }, constant(identity)); + module2.exports = invert; + } + ), + /***/ + 5694: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsArguments = __webpack_require__2(9454), isObjectLike = __webpack_require__2(7005); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var isArguments = baseIsArguments(/* @__PURE__ */ function() { + return arguments; + }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + module2.exports = isArguments; + } + ), + /***/ + 1469: ( + /***/ + (module2) => { + var isArray = Array.isArray; + module2.exports = isArray; + } + ), + /***/ + 8612: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isFunction = __webpack_require__2(3560), isLength = __webpack_require__2(1780); + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + module2.exports = isArrayLike; + } + ), + /***/ + 9246: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var isArrayLike = __webpack_require__2(8612), isObjectLike = __webpack_require__2(7005); + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + module2.exports = isArrayLikeObject; + } + ), + /***/ + 4144: ( + /***/ + (module2, exports2, __webpack_require__2) => { + module2 = __webpack_require__2.nmd(module2); + var root = __webpack_require__2(5639), stubFalse = __webpack_require__2(5062); + var freeExports = exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && true && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0; + var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; + var isBuffer = nativeIsBuffer || stubFalse; + module2.exports = isBuffer; + } + ), + /***/ + 8446: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsEqual = __webpack_require__2(939); + function isEqual(value, other) { + return baseIsEqual(value, other); + } + module2.exports = isEqual; + } + ), + /***/ + 3560: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGetTag = __webpack_require__2(4239), isObject = __webpack_require__2(3218); + var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; + function isFunction(value) { + if (!isObject(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + module2.exports = isFunction; + } + ), + /***/ + 1780: ( + /***/ + (module2) => { + var MAX_SAFE_INTEGER = 9007199254740991; + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + module2.exports = isLength; + } + ), + /***/ + 6688: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsMap = __webpack_require__2(5588), baseUnary = __webpack_require__2(1717), nodeUtil = __webpack_require__2(1167); + var nodeIsMap = nodeUtil && nodeUtil.isMap; + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + module2.exports = isMap; + } + ), + /***/ + 3218: ( + /***/ + (module2) => { + function isObject(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + module2.exports = isObject; + } + ), + /***/ + 7005: ( + /***/ + (module2) => { + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + module2.exports = isObjectLike; + } + ), + /***/ + 2928: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsSet = __webpack_require__2(9221), baseUnary = __webpack_require__2(1717), nodeUtil = __webpack_require__2(1167); + var nodeIsSet = nodeUtil && nodeUtil.isSet; + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + module2.exports = isSet; + } + ), + /***/ + 3448: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseGetTag = __webpack_require__2(4239), isObjectLike = __webpack_require__2(7005); + var symbolTag = "[object Symbol]"; + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + module2.exports = isSymbol; + } + ), + /***/ + 6719: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseIsTypedArray = __webpack_require__2(8749), baseUnary = __webpack_require__2(1717), nodeUtil = __webpack_require__2(1167); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + module2.exports = isTypedArray; + } + ), + /***/ + 3674: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var arrayLikeKeys = __webpack_require__2(4636), baseKeys = __webpack_require__2(280), isArrayLike = __webpack_require__2(8612); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + module2.exports = keys; + } + ), + /***/ + 1704: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var arrayLikeKeys = __webpack_require__2(4636), baseKeysIn = __webpack_require__2(313), isArrayLike = __webpack_require__2(8612); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + module2.exports = keysIn; + } + ), + /***/ + 8306: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var MapCache = __webpack_require__2(3369); + var FUNC_ERROR_TEXT = "Expected a function"; + function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + module2.exports = memoize; + } + ), + /***/ + 308: ( + /***/ + (module2) => { + function noop() { + } + module2.exports = noop; + } + ), + /***/ + 9601: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseProperty = __webpack_require__2(371), basePropertyDeep = __webpack_require__2(9152), isKey = __webpack_require__2(5403), toKey = __webpack_require__2(327); + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + module2.exports = property; + } + ), + /***/ + 479: ( + /***/ + (module2) => { + function stubArray() { + return []; + } + module2.exports = stubArray; + } + ), + /***/ + 5062: ( + /***/ + (module2) => { + function stubFalse() { + return false; + } + module2.exports = stubFalse; + } + ), + /***/ + 8601: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var toNumber = __webpack_require__2(4841); + var INFINITY = 1 / 0, MAX_INTEGER = 17976931348623157e292; + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + module2.exports = toFinite; + } + ), + /***/ + 554: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var toFinite = __webpack_require__2(8601); + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + module2.exports = toInteger; + } + ), + /***/ + 4841: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseTrim = __webpack_require__2(7561), isObject = __webpack_require__2(3218), isSymbol = __webpack_require__2(3448); + var NAN = 0 / 0; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + module2.exports = toNumber; + } + ), + /***/ + 9833: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseToString = __webpack_require__2(531); + function toString(value) { + return value == null ? "" : baseToString(value); + } + module2.exports = toString; + } + ), + /***/ + 4908: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseUniq = __webpack_require__2(5652); + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + module2.exports = uniq; + } + ), + /***/ + 2569: ( + /***/ + (module2, __unused_webpack_exports, __webpack_require__2) => { + var baseDifference = __webpack_require__2(731), baseRest = __webpack_require__2(5976), isArrayLikeObject = __webpack_require__2(9246); + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) ? baseDifference(array, values) : []; + }); + module2.exports = without; + } + ) + /******/ + }; + var __webpack_module_cache__ = {}; + function __webpack_require__(moduleId) { + var cachedModule = __webpack_module_cache__[moduleId]; + if (cachedModule !== void 0) { + return cachedModule.exports; + } + var module2 = __webpack_module_cache__[moduleId] = { + /******/ + id: moduleId, + /******/ + loaded: false, + /******/ + exports: {} + /******/ + }; + __webpack_modules__[moduleId](module2, module2.exports, __webpack_require__); + module2.loaded = true; + return module2.exports; + } + (() => { + __webpack_require__.n = (module2) => { + var getter = module2 && module2.__esModule ? ( + /******/ + () => module2["default"] + ) : ( + /******/ + () => module2 + ); + __webpack_require__.d(getter, { a: getter }); + return getter; + }; + })(); + (() => { + __webpack_require__.d = (exports2, definition) => { + for (var key in definition) { + if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports2, key)) { + Object.defineProperty(exports2, key, { enumerable: true, get: definition[key] }); + } + } + }; + })(); + (() => { + __webpack_require__.g = function() { + if (typeof globalThis === "object") return globalThis; + try { + return this || new Function("return this")(); + } catch (e) { + if (typeof window === "object") return window; + } + }(); + })(); + (() => { + __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); + })(); + (() => { + __webpack_require__.r = (exports2) => { + if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" }); + } + Object.defineProperty(exports2, "__esModule", { value: true }); + }; + })(); + (() => { + __webpack_require__.nmd = (module2) => { + module2.paths = []; + if (!module2.children) module2.children = []; + return module2; + }; + })(); + var __webpack_exports__ = {}; + (() => { + "use strict"; + __webpack_require__.r(__webpack_exports__); + __webpack_require__.d(__webpack_exports__, { + "chordParserFactory": () => ( + /* reexport */ + parser_chordParserFactory + ), + "chordRendererFactory": () => ( + /* reexport */ + renderer_chordRendererFactory + ) + }); + ; + function chain(allFunctions, input) { + return allFunctions.reduce(function(value, fn) { + return value ? fn(value) : null; + }, input); + } + var cloneDeep = __webpack_require__(361); + var cloneDeep_default = /* @__PURE__ */ __webpack_require__.n(cloneDeep); + ; + var checkCustomFilters = function checkCustomFilters2(customFilters) { + if (!Array.isArray(customFilters)) { + throw new TypeError("customFilters should be given as an array"); + } + if (customFilters.some(function(filter) { + return typeof filter !== "function"; + })) { + throw new TypeError("The given filter is not a function"); + } + return true; + }; + const helpers_checkCustomFilters = checkCustomFilters; + ; + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var notes = { + AFlat: "Ab", + A: "A", + ASharp: "A#", + BFlat: "Bb", + B: "B", + C: "C", + CSharp: "C#", + DFlat: "Db", + D: "D", + DSharp: "D#", + EFlat: "Eb", + E: "E", + F: "F", + FSharp: "F#", + GFlat: "Gb", + G: "G", + GSharp: "G#" + }; + var english = { + Ab: notes.AFlat, + A: notes.A, + "A#": notes.ASharp, + Bb: notes.BFlat, + B: notes.B, + "B#": notes.C, + Cb: notes.B, + C: notes.C, + "C#": notes.CSharp, + Db: notes.DFlat, + D: notes.D, + "D#": notes.DSharp, + Eb: notes.EFlat, + E: notes.E, + "E#": notes.F, + Fb: notes.E, + F: notes.F, + "F#": notes.FSharp, + Gb: notes.GFlat, + G: notes.G, + "G#": notes.GSharp + }; + var latin = { + Lab: notes.AFlat, + La: notes.A, + "La#": notes.ASharp, + Sib: notes.BFlat, + Si: notes.B, + "Si#": notes.C, + Dob: notes.B, + Do: notes.C, + "Do#": notes.CSharp, + Reb: notes.DFlat, + R\u00E9b: notes.DFlat, + Re: notes.D, + R\u00E9: notes.D, + "Re#": notes.DSharp, + "R\xE9#": notes.DSharp, + Mib: notes.EFlat, + Mi: notes.E, + "Mi#": notes.F, + Fab: notes.E, + Fa: notes.F, + "Fa#": notes.FSharp, + Solb: notes.GFlat, + Sol: notes.G, + "Sol#": notes.GSharp + }; + var german = { + As: notes.AFlat, + A: notes.A, + Ais: notes.ASharp, + Hes: notes.BFlat, + H: notes.B, + His: notes.C, + Ces: notes.B, + C: notes.C, + Cis: notes.CSharp, + Des: notes.DFlat, + D: notes.D, + Dis: notes.DSharp, + Es: notes.EFlat, + E: notes.E, + Eis: notes.F, + Fes: notes.E, + F: notes.F, + Fis: notes.FSharp, + Ges: notes.GFlat, + G: notes.G, + Gis: notes.GSharp + }; + function getAccidentalsVariation(source) { + var variant; + return Object.keys(source).reduce(function(acc, curr) { + if (curr.match(/.[b|#]$/)) { + variant = curr.replace("#", "\u266F").replace("b", "\u266D"); + acc[variant] = source[curr]; + } + return acc; + }, {}); + } + var englishVariantsToNotes = _objectSpread(_objectSpread({}, english), getAccidentalsVariation(english)); + var latinVariantsToNotes = _objectSpread(_objectSpread({}, latin), getAccidentalsVariation(latin)); + var germanVariantsToNotes = _objectSpread({}, german); + var allVariantsToNotes = _objectSpread(_objectSpread(_objectSpread({}, englishVariantsToNotes), latinVariantsToNotes), germanVariantsToNotes); + var allVariants = Object.keys(allVariantsToNotes).sort(function(a, b) { + return b.length - a.length; + }); + var englishVariants = Object.keys(englishVariantsToNotes).sort(function(a, b) { + return b.length - a.length; + }); + var latinVariants = Object.keys(latinVariantsToNotes).sort(function(a, b) { + return b.length - a.length; + }); + var germanVariants = Object.keys(germanVariantsToNotes).sort(function(a, b) { + return b.length - a.length; + }); + var allVariantsPerGroup = [{ + name: "english", + notes: englishVariants + }, { + name: "german", + notes: germanVariants + }, { + name: "latin", + notes: latinVariants + }]; + ; + function _typeof(obj) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { + return typeof obj2; + } : function(obj2) { + return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }, _typeof(obj); + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { writable: false }); + return Constructor; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); + Object.defineProperty(subClass, "prototype", { writable: false }); + if (superClass) _setPrototypeOf(subClass, superClass); + } + function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), result; + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return _possibleConstructorReturn(this, result); + }; + } + function _possibleConstructorReturn(self2, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); + } + return _assertThisInitialized(self2); + } + function _assertThisInitialized(self2) { + if (self2 === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return self2; + } + function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0; + _wrapNativeSuper = function _wrapNativeSuper2(Class2) { + if (Class2 === null || !_isNativeFunction(Class2)) return Class2; + if (typeof Class2 !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + if (typeof _cache !== "undefined") { + if (_cache.has(Class2)) return _cache.get(Class2); + _cache.set(Class2, Wrapper); + } + function Wrapper() { + return _construct(Class2, arguments, _getPrototypeOf(this).constructor); + } + Wrapper.prototype = Object.create(Class2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); + return _setPrototypeOf(Wrapper, Class2); + }; + return _wrapNativeSuper(Class); + } + function _construct(Parent, args, Class) { + if (_isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct2(Parent2, args2, Class2) { + var a = [null]; + a.push.apply(a, args2); + var Constructor = Function.bind.apply(Parent2, a); + var instance = new Constructor(); + if (Class2) _setPrototypeOf(instance, Class2.prototype); + return instance; + }; + } + return _construct.apply(null, arguments); + } + function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + return true; + } catch (e) { + return false; + } + } + function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; + } + function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) { + o2.__proto__ = p2; + return o2; + }; + return _setPrototypeOf(o, p); + } + function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) { + return o2.__proto__ || Object.getPrototypeOf(o2); + }; + return _getPrototypeOf(o); + } + var InvalidInputError = /* @__PURE__ */ function(_Error) { + _inherits(InvalidInputError2, _Error); + var _super = _createSuper(InvalidInputError2); + function InvalidInputError2() { + var _this; + _classCallCheck(this, InvalidInputError2); + _this = _super.call(this, "The given symbol is not a valid string"); + _this.name = "InvalidInput"; + return _this; + } + return _createClass(InvalidInputError2); + }(/* @__PURE__ */ _wrapNativeSuper(Error)); + var UnexpectedError = /* @__PURE__ */ function(_Error2) { + _inherits(UnexpectedError2, _Error2); + var _super2 = _createSuper(UnexpectedError2); + function UnexpectedError2() { + var _this2; + _classCallCheck(this, UnexpectedError2); + var message = "An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?"; + _this2 = _super2.call(this, message); + _this2.name = "UnexpectedError"; + return _this2; + } + return _createClass(UnexpectedError2); + }(/* @__PURE__ */ _wrapNativeSuper(Error)); + var ChordSymbolError = /* @__PURE__ */ function(_Error3) { + _inherits(ChordSymbolError2, _Error3); + var _super3 = _createSuper(ChordSymbolError2); + function ChordSymbolError2(message, chord, errorName) { + var _this3; + _classCallCheck(this, ChordSymbolError2); + _this3 = _super3.call(this, message); + _this3.name = errorName; + _this3.chord = chord; + return _this3; + } + return _createClass(ChordSymbolError2); + }(/* @__PURE__ */ _wrapNativeSuper(Error)); + var NoSymbolFoundError = /* @__PURE__ */ function(_ChordSymbolError) { + _inherits(NoSymbolFoundError2, _ChordSymbolError); + var _super4 = _createSuper(NoSymbolFoundError2); + function NoSymbolFoundError2(chord) { + _classCallCheck(this, NoSymbolFoundError2); + var message = '"'.concat(chord.input.symbol, '" does not seems to be a chord'); + return _super4.call(this, message, chord, "NoSymbolFound"); + } + return _createClass(NoSymbolFoundError2); + }(ChordSymbolError); + var InvalidModifierError = /* @__PURE__ */ function(_ChordSymbolError2) { + _inherits(InvalidModifierError2, _ChordSymbolError2); + var _super5 = _createSuper(InvalidModifierError2); + function InvalidModifierError2(chord, invalidChars) { + _classCallCheck(this, InvalidModifierError2); + var message = 'The chord descriptor "'.concat(chord.input.descriptor, '" contains unknown or duplicated modifiers: "').concat(invalidChars, '"'); + return _super5.call(this, message, chord, "InvalidModifier"); + } + return _createClass(InvalidModifierError2); + }(ChordSymbolError); + var InvalidIntervalsError = /* @__PURE__ */ function(_ChordSymbolError3) { + _inherits(InvalidIntervalsError2, _ChordSymbolError3); + var _super6 = _createSuper(InvalidIntervalsError2); + function InvalidIntervalsError2(chord, forbiddenCombo) { + _classCallCheck(this, InvalidIntervalsError2); + var message = '"'.concat(chord.input.symbol, '" describes a chord with an invalid intervals combo: ') + forbiddenCombo.join(" and "); + return _super6.call(this, message, chord, "InvalidIntervals"); + } + return _createClass(InvalidIntervalsError2); + }(ChordSymbolError); + var isArray = __webpack_require__(1469); + var isArray_default = /* @__PURE__ */ __webpack_require__.n(isArray); + var isEqual = __webpack_require__(8446); + var isEqual_default = /* @__PURE__ */ __webpack_require__.n(isEqual); + ; + function hasExactly(allIntervals, search) { + var arraySearch = isArray_default()(search) ? search : [search]; + return isEqual_default()(allIntervals, arraySearch); + } + function hasOneOf(allIntervals, search) { + return has(allIntervals, search, "oneOf"); + } + function hasAll(allIntervals, search) { + return has(allIntervals, search, "all"); + } + function hasNoneOf(allIntervals, search) { + return has(allIntervals, search, "none"); + } + function has(allIntervals, search, require2) { + var arraySearch = isArray_default()(search) ? search : [search]; + var lookupMethod = require2 === "oneOf" ? "some" : "every"; + return arraySearch[lookupMethod](function(interval) { + return require2 === "none" ? !allIntervals.includes(interval) : allIntervals.includes(interval); + }); + } + ; + var allForbiddenCombos = [ + ["2", "3"], + ["2", "9"], + ["3", "b3"], + //['3', '4'], // valid in the Real Book: F#7SUS(add 3) + ["4", "11"], + ["5", "b5"], + ["5", "#5"], + ["b6", "#5"], + ["b6", "6"], + ["b6", "13"], + ["6", "13"], + ["b7", "bb7"], + ["7", "b7"], + ["9", "b9"], + ["9", "#9"], + ["11", "#11"], + ["13", "b13"] + ]; + function checkIntervalsConsistency(chord) { + var intervals = chord.normalized.intervals; + var forbiddenCombo = allForbiddenCombos.find(function(combo) { + return hasAll(intervals, combo); + }); + if (forbiddenCombo) { + throw new InvalidIntervalsError(chord, forbiddenCombo); + } + return chord; + } + ; + function formatSymbol(chord) { + var _chord$formatted = chord.formatted, rootNote = _chord$formatted.rootNote, bassNote = _chord$formatted.bassNote, descriptor = _chord$formatted.descriptor, chordChanges = _chord$formatted.chordChanges; + var symbol = rootNote; + if (descriptor) { + symbol += descriptor; + } + if (chordChanges && chordChanges.length) { + symbol += "(" + chordChanges.join(",") + ")"; + } + if (bassNote) { + symbol += "/" + bassNote; + } + chord.formatted.symbol = symbol; + return chord; + } + ; + var qualities = { + ma: "major", + ma6: "major6", + ma7: "major7", + dom7: "dominant7", + mi: "minor", + mi6: "minor6", + mi7: "minor7", + miMa7: "minorMajor7", + aug: "augmented", + dim: "diminished", + dim7: "diminished7", + power: "power", + bass: "bass" + }; + var majorQualities = [qualities.ma, qualities.ma6, qualities.ma7, qualities.dom7, qualities.aug]; + var minorQualities = [qualities.mi, qualities.mi6, qualities.mi7, qualities.miMa7, qualities.dim, qualities.dim7]; + ; + var _qualityToDescriptor; + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); + } + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function formatSymbolParts_defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var qualityToDescriptor = (_qualityToDescriptor = {}, formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.ma, function() { + return ""; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.ma6, function(chord) { + return chord.normalized.intervals.includes("9") ? "69" : "6"; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.ma7, function(chord) { + return "ma" + getHighestExtension(chord); + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.dom7, function(chord) { + return chord.normalized.intents.alt ? "7alt" : getHighestExtension(chord); + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.mi, function() { + return "mi"; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.mi6, function(chord) { + return chord.normalized.intervals.includes("9") ? "mi69" : "mi6"; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.mi7, function(chord) { + return "mi" + getHighestExtension(chord); + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.miMa7, function(chord) { + return "miMa" + getHighestExtension(chord); + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.aug, function() { + return "+"; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.dim, function() { + return "dim"; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.dim7, function() { + return "dim7"; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.power, function() { + return "5"; + }), formatSymbolParts_defineProperty(_qualityToDescriptor, qualities.bass, function() { + return " bass"; + }), _qualityToDescriptor); + var chordChangesDescriptors = { + add: "add", + add7: "Ma7", + omit: "omit", + sus: "sus" + }; + function formatSymbolParts(chord) { + chord.formatted = { + rootNote: chord.normalized.rootNote, + bassNote: chord.normalized.bassNote, + descriptor: getDescriptor(chord), + chordChanges: getChordChanges(chord) + }; + return chord; + } + function getDescriptor(chord) { + var descriptor = qualityToDescriptor[chord.normalized.quality](chord); + if (chord.normalized.isSuspended) { + descriptor += chordChangesDescriptors.sus; + } + return descriptor; + } + function getHighestExtension(chord) { + var extensions = chord.normalized.extensions; + var highestExtension = extensions[extensions.length - 1]; + if (highestExtension === "11" && chord.normalized.intents.major) { + highestExtension = hasNoneOf(chord.normalized.alterations, ["b9", "#9"]) ? "9" : "7"; + } + return highestExtension || "7"; + } + function getChordChanges(chord) { + var formattedOmits = formatOmits(chord.normalized.omits); + if (isAltered(chord)) { + return formattedOmits; + } + var formattedAdds = formatAdds(chord.normalized.quality, chord.normalized.adds); + return [].concat(_toConsumableArray(chord.normalized.alterations), _toConsumableArray(formattedAdds), _toConsumableArray(formattedOmits)); + } + function isAltered(chord) { + return chord.normalized.intents.alt && chord.normalized.quality === qualities.dom7; + } + function formatAdds(quality, adds) { + return adds.filter(function(add) { + return !([qualities.ma6, qualities.mi6].includes(quality) && add === "9"); + }).map(function(add, index) { + var formatted = ""; + if (index === 0) { + formatted += chordChangesDescriptors.add; + if (["b", "#"].includes(add[0])) { + formatted += " "; + } + } + formatted += add === "7" ? chordChangesDescriptors.add7 : add; + return formatted; + }); + } + function formatOmits(omits) { + return omits.map(function(omitted, index) { + var formatted = ""; + if (index === 0) { + formatted += chordChangesDescriptors.omit; + } + formatted += omitted === "b3" ? "3" : omitted; + return formatted; + }); + } + ; + function getParsableDescriptor(chord) { + var allFilters = [toLowerCaseExceptMajorM, removeSpaces, addDisambiguators, addMissingVerbs]; + if (chord.input.descriptor) { + chord.input.parsableDescriptor = chain(allFilters, chord.input.descriptor); + } + return chord; + } + function toLowerCaseExceptMajorM(descriptor) { + return descriptor.replace(/[A-LN-Za-z]+/g, function(match) { + return match.toLowerCase(); + }).replace("oMit", "omit").replace("diM", "dim").replace("augMented", "augmented"); + } + function removeSpaces(descriptor) { + return descriptor.replace(/ /g, ""); + } + function addDisambiguators(descriptor) { + return descriptor.replace(/(7?dim)(alt|add)/g, "$1 $2").replace(/([m|M])(alt|add)/g, "$1 $2").replace(/i(no[35])/g, "i $1").replace(/([b♭#♯]9)6/g, "$1 6").replace(/(9\/?6)/g, " $1"); + } + function addMissingVerbs(descriptor) { + var allTokensWithVerbs; + var currentVerb; + var hasVerb; + return descriptor.replace(/\((.*?)\)/g, function(match, parenthesis) { + allTokensWithVerbs = []; + currentVerb = ""; + parenthesis.split(",").forEach(function(token) { + hasVerb = true; + if (token.startsWith("add")) { + currentVerb = "add"; + } else if (token.startsWith("omit")) { + currentVerb = "omit"; + } else if (token.startsWith("no")) { + currentVerb = "no"; + } else { + hasVerb = false; + } + if (hasVerb) { + allTokensWithVerbs.push(token); + } else { + allTokensWithVerbs.push(currentVerb + token); + } + }); + return " " + allTokensWithVerbs.join(" ") + " "; + }); + } + ; + function initChord() { + var parserConfiguration = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var symbol = arguments.length > 1 ? arguments[1] : void 0; + return { + input: { + symbol + }, + normalized: {}, + formatted: {}, + parserConfiguration: cloneDeep_default()(parserConfiguration) + }; + } + ; + var _rootNoteToScaleAccid; + function nameIndividualChordNotes_toConsumableArray(arr) { + return nameIndividualChordNotes_arrayWithoutHoles(arr) || nameIndividualChordNotes_iterableToArray(arr) || nameIndividualChordNotes_unsupportedIterableToArray(arr) || nameIndividualChordNotes_nonIterableSpread(); + } + function nameIndividualChordNotes_nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function nameIndividualChordNotes_unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return nameIndividualChordNotes_arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return nameIndividualChordNotes_arrayLikeToArray(o, minLen); + } + function nameIndividualChordNotes_iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function nameIndividualChordNotes_arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return nameIndividualChordNotes_arrayLikeToArray(arr); + } + function nameIndividualChordNotes_arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function nameIndividualChordNotes_defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var notesSharp = [notes.A, notes.ASharp, notes.B, notes.C, notes.CSharp, notes.D, notes.DSharp, notes.E, notes.F, notes.FSharp, notes.G, notes.GSharp]; + var notesFlat = [notes.A, notes.BFlat, notes.B, notes.C, notes.DFlat, notes.D, notes.EFlat, notes.E, notes.F, notes.GFlat, notes.G, notes.AFlat]; + var rootNoteToScaleAccidentals = (_rootNoteToScaleAccid = {}, nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.C, { + maj: "flat", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.CSharp, { + maj: "sharp", + min: "sharp" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.DFlat, { + maj: "flat", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.D, { + maj: "sharp", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.DSharp, { + maj: "sharp", + min: "sharp" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.EFlat, { + maj: "flat", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.E, { + maj: "sharp", + min: "sharp" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.F, { + maj: "flat", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.FSharp, { + maj: "sharp", + min: "sharp" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.GFlat, { + maj: "flat", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.G, { + maj: "sharp", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.GSharp, { + maj: "sharp", + min: "sharp" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.AFlat, { + maj: "flat", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.A, { + maj: "sharp", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.ASharp, { + maj: "sharp", + min: "sharp" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.BFlat, { + maj: "flat", + min: "flat" + }), nameIndividualChordNotes_defineProperty(_rootNoteToScaleAccid, notes.B, { + maj: "sharp", + min: "sharp" + }), _rootNoteToScaleAccid); + function nameIndividualChordNotes(chord) { + var rootNote = chord.normalized.rootNote; + var semitones = chord.normalized.semitones; + var quality = chord.normalized.quality; + var minMaj = majorQualities.includes(quality) ? "maj" : "min"; + var refNotes = rootNoteToScaleAccidentals[rootNote][minMaj] === "sharp" ? notesSharp : notesFlat; + var rootNoteIndex = refNotes.indexOf(rootNote); + var indexedNotes = [].concat(nameIndividualChordNotes_toConsumableArray(refNotes.slice(rootNoteIndex)), nameIndividualChordNotes_toConsumableArray(refNotes.slice(0, rootNoteIndex)), nameIndividualChordNotes_toConsumableArray(refNotes.slice(rootNoteIndex)), nameIndividualChordNotes_toConsumableArray(refNotes.slice(0, rootNoteIndex))); + var chordNotes = semitones.map(function(i) { + return indexedNotes[i]; + }); + chord.normalized.notes = chordNotes; + return chord; + } + ; + function normalizeNotes(chord) { + chord.normalized.rootNote = allVariantsToNotes[chord.input.rootNote]; + if (chord.input.bassNote) { + chord.normalized.bassNote = allVariantsToNotes[chord.input.bassNote]; + } + return chord; + } + var clone = __webpack_require__(6678); + var clone_default = /* @__PURE__ */ __webpack_require__.n(clone); + var find = __webpack_require__(3311); + var find_default = /* @__PURE__ */ __webpack_require__.n(find); + var uniq = __webpack_require__(4908); + var uniq_default = /* @__PURE__ */ __webpack_require__.n(uniq); + var without = __webpack_require__(2569); + var without_default = /* @__PURE__ */ __webpack_require__.n(without); + ; + function normalizeDescriptor_ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function normalizeDescriptor_objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? normalizeDescriptor_ownKeys(Object(source), true).forEach(function(key) { + normalizeDescriptor_defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : normalizeDescriptor_ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function normalizeDescriptor_defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + function normalizeDescriptor_toConsumableArray(arr) { + return normalizeDescriptor_arrayWithoutHoles(arr) || normalizeDescriptor_iterableToArray(arr) || normalizeDescriptor_unsupportedIterableToArray(arr) || normalizeDescriptor_nonIterableSpread(); + } + function normalizeDescriptor_nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function normalizeDescriptor_unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return normalizeDescriptor_arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return normalizeDescriptor_arrayLikeToArray(o, minLen); + } + function normalizeDescriptor_iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function normalizeDescriptor_arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return normalizeDescriptor_arrayLikeToArray(arr); + } + function normalizeDescriptor_arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function normalizeDescriptor(chord) { + var chordIntervals = clone_default()(chord.normalized.intervals); + var normalized = { + quality: "", + isSuspended: false, + extensions: [], + alterations: [], + adds: [], + omits: [] + }; + if (isPowerChord(chordIntervals)) { + normalized.quality = qualities.power; + } else if (isBass(chordIntervals)) { + normalized.quality = qualities.bass; + } else { + var omits = getOmits(chordIntervals, chord.normalized.intents.major); + var isSuspended = getIsSuspended(chordIntervals, chord.normalized.intents.major); + var _getChordQuality = getChordQuality(chordIntervals, chord, isSuspended, omits), qualityIntervals = _getChordQuality.qualityIntervals, quality = _getChordQuality.quality; + var extensions = getExtensions(chordIntervals, quality); + var baseIntervals = ["1"].concat(normalizeDescriptor_toConsumableArray(qualityIntervals), normalizeDescriptor_toConsumableArray(extensions)); + var _getAddsAndAlteration = getAddsAndAlterations(chordIntervals, baseIntervals, quality), adds = _getAddsAndAlteration.adds, alterations = _getAddsAndAlteration.alterations; + normalized = normalizeDescriptor_objectSpread(normalizeDescriptor_objectSpread({}, normalized), {}, { + quality, + isSuspended, + extensions, + alterations, + adds, + omits + }); + } + return normalizeDescriptor_objectSpread(normalizeDescriptor_objectSpread({}, chord), {}, { + normalized: normalizeDescriptor_objectSpread(normalizeDescriptor_objectSpread({}, chord.normalized), normalized) + }); + } + function isPowerChord(intervals) { + return hasExactly(intervals, ["1", "5"]); + } + function isBass(intervals) { + return hasExactly(intervals, ["1"]); + } + function getIsSuspended(intervals, hasMajorIntent2) { + return intervals.includes("4") || intervals.includes("11") && hasMajorIntent2 && !intervals.includes("3"); + } + function getOmits(intervals, hasMajorIntent2) { + var omits = []; + if (hasNoneOf(intervals, ["b3", "3", "4", "11"]) || !hasMajorIntent2 && hasNoneOf(intervals, ["b3", "4"])) { + omits.push(hasMajorIntent2 ? "3" : "b3"); + } + if (hasNoneOf(intervals, ["b5", "5", "#5", "b13"])) { + omits.push("5"); + } + return omits; + } + function getChordQuality(allIntervals, chord, isSuspended, omits) { + var intervalsForQualityDetection = getIntervalsForQualityDetection(allIntervals, chord, isSuspended, omits); + var intervalsToQualities = [ + // !!! do not change order without a good reason + { + qualityIntervals: ["b3"], + quality: qualities.mi + }, + { + qualityIntervals: ["b3", "6"], + quality: qualities.mi6 + }, + { + qualityIntervals: ["b3", "7"], + quality: qualities.miMa7 + }, + { + qualityIntervals: ["b3", "b7"], + quality: qualities.mi7 + }, + { + qualityIntervals: ["3"], + quality: qualities.ma + }, + { + qualityIntervals: ["3", "6"], + quality: qualities.ma6 + }, + { + qualityIntervals: ["3", "7"], + quality: qualities.ma7 + }, + { + qualityIntervals: ["3", "b7"], + quality: qualities.dom7 + }, + { + qualityIntervals: ["3", "#5"], + quality: qualities.aug + }, + { + qualityIntervals: ["b3", "b5"], + quality: qualities.dim + }, + { + qualityIntervals: ["b3", "b5", "bb7"], + quality: qualities.dim7 + } + ].sort(function(a, b) { + return b.qualityIntervals.length - a.qualityIntervals.length; + }); + return find_default()(intervalsToQualities, function(o) { + return hasAll(intervalsForQualityDetection, o.qualityIntervals); + }); + } + function getIntervalsForQualityDetection(allIntervals, chord, isSuspended, omits) { + var allFilters = [undoOmit3.bind(null, omits), undoSuspension.bind(null, isSuspended, chord.normalized.intents.major), undoAlt5.bind(null, chord.normalized.intents.alt), uniq_default()]; + return chain(allFilters, clone_default()(allIntervals)); + } + function undoOmit3(omits, allIntervals) { + var with3rd = clone_default()(allIntervals); + if (omits.includes("3")) { + with3rd.push("3"); + } else if (omits.includes("b3")) { + with3rd.push("b3"); + } + return with3rd; + } + function undoSuspension(isSuspended, hasMajorIntent2, allIntervals) { + if (isSuspended) { + var unSuspended = without_default()(allIntervals, "4"); + unSuspended.push(hasMajorIntent2 ? "3" : "b3"); + return unSuspended; + } + return allIntervals; + } + function undoAlt5(isAlt, allIntervals) { + if (isAlt) { + var unaltered = without_default()(allIntervals, "b5", "#5"); + unaltered.push("5"); + return unaltered; + } + return allIntervals; + } + function getExtensions(allIntervals, quality) { + var extensions = []; + if (canBeExtended(quality)) { + if (isMinorExtended13th(allIntervals, quality)) { + extensions.push("9", "11", "13"); + } else if (isMajorExtended13th(allIntervals, quality)) { + extensions.push("9", "13"); + } else if (isExtended11th(allIntervals)) { + extensions.push("9", "11"); + } else if (isExtended9th(allIntervals)) { + extensions.push("9"); + } + } + return extensions; + } + function canBeExtended(quality) { + return [qualities.ma7, qualities.dom7, qualities.mi7, qualities.miMa7].includes(quality); + } + function canHave11th(quality) { + return [qualities.mi7, qualities.miMa7].includes(quality); + } + function isMinorExtended13th(allIntervals, quality) { + return canHave11th(quality) && hasOneOf(allIntervals, "13") && hasOneOf(allIntervals, ["11", "#11"]) && hasOneOf(allIntervals, ["b9", "9", "#9"]); + } + function isMajorExtended13th(allIntervals, quality) { + return !canHave11th(quality) && hasOneOf(allIntervals, "13") && hasOneOf(allIntervals, ["b9", "9", "#9"]); + } + function isExtended11th(allIntervals) { + return hasOneOf(allIntervals, "11") && hasOneOf(allIntervals, ["b9", "9", "#9"]); + } + function isExtended9th(allIntervals) { + return allIntervals.includes("9"); + } + function getAddsAndAlterations(chordIntervals, baseIntervals, quality) { + var adds = []; + var alterations = []; + chordIntervals.filter(function(interval) { + return interval !== "5" && interval !== "4"; + }).forEach(function(interval) { + if (!baseIntervals.includes(interval)) { + if (isAlteration(quality, interval)) { + alterations.push(interval); + } else { + adds.push(interval); + } + } + }); + if (hasAdd3(chordIntervals)) { + adds.push("3"); + } + return { + adds: sortIntervals(adds), + alterations: sortIntervals(alterations) + }; + } + function isAlteration(quality, interval) { + var _qualityAlterations; + var qualityAlterations = (_qualityAlterations = {}, normalizeDescriptor_defineProperty(_qualityAlterations, qualities.ma, ["b5", "#5", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.ma6, ["b5", "#5", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.ma7, ["b5", "#5", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.dom7, ["b5", "#5", "b9", "#9", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.mi, ["b5", "#5", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.mi6, ["b5", "#5", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.mi7, ["b5", "#5", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.miMa7, ["b5", "#5", "#11", "b13"]), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.aug, []), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.dim, []), normalizeDescriptor_defineProperty(_qualityAlterations, qualities.dim7, []), _qualityAlterations); + return qualityAlterations[quality].includes(interval); + } + function hasAdd3(allIntervals) { + return hasAll(allIntervals, ["3", "4"]); + } + function sortIntervals(intervals) { + return intervals.sort(function(a, b) { + var sortableA = Number.parseInt(a.replace(/[b#]/, "")); + var sortableB = Number.parseInt(b.replace(/[b#]/, "")); + return sortableA - sortableB; + }); + } + ; + function parseBase(noteVariants, chord) { + var symbol = chord.input.symbol; + var notesRegex = noteVariants.join("|"); + var notesAndDescriptorRegex = new RegExp("^(" + notesRegex + ")(.*?)(/(" + notesRegex + "))?$"); + var result = symbol.match(notesAndDescriptorRegex); + if (result && result[1]) { + chord.input.rootNote = result[1]; + if (result[2]) { + chord.input.descriptor = result[2]; + } + if (result[4]) { + chord.input.bassNote = result[4]; + } + return chord; + } else { + throw new NoSymbolFoundError(chord); + } + } + ; + function modifiers_ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function modifiers_objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? modifiers_ownKeys(Object(source), true).forEach(function(key) { + modifiers_defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : modifiers_ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function modifiers_defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var allModifiers = { + // base + ma: "ma", + mi: "mi", + dim: "dim", + halfDim: "halfDim", + aug: "aug", + seventh: "seventh", + // suspended + sus: "sus", + sus2: "sus2", + // extensions + ninth: "ninth", + eleventh: "eleventh", + thirteenth: "thirteenth", + // alterations + fifthFlat: "b5", + fifthSharp: "#5", + ninthFlat: "b9", + ninthSharp: "#9", + eleventhSharp: "#11", + thirteenthFlat: "b13", + // added + add3: "add3", + add4: "add4", + addb6: "addb6", + add6: "add6", + add69: "add69", + add7: "add7", + add9: "add9", + add11: "add11", + add13: "add13", + // special + bass: "bass", + omit3: "omit3", + omit5: "omit5", + power: "power", + alt: "alt" + }; + var major = { + "^": [allModifiers.ma, allModifiers.add7], + \u0394: [allModifiers.ma, allModifiers.add7], + M: allModifiers.ma, + Ma: allModifiers.ma, + Maj: allModifiers.ma, + Major: allModifiers.ma, + ma: allModifiers.ma, + maj: allModifiers.ma, + major: allModifiers.ma + }; + var major7th = getDerivedModifiers(major, allModifiers.add7, function(symbol) { + return symbol + "7"; + }); + var add7 = getDerivedModifiers(major, allModifiers.add7, function(symbol) { + return "add" + symbol + "7"; + }); + var allSymbols = modifiers_objectSpread(modifiers_objectSpread(modifiers_objectSpread(modifiers_objectSpread({}, major), major7th), {}, { + // minor + "-": allModifiers.mi, + m: allModifiers.mi, + Mi: allModifiers.mi, + Min: allModifiers.mi, + Minor: allModifiers.mi, + mi: allModifiers.mi, + min: allModifiers.mi, + minor: allModifiers.mi, + // diminished / augmented + "\xB0": allModifiers.dim, + o: allModifiers.dim, + 0: allModifiers.dim, + dim: allModifiers.dim, + "dim.": allModifiers.dim, + diminished: allModifiers.dim, + \u00D8: allModifiers.halfDim, + \u00F8: allModifiers.halfDim, + h: allModifiers.halfDim, + "+": allModifiers.aug, + aug: allModifiers.aug, + augmented: allModifiers.aug, + // seventh + 7: allModifiers.seventh, + // suspended + 4: allModifiers.sus, + sus: allModifiers.sus, + sus4: allModifiers.sus, + suspended: allModifiers.sus, + suspended4: allModifiers.sus, + sus2: allModifiers.sus2, + suspended2: allModifiers.sus2, + // extensions + 9: allModifiers.ninth, + 11: allModifiers.eleventh, + 13: allModifiers.thirteenth, + // alterations + b3: allModifiers.mi, + b5: allModifiers.fifthFlat, + "\u266D5": allModifiers.fifthFlat, + "#5": allModifiers.fifthSharp, + "\u266F5": allModifiers.fifthSharp, + b9: allModifiers.ninthFlat, + "\u266D9": allModifiers.ninthFlat, + addb9: allModifiers.ninthFlat, + "add\u266D9": allModifiers.ninthFlat, + "#9": allModifiers.ninthSharp, + "\u266F9": allModifiers.ninthSharp, + "add#9": allModifiers.ninthSharp, + "add\u266F9": allModifiers.ninthSharp, + "#11": allModifiers.eleventhSharp, + "\u266F11": allModifiers.eleventhSharp, + "add#11": allModifiers.eleventhSharp, + b13: allModifiers.thirteenthFlat, + "\u266D13": allModifiers.thirteenthFlat, + addb13: allModifiers.thirteenthFlat, + "add\u266D13": allModifiers.thirteenthFlat + }, add7), {}, { + 2: allModifiers.add9, + add2: allModifiers.add9, + add3: allModifiers.add3, + add4: allModifiers.add4, + addb6: allModifiers.addb6, + b6: allModifiers.addb6, + 6: allModifiers.add6, + add6: allModifiers.add6, + "6/9": allModifiers.add69, + 69: allModifiers.add69, + 96: allModifiers.add69, + "9/6": allModifiers.add69, + add9: allModifiers.add9, + add11: allModifiers.add11, + add13: allModifiers.add13, + // special + bass: allModifiers.bass, + omit3: allModifiers.omit3, + no3: allModifiers.omit3, + omit5: allModifiers.omit5, + no5: allModifiers.omit5, + 5: allModifiers.power, + alt: allModifiers.alt, + "alt.": allModifiers.alt, + altered: allModifiers.alt + }); + function getDerivedModifiers(source, modifierId, derivedFn) { + return Object.keys(source).map(derivedFn).reduce(function(acc, curr) { + acc[curr] = modifierId; + return acc; + }, {}); + } + var modifiers_allVariants = Object.keys(allSymbols).sort(function(a, b) { + return b.length - a.length; + }); + const modifiers = allModifiers; + ; + const intervalsToSemitones = { + 1: 0, + 2: 2, + b3: 3, + 3: 4, + 4: 5, + b5: 6, + 5: 7, + "#5": 8, + b6: 8, + 6: 9, + bb7: 9, + b7: 10, + 7: 11, + b9: 13, + 9: 14, + "#9": 15, + 11: 17, + "#11": 18, + b13: 20, + 13: 21 + }; + ; + function parseDescriptor_toConsumableArray(arr) { + return parseDescriptor_arrayWithoutHoles(arr) || parseDescriptor_iterableToArray(arr) || parseDescriptor_unsupportedIterableToArray(arr) || parseDescriptor_nonIterableSpread(); + } + function parseDescriptor_nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function parseDescriptor_unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return parseDescriptor_arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return parseDescriptor_arrayLikeToArray(o, minLen); + } + function parseDescriptor_iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function parseDescriptor_arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return parseDescriptor_arrayLikeToArray(arr); + } + function parseDescriptor_arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function parseDescriptor(altIntervals, chord) { + var allModifiers2 = []; + if (chord.input.parsableDescriptor) { + allModifiers2 = getModifiers(chord); + } + chord.input.modifiers = allModifiers2; + chord.normalized.intervals = getIntervals(allModifiers2, altIntervals); + chord.normalized.semitones = getSemitones(chord.normalized.intervals); + chord.normalized.intents = getIntents(allModifiers2); + return chord; + } + function getModifiers(chord) { + var parsableDescriptor = chord.input.parsableDescriptor; + var modifiers2 = []; + var descriptorRegex = new RegExp(modifiers_allVariants.map(escapeRegex).join("|"), "g"); + var descriptorMatches = parsableDescriptor.match(descriptorRegex); + var remainingChars = parsableDescriptor; + var allModifiersId; + if (descriptorMatches) { + descriptorMatches.forEach(function(match) { + allModifiersId = allSymbols[match]; + if (!Array.isArray(allModifiersId)) { + allModifiersId = [allModifiersId]; + } + allModifiersId.forEach(function(modifierId) { + if (modifiers2.includes(modifierId)) { + return; + } + modifiers2.push(modifierId); + remainingChars = remainingChars.replace(match, ""); + }); + }); + } + if (modifiers2.length === 0) { + throw new NoSymbolFoundError(chord); + } + if (remainingChars.trim().length > 0) { + throw new InvalidModifierError(chord, remainingChars); + } + return modifiers2; + } + function getIntervals(allModifiers2, altIntervals) { + if (allModifiers2.includes(modifiers.power)) { + return ["1", "5"]; + } else if (allModifiers2.includes(modifiers.bass)) { + return ["1"]; + } + return uniq_default()(["1"].concat(parseDescriptor_toConsumableArray(getThird(allModifiers2)), parseDescriptor_toConsumableArray(getFourth(allModifiers2)), parseDescriptor_toConsumableArray(getFifths(allModifiers2, altIntervals)), parseDescriptor_toConsumableArray(getSixth(allModifiers2)), parseDescriptor_toConsumableArray(getSevenths(allModifiers2)), parseDescriptor_toConsumableArray(getNinths(allModifiers2, altIntervals)), parseDescriptor_toConsumableArray(getElevenths(allModifiers2, altIntervals)), parseDescriptor_toConsumableArray(getThirteenths(allModifiers2, altIntervals)))).sort(function(a, b) { + return intervalsToSemitones[a] - intervalsToSemitones[b]; + }); + } + function getThird(allModifiers2) { + var third = []; + if (allModifiers2.includes(modifiers.omit3)) { + return []; + } + if (!hasOneOf(allModifiers2, [modifiers.sus, modifiers.sus2])) { + if (!hasMajorIntent(allModifiers2)) { + third.push("b3"); + } else if (!allModifiers2.includes(modifiers.eleventh)) { + third.push("3"); + } + } + if (allModifiers2.includes(modifiers.add3)) { + third.push("3"); + } + return third; + } + function getFourth(allModifiers2) { + var fourth = []; + if (hasOneOf(allModifiers2, [modifiers.sus, modifiers.add4])) { + fourth.push("4"); + } + return fourth; + } + function getFifths(allModifiers2, altIntervals) { + var fifths = []; + if (allModifiers2.includes(modifiers.omit5)) { + return []; + } + if (hasOneOf(allModifiers2, [modifiers.dim, modifiers.halfDim, modifiers.fifthFlat]) || shouldAlter(allModifiers2, altIntervals, "b5")) { + fifths.push("b5"); + } + if (hasOneOf(allModifiers2, [modifiers.aug, modifiers.fifthSharp]) || shouldAlter(allModifiers2, altIntervals, "#5")) { + fifths.push("#5"); + } + if (!fifths.length && !allModifiers2.includes(modifiers.thirteenthFlat)) { + fifths.push("5"); + } + return fifths; + } + function getSixth(allModifiers2) { + var sixth = []; + if (hasOneOf(allModifiers2, [modifiers.addb6])) { + sixth.push("b6"); + } + if (hasOneOf(allModifiers2, [modifiers.add6, modifiers.add69]) && !isExtended(allModifiers2) && !hasOneOf(allModifiers2, [modifiers.halfDim])) { + sixth.push("6"); + } + return sixth; + } + function getSevenths(allModifiers2) { + var sevenths = []; + if (hasOneOf(allModifiers2, [modifiers.alt])) { + sevenths.push("b7"); + } + if (hasOneOf(allModifiers2, [modifiers.seventh, modifiers.halfDim])) { + if (allModifiers2.includes(modifiers.dim)) { + sevenths.push("bb7"); + } else if (allModifiers2.includes(modifiers.halfDim)) { + sevenths.push("b7"); + } else { + sevenths.push(getMinorOrMajorSeventh(allModifiers2)); + } + } else if (hasOneOf(allModifiers2, [modifiers.ninth, modifiers.eleventh, modifiers.thirteenth])) { + sevenths.push(getMinorOrMajorSeventh(allModifiers2)); + } + if (allModifiers2.includes(modifiers.add7)) { + sevenths.push("7"); + } + return sevenths; + } + function getMinorOrMajorSeventh(allModifiers2) { + return allModifiers2.includes(modifiers.ma) ? "7" : "b7"; + } + function getNinths(allModifiers2, altIntervals) { + var ninth = []; + if (hasOneOf(allModifiers2, [modifiers.add69, modifiers.ninth, modifiers.eleventh, modifiers.thirteenth]) && hasNoneOf(allModifiers2, [modifiers.ninthFlat, modifiers.ninthSharp])) { + ninth.push("9"); + } + if (hasOneOf(allModifiers2, [modifiers.sus2, modifiers.add9])) { + ninth.push("9"); + } + if (hasOneOf(allModifiers2, [modifiers.ninthFlat]) || shouldAlter(allModifiers2, altIntervals, "b9")) { + ninth.push("b9"); + } + if (hasOneOf(allModifiers2, [modifiers.ninthSharp]) || shouldAlter(allModifiers2, altIntervals, "#9")) { + ninth.push("#9"); + } + return ninth; + } + function getElevenths(allModifiers2, altIntervals) { + var elevenths = []; + if (hasOneOf(allModifiers2, [modifiers.thirteenth]) && !hasMajorIntent(allModifiers2)) { + elevenths.push("11"); + } else if (hasOneOf(allModifiers2, [modifiers.eleventh, modifiers.add11])) { + elevenths.push("11"); + } + if (hasOneOf(allModifiers2, [modifiers.eleventhSharp]) || shouldAlter(allModifiers2, altIntervals, "#11")) { + elevenths.push("#11"); + } + return elevenths; + } + function getThirteenths(allModifiers2, altIntervals) { + var thirteenths = []; + if (hasOneOf(allModifiers2, [modifiers.add13, modifiers.thirteenth]) || hasOneOf(allModifiers2, [modifiers.add6, modifiers.add69]) && isExtended(allModifiers2) || hasOneOf(allModifiers2, [modifiers.add6, modifiers.add69]) && hasOneOf(allModifiers2, [modifiers.halfDim])) { + thirteenths.push("13"); + } + if (hasOneOf(allModifiers2, [modifiers.thirteenthFlat]) || shouldAlter(allModifiers2, altIntervals, "b13")) { + thirteenths.push("b13"); + } + return thirteenths; + } + function shouldAlter(allModifiers2, altIntervals, interval) { + return allModifiers2.includes(modifiers.alt) && altIntervals.includes(interval); + } + function hasMajorIntent(allModifiers2) { + return hasNoneOf(allModifiers2, [modifiers.mi, modifiers.dim, modifiers.dim7, modifiers.halfDim]); + } + function isExtended(allModifiers2) { + return hasOneOf(allModifiers2, [modifiers.seventh, modifiers.ninth, modifiers.eleventh, modifiers.thirteenth]); + } + function escapeRegex(string) { + return string.replace(/[.\-*+?^${}()|[\]\\]/g, "\\$&"); + } + function getSemitones(allIntervals) { + return allIntervals.map(function(interval) { + return intervalsToSemitones[interval]; + }).sort(function(a, b) { + return a - b; + }); + } + function getIntents(allModifiers2) { + return { + major: hasMajorIntent(allModifiers2), + eleventh: allModifiers2.includes(modifiers.eleventh), + alt: allModifiers2.includes(modifiers.alt) + }; + } + ; + function chordParserFactory_toConsumableArray(arr) { + return chordParserFactory_arrayWithoutHoles(arr) || chordParserFactory_iterableToArray(arr) || chordParserFactory_unsupportedIterableToArray(arr) || chordParserFactory_nonIterableSpread(); + } + function chordParserFactory_nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function chordParserFactory_unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return chordParserFactory_arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return chordParserFactory_arrayLikeToArray(o, minLen); + } + function chordParserFactory_iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function chordParserFactory_arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return chordParserFactory_arrayLikeToArray(arr); + } + function chordParserFactory_arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function chordParserFactory2() { + var parserConfiguration = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var allAltIntervals = ["b5", "#5", "b9", "#9", "#11", "b13"]; + var allNotationSystems2 = ["english", "german", "latin"]; + var _parserConfiguration$ = parserConfiguration.notationSystems, notationSystems = _parserConfiguration$ === void 0 ? cloneDeep_default()(allNotationSystems2) : _parserConfiguration$, _parserConfiguration$2 = parserConfiguration.altIntervals, altIntervals = _parserConfiguration$2 === void 0 ? cloneDeep_default()(allAltIntervals) : _parserConfiguration$2, _parserConfiguration$3 = parserConfiguration.customFilters, customFilters = _parserConfiguration$3 === void 0 ? [] : _parserConfiguration$3; + checkAltIntervals(altIntervals, allAltIntervals); + checkNotationSystems(notationSystems, allNotationSystems2); + helpers_checkCustomFilters(customFilters); + return parseChord; + function parseChord(symbol) { + var allErrors = []; + if (!isInputValid(symbol)) { + var e = new InvalidInputError(); + allErrors.push(formatError(e)); + } + var allVariantsPerGroupCopy = cloneDeep_default()(allVariantsPerGroup).filter(function(variantsGroup) { + return notationSystems.includes(variantsGroup.name); + }); + var chord; + var allFilters; + var variants; + if (!allErrors.length) { + while (allVariantsPerGroupCopy.length && !chord) { + variants = allVariantsPerGroupCopy.shift(); + allFilters = [initChord.bind(null, parserConfiguration), parseBase.bind(null, variants.notes), getParsableDescriptor, parseDescriptor.bind(null, altIntervals), checkIntervalsConsistency, normalizeNotes, normalizeDescriptor, formatSymbolParts, formatSymbol, nameIndividualChordNotes].concat(chordParserFactory_toConsumableArray(customFilters)); + try { + chord = chain(allFilters, symbol); + if (chord) { + chord.input.notationSystem = variants.name; + } else { + allErrors.push(getUnexpectedError(variants.name)); + } + } catch (e2) { + allErrors.push(formatError(e2, variants.name)); + } + } + } + return chord ? chord : { + error: allErrors + }; + } + } + function checkAltIntervals(altIntervals, allAltIntervals) { + checkArray("altIntervals", altIntervals, allAltIntervals, true); + } + function checkNotationSystems(notationSystems, allNotationSystems2) { + checkArray("notationSystems", notationSystems, allNotationSystems2); + } + function checkArray(arrayName, arrayToTest, allowedValues, allowEmpty) { + if (!Array.isArray(arrayToTest)) { + throw new TypeError("'".concat(arrayName, "' should be an array")); + } + if (!allowEmpty && arrayToTest.length === 0) { + throw new TypeError("'".concat(arrayName, "' cannot be empty")); + } + arrayToTest.forEach(function(system) { + if (!allowedValues.includes(system)) { + throw new TypeError("'".concat(system, "' is not a valid value for ").concat(arrayName)); + } + }); + } + function isInputValid(input) { + return typeof input === "string" && input.length > 0; + } + function getUnexpectedError(notationSystem) { + var error = new UnexpectedError(); + return formatError(error, notationSystem); + } + function formatError(exceptionError, notationSystem) { + return { + type: exceptionError.name, + chord: exceptionError.chord, + message: exceptionError.message, + notationSystem + }; + } + const parser_chordParserFactory = chordParserFactory2; + ; + function shortenNormalized_ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function shortenNormalized_objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? shortenNormalized_ownKeys(Object(source), true).forEach(function(key) { + shortenNormalized_defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : shortenNormalized_ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function shortenNormalized_defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var shortDescriptors = { + sus2: "sus2", + add2: "2", + omit: "no", + ma: "M", + mi: "m", + dim: "\xB0", + aug7: "7+", + eleventh: "11" + }; + function shortenNormalized(chord) { + var descriptor; + var chordChanges = chord.formatted.chordChanges; + if (isSus2(chord)) { + descriptor = shortDescriptors.sus2; + chordChanges = []; + } else if (isAdd2(chord)) { + descriptor = shortDescriptors.add2; + chordChanges = []; + } else if (isAug7(chord)) { + descriptor = shortDescriptors.aug7; + chordChanges = []; + } else { + descriptor = chord.formatted.descriptor.replace("mi", shortDescriptors.mi).replace(/[m|M]a/, shortDescriptors.ma).replace("dim", shortDescriptors.dim); + if (isEleventh(chord)) { + descriptor = descriptor.replace(/7sus|9sus/, shortDescriptors.eleventh); + } + } + chordChanges = chordChanges.map(function(change) { + return change.replace(/[m|M]a/, shortDescriptors.ma).replace("omit", shortDescriptors.omit); + }); + return shortenNormalized_objectSpread(shortenNormalized_objectSpread({}, chord), {}, { + formatted: shortenNormalized_objectSpread(shortenNormalized_objectSpread({}, chord.formatted), {}, { + descriptor, + chordChanges + }) + }); + } + function isSus2(chord) { + return hasExactly(chord.normalized.intervals, ["1", "5", "9"]); + } + function isAdd2(chord) { + return hasExactly(chord.normalized.intervals, ["1", "3", "5", "9"]); + } + function isAug7(chord) { + return hasExactly(chord.normalized.intervals, ["1", "3", "#5", "b7"]); + } + function isEleventh(chord) { + return chord.normalized.intents.eleventh; + } + var difference = __webpack_require__(1966); + var difference_default = /* @__PURE__ */ __webpack_require__.n(difference); + ; + function simplify_simplify() { + var level = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "none"; + var chord = arguments.length > 1 ? arguments[1] : void 0; + if (level === "none") { + return chord; + } + var intervalsToRemove = { + max: ["4", "b5", "#5", "6", "bb7", "b7", "7", "b9", "9", "#9", "11", "#11", "b13", "13"], + core: ["4", "b9", "9", "#9", "11", "#11", "b13", "13"] + }; + var intervals = difference_default()(chord.normalized.intervals, intervalsToRemove[level]); + if (hasNoneOf(intervals, ["b3", "3"])) { + intervals.push(chord.normalized.intents.major ? "3" : "b3"); + } + if (hasNoneOf(intervals, ["b5", "5", "#5"])) { + intervals.push("5"); + } + chord.normalized.intervals = intervals; + chord.normalized.semitones = intervals.map(function(interval) { + return intervalsToSemitones[interval]; + }); + chord.normalized.intents.eleventh = false; + chord.normalized.intents.alt = false; + if (level === "max") { + delete chord.normalized.bassNote; + } + var allFilters = [normalizeDescriptor, formatSymbolParts, nameIndividualChordNotes]; + return chain(allFilters, chord); + } + var invert = __webpack_require__(3137); + var invert_default = /* @__PURE__ */ __webpack_require__.n(invert); + ; + var transpose_notes = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"]; + var sharpsToFlats = { + "C#": "Db", + "D#": "Eb", + "F#": "Gb", + "G#": "Ab", + "A#": "Bb" + }; + var flatsToSharps = invert_default()(sharpsToFlats); + function transpose(transposeValue, useFlats, chord) { + var _chord$normalized = chord.normalized, rootNote = _chord$normalized.rootNote, bassNote = _chord$normalized.bassNote; + var rootSharp = convertToSharp(rootNote); + chord.normalized.rootNote = transposeNote(rootSharp, transposeValue, useFlats); + chord.formatted.rootNote = chord.normalized.rootNote; + if (bassNote) { + var bassSharp = convertToSharp(bassNote); + chord.normalized.bassNote = transposeNote(bassSharp, transposeValue, useFlats); + chord.formatted.bassNote = chord.normalized.bassNote; + } + return nameIndividualChordNotes(chord); + } + function transposeNote(note, value, useFlats) { + var noteIndex = transpose_notes.indexOf(note); + var transposedIndex = noteIndex + value; + var octaves = Math.floor(transposedIndex / 12); + var correctedTransposedIndex = transposedIndex - octaves * 12; + var transposed = transpose_notes[correctedTransposedIndex]; + return useFlats ? sharpsToFlats[transposed] || transposed : transposed; + } + function convertToSharp(note) { + return flatsToSharps[note] || note; + } + ; + var translationTables = { + german: { + Ab: "As", + A: "A", + "A#": "Ais", + Bb: "Hes", + B: "H", + C: "C", + "C#": "Cis", + Db: "Des", + D: "D", + "D#": "Dis", + Eb: "Es", + E: "E", + F: "F", + "F#": "Fis", + Gb: "Ges", + G: "G", + "G#": "Gis" + }, + latin: { + Ab: "Lab", + A: "La", + "A#": "La#", + Bb: "Sib", + B: "Si", + C: "Do", + "C#": "Do#", + Db: "Reb", + D: "Re", + "D#": "Re#", + Eb: "Mib", + E: "Mi", + F: "Fa", + "F#": "Fa#", + Gb: "Solb", + G: "Sol", + "G#": "Sol#" + } + }; + var allNotationSystems = Object.keys(translationTables); + function convertNotationSystem() { + var notationSystem = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "english"; + var chord = arguments.length > 1 ? arguments[1] : void 0; + var finalNotationSystem = notationSystem === "auto" ? chord.input.notationSystem : notationSystem; + if (finalNotationSystem === "english") return chord; + if (!allNotationSystems.includes(finalNotationSystem)) return null; + chord.formatted.rootNote = translationTables[finalNotationSystem][chord.formatted.rootNote]; + if (chord.formatted.bassNote) { + chord.formatted.bassNote = translationTables[finalNotationSystem][chord.formatted.bassNote]; + } + return chord; + } + ; + function textPrinter(chord) { + return chord && chord.formatted && chord.formatted.symbol ? chord.formatted.symbol : null; + } + ; + function rawPrinter(chord) { + delete chord.parserConfiguration.notationSystems; + var cloned = cloneDeep_default()(chord); + var textPrinted = textPrinter(chord); + var parseChord = parser_chordParserFactory(chord.parserConfiguration); + var reParsed = parseChord(textPrinted); + cloned.input = reParsed.input; + return cloned; + } + ; + function chordRendererFactory_typeof(obj) { + "@babel/helpers - typeof"; + return chordRendererFactory_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { + return typeof obj2; + } : function(obj2) { + return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }, chordRendererFactory_typeof(obj); + } + function chordRendererFactory_toConsumableArray(arr) { + return chordRendererFactory_arrayWithoutHoles(arr) || chordRendererFactory_iterableToArray(arr) || chordRendererFactory_unsupportedIterableToArray(arr) || chordRendererFactory_nonIterableSpread(); + } + function chordRendererFactory_nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function chordRendererFactory_unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return chordRendererFactory_arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return chordRendererFactory_arrayLikeToArray(o, minLen); + } + function chordRendererFactory_iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + } + function chordRendererFactory_arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return chordRendererFactory_arrayLikeToArray(arr); + } + function chordRendererFactory_arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function chordRendererFactory2() { + var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref$useShortNamings = _ref.useShortNamings, useShortNamings = _ref$useShortNamings === void 0 ? false : _ref$useShortNamings, _ref$simplify = _ref.simplify, simplify = _ref$simplify === void 0 ? "none" : _ref$simplify, _ref$transposeValue = _ref.transposeValue, transposeValue = _ref$transposeValue === void 0 ? 0 : _ref$transposeValue, _ref$harmonizeAcciden = _ref.harmonizeAccidentals, harmonizeAccidentals = _ref$harmonizeAcciden === void 0 ? false : _ref$harmonizeAcciden, _ref$useFlats = _ref.useFlats, useFlats = _ref$useFlats === void 0 ? false : _ref$useFlats, _ref$printer = _ref.printer, printer = _ref$printer === void 0 ? "text" : _ref$printer, _ref$notationSystem = _ref.notationSystem, notationSystem = _ref$notationSystem === void 0 ? "english" : _ref$notationSystem, _ref$customFilters = _ref.customFilters, customFilters = _ref$customFilters === void 0 ? [] : _ref$customFilters; + helpers_checkCustomFilters(customFilters); + var allFilters = []; + if (["max", "core"].includes(simplify)) { + allFilters.push(simplify_simplify.bind(null, simplify)); + } + if (harmonizeAccidentals || transposeValue !== 0) { + allFilters.push(transpose.bind(null, transposeValue, useFlats)); + } + if (useShortNamings) { + allFilters.push(shortenNormalized); + } + allFilters.push.apply(allFilters, [convertNotationSystem.bind(null, notationSystem), formatSymbol].concat(chordRendererFactory_toConsumableArray(customFilters))); + return renderChord; + function renderChord(chord) { + if (!isValidChord(chord)) { + return null; + } + var filteredChord = chain(allFilters, cloneDeep_default()(chord)); + return printer === "raw" ? rawPrinter(filteredChord) : textPrinter(filteredChord); + } + } + var isValidChord = function isValidChord2(chord) { + return chord && chordRendererFactory_typeof(chord) === "object" && !chord.error && chord.input; + }; + const renderer_chordRendererFactory = chordRendererFactory2; + ; + })(); + return __webpack_exports__; + })() + ); + }); + } +}); + +// src/lib/index.js +var import_promise = __toESM(require_promise(), 1); + +// src/lib/parser.js +var import_fast_diff = __toESM(require_diff(), 1); +var Playlist = class { + constructor(ireal) { + const playlistEncoded = /.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(ireal); + const playlist = decodeURIComponent(playlistEncoded[2]); + const parts = playlist.split("==="); + if (parts.length > 1) this.name = parts.pop(); + this.songs = parts.map((part) => { + try { + return new Song(part, playlistEncoded[1] === "irealbook"); + } catch (error) { + const parts2 = part.split("="); + const title = Song.parseTitle(parts2[0].trim()); + console.error(`[ireal-musicxml] [${title}] ${error}`); + return null; + } + }).filter((song) => song !== null).reduce((songs, song) => { + if (songs.length > 0) { + const diffs = (0, import_fast_diff.default)(songs[songs.length - 1].title, song.title); + if (diffs[0][0] === 0 && diffs.every((d) => d[0] === 0 || d[1].match(/^\d+$/))) { + songs[songs.length - 1].cells = songs[songs.length - 1].cells.concat(song.cells); + return songs; + } + } + songs.push(song); + return songs; + }, []); + } +}; +var Cell = class { + constructor() { + this.annots = []; + this.comments = []; + this.bars = ""; + this.spacer = 0; + this.chord = null; + } +}; +var Chord = class { + constructor(note, modifiers = "", over = null, alternate = null) { + this.note = note; + this.modifiers = modifiers; + this.over = over; + this.alternate = alternate; + } +}; +var Song = class _Song { + constructor(ireal, oldFormat = false) { + this.cells = []; + this.musicXml = ""; + if (!ireal) { + this.title = ""; + this.composer = ""; + this.style = ""; + this.key = ""; + this.transpose = 0; + this.groove = ""; + this.bpm = 0; + this.repeats = 0; + return; + } + const parts = ireal.split("="); + if (oldFormat) { + this.title = _Song.parseTitle(parts[0].trim()); + this.composer = _Song.parseComposer(parts[1].trim()); + this.style = parts[2].trim(); + this.key = parts[3]; + this.cells = this.parse(parts[5]); + } else { + this.title = _Song.parseTitle(parts[0].trim()); + this.composer = _Song.parseComposer(parts[1].trim()); + this.style = parts[3].trim(); + this.key = parts[4]; + this.transpose = +parts[5] || 0; + this.groove = parts[7]; + this.bpm = +parts[8]; + this.repeats = +parts[9] || 3; + const music = parts[6].split("1r34LbKcu7"); + this.cells = this.parse(unscramble(music[1])); + } + } + /** + * The RegExp for a complete chord. The match array contains: + * 1 - the base note + * 2 - the modifiers (+-ohd0123456789 and su for sus) + * 3 - any comments (may be e.g. add, sub, or private stuff) + * 4 - the "over" part starting with a slash + * 5 - the top chord as (chord) + * @type RegExp + */ + static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\-^\dhob#])*)(\*.+?\*)*(\/[A-G][#b]?)?(\(.*?\))?/; + static chordRegex2 = /^([ Wp])()()(\/[A-G][#b]?)?(\(.*?\))?/; + // need the empty captures to match chordRegex + static regExps = [ + /^\*[a-zA-Z]/, + // section + /^T\d\d/, + // time measurement + /^N./, + // repeat marker + /^<.*?>/, + // comments + _Song.chordRegex, + // chords + _Song.chordRegex2 + // space, W and p (with optional alt chord) + ]; + /** + * The parser cracks up the raw music string into several objects, + * one for each cell. iReal Pro works with rows of 16 cell each. The result + * is stored at song.cells. + * + * Each object has the following properties: + * + * chord: if non-null, a chord object with these properties: + * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord) + * modifiers - the modifiers, like 7, + o etc (string) + * over - if non-null, another chord object for the under-note + * alternate - if non-null another chord object for the alternate chord + * annots: annotations, a string of: + * *x - section, like *v, *I, *A, *B etc + * Nx - repeat bots (N1, N2 etc) + * Q - coda + * S - segno + * Txx - measure (T44 = 4/4 etc, but T12 = 12/8) + * U - END + * f - fermata + * l - (letter l) normal notes + * s - small notes + * comments: an array of comment strings + * bars: bar specifiers, a string of: + * | - single vertical bar, left + * [ - double bar, left + * ] - double bar, right + * { - repeat bar, left + * } - repeat bar, right + * Z - end bar, right + * spacer - a number indicating the number of vertical spacers above this cell + * + * @returns [Cell] + */ + parse(ireal) { + let text = ireal.trim(); + const arr = []; + while (text) { + let found = false; + for (let i = 0; i < _Song.regExps.length; i++) { + const match = _Song.regExps[i].exec(text); + if (match) { + found = true; + if (match.length <= 2) { + arr.push(match[0]); + text = text.substr(match[0].length); + } else { + arr.push(match); + text = text.substr(match[0].length); + } + break; + } + } + if (!found) { + if (text[0] !== ",") + arr.push(text[0]); + text = text.substr(1); + } + } + const cells = []; + let obj = this.newCell(cells); + let prevobj = null; + for (let i = 0; i < arr.length; i++) { + let cell = arr[i]; + if (cell instanceof Array) { + obj.chord = this.parseChord(cell); + cell = " "; + } + switch (cell[0]) { + case "{": + // open repeat + case "[": + if (prevobj) { + prevobj.bars += ")"; + prevobj = null; + } + obj.bars = cell; + cell = null; + break; + case "|": + if (prevobj) { + prevobj.bars += ")"; + prevobj = null; + } + obj.bars = "("; + cell = null; + break; + case "]": + // close double bar + case "}": + // close repeat + case "Z": + if (prevobj) { + prevobj.bars += cell; + prevobj = null; + } + cell = null; + break; + case "n": + obj.chord = new Chord(cell[0]); + break; + case ",": + cell = null; + break; + // separator + case "S": + // segno + case "T": + // time measurement + case "Q": + // coda + case "N": + // repeat + case "U": + // END + case "s": + // small + case "l": + // normal + case "f": + // fermata + case "*": + obj.annots.push(cell); + cell = null; + break; + case "Y": + obj.spacer++; + cell = null; + prevobj = null; + break; + case "r": + case "x": + case "W": + obj.chord = new Chord(cell); + break; + case "<": + cell = cell.substr(1, cell.length - 2); + obj.comments.push(cell); + cell = null; + break; + default: + } + if (cell && i < arr.length - 1) { + prevobj = obj; + obj = this.newCell(cells); + } + } + return cells; + } + /** + * The title had "A" and "The" at the back (e.g. "Gentle Rain, The") + */ + static parseTitle(title) { + return title.replace(/(.*)(, )(A|The)$/g, "$3 $1"); + } + /** + * The composer is reversed (last first) if it only has 2 names :shrug: + */ + static parseComposer(composer) { + const parts = composer.split(/(\s+)/); + if (parts.length == 3) { + return parts[2] + parts[1] + parts[0]; + } + return composer; + } + parseChord(chord) { + var note = chord[1] || " "; + var modifiers = chord[2] || ""; + var comment = chord[3] || ""; + if (comment) + modifiers += comment.substr(1, comment.length - 2); + var over = chord[4] || ""; + if (over[0] === "/") + over = over.substr(1); + var alternate = chord[5] || null; + if (alternate) { + chord = _Song.chordRegex.exec(alternate.substr(1, alternate.length - 2)); + if (!chord) + alternate = null; + else + alternate = this.parseChord(chord); + } + if (note === " " && !alternate && !over) + return null; + if (over) { + var offset = over[1] === "#" || over[1] === "b" ? 2 : 1; + over = new Chord(over.substr(0, offset), over.substr(offset), null, null); + } else + over = null; + return new Chord(note, modifiers, over, alternate); + } + newCell(cells) { + var obj = new Cell(); + cells.push(obj); + return obj; + } +}; +function unscramble(s) { + let r = "", p; + while (s.length > 51) { + p = s.substring(0, 50); + s = s.substring(50); + r = r + obfusc50(p); + } + r = r + s; + r = r.replace(/Kcl/g, "| x").replace(/LZ/g, " |").replace(/XyQ/g, " "); + return r; +} +function obfusc50(s) { + const newString = s.split(""); + for (let i = 0; i < 5; i++) { + newString[49 - i] = s[i]; + newString[i] = s[49 - i]; + } + for (let i = 10; i < 24; i++) { + newString[49 - i] = s[i]; + newString[i] = s[49 - i]; + } + return newString.join(""); +} + +// src/lib/converter.js +var import_jstoxml = __toESM(require_jstoxml(), 1); +var import_chord_symbol = __toESM(require_chord_symbol(), 1); + +// package.json +var package_default = { + name: "ireal-musicxml", + version: "2.0.0", + description: "iReal Pro to MusicXML converter.", + author: "Karim Ratib (https://github.com/infojunkie)", + license: "GPL-3.0-only", + repository: { + type: "git", + url: "https://github.com/infojunkie/ireal-musicxml" + }, + homepage: "https://github.com/infojunkie/ireal-musicxml", + type: "module", + types: "./src/types/ireal-musicxml.d.ts", + files: [ + "LICENSE.txt", + "build/*", + "src/*" + ], + bin: { + "ireal-musicxml": "./src/cli/cli.js" + }, + exports: { + import: "./build/ireal-musicxml.js", + require: "./build/ireal-musicxml.cjs" + }, + scripts: { + build: "npm run build:esm && npm run build:cjs", + "build:esm": "esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js", + "build:cjs": "esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs", + test: "npm run test:lint && npm run test:spec && npm run test:ts", + "test:spec": "node --test", + "test:ts": "npm run build && node --test --loader=ts-node/esm --require ts-node/register test/**/*.spec.ts", + "test:lint": "eslint src --fix" + }, + devDependencies: { + "@types/node": "^22.7.7", + "@xmldom/xmldom": "^0.8.0", + esbuild: "0.24.0", + eslint: "^9.13.0", + resolve: "^1.22.8", + "sanitize-filename": "^1.6.3", + "ts-node": "^10.9.2", + typescript: "^4.9.5", + "validate-with-xmllint": "^1.2.0", + "xpath.js": "^1.1.0" + }, + dependencies: { + "chord-symbol": "^3.0.0", + "fast-diff": "^1.2.0", + jstoxml: "^2.0.6", + promise: "^8.1.0" + } +}; + +// src/lib/version.js +var Version = class { + static name = package_default.name; + static version = package_default.version; + static author = package_default.author; + static description = package_default.description; +}; + +// src/lib/converter.js +var { chordParserFactory, chordRendererFactory } = import_chord_symbol.default; +var LogLevel = class { + static Debug = 0; + static Info = 1; + static Warn = 2; + static Error = 3; + static None = 4; +}; +var MUSICXML_VERSION = "4.0"; +var SCALING_MM = 7; +var SCALING_TENTHS = 40; +var Converter = class _Converter { + static defaultOptions = { + "divisions": 768, + // same as used by iReal + "notation": "rhythmic", + // 'rhythmic' for rhythmic notation, 'slash' for slash notation + "step": "B", + // chord note + "octave": 4, + // chord note octave + "notehead": "slash", + // chord note head + "noteheadSize": "large", + // size of chord note head + "date": true, + // include encoding date + "clef": false, + // hide clef by default + "keySignature": false, + // hide key signature by default + "pageWidth": 210, + // mm (A4) + "pageHeight": 297, + // mm (A4) + "pageMargin": 15, + // mm + "logLevel": LogLevel.Warn + }; + static sequenceAttributes = [ + // Expected order of attribute elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/ + "divisions", + "key", + "time", + "staves", + "part-symbol", + "instruments", + "clef", + "staff-details", + "transpose", + "directive", + "measure-style" + ]; + static sequenceNote = [ + // Expected order of note elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/ + "cue", + "pitch", + "rest", + "unpitched", + "duration", + "tie", + "voice", + "type", + "dot", + "accidental", + "time-modification", + "stem", + "notehead", + "notehead-text", + "staff", + "beam", + "notations", + "lyric", + "play" + ]; + static sequenceNotations = [ + // Expected order of notations elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/ + "accidental-mark", + "arpeggiate", + "articulations", + "dynamics", + "fermata", + "glissando", + "non-arpeggiate", + "ornaments", + "other-notation", + "slide", + "slur", + "technical", + "tied", + "tuplet" + ]; + static sequenceBarline = [ + // Expected order of barline elements. + // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/ + "bar-style", + "footnote", + "level", + "wavy-line", + "segno", + "coda", + "fermata", + "ending", + "repeat" + ]; + static mapAlter = { + "#": 1, + "b": -1 + }; + static mapFifthsToAlters = { + "sharp": ["F", "C", "G", "D", "A", "E", "B"], + "flat": ["B", "E", "A", "D", "G", "C", "F"] + }; + static mapRepeats = { + "D.C. al Coda": _Converter.prototype.convertDaCapo, + "D.C. al Fine": _Converter.prototype.convertDaCapo, + "D.C. al 1st End.": _Converter.prototype.convertDaCapo, + "D.C. al 2nd End.": _Converter.prototype.convertDaCapo, + "D.C. al 3rd End.": _Converter.prototype.convertDaCapo, + "D.S. al Coda": _Converter.prototype.convertDalSegno, + "D.S. al Fine": _Converter.prototype.convertDalSegno, + "D.S. al 1st End.": _Converter.prototype.convertDalSegno, + "D.S. al 2nd End.": _Converter.prototype.convertDalSegno, + "D.S. al 3rd End.": _Converter.prototype.convertDalSegno, + "Fine": _Converter.prototype.convertFine, + "3x": _Converter.prototype.convertRepeatNx, + "4x": _Converter.prototype.convertRepeatNx, + "5x": _Converter.prototype.convertRepeatNx, + "6x": _Converter.prototype.convertRepeatNx, + "7x": _Converter.prototype.convertRepeatNx, + "8x": _Converter.prototype.convertRepeatNx + }; + static convert(song, options = {}) { + const realOptions = Object.assign({}, this.defaultOptions, options); + return new _Converter(song, realOptions).convert(); + } + constructor(song, options) { + this.song = song; + this.options = options; + this.time = { beats: 4, beatType: 4 }; + this.fifths = null; + this.measure = null; + this.barRepeat = 0; + this.codas = []; + this.repeats = 0; + this.emptyCells = 0; + this.emptyCellNewSystem = false; + this.cellWidth = (this.options.pageWidth - 2 * this.options.pageMargin) / 16; + this.parseChord = chordParserFactory({ "altIntervals": [ + "b5", + "b9" + ] }); + this.renderChord = chordRendererFactory({ + useShortNamings: true, + printer: "raw" + }); + } + convert() { + return import_jstoxml.default.toXML(this.convertSong(), { + header: ` - - `.trim(),indent:" "})}convertSong(){return{_name:"score-partwise",_attrs:{version:In},_content:[{work:{"work-title":this.song.title}},{identification:[{_name:"creator",_attrs:{type:"composer"},_content:this.song.composer},{encoding:[{software:`@infojunkie/ireal-musicxml ${we.version}`},{...this.options.date&&{"encoding-date":s.convertDate(new Date)}},{_name:"supports",_attrs:{element:"accidental",type:"no"}},{_name:"supports",_attrs:{element:"transpose",type:"no"}},{_name:"supports",_attrs:{attribute:"new-page",element:"print",type:"yes",value:"yes"}},{_name:"supports",_attrs:{attribute:"new-system",element:"print",type:"yes",value:"yes"}}]}]},{defaults:{scaling:{millimeters:Dn,tenths:Pn},"page-layout":{"page-height":s._mmToTenths(this.options.pageHeight),"page-width":s._mmToTenths(this.options.pageWidth),"page-margins":{"left-margin":s._mmToTenths(this.options.pageMargin,4),"right-margin":s._mmToTenths(this.options.pageMargin,4),"top-margin":s._mmToTenths(this.options.pageMargin,4),"bottom-margin":s._mmToTenths(this.options.pageMargin,4)}}}},{"part-list":{_name:"score-part",_attrs:{id:"P1"},_content:{_name:"part-name",_attrs:{"print-object":"no"},_content:"Lead Sheet"}}},{_name:"part",_attrs:{id:"P1"},_content:this.convertMeasures()}]}}static convertDate(p){return new Date(p.getTime()-p.getTimezoneOffset()*6e4).toISOString().split("T")[0]}static Measure=class{constructor(p){this.body={_name:"measure",_attrs:{number:p},_content:[]},this.attributes=[],this.chords=[],this.barlines=[],this.barEnding=null}number(){return this.body._attrs.number}assemble(){return this.attributes.length&&this.body._content.push({attributes:s.reorderSequence(this,this.attributes,s.sequenceAttributes)}),this.chords.forEach(p=>{this.body._content.push({harmony:p.harmony},...p.notes.map(u=>({note:u})))}),this.barlines[0]._content=s.reorderSequence(this,this.barlines[0]._content,s.sequenceBarline),this.body._content.splice(1,0,this.barlines[0]),this.barlines[1]._content=s.reorderSequence(this,this.barlines[1]._content,s.sequenceBarline),this.body._content.push(this.barlines[1]),this.body}};static Chord=class{constructor(p,u,g){this.harmony=p,this.notes=u,this.ireal=g,this.spaces=0,this.fermata=!1}};convertMeasures(){let p=e=>e>0&&e%16===0,u=this.song.cells.reduce((e,i,t)=>{if((i.bars.match(/\(|\{|\[/)||!this.measure&&(i.chord||i.annots.length||i.comments.length))&&(this.measure&&(this._log(tt.Warn,"Starting a new measure over existing measure. Closing current measure first."),this.measure.barlines.push(this.convertBarline("","right")),this.adjustChordsDuration(this.measure)&&e.push(this.measure)),this.measure=new s.Measure(e.length+1,this.options),e.length||(this.measure.attributes.push({divisions:this.options.divisions},{_name:"clef",_attrs:[{"print-object":this.options.clef?"yes":"no"}],_content:[{sign:"G"},{line:2}]},{"staff-details":{"staff-lines":0}},{"measure-style":[{_name:"slash",_attrs:{type:"start","use-stems":this.options.notation==="rhythmic"?"yes":"no"}}]},this.convertKey()),this.song.bpm&&this.measure.body._content.push(this.convertTempo(this.song.bpm)),this.measure.body._content.push(this.convertStyleAndGroove(this.song.style,this.song.groove))),this.measure.barlines.push(this.convertBarline(i.bars,"left")),this.barRepeat&&(this.measure.chords=[...e[e.length-this.barRepeat-1].chords])),!this.measure)return(i.chord||i.annots.length||i.comments.length||i.bars&&i.bars!==")")&&this._log(tt.Warn,`Found non-empty orphan cell ${JSON.stringify(i)}`,e[e.length-1]),this.emptyCells++,p(t)&&(this.emptyCellNewSystem=!0),e;if((p(t)||this.emptyCellNewSystem)&&this.measure.body._content.splice(0,0,{_name:"print",_attrs:{"new-system":"yes"},_content:{...this.emptyCellNewSystem&&{"system-layout":{"system-margins":[{"left-margin":s._mmToTenths(this.cellWidth*this.emptyCells)},{"right-margin":"0.00"}]}}}}),!this.emptyCellNewSystem&&this.emptyCells>0&&(this.measure.body._content[0]?._name==="print"&&this.measure.body._content[0]._attrs?.["new-system"]==="yes"?e[e.length-1].body._content.splice(0,0,{_name:"print",_content:{"system-layout":{"system-margins":[{"left-margin":"0.00"},{"right-margin":s._mmToTenths(this.cellWidth*this.emptyCells)}]}}}):this.measure.body._content.splice(0,0,{_name:"print",_content:{"measure-layout":{"measure-distance":s._mmToTenths(this.cellWidth*this.emptyCells)}}})),this.emptyCellNewSystem=!1,this.emptyCells=0,i.chord)switch(i.chord.note){case"x":{this.barRepeat=1,this.measure.chords=[...e[e.length-this.barRepeat].chords];break}case"r":{this.barRepeat=2,this.measure.chords=[...e[e.length-this.barRepeat].chords];break}case"p":if(this.measure.chords.length){this.measure.chords[this.measure.chords.length-1].spaces++;break}case"W":{let a=this.measure;if(a.chords.length||(a=e.slice().reverse().find(n=>n.chords.length),a||this._log(tt.Error,`Cannot find any measure with chords prior to ${JSON.stringify(i.chord)}`)),a){let n=a.chords[a.chords.length-1].ireal;n.over=i.chord.over,n.alternate=i.chord.alternate,this.measure.chords.push(this.convertChord(n))}break}case" ":{this._log(tt.Warn,`Unhandled empty/alternate chord ${JSON.stringify(i.chord)}`);break}default:this.measure.chords.push(this.convertChord(i.chord))}else this.barRepeat||this.measure.chords.length&&this.measure.chords[this.measure.chords.length-1].spaces++;return i.annots.forEach(a=>{switch(a[0]){case"*":{let n=a.slice(1);this.measure.body._content.push(this.convertSection(n));break}case"T":{let n=a.slice(1);this.measure.attributes.push(this.convertTime(n));break}case"S":{this.measure.body._content.push(this.convertSegno());break}case"N":{let n=parseInt(a.slice(1));if(n<1&&(n=e.slice().reverse().find(l=>!!l.barEnding)?.barEnding??1),this.measure.barlines[0]._content.push(this.convertEnding(n,"start")),n>1){e[e.length-1].barlines[1]._content.push(this.convertEnding(n-1,"stop"));let o=e.slice().reverse().find(l=>l.barEnding===n-1);if(!o)this._log(tt.Error,`Cannot find ending ${n-1} in right barline of any measure`);else{let l=o.barlines[1]._content.findIndex(h=>!!h&&h._name==="ending");l===-1&&this._log(tt.Error,`Cannot find ending ${n-1} in right barline`,o),delete o.barlines[1]._content[l]}}this.measure.barEnding=n;break}case"Q":{this.measure.body._content.push(this.convertToCoda()),this.codas.push(this.measure);break}case"l":case"s":break;case"f":{this.measure.chords[this.measure.chords.length-1].fermata=!0;break}case"U":{this.measure.body._content.push(this.convertFine("END"));break}default:this._log(tt.Warn,`Unhandled annotation "${a}"`)}}),i.comments.map(a=>a.trim()).forEach(a=>{let n=this._map(s.mapRepeats,a);n?this.measure.body._content.push(n.call(this,a)):this.measure.body._content.push(this.convertComment(a))}),i.bars.match(/\)|\}|\]|Z/)&&this.measure.chords.length&&(this.measure.barlines.push(this.convertBarline(i.bars,"right")),this.measure.barEnding&&this.measure.barlines[1]._content.push(this.convertEnding(this.measure.barEnding,"discontinue")),this.adjustChordsDuration(this.measure)&&e.push(this.measure),this.measure=null,this.barRepeat&&this.barRepeat--),e},[]),g=this.song.cells.length%16-this.emptyCells;if(g>0&&u.length>0&&u[u.length-1].body._content.splice(0,0,{_name:"print",_content:{"system-layout":{"system-margins":[{"left-margin":"0.00"},{"right-margin":s._mmToTenths(this.cellWidth*g)}]}}}),this.codas.length){let e=this.codas[this.codas.length-1],i=e.body._content.findIndex(t=>t._name==="direction"&&Array.isArray(t._content)&&t._content.some(a=>a._name==="sound"&&Object.keys(a._attrs).includes("tocoda")));i===-1&&this._log(tt.Warn,"Cannot find sound direction",e),e.body._content[i]=this.convertCoda()}return u.map(e=>e.assemble())}static reorderSequence(p,u,g){return u.filter(e=>Object.keys(e).length).sort((e,i)=>{let t=Object.keys(e)[0];t==="_name"&&(t=e[t]);let a=Object.keys(i)[0];a==="_name"&&(a=i[a]);let n=g.indexOf(t),o=g.indexOf(a);return n===-1&&this._log(tt.Warn,`Unrecognized element "${t}"`,p),o===-1&&this._log(tt.Warn,`Unrecognized element "${a}"`,p),n-o})}convertRepeatNx(p){let u=null;(u=p.match(/(\d+)x/))!==null&&(this.repeats=u[1])}convertFine(p){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:p}},{_name:"sound",_attrs:{fine:"yes"}}]}}convertDaCapo(p){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:p}},{_name:"sound",_attrs:{dacapo:"yes"}}]}}convertDalSegno(p){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:p}},{_name:"sound",_attrs:{dalsegno:"yes"}}]}}convertComment(p){return{_name:"direction",_attrs:{placement:p[0]==="*"?"above":"below"},_content:{"direction-type":{words:p[0]==="*"?p.slice(3):p}}}}convertEnding(p,u){return{_name:"ending",_attrs:{number:p,type:u},_content:`${p}.`}}convertBarline(p,u){let g="regular",e=null;return p.match(/\[|\]/)?g="light-light":p.match(/Z/)?g="light-heavy":p.match(/\{|\}/)&&(g=u==="left"?"heavy-light":"light-heavy",e=u==="left"?"forward":"backward"),e==="forward"&&(this.repeats=2),{_name:"barline",_attrs:{location:u},_content:[{"bar-style":g},{...e&&{_name:"repeat",_attrs:{direction:e,...e==="backward"&&{times:this.repeats}}}}]}}convertSection(p){return p==="i"&&(p="Intro"),{_name:"direction",_attrs:{placement:"above"},_content:{"direction-type":{rehearsal:p}}}}convertSegno(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"segno"}},{_name:"sound",_attrs:{segno:"segno"}}]}}convertCoda(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"coda"}},{_name:"sound",_attrs:{coda:"coda"}}]}}convertToCoda(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{words:"To Coda"}},{_name:"sound",_attrs:{tocoda:"coda"}}]}}convertTempo(p){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{_name:"metronome",_attrs:{parentheses:"no"},_content:[{"beat-unit":this.calculateChordDuration(1)[0].type},{"per-minute":p}]}]},{_name:"sound",_attrs:{tempo:p}}]}}convertTime(p){let u=parseInt(p[0]),g=parseInt(p[1]);return p==="12"&&(u=12,g=8),this.time={beats:u,beatType:g},{time:[{beats:u},{"beat-type":g}]}}adjustChordsDuration(p){if(p.chords.length>this.time.beats)return this._log(tt.Error,`Too many chords (${p.chords.length} out of ${this.time.beats})`,p),!0;let u=p.chords.reduce((g,e)=>g+1+e.spaces,0);if(!u)return this._log(tt.Warn,"No chord found. Skipping current measure.",p),!1;if(u>this.time.beats){let g=0;for(;u>this.time.beats;)p.chords[g].spaces>0&&(p.chords[g].spaces--,u--),g=(g+1)%p.chords.length}else{let g=0;for(;u(g.notes=this.calculateChordDuration(1+g.spaces).map((e,i,t)=>this.convertChordNote(e,i===t.length-1?g.fermata:!1,this.options.notation==="rhythmic"&&t.length>1?i>0?"stop":"start":null)),g)),!0}calculateChordDuration(p){let u={1:[{t:"eighth",d:0,b:1}],2:[{t:"quarter",d:0,b:2}],3:[{t:"quarter",d:1,b:3}],4:[{t:"half",d:0,b:4}],5:[{t:"quarter",d:1,b:3},{t:"quarter",d:0,b:2}],6:[{t:"half",d:1,b:6}],7:[{t:"half",d:2,b:7}],8:[{t:"whole",d:0,b:8}],9:[{t:"half",d:1,b:6},{t:"quarter",d:1,b:3}],10:[{t:"half",d:1,b:6},{t:"half",d:0,b:4}],11:[{t:"half",d:2,b:7},{t:"half",d:0,b:4}],12:[{t:"whole",d:1,b:12}],13:[{t:"half",d:2,b:7},{t:"half",d:1,b:6}],14:[{t:"whole",d:2,b:14}],15:[{t:"whole",d:0,b:8},{t:"half",d:2,b:7}]};if(this.options.notation==="slash"){let g=8/this.time.beatType;return Array(p).fill(this._map(u,g,[],`Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`).map(e=>({duration:e.b*this.options.divisions/2,type:e.t,dots:e.d}))[0])}else{let g=p*8/this.time.beatType;return this._map(u,g,[],`Unexpected beat count ${p} for time signature ${this.time.beats}/${this.time.beatType}`).map(e=>({duration:e.b*this.options.divisions/2,type:e.t,dots:e.d}))}}convertChordNote(p,u=!1,g=null){let e=s.mapFifthsToAlters[this.fifths>=0?"sharp":"flat"].slice(0,Math.abs(this.fifths)),i={_name:"pitch",_content:[{step:this.options.step},{alter:e.includes(this.options.step)?this.fifths>0?1:-1:0},{octave:this.options.octave}]},t=[];return u&&t.push({_name:"fermata"}),g&&t.push({_name:"tied",_attrs:{type:g}}),s.reorderSequence(this.measure,[i,{_name:"cue"},{_name:"notehead",_content:this.options.notehead,_attrs:[{"font-size":this.options.noteheadSize}]},{duration:p.duration},{voice:1},{_name:"type",_attrs:{size:"full"},_content:p.type},{...t.length&&{notations:s.reorderSequence(this.measure,t,s.sequenceNotations)}}].concat(Array(p.dots).fill({_name:"dot"})),s.sequenceNote)}convertChordDegree(p,u,g){return{_name:"degree",_attrs:{"print-object":"no"},_content:[{"degree-value":p},{"degree-alter":g},{"degree-type":u}]}}convertChordSymbol(p){let u=this.renderChord(this.parseChord(`${p.note}${p.modifiers}`));if(!u)return this._log(tt.Warn,`Unrecognized chord "${p.note}${p.modifiers}"`),{rootStep:null,rootAlter:null,chordKind:null,chordDegrees:[],chordText:null};let g=u.input.rootNote[0],e=this._map(s.mapAlter,u.input.rootNote[1]||null,null,`Unrecognized accidental in chord "${u.input.rootNote}"`),i=u.formatted.descriptor+u.formatted.chordChanges.join(""),t={major:"major",major6:"major-sixth",major7:"major-seventh",dominant7:"dominant",minor:"minor",minor6:"minor-sixth",minor7:"minor-seventh",minorMajor7:"major-minor",augmented:"augmented",diminished:"diminished",diminished7:"diminished-seventh",power:"power"},a=this._map(t,u.normalized.quality,"",`Unrecognized chord quality "${u.normalized.quality}"`);if(u.normalized.extensions.length){let o=Math.max(...u.normalized.extensions.map(h=>parseInt(h))).toString(),l={9:"-ninth",11:"-11th",13:"-13th"};a=a.split("-")[0]+this._map(l,o,"",`Unhandled extension ${o}`),a==="dominant-11th"&&(u.normalized.isSuspended=!1)}[{intervals:["1","4","5"],kind:"suspended-fourth",strict:!0},{intervals:["1","5","9"],kind:"suspended-second",strict:!0},{intervals:["1","b3","b5","b7"],kind:"half-diminished",strict:!0},{intervals:["1","3","#5","b7"],kind:"augmented-seventh",strict:!1}].some(o=>{if((!o.strict||u.normalized.intervals.length===o.intervals.length)&&o.intervals.every((l,h)=>l===u.normalized.intervals[h]))return a=o.kind,o.intervals.forEach(l=>{u.normalized.alterations=u.normalized.alterations.filter(h=>h===l),u.normalized.adds=u.normalized.adds.filter(h=>h===l),u.normalized.omits=u.normalized.omits.filter(h=>h===l)}),u.normalized.intervals.forEach(l=>{o.intervals.includes(l)||u.normalized.adds.push(l)}),!0});let n=[];return u.normalized.isSuspended&&!a.includes("suspended")&&(u.normalized.adds.push("4"),u.normalized.adds.includes("3")||u.normalized.omits.push("3")),u.normalized.alterations.forEach(o=>{let l=o.slice(1);n.push(this.convertChordDegree(l,l==="5"||u.normalized.extensions.includes(l)?"alter":"add",this._map(s.mapAlter,o[0],0,`Unrecognized alter symbol in "${o}"`)))}),u.normalized.adds.forEach(o=>{let l=Object.keys(s.mapAlter).includes(o[0])?o[0]:null,h=l?o.slice(1):o;n.push(this.convertChordDegree(h,"add",this._map(s.mapAlter,l,0,`Unrecognized alter symbol in "${o}"`)))}),u.normalized.omits.forEach(o=>{let l=Object.keys(s.mapAlter).includes(o[0])?o[0]:null,h=l?o.slice(1):o;n.push(this.convertChordDegree(h,"subtract",this._map(s.mapAlter,l,0,`Unrecognized alter symbol in "${o}"`)))}),{rootStep:g,rootAlter:e,chordKind:a,chordDegrees:n,chordText:i}}convertChord(p){let u=null;if(p.note==="n")u=[{root:[{_name:"root-step",_attrs:{text:""},_content:this.options.step}]},{_name:"kind",_attrs:{text:"N.C."},_content:"none"}];else{let{rootStep:g,rootAlter:e,chordKind:i,chordDegrees:t,chordText:a}=this.convertChordSymbol(p),n=p.over?[{"bass-step":p.over.note[0]},{...p.over.note[1]&&{"bass-alter":this._map(s.mapAlter,p.over.note[1],null,`Unrecognized accidental in bass note "${p.over.note}"`)}}]:null;u=[{root:[{"root-step":g},{...e&&{"root-alter":e}}]},{_name:"kind",_attrs:{text:a,"use-symbols":"no"},_content:i},{...n&&{bass:n}}].concat(t)}return p.alternate&&this._log(tt.Warn,`Unhandled alternate chord ${JSON.stringify(p.alternate)}`),new s.Chord(u,this.calculateChordDuration(1).map(g=>this.convertChordNote(g)),p)}convertKey(){let p={C:0,G:1,D:2,A:3,E:4,B:5,"F#":6,"C#":7,F:-1,Bb:-2,Eb:-3,Ab:-4,Db:-5,Gb:-6,Cb:-7,"A-":0,"E-":1,"B-":2,"F#-":3,"C#-":4,"G#-":5,"D#-":6,"A#-":7,"D-":-1,"G-":-2,"C-":-3,"F-":-4,"Bb-":-5,"Eb-":-6,"Ab-":-7};return this.fifths=this._map(p,this.song.key,0,`Unrecognized key signature "${this.song.key}"`),{_name:"key",_attrs:[{"print-object":this.options.keySignature?"yes":"no"}],_content:[{fifths:this.fifths},{mode:this.song.key.slice(-1)==="-"?"minor":"major"}]}}convertStyleAndGroove(p,u){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{words:p}]},{sound:[{play:[{_name:"other-play",_attrs:{type:"groove"},_content:u||p}]}]}]}}_log(p,u,g=this.measure){if(p{g.musicXml=$e.convert(g,p)}),u}async function Es(s,p={}){return new _n.default(u=>u(ns(s,p)))}})(); + + `.trim(), + indent: " " + }); + } + convertSong() { + return { + _name: "score-partwise", + _attrs: { "version": MUSICXML_VERSION }, + _content: [{ + "work": { + "work-title": this.song.title + } + }, { + "identification": [{ + _name: "creator", + _attrs: { "type": "composer" }, + _content: this.song.composer + }, { + "encoding": [{ + "software": `@infojunkie/ireal-musicxml ${Version.version}` + }, { ...this.options.date && { + "encoding-date": _Converter.convertDate(/* @__PURE__ */ new Date()) + } }, { + _name: "supports", + _attrs: { "element": "accidental", "type": "no" } + }, { + _name: "supports", + _attrs: { "element": "transpose", "type": "no" } + }, { + _name: "supports", + _attrs: { "attribute": "new-page", "element": "print", "type": "yes", "value": "yes" } + }, { + _name: "supports", + _attrs: { "attribute": "new-system", "element": "print", "type": "yes", "value": "yes" } + }] + }] + }, { + "defaults": { + "scaling": { + "millimeters": SCALING_MM, + "tenths": SCALING_TENTHS + }, + "page-layout": { + "page-height": _Converter._mmToTenths(this.options.pageHeight), + "page-width": _Converter._mmToTenths(this.options.pageWidth), + "page-margins": { + "left-margin": _Converter._mmToTenths(this.options.pageMargin, 4), + "right-margin": _Converter._mmToTenths(this.options.pageMargin, 4), + "top-margin": _Converter._mmToTenths(this.options.pageMargin, 4), + "bottom-margin": _Converter._mmToTenths(this.options.pageMargin, 4) + } + } + } + }, { + "part-list": { + _name: "score-part", + _attrs: { "id": "P1" }, + _content: { + _name: "part-name", + _attrs: { "print-object": "no" }, + _content: "Lead Sheet" + } + } + }, { + _name: "part", + _attrs: { "id": "P1" }, + _content: this.convertMeasures() + }] + }; + } + // Date in yyyy-mm-dd + // https://stackoverflow.com/a/50130338/209184 + static convertDate(date) { + return new Date(date.getTime() - date.getTimezoneOffset() * 6e4).toISOString().split("T")[0]; + } + static Measure = class { + constructor(number) { + this.body = { + _name: "measure", + _attrs: { "number": number }, + _content: [] + }; + this.attributes = []; + this.chords = []; + this.barlines = []; + this.barEnding = null; + } + number() { + return this.body["_attrs"]["number"]; + } + assemble() { + if (this.attributes.length) { + this.body["_content"].push({ + "attributes": _Converter.reorderSequence(this, this.attributes, _Converter.sequenceAttributes) + }); + } + this.chords.forEach((chord) => { + this.body["_content"].push({ + "harmony": chord.harmony + }, ...chord.notes.map((note) => { + return { + "note": note + }; + })); + }); + this.barlines[0]["_content"] = _Converter.reorderSequence(this, this.barlines[0]["_content"], _Converter.sequenceBarline); + this.body["_content"].splice(1, 0, this.barlines[0]); + this.barlines[1]["_content"] = _Converter.reorderSequence(this, this.barlines[1]["_content"], _Converter.sequenceBarline); + this.body["_content"].push(this.barlines[1]); + return this.body; + } + }; + static Chord = class { + constructor(harmony, notes, ireal) { + this.harmony = harmony; + this.notes = notes; + this.ireal = ireal; + this.spaces = 0; + this.fermata = false; + } + }; + convertMeasures() { + const isNewSystem = (cellIndex) => cellIndex > 0 && cellIndex % 16 === 0; + const measures = this.song.cells.reduce((measures2, cell, cellIndex) => { + if (cell.bars.match(/\(|\{|\[/) || !this.measure && (cell.chord || cell.annots.length || cell.comments.length)) { + if (this.measure) { + this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`); + this.measure.barlines.push(this.convertBarline("", "right")); + if (this.adjustChordsDuration(this.measure)) { + measures2.push(this.measure); + } + } + this.measure = new _Converter.Measure(measures2.length + 1, this.options); + if (!measures2.length) { + this.measure.attributes.push({ + "divisions": this.options.divisions + }, { + _name: "clef", + _attrs: [{ "print-object": this.options.clef ? "yes" : "no" }], + _content: [{ + "sign": "G" + }, { + "line": 2 + }] + }, { + "staff-details": { + "staff-lines": 0 + } + }, { + "measure-style": [{ + _name: "slash", + _attrs: { "type": "start", "use-stems": this.options.notation === "rhythmic" ? "yes" : "no" } + }] + }, this.convertKey()); + if (this.song.bpm) { + this.measure.body["_content"].push(this.convertTempo(this.song.bpm)); + } + this.measure.body["_content"].push(this.convertStyleAndGroove(this.song.style, this.song.groove)); + } + this.measure.barlines.push(this.convertBarline(cell.bars, "left")); + if (this.barRepeat) { + this.measure.chords = [...measures2[measures2.length - this.barRepeat - 1].chords]; + } + } + if (!this.measure) { + if (cell.chord || cell.annots.length || cell.comments.length || cell.bars && cell.bars !== ")") { + this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures2[measures2.length - 1]); + } + this.emptyCells++; + if (isNewSystem(cellIndex)) { + this.emptyCellNewSystem = true; + } + return measures2; + } + if (isNewSystem(cellIndex) || this.emptyCellNewSystem) { + this.measure.body["_content"].splice(0, 0, { + _name: "print", + _attrs: { "new-system": "yes" }, + _content: { ...this.emptyCellNewSystem && { + "system-layout": { + "system-margins": [{ + "left-margin": _Converter._mmToTenths(this.cellWidth * this.emptyCells) + }, { + "right-margin": "0.00" + }] + } + } } + }); + } + if (!this.emptyCellNewSystem && this.emptyCells > 0) { + if (this.measure.body["_content"][0]?.["_name"] === "print" && this.measure.body["_content"][0]["_attrs"]?.["new-system"] === "yes") { + measures2[measures2.length - 1].body["_content"].splice(0, 0, { + _name: "print", + _content: { + "system-layout": { + "system-margins": [{ + "left-margin": "0.00" + }, { + "right-margin": _Converter._mmToTenths(this.cellWidth * this.emptyCells) + }] + } + } + }); + } else { + this.measure.body["_content"].splice(0, 0, { + _name: "print", + _content: { + "measure-layout": { + "measure-distance": _Converter._mmToTenths(this.cellWidth * this.emptyCells) + } + } + }); + } + } + this.emptyCellNewSystem = false; + this.emptyCells = 0; + if (cell.chord) { + switch (cell.chord.note) { + case "x": { + this.barRepeat = 1; + this.measure.chords = [...measures2[measures2.length - this.barRepeat].chords]; + break; + } + case "r": { + this.barRepeat = 2; + this.measure.chords = [...measures2[measures2.length - this.barRepeat].chords]; + break; + } + case "p": + if (this.measure.chords.length) { + this.measure.chords[this.measure.chords.length - 1].spaces++; + break; + } + // Fall into case 'W'. + case "W": { + let target = this.measure; + if (!target.chords.length) { + target = measures2.slice().reverse().find((m) => m.chords.length); + if (!target) { + this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`); + } + } + if (target) { + const chord = target.chords[target.chords.length - 1].ireal; + chord.over = cell.chord.over; + chord.alternate = cell.chord.alternate; + this.measure.chords.push(this.convertChord(chord)); + } + break; + } + case " ": { + this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`); + break; + } + default: { + this.measure.chords.push(this.convertChord(cell.chord)); + } + } + } else if (!this.barRepeat) { + if (this.measure.chords.length) { + this.measure.chords[this.measure.chords.length - 1].spaces++; + } + } + cell.annots.forEach((annot) => { + switch (annot[0]) { + case "*": { + const section = annot.slice(1); + this.measure.body["_content"].push(this.convertSection(section)); + break; + } + case "T": { + const time = annot.slice(1); + this.measure.attributes.push(this.convertTime(time)); + break; + } + case "S": { + this.measure.body["_content"].push(this.convertSegno()); + break; + } + case "N": { + let ending = parseInt(annot.slice(1)); + if (ending < 1) { + const target = measures2.slice().reverse().find((m) => !!m.barEnding); + ending = target?.barEnding ?? 0 + 1; + } + this.measure.barlines[0]["_content"].push(this.convertEnding(ending, "start")); + if (ending > 1) { + measures2[measures2.length - 1].barlines[1]["_content"].push(this.convertEnding(ending - 1, "stop")); + const target = measures2.slice().reverse().find((m) => m.barEnding === ending - 1); + if (!target) { + this._log(LogLevel.Error, `Cannot find ending ${ending - 1} in right barline of any measure`); + } else { + const index = target.barlines[1]["_content"].findIndex((b) => !!b && b["_name"] === "ending"); + if (index === -1) { + this._log(LogLevel.Error, `Cannot find ending ${ending - 1} in right barline`, target); + } + delete target.barlines[1]["_content"][index]; + } + } + this.measure.barEnding = ending; + break; + } + case "Q": { + this.measure.body["_content"].push(this.convertToCoda()); + this.codas.push(this.measure); + break; + } + // Ignore small and large chord renderings. + case "l": + case "s": + break; + case "f": { + this.measure.chords[this.measure.chords.length - 1].fermata = true; + break; + } + case "U": { + this.measure.body["_content"].push(this.convertFine("END")); + break; + } + default: + this._log(LogLevel.Warn, `Unhandled annotation "${annot}"`); + } + }); + cell.comments.map((c) => c.trim()).forEach((comment) => { + const repeatFn = this._map(_Converter.mapRepeats, comment); + if (repeatFn) { + this.measure.body["_content"].push(repeatFn.call(this, comment)); + } else { + this.measure.body["_content"].push(this.convertComment(comment)); + } + }); + if (cell.bars.match(/\)|\}|\]|Z/) && this.measure.chords.length) { + this.measure.barlines.push(this.convertBarline(cell.bars, "right")); + if (this.measure.barEnding) { + this.measure.barlines[1]["_content"].push(this.convertEnding(this.measure.barEnding, "discontinue")); + } + if (this.adjustChordsDuration(this.measure)) { + measures2.push(this.measure); + } + this.measure = null; + if (this.barRepeat) this.barRepeat--; + } + return measures2; + }, []); + const remainingCells = this.song.cells.length % 16 - this.emptyCells; + if (remainingCells > 0 && measures.length > 0) { + measures[measures.length - 1].body["_content"].splice(0, 0, { + _name: "print", + _content: { + "system-layout": { + "system-margins": [{ + "left-margin": "0.00" + }, { + "right-margin": _Converter._mmToTenths(this.cellWidth * remainingCells) + }] + } + } + }); + } + if (this.codas.length) { + const target = this.codas[this.codas.length - 1]; + const direction = target.body["_content"].findIndex( + (d) => d["_name"] === "direction" && Array.isArray(d["_content"]) && d["_content"].some( + (s) => s["_name"] === "sound" && Object.keys(s["_attrs"]).includes("tocoda") + ) + ); + if (direction === -1) { + this._log(LogLevel.Warn, `Cannot find sound direction`, target); + } + target.body["_content"][direction] = this.convertCoda(); + } + return measures.map((measure) => measure.assemble()); + } + // Fix order of elements according to sequence as specified by an xs:sequence. + // @param {array} elements - Array of elements to sort. + // @param {array} sequence - Array of element names in order of xs:sequence. + // @return {array} Ordered array of elements. + static reorderSequence(measure, elements, sequence) { + return elements.filter((a) => Object.keys(a).length).sort((a1, a2) => { + let k1 = Object.keys(a1)[0]; + if (k1 === "_name") k1 = a1[k1]; + let k2 = Object.keys(a2)[0]; + if (k2 === "_name") k2 = a2[k2]; + const i1 = sequence.indexOf(k1); + const i2 = sequence.indexOf(k2); + if (i1 === -1) { + this._log(LogLevel.Warn, `Unrecognized element "${k1}"`, measure); + } + if (i2 === -1) { + this._log(LogLevel.Warn, `Unrecognized element "${k2}"`, measure); + } + return i1 - i2; + }); + } + convertRepeatNx(comment) { + let repeats = null; + if (null !== (repeats = comment.match(/(\d+)x/))) { + this.repeats = repeats[1]; + } + } + convertFine(comment) { + return { + _name: "direction", + _attrs: { "placement": "below" }, + _content: [{ + "direction-type": { + "words": comment + } + }, { + _name: "sound", + _attrs: { "fine": "yes" } + }] + }; + } + convertDaCapo(comment) { + return { + _name: "direction", + _attrs: { "placement": "below" }, + _content: [{ + "direction-type": { + "words": comment + } + }, { + _name: "sound", + _attrs: { "dacapo": "yes" } + }] + }; + } + convertDalSegno(comment) { + return { + _name: "direction", + _attrs: { "placement": "below" }, + _content: [{ + "direction-type": { + "words": comment + } + }, { + _name: "sound", + _attrs: { "dalsegno": "yes" } + }] + }; + } + convertComment(comment) { + return { + _name: "direction", + _attrs: { "placement": comment[0] === "*" ? "above" : "below" }, + _content: { + "direction-type": { + "words": comment[0] === "*" ? comment.slice(3) : comment + } + } + }; + } + convertEnding(ending, type) { + return { + _name: "ending", + _attrs: { "number": ending, "type": type }, + _content: `${ending}.` + }; + } + convertBarline(bars, location) { + let style = "regular"; + let repeat = null; + if (bars.match(/\[|\]/)) { + style = "light-light"; + } else if (bars.match(/Z/)) { + style = "light-heavy"; + } else if (bars.match(/\{|\}/)) { + style = location === "left" ? "heavy-light" : "light-heavy"; + repeat = location === "left" ? "forward" : "backward"; + } + if (repeat === "forward") { + this.repeats = 2; + } + return { + _name: "barline", + _attrs: { "location": location }, + _content: [{ + "bar-style": style + }, { ...repeat && { + _name: "repeat", + _attrs: { "direction": repeat, ...repeat === "backward" && { "times": this.repeats } } + } }] + }; + } + convertSection(section) { + if (section === "i") section = "Intro"; + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: { + "direction-type": { + "rehearsal": section + } + } + }; + } + convertSegno() { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": { + _name: "segno" + } + }, { + _name: "sound", + _attrs: { "segno": "segno" } + }] + }; + } + convertCoda() { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": { + "_name": "coda" + } + }, { + _name: "sound", + _attrs: { "coda": "coda" } + // TODO: We assume a single coda + }] + }; + } + convertToCoda() { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": { + "words": "To Coda" + } + }, { + _name: "sound", + _attrs: { "tocoda": "coda" } + // TODO: We assume a single coda + }] + }; + } + convertTempo(bpm) { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": [{ + _name: "metronome", + _attrs: { "parentheses": "no" }, + _content: [{ + "beat-unit": this.calculateChordDuration(1)[0].type + }, { + "per-minute": bpm + }] + }] + }, { + _name: "sound", + _attrs: { "tempo": bpm } + }] + }; + } + convertTime(time) { + let beats = parseInt(time[0]); + let beatType = parseInt(time[1]); + if (time === "12") { + beats = 12; + beatType = 8; + } + this.time = { beats, beatType }; + return { + "time": [{ + "beats": beats + }, { + "beat-type": beatType + }] + }; + } + adjustChordsDuration(measure) { + if (measure.chords.length > this.time.beats) { + this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure); + return true; + } + let beats = measure.chords.reduce((beats2, chord) => beats2 + 1 + chord.spaces, 0); + if (!beats) { + this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure); + return false; + } + if (beats > this.time.beats) { + let chordIndex = 0; + while (beats > this.time.beats) { + if (measure.chords[chordIndex].spaces > 0) { + measure.chords[chordIndex].spaces--; + beats--; + } + chordIndex = (chordIndex + 1) % measure.chords.length; + } + } else { + let chordIndex = 0; + while (beats < this.time.beats) { + measure.chords[chordIndex].spaces++; + beats++; + chordIndex = (chordIndex + 1) % measure.chords.length; + } + } + measure.chords = measure.chords.map((chord) => { + chord.notes = this.calculateChordDuration(1 + chord.spaces).map( + (duration, i, ds) => this.convertChordNote( + duration, + i === ds.length - 1 ? chord.fermata : false, + // Possible fermata on last chord note only + this.options.notation === "rhythmic" && ds.length > 1 ? i > 0 ? "stop" : "start" : null + // Possible tie in case of rhythmic notation + ) + ); + return chord; + }); + return true; + } + calculateChordDuration(beats) { + const mapDuration = { + "1": [{ t: "eighth", d: 0, b: 1 }], + "2": [{ t: "quarter", d: 0, b: 2 }], + "3": [{ t: "quarter", d: 1, b: 3 }], + "4": [{ t: "half", d: 0, b: 4 }], + "5": [{ t: "quarter", d: 1, b: 3 }, { t: "quarter", d: 0, b: 2 }], + "6": [{ t: "half", d: 1, b: 6 }], + "7": [{ t: "half", d: 2, b: 7 }], + "8": [{ t: "whole", d: 0, b: 8 }], + "9": [{ t: "half", d: 1, b: 6 }, { t: "quarter", d: 1, b: 3 }], + "10": [{ t: "half", d: 1, b: 6 }, { t: "half", d: 0, b: 4 }], + "11": [{ t: "half", d: 2, b: 7 }, { t: "half", d: 0, b: 4 }], + "12": [{ t: "whole", d: 1, b: 12 }], + "13": [{ t: "half", d: 2, b: 7 }, { t: "half", d: 1, b: 6 }], + "14": [{ t: "whole", d: 2, b: 14 }], + "15": [{ t: "whole", d: 0, b: 8 }, { t: "half", d: 2, b: 7 }] + }; + if (this.options.notation === "slash") { + const index = 1 * 8 / this.time.beatType; + return Array(beats).fill( + this._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`).map((duration) => { + return { + duration: duration.b * this.options.divisions / 2, + type: duration.t, + dots: duration.d + }; + })[0] + // We're sure to get only one entry in this case. + ); + } else { + const index = beats * 8 / this.time.beatType; + return this._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`).map((duration) => { + return { + duration: duration.b * this.options.divisions / 2, + type: duration.t, + dots: duration.d + }; + }); + } + } + convertChordNote(duration, fermata = false, tie = null) { + const altered = _Converter.mapFifthsToAlters[this.fifths >= 0 ? "sharp" : "flat"].slice(0, Math.abs(this.fifths)); + const noteType = { + _name: "pitch", + _content: [{ + "step": this.options.step + }, { + "alter": altered.includes(this.options.step) ? this.fifths > 0 ? 1 : -1 : 0 + }, { + "octave": this.options.octave + }] + }; + const notations = []; + if (fermata) { + notations.push({ _name: "fermata" }); + } + if (tie) { + notations.push({ _name: "tied", _attrs: { "type": tie } }); + } + return _Converter.reorderSequence(this.measure, [noteType, { + _name: "cue" + }, { + _name: "notehead", + _content: this.options.notehead, + _attrs: [{ "font-size": this.options.noteheadSize }] + }, { + "duration": duration.duration + }, { + "voice": 1 + }, { + _name: "type", + _attrs: { "size": "full" }, + _content: duration.type + }, { ...notations.length && { + "notations": _Converter.reorderSequence(this.measure, notations, _Converter.sequenceNotations) + } }].concat(Array(duration.dots).fill({ _name: "dot" })), _Converter.sequenceNote); + } + convertChordDegree(value, type, alter) { + return { + _name: "degree", + _attrs: { "print-object": "no" }, + _content: [{ + "degree-value": value + }, { + "degree-alter": alter + }, { + "degree-type": type + }] + }; + } + convertChordSymbol(chord) { + const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`)); + if (!parsedChord) { + this._log(LogLevel.Warn, `Unrecognized chord "${chord.note}${chord.modifiers}"`); + return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null }; + } + const rootStep = parsedChord.input.rootNote[0]; + const rootAlter = this._map(_Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord "${parsedChord.input.rootNote}"`); + const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join(""); + const mapKind = { + "major": "major", + "major6": "major-sixth", + "major7": "major-seventh", + "dominant7": "dominant", + "minor": "minor", + "minor6": "minor-sixth", + "minor7": "minor-seventh", + "minorMajor7": "major-minor", + "augmented": "augmented", + "diminished": "diminished", + "diminished7": "diminished-seventh", + "power": "power" + }; + let chordKind = this._map(mapKind, parsedChord.normalized.quality, "", `Unrecognized chord quality "${parsedChord.normalized.quality}"`); + if (parsedChord.normalized.extensions.length) { + const extension = Math.max(...parsedChord.normalized.extensions.map((e) => parseInt(e))).toString(); + const mapExtensionKind = { + "9": "-ninth", + "11": "-11th", + "13": "-13th" + }; + chordKind = chordKind.split("-")[0] + this._map(mapExtensionKind, extension, "", `Unhandled extension ${extension}`); + if (chordKind === "dominant-11th") { + parsedChord.normalized.isSuspended = false; + } + } + [ + { intervals: ["1", "4", "5"], kind: "suspended-fourth", strict: true }, + { intervals: ["1", "5", "9"], kind: "suspended-second", strict: true }, + { intervals: ["1", "b3", "b5", "b7"], kind: "half-diminished", strict: true }, + { intervals: ["1", "3", "#5", "b7"], kind: "augmented-seventh", strict: false } + ].some((chord2) => { + if ((!chord2.strict || parsedChord.normalized.intervals.length === chord2.intervals.length) && chord2.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])) { + chordKind = chord2.kind; + chord2.intervals.forEach((i) => { + parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter((p) => p === i); + parsedChord.normalized.adds = parsedChord.normalized.adds.filter((p) => p === i); + parsedChord.normalized.omits = parsedChord.normalized.omits.filter((p) => p === i); + }); + parsedChord.normalized.intervals.forEach((i) => { + if (!chord2.intervals.includes(i)) { + parsedChord.normalized.adds.push(i); + } + }); + return true; + } + }); + const chordDegrees = []; + if (parsedChord.normalized.isSuspended && !chordKind.includes("suspended")) { + parsedChord.normalized.adds.push("4"); + if (!parsedChord.normalized.adds.includes("3")) { + parsedChord.normalized.omits.push("3"); + } + } + parsedChord.normalized.alterations.forEach((alteration) => { + const degree = alteration.slice(1); + chordDegrees.push( + this.convertChordDegree( + degree, + degree === "5" || parsedChord.normalized.extensions.includes(degree) ? "alter" : "add", + this._map(_Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in "${alteration}"`) + ) + ); + }); + parsedChord.normalized.adds.forEach((add) => { + const alteration = Object.keys(_Converter.mapAlter).includes(add[0]) ? add[0] : null; + const degree = alteration ? add.slice(1) : add; + chordDegrees.push( + this.convertChordDegree(degree, "add", this._map(_Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in "${add}"`)) + ); + }); + parsedChord.normalized.omits.forEach((omit) => { + const alteration = Object.keys(_Converter.mapAlter).includes(omit[0]) ? omit[0] : null; + const degree = alteration ? omit.slice(1) : omit; + chordDegrees.push( + this.convertChordDegree(degree, "subtract", this._map(_Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in "${omit}"`)) + ); + }); + return { rootStep, rootAlter, chordKind, chordDegrees, chordText }; + } + convertChord(chord) { + let harmony = null; + if (chord.note === "n") { + harmony = [{ + "root": [{ + _name: "root-step", + _attrs: { "text": "" }, + _content: this.options.step + }] + }, { + _name: "kind", + _attrs: { "text": "N.C." }, + _content: "none" + }]; + } else { + const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord); + const bass = !chord.over ? null : [{ + "bass-step": chord.over.note[0] + }, { ...chord.over.note[1] && { + "bass-alter": this._map(_Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note "${chord.over.note}"`) + } }]; + harmony = [{ + "root": [{ + "root-step": rootStep + }, { ...rootAlter && { + // Don't generate the root-alter entry if rootAlter is blank + "root-alter": rootAlter + } }] + }, { + _name: "kind", + _attrs: { "text": chordText, "use-symbols": "no" }, + _content: chordKind + }, { ...bass && { + "bass": bass + } }].concat(chordDegrees); + } + if (chord.alternate) { + this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`); + } + return new _Converter.Chord( + harmony, + // Initial chord duration is 1 beat + this.calculateChordDuration(1).map((duration) => this.convertChordNote(duration)), + chord + ); + } + convertKey() { + const mapKeys = { + // Major keys + "C": 0, + "G": 1, + "D": 2, + "A": 3, + "E": 4, + "B": 5, + "F#": 6, + "C#": 7, + "F": -1, + "Bb": -2, + "Eb": -3, + "Ab": -4, + "Db": -5, + "Gb": -6, + "Cb": -7, + // Minor keys + "A-": 0, + "E-": 1, + "B-": 2, + "F#-": 3, + "C#-": 4, + "G#-": 5, + "D#-": 6, + "A#-": 7, + "D-": -1, + "G-": -2, + "C-": -3, + "F-": -4, + "Bb-": -5, + "Eb-": -6, + "Ab-": -7 + }; + this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature "${this.song.key}"`); + return { + _name: "key", + _attrs: [{ "print-object": this.options.keySignature ? "yes" : "no" }], + _content: [{ + "fifths": this.fifths + }, { + "mode": this.song.key.slice(-1) === "-" ? "minor" : "major" + }] + }; + } + convertStyleAndGroove(style, groove) { + return { + _name: "direction", + _attrs: { "placement": "above" }, + _content: [{ + "direction-type": [{ + "words": style + }] + }, { + "sound": [{ + "play": [{ + _name: "other-play", + _attrs: { "type": "groove" }, + _content: groove || style + }] + }] + }] + }; + } + _log(logLevel, message, measure = this.measure) { + if (logLevel < this.options.logLevel) return; + const log = `[ireal-musicxml] [${this.song.title}${measure ? "#" + measure.number() : ""}] ${message}`; + let method = "warn"; + switch (logLevel) { + case LogLevel.Debug: + method = "debug"; + break; + case LogLevel.Info: + method = "info"; + break; + case LogLevel.Warn: + method = "warn"; + break; + case LogLevel.Error: + method = "error"; + break; + } + console[method](log); + } + _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) { + if (!key) return defaultValue; + if (!(key in map)) { + if (message) { + this._log(logLevel, message, measure); + } + return defaultValue || null; + } + return map[key]; + } + static _mmToTenths(mm, decimals = 2) { + const value = mm * SCALING_TENTHS / SCALING_MM; + const power = Math.pow(10, decimals); + return Math.round(value * power) / power; + } +}; + +// src/lib/index.js +function convertSync(ireal, options = {}) { + const playlist = new Playlist(ireal); + playlist.songs.forEach((song) => { + song.musicXml = Converter.convert(song, options); + }); + return playlist; +} +async function convert(ireal, options = {}) { + return new import_promise.default((resolve) => resolve(convertSync(ireal, options))); +} +export { + Cell, + Chord, + Converter, + LogLevel, + Playlist, + Song, + Version, + convert, + convertSync +}; //# sourceMappingURL=ireal-musicxml.js.map diff --git a/build/ireal-musicxml.js.map b/build/ireal-musicxml.js.map index 4437a59..e5ce39e 100644 --- a/build/ireal-musicxml.js.map +++ b/build/ireal-musicxml.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../node_modules/asap/browser-raw.js", "../node_modules/promise/lib/core.js", "../node_modules/promise/lib/done.js", "../node_modules/promise/lib/finally.js", "../node_modules/promise/lib/es6-extensions.js", "../node_modules/asap/browser-asap.js", "../node_modules/promise/lib/node-extensions.js", "../node_modules/promise/lib/synchronous.js", "../node_modules/promise/lib/index.js", "../node_modules/promise/index.js", "../node_modules/fast-diff/diff.js", "../node_modules/jstoxml/dist/jstoxml.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/universalModuleDefinition", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_DataView.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Hash.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_ListCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Map.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_MapCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Promise.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Set.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_SetCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Stack.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Symbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Uint8Array.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_WeakMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_apply.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayEach.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayFilter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayIncludes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayIncludesWith.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayLikeKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayPush.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arraySome.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_assignValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_assocIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssign.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssignIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssignValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseClone.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseCreate.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseDifference.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFindIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFlatten.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseForOwn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGetAllKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGetTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseHasIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseInverter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsArguments.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsEqual.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsEqualDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsMatch.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsNaN.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsNative.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIteratee.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseMatches.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseMatchesProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_basePropertyDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseRest.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseSetToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseTimes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseTrim.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseUnary.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseUniq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_castPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneArrayBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneDataView.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneRegExp.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copyArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copyObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copySymbols.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copySymbolsIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_coreJsData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createBaseFor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createFind.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createInverter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_defineProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalArrays.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalByTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalObjects.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_freeGlobal.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getAllKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getAllKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getMapData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getMatchData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getNative.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getPrototype.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getRawTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getSymbols.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getSymbolsIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hasPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneByTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isFlattenable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isKey.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isKeyable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isMasked.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isPrototype.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isStrictComparable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapToArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_matchesStrictComparable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_memoizeCapped.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeCreate.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nodeUtil.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_objectToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_overArg.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_overRest.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_root.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setCacheAdd.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setToArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_shortOut.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_strictIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stringToPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_toKey.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_toSource.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_trimmedEndIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/clone.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/cloneDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/constant.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/difference.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/eq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/find.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/findIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/get.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/hasIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/identity.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/invert.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArguments.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArrayLike.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArrayLikeObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isEqual.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isFunction.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isLength.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isObjectLike.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/keys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/keysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/memoize.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/noop.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/property.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/stubArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/stubFalse.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toFinite.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toInteger.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toNumber.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/uniq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/without.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/bootstrap", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/compat get default export", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/define property getters", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/global", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/hasOwnProperty shorthand", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/make namespace object", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/node module decorator", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/chain.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/checkCustomFilters.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/notes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/ChordParsingError.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/hasElement.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/checkIntervalsConsistency.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/formatSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/qualities.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/formatSymbolParts.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/getParsableDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/initChord.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/nameIndividualChordNotes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/normalizeNotes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/normalizeDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/parseBase.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/modifiers.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/intervalsToSemitones.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/parseDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/chordParserFactory.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/shortenNormalized.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/simplify.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/transpose.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/convertNotationSystem.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/printer/text.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/printer/raw.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/chordRendererFactory.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/index.js", "../src/lib/index.js", "../src/lib/parser.js", "../src/lib/converter.js", "../package.json", "../src/lib/version.js"], - "sourcesContent": ["\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js\u2019s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n", "'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n", "'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._D);\n p._y = 1;\n p._z = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._y === 3) {\n val = val._z;\n }\n if (val._y === 1) return res(i, val._z);\n if (val._y === 2) reject(val._z);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nfunction onSettledFulfill(value) {\n return { status: 'fulfilled', value: value };\n}\nfunction onSettledReject(reason) {\n return { status: 'rejected', reason: reason };\n}\nfunction mapAllSettled(item) {\n if(item && (typeof item === 'object' || typeof item === 'function')){\n if(item instanceof Promise && item.then === Promise.prototype.then){\n return item.then(onSettledFulfill, onSettledReject);\n }\n var then = item.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(item)).then(onSettledFulfill, onSettledReject)\n }\n }\n\n return onSettledFulfill(item);\n}\nPromise.allSettled = function (iterable) {\n return Promise.all(iterableToArray(iterable).map(mapAllSettled));\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\nfunction getAggregateError(errors){\n if(typeof AggregateError === 'function'){\n return new AggregateError(errors,'All promises were rejected');\n }\n\n var error = new Error('All promises were rejected');\n\n error.name = 'AggregateError';\n error.errors = errors;\n\n return error;\n}\n\nPromise.any = function promiseAny(values) {\n return new Promise(function(resolve, reject) {\n var promises = iterableToArray(values);\n var hasResolved = false;\n var rejectionReasons = [];\n\n function resolveOnce(value) {\n if (!hasResolved) {\n hasResolved = true;\n resolve(value);\n }\n }\n\n function rejectionCheck(reason) {\n rejectionReasons.push(reason);\n\n if (rejectionReasons.length === promises.length) {\n reject(getAggregateError(rejectionReasons));\n }\n }\n\n if(promises.length === 0){\n reject(getAggregateError(rejectionReasons));\n } else {\n promises.forEach(function(value){\n Promise.resolve(value).then(resolveOnce, rejectionCheck);\n });\n }\n });\n};\n", "\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n", "'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._y === 3) {\n return this._z.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getReason = function () {\n if (this._y === 3) {\n return this._z.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getState = function () {\n if (this._y === 3) {\n return this._z.getState();\n }\n if (this._y === -1 || this._y === -2) {\n return 0;\n }\n\n return this._y;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n", "'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n", "'use strict';\n\nmodule.exports = require('./lib')\n", "/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @param {boolean} [cleanup] Apply semantic cleanup before returning.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n }\n return diffs;\n}\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)],\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = delta % 2 !== 0;\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (\n x1 < text1_length &&\n y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (\n x2 < text1_length &&\n y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ===\n text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n}\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\nfunction diff_commonOverlap_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: http://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n}\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = \"\";\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext.substring(i),\n shorttext.substring(j)\n );\n var suffixLength = diff_commonSuffix(\n longtext.substring(0, i),\n shorttext.substring(0, j)\n );\n if (best_common.length < suffixLength + prefixLength) {\n best_common =\n shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n best_shorttext_b,\n best_common,\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n );\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemantic(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastequality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (\n lastequality &&\n lastequality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastequality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0, [\n DIFF_DELETE,\n lastequality,\n ]);\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1),\n ]);\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2),\n ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n}\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemanticLossless(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n}\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (\n previous_equality >= 0 &&\n ends_with_pair_start(diffs[previous_equality][1])\n ) {\n var stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(\n 0,\n -1\n );\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n 0,\n commonlength\n );\n } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n text_insert.substring(0, commonlength),\n ]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n }\n // Delete the offending records and add the merged ones.\n var n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(\n pointer - n,\n n,\n [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]\n );\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = \"\";\n text_insert = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === \"\") {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) === diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n var ret = [];\n for (var i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after],\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n var oldRange =\n typeof cursor_pos === \"number\"\n ? { index: cursor_pos, length: 0 }\n : cursor_pos.oldRange;\n var newRange = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n var oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n var oldCursor = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n var newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n var newBefore = newText.slice(0, newCursor);\n var newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n var cursor = oldCursor;\n var newBefore = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n var oldPrefix = oldText.slice(0, oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n var newPrefix = newText.slice(0, prefixLength);\n var newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos, cleanup) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, cleanup, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n", "(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.jstoxml = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.toXML = _exports.default = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n var ARRAY = \"array\";\n var BOOLEAN = \"boolean\";\n var DATE = \"date\";\n var NULL = \"null\";\n var NUMBER = \"number\";\n var OBJECT = \"object\";\n var SPECIAL_OBJECT = \"special-object\";\n var STRING = \"string\";\n var PRIVATE_VARS = [\"_selfCloseTag\", \"_attrs\"];\n var PRIVATE_VARS_REGEXP = new RegExp(PRIVATE_VARS.join(\"|\"), \"g\");\n /**\n * Determines the indent string based on current tree depth.\n */\n\n var getIndentStr = function getIndentStr() {\n var indent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return indent.repeat(depth);\n };\n /**\n * Sugar function supplementing JS's quirky typeof operator, plus some extra help to detect\n * \"special objects\" expected by jstoxml.\n * Example:\n * getType(new Date());\n * -> 'date'\n */\n\n\n var getType = function getType(val) {\n return Array.isArray(val) && ARRAY || _typeof(val) === OBJECT && val !== null && val._name && SPECIAL_OBJECT || val instanceof Date && DATE || val === null && NULL || _typeof(val);\n };\n /**\n * Replaces matching values in a string with a new value.\n * Example:\n * filterStr('foo&bar', { '&': '&' });\n * -> 'foo&bar'\n */\n\n\n var filterStr = function filterStr() {\n var inputStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Passthrough/no-op for nonstrings (e.g. number, boolean).\n if (typeof inputStr !== \"string\") {\n return inputStr;\n }\n\n var regexp = new RegExp(\"(\".concat(Object.keys(filter).join(\"|\"), \")(?!(\\\\w|#)*;)\"), \"g\");\n return String(inputStr).replace(regexp, function (str, entity) {\n return filter[entity] || \"\";\n });\n };\n /**\n * Maps an object or array of arribute keyval pairs to a string.\n * Examples:\n * { foo: 'bar', baz: 'g' } -> 'foo=\"bar\" baz=\"g\"'\n * [ { \u26A1: true }, { foo: 'bar' } ] -> '\u26A1 foo=\"bar\"'\n */\n\n\n var getAttributeKeyVals = function getAttributeKeyVals() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = [];\n\n if (Array.isArray(attributes)) {\n // Array containing complex objects and potentially duplicate attributes.\n keyVals = attributes.map(function (attr) {\n var key = Object.keys(attr)[0];\n var val = attr[key];\n var filteredVal = filter ? filterStr(val, filter) : val;\n var valStr = filteredVal === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n } else {\n var keys = Object.keys(attributes);\n keyVals = keys.map(function (key) {\n // Simple object - keyval pairs.\n // For boolean true, simply output the key.\n var filteredVal = filter ? filterStr(attributes[key], filter) : attributes[key];\n var valStr = attributes[key] === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n }\n\n return keyVals;\n };\n /**\n * Converts an attributes object/array to a string of keyval pairs.\n * Example:\n * formatAttributes({ a: 1, b: 2 })\n * -> 'a=\"1\" b=\"2\"'\n */\n\n\n var formatAttributes = function formatAttributes() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = getAttributeKeyVals(attributes, filter);\n if (keyVals.length === 0) return \"\";\n var keysValsJoined = keyVals.join(\" \");\n return \" \".concat(keysValsJoined);\n };\n /**\n * Converts an object to a jstoxml array.\n * Example:\n * objToArray({ foo: 'bar', baz: 2 });\n * ->\n * [\n * {\n * _name: 'foo',\n * _content: 'bar'\n * },\n * {\n * _name: 'baz',\n * _content: 2\n * }\n * ]\n */\n\n\n var objToArray = function objToArray() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(obj).map(function (key) {\n return {\n _name: key,\n _content: obj[key]\n };\n });\n };\n /**\n * Determines if a value is a primitive JavaScript value (not including Symbol).\n * Example:\n * isPrimitive(4);\n * -> true\n */\n\n\n var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN];\n\n var isPrimitive = function isPrimitive(val) {\n return PRIMITIVE_TYPES.includes(getType(val));\n };\n /**\n * Determines if a value is a simple primitive type that can fit onto one line. Needed for\n * determining any needed indenting and line breaks.\n * Example:\n * isSimpleType(new Date());\n * -> true\n */\n\n\n var SIMPLE_TYPES = [].concat(PRIMITIVE_TYPES, [DATE, SPECIAL_OBJECT]);\n\n var isSimpleType = function isSimpleType(val) {\n return SIMPLE_TYPES.includes(getType(val));\n };\n /**\n * Determines if an XML string is a simple primitive, or contains nested data.\n * Example:\n * isSimpleXML('');\n * -> false\n */\n\n\n var isSimpleXML = function isSimpleXML(xmlStr) {\n return !xmlStr.match(\"<\");\n };\n /**\n * Assembles an XML header as defined by the config.\n */\n\n\n var DEFAULT_XML_HEADER = '';\n\n var getHeaderString = function getHeaderString(_ref) {\n var header = _ref.header,\n indent = _ref.indent,\n isOutputStart = _ref.isOutputStart;\n var shouldOutputHeader = header && isOutputStart;\n if (!shouldOutputHeader) return \"\";\n var shouldUseDefaultHeader = _typeof(header) === BOOLEAN; // return `${shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header}${indent ? \"\\n\" : \"\"\n // }`;\n\n return shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header;\n };\n /**\n * Recursively traverses an object tree and converts the output to an XML string.\n * Example:\n * toXML({ foo: 'bar' });\n * -> bar\n */\n\n\n var defaultEntityFilter = {\n \"<\": \"<\",\n \">\": \">\",\n \"&\": \"&\"\n };\n\n var toXML = function toXML() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _config$depth = config.depth,\n depth = _config$depth === void 0 ? 0 : _config$depth,\n indent = config.indent,\n _isFirstItem = config._isFirstItem,\n _config$_isOutputStar = config._isOutputStart,\n _isOutputStart = _config$_isOutputStar === void 0 ? true : _config$_isOutputStar,\n header = config.header,\n _config$attributesFil = config.attributesFilter,\n rawAttributesFilter = _config$attributesFil === void 0 ? {} : _config$attributesFil,\n _config$filter = config.filter,\n rawFilter = _config$filter === void 0 ? {} : _config$filter;\n\n var shouldTurnOffAttributesFilter = typeof rawAttributesFilter === 'boolean' && !rawAttributesFilter;\n var attributesFilter = shouldTurnOffAttributesFilter ? {} : _objectSpread(_objectSpread(_objectSpread({}, defaultEntityFilter), {\n '\"': \""\"\n }), rawAttributesFilter);\n var shouldTurnOffFilter = typeof rawFilter === 'boolean' && !rawFilter;\n var filter = shouldTurnOffFilter ? {} : _objectSpread(_objectSpread({}, defaultEntityFilter), rawFilter); // Determine indent string based on depth.\n\n var indentStr = getIndentStr(indent, depth); // For branching based on value type.\n\n var valType = getType(obj);\n var headerStr = getHeaderString({\n header: header,\n indent: indent,\n depth: depth,\n isOutputStart: _isOutputStart\n });\n var isOutputStart = _isOutputStart && !headerStr && _isFirstItem && depth === 0;\n var outputStr = \"\";\n\n switch (valType) {\n case \"special-object\":\n {\n // Processes a specially-formatted object used by jstoxml.\n var _name = obj._name,\n _content = obj._content; // Output text content without a tag wrapper.\n\n if (_content === null) {\n outputStr = _name;\n break;\n } // Handles arrays of primitive values. (#33)\n\n\n var isArrayOfPrimitives = Array.isArray(_content) && _content.every(isPrimitive);\n\n if (isArrayOfPrimitives) {\n var primitives = _content.map(function (a) {\n return toXML({\n _name: _name,\n _content: a\n }, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth,\n _isOutputStart: false\n }));\n });\n\n return primitives.join('');\n } // Don't output private vars (such as _attrs).\n\n\n if (_name.match(PRIVATE_VARS_REGEXP)) break; // Process the nested new value and create new config.\n\n var newVal = toXML(_content, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth + 1,\n _isOutputStart: isOutputStart\n }));\n var newValType = getType(newVal);\n var isNewValSimple = isSimpleXML(newVal); // Pre-tag output (indent and line breaks).\n\n var preIndentStr = indent && !isOutputStart ? \"\\n\" : \"\";\n var preTag = \"\".concat(preIndentStr).concat(indentStr); // Special handling for comments, preserving preceding line breaks/indents.\n\n if (_name === '_comment') {\n outputStr += \"\".concat(preTag, \"\");\n break;\n } // Tag output.\n\n\n var valIsEmpty = newValType === \"undefined\" || newVal === \"\";\n var shouldSelfClose = _typeof(obj._selfCloseTag) === BOOLEAN ? valIsEmpty && obj._selfCloseTag : valIsEmpty;\n var selfCloseStr = shouldSelfClose ? \"/\" : \"\";\n var attributesString = formatAttributes(obj._attrs, attributesFilter);\n var tag = \"<\".concat(_name).concat(attributesString).concat(selfCloseStr, \">\"); // Post-tag output (closing tag, indent, line breaks).\n\n var preTagCloseStr = indent && !isNewValSimple ? \"\\n\".concat(indentStr) : \"\";\n var postTag = !shouldSelfClose ? \"\".concat(newVal).concat(preTagCloseStr, \"\") : \"\";\n outputStr += \"\".concat(preTag).concat(tag).concat(postTag);\n break;\n }\n\n case \"object\":\n {\n // Iterates over keyval pairs in an object, converting each item to a special-object.\n var keys = Object.keys(obj);\n var outputArr = keys.map(function (key, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === keys.length,\n _isOutputStart: isOutputStart\n });\n\n var outputObj = {\n _name: key\n };\n\n if (getType(obj[key]) === \"object\") {\n // Sub-object contains an object.\n // Move private vars up as needed. Needed to support certain types of objects\n // E.g. { foo: { _attrs: { a: 1 } } } -> \n PRIVATE_VARS.forEach(function (privateVar) {\n var val = obj[key][privateVar];\n\n if (typeof val !== \"undefined\") {\n outputObj[privateVar] = val;\n delete obj[key][privateVar];\n }\n });\n var hasContent = typeof obj[key]._content !== \"undefined\";\n\n if (hasContent) {\n // _content has sibling keys, so pass as an array (edge case).\n // E.g. { foo: 'bar', _content: { baz: 2 } } -> bar2\n if (Object.keys(obj[key]).length > 1) {\n var newContentObj = Object.assign({}, obj[key]);\n delete newContentObj._content;\n outputObj._content = [].concat(_toConsumableArray(objToArray(newContentObj)), [obj[key]._content]);\n }\n }\n } // Fallthrough: just pass the key as the content for the new special-object.\n\n\n if (typeof outputObj._content === \"undefined\") outputObj._content = obj[key];\n var xml = toXML(outputObj, newConfig, key);\n return xml;\n }, config);\n outputStr = outputArr.join('');\n break;\n }\n\n case \"function\":\n {\n // Executes a user-defined function and returns output.\n var fnResult = obj(config);\n outputStr = toXML(fnResult, config);\n break;\n }\n\n case \"array\":\n {\n // Iterates and converts each value in an array.\n var _outputArr = obj.map(function (singleVal, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === obj.length,\n _isOutputStart: isOutputStart\n });\n\n return toXML(singleVal, newConfig);\n });\n\n outputStr = _outputArr.join('');\n break;\n }\n // number, string, boolean, date, null, etc\n\n default:\n {\n outputStr = filterStr(obj, filter);\n break;\n }\n }\n\n return \"\".concat(headerStr).concat(outputStr);\n };\n\n _exports.toXML = toXML;\n var _default = {\n toXML: toXML\n };\n _exports.default = _default;\n});\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"chord-symbol\"] = factory();\n\telse\n\t\troot[\"chord-symbol\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn ", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n", "var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n", "var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n", "var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n", "var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n", "var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n", "var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n", "var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseForOwn = require('./_baseForOwn');\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nmodule.exports = baseInverter;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n", "var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n", "var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n", "var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n", "var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n", "var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n", "var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n", "var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n", "var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n", "var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n", "var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n", "var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n", "var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n", "var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n", "var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n", "var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", "var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n", "var baseInverter = require('./_baseInverter');\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nmodule.exports = createInverter;\n", "var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n", "var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n", "var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n", "var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n", "var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n", "var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n", "var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n", "var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n", "var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n", "var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n", "var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n", "var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n", "var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n", "var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n", "var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n", "var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n", "var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n", "var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n", "var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", "var constant = require('./constant'),\n createInverter = require('./_createInverter'),\n identity = require('./identity');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nmodule.exports = invert;\n", "var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n", "var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n", "var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n", "var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n", "var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", "var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n", "var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n", "var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n", "var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n", "var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};", "// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();", "__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))", "// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};", "/**\n * Execute given functions in sequence, feeding the result of one as an input to the next.\n *\n * @param {Function[]} allFunctions\n * @param {*} input - parameter given to the first function\n * @returns {*} return value of the last function\n */\nexport default function chain(allFunctions, input) {\n\treturn allFunctions.reduce((value, fn) => {\n\t\treturn value ? fn(value) : null;\n\t}, input);\n}\n", "const checkCustomFilters = (customFilters) => {\n\tif (!Array.isArray(customFilters)) {\n\t\tthrow new TypeError('customFilters should be given as an array');\n\t}\n\tif (customFilters.some((filter) => typeof filter !== 'function')) {\n\t\tthrow new TypeError(`The given filter is not a function`);\n\t}\n\treturn true;\n};\n\nexport default checkCustomFilters;\n", "const notes = {\n\tAFlat: 'Ab',\n\tA: 'A',\n\tASharp: 'A#',\n\tBFlat: 'Bb',\n\tB: 'B',\n\tC: 'C',\n\tCSharp: 'C#',\n\tDFlat: 'Db',\n\tD: 'D',\n\tDSharp: 'D#',\n\tEFlat: 'Eb',\n\tE: 'E',\n\tF: 'F',\n\tFSharp: 'F#',\n\tGFlat: 'Gb',\n\tG: 'G',\n\tGSharp: 'G#',\n};\n\nconst english = {\n\tAb: notes.AFlat,\n\tA: notes.A,\n\t'A#': notes.ASharp,\n\tBb: notes.BFlat,\n\tB: notes.B,\n\t'B#': notes.C,\n\tCb: notes.B,\n\tC: notes.C,\n\t'C#': notes.CSharp,\n\tDb: notes.DFlat,\n\tD: notes.D,\n\t'D#': notes.DSharp,\n\tEb: notes.EFlat,\n\tE: notes.E,\n\t'E#': notes.F,\n\tFb: notes.E,\n\tF: notes.F,\n\t'F#': notes.FSharp,\n\tGb: notes.GFlat,\n\tG: notes.G,\n\t'G#': notes.GSharp,\n};\n\nconst latin = {\n\tLab: notes.AFlat,\n\tLa: notes.A,\n\t'La#': notes.ASharp,\n\tSib: notes.BFlat,\n\tSi: notes.B,\n\t'Si#': notes.C,\n\tDob: notes.B,\n\tDo: notes.C,\n\t'Do#': notes.CSharp,\n\tReb: notes.DFlat,\n\tRéb: notes.DFlat,\n\tRe: notes.D,\n\tRé: notes.D,\n\t'Re#': notes.DSharp,\n\t'Ré#': notes.DSharp,\n\tMib: notes.EFlat,\n\tMi: notes.E,\n\t'Mi#': notes.F,\n\tFab: notes.E,\n\tFa: notes.F,\n\t'Fa#': notes.FSharp,\n\tSolb: notes.GFlat,\n\tSol: notes.G,\n\t'Sol#': notes.GSharp,\n};\n\nconst german = {\n\tAs: notes.AFlat,\n\tA: notes.A,\n\tAis: notes.ASharp,\n\tHes: notes.BFlat,\n\tH: notes.B,\n\tHis: notes.C,\n\tCes: notes.B,\n\tC: notes.C,\n\tCis: notes.CSharp,\n\tDes: notes.DFlat,\n\tD: notes.D,\n\tDis: notes.DSharp,\n\tEs: notes.EFlat,\n\tE: notes.E,\n\tEis: notes.F,\n\tFes: notes.E,\n\tF: notes.F,\n\tFis: notes.FSharp,\n\tGes: notes.GFlat,\n\tG: notes.G,\n\tGis: notes.GSharp,\n};\n\nfunction getAccidentalsVariation(source) {\n\tlet variant;\n\treturn Object.keys(source).reduce((acc, curr) => {\n\t\tif (curr.match(/.[b|#]$/)) {\n\t\t\tvariant = curr.replace('#', '♯').replace('b', '♭');\n\t\t\tacc[variant] = source[curr];\n\t\t}\n\t\treturn acc;\n\t}, {});\n}\n\nconst englishVariantsToNotes = {\n\t...english,\n\t...getAccidentalsVariation(english),\n};\n\nconst latinVariantsToNotes = {\n\t...latin,\n\t...getAccidentalsVariation(latin),\n};\n\nconst germanVariantsToNotes = {\n\t...german,\n};\n\nconst allVariantsToNotes = {\n\t...englishVariantsToNotes,\n\t...latinVariantsToNotes,\n\t...germanVariantsToNotes,\n};\n\nconst allVariants = Object.keys(allVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst englishVariants = Object.keys(englishVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst latinVariants = Object.keys(latinVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst germanVariants = Object.keys(germanVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst allVariantsPerGroup = [\n\t{ name: 'english', notes: englishVariants },\n\t{ name: 'german', notes: germanVariants },\n\t{ name: 'latin', notes: latinVariants },\n];\n\nexport {\n\tnotes,\n\tallVariants,\n\tallVariantsPerGroup,\n\tenglishVariants,\n\tlatinVariants,\n\tgermanVariants,\n\tallVariantsToNotes,\n\tenglishVariantsToNotes,\n\tlatinVariantsToNotes,\n\tgermanVariantsToNotes,\n};\n", "class InvalidInputError extends Error {\n\t/**\n\t * The parser was not given a valid string to parse\n\t * ex: `parseChord(null)`\n\t */\n\tconstructor() {\n\t\tsuper('The given symbol is not a valid string');\n\t\tthis.name = 'InvalidInput';\n\t}\n}\n\nclass UnexpectedError extends Error {\n\t/**\n\t * This error is very unlikely to happen.\n\t * If it does, it is probably in the context of a custom filter that returns `null` instead of throwing an exception.\n\t */\n\tconstructor() {\n\t\tconst message =\n\t\t\t'An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?';\n\t\tsuper(message);\n\t\tthis.name = 'UnexpectedError';\n\t}\n}\n\nclass ChordSymbolError extends Error {\n\tconstructor(message, chord, errorName) {\n\t\tsuper(message);\n\t\tthis.name = errorName;\n\t\tthis.chord = chord;\n\t}\n}\n\nclass NoSymbolFoundError extends ChordSymbolError {\n\t/**\n\t * The given string cannot be confused with a chord symbol in the current notation system\n\t * ex: `parseChord('Ape')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t */\n\tconstructor(chord) {\n\t\tconst message = `\"${chord.input.symbol}\" does not seems to be a chord`;\n\t\tsuper(message, chord, 'NoSymbolFound');\n\t}\n}\n\nclass InvalidModifierError extends ChordSymbolError {\n\t/**\n\t * The given string looks like a chord symbol, but `ChordSymbol` does not understand its descriptor.\n\t * It can be either because of a typo, or just because the given word is not a symbol.\n\t * ex: `parseChord('Amid')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String} invalidChars - the characters that proved problematic when parsing the symbol\n\t */\n\tconstructor(chord, invalidChars) {\n\t\tconst message = `The chord descriptor \"${chord.input.descriptor}\" contains unknown or duplicated modifiers: \"${invalidChars}\"`;\n\t\tsuper(message, chord, 'InvalidModifier');\n\t}\n}\n\nclass InvalidIntervalsError extends ChordSymbolError {\n\t/**\n\t * The given string is a chord symbol, but the resulting interval list is not valid\n\t * ex: `parseChord('A7M7')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String[]} forbiddenCombo - intervals that should not belong together in a chord\n\t */\n\tconstructor(chord, forbiddenCombo) {\n\t\tconst message =\n\t\t\t`\"${chord.input.symbol}\" describes a chord with an invalid intervals combo: ` +\n\t\t\tforbiddenCombo.join(' and ');\n\t\tsuper(message, chord, 'InvalidIntervals');\n\t}\n}\n\nexport {\n\tInvalidInputError,\n\tInvalidIntervalsError,\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n\tUnexpectedError,\n};\n", "import _isArray from 'lodash/isArray';\nimport _isEqual from 'lodash/isEqual';\n\nfunction hasExactly(allIntervals, search) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\treturn _isEqual(allIntervals, arraySearch);\n}\n\nfunction hasOneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'oneOf');\n}\n\nfunction hasAll(allIntervals, search) {\n\treturn has(allIntervals, search, 'all');\n}\n\nfunction hasNoneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'none');\n}\n\nfunction has(allIntervals, search, require) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\n\tconst lookupMethod = require === 'oneOf' ? 'some' : 'every';\n\n\treturn arraySearch[lookupMethod]((interval) => {\n\t\treturn require === 'none'\n\t\t\t? !allIntervals.includes(interval)\n\t\t\t: allIntervals.includes(interval);\n\t});\n}\n\nexport { hasExactly, hasOneOf, hasAll, hasNoneOf };\n", "import { hasAll } from '../../helpers/hasElement';\nimport { InvalidIntervalsError } from '../../helpers/ChordParsingError';\n\nconst allForbiddenCombos = [\n\t['2', '3'],\n\t['2', '9'],\n\t['3', 'b3'],\n\t//['3', '4'], // valid in the Real Book: F#7SUS(add 3)\n\t['4', '11'],\n\t['5', 'b5'],\n\t['5', '#5'],\n\t['b6', '#5'],\n\t['b6', '6'],\n\t['b6', '13'],\n\t['6', '13'],\n\t['b7', 'bb7'],\n\t['7', 'b7'],\n\t['9', 'b9'],\n\t['9', '#9'],\n\t['11', '#11'],\n\t['13', 'b13'],\n];\n\n/**\n * Check parsed interval list to detect potential inconsistencies\n *\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function checkIntervalsConsistency(chord) {\n\tconst intervals = chord.normalized.intervals;\n\n\tconst forbiddenCombo = allForbiddenCombos.find((combo) =>\n\t\thasAll(intervals, combo)\n\t);\n\n\tif (forbiddenCombo) {\n\t\tthrow new InvalidIntervalsError(chord, forbiddenCombo);\n\t}\n\n\treturn chord;\n}\n", "/**\n * Render the chord by assembling all its components\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbol(chord) {\n\tconst { rootNote, bassNote, descriptor, chordChanges } = chord.formatted;\n\n\tlet symbol = rootNote;\n\n\tif (descriptor) {\n\t\tsymbol += descriptor;\n\t}\n\tif (chordChanges && chordChanges.length) {\n\t\tsymbol += '(' + chordChanges.join(',') + ')';\n\t}\n\tif (bassNote) {\n\t\tsymbol += '/' + bassNote;\n\t}\n\n\tchord.formatted.symbol = symbol;\n\n\treturn chord;\n}\n", "const qualities = {\n\tma: 'major',\n\tma6: 'major6',\n\tma7: 'major7',\n\tdom7: 'dominant7',\n\n\tmi: 'minor',\n\tmi6: 'minor6',\n\tmi7: 'minor7',\n\tmiMa7: 'minorMajor7',\n\n\taug: 'augmented',\n\tdim: 'diminished',\n\tdim7: 'diminished7',\n\n\tpower: 'power',\n\tbass: 'bass',\n};\n\nconst majorQualities = [\n\tqualities.ma,\n\tqualities.ma6,\n\tqualities.ma7,\n\tqualities.dom7,\n\tqualities.aug,\n];\n\nconst minorQualities = [\n\tqualities.mi,\n\tqualities.mi6,\n\tqualities.mi7,\n\tqualities.miMa7,\n\tqualities.dim,\n\tqualities.dim7,\n];\n\nexport { qualities, majorQualities, minorQualities };\n", "import { qualities } from '../../dictionaries/qualities';\nimport { hasNoneOf } from '../../helpers/hasElement';\n\nconst qualityToDescriptor = {\n\t[qualities.ma]: () => '',\n\t[qualities.ma6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? '69' : '6',\n\t[qualities.ma7]: (chord) => 'ma' + getHighestExtension(chord),\n\t[qualities.dom7]: (chord) =>\n\t\tchord.normalized.intents.alt ? '7alt' : getHighestExtension(chord),\n\n\t[qualities.mi]: () => 'mi',\n\t[qualities.mi6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? 'mi69' : 'mi6',\n\t[qualities.mi7]: (chord) => 'mi' + getHighestExtension(chord),\n\t[qualities.miMa7]: (chord) => 'miMa' + getHighestExtension(chord),\n\n\t[qualities.aug]: () => '+',\n\t[qualities.dim]: () => 'dim',\n\t[qualities.dim7]: () => 'dim7',\n\n\t[qualities.power]: () => '5',\n\t[qualities.bass]: () => ' bass',\n};\n\nconst chordChangesDescriptors = {\n\tadd: 'add',\n\tadd7: 'Ma7',\n\tomit: 'omit',\n\tsus: 'sus',\n};\n\n/**\n * Pre-render the chord by formatting all his components: root and bass notes, descriptor and changes\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbolParts(chord) {\n\tchord.formatted = {\n\t\trootNote: chord.normalized.rootNote,\n\t\tbassNote: chord.normalized.bassNote,\n\t\tdescriptor: getDescriptor(chord),\n\t\tchordChanges: getChordChanges(chord),\n\t};\n\treturn chord;\n}\n\nfunction getDescriptor(chord) {\n\tlet descriptor = qualityToDescriptor[chord.normalized.quality](chord);\n\tif (chord.normalized.isSuspended) {\n\t\tdescriptor += chordChangesDescriptors.sus;\n\t}\n\treturn descriptor;\n}\n\nfunction getHighestExtension(chord) {\n\tconst extensions = chord.normalized.extensions;\n\n\tlet highestExtension = extensions[extensions.length - 1];\n\n\tif (highestExtension === '11' && chord.normalized.intents.major) {\n\t\thighestExtension = hasNoneOf(chord.normalized.alterations, ['b9', '#9'])\n\t\t\t? '9'\n\t\t\t: '7';\n\t}\n\treturn highestExtension || '7';\n}\n\nfunction getChordChanges(chord) {\n\tconst formattedOmits = formatOmits(chord.normalized.omits);\n\n\tif (isAltered(chord)) {\n\t\treturn formattedOmits;\n\t}\n\n\tconst formattedAdds = formatAdds(\n\t\tchord.normalized.quality,\n\t\tchord.normalized.adds\n\t);\n\n\treturn [\n\t\t...chord.normalized.alterations,\n\t\t...formattedAdds,\n\t\t...formattedOmits,\n\t];\n}\n\nfunction isAltered(chord) {\n\treturn (\n\t\tchord.normalized.intents.alt &&\n\t\tchord.normalized.quality === qualities.dom7\n\t);\n}\n\nfunction formatAdds(quality, adds) {\n\treturn adds\n\t\t.filter((add) => {\n\t\t\treturn !(\n\t\t\t\t[qualities.ma6, qualities.mi6].includes(quality) && add === '9'\n\t\t\t);\n\t\t})\n\t\t.map((add, index) => {\n\t\t\tlet formatted = '';\n\t\t\tif (index === 0) {\n\t\t\t\tformatted += chordChangesDescriptors.add;\n\t\t\t\tif (['b', '#'].includes(add[0])) {\n\t\t\t\t\tformatted += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tformatted += add === '7' ? chordChangesDescriptors.add7 : add;\n\t\t\treturn formatted;\n\t\t});\n}\n\nfunction formatOmits(omits) {\n\treturn omits.map((omitted, index) => {\n\t\tlet formatted = '';\n\t\tif (index === 0) {\n\t\t\tformatted += chordChangesDescriptors.omit;\n\t\t}\n\t\tformatted += omitted === 'b3' ? '3' : omitted;\n\t\treturn formatted;\n\t});\n}\n", "import chain from '../../helpers/chain';\n\n/**\n * Prepare whatever string has been identified as a descriptor so it is parsable by the next filter\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function getParsableDescriptor(chord) {\n\tconst allFilters = [\n\t\ttoLowerCaseExceptMajorM,\n\t\tremoveSpaces,\n\t\taddDisambiguators,\n\t\taddMissingVerbs,\n\t];\n\n\tif (chord.input.descriptor) {\n\t\tchord.input.parsableDescriptor = chain(\n\t\t\tallFilters,\n\t\t\tchord.input.descriptor\n\t\t);\n\t}\n\treturn chord;\n}\n\nfunction toLowerCaseExceptMajorM(descriptor) {\n\treturn descriptor\n\t\t.replace(/[A-LN-Za-z]+/g, (match) => match.toLowerCase())\n\t\t.replace('oMit', 'omit')\n\t\t.replace('diM', 'dim')\n\t\t.replace('augMented', 'augmented');\n}\n\nfunction removeSpaces(descriptor) {\n\treturn descriptor.replace(/ /g, '');\n}\n\nfunction addDisambiguators(descriptor) {\n\treturn descriptor\n\t\t.replace(/(7?dim)(alt|add)/g, '$1 $2')\n\t\t.replace(/([m|M])(alt|add)/g, '$1 $2')\n\t\t.replace(/i(no[35])/g, 'i $1')\n\t\t.replace(/([b♭#♯]9)6/g, '$1 6')\n\t\t.replace(/(9\\/?6)/g, ' $1');\n}\n\nfunction addMissingVerbs(descriptor) {\n\tlet allTokensWithVerbs;\n\tlet currentVerb;\n\tlet hasVerb;\n\n\treturn descriptor.replace(/\\((.*?)\\)/g, (match, parenthesis) => {\n\t\tallTokensWithVerbs = [];\n\t\tcurrentVerb = '';\n\n\t\tparenthesis.split(',').forEach((token) => {\n\t\t\thasVerb = true;\n\t\t\tif (token.startsWith('add')) {\n\t\t\t\tcurrentVerb = 'add';\n\t\t\t} else if (token.startsWith('omit')) {\n\t\t\t\tcurrentVerb = 'omit';\n\t\t\t} else if (token.startsWith('no')) {\n\t\t\t\tcurrentVerb = 'no';\n\t\t\t} else {\n\t\t\t\thasVerb = false;\n\t\t\t}\n\t\t\tif (hasVerb) {\n\t\t\t\tallTokensWithVerbs.push(token);\n\t\t\t} else {\n\t\t\t\tallTokensWithVerbs.push(currentVerb + token);\n\t\t\t}\n\t\t});\n\t\treturn ' ' + allTokensWithVerbs.join(' ') + ' ';\n\t});\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\n/**\n * @param {String} symbol\n * @param {Object} parserConfiguration\n * @returns {Chord}\n */\nexport default function initChord(parserConfiguration = {}, symbol) {\n\treturn {\n\t\tinput: {\n\t\t\tsymbol,\n\t\t},\n\t\tnormalized: {},\n\t\tformatted: {},\n\t\tparserConfiguration: _cloneDeep(parserConfiguration),\n\t};\n}\n", "import { notes } from '../../dictionaries/notes';\nimport { majorQualities } from '../../dictionaries/qualities';\n\nconst notesSharp = [\n\tnotes.A,\n\tnotes.ASharp,\n\tnotes.B,\n\tnotes.C,\n\tnotes.CSharp,\n\tnotes.D,\n\tnotes.DSharp,\n\tnotes.E,\n\tnotes.F,\n\tnotes.FSharp,\n\tnotes.G,\n\tnotes.GSharp,\n];\n\nconst notesFlat = [\n\tnotes.A,\n\tnotes.BFlat,\n\tnotes.B,\n\tnotes.C,\n\tnotes.DFlat,\n\tnotes.D,\n\tnotes.EFlat,\n\tnotes.E,\n\tnotes.F,\n\tnotes.GFlat,\n\tnotes.G,\n\tnotes.AFlat,\n];\n\nconst rootNoteToScaleAccidentals = {\n\t[notes.C]: { maj: 'flat', min: 'flat' },\n\t[notes.CSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.DFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.D]: { maj: 'sharp', min: 'flat' },\n\t[notes.DSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.EFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.E]: { maj: 'sharp', min: 'sharp' },\n\t[notes.F]: { maj: 'flat', min: 'flat' },\n\t[notes.FSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.GFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.G]: { maj: 'sharp', min: 'flat' },\n\t[notes.GSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.AFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.A]: { maj: 'sharp', min: 'flat' },\n\t[notes.ASharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.BFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.B]: { maj: 'sharp', min: 'sharp' },\n};\n\n/**\n * Convert intervals in actual notes.\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function nameIndividualChordNotes(chord) {\n\tconst rootNote = chord.normalized.rootNote;\n\tconst semitones = chord.normalized.semitones;\n\tconst quality = chord.normalized.quality;\n\n\tconst minMaj = majorQualities.includes(quality) ? 'maj' : 'min';\n\tconst refNotes =\n\t\trootNoteToScaleAccidentals[rootNote][minMaj] === 'sharp'\n\t\t\t? notesSharp\n\t\t\t: notesFlat;\n\n\tconst rootNoteIndex = refNotes.indexOf(rootNote);\n\tconst indexedNotes = [\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t\t// repeating...\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t];\n\n\tconst chordNotes = semitones.map((i) => indexedNotes[i]);\n\n\tchord.normalized.notes = chordNotes;\n\n\treturn chord;\n}\n", "import { allVariantsToNotes } from '../../dictionaries/notes';\n\n/**\n * Convert root/bass notes to English names\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeNotes(chord) {\n\tchord.normalized.rootNote = allVariantsToNotes[chord.input.rootNote];\n\n\tif (chord.input.bassNote) {\n\t\tchord.normalized.bassNote = allVariantsToNotes[chord.input.bassNote];\n\t}\n\n\treturn chord;\n}\n", "import _clone from 'lodash/clone';\nimport _find from 'lodash/find';\nimport _uniq from 'lodash/uniq';\nimport _without from 'lodash/without';\n\nimport chain from '../../helpers/chain';\n\nimport {\n\thasOneOf,\n\thasAll,\n\thasNoneOf,\n\thasExactly,\n} from '../../helpers/hasElement';\n\nimport { qualities } from '../../dictionaries/qualities';\n\n/**\n * Detect chord quality and changes (extensions, alterations, adds and omits)\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeDescriptor(chord) {\n\tlet chordIntervals = _clone(chord.normalized.intervals);\n\n\tlet normalized = {\n\t\tquality: '',\n\t\tisSuspended: false,\n\t\textensions: [],\n\t\talterations: [],\n\t\tadds: [],\n\t\tomits: [],\n\t};\n\n\tif (isPowerChord(chordIntervals)) {\n\t\tnormalized.quality = qualities.power;\n\t} else if (isBass(chordIntervals)) {\n\t\tnormalized.quality = qualities.bass;\n\t} else {\n\t\tconst omits = getOmits(chordIntervals, chord.normalized.intents.major);\n\n\t\tconst isSuspended = getIsSuspended(\n\t\t\tchordIntervals,\n\t\t\tchord.normalized.intents.major\n\t\t);\n\n\t\tconst { qualityIntervals, quality } = getChordQuality(\n\t\t\tchordIntervals,\n\t\t\tchord,\n\t\t\tisSuspended,\n\t\t\tomits\n\t\t);\n\n\t\tconst extensions = getExtensions(chordIntervals, quality);\n\n\t\t// to be able to detect adds and alterations, we build the \"straight\" version of the chord,\n\t\t// ie. the chord as if no alterations/adds/omits where present.\n\t\t// we will compare this to the actual intervals later on\n\t\tconst baseIntervals = ['1', ...qualityIntervals, ...extensions];\n\n\t\tconst { adds, alterations } = getAddsAndAlterations(\n\t\t\tchordIntervals,\n\t\t\tbaseIntervals,\n\t\t\tquality\n\t\t);\n\n\t\tnormalized = {\n\t\t\t...normalized,\n\t\t\tquality,\n\t\t\tisSuspended,\n\t\t\textensions,\n\t\t\talterations,\n\t\t\tadds,\n\t\t\tomits,\n\t\t};\n\t}\n\n\treturn {\n\t\t...chord,\n\t\tnormalized: {\n\t\t\t...chord.normalized,\n\t\t\t...normalized,\n\t\t},\n\t};\n}\n\nfunction isPowerChord(intervals) {\n\treturn hasExactly(intervals, ['1', '5']);\n}\n\nfunction isBass(intervals) {\n\treturn hasExactly(intervals, ['1']);\n}\n\nfunction getIsSuspended(intervals, hasMajorIntent) {\n\treturn (\n\t\tintervals.includes('4') ||\n\t\t(intervals.includes('11') && hasMajorIntent && !intervals.includes('3'))\n\t);\n}\n\nfunction getOmits(intervals, hasMajorIntent) {\n\tconst omits = [];\n\n\tif (\n\t\thasNoneOf(intervals, ['b3', '3', '4', '11']) ||\n\t\t(!hasMajorIntent && hasNoneOf(intervals, ['b3', '4']))\n\t) {\n\t\tomits.push(hasMajorIntent ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5', 'b13'])) {\n\t\tomits.push('5');\n\t}\n\treturn omits;\n}\n\nfunction getChordQuality(allIntervals, chord, isSuspended, omits) {\n\tconst intervalsForQualityDetection = getIntervalsForQualityDetection(\n\t\tallIntervals,\n\t\tchord,\n\t\tisSuspended,\n\t\tomits\n\t);\n\n\tconst intervalsToQualities = [\n\t\t// !!! do not change order without a good reason\n\t\t{ qualityIntervals: ['b3'], quality: qualities.mi },\n\t\t{ qualityIntervals: ['b3', '6'], quality: qualities.mi6 },\n\t\t{ qualityIntervals: ['b3', '7'], quality: qualities.miMa7 },\n\t\t{ qualityIntervals: ['b3', 'b7'], quality: qualities.mi7 },\n\n\t\t{ qualityIntervals: ['3'], quality: qualities.ma },\n\t\t{ qualityIntervals: ['3', '6'], quality: qualities.ma6 },\n\t\t{ qualityIntervals: ['3', '7'], quality: qualities.ma7 },\n\t\t{ qualityIntervals: ['3', 'b7'], quality: qualities.dom7 },\n\n\t\t{ qualityIntervals: ['3', '#5'], quality: qualities.aug },\n\t\t{ qualityIntervals: ['b3', 'b5'], quality: qualities.dim },\n\t\t{ qualityIntervals: ['b3', 'b5', 'bb7'], quality: qualities.dim7 },\n\t].sort((a, b) => b.qualityIntervals.length - a.qualityIntervals.length);\n\n\treturn _find(intervalsToQualities, (o) =>\n\t\thasAll(intervalsForQualityDetection, o.qualityIntervals)\n\t);\n}\n\n// To properly detect the chord quality, we need a \"straight\" version of the chord,\n// meaning with a third interval (= un-suspended, no omit3)\nfunction getIntervalsForQualityDetection(\n\tallIntervals,\n\tchord,\n\tisSuspended,\n\tomits\n) {\n\tconst allFilters = [\n\t\tundoOmit3.bind(null, omits),\n\t\tundoSuspension.bind(null, isSuspended, chord.normalized.intents.major),\n\t\tundoAlt5.bind(null, chord.normalized.intents.alt),\n\t\t_uniq,\n\t];\n\n\treturn chain(allFilters, _clone(allIntervals));\n}\n\nfunction undoOmit3(omits, allIntervals) {\n\tconst with3rd = _clone(allIntervals);\n\n\tif (omits.includes('3')) {\n\t\twith3rd.push('3');\n\t} else if (omits.includes('b3')) {\n\t\twith3rd.push('b3');\n\t}\n\treturn with3rd;\n}\n\nfunction undoSuspension(isSuspended, hasMajorIntent, allIntervals) {\n\tif (isSuspended) {\n\t\tconst unSuspended = _without(allIntervals, '4');\n\t\tunSuspended.push(hasMajorIntent ? '3' : 'b3');\n\t\treturn unSuspended;\n\t}\n\treturn allIntervals;\n}\n\nfunction undoAlt5(isAlt, allIntervals) {\n\tif (isAlt) {\n\t\tconst unaltered = _without(allIntervals, 'b5', '#5');\n\t\tunaltered.push('5');\n\t\treturn unaltered;\n\t}\n\treturn allIntervals;\n}\n\nfunction getExtensions(allIntervals, quality) {\n\tconst extensions = [];\n\n\tif (canBeExtended(quality)) {\n\t\tif (isMinorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '11', '13');\n\t\t} else if (isMajorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '13');\n\t\t} else if (isExtended11th(allIntervals)) {\n\t\t\textensions.push('9', '11');\n\t\t} else if (isExtended9th(allIntervals)) {\n\t\t\textensions.push('9');\n\t\t}\n\t}\n\treturn extensions;\n}\n\nfunction canBeExtended(quality) {\n\treturn [\n\t\tqualities.ma7,\n\t\tqualities.dom7,\n\t\tqualities.mi7,\n\t\tqualities.miMa7,\n\t].includes(quality);\n}\n\nfunction canHave11th(quality) {\n\treturn [qualities.mi7, qualities.miMa7].includes(quality);\n}\n\nfunction isMinorExtended13th(allIntervals, quality) {\n\treturn (\n\t\tcanHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['11', '#11']) &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isMajorExtended13th(allIntervals, quality) {\n\treturn (\n\t\t!canHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended11th(allIntervals) {\n\treturn (\n\t\thasOneOf(allIntervals, '11') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended9th(allIntervals) {\n\treturn allIntervals.includes('9');\n}\n\nfunction getAddsAndAlterations(chordIntervals, baseIntervals, quality) {\n\tconst adds = [];\n\tconst alterations = [];\n\n\tchordIntervals\n\t\t.filter((interval) => interval !== '5' && interval !== '4')\n\t\t.forEach((interval) => {\n\t\t\tif (!baseIntervals.includes(interval)) {\n\t\t\t\tif (isAlteration(quality, interval)) {\n\t\t\t\t\talterations.push(interval);\n\t\t\t\t} else {\n\t\t\t\t\tadds.push(interval);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\tif (hasAdd3(chordIntervals)) {\n\t\tadds.push('3');\n\t}\n\n\treturn {\n\t\tadds: sortIntervals(adds),\n\t\talterations: sortIntervals(alterations),\n\t};\n}\n\nfunction isAlteration(quality, interval) {\n\tconst qualityAlterations = {\n\t\t[qualities.ma]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.dom7]: ['b5', '#5', 'b9', '#9', '#11', 'b13'],\n\n\t\t[qualities.mi]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.miMa7]: ['b5', '#5', '#11', 'b13'],\n\n\t\t[qualities.aug]: [],\n\t\t[qualities.dim]: [],\n\t\t[qualities.dim7]: [],\n\t};\n\n\treturn qualityAlterations[quality].includes(interval);\n}\n\nfunction hasAdd3(allIntervals) {\n\treturn hasAll(allIntervals, ['3', '4']);\n}\n\nfunction sortIntervals(intervals) {\n\treturn intervals.sort((a, b) => {\n\t\tconst sortableA = Number.parseInt(a.replace(/[b#]/, ''));\n\t\tconst sortableB = Number.parseInt(b.replace(/[b#]/, ''));\n\t\treturn sortableA - sortableB;\n\t});\n}\n", "import { NoSymbolFoundError } from '../../helpers/ChordParsingError';\n\n/**\n * Split symbol in root/bass note and descriptor.\n * Returns null if the given string does not seems to be a chord.\n *\n * @param {String[]} noteVariants - all notes within a given notation system (English, Latin, German...)\n * @param {Chord} chord\n * @returns {Chord|null}\n */\nexport default function parseBase(noteVariants, chord) {\n\tconst { symbol } = chord.input;\n\tconst notesRegex = noteVariants.join('|');\n\tconst notesAndDescriptorRegex = new RegExp(\n\t\t'^' +\n\t\t\t'(' +\n\t\t\tnotesRegex +\n\t\t\t')' +\n\t\t\t'(.*?)' +\n\t\t\t'(/(' +\n\t\t\tnotesRegex +\n\t\t\t'))?' +\n\t\t\t'$'\n\t);\n\tconst result = symbol.match(notesAndDescriptorRegex);\n\n\tif (result && result[1]) {\n\t\tchord.input.rootNote = result[1];\n\n\t\tif (result[2]) {\n\t\t\tchord.input.descriptor = result[2];\n\t\t}\n\t\tif (result[4]) {\n\t\t\tchord.input.bassNote = result[4];\n\t\t}\n\t\treturn chord;\n\t} else {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n}\n", "const allModifiers = {\n\t// base\n\tma: 'ma',\n\tmi: 'mi',\n\tdim: 'dim',\n\thalfDim: 'halfDim',\n\taug: 'aug',\n\tseventh: 'seventh',\n\n\t// suspended\n\tsus: 'sus',\n\tsus2: 'sus2',\n\n\t// extensions\n\tninth: 'ninth',\n\televenth: 'eleventh',\n\tthirteenth: 'thirteenth',\n\n\t// alterations\n\tfifthFlat: 'b5',\n\tfifthSharp: '#5',\n\tninthFlat: 'b9',\n\tninthSharp: '#9',\n\televenthSharp: '#11',\n\tthirteenthFlat: 'b13',\n\n\t// added\n\tadd3: 'add3',\n\tadd4: 'add4',\n\taddb6: 'addb6',\n\tadd6: 'add6',\n\tadd69: 'add69',\n\tadd7: 'add7',\n\tadd9: 'add9',\n\tadd11: 'add11',\n\tadd13: 'add13',\n\n\t// special\n\tbass: 'bass',\n\tomit3: 'omit3',\n\tomit5: 'omit5',\n\tpower: 'power',\n\talt: 'alt',\n};\n\n/**\n * WARNING: when adding new modifiers symbols, be careful of possible edge cases that might arise with some combinations.\n * For example, without edge case handling, \"madd9\" would be parsed as \"ma\" instead of \"m\"+\"add9\"\n */\n\nconst major = {\n\t'^': [allModifiers.ma, allModifiers.add7],\n\tΔ: [allModifiers.ma, allModifiers.add7],\n\tM: allModifiers.ma,\n\tMa: allModifiers.ma,\n\tMaj: allModifiers.ma,\n\tMajor: allModifiers.ma,\n\tma: allModifiers.ma,\n\tmaj: allModifiers.ma,\n\tmajor: allModifiers.ma,\n};\n\nconst major7th = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => symbol + '7'\n);\nconst add7 = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => 'add' + symbol + '7'\n);\n\nconst allSymbols = {\n\t// major\n\t...major,\n\t...major7th,\n\n\t// minor\n\t'-': allModifiers.mi,\n\tm: allModifiers.mi,\n\tMi: allModifiers.mi,\n\tMin: allModifiers.mi,\n\tMinor: allModifiers.mi,\n\tmi: allModifiers.mi,\n\tmin: allModifiers.mi,\n\tminor: allModifiers.mi,\n\n\t// diminished / augmented\n\t'°': allModifiers.dim,\n\to: allModifiers.dim,\n\t0: allModifiers.dim,\n\tdim: allModifiers.dim,\n\t'dim.': allModifiers.dim,\n\tdiminished: allModifiers.dim,\n\n\tØ: allModifiers.halfDim,\n\tø: allModifiers.halfDim,\n\th: allModifiers.halfDim,\n\n\t'+': allModifiers.aug,\n\taug: allModifiers.aug,\n\taugmented: allModifiers.aug,\n\n\t// seventh\n\t7: allModifiers.seventh,\n\n\t// suspended\n\t4: allModifiers.sus,\n\tsus: allModifiers.sus,\n\tsus4: allModifiers.sus,\n\tsuspended: allModifiers.sus,\n\tsuspended4: allModifiers.sus,\n\tsus2: allModifiers.sus2,\n\tsuspended2: allModifiers.sus2,\n\n\t// extensions\n\t9: allModifiers.ninth,\n\t11: allModifiers.eleventh,\n\t13: allModifiers.thirteenth,\n\n\t// alterations\n\tb3: allModifiers.mi,\n\tb5: allModifiers.fifthFlat,\n\t'♭5': allModifiers.fifthFlat,\n\t'#5': allModifiers.fifthSharp,\n\t'♯5': allModifiers.fifthSharp,\n\tb9: allModifiers.ninthFlat,\n\t'♭9': allModifiers.ninthFlat,\n\taddb9: allModifiers.ninthFlat,\n\t'add♭9': allModifiers.ninthFlat,\n\t'#9': allModifiers.ninthSharp,\n\t'♯9': allModifiers.ninthSharp,\n\t'add#9': allModifiers.ninthSharp,\n\t'add♯9': allModifiers.ninthSharp,\n\t'#11': allModifiers.eleventhSharp,\n\t'♯11': allModifiers.eleventhSharp,\n\t'add#11': allModifiers.eleventhSharp,\n\tb13: allModifiers.thirteenthFlat,\n\t'♭13': allModifiers.thirteenthFlat,\n\taddb13: allModifiers.thirteenthFlat,\n\t'add♭13': allModifiers.thirteenthFlat,\n\n\t// added\n\t...add7,\n\t2: allModifiers.add9,\n\tadd2: allModifiers.add9,\n\tadd3: allModifiers.add3,\n\tadd4: allModifiers.add4,\n\taddb6: allModifiers.addb6,\n\tb6: allModifiers.addb6,\n\t6: allModifiers.add6,\n\tadd6: allModifiers.add6,\n\t'6/9': allModifiers.add69,\n\t69: allModifiers.add69,\n\t96: allModifiers.add69,\n\t'9/6': allModifiers.add69,\n\tadd9: allModifiers.add9,\n\tadd11: allModifiers.add11,\n\tadd13: allModifiers.add13,\n\n\t// special\n\tbass: allModifiers.bass,\n\tomit3: allModifiers.omit3,\n\tno3: allModifiers.omit3,\n\tomit5: allModifiers.omit5,\n\tno5: allModifiers.omit5,\n\t5: allModifiers.power,\n\talt: allModifiers.alt,\n\t'alt.': allModifiers.alt,\n\taltered: allModifiers.alt,\n};\n\nfunction getDerivedModifiers(source, modifierId, derivedFn) {\n\treturn Object.keys(source)\n\t\t.map(derivedFn)\n\t\t.reduce((acc, curr) => {\n\t\t\tacc[curr] = modifierId;\n\t\t\treturn acc;\n\t\t}, {});\n}\n\nconst allVariants = Object.keys(allSymbols).sort((a, b) => b.length - a.length);\n\nexport { allSymbols, allVariants };\nexport default allModifiers;\n", "export default {\n\t1: 0,\n\t2: 2,\n\tb3: 3,\n\t3: 4,\n\t4: 5,\n\tb5: 6,\n\t5: 7,\n\t'#5': 8,\n\tb6: 8,\n\t6: 9,\n\tbb7: 9,\n\tb7: 10,\n\t7: 11,\n\tb9: 13,\n\t9: 14,\n\t'#9': 15,\n\t11: 17,\n\t'#11': 18,\n\tb13: 20,\n\t13: 21,\n};\n", "import _uniq from 'lodash/uniq';\nimport {\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n} from '../../helpers/ChordParsingError';\n\nimport m from '../../dictionaries/modifiers';\nimport { allSymbols, allVariants } from '../../dictionaries/modifiers';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\nimport { hasNoneOf, hasOneOf } from '../../helpers/hasElement';\n\n/**\n * Convert the descriptor into a suite of intervals, semitones and intents\n *\n * @param {Array<('b5'|'#5'|'b9'|'#9'|'#11'|'b13')>} altIntervals\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function parseDescriptor(altIntervals, chord) {\n\tlet allModifiers = [];\n\n\tif (chord.input.parsableDescriptor) {\n\t\tallModifiers = getModifiers(chord);\n\t}\n\n\tchord.input.modifiers = allModifiers;\n\tchord.normalized.intervals = getIntervals(allModifiers, altIntervals);\n\tchord.normalized.semitones = getSemitones(chord.normalized.intervals);\n\tchord.normalized.intents = getIntents(allModifiers);\n\n\treturn chord;\n}\n\nfunction getModifiers(chord) {\n\tconst { parsableDescriptor } = chord.input;\n\tconst modifiers = [];\n\n\tconst descriptorRegex = new RegExp(\n\t\tallVariants.map(escapeRegex).join('|'),\n\t\t'g'\n\t);\n\tconst descriptorMatches = parsableDescriptor.match(descriptorRegex);\n\n\tlet remainingChars = parsableDescriptor;\n\tlet allModifiersId;\n\n\tif (descriptorMatches) {\n\t\tdescriptorMatches.forEach((match) => {\n\t\t\tallModifiersId = allSymbols[match];\n\n\t\t\tif (!Array.isArray(allModifiersId)) {\n\t\t\t\tallModifiersId = [allModifiersId];\n\t\t\t}\n\n\t\t\tallModifiersId.forEach((modifierId) => {\n\t\t\t\tif (modifiers.includes(modifierId)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmodifiers.push(modifierId);\n\n\t\t\t\tremainingChars = remainingChars.replace(match, '');\n\t\t\t});\n\t\t});\n\t}\n\n\tif (modifiers.length === 0) {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n\tif (remainingChars.trim().length > 0) {\n\t\tthrow new InvalidModifierError(chord, remainingChars);\n\t}\n\n\treturn modifiers;\n}\n\nfunction getIntervals(allModifiers, altIntervals) {\n\tif (allModifiers.includes(m.power)) {\n\t\treturn ['1', '5'];\n\t} else if (allModifiers.includes(m.bass)) {\n\t\treturn ['1'];\n\t}\n\n\treturn _uniq([\n\t\t'1',\n\t\t...getThird(allModifiers),\n\t\t...getFourth(allModifiers),\n\t\t...getFifths(allModifiers, altIntervals),\n\t\t...getSixth(allModifiers),\n\t\t...getSevenths(allModifiers),\n\t\t...getNinths(allModifiers, altIntervals),\n\t\t...getElevenths(allModifiers, altIntervals),\n\t\t...getThirteenths(allModifiers, altIntervals),\n\t]).sort((a, b) => intervalsToSemitones[a] - intervalsToSemitones[b]);\n}\n\nfunction getThird(allModifiers) {\n\tconst third = [];\n\tif (allModifiers.includes(m.omit3)) {\n\t\treturn [];\n\t}\n\tif (!hasOneOf(allModifiers, [m.sus, m.sus2])) {\n\t\tif (!hasMajorIntent(allModifiers)) {\n\t\t\tthird.push('b3');\n\t\t} else if (!allModifiers.includes(m.eleventh)) {\n\t\t\tthird.push('3');\n\t\t}\n\t}\n\tif (allModifiers.includes(m.add3)) {\n\t\tthird.push('3');\n\t}\n\treturn third;\n}\n\nfunction getFourth(allModifiers) {\n\tconst fourth = [];\n\tif (hasOneOf(allModifiers, [m.sus, m.add4])) {\n\t\tfourth.push('4');\n\t}\n\treturn fourth;\n}\n\nfunction getFifths(allModifiers, altIntervals) {\n\tconst fifths = [];\n\tif (allModifiers.includes(m.omit5)) {\n\t\treturn [];\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.dim, m.halfDim, m.fifthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b5')\n\t) {\n\t\tfifths.push('b5');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.aug, m.fifthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#5')\n\t) {\n\t\tfifths.push('#5');\n\t}\n\tif (!fifths.length && !allModifiers.includes(m.thirteenthFlat)) {\n\t\tfifths.push('5');\n\t}\n\treturn fifths;\n}\n\nfunction getSixth(allModifiers) {\n\tconst sixth = [];\n\tif (hasOneOf(allModifiers, [m.addb6])) {\n\t\tsixth.push('b6');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t!isExtended(allModifiers) &&\n\t\t!hasOneOf(allModifiers, [m.halfDim])\n\t) {\n\t\tsixth.push('6');\n\t}\n\treturn sixth;\n}\n\nfunction getSevenths(allModifiers) {\n\tconst sevenths = [];\n\tif (hasOneOf(allModifiers, [m.alt])) {\n\t\tsevenths.push('b7');\n\t}\n\tif (hasOneOf(allModifiers, [m.seventh, m.halfDim])) {\n\t\tif (allModifiers.includes(m.dim)) {\n\t\t\tsevenths.push('bb7');\n\t\t} else if (allModifiers.includes(m.halfDim)) {\n\t\t\tsevenths.push('b7');\n\t\t} else {\n\t\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t\t}\n\t} else if (hasOneOf(allModifiers, [m.ninth, m.eleventh, m.thirteenth])) {\n\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t}\n\tif (allModifiers.includes(m.add7)) {\n\t\tsevenths.push('7');\n\t}\n\treturn sevenths;\n}\n\nfunction getMinorOrMajorSeventh(allModifiers) {\n\treturn allModifiers.includes(m.ma) ? '7' : 'b7';\n}\n\nfunction getNinths(allModifiers, altIntervals) {\n\tconst ninth = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add69, m.ninth, m.eleventh, m.thirteenth]) &&\n\t\thasNoneOf(allModifiers, [m.ninthFlat, m.ninthSharp])\n\t) {\n\t\tninth.push('9');\n\t}\n\tif (hasOneOf(allModifiers, [m.sus2, m.add9])) {\n\t\tninth.push('9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b9')\n\t) {\n\t\tninth.push('b9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#9')\n\t) {\n\t\tninth.push('#9');\n\t}\n\treturn ninth;\n}\n\nfunction getElevenths(allModifiers, altIntervals) {\n\tconst elevenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenth]) &&\n\t\t!hasMajorIntent(allModifiers)\n\t) {\n\t\televenths.push('11');\n\t} else if (hasOneOf(allModifiers, [m.eleventh, m.add11])) {\n\t\televenths.push('11');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.eleventhSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#11')\n\t) {\n\t\televenths.push('#11');\n\t}\n\treturn elevenths;\n}\n\nfunction getThirteenths(allModifiers, altIntervals) {\n\tconst thirteenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add13, m.thirteenth]) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\tisExtended(allModifiers)) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\thasOneOf(allModifiers, [m.halfDim]))\n\t) {\n\t\tthirteenths.push('13');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b13')\n\t) {\n\t\tthirteenths.push('b13');\n\t}\n\treturn thirteenths;\n}\n\nfunction shouldAlter(allModifiers, altIntervals, interval) {\n\treturn allModifiers.includes(m.alt) && altIntervals.includes(interval);\n}\n\nfunction hasMajorIntent(allModifiers) {\n\treturn hasNoneOf(allModifiers, [m.mi, m.dim, m.dim7, m.halfDim]);\n}\n\nfunction isExtended(allModifiers) {\n\treturn hasOneOf(allModifiers, [\n\t\tm.seventh,\n\t\tm.ninth,\n\t\tm.eleventh,\n\t\tm.thirteenth,\n\t]);\n}\n\n// Based on https://stackoverflow.com/a/6969486\nfunction escapeRegex(string) {\n\treturn string.replace(/[.\\-*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction getSemitones(allIntervals) {\n\treturn allIntervals\n\t\t.map((interval) => intervalsToSemitones[interval])\n\t\t.sort((a, b) => a - b);\n}\n\n// intents will be used later at formatting for disambiguation of some potentially confusing cases\nfunction getIntents(allModifiers) {\n\treturn {\n\t\tmajor: hasMajorIntent(allModifiers),\n\t\televenth: allModifiers.includes(m.eleventh),\n\t\talt: allModifiers.includes(m.alt),\n\t};\n}\n", "import chain from '../helpers/chain';\nimport _cloneDeep from 'lodash/cloneDeep';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport { allVariantsPerGroup } from '../dictionaries/notes';\n\nimport {\n\tInvalidInputError,\n\tUnexpectedError,\n} from '../helpers/ChordParsingError';\n\nimport checkIntervalsConsistency from './filters/checkIntervalsConsistency';\nimport formatSymbol from './filters/formatSymbol';\nimport formatSymbolParts from './filters/formatSymbolParts';\nimport getParsableDescriptor from './filters/getParsableDescriptor';\nimport initChord from './filters/initChord';\nimport nameIndividualChordNotes from './filters/nameIndividualChordNotes';\nimport normalizeNotes from './filters/normalizeNotes';\nimport normalizeDescriptor from './filters/normalizeDescriptor';\nimport parseBase from './filters/parseBase';\nimport parseDescriptor from './filters/parseDescriptor';\n\n/**\n * Create a chord parser function\n * @param {ParserConfiguration} [parserConfiguration]\n * @returns {function(String): Chord}\n */\nfunction chordParserFactory(parserConfiguration = {}) {\n\tconst allAltIntervals = ['b5', '#5', 'b9', '#9', '#11', 'b13'];\n\tconst allNotationSystems = ['english', 'german', 'latin'];\n\n\tconst {\n\t\tnotationSystems = _cloneDeep(allNotationSystems),\n\t\taltIntervals = _cloneDeep(allAltIntervals),\n\t\tcustomFilters = [],\n\t} = parserConfiguration;\n\n\tcheckAltIntervals(altIntervals, allAltIntervals);\n\tcheckNotationSystems(notationSystems, allNotationSystems);\n\tcheckCustomFilters(customFilters);\n\n\treturn parseChord;\n\n\t/**\n\t * Convert an input string into an abstract chord structure\n\t * @param {String} symbol - the chord symbol candidate\n\t * @returns {Chord|Object} A chord object if the given string is successfully parsed. An object with an `error` property otherwise.\n\t */\n\tfunction parseChord(symbol) {\n\t\tconst allErrors = [];\n\n\t\tif (!isInputValid(symbol)) {\n\t\t\tconst e = new InvalidInputError();\n\t\t\tallErrors.push(formatError(e));\n\t\t}\n\n\t\tconst allVariantsPerGroupCopy = _cloneDeep(allVariantsPerGroup).filter(\n\t\t\t(variantsGroup) => notationSystems.includes(variantsGroup.name)\n\t\t);\n\n\t\tlet chord;\n\t\tlet allFilters;\n\t\tlet variants;\n\n\t\tif (!allErrors.length) {\n\t\t\twhile (allVariantsPerGroupCopy.length && !chord) {\n\t\t\t\tvariants = allVariantsPerGroupCopy.shift();\n\n\t\t\t\tallFilters = [\n\t\t\t\t\tinitChord.bind(null, parserConfiguration),\n\t\t\t\t\tparseBase.bind(null, variants.notes),\n\t\t\t\t\tgetParsableDescriptor,\n\t\t\t\t\tparseDescriptor.bind(null, altIntervals),\n\t\t\t\t\tcheckIntervalsConsistency,\n\t\t\t\t\tnormalizeNotes,\n\t\t\t\t\tnormalizeDescriptor,\n\t\t\t\t\tformatSymbolParts,\n\t\t\t\t\tformatSymbol,\n\t\t\t\t\tnameIndividualChordNotes,\n\t\t\t\t\t...customFilters,\n\t\t\t\t];\n\n\t\t\t\ttry {\n\t\t\t\t\tchord = chain(allFilters, symbol);\n\t\t\t\t\tif (chord) {\n\t\t\t\t\t\tchord.input.notationSystem = variants.name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tallErrors.push(getUnexpectedError(variants.name));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tallErrors.push(formatError(e, variants.name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chord ? chord : { error: allErrors };\n\t}\n}\n\nfunction checkAltIntervals(altIntervals, allAltIntervals) {\n\tcheckArray('altIntervals', altIntervals, allAltIntervals, true);\n}\n\nfunction checkNotationSystems(notationSystems, allNotationSystems) {\n\tcheckArray('notationSystems', notationSystems, allNotationSystems);\n}\n\nfunction checkArray(arrayName, arrayToTest, allowedValues, allowEmpty) {\n\tif (!Array.isArray(arrayToTest)) {\n\t\tthrow new TypeError(`'${arrayName}' should be an array`);\n\t}\n\tif (!allowEmpty && arrayToTest.length === 0) {\n\t\tthrow new TypeError(`'${arrayName}' cannot be empty`);\n\t}\n\tarrayToTest.forEach((system) => {\n\t\tif (!allowedValues.includes(system)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`'${system}' is not a valid value for ${arrayName}`\n\t\t\t);\n\t\t}\n\t});\n}\n\nfunction isInputValid(input) {\n\treturn typeof input === 'string' && input.length > 0;\n}\n\nfunction getUnexpectedError(notationSystem) {\n\tconst error = new UnexpectedError();\n\treturn formatError(error, notationSystem);\n}\n\nfunction formatError(exceptionError, notationSystem) {\n\treturn {\n\t\ttype: exceptionError.name,\n\t\tchord: exceptionError.chord,\n\t\tmessage: exceptionError.message,\n\t\tnotationSystem,\n\t};\n}\n\n/**\n * @module chordParserFactory\n * Expose the chordParserFactory() function\n */\nexport default chordParserFactory;\n", "import { hasExactly } from '../../helpers/hasElement';\n\nconst shortDescriptors = {\n\tsus2: 'sus2',\n\tadd2: '2',\n\tomit: 'no',\n\tma: 'M',\n\tmi: 'm',\n\tdim: '°',\n\taug7: '7+',\n\televenth: '11',\n};\n\n/**\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function shortenNormalized(chord) {\n\tlet descriptor;\n\tlet chordChanges = chord.formatted.chordChanges;\n\n\tif (isSus2(chord)) {\n\t\tdescriptor = shortDescriptors.sus2;\n\t\tchordChanges = [];\n\t} else if (isAdd2(chord)) {\n\t\tdescriptor = shortDescriptors.add2;\n\t\tchordChanges = [];\n\t} else if (isAug7(chord)) {\n\t\tdescriptor = shortDescriptors.aug7;\n\t\tchordChanges = [];\n\t} else {\n\t\tdescriptor = chord.formatted.descriptor\n\t\t\t.replace('mi', shortDescriptors.mi)\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('dim', shortDescriptors.dim);\n\n\t\tif (isEleventh(chord)) {\n\t\t\tdescriptor = descriptor.replace(\n\t\t\t\t/7sus|9sus/,\n\t\t\t\tshortDescriptors.eleventh\n\t\t\t);\n\t\t}\n\t}\n\n\tchordChanges = chordChanges.map((change) => {\n\t\treturn change\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('omit', shortDescriptors.omit);\n\t});\n\n\treturn {\n\t\t...chord,\n\t\tformatted: {\n\t\t\t...chord.formatted,\n\t\t\tdescriptor,\n\t\t\tchordChanges,\n\t\t},\n\t};\n}\n\nfunction isSus2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '5', '9']);\n}\n\nfunction isAdd2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '5', '9']);\n}\n\nfunction isAug7(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '#5', 'b7']);\n}\n\nfunction isEleventh(chord) {\n\treturn chord.normalized.intents.eleventh;\n}\n", "import _difference from 'lodash/difference';\n\nimport chain from '../../helpers/chain';\n\nimport normalizeDescriptor from '../../parser/filters/normalizeDescriptor';\nimport formatSymbolParts from '../../parser/filters/formatSymbolParts';\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\n\nimport { hasNoneOf } from '../../helpers/hasElement';\n\n/**\n * @param {Chord} chord\n * @param {('none'|'max'|'core')} level\n * @returns {Chord}\n */\nexport default function simplify(level = 'none', chord) {\n\tif (level === 'none') {\n\t\treturn chord;\n\t}\n\n\tconst intervalsToRemove = {\n\t\tmax: [\n\t\t\t'4',\n\t\t\t'b5',\n\t\t\t'#5',\n\t\t\t'6',\n\t\t\t'bb7',\n\t\t\t'b7',\n\t\t\t'7',\n\t\t\t'b9',\n\t\t\t'9',\n\t\t\t'#9',\n\t\t\t'11',\n\t\t\t'#11',\n\t\t\t'b13',\n\t\t\t'13',\n\t\t],\n\t\tcore: ['4', 'b9', '9', '#9', '11', '#11', 'b13', '13'],\n\t};\n\n\tconst intervals = _difference(\n\t\tchord.normalized.intervals,\n\t\tintervalsToRemove[level]\n\t);\n\n\tif (hasNoneOf(intervals, ['b3', '3'])) {\n\t\tintervals.push(chord.normalized.intents.major ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5'])) {\n\t\tintervals.push('5');\n\t}\n\n\tchord.normalized.intervals = intervals;\n\tchord.normalized.semitones = intervals.map(\n\t\t(interval) => intervalsToSemitones[interval]\n\t);\n\tchord.normalized.intents.eleventh = false;\n\tchord.normalized.intents.alt = false;\n\n\tif (level === 'max') {\n\t\tdelete chord.normalized.bassNote;\n\t}\n\n\tconst allFilters = [\n\t\tnormalizeDescriptor,\n\t\tformatSymbolParts,\n\t\tnameIndividualChordNotes,\n\t];\n\n\treturn chain(allFilters, chord);\n}\n", "import _invert from 'lodash/invert';\n\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\n\nconst notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'];\n\nconst sharpsToFlats = {\n\t'C#': 'Db',\n\t'D#': 'Eb',\n\t'F#': 'Gb',\n\t'G#': 'Ab',\n\t'A#': 'Bb',\n};\n\nconst flatsToSharps = _invert(sharpsToFlats);\n\nexport default function transpose(transposeValue, useFlats, chord) {\n\tconst { rootNote, bassNote } = chord.normalized;\n\n\tconst rootSharp = convertToSharp(rootNote);\n\tchord.normalized.rootNote = transposeNote(\n\t\trootSharp,\n\t\ttransposeValue,\n\t\tuseFlats\n\t);\n\tchord.formatted.rootNote = chord.normalized.rootNote;\n\n\tif (bassNote) {\n\t\tconst bassSharp = convertToSharp(bassNote);\n\t\tchord.normalized.bassNote = transposeNote(\n\t\t\tbassSharp,\n\t\t\ttransposeValue,\n\t\t\tuseFlats\n\t\t);\n\t\tchord.formatted.bassNote = chord.normalized.bassNote;\n\t}\n\n\treturn nameIndividualChordNotes(chord);\n}\n\nfunction transposeNote(note, value, useFlats) {\n\tconst noteIndex = notes.indexOf(note);\n\tconst transposedIndex = noteIndex + value;\n\n\tconst octaves = Math.floor(transposedIndex / 12);\n\tconst correctedTransposedIndex = transposedIndex - octaves * 12;\n\n\tconst transposed = notes[correctedTransposedIndex];\n\n\treturn useFlats ? sharpsToFlats[transposed] || transposed : transposed;\n}\n\nfunction convertToSharp(note) {\n\treturn flatsToSharps[note] || note;\n}\n", "const translationTables = {\n\tgerman: {\n\t\tAb: 'As',\n\t\tA: 'A',\n\t\t'A#': 'Ais',\n\t\tBb: 'Hes',\n\t\tB: 'H',\n\t\tC: 'C',\n\t\t'C#': 'Cis',\n\t\tDb: 'Des',\n\t\tD: 'D',\n\t\t'D#': 'Dis',\n\t\tEb: 'Es',\n\t\tE: 'E',\n\t\tF: 'F',\n\t\t'F#': 'Fis',\n\t\tGb: 'Ges',\n\t\tG: 'G',\n\t\t'G#': 'Gis',\n\t},\n\tlatin: {\n\t\tAb: 'Lab',\n\t\tA: 'La',\n\t\t'A#': 'La#',\n\t\tBb: 'Sib',\n\t\tB: 'Si',\n\t\tC: 'Do',\n\t\t'C#': 'Do#',\n\t\tDb: 'Reb',\n\t\tD: 'Re',\n\t\t'D#': 'Re#',\n\t\tEb: 'Mib',\n\t\tE: 'Mi',\n\t\tF: 'Fa',\n\t\t'F#': 'Fa#',\n\t\tGb: 'Solb',\n\t\tG: 'Sol',\n\t\t'G#': 'Sol#',\n\t},\n};\nconst allNotationSystems = Object.keys(translationTables);\n\n/**\n * @param {('auto'|'english'|'german'|'latin')} notationSystem\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function convertNotationSystem(\n\tnotationSystem = 'english',\n\tchord\n) {\n\tconst finalNotationSystem =\n\t\tnotationSystem === 'auto' ? chord.input.notationSystem : notationSystem;\n\n\tif (finalNotationSystem === 'english') return chord;\n\tif (!allNotationSystems.includes(finalNotationSystem)) return null;\n\n\tchord.formatted.rootNote =\n\t\ttranslationTables[finalNotationSystem][chord.formatted.rootNote];\n\n\tif (chord.formatted.bassNote) {\n\t\tchord.formatted.bassNote =\n\t\t\ttranslationTables[finalNotationSystem][chord.formatted.bassNote];\n\t}\n\treturn chord;\n}\n", "/**\n * @param {Chord} chord\n * @returns {String}\n */\nexport default function textPrinter(chord) {\n\treturn chord && chord.formatted && chord.formatted.symbol\n\t\t? chord.formatted.symbol\n\t\t: null;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport textPrinter from './text';\nimport chordParserFactory from '../../parser/chordParserFactory';\n\n/**\n * This printer returns a `chord` object reflecting the applied rendering filters. This object is very close to what would\n * be obtained by re-parsing the rendered chord.\n * It is basically the `chord` object in its current state, with 2 differences:\n * - a re-built `input` property to include all the changes applied during rendering (transposition, simplification, etc.)\n * - a removed `notationSystems` parser configuration since it may not be relevant anymore, especially if the rendering changed the notation system\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function rawPrinter(chord) {\n\t// make sure the chord can be re-parsed, whichever notation system was used for the rendering\n\tdelete chord.parserConfiguration.notationSystems;\n\n\tconst cloned = _cloneDeep(chord);\n\n\t// Re-parse the rendered chord to get the 'input' property right\n\tconst textPrinted = textPrinter(chord);\n\tconst parseChord = chordParserFactory(chord.parserConfiguration);\n\tconst reParsed = parseChord(textPrinted);\n\tcloned.input = reParsed.input;\n\n\treturn cloned;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport chain from '../helpers/chain';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport shortenNormalized from './filters/shortenNormalized';\nimport simplifyFilter from './filters/simplify';\nimport transpose from './filters/transpose';\nimport convertNotationSystem from './filters/convertNotationSystem';\nimport formatSymbol from '../parser/filters/formatSymbol';\nimport textPrinter from './printer/text';\nimport rawPrinter from './printer/raw';\n\n/**\n * Create a pre-configured chord rendering function\n * @param {RendererConfiguration} [rendererConfiguration]\n * @returns {function(Chord): String}\n */\nfunction chordRendererFactory({\n\tuseShortNamings = false,\n\tsimplify = 'none',\n\ttransposeValue = 0,\n\tharmonizeAccidentals = false,\n\tuseFlats = false,\n\tprinter = 'text',\n\tnotationSystem = 'english',\n\tcustomFilters = [],\n} = {}) {\n\tcheckCustomFilters(customFilters);\n\n\tconst allFilters = [];\n\n\tif (['max', 'core'].includes(simplify)) {\n\t\tallFilters.push(simplifyFilter.bind(null, simplify));\n\t}\n\n\tif (harmonizeAccidentals || transposeValue !== 0) {\n\t\tallFilters.push(transpose.bind(null, transposeValue, useFlats));\n\t}\n\n\tif (useShortNamings) {\n\t\tallFilters.push(shortenNormalized);\n\t}\n\n\tallFilters.push(\n\t\tconvertNotationSystem.bind(null, notationSystem),\n\t\tformatSymbol,\n\t\t...customFilters\n\t);\n\n\treturn renderChord;\n\n\t/**\n\t * Render a chord structure\n\t * @param {Chord} chord - the chord structure to render\n\t * @returns {String|Chord} output depends on the selected printer: string for text printer (default), Chord for raw printer\n\t */\n\tfunction renderChord(chord) {\n\t\tif (!isValidChord(chord)) {\n\t\t\treturn null;\n\t\t}\n\t\tconst filteredChord = chain(allFilters, _cloneDeep(chord));\n\n\t\treturn printer === 'raw'\n\t\t\t? rawPrinter(filteredChord)\n\t\t\t: textPrinter(filteredChord);\n\t}\n}\n\nconst isValidChord = (chord) => {\n\treturn chord && typeof chord === 'object' && !chord.error && chord.input;\n};\n\n/**\n * @module chordRendererFactory\n * Expose the chordRendererFactory() function\n **/\nexport default chordRendererFactory;\n", "import './typedefs';\n\nimport chordParserFactory from './parser/chordParserFactory';\nimport chordRendererFactory from './renderer/chordRendererFactory';\n\nexport { chordParserFactory, chordRendererFactory };\n", "import Promise from 'promise';\nimport { Playlist, Song, Cell, Chord } from './parser.js';\nimport { Converter, LogLevel } from './converter.js';\nimport { Version } from './version.js';\n\nexport function convertSync(ireal, options = {}) {\n const playlist = new Playlist(ireal);\n playlist.songs.forEach(song => {\n song.musicXml = Converter.convert(song, options);\n });\n return playlist;\n}\n\nexport async function convert(ireal, options = {}) {\n return new Promise(resolve => resolve(convertSync(ireal, options)));\n}\n\nexport { Playlist, Song, Cell, Chord, Converter, LogLevel, Version };\n", "/**\n * The iReal Pro parser is derived from\n * https://github.com/daumling/ireal-renderer\n * which is itself derived from\n * https://github.com/pianosnake/ireal-reader\n *\n * None of those modules did exactly what is needed here, namely return\n * a full structure that can be iterated downstream.\n */\n\nimport diff from 'fast-diff';\n\nexport class Playlist {\n constructor(ireal){\n const playlistEncoded = /.*?(irealb(?:ook)?):\\/\\/([^\"]*)/.exec(ireal);\n const playlist = decodeURIComponent(playlistEncoded[2]);\n const parts = playlist.split(\"===\"); //songs are separated by ===\n if (parts.length > 1) this.name = parts.pop(); //playlist name\n this.songs = parts\n .map(part => {\n try {\n return new Song(part, playlistEncoded[1] === 'irealbook');\n }\n catch (error) {\n const parts = part.split(\"=\");\n const title = Song.parseTitle(parts[0].trim());\n console.error(`[ireal-musicxml] [${title}] ${error}`);\n return null;\n }\n })\n .filter(song => song !== null)\n .reduce((songs, song) => {\n if (songs.length > 0) {\n // Detect multi-part songs via their titles.\n // The parts of the same song have the same title, except for the part number, so they follow each other in the list.\n // The `diff` module compares two titles and returns a list of similarities and differences.\n // We expect the first diff to be a similarity, followed by differences that are only numeric.\n // When we find a multi-part song, we just concatenate the cells into the first part.\n const diffs = diff(songs[songs.length-1].title, song.title);\n if (diffs[0][0] === 0 && diffs.every(d => d[0] === 0 || d[1].match(/^\\d+$/))) {\n songs[songs.length-1].cells = songs[songs.length-1].cells.concat(song.cells);\n return songs;\n }\n }\n songs.push(song);\n return songs;\n }, []);\n }\n}\n\nexport class Cell {\n constructor() {\n this.annots = [];\n this.comments = [];\n this.bars = \"\";\n this.spacer = 0;\n this.chord = null;\n }\n}\n\nexport class Chord {\n constructor(note, modifiers = \"\", over = null, alternate = null) {\n this.note = note;\n this.modifiers = modifiers;\n this.over = over;\n this.alternate = alternate;\n }\n}\n\nexport class Song {\n constructor(ireal, oldFormat = false) {\n this.cells = [];\n this.musicXml = \"\";\n if (!ireal) {\n this.title = \"\";\n this.composer = \"\";\n this.style = \"\";\n this.key = \"\";\n this.transpose = 0;\n this.groove = \"\";\n this.bpm = 0;\n this.repeats = 0;\n return;\n }\n const parts = ireal.split(\"=\"); //split on one sign, remove the blanks\n if (oldFormat) {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[2].trim();\n this.key = parts[3];\n this.cells = this.parse(parts[5]);\n }\n else {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[3].trim();\n this.key = parts[4];\n this.transpose = +parts[5] || 0; // TODO\n this.groove = parts[7];\n this.bpm = +parts[8];\n this.repeats = +parts[9] || 3;\n const music = parts[6].split(\"1r34LbKcu7\");\n this.cells = this.parse(unscramble(music[1]));\n }\n }\n\n /**\n * The RegExp for a complete chord. The match array contains:\n * 1 - the base note\n * 2 - the modifiers (+-ohd0123456789 and su for sus)\n * 3 - any comments (may be e.g. add, sub, or private stuff)\n * 4 - the \"over\" part starting with a slash\n * 5 - the top chord as (chord)\n * @type RegExp\n */\n static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\\-^\\dhob#])*)(\\*.+?\\*)*(\\/[A-G][#b]?)?(\\(.*?\\))?/;\n static chordRegex2 = /^([ Wp])()()(\\/[A-G][#b]?)?(\\(.*?\\))?/;\t// need the empty captures to match chordRegex\n\n static regExps = [\n /^\\*[a-zA-Z]/,\t\t\t\t\t\t\t// section\n /^T\\d\\d/,\t\t\t\t\t\t\t\t// time measurement\n /^N./,\t\t\t\t\t\t\t\t\t// repeat marker\n /^<.*?>/,\t\t\t\t\t\t\t\t// comments\n Song.chordRegex,\t\t\t\t// chords\n Song.chordRegex2,\t\t\t\t// space, W and p (with optional alt chord)\n ];\n\n /**\n * The parser cracks up the raw music string into several objects,\n * one for each cell. iReal Pro works with rows of 16 cell each. The result\n * is stored at song.cells.\n *\n * Each object has the following properties:\n *\n * chord: if non-null, a chord object with these properties:\n * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord)\n * modifiers - the modifiers, like 7, + o etc (string)\n * over - if non-null, another chord object for the under-note\n * alternate - if non-null another chord object for the alternate chord\n * annots: annotations, a string of:\n * *x - section, like *v, *I, *A, *B etc\n * Nx - repeat bots (N1, N2 etc)\n * Q - coda\n * S - segno\n * Txx - measure (T44 = 4/4 etc, but T12 = 12/8)\n * U - END\n * f - fermata\n * l - (letter l) normal notes\n * s - small notes\n * comments: an array of comment strings\n * bars: bar specifiers, a string of:\n * | - single vertical bar, left\n * [ - double bar, left\n * ] - double bar, right\n * { - repeat bar, left\n * } - repeat bar, right\n * Z - end bar, right\n * spacer - a number indicating the number of vertical spacers above this cell\n *\n * @returns [Cell]\n */\n parse(ireal) {\n let text = ireal.trim();\n const arr = [];\n while (text) {\n let found = false;\n for (let i = 0; i < Song.regExps.length; i++) {\n const match = Song.regExps[i].exec(text);\n if (match) {\n found = true;\n if (match.length <= 2) {\n arr.push(match[0]);\n text = text.substr(match[0].length);\n }\n else {\n // a chord\n arr.push(match);\n text = text.substr(match[0].length);\n }\n break;\n }\n }\n if (!found) {\n // ignore the comma separator\n if (text[0] !== ',')\n arr.push(text[0]);\n text = text.substr(1);\n }\n }\n\n // pass 2: extract prefixes, suffixes, annotations and comments\n const cells = [];\n let obj = this.newCell(cells);\n let prevobj = null;\n for (let i = 0; i < arr.length; i++) {\n let cell = arr[i];\n if (cell instanceof Array) {\n obj.chord = this.parseChord(cell);\n cell = \" \";\n }\n switch (cell[0]) {\n case '{':\t// open repeat\n case '[':\t// open double bar\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = cell; cell = null; break;\n case '|':\t// single bar - close previous and open this\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = '('; cell = null; break;\n case ']':\t// close double bar\n case '}':\t// close repeat\n case 'Z':\t// ending double bar\n if (prevobj) { prevobj.bars += cell; prevobj = null; }\n cell = null; break;\n case 'n':\t// N.C.\n obj.chord = new Chord(cell[0]);\n break;\n case ',':\tcell = null; break; // separator\n case 'S':\t// segno\n case 'T':\t// time measurement\n case 'Q':\t// coda\n case 'N':\t// repeat\n case 'U':\t// END\n case 's':\t// small\n case 'l':\t// normal\n case 'f':\t// fermata\n case '*': obj.annots.push(cell); cell = null; break;\n case 'Y': obj.spacer++; cell = null; prevobj = null; break;\n case 'r':\n case 'x':\n case 'W':\n obj.chord = new Chord(cell);\n break;\n case '<':\n cell = cell.substr(1, cell.length-2);\n obj.comments.push(cell);\n cell = null; break;\n default:\n }\n if (cell && i < arr.length-1) {\n prevobj = obj;\t\t// so we can add any closing barline later\n obj = this.newCell(cells);\n }\n }\n return cells;\n }\n\n /**\n * The title had \"A\" and \"The\" at the back (e.g. \"Gentle Rain, The\")\n */\n static parseTitle(title) {\n return title.replace(/(.*)(, )(A|The)$/g, '$3 $1');\n }\n\n /**\n * The composer is reversed (last first) if it only has 2 names :shrug:\n */\n static parseComposer(composer) {\n const parts = composer.split(/(\\s+)/); // match and return spaces too\n if (parts.length == 3) { // [last, spaces, first]\n return parts[2] + parts[1] + parts[0];\n }\n return composer;\n }\n\n parseChord(chord) {\n var note = chord[1] || \" \";\n var modifiers = chord[2] || \"\";\n var comment = chord[3] || \"\";\n if (comment)\n modifiers += comment.substr(1, comment.length-2);\n var over = chord[4] || \"\";\n if (over[0] === '/')\n over = over.substr(1);\n var alternate = chord[5] || null;\n if (alternate) {\n chord = Song.chordRegex.exec(alternate.substr(1, alternate.length-2));\n if (!chord)\n alternate = null;\n else\n alternate = this.parseChord(chord);\n }\n // empty cell?\n if (note === \" \" && !alternate && !over)\n return null;\n if (over) {\n var offset = (over[1] === '#' || over[1] === 'b') ? 2 : 1;\n over = new Chord(over.substr(0, offset), over.substr(offset), null, null);\n }\n else\n over = null;\n return new Chord(note, modifiers, over, alternate);\n }\n\n newCell(cells) {\n var obj = new Cell;\n cells.push(obj);\n return obj;\n }\n}\n\n// Unscrambling hints from https://github.com/ironss/accompaniser/blob/master/irealb_parser.lua\n// Strings are broken up in 50 character segments. each segment undergoes character substitution addressed by obfusc50()\n// Note that a final part of length 50 or 51 is not scrambled.\n// Finally need to substitute for Kcl, LZ and XyQ.\nfunction unscramble(s) {\n let r = '', p;\n\n while (s.length > 51){\n p = s.substring(0, 50);\n s = s.substring(50);\n r = r + obfusc50(p);\n }\n r = r + s;\n // now undo substitution obfuscation\n r = r.replace(/Kcl/g, '| x').replace(/LZ/g, ' |').replace(/XyQ/g, ' ');\n return r;\n}\n\nfunction obfusc50(s) {\n // the first 5 characters are switched with the last 5\n const newString = s.split('');\n for (let i = 0; i < 5; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n // characters 10-24 are also switched\n for (let i = 10; i < 24; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n return newString.join('');\n}\n", "import jstoxml from 'jstoxml';\nimport ChordSymbol from 'chord-symbol';\nconst { chordParserFactory, chordRendererFactory } = ChordSymbol;\nimport { Version } from './version.js';\n\nexport class LogLevel {\n static Debug = 0;\n static Info = 1;\n static Warn = 2;\n static Error = 3;\n static None = 4;\n}\n\nconst MUSICXML_VERSION = '4.0';\nconst SCALING_MM = 7;\nconst SCALING_TENTHS = 40;\n\nexport class Converter {\n static defaultOptions = {\n 'divisions': 768, // same as used by iReal\n 'notation': 'rhythmic', // 'rhythmic' for rhythmic notation, 'slash' for slash notation\n 'step': 'B', // chord note\n 'octave': 4, // chord note octave\n 'notehead': 'slash', // chord note head\n 'noteheadSize': 'large', // size of chord note head\n 'date': true, // include encoding date\n 'clef': false, // hide clef by default\n 'keySignature': false, // hide key signature by default\n 'pageWidth': 210, // mm (A4)\n 'pageHeight': 297, // mm (A4)\n 'pageMargin': 15, // mm\n 'logLevel': LogLevel.Warn\n };\n\n static sequenceAttributes = [\n // Expected order of attribute elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/\n 'divisions',\n 'key',\n 'time',\n 'staves',\n 'part-symbol',\n 'instruments',\n 'clef',\n 'staff-details',\n 'transpose',\n 'directive',\n 'measure-style'\n ];\n\n static sequenceNote = [\n // Expected order of note elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/\n 'cue',\n 'pitch',\n 'rest',\n 'unpitched',\n 'duration',\n 'tie',\n 'voice',\n 'type',\n 'dot',\n 'accidental',\n 'time-modification',\n 'stem',\n 'notehead',\n 'notehead-text',\n 'staff',\n 'beam',\n 'notations',\n 'lyric',\n 'play'\n ];\n\n static sequenceNotations = [\n // Expected order of notations elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/\n 'accidental-mark',\n 'arpeggiate',\n 'articulations',\n 'dynamics',\n 'fermata',\n 'glissando',\n 'non-arpeggiate',\n 'ornaments',\n 'other-notation',\n 'slide',\n 'slur',\n 'technical',\n 'tied',\n 'tuplet'\n ];\n\n static sequenceBarline = [\n // Expected order of barline elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/\n 'bar-style',\n 'footnote',\n 'level',\n 'wavy-line',\n 'segno',\n 'coda',\n 'fermata',\n 'ending',\n 'repeat'\n ];\n\n static mapAlter = {\n '#': 1,\n 'b': -1\n };\n\n static mapFifthsToAlters = {\n 'sharp': ['F', 'C', 'G', 'D', 'A', 'E', 'B'],\n 'flat': ['B', 'E', 'A', 'D', 'G', 'C', 'F']\n };\n\n static mapRepeats = {\n \"D.C. al Coda\": Converter.prototype.convertDaCapo,\n \"D.C. al Fine\": Converter.prototype.convertDaCapo,\n \"D.C. al 1st End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 2nd End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 3rd End.\": Converter.prototype.convertDaCapo,\n \"D.S. al Coda\": Converter.prototype.convertDalSegno,\n \"D.S. al Fine\": Converter.prototype.convertDalSegno,\n \"D.S. al 1st End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 2nd End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 3rd End.\": Converter.prototype.convertDalSegno,\n \"Fine\": Converter.prototype.convertFine,\n \"3x\": Converter.prototype.convertRepeatNx,\n \"4x\": Converter.prototype.convertRepeatNx,\n \"5x\": Converter.prototype.convertRepeatNx,\n \"6x\": Converter.prototype.convertRepeatNx,\n \"7x\": Converter.prototype.convertRepeatNx,\n \"8x\": Converter.prototype.convertRepeatNx\n };\n\n static convert(song, options = {}) {\n const realOptions = Object.assign({}, this.defaultOptions, options);\n return new Converter(song, realOptions).convert();\n }\n\n constructor(song, options) {\n this.song = song;\n this.options = options;\n this.time = { beats: 4, beatType: 4 };\n this.fifths = null; // key signature's degree of fifths\n this.measure = null; // current measure (of class Measure) being built\n this.barRepeat = 0; // current bar number for single- and double-bar repeats\n this.codas = []; // list of measures containing codas\n this.repeats = 0; // repeat count for closing repeat barline\n this.emptyCells = 0; // consecutive empty cells\n this.emptyCellNewSystem = false; // did a new system occur in an empty cell?\n\n // In iRP, there are 16 cells per line.\n // The width in mm of a single cell depends on the page width and the margins.\n this.cellWidth = (this.options.pageWidth - (2 * this.options.pageMargin)) / 16;\n\n // chord-symbol.\n this.parseChord = chordParserFactory({ \"altIntervals\": [\n \"b5\",\n \"b9\"\n ]});\n this.renderChord = chordRendererFactory({\n useShortNamings: true,\n printer: 'raw'\n });\n }\n\n convert() {\n return jstoxml.toXML(this.convertSong(), {\n header: `\n\n\n `.trim(),\n indent: ' '\n });\n }\n\n convertSong() {\n return {\n _name: 'score-partwise',\n _attrs: { 'version': MUSICXML_VERSION },\n _content: [{\n 'work': {\n 'work-title': this.song.title\n }\n }, {\n 'identification': [{\n _name: 'creator',\n _attrs: { 'type': 'composer' },\n _content: this.song.composer\n }, {\n 'encoding': [{\n 'software': `@infojunkie/ireal-musicxml ${Version.version}`\n }, { ...(this.options.date && {\n 'encoding-date': Converter.convertDate(new Date())\n })}, {\n _name: 'supports',\n _attrs: { 'element': 'accidental', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'element': 'transpose', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-page', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-system', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }]\n }]\n }, {\n 'defaults': {\n 'scaling': {\n 'millimeters': SCALING_MM,\n 'tenths': SCALING_TENTHS\n },\n 'page-layout': {\n 'page-height': Converter._mmToTenths(this.options.pageHeight),\n 'page-width': Converter._mmToTenths(this.options.pageWidth),\n 'page-margins': {\n 'left-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'right-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'top-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'bottom-margin': Converter._mmToTenths(this.options.pageMargin, 4)\n }\n }\n }\n }, {\n 'part-list': {\n _name: 'score-part',\n _attrs: { 'id': 'P1' },\n _content: {\n _name: 'part-name',\n _attrs: { 'print-object': 'no' },\n _content: 'Lead Sheet'\n }\n }\n }, {\n _name: 'part',\n _attrs: { 'id': 'P1' },\n _content: this.convertMeasures()\n }]\n };\n }\n\n // Date in yyyy-mm-dd\n // https://stackoverflow.com/a/50130338/209184\n static convertDate(date) {\n return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))\n .toISOString()\n .split('T')[0];\n }\n\n static Measure = class {\n constructor(number) {\n this.body = {\n _name: 'measure',\n _attrs: { 'number': number },\n _content: []\n };\n this.attributes = [];\n this.chords = [];\n this.barlines = [];\n this.barEnding = null;\n }\n\n number() {\n return this.body['_attrs']['number'];\n }\n\n assemble() {\n // Attributes.\n if (this.attributes.length) {\n this.body['_content'].push({\n 'attributes': Converter.reorderSequence(this, this.attributes, Converter.sequenceAttributes)\n });\n }\n\n // Chords.\n this.chords.forEach(chord => {\n this.body['_content'].push({\n 'harmony': chord.harmony\n }, ...chord.notes.map(note => {\n return {\n 'note': note\n };\n }));\n });\n\n // Barlines.\n this.barlines[0]['_content'] = Converter.reorderSequence(this, this.barlines[0]['_content'], Converter.sequenceBarline);\n this.body['_content'].splice(1, 0, this.barlines[0]);\n this.barlines[1]['_content'] = Converter.reorderSequence(this, this.barlines[1]['_content'], Converter.sequenceBarline);\n this.body['_content'].push(this.barlines[1]);\n\n return this.body;\n }\n };\n\n static Chord = class {\n constructor(harmony, notes, ireal) {\n this.harmony = harmony;\n this.notes = notes;\n this.ireal = ireal;\n this.spaces = 0;\n this.fermata = false;\n }\n };\n\n convertMeasures() {\n // Are we starting a new system given the current cell index?\n const isNewSystem = cellIndex => cellIndex > 0 && cellIndex % 16 === 0;\n\n // Loop on cells.\n const measures = this.song.cells.reduce((measures, cell, cellIndex) => {\n // Start a new measure if needed.\n // This means either finding an opening barline or finding non-empty cells while we're not in any measure.\n if (cell.bars.match(/\\(|\\{|\\[/) || (!this.measure && (cell.chord || cell.annots.length || cell.comments.length))) {\n if (this.measure) {\n this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`);\n this.measure.barlines.push(this.convertBarline('', 'right'));\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n }\n this.measure = new Converter.Measure(measures.length+1, this.options);\n\n // Very first bar: add defaults.\n if (!measures.length) {\n this.measure.attributes.push({\n 'divisions': this.options.divisions\n }, {\n _name: 'clef',\n _attrs: [{ 'print-object': this.options.clef ? 'yes' : 'no' }],\n _content: [{\n 'sign': 'G'\n }, {\n 'line': 2\n }]\n }, {\n 'staff-details': {\n 'staff-lines': 0\n }\n }, {\n 'measure-style': [{\n _name: 'slash',\n _attrs: { 'type': 'start', 'use-stems': this.options.notation === 'rhythmic' ? 'yes' : 'no' }\n }]\n }, this.convertKey());\n\n // Add bpm if any.\n if (this.song.bpm) {\n this.measure.body['_content'].push(this.convertTempo(this.song.bpm));\n }\n\n // Add style and groove.\n this.measure.body['_content'].push(this.convertStyleAndGroove(this.song.style, this.song.groove));\n }\n\n // Add starting barline.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'left'));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat-1].chords];\n }\n }\n\n // Short-circuit loop if no measure exists.\n // It can happen that `measure` is still blank in case of empty cells in iReal layout.\n // e.g. Girl From Ipanema in tests.\n if (!this.measure) {\n if (cell.chord || cell.annots.length || cell.comments.length || (cell.bars && cell.bars !== ')')) {\n this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures[measures.length-1]);\n }\n\n // This is an empty cell between measures.\n // Count the consecutive empty cells because they will be converted to margins.\n // Also remember that a new system has occurred.\n this.emptyCells++;\n if (isNewSystem(cellIndex)) {\n this.emptyCellNewSystem = true;\n }\n\n return measures;\n }\n\n // Start a new system every 16 cells.\n if (isNewSystem(cellIndex) || this.emptyCellNewSystem) {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _attrs: { 'new-system': 'yes' },\n _content: { ...(this.emptyCellNewSystem && {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }, {\n 'right-margin': '0.00'\n }]\n }\n })}\n });\n }\n\n // If we accumulated empty cells but not at the start of the current system, then we adjust other distances.\n // There are 2 cases to handle:\n // - We're now in a fresh system: Add a right-margin to the previous measure.\n // - We're in the middle of a system: Add a measure-distance to the current measure.\n if (!this.emptyCellNewSystem && this.emptyCells > 0) {\n if (this.measure.body['_content'][0]?.['_name'] === 'print' && this.measure.body['_content'][0]['_attrs']?.['new-system'] === 'yes') {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }]\n }\n }\n });\n }\n else {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'measure-layout': {\n 'measure-distance': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }\n }\n });\n }\n }\n\n // Reset the empty cells.\n this.emptyCellNewSystem = false;\n this.emptyCells = 0;\n\n // Chords.\n if (cell.chord) {\n switch (cell.chord.note) {\n case 'x': {\n // Handle single bar repeat.\n this.barRepeat = 1;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'r': {\n // Handle double bar repeat.\n // We do this in 2 stages, because a blank measure occurs after 'r' (to keep the measure count correct)\n // Here, we copy the next-to-last measure and set the repeat flag.\n // The next opening measure will pick up the remaining measure.\n this.barRepeat = 2;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'p':\n // If slash does not occur as first chord, count it as a space.\n // Otherwise, handle it as 'W'.\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n break;\n }\n // Fall into case 'W'.\n\n case 'W': {\n // Handle invisible root by copying previous chord.\n let target = this.measure;\n if (!target.chords.length) {\n target = measures.slice().reverse().find(m => m.chords.length);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`);\n }\n }\n if (target) {\n const chord = target.chords[target.chords.length-1].ireal;\n chord.over = cell.chord.over;\n chord.alternate = cell.chord.alternate;\n this.measure.chords.push(this.convertChord(chord));\n }\n break;\n }\n case ' ': {\n // TODO Handle alternate chord only.\n this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`);\n break;\n }\n default: {\n // Process new chord.\n this.measure.chords.push(this.convertChord(cell.chord));\n }\n }\n }\n else if (!this.barRepeat) {\n // There are 16 cells per row, regardless of time signature.\n // Barlines can occur anywhere and the iReal Pro player uses an unknown algorithm\n // to schedule the chords within a measure, using the empty cells as \"hints\" for scheduling.\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=chord-spacing-in-the-editor\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=how-do-i-fit-more-than-48-measures-into-one-chart\n //\n // Our approach to emulate the iReal Pro player is as follows:\n // 1. Whenever we find an empty cell, attach it to the previous chord (or discard it if there's no previous chord)\n // 2. At the end of the measure, adjust the chord durations based on existing empty cells across the measure\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n }\n }\n\n // Other attributes.\n cell.annots.forEach(annot => {\n switch(annot[0]) {\n case '*': { // section\n const section = annot.slice(1);\n this.measure.body['_content'].push(this.convertSection(section));\n break;\n }\n case 'T': { // time\n const time = annot.slice(1);\n this.measure.attributes.push(this.convertTime(time));\n break;\n }\n case 'S': { // segno\n this.measure.body['_content'].push(this.convertSegno());\n break;\n }\n case 'N': { // ending\n // TODO This assumes a single ending at a time.\n let ending = parseInt(annot.slice(1));\n if (ending < 1) {\n // It can happen that the ending number comes as 0 from iRP.\n // In this case, we do a best effort of finding the previous ending and incrementing it.\n const target = measures.slice().reverse().find(m => !!m.barEnding);\n ending = target?.barEnding ?? 0 + 1;\n }\n this.measure.barlines[0]['_content'].push(this.convertEnding(ending, 'start'));\n // End the previous ending at the previous measure's right barline.\n // Also, remove the 'discontinue' ending from its starting measure since we found an end to it.\n if (ending > 1) {\n measures[measures.length-1].barlines[1]['_content'].push(this.convertEnding(ending-1, 'stop'));\n const target = measures.slice().reverse().find(m => m.barEnding === ending-1);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline of any measure`);\n }\n else {\n // The last result is the good one: remove the 'discontinue' ending.\n const index = target.barlines[1]['_content'].findIndex(b => !!b && b['_name'] === 'ending');\n if (index === -1) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline`, target);\n }\n delete target.barlines[1]['_content'][index];\n }\n }\n // We will add a 'discontinue' ending at this measure's right barline.\n this.measure.barEnding = ending;\n break;\n }\n case 'Q': { // coda\n // We add all codas as \"tocoda\" because we expect the last one to be the actual coda.\n // After all measures have been built, adjust the last coda.\n // https://irealpro.com/how-the-coda-symbol-works-in-ireal-pro/\n this.measure.body['_content'].push(this.convertToCoda());\n this.codas.push(this.measure);\n break;\n }\n\n // Ignore small and large chord renderings.\n case 'l':\n case 's': break;\n\n case 'f': { // Fermata\n this.measure.chords[this.measure.chords.length-1].fermata = true;\n break;\n }\n\n case 'U': { // END, treated as Fine.\n this.measure.body['_content'].push(this.convertFine('END'));\n break;\n }\n\n default: this._log(LogLevel.Warn, `Unhandled annotation \"${annot}\"`);\n }\n });\n\n // Comments and repeats.\n // TODO Handle measure offset.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/offset/\n cell.comments.map(c => c.trim()).forEach(comment => {\n const repeatFn = this._map(Converter.mapRepeats, comment);\n if (repeatFn) {\n this.measure.body['_content'].push(repeatFn.call(this, comment));\n } else {\n this.measure.body['_content'].push(this.convertComment(comment));\n }\n });\n\n // Close and insert the measure if needed.\n // Ignore measures without any chords, they're probably empty spaces.\n if (cell.bars.match(/\\)|\\}|\\]|Z/) && this.measure.chords.length) {\n // Add closing barline and ending if needed.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'right'));\n if (this.measure.barEnding) {\n // In case of numbered repeats, end measure an open repeat by default \u250C\u2500\u2500\u2500\u2500\u2500\u2500\n // \u2502 2.\n // It may be replaced later by a closing repeat \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 2. \u2502\n this.measure.barlines[1]['_content'].push(this.convertEnding(this.measure.barEnding, 'discontinue'));\n }\n\n // Close out the measure.\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n this.measure = null;\n if (this.barRepeat) this.barRepeat--;\n }\n\n return measures;\n }, []);\n\n // Adjust final right margin if needed.\n const remainingCells = this.song.cells.length % 16 - this.emptyCells;\n if (remainingCells > 0 && measures.length > 0) {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * remainingCells)\n }]\n }\n }\n });\n }\n\n // Adjust last coda if any.\n if (this.codas.length) {\n const target = this.codas[this.codas.length-1];\n const direction = target.body['_content'].findIndex(d =>\n d['_name'] === 'direction' &&\n Array.isArray(d['_content']) &&\n d['_content'].some(s =>\n s['_name'] === 'sound' &&\n Object.keys(s['_attrs']).includes('tocoda')\n )\n );\n if (direction === -1) {\n this._log(LogLevel.Warn, `Cannot find sound direction`, target);\n }\n target.body['_content'][direction] = this.convertCoda();\n }\n\n // `Measure.assemble()` puts all the parts in `Measure.body`.\n return measures.map(measure => measure.assemble());\n }\n\n // Fix order of elements according to sequence as specified by an xs:sequence.\n // @param {array} elements - Array of elements to sort.\n // @param {array} sequence - Array of element names in order of xs:sequence.\n // @return {array} Ordered array of elements.\n static reorderSequence(measure, elements, sequence) {\n return elements.filter(a => Object.keys(a).length).sort((a1, a2) => {\n let k1 = Object.keys(a1)[0]; if (k1 === '_name') k1 = a1[k1];\n let k2 = Object.keys(a2)[0]; if (k2 === '_name') k2 = a2[k2];\n // TODO indexOf() needs to search every time. Make it faster with memoize?\n const i1 = sequence.indexOf(k1);\n const i2 = sequence.indexOf(k2);\n if (i1 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k1}\"`, measure);\n }\n if (i2 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k2}\"`, measure);\n }\n return i1 - i2;\n });\n }\n\n convertRepeatNx(comment) {\n let repeats = null;\n if (null !== (repeats = comment.match(/(\\d+)x/))) {\n this.repeats = repeats[1];\n }\n }\n\n convertFine(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'fine': 'yes' }\n }]\n };\n }\n\n convertDaCapo(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dacapo': 'yes' }\n }]\n };\n }\n\n convertDalSegno(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dalsegno': 'yes' }\n }]\n };\n }\n\n convertComment(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': comment[0] === '*' ? 'above' : 'below' },\n _content: {\n 'direction-type': {\n 'words': comment[0] === '*' ? comment.slice(3) : comment\n }\n }\n };\n }\n\n convertEnding(ending, type) {\n // TODO This assumes a single ending.\n return {\n _name: 'ending',\n _attrs: { 'number': ending, 'type': type },\n _content: `${ending}.`\n };\n }\n\n convertBarline(bars, location) {\n let style = 'regular';\n let repeat = null;\n if (bars.match(/\\[|\\]/)) {\n style = 'light-light';\n }\n else if (bars.match(/Z/)) {\n style = 'light-heavy';\n }\n else if (bars.match(/\\{|\\}/)) {\n style = location === 'left' ? 'heavy-light' : 'light-heavy';\n repeat = location === 'left' ? 'forward' : 'backward';\n }\n\n // Set the current repeat count to 2, which may be changed later if we find a repeat annotation.\n if (repeat === 'forward') {\n this.repeats = 2;\n }\n\n return {\n _name: 'barline',\n _attrs: { 'location': location },\n _content: [{\n 'bar-style': style\n }, { ...(repeat && {\n _name: 'repeat',\n _attrs: { 'direction': repeat, ...(repeat === 'backward' && { 'times': this.repeats }) }\n })}]\n };\n }\n\n convertSection(section) {\n if (section === 'i') section = 'Intro';\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: {\n 'direction-type': {\n 'rehearsal': section\n }\n }\n };\n }\n\n convertSegno() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n _name: 'segno'\n }\n }, {\n _name: 'sound',\n _attrs: { 'segno': 'segno' }\n }]\n };\n }\n\n convertCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n '_name': 'coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'coda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertToCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n 'words': 'To Coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'tocoda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertTempo(bpm) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n _name: 'metronome',\n _attrs: { 'parentheses': 'no' },\n _content: [{\n 'beat-unit': this.calculateChordDuration(1)[0].type\n }, {\n 'per-minute': bpm\n }]\n }]\n }, {\n _name: 'sound',\n _attrs: { 'tempo': bpm }\n }]\n };\n }\n\n convertTime(time) {\n let beats = parseInt(time[0]);\n let beatType = parseInt(time[1]);\n if (time === '12') {\n beats = 12;\n beatType = 8;\n }\n this.time = { beats, beatType };\n return {\n 'time': [{\n 'beats': beats\n }, {\n 'beat-type': beatType\n }]\n };\n }\n\n adjustChordsDuration(measure) {\n // Now that the measure is closed, we can adjust the chord durations, taking empty cells into consideration.\n // https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration\n //\n // Rules:\n // - Minimum chord duration is 1 beat\n // => Each chord starts as 1 beat\n // => Count of chords <= beats per measure\n // - Starting empty cells are discarded (already discarded during the cell loop)\n // - Each remaining empty cell counts as 1 beat (already counted during cell loop)\n // - Empty cell beats are added to their preceding chords (already added during the cell loop)\n // => Total chord durations <= beats per measure\n // - Remaining beats are distributed evenly among chords from first to last\n //\n if (measure.chords.length > this.time.beats) {\n this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure);\n return true;\n }\n let beats = measure.chords.reduce((beats, chord) => beats+1+chord.spaces, 0);\n if (!beats) {\n this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure);\n return false;\n }\n if (beats > this.time.beats) {\n // Reduce spaces.\n // We're guaranteed to end this loop because measure.chords.length <= this.time.beats\n let chordIndex = 0;\n while (beats > this.time.beats) {\n if (measure.chords[chordIndex].spaces > 0) {\n measure.chords[chordIndex].spaces--;\n beats--;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords.\n let chordIndex = 0;\n while (beats < this.time.beats) {\n measure.chords[chordIndex].spaces++;\n beats++;\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(1+chord.spaces).map((duration, i, ds) =>\n this.convertChordNote(\n duration,\n i === ds.length - 1 ? chord.fermata : false, // Possible fermata on last chord note only\n this.options.notation === 'rhythmic' && ds.length > 1 ? (i > 0 ? 'stop' : 'start') : null // Possible tie in case of rhythmic notation\n )\n );\n return chord;\n });\n\n return true;\n }\n\n calculateChordDuration(beats) {\n // Lowest beat resolution is eighth-note (8).\n const mapDuration = {\n '1': [{ t: 'eighth', d: 0, b: 1 }],\n '2': [{ t: 'quarter', d: 0, b: 2 }],\n '3': [{ t: 'quarter', d: 1, b: 3 }],\n '4': [{ t: 'half', d: 0, b: 4 }],\n '5': [{ t: 'quarter', d: 1, b: 3 }, { t: 'quarter', d: 0, b: 2 }],\n '6': [{ t: 'half', d: 1, b: 6 }],\n '7': [{ t: 'half', d: 2, b: 7 }],\n '8': [{ t: 'whole', d: 0, b: 8 }],\n '9': [{ t: 'half', d: 1, b: 6 }, { t: 'quarter', d: 1, b: 3 }],\n '10': [{ t: 'half', d: 1, b: 6 }, { t: 'half', d: 0, b: 4 }],\n '11': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 0, b: 4 }],\n '12': [{ t: 'whole', d: 1, b: 12 }],\n '13': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 1, b: 6 }],\n '14': [{ t: 'whole', d: 2, b: 14 }],\n '15': [{ t: 'whole', d: 0, b: 8 }, { t: 'half', d: 2, b: 7 }],\n };\n\n if (this.options.notation === 'slash') {\n // In case of slash notation, return an array of n=beats elements, each with a duration of 1 beat.\n const index = 1 * 8 / this.time.beatType;\n return Array(beats).fill(this\n ._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n })[0] // We're sure to get only one entry in this case.\n );\n }\n else {\n // In case of rhythmic notation, return a single note (or 2 tied notes) corresponding to the desired beat count.\n const index = beats * 8 / this.time.beatType;\n return this\n ._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n });\n }\n }\n\n convertChordNote(duration, fermata = false, tie = null) {\n const altered = Converter.mapFifthsToAlters[this.fifths >= 0 ? 'sharp' : 'flat'].slice(0, Math.abs(this.fifths));\n const noteType = {\n _name: 'pitch',\n _content: [{\n 'step': this.options.step\n }, {\n 'alter': altered.includes(this.options.step) ? (this.fifths > 0 ? 1 : -1) : 0\n }, {\n 'octave': this.options.octave\n }]\n };\n\n const notations = [];\n if (fermata) {\n notations.push({ _name: 'fermata' });\n }\n if (tie) {\n notations.push({ _name: 'tied', _attrs: { 'type': tie } });\n }\n\n return Converter.reorderSequence(this.measure, [noteType, {\n _name: 'cue'\n }, {\n _name: 'notehead',\n _content: this.options.notehead,\n _attrs: [{ 'font-size': this.options.noteheadSize }]\n }, {\n 'duration': duration.duration\n }, {\n 'voice': 1,\n }, {\n _name: 'type',\n _attrs: { 'size': 'full' },\n _content: duration.type\n }, { ...(notations.length && {\n 'notations': Converter.reorderSequence(this.measure, notations, Converter.sequenceNotations)\n })}]\n .concat(Array(duration.dots).fill({ _name: 'dot' })), Converter.sequenceNote);\n }\n\n convertChordDegree(value, type, alter) {\n return {\n _name: 'degree',\n _attrs: { 'print-object': 'no' },\n _content: [{\n 'degree-value': value\n }, {\n 'degree-alter': alter\n }, {\n 'degree-type': type\n }]\n };\n }\n\n convertChordSymbol(chord) {\n const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`));\n if (!parsedChord) {\n this._log(LogLevel.Warn, `Unrecognized chord \"${chord.note}${chord.modifiers}\"`);\n return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null };\n }\n\n const rootStep = parsedChord.input.rootNote[0];\n const rootAlter = this._map(Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord \"${parsedChord.input.rootNote}\"`);\n const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join('');\n\n // Find chord quality (aka kind).\n // `chord-symbol` misses a bunch of MusicXML chord qualities so we'll have to derive them ourselves.\n const mapKind = {\n 'major': 'major',\n 'major6': 'major-sixth',\n 'major7': 'major-seventh',\n 'dominant7': 'dominant',\n 'minor': 'minor',\n 'minor6': 'minor-sixth',\n 'minor7': 'minor-seventh',\n 'minorMajor7': 'major-minor',\n 'augmented': 'augmented',\n 'diminished': 'diminished',\n 'diminished7': 'diminished-seventh',\n 'power': 'power'\n };\n let chordKind = this._map(mapKind, parsedChord.normalized.quality, '', `Unrecognized chord quality \"${parsedChord.normalized.quality}\"`);\n\n // Convert extensions to their equivalent MusicXML kind.\n // Find the highest extension, then replace the word following [major, minor, dominant] with it.\n if (parsedChord.normalized.extensions.length) {\n const extension = Math.max(...parsedChord.normalized.extensions.map(e => parseInt(e))).toString();\n const mapExtensionKind = {\n '9': '-ninth',\n '11': '-11th',\n '13': '-13th'\n };\n chordKind = chordKind.split('-')[0] + this._map(mapExtensionKind, extension, '', `Unhandled extension ${extension}`);\n\n // chord-symbol considers dominant-11th to be suspended - but that's not _necessarily_ the case.\n // https://en.wikipedia.org/wiki/Eleventh_chord\n if (chordKind === 'dominant-11th') {\n parsedChord.normalized.isSuspended = false;\n }\n }\n\n // Detect other chord kinds by explicit interval comparison.\n [\n { intervals: ['1', '4', '5'], kind: 'suspended-fourth', strict: true },\n { intervals: ['1', '5', '9'], kind: 'suspended-second', strict: true },\n { intervals: ['1', 'b3', 'b5', 'b7'], kind: 'half-diminished', strict: true },\n { intervals: ['1', '3', '#5', 'b7'], kind: 'augmented-seventh', strict: false }\n ].some(chord => {\n if (\n (!chord.strict || parsedChord.normalized.intervals.length === chord.intervals.length) &&\n chord.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])\n ) {\n chordKind = chord.kind;\n\n // Remove the intervals from the parsedChord to avoid duplication below.\n chord.intervals.forEach(i => {\n parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter(p => p === i);\n parsedChord.normalized.adds = parsedChord.normalized.adds.filter(p => p === i);\n parsedChord.normalized.omits = parsedChord.normalized.omits.filter(p => p === i);\n });\n\n // Add the missing intervals from the parsedChord to the adds.\n parsedChord.normalized.intervals.forEach(i => {\n if (!chord.intervals.includes(i)) {\n parsedChord.normalized.adds.push(i);\n }\n });\n\n // Stop looping.\n return true;\n }\n });\n\n // Handle suspended chords other than triads.\n const chordDegrees = [];\n if (parsedChord.normalized.isSuspended && !chordKind.includes('suspended')) {\n parsedChord.normalized.adds.push('4');\n // Handle case of sus(add3)\n if (!parsedChord.normalized.adds.includes('3')) {\n parsedChord.normalized.omits.push('3');\n }\n }\n\n // Add chord degrees.\n parsedChord.normalized.alterations.forEach(alteration => {\n const degree = alteration.slice(1);\n chordDegrees.push(\n this.convertChordDegree(\n degree,\n (degree === '5' || parsedChord.normalized.extensions.includes(degree)) ? 'alter' : 'add',\n this._map(Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in \"${alteration}\"`)\n )\n );\n });\n parsedChord.normalized.adds.forEach(add => {\n const alteration = Object.keys(Converter.mapAlter).includes(add[0]) ? add[0] : null;\n const degree = alteration ? add.slice(1) : add;\n chordDegrees.push(\n this.convertChordDegree(degree, 'add', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${add}\"`))\n );\n });\n parsedChord.normalized.omits.forEach(omit => {\n const alteration = Object.keys(Converter.mapAlter).includes(omit[0]) ? omit[0] : null;\n const degree = alteration ? omit.slice(1) : omit;\n chordDegrees.push(\n this.convertChordDegree(degree, 'subtract', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${omit}\"`))\n );\n });\n\n return { rootStep, rootAlter, chordKind, chordDegrees, chordText };\n }\n\n convertChord(chord) {\n let harmony = null;\n\n // Special case: 'n' for no chord\n if (chord.note === 'n') {\n harmony = [{\n 'root': [{\n _name: 'root-step',\n _attrs: { 'text': '' },\n _content: this.options.step\n }],\n }, {\n _name: 'kind',\n _attrs: { 'text': 'N.C.' },\n _content: 'none',\n }];\n }\n else {\n const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord);\n\n // Handle bass note\n const bass = !chord.over ? null : [{\n 'bass-step': chord.over.note[0]\n }, { ...(chord.over.note[1] && {\n 'bass-alter': this._map(Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note \"${chord.over.note}\"`)\n })}];\n\n harmony = [{\n 'root': [{\n 'root-step': rootStep\n }, { ...(rootAlter && { // Don't generate the root-alter entry if rootAlter is blank\n 'root-alter': rootAlter\n })}],\n }, {\n _name: 'kind',\n _attrs: { 'text': chordText, 'use-symbols': 'no' },\n _content: chordKind,\n }, { ...(bass && {\n 'bass': bass\n })}].concat(chordDegrees);\n }\n\n // TODO Handle alternate chord\n if (chord.alternate) {\n this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`);\n }\n\n return new Converter.Chord(\n harmony,\n // Initial chord duration is 1 beat\n this.calculateChordDuration(1).map(duration => this.convertChordNote(duration)),\n chord\n );\n }\n\n convertKey() {\n const mapKeys = {\n // Major keys\n 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5, 'F#': 6, 'C#': 7,\n 'F': -1, 'Bb': -2, 'Eb': -3, 'Ab': -4, 'Db': -5, 'Gb': -6, 'Cb': -7,\n // Minor keys\n 'A-': 0, 'E-': 1, 'B-': 2, 'F#-': 3, 'C#-': 4, 'G#-': 5, 'D#-': 6, 'A#-': 7,\n 'D-': -1, 'G-': -2, 'C-': -3, 'F-': -4, 'Bb-': -5, 'Eb-': -6, 'Ab-': -7\n };\n\n // Remember the fifth.\n this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature \"${this.song.key}\"`);\n\n return {\n _name: 'key',\n _attrs: [{ 'print-object': this.options.keySignature ? 'yes' : 'no' }],\n _content: [{\n 'fifths': this.fifths\n }, {\n 'mode': this.song.key.slice(-1) === '-' ? 'minor' : 'major'\n }]\n };\n }\n\n convertStyleAndGroove(style, groove) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n 'words': style\n }]\n }, {\n 'sound': [{\n 'play': [{\n _name: 'other-play',\n _attrs: { 'type': 'groove' },\n _content: groove || style\n }]\n }]\n }]\n };\n }\n\n _log(logLevel, message, measure = this.measure) {\n if (logLevel < this.options.logLevel) return;\n const log = `[ireal-musicxml] [${this.song.title}${measure ? '#' + measure.number() : ''}] ${message}`;\n let method = 'warn';\n switch (logLevel) {\n case LogLevel.Debug: method = 'debug'; break;\n case LogLevel.Info: method = 'info'; break;\n case LogLevel.Warn: method = 'warn'; break;\n case LogLevel.Error: method = 'error'; break;\n }\n console[method](log);\n }\n\n _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) {\n if (!key) return defaultValue;\n if (!(key in map)) {\n if (message) {\n this._log(logLevel, message, measure);\n }\n return defaultValue || null;\n }\n return map[key];\n }\n\n static _mmToTenths(mm, decimals = 2) {\n const value = mm * SCALING_TENTHS / SCALING_MM;\n const power = Math.pow(10, decimals);\n return Math.round(value * power) / power;\n }\n}\n", "{\n \"name\": \"ireal-musicxml\",\n \"version\": \"2.0.0\",\n \"description\": \"iReal Pro to MusicXML converter.\",\n \"author\": \"Karim Ratib (https://github.com/infojunkie)\",\n \"license\": \"GPL-3.0-only\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/infojunkie/ireal-musicxml\"\n },\n \"homepage\": \"https://github.com/infojunkie/ireal-musicxml\",\n \"type\": \"module\",\n \"main\": \"build/ireal-musicxml.js\",\n \"types\": \"build/ireal-musicxml.d.ts\",\n \"files\": [\n \"LICENSE.txt\",\n \"build/*\",\n \"src/*\"\n ],\n \"bin\": {\n \"ireal-musicxml\": \"src/cli/cli.js\"\n },\n \"scripts\": {\n \"build\": \"esbuild src/lib/index.js --bundle --minify --sourcemap --outfile=build/ireal-musicxml.js && cp src/types/* build/\",\n \"test\": \"npm run test:lint && npm run test:spec\",\n \"test:spec\": \"node --test\",\n \"test:typescript\": \"npm run build && ts-mocha test/**/*.spec.ts\",\n \"test:lint\": \"eslint src --fix\"\n },\n \"devDependencies\": {\n \"@xmldom/xmldom\": \"^0.8.0\",\n \"esbuild\": \"0.24.0\",\n \"eslint\": \"^9.13.0\",\n \"resolve\": \"^1.22.8\",\n \"sanitize-filename\": \"^1.6.3\",\n \"typescript\": \"^4.3.2\",\n \"validate-with-xmllint\": \"^1.2.0\",\n \"xpath.js\": \"^1.1.0\"\n },\n \"dependencies\": {\n \"chord-symbol\": \"^3.0.0\",\n \"fast-diff\": \"^1.2.0\",\n \"jstoxml\": \"^2.0.6\",\n \"promise\": \"^8.1.0\"\n }\n}\n", "import pkg from '../../package.json' with { type: 'json' };\n\nexport class Version {\n static name = pkg.name;\n static version = pkg.version;\n static author = pkg.author;\n static description = pkg.description;\n}"], - "mappings": "giBAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,cAYAA,GAAO,QAAUC,GACjB,SAASA,GAAQC,EAAM,CACdC,GAAM,SACPC,GAAa,EACbC,GAAW,IAGfF,GAAMA,GAAM,MAAM,EAAID,CAC1B,CAEA,IAAIC,GAAQ,CAAC,EAGTE,GAAW,G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"exports", "module", "rawAsap", "task", "queue", "requestFlush", "flushing", "index", "capacity", "flush", "currentIndex", "scan", "newLength", "scope", "BrowserMutationObserver", "makeRequestCallFromMutationObserver", "makeRequestCallFromTimer", "callback", "toggle", "observer", "node", "timeoutHandle", "handleTimer", "intervalHandle", "require_core", "__commonJSMin", "exports", "module", "asap", "noop", "LAST_ERROR", "IS_ERROR", "getThen", "obj", "ex", "tryCallOne", "fn", "a", "tryCallTwo", "b", "Promise", "doResolve", "onFulfilled", "onRejected", "safeThen", "res", "handle", "Handler", "self", "resolve", "reject", "deferred", "handleResolved", "cb", "ret", "newValue", "then", "finale", "i", "promise", "done", "value", "reason", "require_done", "__commonJSMin", "exports", "module", "Promise", "onFulfilled", "onRejected", "self", "err", "require_finally", "__commonJSMin", "exports", "module", "Promise", "f", "value", "err", "require_es6_extensions", "__commonJSMin", "exports", "module", "Promise", "TRUE", "valuePromise", "FALSE", "NULL", "UNDEFINED", "ZERO", "EMPTYSTRING", "value", "then", "ex", "resolve", "reject", "iterableToArray", "iterable", "x", "arr", "args", "remaining", "res", "i", "val", "p", "onSettledFulfill", "onSettledReject", "reason", "mapAllSettled", "item", "values", "onRejected", "getAggregateError", "errors", "error", "promises", "hasResolved", "rejectionReasons", "resolveOnce", "rejectionCheck", "require_browser_asap", "__commonJSMin", "exports", "module", "rawAsap", "freeTasks", "pendingErrors", "requestErrorThrow", "throwFirstError", "asap", "task", "rawTask", "RawTask", "error", "require_node_extensions", "__commonJSMin", "exports", "module", "Promise", "asap", "fn", "argumentCount", "denodeifyWithCount", "denodeifyWithoutCount", "callbackFn", "args", "i", "body", "fnLength", "_", "index", "callback", "ctx", "ex", "resolve", "reject", "value", "err", "require_synchronous", "__commonJSMin", "exports", "module", "Promise", "require_lib", "__commonJSMin", "exports", "module", "require_promise", "__commonJSMin", "exports", "module", "require_diff", "__commonJSMin", "exports", "module", "DIFF_DELETE", "DIFF_INSERT", "DIFF_EQUAL", "diff_main", "text1", "text2", "cursor_pos", "cleanup", "_fix_unicode", "editdiff", "find_cursor_edit_diff", "commonlength", "diff_commonPrefix", "commonprefix", "diff_commonSuffix", "commonsuffix", "diffs", "diff_compute_", "diff_cleanupMerge", "diff_cleanupSemantic", "longtext", "shorttext", "hm", "diff_halfMatch_", "text1_a", "text1_b", "text2_a", "text2_b", "mid_common", "diffs_a", "diffs_b", "diff_bisect_", "text1_length", "text2_length", "max_d", "v_offset", "v_length", "v1", "v2", "x", "delta", "front", "k1start", "k1end", "k2start", "k2end", "d", "k1", "k1_offset", "x1", "y1", "k2_offset", "x2", "diff_bisectSplit_", "k2", "y2", "y", "text1a", "text2a", "text1b", "text2b", "diffsb", "pointermin", "pointermax", "pointermid", "pointerstart", "is_surrogate_pair_start", "diff_commonOverlap_", "text_length", "best", "length", "pattern", "found", "pointerend", "is_surrogate_pair_end", "diff_halfMatchI_", "i", "seed", "j", "best_common", "best_longtext_a", "best_longtext_b", "best_shorttext_a", "best_shorttext_b", "prefixLength", "suffixLength", "hm1", "hm2", "changes", "equalities", "equalitiesLength", "lastequality", "pointer", "length_insertions1", "length_deletions1", "length_insertions2", "length_deletions2", "diff_cleanupSemanticLossless", "deletion", "insertion", "overlap_length1", "overlap_length2", "nonAlphaNumericRegex_", "whitespaceRegex_", "linebreakRegex_", "blanklineEndRegex_", "blanklineStartRegex_", "diff_cleanupSemanticScore_", "one", "two", "char1", "char2", "nonAlphaNumeric1", "nonAlphaNumeric2", "whitespace1", "whitespace2", "lineBreak1", "lineBreak2", "blankLine1", "blankLine2", "equality1", "edit", "equality2", "commonOffset", "commonString", "bestEquality1", "bestEdit", "bestEquality2", "bestScore", "score", "fix_unicode", "count_delete", "count_insert", "text_delete", "text_insert", "previous_equality", "ends_with_pair_start", "stray", "k", "starts_with_pair_end", "n", "charCode", "str", "remove_empty_tuples", "tuples", "ret", "make_edit_splice", "before", "oldMiddle", "newMiddle", "after", "oldText", "newText", "oldRange", "newRange", "oldLength", "newLength", "oldCursor", "oldBefore", "oldAfter", "maybeNewCursor", "editBefore", "newCursor", "newBefore", "newAfter", "oldPrefix", "newPrefix", "editAfter", "cursor", "oldSuffix", "newSuffix", "replaceRange", "diff", "require_jstoxml", "__commonJSMin", "exports", "global", "factory", "mod", "_exports", "_toConsumableArray", "arr", "_arrayWithoutHoles", "_iterableToArray", "_unsupportedIterableToArray", "_nonIterableSpread", "o", "minLen", "_arrayLikeToArray", "n", "iter", "len", "i", "arr2", "ownKeys", "object", "enumerableOnly", "keys", "symbols", "sym", "_objectSpread", "target", "source", "key", "_defineProperty", "obj", "value", "_typeof", "ARRAY", "BOOLEAN", "DATE", "NULL", "NUMBER", "OBJECT", "SPECIAL_OBJECT", "STRING", "PRIVATE_VARS", "PRIVATE_VARS_REGEXP", "getIndentStr", "indent", "depth", "getType", "val", "filterStr", "inputStr", "filter", "regexp", "str", "entity", "getAttributeKeyVals", "attributes", "keyVals", "attr", "filteredVal", "valStr", "formatAttributes", "keysValsJoined", "objToArray", "PRIMITIVE_TYPES", "isPrimitive", "SIMPLE_TYPES", "isSimpleType", "isSimpleXML", "xmlStr", "DEFAULT_XML_HEADER", "getHeaderString", "_ref", "header", "isOutputStart", "shouldOutputHeader", "shouldUseDefaultHeader", "defaultEntityFilter", "toXML", "config", "_config$depth", "_isFirstItem", "_config$_isOutputStar", "_isOutputStart", "_config$attributesFil", "rawAttributesFilter", "_config$filter", "rawFilter", "shouldTurnOffAttributesFilter", "attributesFilter", "shouldTurnOffFilter", "indentStr", "valType", "headerStr", "outputStr", "_name", "_content", "isArrayOfPrimitives", "primitives", "a", "newVal", "newValType", "isNewValSimple", "preIndentStr", "preTag", "valIsEmpty", "shouldSelfClose", "selfCloseStr", "attributesString", "tag", "preTagCloseStr", "postTag", "outputArr", "index", "newConfig", "outputObj", "privateVar", "hasContent", "newContentObj", "xml", "fnResult", "_outputArr", "singleVal", "_default", "require_chord_symbol", "__commonJSMin", "exports", "module", "root", "factory", "getNative", "__webpack_require__", "DataView", "hashClear", "hashDelete", "hashGet", "hashHas", "hashSet", "Hash", "entries", "index", "length", "entry", "listCacheClear", "listCacheDelete", "listCacheGet", "listCacheHas", "listCacheSet", "ListCache", "Map", "mapCacheClear", "mapCacheDelete", "mapCacheGet", "mapCacheHas", "mapCacheSet", "MapCache", "Promise", "Set", "setCacheAdd", "setCacheHas", "SetCache", "values", "stackClear", "stackDelete", "stackGet", "stackHas", "stackSet", "Stack", "data", "Symbol", "Uint8Array", "WeakMap", "apply", "func", "thisArg", "args", "arrayEach", "array", "iteratee", "arrayFilter", "predicate", "resIndex", "result", "value", "baseIndexOf", "arrayIncludes", "arrayIncludesWith", "comparator", "baseTimes", "isArguments", "isArray", "isBuffer", "isIndex", "isTypedArray", "objectProto", "hasOwnProperty", "arrayLikeKeys", "inherited", "isArr", "isArg", "isBuff", "isType", "skipIndexes", "key", "arrayMap", "arrayPush", "offset", "arraySome", "baseAssignValue", "eq", "assignValue", "object", "objValue", "assocIndexOf", "copyObject", "keys", "baseAssign", "source", "keysIn", "baseAssignIn", "defineProperty", "cloneBuffer", "copyArray", "copySymbols", "copySymbolsIn", "getAllKeys", "getAllKeysIn", "getTag", "initCloneArray", "initCloneByTag", "initCloneObject", "isMap", "isObject", "isSet", "CLONE_DEEP_FLAG", "CLONE_FLAT_FLAG", "CLONE_SYMBOLS_FLAG", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "genTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "symbolTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "cloneableTags", "baseClone", "bitmask", "customizer", "stack", "isDeep", "isFlat", "isFull", "tag", "isFunc", "stacked", "subValue", "keysFunc", "props", "objectCreate", "baseCreate", "proto", "baseUnary", "cacheHas", "LARGE_ARRAY_SIZE", "baseDifference", "includes", "isCommon", "valuesLength", "outer", "computed", "valuesIndex", "baseFindIndex", "fromIndex", "fromRight", "isFlattenable", "baseFlatten", "depth", "isStrict", "createBaseFor", "baseFor", "baseForOwn", "castPath", "toKey", "baseGet", "path", "baseGetAllKeys", "symbolsFunc", "getRawTag", "objectToString", "nullTag", "undefinedTag", "symToStringTag", "baseGetTag", "baseHasIn", "baseIsNaN", "strictIndexOf", "baseInverter", "setter", "accumulator", "isObjectLike", "baseIsArguments", "baseIsEqualDeep", "baseIsEqual", "other", "equalArrays", "equalByTag", "equalObjects", "COMPARE_PARTIAL_FLAG", "equalFunc", "objIsArr", "othIsArr", "objTag", "othTag", "objIsObj", "othIsObj", "isSameTag", "objIsWrapped", "othIsWrapped", "objUnwrapped", "othUnwrapped", "baseIsMap", "COMPARE_UNORDERED_FLAG", "baseIsMatch", "matchData", "noCustomizer", "srcValue", "isFunction", "isMasked", "toSource", "reRegExpChar", "reIsHostCtor", "funcProto", "funcToString", "reIsNative", "baseIsNative", "pattern", "baseIsSet", "isLength", "typedArrayTags", "baseIsTypedArray", "baseMatches", "baseMatchesProperty", "identity", "property", "baseIteratee", "isPrototype", "nativeKeys", "baseKeys", "nativeKeysIn", "baseKeysIn", "isProto", "getMatchData", "matchesStrictComparable", "get", "hasIn", "isKey", "isStrictComparable", "baseProperty", "basePropertyDeep", "overRest", "setToString", "baseRest", "start", "constant", "baseSetToString", "string", "n", "isSymbol", "INFINITY", "symbolProto", "symbolToString", "baseToString", "trimmedEndIndex", "reTrimStart", "baseTrim", "createSet", "setToArray", "baseUniq", "seen", "set", "seenIndex", "cache", "stringToPath", "toString", "cloneArrayBuffer", "arrayBuffer", "freeExports", "freeModule", "moduleExports", "Buffer", "allocUnsafe", "buffer", "cloneDataView", "dataView", "reFlags", "cloneRegExp", "regexp", "symbolValueOf", "cloneSymbol", "symbol", "cloneTypedArray", "typedArray", "isNew", "newValue", "getSymbols", "getSymbolsIn", "coreJsData", "iterable", "isArrayLike", "createFind", "findIndexFunc", "collection", "createInverter", "toIteratee", "noop", "isPartial", "arrLength", "othLength", "arrStacked", "othStacked", "arrValue", "othValue", "compared", "othIndex", "mapToArray", "convert", "objProps", "objLength", "othProps", "objStacked", "skipCtor", "objCtor", "othCtor", "freeGlobal", "isKeyable", "getMapData", "map", "getValue", "overArg", "getPrototype", "nativeObjectToString", "isOwn", "unmasked", "stubArray", "propertyIsEnumerable", "nativeGetSymbols", "promiseTag", "dataViewCtorString", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "Ctor", "ctorString", "hasPath", "hasFunc", "nativeCreate", "HASH_UNDEFINED", "spreadableSymbol", "MAX_SAFE_INTEGER", "reIsUint", "type", "reIsDeepProp", "reIsPlainProp", "maskSrcKey", "uid", "arrayProto", "splice", "lastIndex", "size", "memoize", "MAX_MEMOIZE_SIZE", "memoizeCapped", "freeProcess", "nodeUtil", "types", "transform", "arg", "nativeMax", "otherArgs", "freeSelf", "shortOut", "HOT_COUNT", "HOT_SPAN", "nativeNow", "count", "lastCalled", "stamp", "remaining", "pairs", "rePropName", "reEscapeChar", "match", "number", "quote", "subString", "reWhitespace", "clone", "cloneDeep", "isArrayLikeObject", "difference", "findIndex", "find", "toInteger", "defaultValue", "invert", "stubFalse", "nativeIsBuffer", "isEqual", "asyncTag", "proxyTag", "nodeIsMap", "nodeIsSet", "nodeIsTypedArray", "FUNC_ERROR_TEXT", "resolver", "memoized", "toNumber", "MAX_INTEGER", "toFinite", "sign", "remainder", "NAN", "reIsBadHex", "reIsBinary", "reIsOctal", "freeParseInt", "isBinary", "uniq", "without", "__webpack_module_cache__", "moduleId", "cachedModule", "__webpack_modules__", "getter", "definition", "obj", "prop", "chain", "allFunctions", "input", "reduce", "fn", "checkCustomFilters", "customFilters", "Array", "TypeError", "some", "filter", "helpers_checkCustomFilters", "notes", "AFlat", "A", "ASharp", "BFlat", "B", "C", "CSharp", "DFlat", "D", "DSharp", "EFlat", "E", "F", "FSharp", "GFlat", "G", "GSharp", "english", "Ab", "Bb", "Cb", "Db", "Eb", "Fb", "Gb", "latin", "Lab", "La", "Sib", "Si", "Dob", "Do", "Reb", "R\u00E9b", "Re", "R\u00E9", "Mib", "Mi", "Fab", "Fa", "Solb", "Sol", "german", "As", "Ais", "Hes", "H", "His", "Ces", "Cis", "Des", "Dis", "Es", "Eis", "Fes", "Fis", "Ges", "Gis", "getAccidentalsVariation", "variant", "Object", "acc", "curr", "replace", "englishVariantsToNotes", "_objectSpread", "latinVariantsToNotes", "germanVariantsToNotes", "allVariantsToNotes", "allVariants", "sort", "a", "b", "englishVariants", "latinVariants", "germanVariants", "allVariantsPerGroup", "name", "InvalidInputError", "_this", "_classCallCheck", "_super", "Error", "UnexpectedError", "_this2", "message", "_super2", "ChordSymbolError", "chord", "errorName", "_this3", "_super3", "NoSymbolFoundError", "_super4", "InvalidModifierError", "invalidChars", "descriptor", "_super5", "InvalidIntervalsError", "forbiddenCombo", "join", "_super6", "hasExactly", "allIntervals", "search", "arraySearch", "_isArray", "_isEqual", "hasOneOf", "has", "hasAll", "hasNoneOf", "require", "lookupMethod", "interval", "allForbiddenCombos", "checkIntervalsConsistency", "intervals", "normalized", "combo", "formatSymbol", "_chord$formatted", "formatted", "rootNote", "bassNote", "chordChanges", "qualities", "ma", "ma6", "ma7", "dom7", "mi", "mi6", "mi7", "miMa7", "aug", "dim", "dim7", "power", "bass", "majorQualities", "minorQualities", "qualityToDescriptor", "_qualityToDescriptor", "formatSymbolParts_defineProperty", "getHighestExtension", "intents", "alt", "chordChangesDescriptors", "add", "add7", "omit", "sus", "formatSymbolParts", "getDescriptor", "getChordChanges", "quality", "isSuspended", "extensions", "highestExtension", "major", "alterations", "formattedOmits", "formatOmits", "omits", "isAltered", "formattedAdds", "formatAdds", "adds", "_toConsumableArray", "omitted", "getParsableDescriptor", "allFilters", "toLowerCaseExceptMajorM", "removeSpaces", "addDisambiguators", "addMissingVerbs", "parsableDescriptor", "toLowerCase", "allTokensWithVerbs", "currentVerb", "hasVerb", "parenthesis", "split", "forEach", "token", "startsWith", "push", "initChord", "parserConfiguration", "_cloneDeep", "notesSharp", "notesFlat", "rootNoteToScaleAccidentals", "_rootNoteToScaleAccid", "nameIndividualChordNotes_defineProperty", "maj", "min", "nameIndividualChordNotes", "semitones", "minMaj", "refNotes", "rootNoteIndex", "indexOf", "indexedNotes", "nameIndividualChordNotes_toConsumableArray", "slice", "chordNotes", "i", "normalizeNotes", "normalizeDescriptor", "chordIntervals", "_clone", "isPowerChord", "isBass", "getOmits", "getIsSuspended", "_getChordQuality", "getChordQuality", "qualityIntervals", "getExtensions", "baseIntervals", "normalizeDescriptor_toConsumableArray", "_getAddsAndAlteration", "getAddsAndAlterations", "normalizeDescriptor_objectSpread", "hasMajorIntent", "intervalsForQualityDetection", "getIntervalsForQualityDetection", "intervalsToQualities", "_find", "o", "undoOmit3", "bind", "undoSuspension", "undoAlt5", "_uniq", "with3rd", "unSuspended", "_without", "isAlt", "unaltered", "canBeExtended", "isMinorExtended13th", "isMajorExtended13th", "isExtended11th", "isExtended9th", "canHave11th", "isAlteration", "hasAdd3", "sortIntervals", "_qualityAlterations", "qualityAlterations", "normalizeDescriptor_defineProperty", "sortableA", "Number", "parseInt", "sortableB", "parseBase", "noteVariants", "notesRegex", "notesAndDescriptorRegex", "RegExp", "allModifiers", "halfDim", "seventh", "sus2", "ninth", "eleventh", "thirteenth", "fifthFlat", "fifthSharp", "ninthFlat", "ninthSharp", "eleventhSharp", "thirteenthFlat", "add3", "add4", "addb6", "add6", "add69", "add9", "add11", "add13", "omit3", "omit5", "\u0394", "M", "Ma", "Maj", "Major", "major7th", "getDerivedModifiers", "allSymbols", "modifiers_objectSpread", "m", "Min", "Minor", "minor", "diminished", "\u00D8", "\u00F8", "h", "augmented", "sus4", "suspended", "suspended4", "suspended2", "b3", "b5", "b9", "addb9", "b13", "addb13", "add2", "b6", "no3", "no5", "altered", "modifierId", "derivedFn", "modifiers", "intervalsToSemitones", "bb7", "b7", "parseDescriptor", "altIntervals", "getModifiers", "getIntervals", "getSemitones", "getIntents", "descriptorRegex", "escapeRegex", "descriptorMatches", "remainingChars", "allModifiersId", "trim", "parseDescriptor_toConsumableArray", "getThird", "getFourth", "getFifths", "getSixth", "getSevenths", "getNinths", "getElevenths", "getThirteenths", "third", "fourth", "fifths", "shouldAlter", "sixth", "isExtended", "sevenths", "getMinorOrMajorSeventh", "elevenths", "thirteenths", "chordParserFactory", "allAltIntervals", "allNotationSystems", "_parserConfiguration$", "notationSystems", "_parserConfiguration$2", "_parserConfiguration$3", "checkAltIntervals", "checkNotationSystems", "parseChord", "allErrors", "isInputValid", "e", "formatError", "allVariantsPerGroupCopy", "variantsGroup", "variants", "shift", "chordParserFactory_toConsumableArray", "notationSystem", "getUnexpectedError", "error", "checkArray", "arrayName", "arrayToTest", "allowedValues", "allowEmpty", "system", "exceptionError", "parser_chordParserFactory", "shortDescriptors", "aug7", "shortenNormalized", "isSus2", "isAdd2", "isAug7", "isEleventh", "change", "shortenNormalized_objectSpread", "simplify", "level", "intervalsToRemove", "max", "core", "_difference", "sharpsToFlats", "flatsToSharps", "_invert", "transpose", "transposeValue", "useFlats", "_chord$normalized", "rootSharp", "convertToSharp", "transposeNote", "bassSharp", "note", "noteIndex", "transposedIndex", "octaves", "Math", "floor", "correctedTransposedIndex", "transposed", "translationTables", "convertNotationSystem", "finalNotationSystem", "textPrinter", "rawPrinter", "cloned", "textPrinted", "reParsed", "chordRendererFactory", "_ref", "_ref$useShortNamings", "useShortNamings", "_ref$simplify", "_ref$transposeValue", "_ref$harmonizeAcciden", "harmonizeAccidentals", "_ref$useFlats", "_ref$printer", "printer", "_ref$notationSystem", "_ref$customFilters", "simplifyFilter", "chordRendererFactory_toConsumableArray", "renderChord", "isValidChord", "filteredChord", "chordRendererFactory_typeof", "renderer_chordRendererFactory", "import_promise", "import_fast_diff", "Playlist", "ireal", "playlistEncoded", "parts", "part", "Song", "error", "title", "song", "songs", "diffs", "diff", "d", "Cell", "Chord", "note", "modifiers", "over", "alternate", "_Song", "oldFormat", "music", "unscramble", "text", "arr", "found", "i", "match", "cells", "obj", "prevobj", "cell", "composer", "chord", "comment", "offset", "r", "p", "obfusc50", "newString", "import_jstoxml", "import_chord_symbol", "package_default", "Version", "package_default", "chordParserFactory", "chordRendererFactory", "ChordSymbol", "LogLevel", "MUSICXML_VERSION", "SCALING_MM", "SCALING_TENTHS", "Converter", "_Converter", "song", "options", "realOptions", "jstoxml", "Version", "date", "number", "chord", "note", "harmony", "notes", "ireal", "isNewSystem", "cellIndex", "measures", "cell", "target", "m", "annot", "section", "time", "ending", "index", "b", "c", "comment", "repeatFn", "remainingCells", "direction", "d", "s", "measure", "elements", "sequence", "a", "a1", "a2", "k1", "k2", "i1", "i2", "repeats", "type", "bars", "location", "style", "repeat", "bpm", "beats", "beatType", "chordIndex", "duration", "ds", "mapDuration", "fermata", "tie", "altered", "noteType", "notations", "value", "alter", "parsedChord", "rootStep", "rootAlter", "chordText", "mapKind", "chordKind", "extension", "e", "mapExtensionKind", "i", "p", "chordDegrees", "alteration", "degree", "add", "omit", "bass", "mapKeys", "groove", "logLevel", "message", "log", "method", "map", "key", "defaultValue", "mm", "decimals", "power", "convertSync", "ireal", "options", "playlist", "Playlist", "song", "Converter", "convert", "Promise", "resolve"] + "sourcesContent": ["\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js\u2019s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n", "'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n", "'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._D);\n p._y = 1;\n p._z = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._y === 3) {\n val = val._z;\n }\n if (val._y === 1) return res(i, val._z);\n if (val._y === 2) reject(val._z);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nfunction onSettledFulfill(value) {\n return { status: 'fulfilled', value: value };\n}\nfunction onSettledReject(reason) {\n return { status: 'rejected', reason: reason };\n}\nfunction mapAllSettled(item) {\n if(item && (typeof item === 'object' || typeof item === 'function')){\n if(item instanceof Promise && item.then === Promise.prototype.then){\n return item.then(onSettledFulfill, onSettledReject);\n }\n var then = item.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(item)).then(onSettledFulfill, onSettledReject)\n }\n }\n\n return onSettledFulfill(item);\n}\nPromise.allSettled = function (iterable) {\n return Promise.all(iterableToArray(iterable).map(mapAllSettled));\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\nfunction getAggregateError(errors){\n if(typeof AggregateError === 'function'){\n return new AggregateError(errors,'All promises were rejected');\n }\n\n var error = new Error('All promises were rejected');\n\n error.name = 'AggregateError';\n error.errors = errors;\n\n return error;\n}\n\nPromise.any = function promiseAny(values) {\n return new Promise(function(resolve, reject) {\n var promises = iterableToArray(values);\n var hasResolved = false;\n var rejectionReasons = [];\n\n function resolveOnce(value) {\n if (!hasResolved) {\n hasResolved = true;\n resolve(value);\n }\n }\n\n function rejectionCheck(reason) {\n rejectionReasons.push(reason);\n\n if (rejectionReasons.length === promises.length) {\n reject(getAggregateError(rejectionReasons));\n }\n }\n\n if(promises.length === 0){\n reject(getAggregateError(rejectionReasons));\n } else {\n promises.forEach(function(value){\n Promise.resolve(value).then(resolveOnce, rejectionCheck);\n });\n }\n });\n};\n", "\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n", "'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._y === 3) {\n return this._z.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getReason = function () {\n if (this._y === 3) {\n return this._z.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getState = function () {\n if (this._y === 3) {\n return this._z.getState();\n }\n if (this._y === -1 || this._y === -2) {\n return 0;\n }\n\n return this._y;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n", "'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n", "'use strict';\n\nmodule.exports = require('./lib')\n", "/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @param {boolean} [cleanup] Apply semantic cleanup before returning.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n }\n return diffs;\n}\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)],\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = delta % 2 !== 0;\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (\n x1 < text1_length &&\n y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (\n x2 < text1_length &&\n y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ===\n text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n}\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\nfunction diff_commonOverlap_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: http://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n}\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = \"\";\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext.substring(i),\n shorttext.substring(j)\n );\n var suffixLength = diff_commonSuffix(\n longtext.substring(0, i),\n shorttext.substring(0, j)\n );\n if (best_common.length < suffixLength + prefixLength) {\n best_common =\n shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n best_shorttext_b,\n best_common,\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n );\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemantic(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastequality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (\n lastequality &&\n lastequality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastequality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0, [\n DIFF_DELETE,\n lastequality,\n ]);\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1),\n ]);\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2),\n ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n}\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemanticLossless(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n}\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (\n previous_equality >= 0 &&\n ends_with_pair_start(diffs[previous_equality][1])\n ) {\n var stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(\n 0,\n -1\n );\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n 0,\n commonlength\n );\n } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n text_insert.substring(0, commonlength),\n ]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n }\n // Delete the offending records and add the merged ones.\n var n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(\n pointer - n,\n n,\n [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]\n );\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = \"\";\n text_insert = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === \"\") {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) === diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n var ret = [];\n for (var i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after],\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n var oldRange =\n typeof cursor_pos === \"number\"\n ? { index: cursor_pos, length: 0 }\n : cursor_pos.oldRange;\n var newRange = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n var oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n var oldCursor = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n var newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n var newBefore = newText.slice(0, newCursor);\n var newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n var cursor = oldCursor;\n var newBefore = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n var oldPrefix = oldText.slice(0, oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n var newPrefix = newText.slice(0, prefixLength);\n var newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos, cleanup) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, cleanup, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n", "(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.jstoxml = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.toXML = _exports.default = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n var ARRAY = \"array\";\n var BOOLEAN = \"boolean\";\n var DATE = \"date\";\n var NULL = \"null\";\n var NUMBER = \"number\";\n var OBJECT = \"object\";\n var SPECIAL_OBJECT = \"special-object\";\n var STRING = \"string\";\n var PRIVATE_VARS = [\"_selfCloseTag\", \"_attrs\"];\n var PRIVATE_VARS_REGEXP = new RegExp(PRIVATE_VARS.join(\"|\"), \"g\");\n /**\n * Determines the indent string based on current tree depth.\n */\n\n var getIndentStr = function getIndentStr() {\n var indent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return indent.repeat(depth);\n };\n /**\n * Sugar function supplementing JS's quirky typeof operator, plus some extra help to detect\n * \"special objects\" expected by jstoxml.\n * Example:\n * getType(new Date());\n * -> 'date'\n */\n\n\n var getType = function getType(val) {\n return Array.isArray(val) && ARRAY || _typeof(val) === OBJECT && val !== null && val._name && SPECIAL_OBJECT || val instanceof Date && DATE || val === null && NULL || _typeof(val);\n };\n /**\n * Replaces matching values in a string with a new value.\n * Example:\n * filterStr('foo&bar', { '&': '&' });\n * -> 'foo&bar'\n */\n\n\n var filterStr = function filterStr() {\n var inputStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Passthrough/no-op for nonstrings (e.g. number, boolean).\n if (typeof inputStr !== \"string\") {\n return inputStr;\n }\n\n var regexp = new RegExp(\"(\".concat(Object.keys(filter).join(\"|\"), \")(?!(\\\\w|#)*;)\"), \"g\");\n return String(inputStr).replace(regexp, function (str, entity) {\n return filter[entity] || \"\";\n });\n };\n /**\n * Maps an object or array of arribute keyval pairs to a string.\n * Examples:\n * { foo: 'bar', baz: 'g' } -> 'foo=\"bar\" baz=\"g\"'\n * [ { \u26A1: true }, { foo: 'bar' } ] -> '\u26A1 foo=\"bar\"'\n */\n\n\n var getAttributeKeyVals = function getAttributeKeyVals() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = [];\n\n if (Array.isArray(attributes)) {\n // Array containing complex objects and potentially duplicate attributes.\n keyVals = attributes.map(function (attr) {\n var key = Object.keys(attr)[0];\n var val = attr[key];\n var filteredVal = filter ? filterStr(val, filter) : val;\n var valStr = filteredVal === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n } else {\n var keys = Object.keys(attributes);\n keyVals = keys.map(function (key) {\n // Simple object - keyval pairs.\n // For boolean true, simply output the key.\n var filteredVal = filter ? filterStr(attributes[key], filter) : attributes[key];\n var valStr = attributes[key] === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n }\n\n return keyVals;\n };\n /**\n * Converts an attributes object/array to a string of keyval pairs.\n * Example:\n * formatAttributes({ a: 1, b: 2 })\n * -> 'a=\"1\" b=\"2\"'\n */\n\n\n var formatAttributes = function formatAttributes() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = getAttributeKeyVals(attributes, filter);\n if (keyVals.length === 0) return \"\";\n var keysValsJoined = keyVals.join(\" \");\n return \" \".concat(keysValsJoined);\n };\n /**\n * Converts an object to a jstoxml array.\n * Example:\n * objToArray({ foo: 'bar', baz: 2 });\n * ->\n * [\n * {\n * _name: 'foo',\n * _content: 'bar'\n * },\n * {\n * _name: 'baz',\n * _content: 2\n * }\n * ]\n */\n\n\n var objToArray = function objToArray() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(obj).map(function (key) {\n return {\n _name: key,\n _content: obj[key]\n };\n });\n };\n /**\n * Determines if a value is a primitive JavaScript value (not including Symbol).\n * Example:\n * isPrimitive(4);\n * -> true\n */\n\n\n var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN];\n\n var isPrimitive = function isPrimitive(val) {\n return PRIMITIVE_TYPES.includes(getType(val));\n };\n /**\n * Determines if a value is a simple primitive type that can fit onto one line. Needed for\n * determining any needed indenting and line breaks.\n * Example:\n * isSimpleType(new Date());\n * -> true\n */\n\n\n var SIMPLE_TYPES = [].concat(PRIMITIVE_TYPES, [DATE, SPECIAL_OBJECT]);\n\n var isSimpleType = function isSimpleType(val) {\n return SIMPLE_TYPES.includes(getType(val));\n };\n /**\n * Determines if an XML string is a simple primitive, or contains nested data.\n * Example:\n * isSimpleXML('');\n * -> false\n */\n\n\n var isSimpleXML = function isSimpleXML(xmlStr) {\n return !xmlStr.match(\"<\");\n };\n /**\n * Assembles an XML header as defined by the config.\n */\n\n\n var DEFAULT_XML_HEADER = '';\n\n var getHeaderString = function getHeaderString(_ref) {\n var header = _ref.header,\n indent = _ref.indent,\n isOutputStart = _ref.isOutputStart;\n var shouldOutputHeader = header && isOutputStart;\n if (!shouldOutputHeader) return \"\";\n var shouldUseDefaultHeader = _typeof(header) === BOOLEAN; // return `${shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header}${indent ? \"\\n\" : \"\"\n // }`;\n\n return shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header;\n };\n /**\n * Recursively traverses an object tree and converts the output to an XML string.\n * Example:\n * toXML({ foo: 'bar' });\n * -> bar\n */\n\n\n var defaultEntityFilter = {\n \"<\": \"<\",\n \">\": \">\",\n \"&\": \"&\"\n };\n\n var toXML = function toXML() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _config$depth = config.depth,\n depth = _config$depth === void 0 ? 0 : _config$depth,\n indent = config.indent,\n _isFirstItem = config._isFirstItem,\n _config$_isOutputStar = config._isOutputStart,\n _isOutputStart = _config$_isOutputStar === void 0 ? true : _config$_isOutputStar,\n header = config.header,\n _config$attributesFil = config.attributesFilter,\n rawAttributesFilter = _config$attributesFil === void 0 ? {} : _config$attributesFil,\n _config$filter = config.filter,\n rawFilter = _config$filter === void 0 ? {} : _config$filter;\n\n var shouldTurnOffAttributesFilter = typeof rawAttributesFilter === 'boolean' && !rawAttributesFilter;\n var attributesFilter = shouldTurnOffAttributesFilter ? {} : _objectSpread(_objectSpread(_objectSpread({}, defaultEntityFilter), {\n '\"': \""\"\n }), rawAttributesFilter);\n var shouldTurnOffFilter = typeof rawFilter === 'boolean' && !rawFilter;\n var filter = shouldTurnOffFilter ? {} : _objectSpread(_objectSpread({}, defaultEntityFilter), rawFilter); // Determine indent string based on depth.\n\n var indentStr = getIndentStr(indent, depth); // For branching based on value type.\n\n var valType = getType(obj);\n var headerStr = getHeaderString({\n header: header,\n indent: indent,\n depth: depth,\n isOutputStart: _isOutputStart\n });\n var isOutputStart = _isOutputStart && !headerStr && _isFirstItem && depth === 0;\n var outputStr = \"\";\n\n switch (valType) {\n case \"special-object\":\n {\n // Processes a specially-formatted object used by jstoxml.\n var _name = obj._name,\n _content = obj._content; // Output text content without a tag wrapper.\n\n if (_content === null) {\n outputStr = _name;\n break;\n } // Handles arrays of primitive values. (#33)\n\n\n var isArrayOfPrimitives = Array.isArray(_content) && _content.every(isPrimitive);\n\n if (isArrayOfPrimitives) {\n var primitives = _content.map(function (a) {\n return toXML({\n _name: _name,\n _content: a\n }, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth,\n _isOutputStart: false\n }));\n });\n\n return primitives.join('');\n } // Don't output private vars (such as _attrs).\n\n\n if (_name.match(PRIVATE_VARS_REGEXP)) break; // Process the nested new value and create new config.\n\n var newVal = toXML(_content, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth + 1,\n _isOutputStart: isOutputStart\n }));\n var newValType = getType(newVal);\n var isNewValSimple = isSimpleXML(newVal); // Pre-tag output (indent and line breaks).\n\n var preIndentStr = indent && !isOutputStart ? \"\\n\" : \"\";\n var preTag = \"\".concat(preIndentStr).concat(indentStr); // Special handling for comments, preserving preceding line breaks/indents.\n\n if (_name === '_comment') {\n outputStr += \"\".concat(preTag, \"\");\n break;\n } // Tag output.\n\n\n var valIsEmpty = newValType === \"undefined\" || newVal === \"\";\n var shouldSelfClose = _typeof(obj._selfCloseTag) === BOOLEAN ? valIsEmpty && obj._selfCloseTag : valIsEmpty;\n var selfCloseStr = shouldSelfClose ? \"/\" : \"\";\n var attributesString = formatAttributes(obj._attrs, attributesFilter);\n var tag = \"<\".concat(_name).concat(attributesString).concat(selfCloseStr, \">\"); // Post-tag output (closing tag, indent, line breaks).\n\n var preTagCloseStr = indent && !isNewValSimple ? \"\\n\".concat(indentStr) : \"\";\n var postTag = !shouldSelfClose ? \"\".concat(newVal).concat(preTagCloseStr, \"\") : \"\";\n outputStr += \"\".concat(preTag).concat(tag).concat(postTag);\n break;\n }\n\n case \"object\":\n {\n // Iterates over keyval pairs in an object, converting each item to a special-object.\n var keys = Object.keys(obj);\n var outputArr = keys.map(function (key, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === keys.length,\n _isOutputStart: isOutputStart\n });\n\n var outputObj = {\n _name: key\n };\n\n if (getType(obj[key]) === \"object\") {\n // Sub-object contains an object.\n // Move private vars up as needed. Needed to support certain types of objects\n // E.g. { foo: { _attrs: { a: 1 } } } -> \n PRIVATE_VARS.forEach(function (privateVar) {\n var val = obj[key][privateVar];\n\n if (typeof val !== \"undefined\") {\n outputObj[privateVar] = val;\n delete obj[key][privateVar];\n }\n });\n var hasContent = typeof obj[key]._content !== \"undefined\";\n\n if (hasContent) {\n // _content has sibling keys, so pass as an array (edge case).\n // E.g. { foo: 'bar', _content: { baz: 2 } } -> bar2\n if (Object.keys(obj[key]).length > 1) {\n var newContentObj = Object.assign({}, obj[key]);\n delete newContentObj._content;\n outputObj._content = [].concat(_toConsumableArray(objToArray(newContentObj)), [obj[key]._content]);\n }\n }\n } // Fallthrough: just pass the key as the content for the new special-object.\n\n\n if (typeof outputObj._content === \"undefined\") outputObj._content = obj[key];\n var xml = toXML(outputObj, newConfig, key);\n return xml;\n }, config);\n outputStr = outputArr.join('');\n break;\n }\n\n case \"function\":\n {\n // Executes a user-defined function and returns output.\n var fnResult = obj(config);\n outputStr = toXML(fnResult, config);\n break;\n }\n\n case \"array\":\n {\n // Iterates and converts each value in an array.\n var _outputArr = obj.map(function (singleVal, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === obj.length,\n _isOutputStart: isOutputStart\n });\n\n return toXML(singleVal, newConfig);\n });\n\n outputStr = _outputArr.join('');\n break;\n }\n // number, string, boolean, date, null, etc\n\n default:\n {\n outputStr = filterStr(obj, filter);\n break;\n }\n }\n\n return \"\".concat(headerStr).concat(outputStr);\n };\n\n _exports.toXML = toXML;\n var _default = {\n toXML: toXML\n };\n _exports.default = _default;\n});\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"chord-symbol\"] = factory();\n\telse\n\t\troot[\"chord-symbol\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn ", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n", "var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n", "var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n", "var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n", "var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n", "var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n", "var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n", "var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseForOwn = require('./_baseForOwn');\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nmodule.exports = baseInverter;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n", "var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n", "var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n", "var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n", "var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n", "var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n", "var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n", "var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n", "var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n", "var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n", "var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n", "var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n", "var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n", "var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n", "var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n", "var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", "var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n", "var baseInverter = require('./_baseInverter');\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nmodule.exports = createInverter;\n", "var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n", "var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n", "var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n", "var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n", "var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n", "var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n", "var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n", "var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n", "var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n", "var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n", "var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n", "var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n", "var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n", "var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n", "var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n", "var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n", "var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n", "var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n", "var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", "var constant = require('./constant'),\n createInverter = require('./_createInverter'),\n identity = require('./identity');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nmodule.exports = invert;\n", "var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n", "var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n", "var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n", "var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n", "var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", "var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n", "var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n", "var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n", "var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n", "var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};", "// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();", "__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))", "// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};", "/**\n * Execute given functions in sequence, feeding the result of one as an input to the next.\n *\n * @param {Function[]} allFunctions\n * @param {*} input - parameter given to the first function\n * @returns {*} return value of the last function\n */\nexport default function chain(allFunctions, input) {\n\treturn allFunctions.reduce((value, fn) => {\n\t\treturn value ? fn(value) : null;\n\t}, input);\n}\n", "const checkCustomFilters = (customFilters) => {\n\tif (!Array.isArray(customFilters)) {\n\t\tthrow new TypeError('customFilters should be given as an array');\n\t}\n\tif (customFilters.some((filter) => typeof filter !== 'function')) {\n\t\tthrow new TypeError(`The given filter is not a function`);\n\t}\n\treturn true;\n};\n\nexport default checkCustomFilters;\n", "const notes = {\n\tAFlat: 'Ab',\n\tA: 'A',\n\tASharp: 'A#',\n\tBFlat: 'Bb',\n\tB: 'B',\n\tC: 'C',\n\tCSharp: 'C#',\n\tDFlat: 'Db',\n\tD: 'D',\n\tDSharp: 'D#',\n\tEFlat: 'Eb',\n\tE: 'E',\n\tF: 'F',\n\tFSharp: 'F#',\n\tGFlat: 'Gb',\n\tG: 'G',\n\tGSharp: 'G#',\n};\n\nconst english = {\n\tAb: notes.AFlat,\n\tA: notes.A,\n\t'A#': notes.ASharp,\n\tBb: notes.BFlat,\n\tB: notes.B,\n\t'B#': notes.C,\n\tCb: notes.B,\n\tC: notes.C,\n\t'C#': notes.CSharp,\n\tDb: notes.DFlat,\n\tD: notes.D,\n\t'D#': notes.DSharp,\n\tEb: notes.EFlat,\n\tE: notes.E,\n\t'E#': notes.F,\n\tFb: notes.E,\n\tF: notes.F,\n\t'F#': notes.FSharp,\n\tGb: notes.GFlat,\n\tG: notes.G,\n\t'G#': notes.GSharp,\n};\n\nconst latin = {\n\tLab: notes.AFlat,\n\tLa: notes.A,\n\t'La#': notes.ASharp,\n\tSib: notes.BFlat,\n\tSi: notes.B,\n\t'Si#': notes.C,\n\tDob: notes.B,\n\tDo: notes.C,\n\t'Do#': notes.CSharp,\n\tReb: notes.DFlat,\n\tRéb: notes.DFlat,\n\tRe: notes.D,\n\tRé: notes.D,\n\t'Re#': notes.DSharp,\n\t'Ré#': notes.DSharp,\n\tMib: notes.EFlat,\n\tMi: notes.E,\n\t'Mi#': notes.F,\n\tFab: notes.E,\n\tFa: notes.F,\n\t'Fa#': notes.FSharp,\n\tSolb: notes.GFlat,\n\tSol: notes.G,\n\t'Sol#': notes.GSharp,\n};\n\nconst german = {\n\tAs: notes.AFlat,\n\tA: notes.A,\n\tAis: notes.ASharp,\n\tHes: notes.BFlat,\n\tH: notes.B,\n\tHis: notes.C,\n\tCes: notes.B,\n\tC: notes.C,\n\tCis: notes.CSharp,\n\tDes: notes.DFlat,\n\tD: notes.D,\n\tDis: notes.DSharp,\n\tEs: notes.EFlat,\n\tE: notes.E,\n\tEis: notes.F,\n\tFes: notes.E,\n\tF: notes.F,\n\tFis: notes.FSharp,\n\tGes: notes.GFlat,\n\tG: notes.G,\n\tGis: notes.GSharp,\n};\n\nfunction getAccidentalsVariation(source) {\n\tlet variant;\n\treturn Object.keys(source).reduce((acc, curr) => {\n\t\tif (curr.match(/.[b|#]$/)) {\n\t\t\tvariant = curr.replace('#', '♯').replace('b', '♭');\n\t\t\tacc[variant] = source[curr];\n\t\t}\n\t\treturn acc;\n\t}, {});\n}\n\nconst englishVariantsToNotes = {\n\t...english,\n\t...getAccidentalsVariation(english),\n};\n\nconst latinVariantsToNotes = {\n\t...latin,\n\t...getAccidentalsVariation(latin),\n};\n\nconst germanVariantsToNotes = {\n\t...german,\n};\n\nconst allVariantsToNotes = {\n\t...englishVariantsToNotes,\n\t...latinVariantsToNotes,\n\t...germanVariantsToNotes,\n};\n\nconst allVariants = Object.keys(allVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst englishVariants = Object.keys(englishVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst latinVariants = Object.keys(latinVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst germanVariants = Object.keys(germanVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst allVariantsPerGroup = [\n\t{ name: 'english', notes: englishVariants },\n\t{ name: 'german', notes: germanVariants },\n\t{ name: 'latin', notes: latinVariants },\n];\n\nexport {\n\tnotes,\n\tallVariants,\n\tallVariantsPerGroup,\n\tenglishVariants,\n\tlatinVariants,\n\tgermanVariants,\n\tallVariantsToNotes,\n\tenglishVariantsToNotes,\n\tlatinVariantsToNotes,\n\tgermanVariantsToNotes,\n};\n", "class InvalidInputError extends Error {\n\t/**\n\t * The parser was not given a valid string to parse\n\t * ex: `parseChord(null)`\n\t */\n\tconstructor() {\n\t\tsuper('The given symbol is not a valid string');\n\t\tthis.name = 'InvalidInput';\n\t}\n}\n\nclass UnexpectedError extends Error {\n\t/**\n\t * This error is very unlikely to happen.\n\t * If it does, it is probably in the context of a custom filter that returns `null` instead of throwing an exception.\n\t */\n\tconstructor() {\n\t\tconst message =\n\t\t\t'An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?';\n\t\tsuper(message);\n\t\tthis.name = 'UnexpectedError';\n\t}\n}\n\nclass ChordSymbolError extends Error {\n\tconstructor(message, chord, errorName) {\n\t\tsuper(message);\n\t\tthis.name = errorName;\n\t\tthis.chord = chord;\n\t}\n}\n\nclass NoSymbolFoundError extends ChordSymbolError {\n\t/**\n\t * The given string cannot be confused with a chord symbol in the current notation system\n\t * ex: `parseChord('Ape')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t */\n\tconstructor(chord) {\n\t\tconst message = `\"${chord.input.symbol}\" does not seems to be a chord`;\n\t\tsuper(message, chord, 'NoSymbolFound');\n\t}\n}\n\nclass InvalidModifierError extends ChordSymbolError {\n\t/**\n\t * The given string looks like a chord symbol, but `ChordSymbol` does not understand its descriptor.\n\t * It can be either because of a typo, or just because the given word is not a symbol.\n\t * ex: `parseChord('Amid')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String} invalidChars - the characters that proved problematic when parsing the symbol\n\t */\n\tconstructor(chord, invalidChars) {\n\t\tconst message = `The chord descriptor \"${chord.input.descriptor}\" contains unknown or duplicated modifiers: \"${invalidChars}\"`;\n\t\tsuper(message, chord, 'InvalidModifier');\n\t}\n}\n\nclass InvalidIntervalsError extends ChordSymbolError {\n\t/**\n\t * The given string is a chord symbol, but the resulting interval list is not valid\n\t * ex: `parseChord('A7M7')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String[]} forbiddenCombo - intervals that should not belong together in a chord\n\t */\n\tconstructor(chord, forbiddenCombo) {\n\t\tconst message =\n\t\t\t`\"${chord.input.symbol}\" describes a chord with an invalid intervals combo: ` +\n\t\t\tforbiddenCombo.join(' and ');\n\t\tsuper(message, chord, 'InvalidIntervals');\n\t}\n}\n\nexport {\n\tInvalidInputError,\n\tInvalidIntervalsError,\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n\tUnexpectedError,\n};\n", "import _isArray from 'lodash/isArray';\nimport _isEqual from 'lodash/isEqual';\n\nfunction hasExactly(allIntervals, search) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\treturn _isEqual(allIntervals, arraySearch);\n}\n\nfunction hasOneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'oneOf');\n}\n\nfunction hasAll(allIntervals, search) {\n\treturn has(allIntervals, search, 'all');\n}\n\nfunction hasNoneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'none');\n}\n\nfunction has(allIntervals, search, require) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\n\tconst lookupMethod = require === 'oneOf' ? 'some' : 'every';\n\n\treturn arraySearch[lookupMethod]((interval) => {\n\t\treturn require === 'none'\n\t\t\t? !allIntervals.includes(interval)\n\t\t\t: allIntervals.includes(interval);\n\t});\n}\n\nexport { hasExactly, hasOneOf, hasAll, hasNoneOf };\n", "import { hasAll } from '../../helpers/hasElement';\nimport { InvalidIntervalsError } from '../../helpers/ChordParsingError';\n\nconst allForbiddenCombos = [\n\t['2', '3'],\n\t['2', '9'],\n\t['3', 'b3'],\n\t//['3', '4'], // valid in the Real Book: F#7SUS(add 3)\n\t['4', '11'],\n\t['5', 'b5'],\n\t['5', '#5'],\n\t['b6', '#5'],\n\t['b6', '6'],\n\t['b6', '13'],\n\t['6', '13'],\n\t['b7', 'bb7'],\n\t['7', 'b7'],\n\t['9', 'b9'],\n\t['9', '#9'],\n\t['11', '#11'],\n\t['13', 'b13'],\n];\n\n/**\n * Check parsed interval list to detect potential inconsistencies\n *\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function checkIntervalsConsistency(chord) {\n\tconst intervals = chord.normalized.intervals;\n\n\tconst forbiddenCombo = allForbiddenCombos.find((combo) =>\n\t\thasAll(intervals, combo)\n\t);\n\n\tif (forbiddenCombo) {\n\t\tthrow new InvalidIntervalsError(chord, forbiddenCombo);\n\t}\n\n\treturn chord;\n}\n", "/**\n * Render the chord by assembling all its components\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbol(chord) {\n\tconst { rootNote, bassNote, descriptor, chordChanges } = chord.formatted;\n\n\tlet symbol = rootNote;\n\n\tif (descriptor) {\n\t\tsymbol += descriptor;\n\t}\n\tif (chordChanges && chordChanges.length) {\n\t\tsymbol += '(' + chordChanges.join(',') + ')';\n\t}\n\tif (bassNote) {\n\t\tsymbol += '/' + bassNote;\n\t}\n\n\tchord.formatted.symbol = symbol;\n\n\treturn chord;\n}\n", "const qualities = {\n\tma: 'major',\n\tma6: 'major6',\n\tma7: 'major7',\n\tdom7: 'dominant7',\n\n\tmi: 'minor',\n\tmi6: 'minor6',\n\tmi7: 'minor7',\n\tmiMa7: 'minorMajor7',\n\n\taug: 'augmented',\n\tdim: 'diminished',\n\tdim7: 'diminished7',\n\n\tpower: 'power',\n\tbass: 'bass',\n};\n\nconst majorQualities = [\n\tqualities.ma,\n\tqualities.ma6,\n\tqualities.ma7,\n\tqualities.dom7,\n\tqualities.aug,\n];\n\nconst minorQualities = [\n\tqualities.mi,\n\tqualities.mi6,\n\tqualities.mi7,\n\tqualities.miMa7,\n\tqualities.dim,\n\tqualities.dim7,\n];\n\nexport { qualities, majorQualities, minorQualities };\n", "import { qualities } from '../../dictionaries/qualities';\nimport { hasNoneOf } from '../../helpers/hasElement';\n\nconst qualityToDescriptor = {\n\t[qualities.ma]: () => '',\n\t[qualities.ma6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? '69' : '6',\n\t[qualities.ma7]: (chord) => 'ma' + getHighestExtension(chord),\n\t[qualities.dom7]: (chord) =>\n\t\tchord.normalized.intents.alt ? '7alt' : getHighestExtension(chord),\n\n\t[qualities.mi]: () => 'mi',\n\t[qualities.mi6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? 'mi69' : 'mi6',\n\t[qualities.mi7]: (chord) => 'mi' + getHighestExtension(chord),\n\t[qualities.miMa7]: (chord) => 'miMa' + getHighestExtension(chord),\n\n\t[qualities.aug]: () => '+',\n\t[qualities.dim]: () => 'dim',\n\t[qualities.dim7]: () => 'dim7',\n\n\t[qualities.power]: () => '5',\n\t[qualities.bass]: () => ' bass',\n};\n\nconst chordChangesDescriptors = {\n\tadd: 'add',\n\tadd7: 'Ma7',\n\tomit: 'omit',\n\tsus: 'sus',\n};\n\n/**\n * Pre-render the chord by formatting all his components: root and bass notes, descriptor and changes\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbolParts(chord) {\n\tchord.formatted = {\n\t\trootNote: chord.normalized.rootNote,\n\t\tbassNote: chord.normalized.bassNote,\n\t\tdescriptor: getDescriptor(chord),\n\t\tchordChanges: getChordChanges(chord),\n\t};\n\treturn chord;\n}\n\nfunction getDescriptor(chord) {\n\tlet descriptor = qualityToDescriptor[chord.normalized.quality](chord);\n\tif (chord.normalized.isSuspended) {\n\t\tdescriptor += chordChangesDescriptors.sus;\n\t}\n\treturn descriptor;\n}\n\nfunction getHighestExtension(chord) {\n\tconst extensions = chord.normalized.extensions;\n\n\tlet highestExtension = extensions[extensions.length - 1];\n\n\tif (highestExtension === '11' && chord.normalized.intents.major) {\n\t\thighestExtension = hasNoneOf(chord.normalized.alterations, ['b9', '#9'])\n\t\t\t? '9'\n\t\t\t: '7';\n\t}\n\treturn highestExtension || '7';\n}\n\nfunction getChordChanges(chord) {\n\tconst formattedOmits = formatOmits(chord.normalized.omits);\n\n\tif (isAltered(chord)) {\n\t\treturn formattedOmits;\n\t}\n\n\tconst formattedAdds = formatAdds(\n\t\tchord.normalized.quality,\n\t\tchord.normalized.adds\n\t);\n\n\treturn [\n\t\t...chord.normalized.alterations,\n\t\t...formattedAdds,\n\t\t...formattedOmits,\n\t];\n}\n\nfunction isAltered(chord) {\n\treturn (\n\t\tchord.normalized.intents.alt &&\n\t\tchord.normalized.quality === qualities.dom7\n\t);\n}\n\nfunction formatAdds(quality, adds) {\n\treturn adds\n\t\t.filter((add) => {\n\t\t\treturn !(\n\t\t\t\t[qualities.ma6, qualities.mi6].includes(quality) && add === '9'\n\t\t\t);\n\t\t})\n\t\t.map((add, index) => {\n\t\t\tlet formatted = '';\n\t\t\tif (index === 0) {\n\t\t\t\tformatted += chordChangesDescriptors.add;\n\t\t\t\tif (['b', '#'].includes(add[0])) {\n\t\t\t\t\tformatted += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tformatted += add === '7' ? chordChangesDescriptors.add7 : add;\n\t\t\treturn formatted;\n\t\t});\n}\n\nfunction formatOmits(omits) {\n\treturn omits.map((omitted, index) => {\n\t\tlet formatted = '';\n\t\tif (index === 0) {\n\t\t\tformatted += chordChangesDescriptors.omit;\n\t\t}\n\t\tformatted += omitted === 'b3' ? '3' : omitted;\n\t\treturn formatted;\n\t});\n}\n", "import chain from '../../helpers/chain';\n\n/**\n * Prepare whatever string has been identified as a descriptor so it is parsable by the next filter\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function getParsableDescriptor(chord) {\n\tconst allFilters = [\n\t\ttoLowerCaseExceptMajorM,\n\t\tremoveSpaces,\n\t\taddDisambiguators,\n\t\taddMissingVerbs,\n\t];\n\n\tif (chord.input.descriptor) {\n\t\tchord.input.parsableDescriptor = chain(\n\t\t\tallFilters,\n\t\t\tchord.input.descriptor\n\t\t);\n\t}\n\treturn chord;\n}\n\nfunction toLowerCaseExceptMajorM(descriptor) {\n\treturn descriptor\n\t\t.replace(/[A-LN-Za-z]+/g, (match) => match.toLowerCase())\n\t\t.replace('oMit', 'omit')\n\t\t.replace('diM', 'dim')\n\t\t.replace('augMented', 'augmented');\n}\n\nfunction removeSpaces(descriptor) {\n\treturn descriptor.replace(/ /g, '');\n}\n\nfunction addDisambiguators(descriptor) {\n\treturn descriptor\n\t\t.replace(/(7?dim)(alt|add)/g, '$1 $2')\n\t\t.replace(/([m|M])(alt|add)/g, '$1 $2')\n\t\t.replace(/i(no[35])/g, 'i $1')\n\t\t.replace(/([b♭#♯]9)6/g, '$1 6')\n\t\t.replace(/(9\\/?6)/g, ' $1');\n}\n\nfunction addMissingVerbs(descriptor) {\n\tlet allTokensWithVerbs;\n\tlet currentVerb;\n\tlet hasVerb;\n\n\treturn descriptor.replace(/\\((.*?)\\)/g, (match, parenthesis) => {\n\t\tallTokensWithVerbs = [];\n\t\tcurrentVerb = '';\n\n\t\tparenthesis.split(',').forEach((token) => {\n\t\t\thasVerb = true;\n\t\t\tif (token.startsWith('add')) {\n\t\t\t\tcurrentVerb = 'add';\n\t\t\t} else if (token.startsWith('omit')) {\n\t\t\t\tcurrentVerb = 'omit';\n\t\t\t} else if (token.startsWith('no')) {\n\t\t\t\tcurrentVerb = 'no';\n\t\t\t} else {\n\t\t\t\thasVerb = false;\n\t\t\t}\n\t\t\tif (hasVerb) {\n\t\t\t\tallTokensWithVerbs.push(token);\n\t\t\t} else {\n\t\t\t\tallTokensWithVerbs.push(currentVerb + token);\n\t\t\t}\n\t\t});\n\t\treturn ' ' + allTokensWithVerbs.join(' ') + ' ';\n\t});\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\n/**\n * @param {String} symbol\n * @param {Object} parserConfiguration\n * @returns {Chord}\n */\nexport default function initChord(parserConfiguration = {}, symbol) {\n\treturn {\n\t\tinput: {\n\t\t\tsymbol,\n\t\t},\n\t\tnormalized: {},\n\t\tformatted: {},\n\t\tparserConfiguration: _cloneDeep(parserConfiguration),\n\t};\n}\n", "import { notes } from '../../dictionaries/notes';\nimport { majorQualities } from '../../dictionaries/qualities';\n\nconst notesSharp = [\n\tnotes.A,\n\tnotes.ASharp,\n\tnotes.B,\n\tnotes.C,\n\tnotes.CSharp,\n\tnotes.D,\n\tnotes.DSharp,\n\tnotes.E,\n\tnotes.F,\n\tnotes.FSharp,\n\tnotes.G,\n\tnotes.GSharp,\n];\n\nconst notesFlat = [\n\tnotes.A,\n\tnotes.BFlat,\n\tnotes.B,\n\tnotes.C,\n\tnotes.DFlat,\n\tnotes.D,\n\tnotes.EFlat,\n\tnotes.E,\n\tnotes.F,\n\tnotes.GFlat,\n\tnotes.G,\n\tnotes.AFlat,\n];\n\nconst rootNoteToScaleAccidentals = {\n\t[notes.C]: { maj: 'flat', min: 'flat' },\n\t[notes.CSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.DFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.D]: { maj: 'sharp', min: 'flat' },\n\t[notes.DSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.EFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.E]: { maj: 'sharp', min: 'sharp' },\n\t[notes.F]: { maj: 'flat', min: 'flat' },\n\t[notes.FSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.GFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.G]: { maj: 'sharp', min: 'flat' },\n\t[notes.GSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.AFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.A]: { maj: 'sharp', min: 'flat' },\n\t[notes.ASharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.BFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.B]: { maj: 'sharp', min: 'sharp' },\n};\n\n/**\n * Convert intervals in actual notes.\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function nameIndividualChordNotes(chord) {\n\tconst rootNote = chord.normalized.rootNote;\n\tconst semitones = chord.normalized.semitones;\n\tconst quality = chord.normalized.quality;\n\n\tconst minMaj = majorQualities.includes(quality) ? 'maj' : 'min';\n\tconst refNotes =\n\t\trootNoteToScaleAccidentals[rootNote][minMaj] === 'sharp'\n\t\t\t? notesSharp\n\t\t\t: notesFlat;\n\n\tconst rootNoteIndex = refNotes.indexOf(rootNote);\n\tconst indexedNotes = [\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t\t// repeating...\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t];\n\n\tconst chordNotes = semitones.map((i) => indexedNotes[i]);\n\n\tchord.normalized.notes = chordNotes;\n\n\treturn chord;\n}\n", "import { allVariantsToNotes } from '../../dictionaries/notes';\n\n/**\n * Convert root/bass notes to English names\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeNotes(chord) {\n\tchord.normalized.rootNote = allVariantsToNotes[chord.input.rootNote];\n\n\tif (chord.input.bassNote) {\n\t\tchord.normalized.bassNote = allVariantsToNotes[chord.input.bassNote];\n\t}\n\n\treturn chord;\n}\n", "import _clone from 'lodash/clone';\nimport _find from 'lodash/find';\nimport _uniq from 'lodash/uniq';\nimport _without from 'lodash/without';\n\nimport chain from '../../helpers/chain';\n\nimport {\n\thasOneOf,\n\thasAll,\n\thasNoneOf,\n\thasExactly,\n} from '../../helpers/hasElement';\n\nimport { qualities } from '../../dictionaries/qualities';\n\n/**\n * Detect chord quality and changes (extensions, alterations, adds and omits)\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeDescriptor(chord) {\n\tlet chordIntervals = _clone(chord.normalized.intervals);\n\n\tlet normalized = {\n\t\tquality: '',\n\t\tisSuspended: false,\n\t\textensions: [],\n\t\talterations: [],\n\t\tadds: [],\n\t\tomits: [],\n\t};\n\n\tif (isPowerChord(chordIntervals)) {\n\t\tnormalized.quality = qualities.power;\n\t} else if (isBass(chordIntervals)) {\n\t\tnormalized.quality = qualities.bass;\n\t} else {\n\t\tconst omits = getOmits(chordIntervals, chord.normalized.intents.major);\n\n\t\tconst isSuspended = getIsSuspended(\n\t\t\tchordIntervals,\n\t\t\tchord.normalized.intents.major\n\t\t);\n\n\t\tconst { qualityIntervals, quality } = getChordQuality(\n\t\t\tchordIntervals,\n\t\t\tchord,\n\t\t\tisSuspended,\n\t\t\tomits\n\t\t);\n\n\t\tconst extensions = getExtensions(chordIntervals, quality);\n\n\t\t// to be able to detect adds and alterations, we build the \"straight\" version of the chord,\n\t\t// ie. the chord as if no alterations/adds/omits where present.\n\t\t// we will compare this to the actual intervals later on\n\t\tconst baseIntervals = ['1', ...qualityIntervals, ...extensions];\n\n\t\tconst { adds, alterations } = getAddsAndAlterations(\n\t\t\tchordIntervals,\n\t\t\tbaseIntervals,\n\t\t\tquality\n\t\t);\n\n\t\tnormalized = {\n\t\t\t...normalized,\n\t\t\tquality,\n\t\t\tisSuspended,\n\t\t\textensions,\n\t\t\talterations,\n\t\t\tadds,\n\t\t\tomits,\n\t\t};\n\t}\n\n\treturn {\n\t\t...chord,\n\t\tnormalized: {\n\t\t\t...chord.normalized,\n\t\t\t...normalized,\n\t\t},\n\t};\n}\n\nfunction isPowerChord(intervals) {\n\treturn hasExactly(intervals, ['1', '5']);\n}\n\nfunction isBass(intervals) {\n\treturn hasExactly(intervals, ['1']);\n}\n\nfunction getIsSuspended(intervals, hasMajorIntent) {\n\treturn (\n\t\tintervals.includes('4') ||\n\t\t(intervals.includes('11') && hasMajorIntent && !intervals.includes('3'))\n\t);\n}\n\nfunction getOmits(intervals, hasMajorIntent) {\n\tconst omits = [];\n\n\tif (\n\t\thasNoneOf(intervals, ['b3', '3', '4', '11']) ||\n\t\t(!hasMajorIntent && hasNoneOf(intervals, ['b3', '4']))\n\t) {\n\t\tomits.push(hasMajorIntent ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5', 'b13'])) {\n\t\tomits.push('5');\n\t}\n\treturn omits;\n}\n\nfunction getChordQuality(allIntervals, chord, isSuspended, omits) {\n\tconst intervalsForQualityDetection = getIntervalsForQualityDetection(\n\t\tallIntervals,\n\t\tchord,\n\t\tisSuspended,\n\t\tomits\n\t);\n\n\tconst intervalsToQualities = [\n\t\t// !!! do not change order without a good reason\n\t\t{ qualityIntervals: ['b3'], quality: qualities.mi },\n\t\t{ qualityIntervals: ['b3', '6'], quality: qualities.mi6 },\n\t\t{ qualityIntervals: ['b3', '7'], quality: qualities.miMa7 },\n\t\t{ qualityIntervals: ['b3', 'b7'], quality: qualities.mi7 },\n\n\t\t{ qualityIntervals: ['3'], quality: qualities.ma },\n\t\t{ qualityIntervals: ['3', '6'], quality: qualities.ma6 },\n\t\t{ qualityIntervals: ['3', '7'], quality: qualities.ma7 },\n\t\t{ qualityIntervals: ['3', 'b7'], quality: qualities.dom7 },\n\n\t\t{ qualityIntervals: ['3', '#5'], quality: qualities.aug },\n\t\t{ qualityIntervals: ['b3', 'b5'], quality: qualities.dim },\n\t\t{ qualityIntervals: ['b3', 'b5', 'bb7'], quality: qualities.dim7 },\n\t].sort((a, b) => b.qualityIntervals.length - a.qualityIntervals.length);\n\n\treturn _find(intervalsToQualities, (o) =>\n\t\thasAll(intervalsForQualityDetection, o.qualityIntervals)\n\t);\n}\n\n// To properly detect the chord quality, we need a \"straight\" version of the chord,\n// meaning with a third interval (= un-suspended, no omit3)\nfunction getIntervalsForQualityDetection(\n\tallIntervals,\n\tchord,\n\tisSuspended,\n\tomits\n) {\n\tconst allFilters = [\n\t\tundoOmit3.bind(null, omits),\n\t\tundoSuspension.bind(null, isSuspended, chord.normalized.intents.major),\n\t\tundoAlt5.bind(null, chord.normalized.intents.alt),\n\t\t_uniq,\n\t];\n\n\treturn chain(allFilters, _clone(allIntervals));\n}\n\nfunction undoOmit3(omits, allIntervals) {\n\tconst with3rd = _clone(allIntervals);\n\n\tif (omits.includes('3')) {\n\t\twith3rd.push('3');\n\t} else if (omits.includes('b3')) {\n\t\twith3rd.push('b3');\n\t}\n\treturn with3rd;\n}\n\nfunction undoSuspension(isSuspended, hasMajorIntent, allIntervals) {\n\tif (isSuspended) {\n\t\tconst unSuspended = _without(allIntervals, '4');\n\t\tunSuspended.push(hasMajorIntent ? '3' : 'b3');\n\t\treturn unSuspended;\n\t}\n\treturn allIntervals;\n}\n\nfunction undoAlt5(isAlt, allIntervals) {\n\tif (isAlt) {\n\t\tconst unaltered = _without(allIntervals, 'b5', '#5');\n\t\tunaltered.push('5');\n\t\treturn unaltered;\n\t}\n\treturn allIntervals;\n}\n\nfunction getExtensions(allIntervals, quality) {\n\tconst extensions = [];\n\n\tif (canBeExtended(quality)) {\n\t\tif (isMinorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '11', '13');\n\t\t} else if (isMajorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '13');\n\t\t} else if (isExtended11th(allIntervals)) {\n\t\t\textensions.push('9', '11');\n\t\t} else if (isExtended9th(allIntervals)) {\n\t\t\textensions.push('9');\n\t\t}\n\t}\n\treturn extensions;\n}\n\nfunction canBeExtended(quality) {\n\treturn [\n\t\tqualities.ma7,\n\t\tqualities.dom7,\n\t\tqualities.mi7,\n\t\tqualities.miMa7,\n\t].includes(quality);\n}\n\nfunction canHave11th(quality) {\n\treturn [qualities.mi7, qualities.miMa7].includes(quality);\n}\n\nfunction isMinorExtended13th(allIntervals, quality) {\n\treturn (\n\t\tcanHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['11', '#11']) &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isMajorExtended13th(allIntervals, quality) {\n\treturn (\n\t\t!canHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended11th(allIntervals) {\n\treturn (\n\t\thasOneOf(allIntervals, '11') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended9th(allIntervals) {\n\treturn allIntervals.includes('9');\n}\n\nfunction getAddsAndAlterations(chordIntervals, baseIntervals, quality) {\n\tconst adds = [];\n\tconst alterations = [];\n\n\tchordIntervals\n\t\t.filter((interval) => interval !== '5' && interval !== '4')\n\t\t.forEach((interval) => {\n\t\t\tif (!baseIntervals.includes(interval)) {\n\t\t\t\tif (isAlteration(quality, interval)) {\n\t\t\t\t\talterations.push(interval);\n\t\t\t\t} else {\n\t\t\t\t\tadds.push(interval);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\tif (hasAdd3(chordIntervals)) {\n\t\tadds.push('3');\n\t}\n\n\treturn {\n\t\tadds: sortIntervals(adds),\n\t\talterations: sortIntervals(alterations),\n\t};\n}\n\nfunction isAlteration(quality, interval) {\n\tconst qualityAlterations = {\n\t\t[qualities.ma]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.dom7]: ['b5', '#5', 'b9', '#9', '#11', 'b13'],\n\n\t\t[qualities.mi]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.miMa7]: ['b5', '#5', '#11', 'b13'],\n\n\t\t[qualities.aug]: [],\n\t\t[qualities.dim]: [],\n\t\t[qualities.dim7]: [],\n\t};\n\n\treturn qualityAlterations[quality].includes(interval);\n}\n\nfunction hasAdd3(allIntervals) {\n\treturn hasAll(allIntervals, ['3', '4']);\n}\n\nfunction sortIntervals(intervals) {\n\treturn intervals.sort((a, b) => {\n\t\tconst sortableA = Number.parseInt(a.replace(/[b#]/, ''));\n\t\tconst sortableB = Number.parseInt(b.replace(/[b#]/, ''));\n\t\treturn sortableA - sortableB;\n\t});\n}\n", "import { NoSymbolFoundError } from '../../helpers/ChordParsingError';\n\n/**\n * Split symbol in root/bass note and descriptor.\n * Returns null if the given string does not seems to be a chord.\n *\n * @param {String[]} noteVariants - all notes within a given notation system (English, Latin, German...)\n * @param {Chord} chord\n * @returns {Chord|null}\n */\nexport default function parseBase(noteVariants, chord) {\n\tconst { symbol } = chord.input;\n\tconst notesRegex = noteVariants.join('|');\n\tconst notesAndDescriptorRegex = new RegExp(\n\t\t'^' +\n\t\t\t'(' +\n\t\t\tnotesRegex +\n\t\t\t')' +\n\t\t\t'(.*?)' +\n\t\t\t'(/(' +\n\t\t\tnotesRegex +\n\t\t\t'))?' +\n\t\t\t'$'\n\t);\n\tconst result = symbol.match(notesAndDescriptorRegex);\n\n\tif (result && result[1]) {\n\t\tchord.input.rootNote = result[1];\n\n\t\tif (result[2]) {\n\t\t\tchord.input.descriptor = result[2];\n\t\t}\n\t\tif (result[4]) {\n\t\t\tchord.input.bassNote = result[4];\n\t\t}\n\t\treturn chord;\n\t} else {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n}\n", "const allModifiers = {\n\t// base\n\tma: 'ma',\n\tmi: 'mi',\n\tdim: 'dim',\n\thalfDim: 'halfDim',\n\taug: 'aug',\n\tseventh: 'seventh',\n\n\t// suspended\n\tsus: 'sus',\n\tsus2: 'sus2',\n\n\t// extensions\n\tninth: 'ninth',\n\televenth: 'eleventh',\n\tthirteenth: 'thirteenth',\n\n\t// alterations\n\tfifthFlat: 'b5',\n\tfifthSharp: '#5',\n\tninthFlat: 'b9',\n\tninthSharp: '#9',\n\televenthSharp: '#11',\n\tthirteenthFlat: 'b13',\n\n\t// added\n\tadd3: 'add3',\n\tadd4: 'add4',\n\taddb6: 'addb6',\n\tadd6: 'add6',\n\tadd69: 'add69',\n\tadd7: 'add7',\n\tadd9: 'add9',\n\tadd11: 'add11',\n\tadd13: 'add13',\n\n\t// special\n\tbass: 'bass',\n\tomit3: 'omit3',\n\tomit5: 'omit5',\n\tpower: 'power',\n\talt: 'alt',\n};\n\n/**\n * WARNING: when adding new modifiers symbols, be careful of possible edge cases that might arise with some combinations.\n * For example, without edge case handling, \"madd9\" would be parsed as \"ma\" instead of \"m\"+\"add9\"\n */\n\nconst major = {\n\t'^': [allModifiers.ma, allModifiers.add7],\n\tΔ: [allModifiers.ma, allModifiers.add7],\n\tM: allModifiers.ma,\n\tMa: allModifiers.ma,\n\tMaj: allModifiers.ma,\n\tMajor: allModifiers.ma,\n\tma: allModifiers.ma,\n\tmaj: allModifiers.ma,\n\tmajor: allModifiers.ma,\n};\n\nconst major7th = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => symbol + '7'\n);\nconst add7 = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => 'add' + symbol + '7'\n);\n\nconst allSymbols = {\n\t// major\n\t...major,\n\t...major7th,\n\n\t// minor\n\t'-': allModifiers.mi,\n\tm: allModifiers.mi,\n\tMi: allModifiers.mi,\n\tMin: allModifiers.mi,\n\tMinor: allModifiers.mi,\n\tmi: allModifiers.mi,\n\tmin: allModifiers.mi,\n\tminor: allModifiers.mi,\n\n\t// diminished / augmented\n\t'°': allModifiers.dim,\n\to: allModifiers.dim,\n\t0: allModifiers.dim,\n\tdim: allModifiers.dim,\n\t'dim.': allModifiers.dim,\n\tdiminished: allModifiers.dim,\n\n\tØ: allModifiers.halfDim,\n\tø: allModifiers.halfDim,\n\th: allModifiers.halfDim,\n\n\t'+': allModifiers.aug,\n\taug: allModifiers.aug,\n\taugmented: allModifiers.aug,\n\n\t// seventh\n\t7: allModifiers.seventh,\n\n\t// suspended\n\t4: allModifiers.sus,\n\tsus: allModifiers.sus,\n\tsus4: allModifiers.sus,\n\tsuspended: allModifiers.sus,\n\tsuspended4: allModifiers.sus,\n\tsus2: allModifiers.sus2,\n\tsuspended2: allModifiers.sus2,\n\n\t// extensions\n\t9: allModifiers.ninth,\n\t11: allModifiers.eleventh,\n\t13: allModifiers.thirteenth,\n\n\t// alterations\n\tb3: allModifiers.mi,\n\tb5: allModifiers.fifthFlat,\n\t'♭5': allModifiers.fifthFlat,\n\t'#5': allModifiers.fifthSharp,\n\t'♯5': allModifiers.fifthSharp,\n\tb9: allModifiers.ninthFlat,\n\t'♭9': allModifiers.ninthFlat,\n\taddb9: allModifiers.ninthFlat,\n\t'add♭9': allModifiers.ninthFlat,\n\t'#9': allModifiers.ninthSharp,\n\t'♯9': allModifiers.ninthSharp,\n\t'add#9': allModifiers.ninthSharp,\n\t'add♯9': allModifiers.ninthSharp,\n\t'#11': allModifiers.eleventhSharp,\n\t'♯11': allModifiers.eleventhSharp,\n\t'add#11': allModifiers.eleventhSharp,\n\tb13: allModifiers.thirteenthFlat,\n\t'♭13': allModifiers.thirteenthFlat,\n\taddb13: allModifiers.thirteenthFlat,\n\t'add♭13': allModifiers.thirteenthFlat,\n\n\t// added\n\t...add7,\n\t2: allModifiers.add9,\n\tadd2: allModifiers.add9,\n\tadd3: allModifiers.add3,\n\tadd4: allModifiers.add4,\n\taddb6: allModifiers.addb6,\n\tb6: allModifiers.addb6,\n\t6: allModifiers.add6,\n\tadd6: allModifiers.add6,\n\t'6/9': allModifiers.add69,\n\t69: allModifiers.add69,\n\t96: allModifiers.add69,\n\t'9/6': allModifiers.add69,\n\tadd9: allModifiers.add9,\n\tadd11: allModifiers.add11,\n\tadd13: allModifiers.add13,\n\n\t// special\n\tbass: allModifiers.bass,\n\tomit3: allModifiers.omit3,\n\tno3: allModifiers.omit3,\n\tomit5: allModifiers.omit5,\n\tno5: allModifiers.omit5,\n\t5: allModifiers.power,\n\talt: allModifiers.alt,\n\t'alt.': allModifiers.alt,\n\taltered: allModifiers.alt,\n};\n\nfunction getDerivedModifiers(source, modifierId, derivedFn) {\n\treturn Object.keys(source)\n\t\t.map(derivedFn)\n\t\t.reduce((acc, curr) => {\n\t\t\tacc[curr] = modifierId;\n\t\t\treturn acc;\n\t\t}, {});\n}\n\nconst allVariants = Object.keys(allSymbols).sort((a, b) => b.length - a.length);\n\nexport { allSymbols, allVariants };\nexport default allModifiers;\n", "export default {\n\t1: 0,\n\t2: 2,\n\tb3: 3,\n\t3: 4,\n\t4: 5,\n\tb5: 6,\n\t5: 7,\n\t'#5': 8,\n\tb6: 8,\n\t6: 9,\n\tbb7: 9,\n\tb7: 10,\n\t7: 11,\n\tb9: 13,\n\t9: 14,\n\t'#9': 15,\n\t11: 17,\n\t'#11': 18,\n\tb13: 20,\n\t13: 21,\n};\n", "import _uniq from 'lodash/uniq';\nimport {\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n} from '../../helpers/ChordParsingError';\n\nimport m from '../../dictionaries/modifiers';\nimport { allSymbols, allVariants } from '../../dictionaries/modifiers';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\nimport { hasNoneOf, hasOneOf } from '../../helpers/hasElement';\n\n/**\n * Convert the descriptor into a suite of intervals, semitones and intents\n *\n * @param {Array<('b5'|'#5'|'b9'|'#9'|'#11'|'b13')>} altIntervals\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function parseDescriptor(altIntervals, chord) {\n\tlet allModifiers = [];\n\n\tif (chord.input.parsableDescriptor) {\n\t\tallModifiers = getModifiers(chord);\n\t}\n\n\tchord.input.modifiers = allModifiers;\n\tchord.normalized.intervals = getIntervals(allModifiers, altIntervals);\n\tchord.normalized.semitones = getSemitones(chord.normalized.intervals);\n\tchord.normalized.intents = getIntents(allModifiers);\n\n\treturn chord;\n}\n\nfunction getModifiers(chord) {\n\tconst { parsableDescriptor } = chord.input;\n\tconst modifiers = [];\n\n\tconst descriptorRegex = new RegExp(\n\t\tallVariants.map(escapeRegex).join('|'),\n\t\t'g'\n\t);\n\tconst descriptorMatches = parsableDescriptor.match(descriptorRegex);\n\n\tlet remainingChars = parsableDescriptor;\n\tlet allModifiersId;\n\n\tif (descriptorMatches) {\n\t\tdescriptorMatches.forEach((match) => {\n\t\t\tallModifiersId = allSymbols[match];\n\n\t\t\tif (!Array.isArray(allModifiersId)) {\n\t\t\t\tallModifiersId = [allModifiersId];\n\t\t\t}\n\n\t\t\tallModifiersId.forEach((modifierId) => {\n\t\t\t\tif (modifiers.includes(modifierId)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmodifiers.push(modifierId);\n\n\t\t\t\tremainingChars = remainingChars.replace(match, '');\n\t\t\t});\n\t\t});\n\t}\n\n\tif (modifiers.length === 0) {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n\tif (remainingChars.trim().length > 0) {\n\t\tthrow new InvalidModifierError(chord, remainingChars);\n\t}\n\n\treturn modifiers;\n}\n\nfunction getIntervals(allModifiers, altIntervals) {\n\tif (allModifiers.includes(m.power)) {\n\t\treturn ['1', '5'];\n\t} else if (allModifiers.includes(m.bass)) {\n\t\treturn ['1'];\n\t}\n\n\treturn _uniq([\n\t\t'1',\n\t\t...getThird(allModifiers),\n\t\t...getFourth(allModifiers),\n\t\t...getFifths(allModifiers, altIntervals),\n\t\t...getSixth(allModifiers),\n\t\t...getSevenths(allModifiers),\n\t\t...getNinths(allModifiers, altIntervals),\n\t\t...getElevenths(allModifiers, altIntervals),\n\t\t...getThirteenths(allModifiers, altIntervals),\n\t]).sort((a, b) => intervalsToSemitones[a] - intervalsToSemitones[b]);\n}\n\nfunction getThird(allModifiers) {\n\tconst third = [];\n\tif (allModifiers.includes(m.omit3)) {\n\t\treturn [];\n\t}\n\tif (!hasOneOf(allModifiers, [m.sus, m.sus2])) {\n\t\tif (!hasMajorIntent(allModifiers)) {\n\t\t\tthird.push('b3');\n\t\t} else if (!allModifiers.includes(m.eleventh)) {\n\t\t\tthird.push('3');\n\t\t}\n\t}\n\tif (allModifiers.includes(m.add3)) {\n\t\tthird.push('3');\n\t}\n\treturn third;\n}\n\nfunction getFourth(allModifiers) {\n\tconst fourth = [];\n\tif (hasOneOf(allModifiers, [m.sus, m.add4])) {\n\t\tfourth.push('4');\n\t}\n\treturn fourth;\n}\n\nfunction getFifths(allModifiers, altIntervals) {\n\tconst fifths = [];\n\tif (allModifiers.includes(m.omit5)) {\n\t\treturn [];\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.dim, m.halfDim, m.fifthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b5')\n\t) {\n\t\tfifths.push('b5');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.aug, m.fifthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#5')\n\t) {\n\t\tfifths.push('#5');\n\t}\n\tif (!fifths.length && !allModifiers.includes(m.thirteenthFlat)) {\n\t\tfifths.push('5');\n\t}\n\treturn fifths;\n}\n\nfunction getSixth(allModifiers) {\n\tconst sixth = [];\n\tif (hasOneOf(allModifiers, [m.addb6])) {\n\t\tsixth.push('b6');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t!isExtended(allModifiers) &&\n\t\t!hasOneOf(allModifiers, [m.halfDim])\n\t) {\n\t\tsixth.push('6');\n\t}\n\treturn sixth;\n}\n\nfunction getSevenths(allModifiers) {\n\tconst sevenths = [];\n\tif (hasOneOf(allModifiers, [m.alt])) {\n\t\tsevenths.push('b7');\n\t}\n\tif (hasOneOf(allModifiers, [m.seventh, m.halfDim])) {\n\t\tif (allModifiers.includes(m.dim)) {\n\t\t\tsevenths.push('bb7');\n\t\t} else if (allModifiers.includes(m.halfDim)) {\n\t\t\tsevenths.push('b7');\n\t\t} else {\n\t\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t\t}\n\t} else if (hasOneOf(allModifiers, [m.ninth, m.eleventh, m.thirteenth])) {\n\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t}\n\tif (allModifiers.includes(m.add7)) {\n\t\tsevenths.push('7');\n\t}\n\treturn sevenths;\n}\n\nfunction getMinorOrMajorSeventh(allModifiers) {\n\treturn allModifiers.includes(m.ma) ? '7' : 'b7';\n}\n\nfunction getNinths(allModifiers, altIntervals) {\n\tconst ninth = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add69, m.ninth, m.eleventh, m.thirteenth]) &&\n\t\thasNoneOf(allModifiers, [m.ninthFlat, m.ninthSharp])\n\t) {\n\t\tninth.push('9');\n\t}\n\tif (hasOneOf(allModifiers, [m.sus2, m.add9])) {\n\t\tninth.push('9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b9')\n\t) {\n\t\tninth.push('b9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#9')\n\t) {\n\t\tninth.push('#9');\n\t}\n\treturn ninth;\n}\n\nfunction getElevenths(allModifiers, altIntervals) {\n\tconst elevenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenth]) &&\n\t\t!hasMajorIntent(allModifiers)\n\t) {\n\t\televenths.push('11');\n\t} else if (hasOneOf(allModifiers, [m.eleventh, m.add11])) {\n\t\televenths.push('11');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.eleventhSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#11')\n\t) {\n\t\televenths.push('#11');\n\t}\n\treturn elevenths;\n}\n\nfunction getThirteenths(allModifiers, altIntervals) {\n\tconst thirteenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add13, m.thirteenth]) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\tisExtended(allModifiers)) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\thasOneOf(allModifiers, [m.halfDim]))\n\t) {\n\t\tthirteenths.push('13');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b13')\n\t) {\n\t\tthirteenths.push('b13');\n\t}\n\treturn thirteenths;\n}\n\nfunction shouldAlter(allModifiers, altIntervals, interval) {\n\treturn allModifiers.includes(m.alt) && altIntervals.includes(interval);\n}\n\nfunction hasMajorIntent(allModifiers) {\n\treturn hasNoneOf(allModifiers, [m.mi, m.dim, m.dim7, m.halfDim]);\n}\n\nfunction isExtended(allModifiers) {\n\treturn hasOneOf(allModifiers, [\n\t\tm.seventh,\n\t\tm.ninth,\n\t\tm.eleventh,\n\t\tm.thirteenth,\n\t]);\n}\n\n// Based on https://stackoverflow.com/a/6969486\nfunction escapeRegex(string) {\n\treturn string.replace(/[.\\-*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction getSemitones(allIntervals) {\n\treturn allIntervals\n\t\t.map((interval) => intervalsToSemitones[interval])\n\t\t.sort((a, b) => a - b);\n}\n\n// intents will be used later at formatting for disambiguation of some potentially confusing cases\nfunction getIntents(allModifiers) {\n\treturn {\n\t\tmajor: hasMajorIntent(allModifiers),\n\t\televenth: allModifiers.includes(m.eleventh),\n\t\talt: allModifiers.includes(m.alt),\n\t};\n}\n", "import chain from '../helpers/chain';\nimport _cloneDeep from 'lodash/cloneDeep';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport { allVariantsPerGroup } from '../dictionaries/notes';\n\nimport {\n\tInvalidInputError,\n\tUnexpectedError,\n} from '../helpers/ChordParsingError';\n\nimport checkIntervalsConsistency from './filters/checkIntervalsConsistency';\nimport formatSymbol from './filters/formatSymbol';\nimport formatSymbolParts from './filters/formatSymbolParts';\nimport getParsableDescriptor from './filters/getParsableDescriptor';\nimport initChord from './filters/initChord';\nimport nameIndividualChordNotes from './filters/nameIndividualChordNotes';\nimport normalizeNotes from './filters/normalizeNotes';\nimport normalizeDescriptor from './filters/normalizeDescriptor';\nimport parseBase from './filters/parseBase';\nimport parseDescriptor from './filters/parseDescriptor';\n\n/**\n * Create a chord parser function\n * @param {ParserConfiguration} [parserConfiguration]\n * @returns {function(String): Chord}\n */\nfunction chordParserFactory(parserConfiguration = {}) {\n\tconst allAltIntervals = ['b5', '#5', 'b9', '#9', '#11', 'b13'];\n\tconst allNotationSystems = ['english', 'german', 'latin'];\n\n\tconst {\n\t\tnotationSystems = _cloneDeep(allNotationSystems),\n\t\taltIntervals = _cloneDeep(allAltIntervals),\n\t\tcustomFilters = [],\n\t} = parserConfiguration;\n\n\tcheckAltIntervals(altIntervals, allAltIntervals);\n\tcheckNotationSystems(notationSystems, allNotationSystems);\n\tcheckCustomFilters(customFilters);\n\n\treturn parseChord;\n\n\t/**\n\t * Convert an input string into an abstract chord structure\n\t * @param {String} symbol - the chord symbol candidate\n\t * @returns {Chord|Object} A chord object if the given string is successfully parsed. An object with an `error` property otherwise.\n\t */\n\tfunction parseChord(symbol) {\n\t\tconst allErrors = [];\n\n\t\tif (!isInputValid(symbol)) {\n\t\t\tconst e = new InvalidInputError();\n\t\t\tallErrors.push(formatError(e));\n\t\t}\n\n\t\tconst allVariantsPerGroupCopy = _cloneDeep(allVariantsPerGroup).filter(\n\t\t\t(variantsGroup) => notationSystems.includes(variantsGroup.name)\n\t\t);\n\n\t\tlet chord;\n\t\tlet allFilters;\n\t\tlet variants;\n\n\t\tif (!allErrors.length) {\n\t\t\twhile (allVariantsPerGroupCopy.length && !chord) {\n\t\t\t\tvariants = allVariantsPerGroupCopy.shift();\n\n\t\t\t\tallFilters = [\n\t\t\t\t\tinitChord.bind(null, parserConfiguration),\n\t\t\t\t\tparseBase.bind(null, variants.notes),\n\t\t\t\t\tgetParsableDescriptor,\n\t\t\t\t\tparseDescriptor.bind(null, altIntervals),\n\t\t\t\t\tcheckIntervalsConsistency,\n\t\t\t\t\tnormalizeNotes,\n\t\t\t\t\tnormalizeDescriptor,\n\t\t\t\t\tformatSymbolParts,\n\t\t\t\t\tformatSymbol,\n\t\t\t\t\tnameIndividualChordNotes,\n\t\t\t\t\t...customFilters,\n\t\t\t\t];\n\n\t\t\t\ttry {\n\t\t\t\t\tchord = chain(allFilters, symbol);\n\t\t\t\t\tif (chord) {\n\t\t\t\t\t\tchord.input.notationSystem = variants.name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tallErrors.push(getUnexpectedError(variants.name));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tallErrors.push(formatError(e, variants.name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chord ? chord : { error: allErrors };\n\t}\n}\n\nfunction checkAltIntervals(altIntervals, allAltIntervals) {\n\tcheckArray('altIntervals', altIntervals, allAltIntervals, true);\n}\n\nfunction checkNotationSystems(notationSystems, allNotationSystems) {\n\tcheckArray('notationSystems', notationSystems, allNotationSystems);\n}\n\nfunction checkArray(arrayName, arrayToTest, allowedValues, allowEmpty) {\n\tif (!Array.isArray(arrayToTest)) {\n\t\tthrow new TypeError(`'${arrayName}' should be an array`);\n\t}\n\tif (!allowEmpty && arrayToTest.length === 0) {\n\t\tthrow new TypeError(`'${arrayName}' cannot be empty`);\n\t}\n\tarrayToTest.forEach((system) => {\n\t\tif (!allowedValues.includes(system)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`'${system}' is not a valid value for ${arrayName}`\n\t\t\t);\n\t\t}\n\t});\n}\n\nfunction isInputValid(input) {\n\treturn typeof input === 'string' && input.length > 0;\n}\n\nfunction getUnexpectedError(notationSystem) {\n\tconst error = new UnexpectedError();\n\treturn formatError(error, notationSystem);\n}\n\nfunction formatError(exceptionError, notationSystem) {\n\treturn {\n\t\ttype: exceptionError.name,\n\t\tchord: exceptionError.chord,\n\t\tmessage: exceptionError.message,\n\t\tnotationSystem,\n\t};\n}\n\n/**\n * @module chordParserFactory\n * Expose the chordParserFactory() function\n */\nexport default chordParserFactory;\n", "import { hasExactly } from '../../helpers/hasElement';\n\nconst shortDescriptors = {\n\tsus2: 'sus2',\n\tadd2: '2',\n\tomit: 'no',\n\tma: 'M',\n\tmi: 'm',\n\tdim: '°',\n\taug7: '7+',\n\televenth: '11',\n};\n\n/**\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function shortenNormalized(chord) {\n\tlet descriptor;\n\tlet chordChanges = chord.formatted.chordChanges;\n\n\tif (isSus2(chord)) {\n\t\tdescriptor = shortDescriptors.sus2;\n\t\tchordChanges = [];\n\t} else if (isAdd2(chord)) {\n\t\tdescriptor = shortDescriptors.add2;\n\t\tchordChanges = [];\n\t} else if (isAug7(chord)) {\n\t\tdescriptor = shortDescriptors.aug7;\n\t\tchordChanges = [];\n\t} else {\n\t\tdescriptor = chord.formatted.descriptor\n\t\t\t.replace('mi', shortDescriptors.mi)\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('dim', shortDescriptors.dim);\n\n\t\tif (isEleventh(chord)) {\n\t\t\tdescriptor = descriptor.replace(\n\t\t\t\t/7sus|9sus/,\n\t\t\t\tshortDescriptors.eleventh\n\t\t\t);\n\t\t}\n\t}\n\n\tchordChanges = chordChanges.map((change) => {\n\t\treturn change\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('omit', shortDescriptors.omit);\n\t});\n\n\treturn {\n\t\t...chord,\n\t\tformatted: {\n\t\t\t...chord.formatted,\n\t\t\tdescriptor,\n\t\t\tchordChanges,\n\t\t},\n\t};\n}\n\nfunction isSus2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '5', '9']);\n}\n\nfunction isAdd2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '5', '9']);\n}\n\nfunction isAug7(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '#5', 'b7']);\n}\n\nfunction isEleventh(chord) {\n\treturn chord.normalized.intents.eleventh;\n}\n", "import _difference from 'lodash/difference';\n\nimport chain from '../../helpers/chain';\n\nimport normalizeDescriptor from '../../parser/filters/normalizeDescriptor';\nimport formatSymbolParts from '../../parser/filters/formatSymbolParts';\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\n\nimport { hasNoneOf } from '../../helpers/hasElement';\n\n/**\n * @param {Chord} chord\n * @param {('none'|'max'|'core')} level\n * @returns {Chord}\n */\nexport default function simplify(level = 'none', chord) {\n\tif (level === 'none') {\n\t\treturn chord;\n\t}\n\n\tconst intervalsToRemove = {\n\t\tmax: [\n\t\t\t'4',\n\t\t\t'b5',\n\t\t\t'#5',\n\t\t\t'6',\n\t\t\t'bb7',\n\t\t\t'b7',\n\t\t\t'7',\n\t\t\t'b9',\n\t\t\t'9',\n\t\t\t'#9',\n\t\t\t'11',\n\t\t\t'#11',\n\t\t\t'b13',\n\t\t\t'13',\n\t\t],\n\t\tcore: ['4', 'b9', '9', '#9', '11', '#11', 'b13', '13'],\n\t};\n\n\tconst intervals = _difference(\n\t\tchord.normalized.intervals,\n\t\tintervalsToRemove[level]\n\t);\n\n\tif (hasNoneOf(intervals, ['b3', '3'])) {\n\t\tintervals.push(chord.normalized.intents.major ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5'])) {\n\t\tintervals.push('5');\n\t}\n\n\tchord.normalized.intervals = intervals;\n\tchord.normalized.semitones = intervals.map(\n\t\t(interval) => intervalsToSemitones[interval]\n\t);\n\tchord.normalized.intents.eleventh = false;\n\tchord.normalized.intents.alt = false;\n\n\tif (level === 'max') {\n\t\tdelete chord.normalized.bassNote;\n\t}\n\n\tconst allFilters = [\n\t\tnormalizeDescriptor,\n\t\tformatSymbolParts,\n\t\tnameIndividualChordNotes,\n\t];\n\n\treturn chain(allFilters, chord);\n}\n", "import _invert from 'lodash/invert';\n\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\n\nconst notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'];\n\nconst sharpsToFlats = {\n\t'C#': 'Db',\n\t'D#': 'Eb',\n\t'F#': 'Gb',\n\t'G#': 'Ab',\n\t'A#': 'Bb',\n};\n\nconst flatsToSharps = _invert(sharpsToFlats);\n\nexport default function transpose(transposeValue, useFlats, chord) {\n\tconst { rootNote, bassNote } = chord.normalized;\n\n\tconst rootSharp = convertToSharp(rootNote);\n\tchord.normalized.rootNote = transposeNote(\n\t\trootSharp,\n\t\ttransposeValue,\n\t\tuseFlats\n\t);\n\tchord.formatted.rootNote = chord.normalized.rootNote;\n\n\tif (bassNote) {\n\t\tconst bassSharp = convertToSharp(bassNote);\n\t\tchord.normalized.bassNote = transposeNote(\n\t\t\tbassSharp,\n\t\t\ttransposeValue,\n\t\t\tuseFlats\n\t\t);\n\t\tchord.formatted.bassNote = chord.normalized.bassNote;\n\t}\n\n\treturn nameIndividualChordNotes(chord);\n}\n\nfunction transposeNote(note, value, useFlats) {\n\tconst noteIndex = notes.indexOf(note);\n\tconst transposedIndex = noteIndex + value;\n\n\tconst octaves = Math.floor(transposedIndex / 12);\n\tconst correctedTransposedIndex = transposedIndex - octaves * 12;\n\n\tconst transposed = notes[correctedTransposedIndex];\n\n\treturn useFlats ? sharpsToFlats[transposed] || transposed : transposed;\n}\n\nfunction convertToSharp(note) {\n\treturn flatsToSharps[note] || note;\n}\n", "const translationTables = {\n\tgerman: {\n\t\tAb: 'As',\n\t\tA: 'A',\n\t\t'A#': 'Ais',\n\t\tBb: 'Hes',\n\t\tB: 'H',\n\t\tC: 'C',\n\t\t'C#': 'Cis',\n\t\tDb: 'Des',\n\t\tD: 'D',\n\t\t'D#': 'Dis',\n\t\tEb: 'Es',\n\t\tE: 'E',\n\t\tF: 'F',\n\t\t'F#': 'Fis',\n\t\tGb: 'Ges',\n\t\tG: 'G',\n\t\t'G#': 'Gis',\n\t},\n\tlatin: {\n\t\tAb: 'Lab',\n\t\tA: 'La',\n\t\t'A#': 'La#',\n\t\tBb: 'Sib',\n\t\tB: 'Si',\n\t\tC: 'Do',\n\t\t'C#': 'Do#',\n\t\tDb: 'Reb',\n\t\tD: 'Re',\n\t\t'D#': 'Re#',\n\t\tEb: 'Mib',\n\t\tE: 'Mi',\n\t\tF: 'Fa',\n\t\t'F#': 'Fa#',\n\t\tGb: 'Solb',\n\t\tG: 'Sol',\n\t\t'G#': 'Sol#',\n\t},\n};\nconst allNotationSystems = Object.keys(translationTables);\n\n/**\n * @param {('auto'|'english'|'german'|'latin')} notationSystem\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function convertNotationSystem(\n\tnotationSystem = 'english',\n\tchord\n) {\n\tconst finalNotationSystem =\n\t\tnotationSystem === 'auto' ? chord.input.notationSystem : notationSystem;\n\n\tif (finalNotationSystem === 'english') return chord;\n\tif (!allNotationSystems.includes(finalNotationSystem)) return null;\n\n\tchord.formatted.rootNote =\n\t\ttranslationTables[finalNotationSystem][chord.formatted.rootNote];\n\n\tif (chord.formatted.bassNote) {\n\t\tchord.formatted.bassNote =\n\t\t\ttranslationTables[finalNotationSystem][chord.formatted.bassNote];\n\t}\n\treturn chord;\n}\n", "/**\n * @param {Chord} chord\n * @returns {String}\n */\nexport default function textPrinter(chord) {\n\treturn chord && chord.formatted && chord.formatted.symbol\n\t\t? chord.formatted.symbol\n\t\t: null;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport textPrinter from './text';\nimport chordParserFactory from '../../parser/chordParserFactory';\n\n/**\n * This printer returns a `chord` object reflecting the applied rendering filters. This object is very close to what would\n * be obtained by re-parsing the rendered chord.\n * It is basically the `chord` object in its current state, with 2 differences:\n * - a re-built `input` property to include all the changes applied during rendering (transposition, simplification, etc.)\n * - a removed `notationSystems` parser configuration since it may not be relevant anymore, especially if the rendering changed the notation system\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function rawPrinter(chord) {\n\t// make sure the chord can be re-parsed, whichever notation system was used for the rendering\n\tdelete chord.parserConfiguration.notationSystems;\n\n\tconst cloned = _cloneDeep(chord);\n\n\t// Re-parse the rendered chord to get the 'input' property right\n\tconst textPrinted = textPrinter(chord);\n\tconst parseChord = chordParserFactory(chord.parserConfiguration);\n\tconst reParsed = parseChord(textPrinted);\n\tcloned.input = reParsed.input;\n\n\treturn cloned;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport chain from '../helpers/chain';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport shortenNormalized from './filters/shortenNormalized';\nimport simplifyFilter from './filters/simplify';\nimport transpose from './filters/transpose';\nimport convertNotationSystem from './filters/convertNotationSystem';\nimport formatSymbol from '../parser/filters/formatSymbol';\nimport textPrinter from './printer/text';\nimport rawPrinter from './printer/raw';\n\n/**\n * Create a pre-configured chord rendering function\n * @param {RendererConfiguration} [rendererConfiguration]\n * @returns {function(Chord): String}\n */\nfunction chordRendererFactory({\n\tuseShortNamings = false,\n\tsimplify = 'none',\n\ttransposeValue = 0,\n\tharmonizeAccidentals = false,\n\tuseFlats = false,\n\tprinter = 'text',\n\tnotationSystem = 'english',\n\tcustomFilters = [],\n} = {}) {\n\tcheckCustomFilters(customFilters);\n\n\tconst allFilters = [];\n\n\tif (['max', 'core'].includes(simplify)) {\n\t\tallFilters.push(simplifyFilter.bind(null, simplify));\n\t}\n\n\tif (harmonizeAccidentals || transposeValue !== 0) {\n\t\tallFilters.push(transpose.bind(null, transposeValue, useFlats));\n\t}\n\n\tif (useShortNamings) {\n\t\tallFilters.push(shortenNormalized);\n\t}\n\n\tallFilters.push(\n\t\tconvertNotationSystem.bind(null, notationSystem),\n\t\tformatSymbol,\n\t\t...customFilters\n\t);\n\n\treturn renderChord;\n\n\t/**\n\t * Render a chord structure\n\t * @param {Chord} chord - the chord structure to render\n\t * @returns {String|Chord} output depends on the selected printer: string for text printer (default), Chord for raw printer\n\t */\n\tfunction renderChord(chord) {\n\t\tif (!isValidChord(chord)) {\n\t\t\treturn null;\n\t\t}\n\t\tconst filteredChord = chain(allFilters, _cloneDeep(chord));\n\n\t\treturn printer === 'raw'\n\t\t\t? rawPrinter(filteredChord)\n\t\t\t: textPrinter(filteredChord);\n\t}\n}\n\nconst isValidChord = (chord) => {\n\treturn chord && typeof chord === 'object' && !chord.error && chord.input;\n};\n\n/**\n * @module chordRendererFactory\n * Expose the chordRendererFactory() function\n **/\nexport default chordRendererFactory;\n", "import './typedefs';\n\nimport chordParserFactory from './parser/chordParserFactory';\nimport chordRendererFactory from './renderer/chordRendererFactory';\n\nexport { chordParserFactory, chordRendererFactory };\n", "import Promise from 'promise';\nimport { Playlist, Song, Cell, Chord } from './parser.js';\nimport { Converter, LogLevel } from './converter.js';\nimport { Version } from './version.js';\n\nexport function convertSync(ireal, options = {}) {\n const playlist = new Playlist(ireal);\n playlist.songs.forEach(song => {\n song.musicXml = Converter.convert(song, options);\n });\n return playlist;\n}\n\nexport async function convert(ireal, options = {}) {\n return new Promise(resolve => resolve(convertSync(ireal, options)));\n}\n\nexport { Playlist, Song, Cell, Chord, Converter, LogLevel, Version };\n", "/**\n * The iReal Pro parser is derived from\n * https://github.com/daumling/ireal-renderer\n * which is itself derived from\n * https://github.com/pianosnake/ireal-reader\n *\n * None of those modules did exactly what is needed here, namely return\n * a full structure that can be iterated downstream.\n */\n\nimport diff from 'fast-diff';\n\nexport class Playlist {\n constructor(ireal){\n const playlistEncoded = /.*?(irealb(?:ook)?):\\/\\/([^\"]*)/.exec(ireal);\n const playlist = decodeURIComponent(playlistEncoded[2]);\n const parts = playlist.split(\"===\"); //songs are separated by ===\n if (parts.length > 1) this.name = parts.pop(); //playlist name\n this.songs = parts\n .map(part => {\n try {\n return new Song(part, playlistEncoded[1] === 'irealbook');\n }\n catch (error) {\n const parts = part.split(\"=\");\n const title = Song.parseTitle(parts[0].trim());\n console.error(`[ireal-musicxml] [${title}] ${error}`);\n return null;\n }\n })\n .filter(song => song !== null)\n .reduce((songs, song) => {\n if (songs.length > 0) {\n // Detect multi-part songs via their titles.\n // The parts of the same song have the same title, except for the part number, so they follow each other in the list.\n // The `diff` module compares two titles and returns a list of similarities and differences.\n // We expect the first diff to be a similarity, followed by differences that are only numeric.\n // When we find a multi-part song, we just concatenate the cells into the first part.\n const diffs = diff(songs[songs.length-1].title, song.title);\n if (diffs[0][0] === 0 && diffs.every(d => d[0] === 0 || d[1].match(/^\\d+$/))) {\n songs[songs.length-1].cells = songs[songs.length-1].cells.concat(song.cells);\n return songs;\n }\n }\n songs.push(song);\n return songs;\n }, []);\n }\n}\n\nexport class Cell {\n constructor() {\n this.annots = [];\n this.comments = [];\n this.bars = \"\";\n this.spacer = 0;\n this.chord = null;\n }\n}\n\nexport class Chord {\n constructor(note, modifiers = \"\", over = null, alternate = null) {\n this.note = note;\n this.modifiers = modifiers;\n this.over = over;\n this.alternate = alternate;\n }\n}\n\nexport class Song {\n constructor(ireal, oldFormat = false) {\n this.cells = [];\n this.musicXml = \"\";\n if (!ireal) {\n this.title = \"\";\n this.composer = \"\";\n this.style = \"\";\n this.key = \"\";\n this.transpose = 0;\n this.groove = \"\";\n this.bpm = 0;\n this.repeats = 0;\n return;\n }\n const parts = ireal.split(\"=\"); //split on one sign, remove the blanks\n if (oldFormat) {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[2].trim();\n this.key = parts[3];\n this.cells = this.parse(parts[5]);\n }\n else {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[3].trim();\n this.key = parts[4];\n this.transpose = +parts[5] || 0; // TODO\n this.groove = parts[7];\n this.bpm = +parts[8];\n this.repeats = +parts[9] || 3;\n const music = parts[6].split(\"1r34LbKcu7\");\n this.cells = this.parse(unscramble(music[1]));\n }\n }\n\n /**\n * The RegExp for a complete chord. The match array contains:\n * 1 - the base note\n * 2 - the modifiers (+-ohd0123456789 and su for sus)\n * 3 - any comments (may be e.g. add, sub, or private stuff)\n * 4 - the \"over\" part starting with a slash\n * 5 - the top chord as (chord)\n * @type RegExp\n */\n static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\\-^\\dhob#])*)(\\*.+?\\*)*(\\/[A-G][#b]?)?(\\(.*?\\))?/;\n static chordRegex2 = /^([ Wp])()()(\\/[A-G][#b]?)?(\\(.*?\\))?/;\t// need the empty captures to match chordRegex\n\n static regExps = [\n /^\\*[a-zA-Z]/,\t\t\t\t\t\t\t// section\n /^T\\d\\d/,\t\t\t\t\t\t\t\t// time measurement\n /^N./,\t\t\t\t\t\t\t\t\t// repeat marker\n /^<.*?>/,\t\t\t\t\t\t\t\t// comments\n Song.chordRegex,\t\t\t\t// chords\n Song.chordRegex2,\t\t\t\t// space, W and p (with optional alt chord)\n ];\n\n /**\n * The parser cracks up the raw music string into several objects,\n * one for each cell. iReal Pro works with rows of 16 cell each. The result\n * is stored at song.cells.\n *\n * Each object has the following properties:\n *\n * chord: if non-null, a chord object with these properties:\n * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord)\n * modifiers - the modifiers, like 7, + o etc (string)\n * over - if non-null, another chord object for the under-note\n * alternate - if non-null another chord object for the alternate chord\n * annots: annotations, a string of:\n * *x - section, like *v, *I, *A, *B etc\n * Nx - repeat bots (N1, N2 etc)\n * Q - coda\n * S - segno\n * Txx - measure (T44 = 4/4 etc, but T12 = 12/8)\n * U - END\n * f - fermata\n * l - (letter l) normal notes\n * s - small notes\n * comments: an array of comment strings\n * bars: bar specifiers, a string of:\n * | - single vertical bar, left\n * [ - double bar, left\n * ] - double bar, right\n * { - repeat bar, left\n * } - repeat bar, right\n * Z - end bar, right\n * spacer - a number indicating the number of vertical spacers above this cell\n *\n * @returns [Cell]\n */\n parse(ireal) {\n let text = ireal.trim();\n const arr = [];\n while (text) {\n let found = false;\n for (let i = 0; i < Song.regExps.length; i++) {\n const match = Song.regExps[i].exec(text);\n if (match) {\n found = true;\n if (match.length <= 2) {\n arr.push(match[0]);\n text = text.substr(match[0].length);\n }\n else {\n // a chord\n arr.push(match);\n text = text.substr(match[0].length);\n }\n break;\n }\n }\n if (!found) {\n // ignore the comma separator\n if (text[0] !== ',')\n arr.push(text[0]);\n text = text.substr(1);\n }\n }\n\n // pass 2: extract prefixes, suffixes, annotations and comments\n const cells = [];\n let obj = this.newCell(cells);\n let prevobj = null;\n for (let i = 0; i < arr.length; i++) {\n let cell = arr[i];\n if (cell instanceof Array) {\n obj.chord = this.parseChord(cell);\n cell = \" \";\n }\n switch (cell[0]) {\n case '{':\t// open repeat\n case '[':\t// open double bar\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = cell; cell = null; break;\n case '|':\t// single bar - close previous and open this\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = '('; cell = null; break;\n case ']':\t// close double bar\n case '}':\t// close repeat\n case 'Z':\t// ending double bar\n if (prevobj) { prevobj.bars += cell; prevobj = null; }\n cell = null; break;\n case 'n':\t// N.C.\n obj.chord = new Chord(cell[0]);\n break;\n case ',':\tcell = null; break; // separator\n case 'S':\t// segno\n case 'T':\t// time measurement\n case 'Q':\t// coda\n case 'N':\t// repeat\n case 'U':\t// END\n case 's':\t// small\n case 'l':\t// normal\n case 'f':\t// fermata\n case '*': obj.annots.push(cell); cell = null; break;\n case 'Y': obj.spacer++; cell = null; prevobj = null; break;\n case 'r':\n case 'x':\n case 'W':\n obj.chord = new Chord(cell);\n break;\n case '<':\n cell = cell.substr(1, cell.length-2);\n obj.comments.push(cell);\n cell = null; break;\n default:\n }\n if (cell && i < arr.length-1) {\n prevobj = obj;\t\t// so we can add any closing barline later\n obj = this.newCell(cells);\n }\n }\n return cells;\n }\n\n /**\n * The title had \"A\" and \"The\" at the back (e.g. \"Gentle Rain, The\")\n */\n static parseTitle(title) {\n return title.replace(/(.*)(, )(A|The)$/g, '$3 $1');\n }\n\n /**\n * The composer is reversed (last first) if it only has 2 names :shrug:\n */\n static parseComposer(composer) {\n const parts = composer.split(/(\\s+)/); // match and return spaces too\n if (parts.length == 3) { // [last, spaces, first]\n return parts[2] + parts[1] + parts[0];\n }\n return composer;\n }\n\n parseChord(chord) {\n var note = chord[1] || \" \";\n var modifiers = chord[2] || \"\";\n var comment = chord[3] || \"\";\n if (comment)\n modifiers += comment.substr(1, comment.length-2);\n var over = chord[4] || \"\";\n if (over[0] === '/')\n over = over.substr(1);\n var alternate = chord[5] || null;\n if (alternate) {\n chord = Song.chordRegex.exec(alternate.substr(1, alternate.length-2));\n if (!chord)\n alternate = null;\n else\n alternate = this.parseChord(chord);\n }\n // empty cell?\n if (note === \" \" && !alternate && !over)\n return null;\n if (over) {\n var offset = (over[1] === '#' || over[1] === 'b') ? 2 : 1;\n over = new Chord(over.substr(0, offset), over.substr(offset), null, null);\n }\n else\n over = null;\n return new Chord(note, modifiers, over, alternate);\n }\n\n newCell(cells) {\n var obj = new Cell;\n cells.push(obj);\n return obj;\n }\n}\n\n// Unscrambling hints from https://github.com/ironss/accompaniser/blob/master/irealb_parser.lua\n// Strings are broken up in 50 character segments. each segment undergoes character substitution addressed by obfusc50()\n// Note that a final part of length 50 or 51 is not scrambled.\n// Finally need to substitute for Kcl, LZ and XyQ.\nfunction unscramble(s) {\n let r = '', p;\n\n while (s.length > 51){\n p = s.substring(0, 50);\n s = s.substring(50);\n r = r + obfusc50(p);\n }\n r = r + s;\n // now undo substitution obfuscation\n r = r.replace(/Kcl/g, '| x').replace(/LZ/g, ' |').replace(/XyQ/g, ' ');\n return r;\n}\n\nfunction obfusc50(s) {\n // the first 5 characters are switched with the last 5\n const newString = s.split('');\n for (let i = 0; i < 5; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n // characters 10-24 are also switched\n for (let i = 10; i < 24; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n return newString.join('');\n}\n", "import jstoxml from 'jstoxml';\nimport ChordSymbol from 'chord-symbol';\nconst { chordParserFactory, chordRendererFactory } = ChordSymbol;\nimport { Version } from './version.js';\n\nexport class LogLevel {\n static Debug = 0;\n static Info = 1;\n static Warn = 2;\n static Error = 3;\n static None = 4;\n}\n\nconst MUSICXML_VERSION = '4.0';\nconst SCALING_MM = 7;\nconst SCALING_TENTHS = 40;\n\nexport class Converter {\n static defaultOptions = {\n 'divisions': 768, // same as used by iReal\n 'notation': 'rhythmic', // 'rhythmic' for rhythmic notation, 'slash' for slash notation\n 'step': 'B', // chord note\n 'octave': 4, // chord note octave\n 'notehead': 'slash', // chord note head\n 'noteheadSize': 'large', // size of chord note head\n 'date': true, // include encoding date\n 'clef': false, // hide clef by default\n 'keySignature': false, // hide key signature by default\n 'pageWidth': 210, // mm (A4)\n 'pageHeight': 297, // mm (A4)\n 'pageMargin': 15, // mm\n 'logLevel': LogLevel.Warn\n };\n\n static sequenceAttributes = [\n // Expected order of attribute elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/\n 'divisions',\n 'key',\n 'time',\n 'staves',\n 'part-symbol',\n 'instruments',\n 'clef',\n 'staff-details',\n 'transpose',\n 'directive',\n 'measure-style'\n ];\n\n static sequenceNote = [\n // Expected order of note elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/\n 'cue',\n 'pitch',\n 'rest',\n 'unpitched',\n 'duration',\n 'tie',\n 'voice',\n 'type',\n 'dot',\n 'accidental',\n 'time-modification',\n 'stem',\n 'notehead',\n 'notehead-text',\n 'staff',\n 'beam',\n 'notations',\n 'lyric',\n 'play'\n ];\n\n static sequenceNotations = [\n // Expected order of notations elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/\n 'accidental-mark',\n 'arpeggiate',\n 'articulations',\n 'dynamics',\n 'fermata',\n 'glissando',\n 'non-arpeggiate',\n 'ornaments',\n 'other-notation',\n 'slide',\n 'slur',\n 'technical',\n 'tied',\n 'tuplet'\n ];\n\n static sequenceBarline = [\n // Expected order of barline elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/\n 'bar-style',\n 'footnote',\n 'level',\n 'wavy-line',\n 'segno',\n 'coda',\n 'fermata',\n 'ending',\n 'repeat'\n ];\n\n static mapAlter = {\n '#': 1,\n 'b': -1\n };\n\n static mapFifthsToAlters = {\n 'sharp': ['F', 'C', 'G', 'D', 'A', 'E', 'B'],\n 'flat': ['B', 'E', 'A', 'D', 'G', 'C', 'F']\n };\n\n static mapRepeats = {\n \"D.C. al Coda\": Converter.prototype.convertDaCapo,\n \"D.C. al Fine\": Converter.prototype.convertDaCapo,\n \"D.C. al 1st End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 2nd End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 3rd End.\": Converter.prototype.convertDaCapo,\n \"D.S. al Coda\": Converter.prototype.convertDalSegno,\n \"D.S. al Fine\": Converter.prototype.convertDalSegno,\n \"D.S. al 1st End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 2nd End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 3rd End.\": Converter.prototype.convertDalSegno,\n \"Fine\": Converter.prototype.convertFine,\n \"3x\": Converter.prototype.convertRepeatNx,\n \"4x\": Converter.prototype.convertRepeatNx,\n \"5x\": Converter.prototype.convertRepeatNx,\n \"6x\": Converter.prototype.convertRepeatNx,\n \"7x\": Converter.prototype.convertRepeatNx,\n \"8x\": Converter.prototype.convertRepeatNx\n };\n\n static convert(song, options = {}) {\n const realOptions = Object.assign({}, this.defaultOptions, options);\n return new Converter(song, realOptions).convert();\n }\n\n constructor(song, options) {\n this.song = song;\n this.options = options;\n this.time = { beats: 4, beatType: 4 };\n this.fifths = null; // key signature's degree of fifths\n this.measure = null; // current measure (of class Measure) being built\n this.barRepeat = 0; // current bar number for single- and double-bar repeats\n this.codas = []; // list of measures containing codas\n this.repeats = 0; // repeat count for closing repeat barline\n this.emptyCells = 0; // consecutive empty cells\n this.emptyCellNewSystem = false; // did a new system occur in an empty cell?\n\n // In iRP, there are 16 cells per line.\n // The width in mm of a single cell depends on the page width and the margins.\n this.cellWidth = (this.options.pageWidth - (2 * this.options.pageMargin)) / 16;\n\n // chord-symbol.\n this.parseChord = chordParserFactory({ \"altIntervals\": [\n \"b5\",\n \"b9\"\n ]});\n this.renderChord = chordRendererFactory({\n useShortNamings: true,\n printer: 'raw'\n });\n }\n\n convert() {\n return jstoxml.toXML(this.convertSong(), {\n header: `\n\n\n `.trim(),\n indent: ' '\n });\n }\n\n convertSong() {\n return {\n _name: 'score-partwise',\n _attrs: { 'version': MUSICXML_VERSION },\n _content: [{\n 'work': {\n 'work-title': this.song.title\n }\n }, {\n 'identification': [{\n _name: 'creator',\n _attrs: { 'type': 'composer' },\n _content: this.song.composer\n }, {\n 'encoding': [{\n 'software': `@infojunkie/ireal-musicxml ${Version.version}`\n }, { ...(this.options.date && {\n 'encoding-date': Converter.convertDate(new Date())\n })}, {\n _name: 'supports',\n _attrs: { 'element': 'accidental', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'element': 'transpose', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-page', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-system', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }]\n }]\n }, {\n 'defaults': {\n 'scaling': {\n 'millimeters': SCALING_MM,\n 'tenths': SCALING_TENTHS\n },\n 'page-layout': {\n 'page-height': Converter._mmToTenths(this.options.pageHeight),\n 'page-width': Converter._mmToTenths(this.options.pageWidth),\n 'page-margins': {\n 'left-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'right-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'top-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'bottom-margin': Converter._mmToTenths(this.options.pageMargin, 4)\n }\n }\n }\n }, {\n 'part-list': {\n _name: 'score-part',\n _attrs: { 'id': 'P1' },\n _content: {\n _name: 'part-name',\n _attrs: { 'print-object': 'no' },\n _content: 'Lead Sheet'\n }\n }\n }, {\n _name: 'part',\n _attrs: { 'id': 'P1' },\n _content: this.convertMeasures()\n }]\n };\n }\n\n // Date in yyyy-mm-dd\n // https://stackoverflow.com/a/50130338/209184\n static convertDate(date) {\n return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))\n .toISOString()\n .split('T')[0];\n }\n\n static Measure = class {\n constructor(number) {\n this.body = {\n _name: 'measure',\n _attrs: { 'number': number },\n _content: []\n };\n this.attributes = [];\n this.chords = [];\n this.barlines = [];\n this.barEnding = null;\n }\n\n number() {\n return this.body['_attrs']['number'];\n }\n\n assemble() {\n // Attributes.\n if (this.attributes.length) {\n this.body['_content'].push({\n 'attributes': Converter.reorderSequence(this, this.attributes, Converter.sequenceAttributes)\n });\n }\n\n // Chords.\n this.chords.forEach(chord => {\n this.body['_content'].push({\n 'harmony': chord.harmony\n }, ...chord.notes.map(note => {\n return {\n 'note': note\n };\n }));\n });\n\n // Barlines.\n this.barlines[0]['_content'] = Converter.reorderSequence(this, this.barlines[0]['_content'], Converter.sequenceBarline);\n this.body['_content'].splice(1, 0, this.barlines[0]);\n this.barlines[1]['_content'] = Converter.reorderSequence(this, this.barlines[1]['_content'], Converter.sequenceBarline);\n this.body['_content'].push(this.barlines[1]);\n\n return this.body;\n }\n };\n\n static Chord = class {\n constructor(harmony, notes, ireal) {\n this.harmony = harmony;\n this.notes = notes;\n this.ireal = ireal;\n this.spaces = 0;\n this.fermata = false;\n }\n };\n\n convertMeasures() {\n // Are we starting a new system given the current cell index?\n const isNewSystem = cellIndex => cellIndex > 0 && cellIndex % 16 === 0;\n\n // Loop on cells.\n const measures = this.song.cells.reduce((measures, cell, cellIndex) => {\n // Start a new measure if needed.\n // This means either finding an opening barline or finding non-empty cells while we're not in any measure.\n if (cell.bars.match(/\\(|\\{|\\[/) || (!this.measure && (cell.chord || cell.annots.length || cell.comments.length))) {\n if (this.measure) {\n this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`);\n this.measure.barlines.push(this.convertBarline('', 'right'));\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n }\n this.measure = new Converter.Measure(measures.length+1, this.options);\n\n // Very first bar: add defaults.\n if (!measures.length) {\n this.measure.attributes.push({\n 'divisions': this.options.divisions\n }, {\n _name: 'clef',\n _attrs: [{ 'print-object': this.options.clef ? 'yes' : 'no' }],\n _content: [{\n 'sign': 'G'\n }, {\n 'line': 2\n }]\n }, {\n 'staff-details': {\n 'staff-lines': 0\n }\n }, {\n 'measure-style': [{\n _name: 'slash',\n _attrs: { 'type': 'start', 'use-stems': this.options.notation === 'rhythmic' ? 'yes' : 'no' }\n }]\n }, this.convertKey());\n\n // Add bpm if any.\n if (this.song.bpm) {\n this.measure.body['_content'].push(this.convertTempo(this.song.bpm));\n }\n\n // Add style and groove.\n this.measure.body['_content'].push(this.convertStyleAndGroove(this.song.style, this.song.groove));\n }\n\n // Add starting barline.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'left'));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat-1].chords];\n }\n }\n\n // Short-circuit loop if no measure exists.\n // It can happen that `measure` is still blank in case of empty cells in iReal layout.\n // e.g. Girl From Ipanema in tests.\n if (!this.measure) {\n if (cell.chord || cell.annots.length || cell.comments.length || (cell.bars && cell.bars !== ')')) {\n this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures[measures.length-1]);\n }\n\n // This is an empty cell between measures.\n // Count the consecutive empty cells because they will be converted to margins.\n // Also remember that a new system has occurred.\n this.emptyCells++;\n if (isNewSystem(cellIndex)) {\n this.emptyCellNewSystem = true;\n }\n\n return measures;\n }\n\n // Start a new system every 16 cells.\n if (isNewSystem(cellIndex) || this.emptyCellNewSystem) {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _attrs: { 'new-system': 'yes' },\n _content: { ...(this.emptyCellNewSystem && {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }, {\n 'right-margin': '0.00'\n }]\n }\n })}\n });\n }\n\n // If we accumulated empty cells but not at the start of the current system, then we adjust other distances.\n // There are 2 cases to handle:\n // - We're now in a fresh system: Add a right-margin to the previous measure.\n // - We're in the middle of a system: Add a measure-distance to the current measure.\n if (!this.emptyCellNewSystem && this.emptyCells > 0) {\n if (this.measure.body['_content'][0]?.['_name'] === 'print' && this.measure.body['_content'][0]['_attrs']?.['new-system'] === 'yes') {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }]\n }\n }\n });\n }\n else {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'measure-layout': {\n 'measure-distance': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }\n }\n });\n }\n }\n\n // Reset the empty cells.\n this.emptyCellNewSystem = false;\n this.emptyCells = 0;\n\n // Chords.\n if (cell.chord) {\n switch (cell.chord.note) {\n case 'x': {\n // Handle single bar repeat.\n this.barRepeat = 1;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'r': {\n // Handle double bar repeat.\n // We do this in 2 stages, because a blank measure occurs after 'r' (to keep the measure count correct)\n // Here, we copy the next-to-last measure and set the repeat flag.\n // The next opening measure will pick up the remaining measure.\n this.barRepeat = 2;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'p':\n // If slash does not occur as first chord, count it as a space.\n // Otherwise, handle it as 'W'.\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n break;\n }\n // Fall into case 'W'.\n\n case 'W': {\n // Handle invisible root by copying previous chord.\n let target = this.measure;\n if (!target.chords.length) {\n target = measures.slice().reverse().find(m => m.chords.length);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`);\n }\n }\n if (target) {\n const chord = target.chords[target.chords.length-1].ireal;\n chord.over = cell.chord.over;\n chord.alternate = cell.chord.alternate;\n this.measure.chords.push(this.convertChord(chord));\n }\n break;\n }\n case ' ': {\n // TODO Handle alternate chord only.\n this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`);\n break;\n }\n default: {\n // Process new chord.\n this.measure.chords.push(this.convertChord(cell.chord));\n }\n }\n }\n else if (!this.barRepeat) {\n // There are 16 cells per row, regardless of time signature.\n // Barlines can occur anywhere and the iReal Pro player uses an unknown algorithm\n // to schedule the chords within a measure, using the empty cells as \"hints\" for scheduling.\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=chord-spacing-in-the-editor\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=how-do-i-fit-more-than-48-measures-into-one-chart\n //\n // Our approach to emulate the iReal Pro player is as follows:\n // 1. Whenever we find an empty cell, attach it to the previous chord (or discard it if there's no previous chord)\n // 2. At the end of the measure, adjust the chord durations based on existing empty cells across the measure\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n }\n }\n\n // Other attributes.\n cell.annots.forEach(annot => {\n switch(annot[0]) {\n case '*': { // section\n const section = annot.slice(1);\n this.measure.body['_content'].push(this.convertSection(section));\n break;\n }\n case 'T': { // time\n const time = annot.slice(1);\n this.measure.attributes.push(this.convertTime(time));\n break;\n }\n case 'S': { // segno\n this.measure.body['_content'].push(this.convertSegno());\n break;\n }\n case 'N': { // ending\n // TODO This assumes a single ending at a time.\n let ending = parseInt(annot.slice(1));\n if (ending < 1) {\n // It can happen that the ending number comes as 0 from iRP.\n // In this case, we do a best effort of finding the previous ending and incrementing it.\n const target = measures.slice().reverse().find(m => !!m.barEnding);\n ending = target?.barEnding ?? 0 + 1;\n }\n this.measure.barlines[0]['_content'].push(this.convertEnding(ending, 'start'));\n // End the previous ending at the previous measure's right barline.\n // Also, remove the 'discontinue' ending from its starting measure since we found an end to it.\n if (ending > 1) {\n measures[measures.length-1].barlines[1]['_content'].push(this.convertEnding(ending-1, 'stop'));\n const target = measures.slice().reverse().find(m => m.barEnding === ending-1);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline of any measure`);\n }\n else {\n // The last result is the good one: remove the 'discontinue' ending.\n const index = target.barlines[1]['_content'].findIndex(b => !!b && b['_name'] === 'ending');\n if (index === -1) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline`, target);\n }\n delete target.barlines[1]['_content'][index];\n }\n }\n // We will add a 'discontinue' ending at this measure's right barline.\n this.measure.barEnding = ending;\n break;\n }\n case 'Q': { // coda\n // We add all codas as \"tocoda\" because we expect the last one to be the actual coda.\n // After all measures have been built, adjust the last coda.\n // https://irealpro.com/how-the-coda-symbol-works-in-ireal-pro/\n this.measure.body['_content'].push(this.convertToCoda());\n this.codas.push(this.measure);\n break;\n }\n\n // Ignore small and large chord renderings.\n case 'l':\n case 's': break;\n\n case 'f': { // Fermata\n this.measure.chords[this.measure.chords.length-1].fermata = true;\n break;\n }\n\n case 'U': { // END, treated as Fine.\n this.measure.body['_content'].push(this.convertFine('END'));\n break;\n }\n\n default: this._log(LogLevel.Warn, `Unhandled annotation \"${annot}\"`);\n }\n });\n\n // Comments and repeats.\n // TODO Handle measure offset.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/offset/\n cell.comments.map(c => c.trim()).forEach(comment => {\n const repeatFn = this._map(Converter.mapRepeats, comment);\n if (repeatFn) {\n this.measure.body['_content'].push(repeatFn.call(this, comment));\n } else {\n this.measure.body['_content'].push(this.convertComment(comment));\n }\n });\n\n // Close and insert the measure if needed.\n // Ignore measures without any chords, they're probably empty spaces.\n if (cell.bars.match(/\\)|\\}|\\]|Z/) && this.measure.chords.length) {\n // Add closing barline and ending if needed.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'right'));\n if (this.measure.barEnding) {\n // In case of numbered repeats, end measure an open repeat by default \u250C\u2500\u2500\u2500\u2500\u2500\u2500\n // \u2502 2.\n // It may be replaced later by a closing repeat \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 2. \u2502\n this.measure.barlines[1]['_content'].push(this.convertEnding(this.measure.barEnding, 'discontinue'));\n }\n\n // Close out the measure.\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n this.measure = null;\n if (this.barRepeat) this.barRepeat--;\n }\n\n return measures;\n }, []);\n\n // Adjust final right margin if needed.\n const remainingCells = this.song.cells.length % 16 - this.emptyCells;\n if (remainingCells > 0 && measures.length > 0) {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * remainingCells)\n }]\n }\n }\n });\n }\n\n // Adjust last coda if any.\n if (this.codas.length) {\n const target = this.codas[this.codas.length-1];\n const direction = target.body['_content'].findIndex(d =>\n d['_name'] === 'direction' &&\n Array.isArray(d['_content']) &&\n d['_content'].some(s =>\n s['_name'] === 'sound' &&\n Object.keys(s['_attrs']).includes('tocoda')\n )\n );\n if (direction === -1) {\n this._log(LogLevel.Warn, `Cannot find sound direction`, target);\n }\n target.body['_content'][direction] = this.convertCoda();\n }\n\n // `Measure.assemble()` puts all the parts in `Measure.body`.\n return measures.map(measure => measure.assemble());\n }\n\n // Fix order of elements according to sequence as specified by an xs:sequence.\n // @param {array} elements - Array of elements to sort.\n // @param {array} sequence - Array of element names in order of xs:sequence.\n // @return {array} Ordered array of elements.\n static reorderSequence(measure, elements, sequence) {\n return elements.filter(a => Object.keys(a).length).sort((a1, a2) => {\n let k1 = Object.keys(a1)[0]; if (k1 === '_name') k1 = a1[k1];\n let k2 = Object.keys(a2)[0]; if (k2 === '_name') k2 = a2[k2];\n // TODO indexOf() needs to search every time. Make it faster with memoize?\n const i1 = sequence.indexOf(k1);\n const i2 = sequence.indexOf(k2);\n if (i1 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k1}\"`, measure);\n }\n if (i2 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k2}\"`, measure);\n }\n return i1 - i2;\n });\n }\n\n convertRepeatNx(comment) {\n let repeats = null;\n if (null !== (repeats = comment.match(/(\\d+)x/))) {\n this.repeats = repeats[1];\n }\n }\n\n convertFine(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'fine': 'yes' }\n }]\n };\n }\n\n convertDaCapo(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dacapo': 'yes' }\n }]\n };\n }\n\n convertDalSegno(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dalsegno': 'yes' }\n }]\n };\n }\n\n convertComment(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': comment[0] === '*' ? 'above' : 'below' },\n _content: {\n 'direction-type': {\n 'words': comment[0] === '*' ? comment.slice(3) : comment\n }\n }\n };\n }\n\n convertEnding(ending, type) {\n // TODO This assumes a single ending.\n return {\n _name: 'ending',\n _attrs: { 'number': ending, 'type': type },\n _content: `${ending}.`\n };\n }\n\n convertBarline(bars, location) {\n let style = 'regular';\n let repeat = null;\n if (bars.match(/\\[|\\]/)) {\n style = 'light-light';\n }\n else if (bars.match(/Z/)) {\n style = 'light-heavy';\n }\n else if (bars.match(/\\{|\\}/)) {\n style = location === 'left' ? 'heavy-light' : 'light-heavy';\n repeat = location === 'left' ? 'forward' : 'backward';\n }\n\n // Set the current repeat count to 2, which may be changed later if we find a repeat annotation.\n if (repeat === 'forward') {\n this.repeats = 2;\n }\n\n return {\n _name: 'barline',\n _attrs: { 'location': location },\n _content: [{\n 'bar-style': style\n }, { ...(repeat && {\n _name: 'repeat',\n _attrs: { 'direction': repeat, ...(repeat === 'backward' && { 'times': this.repeats }) }\n })}]\n };\n }\n\n convertSection(section) {\n if (section === 'i') section = 'Intro';\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: {\n 'direction-type': {\n 'rehearsal': section\n }\n }\n };\n }\n\n convertSegno() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n _name: 'segno'\n }\n }, {\n _name: 'sound',\n _attrs: { 'segno': 'segno' }\n }]\n };\n }\n\n convertCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n '_name': 'coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'coda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertToCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n 'words': 'To Coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'tocoda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertTempo(bpm) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n _name: 'metronome',\n _attrs: { 'parentheses': 'no' },\n _content: [{\n 'beat-unit': this.calculateChordDuration(1)[0].type\n }, {\n 'per-minute': bpm\n }]\n }]\n }, {\n _name: 'sound',\n _attrs: { 'tempo': bpm }\n }]\n };\n }\n\n convertTime(time) {\n let beats = parseInt(time[0]);\n let beatType = parseInt(time[1]);\n if (time === '12') {\n beats = 12;\n beatType = 8;\n }\n this.time = { beats, beatType };\n return {\n 'time': [{\n 'beats': beats\n }, {\n 'beat-type': beatType\n }]\n };\n }\n\n adjustChordsDuration(measure) {\n // Now that the measure is closed, we can adjust the chord durations, taking empty cells into consideration.\n // https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration\n //\n // Rules:\n // - Minimum chord duration is 1 beat\n // => Each chord starts as 1 beat\n // => Count of chords <= beats per measure\n // - Starting empty cells are discarded (already discarded during the cell loop)\n // - Each remaining empty cell counts as 1 beat (already counted during cell loop)\n // - Empty cell beats are added to their preceding chords (already added during the cell loop)\n // => Total chord durations <= beats per measure\n // - Remaining beats are distributed evenly among chords from first to last\n //\n if (measure.chords.length > this.time.beats) {\n this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure);\n return true;\n }\n let beats = measure.chords.reduce((beats, chord) => beats+1+chord.spaces, 0);\n if (!beats) {\n this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure);\n return false;\n }\n if (beats > this.time.beats) {\n // Reduce spaces.\n // We're guaranteed to end this loop because measure.chords.length <= this.time.beats\n let chordIndex = 0;\n while (beats > this.time.beats) {\n if (measure.chords[chordIndex].spaces > 0) {\n measure.chords[chordIndex].spaces--;\n beats--;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords.\n let chordIndex = 0;\n while (beats < this.time.beats) {\n measure.chords[chordIndex].spaces++;\n beats++;\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(1+chord.spaces).map((duration, i, ds) =>\n this.convertChordNote(\n duration,\n i === ds.length - 1 ? chord.fermata : false, // Possible fermata on last chord note only\n this.options.notation === 'rhythmic' && ds.length > 1 ? (i > 0 ? 'stop' : 'start') : null // Possible tie in case of rhythmic notation\n )\n );\n return chord;\n });\n\n return true;\n }\n\n calculateChordDuration(beats) {\n // Lowest beat resolution is eighth-note (8).\n const mapDuration = {\n '1': [{ t: 'eighth', d: 0, b: 1 }],\n '2': [{ t: 'quarter', d: 0, b: 2 }],\n '3': [{ t: 'quarter', d: 1, b: 3 }],\n '4': [{ t: 'half', d: 0, b: 4 }],\n '5': [{ t: 'quarter', d: 1, b: 3 }, { t: 'quarter', d: 0, b: 2 }],\n '6': [{ t: 'half', d: 1, b: 6 }],\n '7': [{ t: 'half', d: 2, b: 7 }],\n '8': [{ t: 'whole', d: 0, b: 8 }],\n '9': [{ t: 'half', d: 1, b: 6 }, { t: 'quarter', d: 1, b: 3 }],\n '10': [{ t: 'half', d: 1, b: 6 }, { t: 'half', d: 0, b: 4 }],\n '11': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 0, b: 4 }],\n '12': [{ t: 'whole', d: 1, b: 12 }],\n '13': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 1, b: 6 }],\n '14': [{ t: 'whole', d: 2, b: 14 }],\n '15': [{ t: 'whole', d: 0, b: 8 }, { t: 'half', d: 2, b: 7 }],\n };\n\n if (this.options.notation === 'slash') {\n // In case of slash notation, return an array of n=beats elements, each with a duration of 1 beat.\n const index = 1 * 8 / this.time.beatType;\n return Array(beats).fill(this\n ._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n })[0] // We're sure to get only one entry in this case.\n );\n }\n else {\n // In case of rhythmic notation, return a single note (or 2 tied notes) corresponding to the desired beat count.\n const index = beats * 8 / this.time.beatType;\n return this\n ._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n });\n }\n }\n\n convertChordNote(duration, fermata = false, tie = null) {\n const altered = Converter.mapFifthsToAlters[this.fifths >= 0 ? 'sharp' : 'flat'].slice(0, Math.abs(this.fifths));\n const noteType = {\n _name: 'pitch',\n _content: [{\n 'step': this.options.step\n }, {\n 'alter': altered.includes(this.options.step) ? (this.fifths > 0 ? 1 : -1) : 0\n }, {\n 'octave': this.options.octave\n }]\n };\n\n const notations = [];\n if (fermata) {\n notations.push({ _name: 'fermata' });\n }\n if (tie) {\n notations.push({ _name: 'tied', _attrs: { 'type': tie } });\n }\n\n return Converter.reorderSequence(this.measure, [noteType, {\n _name: 'cue'\n }, {\n _name: 'notehead',\n _content: this.options.notehead,\n _attrs: [{ 'font-size': this.options.noteheadSize }]\n }, {\n 'duration': duration.duration\n }, {\n 'voice': 1,\n }, {\n _name: 'type',\n _attrs: { 'size': 'full' },\n _content: duration.type\n }, { ...(notations.length && {\n 'notations': Converter.reorderSequence(this.measure, notations, Converter.sequenceNotations)\n })}]\n .concat(Array(duration.dots).fill({ _name: 'dot' })), Converter.sequenceNote);\n }\n\n convertChordDegree(value, type, alter) {\n return {\n _name: 'degree',\n _attrs: { 'print-object': 'no' },\n _content: [{\n 'degree-value': value\n }, {\n 'degree-alter': alter\n }, {\n 'degree-type': type\n }]\n };\n }\n\n convertChordSymbol(chord) {\n const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`));\n if (!parsedChord) {\n this._log(LogLevel.Warn, `Unrecognized chord \"${chord.note}${chord.modifiers}\"`);\n return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null };\n }\n\n const rootStep = parsedChord.input.rootNote[0];\n const rootAlter = this._map(Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord \"${parsedChord.input.rootNote}\"`);\n const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join('');\n\n // Find chord quality (aka kind).\n // `chord-symbol` misses a bunch of MusicXML chord qualities so we'll have to derive them ourselves.\n const mapKind = {\n 'major': 'major',\n 'major6': 'major-sixth',\n 'major7': 'major-seventh',\n 'dominant7': 'dominant',\n 'minor': 'minor',\n 'minor6': 'minor-sixth',\n 'minor7': 'minor-seventh',\n 'minorMajor7': 'major-minor',\n 'augmented': 'augmented',\n 'diminished': 'diminished',\n 'diminished7': 'diminished-seventh',\n 'power': 'power'\n };\n let chordKind = this._map(mapKind, parsedChord.normalized.quality, '', `Unrecognized chord quality \"${parsedChord.normalized.quality}\"`);\n\n // Convert extensions to their equivalent MusicXML kind.\n // Find the highest extension, then replace the word following [major, minor, dominant] with it.\n if (parsedChord.normalized.extensions.length) {\n const extension = Math.max(...parsedChord.normalized.extensions.map(e => parseInt(e))).toString();\n const mapExtensionKind = {\n '9': '-ninth',\n '11': '-11th',\n '13': '-13th'\n };\n chordKind = chordKind.split('-')[0] + this._map(mapExtensionKind, extension, '', `Unhandled extension ${extension}`);\n\n // chord-symbol considers dominant-11th to be suspended - but that's not _necessarily_ the case.\n // https://en.wikipedia.org/wiki/Eleventh_chord\n if (chordKind === 'dominant-11th') {\n parsedChord.normalized.isSuspended = false;\n }\n }\n\n // Detect other chord kinds by explicit interval comparison.\n [\n { intervals: ['1', '4', '5'], kind: 'suspended-fourth', strict: true },\n { intervals: ['1', '5', '9'], kind: 'suspended-second', strict: true },\n { intervals: ['1', 'b3', 'b5', 'b7'], kind: 'half-diminished', strict: true },\n { intervals: ['1', '3', '#5', 'b7'], kind: 'augmented-seventh', strict: false }\n ].some(chord => {\n if (\n (!chord.strict || parsedChord.normalized.intervals.length === chord.intervals.length) &&\n chord.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])\n ) {\n chordKind = chord.kind;\n\n // Remove the intervals from the parsedChord to avoid duplication below.\n chord.intervals.forEach(i => {\n parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter(p => p === i);\n parsedChord.normalized.adds = parsedChord.normalized.adds.filter(p => p === i);\n parsedChord.normalized.omits = parsedChord.normalized.omits.filter(p => p === i);\n });\n\n // Add the missing intervals from the parsedChord to the adds.\n parsedChord.normalized.intervals.forEach(i => {\n if (!chord.intervals.includes(i)) {\n parsedChord.normalized.adds.push(i);\n }\n });\n\n // Stop looping.\n return true;\n }\n });\n\n // Handle suspended chords other than triads.\n const chordDegrees = [];\n if (parsedChord.normalized.isSuspended && !chordKind.includes('suspended')) {\n parsedChord.normalized.adds.push('4');\n // Handle case of sus(add3)\n if (!parsedChord.normalized.adds.includes('3')) {\n parsedChord.normalized.omits.push('3');\n }\n }\n\n // Add chord degrees.\n parsedChord.normalized.alterations.forEach(alteration => {\n const degree = alteration.slice(1);\n chordDegrees.push(\n this.convertChordDegree(\n degree,\n (degree === '5' || parsedChord.normalized.extensions.includes(degree)) ? 'alter' : 'add',\n this._map(Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in \"${alteration}\"`)\n )\n );\n });\n parsedChord.normalized.adds.forEach(add => {\n const alteration = Object.keys(Converter.mapAlter).includes(add[0]) ? add[0] : null;\n const degree = alteration ? add.slice(1) : add;\n chordDegrees.push(\n this.convertChordDegree(degree, 'add', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${add}\"`))\n );\n });\n parsedChord.normalized.omits.forEach(omit => {\n const alteration = Object.keys(Converter.mapAlter).includes(omit[0]) ? omit[0] : null;\n const degree = alteration ? omit.slice(1) : omit;\n chordDegrees.push(\n this.convertChordDegree(degree, 'subtract', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${omit}\"`))\n );\n });\n\n return { rootStep, rootAlter, chordKind, chordDegrees, chordText };\n }\n\n convertChord(chord) {\n let harmony = null;\n\n // Special case: 'n' for no chord\n if (chord.note === 'n') {\n harmony = [{\n 'root': [{\n _name: 'root-step',\n _attrs: { 'text': '' },\n _content: this.options.step\n }],\n }, {\n _name: 'kind',\n _attrs: { 'text': 'N.C.' },\n _content: 'none',\n }];\n }\n else {\n const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord);\n\n // Handle bass note\n const bass = !chord.over ? null : [{\n 'bass-step': chord.over.note[0]\n }, { ...(chord.over.note[1] && {\n 'bass-alter': this._map(Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note \"${chord.over.note}\"`)\n })}];\n\n harmony = [{\n 'root': [{\n 'root-step': rootStep\n }, { ...(rootAlter && { // Don't generate the root-alter entry if rootAlter is blank\n 'root-alter': rootAlter\n })}],\n }, {\n _name: 'kind',\n _attrs: { 'text': chordText, 'use-symbols': 'no' },\n _content: chordKind,\n }, { ...(bass && {\n 'bass': bass\n })}].concat(chordDegrees);\n }\n\n // TODO Handle alternate chord\n if (chord.alternate) {\n this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`);\n }\n\n return new Converter.Chord(\n harmony,\n // Initial chord duration is 1 beat\n this.calculateChordDuration(1).map(duration => this.convertChordNote(duration)),\n chord\n );\n }\n\n convertKey() {\n const mapKeys = {\n // Major keys\n 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5, 'F#': 6, 'C#': 7,\n 'F': -1, 'Bb': -2, 'Eb': -3, 'Ab': -4, 'Db': -5, 'Gb': -6, 'Cb': -7,\n // Minor keys\n 'A-': 0, 'E-': 1, 'B-': 2, 'F#-': 3, 'C#-': 4, 'G#-': 5, 'D#-': 6, 'A#-': 7,\n 'D-': -1, 'G-': -2, 'C-': -3, 'F-': -4, 'Bb-': -5, 'Eb-': -6, 'Ab-': -7\n };\n\n // Remember the fifth.\n this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature \"${this.song.key}\"`);\n\n return {\n _name: 'key',\n _attrs: [{ 'print-object': this.options.keySignature ? 'yes' : 'no' }],\n _content: [{\n 'fifths': this.fifths\n }, {\n 'mode': this.song.key.slice(-1) === '-' ? 'minor' : 'major'\n }]\n };\n }\n\n convertStyleAndGroove(style, groove) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n 'words': style\n }]\n }, {\n 'sound': [{\n 'play': [{\n _name: 'other-play',\n _attrs: { 'type': 'groove' },\n _content: groove || style\n }]\n }]\n }]\n };\n }\n\n _log(logLevel, message, measure = this.measure) {\n if (logLevel < this.options.logLevel) return;\n const log = `[ireal-musicxml] [${this.song.title}${measure ? '#' + measure.number() : ''}] ${message}`;\n let method = 'warn';\n switch (logLevel) {\n case LogLevel.Debug: method = 'debug'; break;\n case LogLevel.Info: method = 'info'; break;\n case LogLevel.Warn: method = 'warn'; break;\n case LogLevel.Error: method = 'error'; break;\n }\n console[method](log);\n }\n\n _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) {\n if (!key) return defaultValue;\n if (!(key in map)) {\n if (message) {\n this._log(logLevel, message, measure);\n }\n return defaultValue || null;\n }\n return map[key];\n }\n\n static _mmToTenths(mm, decimals = 2) {\n const value = mm * SCALING_TENTHS / SCALING_MM;\n const power = Math.pow(10, decimals);\n return Math.round(value * power) / power;\n }\n}\n", "{\n \"name\": \"ireal-musicxml\",\n \"version\": \"2.0.0\",\n \"description\": \"iReal Pro to MusicXML converter.\",\n \"author\": \"Karim Ratib (https://github.com/infojunkie)\",\n \"license\": \"GPL-3.0-only\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/infojunkie/ireal-musicxml\"\n },\n \"homepage\": \"https://github.com/infojunkie/ireal-musicxml\",\n \"type\": \"module\",\n \"types\": \"./src/types/ireal-musicxml.d.ts\",\n \"files\": [\n \"LICENSE.txt\",\n \"build/*\",\n \"src/*\"\n ],\n \"bin\": {\n \"ireal-musicxml\": \"./src/cli/cli.js\"\n },\n \"exports\": {\n \"import\": \"./build/ireal-musicxml.js\",\n \"require\": \"./build/ireal-musicxml.cjs\"\n },\n \"scripts\": {\n \"build\": \"npm run build:esm && npm run build:cjs\",\n \"build:esm\": \"esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js\",\n \"build:cjs\": \"esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs\",\n \"test\": \"npm run test:lint && npm run test:spec && npm run test:ts\",\n \"test:spec\": \"node --test\",\n \"test:ts\": \"npm run build && node --test --loader=ts-node/esm --require ts-node/register test/**/*.spec.ts\",\n \"test:lint\": \"eslint src --fix\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.7.7\",\n \"@xmldom/xmldom\": \"^0.8.0\",\n \"esbuild\": \"0.24.0\",\n \"eslint\": \"^9.13.0\",\n \"resolve\": \"^1.22.8\",\n \"sanitize-filename\": \"^1.6.3\",\n \"ts-node\": \"^10.9.2\",\n \"typescript\": \"^4.9.5\",\n \"validate-with-xmllint\": \"^1.2.0\",\n \"xpath.js\": \"^1.1.0\"\n },\n \"dependencies\": {\n \"chord-symbol\": \"^3.0.0\",\n \"fast-diff\": \"^1.2.0\",\n \"jstoxml\": \"^2.0.6\",\n \"promise\": \"^8.1.0\"\n }\n}\n", "import pkg from '../../package.json' with { type: 'json' };\n\nexport class Version {\n static name = pkg.name;\n static version = pkg.version;\n static author = pkg.author;\n static description = pkg.description;\n}"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAYA,WAAO,UAAU;AACjB,aAAS,QAAQ,MAAM;AACnB,UAAI,CAAC,MAAM,QAAQ;AACf,qBAAa;AACb,m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MAAM,OAAO;AAAA,EACjD,CAAC;AACD,SAAO;AACT;AAEA,eAAsB,QAAQ,OAAO,UAAU,CAAC,GAAG;AACjD,SAAO,IAAI,eAAAC,QAAQ,aAAW,QAAQ,YAAY,OAAO,OAAO,CAAC,CAAC;AACpE;", + "names": ["Promise", "self", "resolve", "reject", "Promise", "self", "Promise", "Promise", "i", "val", "Promise", "Promise", "longtext", "shorttext", "diff", "global", "obj", "getIndentStr", "getType", "filterStr", "getAttributeKeyVals", "formatAttributes", "objToArray", "isPrimitive", "isSimpleType", "isSimpleXML", "getHeaderString", "toXML", "__webpack_require__", "module", "Map", "Promise", "Symbol", "Uint8Array", "key", "object", "exports", "Buffer", "othValue", "convert", "chain", "allFunctions", "input", "reduce", "value", "fn", "checkCustomFilters", "customFilters", "Array", "isArray", "TypeError", "some", "filter", "notes", "AFlat", "A", "ASharp", "BFlat", "B", "C", "CSharp", "DFlat", "D", "DSharp", "EFlat", "E", "F", "FSharp", "GFlat", "G", "GSharp", "english", "Ab", "Bb", "Cb", "Db", "Eb", "Fb", "Gb", "latin", "Lab", "La", "Sib", "Si", "Dob", "Do", "Reb", "R\u00E9b", "Re", "R\u00E9", "Mib", "Mi", "Fab", "Fa", "Solb", "Sol", "german", "As", "Ais", "Hes", "H", "His", "Ces", "Cis", "Des", "Dis", "Es", "Eis", "Fes", "Fis", "Ges", "Gis", "getAccidentalsVariation", "source", "variant", "Object", "keys", "acc", "curr", "match", "replace", "englishVariantsToNotes", "latinVariantsToNotes", "germanVariantsToNotes", "allVariantsToNotes", "allVariants", "sort", "a", "b", "length", "englishVariants", "latinVariants", "germanVariants", "allVariantsPerGroup", "name", "InvalidInputError", "Error", "UnexpectedError", "message", "ChordSymbolError", "chord", "errorName", "NoSymbolFoundError", "symbol", "InvalidModifierError", "invalidChars", "descriptor", "InvalidIntervalsError", "forbiddenCombo", "join", "hasExactly", "allIntervals", "search", "arraySearch", "_isArray", "_isEqual", "hasOneOf", "has", "hasAll", "hasNoneOf", "require", "lookupMethod", "interval", "includes", "allForbiddenCombos", "checkIntervalsConsistency", "intervals", "normalized", "find", "combo", "formatSymbol", "formatted", "rootNote", "bassNote", "chordChanges", "qualities", "ma", "ma6", "ma7", "dom7", "mi", "mi6", "mi7", "miMa7", "aug", "dim", "dim7", "power", "bass", "majorQualities", "minorQualities", "qualityToDescriptor", "getHighestExtension", "intents", "alt", "chordChangesDescriptors", "add", "add7", "omit", "sus", "formatSymbolParts", "getDescriptor", "getChordChanges", "quality", "isSuspended", "extensions", "highestExtension", "major", "alterations", "formattedOmits", "formatOmits", "omits", "isAltered", "formattedAdds", "formatAdds", "adds", "map", "index", "omitted", "getParsableDescriptor", "allFilters", "toLowerCaseExceptMajorM", "removeSpaces", "addDisambiguators", "addMissingVerbs", "parsableDescriptor", "toLowerCase", "allTokensWithVerbs", "currentVerb", "hasVerb", "parenthesis", "split", "forEach", "token", "startsWith", "push", "initChord", "parserConfiguration", "_cloneDeep", "notesSharp", "notesFlat", "rootNoteToScaleAccidentals", "maj", "min", "nameIndividualChordNotes", "semitones", "minMaj", "refNotes", "rootNoteIndex", "indexOf", "indexedNotes", "slice", "chordNotes", "i", "normalizeNotes", "normalizeDescriptor", "chordIntervals", "_clone", "isPowerChord", "isBass", "getOmits", "getIsSuspended", "getChordQuality", "qualityIntervals", "getExtensions", "baseIntervals", "getAddsAndAlterations", "hasMajorIntent", "intervalsForQualityDetection", "getIntervalsForQualityDetection", "intervalsToQualities", "_find", "o", "undoOmit3", "bind", "undoSuspension", "undoAlt5", "_uniq", "with3rd", "unSuspended", "_without", "isAlt", "unaltered", "canBeExtended", "isMinorExtended13th", "isMajorExtended13th", "isExtended11th", "isExtended9th", "canHave11th", "isAlteration", "hasAdd3", "sortIntervals", "qualityAlterations", "sortableA", "Number", "parseInt", "sortableB", "parseBase", "noteVariants", "notesRegex", "notesAndDescriptorRegex", "RegExp", "result", "allModifiers", "halfDim", "seventh", "sus2", "ninth", "eleventh", "thirteenth", "fifthFlat", "fifthSharp", "ninthFlat", "ninthSharp", "eleventhSharp", "thirteenthFlat", "add3", "add4", "addb6", "add6", "add69", "add9", "add11", "add13", "omit3", "omit5", "\u0394", "M", "Ma", "Maj", "Major", "major7th", "getDerivedModifiers", "allSymbols", "m", "Min", "Minor", "minor", "diminished", "\u00D8", "\u00F8", "h", "augmented", "sus4", "suspended", "suspended4", "suspended2", "b3", "b5", "b9", "addb9", "b13", "addb13", "add2", "b6", "no3", "no5", "altered", "modifierId", "derivedFn", "bb7", "b7", "parseDescriptor", "altIntervals", "getModifiers", "modifiers", "getIntervals", "getSemitones", "getIntents", "descriptorRegex", "escapeRegex", "descriptorMatches", "remainingChars", "allModifiersId", "trim", "getThird", "getFourth", "getFifths", "getSixth", "getSevenths", "getNinths", "getElevenths", "getThirteenths", "intervalsToSemitones", "third", "fourth", "fifths", "shouldAlter", "sixth", "isExtended", "sevenths", "getMinorOrMajorSeventh", "elevenths", "thirteenths", "string", "chordParserFactory", "allAltIntervals", "allNotationSystems", "notationSystems", "checkAltIntervals", "checkNotationSystems", "parseChord", "allErrors", "isInputValid", "e", "formatError", "allVariantsPerGroupCopy", "variantsGroup", "variants", "shift", "notationSystem", "getUnexpectedError", "error", "checkArray", "arrayName", "arrayToTest", "allowedValues", "allowEmpty", "system", "exceptionError", "type", "shortDescriptors", "aug7", "shortenNormalized", "isSus2", "isAdd2", "isAug7", "isEleventh", "change", "simplify", "level", "intervalsToRemove", "max", "core", "_difference", "sharpsToFlats", "flatsToSharps", "_invert", "transpose", "transposeValue", "useFlats", "rootSharp", "convertToSharp", "transposeNote", "bassSharp", "note", "noteIndex", "transposedIndex", "octaves", "Math", "floor", "correctedTransposedIndex", "transposed", "translationTables", "convertNotationSystem", "finalNotationSystem", "textPrinter", "rawPrinter", "cloned", "textPrinted", "reParsed", "chordRendererFactory", "useShortNamings", "harmonizeAccidentals", "printer", "simplifyFilter", "renderChord", "isValidChord", "filteredChord", "parts", "diff", "ChordSymbol", "jstoxml", "measures", "beats", "chord", "Promise"] } diff --git a/package-lock.json b/package-lock.json index 71b0bbd..0e3a976 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,16 +18,31 @@ "ireal-musicxml": "src/cli/cli.js" }, "devDependencies": { + "@types/node": "^22.7.7", "@xmldom/xmldom": "^0.8.0", "esbuild": "0.24.0", "eslint": "^9.13.0", "resolve": "^1.22.8", "sanitize-filename": "^1.6.3", - "typescript": "^4.3.2", + "ts-node": "^10.9.2", + "typescript": "^4.9.5", "validate-with-xmllint": "^1.2.0", "xpath.js": "^1.1.0" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", @@ -609,6 +624,62 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -623,6 +694,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "22.7.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.7.tgz", + "integrity": "sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, "node_modules/@xmldom/xmldom": { "version": "0.8.10", "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", @@ -656,6 +737,19 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -689,6 +783,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -783,6 +884,13 @@ "dev": true, "license": "MIT" }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -823,6 +931,16 @@ "dev": true, "license": "MIT" }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/esbuild": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", @@ -1344,6 +1462,13 @@ "dev": true, "license": "MIT" }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1607,6 +1732,50 @@ "utf8-byte-length": "^1.0.1" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -1634,6 +1803,13 @@ "node": ">=4.2.0" } }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -1651,6 +1827,13 @@ "dev": true, "license": "(WTFPL OR MIT)" }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, "node_modules/validate-with-xmllint": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/validate-with-xmllint/-/validate-with-xmllint-1.2.1.tgz", @@ -1695,6 +1878,16 @@ "node": ">=0.4.0" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 0e3749e..ea6c70e 100644 --- a/package.json +++ b/package.json @@ -10,30 +10,37 @@ }, "homepage": "https://github.com/infojunkie/ireal-musicxml", "type": "module", - "main": "build/ireal-musicxml.js", - "types": "build/ireal-musicxml.d.ts", + "types": "./src/types/ireal-musicxml.d.ts", "files": [ "LICENSE.txt", "build/*", "src/*" ], "bin": { - "ireal-musicxml": "src/cli/cli.js" + "ireal-musicxml": "./src/cli/cli.js" + }, + "exports": { + "import": "./build/ireal-musicxml.js", + "require": "./build/ireal-musicxml.cjs" }, "scripts": { - "build": "esbuild src/lib/index.js --bundle --minify --sourcemap --outfile=build/ireal-musicxml.js && cp src/types/* build/", - "test": "npm run test:lint && npm run test:spec", - "test:spec": "node --test", - "test:typescript": "npm run build && ts-mocha test/**/*.spec.ts", + "build": "npm run build:esm && npm run build:cjs", + "build:esm": "esbuild src/lib/index.js --bundle --format=esm --sourcemap --outfile=build/ireal-musicxml.js", + "build:cjs": "esbuild src/lib/index.js --bundle --platform=node --packages=external --outfile=build/ireal-musicxml.cjs", + "test": "npm run test:lint && npm run test:spec && npm run test:ts", + "test:spec": "node --test --test-name-pattern=\"${TEST:-.*}\"", + "test:ts": "npm run build && node --test --loader=ts-node/esm --require ts-node/register test/**/*.spec.ts", "test:lint": "eslint src --fix" }, "devDependencies": { + "@types/node": "^22.7.7", "@xmldom/xmldom": "^0.8.0", "esbuild": "0.24.0", "eslint": "^9.13.0", "resolve": "^1.22.8", "sanitize-filename": "^1.6.3", - "typescript": "^4.3.2", + "ts-node": "^10.9.2", + "typescript": "^4.9.5", "validate-with-xmllint": "^1.2.0", "xpath.js": "^1.1.0" }, diff --git a/src/cli/cli.js b/src/cli/cli.js index 4d3ab20..c67e763 100755 --- a/src/cli/cli.js +++ b/src/cli/cli.js @@ -80,6 +80,7 @@ try { if (songs.length > 0 && songs.every(title => song.title.toUpperCase().indexOf(title) < 0)) continue; try { + console.error(`Generating ${song.title}...`) const musicXml = Converter.convert(song); if ('validate' in args) { @@ -94,11 +95,11 @@ try { } } catch (error) { - console.error(`[ireal-musicxml] [${song.title}] ${error}`); + console.error(`[${song.title}] ${error}`); } } } catch (error) { - console.error(`[ireal-musicxml] [${positionals[0]}] ${error}`); + console.error(`[${positionals[0]}] ${error}`); process.exit(1); } diff --git a/src/node/loader.js b/src/node/loader.js deleted file mode 100644 index 58cb9bb..0000000 --- a/src/node/loader.js +++ /dev/null @@ -1,18 +0,0 @@ -import { createRequire } from 'node:module'; - -export async function resolve(specifier, context, nextResolve) { - return nextResolve(specifier); -} - -export async function load(url, context, nextLoad) { - if (url.includes('chord-symbol')) { - const require = createRequire(import.meta.url); - return { - 'format': 'module', - 'source': '', - 'shortCircuit': true - }; - } - - return nextLoad(url, context); -} diff --git a/test/cli.spec.js b/test/cli.spec.js new file mode 100644 index 0000000..b270b7a --- /dev/null +++ b/test/cli.spec.js @@ -0,0 +1,15 @@ +import assert from 'node:assert'; +import { describe, it } from 'node:test'; +import util from 'util'; +import { createRequire } from 'module'; +const require = createRequire(import.meta.url); +const exec = util.promisify(require('child_process').exec); + +describe('cli', () => { + it('should run successfully', async () => { + const execResult = await exec('node src/cli/cli.js test/data/jazz.txt --songs=Blues'); + const output = execResult.stderr; + console.log(output); + assert.match(output, /Generating 502 Blues/g); + }) +}) diff --git a/test/index.spec.ts b/test/index.spec.ts index ca15d3e..deb21ef 100644 --- a/test/index.spec.ts +++ b/test/index.spec.ts @@ -1,38 +1,45 @@ -import assert from 'node:assert'; +import { strict as assert } from 'assert'; import { describe, it } from 'node:test'; -import * as fs from 'fs'; -import * as iRealMusicXml from '../src/types/ireal-musicxml.js'; +import fs from 'fs'; +import { + Version, + convertSync, + LogLevel, + convert, + Playlist, + Converter +} from '../build/ireal-musicxml.js'; -describe('iRealMusicXml using TypeScript', function() { - it('accesses the library version', function() { - assert.strictEqual(iRealMusicXml.Version.name, 'ireal-musicxml'); +describe('ireal-musicxml using TypeScript', () => { + it('accesses the library version', () => { + assert.strictEqual(Version.name, 'ireal-musicxml'); }); - it('converts an iReal Pro song to MusicXML synchronously', function() { - const result: iRealMusicXml.Playlist = iRealMusicXml.convertSync(fs.readFileSync('test/data/playlist.html', 'utf-8'), { + it('converts an iReal Pro song to MusicXML synchronously', () => { + const result: Playlist = convertSync(fs.readFileSync('test/data/playlist.html', 'utf-8'), { notation: "rhythmic", - logLevel: iRealMusicXml.LogLevel.None + logLevel: LogLevel.None }); - assert.strictEqual(result.name, 'Jazz Combo') + assert.strictEqual(result.name, 'Jazz Combo'); assert.strictEqual(result.songs.length, 6); assert.notStrictEqual(result.songs[0].musicXml, ''); }); - it('converts an iReal Pro song to MusicXML asynchronously', async function() { - const result: iRealMusicXml.Playlist = await iRealMusicXml.convert(fs.readFileSync('test/data/playlist.html', 'utf-8'), { + it('converts an iReal Pro song to MusicXML asynchronously', async () => { + const result: Playlist = await convert(fs.readFileSync('test/data/playlist.html', 'utf-8'), { notation: "slash", - logLevel: iRealMusicXml.LogLevel.Error + logLevel: LogLevel.Error }); - assert.strictEqual(result.name, 'Jazz Combo') + assert.strictEqual(result.name, 'Jazz Combo'); assert.strictEqual(result.songs.length, 6); assert.notStrictEqual(result.songs[0].musicXml, ''); }); - it('parses and exports a playlist manually', function() { - const playlist: iRealMusicXml.Playlist = new iRealMusicXml.Playlist(fs.readFileSync('test/data/playlist.html', 'utf-8')); + it('parses and exports a playlist manually', () => { + const playlist: Playlist = new Playlist(fs.readFileSync('test/data/playlist.html', 'utf-8')); assert.strictEqual(playlist.name, 'Jazz Combo') assert.strictEqual(playlist.songs.length, 6); - const musicXml: string = iRealMusicXml.Converter.convert(playlist.songs[0]); + const musicXml: string = Converter.convert(playlist.songs[0]); assert.notStrictEqual(musicXml, ''); }); }); diff --git a/tsconfig.json b/tsconfig.json index a0224c8..c060ca5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,9 @@ { + "ts-node": { + "esm": true + }, "compilerOptions": { - "module": "umd", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true, - "typeRoots": [ - "./node_modules/@types" - ] - } + "module": "NodeNext", + "moduleResolution": "NodeNext" + }, } \ No newline at end of file