text: // ==UserScript==
  // @name          abcjs
  // @namespace     http://code.google.com/p/abcjs
  // @description	  This searches any page you load for ABC-formatted music and inserts the standard notation for it.
  // ==/UserScript==
  
  // Because the js files are concatenated, these variables will be visible to the ones in abcjs_plugin user script.
  // However, this file is not included in the regular abcjs_plugin, so that won't be affected.
  var abcjs_is_user_script = true;
  var scripts = document.getElementsByTagName('script');
  var abcjs_plugin_autostart = true;
  for (var i = 0; i < scripts.length; i++) {
  	var src = scripts[i].src;
  	if (src.indexOf('abcjs') > 0)
  		abcjs_plugin_autostart = false;
  }
  /*! abcjs v3.1.3 Copyright © 2009-2016 Paul Rosen and Gregory Dyke (http://abcjs.net) */
  !function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.ABCJS=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var parseCommon=require("../parse/abc_common"),Parse=require("../parse/abc_parse"),tunebook={};!function(){"use strict";tunebook.numberOfTunes=function(abc){var tunes=abc.split("\nX:"),num=tunes.length;return 0===num&&(num=1),num};var TuneBook=tunebook.TuneBook=function(book){var This=this,directives="";book=parseCommon.strip(book);for(var tunes=book.split("\nX:"),i=1;i<tunes.length;i++)tunes[i]="X:"+tunes[i];var pos=0;if(This.tunes=[],parseCommon.each(tunes,function(tune){This.tunes.push({abc:tune,startPos:pos}),pos+=tune.length}),This.tunes.length>1&&!parseCommon.startsWith(This.tunes[0].abc,"X:")){var dir=This.tunes.shift(),arrDir=dir.abc.split("\n");parseCommon.each(arrDir,function(line){parseCommon.startsWith(line,"%%")&&(directives+=line+"\n")})}This.header=directives,parseCommon.each(This.tunes,function(tune){var end=tune.abc.indexOf("\n\n");end>0&&(tune.abc=tune.abc.substring(0,end)),tune.pure=tune.abc,tune.abc=directives+tune.abc;var title=tune.pure.split("T:");title.length>1?(title=title[1].split("\n"),tune.title=title[0].replace(/^\s+|\s+$/g,"")):tune.title="";var id=tune.pure.substring(2,tune.pure.indexOf("\n"));tune.id=id.replace(/^\s+|\s+$/g,"")})};TuneBook.prototype.getTuneById=function(id){for(var i=0;i<this.tunes.length;i++)if(this.tunes[i].id===id)return this.tunes[i];return null},TuneBook.prototype.getTuneByTitle=function(title){for(var i=0;i<this.tunes.length;i++)if(this.tunes[i].title===title)return this.tunes[i];return null},tunebook.renderEngine=function(callback,output,abc,parserParams,renderParams){var ret=[];if(void 0!==output&&void 0!==abc){(function(testObject){return testObject&&!testObject.propertyIsEnumerable("length")&&"object"==typeof testObject&&"number"==typeof testObject.length})(output)||(output=[output]),void 0===parserParams&&(parserParams={}),void 0===renderParams&&(renderParams={});for(var currentTune=renderParams.startingTune?renderParams.startingTune:0,book=new TuneBook(abc),abcParser=new Parse,i=0;i<output.length;i++){var div=output[i];if("string"==typeof div&&(div=document.getElementById(div)),div&&(div.innerHTML="",currentTune<book.tunes.length)){abcParser.parse(book.tunes[currentTune].abc,parserParams);var tune=abcParser.getTune();ret.push(tune),callback(div,tune,i)}currentTune++}return ret}}}(),module.exports=tunebook},{"../parse/abc_common":5,"../parse/abc_parse":6}],2:[function(require,module,exports){var parseCommon=require("../parse/abc_common"),parseKeyVoice=require("../parse/abc_parse_key_voice"),spacing=require("../write/abc_spacing"),Tune=function(){function addVerticalInfo(timingEvents){for(var lastBarTop,lastBarBottom,lastEventTop,lastEventBottom,e=timingEvents.length-1;e>=0;e--){var ev=timingEvents[e];"bar"===ev.type?(ev.top=lastEventTop,ev.nextTop=lastBarTop,lastBarTop=lastEventTop,ev.bottom=lastEventBottom,ev.nextBottom=lastBarBottom,lastBarBottom=lastEventBottom):"event"===ev.type&&(lastEventTop=ev.top,lastEventBottom=ev.top+ev.height)}}function makeSortedArray(hash){var arr=[];for(var k in hash)hash.hasOwnProperty(k)&&arr.push(hash[k]);return arr=arr.sort(function(a,b){var diff=a.seconds-b.seconds;return 0!==diff?diff:"bar"===a.type?-1:1})}this.getBeatLength=function(){for(var i=0;i<this.lines.length;i++)if(this.lines[i].staff)for(var j=0;j<this.lines[i].staff.length;j++)if(this.lines[i].staff[j].meter){var meter=this.lines[i].staff[j].meter;if("specified"===meter.type){if(meter.value.length>0){var num=parseInt(meter.value[0].num,10),den=parseInt(meter.value[0].den,10);return 6===num&&8===den?3/8:9===num&&8===den?3/8:12===num&&8===den?3/8:1/den}return null}return"cut_time"===meter.type?.5:.25}return null},this.reset=function(){this.version="1.0.1",this.media="screen",this.metaText={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0},this.cleanUp=function(defWidth,defLength,barsperstaff,staffnonote,currSlur){function fixClefPlacement(el){parseKeyVoice.fixClef(el)}this.closeLine();var i,s,v,anyDeleted=!1;for(i=0;i<this.lines.length;i++)if(void 0!==this.lines[i].staff){var hasAny=!1;for(s=0;s<this.lines[i].staff.length;s++)if(void 0===this.lines[i].staff[s])anyDeleted=!0,this.lines[i].staff[s]=null;else for(v=0;v<this.lines[i].staff[s].voices.length;v++)void 0===this.lines[i].staff[s].voices[v]?this.lines[i].staff[s].voices[v]=[]:this.containsNotes(this.lines[i].staff[s].voices[v])&&(hasAny=!0);hasAny||(this.lines[i]=null,anyDeleted=!0)}if(anyDeleted&&(this.lines=parseCommon.compact(this.lines),parseCommon.each(this.lines,function(line){line.staff&&(line.staff=parseCommon.compact(line.staff))})),barsperstaff)for(i=0;i<this.lines.length;i++)if(void 0!==this.lines[i].staff)for(s=0;s<this.lines[i].staff.length;s++)for(v=0;v<this.lines[i].staff[s].voices.length;v++)for(var barNumThisLine=0,n=0;n<this.lines[i].staff[s].voices[v].length;n++)if("bar"===this.lines[i].staff[s].voices[v][n].el_type&&++barNumThisLine>=barsperstaff&&n<this.lines[i].staff[s].voices[v].length-1){if(i===this.lines.length-1){var cp=JSON.parse(JSON.stringify(this.lines[i]));this.lines.push(parseCommon.clone(cp));for(var ss=0;ss<this.lines[i+1].staff.length;ss++)for(var vv=0;vv<this.lines[i+1].staff[ss].voices.length;vv++)this.lines[i+1].staff[ss].voices[vv]=[]}var startElement=n+1,section=this.lines[i].staff[s].voices[v].slice(startElement);this.lines[i].staff[s].voices[v]=this.lines[i].staff[s].voices[v].slice(0,startElement),this.lines[i+1].staff[s].voices[v]=section.concat(this.lines[i+1].staff[s].voices[v])}if(barsperstaff){for(anyDeleted=!1,i=0;i<this.lines.length;i++)if(void 0!==this.lines[i].staff)for(s=0;s<this.lines[i].staff.length;s++){var keepThis=!1;for(v=0;v<this.lines[i].staff[s].voices.length;v++)this.containsNotesStrict(this.lines[i].staff[s].voices[v])&&(keepThis=!0);keepThis||(anyDeleted=!0,this.lines[i].staff[s]=null)}anyDeleted&&parseCommon.each(this.lines,function(line){line.staff&&(line.staff=parseCommon.compact(line.staff))})}for(i=0;i<this.lines.length;i++)if(this.lines[i].staff)for(s=0;s<this.lines[i].staff.length;s++)delete this.lines[i].staff[s].workingClef;for(this.lineNum=0;this.lineNum<this.lines.length;this.lineNum++){var staff=this.lines[this.lineNum].staff;if(staff)for(this.staffNum=0;this.staffNum<staff.length;this.staffNum++)for(staff[this.staffNum].clef&&fixClefPlacement(staff[this.staffNum].clef),this.voiceNum=0;this.voiceNum<staff[this.staffNum].voices.length;this.voiceNum++){var voice=staff[this.staffNum].voices[this.voiceNum];!function(line){for(var x,addEndSlur=function(obj,num,chordPos){if(void 0===currSlur[chordPos]){for(x=0;x<currSlur.length;x++)if(void 0!==currSlur[x]){chordPos=x;break}if(void 0===currSlur[chordPos]){var offNum=100*chordPos+1;parseCommon.each(obj.endSlur,function(x){offNum===x&&--offNum}),currSlur[chordPos]=[offNum]}}for(var slurNum,i=0;i<num;i++)slurNum=currSlur[chordPos].pop(),obj.endSlur.push(slurNum);return 0===currSlur[chordPos].length&&delete currSlur[chordPos],slurNum},addStartSlur=function(obj,num,chordPos,usedNums){obj.startSlur=[],void 0===currSlur[chordPos]&&(currSlur[chordPos]=[]);for(var nextNum=100*chordPos+1,i=0;i<num;i++)usedNums&&(parseCommon.each(usedNums,function(x){nextNum===x&&++nextNum}),parseCommon.each(usedNums,function(x){nextNum===x&&++nextNum}),parseCommon.each(usedNums,function(x){nextNum===x&&++nextNum})),parseCommon.each(currSlur[chordPos],function(x){nextNum===x&&++nextNum}),parseCommon.each(currSlur[chordPos],function(x){nextNum===x&&++nextNum}),currSlur[chordPos].push(nextNum),obj.startSlur.push({label:nextNum}),nextNum++},i=0;i<line.length;i++){var el=line[i];if("note"===el.el_type){if(el.gracenotes)for(var g=0;g<el.gracenotes.length;g++){if(el.gracenotes[g].endSlur){var gg=el.gracenotes[g].endSlur;el.gracenotes[g].endSlur=[];for(var ggg=0;ggg<gg;ggg++)addEndSlur(el.gracenotes[g],1,20)}el.gracenotes[g].startSlur&&(x=el.gracenotes[g].startSlur,addStartSlur(el.gracenotes[g],x,20))}if(el.endSlur&&(x=el.endSlur,el.endSlur=[],addEndSlur(el,x,0)),el.startSlur&&(x=el.startSlur,addStartSlur(el,x,0)),el.pitches){for(var usedNums=[],p=0;p<el.pitches.length;p++)if(el.pitches[p].endSlur){var k=el.pitches[p].endSlur;el.pitches[p].endSlur=[];for(var j=0;j<k;j++){var slurNum=addEndSlur(el.pitches[p],1,p+1);usedNums.push(slurNum)}}for(p=0;p<el.pitches.length;p++)el.pitches[p].startSlur&&(x=el.pitches[p].startSlur,addStartSlur(el.pitches[p],x,p+1,usedNums));el.gracenotes&&el.pitches[0].endSlur&&100===el.pitches[0].endSlur[0]&&el.pitches[0].startSlur&&(el.gracenotes[0].endSlur?el.gracenotes[0].endSlur.push(el.pitches[0].startSlur[0].label):el.gracenotes[0].endSlur=[el.pitches[0].startSlur[0].label],1===el.pitches[0].endSlur.length?delete el.pitches[0].endSlur:100===el.pitches[0].endSlur[0]?el.pitches[0].endSlur.shift():100===el.pitches[0].endSlur[el.pitches[0].endSlur.length-1]&&el.pitches[0].endSlur.pop(),1===currSlur[1].length?delete currSlur[1]:currSlur[1].pop())}}}}(voice);for(var j=0;j<voice.length;j++)"clef"===voice[j].el_type&&fixClefPlacement(voice[j]);if(voice.length>0&&voice[voice.length-1].barNumber){var nextLine=function(lines,currentLine){for(currentLine++;lines.length>currentLine;){if(lines[currentLine].staff)return lines[currentLine];currentLine++}return null}(this.lines,this.lineNum);nextLine&&(nextLine.staff[0].barNumber=voice[voice.length-1].barNumber),delete voice[voice.length-1].barNumber}}}return this.formatting.pagewidth||(this.formatting.pagewidth=defWidth),this.formatting.pageheight||(this.formatting.pageheight=defLength),delete this.staffNum,delete this.voiceNum,delete this.lineNum,delete this.potentialStartBeam,delete this.potentialEndBeam,delete this.vskipPending,currSlur},this.reset(),this.getLastNote=function(){if(this.lines[this.lineNum]&&this.lines[this.lineNum].staff&&this.lines[this.lineNum].staff[this.staffNum]&&this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])for(var i=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum].length-1;i>=0;i--){var el=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum][i];if("note"===el.el_type)return el}return null},this.addTieToLastNote=function(){var el=this.getLastNote();return!!(el&&el.pitches&&el.pitches.length>0)&&(el.pitches[0].startTie={},!0)},this.getDuration=function(el){return el.duration?el.duration:0},this.closeLine=function(){this.potentialStartBeam&&this.potentialEndBeam&&(this.potentialStartBeam.startBeam=!0,this.potentialEndBeam.endBeam=!0),delete this.potentialStartBeam,delete this.potentialEndBeam},this.appendElement=function(type,startChar,endChar,hashParams){var This=this;hashParams.el_type=type,null!==startChar&&(hashParams.startChar=startChar),null!==endChar&&(hashParams.endChar=endChar);var endBeamLast=function(){void 0!==This.potentialStartBeam&&void 0!==This.potentialEndBeam&&(This.potentialStartBeam.startBeam=!0,This.potentialEndBeam.endBeam=!0),delete This.potentialStartBeam,delete This.potentialEndBeam};if("note"===type){This.getDuration(hashParams)>=.25?endBeamLast():hashParams.force_end_beam_last&&void 0!==This.potentialStartBeam?endBeamLast():hashParams.end_beam&&void 0!==This.potentialStartBeam?void 0===hashParams.rest?function(){This.potentialStartBeam.startBeam=!0,hashParams.endBeam=!0,delete This.potentialStartBeam,delete This.potentialEndBeam}():endBeamLast():void 0===hashParams.rest&&(void 0===This.potentialStartBeam?hashParams.end_beam||(This.potentialStartBeam=hashParams,delete This.potentialEndBeam):This.potentialEndBeam=hashParams)}else endBeamLast();delete hashParams.end_beam,delete hashParams.force_end_beam_last,function(hp){if(void 0!==hp.pitches){var mid=This.lines[This.lineNum].staff[This.staffNum].workingClef.verticalPos;parseCommon.each(hp.pitches,function(p){p.verticalPos=p.pitch-mid})}if(void 0!==hp.gracenotes){var mid2=This.lines[This.lineNum].staff[This.staffNum].workingClef.verticalPos;parseCommon.each(hp.gracenotes,function(p){p.verticalPos=p.pitch-mid2})}This.lines[This.lineNum].staff[This.staffNum].voices[This.voiceNum].push(hp)}(hashParams)},this.appendStartingElement=function(type,startChar,endChar,hashParams2){this.closeLine();var impliedNaturals;"key"===type&&(impliedNaturals=hashParams2.impliedNaturals,delete hashParams2.impliedNaturals);var hashParams=parseCommon.clone(hashParams2);if(this.lines[this.lineNum].staff){"clef"===type&&(this.lines[this.lineNum].staff[this.staffNum].workingClef=hashParams),this.lines[this.lineNum].staff.length<=this.staffNum&&(this.lines[this.lineNum].staff[this.staffNum]={},this.lines[this.lineNum].staff[this.staffNum].clef=parseCommon.clone(this.lines[this.lineNum].staff[0].clef),this.lines[this.lineNum].staff[this.staffNum].key=parseCommon.clone(this.lines[this.lineNum].staff[0].key),this.lines[this.lineNum].staff[0].meter&&(this.lines[this.lineNum].staff[this.staffNum].meter=parseCommon.clone(this.lines[this.lineNum].staff[0].meter)),this.lines[this.lineNum].staff[this.staffNum].workingClef=parseCommon.clone(this.lines[this.lineNum].staff[0].workingClef),this.lines[this.lineNum].staff[this.staffNum].voices=[[]]);for(var voice=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum],i=0;i<voice.length;i++){if("note"===voice[i].el_type||"bar"===voice[i].el_type)return hashParams.el_type=type,hashParams.startChar=startChar,hashParams.endChar=endChar,impliedNaturals&&(hashParams.accidentals=impliedNaturals.concat(hashParams.accidentals)),void voice.push(hashParams);if(voice[i].el_type===type)return hashParams.el_type=type,hashParams.startChar=startChar,hashParams.endChar=endChar,impliedNaturals&&(hashParams.accidentals=impliedNaturals.concat(hashParams.accidentals)),void(voice[i]=hashParams)}this.lines[this.lineNum].staff[this.staffNum][type]=hashParams2}},this.getNumLines=function(){return this.lines.length},this.pushLine=function(hash){this.vskipPending&&(hash.vskip=this.vskipPending,delete this.vskipPending),this.lines.push(hash)},this.addSubtitle=function(str){this.pushLine({subtitle:str})},this.addSpacing=function(num){this.vskipPending=num},this.addNewPage=function(num){this.pushLine({newpage:num})},this.addSeparator=function(spaceAbove,spaceBelow,lineLength){this.pushLine({separator:{spaceAbove:spaceAbove,spaceBelow:spaceBelow,lineLength:lineLength}})},this.addText=function(str){this.pushLine({text:str})},this.addCentered=function(str){this.pushLine({text:[{text:str,center:!0}]})},this.containsNotes=function(voice){for(var i=0;i<voice.length;i++)if("note"===voice[i].el_type||"bar"===voice[i].el_type)return!0;return!1},this.containsNotesStrict=function(voice){for(var i=0;i<voice.length;i++)if("note"===voice[i].el_type&&void 0===voice[i].rest)return!0;return!1},this.startNewLine=function(params){var This=this;this.closeLine();var createVoice=function(params){if(This.lines[This.lineNum].staff[This.staffNum].voices[This.voiceNum]=[],This.isFirstLine(This.lineNum)?params.name&&(This.lines[This.lineNum].staff[This.staffNum].title||(This.lines[This.lineNum].staff[This.staffNum].title=[]),This.lines[This.lineNum].staff[This.staffNum].title[This.voiceNum]=params.name):params.subname&&(This.lines[This.lineNum].staff[This.staffNum].title||(This.lines[This.lineNum].staff[This.staffNum].title=[]),This.lines[This.lineNum].staff[This.staffNum].title[This.voiceNum]=params.subname),params.style&&This.appendElement("style",null,null,{head:params.style}),params.stem)This.appendElement("stem",null,null,{direction:params.stem});else if(This.voiceNum>0){if(void 0!==This.lines[This.lineNum].staff[This.staffNum].voices[0]){for(var found=!1,i=0;i<This.lines[This.lineNum].staff[This.staffNum].voices[0].length;i++)"stem"===This.lines[This.lineNum].staff[This.staffNum].voices[0].el_type&&(found=!0);if(!found){var stem={el_type:"stem",direction:"up"};This.lines[This.lineNum].staff[This.staffNum].voices[0].splice(0,0,stem)}}This.appendElement("stem",null,null,{direction:"down"})}params.scale&&This.appendElement("scale",null,null,{size:params.scale})},createStaff=function(params){This.lines[This.lineNum].staff[This.staffNum]={voices:[],clef:params.clef,key:params.key,workingClef:params.clef},params.vocalfont&&(This.lines[This.lineNum].staff[This.staffNum].vocalfont=params.vocalfont),params.bracket&&(This.lines[This.lineNum].staff[This.staffNum].bracket=params.bracket),params.brace&&(This.lines[This.lineNum].staff[This.staffNum].brace=params.brace),params.connectBarLines&&(This.lines[This.lineNum].staff[This.staffNum].connectBarLines=params.connectBarLines),params.barNumber&&(This.lines[This.lineNum].staff[This.staffNum].barNumber=params.barNumber),createVoice(params),params.part&&This.appendElement("part",params.startChar,params.endChar,{title:params.part}),void 0!==params.meter&&(This.lines[This.lineNum].staff[This.staffNum].meter=params.meter)};if(void 0===this.lines[this.lineNum])!function(params){This.lines[This.lineNum]={staff:[]},createStaff(params)}(params);else if(void 0===this.lines[this.lineNum].staff)this.lineNum++,this.startNewLine(params);else if(void 0===this.lines[this.lineNum].staff[this.staffNum])createStaff(params);else if(void 0===this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])createVoice(params);else{if(!this.containsNotes(this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]))return;this.lineNum++,this.startNewLine(params)}},this.hasBeginMusic=function(){for(var i=0;i<this.lines.length;i++)if(this.lines[i].staff)return!0;return!1},this.isFirstLine=function(index){for(var i=index-1;i>=0;i--)if(void 0!==this.lines[i].staff)return!1;return!0},this.getMeter=function(){for(var i=0;i<this.lines.length;i++){var line=this.lines[i];if(line.staff)for(var j=0;j<line.staff.length;j++){var meter=line.staff[j].meter;if(meter)return meter}}return{type:"common_time"}},this.getCurrentVoice=function(){return void 0!==this.lines[this.lineNum]&&void 0!==this.lines[this.lineNum].staff[this.staffNum]&&void 0!==this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]?this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]:null},this.setCurrentVoice=function(staffNum,voiceNum){this.staffNum=staffNum,this.voiceNum=voiceNum;for(var i=0;i<this.lines.length;i++)if(this.lines[i].staff&&(void 0===this.lines[i].staff[staffNum]||void 0===this.lines[i].staff[staffNum].voices[voiceNum]||!this.containsNotes(this.lines[i].staff[staffNum].voices[voiceNum])))return void(this.lineNum=i);this.lineNum=i},this.addMetaText=function(key,value){void 0===this.metaText[key]?this.metaText[key]=value:this.metaText[key]+="\n"+value},this.addMetaTextArray=function(key,value){void 0===this.metaText[key]?this.metaText[key]=[value]:this.metaText[key].push(value)},this.addMetaTextObj=function(key,value){this.metaText[key]=value},this.setupEvents=function(startingDelay,timeDivider){for(var timingEvents=[],eventHash={},time=startingDelay,isTiedState=!1,line=0;line<this.engraver.staffgroups.length;line++){var group=this.engraver.staffgroups[line],voices=group.voices,firstStaff=group.staffs[0],middleC=firstStaff.absoluteY,top=middleC-firstStaff.top*spacing.STEP,lastStaff=group.staffs[group.staffs.length-1];middleC=lastStaff.absoluteY;for(var bottom=middleC-lastStaff.bottom*spacing.STEP,height=bottom-top,maxVoiceTime=0,v=0;v<voices.length;v++){for(var voiceTime=time,elements=voices[v].children,elem=0;elem<elements.length;elem++){var element=elements[elem];if(element.hint)break;if(element.duration>0){var isTiedToNext=element.startTie;isTiedState?isTiedToNext||(isTiedState=!1):(eventHash["event"+voiceTime]?(eventHash["event"+voiceTime].left=Math.min(eventHash["event"+voiceTime].left,element.x),eventHash["event"+voiceTime].elements.push(element.elemset)):eventHash["event"+voiceTime]={type:"event",seconds:voiceTime,top:top,height:height,left:element.x,width:element.w,elements:[element.elemset]},isTiedToNext&&(isTiedState=!0)),voiceTime+=element.duration/timeDivider}}maxVoiceTime=Math.max(maxVoiceTime,voiceTime)}time=maxVoiceTime}return timingEvents=makeSortedArray(eventHash),addVerticalInfo(timingEvents),timingEvents},this.setTiming=function(bpm,measuresOfDelay){var meter=this.getMeter();this.barTimings=[];var measureLength,beatLength=this.getBeatLength(),beatsPerSecond=bpm/60;switch(meter.type){case"common_time":measureLength=1,this.meter={num:4,den:4};break;case"cut_time":measureLength=1,this.meter={num:2,den:2};break;default:measureLength=meter.value[0].num/meter.value[0].den,this.meter={num:meter.value[0].num,den:meter.value[0].den}}var startingDelay=measureLength/beatLength*measuresOfDelay/beatsPerSecond,timeDivider=beatLength*beatsPerSecond;this.noteTimings=this.setupEvents(startingDelay,timeDivider)}};module.exports=Tune},{"../parse/abc_common":5,"../parse/abc_parse_key_voice":9,"../write/abc_spacing":27}],3:[function(require,module,exports){var abcjs={plugin:require("./plugin/abc_plugin")};module.exports=abcjs},{"./plugin/abc_plugin":11}],4:[function(require,module,exports){!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.Raphael=r():e.Raphael=r()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){var i,n;i=[r(1),r(3),r(4)],void 0!==(n=function(t){return t}.apply(e,i))&&(t.exports=n)},function(t,e,r){var i,n;i=[r(2)],void 0!==(n=function(t){function e(r){if(e.is(r,"function"))return w?r():t.on("raphael.DOMload",r);if(e.is(r,Q))return e._engine.create[z](e,r.splice(0,3+e.is(r[0],$))).add(r);var i=Array.prototype.slice.call(arguments,0);if(e.is(i[i.length-1],"function")){var n=i.pop();return w?n.call(e._engine.create[z](e,i)):t.on("raphael.DOMload",function(){n.call(e._engine.create[z](e,i))})}return e._engine.create[z](e,arguments)}function r(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var i in t)t[T](i)&&(e[i]=r(t[i]));return e}function i(t,e){for(var r=0,i=t.length;i>r;r++)if(t[r]===e)return t.push(t.splice(r,1)[0])}function n(t,e,r){function n(){var a=Array.prototype.slice.call(arguments,0),s=a.join("␀"),o=n.cache=n.cache||{},l=n.count=n.count||[];return o[T](s)?(i(l,s),r?r(o[s]):o[s]):(l.length>=1e3&&delete o[l.shift()],l.push(s),o[s]=t[z](e,a),r?r(o[s]):o[s])}return n}function a(){return this.hex}function s(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var a=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?a[3]={x:+t[0],y:+t[1]}:n-2==i&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?a[3]=a[2]:i||(a[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}function o(t,e,r,i,n){return t*(t*(-3*e+9*r-9*i+3*n)+6*e-12*r+6*i)-3*e+3*r}function l(t,e,r,i,n,a,s,l,h){null==h&&(h=1),h=h>1?1:0>h?0:h;for(var u=h/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;12>g;g++){var x=u*f[g]+u,v=o(x,t,r,n,s),y=o(x,e,i,a,l),m=v*v+y*y;d+=p[g]*Y.sqrt(m)}return u*d}function h(t,e,r,i,n,a,s,o,h){if(!(0>h||l(t,e,r,i,n,a,s,o)<h)){var p,c=.5,f=1-c;for(p=l(t,e,r,i,n,a,s,o,f);H(p-h)>.01;)c/=2,f+=(h>p?1:-1)*c,p=l(t,e,r,i,n,a,s,o,f);return f}}function u(t,e,r,i,n,a,s,o){if(!(W(t,r)<G(n,s)||G(t,r)>W(n,s)||W(e,i)<G(a,o)||G(e,i)>W(a,o))){var l=(t*i-e*r)*(n-s)-(t-r)*(n*o-a*s),h=(t*i-e*r)*(a-o)-(e-i)*(n*o-a*s),u=(t-r)*(a-o)-(e-i)*(n-s);if(u){var c=l/u,f=h/u,p=+c.toFixed(2),d=+f.toFixed(2);if(!(p<+G(t,r).toFixed(2)||p>+W(t,r).toFixed(2)||p<+G(n,s).toFixed(2)||p>+W(n,s).toFixed(2)||d<+G(e,i).toFixed(2)||d>+W(e,i).toFixed(2)||d<+G(a,o).toFixed(2)||d>+W(a,o).toFixed(2)))return{x:c,y:f}}}}function p(t,r,i){var n=e.bezierBBox(t),a=e.bezierBBox(r);if(!e.isBBoxIntersect(n,a))return i?0:[];for(var s=l.apply(0,t),o=l.apply(0,r),h=W(~~(s/5),1),c=W(~~(o/5),1),f=[],p=[],d={},g=i?0:[],x=0;h+1>x;x++){var v=e.findDotsAtSegment.apply(e,t.concat(x/h));f.push({x:v.x,y:v.y,t:x/h})}for(x=0;c+1>x;x++)v=e.findDotsAtSegment.apply(e,r.concat(x/c)),p.push({x:v.x,y:v.y,t:x/c});for(x=0;h>x;x++)for(var y=0;c>y;y++){var m=f[x],b=f[x+1],_=p[y],w=p[y+1],k=H(b.x-m.x)<.001?"y":"x",B=H(w.x-_.x)<.001?"y":"x",C=u(m.x,m.y,b.x,b.y,_.x,_.y,w.x,w.y);if(C){if(d[C.x.toFixed(4)]==C.y.toFixed(4))continue;d[C.x.toFixed(4)]=C.y.toFixed(4);var S=m.t+H((C[k]-m[k])/(b[k]-m[k]))*(b.t-m.t),T=_.t+H((C[B]-_[B])/(w[B]-_[B]))*(w.t-_.t);S>=0&&1.001>=S&&T>=0&&1.001>=T&&(i?g++:g.push({x:C.x,y:C.y,t1:G(S,1),t2:G(T,1)}))}}return g}function d(t,r,i){t=e._path2curve(t),r=e._path2curve(r);for(var n,a,s,o,l,h,u,c,f,d,g=i?0:[],x=0,v=t.length;v>x;x++){var y=t[x];if("M"==y[0])n=l=y[1],a=h=y[2];else{"C"==y[0]?(f=[n,a].concat(y.slice(1)),n=f[6],a=f[7]):(f=[n,a,n,a,l,h,l,h],n=l,a=h);for(var m=0,b=r.length;b>m;m++){var _=r[m];if("M"==_[0])s=u=_[1],o=c=_[2];else{"C"==_[0]?(d=[s,o].concat(_.slice(1)),s=d[6],o=d[7]):(d=[s,o,s,o,u,c,u,c],s=u,o=c);var w=p(f,d,i);if(i)g+=w;else{for(var k=0,B=w.length;B>k;k++)w[k].segment1=x,w[k].segment2=m,w[k].bez1=f,w[k].bez2=d;g=g.concat(w)}}}}}return g}function g(t,e,r,i,n,a){null!=t?(this.a=+t,this.b=+e,this.c=+r,this.d=+i,this.e=+n,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function v(){return this.x+I+this.y+I+this.width+" × "+this.height}function y(t,e,r,i,n,a){function s(t){return((c*t+u)*t+h)*t}function l(t,e){var r,i,n,a,o,l;for(n=t,l=0;8>l;l++){if(a=s(n)-t,H(a)<e)return n;if(o=(3*c*n+2*u)*n+h,H(o)<1e-6)break;n-=a/o}if(r=0,i=1,n=t,r>n)return r;if(n>i)return i;for(;i>r;){if(a=s(n),H(a-t)<e)return n;t>a?r=n:i=n,n=(i-r)/2+r}return n}var h=3*e,u=3*(i-e)-h,c=1-h-u,f=3*r,p=3*(n-r)-f,d=1-f-p;return function(t,e){var r=l(t,e);return((d*r+p)*r+f)*r}(t,1/(200*a))}function m(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[T](n)&&(i[ht(n)]=t[n],r.push(ht(n)));r.sort(Bt)}this.anim=i,this.top=r[r.length-1],this.percents=r}function b(r,i,n,a,s,o){n=ht(n);var l,h,u,f,p,d,x=r.ms,v={},m={},b={};if(a)for(w=0,B=Ee.length;B>w;w++){var _=Ee[w];if(_.el.id==i.id&&_.anim==r){_.percent!=n?(Ee.splice(w,1),u=1):h=_,i.attr(_.totalOrigin);break}}else a=+m;for(var w=0,B=r.percents.length;B>w;w++){if(r.percents[w]==n||r.percents[w]>a*r.top){n=r.percents[w],p=r.percents[w-1]||0,x=x/r.top*(n-p),f=r.percents[w+1],l=r.anim[n];break}a&&i.attr(r.anim[r.percents[w]])}if(l){if(h)h.initstatus=a,h.start=new Date-h.ms*a;else{for(var C in l)if(l[T](C)&&(pt[T](C)||i.paper.customAttributes[T](C)))switch(v[C]=i.attr(C),null==v[C]&&(v[C]=ft[C]),m[C]=l[C],pt[C]){case $:b[C]=(m[C]-v[C])/x;break;case"colour":v[C]=e.getRGB(v[C]);var S=e.getRGB(m[C]);b[C]={r:(S.r-v[C].r)/x,g:(S.g-v[C].g)/x,b:(S.b-v[C].b)/x};break;case"path":var A=Qt(v[C],m[C]),E=A[1];for(v[C]=A[0],b[C]=[],w=0,B=v[C].length;B>w;w++){b[C][w]=[0];for(var N=1,M=v[C][w].length;M>N;N++)b[C][w][N]=(E[w][N]-v[C][w][N])/x}break;case"transform":var L=i._,z=le(L[C],m[C]);if(z)for(v[C]=z.from,m[C]=z.to,b[C]=[],b[C].real=!0,w=0,B=v[C].length;B>w;w++)for(b[C][w]=[v[C][w][0]],N=1,M=v[C][w].length;M>N;N++)b[C][w][N]=(m[C][w][N]-v[C][w][N])/x;else{var F=i.matrix||new g,R={_:{transform:L.transform},getBBox:function(){return i.getBBox(1)}};v[C]=[F.a,F.b,F.c,F.d,F.e,F.f],se(R,m[C]),m[C]=R._.transform,b[C]=[(R.matrix.a-F.a)/x,(R.matrix.b-F.b)/x,(R.matrix.c-F.c)/x,(R.matrix.d-F.d)/x,(R.matrix.e-F.e)/x,(R.matrix.f-F.f)/x]}break;case"csv":var I=j(l[C])[q](k),D=j(v[C])[q](k);if("clip-rect"==C)for(v[C]=D,b[C]=[],w=D.length;w--;)b[C][w]=(I[w]-v[C][w])/x;m[C]=I;break;default:for(I=[][P](l[C]),D=[][P](v[C]),b[C]=[],w=i.paper.customAttributes[C].length;w--;)b[C][w]=((I[w]||0)-(D[w]||0))/x}var V=l.easing,O=e.easing_formulas[V];if(!O)if((O=j(V).match(st))&&5==O.length){var Y=O;O=function(t){return y(t,+Y[1],+Y[2],+Y[3],+Y[4],x)}}else O=St;if(d=l.start||r.start||+new Date,_={anim:r,percent:n,timestamp:d,start:d+(r.del||0),status:0,initstatus:a||0,stop:!1,ms:x,easing:O,from:v,diff:b,to:m,el:i,callback:l.callback,prev:p,next:f,repeat:o||r.times,origin:i.attr(),totalOrigin:s},Ee.push(_),a&&!h&&!u&&(_.stop=!0,_.start=new Date-x*a,1==Ee.length))return Me();u&&(_.start=new Date-_.ms*a),1==Ee.length&&Ne(Me)}t("raphael.anim.start."+i.id,i,r)}}function _(t){for(var e=0;e<Ee.length;e++)Ee[e].el.paper==t&&Ee.splice(e--,1)}e.version="2.2.0",e.eve=t;var w,M,k=/[, ]+/,B={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},T="hasOwnProperty",A={doc:document,win:window},E={was:Object.prototype[T].call(A.win,"Raphael"),is:A.win.Raphael},N=function(){this.ca=this.customAttributes={}},z="apply",P="concat",F="ontouchstart"in A.win||A.win.DocumentTouch&&A.doc instanceof DocumentTouch,R="",I=" ",j=String,q="split",D="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[q](I),V={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},O=j.prototype.toLowerCase,Y=Math,W=Y.max,G=Y.min,H=Y.abs,X=Y.pow,U=Y.PI,$="number",Z="string",Q="array",tt=Object.prototype.toString,at=(e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,{NaN:1,Infinity:1,"-Infinity":1}),st=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,ot=Y.round,ht=parseFloat,ut=parseInt,ct=j.prototype.toUpperCase,ft=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},pt=e._availableAnimAttrs={blur:$,"clip-rect":"csv",cx:$,cy:$,fill:"colour","fill-opacity":$,"font-size":$,height:$,opacity:$,path:"path",r:$,rx:$,ry:$,stroke:"colour","stroke-opacity":$,"stroke-width":$,transform:"transform",width:$,x:$,y:$},gt=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,xt={hs:1,rg:1},bt=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,wt=(e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),Bt=function(t,e){return ht(t)-ht(e)},St=function(t){return t},Tt=e._rectPath=function(t,e,r,i,n){
  return n?[["M",t+n,e],["l",r-2*n,0],["a",n,n,0,0,1,n,n],["l",0,i-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-r,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-i],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",r,0],["l",0,i],["l",-r,0],["z"]]},At=function(t,e,r,i){return null==i&&(i=r),[["M",t,e],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]]},Et=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return At(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return At(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return Tt(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return Tt(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return Tt(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return Tt(e.x,e.y,e.width,e.height)}},Nt=e.mapPath=function(t,e){if(!e)return t;var r,i,n,a,s,o,l;for(t=Qt(t),n=0,s=t.length;s>n;n++)for(l=t[n],a=1,o=l.length;o>a;a+=2)r=e.x(l[a],l[a+1]),i=e.y(l[a],l[a+1]),l[a]=r,l[a+1]=i;return t};if(e._g=A,e.type=A.win.SVGAngle||A.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var Lt,Mt=A.doc.createElement("div");if(Mt.innerHTML='<v:shape adj="1"/>',Lt=Mt.firstChild,Lt.style.behavior="url(#default#VML)",!Lt||"object"!=typeof Lt.adj)return e.type=R;Mt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=N,e.fn=M=N.prototype=e.prototype,e._id=0,e._oid=0,e.is=function(t,e){return e=O.call(e),"finite"==e?!at[T](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||tt.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,r,i,n,a,s){if(null==a){var o=t-i,l=r-n;return o||l?(180+180*Y.atan2(-l,-o)/U+360)%360:0}return e.angle(t,r,a,s)-e.angle(i,n,a,s)},e.rad=function(t){return t%360*U/180},e.deg=function(t){return Math.round(180*t/U%360*1e3)/1e3},e.snapTo=function(t,r,i){if(i=e.is(i,"finite")?i:10,e.is(t,Q)){for(var n=t.length;n--;)if(H(t[n]-r)<=i)return t[n]}else{t=+t;var a=r%t;if(i>a)return r-a;if(a>t-i)return r-a+t}return r};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e).toUpperCase()}}(0,function(t){var e=16*Y.random()|0;return("x"==t?e:3&e|8).toString(16)});e.setWindow=function(r){t("raphael.setWindow",e,A.win,r),A.win=r,A.doc=A.win.document,e._engine.initWin&&e._engine.initWin(A.win)};var Pt=function(t){if(e.vml){var i;try{var a=new ActiveXObject("htmlfile");a.write("<body>"),a.close(),i=a.body}catch(s){i=createPopup().document.body}var o=i.createTextRange();Pt=n(function(t){try{i.style.color=j(t).replace(/^\s+|\s+$/g,R);var e=o.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(n){return"none"}})}else{var l=A.doc.createElement("i");l.title="Raphaël Colour Picker",l.style.display="none",A.doc.body.appendChild(l),Pt=n(function(t){return l.style.color=t,A.doc.defaultView.getComputedStyle(l,R).getPropertyValue("color")})}return Pt(t)},Ft=function(){return"hsb("+[this.h,this.s,this.b]+")"},Rt=function(){return"hsl("+[this.h,this.s,this.l]+")"},It=function(){return this.hex},jt=function(t,r,i){if(null==r&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,r=t.g,t=t.r),null==r&&e.is(t,Z)){var n=e.getRGB(t);t=n.r,r=n.g,i=n.b}return(t>1||r>1||i>1)&&(t/=255,r/=255,i/=255),[t,r,i]},qt=function(t,r,i,n){t*=255,r*=255,i*=255;var a={r:t,g:r,b:i,hex:e.rgb(t,r,i),toString:It};return e.is(n,"finite")&&(a.opacity=n),a};e.color=function(t){var r;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(r=e.hsb2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(r=e.hsl2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(r=e.rgb2hsl(t),t.h=r.h,t.s=r.s,t.l=r.l,r=e.rgb2hsb(t),t.v=r.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=It,t},e.hsb2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,i=t.o,t=t.h),t*=360;var n,a,s,o,l;return t=t%360/60,l=r*e,o=l*(1-H(t%2-1)),n=a=s=r-l,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],qt(n,a,s,i)},e.hsl2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),t*=360;var n,a,s,o,l;return t=t%360/60,l=2*e*(.5>r?r:1-r),o=l*(1-H(t%2-1)),n=a=s=r-l/2,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],qt(n,a,s,i)},e.rgb2hsb=function(t,e,r){r=jt(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s;return a=W(t,e,r),s=a-G(t,e,r),i=0==s?null:a==t?(e-r)/s:a==e?(r-t)/s+2:(t-e)/s+4,i=(i+360)%6*60/360,n=0==s?0:s/a,{h:i,s:n,b:a,toString:Ft}},e.rgb2hsl=function(t,e,r){r=jt(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s,o,l;return s=W(t,e,r),o=G(t,e,r),l=s-o,i=0==l?null:s==t?(e-r)/l:s==e?(r-t)/l+2:(t-e)/l+4,i=(i+360)%6*60/360,a=(s+o)/2,n=0==l?0:.5>a?l/(2*a):l/(2-2*a),{h:i,s:n,l:a,toString:Rt}},e._path2string=function(){return this.join(",").replace(/,?([achlmqrstvxz]),?/gi,"$1")};e._preload=function(t,e){var r=A.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,A.doc.body.removeChild(this)},r.onerror=function(){A.doc.body.removeChild(this)},A.doc.body.appendChild(r),r.src=t};e.getRGB=n(function(t){if(!t||(t=j(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:a};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:a};!(xt[T](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=Pt(t));var i,n,s,o,l,h,u=t.match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i);return u?(u[2]&&(s=ut(u[2].substring(5),16),n=ut(u[2].substring(3,5),16),i=ut(u[2].substring(1,3),16)),u[3]&&(s=ut((l=u[3].charAt(3))+l,16),n=ut((l=u[3].charAt(2))+l,16),i=ut((l=u[3].charAt(1))+l,16)),u[4]&&(h=u[4][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),"rgba"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100)),u[5]?(h=u[5][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),("deg"==h[0].slice(-3)||"°"==h[0].slice(-1))&&(i/=360),"hsba"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100),e.hsb2rgb(i,n,s,o)):u[6]?(h=u[6][q](gt),i=ht(h[0]),"%"==h[0].slice(-1)&&(i*=2.55),n=ht(h[1]),"%"==h[1].slice(-1)&&(n*=2.55),s=ht(h[2]),"%"==h[2].slice(-1)&&(s*=2.55),("deg"==h[0].slice(-3)||"°"==h[0].slice(-1))&&(i/=360),"hsla"==u[1].toLowerCase().slice(0,4)&&(o=ht(h[3])),h[3]&&"%"==h[3].slice(-1)&&(o/=100),e.hsl2rgb(i,n,s,o)):(u={r:i,g:n,b:s,toString:a},u.hex="#"+(16777216|s|n<<8|i<<16).toString(16).slice(1),e.is(o,"finite")&&(u.opacity=o),u)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:a}},e),e.hsb=n(function(t,r,i){return e.hsb2rgb(t,r,i).hex}),e.hsl=n(function(t,r,i){return e.hsl2rgb(t,r,i).hex}),e.rgb=n(function(t,e,r){function i(t){return t+.5|0}return"#"+(16777216|i(r)|i(e)<<8|i(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var r=Vt(t);if(r.arr)return Yt(r.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,Q)&&e.is(t[0],Q)&&(n=Yt(t)),n.length||j(t).replace(/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(bt,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][P](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][P](a));else for(;a.length>=i[s]&&(n.push([e][P](a.splice(0,i[s]))),i[s]););}),n.toString=e._path2string,r.arr=Yt(n),n},e.parseTransformString=n(function(t){if(!t)return null;var i=[];return e.is(t,Q)&&e.is(t[0],Q)&&(i=Yt(t)),i.length||j(t).replace(/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,function(t,e,r){var n=[];O.call(e);r.replace(bt,function(t,e){e&&n.push(+e)}),i.push([e][P](n))}),i.toString=e._path2string,i});var Vt=function(t){var e=Vt.ps=Vt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var r in e)e[T](r)&&r!=t&&!--e[r].sleep&&delete e[r]}),e[t]};e.findDotsAtSegment=function(t,e,r,i,n,a,s,o,l){var h=1-l,u=X(h,3),c=X(h,2),f=l*l,p=f*l,d=u*t+3*c*l*r+3*h*l*l*n+p*s,g=u*e+3*c*l*i+3*h*l*l*a+p*o,x=t+2*l*(r-t)+f*(n-2*r+t),v=e+2*l*(i-e)+f*(a-2*i+e),y=r+2*l*(n-r)+f*(s-2*n+r),m=i+2*l*(a-i)+f*(o-2*a+i),b=h*t+l*r,_=h*e+l*i,w=h*n+l*s,k=h*a+l*o,B=90-180*Y.atan2(x-y,v-m)/U;return(x>y||m>v)&&(B+=180),{x:d,y:g,m:{x:x,y:v},n:{x:y,y:m},start:{x:b,y:_},end:{x:w,y:k},alpha:B}},e.bezierBBox=function(t,r,i,n,a,s,o,l){e.is(t,"array")||(t=[t,r,i,n,a,s,o,l]);var h=Zt.apply(null,t);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}},e.isPointInsideBBox=function(t,e,r){return e>=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},e.isBBoxIntersect=function(t,r){var i=e.isPointInsideBBox;return i(r,t.x,t.y)||i(r,t.x2,t.y)||i(r,t.x,t.y2)||i(r,t.x2,t.y2)||i(t,r.x,r.y)||i(t,r.x2,r.y)||i(t,r.x,r.y2)||i(t,r.x2,r.y2)||(t.x<r.x2&&t.x>r.x||r.x<t.x2&&r.x>t.x)&&(t.y<r.y2&&t.y>r.y||r.y<t.y2&&r.y>t.y)},e.pathIntersection=function(t,e){return d(t,e)},e.pathIntersectionNumber=function(t,e){return d(t,e,1)},e.isPointInsidePath=function(t,r,i){var n=e.pathBBox(t);return e.isPointInsideBBox(n,r,i)&&d(t,[["M",r,i],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Ot=e.pathBBox=function(t){var e=Vt(t);if(e.bbox)return r(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Qt(t);for(var o,i=0,n=0,a=[],s=[],l=0,h=t.length;h>l;l++)if(o=t[l],"M"==o[0])i=o[1],n=o[2],a.push(i),s.push(n);else{var u=Zt(i,n,o[1],o[2],o[3],o[4],o[5],o[6]);a=a[P](u.min.x,u.max.x),s=s[P](u.min.y,u.max.y),i=o[5],n=o[6]}var c=G[z](0,a),f=G[z](0,s),p=W[z](0,a),d=W[z](0,s),g=p-c,x=d-f,v={x:c,y:f,x2:p,y2:d,width:g,height:x,cx:c+g/2,cy:f+x/2};return e.bbox=r(v),v},Yt=function(t){var i=r(t);return i.toString=e._path2string,i},Wt=e._pathToRelative=function(t){var r=Vt(t);if(r.rel)return Yt(r.rel);e.is(t,Q)&&e.is(t&&t[0],Q)||(t=e.parsePathString(t));var i=[],n=0,a=0,s=0,o=0,l=0;"M"==t[0][0]&&(n=t[0][1],a=t[0][2],s=n,o=a,l++,i.push(["M",n,a]));for(var h=l,u=t.length;u>h;h++){var c=i[h]=[],f=t[h];if(f[0]!=O.call(f[0]))switch(c[0]=O.call(f[0]),c[0]){case"a":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]-n).toFixed(3),c[7]=+(f[7]-a).toFixed(3);break;case"v":c[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var p=1,d=f.length;d>p;p++)c[p]=+(f[p]-(p%2?n:a)).toFixed(3)}else{c=i[h]=[],"m"==f[0]&&(s=f[1]+n,o=f[2]+a);for(var g=0,x=f.length;x>g;g++)i[h][g]=f[g]}var v=i[h].length;switch(i[h][0]){case"z":n=s,a=o;break;case"h":n+=+i[h][v-1];break;case"v":a+=+i[h][v-1];break;default:n+=+i[h][v-2],a+=+i[h][v-1]}}return i.toString=e._path2string,r.rel=Yt(i),i},Gt=e._pathToAbsolute=function(t){var r=Vt(t);if(r.abs)return Yt(r.abs);if(e.is(t,Q)&&e.is(t&&t[0],Q)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i=[],n=0,a=0,o=0,l=0,h=0;"M"==t[0][0]&&(n=+t[0][1],a=+t[0][2],o=n,l=a,h++,i[0]=["M",n,a]);for(var c,f,u=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=h,d=t.length;d>p;p++){if(i.push(c=[]),f=t[p],f[0]!=ct.call(f[0]))switch(c[0]=ct.call(f[0]),c[0]){case"A":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]+n),c[7]=+(f[7]+a);break;case"V":c[1]=+f[1]+a;break;case"H":c[1]=+f[1]+n;break;case"R":for(var g=[n,a][P](f.slice(1)),x=2,v=g.length;v>x;x++)g[x]=+g[x]+n,g[++x]=+g[x]+a;i.pop(),i=i[P](s(g,u));break;case"M":o=+f[1]+n,l=+f[2]+a;default:for(x=1,v=f.length;v>x;x++)c[x]=+f[x]+(x%2?n:a)}else if("R"==f[0])g=[n,a][P](f.slice(1)),i.pop(),i=i[P](s(g,u)),c=["R"][P](f.slice(-2));else for(var y=0,m=f.length;m>y;y++)c[y]=f[y];switch(c[0]){case"Z":n=o,a=l;break;case"H":n=c[1];break;case"V":a=c[1];break;case"M":o=c[c.length-2],l=c[c.length-1];default:n=c[c.length-2],a=c[c.length-1]}}return i.toString=e._path2string,r.abs=Yt(i),i},Ht=function(t,e,r,i){return[t,e,r,i,r,i]},Xt=function(t,e,r,i,n,a){var s=1/3,o=2/3;return[s*t+o*r,s*e+o*i,s*n+o*r,s*a+o*i,n,a]},Ut=function(t,e,r,i,a,s,o,l,h,u){var d,c=120*U/180,f=U/180*(+a||0),p=[],g=n(function(t,e,r){return{x:t*Y.cos(r)-e*Y.sin(r),y:t*Y.sin(r)+e*Y.cos(r)}});if(u)S=u[0],T=u[1],B=u[2],C=u[3];else{d=g(t,e,-f),t=d.x,e=d.y,d=g(l,h,-f),l=d.x,h=d.y;var y=(Y.cos(U/180*a),Y.sin(U/180*a),(t-l)/2),m=(e-h)/2,b=y*y/(r*r)+m*m/(i*i);b>1&&(b=Y.sqrt(b),r*=b,i*=b);var _=r*r,w=i*i,k=(s==o?-1:1)*Y.sqrt(H((_*w-_*m*m-w*y*y)/(_*m*m+w*y*y))),B=k*r*m/i+(t+l)/2,C=k*-i*y/r+(e+h)/2,S=Y.asin(((e-C)/i).toFixed(9)),T=Y.asin(((h-C)/i).toFixed(9));S=B>t?U-S:S,T=B>l?U-T:T,0>S&&(S=2*U+S),0>T&&(T=2*U+T),o&&S>T&&(S-=2*U),!o&&T>S&&(T-=2*U)}var A=T-S;if(H(A)>c){var E=T,N=l,M=h;T=S+c*(o&&T>S?1:-1),l=B+r*Y.cos(T),h=C+i*Y.sin(T),p=Ut(l,h,r,i,a,0,o,N,M,[T,E,B,C])}A=T-S;var L=Y.cos(S),z=Y.sin(S),F=Y.cos(T),R=Y.sin(T),I=Y.tan(A/4),j=4/3*r*I,D=4/3*i*I,V=[t,e],O=[t+j*z,e-D*L],W=[l+j*R,h-D*F],G=[l,h];if(O[0]=2*V[0]-O[0],O[1]=2*V[1]-O[1],u)return[O,W,G][P](p);p=[O,W,G][P](p).join()[q](",");for(var X=[],$=0,Z=p.length;Z>$;$++)X[$]=$%2?g(p[$-1],p[$],f).y:g(p[$],p[$+1],f).x;return X},$t=function(t,e,r,i,n,a,s,o,l){var h=1-l;return{x:X(h,3)*t+3*X(h,2)*l*r+3*h*l*l*n+X(l,3)*s,y:X(h,3)*e+3*X(h,2)*l*i+3*h*l*l*a+X(l,3)*o}},Zt=n(function(t,e,r,i,n,a,s,o){var g,l=n-2*r+t-(s-2*n+r),h=2*(r-t)-2*(n-r),u=t-r,c=(-h+Y.sqrt(h*h-4*l*u))/2/l,f=(-h-Y.sqrt(h*h-4*l*u))/2/l,p=[e,o],d=[t,s];return H(c)>"1e12"&&(c=.5),H(f)>"1e12"&&(f=.5),c>0&&1>c&&(g=$t(t,e,r,i,n,a,s,o,c),d.push(g.x),p.push(g.y)),f>0&&1>f&&(g=$t(t,e,r,i,n,a,s,o,f),d.push(g.x),p.push(g.y)),l=a-2*i+e-(o-2*a+i),h=2*(i-e)-2*(a-i),u=e-i,c=(-h+Y.sqrt(h*h-4*l*u))/2/l,f=(-h-Y.sqrt(h*h-4*l*u))/2/l,H(c)>"1e12"&&(c=.5),H(f)>"1e12"&&(f=.5),c>0&&1>c&&(g=$t(t,e,r,i,n,a,s,o,c),d.push(g.x),p.push(g.y)),f>0&&1>f&&(g=$t(t,e,r,i,n,a,s,o,f),d.push(g.x),p.push(g.y)),{min:{x:G[z](0,d),y:G[z](0,p)},max:{x:W[z](0,d),y:W[z](0,p)}}}),Qt=e._path2curve=n(function(t,e){var r=!e&&Vt(t);if(!e&&r.curve)return Yt(r.curve);for(var i=Gt(t),n=e&&Gt(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(function(t,e,r){var i,n,a={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in a)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][P](Ut[z](0,[e.x,e.y][P](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][P](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][P](Xt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][P](Xt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][P](Ht(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][P](Ht(e.x,e.y,t[1],e.y));break;case"V":t=["C"][P](Ht(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][P](Ht(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)u[e]="A",n&&(c[e]="A"),t.splice(e++,0,["C"][P](r.splice(0,6)));t.splice(e,1),g=W(i.length,n&&n.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],g=W(i.length,n&&n.length||0))},u=[],c=[],f="",p="",d=0,g=W(i.length,n&&n.length||0);g>d;d++){i[d]&&(f=i[d][0]),"C"!=f&&(u[d]=f,d&&(p=u[d-1])),i[d]=o(i[d],a,p),"A"!=u[d]&&"C"==f&&(u[d]="C"),l(i,d),n&&(n[d]&&(f=n[d][0]),"C"!=f&&(c[d]=f,d&&(p=c[d-1])),n[d]=o(n[d],s,p),"A"!=c[d]&&"C"==f&&(c[d]="C"),l(n,d)),h(i,n,a,s,d),h(n,i,s,a,d);var x=i[d],v=n&&n[d],y=x.length,m=n&&v.length;a.x=x[y-2],a.y=x[y-1],a.bx=ht(x[y-4])||a.x,a.by=ht(x[y-3])||a.y,s.bx=n&&(ht(v[m-4])||s.x),s.by=n&&(ht(v[m-3])||s.y),s.x=n&&v[m-2],s.y=n&&v[m-1]}return n||(r.curve=Yt(i)),n?[i,n]:i},null,Yt),Kt=(e._parseDots=n(function(t){for(var r=[],i=0,n=t.length;n>i;i++){var a={},s=t[i].match(/^([^:]*):?([\d\.]*)/);if(a.color=e.getRGB(s[1]),a.color.error)return null;a.opacity=a.color.opacity,a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),r.push(a)}for(i=1,n=r.length-1;n>i;i++)if(!r[i].offset){for(var o=ht(r[i-1].offset||0),l=0,h=i+1;n>h;h++)if(r[h].offset){l=r[h].offset;break}l||(l=100,h=n),l=ht(l);for(var u=(l-o)/(h-i+1);h>i;i++)o+=u,r[i].offset=o+"%"}return r}),e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),ne=(e._tofront=function(t,e){e.top!==t&&(Kt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},e._toback=function(t,e){e.bottom!==t&&(Kt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},e._insertafter=function(t,e,r){Kt(t,r),e==r.top&&(r.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},e._insertbefore=function(t,e,r){Kt(t,r),e==r.bottom&&(r.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},e.toMatrix=function(t,e){var r=Ot(t),i={_:{transform:R},getBBox:function(){return r}};return se(i,e),i.matrix}),se=(e.transformPath=function(t,e){return Nt(t,ne(t,e))},e._extractTransform=function(t,r){if(null==r)return t._.transform;r=j(r).replace(/\.{3}|\u2026/g,t._.transform||R);var i=e.parseTransformString(r),n=0,a=0,s=0,o=1,l=1,h=t._,u=new g;if(h.transform=i||[],i)for(var c=0,f=i.length;f>c;c++){var m,b,_,w,k,p=i[c],d=p.length,x=j(p[0]).toLowerCase(),v=p[0]!=x,y=v?u.invert():0;"t"==x&&3==d?v?(m=y.x(0,0),b=y.y(0,0),_=y.x(p[1],p[2]),w=y.y(p[1],p[2]),u.translate(_-m,w-b)):u.translate(p[1],p[2]):"r"==x?2==d?(k=k||t.getBBox(1),u.rotate(p[1],k.x+k.width/2,k.y+k.height/2),n+=p[1]):4==d&&(v?(_=y.x(p[2],p[3]),w=y.y(p[2],p[3]),u.rotate(p[1],_,w)):u.rotate(p[1],p[2],p[3]),n+=p[1]):"s"==x?2==d||3==d?(k=k||t.getBBox(1),u.scale(p[1],p[d-1],k.x+k.width/2,k.y+k.height/2),o*=p[1],l*=p[d-1]):5==d&&(v?(_=y.x(p[3],p[4]),w=y.y(p[3],p[4]),u.scale(p[1],p[2],_,w)):u.scale(p[1],p[2],p[3],p[4]),o*=p[1],l*=p[2]):"m"==x&&7==d&&u.add(p[1],p[2],p[3],p[4],p[5],p[6]),h.dirtyT=1,t.matrix=u}t.matrix=u,h.sx=o,h.sy=l,h.deg=n,h.dx=a=u.e,h.dy=s=u.f,1==o&&1==l&&!n&&h.bbox?(h.bbox.x+=+a,h.bbox.y+=+s):h.dirtyT=1}),oe=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},le=e._equaliseTransform=function(t,r){r=j(r).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],r=e.parseTransformString(r)||[];for(var o,l,h,u,i=W(t.length,r.length),n=[],a=[],s=0;i>s;s++){if(h=t[s]||oe(r[s]),u=r[s]||oe(h),h[0]!=u[0]||"r"==h[0].toLowerCase()&&(h[2]!=u[2]||h[3]!=u[3])||"s"==h[0].toLowerCase()&&(h[3]!=u[3]||h[4]!=u[4]))return;for(n[s]=[],a[s]=[],o=0,l=W(h.length,u.length);l>o;o++)o in h&&(n[s][o]=h[o]),o in u&&(a[s][o]=u[o])}return{from:n,to:a}};e._getContainer=function(t,r,i,n){var a;return a=null!=n||e.is(t,"object")?t:A.doc.getElementById(t),null!=a?a.tagName?null==r?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:r,height:i}:{container:1,x:t,y:r,width:i,height:n}:void 0},e.pathToRelative=Wt,e._engine={},e.path2curve=Qt,e.matrix=function(t,e,r,i,n,a){return new g(t,e,r,i,n,a)},function(t){function r(t){return t[0]*t[0]+t[1]*t[1]}function i(t){var e=Y.sqrt(r(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,r,i,n,a){var h,u,c,f,s=[[],[],[]],o=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],l=[[t,r,n],[e,i,a],[0,0,1]];for(t&&t instanceof g&&(l=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),h=0;3>h;h++)for(u=0;3>u;u++){for(f=0,c=0;3>c;c++)f+=o[h][c]*l[c][u];s[h][u]=f}this.a=s[0][0],this.b=s[1][0],this.c=s[0][1],this.d=s[1][1],this.e=s[0][2],this.f=s[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new g(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new g(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,r,i){null==e&&(e=t),(r||i)&&this.add(1,0,0,1,r,i),this.add(t,0,0,e,0,0),(r||i)&&this.add(1,0,0,1,-r,-i)},t.rotate=function(t,r,i){t=e.rad(t),r=r||0,i=i||0;var n=+Y.cos(t).toFixed(9),a=+Y.sin(t).toFixed(9);this.add(n,a,-a,n,r,i),this.add(1,0,0,1,-r,-i)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[j.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];t.scalex=Y.sqrt(r(n[0])),i(n[0]),t.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*t.shear,n[1][1]-n[0][1]*t.shear],t.scaley=Y.sqrt(r(n[1])),i(n[1]),t.shear/=t.scaley;var a=-n[0][1],s=n[1][1];return 0>s?(t.rotate=e.deg(Y.acos(s)),0>a&&(t.rotate=360-t.rotate)):t.rotate=e.deg(Y.asin(a)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[q]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:R)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:R)+(e.rotate?"r"+[e.rotate,0,0]:R)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(g.prototype);for(var he=function(){this.returnValue=!1},ue=function(){return this.originalEvent.preventDefault()},ce=function(){this.cancelBubble=!0},fe=function(){return this.originalEvent.stopPropagation()},pe=function(t){var e=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,r=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;return{x:t.clientX+r,y:t.clientY+e}},de=function(){return A.doc.addEventListener?function(t,e,r,i){var n=function(t){var e=pe(t);return r.call(i,t,e.x,e.y)};if(t.addEventListener(e,n,!1),F&&V[e]){var a=function(e){for(var n=pe(e),a=e,s=0,o=e.targetTouches&&e.targetTouches.length;o>s;s++)if(e.targetTouches[s].target==t){e=e.targetTouches[s],e.originalEvent=a,e.preventDefault=ue,e.stopPropagation=fe;break}return r.call(i,e,n.x,n.y)};t.addEventListener(V[e],a,!1)}return function(){return t.removeEventListener(e,n,!1),F&&V[e]&&t.removeEventListener(V[e],a,!1),!0}}:A.doc.attachEvent?function(t,e,r,i){var n=function(t){t=t||A.win.event;var e=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,n=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,a=t.clientX+n,s=t.clientY+e;return t.preventDefault=t.preventDefault||he,t.stopPropagation=t.stopPropagation||ce,r.call(i,t,a,s)};return t.attachEvent("on"+e,n),function(){return t.detachEvent("on"+e,n),!0}}:void 0}(),ge=[],xe=function(e){for(var s,r=e.clientX,i=e.clientY,n=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,a=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,o=ge.length;o--;){if(s=ge[o],F&&e.touches){for(var h,l=e.touches.length;l--;)if(h=e.touches[l],h.identifier==s.el._drag.id){r=h.clientX,i=h.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var c,u=s.el.node,f=u.nextSibling,p=u.parentNode,d=u.style.display;A.win.opera&&p.removeChild(u),u.style.display="none",c=s.el.paper.getElementByPoint(r,i),u.style.display=d,A.win.opera&&(f?p.insertBefore(u,f):p.appendChild(u)),c&&t("raphael.drag.over."+s.el.id,s.el,c),r+=a,i+=n,t("raphael.drag.move."+s.el.id,s.move_scope||s.el,r-s.el._drag.x,i-s.el._drag.y,r,i,e)}},ve=function(r){e.unmousemove(xe).unmouseup(ve);for(var n,i=ge.length;i--;)n=ge[i],n.el._drag={},t("raphael.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,r);ge=[]},ye=e.el={},me=D.length;me--;)!function(t){e[t]=ye[t]=function(r,i){return e.is(r,"function")&&(this.events=this.events||[],this.events.push({name:t,f:r,unbind:de(this.shape||this.node||A.doc,t,r,i||this)})),this},e["un"+t]=ye["un"+t]=function(r){for(var i=this.events||[],n=i.length;n--;)i[n].name!=t||!e.is(r,"undefined")&&i[n].f!=r||(i[n].unbind(),i.splice(n,1),!i.length&&delete this.events);return this}}(D[me]);ye.data=function(r,i){var n=wt[this.id]=wt[this.id]||{};if(0==arguments.length)return n;if(1==arguments.length){if(e.is(r,"object")){for(var a in r)r[T](a)&&this.data(a,r[a]);return this}return t("raphael.data.get."+this.id,this,n[r],r),n[r]}return n[r]=i,t("raphael.data.set."+this.id,this,i,r),this},ye.removeData=function(t){return null==t?wt[this.id]={}:wt[this.id]&&delete wt[this.id][t],this},ye.getData=function(){return r(wt[this.id]||{})},ye.hover=function(t,e,r,i){return this.mouseover(t,r).mouseout(e,i||r)},ye.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var be=[];ye.drag=function(r,i,n,a,s,o){function l(l){(l.originalEvent||l).preventDefault();var h=l.clientX,u=l.clientY,c=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,f=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;if(this._drag.id=l.identifier,F&&l.touches)for(var d,p=l.touches.length;p--;)if(d=l.touches[p],this._drag.id=d.identifier,d.identifier==this._drag.id){h=d.clientX,u=d.clientY;break}this._drag.x=h+f,this._drag.y=u+c,!ge.length&&e.mousemove(xe).mouseup(ve),ge.push({el:this,move_scope:a,start_scope:s,end_scope:o}),i&&t.on("raphael.drag.start."+this.id,i),r&&t.on("raphael.drag.move."+this.id,r),n&&t.on("raphael.drag.end."+this.id,n),t("raphael.drag.start."+this.id,s||a||this,l.clientX+f,l.clientY+c,l)}return this._drag={},be.push({el:this,start:l}),this.mousedown(l),this},ye.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},ye.undrag=function(){for(var r=be.length;r--;)be[r].el==this&&(this.unmousedown(be[r].start),be.splice(r,1),t.unbind("raphael.drag.*."+this.id));!be.length&&e.unmousemove(xe).unmouseup(ve),ge=[]},M.circle=function(t,r,i){var n=e._engine.circle(this,t||0,r||0,i||0);return this.__set__&&this.__set__.push(n),n},M.rect=function(t,r,i,n,a){var s=e._engine.rect(this,t||0,r||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},M.ellipse=function(t,r,i,n){var a=e._engine.ellipse(this,t||0,r||0,i||0,n||0);return this.__set__&&this.__set__.push(a),a},M.path=function(t){t&&!e.is(t,Z)&&!e.is(t[0],Q)&&(t+=R);var r=e._engine.path(e.format[z](e,arguments),this);return this.__set__&&this.__set__.push(r),r},M.image=function(t,r,i,n,a){var s=e._engine.image(this,t||"about:blank",r||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},M.text=function(t,r,i){var n=e._engine.text(this,t||0,r||0,j(i));return this.__set__&&this.__set__.push(n),n},M.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var r=new ze(t);return this.__set__&&this.__set__.push(r),r.paper=this,r.type="set",r},M.setStart=function(t){this.__set__=t||this.set()},M.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},M.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},M.setSize=function(t,r){return e._engine.setSize.call(this,t,r)},M.setViewBox=function(t,r,i,n,a){return e._engine.setViewBox.call(this,t,r,i,n,a)},M.top=M.bottom=null,M.raphael=e;var _e=function(t){var e=t.getBoundingClientRect(),r=t.ownerDocument,i=r.body,n=r.documentElement,a=n.clientTop||i.clientTop||0,s=n.clientLeft||i.clientLeft||0;return{y:e.top+(A.win.pageYOffset||n.scrollTop||i.scrollTop)-a,x:e.left+(A.win.pageXOffset||n.scrollLeft||i.scrollLeft)-s}};M.getElementByPoint=function(t,e){var r=this,i=r.canvas,n=A.doc.elementFromPoint(t,e);if(A.win.opera&&"svg"==n.tagName){var a=_e(i),s=i.createSVGRect();s.x=t-a.x,s.y=e-a.y,s.width=s.height=1;var o=i.getIntersectionList(s,null);o.length&&(n=o[o.length-1])}if(!n)return null;for(;n.parentNode&&n!=i.parentNode&&!n.raphael;)n=n.parentNode;return n==r.canvas.parentNode&&(n=i),n=n&&n.raphael?r.getById(n.raphaelid):null},M.getElementsByBBox=function(t){var r=this.set();return this.forEach(function(i){e.isBBoxIntersect(i.getBBox(),t)&&r.push(i)}),r},M.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},M.forEach=function(t,e){for(var r=this.bottom;r;){if(!1===t.call(e,r))return this;r=r.next}return this},M.getElementsByPoint=function(t,e){var r=this.set();return this.forEach(function(i){i.isPointInside(t,e)&&r.push(i)}),r},ye.isPointInside=function(t,r){var i=this.realPath=Et[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(i=e.transformPath(i,this.attr("transform"))),e.isPointInsidePath(i,t,r)},ye.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=Et[this.type](this),e.bboxwt=Ot(this.realPath),e.bboxwt.toString=v,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=Et[this.type](this)),e.bbox=Ot(Nt(this.realPath,this.matrix)),e.bbox.toString=v,e.dirty=e.dirtyT=0),e.bbox)},ye.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},ye.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},r=e.width/2,i=this.paper,n=i.set(),a=this.realPath||Et[this.type](this);a=this.matrix?Nt(a,this.matrix):a;for(var s=1;r+1>s;s++)n.push(i.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/r*s).toFixed(3),opacity:+(e.opacity/r).toFixed(3)}));return n.insertBefore(this).translate(e.offsetx,e.offsety)};var ke=function(t,r,i,n,a,s,o,u,c){return null==c?l(t,r,i,n,a,s,o,u):e.findDotsAtSegment(t,r,i,n,a,s,o,u,h(t,r,i,n,a,s,o,u,c))},Be=function(t,r){return function(i,n,a){i=Qt(i);for(var s,o,l,h,f,u="",c={},p=0,d=0,g=i.length;g>d;d++){if(l=i[d],"M"==l[0])s=+l[1],o=+l[2];else{if(h=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6]),p+h>n){if(r&&!c.start){if(f=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),u+=["C"+f.start.x,f.start.y,f.m.x,f.m.y,f.x,f.y],a)return u;c.start=u,u=["M"+f.x,f.y+"C"+f.n.x,f.n.y,f.end.x,f.end.y,l[5],l[6]].join(),p+=h,s=+l[5],o=+l[6];continue}if(!t&&!r)return f=ke(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),{x:f.x,y:f.y,alpha:f.alpha}}p+=h,
  s=+l[5],o=+l[6]}u+=l.shift()+l}return c.end=u,f=t?p:r?c:e.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1),f.alpha&&(f={x:f.x,y:f.y,alpha:f.alpha}),f}},Ce=Be(1),Se=Be(),Te=Be(0,1);e.getTotalLength=Ce,e.getPointAtLength=Se,e.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return Te(t,e).end;var i=Te(t,r,1);return e?Te(i,e).end:i},ye.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():Ce(t)},ye.getPointAtLength=function(t){var e=this.getPath();if(e)return Se(e,t)},ye.getPath=function(){var t,r=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(t=r(this)),t},ye.getSubpath=function(t,r){var i=this.getPath();if(i)return e.getSubpath(i,t,r)};var Ae=e.easing_formulas={linear:function(t){return t},"<":function(t){return X(t,1.7)},">":function(t){return X(t,.48)},"<>":function(t){var e=.48-t/1.04,r=Y.sqrt(.1734+e*e),i=r-e,n=X(H(i),1/3)*(0>i?-1:1),a=-r-e,s=X(H(a),1/3)*(0>a?-1:1),o=n+s+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:X(2,-10*t)*Y.sin(2*U*(t-.075)/.3)+1},bounce:function(t){var i,e=7.5625,r=2.75;return 1/r>t?i=e*t*t:2/r>t?(t-=1.5/r,i=e*t*t+.75):2.5/r>t?(t-=2.25/r,i=e*t*t+.9375):(t-=2.625/r,i=e*t*t+.984375),i}};Ae.easeIn=Ae["ease-in"]=Ae["<"],Ae.easeOut=Ae["ease-out"]=Ae[">"],Ae.easeInOut=Ae["ease-in-out"]=Ae["<>"],Ae["back-in"]=Ae.backIn,Ae["back-out"]=Ae.backOut;var Ee=[],Ne=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},Me=function(){for(var r=+new Date,i=0;i<Ee.length;i++){var n=Ee[i];if(!n.el.removed&&!n.paused){var d,x,a=r-n.start,s=n.ms,o=n.easing,l=n.from,h=n.diff,u=n.to,f=(n.t,n.el),p={},g={};if(n.initstatus?(a=(n.initstatus*n.anim.top-n.prev)/(n.percent-n.prev)*s,n.status=n.initstatus,delete n.initstatus,n.stop&&Ee.splice(i--,1)):n.status=(n.prev+(n.percent-n.prev)*(a/s))/n.anim.top,!(0>a))if(s>a){var v=o(a/s);for(var y in l)if(l[T](y)){switch(pt[y]){case $:d=+l[y]+v*s*h[y];break;case"colour":d="rgb("+[Le(ot(l[y].r+v*s*h[y].r)),Le(ot(l[y].g+v*s*h[y].g)),Le(ot(l[y].b+v*s*h[y].b))].join(",")+")";break;case"path":d=[];for(var m=0,_=l[y].length;_>m;m++){d[m]=[l[y][m][0]];for(var w=1,k=l[y][m].length;k>w;w++)d[m][w]=+l[y][m][w]+v*s*h[y][m][w];d[m]=d[m].join(I)}d=d.join(I);break;case"transform":if(h[y].real)for(d=[],m=0,_=l[y].length;_>m;m++)for(d[m]=[l[y][m][0]],w=1,k=l[y][m].length;k>w;w++)d[m][w]=l[y][m][w]+v*s*h[y][m][w];else{var B=function(t){return+l[y][t]+v*s*h[y][t]};d=[["m",B(0),B(1),B(2),B(3),B(4),B(5)]]}break;case"csv":if("clip-rect"==y)for(d=[],m=4;m--;)d[m]=+l[y][m]+v*s*h[y][m];break;default:var C=[][P](l[y]);for(d=[],m=f.paper.customAttributes[y].length;m--;)d[m]=+C[m]+v*s*h[y][m]}p[y]=d}f.attr(p),function(e,r,i){setTimeout(function(){t("raphael.anim.frame."+e,r,i)})}(f.id,f,n.anim)}else{if(function(r,i,n){setTimeout(function(){t("raphael.anim.frame."+i.id,i,n),t("raphael.anim.finish."+i.id,i,n),e.is(r,"function")&&r.call(i)})}(n.callback,f,n.anim),f.attr(u),Ee.splice(i--,1),n.repeat>1&&!n.next){for(x in u)u[T](x)&&(g[x]=n.totalOrigin[x]);n.el.attr(g),b(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&b(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}Ee.length&&Ne(Me)},Le=function(t){return t>255?255:0>t?0:t};ye.animateWith=function(t,r,i,n,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var l=i instanceof m?i:e.animation(i,n,a,s);b(l,o,l.percents[0],null,o.attr());for(var c=0,f=Ee.length;f>c;c++)if(Ee[c].anim==r&&Ee[c].el==t){Ee[f-1].start=Ee[c].start;break}return o},ye.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},m.prototype.delay=function(t){var e=new m(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},m.prototype.repeat=function(t){var e=new m(this.anim,this.ms);return e.del=this.del,e.times=Y.floor(W(t,0))||1,e},e.animation=function(t,r,i,n){if(t instanceof m)return t;!e.is(i,"function")&&i||(n=n||i||null,i=null),t=Object(t),r=+r||0;var s,o,a={};for(o in t)t[T](o)&&ht(o)!=o&&ht(o)+"%"!=o&&(s=!0,a[o]=t[o]);if(s)return i&&(a.easing=i),n&&(a.callback=n),new m({100:a},r);if(n){var l=0;for(var h in t){var u=ut(h);t[T](h)&&u>l&&(l=u)}l+="%",!t[l].callback&&(t[l].callback=n)}return new m(t,r)},ye.animate=function(t,r,i,n){var a=this;if(a.removed)return n&&n.call(a),a;var s=t instanceof m?t:e.animation(t,r,i,n);return b(s,a,s.percents[0],null,a.attr()),a},ye.setTime=function(t,e){return t&&null!=e&&this.status(t,G(e,t.ms)/t.ms),this},ye.status=function(t,e){var n,a,r=[],i=0;if(null!=e)return b(t,this,-1,G(e,1)),this;for(n=Ee.length;n>i;i++)if(a=Ee[i],a.el.id==this.id&&(!t||a.anim==t)){if(t)return a.status;r.push({anim:a.anim,status:a.status})}return t?0:r},ye.pause=function(e){for(var r=0;r<Ee.length;r++)Ee[r].el.id!=this.id||e&&Ee[r].anim!=e||!1!==t("raphael.anim.pause."+this.id,this,Ee[r].anim)&&(Ee[r].paused=!0);return this},ye.resume=function(e){for(var r=0;r<Ee.length;r++)if(Ee[r].el.id==this.id&&(!e||Ee[r].anim==e)){var i=Ee[r];!1!==t("raphael.anim.resume."+this.id,this,i.anim)&&(delete i.paused,this.status(i.anim,i.status))}return this},ye.stop=function(e){for(var r=0;r<Ee.length;r++)Ee[r].el.id!=this.id||e&&Ee[r].anim!=e||!1!==t("raphael.anim.stop."+this.id,this,Ee[r].anim)&&Ee.splice(r--,1);return this},t.on("raphael.remove",_),t.on("raphael.clear",_),ye.toString=function(){return"Raphaël’s object"};var ze=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,r=t.length;r>e;e++)!t[e]||t[e].constructor!=ye.constructor&&t[e].constructor!=ze||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},Pe=ze.prototype;Pe.push=function(){for(var t,e,r=0,i=arguments.length;i>r;r++)!(t=arguments[r])||t.constructor!=ye.constructor&&t.constructor!=ze||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},Pe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Pe.forEach=function(t,e){for(var r=0,i=this.items.length;i>r;r++)if(!1===t.call(e,this.items[r],r))return this;return this};for(var Fe in ye)ye[T](Fe)&&(Pe[Fe]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t][z](r,e)})}}(Fe));return Pe.attr=function(t,r){if(t&&e.is(t,Q)&&e.is(t[0],"object"))for(var i=0,n=t.length;n>i;i++)this.items[i].attr(t[i]);else for(var a=0,s=this.items.length;s>a;a++)this.items[a].attr(t,r);return this},Pe.clear=function(){for(;this.length;)this.pop()},Pe.splice=function(t,e,r){t=0>t?W(this.length+t,0):t,e=W(0,G(this.length-t,e));var s,i=[],n=[],a=[];for(s=2;s<arguments.length;s++)a.push(arguments[s]);for(s=0;e>s;s++)n.push(this[t+s]);for(;s<this.length-t;s++)i.push(this[t+s]);var o=a.length;for(s=0;s<o+i.length;s++)this.items[t+s]=this[t+s]=o>s?a[s]:i[s-o];for(s=this.items.length=this.length-=e-o;this[s];)delete this[s++];return new ze(n)},Pe.exclude=function(t){for(var e=0,r=this.length;r>e;e++)if(this[e]==t)return this.splice(e,1),!0},Pe.animate=function(t,r,i,n){(e.is(i,"function")||!i)&&(n=i||null);var o,h,a=this.items.length,s=a,l=this;if(!a)return this;n&&(h=function(){!--a&&n.call(l)}),i=e.is(i,Z)?i:h;var u=e.animation(t,r,i,h);for(o=this.items[--s].animate(u);s--;)this.items[s]&&!this.items[s].removed&&this.items[s].animateWith(o,u,u),this.items[s]&&!this.items[s].removed||a--;return this},Pe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},Pe.getBBox=function(){for(var t=[],e=[],r=[],i=[],n=this.items.length;n--;)if(!this.items[n].removed){var a=this.items[n].getBBox();t.push(a.x),e.push(a.y),r.push(a.x+a.width),i.push(a.y+a.height)}return t=G[z](0,t),e=G[z](0,e),r=W[z](0,r),i=W[z](0,i),{x:t,y:e,x2:r,y2:i,width:r-t,height:i-e}},Pe.clone=function(t){t=this.paper.set();for(var e=0,r=this.items.length;r>e;e++)t.push(this.items[e].clone());return t},Pe.toString=function(){return"Raphaël‘s set"},Pe.glow=function(t){var e=this.paper.set();return this.forEach(function(r,i){var n=r.glow(t);null!=n&&n.forEach(function(t,r){e.push(t)})}),e},Pe.isPointInside=function(t,e){var r=!1;return this.forEach(function(i){return i.isPointInside(t,e)?(r=!0,!1):void 0}),r},e.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},r=t.face["font-family"];for(var i in t.face)t.face[T](i)&&(e.face[i]=t.face[i]);if(this.fonts[r]?this.fonts[r].push(e):this.fonts[r]=[e],!t.svg){e.face["units-per-em"]=ut(t.face["units-per-em"],10);for(var n in t.glyphs)if(t.glyphs[T](n)){var a=t.glyphs[n];if(e.glyphs[n]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[T](s)&&(e.glyphs[n].k[s]=a.k[s])}}return t},M.getFont=function(t,r,i,n){if(n=n||"normal",i=i||"normal",r=+r||{normal:400,bold:700,lighter:300,bolder:800}[r]||400,e.fonts){var a=e.fonts[t];if(!a){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,R)+"(\\s|$)","i");for(var o in e.fonts)if(e.fonts[T](o)&&s.test(o)){a=e.fonts[o];break}}var l;if(a)for(var h=0,u=a.length;u>h&&(l=a[h],l.face["font-weight"]!=r||l.face["font-style"]!=i&&l.face["font-style"]||l.face["font-stretch"]!=n);h++);return l}},M.print=function(t,r,i,n,a,s,o,l){s=s||"middle",o=W(G(o||0,1),-1),l=W(G(l||1,3),1);var p,h=j(i)[q](R),u=0,c=0,f=R;if(e.is(n,"string")&&(n=this.getFont(n)),n){p=(a||16)/n.face["units-per-em"];for(var d=n.face.bbox[q](k),g=+d[0],x=d[3]-d[1],v=0,y=+d[1]+("baseline"==s?x+ +n.face.descent:x/2),m=0,b=h.length;b>m;m++){if("\n"==h[m])u=0,w=0,c=0,v+=x*l;else{var _=c&&n.glyphs[h[m-1]]||{},w=n.glyphs[h[m]];u+=c?(_.w||n.w)+(_.k&&_.k[h[m]]||0)+n.w*o:0,c=1}w&&w.d&&(f+=e.transformPath(w.d,["t",u*p,v*p,"s",p,p,g,y,"t",(t-g)/p,(r-y)/p]))}}return this.path(f).attr({fill:"#000",stroke:"none"})},M.add=function(t){if(e.is(t,"array"))for(var a,r=this.set(),i=0,n=t.length;n>i;i++)a=t[i]||{},B[T](a.type)&&r.push(this[a.type]().attr(a));return r},e.format=function(t,r){var i=e.is(r,Q)?[0][P](r):arguments;return t&&e.is(t,Z)&&i.length-1&&(t=t.replace(/\{(\d+)\}/g,function(t,e){return null==i[++e]?R:i[e]})),t||R},e.fullfill=function(){var r=function(t,r,i){var n=i;return r.replace(/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(t,e,r,i,a){e=e||i,n&&(e in n&&(n=n[e]),"function"==typeof n&&a&&(n=n()))}),n=(null==n||n==i?t:n)+""};return function(e,i){return String(e).replace(/\{([^\}]+)\}/g,function(t,e){return r(t,e,i)})}}(),e.ninja=function(){if(E.was)A.win.Raphael=E.is;else{window.Raphael=void 0;try{delete window.Raphael}catch(t){}}return e},e.st=Pe,t.on("raphael.DOMload",function(){w=!0}),function(t,r,i){function n(){/in/.test(t.readyState)?setTimeout(n,9):e.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener(r,i=function(){t.removeEventListener(r,i,!1),t.readyState="complete"},!1),t.readyState="loading"),n()}(document,"DOMContentLoaded"),e}.apply(e,i))&&(t.exports=n)},function(t,e,r){var i,n;!function(r){var c,f,a="0.4.2",s="hasOwnProperty",o=/[\.\/]/,h=function(){},u=function(t,e){return t-e},p={n:{}},d=function(t,e){t=String(t);var l,i=f,n=Array.prototype.slice.call(arguments,2),a=d.listeners(t),s=0,h=[],g={},x=[],v=c;c=t,f=0;for(var m=0,b=a.length;b>m;m++)"zIndex"in a[m]&&(h.push(a[m].zIndex),a[m].zIndex<0&&(g[a[m].zIndex]=a[m]));for(h.sort(u);h[s]<0;)if(l=g[h[s++]],x.push(l.apply(e,n)),f)return f=i,x;for(m=0;b>m;m++)if("zIndex"in(l=a[m]))if(l.zIndex==h[s]){if(x.push(l.apply(e,n)),f)break;do{if(s++,l=g[h[s]],l&&x.push(l.apply(e,n)),f)break}while(l)}else g[l.zIndex]=l;else if(x.push(l.apply(e,n)),f)break;return f=i,c=v,x.length?x:null};d._events=p,d.listeners=function(t){var i,n,a,s,h,u,c,f,e=t.split(o),r=p,d=[r],g=[];for(s=0,h=e.length;h>s;s++){for(f=[],u=0,c=d.length;c>u;u++)for(r=d[u].n,n=[r[e[s]],r["*"]],a=2;a--;)(i=n[a])&&(f.push(i),g=g.concat(i.f||[]));d=f}return g},d.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var r=t.split(o),i=p,n=0,a=r.length;a>n;n++)i=i.n,i=i.hasOwnProperty(r[n])&&i[r[n]]||(i[r[n]]={n:{}});for(i.f=i.f||[],n=0,a=i.f.length;a>n;n++)if(i.f[n]==e)return h;return i.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},d.f=function(t){var e=[].slice.call(arguments,1);return function(){d.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},d.stop=function(){f=1},d.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(c):c},d.nts=function(){return c.split(o)},d.off=d.unbind=function(t,e){if(!t)return void(d._events=p={n:{}});var i,n,a,h,u,c,f,r=t.split(o),g=[p];for(h=0,u=r.length;u>h;h++)for(c=0;c<g.length;c+=a.length-2){if(a=[c,1],i=g[c].n,"*"!=r[h])i[r[h]]&&a.push(i[r[h]]);else for(n in i)i[s](n)&&a.push(i[n]);g.splice.apply(g,a)}for(h=0,u=g.length;u>h;h++)for(i=g[h];i.n;){if(e){if(i.f){for(c=0,f=i.f.length;f>c;c++)if(i.f[c]==e){i.f.splice(c,1);break}!i.f.length&&delete i.f}for(n in i.n)if(i.n[s](n)&&i.n[n].f){var x=i.n[n].f;for(c=0,f=x.length;f>c;c++)if(x[c]==e){x.splice(c,1);break}!x.length&&delete i.n[n].f}}else{delete i.f;for(n in i.n)i.n[s](n)&&i.n[n].f&&delete i.n[n].f}i=i.n}},d.once=function(t,e){var r=function(){return d.unbind(t,r),e.apply(this,arguments)};return d.on(t,r)},d.version=a,d.toString=function(){return"You are running Eve "+a},void 0!==t&&t.exports?t.exports=d:(i=[],void 0!==(n=function(){return d}.apply(e,i))&&(t.exports=n))}()},function(t,e,r){var i,n;i=[r(1)],void 0!==(n=function(t){if(!t||t.svg){var e="hasOwnProperty",r=String,i=parseFloat,n=parseInt,a=Math,s=a.max,o=a.abs,l=a.pow,h=/[, ]+/,u=t.eve,c="",f=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var x=function(i,n){if(n){"string"==typeof i&&(i=x(i));for(var a in n)n[e](a)&&("xlink:"==a.substring(0,6)?i.setAttributeNS(p,a.substring(6),r(n[a])):i.setAttribute(a,r(n[a])))}else i=t._g.doc.createElementNS("http://www.w3.org/2000/svg",i),i.style&&(i.style.webkitTapHighlightColor="rgba(0,0,0,0)");return i},v=function(e,n){var h="linear",u=e.id+n,f=.5,p=.5,d=e.node,g=e.paper,v=d.style,y=t._g.doc.getElementById(u);if(!y){if(n=r(n).replace(t._radial_gradient,function(t,e,r){if(h="radial",e&&r){f=i(e),p=i(r);var n=2*(p>.5)-1;l(f-.5,2)+l(p-.5,2)>.25&&(p=a.sqrt(.25-l(f-.5,2))*n+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*n)}return c}),n=n.split(/\s*\-\s*/),"linear"==h){var b=n.shift();if(b=-i(b),isNaN(b))return null;var _=[0,0,a.cos(t.rad(b)),a.sin(t.rad(b))],w=1/(s(o(_[2]),o(_[3]))||1);_[2]*=w,_[3]*=w,_[2]<0&&(_[0]=-_[2],_[2]=0),_[3]<0&&(_[1]=-_[3],_[3]=0)}var k=t._parseDots(n);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&u!=e.gradient.id&&(g.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=x(h+"Gradient",{id:u}),e.gradient=y,x(y,"radial"==h?{fx:f,fy:p}:{x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientTransform:e.matrix.invert()}),g.defs.appendChild(y);for(var B=0,C=k.length;C>B;B++)y.appendChild(x("stop",{offset:k[B].offset?k[B].offset:B?"100%":"0%","stop-color":k[B].color||"#fff","stop-opacity":isFinite(k[B].opacity)?k[B].opacity:1}))}}return x(d,{fill:m(u),opacity:1,"fill-opacity":1}),v.fill=c,v.opacity=1,v.fillOpacity=1,1},y=function(){var t=document.documentMode;return t&&(9===t||10===t)},m=function(t){if(y())return"url('#"+t+"')";var e=document.location;return"url('"+e.protocol+"//"+e.host+e.pathname+e.search+"#"+t+"')"},b=function(t){var e=t.getBBox(1);x(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},_=function(i,n,a){if("path"==i.type){for(var y,m,b,_,w,s=r(n).toLowerCase().split("-"),o=i.paper,l=a?"end":"start",h=i.node,u=i.attrs,f=u["stroke-width"],p=s.length,v="classic",k=3,B=3,C=5;p--;)switch(s[p]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":v=s[p];break;case"wide":B=5;break;case"narrow":B=2;break;case"long":k=5;break;case"short":k=2}if("open"==v?(k+=2,B+=2,C+=2,b=1,_=a?4:1,w={fill:"none",stroke:u.stroke}):(_=b=k/2,w={fill:u.stroke,stroke:"none"}),i._.arrows?a?(i._.arrows.endPath&&g[i._.arrows.endPath]--,i._.arrows.endMarker&&g[i._.arrows.endMarker]--):(i._.arrows.startPath&&g[i._.arrows.startPath]--,i._.arrows.startMarker&&g[i._.arrows.startMarker]--):i._.arrows={},"none"!=v){var S="raphael-marker-"+v,T="raphael-marker-"+l+v+k+B+"-obj"+i.id;t._g.doc.getElementById(S)?g[S]++:(o.defs.appendChild(x(x("path"),{"stroke-linecap":"round",d:d[v],id:S})),g[S]=1);var E,A=t._g.doc.getElementById(T);A?(g[T]++,E=A.getElementsByTagName("use")[0]):(A=x(x("marker"),{id:T,markerHeight:B,markerWidth:k,orient:"auto",refX:_,refY:B/2}),E=x(x("use"),{"xlink:href":"#"+S,transform:(a?"rotate(180 "+k/2+" "+B/2+") ":c)+"scale("+k/C+","+B/C+")","stroke-width":(1/((k/C+B/C)/2)).toFixed(4)}),A.appendChild(E),o.defs.appendChild(A),g[T]=1),x(E,w);var N=b*("diamond"!=v&&"oval"!=v);a?(y=i._.arrows.startdx*f||0,m=t.getTotalLength(u.path)-N*f):(y=N*f,m=t.getTotalLength(u.path)-(i._.arrows.enddx*f||0)),w={},w["marker-"+l]="url(#"+T+")",(m||y)&&(w.d=t.getSubpath(u.path,y,m)),x(h,w),i._.arrows[l+"Path"]=S,i._.arrows[l+"Marker"]=T,i._.arrows[l+"dx"]=N,i._.arrows[l+"Type"]=v,i._.arrows[l+"String"]=n}else a?(y=i._.arrows.startdx*f||0,m=t.getTotalLength(u.path)-y):(y=0,m=t.getTotalLength(u.path)-(i._.arrows.enddx*f||0)),i._.arrows[l+"Path"]&&x(h,{d:t.getSubpath(u.path,y,m)}),delete i._.arrows[l+"Path"],delete i._.arrows[l+"Marker"],delete i._.arrows[l+"dx"],delete i._.arrows[l+"Type"],delete i._.arrows[l+"String"];for(w in g)if(g[e](w)&&!g[w]){var M=t._g.doc.getElementById(w);M&&M.parentNode.removeChild(M)}}},w={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},k=function(t,e,i){if(e=w[r(e).toLowerCase()]){for(var n=t.attrs["stroke-width"]||"1",a={round:n,square:n,butt:0}[t.attrs["stroke-linecap"]||i["stroke-linecap"]]||0,s=[],o=e.length;o--;)s[o]=e[o]*n+(o%2?1:-1)*a;x(t.node,{"stroke-dasharray":s.join(",")})}else x(t.node,{"stroke-dasharray":"none"})},B=function(i,a){var l=i.node,u=i.attrs,f=l.style.visibility;l.style.visibility="hidden";for(var d in a)if(a[e](d)){if(!t._availableAttrs[e](d))continue;var g=a[d];switch(u[d]=g,d){case"blur":i.blur(g);break;case"title":var y=l.getElementsByTagName("title");if(y.length&&(y=y[0]))y.firstChild.nodeValue=g;else{y=x("title");var m=t._g.doc.createTextNode(g);y.appendChild(m),l.appendChild(y)}break;case"href":case"target":var w=l.parentNode;if("a"!=w.tagName.toLowerCase()){var B=x("a");w.insertBefore(B,l),B.appendChild(l),w=B}"target"==d?w.setAttributeNS(p,"show","blank"==g?"new":g):w.setAttributeNS(p,d,g);break;case"cursor":l.style.cursor=g;break;case"transform":i.transform(g);break;case"arrow-start":_(i,g);break;case"arrow-end":_(i,g,1);break;case"clip-rect":var C=r(g).split(h);if(4==C.length){i.clip&&i.clip.parentNode.parentNode.removeChild(i.clip.parentNode);var T=x("clipPath"),A=x("rect");T.id=t.createUUID(),x(A,{x:C[0],y:C[1],width:C[2],height:C[3]}),T.appendChild(A),i.paper.defs.appendChild(T),x(l,{"clip-path":"url(#"+T.id+")"}),i.clip=A}if(!g){var E=l.getAttribute("clip-path");if(E){var N=t._g.doc.getElementById(E.replace(/(^url\(#|\)$)/g,c));N&&N.parentNode.removeChild(N),x(l,{"clip-path":c}),delete i.clip}}break;case"path":"path"==i.type&&(x(l,{d:g?u.path=t._pathToAbsolute(g):"M0,0"}),i._.dirty=1,i._.arrows&&("startString"in i._.arrows&&_(i,i._.arrows.startString),"endString"in i._.arrows&&_(i,i._.arrows.endString,1)));break;case"width":if(l.setAttribute(d,g),i._.dirty=1,!u.fx)break;d="x",g=u.x;case"x":u.fx&&(g=-u.x-(u.width||0));case"rx":if("rx"==d&&"rect"==i.type)break;case"cx":l.setAttribute(d,g),i.pattern&&b(i),i._.dirty=1;break;case"height":if(l.setAttribute(d,g),i._.dirty=1,!u.fy)break;d="y",g=u.y;case"y":u.fy&&(g=-u.y-(u.height||0));case"ry":if("ry"==d&&"rect"==i.type)break;case"cy":l.setAttribute(d,g),i.pattern&&b(i),i._.dirty=1;break;case"r":"rect"==i.type?x(l,{rx:g,ry:g}):l.setAttribute(d,g),i._.dirty=1;break;case"src":"image"==i.type&&l.setAttributeNS(p,"href",g);break;case"stroke-width":1==i._.sx&&1==i._.sy||(g/=s(o(i._.sx),o(i._.sy))||1),l.setAttribute(d,g),u["stroke-dasharray"]&&k(i,u["stroke-dasharray"],a),i._.arrows&&("startString"in i._.arrows&&_(i,i._.arrows.startString),"endString"in i._.arrows&&_(i,i._.arrows.endString,1));break;case"stroke-dasharray":k(i,g,a);break;case"fill":var M=r(g).match(t._ISURL);if(M){T=x("pattern");var L=x("image");T.id=t.createUUID(),x(T,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),x(L,{x:0,y:0,"xlink:href":M[1]}),T.appendChild(L),function(e){t._preload(M[1],function(){var t=this.offsetWidth,r=this.offsetHeight;x(e,{width:t,height:r}),x(L,{width:t,height:r})})}(T),i.paper.defs.appendChild(T),x(l,{fill:"url(#"+T.id+")"}),i.pattern=T,i.pattern&&b(i);break}var z=t.getRGB(g);if(z.error){if(("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&v(i,g)){if("opacity"in u||"fill-opacity"in u){var P=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(P){var F=P.getElementsByTagName("stop");x(F[F.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=g,u.fill="none";break}}else delete a.gradient,delete u.gradient,!t.is(u.opacity,"undefined")&&t.is(a.opacity,"undefined")&&x(l,{opacity:u.opacity}),!t.is(u["fill-opacity"],"undefined")&&t.is(a["fill-opacity"],"undefined")&&x(l,{"fill-opacity":u["fill-opacity"]});z[e]("opacity")&&x(l,{"fill-opacity":z.opacity>1?z.opacity/100:z.opacity});case"stroke":z=t.getRGB(g),l.setAttribute(d,z.hex),"stroke"==d&&z[e]("opacity")&&x(l,{"stroke-opacity":z.opacity>1?z.opacity/100:z.opacity}),"stroke"==d&&i._.arrows&&("startString"in i._.arrows&&_(i,i._.arrows.startString),"endString"in i._.arrows&&_(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=r(g).charAt())&&v(i,g);break;case"opacity":u.gradient&&!u[e]("stroke-opacity")&&x(l,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(u.gradient){(P=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c)))&&(F=P.getElementsByTagName("stop"),x(F[F.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=n(g,10)+"px");var R=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[R]=g,i._.dirty=1,l.setAttribute(d,g)}}S(i,a),l.style.visibility=f},S=function(i,a){if("text"==i.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=i.attrs,o=i.node,l=o.firstChild?n(t._g.doc.defaultView.getComputedStyle(o.firstChild,c).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var f,h=r(a.text).split("\n"),u=[],p=0,d=h.length;d>p;p++)f=x("tspan"),p&&x(f,{dy:1.2*l,x:s.x}),f.appendChild(t._g.doc.createTextNode(h[p])),o.appendChild(f),u[p]=f}else for(u=o.getElementsByTagName("tspan"),p=0,d=u.length;d>p;p++)p?x(u[p],{dy:1.2*l,x:s.x}):x(u[0],{dy:0});x(o,{x:s.x,y:s.y}),i._.dirty=1;var g=i._getBBox(),v=s.y-(g.y+g.height/2);v&&t.is(v,"finite")&&x(u[0],{dy:v})}},T=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t},A=function(e,r){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=r,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},E=t.el;A.prototype=E,E.constructor=A,t._engine.path=function(t,e){var r=x("path");e.canvas&&e.canvas.appendChild(r);var i=new A(r,e);return i.type="path",B(i,{fill:"none",stroke:"#000",path:t}),i},E.rotate=function(t,e,n){if(this.removed)return this;if(t=r(t).split(h),t.length-1&&(e=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,e,n]])),this},E.scale=function(t,e,n,a){if(this.removed)return this;if(t=r(t).split(h),t.length-1&&(e=i(t[1]),n=i(t[2]),a=i(t[3])),t=i(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this},E.translate=function(t,e){return this.removed?this:(t=r(t).split(h),t.length-1&&(e=i(t[1])),t=i(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},E.transform=function(r){var i=this._;if(null==r)return i.transform;if(t._extractTransform(this,r),this.clip&&x(this.clip,{transform:this.matrix.invert()}),this.pattern&&b(this),this.node&&x(this.node,{transform:this.matrix}),1!=i.sx||1!=i.sy){var n=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":n})}return i.transform=this.matrix.toTransformString(),this},E.hide=function(){return this.removed||(this.node.style.display="none"),this},E.show=function(){return this.removed||(this.node.style.display=""),this},E.remove=function(){var e=T(this.node);if(!this.removed&&e.parentNode){var r=this.paper;r.__set__&&r.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&r.defs.removeChild(this.gradient),t._tear(this,r),e.parentNode.removeChild(e),this.removeData();for(var i in this)this[i]="function"==typeof this[i]?t._removedFactory(i):null;this.removed=!0}},E._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var r,e=!1;this.paper.canvas.parentElement?r=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(r=this.paper.canvas.parentNode.style),r&&"none"==r.display&&(e=!0,r.display="");var i={};try{i=this.node.getBBox()}catch(n){i={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{i=i||{},e&&(r.display="none")}return t&&this.hide(),i},E.attr=function(r,i){if(this.removed)return this;if(null==r){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&t.is(r,"string")){if("fill"==r&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==r)return this._.transform;for(var s=r.split(h),o={},l=0,c=s.length;c>l;l++)r=s[l],r in this.attrs?o[r]=this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?o[r]=this.paper.customAttributes[r].def:o[r]=t._availableAttrs[r];return c-1?o:o[s[0]]}if(null==i&&t.is(r,"array")){for(o={},l=0,c=r.length;c>l;l++)o[r[l]]=this.attr(r[l]);return o}if(null!=i){var f={};f[r]=i}else null!=r&&t.is(r,"object")&&(f=r);for(var p in f)u("raphael.attr."+p+"."+this.id,this,f[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&f[e](p)&&t.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));this.attrs[p]=f[p];for(var g in d)d[e](g)&&(f[g]=d[g])}return B(this,f),this},E.toFront=function(){if(this.removed)return this;var e=T(this.node);e.parentNode.appendChild(e);var r=this.paper;return r.top!=this&&t._tofront(this,r),this},E.toBack=function(){if(this.removed)return this;var e=T(this.node),r=e.parentNode;r.insertBefore(e,r.firstChild),t._toback(this,this.paper);this.paper;return this},E.insertAfter=function(e){if(this.removed||!e)return this;var r=T(this.node),i=T(e.node||e[e.length-1].node);return i.nextSibling?i.parentNode.insertBefore(r,i.nextSibling):i.parentNode.appendChild(r),t._insertafter(this,e,this.paper),this},E.insertBefore=function(e){if(this.removed||!e)return this;var r=T(this.node),i=T(e.node||e[0].node);return i.parentNode.insertBefore(r,i),t._insertbefore(this,e,this.paper),this},E.blur=function(e){var r=this;if(0!=+e){var i=x("filter"),n=x("feGaussianBlur");r.attrs.blur=e,i.id=t.createUUID(),x(n,{stdDeviation:+e||1.5}),i.appendChild(n),r.paper.defs.appendChild(i),r._blur=i,x(r.node,{filter:"url(#"+i.id+")"})}else r._blur&&(r._blur.parentNode.removeChild(r._blur),delete r._blur,delete r.attrs.blur),r.node.removeAttribute("filter");return r},t._engine.circle=function(t,e,r,i){var n=x("circle");t.canvas&&t.canvas.appendChild(n);var a=new A(n,t);return a.attrs={cx:e,cy:r,r:i,fill:"none",stroke:"#000"},a.type="circle",x(n,a.attrs),a},t._engine.rect=function(t,e,r,i,n,a){var s=x("rect");t.canvas&&t.canvas.appendChild(s);var o=new A(s,t);return o.attrs={x:e,y:r,width:i,height:n,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",x(s,o.attrs),o},t._engine.ellipse=function(t,e,r,i,n){var a=x("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new A(a,t);return s.attrs={cx:e,cy:r,rx:i,ry:n,fill:"none",stroke:"#000"},s.type="ellipse",x(a,s.attrs),s},t._engine.image=function(t,e,r,i,n,a){var s=x("image");x(s,{x:r,y:i,width:n,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new A(s,t);return o.attrs={x:r,y:i,width:n,height:a,src:e},o.type="image",o},t._engine.text=function(e,r,i,n){var a=x("text");e.canvas&&e.canvas.appendChild(a);var s=new A(a,e);return s.attrs={x:r,y:i,"text-anchor":"middle",text:n,"font-family":t._availableAttrs["font-family"],"font-size":t._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",B(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e&&e.container,i=e.x,n=e.y,a=e.width,s=e.height;if(!r)throw new Error("SVG container not found.");var h,o=x("svg"),l="overflow:hidden;";return i=i||0,n=n||0,a=a||512,s=s||342,x(o,{height:s,version:1.1,width:a,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==r?(o.style.cssText=l+"position:absolute;left:"+i+"px;top:"+n+"px",t._g.doc.body.appendChild(o),h=1):(o.style.cssText=l+"position:relative",r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),r=new t._Paper,r.width=a,r.height=s,r.canvas=o,r.clear(),r._left=r._top=0,h&&(r.renderfix=function(){}),r.renderfix(),r},t._engine.setViewBox=function(t,e,r,i,n){u("raphael.setViewBox",this,this._viewBox,[t,e,r,i,n]);var c,p,a=this.getSize(),o=s(r/a.width,i/a.height),l=this.top,h=n?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(o=1),delete this._vbSize,c="0 0 "+this.width+f+this.height):(this._vbSize=o,c=t+f+e+f+r+f+i),x(this.canvas,{viewBox:c,preserveAspectRatio:h});o&&l;)p="stroke-width"in l.attrs?l.attrs["stroke-width"]:1,l.attr({"stroke-width":p}),l._.dirty=1,l._.dirtyT=1,l=l.prev;return this._viewBox=[t,e,r,i,!!n],this},t.prototype.renderfix=function(){var r,t=this.canvas,e=t.style;try{r=t.getScreenCTM()||t.createSVGMatrix()}catch(i){r=t.createSVGMatrix()}var n=-r.e%1,a=-r.f%1;(n||a)&&(n&&(this._left=(this._left+n)%1,e.left=this._left+"px"),a&&(this._top=(this._top+a)%1,e.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=x("desc")).appendChild(t._g.doc.createTextNode("Created with Raphaël "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=x("defs"))},t.prototype.remove=function(){u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var N=t.st;for(var M in E)E[e](M)&&!N[e](M)&&(N[M]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(M))}}.apply(e,i))&&(t.exports=n)},function(t,e,r){var i,n;i=[r(1)],void 0!==(n=function(t){if(!t||t.vml){
  var e="hasOwnProperty",r=String,i=parseFloat,n=Math,a=n.round,s=n.max,o=n.min,l=n.abs,h="fill",u=/[, ]+/,c=t.eve,p=" ",d="",g={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},m="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",b=21600,_={path:1,rect:1,image:1},w={circle:1,ellipse:1},k=function(e){var i=/[ahqstv]/gi,n=t._pathToAbsolute;if(r(e).match(i)&&(n=t._path2curve),i=/[clmz]/g,n==t._pathToAbsolute&&!r(e).match(i)){var s=r(e).replace(/([clmz]),?([^clmz]*)/gi,function(t,e,r){var i=[],n="m"==e.toLowerCase(),s=g[e];return r.replace(/-?[^,\s-]+/g,function(t){n&&2==i.length&&(s+=i+g["m"==e?"l":"L"],i=[]),i.push(a(t*b))}),s+i});return s}var l,h,o=n(e);s=[];for(var u=0,c=o.length;c>u;u++){l=o[u],"z"==(h=o[u][0].toLowerCase())&&(h="x");for(var f=1,v=l.length;v>f;f++)h+=a(l[f]*b)+(f!=v-1?",":d);s.push(h)}return s.join(p)},B=function(e,r,i){var n=t.matrix();return n.rotate(-e,.5,.5),{dx:n.x(r,i),dy:n.y(r,i)}},C=function(t,e,r,i,n,a){var s=t._,o=t.matrix,u=s.fillpos,c=t.node,f=c.style,d=1,g="",v=b/e,y=b/r;if(f.visibility="hidden",e&&r){if(c.coordsize=l(v)+p+l(y),f.rotation=a*(0>e*r?-1:1),a){var m=B(a,i,n);i=m.dx,n=m.dy}if(0>e&&(g+="x"),0>r&&(g+=" y")&&(d=-1),f.flip=g,c.coordorigin=i*-v+p+n*-y,u||s.fillsize){var _=c.getElementsByTagName(h);_=_&&_[0],c.removeChild(_),u&&(m=B(a,o.x(u[0],u[1]),o.y(u[0],u[1])),_.position=m.dx*d+p+m.dy*d),s.fillsize&&(_.size=s.fillsize[0]*l(e)+p+s.fillsize[1]*l(r)),c.appendChild(_)}f.visibility="visible"}};t.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var S=function(t,e,i){for(var n=r(e).toLowerCase().split("-"),a=i?"end":"start",s=n.length,o="classic",l="medium",h="medium";s--;)switch(n[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=n[s];break;case"wide":case"narrow":h=n[s];break;case"long":case"short":l=n[s]}var u=t.node.getElementsByTagName("stroke")[0];u[a+"arrow"]=o,u[a+"arrowlength"]=l,u[a+"arrowwidth"]=h},T=function(n,l){n.attrs=n.attrs||{};var c=n.node,f=n.attrs,g=c.style,v=_[n.type]&&(l.x!=f.x||l.y!=f.y||l.width!=f.width||l.height!=f.height||l.cx!=f.cx||l.cy!=f.cy||l.rx!=f.rx||l.ry!=f.ry||l.r!=f.r),y=w[n.type]&&(f.cx!=l.cx||f.cy!=l.cy||f.r!=l.r||f.rx!=l.rx||f.ry!=l.ry),m=n;for(var B in l)l[e](B)&&(f[B]=l[B]);if(v&&(f.path=t._getPath[n.type](n),n._.dirty=1),l.href&&(c.href=l.href),l.title&&(c.title=l.title),l.target&&(c.target=l.target),l.cursor&&(g.cursor=l.cursor),"blur"in l&&n.blur(l.blur),(l.path&&"path"==n.type||v)&&(c.path=k(~r(f.path).toLowerCase().indexOf("r")?t._pathToAbsolute(f.path):f.path),n._.dirty=1,"image"==n.type&&(n._.fillpos=[f.x,f.y],n._.fillsize=[f.width,f.height],C(n,1,1,0,0,0))),"transform"in l&&n.transform(l.transform),y){var T=+f.cx,E=+f.cy,N=+f.rx||+f.r||0,L=+f.ry||+f.r||0;c.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((T-N)*b),a((E-L)*b),a((T+N)*b),a((E+L)*b),a(T*b)),n._.dirty=1}if("clip-rect"in l){var z=r(l["clip-rect"]).split(u);if(4==z.length){z[2]=+z[2]+ +z[0],z[3]=+z[3]+ +z[1];var P=c.clipRect||t._g.doc.createElement("div"),F=P.style;F.clip=t.format("rect({1}px {2}px {3}px {0}px)",z),c.clipRect||(F.position="absolute",F.top=0,F.left=0,F.width=n.paper.width+"px",F.height=n.paper.height+"px",c.parentNode.insertBefore(P,c),P.appendChild(c),c.clipRect=P)}l["clip-rect"]||c.clipRect&&(c.clipRect.style.clip="auto")}if(n.textpath){var R=n.textpath.style;l.font&&(R.font=l.font),l["font-family"]&&(R.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),l["font-size"]&&(R.fontSize=l["font-size"]),l["font-weight"]&&(R.fontWeight=l["font-weight"]),l["font-style"]&&(R.fontStyle=l["font-style"])}if("arrow-start"in l&&S(m,l["arrow-start"]),"arrow-end"in l&&S(m,l["arrow-end"],1),null!=l.opacity||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var I=c.getElementsByTagName(h);if(I=I&&I[0],!I&&(I=M(h)),"image"==n.type&&l.src&&(I.src=l.src),l.fill&&(I.on=!0),null!=I.on&&"none"!=l.fill&&null!==l.fill||(I.on=!1),I.on&&l.fill){var q=r(l.fill).match(t._ISURL);if(q){I.parentNode==c&&c.removeChild(I),I.rotate=!0,I.src=q[1],I.type="tile";var D=n.getBBox(1);I.position=D.x+p+D.y,n._.fillpos=[D.x,D.y],t._preload(q[1],function(){n._.fillsize=[this.offsetWidth,this.offsetHeight]})}else I.color=t.getRGB(l.fill).hex,I.src=d,I.type="solid",t.getRGB(l.fill).error&&(m.type in{circle:1,ellipse:1}||"r"!=r(l.fill).charAt())&&A(m,l.fill,I)&&(f.fill="none",f.gradient=l.fill,I.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var V=((+f["fill-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);V=o(s(V,0),1),I.opacity=V,I.src&&(I.color="none")}c.appendChild(I);var O=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0],Y=!1;!O&&(Y=O=M("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(O.on=!0),("none"==l.stroke||null===l.stroke||null==O.on||0==l.stroke||0==l["stroke-width"])&&(O.on=!1);var W=t.getRGB(l.stroke);O.on&&l.stroke&&(O.color=W.hex),V=((+f["stroke-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+W.o+1||2)-1);var G=.75*(i(l["stroke-width"])||1);if(V=o(s(V,0),1),null==l["stroke-width"]&&(G=f["stroke-width"]),l["stroke-width"]&&(O.weight=G),G&&1>G&&(V*=G)&&(O.weight=1),O.opacity=V,l["stroke-linejoin"]&&(O.joinstyle=l["stroke-linejoin"]||"miter"),O.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(O.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var H={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};O.dashstyle=H[e](l["stroke-dasharray"])?H[l["stroke-dasharray"]]:d}Y&&c.appendChild(O)}if("text"==m.type){m.paper.canvas.style.display=d;var X=m.paper.span,$=f.font&&f.font.match(/\d+(?:\.\d*)?(?=px)/);g=X.style,f.font&&(g.font=f.font),f["font-family"]&&(g.fontFamily=f["font-family"]),f["font-weight"]&&(g.fontWeight=f["font-weight"]),f["font-style"]&&(g.fontStyle=f["font-style"]),$=i(f["font-size"]||$&&$[0])||10,g.fontSize=100*$+"px",m.textpath.string&&(X.innerHTML=r(m.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var Z=X.getBoundingClientRect();m.W=f.w=(Z.right-Z.left)/100,m.H=f.h=(Z.bottom-Z.top)/100,m.X=f.x,m.Y=f.y+m.H/2,("x"in l||"y"in l)&&(m.path.v=t.format("m{0},{1}l{2},{1}",a(f.x*b),a(f.y*b),a(f.x*b)+1));for(var Q=["x","y","text","font","font-family","font-weight","font-style","font-size"],J=0,K=Q.length;K>J;J++)if(Q[J]in l){m._.dirty=1;break}switch(f["text-anchor"]){case"start":m.textpath.style["v-text-align"]="left",m.bbx=m.W/2;break;case"end":m.textpath.style["v-text-align"]="right",m.bbx=-m.W/2;break;default:m.textpath.style["v-text-align"]="center",m.bbx=0}m.textpath.style["v-text-kern"]=!0}},A=function(e,a,s){e.attrs=e.attrs||{};var l=(e.attrs,Math.pow),c="linear",f=".5 .5";if(e.attrs.gradient=a,a=r(a).replace(t._radial_gradient,function(t,e,r){return c="radial",e&&r&&(e=i(e),r=i(r),l(e-.5,2)+l(r-.5,2)>.25&&(r=n.sqrt(.25-l(e-.5,2))*(2*(r>.5)-1)+.5),f=e+p+r),d}),a=a.split(/\s*\-\s*/),"linear"==c){var g=a.shift();if(g=-i(g),isNaN(g))return null}var x=t._parseDots(a);if(!x)return null;if(e=e.shape||e.node,x.length){e.removeChild(s),s.on=!0,s.method="none",s.color=x[0].color,s.color2=x[x.length-1].color;for(var v=[],y=0,m=x.length;m>y;y++)x[y].offset&&v.push(x[y].offset+p+x[y].color);s.colors=v.length?v.join():"0% "+s.color,"radial"==c?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=f,s.angle=0):(s.type="gradient",s.angle=(270-g)%360),e.appendChild(s)}return 1},E=function(e,r){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=r,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},N=t.el;E.prototype=N,N.constructor=E,N.transform=function(e){if(null==e)return this._.transform;var a,i=this.paper._viewBoxShift,n=i?"s"+[i.scale,i.scale]+"-1-1t"+[i.dx,i.dy]:d;i&&(a=e=r(e).replace(/\.{3}|\u2026/g,this._.transform||d)),t._extractTransform(this,n+e);var h,s=this.matrix.clone(),o=this.skew,l=this.node,u=~r(this.attrs.fill).indexOf("-"),c=!r(this.attrs.fill).indexOf("url(");if(s.translate(1,1),c||u||"image"==this.type)if(o.matrix="1 0 0 1",o.offset="0 0",h=s.split(),u&&h.noRotation||!h.isSimple){l.style.filter=s.toFilter();var f=this.getBBox(),g=this.getBBox(1),x=f.x-g.x,v=f.y-g.y;l.coordorigin=x*-b+p+v*-b,C(this,1,1,x,v,0)}else l.style.filter=d,C(this,h.scalex,h.scaley,h.dx,h.dy,h.rotate);else l.style.filter=d,o.matrix=r(s),o.offset=s.offset();return null!==a&&(this._.transform=a,t._extractTransform(this,a)),this},N.rotate=function(t,e,n){if(this.removed)return this;if(null!=t){if(t=r(t).split(u),t.length-1&&(e=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,n]])),this}},N.translate=function(t,e){return this.removed?this:(t=r(t).split(u),t.length-1&&(e=i(t[1])),t=i(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},N.scale=function(t,e,n,a){if(this.removed)return this;if(t=r(t).split(u),t.length-1&&(e=i(t[1]),n=i(t[2]),a=i(t[3]),isNaN(n)&&(n=null),isNaN(a)&&(a=null)),t=i(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this._.dirtyT=1,this},N.hide=function(){return!this.removed&&(this.node.style.display="none"),this},N.show=function(){return!this.removed&&(this.node.style.display=d),this},N.auxGetBBox=t.el.getBBox,N.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},r=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=r,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=r,e.width=t.width*r,e.height=t.height*r,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},N._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},N.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},N.attr=function(r,i){if(this.removed)return this;if(null==r){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&t.is(r,"string")){if(r==h&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=r.split(u),o={},l=0,f=s.length;f>l;l++)r=s[l],r in this.attrs?o[r]=this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?o[r]=this.paper.customAttributes[r].def:o[r]=t._availableAttrs[r];return f-1?o:o[s[0]]}if(this.attrs&&null==i&&t.is(r,"array")){for(o={},l=0,f=r.length;f>l;l++)o[r[l]]=this.attr(r[l]);return o}var p;null!=i&&(p={},p[r]=i),null==i&&t.is(r,"object")&&(p=r);for(var d in p)c("raphael.attr."+d+"."+this.id,this,p[d]);if(p){for(d in this.paper.customAttributes)if(this.paper.customAttributes[e](d)&&p[e](d)&&t.is(this.paper.customAttributes[d],"function")){var g=this.paper.customAttributes[d].apply(this,[].concat(p[d]));this.attrs[d]=p[d];for(var x in g)g[e](x)&&(p[x]=g[x])}p.text&&"text"==this.type&&(this.textpath.string=p.text),T(this,p)}return this},N.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},N.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},N.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},N.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},N.blur=function(e){var r=this.node.runtimeStyle,i=r.filter;return i=i.replace(/ progid:\S+Blur\([^\)]+\)/g,d),0!=+e?(this.attrs.blur=e,r.filter=i+p+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+e||1.5)+")",r.margin=t.format("-{0}px 0 0 -{0}px",a(+e||1.5))):(r.filter=i,r.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var r=M("shape");r.style.cssText=m,r.coordsize=b+p+b,r.coordorigin=e.coordorigin;var i=new E(r,e),n={fill:"none",stroke:"#000"};t&&(n.path=t),i.type="path",i.path=[],i.Path=d,T(i,n),e.canvas&&e.canvas.appendChild(r);var a=M("skew");return a.on=!0,r.appendChild(a),i.skew=a,i.transform(d),i},t._engine.rect=function(e,r,i,n,a,s){var o=t._rectPath(r,i,n,a,s),l=e.path(o),h=l.attrs;return l.X=h.x=r,l.Y=h.y=i,l.W=h.width=n,l.H=h.height=a,h.r=s,h.path=o,l.type="rect",l},t._engine.ellipse=function(t,e,r,i,n){var a=t.path();a.attrs;return a.X=e-i,a.Y=r-n,a.W=2*i,a.H=2*n,a.type="ellipse",T(a,{cx:e,cy:r,rx:i,ry:n}),a},t._engine.circle=function(t,e,r,i){var n=t.path();n.attrs;return n.X=e-i,n.Y=r-i,n.W=n.H=2*i,n.type="circle",T(n,{cx:e,cy:r,r:i}),n},t._engine.image=function(e,r,i,n,a,s){var o=t._rectPath(i,n,a,s),l=e.path(o).attr({stroke:"none"}),u=l.attrs,c=l.node,f=c.getElementsByTagName(h)[0];return u.src=r,l.X=u.x=i,l.Y=u.y=n,l.W=u.width=a,l.H=u.height=s,u.path=o,l.type="image",f.parentNode==c&&c.removeChild(f),f.rotate=!0,f.src=r,f.type="tile",l._.fillpos=[i,n],l._.fillsize=[a,s],c.appendChild(f),C(l,1,1,0,0,0),l},t._engine.text=function(e,i,n,s){var o=M("shape"),l=M("path"),h=M("textpath");i=i||0,n=n||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",a(i*b),a(n*b),a(i*b)+1),l.textpathok=!0,h.string=r(s),h.on=!0,o.style.cssText=m,o.coordsize=b+p+b,o.coordorigin="0 0";var u=new E(o,e),c={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};u.shape=o,u.path=l,u.textpath=h,u.type="text",u.attrs.text=r(s),u.attrs.x=i,u.attrs.y=n,u.attrs.w=1,u.attrs.h=1,T(u,c),o.appendChild(h),o.appendChild(l),e.canvas.appendChild(o);var f=M("skew");return f.on=!0,o.appendChild(f),u.skew=f,u.transform(d),u},t._engine.setSize=function(e,r){var i=this.canvas.style;return this.width=e,this.height=r,e==+e&&(e+="px"),r==+r&&(r+="px"),i.width=e,i.height=r,i.clip="rect(0 "+e+" "+r+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,r,i,n,a){t.eve("raphael.setViewBox",this,this._viewBox,[e,r,i,n,a]);var h,u,s=this.getSize(),o=s.width,l=s.height;return a&&(h=l/n,u=o/i,o>i*h&&(e-=(o-i*h)/2/h),l>n*u&&(r-=(l-n*u)/2/u)),this._viewBox=[e,r,i,n,!!a],this._viewBoxShift={dx:-e,dy:-r,scale:s},this.forEach(function(t){t.transform("...")}),this};var M;t._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),M=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(r){M=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e.container,i=e.height,a=e.width,s=e.x,o=e.y;if(!r)throw new Error("VML container not found.");var l=new t._Paper,h=l.canvas=t._g.doc.createElement("div"),u=h.style;return s=s||0,o=o||0,a=a||512,i=i||342,l.width=a,l.height=i,a==+a&&(a+="px"),i==+i&&(i+="px"),l.coordsize=216e5+p+216e5,l.coordorigin="0 0",l.span=t._g.doc.createElement("span"),l.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",h.appendChild(l.span),u.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",a,i),1==r?(t._g.doc.body.appendChild(h),u.left=s+"px",u.top=o+"px",u.position="absolute"):r.firstChild?r.insertBefore(h,r.firstChild):r.appendChild(h),l.renderfix=function(){},l},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var L=t.st;for(var z in N)N[e](z)&&!L[e](z)&&(L[z]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(z))}}.apply(e,i))&&(t.exports=n)}])})},{}],5:[function(require,module,exports){var parseCommon={};parseCommon.clone=function(source){var destination={};for(var property in source)source.hasOwnProperty(property)&&(destination[property]=source[property]);return destination},parseCommon.cloneArray=function(source){for(var destination=[],i=0;i<source.length;i++)destination.push(parseCommon.clone(source[i]));return destination},parseCommon.cloneHashOfHash=function(source){var destination={};for(var property in source)source.hasOwnProperty(property)&&(destination[property]=parseCommon.clone(source[property]));return destination},parseCommon.cloneHashOfArrayOfHash=function(source){var destination={};for(var property in source)source.hasOwnProperty(property)&&(destination[property]=parseCommon.cloneArray(source[property]));return destination},parseCommon.gsub=function(source,pattern,replacement){return source.split(pattern).join(replacement)},parseCommon.strip=function(str){return str.replace(/^\s+/,"").replace(/\s+$/,"")},parseCommon.startsWith=function(str,pattern){return 0===str.indexOf(pattern)},parseCommon.endsWith=function(str,pattern){var d=str.length-pattern.length;return d>=0&&str.lastIndexOf(pattern)===d},parseCommon.each=function(arr,iterator,context){for(var i=0,length=arr.length;i<length;i++)iterator.apply(context,[arr[i],i])},parseCommon.last=function(arr){return 0===arr.length?null:arr[arr.length-1]},parseCommon.compact=function(arr){for(var output=[],i=0;i<arr.length;i++)arr[i]&&output.push(arr[i]);return output},parseCommon.detect=function(arr,iterator){for(var i=0;i<arr.length;i++)if(iterator(arr[i]))return!0;return!1},module.exports=parseCommon},{}],6:[function(require,module,exports){var parseCommon=require("./abc_common"),parseDirective=require("./abc_parse_directive"),ParseHeader=require("./abc_parse_header"),parseKeyVoice=require("./abc_parse_key_voice"),Tokenizer=require("./abc_tokenizer"),Tune=require("../data/abc_tune"),Parse=function(){"use strict";function addPositioning(el,type,value){el.positioning||(el.positioning={}),el.positioning[type]=value}function addFont(el,type,value){el.fonts||(el.fonts={}),el.fonts[type]=value}function startNewLine(){var params={startChar:-1,endChar:-1};if(multilineVars.partForNextLine.length&&(params.part=multilineVars.partForNextLine),params.clef=multilineVars.currentVoice&&void 0!==multilineVars.staves[multilineVars.currentVoice.staffNum].clef?parseCommon.clone(multilineVars.staves[multilineVars.currentVoice.staffNum].clef):parseCommon.clone(multilineVars.clef),params.key=parseKeyVoice.deepCopyKey(multilineVars.key),parseKeyVoice.addPosToKey(params.clef,params.key),null!==multilineVars.meter?(multilineVars.currentVoice?(parseCommon.each(multilineVars.staves,function(st){st.meter=multilineVars.meter}),params.meter=multilineVars.staves[multilineVars.currentVoice.staffNum].meter,multilineVars.staves[multilineVars.currentVoice.staffNum].meter=null):params.meter=multilineVars.meter,multilineVars.meter=null):multilineVars.currentVoice&&multilineVars.staves[multilineVars.currentVoice.staffNum].meter&&(params.meter=multilineVars.staves[multilineVars.currentVoice.staffNum].meter,multilineVars.staves[multilineVars.currentVoice.staffNum].meter=null),multilineVars.currentVoice&&multilineVars.currentVoice.name&&(params.name=multilineVars.currentVoice.name),multilineVars.vocalfont&&(params.vocalfont=multilineVars.vocalfont),multilineVars.style&&(params.style=multilineVars.style),multilineVars.currentVoice){var staff=multilineVars.staves[multilineVars.currentVoice.staffNum];staff.brace&&(params.brace=staff.brace),staff.bracket&&(params.bracket=staff.bracket),staff.connectBarLines&&(params.connectBarLines=staff.connectBarLines),staff.name&&(params.name=staff.name[multilineVars.currentVoice.index]),staff.subname&&(params.subname=staff.subname[multilineVars.currentVoice.index]),multilineVars.currentVoice.stem&&(params.stem=multilineVars.currentVoice.stem),multilineVars.currentVoice.scale&&(params.scale=multilineVars.currentVoice.scale),multilineVars.currentVoice.style&&(params.style=multilineVars.currentVoice.style),multilineVars.currentVoice.transpose&&(params.clef.transpose=multilineVars.currentVoice.transpose)}var isFirstVoice=void 0===multilineVars.currentVoice||0===multilineVars.currentVoice.staffNum&&0===multilineVars.currentVoice.index;0===multilineVars.barNumbers&&isFirstVoice&&1!==multilineVars.currBarNumber&&(params.barNumber=multilineVars.currBarNumber),tune.startNewLine(params),multilineVars.partForNextLine=""}function durationOfMeasure(multilineVars){var meter=multilineVars.origMeter;return meter&&"specified"===meter.type&&meter.value&&0!==meter.value.length?parseInt(meter.value[0].num,10)/parseInt(meter.value[0].den,10):1}function appendLastMeasure(voice,nextVoice){voice.push({el_type:"hint"});for(var i=0;i<nextVoice.length;i++){var element=nextVoice[i],hint=parseCommon.clone(element);if(voice.push(hint),"bar"===element.el_type)return}}function addHintMeasure(staff,nextStaff){for(var i=0;i<staff.length;i++){var stave=staff[i],nextStave=nextStaff[i];if(nextStave)for(var j=0;j<nextStave.voices.length;j++){var nextVoice=nextStave.voices[j],voice=stave.voices[j];voice&&appendLastMeasure(voice,nextVoice)}}}function addHintMeasures(){for(var i=0;i<tune.lines.length;i++){var line=tune.lines[i].staff;if(line){for(var j=i+1;j<tune.lines.length&&void 0===tune.lines[j].staff;)j++;if(j<tune.lines.length){addHintMeasure(line,tune.lines[j].staff)}}}}var tune=new Tune,tokenizer=new Tokenizer;this.getTune=function(){return tune};var multilineVars={reset:function(){for(var property in this)this.hasOwnProperty(property)&&"function"!=typeof this[property]&&delete this[property];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.is_in_history=!1,this.partForNextLine="",this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.inTextBlock=!1,this.inPsBlock=!1,this.ignoredDecorations=[],this.textBlock="",this.score_is_present=!1,this.inEnding=!1,this.inTie=!1,this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[]},differentFont:function(type,defaultFonts){return this[type].decoration!==defaultFonts[type].decoration||(this[type].face!==defaultFonts[type].face||(this[type].size!==defaultFonts[type].size||(this[type].style!==defaultFonts[type].style||this[type].weight!==defaultFonts[type].weight)))},addFormattingOptions:function(el,defaultFonts,elType){"note"===elType?("auto"!==this.vocalPosition&&addPositioning(el,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&addPositioning(el,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&addPositioning(el,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&addPositioning(el,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&addPositioning(el,"volumePosition",this.volumePosition),this.differentFont("annotationfont",defaultFonts)&&addFont(el,"annotationfont",this.annotationfont),this.differentFont("gchordfont",defaultFonts)&&addFont(el,"gchordfont",this.gchordfont),this.differentFont("vocalfont",defaultFonts)&&addFont(el,"vocalfont",this.vocalfont)):"bar"===elType&&("auto"!==this.dynamicPosition&&addPositioning(el,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&addPositioning(el,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&addPositioning(el,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&addPositioning(el,"volumePosition",this.volumePosition),this.differentFont("measurefont",defaultFonts)&&addFont(el,"measurefont",this.measurefont),this.differentFont("repeatfont",defaultFonts)&&addFont(el,"repeatfont",this.repeatfont))}},addWarning=function(str){multilineVars.warnings||(multilineVars.warnings=[]),multilineVars.warnings.push(str)},addWarningObject=function(warningObject){multilineVars.warningObjects||(multilineVars.warningObjects=[]),multilineVars.warningObjects.push(warningObject)},encode=function(str){var ret=parseCommon.gsub(str,""," ");return ret=parseCommon.gsub(ret,"&","&amp;"),ret=parseCommon.gsub(ret,"<","&lt;"),parseCommon.gsub(ret,">","&gt;")},warn=function(str,line,col_num){line||(line=" ");var bad_char=line.charAt(col_num);" "===bad_char&&(bad_char="SPACE");var clean_line=encode(line.substring(0,col_num))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+bad_char+"</span>"+encode(line.substring(col_num+1));addWarning("Music Line:"+tune.getNumLines()+":"+(col_num+1)+": "+str+":  "+clean_line),addWarningObject({message:str,line:line,startChar:multilineVars.iChar+col_num,column:col_num})},header=new ParseHeader(tokenizer,warn,multilineVars,tune);this.getWarnings=function(){return multilineVars.warnings},this.getWarningObjects=function(){return multilineVars.warningObjects};var letter_to_chord=function(line,i){if('"'===line.charAt(i)){var chord=tokenizer.getBrackettedSubstring(line,i,5);if(chord[2]||warn("Missing the closing quote while parsing the chord symbol",line,i),chord[0]>0&&chord[1].length>0&&"^"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="above";else if(chord[0]>0&&chord[1].length>0&&"_"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="below";else if(chord[0]>0&&chord[1].length>0&&"<"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="left";else if(chord[0]>0&&chord[1].length>0&&">"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="right";else if(chord[0]>0&&chord[1].length>0&&"@"===chord[1].charAt(0)){chord[1]=chord[1].substring(1);var x=tokenizer.getFloat(chord[1]);0===x.digits&&warn("Missing first position in absolutely positioned annotation.",line,i),chord[1]=chord[1].substring(x.digits),","!==chord[1][0]&&warn("Missing comma absolutely positioned annotation.",line,i),chord[1]=chord[1].substring(1);var y=tokenizer.getFloat(chord[1]);0===y.digits&&warn("Missing second position in absolutely positioned annotation.",line,i),chord[1]=chord[1].substring(y.digits);var ws=tokenizer.skipWhiteSpace(chord[1]);chord[1]=chord[1].substring(ws),chord[2]=null,chord[3]={x:x.value,y:y.value}}else chord[1]=chord[1].replace(/([ABCDEFG])b/g,"$1♭"),chord[1]=chord[1].replace(/([ABCDEFG])#/g,"$1♯"),chord[2]="default";return chord}return[0,""]},legalAccents=["trill","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","slide","^","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x"],volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)"],accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],letter_to_accent=function(line,i){var macro=multilineVars.macros[line.charAt(i)];if(void 0!==macro)return"!"!==macro.charAt(0)&&"+"!==macro.charAt(0)||(macro=macro.substring(1)),"!"!==macro.charAt(macro.length-1)&&"+"!==macro.charAt(macro.length-1)||(macro=macro.substring(0,macro.length-1)),parseCommon.detect(legalAccents,function(acc){return macro===acc})?[1,macro]:parseCommon.detect(volumeDecorations,function(acc){return macro===acc})?("hidden"===multilineVars.volumePosition&&(macro=""),[1,macro]):parseCommon.detect(dynamicDecorations,function(acc){return"hidden"===multilineVars.dynamicPosition&&(macro=""),macro===acc})?[1,macro]:(parseCommon.detect(multilineVars.ignoredDecorations,function(dec){return macro===dec})||warn("Unknown macro: "+macro,line,i),[1,""]);switch(line.charAt(i)){case".":return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var ret=tokenizer.getBrackettedSubstring(line,i,5);return ret[1].length>0&&("^"===ret[1].charAt(0)||"_"===ret[1].charAt(0))&&(ret[1]=ret[1].substring(1)),parseCommon.detect(legalAccents,function(acc){return ret[1]===acc})?ret:parseCommon.detect(volumeDecorations,function(acc){return ret[1]===acc})?("hidden"===multilineVars.volumePosition&&(ret[1]=""),ret):parseCommon.detect(dynamicDecorations,function(acc){return ret[1]===acc})?("hidden"===multilineVars.dynamicPosition&&(ret[1]=""),ret):parseCommon.detect(accentPseudonyms,function(acc){return ret[1]===acc[0]&&(ret[1]=acc[1],!0)})?ret:parseCommon.detect(accentDynamicPseudonyms,function(acc){return ret[1]===acc[0]&&(ret[1]=acc[1],!0)})?("hidden"===multilineVars.dynamicPosition&&(ret[1]=""),ret):"!"!==line.charAt(i)||1!==ret[0]&&"!"===line.charAt(i+ret[0]-1)?(warn("Unknown decoration: "+ret[1],line,i),ret[1]="",ret):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},letter_to_spacer=function(line,i){for(var start=i;tokenizer.isWhiteSpace(line.charAt(i));)i++;return[i-start]},letter_to_bar=function(line,curr_pos){var ret=tokenizer.getBarLine(line,curr_pos);if(0===ret.len)return[0,""];if(ret.warn)return warn(ret.warn,line,curr_pos),[ret.len,""];for(var ws=0;ws<line.length&&" "===line.charAt(curr_pos+ret.len+ws);ws++);var orig_bar_len=ret.len;if("["===line.charAt(curr_pos+ret.len+ws)&&(ret.len+=ws+1),'"'===line.charAt(curr_pos+ret.len)&&"["===line.charAt(curr_pos+ret.len-1)){var ending=tokenizer.getBrackettedSubstring(line,curr_pos+ret.len,5);return[ret.len+ending[0],ret.token,ending[1]]}var retRep=tokenizer.getTokenOf(line.substring(curr_pos+ret.len),"1234567890-,");return 0===retRep.len||"-"===retRep.token[0]?[orig_bar_len,ret.token]:[ret.len+retRep.len,ret.token,retRep.token]},letter_to_open_slurs_and_triplets=function(line,i){
  for(var ret={},start=i;"("===line.charAt(i)||tokenizer.isWhiteSpace(line.charAt(i));)"("===line.charAt(i)&&(i+1<line.length&&line.charAt(i+1)>="2"&&line.charAt(i+1)<="9"?(void 0!==ret.triplet?warn("Can't nest triplets",line,i):(ret.triplet=line.charAt(i+1)-"0",i+2<line.length&&":"===line.charAt(i+2)&&(i+3<line.length&&":"===line.charAt(i+3)?i+4<line.length&&line.charAt(i+4)>="1"&&line.charAt(i+4)<="9"?(ret.num_notes=line.charAt(i+4)-"0",i+=3):warn("expected number after the two colons after the triplet to mark the duration",line,i):i+3<line.length&&line.charAt(i+3)>="1"&&line.charAt(i+3)<="9"?i+4<line.length&&":"===line.charAt(i+4)?i+5<line.length&&line.charAt(i+5)>="1"&&line.charAt(i+5)<="9"&&(ret.num_notes=line.charAt(i+5)-"0",i+=4):(ret.num_notes=ret.triplet,i+=3):warn("expected number after the triplet to mark the duration",line,i))),i++):void 0===ret.startSlur?ret.startSlur=1:ret.startSlur++),i++;return ret.consumed=i-start,ret},addWords=function(line,words){if(!line)return void warn("Can't add words before the first line of music",line,0);words=parseCommon.strip(words),"-"!==words.charAt(words.length-1)&&(words+=" ");for(var word_list=[],last_divider=0,replace=!1,addWord=function(i){var word=parseCommon.strip(words.substring(last_divider,i));if(last_divider=i+1,word.length>0){replace&&(word=parseCommon.gsub(word,"~"," "));var div=words.charAt(i);return"_"!==div&&"-"!==div&&(div=" "),word_list.push({syllable:tokenizer.translateString(word),divider:div}),replace=!1,!0}return!1},i=0;i<words.length;i++)switch(words.charAt(i)){case" ":case"":addWord(i);break;case"-":!addWord(i)&&word_list.length>0&&(parseCommon.last(word_list).divider="-",word_list.push({skip:!0,to:"next"}));break;case"_":addWord(i),word_list.push({skip:!0,to:"slur"});break;case"*":addWord(i),word_list.push({skip:!0,to:"next"});break;case"|":addWord(i),word_list.push({skip:!0,to:"bar"});break;case"~":replace=!0}parseCommon.each(line,function(el){if(0!==word_list.length)if(word_list[0].skip)switch(word_list[0].to){case"next":case"slur":"note"===el.el_type&&null!==el.pitches&&word_list.shift();break;case"bar":"bar"===el.el_type&&word_list.shift()}else if("note"===el.el_type&&void 0===el.rest){var lyric=word_list.shift();void 0===el.lyric?el.lyric=[lyric]:el.lyric.push(lyric)}})},addSymbols=function(line,words){if(!line)return void warn("Can't add symbols before the first line of music",line,0);words=parseCommon.strip(words),"-"!==words.charAt(words.length-1)&&(words+=" ");for(var word_list=[],last_divider=0,replace=!1,addWord=function(i){var word=parseCommon.strip(words.substring(last_divider,i));if(last_divider=i+1,word.length>0){replace&&(word=parseCommon.gsub(word,"~"," "));var div=words.charAt(i);return"_"!==div&&"-"!==div&&(div=" "),word_list.push({syllable:tokenizer.translateString(word),divider:div}),replace=!1,!0}return!1},i=0;i<words.length;i++)switch(words.charAt(i)){case" ":case"":addWord(i);break;case"-":!addWord(i)&&word_list.length>0&&(parseCommon.last(word_list).divider="-",word_list.push({skip:!0,to:"next"}));break;case"_":addWord(i),word_list.push({skip:!0,to:"slur"});break;case"*":addWord(i),word_list.push({skip:!0,to:"next"});break;case"|":addWord(i),word_list.push({skip:!0,to:"bar"});break;case"~":replace=!0}parseCommon.each(line,function(el){if(0!==word_list.length)if(word_list[0].skip)switch(word_list[0].to){case"next":case"slur":"note"===el.el_type&&null!==el.pitches&&word_list.shift();break;case"bar":"bar"===el.el_type&&word_list.shift()}else if("note"===el.el_type&&void 0===el.rest){var lyric=word_list.shift();void 0===el.lyric?el.lyric=[lyric]:el.lyric.push(lyric)}})},getBrokenRhythm=function(line,index){switch(line.charAt(index)){case">":return index<line.length-1&&">"===line.charAt(index+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return index<line.length-1&&"<"===line.charAt(index+1)?[2,.25,1.75]:[1,.5,1.5]}return null},addEndBeam=function(el){return void 0!==el.duration&&el.duration<.25&&(el.end_beam=!0),el},pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},rests={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},getCoreNote=function(line,index,el,canHaveBrokenRhythm){for(var isComplete=function(state){return"octave"===state||"duration"===state||"Zduration"===state||"broken_rhythm"===state||"end_slur"===state},state="startSlur",durationSetByPreviousNote=!1;;){switch(line.charAt(index)){case"(":if("startSlur"!==state)return isComplete(state)?(el.endChar=index,el):null;void 0===el.startSlur?el.startSlur=1:el.startSlur++;break;case")":if(!isComplete(state))return null;void 0===el.endSlur?el.endSlur=1:el.endSlur++;break;case"^":if("startSlur"===state)el.accidental="sharp",state="sharp2";else{if("sharp2"!==state)return isComplete(state)?(el.endChar=index,el):null;el.accidental="dblsharp",state="pitch"}break;case"_":if("startSlur"===state)el.accidental="flat",state="flat2";else{if("flat2"!==state)return isComplete(state)?(el.endChar=index,el):null;el.accidental="dblflat",state="pitch"}break;case"=":if("startSlur"!==state)return isComplete(state)?(el.endChar=index,el):null;el.accidental="natural",state="pitch";break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if("startSlur"!==state&&"sharp2"!==state&&"flat2"!==state&&"pitch"!==state)return isComplete(state)?(el.endChar=index,el):null;el.pitch=pitches[line.charAt(index)],state="octave",canHaveBrokenRhythm&&0!==multilineVars.next_note_duration?(el.duration=multilineVars.default_length*multilineVars.next_note_duration,multilineVars.next_note_duration=0,durationSetByPreviousNote=!0):el.duration=multilineVars.default_length;break;case",":if("octave"!==state)return isComplete(state)?(el.endChar=index,el):null;el.pitch-=7;break;case"'":if("octave"!==state)return isComplete(state)?(el.endChar=index,el):null;el.pitch+=7;break;case"x":case"y":case"z":case"Z":if("startSlur"!==state)return isComplete(state)?(el.endChar=index,el):null;el.rest={type:rests[line.charAt(index)]},delete el.accidental,delete el.startSlur,delete el.startTie,delete el.endSlur,delete el.endTie,delete el.end_beam,delete el.grace_notes,"multimeasure"===el.rest.type?(el.duration=1,state="Zduration"):(canHaveBrokenRhythm&&0!==multilineVars.next_note_duration?(el.duration=multilineVars.default_length*multilineVars.next_note_duration,multilineVars.next_note_duration=0,durationSetByPreviousNote=!0):el.duration=multilineVars.default_length,state="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===state||"duration"===state){var fraction=tokenizer.getFraction(line,index);for(el.duration=el.duration*fraction.value,el.endChar=fraction.index;fraction.index<line.length&&(tokenizer.isWhiteSpace(line.charAt(fraction.index))||"-"===line.charAt(fraction.index));)"-"===line.charAt(fraction.index)?el.startTie={}:el=addEndBeam(el),fraction.index++;index=fraction.index-1,state="broken_rhythm"}else if("sharp2"===state)el.accidental="quartersharp",state="pitch";else{if("flat2"!==state){if("Zduration"===state){var num=tokenizer.getNumber(line,index);return el.duration=num.num,el.endChar=num.index,el}return null}el.accidental="quarterflat",state="pitch"}break;case"-":if("startSlur"===state)tune.addTieToLastNote(),el.endTie=!0;else{if("octave"!==state&&"duration"!==state&&"end_slur"!==state)return"broken_rhythm"===state?(el.endChar=index,el):null;if(el.startTie={},durationSetByPreviousNote||!canHaveBrokenRhythm)return tokenizer.isWhiteSpace(line.charAt(index+1))&&addEndBeam(el),el.endChar=index+1,el;state="broken_rhythm"}break;case" ":case"\t":if(!isComplete(state))return null;el.end_beam=!0;do{"-"===line.charAt(index)&&(el.startTie={}),index++}while(index<line.length&&(tokenizer.isWhiteSpace(line.charAt(index))||"-"===line.charAt(index)));if(el.endChar=index,durationSetByPreviousNote||!canHaveBrokenRhythm||"<"!==line.charAt(index)&&">"!==line.charAt(index))return el;index--,state="broken_rhythm";break;case">":case"<":if(!isComplete(state))return null;if(!canHaveBrokenRhythm)return el.endChar=index,el;var br2=getBrokenRhythm(line,index);index+=br2[0]-1,multilineVars.next_note_duration=br2[2],el.duration=br2[1]*el.duration,state="end_slur";break;default:return isComplete(state)?(el.endChar=index,el):null}if(++index===line.length)return isComplete(state)?(el.endChar=index,el):null}return null},letter_to_grace=function(line,i){if("{"===line.charAt(i)){var gra=tokenizer.getBrackettedSubstring(line,i,1,"}");gra[2]||warn("Missing the closing '}' while parsing grace note",line,i),")"===line[i+gra[0]]&&(gra[0]++,gra[1]+=")");for(var gracenotes=[],ii=0,inTie=!1;ii<gra[1].length;){var acciaccatura=!1;"/"===gra[1].charAt(ii)&&(acciaccatura=!0,ii++);var note=getCoreNote(gra[1],ii,{},!1);null!==note?(note.duration=note.duration/(8*multilineVars.default_length),acciaccatura&&(note.acciaccatura=!0),gracenotes.push(note),inTie&&(note.endTie=!0,inTie=!1),note.startTie&&(inTie=!0),ii=note.endChar,delete note.endChar):(" "===gra[1].charAt(ii)?gracenotes.length>0&&(gracenotes[gracenotes.length-1].end_beam=!0):warn("Unknown character '"+gra[1].charAt(ii)+"' while parsing grace note",line,i),ii++)}if(gracenotes.length)return[gra[0],gracenotes]}return[0]},nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",parseRegularMusicLine=function(line){header.resolveTempo(),multilineVars.is_in_header=!1;for(var i=0,startOfLine=multilineVars.iChar;tokenizer.isWhiteSpace(line.charAt(i))&&i<line.length;)i++;if(i!==line.length&&"%"!==line.charAt(i)){var delayStartNewLine=multilineVars.start_new_line;void 0===multilineVars.continueall?multilineVars.start_new_line=!0:multilineVars.start_new_line=!1;var tripletNotesLeft=0,retHeader=header.letter_to_body_header(line,i);retHeader[0]>0&&(i+=retHeader[0],"V"===retHeader[1]&&(delayStartNewLine=!0));for(var el={};i<line.length;){var startI=i;if("%"===line.charAt(i))break;var retInlineHeader=header.letter_to_inline_header(line,i);if(retInlineHeader[0]>0)i+=retInlineHeader[0],"V"===retInlineHeader[1]&&(delayStartNewLine=!0);else{delayStartNewLine&&(startNewLine(),delayStartNewLine=!1);for(var ret;;)if(ret=tokenizer.eatWhiteSpace(line,i),ret>0&&(i+=ret),i>0&&""===line.charAt(i-1)&&(ret=header.letter_to_body_header(line,i),ret[0]>0&&("V"===ret[1]&&startNewLine(),i=ret[0],multilineVars.start_new_line=!1)),ret=letter_to_spacer(line,i),ret[0]>0&&(i+=ret[0]),ret=letter_to_chord(line,i),ret[0]>0){el.chord||(el.chord=[]);var chordName=tokenizer.translateString(ret[1]);chordName=chordName.replace(/;/g,"\n");for(var addedChord=!1,ci=0;ci<el.chord.length;ci++)el.chord[ci].position===ret[2]&&(addedChord=!0,el.chord[ci].name+="\n"+chordName);!1===addedChord&&(null===ret[2]&&ret[3]?el.chord.push({name:chordName,rel_position:ret[3]}):el.chord.push({name:chordName,position:ret[2]})),i+=ret[0];var ii=tokenizer.skipWhiteSpace(line.substring(i));ii>0&&(el.force_end_beam_last=!0),i+=ii}else if(ret=-1===nonDecorations.indexOf(line.charAt(i))?letter_to_accent(line,i):[0],ret[0]>0)null===ret[1]?i+1<line.length&&startNewLine():ret[1].length>0&&(0===ret[1].indexOf("style=")?el.style=ret[1].substr(6):(void 0===el.decoration&&(el.decoration=[]),el.decoration.push(ret[1]))),i+=ret[0];else{if(ret=letter_to_grace(line,i),!(ret[0]>0))break;el.gracenotes=ret[1],i+=ret[0]}if(ret=letter_to_bar(line,i),ret[0]>0){void 0!==el.gracenotes&&(el.rest={type:"spacer"},el.duration=.125,multilineVars.addFormattingOptions(el,tune.formatting,"note"),tune.appendElement("note",startOfLine+i,startOfLine+i+ret[0],el),multilineVars.measureNotEmpty=!0,el={});var bar={type:ret[1]};if(0===bar.type.length)warn("Unknown bar type",line,i);else{if(multilineVars.inEnding&&"bar_thin"!==bar.type&&(bar.endEnding=!0,multilineVars.inEnding=!1),ret[2]&&(bar.startEnding=ret[2],multilineVars.inEnding&&(bar.endEnding=!0),multilineVars.inEnding=!0),void 0!==el.decoration&&(bar.decoration=el.decoration),void 0!==el.chord&&(bar.chord=el.chord),bar.startEnding&&void 0===multilineVars.barFirstEndingNum?multilineVars.barFirstEndingNum=multilineVars.currBarNumber:bar.startEnding&&bar.endEnding&&multilineVars.barFirstEndingNum?multilineVars.currBarNumber=multilineVars.barFirstEndingNum:bar.endEnding&&(multilineVars.barFirstEndingNum=void 0),"bar_invisible"!==bar.type&&multilineVars.measureNotEmpty){(void 0===multilineVars.currentVoice||0===multilineVars.currentVoice.staffNum&&0===multilineVars.currentVoice.index)&&(multilineVars.currBarNumber++,multilineVars.barNumbers&&multilineVars.currBarNumber%multilineVars.barNumbers==0&&(bar.barNumber=multilineVars.currBarNumber))}multilineVars.addFormattingOptions(el,tune.formatting,"bar"),tune.appendElement("bar",startOfLine+i,startOfLine+i+ret[0],bar),multilineVars.measureNotEmpty=!1,el={}}i+=ret[0]}else if("&"===line[i])warn("Overlay not yet supported",line,i),i++;else{if(ret=letter_to_open_slurs_and_triplets(line,i),ret.consumed>0&&(void 0!==ret.startSlur&&(el.startSlur=ret.startSlur),void 0!==ret.triplet&&(tripletNotesLeft>0?warn("Can't nest triplets",line,i):(el.startTriplet=ret.triplet,tripletNotesLeft=void 0===ret.num_notes?ret.triplet:ret.num_notes)),i+=ret.consumed),"["===line.charAt(i)){var chordStartChar=i;i++;for(var chordDuration=null,done=!1;!done;){var chordNote=getCoreNote(line,i,{},!1);if(null!==chordNote)chordNote.end_beam&&(el.end_beam=!0,delete chordNote.end_beam),void 0===el.pitches?(el.duration=chordNote.duration,el.pitches=[chordNote]):el.pitches.push(chordNote),delete chordNote.duration,multilineVars.inTieChord[el.pitches.length]&&(chordNote.endTie=!0,multilineVars.inTieChord[el.pitches.length]=void 0),chordNote.startTie&&(multilineVars.inTieChord[el.pitches.length]=!0),i=chordNote.endChar,delete chordNote.endChar;else if(" "===line.charAt(i))warn("Spaces are not allowed in chords",line,i),i++;else{if(i<line.length&&"]"===line.charAt(i)){i++,0!==multilineVars.next_note_duration&&(el.duration=el.duration*multilineVars.next_note_duration,multilineVars.next_note_duration=0),multilineVars.inTie&&(parseCommon.each(el.pitches,function(pitch){pitch.endTie=!0}),multilineVars.inTie=!1),tripletNotesLeft>0&&0===--tripletNotesLeft&&(el.endTriplet=!0);for(var postChordDone=!1;i<line.length&&!postChordDone;){switch(line.charAt(i)){case" ":case"\t":addEndBeam(el);break;case")":void 0===el.endSlur?el.endSlur=1:el.endSlur++;break;case"-":parseCommon.each(el.pitches,function(pitch){pitch.startTie={}}),multilineVars.inTie=!0;break;case">":case"<":var br2=getBrokenRhythm(line,i);i+=br2[0]-1,multilineVars.next_note_duration=br2[2],chordDuration?chordDuration*=br2[1]:chordDuration=br2[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var fraction=tokenizer.getFraction(line,i);chordDuration=fraction.value,i=fraction.index,"-"===line.charAt(i)||")"===line.charAt(i)||" "===line.charAt(i)||"<"===line.charAt(i)||">"===line.charAt(i)?i--:postChordDone=!0;break;default:postChordDone=!0}postChordDone||i++}}else warn("Expected ']' to end the chords",line,i);void 0!==el.pitches&&(null!==chordDuration&&(el.duration=el.duration*chordDuration),multilineVars.addFormattingOptions(el,tune.formatting,"note"),tune.appendElement("note",startOfLine+chordStartChar,startOfLine+i,el),multilineVars.measureNotEmpty=!0,el={}),done=!0}}}else{var el2={},core=getCoreNote(line,i,el2,!0);void 0!==el2.endTie&&(multilineVars.inTie=!0),null!==core&&(void 0!==core.pitch?(el.pitches=[{}],void 0!==core.accidental&&(el.pitches[0].accidental=core.accidental),el.pitches[0].pitch=core.pitch,void 0!==core.endSlur&&(el.pitches[0].endSlur=core.endSlur),void 0!==core.endTie&&(el.pitches[0].endTie=core.endTie),void 0!==core.startSlur&&(el.pitches[0].startSlur=core.startSlur),void 0!==el.startSlur&&(el.pitches[0].startSlur=el.startSlur),void 0!==core.startTie&&(el.pitches[0].startTie=core.startTie),void 0!==el.startTie&&(el.pitches[0].startTie=el.startTie)):(el.rest=core.rest,void 0!==core.endSlur&&(el.endSlur=core.endSlur),void 0!==core.endTie&&(el.rest.endTie=core.endTie),void 0!==core.startSlur&&(el.startSlur=core.startSlur),void 0!==core.startTie&&(el.rest.startTie=core.startTie),void 0!==el.startTie&&(el.rest.startTie=el.startTie)),void 0!==core.chord&&(el.chord=core.chord),void 0!==core.duration&&(el.duration=core.duration),void 0!==core.decoration&&(el.decoration=core.decoration),void 0!==core.graceNotes&&(el.graceNotes=core.graceNotes),delete el.startSlur,multilineVars.inTie&&(void 0!==el.pitches?(el.pitches[0].endTie=!0,multilineVars.inTie=!1):"spacer"!==el.rest.type&&(el.rest.endTie=!0,multilineVars.inTie=!1)),(core.startTie||el.startTie)&&(multilineVars.inTie=!0),i=core.endChar,tripletNotesLeft>0&&0===--tripletNotesLeft&&(el.endTriplet=!0),core.end_beam&&addEndBeam(el),el.rest&&"rest"===el.rest.type&&1===el.duration&&(el.rest.type="whole",el.duration=durationOfMeasure(multilineVars)),multilineVars.addFormattingOptions(el,tune.formatting,"note"),tune.appendElement("note",startOfLine+startI,startOfLine+i,el),multilineVars.measureNotEmpty=!0,el={})}i===startI&&(" "!==line.charAt(i)&&"`"!==line.charAt(i)&&warn("Unknown character ignored",line,i),i++)}}}}},parseLine=function(line){var ret=header.parseHeader(line);ret.regular&&parseRegularMusicLine(ret.str),ret.newline&&void 0===multilineVars.continueall&&startNewLine(),ret.words&&addWords(tune.getCurrentVoice(),line.substring(2)),ret.symbols&&addSymbols(tune.getCurrentVoice(),line.substring(2)),ret.recurse&&parseLine(ret.str)};this.parse=function(strTune,switches){switches||(switches={}),tune.reset(),switches.print&&(tune.media="print"),multilineVars.reset(),header.reset(tokenizer,warn,multilineVars,tune),strTune=parseCommon.gsub(strTune,"\r\n","\n"),strTune=parseCommon.gsub(strTune,"\r","\n"),strTune+="\n",strTune=strTune.replace(/\n\\.*\n/g,"\n");var continuationReplacement=function(all,backslash,comment){return backslash+" "+(comment?"                                                                                                                                                                                                     ".substring(0,comment.length):"")};strTune=strTune.replace(/\\([ \t]*)(%.*)*\n/g,continuationReplacement);var lines=strTune.split("\n");0===parseCommon.last(lines).length&&lines.pop();try{switches.format&&parseDirective.globalFormatting(switches.format),parseCommon.each(lines,function(line){if(switches.header_only&&!1===multilineVars.is_in_header)throw"normal_abort";if(switches.stop_on_warning&&multilineVars.warnings)throw"normal_abort";multilineVars.is_in_history?":"===line.charAt(1)?(multilineVars.is_in_history=!1,parseLine(line)):tune.addMetaText("history",tokenizer.translateString(tokenizer.stripComment(line))):multilineVars.inTextBlock?parseCommon.startsWith(line,"%%endtext")?(tune.addText(multilineVars.textBlock),multilineVars.inTextBlock=!1):parseCommon.startsWith(line,"%%")?multilineVars.textBlock+=" "+line.substring(2):multilineVars.textBlock+=" "+line:multilineVars.inPsBlock?parseCommon.startsWith(line,"%%endps")?multilineVars.inPsBlock=!1:multilineVars.textBlock+=" "+line:parseLine(line),multilineVars.iChar+=line.length+1});var ph=792,pl=612;switch(multilineVars.papersize){case"legal":ph=1008,pl=612;break;case"A4":ph=842.4,pl=597.6}if(multilineVars.landscape){var x=ph;ph=pl,pl=x}multilineVars.openSlurs=tune.cleanUp(pl,ph,multilineVars.barsperstaff,multilineVars.staffnonote,multilineVars.openSlurs)}catch(err){if("normal_abort"!==err)throw err}switches.hint_measures&&addHintMeasures()}};module.exports=Parse},{"../data/abc_tune":2,"./abc_common":5,"./abc_parse_directive":7,"./abc_parse_header":8,"./abc_parse_key_voice":9,"./abc_tokenizer":10}],7:[function(require,module,exports){var parseCommon=require("./abc_common"),parseDirective={};!function(){"use strict";function initializeFonts(){multilineVars.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},multilineVars.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},multilineVars.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},multilineVars.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},multilineVars.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},multilineVars.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},multilineVars.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},multilineVars.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},multilineVars.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},multilineVars.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},tune.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},tune.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},tune.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},tune.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},tune.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},tune.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},tune.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},tune.formatting.annotationfont=multilineVars.annotationfont,tune.formatting.gchordfont=multilineVars.gchordfont,tune.formatting.historyfont=multilineVars.historyfont,tune.formatting.infofont=multilineVars.infofont,tune.formatting.measurefont=multilineVars.measurefont,tune.formatting.partsfont=multilineVars.partsfont,tune.formatting.repeatfont=multilineVars.repeatfont,tune.formatting.textfont=multilineVars.textfont,tune.formatting.vocalfont=multilineVars.vocalfont,tune.formatting.wordsfont=multilineVars.wordsfont}var tokenizer,warn,multilineVars,tune;parseDirective.initialize=function(tokenizer_,warn_,multilineVars_,tune_){tokenizer=tokenizer_,warn=warn_,multilineVars=multilineVars_,tune=tune_,initializeFonts()};var fontTypeCanHaveBox={gchordfont:!0,measurefont:!0,partsfont:!0},fontTranslation=function(fontFace){switch(fontFace){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}},getFontParameter=function(tokens,currentSetting,str,position,cmd){function processNumberOnly(){var size=parseInt(tokens[0].token);return tokens.shift(),currentSetting?0===tokens.length?{face:currentSetting.face,weight:currentSetting.weight,style:currentSetting.style,decoration:currentSetting.decoration,size:size}:1===tokens.length&&"box"===tokens[0].token&&fontTypeCanHaveBox[cmd]?{face:currentSetting.face,weight:currentSetting.weight,style:currentSetting.style,decoration:currentSetting.decoration,size:size,box:!0}:(warn("Extra parameters in font definition.",str,position),{face:currentSetting.face,weight:currentSetting.weight,style:currentSetting.style,decoration:currentSetting.decoration,size:size}):(warn("Can't set just the size of the font since there is no default value.",str,position),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:size})}if("*"===tokens[0].token){if(tokens.shift(),"number"===tokens[0].type)return processNumberOnly();warn("Expected font size number after *.",str,position)}if("number"===tokens[0].type)return processNumberOnly();for(var size,face=[],weight="normal",style="normal",decoration="none",box=!1,state="face",hyphenLast=!1;tokens.length;){var currToken=tokens.shift(),word=currToken.token.toLowerCase();switch(state){case"face":hyphenLast||"utf"!==word&&"number"!==currToken.type&&"bold"!==word&&"italic"!==word&&"underline"!==word&&"box"!==word?face.length>0&&"-"===currToken.token?(hyphenLast=!0,face[face.length-1]=face[face.length-1]+currToken.token):hyphenLast?(hyphenLast=!1,face[face.length-1]=face[face.length-1]+currToken.token):face.push(currToken.token):"number"===currToken.type?(size?warn("Font size specified twice in font definition.",str,position):size=currToken.token,state="modifier"):"bold"===word?weight="bold":"italic"===word?style="italic":"underline"===word?decoration="underline":"box"===word?(fontTypeCanHaveBox[cmd]?box=!0:warn('This font style doesn\'t support "box"',str,position),state="finished"):"utf"===word?(currToken=tokens.shift(),state="size"):warn("Unknown parameter "+currToken.token+" in font definition.",str,position);break;case"size":"number"===currToken.type?size?warn("Font size specified twice in font definition.",str,position):size=currToken.token:warn("Expected font size in font definition.",str,position),state="modifier";break;case"modifier":"bold"===word?weight="bold":"italic"===word?style="italic":"underline"===word?decoration="underline":"box"===word?(fontTypeCanHaveBox[cmd]?box=!0:warn('This font style doesn\'t support "box"',str,position),state="finished"):warn("Unknown parameter "+currToken.token+" in font definition.",str,position);break;case"finished":warn('Extra characters found after "box" in font definition.',str,position)}}void 0===size?currentSetting?size=currentSetting.size:(warn("Must specify the size of the font since there is no default value.",str,position),size=12):size=parseFloat(size),face=face.join(" ");var psFont=fontTranslation(face),font={};return psFont?(font.face=psFont.face,font.weight=psFont.weight,font.style=psFont.style,font.decoration=psFont.decoration,font.size=size,box&&(font.box=!0),font):(font.face=face,font.weight=weight,font.style=style,font.decoration=decoration,font.size=size,box&&(font.box=!0),font)},getChangingFont=function(cmd,tokens,str){return 0===tokens.length?'Directive "'+cmd+'" requires a font as a parameter.':(multilineVars[cmd]=getFontParameter(tokens,multilineVars[cmd],str,0,cmd),multilineVars.is_in_header&&(tune.formatting[cmd]=multilineVars[cmd]),null)},getGlobalFont=function(cmd,tokens,str){return 0===tokens.length?'Directive "'+cmd+'" requires a font as a parameter.':(tune.formatting[cmd]=getFontParameter(tokens,tune.formatting[cmd],str,0,cmd),null)},setScale=function(cmd,tokens){var scratch="";parseCommon.each(tokens,function(tok){scratch+=tok.token});var num=parseFloat(scratch);if(isNaN(num)||0===num)return'Directive "'+cmd+'" requires a number as a parameter.';tune.formatting.scale=num},getRequiredMeasurement=function(cmd,tokens){var points=tokenizer.getMeasurement(tokens);return 0===points.used||0!==tokens.length?{error:'Directive "'+cmd+'" requires a measurement as a parameter.'}:points.value},oneParameterMeasurement=function(cmd,tokens){var points=tokenizer.getMeasurement(tokens);return 0===points.used||0!==tokens.length?'Directive "'+cmd+'" requires a measurement as a parameter.':(tune.formatting[cmd]=points.value,null)},addMultilineVar=function(key,cmd,tokens,min,max){if(1!==tokens.length||"number"!==tokens[0].type)return'Directive "'+cmd+'" requires a number as a parameter.';var i=tokens[0].intt;return void 0!==min&&i<min?'Directive "'+cmd+'" requires a number greater than or equal to '+min+" as a parameter.":void 0!==max&&i>max?'Directive "'+cmd+'" requires a number less than or equal to '+max+" as a parameter.":(multilineVars[key]=i,null)},addMultilineVarBool=function(key,cmd,tokens){var str=addMultilineVar(key,cmd,tokens,0,1);return null!==str?str:(multilineVars[key]=1===multilineVars[key],null)},addMultilineVarOneParamChoice=function(key,cmd,tokens,choices){if(1!==tokens.length)return'Directive "'+cmd+'" requires one of [ '+choices.join(", ")+" ] as a parameter.";for(var choice=tokens[0].token,found=!1,i=0;!found&&i<choices.length;i++)choices[i]===choice&&(found=!0);return found?(multilineVars[key]=choice,null):'Directive "'+cmd+'" requires one of [ '+choices.join(", ")+" ] as a parameter."
  },midiCmdParam0=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],midiCmdParam1String=["gchord","ptstress","beatstring"],midiCmdParam1Integer=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","volinc"],midiCmdParam1Integer1OptionalInteger=["program"],midiCmdParam2Integer=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],midiCmdParam4Integer=["beat"],midiCmdParam5Integer=["drone"],midiCmdParam1String1Integer=["drummap","portamento"],midiCmdParamFraction=["expand","grace","trim"],midiCmdParam1StringVariableIntegers=["drum","chordname"],parseMidiCommand=function(midi,tune,restOfString){var midi_cmd=midi.shift().token,midi_params=[];if(midiCmdParam0.indexOf(midi_cmd)>=0)0!==midi.length&&warn("Unexpected parameter in MIDI "+midi_cmd,restOfString,0);else if(midiCmdParam1String.indexOf(midi_cmd)>=0)1!==midi.length?warn("Expected one parameter in MIDI "+midi_cmd,restOfString,0):midi_params.push(midi[0].token);else if(midiCmdParam1Integer.indexOf(midi_cmd)>=0)1!==midi.length?warn("Expected one parameter in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type?warn("Expected one integer parameter in MIDI "+midi_cmd,restOfString,0):midi_params.push(midi[0].intt);else if(midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd)>=0)1!==midi.length&&2!==midi.length?warn("Expected one or two parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type?warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0):2===midi.length&&"number"!==midi[1].type?warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),2===midi.length&&midi_params.push(midi[1].intt));else if(midiCmdParam2Integer.indexOf(midi_cmd)>=0)2!==midi.length?warn("Expected two parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"number"!==midi[1].type?warn("Expected two integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[1].intt));else if(midiCmdParam1String1Integer.indexOf(midi_cmd)>=0)2!==midi.length?warn("Expected two parameters in MIDI "+midi_cmd,restOfString,0):"alpha"!==midi[0].type||"number"!==midi[1].type?warn("Expected one string and one integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].token),midi_params.push(midi[1].intt));else if(midiCmdParamFraction.indexOf(midi_cmd)>=0)3!==midi.length?warn("Expected fraction parameter in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"/"!==midi[1].token||"number"!==midi[2].type?warn("Expected fraction parameter in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[2].intt));else if(midiCmdParam4Integer.indexOf(midi_cmd)>=0)4!==midi.length?warn("Expected four parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"number"!==midi[1].type||"number"!==midi[2].type||"number"!==midi[3].type?warn("Expected four integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[1].intt),midi_params.push(midi[2].intt),midi_params.push(midi[3].intt));else if(midiCmdParam5Integer.indexOf(midi_cmd)>=0)5!==midi.length?warn("Expected five parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"number"!==midi[1].type||"number"!==midi[2].type||"number"!==midi[3].type||"number"!==midi[4].type?warn("Expected five integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[1].intt),midi_params.push(midi[2].intt),midi_params.push(midi[3].intt),midi_params.push(midi[4].intt));else if(midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd)>=0)1!==midi.length||4!==midi.length?warn("Expected one or two parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type?warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0):4===midi.length?("octave"!==midi[1].token&&warn("Expected octave parameter in MIDI "+midi_cmd,restOfString,0),"="!==midi[2].token&&warn("Expected octave parameter in MIDI "+midi_cmd,restOfString,0),"number"!==midi[3].type&&warn("Expected integer parameter for octave in MIDI "+midi_cmd,restOfString,0)):(midi_params.push(midi[0].intt),4===midi.length&&midi_params.push(midi[3].intt));else if(midiCmdParam1StringVariableIntegers.indexOf(midi_cmd)>=0)if(midi.length<2)warn("Expected string parameter and at least one integer parameter in MIDI "+midi_cmd,restOfString,0);else if("alpha"!==midi[0].type)warn("Expected string parameter and at least one integer parameter in MIDI "+midi_cmd,restOfString,0);else{var p=midi.shift();for(midi_params.push(p.token);midi.length>0;)p=midi.shift(),"number"!==p.type&&warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0),midi_params.push(p.intt)}tune.hasBeginMusic()?tune.appendElement("midi",-1,-1,{cmd:midi_cmd,params:midi_params}):(void 0===tune.formatting.midi&&(tune.formatting.midi={}),tune.formatting.midi[midi_cmd]=midi_params)};parseDirective.parseFontChangeLine=function(textstr){var textParts=textstr.split("$");if(textParts.length>1&&multilineVars.setfont){for(var textarr=[{text:textParts[0]}],i=1;i<textParts.length;i++)"0"===textParts[i].charAt(0)?textarr.push({text:textParts[i].substring(1)}):"1"===textParts[i].charAt(0)&&multilineVars.setfont[1]?textarr.push({font:multilineVars.setfont[1],text:textParts[i].substring(1)}):"2"===textParts[i].charAt(0)&&multilineVars.setfont[2]?textarr.push({font:multilineVars.setfont[2],text:textParts[i].substring(1)}):"3"===textParts[i].charAt(0)&&multilineVars.setfont[3]?textarr.push({font:multilineVars.setfont[3],text:textParts[i].substring(1)}):"4"===textParts[i].charAt(0)&&multilineVars.setfont[4]?textarr.push({font:multilineVars.setfont[4],text:textParts[i].substring(1)}):textarr[textarr.length-1].text+="$"+textParts[i];if(textarr.length>1)return textarr}return textstr};var positionChoices=["auto","above","below","hidden"];parseDirective.addDirective=function(str){var tokens=tokenizer.tokenize(str,0,str.length);if(0===tokens.length||"alpha"!==tokens[0].type)return null;var restOfString=str.substring(str.indexOf(tokens[0].token)+tokens[0].token.length);restOfString=tokenizer.stripComment(restOfString);var cmd=tokens.shift().token.toLowerCase(),scratch="";switch(cmd){case"bagpipes":tune.formatting.bagpipes=!0;break;case"landscape":multilineVars.landscape=!0;break;case"papersize":multilineVars.papersize=restOfString;break;case"slurgraces":tune.formatting.slurgraces=!0;break;case"stretchlast":tune.formatting.stretchlast=!0;break;case"titlecaps":multilineVars.titlecaps=!0;break;case"titleleft":tune.formatting.titleleft=!0;break;case"measurebox":tune.formatting.measurebox=!0;break;case"vocal":return addMultilineVarOneParamChoice("vocalPosition",cmd,tokens,positionChoices);case"dynamic":return addMultilineVarOneParamChoice("dynamicPosition",cmd,tokens,positionChoices);case"gchord":return addMultilineVarOneParamChoice("chordPosition",cmd,tokens,positionChoices);case"ornament":return addMultilineVarOneParamChoice("ornamentPosition",cmd,tokens,positionChoices);case"volume":return addMultilineVarOneParamChoice("volumePosition",cmd,tokens,positionChoices);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return oneParameterMeasurement(cmd,tokens);case"vskip":var vskip=getRequiredMeasurement(cmd,tokens);return vskip.error?vskip.error:(tune.addSpacing(vskip),null);case"scale":setScale(cmd,tokens);break;case"sep":if(0===tokens.length)tune.addSeparator();else{var points=tokenizer.getMeasurement(tokens);if(0===points.used)return'Directive "'+cmd+'" requires 3 numbers: space above, space below, length of line';var spaceAbove=points.value;if(points=tokenizer.getMeasurement(tokens),0===points.used)return'Directive "'+cmd+'" requires 3 numbers: space above, space below, length of line';var spaceBelow=points.value;if(points=tokenizer.getMeasurement(tokens),0===points.used||0!==tokens.length)return'Directive "'+cmd+'" requires 3 numbers: space above, space below, length of line';var lenLine=points.value;tune.addSeparator(spaceAbove,spaceBelow,lenLine)}break;case"barsperstaff":if(null!==(scratch=addMultilineVar("barsperstaff",cmd,tokens)))return scratch;break;case"staffnonote":if(null!==(scratch=addMultilineVarBool("staffnonote",cmd,tokens)))return scratch;break;case"printtempo":if(null!==(scratch=addMultilineVarBool("printTempo",cmd,tokens)))return scratch;break;case"partsbox":if(null!==(scratch=addMultilineVarBool("partsBox",cmd,tokens)))return scratch;break;case"measurenb":case"barnumbers":if(null!==(scratch=addMultilineVar("barNumbers",cmd,tokens)))return scratch;break;case"begintext":multilineVars.inTextBlock=!0;break;case"continueall":multilineVars.continueall=!0;break;case"beginps":multilineVars.inPsBlock=!0,warn("Postscript ignored",str,0);break;case"deco":restOfString.length>0&&multilineVars.ignoredDecorations.push(restOfString.substring(0,restOfString.indexOf(" "))),warn("Decoration redefinition ignored",str,0);break;case"text":var textstr=tokenizer.translateString(restOfString);tune.addText(parseDirective.parseFontChangeLine(textstr));break;case"center":var centerstr=tokenizer.translateString(restOfString);tune.addCentered(parseDirective.parseFontChangeLine(centerstr));break;case"font":break;case"setfont":var sfTokens=tokenizer.tokenize(restOfString,0,restOfString.length);if(sfTokens.length>=4&&"-"===sfTokens[0].token&&"number"===sfTokens[1].type){var sfNum=parseInt(sfTokens[1].token);sfNum>=1&&sfNum<=4&&(multilineVars.setfont||(multilineVars.setfont=[]),sfTokens.shift(),sfTokens.shift(),multilineVars.setfont[sfNum]=getFontParameter(sfTokens,multilineVars.setfont[sfNum],str,0,"setfont"))}break;case"gchordfont":case"partsfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return getChangingFont(cmd,tokens,str);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return getGlobalFont(cmd,tokens,str);case"barlabelfont":case"barnumberfont":case"barnumfont":return getChangingFont("measurefont",tokens,str);case"staves":case"score":multilineVars.score_is_present=!0;for(var lastVoice,openParen=!1,openBracket=!1,openBrace=!1,justOpenParen=!1,justOpenBracket=!1,justOpenBrace=!1,continueBar=!1,addContinueBar=function(){if(continueBar=!0,lastVoice){var ty="start";lastVoice.staffNum>0&&("start"!==multilineVars.staves[lastVoice.staffNum-1].connectBarLines&&"continue"!==multilineVars.staves[lastVoice.staffNum-1].connectBarLines||(ty="continue")),multilineVars.staves[lastVoice.staffNum].connectBarLines=ty}};tokens.length;){var t=tokens.shift();switch(t.token){case"(":openParen?warn("Can't nest parenthesis in %%score",str,t.start):(openParen=!0,justOpenParen=!0);break;case")":!openParen||justOpenParen?warn("Unexpected close parenthesis in %%score",str,t.start):openParen=!1;break;case"[":openBracket?warn("Can't nest brackets in %%score",str,t.start):(openBracket=!0,justOpenBracket=!0);break;case"]":!openBracket||justOpenBracket?warn("Unexpected close bracket in %%score",str,t.start):(openBracket=!1,multilineVars.staves[lastVoice.staffNum].bracket="end");break;case"{":openBrace?warn("Can't nest braces in %%score",str,t.start):(openBrace=!0,justOpenBrace=!0);break;case"}":!openBrace||justOpenBrace?warn("Unexpected close brace in %%score",str,t.start):(openBrace=!1,multilineVars.staves[lastVoice.staffNum].brace="end");break;case"|":addContinueBar();break;default:for(var vc="";("alpha"===t.type||"number"===t.type)&&(vc+=t.token,t.continueId);)t=tokens.shift();var newStaff=!openParen||justOpenParen,bracket=justOpenBracket?"start":openBracket?"continue":void 0,brace=justOpenBrace?"start":openBrace?"continue":void 0;!function(id,newStaff,bracket,brace,continueBar){(newStaff||0===multilineVars.staves.length)&&multilineVars.staves.push({index:multilineVars.staves.length,numVoices:0});var staff=parseCommon.last(multilineVars.staves);void 0!==bracket&&(staff.bracket=bracket),void 0!==brace&&(staff.brace=brace),continueBar&&(staff.connectBarLines="end"),void 0===multilineVars.voices[id]&&(multilineVars.voices[id]={staffNum:staff.index,index:staff.numVoices},staff.numVoices++)}(vc,newStaff,bracket,brace,continueBar),justOpenParen=!1,justOpenBracket=!1,justOpenBrace=!1,continueBar=!1,lastVoice=multilineVars.voices[vc],"staves"===cmd&&addContinueBar()}}break;case"newpage":var pgNum=tokenizer.getInt(restOfString);tune.addNewPage(0===pgNum.digits?-1:pgNum.value);break;case"abc":var arr=restOfString.split(" ");switch(arr[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var subCmd=arr.shift();tune.addMetaText(cmd+subCmd,arr.join(" "));break;default:return"Unknown directive: "+cmd+arr[0]}break;case"header":case"footer":var footerStr=tokenizer.getMeat(restOfString,0,restOfString.length);footerStr=restOfString.substring(footerStr.start,footerStr.end),'"'===footerStr.charAt(0)&&'"'===footerStr.charAt(footerStr.length-1)&&(footerStr=footerStr.substring(1,footerStr.length-1));var footerArr=footerStr.split("\t"),footer={};footer=1===footerArr.length?{left:"",center:footerArr[0],right:""}:2===footerArr.length?{left:footerArr[0],center:footerArr[1],right:""}:{left:footerArr[0],center:footerArr[1],right:footerArr[2]},footerArr.length>3&&warn("Too many tabs in "+cmd+": "+footerArr.length+" found.",restOfString,0),tune.addMetaTextObj(cmd,footer);break;case"midi":var midi=tokenizer.tokenize(restOfString,0,restOfString.length,!0);midi.length>0&&"="===midi[0].token&&midi.shift(),0===midi.length?warn("Expected midi command",restOfString,0):parseMidiCommand(midi,tune,restOfString);break;case"playtempo":case"auquality":case"continuous":case"nobarcheck":tune.formatting[cmd]=restOfString;break;default:return"Unknown directive: "+cmd}return null},parseDirective.globalFormatting=function(formatHash){for(var cmd in formatHash)if(formatHash.hasOwnProperty(cmd)){var scratch,value=""+formatHash[cmd],tokens=tokenizer.tokenize(value,0,value.length);switch(cmd){case"titlefont":case"gchordfont":getChangingFont(cmd,tokens,value);break;case"scale":setScale(cmd,tokens);break;case"partsbox":scratch=addMultilineVarBool("partsBox",cmd,tokens),null!==scratch&&warn(scratch);break;default:warn("Formatting directive unrecognized: ",cmd,0)}}}}(),module.exports=parseDirective},{"./abc_common":5}],8:[function(require,module,exports){var parseCommon=require("./abc_common"),parseDirective=require("./abc_parse_directive"),parseKeyVoice=require("./abc_parse_key_voice"),ParseHeader=function(tokenizer,warn,multilineVars,tune){this.reset=function(tokenizer,warn,multilineVars,tune){parseKeyVoice.initialize(tokenizer,warn,multilineVars,tune),parseDirective.initialize(tokenizer,warn,multilineVars,tune)},this.reset(tokenizer,warn,multilineVars,tune),this.setTitle=function(title){if(multilineVars.hasMainTitle)tune.addSubtitle(tokenizer.translateString(tokenizer.stripComment(title)));else{var titleStr=tokenizer.translateString(tokenizer.theReverser(tokenizer.stripComment(title)));multilineVars.titlecaps&&(titleStr=titleStr.toUpperCase()),tune.addMetaText("title",titleStr),multilineVars.hasMainTitle=!0}},this.setMeter=function(line){if("C"===(line=tokenizer.stripComment(line)))return!0===multilineVars.havent_set_length&&(multilineVars.default_length=.125,multilineVars.havent_set_length=!1),{type:"common_time"};if("C|"===line)return!0===multilineVars.havent_set_length&&(multilineVars.default_length=.125,multilineVars.havent_set_length=!1),{type:"cut_time"};if("o"===line)return!0===multilineVars.havent_set_length&&(multilineVars.default_length=.125,multilineVars.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===line)return!0===multilineVars.havent_set_length&&(multilineVars.default_length=.125,multilineVars.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===line)return!0===multilineVars.havent_set_length&&(multilineVars.default_length=.125,multilineVars.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===line)return!0===multilineVars.havent_set_length&&(multilineVars.default_length=.125,multilineVars.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===line.length||"none"===line.toLowerCase())return!0===multilineVars.havent_set_length&&(multilineVars.default_length=.125,multilineVars.havent_set_length=!1),null;var tokens=tokenizer.tokenize(line,0,line.length);try{var parseNum=function(){var ret={value:0,num:""},tok=tokens.shift();for("("===tok.token&&(tok=tokens.shift());;){if("number"!==tok.type)throw"Expected top number of meter";if(ret.value+=parseInt(tok.token),ret.num+=tok.token,0===tokens.length||"/"===tokens[0].token)return ret;if(tok=tokens.shift(),")"===tok.token){if(0===tokens.length||"/"===tokens[0].token)return ret;throw"Unexpected paren in meter"}if("."!==tok.token&&"+"!==tok.token)throw"Expected top number of meter";if(ret.num+=tok.token,0===tokens.length)throw"Expected top number of meter";tok=tokens.shift()}return ret};if(0===tokens.length)throw"Expected meter definition in M: line";for(var meter={type:"specified",value:[]},totalLength=0;;){var ret=function(){var ret=parseNum();if(0===tokens.length)return ret;var tok=tokens.shift();if("/"!==tok.token)throw"Expected slash in meter";if(tok=tokens.shift(),"number"!==tok.type)throw"Expected bottom number of meter";return ret.den=tok.token,ret.value=ret.value/parseInt(ret.den),ret}();totalLength+=ret.value;var mv={num:ret.num};if(void 0!==ret.den&&(mv.den=ret.den),meter.value.push(mv),0===tokens.length)break}return!0===multilineVars.havent_set_length&&(multilineVars.default_length=totalLength<.75?.0625:.125,multilineVars.havent_set_length=!1),meter}catch(e){warn(e,line,0)}return null},this.calcTempo=function(relTempo){var dur=.25;multilineVars.meter&&"specified"===multilineVars.meter.type?dur=1/parseInt(multilineVars.meter.value[0].den):multilineVars.origMeter&&"specified"===multilineVars.origMeter.type&&(dur=1/parseInt(multilineVars.origMeter.value[0].den));for(var i=0;i<relTempo.duration;i++)relTempo.duration[i]=dur*relTempo.duration[i];return relTempo},this.resolveTempo=function(){multilineVars.tempo&&(this.calcTempo(multilineVars.tempo),tune.metaText.tempo=multilineVars.tempo,delete multilineVars.tempo)},this.addUserDefinition=function(line,start,end){var equals=line.indexOf("=",start);if(-1===equals)return void warn("Need an = in a macro definition",line,start);var before=parseCommon.strip(line.substring(start,equals)),after=parseCommon.strip(line.substring(equals+1));return 1!==before.length?void warn("Macro definitions can only be one character",line,start):-1==="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(before)?void warn("Macro definitions must be H-Y, h-w, or tilde",line,start):0===after.length?void warn("Missing macro definition",line,start):(void 0===multilineVars.macros&&(multilineVars.macros={}),void(multilineVars.macros[before]=after))},this.setDefaultLength=function(line,start,end){var len=parseCommon.gsub(line.substring(start,end)," ",""),len_arr=len.split("/");if(2===len_arr.length){var n=parseInt(len_arr[0]),d=parseInt(len_arr[1]);d>0&&(multilineVars.default_length=n/d,multilineVars.havent_set_length=!1)}else 1===len_arr.length&&"1"===len_arr[0]&&(multilineVars.default_length=1,multilineVars.havent_set_length=!1)},this.setTempo=function(line,start,end){try{var tokens=tokenizer.tokenize(line,start,end);if(0===tokens.length)throw"Missing parameter in Q: field";var tempo={},delaySet=!0,token=tokens.shift();if("quote"===token.type&&(tempo.preString=token.token,token=tokens.shift(),0===tokens.length))return{type:"immediate",tempo:tempo};if("alpha"===token.type&&"C"===token.token){if(0===tokens.length)throw"Missing tempo after C in Q: field";if(token=tokens.shift(),"punct"===token.type&&"="===token.token){if(0===tokens.length)throw"Missing tempo after = in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected number after = in Q: field";tempo.duration=[1],tempo.bpm=parseInt(token.token)}else{if("number"!==token.type)throw"Expected number or equal after C in Q: field";if(tempo.duration=[parseInt(token.token)],0===tokens.length)throw"Missing = after duration in Q: field";if(token=tokens.shift(),"punct"!==token.type||"="!==token.token)throw"Expected = after duration in Q: field";if(0===tokens.length)throw"Missing tempo after = in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected number after = in Q: field";tempo.bpm=parseInt(token.token)}}else{if("number"!==token.type)throw"Unknown value in Q: field";var num=parseInt(token.token);if(0===tokens.length||"quote"===tokens[0].type)tempo.duration=[1],tempo.bpm=num;else{if(delaySet=!1,token=tokens.shift(),"punct"!==token.type&&"/"!==token.token)throw"Expected fraction in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected fraction in Q: field";var den=parseInt(token.token);for(tempo.duration=[num/den];tokens.length>0&&"="!==tokens[0].token&&"quote"!==tokens[0].type;){if(token=tokens.shift(),"number"!==token.type)throw"Expected fraction in Q: field";if(num=parseInt(token.token),token=tokens.shift(),"punct"!==token.type&&"/"!==token.token)throw"Expected fraction in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected fraction in Q: field";den=parseInt(token.token),tempo.duration.push(num/den)}if(token=tokens.shift(),"punct"!==token.type&&"="!==token.token)throw"Expected = in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected tempo in Q: field";tempo.bpm=parseInt(token.token)}}if(0!==tokens.length&&(token=tokens.shift(),"quote"===token.type&&(tempo.postString=token.token,token=tokens.shift()),0!==tokens.length))throw"Unexpected string at end of Q: field";return!1===multilineVars.printTempo&&(tempo.suppress=!0),{type:delaySet?"delaySet":"immediate",tempo:tempo}}catch(msg){return warn(msg,line,start),{type:"none"}}},this.letter_to_inline_header=function(line,i){var ws=tokenizer.eatWhiteSpace(line,i);if(i+=ws,line.length>=i+5&&"["===line.charAt(i)&&":"===line.charAt(i+2)){var e=line.indexOf("]",i);switch(line.substring(i,i+3)){case"[I:":var err=parseDirective.addDirective(line.substring(i+3,e));return err&&warn(err,line,i),[e-i+1+ws];case"[M:":var meter=this.setMeter(line.substring(i+3,e));return tune.hasBeginMusic()&&meter?tune.appendStartingElement("meter",-1,-1,meter):multilineVars.meter=meter,[e-i+1+ws];case"[K:":var result=parseKeyVoice.parseKey(line.substring(i+3,e));return result.foundClef&&tune.hasBeginMusic()&&tune.appendStartingElement("clef",-1,-1,multilineVars.clef),result.foundKey&&tune.hasBeginMusic()&&tune.appendStartingElement("key",-1,-1,parseKeyVoice.fixKey(multilineVars.clef,multilineVars.key)),[e-i+1+ws];case"[P:":return tune.lines.length<=tune.lineNum?multilineVars.partForNextLine=line.substring(i+3,e):tune.appendElement("part",-1,-1,{title:line.substring(i+3,e)}),[e-i+1+ws];case"[L:":return this.setDefaultLength(line,i+3,e),[e-i+1+ws];case"[Q:":if(e>0){var tempo=this.setTempo(line,i+3,e);return"delaySet"===tempo.type?tune.appendElement("tempo",-1,-1,this.calcTempo(tempo.tempo)):"immediate"===tempo.type&&tune.appendElement("tempo",-1,-1,tempo.tempo),[e-i+1+ws,line.charAt(i+1),line.substring(i+3,e)]}break;case"[V:":if(e>0)return parseKeyVoice.parseVoice(line,i+3,e),[e-i+1+ws,line.charAt(i+1),line.substring(i+3,e)]}}return[0]},this.letter_to_body_header=function(line,i){if(line.length>=i+3)switch(line.substring(i,i+2)){case"I:":var err=parseDirective.addDirective(line.substring(i+2));return err&&warn(err,line,i),[line.length];case"M:":var meter=this.setMeter(line.substring(i+2));return tune.hasBeginMusic()&&meter&&tune.appendStartingElement("meter",-1,-1,meter),[line.length];case"K:":var result=parseKeyVoice.parseKey(line.substring(i+2));return result.foundClef&&tune.hasBeginMusic()&&tune.appendStartingElement("clef",-1,-1,multilineVars.clef),result.foundKey&&tune.hasBeginMusic()&&tune.appendStartingElement("key",-1,-1,parseKeyVoice.fixKey(multilineVars.clef,multilineVars.key)),[line.length];case"P:":return tune.hasBeginMusic()&&tune.appendElement("part",-1,-1,{title:line.substring(i+2)}),[line.length];case"L:":return this.setDefaultLength(line,i+2,line.length),[line.length];case"Q:":var e=line.indexOf("",i+2);-1===e&&(e=line.length);var tempo=this.setTempo(line,i+2,e);return"delaySet"===tempo.type?tune.appendElement("tempo",-1,-1,this.calcTempo(tempo.tempo)):"immediate"===tempo.type&&tune.appendElement("tempo",-1,-1,tempo.tempo),[e,line.charAt(i),parseCommon.strip(line.substring(i+2))];case"V:":return parseKeyVoice.parseVoice(line,2,line.length),[line.length,line.charAt(i),parseCommon.strip(line.substring(i+2))]}return[0]};var metaTextHeaders={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(line){if(parseCommon.startsWith(line,"%%")){var err=parseDirective.addDirective(line.substring(2));return err&&warn(err,line,2),{}}var i=line.indexOf("%");if(i>=0&&(line=line.substring(0,i)),line=line.replace(/\s+$/,""),0===line.length)return{};if(line.length>=2&&":"===line.charAt(1)){var nextLine="";line.indexOf("")>=0&&"w"!==line.charAt(0)&&(nextLine=line.substring(line.indexOf("")+1),line=line.substring(0,line.indexOf("")));var field=metaTextHeaders[line.charAt(0)];if(void 0!==field)return"unalignedWords"===field?tune.addMetaTextArray(field,parseDirective.parseFontChangeLine(tokenizer.translateString(tokenizer.stripComment(line.substring(2))))):tune.addMetaText(field,tokenizer.translateString(tokenizer.stripComment(line.substring(2)))),{};switch(line.charAt(0)){case"H":tune.addMetaText("history",tokenizer.translateString(tokenizer.stripComment(line.substring(2)))),multilineVars.is_in_history=!0;break;case"K":this.resolveTempo();var result=parseKeyVoice.parseKey(line.substring(2));!multilineVars.is_in_header&&tune.hasBeginMusic()&&(result.foundClef&&tune.appendStartingElement("clef",-1,-1,multilineVars.clef),result.foundKey&&tune.appendStartingElement("key",-1,-1,parseKeyVoice.fixKey(multilineVars.clef,multilineVars.key))),multilineVars.is_in_header=!1;break;case"L":this.setDefaultLength(line,2,line.length);break;case"M":multilineVars.origMeter=multilineVars.meter=this.setMeter(line.substring(2));break;case"P":multilineVars.is_in_header?tune.addMetaText("partOrder",tokenizer.translateString(tokenizer.stripComment(line.substring(2)))):multilineVars.partForNextLine=tokenizer.translateString(tokenizer.stripComment(line.substring(2)));break;case"Q":var tempo=this.setTempo(line,2,line.length);"delaySet"===tempo.type?multilineVars.tempo=tempo.tempo:"immediate"===tempo.type&&(tune.metaText.tempo=tempo.tempo);break;case"T":this.setTitle(line.substring(2));break;case"U":this.addUserDefinition(line,2,line.length);break;case"V":if(parseKeyVoice.parseVoice(line,2,line.length),!multilineVars.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":warn("Ignored header",line,0);break;default:return nextLine.length&&(nextLine=""+nextLine),{regular:!0,str:line+nextLine}}return nextLine.length>0?{recurse:!0,str:nextLine}:{}}return{regular:!0,str:line}}};module.exports=ParseHeader},{"./abc_common":5,"./abc_parse_directive":7,"./abc_parse_key_voice":9}],9:[function(require,module,exports){var parseCommon=require("./abc_common"),parseDirective=require("./abc_parse_directive"),parseKeyVoice={};!function(){var tokenizer,warn,multilineVars,tune;parseKeyVoice.initialize=function(tokenizer_,warn_,multilineVars_,tune_){tokenizer=tokenizer_,warn=warn_,multilineVars=multilineVars_,tune=tune_},parseKeyVoice.standardKey=function(keyName){var key1sharp={acc:"sharp",note:"f"},key2sharp={acc:"sharp",note:"c"},key3sharp={acc:"sharp",note:"g"},key4sharp={acc:"sharp",note:"d"},key5sharp={acc:"sharp",note:"A"},key6sharp={acc:"sharp",note:"e"},key7sharp={acc:"sharp",note:"B"},key1flat={acc:"flat",note:"B"},key2flat={acc:"flat",note:"e"},key3flat={acc:"flat",note:"A"},key4flat={acc:"flat",note:"d"},key5flat={acc:"flat",note:"G"},key6flat={acc:"flat",note:"c"},key7flat={acc:"flat",note:"F"};return{"C#":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"A#m":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"G#Mix":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"D#Dor":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"E#Phr":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"F#Lyd":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"B#Loc":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"F#":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"D#m":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"C#Mix":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"G#Dor":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"A#Phr":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],BLyd:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"E#Loc":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],B:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"G#m":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"F#Mix":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"C#Dor":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"D#Phr":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],ELyd:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"A#Loc":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],E:[key1sharp,key2sharp,key3sharp,key4sharp],"C#m":[key1sharp,key2sharp,key3sharp,key4sharp],BMix:[key1sharp,key2sharp,key3sharp,key4sharp],"F#Dor":[key1sharp,key2sharp,key3sharp,key4sharp],"G#Phr":[key1sharp,key2sharp,key3sharp,key4sharp],ALyd:[key1sharp,key2sharp,key3sharp,key4sharp],"D#Loc":[key1sharp,key2sharp,key3sharp,key4sharp],A:[key1sharp,key2sharp,key3sharp],"F#m":[key1sharp,key2sharp,key3sharp],EMix:[key1sharp,key2sharp,key3sharp],BDor:[key1sharp,key2sharp,key3sharp],"C#Phr":[key1sharp,key2sharp,key3sharp],DLyd:[key1sharp,key2sharp,key3sharp],"G#Loc":[key1sharp,key2sharp,key3sharp],D:[key1sharp,key2sharp],Bm:[key1sharp,key2sharp],AMix:[key1sharp,key2sharp],EDor:[key1sharp,key2sharp],"F#Phr":[key1sharp,key2sharp],GLyd:[key1sharp,key2sharp],"C#Loc":[key1sharp,key2sharp],G:[key1sharp],Em:[key1sharp],DMix:[key1sharp],ADor:[key1sharp],BPhr:[key1sharp],CLyd:[key1sharp],"F#Loc":[key1sharp],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[key1flat],Dm:[key1flat],CMix:[key1flat],GDor:[key1flat],APhr:[key1flat],BbLyd:[key1flat],ELoc:[key1flat],Bb:[key1flat,key2flat],Gm:[key1flat,key2flat],FMix:[key1flat,key2flat],CDor:[key1flat,key2flat],DPhr:[key1flat,key2flat],EbLyd:[key1flat,key2flat],ALoc:[key1flat,key2flat],Eb:[key1flat,key2flat,key3flat],Cm:[key1flat,key2flat,key3flat],BbMix:[key1flat,key2flat,key3flat],FDor:[key1flat,key2flat,key3flat],GPhr:[key1flat,key2flat,key3flat],AbLyd:[key1flat,key2flat,key3flat],DLoc:[key1flat,key2flat,key3flat],Ab:[key1flat,key2flat,key3flat,key4flat],Fm:[key1flat,key2flat,key3flat,key4flat],EbMix:[key1flat,key2flat,key3flat,key4flat],BbDor:[key1flat,key2flat,key3flat,key4flat],CPhr:[key1flat,key2flat,key3flat,key4flat],DbLyd:[key1flat,key2flat,key3flat,key4flat],GLoc:[key1flat,key2flat,key3flat,key4flat],Db:[key1flat,key2flat,key3flat,key4flat,key5flat],Bbm:[key1flat,key2flat,key3flat,key4flat,key5flat],
  AbMix:[key1flat,key2flat,key3flat,key4flat,key5flat],EbDor:[key1flat,key2flat,key3flat,key4flat,key5flat],FPhr:[key1flat,key2flat,key3flat,key4flat,key5flat],GbLyd:[key1flat,key2flat,key3flat,key4flat,key5flat],CLoc:[key1flat,key2flat,key3flat,key4flat,key5flat],Gb:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],Ebm:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],DbMix:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],AbDor:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],BbPhr:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],CbLyd:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],FLoc:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],Cb:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],Abm:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],GbMix:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],DbDor:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],EbPhr:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],FbLyd:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],BbLoc:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],"A#":[key1flat,key2flat],"B#":[],"D#":[key1flat,key2flat,key3flat],"E#":[key1flat],"G#":[key1flat,key2flat,key3flat,key4flat],Gbm:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp]}[keyName]};var clefLines={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6}},calcMiddle=function(clef,oct){var value=clefLines[clef];return(value?value.mid:0)+oct};parseKeyVoice.fixClef=function(clef){var value=clefLines[clef.type];value&&(clef.clefPos=value.pitch,clef.type=value.clef)},parseKeyVoice.deepCopyKey=function(key){var ret={accidentals:[],root:key.root,acc:key.acc,mode:key.mode};return parseCommon.each(key.accidentals,function(k){ret.accidentals.push(parseCommon.clone(k))}),ret};var pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};parseKeyVoice.addPosToKey=function(clef,key){var mid=clef.verticalPos;parseCommon.each(key.accidentals,function(acc){var pitch=pitches[acc.note];pitch-=mid,acc.verticalPos=pitch}),key.impliedNaturals&&parseCommon.each(key.impliedNaturals,function(acc){var pitch=pitches[acc.note];pitch-=mid,acc.verticalPos=pitch}),mid<-10?(parseCommon.each(key.accidentals,function(acc){acc.verticalPos-=7,(acc.verticalPos>=11||10===acc.verticalPos&&"flat"===acc.acc)&&(acc.verticalPos-=7),"A"===acc.note&&"sharp"===acc.acc&&(acc.verticalPos-=7),"G"!==acc.note&&"F"!==acc.note||"flat"!==acc.acc||(acc.verticalPos-=7)}),key.impliedNaturals&&parseCommon.each(key.impliedNaturals,function(acc){acc.verticalPos-=7,(acc.verticalPos>=11||10===acc.verticalPos&&"flat"===acc.acc)&&(acc.verticalPos-=7),"A"===acc.note&&"sharp"===acc.acc&&(acc.verticalPos-=7),"G"!==acc.note&&"F"!==acc.note||"flat"!==acc.acc||(acc.verticalPos-=7)})):mid<-4?(parseCommon.each(key.accidentals,function(acc){acc.verticalPos-=7,-8!==mid||"f"!==acc.note&&"g"!==acc.note||"sharp"!==acc.acc||(acc.verticalPos-=7)}),key.impliedNaturals&&parseCommon.each(key.impliedNaturals,function(acc){acc.verticalPos-=7,-8!==mid||"f"!==acc.note&&"g"!==acc.note||"sharp"!==acc.acc||(acc.verticalPos-=7)})):mid>=7&&(parseCommon.each(key.accidentals,function(acc){acc.verticalPos+=7}),key.impliedNaturals&&parseCommon.each(key.impliedNaturals,function(acc){acc.verticalPos+=7}))},parseKeyVoice.fixKey=function(clef,key){var fixedKey=parseCommon.clone(key);return parseKeyVoice.addPosToKey(clef,fixedKey),fixedKey};var parseMiddle=function(str){for(var mid=pitches[str.charAt(0)],i=1;i<str.length;i++)if(","===str.charAt(i))mid-=7;else{if(","!==str.charAt(i))break;mid+=7}return{mid:mid-6,str:str.substring(i)}},normalizeAccidentals=function(accs){for(var i=0;i<accs.length;i++)"b"===accs[i].note?accs[i].note="B":"a"===accs[i].note?accs[i].note="A":"F"===accs[i].note?accs[i].note="f":"E"===accs[i].note?accs[i].note="e":"D"===accs[i].note?accs[i].note="d":"C"===accs[i].note?accs[i].note="c":"G"===accs[i].note&&"sharp"===accs[i].acc?accs[i].note="g":"g"===accs[i].note&&"flat"===accs[i].acc&&(accs[i].note="G")};parseKeyVoice.parseKey=function(str){0===str.length&&(str="none");var tokens=tokenizer.tokenize(str,0,str.length),ret={};switch(tokens[0].token){case"HP":parseDirective.addDirective("bagpipes"),multilineVars.key={root:"HP",accidentals:[],acc:"",mode:""},ret.foundKey=!0,tokens.shift();break;case"Hp":parseDirective.addDirective("bagpipes"),multilineVars.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},ret.foundKey=!0,tokens.shift();break;case"none":multilineVars.key={root:"none",accidentals:[],acc:"",mode:""},ret.foundKey=!0,tokens.shift();break;default:var retPitch=tokenizer.getKeyPitch(tokens[0].token);if(retPitch.len>0){ret.foundKey=!0;var acc="",mode="";tokens[0].token.length>1?tokens[0].token=tokens[0].token.substring(1):tokens.shift();var key=retPitch.token;if(tokens.length>0){var retAcc=tokenizer.getSharpFlat(tokens[0].token);if(retAcc.len>0&&(tokens[0].token.length>1?tokens[0].token=tokens[0].token.substring(1):tokens.shift(),key+=retAcc.token,acc=retAcc.token),tokens.length>0){var retMode=tokenizer.getMode(tokens[0].token);retMode.len>0&&(tokens.shift(),key+=retMode.token,mode=retMode.token)}if(void 0===parseKeyVoice.standardKey(key))return warn("Unsupported key signature: "+key,str,0),ret}var oldKey=parseKeyVoice.deepCopyKey(multilineVars.key);if(multilineVars.key=parseKeyVoice.deepCopyKey({accidentals:parseKeyVoice.standardKey(key)}),multilineVars.key.root=retPitch.token,multilineVars.key.acc=acc,multilineVars.key.mode=mode,oldKey){for(var kk,k=0;k<multilineVars.key.accidentals.length;k++)for(kk=0;kk<oldKey.accidentals.length;kk++)oldKey.accidentals[kk].note&&multilineVars.key.accidentals[k].note.toLowerCase()===oldKey.accidentals[kk].note.toLowerCase()&&(oldKey.accidentals[kk].note=null);for(kk=0;kk<oldKey.accidentals.length;kk++)oldKey.accidentals[kk].note&&(multilineVars.key.impliedNaturals||(multilineVars.key.impliedNaturals=[]),multilineVars.key.impliedNaturals.push({acc:"natural",note:oldKey.accidentals[kk].note}))}}}if(0===tokens.length)return ret;if("exp"===tokens[0].token&&tokens.shift(),0===tokens.length)return ret;if("oct"===tokens[0].token&&tokens.shift(),0===tokens.length)return ret;var accs=tokenizer.getKeyAccidentals2(tokens);if(accs.warn&&warn(accs.warn,str,0),accs.accs){ret.foundKey||(ret.foundKey=!0,multilineVars.key={root:"none",acc:"",mode:"",accidentals:[]}),normalizeAccidentals(accs.accs);for(var i=0;i<accs.accs.length;i++){for(var found=!1,j=0;j<multilineVars.key.accidentals.length&&!found;j++)multilineVars.key.accidentals[j].note===accs.accs[i].note&&(found=!0,multilineVars.key.accidentals[j].acc=accs.accs[i].acc);if(!found&&(multilineVars.key.accidentals.push(accs.accs[i]),multilineVars.key.impliedNaturals))for(var kkk=0;kkk<multilineVars.key.impliedNaturals.length;kkk++)multilineVars.key.impliedNaturals[kkk].note===accs.accs[i].note&&multilineVars.key.impliedNaturals.splice(kkk,1)}}for(var token;tokens.length>0;)switch(tokens[0].token){case"m":case"middle":if(tokens.shift(),0===tokens.length)return warn("Expected = after middle",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after middle",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after middle=",str,0),ret;var pitch=tokenizer.getPitchFromTokens(tokens);pitch.warn&&warn(pitch.warn,str,0),pitch.position&&(multilineVars.clef.verticalPos=pitch.position-6);break;case"transpose":if(tokens.shift(),0===tokens.length)return warn("Expected = after transpose",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after transpose",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after transpose=",str,0),ret;if("number"!==tokens[0].type){warn("Expected number after transpose",str,tokens[0].start);break}multilineVars.clef.transpose=tokens[0].intt,tokens.shift();break;case"stafflines":if(tokens.shift(),0===tokens.length)return warn("Expected = after stafflines",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after stafflines",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after stafflines=",str,0),ret;if("number"!==tokens[0].type){warn("Expected number after stafflines",str,tokens[0].start);break}multilineVars.clef.stafflines=tokens[0].intt,tokens.shift();break;case"staffscale":if(tokens.shift(),0===tokens.length)return warn("Expected = after staffscale",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after staffscale",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after staffscale=",str,0),ret;if("number"!==tokens[0].type){warn("Expected number after staffscale",str,tokens[0].start);break}multilineVars.clef.staffscale=tokens[0].floatt,tokens.shift();break;case"style":if(tokens.shift(),0===tokens.length)return warn("Expected = after style",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after style",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after style=",str,0),ret;switch(tokens[0].token){case"normal":case"harmonic":case"rhythm":case"x":multilineVars.style=tokens[0].token,tokens.shift();break;default:warn("error parsing style element: "+tokens[0].token,str,tokens[0].start)}break;case"clef":if(tokens.shift(),0===tokens.length)return warn("Expected = after clef",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after clef",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after clef=",str,0),ret;case"treble":case"bass":case"alto":case"tenor":case"perc":var clef=tokens.shift();switch(clef.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":clef.token="alto";break;case"F":clef.token="bass";break;case"G":clef.token="treble";break;case"c":clef.token="alto";break;case"f":clef.token="bass";break;case"g":clef.token="treble";break;default:warn("Expected clef name. Found "+clef.token,str,clef.start)}tokens.length>0&&"number"===tokens[0].type&&(clef.token+=tokens[0].token,tokens.shift()),tokens.length>1&&("-"===tokens[0].token||"+"===tokens[0].token)&&"8"===tokens[1].token&&(clef.token+=tokens[0].token+tokens[1].token,tokens.shift(),tokens.shift()),multilineVars.clef={type:clef.token,verticalPos:calcMiddle(clef.token,0)},multilineVars.currentVoice&&void 0!==multilineVars.currentVoice.transpose&&(multilineVars.clef.transpose=multilineVars.currentVoice.transpose),ret.foundClef=!0;break;default:warn("Unknown parameter: "+tokens[0].token,str,tokens[0].start),tokens.shift()}return ret};var setCurrentVoice=function(id){multilineVars.currentVoice=multilineVars.voices[id],tune.setCurrentVoice(multilineVars.currentVoice.staffNum,multilineVars.currentVoice.index)};parseKeyVoice.parseVoice=function(line,i,e){var ret=tokenizer.getMeat(line,i,e),start=ret.start,end=ret.end,id=tokenizer.getToken(line,start,end);if(0===id.length)return void warn("Expected a voice id",line,start);var isNew=!1;void 0===multilineVars.voices[id]&&(multilineVars.voices[id]={},isNew=!0,multilineVars.score_is_present&&warn("Can't have an unknown V: id when the %score directive is present",line,start)),start+=id.length,start+=tokenizer.eatWhiteSpace(line,start);for(var staffInfo={startStaff:isNew},addNextTokenToStaffInfo=function(name){var attr=tokenizer.getVoiceToken(line,start,end);void 0!==attr.warn?warn("Expected value for "+name+" in voice: "+attr.warn,line,start):0===attr.token.length&&'"'!==line.charAt(start)?warn("Expected value for "+name+" in voice",line,start):staffInfo[name]=attr.token,start+=attr.len},addNextTokenToVoiceInfo=function(id,name,type){var attr=tokenizer.getVoiceToken(line,start,end);void 0!==attr.warn?warn("Expected value for "+name+" in voice: "+attr.warn,line,start):0===attr.token.length&&'"'!==line.charAt(start)?warn("Expected value for "+name+" in voice",line,start):("number"===type&&(attr.token=parseFloat(attr.token)),multilineVars.voices[id][name]=attr.token),start+=attr.len};start<end;){var token=tokenizer.getVoiceToken(line,start,end);if(start+=token.len,token.warn)warn("Error parsing voice: "+token.warn,line,start);else{var attr=null;switch(token.token){case"clef":case"cl":addNextTokenToStaffInfo("clef");var oct=0;void 0!==staffInfo.clef&&(staffInfo.clef=staffInfo.clef.replace(/[',]/g,""),-1!==staffInfo.clef.indexOf("+16")&&(oct+=14,staffInfo.clef=staffInfo.clef.replace("+16","")),staffInfo.verticalPos=calcMiddle(staffInfo.clef,oct));break;case"treble":case"bass":case"tenor":case"alto":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":;staffInfo.clef=token.token.replace(/[',]/g,""),staffInfo.verticalPos=calcMiddle(staffInfo.clef,0);break;case"staves":case"stave":case"stv":addNextTokenToStaffInfo("staves");break;case"brace":case"brc":addNextTokenToStaffInfo("brace");break;case"bracket":case"brk":addNextTokenToStaffInfo("bracket");break;case"name":case"nm":addNextTokenToStaffInfo("name");break;case"subname":case"sname":case"snm":addNextTokenToStaffInfo("subname");break;case"merge":staffInfo.startStaff=!1;break;case"stems":attr=tokenizer.getVoiceToken(line,start,end),void 0!==attr.warn?warn("Expected value for stems in voice: "+attr.warn,line,start):"up"===attr.token||"down"===attr.token?multilineVars.voices[id].stem=attr.token:warn("Expected up or down for voice stem",line,start),start+=attr.len;break;case"up":case"down":multilineVars.voices[id].stem=token.token;break;case"middle":case"m":addNextTokenToStaffInfo("verticalPos"),staffInfo.verticalPos=parseMiddle(staffInfo.verticalPos).mid;break;case"gchords":case"gch":multilineVars.voices[id].suppressChords=!0;break;case"space":case"spc":addNextTokenToStaffInfo("spacing");break;case"scale":addNextTokenToVoiceInfo(id,"scale","number");break;case"transpose":addNextTokenToVoiceInfo(id,"transpose","number")}}start+=tokenizer.eatWhiteSpace(line,start)}if((staffInfo.startStaff||0===multilineVars.staves.length)&&(multilineVars.staves.push({index:multilineVars.staves.length,meter:multilineVars.origMeter}),multilineVars.score_is_present||(multilineVars.staves[multilineVars.staves.length-1].numVoices=0)),void 0===multilineVars.voices[id].staffNum){multilineVars.voices[id].staffNum=multilineVars.staves.length-1;var vi=0;for(var v in multilineVars.voices)multilineVars.voices.hasOwnProperty(v)&&multilineVars.voices[v].staffNum===multilineVars.voices[id].staffNum&&vi++;multilineVars.voices[id].index=vi-1}var s=multilineVars.staves[multilineVars.voices[id].staffNum];multilineVars.score_is_present||s.numVoices++,staffInfo.clef&&(s.clef={type:staffInfo.clef,verticalPos:staffInfo.verticalPos}),staffInfo.spacing&&(s.spacing_below_offset=staffInfo.spacing),staffInfo.verticalPos&&(s.verticalPos=staffInfo.verticalPos),staffInfo.name&&(s.name?s.name.push(staffInfo.name):s.name=[staffInfo.name]),staffInfo.subname&&(s.subname?s.subname.push(staffInfo.subname):s.subname=[staffInfo.subname]),setCurrentVoice(id)}}(),module.exports=parseKeyVoice},{"./abc_common":5,"./abc_parse_directive":7}],10:[function(require,module,exports){var parseCommon=require("./abc_common"),Tokenizer=function(){this.skipWhiteSpace=function(str){for(var i=0;i<str.length;i++)if(!this.isWhiteSpace(str.charAt(i)))return i;return str.length};var finished=function(str,i){return i>=str.length};this.eatWhiteSpace=function(line,index){for(var i=index;i<line.length;i++)if(!this.isWhiteSpace(line.charAt(i)))return i-index;return i-index},this.getKeyPitch=function(str){var i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};switch(str.charAt(i)){case"A":return{len:i+1,token:"A"};case"B":return{len:i+1,token:"B"};case"C":return{len:i+1,token:"C"};case"D":return{len:i+1,token:"D"};case"E":return{len:i+1,token:"E"};case"F":return{len:i+1,token:"F"};case"G":return{len:i+1,token:"G"}}return{len:0}},this.getSharpFlat=function(str){if("bass"===str)return{len:0};switch(str.charAt(0)){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(str){var skipAlpha=function(str,start){for(;start<str.length&&(str.charAt(start)>="a"&&str.charAt(start)<="z"||str.charAt(start)>="A"&&str.charAt(start)<="Z");)start++;return start},i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};var firstThree=str.substring(i,i+3).toLowerCase();switch((firstThree.length>1&&" "===firstThree.charAt(1)||"^"===firstThree.charAt(1)||"_"===firstThree.charAt(1)||"="===firstThree.charAt(1))&&(firstThree=firstThree.charAt(0)),firstThree){case"mix":return{len:skipAlpha(str,i),token:"Mix"};case"dor":return{len:skipAlpha(str,i),token:"Dor"};case"phr":return{len:skipAlpha(str,i),token:"Phr"};case"lyd":return{len:skipAlpha(str,i),token:"Lyd"};case"loc":return{len:skipAlpha(str,i),token:"Loc"};case"aeo":return{len:skipAlpha(str,i),token:"m"};case"maj":case"ion":return{len:skipAlpha(str,i),token:""};case"min":case"m":return{len:skipAlpha(str,i),token:"m"}}return{len:0}},this.getClef=function(str,bExplicitOnly){var strOrig=str,i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};var needsClef=!1,strClef=str.substring(i);if(parseCommon.startsWith(strClef,"clef=")&&(needsClef=!0,strClef=strClef.substring(5),i+=5),0===strClef.length&&needsClef)return{len:i+5,warn:"No clef specified: "+strOrig};var j=this.skipWhiteSpace(strClef);if(finished(strClef,j))return{len:0};j>0&&(i+=j,strClef=strClef.substring(j));var name=null;if(parseCommon.startsWith(strClef,"treble"))name="treble";else if(parseCommon.startsWith(strClef,"bass3"))name="bass3";else if(parseCommon.startsWith(strClef,"bass"))name="bass";else if(parseCommon.startsWith(strClef,"tenor"))name="tenor";else if(parseCommon.startsWith(strClef,"alto2"))name="alto2";else if(parseCommon.startsWith(strClef,"alto1"))name="alto1";else if(parseCommon.startsWith(strClef,"alto"))name="alto";else if(!bExplicitOnly&&needsClef&&parseCommon.startsWith(strClef,"none"))name="none";else if(parseCommon.startsWith(strClef,"perc"))name="perc";else if(!bExplicitOnly&&needsClef&&parseCommon.startsWith(strClef,"C"))name="tenor";else if(!bExplicitOnly&&needsClef&&parseCommon.startsWith(strClef,"F"))name="bass";else{if(bExplicitOnly||!needsClef||!parseCommon.startsWith(strClef,"G"))return{len:i+5,warn:"Unknown clef specified: "+strOrig};name="treble"}return strClef=strClef.substring(name.length),j=this.isMatch(strClef,"+8"),j>0?name+="+8":(j=this.isMatch(strClef,"-8"))>0&&(name+="-8"),{len:i+name.length,token:name,explicit:needsClef}},this.getBarLine=function(line,i){switch(line.charAt(i)){case"]":switch(++i,line.charAt(i)){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++i,line.charAt(i)>="1"&&line.charAt(i)<="9"||'"'===line.charAt(i)?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++i,line.charAt(i)){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++i,line.charAt(i)){case"]":switch(++i,line.charAt(i)){case"|":return++i,":"===line.charAt(i)?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}break;case"|":return++i,":"===line.charAt(i)?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if(++i,"|"!==line.charAt(i))return line.charAt(i)>="1"&&line.charAt(i)<="9"||'"'===line.charAt(i)?{len:1,token:"bar_invisible"}:{len:0};switch(++i,line.charAt(i)){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(++i,line.charAt(i)){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++i,":"===line.charAt(i)?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var colons=0;":"===line.charAt(i+colons);)colons++;return{len:1+colons,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(str,legalChars){for(var i=0;i<str.length;i++)if(legalChars.indexOf(str.charAt(i))<0)return{len:i,token:str.substring(0,i)};return{len:i,token:str}},this.getToken=function(str,start,end){for(var i=start;i<end&&!this.isWhiteSpace(str.charAt(i));)i++;return str.substring(start,i)},this.isMatch=function(str,match){var i=this.skipWhiteSpace(str);return finished(str,i)?0:parseCommon.startsWith(str.substring(i),match)?i+match.length:0},this.getPitchFromTokens=function(tokens){var ret={},pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};if(ret.position=pitches[tokens[0].token],void 0===ret.position)return{warn:"Pitch expected. Found: "+tokens[0].token};for(tokens.shift();tokens.length;)switch(tokens[0].token){case",":ret.position-=7,tokens.shift();break;case"'":ret.position+=7,tokens.shift();break;default:return ret}return ret},this.getKeyAccidentals2=function(tokens){for(var accs;tokens.length>0;){var acc;if("^"===tokens[0].token){if(acc="sharp",tokens.shift(),0===tokens.length)return{accs:accs,warn:"Expected note name after "+acc};switch(tokens[0].token){case"^":acc="dblsharp",tokens.shift();break;case"/":acc="quartersharp",tokens.shift()}}else if("="===tokens[0].token)acc="natural",tokens.shift();else{if("_"!==tokens[0].token)return{accs:accs};if(acc="flat",tokens.shift(),0===tokens.length)return{accs:accs,warn:"Expected note name after "+acc};switch(tokens[0].token){case"_":acc="dblflat",tokens.shift();break;case"/":acc="quarterflat",tokens.shift()}}if(0===tokens.length)return{accs:accs,warn:"Expected note name after "+acc};switch(tokens[0].token.charAt(0)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===accs&&(accs=[]),accs.push({acc:acc,note:tokens[0].token.charAt(0)}),1===tokens[0].token.length?tokens.shift():tokens[0].token=tokens[0].token.substring(1);break;default:return{accs:accs,warn:"Expected note name after "+acc+" Found: "+tokens[0].token}}}return{accs:accs}},this.getKeyAccidental=function(str){var accTranslation={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};var acc=null;switch(str.charAt(i)){case"^":case"_":case"=":acc=str.charAt(i);break;default:return{len:0}}if(i++,finished(str,i))return{len:1,warn:"Expected note name after accidental"};switch(str.charAt(i)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:i+1,token:{acc:accTranslation[acc],note:str.charAt(i)}};case"^":case"_":case"/":if(acc+=str.charAt(i),i++,finished(str,i))return{len:2,warn:"Expected note name after accidental"};switch(str.charAt(i)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:i+1,token:{acc:accTranslation[acc],note:str.charAt(i)}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(ch){return" "===ch||"\t"===ch||""===ch},this.getMeat=function(line,start,end){var comment=line.indexOf("%",start);for(comment>=0&&comment<end&&(end=comment);start<end&&(" "===line.charAt(start)||"\t"===line.charAt(start)||""===line.charAt(start));)start++;for(;start<end&&(" "===line.charAt(end-1)||"\t"===line.charAt(end-1)||""===line.charAt(end-1));)end--;return{start:start,end:end}};var isLetter=function(ch){return ch>="A"&&ch<="Z"||ch>="a"&&ch<="z"},isNumber=function(ch){return ch>="0"&&ch<="9"};this.tokenize=function(line,start,end,alphaUntilWhiteSpace){var ret=this.getMeat(line,start,end);start=ret.start,end=ret.end;for(var i,tokens=[];start<end;){if('"'===line.charAt(start)){for(i=start+1;i<end&&'"'!==line.charAt(i);)i++;tokens.push({type:"quote",token:line.substring(start+1,i),start:start+1,end:i}),i++}else if(isLetter(line.charAt(start))){if(i=start+1,alphaUntilWhiteSpace)for(;i<end&&!this.isWhiteSpace(line.charAt(i));)i++;else for(;i<end&&isLetter(line.charAt(i));)i++;tokens.push({type:"alpha",token:line.substring(start,i),continueId:isNumber(line.charAt(i)),start:start,end:i}),start=i+1}else if("."===line.charAt(start)&&isNumber(line.charAt(i+1))){i=start+1;for(var float2=null;i<end&&isNumber(line.charAt(i));)i++;float2=parseFloat(line.substring(start,i)),tokens.push({type:"number",token:line.substring(start,i),intt:null,floatt:float2,continueId:isLetter(line.charAt(i)),start:start,end:i}),start=i+1}else if(isNumber(line.charAt(start))||"-"===line.charAt(start)&&isNumber(line.charAt(i+1))){i=start+1;for(var intt=null,floatt=null;i<end&&isNumber(line.charAt(i));)i++;if("."===line.charAt(i)&&isNumber(line.charAt(i+1)))for(i++;i<end&&isNumber(line.charAt(i));)i++;else intt=parseInt(line.substring(start,i));floatt=parseFloat(line.substring(start,i)),tokens.push({type:"number",token:line.substring(start,i),intt:intt,floatt:floatt,continueId:isLetter(line.charAt(i)),start:start,end:i}),start=i+1}else" "===line.charAt(start)||"\t"===line.charAt(start)?i=start+1:(tokens.push({type:"punct",token:line.charAt(start),start:start,end:start+1}),i=start+1);start=i}return tokens},this.getVoiceToken=function(line,start,end){for(var i=start;i<end&&this.isWhiteSpace(line.charAt(i))||"="===line.charAt(i);)i++;if('"'===line.charAt(i)){var close=line.indexOf('"',i+1);return-1===close||close>=end?{len:1,err:"Missing close quote"}:{len:close-start+1,token:this.translateString(line.substring(i+1,close))}}for(var ii=i;ii<end&&!this.isWhiteSpace(line.charAt(ii))&&"="!==line.charAt(ii);)ii++;return{len:ii-start+1,token:line.substring(i,ii)}};var charMap={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~n":"ñ","=s":"š",vs:"š",vz:"ž"},charMap1={"#":"♯",b:"♭","=":"♮"},charMap2={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:"  ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(str){var arr=str.split("\\");if(1===arr.length)return str;var out=null;return parseCommon.each(arr,function(s){if(null===out)out=s;else{var c=charMap[s.substring(0,2)];void 0!==c?out+=c+s.substring(2):(c=charMap2[s.substring(0,3)],void 0!==c?out+=c+s.substring(3):(c=charMap1[s.substring(0,1)],out+=void 0!==c?c+s.substring(1):"\\"+s))}}),out},this.getNumber=function(line,index){for(var num=0;index<line.length;)switch(line.charAt(index)){case"0":num*=10,index++;break;case"1":num=10*num+1,index++;break;case"2":num=10*num+2,index++;break;case"3":num=10*num+3,index++;break;case"4":num=10*num+4,index++;break;case"5":num=10*num+5,index++;break;case"6":num=10*num+6,index++;break;case"7":num=10*num+7,index++;break;case"8":num=10*num+8,index++;break;case"9":num=10*num+9,index++;break;default:return{num:num,index:index}}return{num:num,index:index}},this.getFraction=function(line,index){var num=1,den=1;if("/"!==line.charAt(index)){var ret=this.getNumber(line,index);num=ret.num,index=ret.index}if("/"===line.charAt(index)){if(index++,"/"===line.charAt(index)){for(var div=.5;"/"===line.charAt(index++);)div/=2;return{value:num*div,index:index-1}}var iSave=index,ret2=this.getNumber(line,index);0===ret2.num&&iSave===index&&(ret2.num=2),0!==ret2.num&&(den=ret2.num),index=ret2.index}return{value:num/den,index:index}},this.theReverser=function(str){return parseCommon.endsWith(str,", The")?"The "+str.substring(0,str.length-5):parseCommon.endsWith(str,", A")?"A "+str.substring(0,str.length-3):str},this.stripComment=function(str){var i=str.indexOf("%");return i>=0?parseCommon.strip(str.substring(0,i)):parseCommon.strip(str)},this.getInt=function(str){var x=parseInt(str);if(isNaN(x))return{digits:0};var s=""+x;return{value:x,digits:str.indexOf(s)+s.length}},this.getFloat=function(str){var x=parseFloat(str);if(isNaN(x))return{digits:0};var s=""+x;return{value:x,digits:str.indexOf(s)+s.length}},this.getMeasurement=function(tokens){if(0===tokens.length)return{used:0};var used=1,num="";if("-"===tokens[0].token)tokens.shift(),num="-",used++;else if("number"!==tokens[0].type)return{used:0};if(num+=tokens.shift().token,0===tokens.length)return{used:1,value:parseInt(num)};var x=tokens.shift();if("."===x.token){if(used++,0===tokens.length)return{used:used,value:parseInt(num)};if("number"===tokens[0].type&&(x=tokens.shift(),num=num+"."+x.token,used++,0===tokens.length))return{used:used,value:parseFloat(num)};x=tokens.shift()}switch(x.token){case"pt":return{used:used+1,value:parseFloat(num)};case"cm":return{used:used+1,value:parseFloat(num)/2.54*72};case"in":return{used:used+1,value:72*parseFloat(num)};default:return tokens.unshift(x),{used:used,value:parseFloat(num)}}return{used:0}};var substInChord=function(str){for(;-1!==str.indexOf("\\n");)str=str.replace("\\n","\n");return str};this.getBrackettedSubstring=function(line,i,maxErrorChars,_matchChar){for(var matchChar=_matchChar||line.charAt(i),pos=i+1;pos<line.length&&line.charAt(pos)!==matchChar;)++pos;return line.charAt(pos)===matchChar?[pos-i+1,substInChord(line.substring(i+1,pos)),!0]:(pos=i+maxErrorChars,pos>line.length-1&&(pos=line.length-1),
  [pos-i+1,substInChord(line.substring(i+1,pos)),!1])}};module.exports=Tokenizer},{"./abc_common":5}],11:[function(require,module,exports){"use strict";var Raphael=require("raphael"),TuneBook=require("../api/abc_tunebook").TuneBook,Parse=require("../parse/abc_parse"),EngraverController=require("../write/abc_engraver_controller"),Plugin=function(){var is_user_script=!1;try{is_user_script=abcjs_is_user_script}catch(ex){}this.show_midi=!is_user_script,this.hide_abc=!1,this.render_before=!1,this.midi_options={},this.render_options={},this.render_classname="abcrendered",this.text_classname="abctext",this.auto_render_threshold=20,this.show_text="show score for: ",this.debug=!1},plugin=new Plugin;plugin.start=function(){var body=window.document.body;this.errors="";var elems=this.getABCContainingElements(body);if(this.debug)for(var i=0;i<elems.length;i++){var str="Possible ABC found ("+(i+1)+" of "+elems.length+"):\n\n"+elems[i].innerText;alert(str)}var divs=elems.map(this.convertToDivs,this).reduce(function(a,b){return a.concat(b)});this.auto_render=divs.length<=this.auto_render_threshold,divs.forEach(function(elem){this.render(elem,elem.abctext_)},this)},plugin.getABCContainingElements=function(elem){for(var child,results=[],includeself=!1,i=0,ii=elem.childNodes.length;i<ii;++i)child=elem.childNodes[i],3!==child.nodeType||includeself?1===child.nodeType&&"TEXTAREA"!==child.tagName&&(results=results.concat(this.getABCContainingElements(child))):child.nodeValue.match(/^\s*X:/m)&&"TEXTAREA"!==child.parentNode.tagName&&(results.push(elem),includeself=!0);return results},plugin.convertToDivs=function(elem){for(var node,abctext="",abcdiv=null,inabc=!1,brcount=0,results=[],childNodes=Array.prototype.slice.call(elem.childNodes),i=0,ii=childNodes.length;i<ii;++i)if(node=childNodes[i],3!==node.nodeType||node.nodeValue.match(/^\s*$/))inabc&&"BR"===node.tagName?(abctext+="\n",abcdiv.appendChild(node),brcount++):inabc&&1===node.nodeType?(abctext+="\n",abcdiv.appendChild(node)):inabc&&(inabc=!1,brcount=0,abctext=abctext.replace(/\n+/,"\n"),abcdiv.abctext_=abctext,results.push(abcdiv));else{brcount=0;var text=node.nodeValue;text.match(/^\s*X:/m)&&(inabc=!0,abctext="",abcdiv=document.createElement("DIV"),abcdiv.className=this.text_classname,node.parentElement.insertBefore(abcdiv,node),this.hide_abc&&(abcdiv.style.display="none")),inabc&&(abctext+=text.replace(/^\n+/,""),abcdiv.appendChild(node))}return inabc&&(abctext=abctext.replace(/\n+$/,"\n").replace(/^\n+/,"\n"),abcdiv.abctext_=abctext,results.push(abcdiv)),results},plugin.render=function(contextnode,abcstring){var abcdiv=document.createElement("DIV");abcdiv.className=this.render_classname,this.render_before?contextnode.parentElement.insertBefore(abcdiv,contextnode):contextnode.nextSibling?contextnode.parentElement.insertBefore(abcdiv,contextnode.nextSibling):contextnode.parentElement.appendChild(abcdiv);var self=this;try{this.debug&&alert("About to render:\n\n"+abcstring);var tunebook=new TuneBook(abcstring),abcParser=new Parse;abcParser.parse(tunebook.tunes[0].abc);var tune=abcParser.getTune(),doPrint=function(){try{var paper=Raphael(abcdiv,800,400),engraver_controller=new EngraverController(paper,self.render_options);engraver_controller.engraveABC(tune)}catch(ex){abcdiv.remove(),abcdiv=document.createElement("DIV"),abcdiv.className=self.render_classname,paper=Raphael(abcdiv,800,400),engraver_controller=new EngraverController(paper),engraver_controller.engraveABC(tune),self.render_before?contextnode.parentElement.insertBefore(abcdiv,contextnode):contextnode.nextSibling?contextnode.parentElement.insertBefore(abcdiv,contextnode.nextSibling):contextnode.parentElement.appendChild(abcdiv)}},showtext=document.createElement("A");showtext.className="abcshow",showtext.href="#",showtext.innerHTML=this.show_text+(tune.metaText.title||"untitled"),this.auto_render?doPrint():(showtext.onclick=function(){return doPrint(),showtext.remove(),!1},abcdiv.parentElement.insertBefore(showtext,abcdiv))}catch(e){this.errors+=e}};var autostart=!0;"undefined"!=typeof abcjs_plugin_autostart&&(autostart=abcjs_plugin_autostart),autostart&&"undefined"!=typeof window&&void 0!==window.document&&("loading"!==window.document.readyState?plugin.start():document.addEventListener("DOMContentLoaded",function(){plugin.start()})),module.exports=plugin},{"../api/abc_tunebook":1,"../parse/abc_parse":6,"../write/abc_engraver_controller":23,raphael:4}],12:[function(require,module,exports){var spacing=require("./abc_spacing"),AbsoluteElement=function(abcelem,duration,minspacing,type,tuneNumber){this.tuneNumber=tuneNumber,this.abcelem=abcelem,this.duration=duration,this.minspacing=minspacing||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=type,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};AbsoluteElement.prototype.setUpperAndLowerElements=function(specialYResolved){for(var i=0;i<this.children.length;i++){var child=this.children[i];for(var key in this.specialY)this.specialY.hasOwnProperty(key)&&child[key]&&(child.pitch=specialYResolved[key])}},AbsoluteElement.prototype.getMinWidth=function(){return this.w},AbsoluteElement.prototype.getExtraWidth=function(){return-this.extraw},AbsoluteElement.prototype.addExtra=function(extra){extra.dx<this.extraw&&(this.extraw=extra.dx),this.extra[this.extra.length]=extra,this.addChild(extra)},AbsoluteElement.prototype.addHead=function(head){head.dx<this.extraw&&(this.extraw=head.dx),this.heads[this.heads.length]=head,this.addRight(head)},AbsoluteElement.prototype.addRight=function(right){right.dx+right.w>this.w&&(this.w=right.dx+right.w),this.right[this.right.length]=right,this.addChild(right)},AbsoluteElement.prototype.addCentered=function(elem){var half=elem.w/2;-half<this.extraw&&(this.extraw=-half),this.extra[this.extra.length]=elem,elem.dx+half>this.w&&(this.w=elem.dx+half),this.right[this.right.length]=elem,this.addChild(elem)},AbsoluteElement.prototype.setLimit=function(member,child){child[member]&&(this.specialY[member]?this.specialY[member]=Math.max(this.specialY[member],child[member]):this.specialY[member]=child[member])},AbsoluteElement.prototype.addChild=function(child){child.parent=this,this.children[this.children.length]=child,this.pushTop(child.top),this.pushBottom(child.bottom),this.setLimit("tempoHeightAbove",child),this.setLimit("partHeightAbove",child),this.setLimit("volumeHeightAbove",child),this.setLimit("dynamicHeightAbove",child),this.setLimit("endingHeightAbove",child),this.setLimit("chordHeightAbove",child),this.setLimit("lyricHeightAbove",child),this.setLimit("lyricHeightBelow",child),this.setLimit("chordHeightBelow",child),this.setLimit("volumeHeightBelow",child),this.setLimit("dynamicHeightBelow",child)},AbsoluteElement.prototype.pushTop=function(top){void 0!==top&&(void 0===this.top?this.top=top:this.top=Math.max(top,this.top))},AbsoluteElement.prototype.pushBottom=function(bottom){void 0!==bottom&&(void 0===this.bottom?this.bottom=bottom:this.bottom=Math.min(bottom,this.bottom))},AbsoluteElement.prototype.setX=function(x){this.x=x;for(var i=0;i<this.children.length;i++)this.children[i].setX(x)},AbsoluteElement.prototype.setHint=function(){this.hint=!0},AbsoluteElement.prototype.draw=function(renderer,bartop){if(this.elemset=renderer.paper.set(),!this.invisible){renderer.beginGroup();for(var i=0;i<this.children.length;i++)this.elemset.push(this.children[i].draw(renderer,bartop));this.elemset.push(renderer.endGroup(this.type)),this.klass&&this.setClass("mark","","#00ff00"),this.hint&&this.setClass("abcjs-hint","",null);var target=renderer.printShadedBox(this.x,renderer.calcY(this.top),this.w,renderer.calcY(this.bottom)-renderer.calcY(this.top),"rgba(0,0,0,0)"),self=this,controller=renderer.controller;target.mouseup(function(){controller.notifySelect(self,self.tuneNumber)}),this.abcelem.abselem=this;var step=spacing.STEP,start=function(){this.dy=0},move=function(dx,dy){dy=Math.round(dy/step)*step,this.translate(0,-this.dy),this.dy=dy,this.translate(0,this.dy)},up=function(){if(self.abcelem.pitches){var delta=-Math.round(this.dy/step);self.abcelem.pitches[0].pitch+=delta,self.abcelem.pitches[0].verticalPos+=delta,controller.notifyChange()}};"note"===this.abcelem.el_type&&controller.editable&&this.elemset.drag(move,start,up)}},AbsoluteElement.prototype.isIE=!1,AbsoluteElement.prototype.setClass=function(addClass,removeClass,color){if(null!==color&&this.elemset.attr({fill:color}),!this.isIE)for(var i=0;i<this.elemset.length;i++)if(this.elemset[i][0].setAttribute){var kls=this.elemset[i][0].getAttribute("class");kls||(kls=""),kls=kls.replace(removeClass,""),kls=kls.replace(addClass,""),addClass.length>0&&(kls.length>0&&" "!==kls.charAt(kls.length-1)&&(kls+=" "),kls+=addClass),this.elemset[i][0].setAttribute("class",kls)}},AbsoluteElement.prototype.highlight=function(klass,color){void 0===klass&&(klass="note_selected"),void 0===color&&(color="#ff0000"),this.setClass(klass,"",color)},AbsoluteElement.prototype.unhighlight=function(klass,color){void 0===klass&&(klass="note_selected"),void 0===color&&(color="#000000"),this.setClass("",klass,color)},module.exports=AbsoluteElement},{"./abc_spacing":27}],13:[function(require,module,exports){var AbstractEngraver,AbsoluteElement=require("./abc_absolute_element"),BeamElem=require("./abc_beam_element"),BraceElem=require("./abc_brace_element"),createClef=require("./abc_create_clef"),createKeySignature=require("./abc_create_key_signature"),createTimeSignature=require("./abc_create_time_signature"),Decoration=require("./abc_decoration"),EndingElem=require("./abc_ending_element"),glyphs=require("./abc_glyphs"),RelativeElement=require("./abc_relative_element"),spacing=require("./abc_spacing"),StaffGroupElement=require("./abc_staff_group_element"),TempoElement=require("./abc_tempo_element"),TieElem=require("./abc_tie_element"),TripletElem=require("./abc_triplet_element"),VoiceElement=require("./abc_voice_element"),parseCommon=require("../parse/abc_common");!function(){"use strict";var getDuration=function(elem){var d=0;return elem.duration&&(d=elem.duration),d},hint=!1;AbstractEngraver=function(bagpipes,renderer,tuneNumber){this.decoration=new Decoration,this.renderer=renderer,this.tuneNumber=tuneNumber,this.isBagpipes=bagpipes,this.chartable={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},this.reset()},AbstractEngraver.prototype.reset=function(){this.slurs={},this.ties=[],this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.s=0,this.v=0,this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.pos=void 0,this.roomtaken=void 0,this.roomtakenright=void 0,this.staffgroup=void 0,this.startlimitelem=void 0,this.stemdir=void 0,this.voice=void 0},AbstractEngraver.prototype.setStemHeight=function(heightInPixels){this.stemHeight=heightInPixels/spacing.STEP},AbstractEngraver.prototype.getCurrentVoiceId=function(){return"s"+this.s+"v"+this.v},AbstractEngraver.prototype.pushCrossLineElems=function(){this.slursbyvoice[this.getCurrentVoiceId()]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId()]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId()]=this.partstartelem},AbstractEngraver.prototype.popCrossLineElems=function(){this.slurs=this.slursbyvoice[this.getCurrentVoiceId()]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId()]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId()]},AbstractEngraver.prototype.getElem=function(){return this.abcline.length<=this.pos?null:this.abcline[this.pos]},AbstractEngraver.prototype.getNextElem=function(){return this.abcline.length<=this.pos+1?null:this.abcline[this.pos+1]},AbstractEngraver.prototype.containsLyrics=function(staves){for(var i=0;i<staves.length;i++)for(var j=0;j<staves[i].voices.length;j++)for(var k=0;k<staves[i].voices[j].length;k++){var el=staves[i].voices[j][k];if(el.lyric)return void(el.positioning&&"below"!==el.positioning.vocalPosition||(this.hasVocals=!0))}},AbstractEngraver.prototype.createABCLine=function(staffs,tempo){for(this.minY=2,this.containsLyrics(staffs),this.staffgroup=new StaffGroupElement,this.tempoSet=!1,this.s=0;this.s<staffs.length;this.s++)hint&&this.restoreState(),hint=!1,this.createABCStaff(staffs[this.s],tempo);return this.staffgroup},AbstractEngraver.prototype.createABCStaff=function(abcstaff,tempo){for(this.v=0;this.v<abcstaff.voices.length;this.v++){this.voice=new VoiceElement(this.v,abcstaff.voices.length),0===this.v?(this.voice.barfrom="start"===abcstaff.connectBarLines||"continue"===abcstaff.connectBarLines,this.voice.barto="continue"===abcstaff.connectBarLines||"end"===abcstaff.connectBarLines):this.voice.duplicate=!0,abcstaff.title&&abcstaff.title[this.v]&&(this.voice.header=abcstaff.title[this.v]);var clef=createClef(abcstaff.clef,this.tuneNumber);clef&&(0===this.v&&abcstaff.barNumber&&this.addMeasureNumber(abcstaff.barNumber,clef),this.voice.addChild(clef));var keySig=createKeySignature(abcstaff.key,this.tuneNumber);if(keySig&&(this.voice.addChild(keySig),this.startlimitelem=keySig),abcstaff.meter){var ts=createTimeSignature(abcstaff.meter,this.tuneNumber);this.voice.addChild(ts),this.startlimitelem=ts}this.voice.duplicate&&(this.voice.children=[]);var staffLines=abcstaff.clef.stafflines||0===abcstaff.clef.stafflines?abcstaff.clef.stafflines:5;this.staffgroup.addVoice(this.voice,this.s,staffLines),this.createABCVoice(abcstaff.voices[this.v],tempo),this.staffgroup.setStaffLimits(this.voice),"start"===abcstaff.brace?this.staffgroup.brace=new BraceElem(1,!0):"end"===abcstaff.brace&&this.staffgroup.brace?this.staffgroup.brace.increaseStavesIncluded():"continue"===abcstaff.brace&&this.staffgroup.brace&&this.staffgroup.brace.increaseStavesIncluded()}},AbstractEngraver.prototype.createABCVoice=function(abcline,tempo){this.popCrossLineElems(),this.stemdir=this.isBagpipes?"down":null,this.abcline=abcline,this.partstartelem&&(this.partstartelem=new EndingElem("",null,null),this.voice.addOther(this.partstartelem));for(var slur in this.slurs)this.slurs.hasOwnProperty(slur)&&(this.slurs[slur]=new TieElem(null,null,this.slurs[slur].above,this.slurs[slur].force,!1),hint&&this.slurs[slur].setHint(),this.voice.addOther(this.slurs[slur]));for(var i=0;i<this.ties.length;i++)this.ties[i]=new TieElem(null,null,this.ties[i].above,this.ties[i].force,!0),hint&&this.ties[i].setHint(),this.voice.addOther(this.ties[i]);for(this.pos=0;this.pos<this.abcline.length;this.pos++){var abselems=this.createABCElement();if(abselems)for(i=0;i<abselems.length;i++)this.tempoSet||!tempo||tempo.suppress||(this.tempoSet=!0,abselems[i].addChild(new TempoElement(tempo,this.tuneNumber))),this.voice.addChild(abselems[i])}this.pushCrossLineElems()},AbstractEngraver.prototype.saveState=function(){this.tiesSave=parseCommon.cloneArray(this.ties),this.slursSave=parseCommon.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=parseCommon.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoice)},AbstractEngraver.prototype.restoreState=function(){this.ties=parseCommon.cloneArray(this.tiesSave),this.slurs=parseCommon.cloneHashOfHash(this.slursSave),this.slursbyvoice=parseCommon.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},AbstractEngraver.prototype.createABCElement=function(){var elemset=[],elem=this.getElem();switch(elem.el_type){case"note":elemset=this.createBeam();break;case"bar":elemset[0]=this.createBarLine(elem),this.voice.duplicate&&(elemset[0].invisible=!0);break;case"meter":elemset[0]=createTimeSignature(elem,this.tuneNumber),this.startlimitelem=elemset[0],this.voice.duplicate&&(elemset[0].invisible=!0);break;case"clef":if(elemset[0]=createClef(elem,this.tuneNumber),!elemset[0])return null;this.voice.duplicate&&(elemset[0].invisible=!0);break;case"key":var absKey=createKeySignature(elem,this.tuneNumber);absKey&&(elemset[0]=absKey,this.startlimitelem=elemset[0]),this.voice.duplicate&&(elemset[0].invisible=!0);break;case"stem":this.stemdir=elem.direction;break;case"part":var abselem=new AbsoluteElement(elem,0,0,"part",this.tuneNumber),dim=this.renderer.getTextSize(elem.title,"partsfont","part");abselem.addChild(new RelativeElement(elem.title,0,0,void 0,{type:"part",height:dim.height/spacing.STEP})),elemset[0]=abselem;break;case"tempo":var abselem3=new AbsoluteElement(elem,0,0,"tempo",this.tuneNumber);abselem3.addChild(new TempoElement(elem,this.tuneNumber)),elemset[0]=abselem3;break;case"style":"normal"===elem.head?delete this.style:this.style=elem.head;break;case"hint":hint=!0,this.saveState();break;case"midi":break;default:var abselem2=new AbsoluteElement(elem,0,0,"unsupported",this.tuneNumber);abselem2.addChild(new RelativeElement("element type "+elem.el_type,0,0,void 0,{type:"debug"})),elemset[0]=abselem2}return elemset},AbstractEngraver.prototype.calcBeamDir=function(){if(this.stemdir)return this.stemdir;for(var abselem,beamelem=new BeamElem(this.stemHeight,this.stemdir),oldPos=this.pos;this.getElem()&&(abselem=this.createNote(this.getElem(),!0,!0),beamelem.add(abselem),!this.getElem().endBeam);)this.pos++;var dir=beamelem.calcDir();return this.pos=oldPos,dir?"up":"down"},AbstractEngraver.prototype.createBeam=function(){var abselemset=[];if(this.getElem().startBeam&&!this.getElem().endBeam){var dir=this.calcBeamDir(),beamelem=new BeamElem(this.stemHeight,dir);hint&&beamelem.setHint();var oldDir=this.stemdir;for(this.stemdir=dir;this.getElem();){var abselem=this.createNote(this.getElem(),!0);if(abselemset.push(abselem),beamelem.add(abselem),this.triplet&&this.triplet.isClosed()&&(this.voice.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1),this.getElem().endBeam)break;this.pos++}this.stemdir=oldDir,this.voice.addBeam(beamelem)}else abselemset[0]=this.createNote(this.getElem()),this.triplet&&this.triplet.isClosed()&&(this.voice.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);return abselemset};var sortPitch=function(elem){var sorted;do{sorted=!0;for(var p=0;p<elem.pitches.length-1;p++)if(elem.pitches[p].pitch>elem.pitches[p+1].pitch){sorted=!1;var tmp=elem.pitches[p];elem.pitches[p]=elem.pitches[p+1],elem.pitches[p+1]=tmp}}while(!sorted)},ledgerLines=function(abselem,minPitch,maxPitch,isRest,c,additionalLedgers,dir,dx,scale){for(var i=maxPitch;i>11;i--)i%2!=0||isRest||abselem.addChild(new RelativeElement(null,dx,(glyphs.getSymbolWidth(c)+4)*scale,i,{type:"ledger"}));for(i=minPitch;i<1;i++)i%2!=0||isRest||abselem.addChild(new RelativeElement(null,dx,(glyphs.getSymbolWidth(c)+4)*scale,i,{type:"ledger"}));for(i=0;i<additionalLedgers.length;i++){var ofs=glyphs.getSymbolWidth(c);"down"===dir&&(ofs=-ofs),abselem.addChild(new RelativeElement(null,ofs+dx,(glyphs.getSymbolWidth(c)+4)*scale,additionalLedgers[i],{type:"ledger"}))}};AbstractEngraver.prototype.createNote=function(elem,nostem,dontDraw){var notehead=null,grace=null;this.roomtaken=0,this.roomtakenright=0;var p,i,pp,width,p1,p2,dx,dotshiftx=0,c="",flag=null,additionalLedgers=[],duration=getDuration(elem),zeroDuration=!1;0===duration&&(zeroDuration=!0,duration=.25,nostem=!0);for(var durlog=Math.floor(Math.log(duration)/Math.log(2)),dot=0,tot=Math.pow(2,durlog),inc=tot/2;tot<duration;dot++,tot+=inc,inc/=2);elem.startTriplet&&(2===elem.startTriplet?this.tripletmultiplier=1.5:this.tripletmultiplier=(elem.startTriplet-1)/elem.startTriplet);var abselem=new AbsoluteElement(elem,duration*this.tripletmultiplier,1,"note",this.tuneNumber);if(hint&&abselem.setHint(),elem.rest){var restpitch=7;"down"===this.stemdir&&(restpitch=3),"up"===this.stemdir&&(restpitch=11);switch(1===this.staffgroup.staffs[this.staffgroup.staffs.length-1].lines&&(restpitch=duration<.5?7:duration<1?6.8:4.8),elem.rest.type){case"whole":c=this.chartable.rest[0],elem.averagepitch=restpitch,elem.minpitch=restpitch,elem.maxpitch=restpitch,dot=0;break;case"rest":c=this.chartable.rest[-durlog],elem.averagepitch=restpitch,elem.minpitch=restpitch,elem.maxpitch=restpitch;break;case"invisible":case"spacer":c="",elem.averagepitch=restpitch,elem.minpitch=restpitch,elem.maxpitch=restpitch}dontDraw||(notehead=this.createNoteHead(abselem,c,{verticalPos:restpitch},null,0,-this.roomtaken,null,dot,0,1)),notehead&&abselem.addHead(notehead),this.roomtaken+=this.accidentalshiftx,this.roomtakenright=Math.max(this.roomtakenright,this.dotshiftx)}else{sortPitch(elem);var sum=0;for(p=0,pp=elem.pitches.length;p<pp;p++)sum+=elem.pitches[p].verticalPos;elem.averagepitch=sum/elem.pitches.length,elem.minpitch=elem.pitches[0].verticalPos,this.minY=Math.min(elem.minpitch,this.minY),elem.maxpitch=elem.pitches[elem.pitches.length-1].verticalPos;var dir=elem.averagepitch>=6?"down":"up";this.stemdir&&(dir=this.stemdir);var style=elem.style?elem.style:this.style;style&&"normal"!==style||(style="note");var noteSymbol;for(noteSymbol=zeroDuration?this.chartable[style].nostem:this.chartable[style][-durlog],noteSymbol||console.log("noteSymbol:",style,durlog,zeroDuration),p="down"===dir?elem.pitches.length-2:1;"down"===dir?p>=0:p<elem.pitches.length;p="down"===dir?p-1:p+1){var prev=elem.pitches["down"===dir?p+1:p-1],curr=elem.pitches[p],delta="down"===dir?prev.pitch-curr.pitch:curr.pitch-prev.pitch;delta<=1&&!prev.printer_shift&&(curr.printer_shift=delta?"different":"same",(curr.verticalPos>11||curr.verticalPos<1)&&additionalLedgers.push(curr.verticalPos-curr.verticalPos%2),"down"===dir?this.roomtaken=glyphs.getSymbolWidth(noteSymbol)+2:dotshiftx=glyphs.getSymbolWidth(noteSymbol)+2)}for(this.accidentalSlot=[],p=0;p<elem.pitches.length;p++){nostem||(flag="down"===dir&&0!==p||"up"===dir&&p!==pp-1?null:this.chartable["down"===dir?"dflags":"uflags"][-durlog]),c=noteSymbol,elem.pitches[p].highestVert=elem.pitches[p].verticalPos;var isTopWhenStemIsDown=("up"===this.stemdir||"up"===dir)&&0===p,isBottomWhenStemIsUp=("down"===this.stemdir||"down"===dir)&&p===pp-1;if(!dontDraw&&(isTopWhenStemIsDown||isBottomWhenStemIsUp)){if((elem.startSlur||1===pp)&&(elem.pitches[p].highestVert=elem.pitches[pp-1].verticalPos,"up"!==this.stemdir&&"up"!==dir||(elem.pitches[p].highestVert+=6)),elem.startSlur)for(elem.pitches[p].startSlur||(elem.pitches[p].startSlur=[]),i=0;i<elem.startSlur.length;i++)elem.pitches[p].startSlur.push(elem.startSlur[i]);if(!dontDraw&&elem.endSlur)for(elem.pitches[p].highestVert=elem.pitches[pp-1].verticalPos,"up"!==this.stemdir&&"up"!==dir||(elem.pitches[p].highestVert+=6),elem.pitches[p].endSlur||(elem.pitches[p].endSlur=[]),i=0;i<elem.endSlur.length;i++)elem.pitches[p].endSlur.push(elem.endSlur[i])}var hasStem=!nostem&&durlog<=-1;dontDraw||(notehead=this.createNoteHead(abselem,c,elem.pitches[p],hasStem?dir:null,0,-this.roomtaken,flag,dot,dotshiftx,1)),notehead&&(elem.gracenotes&&elem.gracenotes.length>0&&(notehead.bottom=notehead.bottom-1),abselem.addHead(notehead)),this.roomtaken+=this.accidentalshiftx,this.roomtakenright=Math.max(this.roomtakenright,this.dotshiftx)}hasStem&&(p1="down"===dir?elem.minpitch-7:elem.minpitch+1/3,p1>6&&!this.stemdir&&(p1=6),p2="down"===dir?elem.maxpitch-1/3:elem.maxpitch+7,p2<6&&!this.stemdir&&(p2=6),dx="down"===dir||0===abselem.heads.length?0:abselem.heads[0].w,width="down"===dir?1:-1,"noteheads.slash.quarter"===notehead.c&&("down"===dir?p2-=1:p1+=1),abselem.addExtra(new RelativeElement(null,dx,0,p1,{type:"stem",pitch2:p2,linewidth:width})),this.minY=Math.min(p1,this.minY),this.minY=Math.min(p2,this.minY))}if(void 0!==elem.lyric){var lyricStr="";parseCommon.each(elem.lyric,function(ly){lyricStr+=ly.syllable+ly.divider+"\n"});var lyricDim=this.renderer.getTextSize(lyricStr,"vocalfont","abc-lyric"),position=elem.positioning?elem.positioning.vocalPosition:"below";abselem.addCentered(new RelativeElement(lyricStr,0,lyricDim.width,void 0,{type:"lyric",position:position,height:lyricDim.height/spacing.STEP}))}if(!dontDraw&&void 0!==elem.gracenotes){var gracebeam=null;elem.gracenotes.length>1&&(gracebeam=new BeamElem(.7*this.stemHeight,"grace",this.isBagpipes),hint&&gracebeam.setHint(),gracebeam.mainNote=abselem);var graceoffsets=[];for(i=elem.gracenotes.length-1;i>=0;i--)this.roomtaken+=10,graceoffsets[i]=this.roomtaken,elem.gracenotes[i].accidental&&(this.roomtaken+=7);for(i=0;i<elem.gracenotes.length;i++){var gracepitch=elem.gracenotes[i].verticalPos;if(flag=gracebeam?null:this.chartable.uflags[this.isBagpipes?5:3],grace=this.createNoteHead(abselem,"noteheads.quarter",elem.gracenotes[i],"up",-graceoffsets[i],-graceoffsets[i],flag,0,0,.6),abselem.addExtra(grace),elem.gracenotes[i].acciaccatura){var pos=elem.gracenotes[i].verticalPos+4.2,dAcciaccatura=gracebeam?5:6;abselem.addRight(new RelativeElement("flags.ugrace",-graceoffsets[i]+dAcciaccatura,0,pos,{scalex:.6,scaley:.6}))}if(gracebeam){var graceDuration=elem.gracenotes[i].duration/2;this.isBagpipes&&(graceDuration/=2);var pseudoabselem={heads:[grace],abcelem:{averagepitch:gracepitch,minpitch:gracepitch,maxpitch:gracepitch,duration:graceDuration}};gracebeam.add(pseudoabselem)}else p1=gracepitch+1/3*.6,p2=gracepitch+4.2,dx=grace.dx+grace.w,width=-.6,abselem.addExtra(new RelativeElement(null,dx,0,p1,{type:"stem",pitch2:p2,linewidth:width}));if(ledgerLines(abselem,gracepitch,gracepitch,!1,"noteheads.quarter",[],!0,grace.dx-1,.6),0===i&&!this.isBagpipes&&(!elem.rest||"spacer"!==elem.rest.type&&"invisible"!==elem.rest.type)){var isTie=1===elem.gracenotes.length&&grace.pitch===notehead.pitch;this.voice.addOther(new TieElem(grace,notehead,!1,!0,isTie))}}gracebeam&&this.voice.addBeam(gracebeam)}!dontDraw&&elem.decoration&&this.decoration.createDecoration(this.voice,elem.decoration,abselem.top,notehead?notehead.w:0,abselem,this.roomtaken,dir,abselem.bottom,elem.positioning,this.hasVocals),elem.barNumber&&abselem.addChild(new RelativeElement(elem.barNumber,-10,0,0,{type:"barNumber"})),ledgerLines(abselem,elem.minpitch,elem.maxpitch,elem.rest,c,additionalLedgers,dir,-2,1);if(void 0!==elem.chord)for(i=0;i<elem.chord.length;i++){var y,x=0,dim=this.renderer.getTextSize(elem.chord[i].name,"annotationfont","annotation"),chordWidth=dim.width,chordHeight=dim.height/spacing.STEP;switch(elem.chord[i].position){case"left":this.roomtaken+=chordWidth+7,x=-this.roomtaken,y=elem.averagepitch,abselem.addExtra(new RelativeElement(elem.chord[i].name,x,chordWidth+4,y,{type:"text",height:chordHeight}));break;case"right":this.roomtakenright+=4,x=this.roomtakenright,y=elem.averagepitch,abselem.addRight(new RelativeElement(elem.chord[i].name,x,chordWidth+4,y,{type:"text",height:chordHeight}));break;case"below":abselem.addRight(new RelativeElement(elem.chord[i].name,0,chordWidth+8,void 0,{type:"text",position:"below",height:chordHeight}));break;case"above":abselem.addRight(new RelativeElement(elem.chord[i].name,0,chordWidth+8,void 0,{type:"text",height:chordHeight}));break;default:if(elem.chord[i].rel_position){var relPositionY=elem.chord[i].rel_position.y+3*spacing.STEP;abselem.addChild(new RelativeElement(elem.chord[i].name,x+elem.chord[i].rel_position.x,0,elem.minpitch+relPositionY/spacing.STEP,{type:"text",height:chordHeight}))}else{var pos2="above";elem.positioning&&elem.positioning.chordPosition&&(pos2=elem.positioning.chordPosition),dim=this.renderer.getTextSize(elem.chord[i].name,"gchordfont","chord"),chordHeight=dim.height/spacing.STEP,chordWidth=dim.width,abselem.addCentered(new RelativeElement(elem.chord[i].name,x,chordWidth,void 0,{type:"chord",position:pos2,height:chordHeight}))}}}return elem.startTriplet&&!dontDraw&&(this.triplet=new TripletElem(elem.startTriplet,notehead)),elem.endTriplet&&this.triplet&&!dontDraw&&this.triplet.setCloseAnchor(notehead),abselem},AbstractEngraver.prototype.createNoteHead=function(abselem,c,pitchelem,dir,headx,extrax,flag,dot,dotshiftx,scale){var notehead,i,pitch=pitchelem.verticalPos;if(this.accidentalshiftx=0,this.dotshiftx=0,void 0===c)abselem.addChild(new RelativeElement("pitch is undefined",0,0,0,{type:"debug"}));else if(""===c)notehead=new RelativeElement(null,0,0,pitch);else{var shiftheadx=headx;if(pitchelem.printer_shift){var adjust="same"===pitchelem.printer_shift?1:0;shiftheadx="down"===dir?-glyphs.getSymbolWidth(c)*scale+adjust:glyphs.getSymbolWidth(c)*scale-adjust}var opts={scalex:scale,scaley:scale,thickness:glyphs.symbolHeightInPitches(c)*scale};if(notehead=new RelativeElement(c,shiftheadx,glyphs.getSymbolWidth(c)*scale,pitch,opts),flag){var pos=pitch+("down"===dir?-7:7)*scale;(1===scale&&"down"===dir?pos>6:pos<6)&&(pos=6);var xdelta="down"===dir?headx:headx+notehead.w-.6;abselem.addRight(new RelativeElement(flag,xdelta,glyphs.getSymbolWidth(flag)*scale,pos,{scalex:scale,scaley:scale}))}for(this.dotshiftx=notehead.w+dotshiftx-2+5*dot;dot>0;dot--){var dotadjusty=1-Math.abs(pitch)%2;abselem.addRight(new RelativeElement("dots.dot",notehead.w+dotshiftx-2+5*dot,glyphs.getSymbolWidth("dots.dot"),pitch+dotadjusty))}}if(notehead&&(notehead.highestVert=pitchelem.highestVert),pitchelem.accidental){var symb;switch(pitchelem.accidental){case"quartersharp":symb="accidentals.halfsharp";break;case"dblsharp":symb="accidentals.dblsharp";break;case"sharp":symb="accidentals.sharp";break;case"quarterflat":symb="accidentals.halfflat";break;case"flat":symb="accidentals.flat";break;case"dblflat":symb="accidentals.dblflat";break;case"natural":symb="accidentals.nat"}for(var accSlotFound=!1,accPlace=extrax,j=0;j<this.accidentalSlot.length;j++)if(pitch-this.accidentalSlot[j][0]>=6){this.accidentalSlot[j][0]=pitch,accPlace=this.accidentalSlot[j][1],accSlotFound=!0;break}!1===accSlotFound&&(accPlace-=glyphs.getSymbolWidth(symb)*scale+2,this.accidentalSlot.push([pitch,accPlace]),this.accidentalshiftx=glyphs.getSymbolWidth(symb)*scale+2),abselem.addExtra(new RelativeElement(symb,accPlace,glyphs.getSymbolWidth(symb),pitch,{scalex:scale,scaley:scale}))}if(pitchelem.endTie&&this.ties[0]&&(this.ties[0].setEndAnchor(notehead),this.ties=this.ties.slice(1,this.ties.length)),pitchelem.startTie){var tie=new TieElem(notehead,null,("down"===this.stemdir||"down"===dir)&&"up"!==this.stemdir,"down"===this.stemdir||"up"===this.stemdir,!0);hint&&tie.setHint(),this.ties[this.ties.length]=tie,this.voice.addOther(tie),abselem.startTie=!0}if(pitchelem.endSlur)for(i=0;i<pitchelem.endSlur.length;i++){var slur,slurid=pitchelem.endSlur[i];this.slurs[slurid]?(slur=this.slurs[slurid],slur.setEndAnchor(notehead),
  delete this.slurs[slurid]):(slur=new TieElem(null,notehead,"down"===dir,("up"===this.stemdir||"down"===dir)&&"down"!==this.stemdir,!1),hint&&slur.setHint(),this.voice.addOther(slur)),this.startlimitelem&&slur.setStartX(this.startlimitelem)}if(pitchelem.startSlur)for(i=0;i<pitchelem.startSlur.length;i++){var slurid=pitchelem.startSlur[i].label,slur=new TieElem(notehead,null,("down"===this.stemdir||"down"===dir)&&"up"!==this.stemdir,!1,!1);hint&&slur.setHint(),this.slurs[slurid]=slur,this.voice.addOther(slur)}return notehead},AbstractEngraver.prototype.addMeasureNumber=function(number,abselem){var measureNumHeight=this.renderer.getTextSize(number,"measurefont","bar-number");abselem.addChild(new RelativeElement(number,0,0,11+measureNumHeight.height/spacing.STEP,{type:"barNumber"}))},AbstractEngraver.prototype.createBarLine=function(elem){var abselem=new AbsoluteElement(elem,0,10,"bar",this.tuneNumber),anchor=null,dx=0;elem.barNumber&&this.addMeasureNumber(elem.barNumber,abselem);var firstdots="bar_right_repeat"===elem.type||"bar_dbl_repeat"===elem.type,firstthin="bar_left_repeat"!==elem.type&&"bar_thick_thin"!==elem.type&&"bar_invisible"!==elem.type,thick="bar_right_repeat"===elem.type||"bar_dbl_repeat"===elem.type||"bar_left_repeat"===elem.type||"bar_thin_thick"===elem.type||"bar_thick_thin"===elem.type,secondthin="bar_left_repeat"===elem.type||"bar_thick_thin"===elem.type||"bar_thin_thin"===elem.type||"bar_dbl_repeat"===elem.type,seconddots="bar_left_repeat"===elem.type||"bar_dbl_repeat"===elem.type;if(firstdots||seconddots){for(var slur in this.slurs)this.slurs.hasOwnProperty(slur)&&this.slurs[slur].setEndX(abselem);this.startlimitelem=abselem}if(firstdots&&(abselem.addRight(new RelativeElement("dots.dot",dx,1,7)),abselem.addRight(new RelativeElement("dots.dot",dx,1,5)),dx+=6),firstthin&&(anchor=new RelativeElement(null,dx,1,2,{type:"bar",pitch2:10,linewidth:.6}),abselem.addRight(anchor)),"bar_invisible"===elem.type&&(anchor=new RelativeElement(null,dx,1,2,{type:"none",pitch2:10,linewidth:.6}),abselem.addRight(anchor)),elem.decoration&&this.decoration.createDecoration(this.voice,elem.decoration,12,thick?3:1,abselem,0,"down",2,elem.positioning,this.hasVocals),thick&&(dx+=4,anchor=new RelativeElement(null,dx,4,2,{type:"bar",pitch2:10,linewidth:4}),abselem.addRight(anchor),dx+=5),this.partstartelem&&elem.endEnding&&(this.partstartelem.anchor2=anchor,this.partstartelem=null),secondthin&&(dx+=3,anchor=new RelativeElement(null,dx,1,2,{type:"bar",pitch2:10,linewidth:.6}),abselem.addRight(anchor)),seconddots&&(dx+=3,abselem.addRight(new RelativeElement("dots.dot",dx,1,7)),abselem.addRight(new RelativeElement("dots.dot",dx,1,5))),elem.startEnding){var textWidth=this.renderer.getTextSize(elem.startEnding,"repeatfont","").width;abselem.minspacing+=textWidth+10,this.partstartelem=new EndingElem(elem.startEnding,anchor,null),this.voice.addOther(this.partstartelem)}return abselem}}(),module.exports=AbstractEngraver},{"../parse/abc_common":5,"./abc_absolute_element":12,"./abc_beam_element":14,"./abc_brace_element":15,"./abc_create_clef":16,"./abc_create_key_signature":17,"./abc_create_time_signature":18,"./abc_decoration":20,"./abc_ending_element":22,"./abc_glyphs":24,"./abc_relative_element":25,"./abc_spacing":27,"./abc_staff_group_element":28,"./abc_tempo_element":29,"./abc_tie_element":30,"./abc_triplet_element":31,"./abc_voice_element":32}],14:[function(require,module,exports){var BeamElem,RelativeElement=(require("./abc_absolute_element"),require("./abc_relative_element")),spacing=require("./abc_spacing"),getDurlog=function(duration){return void 0===duration?0:Math.floor(Math.log(duration)/Math.log(2))};!function(){"use strict";function minStem(element,stemsUp,referencePitch,minStemHeight){if(!element.children)return minStemHeight;for(var i=0;i<element.children.length;i++){var elem=element.children[i];stemsUp&&void 0!==elem.top&&"flags.ugrace"===elem.c?minStemHeight=Math.max(minStemHeight,elem.top-referencePitch):stemsUp||void 0===elem.bottom||"flags.ugrace"!==elem.c||(minStemHeight=Math.max(minStemHeight,referencePitch-elem.bottom+7))}return minStemHeight}function calcSlant(leftAveragePitch,rightAveragePitch,numStems,isFlat){if(isFlat)return 0;var slant=leftAveragePitch-rightAveragePitch,maxSlant=numStems/2;return slant>maxSlant&&(slant=maxSlant),slant<-maxSlant&&(slant=-maxSlant),slant}function calcAverage(total,numElements){return numElements?total/numElements:0}function getBarYAt(startx,starty,endx,endy,x){return starty+(endy-starty)/(endx-startx)*(x-startx)}function calcDy(asc,isGrace){var dy=asc?spacing.STEP:-spacing.STEP;return isGrace&&(dy*=.4),dy}function drawBeam(renderer,startX,startY,endX,endY,dy,isHint){var klass="beam-elem";isHint&&(klass+=" abcjs-hint"),startY=renderer.calcY(startY),endY=renderer.calcY(endY);var pathString="M"+startX+" "+startY+" L"+endX+" "+endY+"L"+endX+" "+(endY+dy)+" L"+startX+" "+(startY+dy)+"z";renderer.printPath({path:pathString,stroke:"none",fill:"#000000",class:renderer.addClasses(klass)})}function calcXPos(asc,firstElement,lastElement){var starthead=firstElement.heads[asc?0:firstElement.heads.length-1],endhead=lastElement.heads[asc?0:lastElement.heads.length-1],startX=starthead.x;asc&&(startX+=starthead.w-.6);var endX=endhead.x;return asc&&(endX+=endhead.w),[startX,endX]}function calcYPos(total,numElements,stemHeight,asc,firstAveragePitch,lastAveragePitch,isFlat,minPitch,maxPitch,isGrace){var average=calcAverage(total,numElements),barpos=stemHeight-2,barminpos=stemHeight-2,pos=Math.round(asc?Math.max(average+barpos,maxPitch+barminpos):Math.min(average-barpos,minPitch-barminpos)),slant=calcSlant(firstAveragePitch,lastAveragePitch,numElements,isFlat),startY=pos+Math.floor(slant/2),endY=pos+Math.floor(-slant/2);return isGrace||(asc&&pos<6?(startY=6,endY=6):!asc&&pos>6&&(startY=6,endY=6)),[startY,endY]}function createStems(elems,asc,beam,dy,mainNote){for(var i=0;i<elems.length;i++){var elem=elems[i];if(!elem.abcelem.rest){var isGrace=!elem.addExtra,parent=isGrace?mainNote:elem,furthestHead=elem.heads[asc?0:elem.heads.length-1],pitch=furthestHead.pitch+(asc?.2:-.2),dx=asc?furthestHead.w:0,x=furthestHead.x+dx,bary=getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,x),lineWidth=asc?-.6:.6;asc||(bary-=dy/2/spacing.STEP),isGrace&&(dx+=elem.heads[0].dx),"noteheads.slash.quarter"===furthestHead.c&&(asc?pitch+=1:pitch-=1);var stem=new RelativeElement(null,dx,0,pitch,{type:"stem",pitch2:bary,linewidth:lineWidth});stem.setX(parent.x),parent.addExtra(stem)}}}function createAdditionalBeams(elems,asc,beam,isGrace,dy){for(var beams=[],auxBeams=[],i=0;i<elems.length;i++){var elem=elems[i];if(!elem.abcelem.rest){var furthestHead=elem.heads[asc?0:elem.heads.length-1],x=furthestHead.x+(asc?furthestHead.w:0),bary=getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,x),sy=asc?-1.5:1.5;isGrace&&(sy=2*sy/3);var duration=elem.abcelem.duration;0===duration&&(duration=.25);for(var durlog=getDurlog(duration);durlog<-3;durlog++)auxBeams[-4-durlog]?auxBeams[-4-durlog].single=!1:auxBeams[-4-durlog]={x:x+(asc?-.6:0),y:bary+sy*(-4-durlog+1),durlog:durlog,single:!0};for(var j=auxBeams.length-1;j>=0;j--)if(i===elems.length-1||getDurlog(elems[i+1].abcelem.duration)>-j-4){var auxBeamEndX=x,auxBeamEndY=bary+sy*(j+1);auxBeams[j].single&&(auxBeamEndX=0===i?x+5:x-5,auxBeamEndY=getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,auxBeamEndX)+sy*(j+1)),beams.push({startX:auxBeams[j].x,endX:auxBeamEndX,startY:auxBeams[j].y,endY:auxBeamEndY,dy:dy}),auxBeams=auxBeams.slice(0,j)}}}return beams}BeamElem=function(stemHeight,type,flat){this.isflat=flat,this.isgrace=type&&"grace"===type,this.forceup=this.isgrace||type&&"up"===type,this.forcedown=type&&"down"===type,this.elems=[],this.total=0,this.allrests=!0,this.stemHeight=stemHeight,this.beams=[]},BeamElem.prototype.setHint=function(){this.hint=!0},BeamElem.prototype.add=function(abselem){var pitch=abselem.abcelem.averagepitch;void 0!==pitch&&(this.allrests=this.allrests&&abselem.abcelem.rest,abselem.beam=this,this.elems.push(abselem),this.total+=pitch,(!this.min||abselem.abcelem.minpitch<this.min)&&(this.min=abselem.abcelem.minpitch),(!this.max||abselem.abcelem.maxpitch>this.max)&&(this.max=abselem.abcelem.maxpitch))};BeamElem.prototype.calcDir=function(){return!!this.forceup||!this.forcedown&&calcAverage(this.total,this.elems.length)<6},BeamElem.prototype.layout=function(){if(0!==this.elems.length&&!this.allrests){this.stemsUp=this.calcDir();var dy=calcDy(this.stemsUp,this.isgrace),firstElement=this.elems[0],lastElement=this.elems[this.elems.length-1],minStemHeight=0,referencePitch=this.stemsUp?firstElement.abcelem.maxpitch:firstElement.abcelem.minpitch;minStemHeight=minStem(firstElement,this.stemsUp,referencePitch,minStemHeight),minStemHeight=minStem(lastElement,this.stemsUp,referencePitch,minStemHeight),minStemHeight=Math.max(this.stemHeight,minStemHeight+3);var yPos=calcYPos(this.total,this.elems.length,minStemHeight,this.stemsUp,firstElement.abcelem.averagepitch,lastElement.abcelem.averagepitch,this.isflat,this.min,this.max,this.isgrace),xPos=calcXPos(this.stemsUp,firstElement,lastElement);this.beams.push({startX:xPos[0],endX:xPos[1],startY:yPos[0],endY:yPos[1],dy:dy});for(var beams=createAdditionalBeams(this.elems,this.stemsUp,this.beams[0],this.isgrace,dy),i=0;i<beams.length;i++)this.beams.push(beams[i]);createStems(this.elems,this.stemsUp,this.beams[0],dy,this.mainNote)}},BeamElem.prototype.isAbove=function(){return this.stemsUp},BeamElem.prototype.heightAtMidpoint=function(startX,endX){if(0===this.beams.length)return 0;var beam=this.beams[0],midPoint=startX+(endX-startX)/2;return getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,midPoint)},BeamElem.prototype.yAtNote=function(element){var beam=this.beams[0];return getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,element.x)},BeamElem.prototype.xAtMidpoint=function(startX,endX){return startX+(endX-startX)/2},BeamElem.prototype.draw=function(renderer){if(0!==this.beams.length){renderer.beginGroup();for(var i=0;i<this.beams.length;i++){var beam=this.beams[i];drawBeam(renderer,beam.startX,beam.startY,beam.endX,beam.endY,beam.dy,this.hint)}renderer.endGroup("beam-elem")}}}(),module.exports=BeamElem},{"./abc_absolute_element":12,"./abc_relative_element":25,"./abc_spacing":27}],15:[function(require,module,exports){var BraceElem=function(){this.length=1};BraceElem.prototype.increaseStavesIncluded=function(){this.length++},BraceElem.prototype.setLocation=function(x){this.x=x},BraceElem.prototype.getWidth=function(){return 10},BraceElem.prototype.layout=function(renderer,top,bottom){this.startY=top,this.endY=bottom},BraceElem.prototype.draw=function(renderer,top,bottom){this.layout(renderer,top,bottom),renderer.drawBrace(this.x,this.startY,this.endY)},module.exports=BraceElem},{}],16:[function(require,module,exports){var createClef,AbsoluteElement=require("./abc_absolute_element"),glyphs=require("./abc_glyphs"),RelativeElement=require("./abc_relative_element");!function(){"use strict";createClef=function(elem,tuneNumber){var clef,octave=0,abselem=new AbsoluteElement(elem,0,10,"staff-extra",tuneNumber);switch(elem.type){case"treble":clef="clefs.G";break;case"tenor":case"alto":clef="clefs.C";break;case"bass":clef="clefs.F";break;case"treble+8":clef="clefs.G",octave=1;break;case"tenor+8":clef="clefs.C",octave=1;break;case"bass+8":clef="clefs.F",octave=1;break;case"alto+8":clef="clefs.C",octave=1;break;case"treble-8":clef="clefs.G",octave=-1;break;case"tenor-8":clef="clefs.C",octave=-1;break;case"bass-8":clef="clefs.F",octave=-1;break;case"alto-8":clef="clefs.C",octave=-1;break;case"none":return null;case"perc":clef="clefs.perc";break;default:abselem.addChild(new RelativeElement("clef="+elem.type,0,0,void 0,{type:"debug"}))}if(clef&&(abselem.addRight(new RelativeElement(clef,5,glyphs.getSymbolWidth(clef),elem.clefPos)),"clefs.G"===clef?(abselem.top=13,abselem.bottom=-1):(abselem.top=10,abselem.bottom=2),0!==octave)){var adjustspacing=(glyphs.getSymbolWidth(clef)-glyphs.getSymbolWidth("8")*(2/3))/2;abselem.addRight(new RelativeElement("8",5+adjustspacing,glyphs.getSymbolWidth("8")*(2/3),octave>0?abselem.top+3:abselem.bottom-1,{scalex:2/3,scaley:2/3})),abselem.top+=2}return abselem}}(),module.exports=createClef},{"./abc_absolute_element":12,"./abc_glyphs":24,"./abc_relative_element":25}],17:[function(require,module,exports){var createKeySignature,AbsoluteElement=require("./abc_absolute_element"),glyphs=require("./abc_glyphs"),RelativeElement=require("./abc_relative_element"),parseCommon=require("../parse/abc_common");!function(){"use strict";createKeySignature=function(elem,tuneNumber){if(!elem.accidentals||0===elem.accidentals.length)return null;var abselem=new AbsoluteElement(elem,0,10,"staff-extra",tuneNumber),dx=0;return parseCommon.each(elem.accidentals,function(acc){var symbol="sharp"===acc.acc?"accidentals.sharp":"natural"===acc.acc?"accidentals.nat":"accidentals.flat";abselem.addRight(new RelativeElement(symbol,dx,glyphs.getSymbolWidth(symbol),acc.verticalPos,{thickness:glyphs.symbolHeightInPitches(symbol)})),dx+=glyphs.getSymbolWidth(symbol)+2},this),abselem}}(),module.exports=createKeySignature},{"../parse/abc_common":5,"./abc_absolute_element":12,"./abc_glyphs":24,"./abc_relative_element":25}],18:[function(require,module,exports){var createTimeSignature,AbsoluteElement=require("./abc_absolute_element"),glyphs=require("./abc_glyphs"),RelativeElement=require("./abc_relative_element");!function(){"use strict";createTimeSignature=function(elem,tuneNumber){var abselem=new AbsoluteElement(elem,0,10,"staff-extra",tuneNumber);if("specified"===elem.type)for(var i=0;i<elem.value.length;i++)0!==i&&abselem.addRight(new RelativeElement("+",20*i-9,glyphs.getSymbolWidth("+"),6,{thickness:glyphs.symbolHeightInPitches("+")})),elem.value[i].den?(abselem.addRight(new RelativeElement(elem.value[i].num,20*i,glyphs.getSymbolWidth(elem.value[i].num.charAt(0))*elem.value[i].num.length,8,{thickness:glyphs.symbolHeightInPitches(elem.value[i].num.charAt(0))})),abselem.addRight(new RelativeElement(elem.value[i].den,20*i,glyphs.getSymbolWidth(elem.value[i].den.charAt(0))*elem.value[i].den.length,4,{thickness:glyphs.symbolHeightInPitches(elem.value[i].den.charAt(0))}))):abselem.addRight(new RelativeElement(elem.value[i].num,20*i,glyphs.getSymbolWidth(elem.value[i].num.charAt(0))*elem.value[i].num.length,6,{thickness:glyphs.symbolHeightInPitches(elem.value[i].num.charAt(0))}));else"common_time"===elem.type?abselem.addRight(new RelativeElement("timesig.common",0,glyphs.getSymbolWidth("timesig.common"),6,{thickness:glyphs.symbolHeightInPitches("timesig.common")})):"cut_time"===elem.type&&abselem.addRight(new RelativeElement("timesig.cut",0,glyphs.getSymbolWidth("timesig.cut"),6,{thickness:glyphs.symbolHeightInPitches("timesig.cut")}));return abselem}}(),module.exports=createTimeSignature},{"./abc_absolute_element":12,"./abc_glyphs":24,"./abc_relative_element":25}],19:[function(require,module,exports){var sprintf=require("./sprintf"),CrescendoElem=function(anchor1,anchor2,dir,positioning){this.anchor1=anchor1,this.anchor2=anchor2,this.dir=dir,"above"===positioning?this.dynamicHeightAbove=4:this.dynamicHeightBelow=4,this.pitch=void 0};CrescendoElem.prototype.setUpperAndLowerElements=function(positionY){this.dynamicHeightAbove?this.pitch=positionY.dynamicHeightAbove:this.pitch=positionY.dynamicHeightBelow},CrescendoElem.prototype.draw=function(renderer){void 0===this.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var y=renderer.calcY(this.pitch)+4;"<"===this.dir?(this.drawLine(renderer,y+4,y),this.drawLine(renderer,y+4,y+8)):(this.drawLine(renderer,y,y+4),this.drawLine(renderer,y+8,y+4))},CrescendoElem.prototype.drawLine=function(renderer,y1,y2){var left=this.anchor1?this.anchor1.x:0,right=this.anchor2?this.anchor2.x:800,pathString=sprintf("M %f %f L %f %f",left,y1,right,y2);renderer.printPath({path:pathString,stroke:"#000000",class:renderer.addClasses("decoration")})},module.exports=CrescendoElem},{"./sprintf":33}],20:[function(require,module,exports){var Decoration,DynamicDecoration=require("./abc_dynamic_decoration"),CrescendoElem=require("./abc_crescendo_element"),glyphs=require("./abc_glyphs"),RelativeElement=require("./abc_relative_element"),TieElem=require("./abc_tie_element");!function(){"use strict";Decoration=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0};var closeDecoration=function(voice,decoration,pitch,width,abselem,roomtaken,dir,minPitch){for(var yPos,i=0;i<decoration.length;i++){if("staccato"===decoration[i]||"tenuto"===decoration[i]||"accent"===decoration[i]){var symbol="scripts."+decoration[i];if("accent"===decoration[i]&&(symbol="scripts.sforzato"),yPos=void 0===yPos?"down"===dir?pitch+2:minPitch-2:"down"===dir?yPos+2:yPos-2,"accent"===decoration[i])"up"===dir?yPos--:yPos++;else switch(yPos){case 2:case 4:case 6:case 8:case 10:"up"===dir?yPos--:yPos++}pitch>9&&yPos++;var deltaX=width/2;"center"!==glyphs.getSymbolAlign(symbol)&&(deltaX-=glyphs.getSymbolWidth(symbol)/2),abselem.addChild(new RelativeElement(symbol,deltaX,glyphs.getSymbolWidth(symbol),yPos))}if("slide"===decoration[i]&&abselem.heads[0]){var yPos2=abselem.heads[0].pitch;yPos2-=2;var blank1=new RelativeElement("",-roomtaken-15,0,yPos2-1),blank2=new RelativeElement("",-roomtaken-5,0,yPos2+1);abselem.addChild(blank1),abselem.addChild(blank2),voice.addOther(new TieElem(blank1,blank2,!1,!1,!1))}}return void 0===yPos&&(yPos=pitch),{above:yPos,below:abselem.bottom}},volumeDecoration=function(voice,decoration,abselem,positioning){for(var i=0;i<decoration.length;i++)switch(decoration[i]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var elem=new DynamicDecoration(abselem,decoration[i],positioning);voice.addOther(elem)}},compoundDecoration=function(decoration,pitch,width,abselem,dir){function highestPitch(){if(0===abselem.heads.length)return 10;for(var pitch=abselem.heads[0].pitch,i=1;i<abselem.heads.length;i++)pitch=Math.max(pitch,abselem.heads[i].pitch);return pitch}function lowestPitch(){if(0===abselem.heads.length)return 2;for(var pitch=abselem.heads[0].pitch,i=1;i<abselem.heads.length;i++)pitch=Math.min(pitch,abselem.heads[i].pitch);return pitch}function compoundDecoration(symbol,count){var placement="down"===dir?lowestPitch()+1:highestPitch()+9;"down"!==dir&&1===count&&placement--;var deltaX=width/2;deltaX+="down"===dir?-5:3;for(var i=0;i<count;i++)placement-=1,abselem.addChild(new RelativeElement(symbol,deltaX,glyphs.getSymbolWidth(symbol),placement))}for(var i=0;i<decoration.length;i++)switch(decoration[i]){case"/":compoundDecoration("flags.ugrace",1);break;case"//":compoundDecoration("flags.ugrace",2);break;case"///":compoundDecoration("flags.ugrace",3);break;case"////":compoundDecoration("flags.ugrace",4)}},stackedDecoration=function(decoration,width,abselem,yPos,positioning,minTop,minBottom){function incrementPlacement(placement,height){"above"===placement?yPos.above+=height:yPos.below-=height}function getPlacement(placement){var y;return"above"===placement?(y=yPos.above)<minTop&&(y=minTop):(y=yPos.below)>minBottom&&(y=minBottom),y}function textDecoration(text,placement){var y=getPlacement(placement);abselem.addChild(new RelativeElement(text,width/2,0,y+2,{type:"decoration",klass:"ornament",thickness:3})),incrementPlacement(placement,5)}function symbolDecoration(symbol,placement){var deltaX=width/2;"center"!==glyphs.getSymbolAlign(symbol)&&(deltaX-=glyphs.getSymbolWidth(symbol)/2);var height=glyphs.symbolHeightInPitches(symbol)+1,y=getPlacement(placement);y="above"===placement?y+height/2:y-height/2,abselem.addChild(new RelativeElement(symbol,deltaX,glyphs.getSymbolWidth(symbol),y,{klass:"ornament",thickness:glyphs.symbolHeightInPitches(symbol)})),incrementPlacement(placement,height)}for(var symbolList={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},hasOne=!1,i=0;i<decoration.length;i++)switch(decoration[i]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":textDecoration(decoration[i],positioning),hasOne=!0;break;case"fine":textDecoration("FINE",positioning),hasOne=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":symbolDecoration(symbolList[decoration[i]],positioning),hasOne=!0;break;case"invertedfermata":symbolDecoration(symbolList[decoration[i]],"below"),hasOne=!0;break;case"mark":abselem.klass="mark"}return hasOne};Decoration.prototype.dynamicDecoration=function(voice,decoration,abselem,positioning){for(var diminuendo,crescendo,i=0;i<decoration.length;i++)switch(decoration[i]){case"diminuendo(":this.startDiminuendoX=abselem,diminuendo=void 0;break;case"diminuendo)":diminuendo={start:this.startDiminuendoX,stop:abselem},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=abselem,crescendo=void 0;break;case"crescendo)":crescendo={start:this.startCrescendoX,stop:abselem},this.startCrescendoX=void 0}diminuendo&&voice.addOther(new CrescendoElem(diminuendo.start,diminuendo.stop,">",positioning)),crescendo&&voice.addOther(new CrescendoElem(crescendo.start,crescendo.stop,"<",positioning))},Decoration.prototype.createDecoration=function(voice,decoration,pitch,width,abselem,roomtaken,dir,minPitch,positioning,hasVocals){positioning||(positioning={ornamentPosition:"above",volumePosition:hasVocals?"above":"below",dynamicPosition:hasVocals?"above":"below"}),volumeDecoration(voice,decoration,abselem,positioning.volumePosition),this.dynamicDecoration(voice,decoration,abselem,positioning.dynamicPosition),compoundDecoration(decoration,0,width,abselem,dir);var yPos=closeDecoration(voice,decoration,pitch,width,abselem,roomtaken,dir,minPitch);yPos.above=Math.max(yPos.above,this.minTop);stackedDecoration(decoration,width,abselem,yPos,positioning.ornamentPosition,this.minTop,this.minBottom)}}(),module.exports=Decoration},{"./abc_crescendo_element":19,"./abc_dynamic_decoration":21,"./abc_glyphs":24,"./abc_relative_element":25,"./abc_tie_element":30}],21:[function(require,module,exports){var DynamicDecoration=(require("./abc_spacing"),function(anchor,dec,position){this.anchor=anchor,this.dec=dec,"below"===position?this.volumeHeightBelow=5:this.volumeHeightAbove=5,this.pitch=void 0});DynamicDecoration.prototype.setUpperAndLowerElements=function(positionY){this.volumeHeightAbove?this.pitch=positionY.volumeHeightAbove:this.pitch=positionY.volumeHeightBelow},DynamicDecoration.prototype.draw=function(renderer,linestartx,lineendx){void 0===this.pitch&&window.console.error("Dynamic Element y-coordinate not set.");renderer.printSymbol(this.anchor.x,this.pitch,this.dec,1,1,renderer.addClasses("decoration"))},module.exports=DynamicDecoration},{"./abc_spacing":27}],22:[function(require,module,exports){var sprintf=require("./sprintf"),EndingElem=function(text,anchor1,anchor2){this.text=text,this.anchor1=anchor1,this.anchor2=anchor2,this.endingHeightAbove=5,this.pitch=void 0};EndingElem.prototype.setUpperAndLowerElements=function(positionY){this.pitch=positionY.endingHeightAbove},EndingElem.prototype.draw=function(renderer,linestartx,lineendx){void 0===this.pitch&&window.console.error("Ending Element y-coordinate not set.");var pathString,y=renderer.calcY(this.pitch);this.anchor1&&(linestartx=this.anchor1.x+this.anchor1.w,pathString=sprintf("M %f %f L %f %f",linestartx,y,linestartx,y+20),renderer.printPath({path:pathString,stroke:"#000000",fill:"#000000",class:renderer.addClasses("ending")}),renderer.renderText(linestartx+5,renderer.calcY(this.pitch-.5),this.text,"repeatfont","ending","start")),this.anchor2&&(lineendx=this.anchor2.x,pathString=sprintf("M %f %f L %f %f",lineendx,y,lineendx,y+20),renderer.printPath({path:pathString,stroke:"#000000",fill:"#000000",class:renderer.addClasses("ending")})),pathString=sprintf("M %f %f L %f %f",linestartx,y,lineendx,y),renderer.printPath({path:pathString,stroke:"#000000",fill:"#000000",class:renderer.addClasses("ending")})},module.exports=EndingElem},{"./sprintf":33}],23:[function(require,module,exports){function calcHorizontalSpacing(isLastLine,stretchLast,targetWidth,lineWidth,spacing,spacingUnits,minSpace){if(isLastLine&&lineWidth/targetWidth<.66&&!stretchLast)return null;if(Math.abs(targetWidth-lineWidth)<2)return null;var relSpace=spacingUnits*spacing,constSpace=lineWidth-relSpace;return spacingUnits>0?(spacing=(targetWidth-constSpace)/spacingUnits,spacing*minSpace>50&&(spacing=50/minSpace),spacing):null}function centerWholeRests(voices){for(var i=0;i<voices.length;i++)for(var voice=voices[i],j=1;j<voice.children.length-1;j++){var absElem=voice.children[j];if(absElem.abcelem.rest&&"whole"===absElem.abcelem.rest.type){var before=voice.children[j-1],after=voice.children[j+1],midpoint=(after.x-before.x)/2+before.x;absElem.x=midpoint-absElem.w/2;for(var k=0;k<absElem.children.length;k++)absElem.children[k].x=absElem.x}}}var spacing=require("./abc_spacing"),AbstractEngraver=require("./abc_abstract_engraver"),Renderer=require("./abc_renderer"),Raphael=require("raphael"),EngraverController=function(paper,params){params=params||{},paper||(paper=Raphael(params.elementId,params.staffwidth,params.staffheight)),this.space=3*spacing.SPACE,this.scale=params.scale||void 0,params.staffwidth?(this.staffwidthScreen=params.staffwidth,this.staffwidthPrint=params.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.editable=params.editable||!1,this.listeners=[],params.listener&&this.addSelectListener(params.listener),this.usingSvg=!(!window.SVGAngle&&!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")),this.usingSvg&&params.add_classes&&(Raphael._availableAttrs.class=""),Raphael._availableAttrs["text-decoration"]="",Raphael._availableAttrs["data-vertical"]="",this.renderer=new Renderer(paper,params.regression),this.renderer.setPaddingOverride(params),this.renderer.controller=this,this.reset()};EngraverController.prototype.reset=function(){this.selected=[],this.ingroup=!1,this.staffgroups=[],this.lastStaffGroupIndex=-1,this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset()},EngraverController.prototype.engraveABC=function(abctunes){void 0===abctunes[0]&&(abctunes=[abctunes]),this.reset();for(var i=0;i<abctunes.length;i++)this.engraveTune(abctunes[i],i);if(this.renderer.doRegression)return this.renderer.regressionLines.join("\n")},EngraverController.prototype.adjustNonScaledItems=function(scale){this.width/=scale,this.renderer.adjustNonScaledItems(scale)},EngraverController.prototype.engraveTune=function(abctune,tuneNumber){this.renderer.lineNumber=null,abctune.formatting.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},this.renderer.abctune=abctune,this.renderer.setVerticalSpace(abctune.formatting),this.renderer.measureNumber=null,this.renderer.setPrintMode("print"===abctune.media);var scale=abctune.formatting.scale?abctune.formatting.scale:this.scale;void 0===scale&&(scale=this.renderer.isPrint?.75:1),this.renderer.setPadding(abctune),this.engraver=new AbstractEngraver(abctune.formatting.bagpipes,this.renderer,tuneNumber),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.renderer.engraver=this.engraver,abctune.formatting.staffwidth?this.width=1.33*abctune.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen,this.adjustNonScaledItems(scale);var i,abcLine,hasPrintedTempo=!1;for(i=0;i<abctune.lines.length;i++)abcLine=abctune.lines[i],abcLine.staff&&(abcLine.staffGroup=this.engraver.createABCLine(abcLine.staff,hasPrintedTempo?null:abctune.metaText.tempo),hasPrintedTempo=!0);var maxWidth=this.width;for(i=0;i<abctune.lines.length;i++)abcLine=abctune.lines[i],abcLine.staff&&(this.setXSpacing(abcLine.staffGroup,abctune.formatting,i===abctune.lines.length-1),abcLine.staffGroup.w>maxWidth&&(maxWidth=abcLine.staffGroup.w));for(i=0;i<abctune.lines.length;i++)if(abcLine=abctune.lines[i],abcLine.staffGroup&&abcLine.staffGroup.voices){for(var j=0;j<abcLine.staffGroup.voices.length;j++)abcLine.staffGroup.voices[j].layoutBeams();abcLine.staffGroup.setUpperAndLowerElements(this.renderer)}for(i=0;i<abctune.lines.length;i++)abcLine=abctune.lines[i],abcLine.staffGroup&&(abcLine.staffGroup.height=abcLine.staffGroup.calcHeight());this.renderer.topMargin(abctune),this.renderer.engraveTopText(this.width,abctune),this.renderer.addMusicPadding(),this.staffgroups=[],this.lastStaffGroupIndex=-1;for(var line=0;line<abctune.lines.length;line++)this.renderer.lineNumber=line,abcLine=abctune.lines[line],abcLine.staff?this.engraveStaffLine(abcLine.staffGroup):abcLine.subtitle&&0!==line?this.renderer.outputSubtitle(this.width,abcLine.subtitle):void 0!==abcLine.text&&this.renderer.outputFreeText(abcLine.text);this.renderer.moveY(24),this.renderer.engraveExtraText(this.width,abctune),this.renderer.setPaperSize(maxWidth,scale)},EngraverController.prototype.setXSpacing=function(staffGroup,formatting,isLastLine){for(var newspace=this.space,it=0;it<3;it++){staffGroup.layout(newspace,this.renderer,!1);if(null===(newspace=calcHorizontalSpacing(isLastLine,!!formatting.stretchlast&&formatting.stretchlast,this.width+this.renderer.padding.left,staffGroup.w,newspace,staffGroup.spacingunits,staffGroup.minspace)))break}centerWholeRests(staffGroup.voices)},EngraverController.prototype.engraveStaffLine=function(staffGroup){this.lastStaffGroupIndex>-1&&this.renderer.addStaffPadding(this.staffgroups[this.lastStaffGroupIndex],staffGroup),this.renderer.voiceNumber=null,staffGroup.draw(this.renderer);var height=staffGroup.height*spacing.STEP;this.staffgroups[this.staffgroups.length]=staffGroup,this.lastStaffGroupIndex=this.staffgroups.length-1,this.renderer.y+=height},EngraverController.prototype.notifySelect=function(abselem,tuneNumber){this.clearSelection(),abselem.highlight&&(this.selected=[abselem],abselem.highlight());for(var abcelem=abselem.abcelem||{},i=0;i<this.listeners.length;i++)this.listeners[i].highlight&&this.listeners[i].highlight(abcelem,tuneNumber)},EngraverController.prototype.notifyChange=function(){for(var i=0;i<this.listeners.length;i++)this.listeners[i].modelChanged&&this.listeners[i].modelChanged()},EngraverController.prototype.clearSelection=function(){for(var i=0;i<this.selected.length;i++)this.selected[i].unhighlight();this.selected=[]},EngraverController.prototype.addSelectListener=function(listener){this.listeners[this.listeners.length]=listener},EngraverController.prototype.rangeHighlight=function(start,end){this.clearSelection();for(var line=0;line<this.staffgroups.length;line++)for(var voices=this.staffgroups[line].voices,voice=0;voice<voices.length;voice++)for(var elems=voices[voice].children,elem=0;elem<elems.length;elem++){var elStart=elems[elem].abcelem.startChar,elEnd=elems[elem].abcelem.endChar;(end>elStart&&start<elEnd||end===start&&end===elEnd)&&(this.selected[this.selected.length]=elems[elem],elems[elem].highlight())}},module.exports=EngraverController},{"./abc_abstract_engraver":13,"./abc_renderer":26,"./abc_spacing":27,raphael:4}],24:[function(require,module,exports){var spacing=require("./abc_spacing")
  ;Glyphs=function(){"use strict";var glyphs={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.33,-.03,4.89],["c",-.06,2.67,-.09,5.01,-.09,5.22],["l",0,.36],["l",.15,-.15],["c",.36,-.3,.75,-.51,1.2,-.63],["c",.33,-.09,.96,-.09,1.26,-.03],["c",.27,.09,.63,.27,.87,.45],["l",.21,.15],["l",0,-.27],["c",0,-.15,-.03,-2.43,-.09,-5.1],["c",-.09,-4.56,-.09,-4.86,-.03,-4.89],["c",.15,-.12,.39,-.15,.72,-.15],["c",.3,0,.54,.03,.69,.15],["c",.06,.03,.06,.33,-.03,4.95],["c",-.06,2.7,-.09,5.04,-.09,5.22],["l",.03,.3],["l",.21,-.15],["c",.69,-.48,1.44,-.69,2.28,-.69],["c",.51,0,.78,.03,1.2,.21],["c",1.32,.63,2.01,2.28,1.53,3.69],["c",-.21,.57,-.51,1.02,-1.05,1.56],["c",-.42,.42,-.81,.72,-1.92,1.5],["c",-1.26,.87,-1.5,1.08,-1.86,1.5],["c",-.39,.45,-.54,.54,-.81,.51],["c",-.18,0,-.21,0,-.33,-.06],["l",-.21,-.21],["l",-.06,-.12],["l",-.03,-.99],["c",-.03,-.54,-.03,-1.29,-.06,-1.68],["l",0,-.69],["l",-.21,.24],["c",-.36,.42,-.75,.75,-1.8,1.62],["c",-1.02,.84,-1.2,.99,-1.44,1.38],["c",-.36,.51,-.54,.6,-.9,.51],["c",-.15,-.03,-.39,-.27,-.42,-.42],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",2.52,10.98],["c",-.18,-.09,-.48,-.12,-.66,-.06],["c",-.39,.15,-.69,.54,-.84,1.14],["c",-.06,.24,-.06,.39,-.09,1.74],["c",-.03,1.44,0,2.73,.06,3.18],["l",.03,.15],["l",.27,-.27],["c",.93,-.96,1.5,-1.95,1.74,-3.06],["c",.06,-.27,.06,-.39,.06,-.96],["c",0,-.54,0,-.69,-.06,-.93],["c",-.09,-.51,-.27,-.81,-.51,-.93],["z"],["m",5.43,0],["c",-.18,-.09,-.51,-.12,-.72,-.06],["c",-.54,.12,-.96,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.9],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.36,-.3],["c",.42,-.36,1.02,-.96,1.29,-1.29],["c",.36,-.45,.66,-.99,.81,-1.41],["c",.42,-1.23,.15,-2.76,-.6,-3.12],["z"]],w:11.613,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{
  d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{
  d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:9.99,h:14.97},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.32,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};glyphs["noteheads.slash.whole"]={d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},glyphs["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},glyphs["noteheads.harmonic.quarter"]={d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},this.printSymbol=function(x,y,symb,paper,klass){if(!glyphs[symb])return null;var pathArray=this.pathClone(glyphs[symb].d);return pathArray[0][1]+=x,pathArray[0][2]+=y,paper.path().attr({path:pathArray,stroke:"none",fill:"#000000",class:klass})},this.getPathForSymbol=function(x,y,symb,scalex,scaley){if(scalex=scalex||1,scaley=scaley||1,!glyphs[symb])return null;var pathArray=this.pathClone(glyphs[symb].d);return 1===scalex&&1===scaley||this.pathScale(pathArray,scalex,scaley),pathArray[0][1]+=x,pathArray[0][2]+=y,pathArray},this.getSymbolWidth=function(symbol){return glyphs[symbol]?glyphs[symbol].w:0},this.getSymbolHeight=function(symbol){return glyphs[symbol]?glyphs[symbol].h:0},this.symbolHeightInPitches=function(symbol){return this.getSymbolHeight(symbol)/spacing.STEP},this.getSymbolAlign=function(symbol){return"scripts"===symbol.substring(0,7)&&"scripts.roll"!==symbol?"center":"left"},this.pathClone=function(pathArray){for(var res=[],i=0,ii=pathArray.length;i<ii;i++){res[i]=[];for(var j=0,jj=pathArray[i].length;j<jj;j++)res[i][j]=pathArray[i][j]}return res},this.pathScale=function(pathArray,kx,ky){for(var i=0,ii=pathArray.length;i<ii;i++){var j,jj,p=pathArray[i];for(j=1,jj=p.length;j<jj;j++)p[j]*=j%2?kx:ky}},this.getYCorr=function(symbol){switch(symbol){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}}},module.exports=new Glyphs},{"./abc_spacing":27}],25:[function(require,module,exports){var RelativeElement=(require("./abc_glyphs"),function(c,dx,w,pitch,opt){opt=opt||{},this.x=0,this.c=c,this.dx=dx,this.w=w,this.pitch=pitch,this.scalex=opt.scalex||1,this.scaley=opt.scaley||1,this.type=opt.type||"symbol",this.pitch2=opt.pitch2,this.linewidth=opt.linewidth,this.klass=opt.klass,this.top=pitch,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=pitch,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),opt.thickness&&(this.top+=opt.thickness/2,this.bottom-=opt.thickness/2),opt.stemHeight&&(opt.stemHeight>0?this.top+=opt.stemHeight:this.bottom+=opt.stemHeight);var height=opt.height?opt.height:4;switch(this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=height;break;case"lyric":opt.position&&"below"===opt.position?this.lyricHeightBelow=height:this.lyricHeightAbove=height;break;case"chord":opt.position&&"below"===opt.position?this.chordHeightBelow=height:this.chordHeightAbove=height;break;case"text":void 0===this.pitch?opt.position&&"below"===opt.position?this.chordHeightBelow=height:this.chordHeightAbove=height:this.centerVertically=!0;break;case"part":this.partHeightAbove=height}});RelativeElement.prototype.setX=function(x){this.x=x+this.dx},RelativeElement.prototype.draw=function(renderer,bartop){void 0===this.pitch&&window.console.error(this.type+" Relative Element y-coordinate not set.");var y=renderer.calcY(this.pitch);switch(this.type){case"symbol":if(null===this.c)return null;var klass="symbol";this.klass&&(klass+=" "+this.klass),this.graphelem=renderer.printSymbol(this.x,this.pitch,this.c,this.scalex,this.scaley,renderer.addClasses(klass));break;case"debug":this.graphelem=renderer.renderText(this.x,renderer.calcY(15),""+this.c,"debugfont","debug-msg","start");break;case"barNumber":this.graphelem=renderer.renderText(this.x,y,""+this.c,"measurefont","bar-number","middle");break;case"lyric":this.graphelem=renderer.renderText(this.x,y,this.c,"vocalfont","abc-lyric","middle");break;case"chord":this.graphelem=renderer.renderText(this.x,y,this.c,"gchordfont","chord","middle");break;case"decoration":this.graphelem=renderer.renderText(this.x,y,this.c,"annotationfont","annotation","middle",!0);break;case"text":this.graphelem=renderer.renderText(this.x,y,this.c,"annotationfont","annotation","start",this.centerVertically);break;case"part":this.graphelem=renderer.renderText(this.x,y,this.c,"partsfont","part","start");break;case"bar":this.graphelem=renderer.printStem(this.x,this.linewidth,y,bartop||renderer.calcY(this.pitch2));break;case"stem":this.graphelem=renderer.printStem(this.x,this.linewidth,y,renderer.calcY(this.pitch2));break;case"ledger":this.graphelem=renderer.printStaveLine(this.x,this.x+this.w,this.pitch)}return 1!==this.scalex&&this.graphelem&&this.graphelem.scale(this.scalex,this.scaley,this.x,y),this.graphelem},module.exports=RelativeElement},{"./abc_glyphs":24}],26:[function(require,module,exports){function kernSymbols(lastSymbol,thisSymbol,lastSymbolWidth){var width=lastSymbolWidth;return"f"===lastSymbol&&"f"===thisSymbol&&(width=2*width/3),"p"===lastSymbol&&"p"===thisSymbol&&(width=5*width/6),"f"===lastSymbol&&"z"===thisSymbol&&(width=5*width/8),width}var glyphs=require("./abc_glyphs"),spacing=require("./abc_spacing"),sprintf=require("./sprintf"),Renderer=function(paper,doRegression){this.paper=paper,this.controller=null,this.space=3*spacing.SPACE,this.padding={},this.doRegression=doRegression,this.doRegression&&(this.regressionLines=[]),this.reset()};Renderer.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.lastM=null,this.ingroup=!1,this.path=null,this.isPrint=!1,this.initVerticalSpace(),this.doRegression&&(this.regressionLines=[])},Renderer.prototype.setPrintMode=function(isPrint){this.isPrint=isPrint},Renderer.prototype.setPaperSize=function(maxwidth,scale){var w=(maxwidth+this.padding.right)*scale,h=(this.y+this.padding.bottom)*scale;this.isPrint&&(h=Math.max(h,1056)),this.doRegression&&this.regressionLines.push("PAPER SIZE: ("+w+","+h+")"),this.paper.setSize(w/scale,h/scale);this.paper.canvas.parentNode.setAttribute("style","width:"+w+"px"),1!==scale?(this.paper.canvas.style.transform="scale("+scale+","+scale+")",this.paper.canvas.style["-ms-transform"]="scale("+scale+","+scale+")",this.paper.canvas.style["-webkit-transform"]="scale("+scale+","+scale+")",this.paper.canvas.style["transform-origin"]="0 0",this.paper.canvas.style["-ms-transform-origin-x"]="0",this.paper.canvas.style["-ms-transform-origin-y"]="0",this.paper.canvas.style["-webkit-transform-origin-x"]="0",this.paper.canvas.style["-webkit-transform-origin-y"]="0"):(this.paper.canvas.style.transform="",this.paper.canvas.style["-ms-transform"]="",this.paper.canvas.style["-webkit-transform"]=""),this.paper.canvas.parentNode.style.overflow="hidden",this.paper.canvas.parentNode.style.height=h+"px"},Renderer.prototype.setPaddingOverride=function(params){this.paddingOverride={top:params.paddingtop,bottom:params.paddingbottom,right:params.paddingright,left:params.paddingleft}},Renderer.prototype.setPadding=function(abctune){function setPaddingVariable(self,paddingKey,formattingKey,printDefault,screenDefault){void 0!==abctune.formatting[formattingKey]?self.padding[paddingKey]=abctune.formatting[formattingKey]:void 0!==self.paddingOverride[paddingKey]?self.padding[paddingKey]=self.paddingOverride[paddingKey]:self.isPrint?self.padding[paddingKey]=printDefault:self.padding[paddingKey]=screenDefault}setPaddingVariable(this,"top","topmargin",38,15),setPaddingVariable(this,"bottom","botmargin",38,15),setPaddingVariable(this,"left","leftmargin",68,15),setPaddingVariable(this,"right","rightmargin",68,15)},Renderer.prototype.adjustNonScaledItems=function(scale){this.padding.top/=scale,
  this.padding.bottom/=scale,this.padding.left/=scale,this.padding.right/=scale,this.abctune.formatting.headerfont.size/=scale,this.abctune.formatting.footerfont.size/=scale},Renderer.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:30.67,words:0}},Renderer.prototype.setVerticalSpace=function(formatting){void 0!==formatting.staffsep&&(this.spacing.staffSeparation=4*formatting.staffsep/3),void 0!==formatting.composerspace&&(this.spacing.composer=4*formatting.composerspace/3),void 0!==formatting.partsspace&&(this.spacing.parts=4*formatting.partsspace/3),void 0!==formatting.textspace&&(this.spacing.text=4*formatting.textspace/3),void 0!==formatting.musicspace&&(this.spacing.music=4*formatting.musicspace/3),void 0!==formatting.titlespace&&(this.spacing.title=4*formatting.titlespace/3),void 0!==formatting.sysstaffsep&&(this.spacing.systemStaffSeparation=4*formatting.sysstaffsep/3),void 0!==formatting.subtitlespace&&(this.spacing.subtitle=4*formatting.subtitlespace/3),void 0!==formatting.topspace&&(this.spacing.top=4*formatting.topspace/3),void 0!==formatting.vocalspace&&(this.spacing.vocal=4*formatting.vocalspace/3),void 0!==formatting.wordsspace&&(this.spacing.words=4*formatting.wordsspace/3)},Renderer.prototype.topMargin=function(abctune){this.moveY(this.padding.top)},Renderer.prototype.addMusicPadding=function(){this.moveY(this.spacing.music)},Renderer.prototype.addStaffPadding=function(lastStaffGroup,thisStaffGroup){var lastStaff=lastStaffGroup.staffs[lastStaffGroup.staffs.length-1],lastBottomLine=-(lastStaff.bottom-2),nextTopLine=thisStaffGroup.staffs[0].top-10,naturalSeparation=nextTopLine+lastBottomLine,separationInPixels=naturalSeparation*spacing.STEP;separationInPixels<this.spacing.staffSeparation&&this.moveY(this.spacing.staffSeparation-separationInPixels)},Renderer.prototype.engraveTopText=function(width,abctune){if(abctune.metaText.header&&this.isPrint){var headerTextHeight=this.getTextSize("XXXX","headerfont","header meta-top").height;this.y-=headerTextHeight,this.outputTextIf(this.padding.left,abctune.metaText.header.left,"headerfont","header meta-top",0,null,"start"),this.outputTextIf(this.padding.left+width/2,abctune.metaText.header.center,"headerfont","header meta-top",0,null,"middle"),this.outputTextIf(this.padding.left+width,abctune.metaText.header.right,"headerfont","header meta-top",0,null,"end"),this.y+=headerTextHeight}if(this.isPrint&&this.moveY(this.spacing.top),this.outputTextIf(this.padding.left+width/2,abctune.metaText.title,"titlefont","title meta-top",this.spacing.title,0,"middle"),abctune.lines[0]&&this.outputTextIf(this.padding.left+width/2,abctune.lines[0].subtitle,"subtitlefont","text meta-top",this.spacing.subtitle,0,"middle"),abctune.metaText.rhythm||abctune.metaText.origin||abctune.metaText.composer){this.moveY(this.spacing.composer);var rSpace=this.outputTextIf(this.padding.left,abctune.metaText.rhythm,"infofont","meta-top",0,null,"start"),composerLine="";if(abctune.metaText.composer&&(composerLine+=abctune.metaText.composer),abctune.metaText.origin&&(composerLine+=" ("+abctune.metaText.origin+")"),composerLine.length>0){var space=this.outputTextIf(this.padding.left+width,composerLine,"composerfont","meta-top",0,null,"end");this.moveY(space[1])}else this.moveY(rSpace[1]);this.moveY(-6)}this.outputTextIf(this.padding.left+width,abctune.metaText.author,"composerfont","meta-top",0,0,"end"),this.outputTextIf(this.padding.left,abctune.metaText.partOrder,"partsfont","meta-bottom",0,0,"start")},Renderer.prototype.engraveExtraText=function(width,abctune){this.lineNumber=null,this.measureNumber=null,this.voiceNumber=null;var extraText;if(abctune.metaText.unalignedWords){extraText="";for(var j=0;j<abctune.metaText.unalignedWords.length;j++)if("string"==typeof abctune.metaText.unalignedWords[j])extraText+=abctune.metaText.unalignedWords[j]+"\n";else{for(var k=0;k<abctune.metaText.unalignedWords[j].length;k++)extraText+=" FONT "+abctune.metaText.unalignedWords[j][k].text;extraText+="\n"}this.outputTextIf(this.padding.left+spacing.INDENT,extraText,"wordsfont","meta-bottom",this.spacing.words,2,"start")}extraText="",abctune.metaText.book&&(extraText+="Book: "+abctune.metaText.book+"\n"),abctune.metaText.source&&(extraText+="Source: "+abctune.metaText.source+"\n"),abctune.metaText.discography&&(extraText+="Discography: "+abctune.metaText.discography+"\n"),abctune.metaText.notes&&(extraText+="Notes: "+abctune.metaText.notes+"\n"),abctune.metaText.transcription&&(extraText+="Transcription: "+abctune.metaText.transcription+"\n"),abctune.metaText.history&&(extraText+="History: "+abctune.metaText.history+"\n"),abctune.metaText["abc-copyright"]&&(extraText+="Copyright: "+abctune.metaText["abc-copyright"]+"\n"),abctune.metaText["abc-creator"]&&(extraText+="Creator: "+abctune.metaText["abc-creator"]+"\n"),abctune.metaText["abc-edited-by"]&&(extraText+="Edited By: "+abctune.metaText["abc-edited-by"]+"\n"),this.outputTextIf(this.padding.left,extraText,"historyfont","meta-bottom",this.spacing.info,0,"start"),abctune.metaText.footer&&this.isPrint&&(this.outputTextIf(this.padding.left,abctune.metaText.footer.left,"footerfont","header meta-bottom",0,null,"start"),this.outputTextIf(this.padding.left+width/2,abctune.metaText.footer.center,"footerfont","header meta-bottom",0,null,"middle"),this.outputTextIf(this.padding.left+width,abctune.metaText.footer.right,"footerfont","header meta-bottom",0,null,"end"))},Renderer.prototype.outputFreeText=function(text){if(""===text){var hash=this.getFontAndAttr("textfont","defined-text");this.moveY(2*hash.attr["font-size"])}else if("string"==typeof text)this.outputTextIf(this.padding.left,text,"textfont","defined-text",0,1,"start");else{for(var str="",isCentered=!1,i=0;i<text.length;i++)text[i].font&&(str+="FONT("+text[i].font+")"),str+=text[i].text,text[i].center&&(isCentered=!0);var alignment=isCentered?"middle":"start",x=isCentered?this.controller.width/2:this.padding.left;this.outputTextIf(x,str,"textfont","defined-text",0,1,alignment)}},Renderer.prototype.outputSubtitle=function(width,subtitle){this.outputTextIf(this.padding.left+width/2,subtitle,"subtitlefont","text meta-top",this.spacing.subtitle,0,"middle")},Renderer.prototype.beginGroup=function(){this.path=[],this.lastM=[0,0],this.ingroup=!0},Renderer.prototype.addPath=function(path){if(path=path||[],0!==path.length){path[0][0]="m",path[0][1]-=this.lastM[0],path[0][2]-=this.lastM[1],this.lastM[0]+=path[0][1],this.lastM[1]+=path[0][2],this.path.push(path[0]);for(var i=1,ii=path.length;i<ii;i++)"m"===path[i][0]&&(this.lastM[0]+=path[i][1],this.lastM[1]+=path[i][2]),this.path.push(path[i])}},Renderer.prototype.endGroup=function(klass){if(this.ingroup=!1,0===this.path.length)return null;var ret=this.paper.path().attr({path:this.path,stroke:"none",fill:"#000000",class:this.addClasses(klass)});return this.path=[],this.doRegression&&this.addToRegression(ret),ret},Renderer.prototype.printStaveLine=function(x1,x2,pitch,klass){var extraClass="staff";void 0!==klass&&(extraClass+=" "+klass);var dy=.35,fill="#000000",y=this.calcY(pitch),pathString=sprintf("M %f %f L %f %f L %f %f L %f %f z",x1,y-dy,x2,y-dy,x2,y+dy,x1,y+dy),ret=this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses(extraClass)}).toBack();return this.doRegression&&this.addToRegression(ret),ret},Renderer.prototype.printStem=function(x,dx,y1,y2){if(dx<0){var tmp=y2;y2=y1,y1=tmp}var fill="#000000";~~x===x&&(x+=.05);var pathArray=[["M",x,y1],["L",x,y2],["L",x+dx,y2],["L",x+dx,y1],["z"]];if(!this.ingroup){var ret=this.paper.path().attr({path:pathArray,stroke:"none",fill:fill,class:this.addClasses("stem")}).toBack();return this.doRegression&&this.addToRegression(ret),ret}this.addPath(pathArray)},Renderer.prototype.printSymbol=function(x,offset,symbol,scalex,scaley,klass){var el,ycorr;if(!symbol)return null;if(symbol.length>0&&symbol.indexOf(".")<0){for(var elemset=this.paper.set(),dx=0,i=0;i<symbol.length;i++){var s=symbol.charAt(i);ycorr=glyphs.getYCorr(s),el=glyphs.printSymbol(x+dx,this.calcY(offset+ycorr),s,this.paper,klass),el?(this.doRegression&&this.addToRegression(el),elemset.push(el),i<symbol.length-1&&(dx+=kernSymbols(s,symbol.charAt(i+1),glyphs.getSymbolWidth(s)))):this.renderText(x,this.y,"no symbol:"+symbol,"debugfont","debug-msg","start")}return elemset}if(ycorr=glyphs.getYCorr(symbol),this.ingroup)this.addPath(glyphs.getPathForSymbol(x,this.calcY(offset+ycorr),symbol,scalex,scaley));else{if(el=glyphs.printSymbol(x,this.calcY(offset+ycorr),symbol,this.paper,klass))return this.doRegression&&this.addToRegression(el),el;this.renderText(x,this.y,"no symbol:"+symbol,"debugfont","debug-msg","start")}return null},Renderer.prototype.printPath=function(attrs){var ret=this.paper.path().attr(attrs);return this.doRegression&&this.addToRegression(ret),ret},Renderer.prototype.drawBrace=function(xLeft,yTop,yBottom){var yHeight=yBottom-yTop,xCurve=[7.5,-8,21,0,18.5,-10.5,7.5],yCurve=[0,yHeight/5.5,yHeight/3.14,yHeight/2,yHeight/2.93,yHeight/4.88,0],pathString=sprintf("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",xLeft+xCurve[0],yTop+yCurve[0],xLeft+xCurve[1],yTop+yCurve[1],xLeft+xCurve[2],yTop+yCurve[2],xLeft+xCurve[3],yTop+yCurve[3],xLeft+xCurve[4],yTop+yCurve[4],xLeft+xCurve[5],yTop+yCurve[5],xLeft+xCurve[6],yTop+yCurve[6]),ret1=this.paper.path().attr({path:pathString,stroke:"#000000",fill:"#000000",class:this.addClasses("brace")});xCurve=[0,17.5,-7.5,6.6,-5,20,0],yCurve=[yHeight/2,yHeight/1.46,yHeight/1.22,yHeight,yHeight/1.19,yHeight/1.42,yHeight/2],pathString=sprintf("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",xLeft+xCurve[0],yTop+yCurve[0],xLeft+xCurve[1],yTop+yCurve[1],xLeft+xCurve[2],yTop+yCurve[2],xLeft+xCurve[3],yTop+yCurve[3],xLeft+xCurve[4],yTop+yCurve[4],xLeft+xCurve[5],yTop+yCurve[5],xLeft+xCurve[6],yTop+yCurve[6]);var ret2=this.paper.path().attr({path:pathString,stroke:"#000000",fill:"#000000",class:this.addClasses("brace")});return this.doRegression&&(this.addToRegression(ret1),this.addToRegression(ret2)),ret1+ret2},Renderer.prototype.drawArc=function(x1,x2,pitch1,pitch2,above,klass,isTie){var spacing=isTie?1.2:1.5;x1+=6,x2+=4,pitch1+=above?spacing:-spacing,pitch2+=above?spacing:-spacing;var y1=this.calcY(pitch1),y2=this.calcY(pitch2),dx=x2-x1,dy=y2-y1,norm=Math.sqrt(dx*dx+dy*dy),ux=dx/norm,uy=dy/norm,flatten=norm/3.5,maxFlatten=isTie?10:25,curve=(above?-1:1)*Math.min(maxFlatten,Math.max(4,flatten)),controlx1=x1+flatten*ux-curve*uy,controly1=y1+flatten*uy+curve*ux,controlx2=x2-flatten*ux-curve*uy,controly2=y2-flatten*uy+curve*ux,pathString=sprintf("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",x1,y1,controlx1,controly1,controlx2,controly2,x2,y2,controlx2-2*uy,controly2+2*ux,controlx1-2*uy,controly1+2*ux,x1,y1);klass?klass+=" slur":klass="slur";var ret=this.paper.path().attr({path:pathString,stroke:"none",fill:"#000000",class:this.addClasses(klass)});return this.doRegression&&this.addToRegression(ret),ret},Renderer.prototype.calcY=function(ofs){return this.y-ofs*spacing.STEP},Renderer.prototype.printStave=function(startx,endx,numLines){var klass="top-line";if(1===numLines)return void this.printStaveLine(startx,endx,6,klass);for(var i=numLines-1;i>=0;i--)this.printStaveLine(startx,endx,2*(i+1),klass),klass=void 0},Renderer.prototype.addClasses=function(c){var ret=[];return c.length>0&&ret.push(c),null!==this.lineNumber&&ret.push("l"+this.lineNumber),null!==this.measureNumber&&ret.push("m"+this.measureNumber),null!==this.voiceNumber&&ret.push("v"+this.voiceNumber),ret.join(" ")},Renderer.prototype.getFontAndAttr=function(type,klass){var font=this.abctune.formatting[type];font=font?{face:font.face,size:4*font.size/3,decoration:font.decoration,style:font.style,weight:font.weight,box:font.box}:{face:"Arial",size:16,decoration:"underline",style:"normal",weight:"normal"};var attr={"font-size":font.size,"font-style":font.style,"font-family":font.face,"font-weight":font.weight,"text-decoration":font.decoration,class:this.addClasses(klass)};return attr.font="",{font:font,attr:attr}},Renderer.prototype.getTextSize=function(text,type,klass){var hash=this.getFontAndAttr(type,klass),el=this.paper.text(0,0,text).attr(hash.attr),size=el.getBBox();return isNaN(size.height)&&(size={width:0,height:0}),el.remove(),size},Renderer.prototype.renderText=function(x,y,text,type,klass,anchor,centerVertically){var hash=this.getFontAndAttr(type,klass);anchor&&(hash.attr["text-anchor"]=anchor),text=text.replace(/\n\n/g,"\n \n");var el=this.paper.text(x,y,text).attr(hash.attr);if(!centerVertically){var size=el.getBBox();isNaN(size.height)?el.attr({y:y}):(el.attr({y:y+size.height/2}),hash.font.box&&this.paper.rect(size.x-1,size.y+size.height/2-1,size.width+2,size.height+2).attr({stroke:"#888888"}))}return"debugfont"===type&&(console.log("Debug msg: "+text),el.attr({stroke:"#ff0000"})),this.doRegression&&this.addToRegression(el),el},Renderer.prototype.moveY=function(em,numLines){void 0===numLines&&(numLines=1),this.y+=em*numLines},Renderer.prototype.skipSpaceY=function(){this.y+=this.space},Renderer.prototype.outputTextIf=function(x,str,kind,klass,marginTop,marginBottom,alignment){if(str){marginTop&&this.moveY(marginTop);var el=this.renderText(x,this.y,str,kind,klass,alignment),bb=el.getBBox(),width=isNaN(bb.width)?0:bb.width,height=isNaN(bb.height)?0:bb.height;if(null!==marginBottom){var numLines=str.split("\n").length;isNaN(bb.height)||this.moveY(height/numLines,numLines+marginBottom)}return[width,height]}return[0,0]},Renderer.prototype.addInvisibleMarker=function(className){var y=this.y;y=Math.round(y);var pathString=sprintf("M %f %f L %f %f L %f %f L %f %f z",0,y-.35,100,y-.35,100,y+.35,0,y+.35);this.paper.path().attr({path:pathString,stroke:"none",fill:"rgba(0,0,0,0)",class:this.addClasses(className),"data-vertical":y}).toBack()},Renderer.prototype.printHorizontalLine=function(width,vertical,comment){var dy=.35,fill="rgba(0,0,255,.4)",y=this.y;vertical&&(y=vertical),y=Math.round(y),this.paper.text(10,y,""+Math.round(y)).attr({"text-anchor":"start","font-size":"18px",fill:fill,stroke:fill});var x2=width,pathString=sprintf("M %f %f L %f %f L %f %f L %f %f z",50,y-dy,50+x2,y-dy,x2,y+dy,50,y+dy);this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses("staff")}).toBack();for(var i=1;i<width/100;i++)pathString=sprintf("M %f %f L %f %f L %f %f L %f %f z",100*i-dy,y-5,100*i-dy,y+5,100*i+dy,y-5,100*i+dy,y+5),this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses("staff")}).toBack();comment&&this.paper.text(width+70,y,comment).attr({"text-anchor":"start","font-size":"18px",fill:fill,stroke:fill})},Renderer.prototype.printShadedBox=function(x,y,width,height,color,comment){var box=this.paper.rect(x,y,width,height).attr({fill:color,stroke:color});return comment&&this.paper.text(0,y+7,comment).attr({"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),box},Renderer.prototype.printVerticalLine=function(x,y1,y2){var pathString=sprintf("M %f %f L %f %f L %f %f L %f %f z",x-.35,y1,x-.35,y2,x+.35,y1,x+.35,y2);this.paper.path().attr({path:pathString,stroke:"none",fill:"#00aaaa",class:this.addClasses("staff")}).toBack(),pathString=sprintf("M %f %f L %f %f L %f %f L %f %f z",x-20,y1,x-20,y1+3,x,y1,x,y1+3),this.paper.path().attr({path:pathString,stroke:"none",fill:"#00aaaa",class:this.addClasses("staff")}).toBack(),pathString=sprintf("M %f %f L %f %f L %f %f L %f %f z",x+20,y2,x+20,y2+3,x,y2,x,y2+3),this.paper.path().attr({path:pathString,stroke:"none",fill:"#00aaaa",class:this.addClasses("staff")}).toBack()},Renderer.prototype.addToRegression=function(el){var box=el.getBBox(),str=el.type+" "+box.toString()+" ",attrs=[];for(var key in el.attrs)el.attrs.hasOwnProperty(key)&&("class"===key?str=el.attrs[key]+" "+str:attrs.push(key+": "+el.attrs[key]));attrs.sort(),str+="{ "+attrs.join(" ")+" }",this.regressionLines.push(str)},module.exports=Renderer},{"./abc_glyphs":24,"./abc_spacing":27,"./sprintf":33}],27:[function(require,module,exports){var spacing={};spacing.FONTEM=360,spacing.FONTSIZE=30,spacing.STEP=93*spacing.FONTSIZE/720,spacing.SPACE=10,spacing.TOPNOTE=15,spacing.STAVEHEIGHT=100,spacing.INDENT=50,module.exports=spacing},{}],28:[function(require,module,exports){var spacing=require("./abc_spacing"),StaffGroupElement=function(){this.voices=[],this.staffs=[],this.brace=void 0};StaffGroupElement.prototype.setLimit=function(member,voice){voice.specialY[member]&&(voice.staff.specialY[member]?voice.staff.specialY[member]=Math.max(voice.staff.specialY[member],voice.specialY[member]):voice.staff.specialY[member]=voice.specialY[member])},StaffGroupElement.prototype.addVoice=function(voice,staffnumber,stafflines){var voiceNum=this.voices.length;this.voices[voiceNum]=voice,this.staffs[staffnumber]?this.staffs[staffnumber].voices.push(voiceNum):this.staffs[this.staffs.length]={top:10,bottom:2,lines:stafflines,voices:[voiceNum],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},voice.staff=this.staffs[staffnumber]},StaffGroupElement.prototype.setStaffLimits=function(voice){voice.staff.top=Math.max(voice.staff.top,voice.top),voice.staff.bottom=Math.min(voice.staff.bottom,voice.bottom),this.setLimit("tempoHeightAbove",voice),this.setLimit("partHeightAbove",voice),this.setLimit("volumeHeightAbove",voice),this.setLimit("dynamicHeightAbove",voice),this.setLimit("endingHeightAbove",voice),this.setLimit("chordHeightAbove",voice),this.setLimit("lyricHeightAbove",voice),this.setLimit("lyricHeightBelow",voice),this.setLimit("chordHeightBelow",voice),this.setLimit("volumeHeightBelow",voice),this.setLimit("dynamicHeightBelow",voice)},StaffGroupElement.prototype.setUpperAndLowerElements=function(renderer){for(var lastStaffBottom,i=0;i<this.staffs.length;i++){var staff=this.staffs[i],positionY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};staff.specialY.lyricHeightAbove&&(staff.top+=staff.specialY.lyricHeightAbove,positionY.lyricHeightAbove=staff.top),staff.specialY.chordHeightAbove&&(staff.top+=staff.specialY.chordHeightAbove,positionY.chordHeightAbove=staff.top),staff.specialY.endingHeightAbove&&(staff.specialY.chordHeightAbove?staff.top+=2:staff.top+=staff.specialY.endingHeightAbove,positionY.endingHeightAbove=staff.top),staff.specialY.dynamicHeightAbove&&staff.specialY.volumeHeightAbove?(staff.top+=Math.max(staff.specialY.dynamicHeightAbove,staff.specialY.volumeHeightAbove),positionY.dynamicHeightAbove=staff.top,positionY.volumeHeightAbove=staff.top):staff.specialY.dynamicHeightAbove?(staff.top+=staff.specialY.dynamicHeightAbove,positionY.dynamicHeightAbove=staff.top):staff.specialY.volumeHeightAbove&&(staff.top+=staff.specialY.volumeHeightAbove,positionY.volumeHeightAbove=staff.top),staff.specialY.partHeightAbove&&(staff.top+=staff.specialY.partHeightAbove,positionY.partHeightAbove=staff.top),staff.specialY.tempoHeightAbove&&(staff.top+=staff.specialY.tempoHeightAbove,positionY.tempoHeightAbove=staff.top),staff.specialY.lyricHeightBelow&&(positionY.lyricHeightBelow=staff.bottom,staff.bottom-=staff.specialY.lyricHeightBelow),staff.specialY.chordHeightBelow&&(positionY.chordHeightBelow=staff.bottom,staff.bottom-=staff.specialY.chordHeightBelow),staff.specialY.volumeHeightBelow&&staff.specialY.dynamicHeightBelow?(positionY.volumeHeightBelow=staff.bottom,positionY.dynamicHeightBelow=staff.bottom,staff.bottom-=Math.max(staff.specialY.volumeHeightBelow,staff.specialY.dynamicHeightBelow)):staff.specialY.volumeHeightBelow?(positionY.volumeHeightBelow=staff.bottom,staff.bottom-=staff.specialY.volumeHeightBelow):staff.specialY.dynamicHeightBelow&&(positionY.dynamicHeightBelow=staff.bottom,staff.bottom-=staff.specialY.dynamicHeightBelow);for(var j=0;j<staff.voices.length;j++){this.voices[staff.voices[j]].setUpperAndLowerElements(positionY)}if(void 0!==lastStaffBottom){var thisStaffTop=staff.top-10,forcedSpacingBetween=lastStaffBottom+thisStaffTop,minSpacingInPitches=renderer.spacing.systemStaffSeparation/spacing.STEP,addedSpace=minSpacingInPitches-forcedSpacingBetween;addedSpace>0&&(staff.top+=addedSpace)}lastStaffBottom=2-staff.bottom}},StaffGroupElement.prototype.finished=function(){for(var i=0;i<this.voices.length;i++)if(!this.voices[i].layoutEnded())return!1;return!0},StaffGroupElement.prototype.layout=function(spacing,renderer,debug){this.spacingunits=0,this.minspace=1e3;for(var x=renderer.padding.left,voiceheaderw=0,i=0;i<this.voices.length;i++)if(this.voices[i].header){var size=renderer.getTextSize(this.voices[i].header,"voicefont","");voiceheaderw=Math.max(voiceheaderw,size.width)}if(voiceheaderw){x=x+voiceheaderw+renderer.getTextSize("A","voicefont","").width}this.startx=x,this.brace&&(this.brace.setLocation(this.startx),x+=this.brace.getWidth(),this.startx=x);var currentduration=0;for(debug&&console.log("init layout"),i=0;i<this.voices.length;i++)this.voices[i].beginLayout(x);for(var spacingunit=0;!this.finished();){for(currentduration=null,i=0;i<this.voices.length;i++)this.voices[i].layoutEnded()||currentduration&&!(this.voices[i].getDurationIndex()<currentduration)||(currentduration=this.voices[i].getDurationIndex());debug&&console.log("currentduration: ",currentduration);var currentvoices=[],othervoices=[];for(i=0;i<this.voices.length;i++){this.voices[i].getDurationIndex()-currentduration>1e-7?othervoices.push(this.voices[i]):(currentvoices.push(this.voices[i]),debug&&console.log("in: voice ",i))}spacingunit=0;var spacingduration=0;for(i=0;i<currentvoices.length;i++)currentvoices[i].getNextX()>x&&(x=currentvoices[i].getNextX(),spacingunit=currentvoices[i].getSpacingUnits(),spacingduration=currentvoices[i].spacingduration);for(this.spacingunits+=spacingunit,this.minspace=Math.min(this.minspace,spacingunit),i=0;i<currentvoices.length;i++){var voicechildx=currentvoices[i].layoutOneItem(x,spacing),dx=voicechildx-x;if(dx>0){x=voicechildx;for(var j=0;j<i;j++)currentvoices[j].shiftRight(dx)}}for(i=0;i<othervoices.length;i++)othervoices[i].spacingduration-=spacingduration,othervoices[i].updateNextX(x,spacing);for(i=0;i<currentvoices.length;i++){currentvoices[i].updateIndices()}}for(i=0;i<this.voices.length;i++)this.voices[i].getNextX()>x&&(x=this.voices[i].getNextX(),spacingunit=this.voices[i].getSpacingUnits());for(this.spacingunits+=spacingunit,this.w=x,i=0;i<this.voices.length;i++)this.voices[i].w=this.w},StaffGroupElement.prototype.calcHeight=function(){for(var height=0,i=0;i<this.voices.length;i++){var staff=this.voices[i].staff;this.voices[i].duplicate||(height+=staff.top,staff.bottom<0&&(height+=-staff.bottom))}return height},StaffGroupElement.prototype.draw=function(renderer){renderer.addInvisibleMarker("abcjs-top-of-system");for(var startY=renderer.y,j=0;j<this.staffs.length;j++){var staff1=this.staffs[j];renderer.moveY(spacing.STEP,staff1.top),staff1.absoluteY=renderer.y,staff1.bottom<0&&renderer.moveY(spacing.STEP,-staff1.bottom)}var topLine,bottomLine,bartop=0;renderer.measureNumber=null;for(var i=0;i<this.voices.length;i++){var staff=this.voices[i].staff;renderer.y=staff.absoluteY,renderer.voiceNumber=i,this.voices[i].duplicate||(topLine||(topLine=renderer.calcY(10)),bottomLine=renderer.calcY(2),0!==staff.lines&&renderer.printStave(this.startx,this.w,staff.lines)),this.voices[i].draw(renderer,bartop),this.voices[i].duplicate||(bartop=renderer.calcY(2)),this.brace&&i===this.brace.length-1&&this.brace&&this.brace.draw(renderer,topLine,bottomLine)}renderer.measureNumber=null,this.staffs.length>1&&renderer.printStem(this.startx,.6,topLine,bottomLine),renderer.y=startY},module.exports=StaffGroupElement},{"./abc_spacing":27}],29:[function(require,module,exports){var TempoElement,AbsoluteElement=require("./abc_absolute_element"),RelativeElement=require("./abc_relative_element");!function(){"use strict";TempoElement=function(tempo,tuneNumber){this.tempo=tempo,this.tuneNumber=tuneNumber,this.tempoHeightAbove=5,this.pitch=void 0},TempoElement.prototype.setUpperAndLowerElements=function(positionY){this.pitch=positionY.tempoHeightAbove},TempoElement.prototype.setX=function(x){this.x=x},TempoElement.prototype.draw=function(renderer){var x=this.x;void 0===this.pitch&&window.console.error("Tempo Element y-coordinate not set.");var text,y=renderer.calcY(this.pitch);if(this.tempo.preString){text=renderer.renderText(x,y,this.tempo.preString,"tempofont","tempo","start");var preWidth=text.getBBox().width;x+=preWidth+preWidth/this.tempo.preString.length}if(this.tempo.duration){var dot,flag,note,tempopitch=this.pitch-5+1,duration=this.tempo.duration[0],abselem=new AbsoluteElement(this.tempo,duration,1,"tempo",this.tuneNumber);duration<=1/32?(note="noteheads.quarter",flag="flags.u32nd",dot=0):duration<=1/16?(note="noteheads.quarter",flag="flags.u16th",dot=0):duration<=3/32?(note="noteheads.quarter",flag="flags.u16nd",dot=1):duration<=1/8?(note="noteheads.quarter",flag="flags.u8th",dot=0):duration<=3/16?(note="noteheads.quarter",flag="flags.u8th",dot=1):duration<=.25?(note="noteheads.quarter",dot=0):duration<=3/8?(note="noteheads.quarter",dot=1):duration<=.5?(note="noteheads.half",dot=0):duration<=.75?(note="noteheads.half",dot=1):duration<=1?(note="noteheads.whole",dot=0):duration<=1.5?(note="noteheads.whole",dot=1):duration<=2?(note="noteheads.dbl",dot=0):(note="noteheads.dbl",dot=1);var temponote=renderer.engraver.createNoteHead(abselem,note,{verticalPos:tempopitch},"up",0,0,flag,dot,0,.75);abselem.addHead(temponote);var stem;if("noteheads.whole"!==note&&"noteheads.dbl"!==note){var p1=tempopitch+.25,p2=tempopitch+5.25,dx=temponote.dx+temponote.w;stem=new RelativeElement(null,dx,0,p1,{type:"stem",pitch2:p2,linewidth:-.6}),stem.setX(x),abselem.addExtra(stem)}abselem.setX(x);for(var i=0;i<abselem.children.length;i++)abselem.children[i].draw(renderer,x);x+=abselem.w+5;var str="= "+this.tempo.bpm;text=renderer.renderText(x,y,str,"tempofont","tempo","start");var postWidth=text.getBBox().width;x+=postWidth+postWidth/str.length}this.tempo.postString&&renderer.renderText(x,y,this.tempo.postString,"tempofont","tempo","start")}}(),module.exports=TempoElement},{"./abc_absolute_element":12,"./abc_relative_element":25}],30:[function(require,module,exports){var TieElem=function(anchor1,anchor2,above,forceandshift,isTie){this.anchor1=anchor1,this.anchor2=anchor2,this.above=above,this.force=forceandshift,this.isTie=isTie};TieElem.prototype.setEndAnchor=function(anchor2){this.anchor2=anchor2,this.isTie&&(this.anchor1&&(this.anchor1.isTie=!0),this.anchor2&&(this.anchor2.isTie=!0))},TieElem.prototype.setStartX=function(startLimitElem){this.startLimitX=startLimitElem},TieElem.prototype.setEndX=function(endLimitElem){this.endLimitX=endLimitElem},TieElem.prototype.setHint=function(){this.hint=!0},TieElem.prototype.setUpperAndLowerElements=function(positionY){},TieElem.prototype.layout=function(lineStartX,lineEndX){function getPitch(anchor,isAbove,isTie){return isTie?anchor.pitch:isAbove&&void 0!==anchor.highestVert?anchor.highestVert:anchor.pitch}!this.force&&this.anchor2&&this.anchor2.pitch===this.anchor2.highestVert&&(this.above=!0),this.isTie?(this.anchor1&&(this.anchor1.tieAbove=this.above),this.anchor2&&(this.anchor2.tieAbove=this.above)):this.anchor2&&this.anchor2.isTie?this.above=this.anchor2.tieAbove:this.anchor1&&this.anchor1.isTie&&(this.above=this.anchor1.tieAbove),this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.startX=lineStartX,this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=lineEndX,this.anchor1&&this.anchor2?(this.startY=getPitch(this.anchor1,this.above,this.isTie),this.endY=getPitch(this.anchor2,this.above,this.isTie)):this.anchor1?(this.startY=getPitch(this.anchor1,this.above,this.isTie),this.endY=getPitch(this.anchor1,this.above,this.isTie)):this.anchor2?(this.startY=getPitch(this.anchor2,this.above,this.isTie),this.endY=getPitch(this.anchor2,this.above,this.isTie)):(this.startY=this.above?14:0,this.endY=this.above?14:0)},TieElem.prototype.draw=function(renderer,linestartx,lineendx){this.layout(linestartx,lineendx);var klass;this.hint&&(klass="abcjs-hint"),renderer.drawArc(this.startX,this.endX,this.startY,this.endY,this.above,klass,this.isTie)},module.exports=TieElem},{}],31:[function(require,module,exports){var TripletElem,sprintf=require("./sprintf");!function(){"use strict";function drawLine(renderer,l,t,r,b){var pathString=sprintf("M %f %f L %f %f",l,t,r,b);renderer.printPath({path:pathString,stroke:"#000000",class:renderer.addClasses("triplet")})}function drawBracket(renderer,x1,y1,x2,y2){y1=renderer.calcY(y1),y2=renderer.calcY(y2);drawLine(renderer,x1,y1,x1,y1+5),drawLine(renderer,x2,y2,x2,y2+5);var midX=x1+(x2-x1)/2,slope=(y2-y1)/(x2-x1),leftEndX=midX-8;drawLine(renderer,x1,y1,leftEndX,y1+(leftEndX-x1)*slope);var rightStartX=midX+8;drawLine(renderer,rightStartX,y1+(rightStartX-x1)*slope,x2,y2)}TripletElem=function(number,anchor1){this.anchor1=anchor1,this.number=number},TripletElem.prototype.isClosed=function(){return this.anchor2},TripletElem.prototype.setCloseAnchor=function(anchor2){this.anchor2=anchor2,this.anchor1.parent.beam&&(this.endingHeightAbove=4)},TripletElem.prototype.setUpperAndLowerElements=function(){},TripletElem.prototype.layout=function(){if(this.anchor1&&this.anchor2)if(this.hasBeam=this.anchor1.parent.beam&&this.anchor1.parent.beam===this.anchor2.parent.beam,this.hasBeam){var beam=this.anchor1.parent.beam,left=beam.isAbove()?this.anchor1.x+this.anchor1.w:this.anchor1.x;this.yTextPos=beam.heightAtMidpoint(left,this.anchor2.x),this.yTextPos+=beam.isAbove()?4:-4,beam.isAbove()&&(this.endingHeightAbove=4)}else this.startNote=Math.max(this.anchor1.parent.top,9)+4,this.endNote=Math.max(this.anchor2.parent.top,9)+4,this.yTextPos=this.startNote+(this.endNote-this.startNote)/2},TripletElem.prototype.draw=function(renderer){var xTextPos;if(this.hasBeam){var left=this.anchor1.parent.beam.isAbove()?this.anchor1.x+this.anchor1.w:this.anchor1.x;xTextPos=this.anchor1.parent.beam.xAtMidpoint(left,this.anchor2.x)}else xTextPos=this.anchor1.x+(this.anchor2.x+this.anchor2.w-this.anchor1.x)/2,drawBracket(renderer,this.anchor1.x,this.startNote,this.anchor2.x+this.anchor2.w,this.endNote);renderer.renderText(xTextPos,renderer.calcY(this.yTextPos),""+this.number,"tripletfont","triplet","middle",!0)}}(),module.exports=TripletElem},{"./sprintf":33}],32:[function(require,module,exports){var parseCommon=require("../parse/abc_common"),VoiceElement=function(voicenumber,voicetotal){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=voicenumber,this.voicetotal=voicetotal,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};VoiceElement.prototype.addChild=function(child){if("bar"===child.type){for(var firstItem=!0,i=0;firstItem&&i<this.children.length;i++)"staff-extra"!==this.children[i].type&&(firstItem=!1);firstItem||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=child,this.setRange(child)},VoiceElement.prototype.setLimit=function(member,child){var specialY=child.specialY;specialY||(specialY=child),
  specialY[member]&&(this.specialY[member]?this.specialY[member]=Math.max(this.specialY[member],specialY[member]):this.specialY[member]=specialY[member])},VoiceElement.prototype.moveDecorations=function(beam){for(var ch=0;ch<beam.elems.length;ch++){var child=beam.elems[ch];if(child.top)for(var top=beam.yAtNote(child),i=0;i<child.children.length;i++){var el=child.children[i];if("ornament"===el.klass&&el.bottom-1.5<top){var distance=top-el.bottom+1.5;el.bottom+=distance,el.top+=distance,el.pitch+=distance,top=child.top=el.top}}}},VoiceElement.prototype.adjustRange=function(child){void 0!==child.bottom&&(this.bottom=Math.min(this.bottom,child.bottom)),void 0!==child.top&&(this.top=Math.max(this.top,child.top))},VoiceElement.prototype.setRange=function(child){this.adjustRange(child),this.setLimit("tempoHeightAbove",child),this.setLimit("partHeightAbove",child),this.setLimit("volumeHeightAbove",child),this.setLimit("dynamicHeightAbove",child),this.setLimit("endingHeightAbove",child),this.setLimit("chordHeightAbove",child),this.setLimit("lyricHeightAbove",child),this.setLimit("lyricHeightBelow",child),this.setLimit("chordHeightBelow",child),this.setLimit("volumeHeightBelow",child),this.setLimit("dynamicHeightBelow",child)},VoiceElement.prototype.setUpperAndLowerElements=function(positionY){var i;for(i=0;i<this.children.length;i++){var abselem=this.children[i];abselem.setUpperAndLowerElements(positionY)}for(i=0;i<this.otherchildren.length;i++){var abselem=this.otherchildren[i];"string"!=typeof abselem&&abselem.setUpperAndLowerElements(positionY)}},VoiceElement.prototype.addOther=function(child){this.otherchildren.push(child),this.setRange(child)},VoiceElement.prototype.addBeam=function(child){this.beams.push(child)},VoiceElement.prototype.updateIndices=function(){this.layoutEnded()||(this.durationindex+=this.children[this.i].duration,0===this.children[this.i].duration&&(this.durationindex=Math.round(64*this.durationindex)/64),this.i++)},VoiceElement.prototype.layoutEnded=function(){return this.i>=this.children.length},VoiceElement.prototype.getDurationIndex=function(){return this.durationindex-(this.children[this.i]&&this.children[this.i].duration>0?0:5e-7)},VoiceElement.prototype.getSpacingUnits=function(){return Math.sqrt(8*this.spacingduration)},VoiceElement.prototype.getNextX=function(){return Math.max(this.minx,this.nextx)},VoiceElement.prototype.beginLayout=function(startx){this.i=0,this.durationindex=0,this.startx=startx,this.minx=startx,this.nextx=startx,this.spacingduration=0},VoiceElement.prototype.layoutOneItem=function(x,spacing){var child=this.children[this.i];if(!child)return 0;var er=x-this.minx;return er<child.getExtraWidth()&&(x+=child.getExtraWidth()-er),child.setX(x),this.spacingduration=child.duration,this.minx=x+child.getMinWidth(),this.i!==this.children.length-1&&(this.minx+=child.minspacing),this.updateNextX(x,spacing),x},VoiceElement.prototype.updateNextX=function(x,spacing){this.nextx=x+spacing*Math.sqrt(8*this.spacingduration)},VoiceElement.prototype.shiftRight=function(dx){var child=this.children[this.i];child&&(child.setX(child.x+dx),this.minx+=dx,this.nextx+=dx)},VoiceElement.prototype.draw=function(renderer,bartop){var width=this.w-1;if(renderer.staffbottom=this.staff.bottom,renderer.measureNumber=null,this.header){var textpitch=14-(this.voicenumber+1)*(12/(this.voicetotal+1));renderer.renderText(renderer.padding.left,renderer.calcY(textpitch),this.header,"voicefont","staff-extra voice-name","start")}for(var i=0,ii=this.children.length;i<ii;i++){var child=this.children[i],justInitializedMeasureNumber=!1;"staff-extra"!==child.type&&null===renderer.measureNumber&&(renderer.measureNumber=0,justInitializedMeasureNumber=!0),child.draw(renderer,this.barto||i===ii-1?bartop:0),"bar"!==child.type||justInitializedMeasureNumber||renderer.measureNumber++}renderer.measureNumber=0,parseCommon.each(this.beams,function(beam){"bar"===beam?renderer.measureNumber++:beam.draw(renderer)}),renderer.measureNumber=0;var self=this;parseCommon.each(this.otherchildren,function(child){"bar"===child?renderer.measureNumber++:child.draw(renderer,self.startx+10,width)})},VoiceElement.prototype.layoutBeams=function(){for(var i=0;i<this.beams.length;i++)if(this.beams[i].layout){this.beams[i].layout(),this.moveDecorations(this.beams[i]);for(var j=0;j<this.beams[i].elems.length;j++)this.adjustRange(this.beams[i].elems[j])}for(i=0;i<this.otherchildren.length;i++){var child=this.otherchildren[i];child.layout&&child.layout()}this.staff.top=Math.max(this.staff.top,this.top),this.staff.bottom=Math.min(this.staff.bottom,this.bottom)},module.exports=VoiceElement},{"../parse/abc_common":5}],33:[function(require,module,exports){var sprintf=function(){for(var a,m,p,c,x,i=0,f=arguments[i++],o=[];f;){if(m=/^[^\x25]+/.exec(f))o.push(m[0]);else if(m=/^\x25{2}/.exec(f))o.push("%");else{if(!(m=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)))throw"Huh ?!";if(null==(a=arguments[m[1]||i++])||void 0==a)throw"Too few arguments.";if(/[^s]/.test(m[7])&&"number"!=typeof a)throw"Expecting number but found "+typeof a;switch(m[7]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a);break;case"e":a=m[6]?a.toExponential(m[6]):a.toExponential();break;case"f":a=m[6]?parseFloat(a).toFixed(m[6]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&m[6]?a.substring(0,m[6]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(m[7])&&m[2]&&a>0?"+"+a:a,c=m[3]?"0"==m[3]?"0":m[3].charAt(1):" ",x=m[5]-String(a).length,p=m[5]?str_repeat(c,x):"",o.push(m[4]?a+p:p+a)}f=f.substring(m[0].length)}return o.join("")};module.exports=sprintf},{}]},{},[3])(3)});