From 3862e933d41cc1ad5903da8b1231c19bf3abc671 Mon Sep 17 00:00:00 2001 From: infojunkie Date: Thu, 14 Nov 2024 22:29:00 -0800 Subject: [PATCH] Fix #54 Messy chord timings --- build/ireal-musicxml.cjs | 6 +- build/ireal-musicxml.cjs.map | 6 +- build/ireal-musicxml.js | 22 +++---- build/ireal-musicxml.js.map | 6 +- package-lock.json | 104 +++++++++++++++++------------- package.json | 2 +- src/lib/converter.js | 71 +++++++++++++------- test/bugs.spec.js | 53 +++++++++++---- test/converter.spec.js | 2 +- test/data/{pop.txt => pop400.txt} | 0 test/parser.spec.js | 2 +- 11 files changed, 173 insertions(+), 101 deletions(-) rename test/data/{pop.txt => pop400.txt} (100%) diff --git a/build/ireal-musicxml.cjs b/build/ireal-musicxml.cjs index 6fb012e..5d75d09 100644 --- a/build/ireal-musicxml.cjs +++ b/build/ireal-musicxml.cjs @@ -1,5 +1,5 @@ -var $=Object.create;var _=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var W=(s,t)=>{for(var e in t)_(s,e,{get:t[e],enumerable:!0})},x=(s,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of A(t))!M.call(s,n)&&n!==e&&_(s,n,{get:()=>t[n],enumerable:!(i=z(t,n))||i.enumerable});return s};var C=(s,t,e)=>(e=s!=null?$(R(s)):{},x(t||!s||!s.__esModule?_(e,"default",{value:s,enumerable:!0}):e,s)),q=s=>x(_({},"__esModule",{value:!0}),s);var L={};W(L,{Cell:()=>g,Chord:()=>p,Converter:()=>v,LogLevel:()=>d,Playlist:()=>f,Song:()=>u,Version:()=>b,convert:()=>G,convertSync:()=>N});module.exports=q(L);var j=C(require("promise"),1);var w=C(require("fast-diff"),1),f=class{constructor(t){let e=/.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(t),n=decodeURIComponent(e[2]).split("===");n.length>1&&(this.name=n.pop()),this.songs=n.map(r=>{try{return new u(r,e[1]==="irealbook")}catch(a){let l=r.split("="),o=u.parseTitle(l[0].trim());return console.error(`[ireal-musicxml] [${o}] ${a}`),null}}).filter(r=>r!==null).reduce((r,a)=>{if(r.length>0){let l=(0,w.default)(r[r.length-1].title,a.title);if(l[0][0]===0&&l.every(o=>o[0]===0||o[1].match(/^\d+$/)))return r[r.length-1].cells=r[r.length-1].cells.concat(a.cells),r}return r.push(a),r},[])}},g=class{constructor(){this.annots=[],this.comments=[],this.bars="",this.spacer=0,this.chord=null}},p=class{constructor(t,e="",i=null,n=null){this.note=t,this.modifiers=e,this.over=i,this.alternate=n}},u=class s{constructor(t,e=!1){if(this.cells=[],this.musicXml="",!t){this.title="",this.composer="",this.style="",this.key="",this.transpose=0,this.groove="",this.bpm=0,this.repeats=0;return}let i=t.split("=");if(e)this.title=s.parseTitle(i[0].trim()),this.composer=s.parseComposer(i[1].trim()),this.style=i[2].trim(),this.key=i[3],this.cells=this.parse(i[5]);else{this.title=s.parseTitle(i[0].trim()),this.composer=s.parseComposer(i[1].trim()),this.style=i[3].trim(),this.key=i[4],this.transpose=+i[5]||0,this.groove=i[7],this.bpm=+i[8],this.repeats=+i[9]||3;let n=i[6].split("1r34LbKcu7");this.cells=this.parse(U(n[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(t){let e=t.trim(),i=[];for(;e;){let l=!1;for(let o=0;o51;)e=s.substring(0,50),s=s.substring(50),t=t+O(e);return t=t+s,t=t.replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," "),t}function O(s){let t=s.split("");for(let e=0;e<5;e++)t[49-e]=s[e],t[e]=s[49-e];for(let e=10;e<24;e++)t[49-e]=s[e],t[e]=s[49-e];return t.join("")}var D=C(require("jstoxml"),1),E=C(require("chord-symbol"),1);var y={name:"ireal-musicxml",version:"2.0.3",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:"./build/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 && npm run build:d.ts","build:d.ts":"cp src/types/* build/","build:esm":"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js","build:cjs":"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs",test:"npm run build && npm run test:lint && npm run test:spec && npm run test:ts","test:spec":'node --test --test-name-pattern="${TEST:-.*}"',"test:ts":"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"}};var b=class{static name=y.name;static version=y.version;static author=y.author;static description=y.description};var{chordParserFactory:I,chordRendererFactory:B}=E.default,d=class{static Debug=0;static Info=1;static Warn=2;static Error=3;static None=4},k="4.0",S=7,T=40,v=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:d.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(t,e={}){let i=Object.assign({},this.defaultOptions,e);return new s(t,i).convert()}constructor(t,e){this.song=t,this.options=e,this.time={beats:4,beatType:4,beatMin:1},this.fifths=null,this.measure=null,this.barRepeat=0,this.codas=[],this.repeats=0,this.shortChord=!1,this.emptyCells=0,this.emptyCellNewSystem=!1,this.cellWidth=(this.options.pageWidth-2*this.options.pageMargin)/16,this.parseChord=I({altIntervals:["b5","b9"]}),this.renderChord=B({useShortNamings:!0,printer:"raw"})}convert(){return D.default.toXML(this.convertSong(),{header:` +var U=Object.create;var _=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var W=(s,t)=>{for(var e in t)_(s,e,{get:t[e],enumerable:!0})},x=(s,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of z(t))!R.call(s,n)&&n!==e&&_(s,n,{get:()=>t[n],enumerable:!(i=$(t,n))||i.enumerable});return s};var C=(s,t,e)=>(e=s!=null?U(A(s)):{},x(t||!s||!s.__esModule?_(e,"default",{value:s,enumerable:!0}):e,s)),q=s=>x(_({},"__esModule",{value:!0}),s);var L={};W(L,{Cell:()=>g,Chord:()=>p,Converter:()=>v,LogLevel:()=>d,Playlist:()=>f,Song:()=>u,Version:()=>b,convert:()=>G,convertSync:()=>N});module.exports=q(L);var j=C(require("promise"),1);var w=C(require("fast-diff"),1),f=class{constructor(t){let e=/.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(t),n=decodeURIComponent(e[2]).split("===");n.length>1&&(this.name=n.pop()),this.songs=n.map(r=>{try{return new u(r,e[1]==="irealbook")}catch(h){let o=r.split("="),a=u.parseTitle(o[0].trim());return console.error(`[ireal-musicxml] [${a}] ${h}`),null}}).filter(r=>r!==null).reduce((r,h)=>{if(r.length>0){let o=(0,w.default)(r[r.length-1].title,h.title);if(o[0][0]===0&&o.every(a=>a[0]===0||a[1].match(/^\d+$/)))return r[r.length-1].cells=r[r.length-1].cells.concat(h.cells),r}return r.push(h),r},[])}},g=class{constructor(){this.annots=[],this.comments=[],this.bars="",this.spacer=0,this.chord=null}},p=class{constructor(t,e="",i=null,n=null){this.note=t,this.modifiers=e,this.over=i,this.alternate=n}},u=class s{constructor(t,e=!1){if(this.cells=[],this.musicXml="",!t){this.title="",this.composer="",this.style="",this.key="",this.transpose=0,this.groove="",this.bpm=0,this.repeats=0;return}let i=t.split("=");if(e)this.title=s.parseTitle(i[0].trim()),this.composer=s.parseComposer(i[1].trim()),this.style=i[2].trim(),this.key=i[3],this.cells=this.parse(i[5]);else{this.title=s.parseTitle(i[0].trim()),this.composer=s.parseComposer(i[1].trim()),this.style=i[3].trim(),this.key=i[4],this.transpose=+i[5]||0,this.groove=i[7],this.bpm=+i[8],this.repeats=+i[9]||3;let n=i[6].split("1r34LbKcu7");this.cells=this.parse(M(n[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(t){let e=t.trim(),i=[];for(;e;){let o=!1;for(let a=0;a51;)e=s.substring(0,50),s=s.substring(50),t=t+O(e);return t=t+s,t=t.replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," "),t}function O(s){let t=s.split("");for(let e=0;e<5;e++)t[49-e]=s[e],t[e]=s[49-e];for(let e=10;e<24;e++)t[49-e]=s[e],t[e]=s[49-e];return t.join("")}var D=C(require("jstoxml"),1),E=C(require("chord-symbol"),1);var y={name:"ireal-musicxml",version:"2.0.4",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:"./build/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 && npm run build:d.ts","build:d.ts":"cp src/types/* build/","build:esm":"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js","build:cjs":"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs",test:"npm run build && npm run test:lint && npm run test:spec && npm run test:ts","test:spec":'node --test --test-name-pattern="${TEST:-.*}"',"test:ts":"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"}};var b=class{static name=y.name;static version=y.version;static author=y.author;static description=y.description};var{chordParserFactory:I,chordRendererFactory:B}=E.default,d=class{static Debug=0;static Info=1;static Warn=2;static Error=3;static None=4},T="4.0",k=7,S=40,v=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:d.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 mapTime={24:{beats:2,beatType:4,beatUnit:1},34:{beats:3,beatType:4,beatUnit:.5},44:{beats:4,beatType:4,beatUnit:1},54:{beats:5,beatType:4,beatUnit:1},64:{beats:6,beatType:4,beatUnit:1},74:{beats:7,beatType:4,beatUnit:1},38:{beats:3,beatType:8,beatUnit:1},58:{beats:5,beatType:8,beatUnit:1},68:{beats:6,beatType:8,beatUnit:1},78:{beats:7,beatType:8,beatUnit:1},98:{beats:9,beatType:8,beatUnit:1},12:{beats:12,beatType:8,beatUnit:3},22:{beats:2,beatType:2,beatUnit:1},32:{beats:3,beatType:2,beatUnit:.5}};static convert(t,e={}){let i=Object.assign({},this.defaultOptions,e);return new s(t,i).convert()}constructor(t,e){this.song=t,this.options=e,this.time={beats:4,beatType:4,beatUnit:1},this.fifths=null,this.measure=null,this.barRepeat=0,this.codas=[],this.repeats=0,this.shortChord=!1,this.emptyCells=0,this.emptyCellNewSystem=!1,this.cellWidth=(this.options.pageWidth-2*this.options.pageMargin)/16,this.parseChord=I({altIntervals:["b5","b9"]}),this.renderChord=B({useShortNamings:!0,printer:"raw"})}convert(){return D.default.toXML(this.convertSong(),{header:` - - `.trim(),indent:" "})}convertSong(){return{_name:"score-partwise",_attrs:{version:k},_content:[{work:{"work-title":this.song.title}},{identification:[{_name:"creator",_attrs:{type:"composer"},_content:this.song.composer},{encoding:[{software:`@infojunkie/ireal-musicxml ${b.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:S,tenths:T},"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(t){return new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().split("T")[0]}static Measure=class{constructor(t){this.body={_name:"measure",_attrs:{number:t},_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(t=>{this.body._content.push({harmony:t.harmony},...t.notes.map(e=>({note:e})))}),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(t,e,i){this.harmony=t,this.notes=e,this.ireal=i,this.spaces=0,this.fermata=!1,this.short=!1}};convertMeasures(){let t=n=>n>0&&n%16===0,e=this.song.cells.reduce((n,r,a)=>{if((r.bars.match(/\(|\{|\[/)||!this.measure&&(r.chord||r.annots.length||r.comments.length))&&(this.measure&&(this._log(d.Warn,"Starting a new measure over existing measure. Closing current measure first."),this.measure.barlines.push(this.convertBarline("","right")),this.adjustChordsDuration(this.measure)&&n.push(this.measure)),this.measure=new s.Measure(n.length+1,this.options),n.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(r.bars,"left",t(a)||this.emptyCellNewSystem?"regular":void 0)),this.barRepeat&&(this.measure.chords=[...n[n.length-this.barRepeat-1].chords])),!this.measure)return(r.chord||r.annots.length||r.comments.length||r.bars&&r.bars!==")")&&this._log(d.Warn,`Found non-empty orphan cell ${JSON.stringify(r)}`,n[n.length-1]),this.emptyCells++,t(a)&&(this.emptyCellNewSystem=!0),n;if((t(a)||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"?n[n.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,r.chord)switch(r.chord.note){case"x":{this.barRepeat=1,this.measure.chords=[...n[n.length-this.barRepeat].chords];break}case"r":{this.barRepeat=2,this.measure.chords=[...n[n.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 l=this.measure;if(l.chords.length||(l=n.slice().reverse().find(o=>o.chords.length),l||this._log(d.Error,`Cannot find any measure with chords prior to ${JSON.stringify(r.chord)}`)),l){let o=l.chords[l.chords.length-1].ireal;o.over=r.chord.over,o.alternate=r.chord.alternate,this.measure.chords.push(this.convertChord(o))}break}case" ":{this._log(d.Warn,`Unhandled empty/alternate chord ${JSON.stringify(r.chord)}`);break}default:this.measure.chords.push(this.convertChord(r.chord)),this.measure.chords[this.measure.chords.length-1].short=this.shortChord}else this.barRepeat||this.measure.chords.length&&this.measure.chords[this.measure.chords.length-1].spaces++;return r.annots.forEach(l=>{switch(l[0]){case"*":{let o=l.slice(1);this.measure.body._content.push(this.convertSection(o));break}case"T":{let o=l.slice(1);this.measure.attributes.push(this.convertTime(o));break}case"S":{this.measure.body._content.push(this.convertSegno());break}case"N":{let o=parseInt(l.slice(1));if(o<1&&(o=n.slice().reverse().find(c=>!!c.barEnding)?.barEnding??1),this.measure.barlines[0]._content.push(this.convertEnding(o,"start")),o>1){n[n.length-1].barlines[1]._content.push(this.convertEnding(o-1,"stop"));let h=n.slice().reverse().find(c=>c.barEnding===o-1);if(!h)this._log(d.Error,`Cannot find ending ${o-1} in right barline of any measure`);else{let c=h.barlines[1]._content.findIndex(m=>!!m&&m._name==="ending");c===-1&&this._log(d.Error,`Cannot find ending ${o-1} in right barline`,h),delete h.barlines[1]._content[c]}}this.measure.barEnding=o;break}case"Q":{this.measure.body._content.push(this.convertToCoda()),this.codas.push(this.measure);break}case"l":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!1),this.shortChord=!1;break}case"s":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!0),this.shortChord=!0;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(d.Warn,`Unhandled annotation "${l}"`)}}),r.comments.map(l=>l.trim()).forEach(l=>{let o=this._map(s.mapRepeats,l);o?this.measure.body._content.push(o.call(this,l)):this.measure.body._content.push(this.convertComment(l))}),r.bars.match(/\)|\}|\]|Z/)&&this.measure.chords.length&&(this.measure.barlines.push(this.convertBarline(r.bars,"right")),this.measure.barEnding&&this.measure.barlines[1]._content.push(this.convertEnding(this.measure.barEnding,"discontinue")),this.adjustChordsDuration(this.measure)&&n.push(this.measure),this.measure=null,this.barRepeat&&this.barRepeat--),n},[]),i=this.song.cells.length%16-this.emptyCells;if(i>0&&e.length>0&&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*i)}]}}}),this.codas.length){let n=this.codas[this.codas.length-1],r=n.body._content.findIndex(a=>a._name==="direction"&&Array.isArray(a._content)&&a._content.some(l=>l._name==="sound"&&Object.keys(l._attrs).includes("tocoda")));r===-1&&this._log(d.Warn,"Cannot find sound direction",n),n.body._content[r]=this.convertCoda()}return e.map(n=>n.assemble())}static reorderSequence(t,e,i){return e.filter(n=>Object.keys(n).length).sort((n,r)=>{let a=Object.keys(n)[0];a==="_name"&&(a=n[a]);let l=Object.keys(r)[0];l==="_name"&&(l=r[l]);let o=i.indexOf(a),h=i.indexOf(l);return o===-1&&this._log(d.Warn,`Unrecognized element "${a}"`,t),h===-1&&this._log(d.Warn,`Unrecognized element "${l}"`,t),o-h})}convertRepeatNx(t){let e=null;(e=t.match(/(\d+)x/))!==null&&(this.repeats=e[1])}convertFine(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{fine:"yes"}}]}}convertDaCapo(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dacapo:"yes"}}]}}convertDalSegno(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dalsegno:"yes"}}]}}convertComment(t){return{_name:"direction",_attrs:{placement:t[0]==="*"?"above":"below"},_content:{"direction-type":{words:t[0]==="*"?t.slice(3):t}}}}convertEnding(t,e){return{_name:"ending",_attrs:{number:t,type:e},_content:`${t}.`}}convertBarline(t,e,i=void 0){let n=e==="left"?"none":"regular",r=null;return t.match(/\[|\]/)?n="light-light":t.match(/Z/)?n="light-heavy":t.match(/\{|\}/)&&(n=e==="left"?"heavy-light":"light-heavy",r=e==="left"?"forward":"backward"),r==="forward"&&(this.repeats=2),{_name:"barline",_attrs:{location:e},_content:[{"bar-style":i??n},{...r&&{_name:"repeat",_attrs:{direction:r,...r==="backward"&&{times:this.repeats}}}}]}}convertSection(t){return t==="i"&&(t="Intro"),{_name:"direction",_attrs:{placement:"above"},_content:{"direction-type":{rehearsal:t}}}}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(t){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{_name:"metronome",_attrs:{parentheses:"no"},_content:[{"beat-unit":this.calculateChordDuration(1)[0].type},{"per-minute":t}]}]},{_name:"sound",_attrs:{tempo:t}}]}}convertTime(t){let e=parseInt(t[0]),i=parseInt(t[1]),n=1;return t==="12"&&(e=12,i=8,n=3),this.time={beats:e,beatType:i,beatMin:n},{time:[{beats:e},{"beat-type":i}]}}adjustChordsDuration(t){if(t.chords.length>this.time.beats)return this._log(d.Error,`Too many chords (${t.chords.length} out of ${this.time.beats})`,t),!0;let e=t.chords.reduce((i,n)=>i+1+n.spaces,0);if(!e)return this._log(d.Warn,"No chord found. Skipping current measure.",t),!1;if(e>this.time.beats){let i=0;for(;e>this.time.beats;)t.chords[i].spaces>0&&(t.chords[i].spaces--,e--),i=(i+1)%t.chords.length}else{let i=0,n=!1;for(;e(i.notes=this.calculateChordDuration(1+i.spaces).map((n,r,a)=>this.convertChordNote(n,r===a.length-1?i.fermata:!1,this.options.notation==="rhythmic"&&a.length>1?r>0?"stop":"start":null)),i)),!0}calculateChordDuration(t){let e={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 i=8/this.time.beatType;return Array(t).fill(this._map(e,i,[],`Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`).map(n=>({duration:n.b*this.options.divisions/2,type:n.t,dots:n.d}))[0])}else{let i=t*8/this.time.beatType;return this._map(e,i,[],`Unexpected beat count ${t} for time signature ${this.time.beats}/${this.time.beatType}`).map(n=>({duration:n.b*this.options.divisions/2,type:n.t,dots:n.d}))}}convertChordNote(t,e=!1,i=null){let n=s.mapFifthsToAlters[this.fifths>=0?"sharp":"flat"].slice(0,Math.abs(this.fifths)),r={_name:"pitch",_content:[{step:this.options.step},{alter:n.includes(this.options.step)?this.fifths>0?1:-1:0},{octave:this.options.octave}]},a=[];return e&&a.push({_name:"fermata"}),i&&a.push({_name:"tied",_attrs:{type:i}}),s.reorderSequence(this.measure,[r,{_name:"cue"},{_name:"notehead",_content:this.options.notehead,_attrs:[{"font-size":this.options.noteheadSize}]},{duration:t.duration},{voice:1},{_name:"type",_attrs:{size:"full"},_content:t.type},{...a.length&&{notations:s.reorderSequence(this.measure,a,s.sequenceNotations)}}].concat(Array(t.dots).fill({_name:"dot"})),s.sequenceNote)}convertChordDegree(t,e,i){return{_name:"degree",_attrs:{"print-object":"no"},_content:[{"degree-value":t},{"degree-alter":i},{"degree-type":e}]}}convertChordSymbol(t){let e=this.renderChord(this.parseChord(`${t.note}${t.modifiers}`));if(!e)return this._log(d.Warn,`Unrecognized chord "${t.note}${t.modifiers}"`),{rootStep:null,rootAlter:null,chordKind:null,chordDegrees:[],chordText:null};let i=e.input.rootNote[0],n=this._map(s.mapAlter,e.input.rootNote[1]||null,null,`Unrecognized accidental in chord "${e.input.rootNote}"`),r=e.formatted.descriptor+e.formatted.chordChanges.join(""),a={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"},l=this._map(a,e.normalized.quality,"",`Unrecognized chord quality "${e.normalized.quality}"`);if(e.normalized.extensions.length){let h=Math.max(...e.normalized.extensions.map(m=>parseInt(m))).toString(),c={9:"-ninth",11:"-11th",13:"-13th"};l=l.split("-")[0]+this._map(c,h,"",`Unhandled extension ${h}`),l==="dominant-11th"&&(e.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(h=>{if((!h.strict||e.normalized.intervals.length===h.intervals.length)&&h.intervals.every((c,m)=>c===e.normalized.intervals[m]))return l=h.kind,h.intervals.forEach(c=>{e.normalized.alterations=e.normalized.alterations.filter(m=>m===c),e.normalized.adds=e.normalized.adds.filter(m=>m===c),e.normalized.omits=e.normalized.omits.filter(m=>m===c)}),e.normalized.intervals.forEach(c=>{h.intervals.includes(c)||e.normalized.adds.push(c)}),!0});let o=[];return e.normalized.isSuspended&&!l.includes("suspended")&&(e.normalized.adds.push("4"),e.normalized.adds.includes("3")||e.normalized.omits.push("3")),e.normalized.alterations.forEach(h=>{let c=h.slice(1);o.push(this.convertChordDegree(c,c==="5"||e.normalized.extensions.includes(c)?"alter":"add",this._map(s.mapAlter,h[0],0,`Unrecognized alter symbol in "${h}"`)))}),e.normalized.adds.forEach(h=>{let c=Object.keys(s.mapAlter).includes(h[0])?h[0]:null,m=c?h.slice(1):h;o.push(this.convertChordDegree(m,"add",this._map(s.mapAlter,c,0,`Unrecognized alter symbol in "${h}"`)))}),e.normalized.omits.forEach(h=>{let c=Object.keys(s.mapAlter).includes(h[0])?h[0]:null,m=c?h.slice(1):h;o.push(this.convertChordDegree(m,"subtract",this._map(s.mapAlter,c,0,`Unrecognized alter symbol in "${h}"`)))}),{rootStep:i,rootAlter:n,chordKind:l,chordDegrees:o,chordText:r}}convertChord(t){let e=null;if(t.note==="n")e=[{root:[{_name:"root-step",_attrs:{text:""},_content:this.options.step}]},{_name:"kind",_attrs:{text:"N.C."},_content:"none"}];else{let{rootStep:i,rootAlter:n,chordKind:r,chordDegrees:a,chordText:l}=this.convertChordSymbol(t),o=t.over?[{"bass-step":t.over.note[0]},{...t.over.note[1]&&{"bass-alter":this._map(s.mapAlter,t.over.note[1],null,`Unrecognized accidental in bass note "${t.over.note}"`)}}]:null;e=[{root:[{"root-step":i},{...n&&{"root-alter":n}}]},{_name:"kind",_attrs:{text:l,"use-symbols":"no"},_content:r},{...o&&{bass:o}}].concat(a)}return t.alternate&&this._log(d.Warn,`Unhandled alternate chord ${JSON.stringify(t.alternate)}`),new s.Chord(e,this.calculateChordDuration(1).map(i=>this.convertChordNote(i)),t)}convertKey(){let t={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(t,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(t,e){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{words:t}]},{sound:[{play:[{_name:"other-play",_attrs:{type:"groove"},_content:e||t}]}]}]}}_log(t,e,i=this.measure){if(t{i.musicXml=v.convert(i,t)}),e}async function G(s,t={}){return new j.default(e=>e(N(s,t)))}0&&(module.exports={Cell,Chord,Converter,LogLevel,Playlist,Song,Version,convert,convertSync}); + + `.trim(),indent:" "})}convertSong(){return{_name:"score-partwise",_attrs:{version:T},_content:[{work:{"work-title":this.song.title}},{identification:[{_name:"creator",_attrs:{type:"composer"},_content:this.song.composer},{encoding:[{software:`@infojunkie/ireal-musicxml ${b.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:k,tenths:S},"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(t){return new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().split("T")[0]}static Measure=class{constructor(t){this.body={_name:"measure",_attrs:{number:t},_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(t=>{this.body._content.push({harmony:t.harmony},...t.notes.map(e=>({note:e})))}),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(t,e,i){this.harmony=t,this.notes=e,this.ireal=i,this.spaces=0,this.fermata=!1,this.short=!1}clone(){let t=new s.Chord(structuredClone(this.harmony),structuredClone(this.notes),structuredClone(this.ireal));return t.spaces=this.spaces,t.fermata=this.fermata,t.short=this.short,t}beats(){return this.short?1:1+this.spaces}};convertMeasures(){let t=n=>n>0&&n%16===0,e=this.song.cells.reduce((n,r,h)=>{if((r.bars.match(/\(|\{|\[/)||!this.measure&&(r.chord||r.annots.length||r.comments.length))&&(this.measure&&(this._log(d.Warn,"Starting a new measure over existing measure. Closing current measure first."),this.measure.barlines.push(this.convertBarline("","right")),this.adjustChordsDuration(this.measure)&&n.push(this.measure)),this.measure=new s.Measure(n.length+1,this.options),n.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(r.bars,"left",t(h)||this.emptyCellNewSystem?"regular":void 0)),this.barRepeat&&(this.measure.chords=n[n.length-this.barRepeat-1].chords.map(o=>o.clone()))),!this.measure)return(r.chord||r.annots.length||r.comments.length||r.bars&&r.bars!==")")&&this._log(d.Warn,`Found non-empty orphan cell ${JSON.stringify(r)}`,n[n.length-1]),this.emptyCells++,t(h)&&(this.emptyCellNewSystem=!0),n;if((t(h)||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"?n[n.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,r.chord)switch(r.chord.note){case"x":{this.barRepeat=1,this.measure.chords=n[n.length-this.barRepeat].chords.map(o=>o.clone());break}case"r":{this.barRepeat=2,this.measure.chords=n[n.length-this.barRepeat].chords.map(o=>o.clone());break}case"p":if(this.measure.chords.length){this.measure.chords[this.measure.chords.length-1].spaces++;break}case"W":{let o=this.measure;if(o.chords.length||(o=n.slice().reverse().find(a=>a.chords.length),o||this._log(d.Error,`Cannot find any measure with chords prior to ${JSON.stringify(r.chord)}`)),o){let a=o.chords[o.chords.length-1].ireal;a.over=r.chord.over,a.alternate=r.chord.alternate,this.measure.chords.push(this.convertChord(a))}break}case" ":{this._log(d.Warn,`Unhandled empty/alternate chord ${JSON.stringify(r.chord)}`);break}default:this.measure.chords.push(this.convertChord(r.chord)),this.measure.chords[this.measure.chords.length-1].short=this.shortChord}else this.barRepeat||this.measure.chords.length&&this.measure.chords[this.measure.chords.length-1].spaces++;return r.annots.forEach(o=>{switch(o[0]){case"*":{let a=o.slice(1);this.measure.body._content.push(this.convertSection(a));break}case"T":{let a=o.slice(1);this.measure.attributes.push(this.convertTime(a));break}case"S":{this.measure.body._content.push(this.convertSegno());break}case"N":{let a=parseInt(o.slice(1));if(a<1&&(a=n.slice().reverse().find(c=>!!c.barEnding)?.barEnding??1),this.measure.barlines[0]._content.push(this.convertEnding(a,"start")),a>1){n[n.length-1].barlines[1]._content.push(this.convertEnding(a-1,"stop"));let l=n.slice().reverse().find(c=>c.barEnding===a-1);if(!l)this._log(d.Error,`Cannot find ending ${a-1} in right barline of any measure`);else{let c=l.barlines[1]._content.findIndex(m=>!!m&&m._name==="ending");c===-1&&this._log(d.Error,`Cannot find ending ${a-1} in right barline`,l),delete l.barlines[1]._content[c]}}this.measure.barEnding=a;break}case"Q":{this.measure.body._content.push(this.convertToCoda()),this.codas.push(this.measure);break}case"l":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!1),this.shortChord=!1;break}case"s":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!0),this.shortChord=!0;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(d.Warn,`Unhandled annotation "${o}"`)}}),r.comments.map(o=>o.trim()).forEach(o=>{let a=this._map(s.mapRepeats,o);a?this.measure.body._content.push(a.call(this,o)):this.measure.body._content.push(this.convertComment(o))}),r.bars.match(/\)|\}|\]|Z/)&&this.measure.chords.length&&(this.measure.barlines.push(this.convertBarline(r.bars,"right")),this.measure.barEnding&&this.measure.barlines[1]._content.push(this.convertEnding(this.measure.barEnding,"discontinue")),this.adjustChordsDuration(this.measure)&&n.push(this.measure),this.measure=null,this.barRepeat&&this.barRepeat--),n},[]),i=this.song.cells.length%16-this.emptyCells;if(i>0&&e.length>0&&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*i)}]}}}),this.codas.length){let n=this.codas[this.codas.length-1],r=n.body._content.findIndex(h=>h._name==="direction"&&Array.isArray(h._content)&&h._content.some(o=>o._name==="sound"&&Object.keys(o._attrs).includes("tocoda")));r===-1&&this._log(d.Warn,"Cannot find sound direction",n),n.body._content[r]=this.convertCoda()}return e.map(n=>n.assemble())}static reorderSequence(t,e,i){return e.filter(n=>Object.keys(n).length).sort((n,r)=>{let h=Object.keys(n)[0];h==="_name"&&(h=n[h]);let o=Object.keys(r)[0];o==="_name"&&(o=r[o]);let a=i.indexOf(h),l=i.indexOf(o);return a===-1&&this._log(d.Warn,`Unrecognized element "${h}"`,t),l===-1&&this._log(d.Warn,`Unrecognized element "${o}"`,t),a-l})}convertRepeatNx(t){let e=null;(e=t.match(/(\d+)x/))!==null&&(this.repeats=e[1])}convertFine(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{fine:"yes"}}]}}convertDaCapo(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dacapo:"yes"}}]}}convertDalSegno(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dalsegno:"yes"}}]}}convertComment(t){return{_name:"direction",_attrs:{placement:t[0]==="*"?"above":"below"},_content:{"direction-type":{words:t[0]==="*"?t.slice(3):t}}}}convertEnding(t,e){return{_name:"ending",_attrs:{number:t,type:e},_content:`${t}.`}}convertBarline(t,e,i=void 0){let n=e==="left"?"none":"regular",r=null;return t.match(/\[|\]/)?n="light-light":t.match(/Z/)?n="light-heavy":t.match(/\{|\}/)&&(n=e==="left"?"heavy-light":"light-heavy",r=e==="left"?"forward":"backward"),r==="forward"&&(this.repeats=2),{_name:"barline",_attrs:{location:e},_content:[{"bar-style":i??n},{...r&&{_name:"repeat",_attrs:{direction:r,...r==="backward"&&{times:this.repeats}}}}]}}convertSection(t){return t==="i"&&(t="Intro"),{_name:"direction",_attrs:{placement:"above"},_content:{"direction-type":{rehearsal:t}}}}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(t){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{_name:"metronome",_attrs:{parentheses:"no"},_content:[{"beat-unit":this.calculateChordDuration(1)[0].type},{"per-minute":t}]}]},{_name:"sound",_attrs:{tempo:t}}]}}convertTime(t){return this.time=this._map(s.mapTime,t,{beats:parseInt(t[0]),beatType:parseInt(t[1]),beatUnit:1},`Unexpected time signature ${t}`),{time:[{beats:this.time.beats},{"beat-type":this.time.beatType}]}}adjustChordsDuration(t){if(t.chords.length>this.time.beats)return this._log(d.Error,`Too many chords (${t.chords.length} out of ${this.time.beats})`,t),!0;let e=t.chords.reduce((i,n)=>i+n.beats()*this.time.beatUnit,0);if(!e)return this._log(d.Warn,"No chord found. Skipping current measure.",t),!1;if(e>this.time.beats){let i=0;for(;e>this.time.beats;)t.chords[i].spaces>0&&(t.chords[i].spaces--,e-=this.time.beatUnit),i=(i+1)%t.chords.length}else{let i=0,n=!1;for(;e(i.notes=this.calculateChordDuration(i.beats()*this.time.beatUnit).map((n,r,h)=>this.convertChordNote(n,r===h.length-1?i.fermata:!1,this.options.notation==="rhythmic"&&h.length>1?r>0?"stop":"start":null)),i)),!0}calculateChordDuration(t){let e={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 i=8/this.time.beatType;return Array(t).fill(this._map(e,i,[],`Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`).map(n=>({duration:n.b*this.options.divisions/2,type:n.t,dots:n.d}))[0])}else{let i=t*8/this.time.beatType;return this._map(e,i,[],`Unexpected beat count ${t} for time signature ${this.time.beats}/${this.time.beatType}`).map(n=>({duration:n.b*this.options.divisions/2,type:n.t,dots:n.d}))}}convertChordNote(t,e=!1,i=null){let n=s.mapFifthsToAlters[this.fifths>=0?"sharp":"flat"].slice(0,Math.abs(this.fifths)),r={_name:"pitch",_content:[{step:this.options.step},{alter:n.includes(this.options.step)?this.fifths>0?1:-1:0},{octave:this.options.octave}]},h=[];return e&&h.push({_name:"fermata"}),i&&h.push({_name:"tied",_attrs:{type:i}}),s.reorderSequence(this.measure,[r,{_name:"cue"},{_name:"notehead",_content:this.options.notehead,_attrs:[{"font-size":this.options.noteheadSize}]},{duration:t.duration},{voice:1},{_name:"type",_attrs:{size:"full"},_content:t.type},{...h.length&&{notations:s.reorderSequence(this.measure,h,s.sequenceNotations)}}].concat(Array(t.dots).fill({_name:"dot"})),s.sequenceNote)}convertChordDegree(t,e,i){return{_name:"degree",_attrs:{"print-object":"no"},_content:[{"degree-value":t},{"degree-alter":i},{"degree-type":e}]}}convertChordSymbol(t){let e=this.renderChord(this.parseChord(`${t.note}${t.modifiers}`));if(!e)return this._log(d.Warn,`Unrecognized chord "${t.note}${t.modifiers}"`),{rootStep:null,rootAlter:null,chordKind:null,chordDegrees:[],chordText:null};let i=e.input.rootNote[0],n=this._map(s.mapAlter,e.input.rootNote[1]||null,null,`Unrecognized accidental in chord "${e.input.rootNote}"`),r=e.formatted.descriptor+e.formatted.chordChanges.join(""),h={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"},o=this._map(h,e.normalized.quality,"",`Unrecognized chord quality "${e.normalized.quality}"`);if(e.normalized.extensions.length){let l=Math.max(...e.normalized.extensions.map(m=>parseInt(m))).toString(),c={9:"-ninth",11:"-11th",13:"-13th"};o=o.split("-")[0]+this._map(c,l,"",`Unhandled extension ${l}`),o==="dominant-11th"&&(e.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(l=>{if((!l.strict||e.normalized.intervals.length===l.intervals.length)&&l.intervals.every((c,m)=>c===e.normalized.intervals[m]))return o=l.kind,l.intervals.forEach(c=>{e.normalized.alterations=e.normalized.alterations.filter(m=>m===c),e.normalized.adds=e.normalized.adds.filter(m=>m===c),e.normalized.omits=e.normalized.omits.filter(m=>m===c)}),e.normalized.intervals.forEach(c=>{l.intervals.includes(c)||e.normalized.adds.push(c)}),!0});let a=[];return e.normalized.isSuspended&&!o.includes("suspended")&&(e.normalized.adds.push("4"),e.normalized.adds.includes("3")||e.normalized.omits.push("3")),e.normalized.alterations.forEach(l=>{let c=l.slice(1);a.push(this.convertChordDegree(c,c==="5"||e.normalized.extensions.includes(c)?"alter":"add",this._map(s.mapAlter,l[0],0,`Unrecognized alter symbol in "${l}"`)))}),e.normalized.adds.forEach(l=>{let c=Object.keys(s.mapAlter).includes(l[0])?l[0]:null,m=c?l.slice(1):l;a.push(this.convertChordDegree(m,"add",this._map(s.mapAlter,c,0,`Unrecognized alter symbol in "${l}"`)))}),e.normalized.omits.forEach(l=>{let c=Object.keys(s.mapAlter).includes(l[0])?l[0]:null,m=c?l.slice(1):l;a.push(this.convertChordDegree(m,"subtract",this._map(s.mapAlter,c,0,`Unrecognized alter symbol in "${l}"`)))}),{rootStep:i,rootAlter:n,chordKind:o,chordDegrees:a,chordText:r}}convertChord(t){let e=null;if(t.note==="n")e=[{root:[{_name:"root-step",_attrs:{text:""},_content:this.options.step}]},{_name:"kind",_attrs:{text:"N.C."},_content:"none"}];else{let{rootStep:i,rootAlter:n,chordKind:r,chordDegrees:h,chordText:o}=this.convertChordSymbol(t),a=t.over?[{"bass-step":t.over.note[0]},{...t.over.note[1]&&{"bass-alter":this._map(s.mapAlter,t.over.note[1],null,`Unrecognized accidental in bass note "${t.over.note}"`)}}]:null;e=[{root:[{"root-step":i},{...n&&{"root-alter":n}}]},{_name:"kind",_attrs:{text:o,"use-symbols":"no"},_content:r},{...a&&{bass:a}}].concat(h)}return t.alternate&&this._log(d.Warn,`Unhandled alternate chord ${JSON.stringify(t.alternate)}`),new s.Chord(e,this.calculateChordDuration(1).map(i=>this.convertChordNote(i)),t)}convertKey(){let t={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(t,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(t,e){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{words:t}]},{sound:[{play:[{_name:"other-play",_attrs:{type:"groove"},_content:e||t}]}]}]}}_log(t,e,i=this.measure){if(t{i.musicXml=v.convert(i,t)}),e}async function G(s,t={}){return new j.default(e=>e(N(s,t)))}0&&(module.exports={Cell,Chord,Converter,LogLevel,Playlist,Song,Version,convert,convertSync}); //# sourceMappingURL=ireal-musicxml.cjs.map diff --git a/build/ireal-musicxml.cjs.map b/build/ireal-musicxml.cjs.map index d0167de..60a64aa 100644 --- a/build/ireal-musicxml.cjs.map +++ b/build/ireal-musicxml.cjs.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/lib/index.js", "../src/lib/parser.js", "../src/lib/converter.js", "../package.json", "../src/lib/version.js"], - "sourcesContent": ["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, beatMin: 1 };\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.shortChord = false; // was 's' annotation encountered?\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 this.short = 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', (isNewSystem(cellIndex) || this.emptyCellNewSystem) ? 'regular' : undefined));\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 this.measure.chords[this.measure.chords.length-1].short = this.shortChord;\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 // Short and long chord settings.\n // These will affect the calculation of chord durations.\n // Set the current chord size setting and remember it for subsequent chords.\n case 'l': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = false;\n }\n this.shortChord = false;\n break;\n }\n case 's': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = true;\n }\n this.shortChord = true;\n break;\n }\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, forced = undefined) {\n let style = location === 'left' ? 'none' : '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': forced ?? 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 let beatMin = 1;\n if (time === '12') {\n beats = 12;\n beatType = 8;\n beatMin = 3;\n }\n this.time = { beats, beatType, beatMin };\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 // => Short chords always remain 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, except for short chords.\n let chordIndex = 0;\n let hasBeatsChangedInACycle = false;\n while (beats < this.time.beats) {\n if (!measure.chords[chordIndex].short) {\n measure.chords[chordIndex].spaces++;\n beats++;\n hasBeatsChangedInACycle = true;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n if (chordIndex === 0 && !hasBeatsChangedInACycle) {\n // We've made a complete cycle and beat count has not changed - break now.\n break;\n }\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.3\",\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\": \"./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 \"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 && npm run build:d.ts\",\n \"build:d.ts\": \"cp src/types/* build/\",\n \"build:esm\": \"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js\",\n \"build:cjs\": \"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs\",\n \"test\": \"npm run build && npm run test:lint && npm run test:spec && npm run test:ts\",\n \"test:spec\": \"node --test --test-name-pattern=\\\"${TEST:-.*}\\\"\",\n \"test:ts\": \"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": "6iBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,UAAAC,EAAA,cAAAC,EAAA,aAAAC,EAAA,aAAAC,EAAA,SAAAC,EAAA,YAAAC,EAAA,YAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAX,GAAA,IAAAY,EAAoB,wBCUpB,IAAAC,EAAiB,0BAEJC,EAAN,KAAe,CACpB,YAAYC,EAAM,CAChB,IAAMC,EAAkB,kCAAkC,KAAKD,CAAK,EAE9DE,EADW,mBAAmBD,EAAgB,CAAC,CAAC,EAC/B,MAAM,KAAK,EAC9BC,EAAM,OAAS,IAAG,KAAK,KAAOA,EAAM,IAAI,GAC5C,KAAK,MAAQA,EACV,IAAIC,GAAQ,CACX,GAAI,CACF,OAAO,IAAIC,EAAKD,EAAMF,EAAgB,CAAC,IAAM,WAAW,CAC1D,OACOI,EAAO,CACZ,IAAMH,EAAQC,EAAK,MAAM,GAAG,EACtBG,EAAQF,EAAK,WAAWF,EAAM,CAAC,EAAE,KAAK,CAAC,EAC7C,eAAQ,MAAM,qBAAqBI,CAAK,KAAKD,CAAK,EAAE,EAC7C,IACT,CACF,CAAC,EACA,OAAOE,GAAQA,IAAS,IAAI,EAC5B,OAAO,CAACC,EAAOD,IAAS,CACvB,GAAIC,EAAM,OAAS,EAAG,CAMpB,IAAMC,KAAQ,EAAAC,SAAKF,EAAMA,EAAM,OAAO,CAAC,EAAE,MAAOD,EAAK,KAAK,EAC1D,GAAIE,EAAM,CAAC,EAAE,CAAC,IAAM,GAAKA,EAAM,MAAME,GAAKA,EAAE,CAAC,IAAM,GAAKA,EAAE,CAAC,EAAE,MAAM,OAAO,CAAC,EACzE,OAAAH,EAAMA,EAAM,OAAO,CAAC,EAAE,MAAQA,EAAMA,EAAM,OAAO,CAAC,EAAE,MAAM,OAAOD,EAAK,KAAK,EACpEC,CA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AAQ6B,CAAK,EAAIA,CACrC,CACF,EFpyCO,SAASC,EAAYC,EAAOC,EAAU,CAAC,EAAG,CAC/C,IAAMC,EAAW,IAAIC,EAASH,CAAK,EACnC,OAAAE,EAAS,MAAM,QAAQE,GAAQ,CAC7BA,EAAK,SAAWC,EAAU,QAAQD,EAAMH,CAAO,CACjD,CAAC,EACMC,CACT,CAEA,eAAsBI,EAAQN,EAAOC,EAAU,CAAC,EAAG,CACjD,OAAO,IAAI,EAAAM,QAAQC,GAAWA,EAAQT,EAAYC,EAAOC,CAAO,CAAC,CAAC,CACpE", - "names": ["lib_exports", "__export", "Cell", "Chord", "Converter", "LogLevel", "Playlist", "Song", "Version", "convert", "convertSync", "__toCommonJS", "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", "forced", "style", "repeat", "bpm", "beats", "beatType", "beatMin", "chordIndex", "hasBeatsChangedInACycle", "duration", "i", "ds", "mapDuration", "fermata", "tie", "altered", "noteType", "notations", "value", "alter", "parsedChord", "rootStep", "rootAlter", "chordText", "mapKind", "chordKind", "extension", "e", "mapExtensionKind", "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": ["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 mapTime = {\n \"24\": { beats: 2, beatType: 4, beatUnit: 1 },\n \"34\": { beats: 3, beatType: 4, beatUnit: 0.5 },\n \"44\": { beats: 4, beatType: 4, beatUnit: 1 },\n \"54\": { beats: 5, beatType: 4, beatUnit: 1 },\n \"64\": { beats: 6, beatType: 4, beatUnit: 1 },\n \"74\": { beats: 7, beatType: 4, beatUnit: 1 },\n \"38\": { beats: 3, beatType: 8, beatUnit: 1 },\n \"58\": { beats: 5, beatType: 8, beatUnit: 1 },\n \"68\": { beats: 6, beatType: 8, beatUnit: 1 },\n \"78\": { beats: 7, beatType: 8, beatUnit: 1 },\n \"98\": { beats: 9, beatType: 8, beatUnit: 1 },\n \"12\": { beats: 12, beatType: 8, beatUnit: 3 },\n \"22\": { beats: 2, beatType: 2, beatUnit: 1 },\n \"32\": { beats: 3, beatType: 2, beatUnit: 0.5 },\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, beatUnit: 1 };\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.shortChord = false; // was 's' annotation encountered?\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 this.short = false;\n }\n\n clone() {\n const chord = new Converter.Chord(\n structuredClone(this.harmony),\n structuredClone(this.notes),\n structuredClone(this.ireal)\n );\n chord.spaces = this.spaces;\n chord.fermata = this.fermata;\n chord.short = this.short;\n return chord;\n }\n\n beats() {\n return this.short ? 1 : 1 + this.spaces;\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', (isNewSystem(cellIndex) || this.emptyCellNewSystem) ? 'regular' : undefined));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n this.measure.chords = measures[measures.length-this.barRepeat-1].chords.map(chord => chord.clone());\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 this.measure.chords = measures[measures.length-this.barRepeat].chords.map(chord => chord.clone());\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 this.measure.chords = measures[measures.length-this.barRepeat].chords.map(chord => chord.clone());\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 this.measure.chords[this.measure.chords.length-1].short = this.shortChord;\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 // Short and long chord settings.\n // These will affect the calculation of chord durations.\n // Set the current chord size setting and remember it for subsequent chords.\n case 'l': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = false;\n }\n this.shortChord = false;\n break;\n }\n case 's': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = true;\n }\n this.shortChord = true;\n break;\n }\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, forced = undefined) {\n let style = location === 'left' ? 'none' : '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': forced ?? 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 this.time = this._map(\n Converter.mapTime, time, {\n beats: parseInt(time[0]), beatType: parseInt(time[1]), beatUnit: 1\n }, `Unexpected time signature ${time}`\n );\n return {\n 'time': [{\n 'beats': this.time.beats\n }, {\n 'beat-type': this.time.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 // => Short chords always remain 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 + chord.beats() * this.time.beatUnit, 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 -= this.time.beatUnit;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords, except for short chords.\n let chordIndex = 0;\n let hasBeatsChangedInACycle = false;\n while (beats < this.time.beats) {\n if (!measure.chords[chordIndex].short) {\n measure.chords[chordIndex].spaces++;\n beats += this.time.beatUnit;\n hasBeatsChangedInACycle = true;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n if (chordIndex === 0 && !hasBeatsChangedInACycle) {\n // We've made a complete cycle and beat count has not changed - break now.\n this._log(LogLevel.Warn, `Cannot add more beats to the current measure.`, measure);\n break;\n }\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(chord.beats() * this.time.beatUnit).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.4\",\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\": \"./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 \"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 && npm run build:d.ts\",\n \"build:d.ts\": \"cp src/types/* build/\",\n \"build:esm\": \"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js\",\n \"build:cjs\": \"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs\",\n \"test\": \"npm run build && npm run test:lint && npm run test:spec && npm run test:ts\",\n \"test:spec\": \"node --test --test-name-pattern=\\\"${TEST:-.*}\\\"\",\n \"test:ts\": \"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": "6iBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,UAAAC,EAAA,cAAAC,EAAA,aAAAC,EAAA,aAAAC,EAAA,SAAAC,EAAA,YAAAC,EAAA,YAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAX,GAAA,IAAAY,EAAoB,wBCUpB,IAAAC,EAAiB,0BAEJC,EAAN,KAAe,CACpB,YAAYC,EAAM,CAChB,IAAMC,EAAkB,kCAAkC,KAAKD,CAAK,EAE9DE,EADW,mBAAmBD,EAAgB,CAAC,CAAC,EAC/B,MAAM,KAAK,EAC9BC,EAAM,OAAS,IAAG,KAAK,KAAOA,EAAM,IAAI,GAC5C,KAAK,MAAQA,EACV,IAAIC,GAAQ,CACX,GAAI,CACF,OAAO,IAAIC,EAAKD,EAAMF,EAAgB,CAAC,IAAM,WAAW,CAC1D,OACOI,EAAO,CACZ,IAAMH,EAAQC,EAAK,MAAM,GAAG,EACtBG,EAAQF,EAAK,WAAWF,EAAM,CAAC,EAAE,KAAK,CAAC,EAC7C,eAAQ,MAAM,qBAAqBI,CAAK,KAAKD,CAAK,EAAE,EAC7C,IACT,CACF,CAAC,EACA,OAAOE,GAAQA,IAAS,IAAI,EAC5B,OAAO,CAACC,EAAOD,IAA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M,EAAED,CAAG,CACrB,CAEA,KAAKE,EAAKC,EAAKC,EAAcL,EAASD,EAAWvF,EAAS,KAAMqC,EAAU,KAAK,QAAS,CACtF,OAAKuD,EACCA,KAAOD,EAMNA,EAAIC,CAAG,GALRJ,GACF,KAAK,KAAKD,EAAUC,EAASnD,CAAO,EAE/BwD,GAAgB,MALRA,CAQnB,CAEA,OAAO,YAAYC,EAAIC,EAAW,EAAG,CACnC,IAAM5B,EAAQ2B,EAAK3F,EAAiBD,EAC9B8F,EAAQ,KAAK,IAAI,GAAID,CAAQ,EACnC,OAAO,KAAK,MAAM5B,EAAQ6B,CAAK,EAAIA,CACrC,CACF,EF/zCO,SAASC,EAAYC,EAAOC,EAAU,CAAC,EAAG,CAC/C,IAAMC,EAAW,IAAIC,EAASH,CAAK,EACnC,OAAAE,EAAS,MAAM,QAAQE,GAAQ,CAC7BA,EAAK,SAAWC,EAAU,QAAQD,EAAMH,CAAO,CACjD,CAAC,EACMC,CACT,CAEA,eAAsBI,EAAQN,EAAOC,EAAU,CAAC,EAAG,CACjD,OAAO,IAAI,EAAAM,QAAQC,GAAWA,EAAQT,EAAYC,EAAOC,CAAO,CAAC,CAAC,CACpE", + "names": ["lib_exports", "__export", "Cell", "Chord", "Converter", "LogLevel", "Playlist", "Song", "Version", "convert", "convertSync", "__toCommonJS", "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", "forced", "style", "repeat", "bpm", "beats", "chordIndex", "hasBeatsChangedInACycle", "duration", "i", "ds", "mapDuration", "fermata", "tie", "altered", "noteType", "notations", "value", "alter", "parsedChord", "rootStep", "rootAlter", "chordText", "mapKind", "chordKind", "extension", "e", "mapExtensionKind", "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"] } diff --git a/build/ireal-musicxml.js b/build/ireal-musicxml.js index b5001ab..f1c3b75 100644 --- a/build/ireal-musicxml.js +++ b/build/ireal-musicxml.js @@ -1,14 +1,14 @@ -var bs=Object.create;var zr=Object.defineProperty;var ys=Object.getOwnPropertyDescriptor;var xs=Object.getOwnPropertyNames;var Ss=Object.getPrototypeOf,As=Object.prototype.hasOwnProperty;var vt=(i,p)=>()=>(p||i((p={exports:{}}).exports,p),p.exports);var Os=(i,p,u,g)=>{if(p&&typeof p=="object"||typeof p=="function")for(let e of xs(p))!As.call(i,e)&&e!==u&&zr(i,e,{get:()=>p[e],enumerable:!(g=ys(p,e))||g.enumerable});return i};var Ie=(i,p,u)=>(u=i!=null?bs(Ss(i)):{},Os(p||!i||!i.__esModule?zr(u,"default",{value:i,enumerable:!0}):u,i));var ar=vt((si,Hr)=>{"use strict";Hr.exports=nr;function nr(i){_t.length||(De(),Br=!0),_t[_t.length]=i}var _t=[],Br=!1,De,Rt=0,Ts=1024;function Lr(){for(;Rt<_t.length;){var i=Rt;if(Rt=Rt+1,_t[i].call(),Rt>Ts){for(var p=0,u=_t.length-Rt;p{"use strict";var js=ar();function Ne(){}var ce=null,fe={};function Cs(i){try{return i.then}catch(p){return ce=p,fe}}function Es(i,p){try{return i(p)}catch(u){return ce=u,fe}}function Fs(i,p,u){try{i(p,u)}catch(g){return ce=g,fe}}Xr.exports=bt;function bt(i){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof i!="function")throw new TypeError("Promise constructor's argument is not a function");this._x=0,this._y=0,this._z=null,this._A=null,i!==Ne&&Wr(i,this)}bt._B=null;bt._C=null;bt._D=Ne;bt.prototype.then=function(i,p){if(this.constructor!==bt)return Is(this,i,p);var u=new bt(Ne);return Pe(this,new Kr(i,p,u)),u};function Is(i,p,u){return new i.constructor(function(g,e){var s=new bt(Ne);s.then(g,e),Pe(i,new Kr(p,u,s))})}function Pe(i,p){for(;i._y===3;)i=i._z;if(bt._B&&bt._B(i),i._y===0){if(i._x===0){i._x=1,i._A=p;return}if(i._x===1){i._x=2,i._A=[i._A,p];return}i._A.push(p);return}Ds(i,p)}function Ds(i,p){js(function(){var u=i._y===1?p.onFulfilled:p.onRejected;if(u===null){i._y===1?sr(p.promise,i._z):le(p.promise,i._z);return}var g=Es(u,i._z);g===fe?le(p.promise,ce):sr(p.promise,g)})}function sr(i,p){if(p===i)return le(i,new TypeError("A promise cannot be resolved with itself."));if(p&&(typeof p=="object"||typeof p=="function")){var u=Cs(p);if(u===fe)return le(i,ce);if(u===i.then&&p instanceof bt){i._y=3,i._z=p,ir(i);return}else if(typeof u=="function"){Wr(u.bind(p),i);return}}i._y=1,i._z=p,ir(i)}function le(i,p){i._y=2,i._z=p,bt._C&&bt._C(i,p),ir(i)}function ir(i){if(i._x===1&&(Pe(i,i._A),i._A=null),i._x===2){for(var p=0;p{"use strict";var Vr=kt();Yr.exports=Vr;Vr.prototype.done=function(i,p){var u=arguments.length?this.then.apply(this,arguments):this;u.then(null,function(g){setTimeout(function(){throw g},0)})}});var Jr=vt((ui,Qr)=>{"use strict";var Re=kt();Qr.exports=Re;Re.prototype.finally=function(i){return this.then(function(p){return Re.resolve(i()).then(function(){return p})},function(p){return Re.resolve(i()).then(function(){throw p})})}});var en=vt((li,tn)=>{"use strict";var k=kt();tn.exports=k;var Ps=qt(!0),Ns=qt(!1),Rs=qt(null),_s=qt(void 0),Ms=qt(0),zs=qt("");function qt(i){var p=new k(k._D);return p._y=1,p._z=i,p}k.resolve=function(i){if(i instanceof k)return i;if(i===null)return Rs;if(i===void 0)return _s;if(i===!0)return Ps;if(i===!1)return Ns;if(i===0)return Ms;if(i==="")return zs;if(typeof i=="object"||typeof i=="function")try{var p=i.then;if(typeof p=="function")return new k(p.bind(i))}catch(u){return new k(function(g,e){e(u)})}return qt(i)};var pe=function(i){return typeof Array.from=="function"?(pe=Array.from,Array.from(i)):(pe=function(p){return Array.prototype.slice.call(p)},Array.prototype.slice.call(i))};k.all=function(i){var p=pe(i);return new k(function(u,g){if(p.length===0)return u([]);var e=p.length;function s(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 s(a,n._z);n._y===2&&g(n._z),n.then(function(h){s(a,h)},g);return}else{var o=n.then;if(typeof o=="function"){var c=new k(o.bind(n));c.then(function(h){s(a,h)},g);return}}p[a]=n,--e===0&&u(p)}for(var t=0;t{"use strict";var rn=ar(),_e=[],ur=[],Gs=rn.makeRequestCallFromTimer(Bs);function Bs(){if(ur.length)throw ur.shift()}an.exports=lr;function lr(i){var p;_e.length?p=_e.pop():p=new nn,p.task=i,rn(p)}function nn(){this.task=null}nn.prototype.call=function(){try{this.task.call()}catch(i){lr.onerror?lr.onerror(i):(ur.push(i),Gs())}finally{this.task=null,_e[_e.length]=this}}});var ln=vt((fi,un)=>{"use strict";var te=kt(),cr=sn();un.exports=te;te.denodeify=function(i,p){return typeof p=="number"&&p!==1/0?$s(i,p):Us(i)};var on="function (err, res) {if (err) { rj(err); } else { rs(res); }}";function $s(i,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(s,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,i)}te.nodeify=function(i){return function(){var p=Array.prototype.slice.call(arguments),u=typeof p[p.length-1]=="function"?p.pop():null,g=this;try{return i.apply(this,arguments).nodeify(u,g)}catch(e){if(u===null||typeof u>"u")return new te(function(s,t){t(e)});cr(function(){u.call(g,e)})}}};te.prototype.nodeify=function(i,p){if(typeof i!="function")return this;this.then(function(u){cr(function(){i.call(p,null,u)})},function(u){cr(function(){i.call(p,u)})})}});var fn=vt((pi,cn)=>{"use strict";var pt=kt();cn.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((hi,pn)=>{"use strict";pn.exports=kt();Zr();Jr();en();ln();fn()});var mn=vt((di,dn)=>{"use strict";dn.exports=hn()});var jn=vt((mi,wn)=>{var yt=-1,ht=1,st=0;function Se(i,p,u,g,e){if(i===p)return i?[[st,i]]:[];if(u!=null){var s=Js(i,p,u);if(s)return s}var t=pr(i,p),a=i.substring(0,t);i=i.substring(t),p=p.substring(t),t=Me(i,p);var n=i.substring(i.length-t);i=i.substring(0,i.length-t),p=p.substring(0,p.length-t);var o=Hs(i,p);return a&&o.unshift([st,a]),n&&o.push([st,n]),hr(o,e),g&&Xs(o),o}function Hs(i,p){var u;if(!i)return[[ht,p]];if(!p)return[[yt,i]];var g=i.length>p.length?i:p,e=i.length>p.length?p:i,s=g.indexOf(e);if(s!==-1)return u=[[ht,g.substring(0,s)],[st,e],[ht,g.substring(s+e.length)]],i.length>p.length&&(u[0][0]=u[2][0]=yt),u;if(e.length===1)return[[yt,i],[ht,p]];var t=Ws(i,p);if(t){var a=t[0],n=t[1],o=t[2],c=t[3],h=t[4],l=Se(a,o),m=Se(n,c);return l.concat([[st,h]],m)}return Ks(i,p)}function Ks(i,p){for(var u=i.length,g=p.length,e=Math.ceil((u+g)/2),s=e,t=2*e,a=new Array(t),n=new Array(t),o=0;ou)m+=2;else if(E>g)l+=2;else if(h){var _=s+c-S;if(_>=0&&_=F)return gn(i,p,j,E)}}}for(var I=-y+v;I<=y-x;I+=2){var _=s+I,F;I===-y||I!==y&&n[_-1]u)x+=2;else if(z>g)v+=2;else if(!h){var A=s+c-I;if(A>=0&&A=F)return gn(i,p,j,E)}}}}return[[yt,i],[ht,p]]}function gn(i,p,u,g){var e=i.substring(0,u),s=p.substring(0,g),t=i.substring(u),a=p.substring(g),n=Se(e,s),o=Se(t,a);return n.concat(o)}function pr(i,p){if(!i||!p||i.charAt(0)!==p.charAt(0))return 0;for(var u=0,g=Math.min(i.length,p.length),e=g,s=0;ug?i=i.substring(u-g):up.length?i:p,g=i.length>p.length?p:i;if(u.length<4||g.length*2=m.length?[j,E,_,F,A]:null}var s=e(u,g,Math.ceil(u.length/4)),t=e(u,g,Math.ceil(u.length/2)),a;if(!s&&!t)return null;t?s?a=s[4].length>t[4].length?s:t:a=t:a=s;var n,o,c,h;i.length>p.length?(n=a[0],o=a[1],c=a[2],h=a[3]):(c=a[0],h=a[1],n=a[2],o=a[3]);var l=a[4];return[n,o,c,h,l]}function Xs(i){for(var p=!1,u=[],g=0,e=null,s=0,t=0,a=0,n=0,o=0;s0?u[g-1]:-1,t=0,a=0,n=0,o=0,e=null,p=!0)),s++;for(p&&hr(i),Zs(i),s=1;s=m?(l>=c.length/2||l>=h.length/2)&&(i.splice(s,0,[st,h.substring(0,l)]),i[s-1][1]=c.substring(0,c.length-l),i[s+1][1]=h.substring(l),s++):(m>=c.length/2||m>=h.length/2)&&(i.splice(s,0,[st,c.substring(0,m)]),i[s-1][0]=ht,i[s-1][1]=h.substring(0,h.length-m),i[s+1][0]=yt,i[s+1][1]=c.substring(m),s++),s++}s++}}var bn=/[^a-zA-Z0-9]/,yn=/\s/,xn=/[\r\n]/,Vs=/\n\r?\n$/,Ys=/^\r?\n\r?\n/;function Zs(i){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(Vs),z=F&&v.match(Ys);return I||z?5:_||F?4:S&&!j&&E?3:j||E?2:S||A?1:0}for(var u=1;u=h&&(h=l,n=g,o=e,c=s)}i[u-1][1]!=n&&(n?i[u-1][1]=n:(i.splice(u-1,1),u--),i[u][1]=o,c?i[u+1][1]=c:(i.splice(u+1,1),u--))}u++}}function hr(i,p){i.push([st,""]);for(var u=0,g=0,e=0,s="",t="",a;u=0&&Tn(i[n][1])){var o=i[n][1].slice(-1);if(i[n][1]=i[n][1].slice(0,-1),s=o+s,t=o+t,!i[n][1]){i.splice(n,1),u--;var c=n-1;i[c]&&i[c][0]===ht&&(e++,t=i[c][1]+t,c--),i[c]&&i[c][0]===yt&&(g++,s=i[c][1]+s,c--),n=c}}if(On(i[u][1])){var o=i[u][1].charAt(0);i[u][1]=i[u][1].slice(1),s+=o,t+=o}}if(u0||t.length>0){s.length>0&&t.length>0&&(a=pr(t,s),a!==0&&(n>=0?i[n][1]+=t.substring(0,a):(i.splice(0,0,[st,t.substring(0,a)]),u++),t=t.substring(a),s=s.substring(a)),a=Me(t,s),a!==0&&(i[u][1]=t.substring(t.length-a)+i[u][1],t=t.substring(0,t.length-a),s=s.substring(0,s.length-a)));var h=e+g;s.length===0&&t.length===0?(i.splice(u-h,h),u=u-h):s.length===0?(i.splice(u-h,h,[ht,t]),u=u-h+1):t.length===0?(i.splice(u-h,h,[yt,s]),u=u-h+1):(i.splice(u-h,h,[yt,s],[ht,t]),u=u-h+2)}u!==0&&i[u-1][0]===st?(i[u-1][1]+=i[u][1],i.splice(u,1)):u++,e=0,g=0,s="",t="";break}}i[i.length-1][1]===""&&i.pop();var l=!1;for(u=1;u=55296&&i<=56319}function An(i){return i>=56320&&i<=57343}function On(i){return An(i.charCodeAt(0))}function Tn(i){return Sn(i.charCodeAt(i.length-1))}function Qs(i){for(var p=[],u=0;u0&&p.push(i[u]);return p}function fr(i,p,u,g){return Tn(i)||On(g)?null:Qs([[st,i],[yt,p],[ht,u],[st,g]])}function Js(i,p,u){var g=typeof u=="number"?{index:u,length:0}:u.oldRange,e=typeof u=="number"?null:u.newRange,s=i.length,t=p.length;if(g.length===0&&(e===null||e.length===0)){var a=g.index,n=i.slice(0,a),o=i.slice(a),c=e?e.index:null;t:{var h=a+t-s;if(c!==null&&c!==h||h<0||h>t)break t;var l=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=l.slice(0,v);if(x!==y)break t;var S=n.slice(v),A=l.slice(v);return fr(x,S,A,o)}t:{if(c!==null&&c!==a)break t;var j=a,l=p.slice(0,j),m=p.slice(j);if(l!==n)break t;var E=Math.min(s-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=i.slice(0,g.index),_=i.slice(g.index+g.length),v=x.length,E=_.length;if(t{(function(i,p){if(typeof define=="function"&&define.amd)define(["exports"],p);else if(typeof Be<"u")p(Be);else{var u={exports:{}};p(u.exports),i.jstoxml=u.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Be,function(i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.toXML=i.default=void 0;function p(P){return s(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 s(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||c(O)===y&&O!==null&&O._name&&S||O instanceof Date&&m||O===null&&v||c(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,l],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='',it=function(O){var D=O.header,Y=O.indent,at=O.isOutputStart,et=D&&at;if(!et)return"";var mt=c(D)===l;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=it({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(ct){return P({_name:K,_content:ct},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=c(O._selfCloseTag)===l?ae&&O._selfCloseTag:ae,Ct=Dt?"/":"",se=M(O._attrs,Wt),zt="<".concat(K).concat(se).concat(Ct,">"),me=et&&!ut?` -`.concat(ne):"",ie=Dt?"":"".concat(jt).concat(me,"");ft+="".concat(rt).concat(zt).concat(ie);break}case"object":{var gt=Object.keys(O),Et=gt.map(function(ct,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===gt.length,_isOutputStart:T}),Zt={_name:ct};if(F(O[ct])==="object"){j.forEach(function(ve){var je=O[ct][ve];typeof je<"u"&&(Zt[ve]=je,delete O[ct][ve])});var nt=typeof O[ct]._content<"u";if(nt&&Object.keys(O[ct]).length>1){var Qt=Object.assign({},O[ct]);delete Qt._content,Zt._content=[].concat(p(H(Qt)),[O[ct]._content])}}typeof Zt._content>"u"&&(Zt._content=O[ct]);var Ke=P(Zt,ge,ct);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(ct,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===O.length,_isOutputStart:T});return P(ct,ge)});ft=He.join("");break}default:{ft=I(O,Xt);break}}return"".concat(Vt).concat(ft)};i.toXML=q;var ot={toXML:q};i.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 i={8552:(e,s,t)=>{var a=t(852),n=t(5639),o=a(n,"DataView");e.exports=o},1989:(e,s,t)=>{var a=t(1789),n=t(401),o=t(7667),c=t(1327),h=t(1866);function l(m){var v=-1,x=m==null?0:m.length;for(this.clear();++v{var a=t(7040),n=t(4125),o=t(2117),c=t(7518),h=t(4705);function l(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,s,t)=>{var a=t(4785),n=t(1285),o=t(6e3),c=t(9916),h=t(5265);function l(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,s,t)=>{var a=t(852),n=t(5639),o=a(n,"Set");e.exports=o},8668:(e,s,t)=>{var a=t(3369),n=t(619),o=t(2385);function c(h){var l=-1,m=h==null?0:h.length;for(this.__data__=new a;++l{var a=t(8407),n=t(7465),o=t(3779),c=t(7599),h=t(4758),l=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=c,m.prototype.has=h,m.prototype.set=l,e.exports=m},2705:(e,s,t)=>{var a=t(5639),n=a.Symbol;e.exports=n},1149:(e,s,t)=>{var a=t(5639),n=a.Uint8Array;e.exports=n},577:(e,s,t)=>{var a=t(852),n=t(5639),o=a(n,"WeakMap");e.exports=o},6874:e=>{function s(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=s},7412:e=>{function s(t,a){for(var n=-1,o=t==null?0:t.length;++n{function s(t,a){for(var n=-1,o=t==null?0:t.length,c=0,h=[];++n{var a=t(2118);function n(o,c){var h=o==null?0:o.length;return!!h&&a(o,c,0)>-1}e.exports=n},1196:e=>{function s(t,a,n){for(var o=-1,c=t==null?0:t.length;++o{var a=t(2545),n=t(5694),o=t(1469),c=t(4144),h=t(5776),l=t(6719),m=Object.prototype,v=m.hasOwnProperty;function x(y,S){var A=o(y),j=!A&&n(y),E=!A&&!j&&c(y),_=!A&&!j&&!E&&l(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 s(t,a){for(var n=-1,o=t==null?0:t.length,c=Array(o);++n{function s(t,a){for(var n=-1,o=a.length,c=t.length;++n{function s(t,a){for(var n=-1,o=t==null?0:t.length;++n{var a=t(9465),n=t(7813),o=Object.prototype,c=o.hasOwnProperty;function h(l,m,v){var x=l[m];(!(c.call(l,m)&&n(x,v))||v===void 0&&!(m in l))&&a(l,m,v)}e.exports=h},8470:(e,s,t)=>{var a=t(7813);function n(o,c){for(var h=o.length;h--;)if(a(o[h][0],c))return h;return-1}e.exports=n},4037:(e,s,t)=>{var a=t(8363),n=t(3674);function o(c,h){return c&&a(h,n(h),c)}e.exports=o},3886:(e,s,t)=>{var a=t(8363),n=t(1704);function o(c,h){return c&&a(h,n(h),c)}e.exports=o},9465:(e,s,t)=>{var a=t(8777);function n(o,c,h){c=="__proto__"&&a?a(o,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):o[c]=h}e.exports=n},5990:(e,s,t)=>{var a=t(6384),n=t(7412),o=t(4865),c=t(4037),h=t(3886),l=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]",it="[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[it]=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),se=Ct==P||Ct==O;if(I(K))return l(K,It);if(Ct==at||Ct==V||se&&!jt){if(ut=rt||se?{}:_(K),!It)return rt?x(K,h(ut,K)):v(K,c(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,ie=Dt?void 0:me(K);return n(ie||K,function(gt,Et){ie&&(Et=gt,gt=K[Et]),o(ut,Et,ft(gt,Z,St,Et,K,At))}),ut}e.exports=ft},3118:(e,s,t)=>{var a=t(3218),n=Object.create,o=function(){function c(){}return function(h){if(!a(h))return{};if(n)return n(h);c.prototype=h;var l=new c;return c.prototype=void 0,l}}();e.exports=o},731:(e,s,t)=>{var a=t(8668),n=t(7443),o=t(1196),c=t(9932),h=t(1717),l=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=c(y,h(S))),A?(E=o,_=!1):y.length>=m&&(E=l,_=!1,y=new a(y));t:for(;++j{function s(t,a,n,o){for(var c=t.length,h=n+(o?1:-1);o?h--:++h{var a=t(2488),n=t(7285);function o(c,h,l,m,v){var x=-1,y=c.length;for(l||(l=n),v||(v=[]);++x0&&l(S)?h>1?o(S,h-1,l,m,v):a(v,S):m||(v[v.length]=S)}return v}e.exports=o},8483:(e,s,t)=>{var a=t(5063),n=a();e.exports=n},7816:(e,s,t)=>{var a=t(8483),n=t(3674);function o(c,h){return c&&a(c,h,n)}e.exports=o},7786:(e,s,t)=>{var a=t(1811),n=t(327);function o(c,h){h=a(h,c);for(var l=0,m=h.length;c!=null&&l{var a=t(2488),n=t(1469);function o(c,h,l){var m=h(c);return n(c)?m:a(m,l(c))}e.exports=o},4239:(e,s,t)=>{var a=t(2705),n=t(9607),o=t(2333),c="[object Null]",h="[object Undefined]",l=a?a.toStringTag:void 0;function m(v){return v==null?v===void 0?h:c:l&&l in Object(v)?n(v):o(v)}e.exports=m},13:e=>{function s(t,a){return t!=null&&a in Object(t)}e.exports=s},2118:(e,s,t)=>{var a=t(1848),n=t(2722),o=t(2351);function c(h,l,m){return l===l?o(h,l,m):a(h,n,m)}e.exports=c},8975:(e,s,t)=>{var a=t(7816);function n(o,c,h,l){return a(o,function(m,v,x){c(l,h(m),v,x)}),l}e.exports=n},9454:(e,s,t)=>{var a=t(4239),n=t(7005),o="[object Arguments]";function c(h){return n(h)&&a(h)==o}e.exports=c},939:(e,s,t)=>{var a=t(2492),n=t(7005);function o(c,h,l,m,v){return c===h?!0:c==null||h==null||!n(c)&&!n(h)?c!==c&&h!==h:a(c,h,l,m,o,v)}e.exports=o},2492:(e,s,t)=>{var a=t(6384),n=t(7114),o=t(8351),c=t(6096),h=t(4160),l=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=l(F),$=l(I),U=X?S:h(F),Q=$?S:h(I);U=U==y?A:U,Q=Q==y?A:Q;var V=U==A,it=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=it&&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),c(F,I,z,M,H,L)):!1}e.exports=_},5588:(e,s,t)=>{var a=t(4160),n=t(7005),o="[object Map]";function c(h){return n(h)&&a(h)==o}e.exports=c},2958:(e,s,t)=>{var a=t(6384),n=t(939),o=1,c=2;function h(l,m,v,x){var y=v.length,S=y,A=!x;if(l==null)return!S;for(l=Object(l);y--;){var j=v[y];if(A&&j[2]?j[1]!==l[j[0]]:!(j[0]in l))return!1}for(;++y{function s(t){return t!==t}e.exports=s},8458:(e,s,t)=>{var a=t(3560),n=t(5346),o=t(3218),c=t(346),h=/[\\^$.*+?()[\]{}|]/g,l=/^\[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:l;return E.test(c(j))}e.exports=A},9221:(e,s,t)=>{var a=t(4160),n=t(7005),o="[object Set]";function c(h){return n(h)&&a(h)==o}e.exports=c},8749:(e,s,t)=>{var a=t(4239),n=t(1780),o=t(7005),c="[object Arguments]",h="[object Array]",l="[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]",it="[object Uint32Array]",G={};G[M]=G[H]=G[L]=G[X]=G[$]=G[U]=G[Q]=G[V]=G[it]=!0,G[c]=G[h]=G[I]=G[l]=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,s,t)=>{var a=t(1573),n=t(6432),o=t(6557),c=t(1469),h=t(9601);function l(m){return typeof m=="function"?m:m==null?o:typeof m=="object"?c(m)?n(m[0],m[1]):a(m):h(m)}e.exports=l},280:(e,s,t)=>{var a=t(5726),n=t(6916),o=Object.prototype,c=o.hasOwnProperty;function h(l){if(!a(l))return n(l);var m=[];for(var v in Object(l))c.call(l,v)&&v!="constructor"&&m.push(v);return m}e.exports=h},313:(e,s,t)=>{var a=t(3218),n=t(5726),o=t(3498),c=Object.prototype,h=c.hasOwnProperty;function l(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=l},1573:(e,s,t)=>{var a=t(2958),n=t(1499),o=t(2634);function c(h){var l=n(h);return l.length==1&&l[0][2]?o(l[0][0],l[0][1]):function(m){return m===h||a(m,h,l)}}e.exports=c},6432:(e,s,t)=>{var a=t(939),n=t(7361),o=t(9095),c=t(5403),h=t(9162),l=t(2634),m=t(327),v=1,x=2;function y(S,A){return c(S)&&h(A)?l(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 s(t){return function(a){return a?.[t]}}e.exports=s},9152:(e,s,t)=>{var a=t(7786);function n(o){return function(c){return a(c,o)}}e.exports=n},5976:(e,s,t)=>{var a=t(6557),n=t(5357),o=t(61);function c(h,l){return o(n(h,l,a),h+"")}e.exports=c},6560:(e,s,t)=>{var a=t(5703),n=t(8777),o=t(6557),c=n?function(h,l){return n(h,"toString",{configurable:!0,enumerable:!1,value:a(l),writable:!0})}:o;e.exports=c},2545:e=>{function s(t,a){for(var n=-1,o=Array(t);++n{var a=t(2705),n=t(9932),o=t(1469),c=t(3448),h=1/0,l=a?a.prototype:void 0,m=l?l.toString:void 0;function v(x){if(typeof x=="string")return x;if(o(x))return n(x,v)+"";if(c(x))return m?m.call(x):"";var y=x+"";return y=="0"&&1/x==-h?"-0":y}e.exports=v},7561:(e,s,t)=>{var a=t(7990),n=/^\s+/;function o(c){return c&&c.slice(0,a(c)+1).replace(n,"")}e.exports=o},1717:e=>{function s(t){return function(a){return t(a)}}e.exports=s},5652:(e,s,t)=>{var a=t(8668),n=t(7443),o=t(1196),c=t(4757),h=t(3593),l=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 l(z);_=!1,j=c,I=new a}else I=y?[]:F;t:for(;++A{function s(t,a){return t.has(a)}e.exports=s},1811:(e,s,t)=>{var a=t(1469),n=t(5403),o=t(5514),c=t(9833);function h(l,m){return a(l)?l:n(l,m)?[l]:o(c(l))}e.exports=h},4318:(e,s,t)=>{var a=t(1149);function n(o){var c=new o.constructor(o.byteLength);return new a(c).set(new a(o)),c}e.exports=n},4626:(e,s,t)=>{e=t.nmd(e);var a=t(5639),n=s&&!s.nodeType&&s,o=n&&!0&&e&&!e.nodeType&&e,c=o&&o.exports===n,h=c?a.Buffer:void 0,l=h?h.allocUnsafe:void 0;function m(v,x){if(x)return v.slice();var y=v.length,S=l?l(y):new v.constructor(y);return v.copy(S),S}e.exports=m},7157:(e,s,t)=>{var a=t(4318);function n(o,c){var h=c?a(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.byteLength)}e.exports=n},3147:e=>{var s=/\w*$/;function t(a){var n=new a.constructor(a.source,s.exec(a));return n.lastIndex=a.lastIndex,n}e.exports=t},419:(e,s,t)=>{var a=t(2705),n=a?a.prototype:void 0,o=n?n.valueOf:void 0;function c(h){return o?Object(o.call(h)):{}}e.exports=c},7133:(e,s,t)=>{var a=t(4318);function n(o,c){var h=c?a(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.length)}e.exports=n},278:e=>{function s(t,a){var n=-1,o=t.length;for(a||(a=Array(o));++n{var a=t(4865),n=t(9465);function o(c,h,l,m){var v=!l;l||(l={});for(var x=-1,y=h.length;++x{var a=t(8363),n=t(9551);function o(c,h){return a(c,n(c),h)}e.exports=o},1911:(e,s,t)=>{var a=t(8363),n=t(1442);function o(c,h){return a(c,n(c),h)}e.exports=o},4429:(e,s,t)=>{var a=t(5639),n=a["__core-js_shared__"];e.exports=n},5063:e=>{function s(t){return function(a,n,o){for(var c=-1,h=Object(a),l=o(a),m=l.length;m--;){var v=l[t?m:++c];if(n(h[v],v,h)===!1)break}return a}}e.exports=s},7740:(e,s,t)=>{var a=t(7206),n=t(8612),o=t(3674);function c(h){return function(l,m,v){var x=Object(l);if(!n(l)){var y=a(m,3);l=o(l),m=function(A){return y(x[A],A,x)}}var S=h(l,m,v);return S>-1?x[y?l[S]:S]:void 0}}e.exports=c},7779:(e,s,t)=>{var a=t(8975);function n(o,c){return function(h,l){return a(h,o,c(l),{})}}e.exports=n},3593:(e,s,t)=>{var a=t(8525),n=t(308),o=t(1814),c=1/0,h=a&&1/o(new a([,-0]))[1]==c?function(l){return new a(l)}:n;e.exports=h},8777:(e,s,t)=>{var a=t(852),n=function(){try{var o=a(Object,"defineProperty");return o({},"",{}),o}catch{}}();e.exports=n},7114:(e,s,t)=>{var a=t(8668),n=t(2908),o=t(4757),c=1,h=2;function l(m,v,x,y,S,A){var j=x&c,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),c=t(7114),h=t(8776),l=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,it,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=l),$.size!=U.size&&!P)return!1;var O=q.get($);if(O)return O==U;V|=v,q.set($,U);var D=c(ot($),ot(U),V,it,G,q);return q.delete($),D;case I:if(L)return L.call($)==L.call(U)}return!1}e.exports=X},6096:(e,s,t)=>{var a=t(8234),n=1,o=Object.prototype,c=o.hasOwnProperty;function h(l,m,v,x,y,S){var A=v&n,j=a(l),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:c.call(m,z)))return!1}var M=S.get(l),H=S.get(m);if(M&&H)return M==m&&H==l;var L=!0;S.set(l,m),S.set(m,l);for(var X=A;++I{var a=typeof t.g=="object"&&t.g&&t.g.Object===Object&&t.g;e.exports=a},8234:(e,s,t)=>{var a=t(8866),n=t(9551),o=t(3674);function c(h){return a(h,o,n)}e.exports=c},6904:(e,s,t)=>{var a=t(8866),n=t(1442),o=t(1704);function c(h){return a(h,o,n)}e.exports=c},5050:(e,s,t)=>{var a=t(7019);function n(o,c){var h=o.__data__;return a(c)?h[typeof c=="string"?"string":"hash"]:h.map}e.exports=n},1499:(e,s,t)=>{var a=t(9162),n=t(3674);function o(c){for(var h=n(c),l=h.length;l--;){var m=h[l],v=c[m];h[l]=[m,v,a(v)]}return h}e.exports=o},852:(e,s,t)=>{var a=t(8458),n=t(7801);function o(c,h){var l=n(c,h);return a(l)?l:void 0}e.exports=o},5924:(e,s,t)=>{var a=t(5569),n=a(Object.getPrototypeOf,Object);e.exports=n},9607:(e,s,t)=>{var a=t(2705),n=Object.prototype,o=n.hasOwnProperty,c=n.toString,h=a?a.toStringTag:void 0;function l(m){var v=o.call(m,h),x=m[h];try{m[h]=void 0;var y=!0}catch{}var S=c.call(m);return y&&(v?m[h]=x:delete m[h]),S}e.exports=l},9551:(e,s,t)=>{var a=t(4963),n=t(479),o=Object.prototype,c=o.propertyIsEnumerable,h=Object.getOwnPropertySymbols,l=h?function(m){return m==null?[]:(m=Object(m),a(h(m),function(v){return c.call(m,v)}))}:n;e.exports=l},1442:(e,s,t)=>{var a=t(2488),n=t(5924),o=t(9551),c=t(479),h=Object.getOwnPropertySymbols,l=h?function(m){for(var v=[];m;)a(v,o(m)),m=n(m);return v}:c;e.exports=l},4160:(e,s,t)=>{var a=t(8552),n=t(7071),o=t(3818),c=t(8525),h=t(577),l=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(c),z=m(h),M=l;(a&&M(new a(new ArrayBuffer(1)))!=j||n&&M(new n)!=v||o&&M(o.resolve())!=y||c&&M(new c)!=S||h&&M(new h)!=A)&&(M=function(H){var L=l(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 s(t,a){return t?.[a]}e.exports=s},222:(e,s,t)=>{var a=t(1811),n=t(5694),o=t(1469),c=t(5776),h=t(1780),l=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 s(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}e.exports=s},7667:(e,s,t)=>{var a=t(4536),n="__lodash_hash_undefined__",o=Object.prototype,c=o.hasOwnProperty;function h(l){var m=this.__data__;if(a){var v=m[l];return v===n?void 0:v}return c.call(m,l)?m[l]:void 0}e.exports=h},1327:(e,s,t)=>{var a=t(4536),n=Object.prototype,o=n.hasOwnProperty;function c(h){var l=this.__data__;return a?l[h]!==void 0:o.call(l,h)}e.exports=c},1866:(e,s,t)=>{var a=t(4536),n="__lodash_hash_undefined__";function o(c,h){var l=this.__data__;return this.size+=this.has(c)?0:1,l[c]=a&&h===void 0?n:h,this}e.exports=o},3824:e=>{var s=Object.prototype,t=s.hasOwnProperty;function a(n){var o=n.length,c=new n.constructor(o);return o&&typeof n[0]=="string"&&t.call(n,"index")&&(c.index=n.index,c.input=n.input),c}e.exports=a},9148:(e,s,t)=>{var a=t(4318),n=t(7157),o=t(3147),c=t(419),h=t(7133),l="[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,it,G){var q=V.constructor;switch(it){case E:return a(V);case l: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 c(V)}}e.exports=Q},8517:(e,s,t)=>{var a=t(3118),n=t(5924),o=t(5726);function c(h){return typeof h.constructor=="function"&&!o(h)?a(n(h)):{}}e.exports=c},7285:(e,s,t)=>{var a=t(2705),n=t(5694),o=t(1469),c=a?a.isConcatSpreadable:void 0;function h(l){return o(l)||n(l)||!!(c&&l&&l[c])}e.exports=h},5776:e=>{var s=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function a(n,o){var c=typeof n;return o=o??s,!!o&&(c=="number"||c!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n{var a=t(1469),n=t(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;function h(l,m){if(a(l))return!1;var v=typeof l;return v=="number"||v=="symbol"||v=="boolean"||l==null||n(l)?!0:c.test(l)||!o.test(l)||m!=null&&l in Object(m)}e.exports=h},7019:e=>{function s(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}e.exports=s},5346:(e,s,t)=>{var a=t(4429),n=function(){var c=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}();function o(c){return!!n&&n in c}e.exports=o},5726:e=>{var s=Object.prototype;function t(a){var n=a&&a.constructor,o=typeof n=="function"&&n.prototype||s;return a===o}e.exports=t},9162:(e,s,t)=>{var a=t(3218);function n(o){return o===o&&!a(o)}e.exports=n},7040:e=>{function s(){this.__data__=[],this.size=0}e.exports=s},4125:(e,s,t)=>{var a=t(8470),n=Array.prototype,o=n.splice;function c(h){var l=this.__data__,m=a(l,h);if(m<0)return!1;var v=l.length-1;return m==v?l.pop():o.call(l,m,1),--this.size,!0}e.exports=c},2117:(e,s,t)=>{var a=t(8470);function n(o){var c=this.__data__,h=a(c,o);return h<0?void 0:c[h][1]}e.exports=n},7518:(e,s,t)=>{var a=t(8470);function n(o){return a(this.__data__,o)>-1}e.exports=n},4705:(e,s,t)=>{var a=t(8470);function n(o,c){var h=this.__data__,l=a(h,o);return l<0?(++this.size,h.push([o,c])):h[l][1]=c,this}e.exports=n},4785:(e,s,t)=>{var a=t(1989),n=t(8407),o=t(7071);function c(){this.size=0,this.__data__={hash:new a,map:new(o||n),string:new a}}e.exports=c},1285:(e,s,t)=>{var a=t(5050);function n(o){var c=a(this,o).delete(o);return this.size-=c?1:0,c}e.exports=n},6e3:(e,s,t)=>{var a=t(5050);function n(o){return a(this,o).get(o)}e.exports=n},9916:(e,s,t)=>{var a=t(5050);function n(o){return a(this,o).has(o)}e.exports=n},5265:(e,s,t)=>{var a=t(5050);function n(o,c){var h=a(this,o),l=h.size;return h.set(o,c),this.size+=h.size==l?0:1,this}e.exports=n},8776:e=>{function s(t){var a=-1,n=Array(t.size);return t.forEach(function(o,c){n[++a]=[c,o]}),n}e.exports=s},2634:e=>{function s(t,a){return function(n){return n==null?!1:n[t]===a&&(a!==void 0||t in Object(n))}}e.exports=s},4523:(e,s,t)=>{var a=t(8306),n=500;function o(c){var h=a(c,function(m){return l.size===n&&l.clear(),m}),l=h.cache;return h}e.exports=o},4536:(e,s,t)=>{var a=t(852),n=a(Object,"create");e.exports=n},6916:(e,s,t)=>{var a=t(5569),n=a(Object.keys,Object);e.exports=n},3498:e=>{function s(t){var a=[];if(t!=null)for(var n in Object(t))a.push(n);return a}e.exports=s},1167:(e,s,t)=>{e=t.nmd(e);var a=t(1957),n=s&&!s.nodeType&&s,o=n&&!0&&e&&!e.nodeType&&e,c=o&&o.exports===n,h=c&&a.process,l=function(){try{var m=o&&o.require&&o.require("util").types;return m||h&&h.binding&&h.binding("util")}catch{}}();e.exports=l},2333:e=>{var s=Object.prototype,t=s.toString;function a(n){return t.call(n)}e.exports=a},5569:e=>{function s(t,a){return function(n){return t(a(n))}}e.exports=s},5357:(e,s,t)=>{var a=t(6874),n=Math.max;function o(c,h,l){return h=n(h===void 0?c.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 s="__lodash_hash_undefined__";function t(a){return this.__data__.set(a,s),this}e.exports=t},2385:e=>{function s(t){return this.__data__.has(t)}e.exports=s},1814:e=>{function s(t){var a=-1,n=Array(t.size);return t.forEach(function(o){n[++a]=o}),n}e.exports=s},61:(e,s,t)=>{var a=t(6560),n=t(1275),o=n(a);e.exports=o},1275:e=>{var s=800,t=16,a=Date.now;function n(o){var c=0,h=0;return function(){var l=a(),m=t-(l-h);if(h=l,m>0){if(++c>=s)return arguments[0]}else c=0;return o.apply(void 0,arguments)}}e.exports=n},7465:(e,s,t)=>{var a=t(8407);function n(){this.__data__=new a,this.size=0}e.exports=n},3779:e=>{function s(t){var a=this.__data__,n=a.delete(t);return this.size=a.size,n}e.exports=s},7599:e=>{function s(t){return this.__data__.get(t)}e.exports=s},4758:e=>{function s(t){return this.__data__.has(t)}e.exports=s},4309:(e,s,t)=>{var a=t(8407),n=t(7071),o=t(3369),c=200;function h(l,m){var v=this.__data__;if(v instanceof a){var x=v.__data__;if(!n||x.length{function s(t,a,n){for(var o=n-1,c=t.length;++o{var a=t(4523),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,c=a(function(h){var l=[];return h.charCodeAt(0)===46&&l.push(""),h.replace(n,function(m,v,x,y){l.push(x?y.replace(o,"$1"):v||m)}),l});e.exports=c},327:(e,s,t)=>{var a=t(3448),n=1/0;function o(c){if(typeof c=="string"||a(c))return c;var h=c+"";return h=="0"&&1/c==-n?"-0":h}e.exports=o},346:e=>{var s=Function.prototype,t=s.toString;function a(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}e.exports=a},7990:e=>{var s=/\s/;function t(a){for(var n=a.length;n--&&s.test(a.charAt(n)););return n}e.exports=t},6678:(e,s,t)=>{var a=t(5990),n=4;function o(c){return a(c,n)}e.exports=o},361:(e,s,t)=>{var a=t(5990),n=1,o=4;function c(h){return a(h,n|o)}e.exports=c},5703:e=>{function s(t){return function(){return t}}e.exports=s},1966:(e,s,t)=>{var a=t(731),n=t(1078),o=t(5976),c=t(9246),h=o(function(l,m){return c(l)?a(l,n(m,1,c,!0)):[]});e.exports=h},7813:e=>{function s(t,a){return t===a||t!==t&&a!==a}e.exports=s},3311:(e,s,t)=>{var a=t(7740),n=t(998),o=a(n);e.exports=o},998:(e,s,t)=>{var a=t(1848),n=t(7206),o=t(554),c=Math.max;function h(l,m,v){var x=l==null?0:l.length;if(!x)return-1;var y=v==null?0:o(v);return y<0&&(y=c(x+y,0)),a(l,n(m,3),y)}e.exports=h},7361:(e,s,t)=>{var a=t(7786);function n(o,c,h){var l=o==null?void 0:a(o,c);return l===void 0?h:l}e.exports=n},9095:(e,s,t)=>{var a=t(13),n=t(222);function o(c,h){return c!=null&&n(c,h,a)}e.exports=o},6557:e=>{function s(t){return t}e.exports=s},3137:(e,s,t)=>{var a=t(5703),n=t(7779),o=t(6557),c=Object.prototype,h=c.toString,l=n(function(m,v,x){v!=null&&typeof v.toString!="function"&&(v=h.call(v)),m[v]=x},a(o));e.exports=l},5694:(e,s,t)=>{var a=t(9454),n=t(7005),o=Object.prototype,c=o.hasOwnProperty,h=o.propertyIsEnumerable,l=a(function(){return arguments}())?a:function(m){return n(m)&&c.call(m,"callee")&&!h.call(m,"callee")};e.exports=l},1469:e=>{var s=Array.isArray;e.exports=s},8612:(e,s,t)=>{var a=t(3560),n=t(1780);function o(c){return c!=null&&n(c.length)&&!a(c)}e.exports=o},9246:(e,s,t)=>{var a=t(8612),n=t(7005);function o(c){return n(c)&&a(c)}e.exports=o},4144:(e,s,t)=>{e=t.nmd(e);var a=t(5639),n=t(5062),o=s&&!s.nodeType&&s,c=o&&!0&&e&&!e.nodeType&&e,h=c&&c.exports===o,l=h?a.Buffer:void 0,m=l?l.isBuffer:void 0,v=m||n;e.exports=v},8446:(e,s,t)=>{var a=t(939);function n(o,c){return a(o,c)}e.exports=n},3560:(e,s,t)=>{var a=t(4239),n=t(3218),o="[object AsyncFunction]",c="[object Function]",h="[object GeneratorFunction]",l="[object Proxy]";function m(v){if(!n(v))return!1;var x=a(v);return x==c||x==h||x==o||x==l}e.exports=m},1780:e=>{var s=9007199254740991;function t(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=s}e.exports=t},6688:(e,s,t)=>{var a=t(5588),n=t(1717),o=t(1167),c=o&&o.isMap,h=c?n(c):a;e.exports=h},3218:e=>{function s(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}e.exports=s},7005:e=>{function s(t){return t!=null&&typeof t=="object"}e.exports=s},2928:(e,s,t)=>{var a=t(9221),n=t(1717),o=t(1167),c=o&&o.isSet,h=c?n(c):a;e.exports=h},3448:(e,s,t)=>{var a=t(4239),n=t(7005),o="[object Symbol]";function c(h){return typeof h=="symbol"||n(h)&&a(h)==o}e.exports=c},6719:(e,s,t)=>{var a=t(8749),n=t(1717),o=t(1167),c=o&&o.isTypedArray,h=c?n(c):a;e.exports=h},3674:(e,s,t)=>{var a=t(4636),n=t(280),o=t(8612);function c(h){return o(h)?a(h):n(h)}e.exports=c},1704:(e,s,t)=>{var a=t(4636),n=t(313),o=t(8612);function c(h){return o(h)?a(h,!0):n(h)}e.exports=c},8306:(e,s,t)=>{var a=t(3369),n="Expected a function";function o(c,h){if(typeof c!="function"||h!=null&&typeof h!="function")throw new TypeError(n);var l=function(){var m=arguments,v=h?h.apply(this,m):m[0],x=l.cache;if(x.has(v))return x.get(v);var y=c.apply(this,m);return l.cache=x.set(v,y)||x,y};return l.cache=new(o.Cache||a),l}o.Cache=a,e.exports=o},308:e=>{function s(){}e.exports=s},9601:(e,s,t)=>{var a=t(371),n=t(9152),o=t(5403),c=t(327);function h(l){return o(l)?a(c(l)):n(l)}e.exports=h},479:e=>{function s(){return[]}e.exports=s},5062:e=>{function s(){return!1}e.exports=s},8601:(e,s,t)=>{var a=t(4841),n=1/0,o=17976931348623157e292;function c(h){if(!h)return h===0?h:0;if(h=a(h),h===n||h===-n){var l=h<0?-1:1;return l*o}return h===h?h:0}e.exports=c},554:(e,s,t)=>{var a=t(8601);function n(o){var c=a(o),h=c%1;return c===c?h?c-h:c:0}e.exports=n},4841:(e,s,t)=>{var a=t(7561),n=t(3218),o=t(3448),c=NaN,h=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,m=/^0o[0-7]+$/i,v=parseInt;function x(y){if(typeof y=="number")return y;if(o(y))return c;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=l.test(y);return A||m.test(y)?v(y.slice(2),A?2:8):h.test(y)?c:+y}e.exports=x},9833:(e,s,t)=>{var a=t(531);function n(o){return o==null?"":a(o)}e.exports=n},4908:(e,s,t)=>{var a=t(5652);function n(o){return o&&o.length?a(o):[]}e.exports=n},2569:(e,s,t)=>{var a=t(731),n=t(5976),o=t(9246),c=n(function(h,l){return o(h)?a(h,l):[]});e.exports=c}},p={};function u(e){var s=p[e];if(s!==void 0)return s.exports;var t=p[e]={id:e,loaded:!1,exports:{}};return i[e](t,t.exports,u),t.loaded=!0,t.exports}u.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return u.d(s,{a:s}),s},u.d=(e,s)=>{for(var t in s)u.o(s,t)&&!u.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[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,s)=>Object.prototype.hasOwnProperty.call(e,s),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:()=>gs});function e(r,f){return r.reduce(function(d,b){return d?b(d):null},f)}var s=u(361),t=u.n(s),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 c(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=ts()(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 rs=u(3137),ns=u.n(rs),Ir=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Dr={"C#":"Db","D#":"Eb","F#":"Gb","G#":"Ab","A#":"Bb"},as=ns()(Dr);function ss(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 as[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#"}},is=Object.keys(tr);function os(){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:is.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 us(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 ls(r){return hs(r)||ps(r)||fs(r)||cs()}function cs(){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 fs(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 ps(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function hs(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(es.bind(null,C)),(dt||B!==0)&&Nt.push(ss.bind(null,B,Jt)),d&&Nt.push(Ya),Nt.push.apply(Nt,[os.bind(null,Bt),Vt].concat(ls($t))),vs;function vs(_r){if(!ms(_r))return null;var Mr=e(Nt,t()(_r));return be==="raw"?us(Mr):Rr(Mr)}}var ms=function(f){return f&&er(f)==="object"&&!f.error&&f.input};let gs=ds})(),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(s=>{try{return new Ae(s,u[1]==="irealbook")}catch(t){let a=s.split("="),n=Ae.parseTitle(a[0].trim());return console.error(`[ireal-musicxml] [${n}] ${t}`),null}}).filter(s=>s!==null).reduce((s,t)=>{if(s.length>0){let a=(0,Cn.default)(s[s.length-1].title,t.title);if(a[0][0]===0&&a.every(n=>n[0]===0||n[1].match(/^\d+$/)))return s[s.length-1].cells=s[s.length-1].cells.concat(t.cells),s}return s.push(t),s},[])}},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 i{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=i.parseTitle(g[0].trim()),this.composer=i.parseComposer(g[1].trim()),this.style=g[2].trim(),this.key=g[3],this.cells=this.parse(g[5]);else{this.title=i.parseTitle(g[0].trim()),this.composer=i.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(ks(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./,/^<.*?>/,i.chordRegex,i.chordRegex2];parse(p){let u=p.trim(),g=[];for(;u;){let a=!1;for(let n=0;n51;)u=i.substring(0,50),i=i.substring(50),p=p+qs(u);return p=p+i,p=p.replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," "),p}function qs(i){let p=i.split("");for(let u=0;u<5;u++)p[49-u]=i[u],p[u]=i[49-u];for(let u=10;u<24;u++)p[49-u]=i[u],p[u]=i[49-u];return p.join("")}var Nn=Ie(En(),1),Rn=Ie(Fn(),1);var Te={name:"ireal-musicxml",version:"2.0.3",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:"./build/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 && npm run build:d.ts","build:d.ts":"cp src/types/* build/","build:esm":"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js","build:cjs":"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs",test:"npm run build && npm run test:lint && npm run test:spec && npm run test:ts","test:spec":'node --test --test-name-pattern="${TEST:-.*}"',"test:ts":"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"}};var we=class{static name=Te.name;static version=Te.version;static author=Te.author;static description=Te.description};var{chordParserFactory:ei,chordRendererFactory:ri}=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 i{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":i.prototype.convertDaCapo,"D.C. al Fine":i.prototype.convertDaCapo,"D.C. al 1st End.":i.prototype.convertDaCapo,"D.C. al 2nd End.":i.prototype.convertDaCapo,"D.C. al 3rd End.":i.prototype.convertDaCapo,"D.S. al Coda":i.prototype.convertDalSegno,"D.S. al Fine":i.prototype.convertDalSegno,"D.S. al 1st End.":i.prototype.convertDalSegno,"D.S. al 2nd End.":i.prototype.convertDalSegno,"D.S. al 3rd End.":i.prototype.convertDalSegno,Fine:i.prototype.convertFine,"3x":i.prototype.convertRepeatNx,"4x":i.prototype.convertRepeatNx,"5x":i.prototype.convertRepeatNx,"6x":i.prototype.convertRepeatNx,"7x":i.prototype.convertRepeatNx,"8x":i.prototype.convertRepeatNx};static convert(p,u={}){let g=Object.assign({},this.defaultOptions,u);return new i(p,g).convert()}constructor(p,u){this.song=p,this.options=u,this.time={beats:4,beatType:4,beatMin:1},this.fifths=null,this.measure=null,this.barRepeat=0,this.codas=[],this.repeats=0,this.shortChord=!1,this.emptyCells=0,this.emptyCellNewSystem=!1,this.cellWidth=(this.options.pageWidth-2*this.options.pageMargin)/16,this.parseChord=ei({altIntervals:["b5","b9"]}),this.renderChord=ri({useShortNamings:!0,printer:"raw"})}convert(){return Nn.default.toXML(this.convertSong(),{header:` +var vs=Object.create;var zr=Object.defineProperty;var ys=Object.getOwnPropertyDescriptor;var xs=Object.getOwnPropertyNames;var Ss=Object.getPrototypeOf,As=Object.prototype.hasOwnProperty;var bt=(i,p)=>()=>(p||i((p={exports:{}}).exports,p),p.exports);var Os=(i,p,c,g)=>{if(p&&typeof p=="object"||typeof p=="function")for(let e of xs(p))!As.call(i,e)&&e!==c&&zr(i,e,{get:()=>p[e],enumerable:!(g=ys(p,e))||g.enumerable});return i};var Ie=(i,p,c)=>(c=i!=null?vs(Ss(i)):{},Os(p||!i||!i.__esModule?zr(c,"default",{value:i,enumerable:!0}):c,i));var ar=bt((si,Hr)=>{"use strict";Hr.exports=nr;function nr(i){_t.length||(De(),Ur=!0),_t[_t.length]=i}var _t=[],Ur=!1,De,Rt=0,Ts=1024;function Lr(){for(;Rt<_t.length;){var i=Rt;if(Rt=Rt+1,_t[i].call(),Rt>Ts){for(var p=0,c=_t.length-Rt;p{"use strict";var js=ar();function Ne(){}var ce=null,fe={};function Cs(i){try{return i.then}catch(p){return ce=p,fe}}function Es(i,p){try{return i(p)}catch(c){return ce=c,fe}}function Fs(i,p,c){try{i(p,c)}catch(g){return ce=g,fe}}Xr.exports=vt;function vt(i){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof i!="function")throw new TypeError("Promise constructor's argument is not a function");this._x=0,this._y=0,this._z=null,this._A=null,i!==Ne&&Wr(i,this)}vt._B=null;vt._C=null;vt._D=Ne;vt.prototype.then=function(i,p){if(this.constructor!==vt)return Is(this,i,p);var c=new vt(Ne);return Pe(this,new Kr(i,p,c)),c};function Is(i,p,c){return new i.constructor(function(g,e){var s=new vt(Ne);s.then(g,e),Pe(i,new Kr(p,c,s))})}function Pe(i,p){for(;i._y===3;)i=i._z;if(vt._B&&vt._B(i),i._y===0){if(i._x===0){i._x=1,i._A=p;return}if(i._x===1){i._x=2,i._A=[i._A,p];return}i._A.push(p);return}Ds(i,p)}function Ds(i,p){js(function(){var c=i._y===1?p.onFulfilled:p.onRejected;if(c===null){i._y===1?sr(p.promise,i._z):le(p.promise,i._z);return}var g=Es(c,i._z);g===fe?le(p.promise,ce):sr(p.promise,g)})}function sr(i,p){if(p===i)return le(i,new TypeError("A promise cannot be resolved with itself."));if(p&&(typeof p=="object"||typeof p=="function")){var c=Cs(p);if(c===fe)return le(i,ce);if(c===i.then&&p instanceof vt){i._y=3,i._z=p,ir(i);return}else if(typeof c=="function"){Wr(c.bind(p),i);return}}i._y=1,i._z=p,ir(i)}function le(i,p){i._y=2,i._z=p,vt._C&&vt._C(i,p),ir(i)}function ir(i){if(i._x===1&&(Pe(i,i._A),i._A=null),i._x===2){for(var p=0;p{"use strict";var Vr=kt();Yr.exports=Vr;Vr.prototype.done=function(i,p){var c=arguments.length?this.then.apply(this,arguments):this;c.then(null,function(g){setTimeout(function(){throw g},0)})}});var Jr=bt((ui,Qr)=>{"use strict";var Re=kt();Qr.exports=Re;Re.prototype.finally=function(i){return this.then(function(p){return Re.resolve(i()).then(function(){return p})},function(p){return Re.resolve(i()).then(function(){throw p})})}});var en=bt((li,tn)=>{"use strict";var k=kt();tn.exports=k;var Ps=qt(!0),Ns=qt(!1),Rs=qt(null),_s=qt(void 0),Ms=qt(0),zs=qt("");function qt(i){var p=new k(k._D);return p._y=1,p._z=i,p}k.resolve=function(i){if(i instanceof k)return i;if(i===null)return Rs;if(i===void 0)return _s;if(i===!0)return Ps;if(i===!1)return Ns;if(i===0)return Ms;if(i==="")return zs;if(typeof i=="object"||typeof i=="function")try{var p=i.then;if(typeof p=="function")return new k(p.bind(i))}catch(c){return new k(function(g,e){e(c)})}return qt(i)};var pe=function(i){return typeof Array.from=="function"?(pe=Array.from,Array.from(i)):(pe=function(p){return Array.prototype.slice.call(p)},Array.prototype.slice.call(i))};k.all=function(i){var p=pe(i);return new k(function(c,g){if(p.length===0)return c([]);var e=p.length;function s(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 s(a,n._z);n._y===2&&g(n._z),n.then(function(h){s(a,h)},g);return}else{var o=n.then;if(typeof o=="function"){var l=new k(o.bind(n));l.then(function(h){s(a,h)},g);return}}p[a]=n,--e===0&&c(p)}for(var t=0;t{"use strict";var rn=ar(),_e=[],ur=[],Gs=rn.makeRequestCallFromTimer(Us);function Us(){if(ur.length)throw ur.shift()}an.exports=lr;function lr(i){var p;_e.length?p=_e.pop():p=new nn,p.task=i,rn(p)}function nn(){this.task=null}nn.prototype.call=function(){try{this.task.call()}catch(i){lr.onerror?lr.onerror(i):(ur.push(i),Gs())}finally{this.task=null,_e[_e.length]=this}}});var ln=bt((fi,un)=>{"use strict";var te=kt(),cr=sn();un.exports=te;te.denodeify=function(i,p){return typeof p=="number"&&p!==1/0?Bs(i,p):$s(i)};var on="function (err, res) {if (err) { rj(err); } else { rs(res); }}";function Bs(i,p){for(var c=[],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) {",c.concat(["extra"]).map(function(s,t){return"case "+t+":res = fn.call("+["self"].concat(c.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,i)}te.nodeify=function(i){return function(){var p=Array.prototype.slice.call(arguments),c=typeof p[p.length-1]=="function"?p.pop():null,g=this;try{return i.apply(this,arguments).nodeify(c,g)}catch(e){if(c===null||typeof c>"u")return new te(function(s,t){t(e)});cr(function(){c.call(g,e)})}}};te.prototype.nodeify=function(i,p){if(typeof i!="function")return this;this.then(function(c){cr(function(){i.call(p,null,c)})},function(c){cr(function(){i.call(p,c)})})}});var fn=bt((pi,cn)=>{"use strict";var pt=kt();cn.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=bt((hi,pn)=>{"use strict";pn.exports=kt();Zr();Jr();en();ln();fn()});var mn=bt((di,dn)=>{"use strict";dn.exports=hn()});var jn=bt((mi,wn)=>{var yt=-1,ht=1,st=0;function Se(i,p,c,g,e){if(i===p)return i?[[st,i]]:[];if(c!=null){var s=Js(i,p,c);if(s)return s}var t=pr(i,p),a=i.substring(0,t);i=i.substring(t),p=p.substring(t),t=Me(i,p);var n=i.substring(i.length-t);i=i.substring(0,i.length-t),p=p.substring(0,p.length-t);var o=Hs(i,p);return a&&o.unshift([st,a]),n&&o.push([st,n]),hr(o,e),g&&Xs(o),o}function Hs(i,p){var c;if(!i)return[[ht,p]];if(!p)return[[yt,i]];var g=i.length>p.length?i:p,e=i.length>p.length?p:i,s=g.indexOf(e);if(s!==-1)return c=[[ht,g.substring(0,s)],[st,e],[ht,g.substring(s+e.length)]],i.length>p.length&&(c[0][0]=c[2][0]=yt),c;if(e.length===1)return[[yt,i],[ht,p]];var t=Ws(i,p);if(t){var a=t[0],n=t[1],o=t[2],l=t[3],h=t[4],u=Se(a,o),m=Se(n,l);return u.concat([[st,h]],m)}return Ks(i,p)}function Ks(i,p){for(var c=i.length,g=p.length,e=Math.ceil((c+g)/2),s=e,t=2*e,a=new Array(t),n=new Array(t),o=0;oc)m+=2;else if(E>g)u+=2;else if(h){var _=s+l-S;if(_>=0&&_=F)return gn(i,p,j,E)}}}for(var I=-y+b;I<=y-x;I+=2){var _=s+I,F;I===-y||I!==y&&n[_-1]c)x+=2;else if(z>g)b+=2;else if(!h){var A=s+l-I;if(A>=0&&A=F)return gn(i,p,j,E)}}}}return[[yt,i],[ht,p]]}function gn(i,p,c,g){var e=i.substring(0,c),s=p.substring(0,g),t=i.substring(c),a=p.substring(g),n=Se(e,s),o=Se(t,a);return n.concat(o)}function pr(i,p){if(!i||!p||i.charAt(0)!==p.charAt(0))return 0;for(var c=0,g=Math.min(i.length,p.length),e=g,s=0;cg?i=i.substring(c-g):cp.length?i:p,g=i.length>p.length?p:i;if(c.length<4||g.length*2=m.length?[j,E,_,F,A]:null}var s=e(c,g,Math.ceil(c.length/4)),t=e(c,g,Math.ceil(c.length/2)),a;if(!s&&!t)return null;t?s?a=s[4].length>t[4].length?s:t:a=t:a=s;var n,o,l,h;i.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 u=a[4];return[n,o,l,h,u]}function Xs(i){for(var p=!1,c=[],g=0,e=null,s=0,t=0,a=0,n=0,o=0;s0?c[g-1]:-1,t=0,a=0,n=0,o=0,e=null,p=!0)),s++;for(p&&hr(i),Zs(i),s=1;s=m?(u>=l.length/2||u>=h.length/2)&&(i.splice(s,0,[st,h.substring(0,u)]),i[s-1][1]=l.substring(0,l.length-u),i[s+1][1]=h.substring(u),s++):(m>=l.length/2||m>=h.length/2)&&(i.splice(s,0,[st,l.substring(0,m)]),i[s-1][0]=ht,i[s-1][1]=h.substring(0,h.length-m),i[s+1][0]=yt,i[s+1][1]=l.substring(m),s++),s++}s++}}var vn=/[^a-zA-Z0-9]/,yn=/\s/,xn=/[\r\n]/,Vs=/\n\r?\n$/,Ys=/^\r?\n\r?\n/;function Zs(i){function p(m,b){if(!m||!b)return 6;var x=m.charAt(m.length-1),y=b.charAt(0),S=x.match(vn),A=y.match(vn),j=S&&x.match(yn),E=A&&y.match(yn),_=j&&x.match(xn),F=E&&y.match(xn),I=_&&m.match(Vs),z=F&&b.match(Ys);return I||z?5:_||F?4:S&&!j&&E?3:j||E?2:S||A?1:0}for(var c=1;c=h&&(h=u,n=g,o=e,l=s)}i[c-1][1]!=n&&(n?i[c-1][1]=n:(i.splice(c-1,1),c--),i[c][1]=o,l?i[c+1][1]=l:(i.splice(c+1,1),c--))}c++}}function hr(i,p){i.push([st,""]);for(var c=0,g=0,e=0,s="",t="",a;c=0&&Tn(i[n][1])){var o=i[n][1].slice(-1);if(i[n][1]=i[n][1].slice(0,-1),s=o+s,t=o+t,!i[n][1]){i.splice(n,1),c--;var l=n-1;i[l]&&i[l][0]===ht&&(e++,t=i[l][1]+t,l--),i[l]&&i[l][0]===yt&&(g++,s=i[l][1]+s,l--),n=l}}if(On(i[c][1])){var o=i[c][1].charAt(0);i[c][1]=i[c][1].slice(1),s+=o,t+=o}}if(c0||t.length>0){s.length>0&&t.length>0&&(a=pr(t,s),a!==0&&(n>=0?i[n][1]+=t.substring(0,a):(i.splice(0,0,[st,t.substring(0,a)]),c++),t=t.substring(a),s=s.substring(a)),a=Me(t,s),a!==0&&(i[c][1]=t.substring(t.length-a)+i[c][1],t=t.substring(0,t.length-a),s=s.substring(0,s.length-a)));var h=e+g;s.length===0&&t.length===0?(i.splice(c-h,h),c=c-h):s.length===0?(i.splice(c-h,h,[ht,t]),c=c-h+1):t.length===0?(i.splice(c-h,h,[yt,s]),c=c-h+1):(i.splice(c-h,h,[yt,s],[ht,t]),c=c-h+2)}c!==0&&i[c-1][0]===st?(i[c-1][1]+=i[c][1],i.splice(c,1)):c++,e=0,g=0,s="",t="";break}}i[i.length-1][1]===""&&i.pop();var u=!1;for(c=1;c=55296&&i<=56319}function An(i){return i>=56320&&i<=57343}function On(i){return An(i.charCodeAt(0))}function Tn(i){return Sn(i.charCodeAt(i.length-1))}function Qs(i){for(var p=[],c=0;c0&&p.push(i[c]);return p}function fr(i,p,c,g){return Tn(i)||On(g)?null:Qs([[st,i],[yt,p],[ht,c],[st,g]])}function Js(i,p,c){var g=typeof c=="number"?{index:c,length:0}:c.oldRange,e=typeof c=="number"?null:c.newRange,s=i.length,t=p.length;if(g.length===0&&(e===null||e.length===0)){var a=g.index,n=i.slice(0,a),o=i.slice(a),l=e?e.index:null;t:{var h=a+t-s;if(l!==null&&l!==h||h<0||h>t)break t;var u=p.slice(0,h),m=p.slice(h);if(m!==o)break t;var b=Math.min(a,h),x=n.slice(0,b),y=u.slice(0,b);if(x!==y)break t;var S=n.slice(b),A=u.slice(b);return fr(x,S,A,o)}t:{if(l!==null&&l!==a)break t;var j=a,u=p.slice(0,j),m=p.slice(j);if(u!==n)break t;var E=Math.min(s-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=i.slice(0,g.index),_=i.slice(g.index+g.length),b=x.length,E=_.length;if(t{(function(i,p){if(typeof define=="function"&&define.amd)define(["exports"],p);else if(typeof Ue<"u")p(Ue);else{var c={exports:{}};p(c.exports),i.jstoxml=c.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Ue,function(i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.toXML=i.default=void 0;function p(P){return s(P)||e(P)||g(P)||c()}function c(){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 s(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&&b||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,$t=Mt===!0?"":'="'.concat(Mt,'"');return"".concat(mt).concat($t)});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,u],X=function(O){return L.includes(F(O))},B=[].concat(L,[m,S]),$=function(O){return B.includes(F(O))},Q=function(O){return!O.match("<")},V='',it=function(O){var D=O.header,Y=O.indent,at=O.isOutputStart,et=D&&at;if(!et)return"";var mt=l(D)===u;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,$t=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=it({header:$t,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(ct){return P({_name:K,_content:ct},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)===u?ae&&O._selfCloseTag:ae,Ct=Dt?"/":"",se=M(O._attrs,Wt),zt="<".concat(K).concat(se).concat(Ct,">"),me=et&&!ut?` +`.concat(ne):"",ie=Dt?"":"".concat(jt).concat(me,"");ft+="".concat(rt).concat(zt).concat(ie);break}case"object":{var gt=Object.keys(O),Et=gt.map(function(ct,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===gt.length,_isOutputStart:T}),Zt={_name:ct};if(F(O[ct])==="object"){j.forEach(function(be){var je=O[ct][be];typeof je<"u"&&(Zt[be]=je,delete O[ct][be])});var nt=typeof O[ct]._content<"u";if(nt&&Object.keys(O[ct]).length>1){var Qt=Object.assign({},O[ct]);delete Qt._content,Zt._content=[].concat(p(H(Qt)),[O[ct]._content])}}typeof Zt._content>"u"&&(Zt._content=O[ct]);var Ke=P(Zt,ge,ct);return Ke},D);ft=Et.join("");break}case"function":{var $e=O(D);ft=P($e,D);break}case"array":{var He=O.map(function(ct,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===O.length,_isOutputStart:T});return P(ct,ge)});ft=He.join("");break}default:{ft=I(O,Xt);break}}return"".concat(Vt).concat(ft)};i.toXML=q;var ot={toXML:q};i.default=ot})});var Fn=bt((Oe,dr)=>{(function(p,c){typeof Oe=="object"&&typeof dr=="object"?dr.exports=c():typeof define=="function"&&define.amd?define([],c):typeof Oe=="object"?Oe["chord-symbol"]=c():p["chord-symbol"]=c()})(typeof self<"u"?self:Oe,function(){return(()=>{var i={8552:(e,s,t)=>{var a=t(852),n=t(5639),o=a(n,"DataView");e.exports=o},1989:(e,s,t)=>{var a=t(1789),n=t(401),o=t(7667),l=t(1327),h=t(1866);function u(m){var b=-1,x=m==null?0:m.length;for(this.clear();++b{var a=t(7040),n=t(4125),o=t(2117),l=t(7518),h=t(4705);function u(m){var b=-1,x=m==null?0:m.length;for(this.clear();++b{var a=t(852),n=t(5639),o=a(n,"Map");e.exports=o},3369:(e,s,t)=>{var a=t(4785),n=t(1285),o=t(6e3),l=t(9916),h=t(5265);function u(m){var b=-1,x=m==null?0:m.length;for(this.clear();++b{var a=t(852),n=t(5639),o=a(n,"Promise");e.exports=o},8525:(e,s,t)=>{var a=t(852),n=t(5639),o=a(n,"Set");e.exports=o},8668:(e,s,t)=>{var a=t(3369),n=t(619),o=t(2385);function l(h){var u=-1,m=h==null?0:h.length;for(this.__data__=new a;++u{var a=t(8407),n=t(7465),o=t(3779),l=t(7599),h=t(4758),u=t(4309);function m(b){var x=this.__data__=new a(b);this.size=x.size}m.prototype.clear=n,m.prototype.delete=o,m.prototype.get=l,m.prototype.has=h,m.prototype.set=u,e.exports=m},2705:(e,s,t)=>{var a=t(5639),n=a.Symbol;e.exports=n},1149:(e,s,t)=>{var a=t(5639),n=a.Uint8Array;e.exports=n},577:(e,s,t)=>{var a=t(852),n=t(5639),o=a(n,"WeakMap");e.exports=o},6874:e=>{function s(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=s},7412:e=>{function s(t,a){for(var n=-1,o=t==null?0:t.length;++n{function s(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 s(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),u=t(6719),m=Object.prototype,b=m.hasOwnProperty;function x(y,S){var A=o(y),j=!A&&n(y),E=!A&&!j&&l(y),_=!A&&!j&&!E&&u(y),F=A||j||E||_,I=F?a(y.length,String):[],z=I.length;for(var M in y)(S||b.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 s(t,a){for(var n=-1,o=t==null?0:t.length,l=Array(o);++n{function s(t,a){for(var n=-1,o=a.length,l=t.length;++n{function s(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(u,m,b){var x=u[m];(!(l.call(u,m)&&n(x,b))||b===void 0&&!(m in u))&&a(u,m,b)}e.exports=h},8470:(e,s,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,s,t)=>{var a=t(8363),n=t(3674);function o(l,h){return l&&a(h,n(h),l)}e.exports=o},3886:(e,s,t)=>{var a=t(8363),n=t(1704);function o(l,h){return l&&a(h,n(h),l)}e.exports=o},9465:(e,s,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,s,t)=>{var a=t(6384),n=t(7412),o=t(4865),l=t(4037),h=t(3886),u=t(4626),m=t(278),b=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),B=1,$=2,Q=4,V="[object Arguments]",it="[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]",$t="[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[it]=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[$t]=!1;function ft(K,Z,St,de,jt,At){var ut,It=Z&B,rt=Z&$,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),se=Ct==P||Ct==O;if(I(K))return u(K,It);if(Ct==at||Ct==V||se&&!jt){if(ut=rt||se?{}:_(K),!It)return rt?x(K,h(ut,K)):b(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,ie=Dt?void 0:me(K);return n(ie||K,function(gt,Et){ie&&(Et=gt,gt=K[Et]),o(ut,Et,ft(gt,Z,St,Et,K,At))}),ut}e.exports=ft},3118:(e,s,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 u=new l;return l.prototype=void 0,u}}();e.exports=o},731:(e,s,t)=>{var a=t(8668),n=t(7443),o=t(1196),l=t(9932),h=t(1717),u=t(4757),m=200;function b(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=u,_=!1,y=new a(y));t:for(;++j{function s(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,u,m,b){var x=-1,y=l.length;for(u||(u=n),b||(b=[]);++x0&&u(S)?h>1?o(S,h-1,u,m,b):a(b,S):m||(b[b.length]=S)}return b}e.exports=o},8483:(e,s,t)=>{var a=t(5063),n=a();e.exports=n},7816:(e,s,t)=>{var a=t(8483),n=t(3674);function o(l,h){return l&&a(l,h,n)}e.exports=o},7786:(e,s,t)=>{var a=t(1811),n=t(327);function o(l,h){h=a(h,l);for(var u=0,m=h.length;l!=null&&u{var a=t(2488),n=t(1469);function o(l,h,u){var m=h(l);return n(l)?m:a(m,u(l))}e.exports=o},4239:(e,s,t)=>{var a=t(2705),n=t(9607),o=t(2333),l="[object Null]",h="[object Undefined]",u=a?a.toStringTag:void 0;function m(b){return b==null?b===void 0?h:l:u&&u in Object(b)?n(b):o(b)}e.exports=m},13:e=>{function s(t,a){return t!=null&&a in Object(t)}e.exports=s},2118:(e,s,t)=>{var a=t(1848),n=t(2722),o=t(2351);function l(h,u,m){return u===u?o(h,u,m):a(h,n,m)}e.exports=l},8975:(e,s,t)=>{var a=t(7816);function n(o,l,h,u){return a(o,function(m,b,x){l(u,h(m),b,x)}),u}e.exports=n},9454:(e,s,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,s,t)=>{var a=t(2492),n=t(7005);function o(l,h,u,m,b){return l===h?!0:l==null||h==null||!n(l)&&!n(h)?l!==l&&h!==h:a(l,h,u,m,o,b)}e.exports=o},2492:(e,s,t)=>{var a=t(6384),n=t(7114),o=t(8351),l=t(6096),h=t(4160),u=t(1469),m=t(4144),b=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=u(F),B=u(I),$=X?S:h(F),Q=B?S:h(I);$=$==y?A:$,Q=Q==y?A:Q;var V=$==A,it=Q==A,G=$==Q;if(G&&m(F)){if(!m(I))return!1;X=!0,V=!1}if(G&&!V)return L||(L=new a),X||b(F)?n(F,I,z,M,H,L):o(F,I,$,z,M,H,L);if(!(z&x)){var q=V&&E.call(F,"__wrapped__"),ot=it&&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,s,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,s,t)=>{var a=t(6384),n=t(939),o=1,l=2;function h(u,m,b,x){var y=b.length,S=y,A=!x;if(u==null)return!S;for(u=Object(u);y--;){var j=b[y];if(A&&j[2]?j[1]!==u[j[0]]:!(j[0]in u))return!1}for(;++y{function s(t){return t!==t}e.exports=s},8458:(e,s,t)=>{var a=t(3560),n=t(5346),o=t(3218),l=t(346),h=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,m=Function.prototype,b=Object.prototype,x=m.toString,y=b.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:u;return E.test(l(j))}e.exports=A},9221:(e,s,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,s,t)=>{var a=t(4239),n=t(1780),o=t(7005),l="[object Arguments]",h="[object Array]",u="[object Boolean]",m="[object Date]",b="[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]",B="[object Int32Array]",$="[object Uint8Array]",Q="[object Uint8ClampedArray]",V="[object Uint16Array]",it="[object Uint32Array]",G={};G[M]=G[H]=G[L]=G[X]=G[B]=G[$]=G[Q]=G[V]=G[it]=!0,G[l]=G[h]=G[I]=G[u]=G[z]=G[m]=G[b]=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,s,t)=>{var a=t(1573),n=t(6432),o=t(6557),l=t(1469),h=t(9601);function u(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=u},280:(e,s,t)=>{var a=t(5726),n=t(6916),o=Object.prototype,l=o.hasOwnProperty;function h(u){if(!a(u))return n(u);var m=[];for(var b in Object(u))l.call(u,b)&&b!="constructor"&&m.push(b);return m}e.exports=h},313:(e,s,t)=>{var a=t(3218),n=t(5726),o=t(3498),l=Object.prototype,h=l.hasOwnProperty;function u(m){if(!a(m))return o(m);var b=n(m),x=[];for(var y in m)y=="constructor"&&(b||!h.call(m,y))||x.push(y);return x}e.exports=u},1573:(e,s,t)=>{var a=t(2958),n=t(1499),o=t(2634);function l(h){var u=n(h);return u.length==1&&u[0][2]?o(u[0][0],u[0][1]):function(m){return m===h||a(m,h,u)}}e.exports=l},6432:(e,s,t)=>{var a=t(939),n=t(7361),o=t(9095),l=t(5403),h=t(9162),u=t(2634),m=t(327),b=1,x=2;function y(S,A){return l(S)&&h(A)?u(m(S),A):function(j){var E=n(j,S);return E===void 0&&E===A?o(j,S):a(A,E,b|x)}}e.exports=y},371:e=>{function s(t){return function(a){return a?.[t]}}e.exports=s},9152:(e,s,t)=>{var a=t(7786);function n(o){return function(l){return a(l,o)}}e.exports=n},5976:(e,s,t)=>{var a=t(6557),n=t(5357),o=t(61);function l(h,u){return o(n(h,u,a),h+"")}e.exports=l},6560:(e,s,t)=>{var a=t(5703),n=t(8777),o=t(6557),l=n?function(h,u){return n(h,"toString",{configurable:!0,enumerable:!1,value:a(u),writable:!0})}:o;e.exports=l},2545:e=>{function s(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,u=a?a.prototype:void 0,m=u?u.toString:void 0;function b(x){if(typeof x=="string")return x;if(o(x))return n(x,b)+"";if(l(x))return m?m.call(x):"";var y=x+"";return y=="0"&&1/x==-h?"-0":y}e.exports=b},7561:(e,s,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 s(t){return function(a){return t(a)}}e.exports=s},5652:(e,s,t)=>{var a=t(8668),n=t(7443),o=t(1196),l=t(4757),h=t(3593),u=t(1814),m=200;function b(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 u(z);_=!1,j=l,I=new a}else I=y?[]:F;t:for(;++A{function s(t,a){return t.has(a)}e.exports=s},1811:(e,s,t)=>{var a=t(1469),n=t(5403),o=t(5514),l=t(9833);function h(u,m){return a(u)?u:n(u,m)?[u]:o(l(u))}e.exports=h},4318:(e,s,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,s,t)=>{e=t.nmd(e);var a=t(5639),n=s&&!s.nodeType&&s,o=n&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===n,h=l?a.Buffer:void 0,u=h?h.allocUnsafe:void 0;function m(b,x){if(x)return b.slice();var y=b.length,S=u?u(y):new b.constructor(y);return b.copy(S),S}e.exports=m},7157:(e,s,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 s=/\w*$/;function t(a){var n=new a.constructor(a.source,s.exec(a));return n.lastIndex=a.lastIndex,n}e.exports=t},419:(e,s,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,s,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 s(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,u,m){var b=!u;u||(u={});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,s,t)=>{var a=t(8363),n=t(1442);function o(l,h){return a(l,n(l),h)}e.exports=o},4429:(e,s,t)=>{var a=t(5639),n=a["__core-js_shared__"];e.exports=n},5063:e=>{function s(t){return function(a,n,o){for(var l=-1,h=Object(a),u=o(a),m=u.length;m--;){var b=u[t?m:++l];if(n(h[b],b,h)===!1)break}return a}}e.exports=s},7740:(e,s,t)=>{var a=t(7206),n=t(8612),o=t(3674);function l(h){return function(u,m,b){var x=Object(u);if(!n(u)){var y=a(m,3);u=o(u),m=function(A){return y(x[A],A,x)}}var S=h(u,m,b);return S>-1?x[y?u[S]:S]:void 0}}e.exports=l},7779:(e,s,t)=>{var a=t(8975);function n(o,l){return function(h,u){return a(h,o,l(u),{})}}e.exports=n},3593:(e,s,t)=>{var a=t(8525),n=t(308),o=t(1814),l=1/0,h=a&&1/o(new a([,-0]))[1]==l?function(u){return new a(u)}:n;e.exports=h},8777:(e,s,t)=>{var a=t(852),n=function(){try{var o=a(Object,"defineProperty");return o({},"",{}),o}catch{}}();e.exports=n},7114:(e,s,t)=>{var a=t(8668),n=t(2908),o=t(4757),l=1,h=2;function u(m,b,x,y,S,A){var j=x&l,E=m.length,_=b.length;if(E!=_&&!(j&&_>E))return!1;var F=A.get(m),I=A.get(b);if(F&&I)return F==b&&I==m;var z=-1,M=!0,H=x&h?new a:void 0;for(A.set(m,b),A.set(b,m);++z{var a=t(2705),n=t(1149),o=t(7813),l=t(7114),h=t(8776),u=t(1814),m=1,b=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(B,$,Q,V,it,G,q){switch(Q){case M:if(B.byteLength!=$.byteLength||B.byteOffset!=$.byteOffset)return!1;B=B.buffer,$=$.buffer;case z:return!(B.byteLength!=$.byteLength||!G(new n(B),new n($)));case x:case y:case j:return o(+B,+$);case S:return B.name==$.name&&B.message==$.message;case E:case F:return B==$+"";case A:var ot=h;case _:var P=V&m;if(ot||(ot=u),B.size!=$.size&&!P)return!1;var O=q.get(B);if(O)return O==$;V|=b,q.set(B,$);var D=l(ot(B),ot($),V,it,G,q);return q.delete(B),D;case I:if(L)return L.call(B)==L.call($)}return!1}e.exports=X},6096:(e,s,t)=>{var a=t(8234),n=1,o=Object.prototype,l=o.hasOwnProperty;function h(u,m,b,x,y,S){var A=b&n,j=a(u),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(u),H=S.get(m);if(M&&H)return M==m&&H==u;var L=!0;S.set(u,m),S.set(m,u);for(var X=A;++I{var a=typeof t.g=="object"&&t.g&&t.g.Object===Object&&t.g;e.exports=a},8234:(e,s,t)=>{var a=t(8866),n=t(9551),o=t(3674);function l(h){return a(h,o,n)}e.exports=l},6904:(e,s,t)=>{var a=t(8866),n=t(1442),o=t(1704);function l(h){return a(h,o,n)}e.exports=l},5050:(e,s,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,s,t)=>{var a=t(9162),n=t(3674);function o(l){for(var h=n(l),u=h.length;u--;){var m=h[u],b=l[m];h[u]=[m,b,a(b)]}return h}e.exports=o},852:(e,s,t)=>{var a=t(8458),n=t(7801);function o(l,h){var u=n(l,h);return a(u)?u:void 0}e.exports=o},5924:(e,s,t)=>{var a=t(5569),n=a(Object.getPrototypeOf,Object);e.exports=n},9607:(e,s,t)=>{var a=t(2705),n=Object.prototype,o=n.hasOwnProperty,l=n.toString,h=a?a.toStringTag:void 0;function u(m){var b=o.call(m,h),x=m[h];try{m[h]=void 0;var y=!0}catch{}var S=l.call(m);return y&&(b?m[h]=x:delete m[h]),S}e.exports=u},9551:(e,s,t)=>{var a=t(4963),n=t(479),o=Object.prototype,l=o.propertyIsEnumerable,h=Object.getOwnPropertySymbols,u=h?function(m){return m==null?[]:(m=Object(m),a(h(m),function(b){return l.call(m,b)}))}:n;e.exports=u},1442:(e,s,t)=>{var a=t(2488),n=t(5924),o=t(9551),l=t(479),h=Object.getOwnPropertySymbols,u=h?function(m){for(var b=[];m;)a(b,o(m)),m=n(m);return b}:l;e.exports=u},4160:(e,s,t)=>{var a=t(8552),n=t(7071),o=t(3818),l=t(8525),h=t(577),u=t(4239),m=t(346),b="[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=u;(a&&M(new a(new ArrayBuffer(1)))!=j||n&&M(new n)!=b||o&&M(o.resolve())!=y||l&&M(new l)!=S||h&&M(new h)!=A)&&(M=function(H){var L=u(H),X=L==x?H.constructor:void 0,B=X?m(X):"";if(B)switch(B){case E:return j;case _:return b;case F:return y;case I:return S;case z:return A}return L}),e.exports=M},7801:e=>{function s(t,a){return t?.[a]}e.exports=s},222:(e,s,t)=>{var a=t(1811),n=t(5694),o=t(1469),l=t(5776),h=t(1780),u=t(327);function m(b,x,y){x=a(x,b);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 s(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}e.exports=s},7667:(e,s,t)=>{var a=t(4536),n="__lodash_hash_undefined__",o=Object.prototype,l=o.hasOwnProperty;function h(u){var m=this.__data__;if(a){var b=m[u];return b===n?void 0:b}return l.call(m,u)?m[u]:void 0}e.exports=h},1327:(e,s,t)=>{var a=t(4536),n=Object.prototype,o=n.hasOwnProperty;function l(h){var u=this.__data__;return a?u[h]!==void 0:o.call(u,h)}e.exports=l},1866:(e,s,t)=>{var a=t(4536),n="__lodash_hash_undefined__";function o(l,h){var u=this.__data__;return this.size+=this.has(l)?0:1,u[l]=a&&h===void 0?n:h,this}e.exports=o},3824:e=>{var s=Object.prototype,t=s.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,s,t)=>{var a=t(4318),n=t(7157),o=t(3147),l=t(419),h=t(7133),u="[object Boolean]",m="[object Date]",b="[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]",B="[object Uint16Array]",$="[object Uint32Array]";function Q(V,it,G){var q=V.constructor;switch(it){case E:return a(V);case u: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 B:case $:return h(V,G);case b: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,s,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,s,t)=>{var a=t(2705),n=t(5694),o=t(1469),l=a?a.isConcatSpreadable:void 0;function h(u){return o(u)||n(u)||!!(l&&u&&u[l])}e.exports=h},5776:e=>{var s=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function a(n,o){var l=typeof n;return o=o??s,!!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(u,m){if(a(u))return!1;var b=typeof u;return b=="number"||b=="symbol"||b=="boolean"||u==null||n(u)?!0:l.test(u)||!o.test(u)||m!=null&&u in Object(m)}e.exports=h},7019:e=>{function s(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}e.exports=s},5346:(e,s,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 s=Object.prototype;function t(a){var n=a&&a.constructor,o=typeof n=="function"&&n.prototype||s;return a===o}e.exports=t},9162:(e,s,t)=>{var a=t(3218);function n(o){return o===o&&!a(o)}e.exports=n},7040:e=>{function s(){this.__data__=[],this.size=0}e.exports=s},4125:(e,s,t)=>{var a=t(8470),n=Array.prototype,o=n.splice;function l(h){var u=this.__data__,m=a(u,h);if(m<0)return!1;var b=u.length-1;return m==b?u.pop():o.call(u,m,1),--this.size,!0}e.exports=l},2117:(e,s,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,s,t)=>{var a=t(8470);function n(o){return a(this.__data__,o)>-1}e.exports=n},4705:(e,s,t)=>{var a=t(8470);function n(o,l){var h=this.__data__,u=a(h,o);return u<0?(++this.size,h.push([o,l])):h[u][1]=l,this}e.exports=n},4785:(e,s,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,s,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,s,t)=>{var a=t(5050);function n(o){return a(this,o).get(o)}e.exports=n},9916:(e,s,t)=>{var a=t(5050);function n(o){return a(this,o).has(o)}e.exports=n},5265:(e,s,t)=>{var a=t(5050);function n(o,l){var h=a(this,o),u=h.size;return h.set(o,l),this.size+=h.size==u?0:1,this}e.exports=n},8776:e=>{function s(t){var a=-1,n=Array(t.size);return t.forEach(function(o,l){n[++a]=[l,o]}),n}e.exports=s},2634:e=>{function s(t,a){return function(n){return n==null?!1:n[t]===a&&(a!==void 0||t in Object(n))}}e.exports=s},4523:(e,s,t)=>{var a=t(8306),n=500;function o(l){var h=a(l,function(m){return u.size===n&&u.clear(),m}),u=h.cache;return h}e.exports=o},4536:(e,s,t)=>{var a=t(852),n=a(Object,"create");e.exports=n},6916:(e,s,t)=>{var a=t(5569),n=a(Object.keys,Object);e.exports=n},3498:e=>{function s(t){var a=[];if(t!=null)for(var n in Object(t))a.push(n);return a}e.exports=s},1167:(e,s,t)=>{e=t.nmd(e);var a=t(1957),n=s&&!s.nodeType&&s,o=n&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===n,h=l&&a.process,u=function(){try{var m=o&&o.require&&o.require("util").types;return m||h&&h.binding&&h.binding("util")}catch{}}();e.exports=u},2333:e=>{var s=Object.prototype,t=s.toString;function a(n){return t.call(n)}e.exports=a},5569:e=>{function s(t,a){return function(n){return t(a(n))}}e.exports=s},5357:(e,s,t)=>{var a=t(6874),n=Math.max;function o(l,h,u){return h=n(h===void 0?l.length-1:h,0),function(){for(var m=arguments,b=-1,x=n(m.length-h,0),y=Array(x);++b{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 s="__lodash_hash_undefined__";function t(a){return this.__data__.set(a,s),this}e.exports=t},2385:e=>{function s(t){return this.__data__.has(t)}e.exports=s},1814:e=>{function s(t){var a=-1,n=Array(t.size);return t.forEach(function(o){n[++a]=o}),n}e.exports=s},61:(e,s,t)=>{var a=t(6560),n=t(1275),o=n(a);e.exports=o},1275:e=>{var s=800,t=16,a=Date.now;function n(o){var l=0,h=0;return function(){var u=a(),m=t-(u-h);if(h=u,m>0){if(++l>=s)return arguments[0]}else l=0;return o.apply(void 0,arguments)}}e.exports=n},7465:(e,s,t)=>{var a=t(8407);function n(){this.__data__=new a,this.size=0}e.exports=n},3779:e=>{function s(t){var a=this.__data__,n=a.delete(t);return this.size=a.size,n}e.exports=s},7599:e=>{function s(t){return this.__data__.get(t)}e.exports=s},4758:e=>{function s(t){return this.__data__.has(t)}e.exports=s},4309:(e,s,t)=>{var a=t(8407),n=t(7071),o=t(3369),l=200;function h(u,m){var b=this.__data__;if(b instanceof a){var x=b.__data__;if(!n||x.length{function s(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 u=[];return h.charCodeAt(0)===46&&u.push(""),h.replace(n,function(m,b,x,y){u.push(x?y.replace(o,"$1"):b||m)}),u});e.exports=l},327:(e,s,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 s=Function.prototype,t=s.toString;function a(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}e.exports=a},7990:e=>{var s=/\s/;function t(a){for(var n=a.length;n--&&s.test(a.charAt(n)););return n}e.exports=t},6678:(e,s,t)=>{var a=t(5990),n=4;function o(l){return a(l,n)}e.exports=o},361:(e,s,t)=>{var a=t(5990),n=1,o=4;function l(h){return a(h,n|o)}e.exports=l},5703:e=>{function s(t){return function(){return t}}e.exports=s},1966:(e,s,t)=>{var a=t(731),n=t(1078),o=t(5976),l=t(9246),h=o(function(u,m){return l(u)?a(u,n(m,1,l,!0)):[]});e.exports=h},7813:e=>{function s(t,a){return t===a||t!==t&&a!==a}e.exports=s},3311:(e,s,t)=>{var a=t(7740),n=t(998),o=a(n);e.exports=o},998:(e,s,t)=>{var a=t(1848),n=t(7206),o=t(554),l=Math.max;function h(u,m,b){var x=u==null?0:u.length;if(!x)return-1;var y=b==null?0:o(b);return y<0&&(y=l(x+y,0)),a(u,n(m,3),y)}e.exports=h},7361:(e,s,t)=>{var a=t(7786);function n(o,l,h){var u=o==null?void 0:a(o,l);return u===void 0?h:u}e.exports=n},9095:(e,s,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 s(t){return t}e.exports=s},3137:(e,s,t)=>{var a=t(5703),n=t(7779),o=t(6557),l=Object.prototype,h=l.toString,u=n(function(m,b,x){b!=null&&typeof b.toString!="function"&&(b=h.call(b)),m[b]=x},a(o));e.exports=u},5694:(e,s,t)=>{var a=t(9454),n=t(7005),o=Object.prototype,l=o.hasOwnProperty,h=o.propertyIsEnumerable,u=a(function(){return arguments}())?a:function(m){return n(m)&&l.call(m,"callee")&&!h.call(m,"callee")};e.exports=u},1469:e=>{var s=Array.isArray;e.exports=s},8612:(e,s,t)=>{var a=t(3560),n=t(1780);function o(l){return l!=null&&n(l.length)&&!a(l)}e.exports=o},9246:(e,s,t)=>{var a=t(8612),n=t(7005);function o(l){return n(l)&&a(l)}e.exports=o},4144:(e,s,t)=>{e=t.nmd(e);var a=t(5639),n=t(5062),o=s&&!s.nodeType&&s,l=o&&!0&&e&&!e.nodeType&&e,h=l&&l.exports===o,u=h?a.Buffer:void 0,m=u?u.isBuffer:void 0,b=m||n;e.exports=b},8446:(e,s,t)=>{var a=t(939);function n(o,l){return a(o,l)}e.exports=n},3560:(e,s,t)=>{var a=t(4239),n=t(3218),o="[object AsyncFunction]",l="[object Function]",h="[object GeneratorFunction]",u="[object Proxy]";function m(b){if(!n(b))return!1;var x=a(b);return x==l||x==h||x==o||x==u}e.exports=m},1780:e=>{var s=9007199254740991;function t(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=s}e.exports=t},6688:(e,s,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 s(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}e.exports=s},7005:e=>{function s(t){return t!=null&&typeof t=="object"}e.exports=s},2928:(e,s,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,s,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,s,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,s,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,s,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,s,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 u=function(){var m=arguments,b=h?h.apply(this,m):m[0],x=u.cache;if(x.has(b))return x.get(b);var y=l.apply(this,m);return u.cache=x.set(b,y)||x,y};return u.cache=new(o.Cache||a),u}o.Cache=a,e.exports=o},308:e=>{function s(){}e.exports=s},9601:(e,s,t)=>{var a=t(371),n=t(9152),o=t(5403),l=t(327);function h(u){return o(u)?a(l(u)):n(u)}e.exports=h},479:e=>{function s(){return[]}e.exports=s},5062:e=>{function s(){return!1}e.exports=s},8601:(e,s,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 u=h<0?-1:1;return u*o}return h===h?h:0}e.exports=l},554:(e,s,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,s,t)=>{var a=t(7561),n=t(3218),o=t(3448),l=NaN,h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=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=u.test(y);return A||m.test(y)?b(y.slice(2),A?2:8):h.test(y)?l:+y}e.exports=x},9833:(e,s,t)=>{var a=t(531);function n(o){return o==null?"":a(o)}e.exports=n},4908:(e,s,t)=>{var a=t(5652);function n(o){return o&&o.length?a(o):[]}e.exports=n},2569:(e,s,t)=>{var a=t(731),n=t(5976),o=t(9246),l=n(function(h,u){return o(h)?a(h,u):[]});e.exports=l}},p={};function c(e){var s=p[e];if(s!==void 0)return s.exports;var t=p[e]={id:e,loaded:!1,exports:{}};return i[e](t,t.exports,c),t.loaded=!0,t.exports}c.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return c.d(s,{a:s}),s},c.d=(e,s)=>{for(var t in s)c.o(s,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},c.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),c.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),c.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var g={};return(()=>{"use strict";c.r(g),c.d(g,{chordParserFactory:()=>Er,chordRendererFactory:()=>gs});function e(r,f){return r.reduce(function(d,v){return d?v(d):null},f)}var s=c(361),t=c.n(s),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 v=Object.getOwnPropertySymbols(r);f&&(v=v.filter(function(C){return Object.getOwnPropertyDescriptor(r,C).enumerable})),d.push.apply(d,v)}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(v,C){return v.__proto__=C,v},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){$(d,r);var f=Q(d);function d(){var v;return B(this,d),v=f.call(this,"The given symbol is not a valid string"),v.name="InvalidInput",v}return X(d)}(G(Error)),at=function(r){$(d,r);var f=Q(d);function d(){var v;B(this,d);var C="An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?";return v=f.call(this,C),v.name="UnexpectedError",v}return X(d)}(G(Error)),et=function(r){$(d,r);var f=Q(d);function d(v,C,R){var U;return B(this,d),U=f.call(this,v),U.name=R,U.chord=C,U}return X(d)}(G(Error)),mt=function(r){$(d,r);var f=Q(d);function d(v){B(this,d);var C='"'.concat(v.input.symbol,'" does not seems to be a chord');return f.call(this,C,v,"NoSymbolFound")}return X(d)}(et),Tt=function(r){$(d,r);var f=Q(d);function d(v,C){B(this,d);var R='The chord descriptor "'.concat(v.input.descriptor,'" contains unknown or duplicated modifiers: "').concat(C,'"');return f.call(this,R,v,"InvalidModifier")}return X(d)}(et),Mt=function(r){$(d,r);var f=Q(d);function d(v,C){B(this,d);var R='"'.concat(v.input.symbol,'" describes a chord with an invalid intervals combo: ')+C.join(" and ");return f.call(this,R,v,"InvalidIntervals")}return X(d)}(et),$t=c(1469),Ht=c.n($t),Kt=c(8446),re=c.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 v=Ht()(f)?f:[f],C=d==="oneOf"?"some":"every";return v[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(v){return Wt(f,v)});if(d)throw new Mt(r,d);return r}function Vt(r){var f=r.formatted,d=f.rootNote,v=f.bassNote,C=f.descriptor,R=f.chordChanges,U=d;return C&&(U+=C),R&&R.length&&(U+="("+R.join(",")+")"),v&&(U+="/"+v),r.formatted.symbol=U,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,v=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)||be(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 be(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,v=new Array(f);dr.length)&&(f=r.length);for(var d=0,v=new Array(f);dr.length)&&(f=r.length);for(var d=0,v=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,v){return Ee[d]-Ee[v]})}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 Ba(r)||Ua(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 Ua(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ba(r){if(Array.isArray(r))return ke(r)}function ke(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,v=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=["b5","#5","b9","#9","#11","b13"],d=["english","german","latin"],v=r.notationSystems,C=v===void 0?t()(d):v,R=r.altIntervals,U=R===void 0?t()(f):R,J=r.customFilters,dt=J===void 0?[]:J;return Ha(U,f),Ka(C,d),n(dt),Ft;function Ft(Jt){var Pt=[];if(!Wa(Jt)){var ve=new Y;Pt.push(qe(ve))}var ye=t()(M).filter(function(Nt){return C.includes(Nt.name)}),Ut,xe,Bt;if(!Pt.length)for(;ye.length&&!Ut;){Bt=ye.shift(),xe=[Zt.bind(null,r),da.bind(null,Bt.notes),$e,Oa.bind(null,U),he,Un,yr,Ct,Vt,Xe].concat(za(dt));try{Ut=e(xe,Jt),Ut?Ut.input.notationSystem=Bt.name:Pt.push(Xa(Bt.name))}catch(Nt){Pt.push(qe(Nt,Bt.name))}}return Ut||{error:Pt}}}function Ha(r,f){Cr("altIntervals",r,f,!0)}function Ka(r,f){Cr("notationSystems",r,f)}function Cr(r,f,d,v){if(!Array.isArray(f))throw new TypeError("'".concat(r,"' should be an array"));if(!v&&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=$a;function Fr(r,f){var d=Object.keys(r);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(r);f&&(v=v.filter(function(C){return Object.getOwnPropertyDescriptor(r,C).enumerable})),d.push.apply(d,v)}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"]},v=ts()(f.normalized.intervals,d[r]);xt(v,["b3","3"])&&v.push(f.normalized.intents.major?"3":"b3"),xt(v,["b5","5","#5"])&&v.push("5"),f.normalized.intervals=v,f.normalized.semitones=v.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 rs=c(3137),ns=c.n(rs),Ir=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Dr={"C#":"Db","D#":"Eb","F#":"Gb","G#":"Ab","A#":"Bb"},as=ns()(Dr);function ss(r,f,d){var v=d.normalized,C=v.rootNote,R=v.bassNote,U=Nr(C);if(d.normalized.rootNote=Pr(U,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 v=Ir.indexOf(r),C=v+f,R=Math.floor(C/12),U=C-R*12,J=Ir[U];return d&&Dr[J]||J}function Nr(r){return as[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#"}},is=Object.keys(tr);function os(){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:is.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 us(r){delete r.parserConfiguration.notationSystems;var f=t()(r),d=Rr(r),v=Er(r.parserConfiguration),C=v(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 ls(r){return hs(r)||ps(r)||fs(r)||cs()}function cs(){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 fs(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 ps(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function hs(r){if(Array.isArray(r))return rr(r)}function rr(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,v=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=r.useShortNamings,d=f===void 0?!1:f,v=r.simplify,C=v===void 0?"none":v,R=r.transposeValue,U=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,ve=Pt===void 0?"text":Pt,ye=r.notationSystem,Ut=ye===void 0?"english":ye,xe=r.customFilters,Bt=xe===void 0?[]:xe;n(Bt);var Nt=[];return["max","core"].includes(C)&&Nt.push(es.bind(null,C)),(dt||U!==0)&&Nt.push(ss.bind(null,U,Jt)),d&&Nt.push(Ya),Nt.push.apply(Nt,[os.bind(null,Ut),Vt].concat(ls(Bt))),bs;function bs(_r){if(!ms(_r))return null;var Mr=e(Nt,t()(_r));return ve==="raw"?us(Mr):Rr(Mr)}}var ms=function(f){return f&&er(f)==="object"&&!f.error&&f.input};let gs=ds})(),g})()})});var _n=Ie(mn(),1);var Cn=Ie(jn(),1),Le=class{constructor(p){let c=/.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(p),e=decodeURIComponent(c[2]).split("===");e.length>1&&(this.name=e.pop()),this.songs=e.map(s=>{try{return new Ae(s,c[1]==="irealbook")}catch(t){let a=s.split("="),n=Ae.parseTitle(a[0].trim());return console.error(`[ireal-musicxml] [${n}] ${t}`),null}}).filter(s=>s!==null).reduce((s,t)=>{if(s.length>0){let a=(0,Cn.default)(s[s.length-1].title,t.title);if(a[0][0]===0&&a.every(n=>n[0]===0||n[1].match(/^\d+$/)))return s[s.length-1].cells=s[s.length-1].cells.concat(t.cells),s}return s.push(t),s},[])}},Ge=class{constructor(){this.annots=[],this.comments=[],this.bars="",this.spacer=0,this.chord=null}},ee=class{constructor(p,c="",g=null,e=null){this.note=p,this.modifiers=c,this.over=g,this.alternate=e}},Ae=class i{constructor(p,c=!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(c)this.title=i.parseTitle(g[0].trim()),this.composer=i.parseComposer(g[1].trim()),this.style=g[2].trim(),this.key=g[3],this.cells=this.parse(g[5]);else{this.title=i.parseTitle(g[0].trim()),this.composer=i.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(ks(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./,/^<.*?>/,i.chordRegex,i.chordRegex2];parse(p){let c=p.trim(),g=[];for(;c;){let a=!1;for(let n=0;n51;)c=i.substring(0,50),i=i.substring(50),p=p+qs(c);return p=p+i,p=p.replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," "),p}function qs(i){let p=i.split("");for(let c=0;c<5;c++)p[49-c]=i[c],p[c]=i[49-c];for(let c=10;c<24;c++)p[49-c]=i[c],p[c]=i[49-c];return p.join("")}var Nn=Ie(En(),1),Rn=Ie(Fn(),1);var Te={name:"ireal-musicxml",version:"2.0.4",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:"./build/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 && npm run build:d.ts","build:d.ts":"cp src/types/* build/","build:esm":"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js","build:cjs":"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs",test:"npm run build && npm run test:lint && npm run test:spec && npm run test:ts","test:spec":'node --test --test-name-pattern="${TEST:-.*}"',"test:ts":"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"}};var we=class{static name=Te.name;static version=Te.version;static author=Te.author;static description=Te.description};var{chordParserFactory:ei,chordRendererFactory:ri}=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,Be=class i{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":i.prototype.convertDaCapo,"D.C. al Fine":i.prototype.convertDaCapo,"D.C. al 1st End.":i.prototype.convertDaCapo,"D.C. al 2nd End.":i.prototype.convertDaCapo,"D.C. al 3rd End.":i.prototype.convertDaCapo,"D.S. al Coda":i.prototype.convertDalSegno,"D.S. al Fine":i.prototype.convertDalSegno,"D.S. al 1st End.":i.prototype.convertDalSegno,"D.S. al 2nd End.":i.prototype.convertDalSegno,"D.S. al 3rd End.":i.prototype.convertDalSegno,Fine:i.prototype.convertFine,"3x":i.prototype.convertRepeatNx,"4x":i.prototype.convertRepeatNx,"5x":i.prototype.convertRepeatNx,"6x":i.prototype.convertRepeatNx,"7x":i.prototype.convertRepeatNx,"8x":i.prototype.convertRepeatNx};static mapTime={24:{beats:2,beatType:4,beatUnit:1},34:{beats:3,beatType:4,beatUnit:.5},44:{beats:4,beatType:4,beatUnit:1},54:{beats:5,beatType:4,beatUnit:1},64:{beats:6,beatType:4,beatUnit:1},74:{beats:7,beatType:4,beatUnit:1},38:{beats:3,beatType:8,beatUnit:1},58:{beats:5,beatType:8,beatUnit:1},68:{beats:6,beatType:8,beatUnit:1},78:{beats:7,beatType:8,beatUnit:1},98:{beats:9,beatType:8,beatUnit:1},12:{beats:12,beatType:8,beatUnit:3},22:{beats:2,beatType:2,beatUnit:1},32:{beats:3,beatType:2,beatUnit:.5}};static convert(p,c={}){let g=Object.assign({},this.defaultOptions,c);return new i(p,g).convert()}constructor(p,c){this.song=p,this.options=c,this.time={beats:4,beatType:4,beatUnit:1},this.fifths=null,this.measure=null,this.barRepeat=0,this.codas=[],this.repeats=0,this.shortChord=!1,this.emptyCells=0,this.emptyCellNewSystem=!1,this.cellWidth=(this.options.pageWidth-2*this.options.pageMargin)/16,this.parseChord=ei({altIntervals:["b5","b9"]}),this.renderChord=ri({useShortNamings:!0,printer:"raw"})}convert(){return Nn.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":i.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":i._mmToTenths(this.options.pageHeight),"page-width":i._mmToTenths(this.options.pageWidth),"page-margins":{"left-margin":i._mmToTenths(this.options.pageMargin,4),"right-margin":i._mmToTenths(this.options.pageMargin,4),"top-margin":i._mmToTenths(this.options.pageMargin,4),"bottom-margin":i._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:i.reorderSequence(this,this.attributes,i.sequenceAttributes)}),this.chords.forEach(p=>{this.body._content.push({harmony:p.harmony},...p.notes.map(u=>({note:u})))}),this.barlines[0]._content=i.reorderSequence(this,this.barlines[0]._content,i.sequenceBarline),this.body._content.splice(1,0,this.barlines[0]),this.barlines[1]._content=i.reorderSequence(this,this.barlines[1]._content,i.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,this.short=!1}};convertMeasures(){let p=e=>e>0&&e%16===0,u=this.song.cells.reduce((e,s,t)=>{if((s.bars.match(/\(|\{|\[/)||!this.measure&&(s.chord||s.annots.length||s.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 i.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(s.bars,"left",p(t)||this.emptyCellNewSystem?"regular":void 0)),this.barRepeat&&(this.measure.chords=[...e[e.length-this.barRepeat-1].chords])),!this.measure)return(s.chord||s.annots.length||s.comments.length||s.bars&&s.bars!==")")&&this._log(tt.Warn,`Found non-empty orphan cell ${JSON.stringify(s)}`,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":i._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":i._mmToTenths(this.cellWidth*this.emptyCells)}]}}}):this.measure.body._content.splice(0,0,{_name:"print",_content:{"measure-layout":{"measure-distance":i._mmToTenths(this.cellWidth*this.emptyCells)}}})),this.emptyCellNewSystem=!1,this.emptyCells=0,s.chord)switch(s.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(s.chord)}`)),a){let n=a.chords[a.chords.length-1].ireal;n.over=s.chord.over,n.alternate=s.chord.alternate,this.measure.chords.push(this.convertChord(n))}break}case" ":{this._log(tt.Warn,`Unhandled empty/alternate chord ${JSON.stringify(s.chord)}`);break}default:this.measure.chords.push(this.convertChord(s.chord)),this.measure.chords[this.measure.chords.length-1].short=this.shortChord}else this.barRepeat||this.measure.chords.length&&this.measure.chords[this.measure.chords.length-1].spaces++;return s.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(c=>!!c.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(c=>c.barEnding===n-1);if(!o)this._log(tt.Error,`Cannot find ending ${n-1} in right barline of any measure`);else{let c=o.barlines[1]._content.findIndex(h=>!!h&&h._name==="ending");c===-1&&this._log(tt.Error,`Cannot find ending ${n-1} in right barline`,o),delete o.barlines[1]._content[c]}}this.measure.barEnding=n;break}case"Q":{this.measure.body._content.push(this.convertToCoda()),this.codas.push(this.measure);break}case"l":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!1),this.shortChord=!1;break}case"s":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!0),this.shortChord=!0;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}"`)}}),s.comments.map(a=>a.trim()).forEach(a=>{let n=this._map(i.mapRepeats,a);n?this.measure.body._content.push(n.call(this,a)):this.measure.body._content.push(this.convertComment(a))}),s.bars.match(/\)|\}|\]|Z/)&&this.measure.chords.length&&(this.measure.barlines.push(this.convertBarline(s.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":i._mmToTenths(this.cellWidth*g)}]}}}),this.codas.length){let e=this.codas[this.codas.length-1],s=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")));s===-1&&this._log(tt.Warn,"Cannot find sound direction",e),e.body._content[s]=this.convertCoda()}return u.map(e=>e.assemble())}static reorderSequence(p,u,g){return u.filter(e=>Object.keys(e).length).sort((e,s)=>{let t=Object.keys(e)[0];t==="_name"&&(t=e[t]);let a=Object.keys(s)[0];a==="_name"&&(a=s[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,g=void 0){let e=u==="left"?"none":"regular",s=null;return p.match(/\[|\]/)?e="light-light":p.match(/Z/)?e="light-heavy":p.match(/\{|\}/)&&(e=u==="left"?"heavy-light":"light-heavy",s=u==="left"?"forward":"backward"),s==="forward"&&(this.repeats=2),{_name:"barline",_attrs:{location:u},_content:[{"bar-style":g??e},{...s&&{_name:"repeat",_attrs:{direction:s,...s==="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]),e=1;return p==="12"&&(u=12,g=8,e=3),this.time={beats:u,beatType:g,beatMin:e},{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,e=!1;for(;u(g.notes=this.calculateChordDuration(1+g.spaces).map((e,s,t)=>this.convertChordNote(e,s===t.length-1?g.fermata:!1,this.options.notation==="rhythmic"&&t.length>1?s>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=i.mapFifthsToAlters[this.fifths>=0?"sharp":"flat"].slice(0,Math.abs(this.fifths)),s={_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}}),i.reorderSequence(this.measure,[s,{_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:i.reorderSequence(this.measure,t,i.sequenceNotations)}}].concat(Array(p.dots).fill({_name:"dot"})),i.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(i.mapAlter,u.input.rootNote[1]||null,null,`Unrecognized accidental in chord "${u.input.rootNote}"`),s=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(),c={9:"-ninth",11:"-11th",13:"-13th"};a=a.split("-")[0]+this._map(c,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((c,h)=>c===u.normalized.intervals[h]))return a=o.kind,o.intervals.forEach(c=>{u.normalized.alterations=u.normalized.alterations.filter(h=>h===c),u.normalized.adds=u.normalized.adds.filter(h=>h===c),u.normalized.omits=u.normalized.omits.filter(h=>h===c)}),u.normalized.intervals.forEach(c=>{o.intervals.includes(c)||u.normalized.adds.push(c)}),!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 c=o.slice(1);n.push(this.convertChordDegree(c,c==="5"||u.normalized.extensions.includes(c)?"alter":"add",this._map(i.mapAlter,o[0],0,`Unrecognized alter symbol in "${o}"`)))}),u.normalized.adds.forEach(o=>{let c=Object.keys(i.mapAlter).includes(o[0])?o[0]:null,h=c?o.slice(1):o;n.push(this.convertChordDegree(h,"add",this._map(i.mapAlter,c,0,`Unrecognized alter symbol in "${o}"`)))}),u.normalized.omits.forEach(o=>{let c=Object.keys(i.mapAlter).includes(o[0])?o[0]:null,h=c?o.slice(1):o;n.push(this.convertChordDegree(h,"subtract",this._map(i.mapAlter,c,0,`Unrecognized alter symbol in "${o}"`)))}),{rootStep:g,rootAlter:e,chordKind:a,chordDegrees:n,chordText:s}}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:s,chordDegrees:t,chordText:a}=this.convertChordSymbol(p),n=p.over?[{"bass-step":p.over.note[0]},{...p.over.note[1]&&{"bass-alter":this._map(i.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:s},{...n&&{bass:n}}].concat(t)}return p.alternate&&this._log(tt.Warn,`Unhandled alternate chord ${JSON.stringify(p.alternate)}`),new i.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 Ei(i,p={}){return new _n.default(u=>u(ni(i,p)))}export{Ge as Cell,ee as Chord,$e as Converter,tt as LogLevel,Le as Playlist,Ae as Song,we as Version,Ei as convert,ni as convertSync}; + `.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":i.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":i._mmToTenths(this.options.pageHeight),"page-width":i._mmToTenths(this.options.pageWidth),"page-margins":{"left-margin":i._mmToTenths(this.options.pageMargin,4),"right-margin":i._mmToTenths(this.options.pageMargin,4),"top-margin":i._mmToTenths(this.options.pageMargin,4),"bottom-margin":i._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:i.reorderSequence(this,this.attributes,i.sequenceAttributes)}),this.chords.forEach(p=>{this.body._content.push({harmony:p.harmony},...p.notes.map(c=>({note:c})))}),this.barlines[0]._content=i.reorderSequence(this,this.barlines[0]._content,i.sequenceBarline),this.body._content.splice(1,0,this.barlines[0]),this.barlines[1]._content=i.reorderSequence(this,this.barlines[1]._content,i.sequenceBarline),this.body._content.push(this.barlines[1]),this.body}};static Chord=class{constructor(p,c,g){this.harmony=p,this.notes=c,this.ireal=g,this.spaces=0,this.fermata=!1,this.short=!1}clone(){let p=new i.Chord(structuredClone(this.harmony),structuredClone(this.notes),structuredClone(this.ireal));return p.spaces=this.spaces,p.fermata=this.fermata,p.short=this.short,p}beats(){return this.short?1:1+this.spaces}};convertMeasures(){let p=e=>e>0&&e%16===0,c=this.song.cells.reduce((e,s,t)=>{if((s.bars.match(/\(|\{|\[/)||!this.measure&&(s.chord||s.annots.length||s.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 i.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(s.bars,"left",p(t)||this.emptyCellNewSystem?"regular":void 0)),this.barRepeat&&(this.measure.chords=e[e.length-this.barRepeat-1].chords.map(a=>a.clone()))),!this.measure)return(s.chord||s.annots.length||s.comments.length||s.bars&&s.bars!==")")&&this._log(tt.Warn,`Found non-empty orphan cell ${JSON.stringify(s)}`,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":i._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":i._mmToTenths(this.cellWidth*this.emptyCells)}]}}}):this.measure.body._content.splice(0,0,{_name:"print",_content:{"measure-layout":{"measure-distance":i._mmToTenths(this.cellWidth*this.emptyCells)}}})),this.emptyCellNewSystem=!1,this.emptyCells=0,s.chord)switch(s.chord.note){case"x":{this.barRepeat=1,this.measure.chords=e[e.length-this.barRepeat].chords.map(a=>a.clone());break}case"r":{this.barRepeat=2,this.measure.chords=e[e.length-this.barRepeat].chords.map(a=>a.clone());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(s.chord)}`)),a){let n=a.chords[a.chords.length-1].ireal;n.over=s.chord.over,n.alternate=s.chord.alternate,this.measure.chords.push(this.convertChord(n))}break}case" ":{this._log(tt.Warn,`Unhandled empty/alternate chord ${JSON.stringify(s.chord)}`);break}default:this.measure.chords.push(this.convertChord(s.chord)),this.measure.chords[this.measure.chords.length-1].short=this.shortChord}else this.barRepeat||this.measure.chords.length&&this.measure.chords[this.measure.chords.length-1].spaces++;return s.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":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!1),this.shortChord=!1;break}case"s":{this.measure.chords.length&&(this.measure.chords[this.measure.chords.length-1].short=!0),this.shortChord=!0;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}"`)}}),s.comments.map(a=>a.trim()).forEach(a=>{let n=this._map(i.mapRepeats,a);n?this.measure.body._content.push(n.call(this,a)):this.measure.body._content.push(this.convertComment(a))}),s.bars.match(/\)|\}|\]|Z/)&&this.measure.chords.length&&(this.measure.barlines.push(this.convertBarline(s.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&&c.length>0&&c[c.length-1].body._content.splice(0,0,{_name:"print",_content:{"system-layout":{"system-margins":[{"left-margin":"0.00"},{"right-margin":i._mmToTenths(this.cellWidth*g)}]}}}),this.codas.length){let e=this.codas[this.codas.length-1],s=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")));s===-1&&this._log(tt.Warn,"Cannot find sound direction",e),e.body._content[s]=this.convertCoda()}return c.map(e=>e.assemble())}static reorderSequence(p,c,g){return c.filter(e=>Object.keys(e).length).sort((e,s)=>{let t=Object.keys(e)[0];t==="_name"&&(t=e[t]);let a=Object.keys(s)[0];a==="_name"&&(a=s[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 c=null;(c=p.match(/(\d+)x/))!==null&&(this.repeats=c[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,c){return{_name:"ending",_attrs:{number:p,type:c},_content:`${p}.`}}convertBarline(p,c,g=void 0){let e=c==="left"?"none":"regular",s=null;return p.match(/\[|\]/)?e="light-light":p.match(/Z/)?e="light-heavy":p.match(/\{|\}/)&&(e=c==="left"?"heavy-light":"light-heavy",s=c==="left"?"forward":"backward"),s==="forward"&&(this.repeats=2),{_name:"barline",_attrs:{location:c},_content:[{"bar-style":g??e},{...s&&{_name:"repeat",_attrs:{direction:s,...s==="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){return this.time=this._map(i.mapTime,p,{beats:parseInt(p[0]),beatType:parseInt(p[1]),beatUnit:1},`Unexpected time signature ${p}`),{time:[{beats:this.time.beats},{"beat-type":this.time.beatType}]}}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 c=p.chords.reduce((g,e)=>g+e.beats()*this.time.beatUnit,0);if(!c)return this._log(tt.Warn,"No chord found. Skipping current measure.",p),!1;if(c>this.time.beats){let g=0;for(;c>this.time.beats;)p.chords[g].spaces>0&&(p.chords[g].spaces--,c-=this.time.beatUnit),g=(g+1)%p.chords.length}else{let g=0,e=!1;for(;c(g.notes=this.calculateChordDuration(g.beats()*this.time.beatUnit).map((e,s,t)=>this.convertChordNote(e,s===t.length-1?g.fermata:!1,this.options.notation==="rhythmic"&&t.length>1?s>0?"stop":"start":null)),g)),!0}calculateChordDuration(p){let c={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(c,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(c,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,c=!1,g=null){let e=i.mapFifthsToAlters[this.fifths>=0?"sharp":"flat"].slice(0,Math.abs(this.fifths)),s={_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 c&&t.push({_name:"fermata"}),g&&t.push({_name:"tied",_attrs:{type:g}}),i.reorderSequence(this.measure,[s,{_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:i.reorderSequence(this.measure,t,i.sequenceNotations)}}].concat(Array(p.dots).fill({_name:"dot"})),i.sequenceNote)}convertChordDegree(p,c,g){return{_name:"degree",_attrs:{"print-object":"no"},_content:[{"degree-value":p},{"degree-alter":g},{"degree-type":c}]}}convertChordSymbol(p){let c=this.renderChord(this.parseChord(`${p.note}${p.modifiers}`));if(!c)return this._log(tt.Warn,`Unrecognized chord "${p.note}${p.modifiers}"`),{rootStep:null,rootAlter:null,chordKind:null,chordDegrees:[],chordText:null};let g=c.input.rootNote[0],e=this._map(i.mapAlter,c.input.rootNote[1]||null,null,`Unrecognized accidental in chord "${c.input.rootNote}"`),s=c.formatted.descriptor+c.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,c.normalized.quality,"",`Unrecognized chord quality "${c.normalized.quality}"`);if(c.normalized.extensions.length){let o=Math.max(...c.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"&&(c.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||c.normalized.intervals.length===o.intervals.length)&&o.intervals.every((l,h)=>l===c.normalized.intervals[h]))return a=o.kind,o.intervals.forEach(l=>{c.normalized.alterations=c.normalized.alterations.filter(h=>h===l),c.normalized.adds=c.normalized.adds.filter(h=>h===l),c.normalized.omits=c.normalized.omits.filter(h=>h===l)}),c.normalized.intervals.forEach(l=>{o.intervals.includes(l)||c.normalized.adds.push(l)}),!0});let n=[];return c.normalized.isSuspended&&!a.includes("suspended")&&(c.normalized.adds.push("4"),c.normalized.adds.includes("3")||c.normalized.omits.push("3")),c.normalized.alterations.forEach(o=>{let l=o.slice(1);n.push(this.convertChordDegree(l,l==="5"||c.normalized.extensions.includes(l)?"alter":"add",this._map(i.mapAlter,o[0],0,`Unrecognized alter symbol in "${o}"`)))}),c.normalized.adds.forEach(o=>{let l=Object.keys(i.mapAlter).includes(o[0])?o[0]:null,h=l?o.slice(1):o;n.push(this.convertChordDegree(h,"add",this._map(i.mapAlter,l,0,`Unrecognized alter symbol in "${o}"`)))}),c.normalized.omits.forEach(o=>{let l=Object.keys(i.mapAlter).includes(o[0])?o[0]:null,h=l?o.slice(1):o;n.push(this.convertChordDegree(h,"subtract",this._map(i.mapAlter,l,0,`Unrecognized alter symbol in "${o}"`)))}),{rootStep:g,rootAlter:e,chordKind:a,chordDegrees:n,chordText:s}}convertChord(p){let c=null;if(p.note==="n")c=[{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:s,chordDegrees:t,chordText:a}=this.convertChordSymbol(p),n=p.over?[{"bass-step":p.over.note[0]},{...p.over.note[1]&&{"bass-alter":this._map(i.mapAlter,p.over.note[1],null,`Unrecognized accidental in bass note "${p.over.note}"`)}}]:null;c=[{root:[{"root-step":g},{...e&&{"root-alter":e}}]},{_name:"kind",_attrs:{text:a,"use-symbols":"no"},_content:s},{...n&&{bass:n}}].concat(t)}return p.alternate&&this._log(tt.Warn,`Unhandled alternate chord ${JSON.stringify(p.alternate)}`),new i.Chord(c,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,c){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{words:p}]},{sound:[{play:[{_name:"other-play",_attrs:{type:"groove"},_content:c||p}]}]}]}}_log(p,c,g=this.measure){if(p{g.musicXml=Be.convert(g,p)}),c}async function Ei(i,p={}){return new _n.default(c=>c(ni(i,p)))}export{Ge as Cell,ee as Chord,Be as Converter,tt as LogLevel,Le as Playlist,Ae as Song,we as Version,Ei as convert,ni as convertSync}; //# sourceMappingURL=ireal-musicxml.js.map diff --git a/build/ireal-musicxml.js.map b/build/ireal-musicxml.js.map index f9018d0..85ecea0 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, beatMin: 1 };\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.shortChord = false; // was 's' annotation encountered?\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 this.short = 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', (isNewSystem(cellIndex) || this.emptyCellNewSystem) ? 'regular' : undefined));\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 this.measure.chords[this.measure.chords.length-1].short = this.shortChord;\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 // Short and long chord settings.\n // These will affect the calculation of chord durations.\n // Set the current chord size setting and remember it for subsequent chords.\n case 'l': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = false;\n }\n this.shortChord = false;\n break;\n }\n case 's': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = true;\n }\n this.shortChord = true;\n break;\n }\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, forced = undefined) {\n let style = location === 'left' ? 'none' : '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': forced ?? 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 let beatMin = 1;\n if (time === '12') {\n beats = 12;\n beatType = 8;\n beatMin = 3;\n }\n this.time = { beats, beatType, beatMin };\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 // => Short chords always remain 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, except for short chords.\n let chordIndex = 0;\n let hasBeatsChangedInACycle = false;\n while (beats < this.time.beats) {\n if (!measure.chords[chordIndex].short) {\n measure.chords[chordIndex].spaces++;\n beats++;\n hasBeatsChangedInACycle = true;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n if (chordIndex === 0 && !hasBeatsChangedInACycle) {\n // We've made a complete cycle and beat count has not changed - break now.\n break;\n }\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.3\",\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\": \"./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 \"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 && npm run build:d.ts\",\n \"build:d.ts\": \"cp src/types/* build/\",\n \"build:esm\": \"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js\",\n \"build:cjs\": \"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs\",\n \"test\": \"npm run build && npm run test:lint && npm run test:spec && npm run test:ts\",\n \"test:spec\": \"node --test --test-name-pattern=\\\"${TEST:-.*}\\\"\",\n \"test:ts\": \"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": "0hBAAA,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,GAIXD,GAIAE,GAAQ,EAIRC,GAAW,KAQf,SAASC,IAAQ,CACb,KAAOF,GAAQH,GAAM,QAAQ,CACzB,IAAIM,EAAeH,GAUnB,GAPAA,GAAQA,GAAQ,EAChBH,GAAMM,CAAY,EAAE,KAAK,EAMrBH,GAAQC,GAAU,CAGlB,QAASG,EAAO,EAAGC,EAAYR,GAAM,OAASG,GAAOI,EAAOC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F,GAAiBD,GAC9BgG,EAAQ,KAAK,IAAI,GAAID,CAAQ,EACnC,OAAO,KAAK,MAAM5B,EAAQ6B,CAAK,EAAIA,CACrC,CACF,EFpyCO,SAASC,GAAYC,EAAOC,EAAU,CAAC,EAAG,CAC/C,IAAMC,EAAW,IAAIC,GAASH,CAAK,EACnC,OAAAE,EAAS,MAAM,QAAQE,GAAQ,CAC7BA,EAAK,SAAWC,GAAU,QAAQD,EAAMH,CAAO,CACjD,CAAC,EACMC,CACT,CAEA,eAAsBI,GAAQN,EAAOC,EAAU,CAAC,EAAG,CACjD,OAAO,IAAI,GAAAM,QAAQC,GAAWA,EAAQT,GAAYC,EAAOC,CAAO,CAAC,CAAC,CACpE", - "names": ["require_browser_raw", "__commonJSMin", "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", "i", "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_", "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", "s", "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", "forced", "style", "repeat", "bpm", "beats", "beatType", "beatMin", "chordIndex", "hasBeatsChangedInACycle", "duration", "i", "ds", "mapDuration", "fermata", "tie", "altered", "noteType", "notations", "value", "alter", "parsedChord", "rootStep", "rootAlter", "chordText", "mapKind", "chordKind", "extension", "e", "mapExtensionKind", "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 mapTime = {\n \"24\": { beats: 2, beatType: 4, beatUnit: 1 },\n \"34\": { beats: 3, beatType: 4, beatUnit: 0.5 },\n \"44\": { beats: 4, beatType: 4, beatUnit: 1 },\n \"54\": { beats: 5, beatType: 4, beatUnit: 1 },\n \"64\": { beats: 6, beatType: 4, beatUnit: 1 },\n \"74\": { beats: 7, beatType: 4, beatUnit: 1 },\n \"38\": { beats: 3, beatType: 8, beatUnit: 1 },\n \"58\": { beats: 5, beatType: 8, beatUnit: 1 },\n \"68\": { beats: 6, beatType: 8, beatUnit: 1 },\n \"78\": { beats: 7, beatType: 8, beatUnit: 1 },\n \"98\": { beats: 9, beatType: 8, beatUnit: 1 },\n \"12\": { beats: 12, beatType: 8, beatUnit: 3 },\n \"22\": { beats: 2, beatType: 2, beatUnit: 1 },\n \"32\": { beats: 3, beatType: 2, beatUnit: 0.5 },\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, beatUnit: 1 };\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.shortChord = false; // was 's' annotation encountered?\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 this.short = false;\n }\n\n clone() {\n const chord = new Converter.Chord(\n structuredClone(this.harmony),\n structuredClone(this.notes),\n structuredClone(this.ireal)\n );\n chord.spaces = this.spaces;\n chord.fermata = this.fermata;\n chord.short = this.short;\n return chord;\n }\n\n beats() {\n return this.short ? 1 : 1 + this.spaces;\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', (isNewSystem(cellIndex) || this.emptyCellNewSystem) ? 'regular' : undefined));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n this.measure.chords = measures[measures.length-this.barRepeat-1].chords.map(chord => chord.clone());\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 this.measure.chords = measures[measures.length-this.barRepeat].chords.map(chord => chord.clone());\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 this.measure.chords = measures[measures.length-this.barRepeat].chords.map(chord => chord.clone());\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 this.measure.chords[this.measure.chords.length-1].short = this.shortChord;\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 // Short and long chord settings.\n // These will affect the calculation of chord durations.\n // Set the current chord size setting and remember it for subsequent chords.\n case 'l': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = false;\n }\n this.shortChord = false;\n break;\n }\n case 's': {\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].short = true;\n }\n this.shortChord = true;\n break;\n }\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, forced = undefined) {\n let style = location === 'left' ? 'none' : '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': forced ?? 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 this.time = this._map(\n Converter.mapTime, time, {\n beats: parseInt(time[0]), beatType: parseInt(time[1]), beatUnit: 1\n }, `Unexpected time signature ${time}`\n );\n return {\n 'time': [{\n 'beats': this.time.beats\n }, {\n 'beat-type': this.time.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 // => Short chords always remain 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 + chord.beats() * this.time.beatUnit, 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 -= this.time.beatUnit;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords, except for short chords.\n let chordIndex = 0;\n let hasBeatsChangedInACycle = false;\n while (beats < this.time.beats) {\n if (!measure.chords[chordIndex].short) {\n measure.chords[chordIndex].spaces++;\n beats += this.time.beatUnit;\n hasBeatsChangedInACycle = true;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n if (chordIndex === 0 && !hasBeatsChangedInACycle) {\n // We've made a complete cycle and beat count has not changed - break now.\n this._log(LogLevel.Warn, `Cannot add more beats to the current measure.`, measure);\n break;\n }\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(chord.beats() * this.time.beatUnit).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.4\",\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\": \"./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 \"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 && npm run build:d.ts\",\n \"build:d.ts\": \"cp src/types/* build/\",\n \"build:esm\": \"esbuild src/lib/index.js --bundle --format=esm --minify --sourcemap --outfile=build/ireal-musicxml.js\",\n \"build:cjs\": \"esbuild src/lib/index.js --bundle --platform=node --packages=external --minify --sourcemap --outfile=build/ireal-musicxml.cjs\",\n \"test\": \"npm run build && npm run test:lint && npm run test:spec && npm run test:ts\",\n \"test:spec\": \"node --test --test-name-pattern=\\\"${TEST:-.*}\\\"\",\n \"test:ts\": \"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": "0hBAAA,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,GAIXD,GAIAE,GAAQ,EAIRC,GAAW,KAQf,SAASC,IAAQ,CACb,KAAOF,GAAQH,GAAM,QAAQ,CACzB,IAAIM,EAAeH,GAUnB,GAPAA,GAAQA,GAAQ,EAChBH,GAAMM,CAAY,EAAE,KAAK,EAMrBH,GAAQC,GAAU,CAGlB,QAASG,EAAO,EAAGC,EAAYR,GAAM,OAASG,GAAOI,EAAOC,EAAWD,IACnEP,GAAMO,CAAI,EAAIP,GAAMO,EAAOJ,EAAK,EAEpCH,GAAM,QAAUG,GAChBA,GAAQ,CACZ,CACJ,CACAH,GAAM,OAAS,EACfG,GAAQ,EACRD,GAAW,EACf,CAYA,IAAIO,GAAQ,OAAO,OAAW,IAAc,OAAS,KACjDC,GAA0BD,GAAM,kBAAoBA,GAAM,uBAa1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,CAC7BA,EAAK,SAAWC,GAAU,QAAQD,EAAMH,CAAO,CACjD,CAAC,EACMC,CACT,CAEA,eAAsBI,GAAQN,EAAOC,EAAU,CAAC,EAAG,CACjD,OAAO,IAAI,GAAAM,QAAQC,GAAWA,EAAQT,GAAYC,EAAOC,CAAO,CAAC,CAAC,CACpE", + "names": ["require_browser_raw", "__commonJSMin", "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", "i", "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_", "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", "s", "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", "forced", "style", "repeat", "bpm", "beats", "chordIndex", "hasBeatsChangedInACycle", "duration", "i", "ds", "mapDuration", "fermata", "tie", "altered", "noteType", "notations", "value", "alter", "parsedChord", "rootStep", "rootAlter", "chordText", "mapKind", "chordKind", "extension", "e", "mapExtensionKind", "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"] } diff --git a/package-lock.json b/package-lock.json index 5e2e17b..d64e3b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ireal-musicxml", - "version": "2.0.3", + "version": "2.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ireal-musicxml", - "version": "2.0.3", + "version": "2.0.4", "license": "GPL-3.0-only", "dependencies": { "chord-symbol": "^3.0.0", @@ -543,9 +543,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", - "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.14.0.tgz", + "integrity": "sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==", "dev": true, "license": "MIT", "engines": { @@ -563,9 +563,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.1.tgz", - "integrity": "sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -576,9 +576,9 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", - "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -586,19 +586,33 @@ } }, "node_modules/@humanfs/node": { - "version": "0.16.5", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", - "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.0", + "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -614,9 +628,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -698,9 +712,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.8.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.1.tgz", - "integrity": "sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, "license": "MIT", "dependencies": { @@ -895,9 +909,9 @@ "license": "MIT" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dev": true, "license": "MIT", "dependencies": { @@ -998,22 +1012,22 @@ } }, "node_modules/eslint": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", - "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.14.0.tgz", + "integrity": "sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", + "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.18.0", "@eslint/core": "^0.7.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.13.0", + "@eslint/js": "9.14.0", "@eslint/plugin-kit": "^0.2.0", - "@humanfs/node": "^0.16.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.1", + "@humanwhocodes/retry": "^0.4.0", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -1021,9 +1035,9 @@ "cross-spawn": "^7.0.2", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.1.0", - "eslint-visitor-keys": "^4.1.0", - "espree": "^10.2.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1059,9 +1073,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", - "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -1076,9 +1090,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1089,15 +1103,15 @@ } }, "node_modules/espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index b534006..eb3d7ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ireal-musicxml", - "version": "2.0.3", + "version": "2.0.4", "description": "iReal Pro to MusicXML converter.", "author": "Karim Ratib (https://github.com/infojunkie)", "license": "GPL-3.0-only", diff --git a/src/lib/converter.js b/src/lib/converter.js index 1ec68b1..e64257f 100644 --- a/src/lib/converter.js +++ b/src/lib/converter.js @@ -135,6 +135,23 @@ export class Converter { "8x": Converter.prototype.convertRepeatNx }; + static mapTime = { + "24": { beats: 2, beatType: 4, beatUnit: 1 }, + "34": { beats: 3, beatType: 4, beatUnit: 0.5 }, + "44": { beats: 4, beatType: 4, beatUnit: 1 }, + "54": { beats: 5, beatType: 4, beatUnit: 1 }, + "64": { beats: 6, beatType: 4, beatUnit: 1 }, + "74": { beats: 7, beatType: 4, beatUnit: 1 }, + "38": { beats: 3, beatType: 8, beatUnit: 1 }, + "58": { beats: 5, beatType: 8, beatUnit: 1 }, + "68": { beats: 6, beatType: 8, beatUnit: 1 }, + "78": { beats: 7, beatType: 8, beatUnit: 1 }, + "98": { beats: 9, beatType: 8, beatUnit: 1 }, + "12": { beats: 12, beatType: 8, beatUnit: 3 }, + "22": { beats: 2, beatType: 2, beatUnit: 1 }, + "32": { beats: 3, beatType: 2, beatUnit: 0.5 }, + }; + static convert(song, options = {}) { const realOptions = Object.assign({}, this.defaultOptions, options); return new Converter(song, realOptions).convert(); @@ -143,7 +160,7 @@ export class Converter { constructor(song, options) { this.song = song; this.options = options; - this.time = { beats: 4, beatType: 4, beatMin: 1 }; + this.time = { beats: 4, beatType: 4, beatUnit: 1 }; this.fifths = null; // key signature's degree of fifths this.measure = null; // current measure (of class Measure) being built this.barRepeat = 0; // current bar number for single- and double-bar repeats @@ -308,6 +325,22 @@ export class Converter { this.fermata = false; this.short = false; } + + clone() { + const chord = new Converter.Chord( + structuredClone(this.harmony), + structuredClone(this.notes), + structuredClone(this.ireal) + ); + chord.spaces = this.spaces; + chord.fermata = this.fermata; + chord.short = this.short; + return chord; + } + + beats() { + return this.short ? 1 : 1 + this.spaces; + } }; convertMeasures() { @@ -365,8 +398,7 @@ export class Converter { // If we're still repeating bars, copy the previous bar now. if (this.barRepeat) { - // TODO We should probably deep-copy those measures. - this.measure.chords = [...measures[measures.length-this.barRepeat-1].chords]; + this.measure.chords = measures[measures.length-this.barRepeat-1].chords.map(chord => chord.clone()); } } @@ -447,8 +479,7 @@ export class Converter { case 'x': { // Handle single bar repeat. this.barRepeat = 1; - // TODO We should probably deep-copy those measures. - this.measure.chords = [...measures[measures.length-this.barRepeat].chords]; + this.measure.chords = measures[measures.length-this.barRepeat].chords.map(chord => chord.clone()); break; } case 'r': { @@ -457,8 +488,7 @@ export class Converter { // Here, we copy the next-to-last measure and set the repeat flag. // The next opening measure will pick up the remaining measure. this.barRepeat = 2; - // TODO We should probably deep-copy those measures. - this.measure.chords = [...measures[measures.length-this.barRepeat].chords]; + this.measure.chords = measures[measures.length-this.barRepeat].chords.map(chord => chord.clone()); break; } case 'p': @@ -882,20 +912,16 @@ export class Converter { } convertTime(time) { - let beats = parseInt(time[0]); - let beatType = parseInt(time[1]); - let beatMin = 1; - if (time === '12') { - beats = 12; - beatType = 8; - beatMin = 3; - } - this.time = { beats, beatType, beatMin }; + this.time = this._map( + Converter.mapTime, time, { + beats: parseInt(time[0]), beatType: parseInt(time[1]), beatUnit: 1 + }, `Unexpected time signature ${time}` + ); return { 'time': [{ - 'beats': beats + 'beats': this.time.beats }, { - 'beat-type': beatType + 'beat-type': this.time.beatType }] }; } @@ -919,7 +945,7 @@ export class Converter { this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure); return true; } - let beats = measure.chords.reduce((beats, chord) => beats+1+chord.spaces, 0); + let beats = measure.chords.reduce((beats, chord) => beats + chord.beats() * this.time.beatUnit, 0); if (!beats) { this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure); return false; @@ -931,7 +957,7 @@ export class Converter { while (beats > this.time.beats) { if (measure.chords[chordIndex].spaces > 0) { measure.chords[chordIndex].spaces--; - beats--; + beats -= this.time.beatUnit; } chordIndex = (chordIndex + 1) % measure.chords.length; } @@ -943,12 +969,13 @@ export class Converter { while (beats < this.time.beats) { if (!measure.chords[chordIndex].short) { measure.chords[chordIndex].spaces++; - beats++; + beats += this.time.beatUnit; hasBeatsChangedInACycle = true; } chordIndex = (chordIndex + 1) % measure.chords.length; if (chordIndex === 0 && !hasBeatsChangedInACycle) { // We've made a complete cycle and beat count has not changed - break now. + this._log(LogLevel.Warn, `Cannot add more beats to the current measure.`, measure); break; } } @@ -956,7 +983,7 @@ export class Converter { // Adjust actual chord durations. measure.chords = measure.chords.map(chord => { - chord.notes = this.calculateChordDuration(1+chord.spaces).map((duration, i, ds) => + chord.notes = this.calculateChordDuration(chord.beats() * this.time.beatUnit).map((duration, i, ds) => this.convertChordNote( duration, i === ds.length - 1 ? chord.fermata : false, // Possible fermata on last chord note only diff --git a/test/bugs.spec.js b/test/bugs.spec.js index 0fd87cb..1eedc7c 100644 --- a/test/bugs.spec.js +++ b/test/bugs.spec.js @@ -9,13 +9,15 @@ import { Converter } from '../src/lib/converter.js'; let jazz = null; let blues = null; +let pop = null; before(() => { jazz = new Playlist(fs.readFileSync('test/data/jazz1460.txt', 'utf-8')); blues = new Playlist(fs.readFileSync('test/data/blues50.txt', 'utf-8')); + pop = new Playlist(fs.readFileSync('test/data/pop400.txt', 'utf-8')); }) -describe('Bug Fixes', () => { +describe('Bug fix', () => { it('checks #18 cannot read property \'spaces\' of undefined', async () => { for (const title of [ "All Or Nothing At All", @@ -67,19 +69,48 @@ describe('Bug Fixes', () => { } }); - it('Doesn\'t crash on empty songs', async () => { + it('doesn\'t crash on empty songs', async () => { const brendan = new Playlist(fs.readFileSync('test/data/brendan.html', 'utf-8')); }); - it('Checks #54 messy chord timings', async () => { - const song = blues.songs.find(song => song.title === "Come Back Baby"); - assert.notStrictEqual(song, undefined); - const musicXml = Converter.convert(song); - await validateXMLWithXSD(musicXml, 'test/data/musicxml.xsd'); - fs.writeFileSync(`test/output/${song.title}.musicxml`, musicXml); - const doc = new DOMParser().parseFromString(musicXml); - const duration = select(doc, '//measure[3]/harmony[root/root-step = "G"]/following-sibling::note/duration/text()'); - assert.strictEqual(duration[0].toString(), '384'); + it('checks #54 messy chord timings', async () => { + for (const test of [{ + title: "Come Back Baby", + playlist: blues, + check: doc => { + const duration = select(doc, '//measure[3]/harmony[2]/following-sibling::note/duration/text()'); + assert.strictEqual(duration[0].toString(), '1152'); + } + }, { + title: "Afro Blue", + playlist: jazz, + check: doc => { + const duration = select(doc, '//measure[3]/harmony[1]/following-sibling::note/duration/text()'); + assert.strictEqual(duration[0].toString(), '1152'); + } + }, { + title: "Take Five", + playlist: jazz, + check: doc => { + const duration = select(doc, '//measure[1]/harmony[1]/following-sibling::note/duration/text()'); + assert.strictEqual(duration[0].toString(), '2304'); + } + }, { + title: "That's What Friends Are For", + playlist: pop, + check: doc => { + const duration = select(doc, '//measure[22]/harmony[1]/following-sibling::note/duration/text()'); + assert.strictEqual(duration[0].toString(), '3072'); + } + }]) { + const song = test.playlist.songs.find(song => song.title === test.title); + assert.notStrictEqual(song, undefined); + const musicXml = Converter.convert(song); + await validateXMLWithXSD(musicXml, 'test/data/musicxml.xsd'); + fs.writeFileSync(`test/output/${song.title}.musicxml`, musicXml); + const doc = new DOMParser().parseFromString(musicXml); + test.check(doc); + } }); it('checks #62 invalid file', async () => { diff --git a/test/converter.spec.js b/test/converter.spec.js index b7ef3ea..5847d44 100644 --- a/test/converter.spec.js +++ b/test/converter.spec.js @@ -18,7 +18,7 @@ before(() => { playlist = new Playlist(fs.readFileSync('test/data/playlist.html', 'utf-8')); strange = new Playlist(fs.readFileSync('test/data/strange.html', 'utf-8')); blues = new Playlist(fs.readFileSync('test/data/blues50.txt', 'utf-8')); - pop = new Playlist(fs.readFileSync('test/data/pop.txt', 'utf-8')); + pop = new Playlist(fs.readFileSync('test/data/pop400.txt', 'utf-8')); }) describe('Converter', () => { diff --git a/test/data/pop.txt b/test/data/pop400.txt similarity index 100% rename from test/data/pop.txt rename to test/data/pop400.txt diff --git a/test/parser.spec.js b/test/parser.spec.js index afe2860..f572612 100644 --- a/test/parser.spec.js +++ b/test/parser.spec.js @@ -29,7 +29,7 @@ describe('Parser', function() { }); it('should concatenate multi-part songs', function() { - const playlist = new Playlist(fs.readFileSync('test/data/pop.txt', 'utf-8')); + const playlist = new Playlist(fs.readFileSync('test/data/pop400.txt', 'utf-8')); const songs = playlist.songs.filter(song => song.title.includes('She\'s Always A Woman')); assert.strictEqual(songs.length, 1); });