abcfajs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +128 -0
- package/README.md +104 -0
- package/dist/abcfajs.min.js +135 -0
- package/dist/index.cjs +133 -0
- package/dist/index.d.cts +66 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +79 -0
- package/package.json +62 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";var ABCJS=(()=>{var Kl=Object.create;var qt=Object.defineProperty;var $l=Object.getOwnPropertyDescriptor;var Ql=Object.getOwnPropertyNames;var Jl=Object.getPrototypeOf,Zl=Object.prototype.hasOwnProperty;var P=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),eh=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})},Qa=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ql(t))!Zl.call(e,a)&&a!==r&&qt(e,a,{get:()=>t[a],enumerable:!(i=$l(t,a))||i.enumerable});return e};var th=(e,t,r)=>(r=e!=null?Kl(Jl(e)):{},Qa(t||!e||!e.__esModule?qt(r,"default",{value:e,enumerable:!0}):r,e)),rh=e=>Qa(qt({},"__esModule",{value:!0}),e);var Za=P(($v,Ja)=>{"use strict";var ah="6.7.1";Ja.exports=ah});var Dt=P((Qv,ei)=>{"use strict";var ih=function(e,t){var r=this;t||(t={}),r.qpm=t.qpm?parseInt(t.qpm,10):null,r.extraMeasuresAtBeginning=t.extraMeasuresAtBeginning?parseInt(t.extraMeasuresAtBeginning,10):0,r.beatCallback=t.beatCallback,r.eventCallback=t.eventCallback,r.lineEndCallback=t.lineEndCallback,r.lineEndAnticipation=t.lineEndAnticipation?parseInt(t.lineEndAnticipation,10):0,r.beatSubdivisions=t.beatSubdivisions?parseInt(t.beatSubdivisions,10):1,r.beatSubdivisions||(r.beatSubdivisions=1),r.joggerTimer=null,r.replaceTarget=function(a){if(!t.qpm){var n=a.metaText?a.metaText.tempo:null;r.qpm=a.getBpm(n)}if(r.noteTimings=a.setTiming(r.qpm,r.extraMeasuresAtBeginning),a.noteTimings.length===0&&(r.noteTimings=a.setTiming(0,0)),r.lineEndCallback&&(r.lineEndTimings=nh(a.noteTimings,r.lineEndAnticipation)),r.startTime=null,r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.currentTime=0,r.isPaused=!1,r.isRunning=!1,r.pausedPercent=null,r.justUnpaused=!1,r.newSeekPercent=0,r.lastTimestamp=0,r.noteTimings.length!==0){r.millisecondsPerBeat=1e3/(r.qpm/60)/r.beatSubdivisions,r.lastMoment=r.noteTimings[r.noteTimings.length-1].milliseconds;var s=a.getMeter(),o="";if(s&&s.type==="specified"&&s.value&&s.value.length>0&&s.value[0].num.indexOf("+")>0&&(o=s.value[0].num),r.beatStarts=[],o){for(var c=r.noteTimings[r.noteTimings.length-1].millisecondsPerMeasure,h=r.lastMoment/c,d=o.split("+"),f=0;f<d.length;f++)d[f]=parseInt(d[f],10)/2;for(var l=0,u=0,p=0;p<h;p++)for(var g=p*c,v=0,m=0;m<d.length;m++){var y=d[m];if(r.beatSubdivisions===1)r.beatSubdivisions===1&&l<r.lastMoment&&r.beatStarts.push({b:u,ts:l}),l+=y*r.millisecondsPerBeat;else for(var k=y*r.beatSubdivisions,b=0;b<Math.floor(k);b++){var w=b/k,C=Math.round(g+v*r.millisecondsPerBeat);C<r.lastMoment&&r.beatStarts.push({b:u+w,ts:C}),v++}u++}r.beatStarts.push({b:h*d.length,ts:r.lastMoment}),r.totalBeats=r.beatStarts.length}else{r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat);for(var B=0;B<r.totalBeats+1;B++)r.beatStarts.push({b:B/r.beatSubdivisions,ts:Math.round(B*r.millisecondsPerBeat)})}}},r.replaceTarget(e),r.doTiming=function(a){if(r.lastTimestamp!==a&&(r.lastTimestamp=a,!r.isPaused&&r.isRunning)){for(r.startTime||(r.startTime=a),r.currentTime=a-r.startTime,r.currentTime+=16;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;){if(r.eventCallback&&r.noteTimings[r.currentEvent].type==="event"){var n=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),n!==r.startTime&&(r.currentTime=a-r.startTime)}r.currentEvent++}if(r.lineEndCallback&&r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds<r.currentTime&&r.currentEvent<r.noteTimings.length){var s=r.noteTimings[r.currentEvent].milliseconds===r.currentTime?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],s,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:r.currentTime}),r.currentLine++}if(r.currentTime<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat<r.beatStarts.length&&r.beatStarts[r.currentBeat].ts<=r.currentTime){var o=r.doBeatCallback(a);r.currentBeat++,o!==null&&(r.currentTime=o)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var c=r.doBeatCallback(a);r.currentBeat++,c!==null&&(r.currentTime=c),requestAnimationFrame(r.doTiming)}if(r.currentTime>=r.lastMoment)if(r.eventCallback){var h=r.eventCallback(null);r.shouldStop(h).then(function(d){d&&r.stop()})}else r.stop()}},r.shouldStop=function(a){return new Promise(function(n){if(!a)return n(!0);if(a==="continue")return n(!1);a.then&&a.then(function(s){n(s!=="continue")})})},r.doBeatCallback=function(a){if(r.beatCallback){for(var n=r.currentEvent;n<r.noteTimings.length&&r.noteTimings[n].left===null;)n++;var s,o;if(n<r.noteTimings.length){for(s=r.noteTimings[n].milliseconds,n=Math.max(0,r.currentEvent-1);n>=0&&r.noteTimings[n].left===null;)n--;o=r.noteTimings[n]}var c={},h={};if(o){c.top=o.top,c.height=o.height;var d=Math.max(0,a-r.startTime-o.milliseconds),f=s-o.milliseconds,l=o.endX-o.left,u=f?d*l/f:0;c.left=o.left+u,r.currentEvent===0&&o.milliseconds>a-r.startTime&&(c.left=void 0),h={timestamp:a,startTime:r.startTime,ev:o,endMs:s,offMs:d,offPx:u,gapMs:f,gapPx:l}}else h={timestamp:a,startTime:r.startTime};if(r.currentBeat<0||r.currentBeat>=r.beatStarts.length||!r.beatStarts[r.currentBeat]){var p={currentBeat:r.currentBeat,beatStartLength:r.beatStarts.length,totalBeats:r.totalBeats,startTime:r.startTime,currentTime:r.currentTime,lastMoment:r.lastMoment,lastTimestamp:r.lastTimestamp,qpm:r.qpm,millisecondsPerBeat:r.millisecondsPerBeat,beatSubdivisions:r.beatSubdivisions,currentEvent:r.currentEvent,currentLine:r.currentLine,isPaused:r.isPaused,isRunning:r.isRunning,pausedPercent:r.pausedPercent,justUnpaused:r.justUnpaused,newSeekPercent:r.newSeekPercent};setTimeout(function(){throw new Error("abcjs-timing-callback error: "+JSON.stringify(p))},1)}else{var g=r.startTime;if(r.beatCallback(r.beatStarts[r.currentBeat].b,r.totalBeats/r.beatSubdivisions,r.lastMoment,c,h),g!==r.startTime)return a-r.startTime}}return null};var i=60;r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,i))},r.start=function(a,n){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,a===void 0&&(r.justUnpaused=!0)),a)r.setProgress(a,n);else if(a===0)r.reset();else if(r.pausedPercent!==null){var s=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=s-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,i)},r.pause=function(){r.isPaused=!0;var a=performance.now();r.pausedPercent=(a-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(a,n){var s;switch(n){case"seconds":r.currentTime=a*1e3,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),s=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=a*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),s=r.currentTime/r.lastMoment;break;default:s=a,s<0&&(s=0),s>1&&(s=1),r.currentTime=r.lastMoment*s;break}r.isRunning||(r.pausedPercent=s);var o=performance.now();for(r.startTime=o-r.currentTime,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;)r.currentEvent++;if(r.lineEndCallback)for(r.currentLine=0;r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation<r.currentTime;)r.currentLine++;var c=r.currentBeat;for(r.currentBeat=0;r.currentBeat<r.beatStarts.length&&!(r.beatStarts[r.currentBeat].ts>r.currentTime);r.currentBeat++);r.currentBeat--,r.beatCallback&&c!==r.currentBeat&&(r.doBeatCallback(r.startTime+r.currentTime),r.currentBeat++),r.eventCallback&&r.currentEvent>=0&&r.noteTimings[r.currentEvent].type==="event"&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,i)}};function nh(e,t){for(var r=[],i=null,a=0;a<e.length;a++){var n=e[a];n.type!=="end"&&n.top!==i&&(r.push({measureNumber:n.measureNumber,milliseconds:n.milliseconds-t,top:n.top,bottom:n.top+n.height}),i=n.top)}return r}ei.exports=ih});var ri=P((Jv,ti)=>{"use strict";var sh=Dt(),It={};(function(){"use strict";var e,t;It.startAnimation=function(r,i,a){e&&(e.stop(),e=void 0),a.showCursor&&(t=r.querySelector(".abcjs-cursor"),t||(t=document.createElement("DIV"),t.className="abcjs-cursor cursor",t.style.position="absolute",r.appendChild(t),r.style.position="relative"));function n(l){for(var u=0;u<l.length;u++){var p=l[u];p.classList.contains("abcjs-bar")||(p.style.display="none")}}var s;function o(l){if(s){var u=r.querySelectorAll(s);n(u)}s=l}function c(l){var u=r.querySelectorAll(l);n(u)}function h(l){a.hideCurrentMeasure?c(l):a.hideFinishedMeasures&&o(l)}function d(l){return".abcjs-l"+l.line+".abcjs-m"+l.measureNumber}function f(l){if(l){if(l.measureStart){var u=d(l);u&&h(u)}t&&(t.style.left=l.left+"px",t.style.top=l.top+"px",t.style.width=l.width+"px",t.style.height=l.height+"px")}else e.stop(),e=void 0}e=new sh(i,{qpm:a.bpm,eventCallback:f}),e.start()},It.pauseAnimation=function(r){e&&(r?e.pause():e.start())},It.stopAnimation=function(){e&&(e.stop(),e=void 0)}})();ti.exports=It});var Qe=P((Zv,ai)=>{"use strict";var d0={};d0.cloneArray=function(e){for(var t=[],r=0;r<e.length;r++)t.push(Object.assign({},e[r]));return t};d0.cloneHashOfHash=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=Object.assign({},e[r]));return t};d0.cloneHashOfArrayOfHash=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=d0.cloneArray(e[r]));return t};d0.strip=function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")};d0.startsWith=function(e,t){return e.indexOf(t)===0};d0.endsWith=function(e,t){var r=e.length-t.length;return r>=0&&e.lastIndexOf(t)===r};d0.last=function(e){return e.length===0?null:e[e.length-1]};ai.exports=d0});var Ot=P((e6,ni)=>{"use strict";var ii=Qe(),A0={};(function(){"use strict";var e,t,r,i,a;A0.initialize=function(x,T,M,S,z){e=x,t=T,r=M,i=S,a=z,n()};function n(){r.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},i.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},i.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},i.formatting.annotationfont=r.annotationfont,i.formatting.gchordfont=r.gchordfont,i.formatting.historyfont=r.historyfont,i.formatting.infofont=r.infofont,i.formatting.measurefont=r.measurefont,i.formatting.partsfont=r.partsfont,i.formatting.repeatfont=r.repeatfont,i.formatting.textfont=r.textfont,i.formatting.tripletfont=r.tripletfont,i.formatting.vocalfont=r.vocalfont,i.formatting.wordsfont=r.wordsfont}var s={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},o=function(x){switch(x){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}},c=function(x,T,M,S,z){function ee(){var je=parseInt(x[0].token);return x.shift(),T?x.length===0?{face:T.face,weight:T.weight,style:T.style,decoration:T.decoration,size:je}:x.length===1&&x[0].token==="box"&&s[z]?{face:T.face,weight:T.weight,style:T.style,decoration:T.decoration,size:je,box:!0}:(t("Extra parameters in font definition.",M,S),{face:T.face,weight:T.weight,style:T.style,decoration:T.decoration,size:je}):(t("Can't set just the size of the font since there is no default value.",M,S),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:je})}if(x[0].token==="*"){if(x.shift(),x[0].type==="number")return ee();t("Expected font size number after *.",M,S)}if(x[0].type==="number")return ee();for(var V=[],ie,Xe="normal",Ue="normal",Be="none",Ce=!1,Ne="face",X=!1;x.length;){var ge=x.shift(),te=ge.token.toLowerCase();switch(Ne){case"face":X||te!=="utf"&&ge.type!=="number"&&te!=="bold"&&te!=="italic"&&te!=="underline"&&te!=="box"?V.length>0&&ge.token==="-"?(X=!0,V[V.length-1]=V[V.length-1]+ge.token):X?(X=!1,V[V.length-1]=V[V.length-1]+ge.token):V.push(ge.token):ge.type==="number"?(ie?t("Font size specified twice in font definition.",M,S):ie=ge.token,Ne="modifier"):te==="bold"?Xe="bold":te==="italic"?Ue="italic":te==="underline"?Be="underline":te==="box"?(s[z]?Ce=!0:t(`This font style doesn't support "box"`,M,S),Ne="finished"):te==="utf"?(ge=x.shift(),Ne="size"):t("Unknown parameter "+ge.token+" in font definition.",M,S);break;case"size":ge.type==="number"?ie?t("Font size specified twice in font definition.",M,S):ie=ge.token:t("Expected font size in font definition.",M,S),Ne="modifier";break;case"modifier":te==="bold"?Xe="bold":te==="italic"?Ue="italic":te==="underline"?Be="underline":te==="box"?(s[z]?Ce=!0:t(`This font style doesn't support "box"`,M,S),Ne="finished"):t("Unknown parameter "+ge.token+" in font definition.",M,S);break;case"finished":t('Extra characters found after "box" in font definition.',M,S);break}}ie===void 0?T?ie=T.size:(t("Must specify the size of the font since there is no default value.",M,S),ie=12):ie=parseFloat(ie),V=V.join(" "),V===""&&(T?V=T.face:(t("Must specify the name of the font since there is no default value.",M,S),V="sans-serif"));var ae=o(V),he={};return ae?(he.face=ae.face,he.weight=ae.weight,he.style=ae.style,he.decoration=ae.decoration,he.size=ie,Ce&&(he.box=!0),he):(he.face=V,he.weight=Xe,he.style=Ue,he.decoration=Be,he.size=ie,Ce&&(he.box=!0),he)},h=function(x,T,M){return T.length===0?'Directive "'+x+'" requires a font as a parameter.':(r[x]=c(T,r[x],M,0,x),r.is_in_header&&(i.formatting[x]=r[x]),null)},d=function(x,T,M){return T.length===0?'Directive "'+x+'" requires a font as a parameter.':(i.formatting[x]=c(T,i.formatting[x],M,0,x),null)},f=function(x,T){var M="";T.forEach(function(z){M+=z.token});var S=parseFloat(M);if(isNaN(S)||S===0)return'Directive "'+x+'" requires a number as a parameter.';i.formatting.scale=S},l=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],u=function(x){var T=x.split(/\s+/);if(T.length!==2&&T.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var M=T[0],S=parseInt(T[1],10);if((isNaN(S)||S<35||S>81)&&T[1]&&(S=l.indexOf(T[1].toLowerCase())+35),isNaN(S)||S<35||S>81)return{error:'Expected drum name, received "'+T[1]+'"'};var z={sound:S};return T.length===3&&(z.noteHead=T[2]),{key:M,value:z}},p=function(x,T){var M=e.getMeasurement(T);return M.used===0||T.length!==0?{error:'Directive "'+x+'" requires a measurement as a parameter.'}:M.value},g=function(x,T){var M=e.getMeasurement(T);return M.used===0||T.length!==0?'Directive "'+x+'" requires a measurement as a parameter.':(i.formatting[x]=M.value,null)},v=function(x,T,M,S,z){if(M.length!==1||M[0].type!=="number")return'Directive "'+T+'" requires a number as a parameter.';var ee=M[0].intt;return S!==void 0&&ee<S?'Directive "'+T+'" requires a number greater than or equal to '+S+" as a parameter.":z!==void 0&&ee>z?'Directive "'+T+'" requires a number less than or equal to '+z+" as a parameter.":(r[x]=ee,null)},m=function(x,T,M){if(M.length===1&&(M[0].token==="true"||M[0].token==="false"))return r[x]=M[0].token==="true",null;var S=v(x,T,M,0,1);return S!==null?S:(r[x]=r[x]===1,null)},y=function(x,T,M,S){if(M.length!==1)return'Directive "'+T+'" requires one of [ '+S.join(", ")+" ] as a parameter.";for(var z=M[0].token,ee=!1,V=0;!ee&&V<S.length;V++)S[V]===z&&(ee=!0);return ee?(r[x]=z,null):'Directive "'+T+'" requires one of [ '+S.join(", ")+" ] as a parameter."},k=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],b=["gchord","ptstress","beatstring"],w=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],C=["program"],B=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],L=["beat"],N=["drone"],_=["portamento"],F=["expand","grace","trim"],q=["drum","chordname"],D=["bassprog","chordprog"],R=function(x,T,M){var S=x.shift().token,z=[];if(k.indexOf(S)>=0)x.length!==0&&t("Unexpected parameter in MIDI "+S,M,0);else if(b.indexOf(S)>=0)x.length!==1?t("Expected one parameter in MIDI "+S,M,0):z.push(x[0].token);else if(w.indexOf(S)>=0)x.length!==1?t("Expected one parameter in MIDI "+S,M,0):x[0].type!=="number"?t("Expected one integer parameter in MIDI "+S,M,0):z.push(x[0].intt);else if(C.indexOf(S)>=0)x.length!==1&&x.length!==2?t("Expected one or two parameters in MIDI "+S,M,0):x[0].type!=="number"||x.length===2&&x[1].type!=="number"?t("Expected integer parameter in MIDI "+S,M,0):(z.push(x[0].intt),x.length===2&&z.push(x[1].intt));else if(B.indexOf(S)>=0)x.length!==2?t("Expected two parameters in MIDI "+S,M,0):x[0].type!=="number"||x[1].type!=="number"?t("Expected two integer parameters in MIDI "+S,M,0):(z.push(x[0].intt),z.push(x[1].intt));else if(_.indexOf(S)>=0)x.length!==2?t("Expected two parameters in MIDI "+S,M,0):x[0].type!=="alpha"||x[1].type!=="number"?t("Expected one string and one integer parameters in MIDI "+S,M,0):(z.push(x[0].token),z.push(x[1].intt));else if(S==="drummap")x.length===2&&x[0].type==="alpha"&&x[1].type==="number"?(T.formatting||(T.formatting={}),T.formatting.midi||(T.formatting.midi={}),T.formatting.midi.drummap||(T.formatting.midi.drummap={}),T.formatting.midi.drummap[x[0].token]=x[1].intt,z=T.formatting.midi.drummap):x.length===3&&x[0].type==="punct"&&x[1].type==="alpha"&&x[2].type==="number"?(T.formatting||(T.formatting={}),T.formatting.midi||(T.formatting.midi={}),T.formatting.midi.drummap||(T.formatting.midi.drummap={}),T.formatting.midi.drummap[x[0].token+x[1].token]=x[2].intt,z=T.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+S,M,0);else if(F.indexOf(S)>=0)x.length!==3||x[0].type!=="number"||x[1].token!=="/"||x[2].type!=="number"?t("Expected fraction parameter in MIDI "+S,M,0):(z.push(x[0].intt),z.push(x[2].intt));else if(L.indexOf(S)>=0)x.length!==4?t("Expected four parameters in MIDI "+S,M,0):x[0].type!=="number"||x[1].type!=="number"||x[2].type!=="number"||x[3].type!=="number"?t("Expected four integer parameters in MIDI "+S,M,0):(z.push(x[0].intt),z.push(x[1].intt),z.push(x[2].intt),z.push(x[3].intt));else if(N.indexOf(S)>=0)x.length!==5?t("Expected five parameters in MIDI "+S,M,0):x[0].type!=="number"||x[1].type!=="number"||x[2].type!=="number"||x[3].type!=="number"||x[4].type!=="number"?t("Expected five integer parameters in MIDI "+S,M,0):(z.push(x[0].intt),z.push(x[1].intt),z.push(x[2].intt),z.push(x[3].intt),z.push(x[4].intt));else if(C.indexOf(S)>=0)x.length!==1||x.length!==4?t("Expected one or two parameters in MIDI "+S,M,0):x[0].type!=="number"?t("Expected integer parameter in MIDI "+S,M,0):x.length===4?(x[1].token!=="octave"&&t("Expected octave parameter in MIDI "+S,M,0),x[2].token!=="="&&t("Expected octave parameter in MIDI "+S,M,0),x[3].type!=="number"&&t("Expected integer parameter for octave in MIDI "+S,M,0)):(z.push(x[0].intt),x.length===4&&z.push(x[3].intt));else if(q.indexOf(S)>=0)if(x.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+S,M,0);else if(x[0].type!=="alpha")t("Expected string parameter and at least one integer parameter in MIDI "+S,M,0);else{var ee=x.shift();for(z.push(ee.token);x.length>0;)ee=x.shift(),ee.type!=="number"&&t("Expected integer parameter in MIDI "+S,M,0),z.push(ee.intt)}else if(D.indexOf(S)>=0){if(x.length!==1&&x.length!==2)t("Expected one or two parameters in MIDI "+S,M,0);else if(x[0].type!=="number")t("Expected integer parameter in MIDI "+S,M,0);else if(x.length===2&&x[1].type!=="alpha")t("Expected alpha parameter in MIDI "+S,M,0);else if(z.push(x[0].intt),x.length===2){var V=x[1].token;V.indexOf("octave=")!=-1?(V=V.replace("octave=",""),V=parseInt(V),isNaN(V)?t("Expected octave value in MIDI"+S):(V<-1&&(t("Expected octave= in MIDI "+S+" to be >= -1 (recv:"+V+")"),V=-1),V>3&&(t("Expected octave= in MIDI "+S+" to be <= 3 (recv:"+V+")"),V=3),z.push(V))):t("Expected octave= in MIDI"+S)}}a.hasBeginMusic()?a.appendElement("midi",-1,-1,{cmd:S,params:z}):(T.formatting.midi===void 0&&(T.formatting.midi={}),T.formatting.midi[S]=z)};A0.parseFontChangeLine=function(x){x=x.replace(/\$\$/g,"");var T=x.split("$");if(T.length>1&&r.setfont){var M=[];T[0]!==""&&M.push({text:T[0]});for(var S=1;S<T.length;S++)if(T[S][0]==="0")M.push({text:T[S].substring(1).replace(/\x03/g,"$$")});else{var z=parseInt(T[S][0],10);r.setfont[z]?M.push({font:r.setfont[z],text:T[S].substring(1).replace(/\x03/g,"$$")}):M[M.length-1].text+="$"+T[S].replace(/\x03/g,"$$")}return M}return x.replace(/\x03/g,"$$")};var J=["auto","above","below","hidden"];A0.addDirective=function(x){var T=e.tokenize(x,0,x.length);if(T.length===0||T[0].type!=="alpha")return null;var M=x.substring(x.indexOf(T[0].token)+T[0].token.length);M=e.stripComment(M);var S=T.shift().token.toLowerCase(),z="",ee;switch(S){case"bagpipes":i.formatting.bagpipes=!0;break;case"flatbeams":i.formatting.flatbeams=!0;break;case"jazzchords":i.formatting.jazzchords=!0;break;case"accentAbove":i.formatting.accentAbove=!0;break;case"germanAlphabet":i.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=M;break;case"graceslurs":if(T.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(T[0].token==="0"||T[0].token==="false")i.formatting.graceSlurs=!1;else if(T[0].token==="1"||T[0].token==="true")i.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+T[0].token+")";break;case"lineThickness":var V=U(T);if(V.value!==void 0&&(i.formatting.lineThickness=V.value),V.error)return V.error;break;case"stretchlast":var ie=U(T);if(ie.value!==void 0&&(i.formatting.stretchlast=ie.value),ie.error)return ie.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":i.formatting.titleleft=!0;break;case"measurebox":i.formatting.measurebox=!0;break;case"vocal":return y("vocalPosition",S,T,J);case"dynamic":return y("dynamicPosition",S,T,J);case"gchord":return y("chordPosition",S,T,J);case"ornament":return y("ornamentPosition",S,T,J);case"volume":return y("volumePosition",S,T,J);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return g(S,T);case"voicescale":if(T.length!==1||T[0].type!=="number")return"voicescale requires one float as a parameter";var Xe=T.shift();return r.currentVoice&&(r.currentVoice.scale=Xe.floatt,a.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(T.length!==1)return"voicecolor requires one string as a parameter";var Ue=T.shift();return r.currentVoice&&(r.currentVoice.color=Ue.token,a.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var Be=Math.round(p(S,T));return Be.error?Be.error:(a.addSpacing(Be),null);case"scale":f(S,T);break;case"sep":if(T.length===0)a.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var Ce=e.getMeasurement(T);if(Ce.used===0)return'Directive "'+S+'" requires 3 numbers: space above, space below, length of line';var Ne=Ce.value;if(Ce=e.getMeasurement(T),Ce.used===0)return'Directive "'+S+'" requires 3 numbers: space above, space below, length of line';var X=Ce.value;if(Ce=e.getMeasurement(T),Ce.used===0||T.length!==0)return'Directive "'+S+'" requires 3 numbers: space above, space below, length of line';var ge=Ce.value;a.addSeparator(Ne,X,ge,{startChar:r.iChar,endChar:r.iChar+M.length})}break;case"barsperstaff":if(z=v("barsperstaff",S,T),z!==null)return z;break;case"staffnonote":if(T.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(T[0].token==="0")r.staffnonote=!0;else if(T[0].token==="1")r.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+T[0].token+")";break;case"printtempo":if(z=m("printTempo",S,T),z!==null)return z;break;case"partsbox":if(z=m("partsBox",S,T),z!==null)return z;r.partsfont.box=r.partsBox;break;case"freegchord":if(z=m("freegchord",S,T),z!==null)return z;break;case"measurenb":case"barnumbers":if(z=v("barNumbers",S,T),z!==null)return z;break;case"setbarnb":if(T.length!==1||T[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=a.setBarNumberImmediate(T[0].intt);break;case"keywarn":if(T.length!==1||T[0].type!=="number"||T[0].intt!==1&&T[0].intt!==0)return"Directive "+S+" requires 0 or 1 as a parameter.";r[S]=T[0].intt===1;break;case"begintext":var te="";for(ee=e.nextLine();ee&&ee.indexOf("%%endtext")!==0;){if(ii.startsWith(ee,"%%")){var ae=ee.substring(2);ae=ae.trim()+`
|
|
2
|
+
`,te+=ae}else te+=ee.trim()+`
|
|
3
|
+
`;ee=e.nextLine()}a.addText(te,{startChar:r.iChar,endChar:r.iChar+te.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(ee=e.nextLine();ee&&ee.indexOf("%%endps")!==0;)e.nextLine();t("Postscript ignored",x,0);break;case"deco":M.length>0&&r.ignoredDecorations.push(M.substring(0,M.indexOf(" "))),t("Decoration redefinition ignored",x,0);break;case"text":var he=e.translateString(M);a.addText(A0.parseFontChangeLine(he),{startChar:r.iChar,endChar:r.iChar+M.length+7});break;case"center":var je=e.translateString(M);a.addCentered(A0.parseFontChangeLine(je));break;case"font":break;case"setfont":var Pe=e.tokenize(M,0,M.length);if(Pe.length>=4&&Pe[0].token==="-"&&Pe[1].type==="number"){var Ve=parseInt(Pe[1].token);Ve>=1&&Ve<=9&&(r.setfont||(r.setfont=[]),Pe.shift(),Pe.shift(),r.setfont[Ve]=c(Pe,r.setfont[Ve],x,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return h(S,T,x);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return d(S,T,x);case"barlabelfont":case"barnumberfont":case"barnumfont":return h("measurefont",T,x);case"staves":case"score":r.score_is_present=!0;for(var Ke=function(ot,jl,Ka,$a,Vl){(jl||r.staves.length===0)&&r.staves.push({index:r.staves.length,numVoices:0});var x0=ii.last(r.staves);Ka!==void 0&&x0.bracket===void 0&&(x0.bracket=Ka),$a!==void 0&&x0.brace===void 0&&(x0.brace=$a),Vl&&(x0.connectBarLines="end"),r.voices[ot]===void 0&&(r.voices[ot]={staffNum:x0.index,index:x0.numVoices},x0.numVoices++)},Le=!1,$e=!1,ke=!1,j=!1,oe=!1,A=!1,I=!1,Y,H=function(){if(I=!0,Y){var ot="start";Y.staffNum>0&&(r.staves[Y.staffNum-1].connectBarLines==="start"||r.staves[Y.staffNum-1].connectBarLines==="continue")&&(ot="continue"),r.staves[Y.staffNum].connectBarLines=ot}};T.length;){var G=T.shift();switch(G.token){case"(":Le?t("Can't nest parenthesis in %%score",x,G.start):(Le=!0,j=!0);break;case")":!Le||j?t("Unexpected close parenthesis in %%score",x,G.start):Le=!1;break;case"[":$e?t("Can't nest brackets in %%score",x,G.start):($e=!0,oe=!0);break;case"]":!$e||oe?t("Unexpected close bracket in %%score",x,G.start):($e=!1,r.staves[Y.staffNum].bracket="end");break;case"{":ke?t("Can't nest braces in %%score",x,G.start):(ke=!0,A=!0);break;case"}":!ke||A?t("Unexpected close brace in %%score",x,G.start):(ke=!1,r.staves[Y.staffNum].brace="end");break;case"|":H();break;default:for(var Q="";(G.type==="alpha"||G.type==="number")&&(Q+=G.token,G.continueId);)G=T.shift();var K=!Le||j,$=oe?"start":$e?"continue":void 0,W=A?"start":ke?"continue":void 0;Ke(Q,K,$,W,I),j=!1,oe=!1,A=!1,I=!1,Y=r.voices[Q],S==="staves"&&H();break}}break;case"maxstaves":var Z=e.getInt(M);Z.digits===0?t("Expected number of staves in maxstaves"):Z.value>0&&(i.formatting.maxStaves=Z.value);break;case"newpage":var ne=e.getInt(M);a.addNewPage(ne.digits===0?-1:ne.value);break;case"abc":var ce=M.split(" ");switch(ce[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var re=ce.shift();a.addMetaText(S+re,ce.join(" "),{startChar:r.iChar,endChar:r.iChar+M.length+5});break;default:return"Unknown directive: "+S+ce[0]}break;case"header":case"footer":var se=e.getMeat(M,0,M.length);se=M.substring(se.start,se.end),se[0]==='"'&&se[se.length-1]==='"'&&(se=se.substring(1,se.length-1));var we=se.split(" "),le={};we.length===1?le={left:"",center:we[0],right:""}:we.length===2?le={left:we[0],center:we[1],right:""}:le={left:we[0],center:we[1],right:we[2]},we.length>3&&t("Too many tabs in "+S+": "+we.length+" found.",M,0),a.addMetaTextObj(S,le,{startChar:r.iChar,endChar:r.iChar+x.length});break;case"midi":var qe=e.tokenize(M,0,M.length,!0);qe.length>0&&qe[0].token==="="&&qe.shift(),qe.length===0?t("Expected midi command",M,0):R(qe,i,M);break;case"percmap":var o0=u(M);o0.error?t(o0.error,x,8):(i.formatting.percmap||(i.formatting.percmap={}),i.formatting.percmap[o0.key]=o0.value);break;case"visualtranspose":var w0=e.getInt(M);w0.digits===0?t("Expected number of half steps in visualTranspose"):r.globalTranspose=w0.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":i.formatting[S]=M;break;default:return"Unknown directive: "+S}return null},A0.globalFormatting=function(x){for(var T in x)if(x.hasOwnProperty(T)){var M=""+x[T],S=e.tokenize(M,0,M.length),z;switch(T){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":h(T,S,M);break;case"scale":f(T,S);break;case"partsbox":z=m("partsBox",T,S),z!==null&&t(z),r.partsfont.box=r.partsBox;break;case"freegchord":z=m("freegchord",T,S),z!==null&&t(z);break;case"fontboxpadding":(S.length!==1||S[0].type!=="number")&&t('Directive "'+T+'" requires a number as a parameter.'),i.formatting.fontboxpadding=S[0].floatt;break;case"stafftopmargin":(S.length!==1||S[0].type!=="number")&&t('Directive "'+T+'" requires a number as a parameter.'),i.formatting.stafftopmargin=S[0].floatt;break;case"stretchlast":var ee=U(S);if(ee.value!==void 0&&(i.formatting.stretchlast=ee.value),ee.error)return ee.error;break;default:t("Formatting directive unrecognized: ",T,0)}}};function U(x){if(x.length===0)return{value:1};if(x.length===1)if(x[0].type==="number"){if(x[0].floatt>=0||x[0].floatt<=1)return{value:x[0].floatt}}else{if(x[0].token==="false")return{value:0};if(x[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+x[0].token+")"}}})();ni.exports=A0});var ci=P((t6,oi)=>{"use strict";var Mr={},si=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];Mr.pitchIndex=function(e){return si.indexOf(e)};Mr.noteName=function(e){return si[e]};oi.exports=Mr});var Ar=P((r6,li)=>{"use strict";var Ft=["C","C\u266F","D","D\u266F","E","F","F\u266F","G","G\u266F","A","A\u266F","B"],Ht=["C","D\u266D","D","E\u266D","E","F","G\u266D","G","A\u266D","A","B\u266D","B"],zt=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Rt=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function oh(e,t,r,i){if(!t||t%12===0)return e;for(;t<0;)t+=12;t>11&&(t=t%12);var a=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!a)return e;var n=a[1],s=a[2],o=a[3],c=a[4],h=Ft.indexOf(n);if(h<0&&(h=Ht.indexOf(n)),h<0&&(h=zt.indexOf(n)),h<0&&(h=Rt.indexOf(n)),h<0)return e;h+=t,h=h%12,r?i?e=Rt[h]:e=Ht[h]:i?e=zt[h]:e=Ft[h];var d=s&&(s.indexOf("dim")>=0||s.indexOf("\xB0")>=0);if(d&&e==="A#"&&(e="Bb"),d&&e==="D#"&&(e="Eb"),d&&e==="A\u266F"&&(e="B\u266D"),d&&e==="D\u266F"&&(e="E\u266D"),s&&(e+=s),o){var h=Ft.indexOf(o);h<0&&(h=Ht.indexOf(o)),h<0&&(h=zt.indexOf(o)),h<0&&(h=Rt.indexOf(o)),e+="/",h>=0?(h+=t,h=h%12,r?i?e+=Rt[h]:e+=Ht[h]:i?e+=zt[h]:e+=Ft[h]):e+=o}return c&&(e+=c),e}li.exports=oh});var Br=P((a6,hi)=>{"use strict";var B0={C:{modes:["CMaj","CIon","Amin","AAeo","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","DbIon","Bbmin","BbAeo","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","DIon","Bmin","BAeo","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","EbIon","Cmin","CAeo","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","EIon","C#min","C#Aeo","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","FIon","Dmin","DAeo","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","GbIon","Ebmin","EbAeo","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","GIon","Emin","EAeo","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","AbIon","Fmin","FAeo","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","AIon","F#min","F#Aeo","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","BbIon","Gmin","GAeo","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","BIon","G#min","G#Aeo","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","C#Ion","A#min","A#Aeo","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","F#Ion","D#min","D#Aeo","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","CbIon","Abmin","AbAeo","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},ch=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function lh(e){return ch.indexOf(e.toLowerCase())>=0}var ct=null;function hh(){ct={};for(var e=Object.keys(B0),t=0;t<e.length;t++){var r=B0[e[t]];ct[e[t].toLowerCase()]=e[t];for(var i=0;i<r.modes.length;i++){var a=r.modes[i].toLowerCase();ct[a]=e[t]}}}function fh(e){ct||hh();var t=e.toLowerCase().match(/([a-g][b#]?)(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)?/);if(!t||!t[2])return e;t=t[1]+t[2];var r=ct[t];return r||e}function uh(e,t){var r=B0[e];if(!r||t==="")return e;var i=t.toLowerCase().match(/^(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)/);if(!i)return e;for(var a=i[1],n=0;n<r.modes.length;n++){var s=r.modes[n],o=s.toLowerCase().indexOf(a);if(o!==-1&&o===s.length-a.length)return s.substring(0,s.length-a.length)}return e}function dh(e,t){var r=B0[e];if(!r)return e;for(;t<0;)t+=12;for(var i=(r.stepsFromC+t)%12,a=0;a<Object.keys(B0).length;a++){var n=Object.keys(B0)[a];if(B0[n].stepsFromC===i)return n}return e}hi.exports={relativeMajor:fh,relativeMode:uh,transposeKey:dh,isLegalMode:lh}});var Lr=P((i6,di)=>{"use strict";var{relativeMajor:ph}=Br(),N0={acc:"sharp",note:"f"},G0={acc:"sharp",note:"c"},lt={acc:"sharp",note:"g"},Gt={acc:"sharp",note:"d"},Nr={acc:"sharp",note:"A"},fi={acc:"sharp",note:"e"},gh={acc:"sharp",note:"B"},ze={acc:"flat",note:"B"},c0={acc:"flat",note:"e"},C0={acc:"flat",note:"A"},ht={acc:"flat",note:"d"},Pr={acc:"flat",note:"G"},ui={acc:"flat",note:"c"},vh={acc:"flat",note:"F"},bh={"C#":[N0,G0,lt,Gt,Nr,fi,gh],"F#":[N0,G0,lt,Gt,Nr,fi],B:[N0,G0,lt,Gt,Nr],E:[N0,G0,lt,Gt],A:[N0,G0,lt],D:[N0,G0],G:[N0],C:[],F:[ze],Bb:[ze,c0],Eb:[ze,c0,C0],Cm:[ze,c0,C0],Ab:[ze,c0,C0,ht],Db:[ze,c0,C0,ht,Pr],Gb:[ze,c0,C0,ht,Pr,ui],Cb:[ze,c0,C0,ht,Pr,ui,vh],"A#":[ze,c0],"B#":[],"D#":[ze,c0,C0],"E#":[ze],"G#":[ze,c0,C0,ht],none:[]};function mh(e){var t=bh[ph(e)];return t?JSON.parse(JSON.stringify(t)):null}di.exports=mh});var Ir=P((n6,vi)=>{"use strict";var pi=ci(),yh=Ar(),qr=Lr(),Yt={},wh={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},xh=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],Ch=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];Yt.keySignature=function(e,t,r,i,a){if(e.clef.type==="perc"||e.clef.type==="none")return{accidentals:qr(t),root:r,acc:i};a||(a=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var n=qr(t);if(!n)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+a,!e.localTranspose)return{accidentals:n,root:r,acc:i};if(e.globalTransposeOrigKeySig=n,e.localTranspose%12===0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:n,root:r,acc:i};var s=t[0];t[1]==="b"||t[1]==="#"?(s+=t[1],t=t.substr(2)):t=t.substr(1);var o=wh[s],c=o!==void 0;c||(o=0,s="C",t="");for(var h=o+e.localTranspose;h<0;)h+=12;h>11&&(h=h%12);var d=t[0]==="m"?Ch[h]:xh[h],f=d+t,l=qr(f);(l.length===0||l[0].acc==="flat")&&(e.localTransposePreferFlats=!0);var u=f.charCodeAt(0)-s.charCodeAt(0);return e.localTranspose>0?(u<0||u===0&&(s[1]==="#"||f[1]==="b"))&&(u+=7):e.localTranspose<0&&(u>0||u===0&&(s[1]==="b"||f[1]==="#"))&&(u-=7),e.localTranspose>0?e.localTransposeVerticalMovement=u+Math.floor(e.localTranspose/12)*7:e.localTransposeVerticalMovement=u+Math.ceil(e.localTranspose/12)*7,c?{accidentals:l,root:d[0],acc:d.length>1?d[1]:""}:{accidentals:[],root:r,acc:i}};Yt.chordName=function(e,t){return yh(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var gi=["c","d","e","f","g","a","b"];function kh(e,t,r,i,a){for(var n=gi[(e+49)%7],s=0,o=0;o<i.length;o++)i[o].note.toLowerCase()===n&&(s=Dr[i[o].acc]);for(var c=Dr[r],h=c-s,d=gi[(t+49)%7],f=0,l=0;l<a.accidentals.length;l++)a.accidentals[l].note.toLowerCase()===d&&(f=Dr[a.accidentals[l].acc]);var u=h+f;return u<-2&&(t--,u+=d==="c"||d==="f"?1:2),u>2&&(t++,u-=d==="b"||d==="e"?1:2),[t,u]}var Dr={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},Th={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},_h={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};Yt.note=function(e,t){if(!(!e.localTranspose||e.clef.type==="perc")){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var i=t.accidental?t.name.substring(1):t.name,a=t.accidental?t.name[0]:"",n=pi.pitchIndex(i);t.name=a+pi.noteName(n+e.localTransposeVerticalMovement)}if(t.accidental){var s=kh(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=s[0],t.accidental=Th[s[1]],t.name&&(t.name=_h[s[1]]+t.name.replace(/[_^=]/g,""))}}};vi.exports=Yt});var Wt=P((s6,mi)=>{"use strict";var bi=Ot(),Sh=Ir(),de={};(function(){var e,t,r,i,a;de.initialize=function(l,u,p,g,v){e=l,t=u,r=p,i=g,a=v},de.standardKey=function(l,u,p,g){return Sh.keySignature(r,l,u,p,g)};var n={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},"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^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},"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},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},s=function(l,u){var p=n[l],g=p?p.mid:0;return g+u};de.fixClef=function(l){var u=n[l.type];u&&(l.clefPos=u.pitch,l.type=u.clef)},de.deepCopyKey=function(l){var u={accidentals:[],root:l.root,acc:l.acc,mode:l.mode};return l.accidentals.forEach(function(p){u.accidentals.push(Object.assign({},p))}),l.explicitAccidentals&&(u.explicitAccidentals=[],l.explicitAccidentals.forEach(function(p){u.explicitAccidentals.push(Object.assign({},p))})),u};var o=function(){r.currentVoice&&(r.currentVoice.key=de.deepCopyKey(r.key))},c={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};de.addPosToKey=function(l,u){var p=l.verticalPos;u.accidentals.forEach(function(g){var v=c[g.note];v=v-p,g.verticalPos=v}),u.impliedNaturals&&u.impliedNaturals.forEach(function(g){var v=c[g.note];v=v-p,g.verticalPos=v}),p<-10?(u.accidentals.forEach(function(g){g.verticalPos-=7,(g.verticalPos>=11||g.verticalPos===10&&g.acc==="flat")&&(g.verticalPos-=7),g.note==="A"&&g.acc==="sharp"&&(g.verticalPos-=7),(g.note==="G"||g.note==="F")&&g.acc==="flat"&&(g.verticalPos-=7)}),u.impliedNaturals&&u.impliedNaturals.forEach(function(g){g.verticalPos-=7,(g.verticalPos>=11||g.verticalPos===10&&g.acc==="flat")&&(g.verticalPos-=7),g.note==="A"&&g.acc==="sharp"&&(g.verticalPos-=7),(g.note==="G"||g.note==="F")&&g.acc==="flat"&&(g.verticalPos-=7)})):p<-4?(u.accidentals.forEach(function(g){g.verticalPos-=7,p===-8&&(g.note==="f"||g.note==="g")&&g.acc==="sharp"&&(g.verticalPos-=7)}),u.impliedNaturals&&u.impliedNaturals.forEach(function(g){g.verticalPos-=7,p===-8&&(g.note==="f"||g.note==="g")&&g.acc==="sharp"&&(g.verticalPos-=7)})):p>=7&&(u.accidentals.forEach(function(g){g.verticalPos+=7}),u.impliedNaturals&&u.impliedNaturals.forEach(function(g){g.verticalPos+=7}))},de.fixKey=function(l,u){var p=Object.assign({},u);return de.addPosToKey(l,p),p};var h=function(l){var u=0,p=l[u++];(p==="^"||p==="_")&&(p=l[u++]);var g=c[p];for(g===void 0&&(g=6);u<l.length;u++)if(l[u]===",")g-=7;else if(l[u]==="'")g+=7;else break;return{mid:g-6,str:l.substring(u)}},d=function(l){for(var u=0;u<l.length;u++)l[u].note==="b"?l[u].note="B":l[u].note==="a"?l[u].note="A":l[u].note==="F"?l[u].note="f":l[u].note==="E"?l[u].note="e":l[u].note==="D"?l[u].note="d":l[u].note==="C"?l[u].note="c":l[u].note==="G"&&l[u].acc==="sharp"?l[u].note="g":l[u].note==="g"&&l[u].acc==="flat"&&(l[u].note="G")};de.parseKey=function(l,u){l.length===0&&(l="none");var p=e.tokenize(l,0,l.length),g={};if(p.length===0)return t("Must pass in key signature.",l,0),g;switch(p[0].token){case"HP":bi.addDirective("bagpipes"),r.key={root:"HP",accidentals:[],acc:"",mode:""},g.foundKey=!0,p.shift(),u||(r.globalKey=de.deepCopyKey(r.key)),o();break;case"Hp":bi.addDirective("bagpipes"),r.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},g.foundKey=!0,p.shift(),u||(r.globalKey=de.deepCopyKey(r.key)),o();break;case"none":r.key={root:"none",accidentals:[],acc:"",mode:""},g.foundKey=!0,p.shift(),u||(r.globalKey=de.deepCopyKey(r.key)),o();break;default:var v=e.getKeyPitch(p[0].token);if(v.len>0){g.foundKey=!0;var m="",y="";p[0].token.length>1?p[0].token=p[0].token.substring(1):p.shift();var k=v.token;if(p.length>0){var b=e.getSharpFlat(p[0].token);if(b.len>0&&(p[0].token.length>1?p[0].token=p[0].token.substring(1):p.shift(),k+=b.token,m=b.token),p.length>0){var w=e.getMode(p[0].token);w.len>0&&(p.shift(),k+=w.token,y=w.token)}if(de.standardKey(k,v.token,m,0)===void 0)return t("Unsupported key signature: "+k,l,0),g}var C=de.deepCopyKey(r.key),B=!u&&r.globalTranspose?-r.globalTranspose:0,L;if(u&&(L=r.globalTransposeOrigKeySig),r.key=de.deepCopyKey(de.standardKey(k,v.token,m,B)),u&&(r.globalTransposeOrigKeySig=L),r.key.mode=y,C&&r.keywarn!==!1){for(var N,_=0;_<r.key.accidentals.length;_++)for(N=0;N<C.accidentals.length;N++)C.accidentals[N].note&&r.key.accidentals[_].note.toLowerCase()===C.accidentals[N].note.toLowerCase()&&(C.accidentals[N].note=null);for(N=0;N<C.accidentals.length;N++)C.accidentals[N].note&&(r.key.impliedNaturals||(r.key.impliedNaturals=[]),r.key.impliedNaturals.push({acc:"natural",note:C.accidentals[N].note}))}u||(r.globalKey=de.deepCopyKey(r.key)),o()}break}if(p.length===0||(p[0].token==="exp"&&p.shift(),p.length===0)||(p[0].token==="oct"&&p.shift(),p.length===0))return g;var F=e.getKeyAccidentals2(p);if(F.warn&&t(F.warn,l,0),F.accs){g.foundKey||(g.foundKey=!0,r.key={root:"none",acc:"",mode:"",accidentals:[]}),d(F.accs);for(var q=0;q<F.accs.length;q++){for(var D=!1,R=0;R<r.key.accidentals.length&&!D;R++)r.key.accidentals[R].note===F.accs[q].note&&(D=!0,r.key.accidentals[R].acc!==F.accs[q].acc&&(r.key.accidentals[R].acc=F.accs[q].acc,r.key.explicitAccidentals||(r.key.explicitAccidentals=[]),r.key.explicitAccidentals.push(F.accs[q])));if(!D&&(r.key.explicitAccidentals||(r.key.explicitAccidentals=[]),r.key.explicitAccidentals.push(F.accs[q]),r.key.accidentals.push(F.accs[q]),r.key.impliedNaturals))for(var J=0;J<r.key.impliedNaturals.length;J++)r.key.impliedNaturals[J].note===F.accs[q].note&&r.key.impliedNaturals.splice(J,1)}u||(r.globalKey=de.deepCopyKey(r.key)),o()}for(var U;p.length>0;)switch(p[0].token){case"m":case"middle":if(p.shift(),p.length===0)return t("Expected = after middle",l,0),g;if(U=p.shift(),U.token!=="="){t("Expected = after middle",l,U.start);break}if(p.length===0)return t("Expected parameter after middle=",l,0),g;var x=e.getPitchFromTokens(p);x.warn&&t(x.warn,l,0),x.position&&(r.clef.verticalPos=x.position-6);break;case"transpose":if(p.shift(),p.length===0)return t("Expected = after transpose",l,0),g;if(U=p.shift(),U.token!=="="){t("Expected = after transpose",l,U.start);break}if(p.length===0)return t("Expected parameter after transpose=",l,0),g;if(p[0].type!=="number"){t("Expected number after transpose",l,p[0].start);break}r.clef.transpose=p[0].intt,p.shift();break;case"stafflines":if(p.shift(),p.length===0)return t("Expected = after stafflines",l,0),g;if(U=p.shift(),U.token!=="="){t("Expected = after stafflines",l,U.start);break}if(p.length===0)return t("Expected parameter after stafflines=",l,0),g;if(p[0].type!=="number"){t("Expected number after stafflines",l,p[0].start);break}r.clef.stafflines=p[0].intt,p.shift();break;case"staffscale":if(p.shift(),p.length===0)return t("Expected = after staffscale",l,0),g;if(U=p.shift(),U.token!=="="){t("Expected = after staffscale",l,U.start);break}if(p.length===0)return t("Expected parameter after staffscale=",l,0),g;if(p[0].type!=="number"){t("Expected number after staffscale",l,p[0].start);break}r.clef.staffscale=p[0].floatt,p.shift();break;case"octave":if(p.shift(),p.length===0)return t("Expected = after octave",l,0),g;if(U=p.shift(),U.token!=="="){t("Expected = after octave",l,U.start);break}if(p.length===0)return t("Expected parameter after octave=",l,0),g;if(p[0].type!=="number"){t("Expected number after octave",l,p[0].start);break}r.octave=p[0].intt,p.shift();break;case"style":if(p.shift(),p.length===0)return t("Expected = after style",l,0),g;if(U=p.shift(),U.token!=="="){t("Expected = after style",l,U.start);break}if(p.length===0)return t("Expected parameter after style=",l,0),g;switch(p[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=p[0].token,p.shift();break;default:t("error parsing style element: "+p[0].token,l,p[0].start);break}break;case"clef":if(p.shift(),p.length===0)return t("Expected = after clef",l,0),g;if(U=p.shift(),U.token!=="="){t("Expected = after clef",l,U.start);break}if(p.length===0)return t("Expected parameter after clef=",l,0),g;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var T=p.shift();switch(T.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":T.token="alto";break;case"F":T.token="bass";break;case"G":T.token="treble";break;case"c":T.token="alto";break;case"f":T.token="bass";break;case"g":T.token="treble";break;default:t("Expected clef name. Found "+T.token,l,T.start);break}p.length>0&&p[0].type==="number"&&(T.token+=p[0].token,p.shift()),p.length>1&&(p[0].token==="-"||p[0].token==="+"||p[0].token==="^"||p[0].token==="_")&&p[1].token==="8"&&(T.token+=p[0].token+p[1].token,p.shift(),p.shift()),r.clef={type:T.token,verticalPos:s(T.token,0)},r.currentVoice&&r.currentVoice.transpose!==void 0&&(r.clef.transpose=r.currentVoice.transpose),g.foundClef=!0;break;default:t("Unknown parameter: "+p[0].token,l,p[0].start),p.shift()}return g};var f=function(l){var u=r.voices[l];if(!(r.currentVoice&&r.currentVoice.index===u.index&&r.currentVoice.staffNum===u.staffNum))return r.currentVoice=u,u.key?r.key=de.deepCopyKey(u.key):r.globalKey&&(r.key=de.deepCopyKey(r.globalKey)),a.setCurrentVoice(u.staffNum,u.index,l)};de.parseVoice=function(l,u,p){var g=e.getMeat(l,u,p),v=g.start,m=g.end,y=e.getToken(l,v,m);if(y.length===0){t("Expected a voice id",l,v);return}var k=!1;r.voices[y]===void 0&&(r.voices[y]={},k=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",l,v)),v+=y.length,v+=e.eatWhiteSpace(l,v);for(var b={startStaff:k},w=function(x){var T=e.getVoiceToken(l,v,m);T.warn!==void 0?t("Expected value for "+x+" in voice: "+T.warn,l,v):T.err!==void 0?t("Expected value for "+x+" in voice: "+T.err,l,v):T.token.length===0&&l[v]!=='"'?t("Expected value for "+x+" in voice",l,v):b[x]=T.token,v+=T.len},C=function(x,T,M){var S=e.getVoiceToken(l,v,m);S.warn!==void 0?t("Expected value for "+T+" in voice: "+S.warn,l,v):S.err!==void 0?t("Expected value for "+T+" in voice: "+S.err,l,v):S.token.length===0&&l[v]!=='"'?t("Expected value for "+T+" in voice",l,v):(M==="number"&&(S.token=parseFloat(S.token)),r.voices[x][T]=S.token),v+=S.len},B=function(x,T){var M=e.getVoiceToken(l,v,m);if(M.warn!==void 0)t("Expected value for "+x+" in voice: "+M.warn,l,v);else if(M.err!==void 0)t("Expected value for "+x+" in voice: "+M.err,l,v);else if(M.token.length===0&&l[v]!=='"')t("Expected value for "+x+" in voice",l,v);else return T==="number"&&(M.token=parseFloat(M.token)),M.token;v+=M.len},L=function(x,T){var M={_B:2,_E:9,_b:-10,_e:-3},S=e.getVoiceToken(l,v,m);if(S.warn!==void 0)t("Expected one of (_B, _E, _b, _e) for "+T+" in voice: "+S.warn,l,v);else if(S.token.length===0&&l[v]!=='"')t("Expected one of (_B, _E, _b, _e) for "+T+" in voice",l,v);else{var z=M[S.token];z?r.voices[x][T]=z:t("Expected one of (_B, _E, _b, _e) for "+T+" in voice",l,v)}v+=S.len};v<m;){var N=e.getVoiceToken(l,v,m);if(v+=N.len,N.warn)t("Error parsing voice: "+N.warn,l,v);else{var _=null;switch(N.token){case"clef":case"cl":w("clef");var F=0;b.clef!==void 0&&(b.clef=b.clef.replace(/[',]/g,""),b.clef.indexOf("+16")!==-1&&(F+=14,b.clef=b.clef.replace("+16","")),b.verticalPos=s(b.clef,F));break;case"treble":case"bass":case"tenor":case"alto":case"perc":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,,":case"treble+8":case"treble-8":case"treble^8":case"treble_8":case"treble1":case"treble2":case"treble3":case"treble4":case"treble5":case"bass+8":case"bass-8":case"bass^8":case"bass_8":case"bass+16":case"bass-16":case"bass^16":case"bass_16":case"bass1":case"bass2":case"bass3":case"bass4":case"bass5":case"tenor1":case"tenor2":case"tenor3":case"tenor4":case"tenor5":case"alto1":case"alto2":case"alto3":case"alto4":case"alto5":case"alto+8":case"alto-8":case"alto^8":case"alto_8":var q=0;b.clef=N.token.replace(/[',]/g,""),b.verticalPos=s(b.clef,q),r.voices[y].clef=N.token;break;case"staves":case"stave":case"stv":w("staves");break;case"brace":case"brc":w("brace");break;case"bracket":case"brk":w("bracket");break;case"name":case"nm":w("name");break;case"subname":case"sname":case"snm":w("subname");break;case"merge":b.startStaff=!1;break;case"stem":case"stems":_=e.getVoiceToken(l,v,m),_.warn!==void 0?t("Expected value for stems in voice: "+_.warn,l,v):_.err!==void 0?t("Expected value for stems in voice: "+_.err,l,v):_.token==="up"||_.token==="down"?r.voices[y].stem=_.token:t("Expected up or down for voice stem",l,v),v+=_.len;break;case"up":case"down":r.voices[y].stem=N.token;break;case"middle":case"m":w("verticalPos"),b.verticalPos=h(b.verticalPos).mid;break;case"gchords":case"gch":r.voices[y].suppressChords=!0,_=e.getVoiceToken(l,v,m),_.token==="0"&&(v=v+_.len);break;case"space":case"spc":w("spacing");break;case"scale":C(y,"scale","number");break;case"score":L(y,"scoreTranspose");break;case"transpose":C(y,"transpose","number");break;case"stafflines":C(y,"stafflines","number");break;case"staffscale":C(y,"staffscale","number");break;case"octave":C(y,"octave","number");break;case"volume":C(y,"volume","number");break;case"cue":var D=B("cue","string");D==="on"?r.voices[y].scale=.6:r.voices[y].scale=1;break;case"style":_=e.getVoiceToken(l,v,m),_.warn!==void 0?t("Expected value for style in voice: "+_.warn,l,v):_.err!==void 0?t("Expected value for style in voice: "+_.err,l,v):_.token==="normal"||_.token==="harmonic"||_.token==="rhythm"||_.token==="x"||_.token==="triangle"?r.voices[y].style=_.token:t("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",l,v),v+=_.len;break}}v+=e.eatWhiteSpace(l,v)}if((b.startStaff||r.staves.length===0)&&(r.staves.push({index:r.staves.length,meter:r.origMeter}),r.score_is_present||(r.staves[r.staves.length-1].numVoices=0)),r.voices[y].staffNum===void 0){r.voices[y].staffNum=r.staves.length-1;var R=0;for(var J in r.voices)r.voices.hasOwnProperty(J)&&r.voices[J].staffNum===r.voices[y].staffNum&&R++;r.voices[y].index=R-1}var U=r.staves[r.voices[y].staffNum];return r.score_is_present||U.numVoices++,b.clef&&(U.clef={type:b.clef,verticalPos:b.verticalPos}),b.spacing&&(U.spacing_below_offset=b.spacing),b.verticalPos&&(U.verticalPos=b.verticalPos),b.name&&(U.name?U.name.push(b.name):U.name=[b.name]),b.subname&&(U.subname?U.subname.push(b.subname):U.subname=[b.subname]),f(y)}})();mi.exports=de});var wi=P((o6,yi)=>{"use strict";var Xt=Qe(),l0=Ot(),h0=Wt(),Eh=function(e,t,r,i,a){this.reset=function(o,c,h,d){h0.initialize(o,c,h,d,a),l0.initialize(o,c,h,d,a)},this.reset(e,t,r,i),this.setTitle=function(o,c){r.hasMainTitle?a.addSubtitle(o,{startChar:r.iChar,endChar:r.iChar+c+2}):(a.addMetaText("title",o,{startChar:r.iChar,endChar:r.iChar+c+2}),r.hasMainTitle=!0)},this.setMeter=function(o){if(o=e.stripComment(o),o==="C")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if(o==="C|")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if(o==="o")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if(o==="c")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if(o==="o.")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(o==="c.")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(o.length===0||o.toLowerCase()==="none")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),null;var c=e.tokenize(o,0,o.length);try{var h=function(){var g={value:0,num:""},v=c.shift();for(v.token==="("&&(v=c.shift());;){if(v.type!=="number")throw"Expected top number of meter";if(g.value+=parseInt(v.token),g.num+=v.token,c.length===0||c[0].token==="/")return g;if(v=c.shift(),v.token===")"){if(c.length===0||c[0].token==="/")return g;throw"Unexpected paren in meter"}if(v.token!=="."&&v.token!=="+"||(g.num+=v.token,c.length===0))throw"Expected top number of meter";v=c.shift()}return g},d=function(){var g=h();if(c.length===0)return g;var v=c.shift();if(v.token!=="/")throw"Expected slash in meter";if(v=c.shift(),v.type!=="number")throw"Expected bottom number of meter";return g.den=v.token,g.value=g.value/parseInt(g.den),g};if(c.length===0)throw"Expected meter definition in M: line";for(var f={type:"specified",value:[]},l=0;;){var u=d();l+=u.value;var p={num:u.num};if(u.den!==void 0&&(p.den=u.den),f.value.push(p),c.length===0)break}return r.havent_set_length===!0&&(r.default_length=l<.75?.0625:.125,r.havent_set_length=!1),f}catch(g){t(g,o,0)}return null},this.calcTempo=function(o){var c=.25;r.meter&&r.meter.type==="specified"?c=1/parseInt(r.meter.value[0].den):r.origMeter&&r.origMeter.type==="specified"&&(c=1/parseInt(r.origMeter.value[0].den));for(var h=0;h<o.duration;h++)o.duration[h]=c*o.duration[h];return o},this.resolveTempo=function(){r.tempo&&(this.calcTempo(r.tempo),i.metaText.tempo=r.tempo,delete r.tempo)},this.addUserDefinition=function(o,c,h){var d=o.indexOf("=",c);if(d===-1){t("Need an = in a macro definition",o,c);return}var f=Xt.strip(o.substring(c,d)),l=Xt.strip(o.substring(d+1));if(f.length!==1){t("Macro definitions can only be one character",o,c);return}var u="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(u.indexOf(f)===-1){t("Macro definitions must be H-Y, h-w, or tilde",o,c);return}if(l.length===0){t("Missing macro definition",o,c);return}r.macros===void 0&&(r.macros={}),r.macros[f]=l},this.setDefaultLength=function(o,c,h){var d=o.substring(c,h).replace(/ /g,""),f=d.split("/");if(f.length===2){var l=parseInt(f[0]),u=parseInt(f[1]);u>0&&(r.default_length=l/u,r.havent_set_length=!1)}else f.length===1&&f[0]==="1"&&(r.default_length=1,r.havent_set_length=!1)};var n={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(o,c,h,d){try{var f=e.tokenize(o,c,h);if(f.length===0)throw"Missing parameter in Q: field";var l={startChar:d+c-2,endChar:d+h},u=!0,p=f.shift();if(p.type==="quote"&&(l.preString=p.token,p=f.shift(),f.length===0))return n[l.preString.toLowerCase()]&&(l.bpm=n[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if(p.type==="alpha"&&p.token==="C"){if(f.length===0)throw"Missing tempo after C in Q: field";if(p=f.shift(),p.type==="punct"&&p.token==="="){if(f.length===0)throw"Missing tempo after = in Q: field";if(p=f.shift(),p.type!=="number")throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(p.token)}else if(p.type==="number"){if(l.duration=[parseInt(p.token)],f.length===0)throw"Missing = after duration in Q: field";if(p=f.shift(),p.type!=="punct"||p.token!=="=")throw"Expected = after duration in Q: field";if(f.length===0)throw"Missing tempo after = in Q: field";if(p=f.shift(),p.type!=="number")throw"Expected number after = in Q: field";l.bpm=parseInt(p.token)}else throw"Expected number or equal after C in Q: field"}else if(p.type==="number"){var g=parseInt(p.token);if(f.length===0||f[0].type==="quote")l.duration=[1],l.bpm=g;else{if(u=!1,p=f.shift(),p.type!=="punct"&&p.token!=="/"||(p=f.shift(),p.type!=="number"))throw"Expected fraction in Q: field";var v=parseInt(p.token);for(l.duration=[g/v];f.length>0&&f[0].token!=="="&&f[0].type!=="quote";){if(p=f.shift(),p.type!=="number"||(g=parseInt(p.token),p=f.shift(),p.type!=="punct"&&p.token!=="/")||(p=f.shift(),p.type!=="number"))throw"Expected fraction in Q: field";v=parseInt(p.token),l.duration.push(g/v)}if(p=f.shift(),p.type!=="punct"&&p.token!=="=")throw"Expected = in Q: field";if(p=f.shift(),p.type!=="number")throw"Expected tempo in Q: field";l.bpm=parseInt(p.token)}}else throw"Unknown value in Q: field";if(f.length!==0&&(p=f.shift(),p.type==="quote"&&(l.postString=p.token,p=f.shift()),f.length!==0))throw"Unexpected string at end of Q: field";return r.printTempo===!1&&(l.suppress=!0),{type:u?"delaySet":"immediate",tempo:l}}catch(m){return t(m,o,c),{type:"none"}}},this.letter_to_inline_header=function(o,c,h){var d=!1,f=e.eatWhiteSpace(o,c);if(c+=f,o.length>=c+5&&o[c]==="["&&o[c+2]===":"){var l=o.indexOf("]",c),u=r.iChar+c,p=r.iChar+l+1;switch(o.substring(c,c+3)){case"[I:":var g=l0.addDirective(o.substring(c+3,l));return g&&t(g,o,c),[l-c+1+f];case"[M:":var v=this.setMeter(o.substring(c+3,l));return h&&r.currentVoice&&v?r.staves[r.currentVoice.staffNum].meter=v:a.hasBeginMusic()&&v?a.appendStartingElement("meter",u,p,v):r.meter=v,[l-c+1+f];case"[K:":var m=h0.parseKey(o.substring(c+3,l),!0);return m.foundClef&&a.hasBeginMusic()&&a.appendStartingElement("clef",u,p,r.clef),m.foundKey&&a.hasBeginMusic()&&a.appendStartingElement("key",u,p,h0.fixKey(r.clef,r.key)),[l-c+1+f];case"[P:":var y=l0.parseFontChangeLine(o.substring(c+3,l));return h||i.lines.length<=i.lineNum?r.partForNextLine={title:y,startChar:u,endChar:p}:a.appendElement("part",u,p,{title:y}),[l-c+1+f];case"[L:":return this.setDefaultLength(o,c+3,l),[l-c+1+f];case"[Q:":if(l>0){var k=this.setTempo(o,c+3,l,r.iChar);return k.type==="delaySet"?a.hasBeginMusic()?a.appendElement("tempo",u,p,this.calcTempo(k.tempo)):r.tempoForNextLine=["tempo",u,p,this.calcTempo(k.tempo)]:k.type==="immediate"&&(!h&&a.hasBeginMusic()?a.appendElement("tempo",u,p,k.tempo):r.tempoForNextLine=["tempo",u,p,k.tempo]),[l-c+1+f,o[c+1],o.substring(c+3,l)]}break;case"[V:":if(l>0)return d=h0.parseVoice(o,c+3,l),[l-c+1+f,o[c+1],o.substring(c+3,l),d];break;case"[r:":return[l-c+1+f];default:}}return[0]},this.letter_to_body_header=function(o,c){var h=!1;if(o.length>=c+3)switch(o.substring(c,c+2)){case"I:":var d=l0.addDirective(o.substring(c+2));return d&&t(d,o,c),[o.length];case"M:":var f=this.setMeter(o.substring(c+2));return a.hasBeginMusic()&&f&&a.appendStartingElement("meter",r.iChar+c,r.iChar+o.length,f),[o.length];case"K:":var l=h0.parseKey(o.substring(c+2),a.hasBeginMusic());return l.foundClef&&a.hasBeginMusic()&&r.keywarn!==!1&&a.appendStartingElement("clef",r.iChar+c,r.iChar+o.length,r.clef),l.foundKey&&a.hasBeginMusic()&&r.keywarn!==!1&&a.appendStartingElement("key",r.iChar+c,r.iChar+o.length,h0.fixKey(r.clef,r.key)),[o.length];case"P:":return a.hasBeginMusic()&&a.appendElement("part",r.iChar+c,r.iChar+o.length,{title:o.substring(c+2)}),[o.length];case"L:":return this.setDefaultLength(o,c+2,o.length),[o.length];case"Q:":var u=o.indexOf("",c+2);u===-1&&(u=o.length);var p=this.setTempo(o,c+2,u,r.iChar);return p.type==="delaySet"?a.appendElement("tempo",r.iChar+c,r.iChar+o.length,this.calcTempo(p.tempo)):p.type==="immediate"&&a.appendElement("tempo",r.iChar+c,r.iChar+o.length,p.tempo),[u,o[c],Xt.strip(o.substring(c+2))];case"V:":return h=h0.parseVoice(o,c+2,o.length),[o.length,o[c],Xt.strip(o.substring(c+2)),h];default:}return[0]};var s={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(o){var c=s[o[0]],h=o.length-2,d=e.translateString(e.stripComment(o.substring(2)));if(c==="unalignedWords"||c==="notes")a.addMetaTextArray(c,l0.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length});else if(c!==void 0)a.addMetaText(c,l0.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length});else{var f=r.iChar,l=f+o.length;switch(o[0]){case"H":for(a.addMetaTextArray("history",l0.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length}),o=e.peekLine();o&&o[1]!==":";)e.nextLine(),a.addMetaTextArray("history",l0.parseFontChangeLine(e.translateString(e.stripComment(o))),{startChar:r.iChar,endChar:r.iChar+o.length}),o=e.peekLine();break;case"K":this.resolveTempo();var u=h0.parseKey(o.substring(2),!1);!r.is_in_header&&a.hasBeginMusic()&&r.keywarn!==!1&&(u.foundClef&&a.appendStartingElement("clef",f,l,r.clef),u.foundKey&&a.appendStartingElement("key",f,l,h0.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(o,2,o.length);break;case"M":r.origMeter=r.meter=this.setMeter(o.substring(2));break;case"P":r.is_in_header?a.addMetaText("partOrder",l0.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length}):r.partForNextLine={title:d,startChar:f,endChar:l};break;case"Q":var p=this.setTempo(o,2,o.length,r.iChar);p.type==="delaySet"?r.tempo=p.tempo:p.type==="immediate"&&(i.metaText.tempo?r.tempoForNextLine=["tempo",f,l,p.tempo]:i.metaText.tempo=p.tempo);break;case"T":r.titlecaps&&(d=d.toUpperCase()),this.setTitle(l0.parseFontChangeLine(e.theReverser(d)),h);break;case"U":this.addUserDefinition(o,2,o.length);break;case"V":if(h0.parseVoice(o,2,o.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",o,0);break;default:return{regular:!0}}}return{}}};yi.exports=Eh});var xi=P((c6,Re)=>{"use strict";Re.exports.legalAccents=["trill","trillh","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","beambr1","beambr2","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","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"];Re.exports.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"];Re.exports.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"];Re.exports.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]];Re.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]];Re.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{";Re.exports.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875];Re.exports.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};Re.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"};Re.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"};Re.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}});var Di=P((l6,qi)=>{"use strict";var Ci=Wt(),Pi=Ir(),pe,xe,E,Ze,Je,ut,{legalAccents:ki,volumeDecorations:Ti,dynamicDecorations:_i,accentPseudonyms:Si,accentDynamicPseudonyms:Ei,nonDecorations:Mh,durations:Ah,pitches:Bh,rests:Nh,accMap:Mi,tripletQ:Ph}=xi(),Hr=function(e,t,r,i,a,n){pe=e,xe=t,E=r,Ze=i,Je=a,ut=n,this.lineContinuation=!1},Ai=function(e,t,r){if(e.inTie[t]===void 0)return!1;var i=e.currentVoice?e.currentVoice.staffNum*100+e.currentVoice.index:0;return!!(e.inTie[t][i]&&(r.pitches!==void 0||r.rest.type!=="spacer"))},O={};Hr.prototype.parseMusic=function(e){ut.resolveTempo(),E.is_in_header=!1;for(var t=0,r=E.iChar;pe.isWhiteSpace(e[t])&&t<e.length;)t++;if(!(t===e.length||e[t]==="%")){var i=E.start_new_line;E.continueall===void 0?E.start_new_line=!0:E.start_new_line=!1;var a=0,n=ut.letter_to_body_header(e,t);n[0]>0&&(t+=n[0],n[1]==="V"&&this.startNewLine());for(var s=0;t<e.length;){var o=t;if(e[t]==="%")break;var c=ut.letter_to_inline_header(e,t,i);if(c[0]>0)t+=c[0],c[1]==="V"&&(i=!0);else{(!Je.hasBeginMusic()||i&&!this.lineContinuation)&&(this.startNewLine(),i=!1);for(var h;;)if(h=pe.eatWhiteSpace(e,t),h>0&&(t+=h),t>0&&e[t-1]===""&&(h=ut.letter_to_body_header(e,t),h[0]>0&&(h[1]==="V"&&this.startNewLine(),t=h[0],E.start_new_line=!1)),h=Ih(e,t),h[0]>0&&(t+=h[0]),h=Lh(e,t),h[0]>0){O.chord||(O.chord=[]);var d=pe.translateString(h[1]);d=d.replace(/;/g,`
|
|
4
|
+
`);for(var f=!1,l=0;l<O.chord.length;l++)O.chord[l].position===h[2]&&(f=!0,O.chord[l].name+=`
|
|
5
|
+
`+d);f===!1&&(h[2]===null&&h[3]?O.chord.push({name:d,rel_position:h[3]}):O.chord.push({name:d,position:h[2]})),t+=h[0];var u=pe.skipWhiteSpace(e.substring(t));u>0&&(O.force_end_beam_last=!0),t+=u}else if(Mh.indexOf(e[t])===-1?h=Ni(e,t):h=[0],h[0]>0)h[1]===null?t+1<e.length&&this.startNewLine():h[1].length>0&&(h[1].indexOf("style=")===0?O.style=h[1].substring(6):h[1].indexOf("class=")===0?O.extraClass=h[1].substring(6):(O.decoration===void 0&&(O.decoration=[]),h[1]==="beambr1"?O.beambr=1:h[1]==="beambr2"?O.beambr=2:O.decoration.push(h[1]))),t+=h[0];else if(h=qh(e,t),h[0]>0)O.gracenotes=h[1],t+=h[0];else break;if(h=Oh(e,t),h[0]>0){s=0,O.gracenotes!==void 0&&(O.rest={type:"spacer"},O.duration=.125,E.addFormattingOptions(O,Ze.formatting,"note"),Je.appendElement("note",r+t,r+t+h[0],O),E.measureNotEmpty=!0,O={});var p={type:h[1]};p.type.length===0?xe("Unknown bar type",e,t):(E.inEnding&&p.type!=="bar_thin"&&(p.endEnding=!0,E.inEnding=!1),h[2]&&(p.startEnding=h[2],E.inEnding&&(p.endEnding=!0),E.inEnding=!0,h[1]==="bar_right_repeat"?E.restoreStartEndingHoldOvers():E.duplicateStartEndingHoldOvers()),O.decoration!==void 0&&(p.decoration=O.decoration),O.chord!==void 0&&(p.chord=O.chord),p.startEnding&&E.barFirstEndingNum===void 0?E.barFirstEndingNum=E.currBarNumber:p.startEnding&&p.endEnding&&E.barFirstEndingNum?E.currBarNumber=E.barFirstEndingNum:p.endEnding&&(E.barFirstEndingNum=void 0),p.type!=="bar_invisible"&&E.measureNotEmpty&&Fr()&&(E.currBarNumber++,E.barNumbers&&E.currBarNumber%E.barNumbers===0&&(p.barNumber=E.currBarNumber)),E.addFormattingOptions(O,Ze.formatting,"bar"),Je.appendElement("bar",r+o,r+t+h[0],p),E.measureNotEmpty=!1,O={}),t+=h[0]}else if(e[t]==="&")h=Dh(e,t),h[0]>0&&(Je.appendElement("overlay",r,r+1,{}),t+=1,s++);else{if(h=Fh(e,t),h.consumed>0&&(h.startSlur!==void 0&&(O.startSlur=h.startSlur),h.dottedSlur&&(O.dottedSlur=!0),h.triplet!==void 0&&(a>0?xe("Can't nest triplets",e,t):(O.startTriplet=h.triplet,O.tripletMultiplier=h.tripletQ/h.triplet,O.tripletR=h.num_notes,a=h.num_notes===void 0?h.triplet:h.num_notes)),t+=h.consumed),e[t]==="["){var g=t;t++;for(var v=null,m=!1,y=!1;!y;){var k=Ni(e,t);k[0]>0&&(t+=k[0]);var b=Or(e,t,{},!1);if(b!==null&&b.pitch!==void 0)k[0]>0&&k[1].indexOf("style=")!==0&&(O.decoration===void 0&&(O.decoration=[]),O.decoration.push(k[1])),b.end_beam&&(O.end_beam=!0,delete b.end_beam),O.pitches===void 0?(O.duration=b.duration,O.pitches=[b]):O.pitches.push(b),delete b.duration,k[0]>0&&k[1].indexOf("style=")===0&&(O.pitches[O.pitches.length-1].style=k[1].substr(6)),E.inTieChord[O.pitches.length]&&(b.endTie=!0,E.inTieChord[O.pitches.length]=void 0),b.startTie&&(E.inTieChord[O.pitches.length]=!0),t=b.endChar,delete b.endChar;else if(e[t]===" ")xe("Spaces are not allowed in chords",e,t),t++;else{if(t<e.length&&e[t]==="]"){t++,E.next_note_duration!==0&&(O.duration=O.duration*E.next_note_duration,E.next_note_duration=0),Ai(E,s,O)&&(O.pitches.forEach(function(q){q.endTie=!0}),ft(E,s,!1)),a>0&&!(O.rest&&O.rest.type==="spacer")&&(a--,a===0&&(O.endTriplet=!0));for(var w=!1;t<e.length&&!w;){switch(e[t]){case" ":case" ":dt(O);break;case")":O.endSlur===void 0?O.endSlur=1:O.endSlur++;break;case"-":O.pitches.forEach(function(q){q.startTie={}}),ft(E,s,!0);break;case">":case"<":var C=Li(e,t);t+=C[0]-1,E.next_note_duration=C[2],v?v=v*C[1]:v=C[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var B=pe.getFraction(e,t);v=B.value,t=B.index;var L=e[t];L===" "&&(m=!0),L==="-"||L===")"||L===" "||L==="<"||L===">"?t--:w=!0;break;case"0":v=0;break;default:w=!0;break}w||t++}}else xe("Expected ']' to end the chords",e,t);O.pitches!==void 0&&(v!==null&&(O.duration=O.duration*v,m&&dt(O)),E.addFormattingOptions(O,Ze.formatting,"note"),Je.appendElement("note",r+o,r+t,O),E.measureNotEmpty=!0,O={}),y=!0}}}else{var N={},_=Or(e,t,N,!0);if(N.endTie!==void 0&&ft(E,s,!0),_!==null){_.pitch!==void 0?(O.pitches=[{}],_.accidental!==void 0&&(O.pitches[0].accidental=_.accidental),O.pitches[0].pitch=_.pitch,O.pitches[0].name=_.name,(_.midipitch||_.midipitch===0)&&(O.pitches[0].midipitch=_.midipitch),_.endSlur!==void 0&&(O.pitches[0].endSlur=_.endSlur),_.endTie!==void 0&&(O.pitches[0].endTie=_.endTie),_.startSlur!==void 0&&(O.pitches[0].startSlur=_.startSlur),O.startSlur!==void 0&&(O.pitches[0].startSlur=O.startSlur),O.dottedSlur!==void 0&&(O.pitches[0].dottedSlur=!0),_.startTie!==void 0&&(O.pitches[0].startTie=_.startTie),O.startTie!==void 0&&(O.pitches[0].startTie=O.startTie)):(O.rest=_.rest,_.rest.type==="multimeasure"&&Fr()&&(E.currBarNumber+=_.rest.text-1),_.endSlur!==void 0&&(O.endSlur=_.endSlur),_.endTie!==void 0&&(O.rest.endTie=_.endTie),_.startSlur!==void 0&&(O.startSlur=_.startSlur),_.startTie!==void 0&&(O.rest.startTie=_.startTie),O.startTie!==void 0&&(O.rest.startTie=O.startTie)),_.chord!==void 0&&(O.chord=_.chord),_.duration!==void 0&&(O.duration=_.duration),_.decoration!==void 0&&(O.decoration=_.decoration),_.graceNotes!==void 0&&(O.graceNotes=_.graceNotes),delete O.startSlur,delete O.dottedSlur,Ai(E,s,O)&&(O.pitches!==void 0?O.pitches[0].endTie=!0:O.rest.type!=="spacer"&&(O.rest.endTie=!0),ft(E,s,!1)),(_.startTie||O.startTie)&&ft(E,s,!0),t=_.endChar,a>0&&!(_.rest&&_.rest.type==="spacer")&&(a--,a===0&&(O.endTriplet=!0)),_.end_beam&&dt(O),O.rest&&O.rest.type==="rest"&&O.duration===1&&Bi(E)<=1&&(O.rest.type="whole",O.duration=Bi(E)),O.duration<1&&Ah.indexOf(O.duration)===-1&&O.duration!==0&&(!O.rest||O.rest.type!=="spacer")&&xe("Duration not representable: "+e.substring(o,t),e,t),E.addFormattingOptions(O,Ze.formatting,"note");var F=Je.appendElement("note",r+o,r+t,O);F||(this.startNewLine(),Je.appendElement("note",r+o,r+t,O)),E.measureNotEmpty=!0,O={}}}t===o&&(e[t]!==" "&&e[t]!=="`"&&xe("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||n[0]>0,this.lineContinuation||(O={})}};var ft=function(e,t,r){var i=e.currentVoice?e.currentVoice.staffNum*100+e.currentVoice.index:0;e.inTie[t]===void 0&&(e.inTie[t]=[]),e.inTie[t][i]=r},Lh=function(e,t){if(e[t]==='"'){var r=pe.getBrackettedSubstring(e,t,5);if(r[2]||xe("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&r[1][0]==="^")r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&r[1][0]==="_")r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&r[1][0]==="<")r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&r[1][0]===">")r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&r[1][0]==="@"){r[1]=r[1].substring(1);var i=pe.getFloat(r[1]);if(i.digits===0)return xe("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;if(r[1]=r[1].substring(i.digits),r[1][0]!==",")return xe("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(1);var a=pe.getFloat(r[1]);if(a.digits===0)return xe("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(a.digits);var n=pe.skipWhiteSpace(r[1]);r[1]=r[1].substring(n),r[2]=null,r[3]={x:i.value,y:a.value}}else E.freegchord!==!0&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1\u266D"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1\u266F"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2\xB0$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2\xB0"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2\xF8$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2\u2206$3")),r[2]="default",r[1]=Pi.chordName(E,r[1]);return r}return[0,""]},qh=function(e,t){if(e[t]==="{"){var r=pe.getBrackettedSubstring(e,t,1,"}");r[2]||xe("Missing the closing '}' while parsing grace note",e,t),e[t+r[0]]===")"&&(r[0]++,r[1]+=")");for(var i=[],a=0,n=!1;a<r[1].length;){var s=!1;r[1][a]==="/"&&(s=!0,a++);var o=Or(r[1],a,{},!1);o!==null?(o.duration=o.duration/(E.default_length*8),s&&(o.acciaccatura=!0),o.rest?xe("Rests not allowed as grace notes '"+r[1][a]+"' while parsing grace note",e,t):i.push(o),n&&(o.endTie=!0,n=!1),o.startTie&&(n=!0),a=o.endChar,delete o.endChar,o.end_beam&&(o.endBeam=!0,delete o.end_beam)):(r[1][a]===" "?i.length>0&&(i[i.length-1].endBeam=!0):xe("Unknown character '"+r[1][a]+"' while parsing grace note",e,t),a++)}if(i.length)return[r[0],i]}return[0]};function Dh(e,t){if(e[t]==="&"){for(var r=t;e[t]&&e[t]!==":"&&e[t]!=="|";)t++;return[t-r,e.substring(r+1,t)]}return[0]}function Bi(e){var t=e.origMeter;return!t||t.type!=="specified"||!t.value||t.value.length===0?1:parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10)}var Ni=function(e,t){var r=E.macros[e[t]];if(r!==void 0)return(r[0]==="!"||r[0]==="+")&&(r=r.substring(1)),(r[r.length-1]==="!"||r[r.length-1]==="+")&&(r=r.substring(0,r.length-1)),ki.includes(r)?[1,r]:Ti.includes(r)?(E.volumePosition==="hidden"&&(r=""),[1,r]):_i.includes(r)?(E.dynamicPosition==="hidden"&&(r=""),[1,r]):(E.ignoredDecorations.includes(r)||xe("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if(e[t+1]==="("||e[t+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var i=pe.getBrackettedSubstring(e,t,5);if(i[1].length>1&&(i[1][0]==="^"||i[1][0]==="_")&&(i[1]=i[1].substring(1)),ki.includes(i[1])||i[1].indexOf("class=")===0)return i;if(Ti.includes(i[1]))return E.volumePosition==="hidden"&&(i[1]=""),i;if(_i.includes(i[1]))return E.dynamicPosition==="hidden"&&(i[1]=""),i;var a=Si.findIndex(function(n){return i[1]===n[0]});return a>=0?(i[1]=Si[a][1],i):(a=Ei.findIndex(function(n){return i[1]===n[0]}),a>=0?(i[1]=Ei[a][1],E.dynamicPosition==="hidden"&&(i[1]=""),i):e[t]==="!"&&(i[0]===1||e[t+i[0]-1]!=="!")?[1,null]:(xe("Unknown decoration: "+i[1],e,t),i[1]="",i));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"];case"t":return[1,"trillh"]}return[0,0]},Ih=function(e,t){for(var r=t;pe.isWhiteSpace(e[t]);)t++;return[t-r]},Oh=function(e,t){var r=pe.getBarLine(e,t);if(r.len===0)return[0,""];if(r.warn)return xe(r.warn,e,t),[r.len,""];for(var i=0;i<e.length&&e[t+r.len+i]===" ";i++);var a=r.len;if(e[t+r.len+i]==="["&&(r.len+=i+1),e[t+r.len]==='"'&&e[t+r.len-1]==="["){var n=pe.getBrackettedSubstring(e,t+r.len,5);return[r.len+n[0],r.token,n[1]]}var s=pe.getTokenOf(e.substring(t+r.len),"1234567890-,");return s.len===0||s.token[0]==="-"?[a,r.token]:[r.len+s.len,r.token,s.token]},Fh=function(e,t){var r={},i=t;for(e[t]==="."&&e[t+1]==="("&&(r.dottedSlur=!0,t++);e[t]==="("||pe.isWhiteSpace(e[t]);)e[t]==="("&&(t+1<e.length&&e[t+1]>="2"&&e[t+1]<="9"?(r.triplet!==void 0?xe("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=Ph[r.triplet],r.num_notes=r.triplet,t+2<e.length&&e[t+2]===":"&&(t+3<e.length&&e[t+3]===":"?t+4<e.length&&e[t+4]>="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):xe("expected number after the two colons after the triplet to mark the duration",e,t):t+3<e.length&&e[t+3]>="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4<e.length&&e[t+4]===":"?t+5<e.length&&e[t+5]>="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):xe("expected number after the triplet to mark the duration",e,t))),t++):r.startSlur===void 0?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r};Hr.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};E.partForNextLine.title&&(e.part=E.partForNextLine),e.clef=E.currentVoice&&E.staves[E.currentVoice.staffNum].clef!==void 0?Object.assign({},E.staves[E.currentVoice.staffNum].clef):Object.assign({},E.clef);var t=E.currentVoice?E.currentVoice.scoreTranspose:0;if(e.key=Ci.standardKey(E.key.root+E.key.acc+E.key.mode,E.key.root,E.key.acc,t),e.key.mode=E.key.mode,E.key.impliedNaturals&&(e.key.impliedNaturals=E.key.impliedNaturals),E.key.explicitAccidentals)for(var r=0;r<E.key.explicitAccidentals.length;r++){for(var i=!1,a=0;a<e.key.accidentals.length;a++)e.key.accidentals[a].note===E.key.explicitAccidentals[r].note&&(e.key.accidentals[a].acc=E.key.explicitAccidentals[r].acc,i=!0);i||e.key.accidentals.push(E.key.explicitAccidentals[r])}if(E.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,Ci.addPosToKey(e.clef,e.key),E.meter!==null?(E.currentVoice?(E.staves.forEach(function(c){c.meter=E.meter}),e.meter=E.staves[E.currentVoice.staffNum].meter,E.staves[E.currentVoice.staffNum].meter=null):e.meter=E.meter,E.meter=null):E.currentVoice&&E.staves[E.currentVoice.staffNum].meter&&(e.meter=E.staves[E.currentVoice.staffNum].meter,E.staves[E.currentVoice.staffNum].meter=null),E.currentVoice&&E.currentVoice.name&&(e.name=E.currentVoice.name),E.vocalfont&&(e.vocalfont=E.vocalfont),E.tripletfont&&(e.tripletfont=E.tripletfont),E.gchordfont&&(e.gchordfont=E.gchordfont),E.style&&(e.style=E.style),E.currentVoice){var n=E.staves[E.currentVoice.staffNum];n.brace&&(e.brace=n.brace),n.bracket&&(e.bracket=n.bracket),n.connectBarLines&&(e.connectBarLines=n.connectBarLines),n.name&&(e.name=n.name[E.currentVoice.index]),n.subname&&(e.subname=n.subname[E.currentVoice.index]),E.currentVoice.stem&&(e.stem=E.currentVoice.stem),E.currentVoice.stafflines&&(e.stafflines=E.currentVoice.stafflines),E.currentVoice.staffscale&&(e.staffscale=E.currentVoice.staffscale),E.currentVoice.scale&&(e.scale=E.currentVoice.scale),E.currentVoice.color&&(e.color=E.currentVoice.color),E.currentVoice.style&&(e.style=E.currentVoice.style),E.currentVoice.transpose&&(e.clef.transpose=E.currentVoice.transpose),e.currentVoice=E.currentVoice;for(var s=Object.keys(E.voices),o=0;o<s.length;o++)e.currentVoice.staffNum===E.voices[s[o]].staffNum&&e.currentVoice.index===E.voices[s[o]].index&&(e.currentVoiceName=s[o])}E.barNumbers===0&&Fr()&&E.currBarNumber!==1&&(e.barNumber=E.currBarNumber),Je.startNewLine(e),E.key.impliedNaturals&&delete E.key.impliedNaturals,E.partForNextLine={},E.tempoForNextLine.length===4&&Je.appendElement(E.tempoForNextLine[0],E.tempoForNextLine[1],E.tempoForNextLine[2],E.tempoForNextLine[3]),E.tempoForNextLine=[]};var dt=function(e){return e.duration!==void 0&&e.duration<.25&&(e.end_beam=!0),e},Or=function(e,t,r,i){var a=function(l){return l==="octave"||l==="duration"||l==="Zduration"||l==="broken_rhythm"||l==="end_slur"},n;e[t]==="."&&e[t+1]==="-"&&(n=!0,t++);for(var s="startSlur",o=!1;;){switch(e[t]){case"(":if(s==="startSlur")r.startSlur===void 0?r.startSlur=1:r.startSlur++;else return a(s)?(r.endChar=t,r):null;break;case")":if(a(s))r.endSlur===void 0?r.endSlur=1:r.endSlur++;else return null;break;case"^":if(s==="startSlur")r.accidental="sharp",s="sharp2";else if(s==="sharp2")r.accidental="dblsharp",s="pitch";else return a(s)?(r.endChar=t,r):null;break;case"_":if(s==="startSlur")r.accidental="flat",s="flat2";else if(s==="flat2")r.accidental="dblflat",s="pitch";else return a(s)?(r.endChar=t,r):null;break;case"=":if(s==="startSlur")r.accidental="natural",s="pitch";else return a(s)?(r.endChar=t,r):null;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(s==="startSlur"||s==="sharp2"||s==="flat2"||s==="pitch"){if(r.pitch=Bh[e[t]],r.pitch+=7*(E.currentVoice&&E.currentVoice.octave!==void 0?E.currentVoice.octave:E.octave),r.name=e[t],r.accidental&&(r.name=Mi[r.accidental]+r.name),Pi.note(E,r),s="octave",i&&E.next_note_duration!==0?(r.duration=E.default_length*E.next_note_duration,E.next_note_duration=0,o=!0):r.duration=E.default_length,E.clef&&E.clef.type==="perc"||E.currentVoice&&E.currentVoice.clef==="perc"){var c=e[t];r.accidental&&(c=Mi[r.accidental]+c),Ze.formatting&&Ze.formatting.midi&&Ze.formatting.midi.drummap&&(r.midipitch=Ze.formatting.midi.drummap[c])}}else return a(s)?(r.endChar=t,r):null;break;case",":if(s==="octave")r.pitch-=7,r.name+=",";else return a(s)?(r.endChar=t,r):null;break;case"'":if(s==="octave")r.pitch+=7,r.name+="'";else return a(s)?(r.endChar=t,r):null;break;case"x":case"X":case"y":case"z":case"Z":if(s==="startSlur")r.rest={type:Nh[e[t]]},delete r.accidental,delete r.startSlur,delete r.startTie,delete r.endSlur,delete r.endTie,delete r.end_beam,delete r.grace_notes,r.rest.type.indexOf("multimeasure")>=0?(r.duration=Ze.getBarLength(),r.rest.text=1,s="Zduration"):(i&&E.next_note_duration!==0?(r.duration=E.default_length*E.next_note_duration,E.next_note_duration=0,o=!0):r.duration=E.default_length,s="duration");else return a(s)?(r.endChar=t,r):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(s==="octave"||s==="duration"){var h=pe.getFraction(e,t);for(r.duration=r.duration*h.value,r.endChar=h.index;h.index<e.length&&(pe.isWhiteSpace(e[h.index])||e[h.index]==="-");)e[h.index]==="-"?r.startTie={}:r=dt(r),h.index++;t=h.index-1,s="broken_rhythm"}else if(s==="sharp2")r.accidental="quartersharp",s="pitch";else if(s==="flat2")r.accidental="quarterflat",s="pitch";else if(s==="Zduration"){var d=pe.getNumber(e,t);return r.duration=d.num*Ze.getBarLength(),r.rest.text=d.num,r.endChar=d.index,r}else return null;break;case"-":if(s==="startSlur")Je.addTieToLastNote(n),r.endTie=!0;else if(s==="octave"||s==="duration"||s==="end_slur")if(r.startTie={},!o&&i)s="broken_rhythm";else return pe.isWhiteSpace(e[t+1])&&dt(r),r.endChar=t+1,r;else return s==="broken_rhythm"?(r.endChar=t,r):null;break;case" ":case" ":if(a(s)){r.end_beam=!0,n=!1;do e[t]==="."&&e[t+1]==="-"&&(n=!0,t++),e[t]==="-"&&(r.startTie={},n&&(r.startTie.style="dotted")),t++;while(t<e.length&&(pe.isWhiteSpace(e[t])||e[t]==="-")||e[t]==="."&&e[t+1]==="-");if(r.endChar=t,!o&&i&&(e[t]==="<"||e[t]===">"))t--,s="broken_rhythm";else return r}else return null;break;case">":case"<":if(a(s))if(i){var f=Li(e,t);t+=f[0]-1,E.next_note_duration=f[2],r.duration=f[1]*r.duration,s="end_slur"}else return r.endChar=t,r;else return null;break;default:return a(s)?(r.endChar=t,r):null}if(t++,t===e.length)return a(s)?(r.endChar=t,r):null}return null},Li=function(e,t){switch(e[t]){case">":return t<e.length-2&&e[t+1]===">"&&e[t+2]===">"?[3,1.875,.125]:t<e.length-1&&e[t+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-2&&e[t+1]==="<"&&e[t+2]==="<"?[3,.125,1.875]:t<e.length-1&&e[t+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function Fr(){return E.currentVoice===void 0||E.currentVoice.staffNum===0&&E.currentVoice.index===0}qi.exports=Hr});var Oi=P((h6,Ii)=>{"use strict";var Se=Qe(),zr=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(f){for(var l=0;l<f.length;l++)if(!this.isWhiteSpace(f[l]))return l;return f.length};var r=function(f,l){return l>=f.length};this.eatWhiteSpace=function(f,l){for(var u=l;u<f.length;u++)if(!this.isWhiteSpace(f[u]))return u-l;return u-l},this.getKeyPitch=function(f){var l=this.skipWhiteSpace(f);if(r(f,l))return{len:0};switch(f[l]){case"A":return{len:l+1,token:"A"};case"B":return{len:l+1,token:"B"};case"C":return{len:l+1,token:"C"};case"D":return{len:l+1,token:"D"};case"E":return{len:l+1,token:"E"};case"F":return{len:l+1,token:"F"};case"G":return{len:l+1,token:"G"}}return{len:0}},this.getSharpFlat=function(f){if(f==="bass")return{len:0};switch(f[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(f){var l=function(g,v){for(;v<g.length&&(g[v]>="a"&&g[v]<="z"||g[v]>="A"&&g[v]<="Z");)v++;return v},u=this.skipWhiteSpace(f);if(r(f,u))return{len:0};var p=f.substring(u,u+3).toLowerCase();switch((p.length>1&&p[1]===" "||p[1]==="^"||p[1]==="_"||p[1]==="=")&&(p=p[0]),p){case"mix":return{len:l(f,u),token:"Mix"};case"dor":return{len:l(f,u),token:"Dor"};case"phr":return{len:l(f,u),token:"Phr"};case"lyd":return{len:l(f,u),token:"Lyd"};case"loc":return{len:l(f,u),token:"Loc"};case"aeo":return{len:l(f,u),token:"m"};case"maj":return{len:l(f,u),token:""};case"ion":return{len:l(f,u),token:""};case"min":return{len:l(f,u),token:"m"};case"m":return{len:l(f,u),token:"m"}}return{len:0}},this.getClef=function(f,l){var u=f,p=this.skipWhiteSpace(f);if(r(f,p))return{len:0};var g=!1,v=f.substring(p);if(Se.startsWith(v,"clef=")&&(g=!0,v=v.substring(5),p+=5),v.length===0&&g)return{len:p+5,warn:"No clef specified: "+u};var m=this.skipWhiteSpace(v);if(r(v,m))return{len:0};m>0&&(p+=m,v=v.substring(m));var y=null;if(Se.startsWith(v,"treble"))y="treble";else if(Se.startsWith(v,"bass3"))y="bass3";else if(Se.startsWith(v,"bass"))y="bass";else if(Se.startsWith(v,"tenor"))y="tenor";else if(Se.startsWith(v,"alto2"))y="alto2";else if(Se.startsWith(v,"alto1"))y="alto1";else if(Se.startsWith(v,"alto"))y="alto";else if(!l&&g&&Se.startsWith(v,"none"))y="none";else if(Se.startsWith(v,"perc"))y="perc";else if(!l&&g&&Se.startsWith(v,"C"))y="tenor";else if(!l&&g&&Se.startsWith(v,"F"))y="bass";else if(!l&&g&&Se.startsWith(v,"G"))y="treble";else return{len:p+5,warn:"Unknown clef specified: "+u};return v=v.substring(y.length),m=this.isMatch(v,"+8"),m>0?y+="+8":(m=this.isMatch(v,"-8"),m>0&&(y+="-8")),{len:p+y.length,token:y,explicit:g}},this.getBarLine=function(f,l){switch(f[l]){case"]":switch(++l,f[l]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++l,f[l]>="1"&&f[l]<="9"||f[l]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++l,f[l]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++l,f[l]){case"]":return++l,f[l]==="|"?(++l,f[l]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"}):{len:3,token:"bar_right_repeat"};case"|":return++l,f[l]===":"?{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(++l,f[l]==="|")switch(++l,f[l]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return f[l]>="1"&&f[l]<="9"||f[l]==='"'?{len:1,token:"bar_invisible"}:{len:0};break;case"|":switch(++l,f[l]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++l,f[l]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var u=0;f[l+u]===":";)u++;return{len:1+u,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}break}return{len:0}},this.getTokenOf=function(f,l){for(var u=0;u<f.length;u++)if(l.indexOf(f[u])<0)return{len:u,token:f.substring(0,u)};return{len:u,token:f}},this.getToken=function(f,l,u){for(var p=l;p<u&&!this.isWhiteSpace(f[p]);)p++;return f.substring(l,p)},this.isMatch=function(f,l){var u=this.skipWhiteSpace(f);return r(f,u)?0:Se.startsWith(f.substring(u),l)?u+l.length:0},this.getPitchFromTokens=function(f){var l={},u={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(l.position=u[f[0].token],l.position===void 0)return{warn:"Pitch expected. Found: "+f[0].token};for(f.shift();f.length;)switch(f[0].token){case",":l.position-=7,f.shift();break;case"'":l.position+=7,f.shift();break;default:return l}return l},this.getKeyAccidentals2=function(f){for(var l;f.length>0;){var u;if(f[0].token==="^"){if(u="sharp",f.shift(),f.length===0)return{accs:l,warn:"Expected note name after "+u};switch(f[0].token){case"^":u="dblsharp",f.shift();break;case"/":u="quartersharp",f.shift();break}}else if(f[0].token==="=")u="natural",f.shift();else if(f[0].token==="_"){if(u="flat",f.shift(),f.length===0)return{accs:l,warn:"Expected note name after "+u};switch(f[0].token){case"_":u="dblflat",f.shift();break;case"/":u="quarterflat",f.shift();break}}else return{accs:l};if(f.length===0)return{accs:l,warn:"Expected note name after "+u};switch(f[0].token[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":l===void 0&&(l=[]),l.push({acc:u,note:f[0].token[0]}),f[0].token.length===1?f.shift():f[0].token=f[0].token.substring(1);break;default:return{accs:l,warn:"Expected note name after "+u+" Found: "+f[0].token}}}return{accs:l}},this.getKeyAccidental=function(f){var l={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},u=this.skipWhiteSpace(f);if(r(f,u))return{len:0};var p=null;switch(f[u]){case"^":case"_":case"=":p=f[u];break;default:return{len:0}}if(u++,r(f,u))return{len:1,warn:"Expected note name after accidental"};switch(f[u]){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:u+1,token:{acc:l[p],note:f[u]}};case"^":case"_":case"/":if(p+=f[u],u++,r(f,u))return{len:2,warn:"Expected note name after accidental"};switch(f[u]){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:u+1,token:{acc:l[p],note:f[u]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(f){return f===" "||f===" "||f===""},this.getMeat=function(f,l,u){var p=f.indexOf("%",l);for(p>=0&&p<u&&(u=p);l<u&&(f[l]===" "||f[l]===" "||f[l]==="");)l++;for(;l<u&&(f[u-1]===" "||f[u-1]===" "||f[u-1]==="");)u--;return{start:l,end:u}};var i=function(f){return f>="A"&&f<="Z"||f>="a"&&f<="z"},a=function(f){return f>="0"&&f<="9"};this.tokenize=function(f,l,u,p){var g=this.getMeat(f,l,u);l=g.start,u=g.end;for(var v=[],m;l<u;){if(f[l]==='"'){for(m=l+1;m<u&&f[m]!=='"';)m++;v.push({type:"quote",token:f.substring(l+1,m),start:l+1,end:m}),m++}else if(i(f[l])){if(m=l+1,p)for(;m<u&&!this.isWhiteSpace(f[m]);)m++;else for(;m<u&&i(f[m]);)m++;v.push({type:"alpha",token:f.substring(l,m),continueId:a(f[m]),start:l,end:m}),l=m+1}else if(f[l]==="."&&a(f[m+1])){m=l+1;for(var y=null,k=null;m<u&&a(f[m]);)m++;k=parseFloat(f.substring(l,m)),v.push({type:"number",token:f.substring(l,m),intt:y,floatt:k,continueId:i(f[m]),start:l,end:m}),l=m+1}else if(a(f[l])||f[l]==="-"&&a(f[m+1])){m=l+1;for(var b=null,w=null;m<u&&a(f[m]);)m++;if(f[m]==="."&&a(f[m+1]))for(m++;m<u&&a(f[m]);)m++;else b=parseInt(f.substring(l,m));w=parseFloat(f.substring(l,m)),v.push({type:"number",token:f.substring(l,m),intt:b,floatt:w,continueId:i(f[m]),start:l,end:m}),l=m+1}else f[l]===" "||f[l]===" "||v.push({type:"punct",token:f[l],start:l,end:l+1}),m=l+1;l=m}return v},this.getVoiceToken=function(f,l,u){for(var p=l;p<u&&this.isWhiteSpace(f[p])||f[p]==="=";)p++;if(f[p]==='"'){var g=f.indexOf('"',p+1);return g===-1||g>=u?{len:1,err:"Missing close quote"}:{len:g-l+1,token:this.translateString(f.substring(p+1,g))}}else{for(var v=p;v<u&&!this.isWhiteSpace(f[v])&&f[v]!=="=";)v++;return{len:v-l+1,token:f.substring(p,v)}}};var n={"`a":"\xE0","'a":"\xE1","^a":"\xE2","~a":"\xE3",'"a':"\xE4",oa:"\xE5",aa:"\xE5","=a":"\u0101",ua:"\u0103",";a":"\u0105","`e":"\xE8","'e":"\xE9","^e":"\xEA",'"e':"\xEB","=e":"\u0113",ue:"\u0115",";e":"\u0119",".e":"\u0117","`i":"\xEC","'i":"\xED","^i":"\xEE",'"i':"\xEF","=i":"\u012B",ui:"\u012D",";i":"\u012F","`o":"\xF2","'o":"\xF3","^o":"\xF4","~o":"\xF5",'"o':"\xF6","=o":"\u014D",uo:"\u014F","/o":"\xF8","`u":"\xF9","'u":"\xFA","^u":"\xFB","~u":"\u0169",'"u':"\xFC",ou:"\u016F","=u":"\u016B",uu:"\u016D",";u":"\u0173","`A":"\xC0","'A":"\xC1","^A":"\xC2","~A":"\xC3",'"A':"\xC4",oA:"\xC5",AA:"\xC5","=A":"\u0100",uA:"\u0102",";A":"\u0104","`E":"\xC8","'E":"\xC9","^E":"\xCA",'"E':"\xCB","=E":"\u0112",uE:"\u0114",";E":"\u0118",".E":"\u0116","`I":"\xCC","'I":"\xCD","^I":"\xCE","~I":"\u0128",'"I':"\xCF","=I":"\u012A",uI:"\u012C",";I":"\u012E",".I":"\u0130","`O":"\xD2","'O":"\xD3","^O":"\xD4","~O":"\xD5",'"O':"\xD6","=O":"\u014C",uO:"\u014E","/O":"\xD8","`U":"\xD9","'U":"\xDA","^U":"\xDB","~U":"\u0168",'"U':"\xDC",oU:"\u016E","=U":"\u016A",uU:"\u016C",";U":"\u0172",ae:"\xE6",AE:"\xC6",oe:"\u0153",OE:"\u0152",ss:"\xDF","'c":"\u0107","^c":"\u0109",uc:"\u010D",cc:"\xE7",".c":"\u010B",cC:"\xC7","'C":"\u0106","^C":"\u0108",uC:"\u010C",".C":"\u010A","~N":"\xD1","~n":"\xF1","=s":"\u0161",vs:"\u0161",DH:"\xD0",dh:"\xF0",HO:"\u0150",Ho:"\u0151",HU:"\u0170",Hu:"\u0171","'Y":"\xDD","'y":"\xFD","^Y":"\u0176","^y":"\u0177",'"Y':"\u0178",'"y':"\xFF",vS:"\u0160",vZ:"\u017D",vz:"\u017E"},s={"#":"\u266F",b:"\u266D","=":"\u266E"},o={201:"\u266F",202:"\u266D",203:"\u266E",241:"\xA1",242:"\xA2",252:"a",262:"2",272:"o",302:"\xC2",312:"\xCA",322:"\xD2",332:"\xDA",342:"\xE2",352:"\xEA",362:"\xF2",372:"\xFA",243:"\xA3",253:"\xAB",263:"3",273:"\xBB",303:"\xC3",313:"\xCB",323:"\xD3",333:"\xDB",343:"\xE3",353:"\xEB",363:"\xF3",373:"\xFB",244:"\xA4",254:"\xAC",264:" \u0301",274:"1\u20444",304:"\xC4",314:"\xCC",324:"\xD4",334:"\xDC",344:"\xE4",354:"\xEC",364:"\xF4",374:"\xFC",245:"\xA5",255:"-",265:"\u03BC",275:"1\u20442",305:"\xC5",315:"\xCD",325:"\xD5",335:"\xDD",345:"\xE5",355:"\xED",365:"\xF5",375:"\xFD",246:"\xA6",256:"\xAE",266:"\xB6",276:"3\u20444",306:"\xC6",316:"\xCE",326:"\xD6",336:"\xDE",346:"\xE6",356:"\xEE",366:"\xF6",376:"\xFE",247:"\xA7",257:" \u0304",267:"\xB7",277:"\xBF",307:"\xC7",317:"\xCF",327:"\xD7",337:"\xDF",347:"\xE7",357:"\xEF",367:"\xF7",377:"\xFF",250:" \u0308",260:"\xB0",270:" \u0327",300:"\xC0",310:"\xC8",320:"\xD0",330:"\xD8",340:"\xE0",350:"\xE8",360:"\xF0",370:"\xF8",251:"\xA9",261:"\xB1",271:"1",301:"\xC1",311:"\xC9",321:"\xD1",331:"\xD9",341:"\xE1",351:"\xE9",361:"\xF1",371:"\xF9"};this.translateString=function(f){var l=f.split("\\");if(l.length===1)return f;var u=null;return l.forEach(function(p){if(u===null)u=p;else{var g=n[p.substring(0,2)];g!==void 0?u+=g+p.substring(2):(g=o[p.substring(0,3)],g!==void 0?u+=g+p.substring(3):(g=s[p.substring(0,1)],g!==void 0?u+=g+p.substring(1):u+="\\"+p))}}),u},this.getNumber=function(f,l){for(var u=0;l<f.length;)switch(f[l]){case"0":u=u*10,l++;break;case"1":u=u*10+1,l++;break;case"2":u=u*10+2,l++;break;case"3":u=u*10+3,l++;break;case"4":u=u*10+4,l++;break;case"5":u=u*10+5,l++;break;case"6":u=u*10+6,l++;break;case"7":u=u*10+7,l++;break;case"8":u=u*10+8,l++;break;case"9":u=u*10+9,l++;break;default:return{num:u,index:l}}return{num:u,index:l}},this.getFraction=function(f,l){var u=1,p=1;if(f[l]!=="/"){var g=this.getNumber(f,l);u=g.num,l=g.index}if(f[l]==="/")if(l++,f[l]==="/"){for(var v=.5;f[l++]==="/";)v=v/2;return{value:u*v,index:l-1}}else{var m=l,y=this.getNumber(f,l);y.num===0&&m===l&&(y.num=2),y.num!==0&&(p=y.num),l=y.index}return{value:u/p,index:l}};function c(f){let u=/^(\d+)\./.exec(f);return u?u[1]:null}var h=[{match:/,\s*The$/,replace:"The "},{match:/,\s*the$/,replace:"the "},{match:/,\s*A$/,replace:"A "},{match:/,\s*a$/,replace:"a "},{match:/,\s*An$/,replace:"An "},{match:/,\s*an$/,replace:"an "},{match:/,\s*Da$/,replace:"Da "},{match:/,\s*La$/,replace:"La "},{match:/,\s*Le$/,replace:"Le "},{match:/,\s*Les$/,replace:"Les "},{match:/,\s*Ye$/,replace:"Ye "}];this.theReverser=function(f){for(var l=0;l<h.length;l++){var u=h[l],p=f.match(u.match);if(p){var g=c(f);g&&(f=f.replace(g+".",""),f=f.trim());var v=p[0].length,m=u.replace+f.substring(0,f.length-v);return g&&(m=g+". "+m),m}}return f},this.stripComment=function(f){var l=f.indexOf("%");return l>=0?Se.strip(f.substring(0,l)):Se.strip(f)},this.getInt=function(f){var l=parseInt(f);if(isNaN(l))return{digits:0};var u=""+l,p=f.indexOf(u);return{value:l,digits:p+u.length}},this.getFloat=function(f){var l=parseFloat(f);if(isNaN(l))return{digits:0};var u=""+l,p=f.indexOf(u);return{value:l,digits:p+u.length}},this.getMeasurement=function(f){if(f.length===0)return{used:0};var l=1,u="";if(f[0].token==="-")f.shift(),u="-",l++;else if(f[0].type!=="number")return{used:0};if(u+=f.shift().token,f.length===0)return{used:1,value:parseInt(u)};var p=f.shift();if(p.token==="."){if(l++,f.length===0)return{used:l,value:parseInt(u)};if(f[0].type==="number"&&(p=f.shift(),u=u+"."+p.token,l++,f.length===0))return{used:l,value:parseFloat(u)};p=f.shift()}switch(p.token){case"pt":return{used:l+1,value:parseFloat(u)};case"px":return{used:l+1,value:parseFloat(u)};case"cm":return{used:l+1,value:parseFloat(u)/2.54*72};case"in":return{used:l+1,value:parseFloat(u)*72};default:return f.unshift(p),{used:l,value:parseFloat(u)}}};var d=function(f){return f=f.replace(/\\n/g,`
|
|
6
|
+
`),f=f.replace(/\\"/g,'"'),f};this.getBrackettedSubstring=function(f,l,u,p){for(var g=p||f[l],v=l+1,m=!1;v<f.length&&(m||f[v]!==g);)m=f[v]==="\\",++v;return f[v]===g?[v-l+1,d(f.substring(l+1,v)),!0]:(v=l+u,v>f.length-1&&(v=f.length-1),[v-l+1,d(f.substring(l+1,v)),!1])}};zr.prototype.peekLine=function(){return this.lines[this.lineIndex]};zr.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var e=this.lines[this.lineIndex];return this.lineIndex++,e}return null};Ii.exports=zr});var Rr=P((f6,Fi)=>{"use strict";function Hh(e,t,r){if(!(!t||e.lines.length===0)){var i=e.deline({lineBreaks:!1}),a=Rh(i,t);e.lines=zh(i,a,r),e.lineBreaks=a}}function zh(e,t,r){for(var i=[],a=[],n=[],s=1,o=0;o<t.length;o++){var c=t[o];if(e[c.ogLine].staff){var h=e[c.ogLine].staff[c.staff];if(i[c.line]||(i[c.line]={staff:[]}),!i[c.line].staff[c.staff]){i[c.line].staff[c.staff]={voices:[]},r!==void 0&&c.staff===0&&c.line>0&&(i[c.line].staff[c.staff].barNumber=s);for(var d=Object.keys(h),f=0;f<d.length;f++){var l=d[f]==="voices";d[f]==="meter"&&c.line!==0&&(l=!0),l||(i[c.line].staff[c.staff][d[f]]=h[d[f]])}a[c.staff]&&(i[c.line].staff[c.staff].key=a[c.staff])}i[c.line].staff[c.staff].voices[c.voice]||(i[c.line].staff[c.staff].voices[c.voice]=[]),i[c.line].staff[c.staff].voices[c.voice]=e[c.ogLine].staff[c.staff].voices[c.voice].slice(c.start,c.end+1),n[c.staff*10+c.voice]&&i[c.line].staff[c.staff].voices[c.voice].unshift({el_type:"stem",direction:n[c.staff*10+c.voice].direction});for(var u=i[c.line].staff[c.staff].voices[c.voice],p=u.length-1;p>=0;p--)if(u[p].el_type==="key"){a[c.staff]={root:u[p].root,acc:u[p].acc,mode:u[p].mode,accidentals:u[p].accidentals.filter(function(v){return v.acc!=="natural"})};break}for(p=u.length-1;p>=0;p--)if(u[p].el_type==="stem"){n[c.staff*10+c.voice]={direction:u[p].direction};break}if(r!==void 0&&c.staff===0&&c.voice===0)for(p=0;p<u.length;p++)u[p].el_type==="bar"&&(s++,p===u.length-1?delete u[p].barNumber:u[p].barNumber=s)}else i[c.line]=e[c.ogLine]}for(var g=0;g<i.length;g++)i[g].staff&&(i[g].staff=i[g].staff.filter(function(v){return v!=null}));return i}function Rh(e,t){for(var r=[],i=0,a=0,n=0,s=0;s<e.length;s++){var o=e[s];if(o.staff){var c=a,h=t[i];i++;for(var d=0;d<o.staff.length;d++)for(var f=o.staff[d],l=0;l<f.voices.length;l++){n=c;for(var u=0,p=0,g=f.voices[l],v=0,m=0;m<g.length;m++){var y=g[m];y.el_type==="bar"&&(h[p]===u&&(r.push({ogLine:s,line:n,staff:d,voice:l,start:v,end:m}),v=m+1,n++,a=Math.max(a,n),p++),u++)}r.push({ogLine:s,line:n,staff:d,voice:l,start:v,end:g.length}),n++,a=Math.max(a,n)}}else r.push({ogLine:s,line:n}),n++,a=Math.max(a,n)}return r}function Gh(e,t){for(var r=[],i=[],a=0,n=0;n<e.length;n++){var s=e[n],o=a+s;if(o<t)a=o;else{var c=t-a,h=o-t;c<h&&a>0?(r.push(n-1),i.push(Math.round(a-s)),a=s):n<e.length-1&&(r.push(n),i.push(Math.round(a)),a=0)}}return i.push(Math.round(a)),{lineBreaks:r,totals:i}}function Ut(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function Yh(e,t,r,i,a,n,s,o,c,h,d){for(var f=h;f<e.length;f++){var l=e[f];r+=l,i+=l;var u=Math.abs(r-t[o]),p=Math.abs(u-n)<t[0]/10;if(p)if(u<n){var g=Ut(a),v=Ut(c);v.push(f-1),g.push(i-l),d.push({accumulator:r,lineAccumulator:l,lineWidths:g,lastVariance:Math.abs(r-t[o+1]),highestVariance:Math.max(s,n),currLine:o+1,lineBreaks:v,startIndex:f+1})}else u>n&&f<e.length-1&&(g=Ut(a),v=Ut(c),d.push({accumulator:r,lineAccumulator:i,lineWidths:g,lastVariance:u,highestVariance:Math.max(s,u),currLine:o,lineBreaks:v,startIndex:f+1}));u>n?(c.push(f-1),o++,s=Math.max(s,n),n=Math.abs(r-t[o]),a.push(i-l),i=l):n=u}a.push(i)}function Wh(e,t,r,i){for(var a=Math.ceil(e.total/t),n=Math.floor(e.total/a),s=[],o=0;o<a;o++)s.push(n*(o+1));var c=[];c.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var h=0;h<c.length;)Yh(e.measureWidths,s,c[h].accumulator,c[h].lineAccumulator,c[h].lineWidths,c[h].lastVariance,c[h].highestVariance,c[h].currLine,c[h].lineBreaks,c[h].startIndex,c),h++;for(o=0;o<c.length;o++){var d=c[o];d.variances=[],d.aveVariance=0;for(var f=0;f<d.lineWidths.length;f++){var l=d.lineWidths[f];d.variances.push(l-s[0]),d.aveVariance+=Math.abs(l-s[0])}d.aveVariance=d.aveVariance/d.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:d.lineBreaks,variances:d.variances,aveVariance:d.aveVariance,widths:e.measureWidths})}var u=9999999,p=-1;for(o=0;o<c.length;o++)d=c[o],d.aveVariance<u&&(u=d.aveVariance,p=o);return{failed:!1,lineBreaks:c[p].lineBreaks,variance:c[p].highestVariance}}function Xh(e,t,r){for(var i=[],a=[],n=0,s=!1,o=0;o<e.length;o++)n+=e[o],n>t&&(s=!0),o%r===r-1&&(o!==e.length-1&&i.push(o),a.push(Math.round(n)),n=0);return{failed:s,totals:a,lineBreaks:i}}function Uh(e,t,r){var i={lineBreaks:e,staffwidth:t};for(var a in r)r.hasOwnProperty(a)&&a!=="wrap"&&a!=="staffwidth"&&(i[a]=r[a]);return{revisedParams:i}}function jh(e,t,r){if(t.length===0||r.staffwidth<t[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:r};var i=r.scale?Math.max(r.scale,.1):1,a=r.wrap.minSpacing?Math.max(parseFloat(r.wrap.minSpacing),1):1,n=r.wrap.minSpacingLimit?Math.max(parseFloat(r.wrap.minSpacingLimit),1):a-.1,s=r.wrap.maxSpacing?Math.max(parseFloat(r.wrap.maxSpacing),1):void 0;r.wrap.lastLineLimit&&!s&&(s=Math.max(parseFloat(r.wrap.lastLineLimit),1));for(var o=r.wrap.preferredMeasuresPerLine?Math.max(parseInt(r.wrap.preferredMeasuresPerLine,10),0):void 0,c=[],h=[],d=0;d<t.length;d++){var f=t[d],l=r.staffwidth-f.left,u=l/a/i,p=l/s/i,g=l/n/i,v={widths:f,lineBreakPoint:u,minLineSize:p,attempts:[],staffWidth:r.staffwidth,minWidth:Math.round(g)},m=null;if(o){var y=Xh(f.measureWidths,u,o);v.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:o,lineBreaks:y.lineBreaks,failed:y.failed,totals:y.totals}),y.failed||(m=y.lineBreaks)}if(!m){var k=Gh(f.measureWidths,u);v.attempts.push({type:"Free Form",lineBreaks:k.lineBreaks,totals:k.totals}),m=k.lineBreaks,m.length>0&&f.measureWidths.length<25&&(k=Wh(f,u,m,v),v.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(m=k.lineBreaks))}c.push(m),h.push(v)}var b=r.staffwidth,w=Uh(c,b,r);return w.explanation=h,w.reParse=!0,w}Fi.exports={wrapLines:Hh,calcLineWraps:jh}});var Gi=P((u6,Ri)=>{"use strict";function Vh(e){let t=e.getMeterFraction(),r=t.num===4&&t.den===4;if(!(t.num===2&&t.den===2)&&!r)throw new Error("notCommonTime");let a=e.deline(),n=[],s=!1;return a.forEach(o=>{if(o.subtitle)s&&n.push({type:"subtitle",subtitle:o.subtitle.text});else if(o.text)s=!0,n.push({type:"text",text:o.text.text});else if(o.staff){s=!0;let c=o.staff,h=Kh(c);n=n.concat(h)}}),Qh(n),Jh(n),Zh(n),n}var Hi=["break","(break)","no chord","n.c.","tacet"];function Kh(e){let t=[],r="",i=[],a={chord:["","","",""]},n="",s="";if(e.forEach((o,c)=>{o.voices&&o.voices.forEach((h,d)=>{let f=0,l=0,u=0;h.forEach(p=>{if(p.el_type==="part")i.length>0&&c===0&&d===0&&(t.push({type:"part",name:r,lines:[i]}),i=[]),r=p.title;else if(p.el_type==="note"){zi(p,a);let g=Math.floor(l);if(p.chord&&p.chord.length>0){let v=p.chord[0],m=v.position==="default"||Hi.indexOf(v.name.toLowerCase())>=0?v.name:"";m&&(g>0&&!a.chord[0]&&(a.chord[0]=n),n=m,a.chord[g]?g<4&&!a.chord[g+1]&&(a.chord[g+1]=m):a.chord[g]=m),p.chord.forEach(y=>{y.position!=="default"&&Hi.indexOf(v.name.toLowerCase())<0&&(a.annotations||(a.annotations=[]),a.annotations.push(y.name))})}if(!p.rest||p.rest.type!=="spacer"){let v=p.duration===0&&!p.rest?.25:p.duration,m=Math.floor(v*4);if(m>4)u+=Math.floor(m/4),l=0;else{let y=v*4;p.tripletMultiplier&&(y*=p.tripletMultiplier),l+=y}}}else if(p.el_type==="bar"){if(s&&(a.ending=s,s=""),zi(p,a),p.chord&&p.chord.forEach(g=>{g.position!=="default"&&(a.annotations||(a.annotations=[]),a.annotations.push(g.name))}),(p.type==="bar_dbl_repeat"||p.type==="bar_left_repeat")&&(a.hasStartRepeat=!0),(p.type==="bar_dbl_repeat"||p.type==="bar_right_repeat")&&(a.hasEndRepeat=!0),p.startEnding&&(s=p.startEnding),l>=4){if(a.chord[0]===""&&(a.chord[1]||a.chord[2]||a.chord[3])&&(a.chord[0]=$h(i)),c===0&&d===0)i.push(a);else{let g=u,v=0;for(;g>=t[v].lines[0].length&&v<t.length;)g-=t[v].lines[0].length,v++;if(v<t.length&&g<t[v].lines[0].length){let m=t[v].lines[0][g];!m.chord[0]&&a.chord[0]&&(m.chord[0]=a.chord[0]),!m.chord[1]&&a.chord[1]&&(m.chord[1]=a.chord[1]),!m.chord[2]&&a.chord[2]&&(m.chord[2]=a.chord[2]),!m.chord[3]&&a.chord[3]&&(m.chord[3]=a.chord[3]),a.annotations&&(m.annotations?m.annotations=m.annotations.concat(a.annotations):m.annotations=a.annotations)}u++}a={chord:["","","",""]}}else a.chord=["","","",""];l=0}else p.el_type}),c===0&&d===0&&t.push({type:"part",name:r,lines:[i]})})}),!n)throw new Error("noChords");return t}function $h(e){for(let t=e.length-1;t>=0;t--)for(let r=e[t].chord.length-1;r>=0;r--)if(e[t].chord[r])return e[t].chord[r]}function Qh(e){e.forEach(t=>{if(t.type==="part"){let r=t.lines[0],i=r.findIndex(n=>!!n.ending),a=r.findIndex((n,s)=>s>i&&!!n.ending);if(i>=0&&a>=0&&a-i===r.length-a){let n=!0;for(let s=0;s<a-i&&n;s++){let o=r[i+s],c=r[a+s];if(o.chord[0]!==c.chord[0]&&(n=!1),o.chord[1]!==c.chord[1]&&(n=!1),o.chord[2]!==c.chord[2]&&(n=!1),o.chord[3]!==c.chord[3]&&(n=!1),o.annotations&&!c.annotations&&(n=!1),!o.annotations&&c.annotations&&(n=!1),o.annotations&&c.annotations)if(o.annotations.length!==c.annotations.length)n=!1;else for(let h=0;h<o.annotations.length;h++)o.annotations[h]!==c.annotations[h]&&(n=!1)}n&&(delete r[i].ending,r.splice(a,r.length-a))}}})}function Jh(e){e.forEach(t=>{if(t.type==="part"){let r=[],i=t.lines[0],a=!1,n=i.findIndex(c=>!!c.hasEndRepeat);(n>=0?Math.min(n+1,i.length):i.length)===12&&(a=!0);let o=a?4:8;for(let c=0;c<i.length;c+=o){let h=i.slice(c,c+o),d=h.findIndex(f=>!!f.hasEndRepeat);d>=0&&d<h.length-1?(r.push(h.slice(0,d+1)),r.push(h.slice(d+1))):r.push(h)}for(let c=0;c<r.length;c++)if(r[c][0].ending){let h=Math.max(0,c-1),d=r[h].length-r[c].length,f=[];for(let l=0;l<d;l++)f.push({noBorder:!0,chord:["","","",""]});r[c]=f.concat(r[c])}t.lines=r}})}function Zh(e){e.forEach(t=>{if(t.lines){let r=!1,i="";t.lines.forEach(a=>{a.forEach(n=>{if(!n.noBorder){let s=n.chord;!s[0]&&!s[1]&&!s[2]&&!s[3]?(r?i&&(s[0]="%"):s[0]=i,r=!0):!s[1]&&!s[2]&&!s[3]?(r=!0,i=s[0]):(r=!1,i=s[3]||s[2]||s[1])}})})}})}function zi(e,t){if(e.decoration)for(let r=0;r<e.decoration.length;r++)switch(e.decoration[r]){case"fermata":case"segno":case"coda":case"D.C.":case"D.S.":case"D.C.alcoda":case"D.C.alfine":case"D.S.alcoda":case"D.S.alfine":case"fine":t.annotations||(t.annotations=[]),t.annotations.push(e.decoration[r]);break}}Ri.exports=Vh});var Me=P((d6,Yi)=>{"use strict";var p0={};p0.FONTEM=360;p0.FONTSIZE=30;p0.STEP=p0.FONTSIZE*93/720;p0.SPACE=10;p0.TOPNOTE=15;p0.STAVEHEIGHT=100;p0.INDENT=50;Yi.exports=p0});var Xi=P((p6,Wi)=>{"use strict";var ef=Qe();function tf(e){this.sections=[{type:"startRepeat",index:-1}],this.addBar=function(t){var r=e.length-1,i=t.type==="bar_left_repeat"||t.type==="bar_dbl_repeat",a=t.type==="bar_right_repeat"||t.type==="bar_dbl_repeat",n=t.startEnding?nf(t.startEnding):void 0;a&&(this.sections.length>0&&this.sections[this.sections.length-1].type==="endRepeat"&&this.sections.push({type:"startRepeat",index:this.sections[this.sections.length-1].index}),this.sections.push({type:"endRepeat",index:r})),n&&this.sections.push({type:"startEnding",index:r,endings:n}),i&&this.sections.push({type:"startRepeat",index:r})},this.resolveRepeats=function(){var t,r=this.sections[this.sections.length-1],i=e.length-1;if(r.type==="startRepeat"?r.end=i:r.index+1<i&&this.sections.push({type:"startRepeat",index:r.index+1}),this.sections.length<2)return e;for(var a=[],n=null,s=0;s<this.sections.length;s++){var o=this.sections[s];switch(o.type){case"startRepeat":if(n){if(n.common.end||(n.common.end=o.index),n.endings)for(t=0;t<n.endings.length;t++)n.endings[t]&&!n.endings[t].end&&n.endings[t].start!==o.index&&(n.endings[t].end=o.index);this.sections[s-1].type==="endRepeat"&&n.endings&&n.endings.length&&(n.endings[n.endings.length]={start:-1,end:-1}),a.push(n)}if(n){var c=n.common.end;if(n.endings)for(t=0;t<n.endings.length;t++)n.endings[t]&&(c=Math.max(c,n.endings[t].end));c<o.index-1&&a.push({common:{start:c+1,end:o.index}})}n={common:{start:o.index}};break;case"startEnding":{if(n)for(n.common.end||(n.common.end=o.index),n.endings||(n.endings=[]),t=0;t<o.endings.length;t++)n.endings[o.endings[t]]={start:o.index+1};break}case"endRepeat":if(n){if(n.endings||(n.endings=[]),n.endings.length>0)for(t=0;t<n.endings.length;t++)n.endings[t]&&!n.endings[t].end&&(n.endings[t].end=o.index);n.common.end||(n.common.end=o.index)}break}}if(n){if(n.common.end||(n.common.end=i),n.endings)for(t=0;t<n.endings.length;t++)n.endings[t]&&!n.endings[t].end&&(n.endings[t].end=i);a.push(n)}for(var h=[],d=-1,f=0;f<a.length;f++){var l=a[f];if(!l.endings)pt(e,h,l.common.start,l.common.end);else if(l.endings.length===0)pt(e,h,l.common.start,l.common.end),pt(e,h,l.common.start,l.common.end);else for(t=0;t<l.endings.length;t++){var u=l.endings[t];u&&(pt(e,h,l.common.start,l.common.end),u.start>0&&pt(e,h,u.start,u.end),d=Math.max(d,u.end))}}return h}}function pt(e,t,r,i){r<0&&(r=0),t.length>0&&e[r].el_type==="bar"&&t[t.length-1].el_type==="bar"&&r++;for(var a=r;a<=i;a++){var n,s=!1;if(e[a].el_type==="key"||e[a].el_type==="meter"||e[a].el_type==="tempo"||e[a].el_type==="instrument"){for(n=t.length-1;n>=0&&t[n].el_type!==e[a].el_type;)n--;n>=0&&(e[a].el_type==="key"&&af(e[a],t[n])||e[a].el_type==="meter"&&e[a].num===t[n].num&&e[a].den===t[n].den||e[a].el_type==="instrument"&&e[a].program===t[n].program||e[a].el_type==="tempo"&&e[a].qpm===t[n].qpm)&&(s=!0)}s||t.push(rf(e[a]))}}function rf(e){var t=Object.assign({},e);return t.pitches&&(t.pitches=ef.cloneArray(t.pitches)),t}function af(e,t){return!e.accidentals||!t.accidentals?!1:JSON.stringify(e.accidentals)===JSON.stringify(t.accidentals)}function nf(e){var t=[],r,i,a;if(e.indexOf(",")>0)for(i=e.split(","),a=0;a<i.length;a++)r=parseInt(i[a],10),r>0&&t.push(r);else if(e.indexOf("-")>0){i=e.split("-");var n=parseInt(i[0],10),s=parseInt(i[1],10);for(a=n;a<=s;a++)t.push(a)}else r=parseInt(e,10),r>0&&t.push(r);return t}Wi.exports=tf});var Yr=P((g6,ji)=>{"use strict";var Ui,Gr=Qe(),sf=Xi();(function(){"use strict";var e=1,t=128;Ui=function(u,p){p=p||{};var g,v=p.program||0,m=p.midiTranspose||0;u.visualTranspose&&(m-=u.visualTranspose);var y=p.channel||0,k=!1,b=p.drum||"",w=p.drumBars||1,C=p.drumIntro||0,B=b!=="",L=!!p.drumOff,N=[],_=!1,F=50;v=parseInt(v,10),m=parseInt(m,10),y=parseInt(y,10),y===10&&(v=t),b=b.split(" "),w=parseInt(w,10),C=parseInt(C,10);var q=u.formatting.bagpipes;q&&(v=71);var D=[];if(u.formatting.midi){var R=u.formatting.midi;R.program&&R.program.length>0&&(v=R.program[0],R.program.length>1&&(v=R.program[1],y=R.program[0]),k=!0),R.transpose&&(m=R.transpose[0]),R.channel&&(y=R.channel[0],k=!0),R.drum&&(b=R.drum),R.drumbars&&(w=R.drumbars[0]),R.drumon&&(B=!0),y===10&&(v=t),R.beat&&D.push({el_type:"beat",beats:R.beat}),R.nobeataccents&&D.push({el_type:"beataccents",value:!1})}p.qpm?g=parseInt(p.qpm,10):u.metaText.tempo?g=o(u.metaText.tempo,u.getBeatLength()):p.defaultQpm?g=p.defaultQpm:g=180;var J=[];q&&J.push({el_type:"bagpipes"}),J.push({el_type:"instrument",program:v}),y&&J.push({el_type:"channel",channel:y}),m&&J.push({el_type:"transpose",transpose:m}),J.push({el_type:"tempo",qpm:g});for(var U=0;U<D.length;U++)J.push(D[U]);var x=[],T=[],M=[],S=[],z=[0],ee={};ee[0]={el_type:"tempo",qpm:g,timing:0};for(var V,ie=[],Xe=!1,Ue=u.lines,Be=0;Be<Ue.length;Be++){var Ce=Ue[Be];if(Ce.staff){let $=function(W){var Z={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]},ne;if(W.decoration){if(W.decoration.indexOf("pppp")>=0?ne="pppp":W.decoration.indexOf("ppp")>=0?ne="ppp":W.decoration.indexOf("pp")>=0?ne="pp":W.decoration.indexOf("p")>=0?ne="p":W.decoration.indexOf("mp")>=0?ne="mp":W.decoration.indexOf("mf")>=0?ne="mf":W.decoration.indexOf("f")>=0?ne="f":W.decoration.indexOf("ff")>=0?ne="ff":W.decoration.indexOf("fff")>=0?ne="fff":W.decoration.indexOf("ffff")>=0&&(ne="ffff"),ne){V=Z[ne].slice(0);let o0=[V];Array.isArray(W.decoration)&&(o0=[],W.decoration.forEach(w0=>{w0 in Z&&o0.push(Z[w0].slice(0))})),x[X].push({el_type:"beat",beats:V.slice(0),volumesPerNotePitch:o0}),M[ae]=!1,S[ae]=!1}if(W.decoration.indexOf("crescendo(")>=0){var ce=r(he,ke,"crescendo)"),re=Math.min(127,V[0]+F),se=i(he,ke+ce+1,Object.keys(Z));se&&(re=Z[se][0]),ce>0?M[ae]=Math.floor((re-V[0])/ce):M[ae]=!1,S[ae]=!1}else if(W.decoration.indexOf("crescendo)")>=0)M[ae]=!1;else if(W.decoration.indexOf("diminuendo(")>=0){var we=r(he,ke,"diminuendo)"),le=Math.max(15,V[0]-F),qe=i(he,ke+we+1,Object.keys(Z));qe&&(le=Z[qe][0]),M[ae]=!1,we>0?S[ae]=Math.floor((le-V[0])/we):S[ae]=!1}else W.decoration.indexOf("diminuendo)")>=0&&(S[ae]=!1)}};for(var Ne=Ce.staff,X=0,ge=0;ge<Ne.length;ge++){var te=Ne[ge];if(!(te.clef&&te.clef.type==="TAB"))for(var ae=0;ae<te.voices.length;ae++){var he=te.voices[ae];if(!x[X]){x[X]=[].concat(JSON.parse(JSON.stringify(J)));var je=s(Ce.staff,X);je&&x[X].unshift({el_type:"name",trackName:je}),ie[X]=new sf(x[X])}if(m&&te.clef.type==="perc"&&x[X].push({el_type:"transpose",transpose:0}),te.clef&&te.clef.type==="perc"&&!k)for(var Pe=0;Pe<x[X].length;Pe++)x[X][Pe].el_type==="instrument"&&(x[X][Pe].program=t);else te.key&&d(x[X],te.key);te.meter&&f(x[X],te.meter),!Xe&&B&&(x[X].push({el_type:"drum",params:{pattern:b,bars:w,on:B,intro:C}}),Xe=!0),te.clef&&te.clef.type!=="perc"&&te.clef.transpose&&(te.clef.el_type="clef",x[X].push({el_type:"transpose",transpose:te.clef.transpose}),T[X]=!1),te.clef&&te.clef.type&&(te.clef.type.indexOf("-8")>=0?(x[X].push({el_type:"transpose",transpose:-12}),T[X]=!0):te.clef.type.indexOf("+8")>=0?(x[X].push({el_type:"transpose",transpose:12}),T[X]=!0):T[X]&&(x[X].push({el_type:"transpose",transpose:0}),T[X]=!1)),u.formatting.midi&&u.formatting.midi.drumoff&&(x[X].push({el_type:"bar"}),x[X].push({el_type:"drum",params:{pattern:"",on:!1}}));var Ve=0,Ke=0,Le=0,$e=0;V=[105,95,85,1];for(var ke=0;ke<he.length;ke++){var j=he[ke];switch(j.el_type){case"note":if(M[ae]&&(V[0]+=M[ae],V[1]+=M[ae],V[2]+=M[ae],x[X].push({el_type:"beat",beats:V.slice(0)})),S[ae]&&(V[0]+=S[ae],V[1]+=S[ae],V[2]+=S[ae],x[X].push({el_type:"beat",beats:V.slice(0)})),$(j),!j.rest||j.rest.type!=="spacer"){var oe={elem:j,el_type:"note",timing:z[X]};if(j.style?oe.style=j.style:N[X]&&(oe.style=N[X]),oe.duration=j.duration===0?.25:j.duration,j.startTriplet){if(Ke=j.tripletMultiplier,Le=j.startTriplet*Ke*j.duration,j.startTriplet!==j.tripletR&&ke+j.tripletR<=he.length){for(var A=0,I=ke;I<ke+j.tripletR;I++)A+=he[I].duration;Le=Ke*A}oe.duration=oe.duration*Ke,oe.duration=Math.round(oe.duration*1e6)/1e6,$e=oe.duration}else Ke&&(j.endTriplet?(Ke=0,oe.duration=Math.round((Le-$e)*1e6)/1e6):(oe.duration=oe.duration*Ke,oe.duration=Math.round(oe.duration*1e6)/1e6,$e+=oe.duration));j.rest&&(oe.rest=j.rest),j.decoration&&(oe.decoration=j.decoration.slice(0)),j.pitches&&(oe.pitches=Gr.cloneArray(j.pitches)),j.gracenotes&&(oe.gracenotes=Gr.cloneArray(j.gracenotes)),j.chord&&(oe.chord=Gr.cloneArray(j.chord)),x[X].push(oe),j.style==="rhythm"&&(_=!0,n(x)),Ve++,z[X]+=oe.duration}break;case"key":case"keySignature":d(x[X],j);break;case"meter":f(x[X],j);break;case"clef":j.transpose&&x[X].push({el_type:"transpose",transpose:j.transpose}),j.type&&(j.type.indexOf("-8")>=0?x[X].push({el_type:"transpose",transpose:-12}):j.type.indexOf("+8")>=0&&x[X].push({el_type:"transpose",transpose:12}));break;case"tempo":g=o(j,u.getBeatLength()),x[X].push({el_type:"tempo",qpm:g,timing:z[X]}),ee[""+z[X]]={el_type:"tempo",qpm:g,timing:z[X]};break;case"bar":Ve>0&&x[X].push({el_type:"bar"}),$(j),Ve=0,ie[X].addBar(j,X),_=!1;break;case"style":N[X]=j.head;break;case"timeSignature":x[X].push(c(j));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var Y=!1;switch(j.cmd){case"drumon":B=!0,Y=!0;break;case"drumoff":B=!1,Y=!0;break;case"drum":b=j.params,Y=!0;break;case"drumbars":w=j.params[0],Y=!0;break;case"drummap":break;case"channel":j.params[0]===10&&x[X].push({el_type:"instrument",program:t});break;case"program":l(x[X],{el_type:"instrument",program:j.params[0]}),k=!0;break;case"transpose":x[X].push({el_type:"transpose",transpose:j.params[0]});break;case"gchordoff":x[X].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":x[X].push({el_type:"gchordOn",tacet:!1});break;case"beat":x[X].push({el_type:"beat",beats:j.params});break;case"nobeataccents":x[X].push({el_type:"beataccents",value:!1});break;case"beataccents":x[X].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":x[X].push({el_type:j.cmd,volume:j.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":x[X].push({el_type:j.cmd,param:j.params[0]});break;case"bassprog":case"chordprog":x[X].push({el_type:j.cmd,value:j.params[0],octaveShift:j.params[1]});break;case"gchordbars":x[X].push({el_type:j.cmd,param:j.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",j.cmd,j)}Y&&(x[0].push({el_type:"drum",params:{pattern:b,bars:w,intro:C,on:B}}),Xe=!0);break;default:console.log("MIDI: element type "+j.el_type+" not handled.")}}X++,z[X]||(z[X]=0)}}}}for(var H=0;H<ie.length;H++)x[H]=ie[H].resolveRepeats();if(a(x,ee),C)for(var G=u.getPickupLength(),Q=0;Q<x.length;Q++){for(var K=0;x[Q][K].el_type!=="note"&&x[Q].length>K;)K++;if(x[Q].length>K){for(var I=0;I<C;I++)G===0||I<C-1?(x[Q].splice(K,0,{el_type:"note",rest:{type:"rest"},duration:e},{el_type:"bar"}),K+=2):x[Q].splice(K++,0,{el_type:"note",rest:{type:"rest"},duration:e-G});L&&(B=!1,x[Q].splice(K++,0,{el_type:"drum",params:{pattern:b,bars:w,intro:C,on:B}}),L=!1)}}return x.length>0&&x[0].length>0&&(x[0][0].pickupLength=u.getPickupLength()),x};function r(u,p,g){for(var v=0,m=p+1;m<u.length;m++)if(u[m].el_type==="note"&&v++,u[m].decoration&&u[m].decoration.indexOf(g)>=0)return v;return v}function i(u,p,g){for(var v=Math.min(u.length,p+3),m=p;m<v;m++)if(u[m].el_type==="note"&&u[m].decoration){for(var y=0;y<u[m].decoration.length;y++)if(g.indexOf(u[m].decoration[y])>=0)return u[m].decoration[y]}return null}function a(u,p){if(!(!p||p.length===0))for(var g=Object.keys(p),v=0;v<u.length;v++)for(var m=u[v],y=p[0]?p[0].qpm:0,k=0;k<m.length;k++){var b=m[k];b.el_type==="tempo"&&(y=b.qpm),g.indexOf(""+b.timing)>=0&&y!==p[""+b.timing].qpm&&(y=p[""+b.timing].qpm,b.el_type==="tempo"?(b.qpm=p[""+b.timing].qpm,k++):(u[v].splice(k,0,{el_type:"tempo",qpm:p[""+b.timing].qpm,timing:b.timing}),k+=2))}}function n(u){for(var p=0;p<u.length;p++)for(var g=u[p],v=g.length-1;v>=0&&g[v].el_type!=="bar";)g[v].noChordVoice=!0,v--}function s(u,p){if(!(!u||u.length<=p||!u[p].title))return u[p].title.join(" ")}function o(u,p){var g=.25;u.duration&&(g=u.duration[0]);var v=60;return u.bpm&&(v=u.bpm),g*v/p}function c(u){var p;switch(u.type){case"common_time":p={el_type:"meter",num:4,den:4},e=4/4;break;case"cut_time":p={el_type:"meter",num:2,den:2},e=2/2;break;case"specified":let m=0;if(u.value&&u.value.length>0&&u.value[0].num.indexOf("+")>0)for(var g=u.value[0].num.split("+"),v=0;v<g.length;v++)m+=parseInt(g[v],10);else m=parseInt(u.value[0].num,10);p={el_type:"meter",num:m,den:u.value[0].den},e=m/parseInt(u.value[0].den,10);break;default:p={el_type:"meter"},e=1}return p}function h(u){for(var p=[],g=0;g<u.length;g++)u[g].acc!=="natural"&&p.push(u[g]);return p}function d(u,p){var g;p.root==="HP"?g={el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:g={el_type:"key",accidentals:h(p.accidentals)},l(u,g)}function f(u,p){var g=c(p);l(u,g)}function l(u,p){for(var g=u.length-1;g>=0;g--)if(u[g].el_type===p.el_type){JSON.stringify(u[g])!==JSON.stringify(p)&&u.push(p);return}u.push(p)}})();ji.exports=Ui});var Qi=P((v6,$i)=>{"use strict";var ve=function(t,r,i,a){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=t,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!r,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=a,this.tempoChangeFactor=1,this.bassInstrument=i.bassprog&&i.bassprog.length>=1?i.bassprog[0]:0,this.chordInstrument=i.chordprog&&i.chordprog.length>=1?i.chordprog[0]:0,this.bassOctaveShift=i.bassprog&&i.bassprog.length===2?i.bassprog[1]:0,this.chordOctaveShift=i.chordprog&&i.chordprog.length===2?i.chordprog[1]:0,this.boomVolume=i.bassvol&&i.bassvol.length===1?i.bassvol[0]:64,this.chickVolume=i.chordvol&&i.chordvol.length===1?i.chordvol[0]:48,i.gchord&&i.gchord.length>0?this.overridePattern=Ki(i.gchord[0]):this.overridePattern=void 0};ve.prototype.setMeter=function(e){this.meter=e};ve.prototype.setTempoChangeFactor=function(e){this.tempoChangeFactor=e};ve.prototype.setLastBarTime=function(e){this.lastBarTime=e};ve.prototype.setTranspose=function(e){this.transpose=e};ve.prototype.setRhythmHead=function(e,t){this.hasRhythmHead=e;var r=[];if(e&&this.lastChord&&this.lastChord.chick)for(var i=0;i<this.lastChord.chick.length;i++){var a=Object.assign({},t.pitches[0]);a.actualPitch=this.lastChord.chick[i],r.push(a)}return r};ve.prototype.barEnd=function(e){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,Wr(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord};ve.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)};ve.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=Ki(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,e.octaveShift!=null&&e.octaveShift!=null?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,e.octaveShift!=null&&e.octaveShift!=null?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}};ve.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)};ve.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)};ve.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||e.chord.length===0)return null;for(var t=0;t<e.chord.length;t++){var r=e.chord[t];if(r.position==="default")return r.name;if(this.breakSynonyms.indexOf(r.name.toLowerCase())>=0)return"break"}return null};ve.prototype.interpretChord=function(e){if(e.length!==0){if(e==="break")return{chick:[]};var t=e.substring(0,1);if(t==="("){if(e=e.substring(1,e.length-1),e.length===0)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var i=this.transpose;i<-8;)i+=12;for(;i>8;)i-=12;r+=i,r<33?r+=12:r>44&&(r-=12);var a=r;r+=this.bassOctaveShift*12;var n=r-5,s;e.length===1&&(s=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);c==="b"||c==="\u266D"?(a--,r--,n--,o=o.substring(1)):(c==="#"||c==="\u266F")&&(a++,r++,n++,o=o.substring(1));var h=o.split("/");if(s=this.chordNotes(a,h[0]),s.length>=3){var d=s[2]-s[0];n=n+d-7}if(h.length===2){var f=this.basses[h[1].substring(0,1)];if(f){var l=h[1].substring(1),u={"#":1,"\u266F":1,b:-1,"\u266D":-1}[l]||0;r=this.basses[h[1].substring(0,1)]+u+i,r+=this.bassOctaveShift*12,n=r}}return{boom:r,boom2:n,chick:s}}}};ve.prototype.chordNotes=function(e,t){t=t.replace(/♭/g,"b").replace(/♯/g,"#");var r=jt[t];r||(t.slice(0,2).toLowerCase()==="ma"||t[0]==="M"?r=jt.M:t[0]==="m"||t[0]==="-"?r=jt.m:r=jt.M),e+=12,e+=this.chordOctaveShift*12;for(var i=[],a=0;a<r.length;a++)i.push(e+r[a]);return i};ve.prototype.writeNote=function(e,t,r,i,a,n){e!==void 0&&this.chordTrack.push({cmd:"note",pitch:e,volume:r,start:this.lastBarTime+i*Vi(t,this.tempoChangeFactor),duration:Vi(a,this.tempoChangeFactor),gap:0,instrument:n})};ve.prototype.chordTrackEmpty=function(){for(var e=!0,t=0;t<this.chordTrack.length&&e;t++)this.chordTrack[t].cmd==="note"&&(e=!1);return e};ve.prototype.resolveChords=function(e,t){if(!this.hasRhythmHead){var r=this.meter.num,i=this.meter.den,a=1/i,n=a/2,s=parseInt(r,10)/parseInt(i,10),o=s-(t-e)/this.tempoChangeFactor;Math.abs(o)<1e-5&&(o=0),(this.currentChords.length===0||this.currentChords[0].beat!==0)&&this.currentChords.unshift({beat:0,chord:this.chordLastBar});var c=cf(this.currentChords,8*r/i,a),h=this.overridePattern?this.overridePattern:this.rhythmPatterns[r+"/"+i];if(o){h=[];for(var d=(t-e)/this.tempoChangeFactor*8,f=0;f<d/2;f+=2)h.push("chick"),h.push("")}if(!h){h=[];for(var f=0;f<8*r/i/2;f++)h.push("chick"),h.push("")}for(var l=!0,u=Math.min(h.length,c.length),f=0;f<u;f++){f>0&&c[f-1]&&c[f]&&c[f-1].boom!==c[f].boom&&(l=!0);var p=h[f],g=p.indexOf("boom")>=0,v=!g&&f!==0&&h[0].indexOf("boom")>=0&&(!c[f-1]||c[f-1].boom!==c[f].boom),m=of(c[f],p,l,v);g&&(l=!1);for(var y=0;y<m.length;y++)this.writeNote(m[y],.125,g||v?this.boomVolume:this.chickVolume,f,n,g||v?this.bassInstrument:this.chordInstrument),v?v=!1:g=!1}}};ve.prototype.processChord=function(e){if(!this.chordTrackFinished){var t=this.findChord(e);if(t){var r=this.interpretChord(t);if(r){this.chordTrack.length===0&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=r;var i=lf(this.lastBarTime,Wr(e.time));this.currentChords.push({chord:this.lastChord,beat:i,start:Wr(e.time)})}}}};function of(e,t,r,i){var a=[];if(!e)return a;t.indexOf("boom")>=0?a.push(r?e.boom:e.boom2):i&&a.push(e.boom);var n=e.chick.length;if(t.indexOf("chick")>=0)for(var s=0;s<n;s++)a.push(e.chick[s]);switch(t){case"DO":a.push(e.chick[0]);break;case"MI":a.push(e.chick[1]);break;case"SOL":a.push(Y0(e,2));break;case"TI":a.push(Y0(e,3));break;case"TOP":a.push(Y0(e,4));break;case"do":a.push(e.chick[0]+12);break;case"mi":a.push(e.chick[1]+12);break;case"sol":a.push(Y0(e,2)+12);break;case"ti":a.push(Y0(e,3)+12);break;case"top":a.push(Y0(e,4)+12);break}return a}function Y0(e,t){var r=Math.floor(t/e.chick.length),i=e.chick[t%e.chick.length];return i+r*12}function Ki(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];switch(i){case"z":t.push("");break;case"2":t.push("");break;case"c":t.push("chick");break;case"b":t.push("boom&chick");break;case"f":t.push("boom");break;case"G":t.push("DO");break;case"H":t.push("MI");break;case"I":t.push("SOL");break;case"J":t.push("TI");break;case"K":t.push("TOP");break;case"g":t.push("do");break;case"h":t.push("mi");break;case"i":t.push("sol");break;case"j":t.push("ti");break;case"k":t.push("top");break}}return t}function cf(e,t,r){r=r*8;var i=[];if(e.length===0)return i;for(var a=e[0].chord,n=1;n<e.length;n++){for(var s=e[n];i.length<s.beat;)i.push(a);a=s.chord}for(;i.length<t;)i.push(a);return i}function lf(e,t){var r=t-e;return r*8}ve.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"];ve.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43};var jt={"-addb2":[0,1,3,7],maddb2:[0,1,3,7],addb2:[0,1,4,7],susb2:[0,1,7],"-add2":[0,2,3,7],madd2:[0,2,3,7],add2:[0,2,4,7],sus2:[0,2,7],"-7sus2":[0,2,7,10],"7sus2":[0,2,7,10],m7sus2:[0,2,7,10],min7sus2:[0,2,7,10],"7sus2/9":[0,2,7,10,14],"add#2":[0,3,4,7],"-add4":[0,3,5,7],madd4:[0,3,5,7],dim:[0,3,6],"m(b5)":[0,3,6],"\xB0":[0,3,6],"\u02DA":[0,3,6],"-add#4":[0,3,6,7],"madd#4":[0,3,6,7],dim7:[0,3,6,9],"\xB07":[0,3,6,9],"\u02DA7":[0,3,6,9],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],\u00F8:[0,3,6,10],\u00F87:[0,3,6,10],"-":[0,3,7],m:[0,3,7],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"m(b6)":[0,3,7,8],mb6:[0,3,7,8],"-6":[0,3,7,9],m6:[0,3,7,9],"-6(9)":[0,3,7,9,14],"-6/9":[0,3,7,9,14],"-69":[0,3,7,9,14],"m6(9)":[0,3,7,9,14],"m6/9":[0,3,7,9,14],m69:[0,3,7,9,14],"-7":[0,3,7,10],m7:[0,3,7,10],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-7(9)":[0,3,7,10,14],"-7/9":[0,3,7,10,14],"-9":[0,3,7,10,14],"m7(9)":[0,3,7,10,14],"m7/9":[0,3,7,10,14],m9:[0,3,7,10,14],"-7(9,11)":[0,3,7,10,14,17],"-7/9/11":[0,3,7,10,14,17],"m7(9,11)":[0,3,7,10,14,17],"m7/9/11":[0,3,7,10,14,17],"-13":[0,3,7,10,14,17,21],"-7(9,11,13)":[0,3,7,10,14,17,21],"-7/9/11/13":[0,3,7,10,14,17,21],m13:[0,3,7,10,14,17,21],"m7(9,11,13)":[0,3,7,10,14,17,21],"m7/9/11/13":[0,3,7,10,14,17,21],"-7(9,13)":[0,3,7,10,14,21],"-7/9/13":[0,3,7,10,14,21],"m7(9,13)":[0,3,7,10,14,21],"m7/9/13":[0,3,7,10,14,21],"-7(11)":[0,3,7,10,17],"-7/11":[0,3,7,10,17],"m7(11)":[0,3,7,10,17],"m7/11":[0,3,7,10,17],"-7(11,13)":[0,3,7,10,17,21],"-7/11/13":[0,3,7,10,17,21],"m7(11,13)":[0,3,7,10,17,21],"m7/11/13":[0,3,7,10,17,21],"-(maj7)":[0,3,7,11],"-7M":[0,3,7,11],"-maj7":[0,3,7,11],"-\u22067":[0,3,7,11],"m(maj7)":[0,3,7,11],mM7:[0,3,7,11],"min(maj7)":[0,3,7,11],"-9+7":[0,3,7,11,13],"-(maj9)":[0,3,7,11,14],"-7M(9)":[0,3,7,11,14],"-maj9":[0,3,7,11,14],"-\u22069":[0,3,7,11,14],"m(maj9)":[0,3,7,11,14],mM9:[0,3,7,11,14],"min(maj9)":[0,3,7,11,14],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-addb9":[0,3,7,13],maddb9:[0,3,7,13],"-add9":[0,3,7,14],madd9:[0,3,7,14],"-add11":[0,3,7,17],madd11:[0,3,7,17],"-add#11":[0,3,7,18],"madd#11":[0,3,7,18],"-#5":[0,3,8],"-(#5)":[0,3,8],"m#5":[0,3,8],"m(#5)":[0,3,8],"-7#5":[0,3,8,10],"-7(#5)":[0,3,8,10],"dim7(b13)":[0,3,9,20],"\xB07(b13)":[0,3,9,20],"\u02DA7(b13)":[0,3,9,20],add4:[0,4,5,7],"maj(b5)":[0,4,6],majb5:[0,4,6],"add#4":[0,4,6,7],"7(b5)":[0,4,6,10],"7b5":[0,4,6,10],"7(b5,b9)":[0,4,6,10,13],"7(b9,b5)":[0,4,6,10,13],"7b5(b9)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7b9b5":[0,4,6,10,13],"7(b5,b9,b13)":[0,4,6,10,13,20],"7/b5/b9/b13":[0,4,6,10,13,20],"7b5/b9/b13":[0,4,6,10,13,20],"7(b5,b9,13)":[0,4,6,10,13,21],"7/b5/b9/13":[0,4,6,10,13,21],"7b5/b9/13":[0,4,6,10,13,21],"7(9,b5)":[0,4,6,10,14],"7(b5,9)":[0,4,6,10,14],"7b5(9)":[0,4,6,10,14],"9b5":[0,4,6,10,14],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],"7(b5,9,13)":[0,4,6,10,14,21],"7/b5/9/13":[0,4,6,10,14,21],"7b5/9/13":[0,4,6,10,14,21],"7#9b5":[0,4,6,10,15],"7(#9,b5)":[0,4,6,10,15],"7(b5,#9)":[0,4,6,10,15],"7b5(#9)":[0,4,6,10,15],"7(b5,#9,b13)":[0,4,6,10,15,20],"7/b5/#9/b13":[0,4,6,10,15,20],"7b5/#9/b13":[0,4,6,10,15,20],"7(b5,#9,13)":[0,4,6,10,15,21],"7/b5/#9/13":[0,4,6,10,15,21],"7b5/#9/13":[0,4,6,10,15,21],"7(b5,b13)":[0,4,6,10,20],"7/b5/b13":[0,4,6,10,20],"7b5/b13":[0,4,6,10,20],"7(b5,13)":[0,4,6,10,21],"7/b5/13":[0,4,6,10,21],"7b5(13)":[0,4,6,10,21],"7b5/13":[0,4,6,10,21],"7M(b5)":[0,4,6,11],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"7M(b5,9)":[0,4,6,11,14],"maj7(b5,9)":[0,4,6,11,14],"maj7b5/9":[0,4,6,11,14],"7M(b5,9,13)":[0,4,6,11,14,21],"maj7(b5,9,13)":[0,4,6,11,14,21],"maj7b5/9/13":[0,4,6,11,14,21],"7M(b5,13)":[0,4,6,11,21],"maj7(b5,13)":[0,4,6,11,21],"maj7b5/13":[0,4,6,11,21],M:[0,4,7],\u0394:[0,4,7],"\u2206":[0,4,7],6:[0,4,7,9],"6(9)":[0,4,7,9,14],"6/9":[0,4,7,9,14],69:[0,4,7,9,14],"6add9":[0,4,7,9,14],"6(9,11)":[0,4,7,9,14,17],"6/9/11":[0,4,7,9,14,17],6911:[0,4,7,9,14,17],"6(9,#11)":[0,4,7,9,14,18],"6/9/#11":[0,4,7,9,14,18],"69#11":[0,4,7,9,14,18],"6(11)":[0,4,7,9,17],"6/11":[0,4,7,9,17],611:[0,4,7,9,17],"6#11":[0,4,7,9,18],"6(#11)":[0,4,7,9,18],"6/#11":[0,4,7,9,18],7:[0,4,7,10],"7(b9)":[0,4,7,10,13],"7b9":[0,4,7,10,13],"7(9)":[0,4,7,10,14],"7/9":[0,4,7,10,14],9:[0,4,7,10,14],"7(9,11)":[0,4,7,10,14,17],"7/9/11":[0,4,7,10,14,17],"7(9,11,13)":[0,4,7,10,14,17,21],"7/9/11/13":[0,4,7,10,14,17,21],"7#11":[0,4,7,10,14,18],"7(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"9(#11)":[0,4,7,10,14,18],"(13)":[0,4,7,10,14,21],13:[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7/9/13":[0,4,7,10,14,21],"9/13":[0,4,7,10,14,21],"7#9":[0,4,7,10,15],"7(#9)":[0,4,7,10,15],"7(#9,b13)":[0,4,7,10,15,20],"7(11)":[0,4,7,10,17],"7/11":[0,4,7,10,17],"7(11,13)":[0,4,7,10,17,21],"7/11/13":[0,4,7,10,17,21],"13#11":[0,4,7,10,18,21],"13(#11)":[0,4,7,10,18,21],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"7(13)":[0,4,7,10,21],"7/13":[0,4,7,10,21],"7M":[0,4,7,11],maj7:[0,4,7,11],\u03947:[0,4,7,11],"\u22067":[0,4,7,11],"7M(9)":[0,4,7,11,14],"7M/9":[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7/9":[0,4,7,11,14],maj9:[0,4,7,11,14],\u03949:[0,4,7,11,14],"\u22069":[0,4,7,11,14],"7M(9,11)":[0,4,7,11,14,17],"7M/9/11":[0,4,7,11,14,17],maj11:[0,4,7,11,14,17],"maj7(9,11)":[0,4,7,11,14,17],"maj7/9/11":[0,4,7,11,14,17],\u039411:[0,4,7,11,14,17],"\u220611":[0,4,7,11,14,17],"7M(9,11,13)":[0,4,7,11,14,17,21],"7M/9/11/13":[0,4,7,11,14,17,21],maj13:[0,4,7,11,14,17,21],"maj7(9,11,13)":[0,4,7,11,14,17,21],"maj7/9/11/13":[0,4,7,11,14,17,21],"\u039411(13)":[0,4,7,11,14,17,21],\u039413:[0,4,7,11,14,17,21],"\u220611(13)":[0,4,7,11,14,17,21],"7M(9,#11)":[0,4,7,11,14,18],"7M/9/#11":[0,4,7,11,14,18],"maj7(9,#11)":[0,4,7,11,14,18],"maj7/9/#11":[0,4,7,11,14,18],"maj9#11":[0,4,7,11,14,18],"maj9(#11)":[0,4,7,11,14,18],"maj9/#11":[0,4,7,11,14,18],"\u03949(#11)":[0,4,7,11,14,18],"7M(9,#11,13)":[0,4,7,11,14,18,21],"7M/9/#11/13":[0,4,7,11,14,18,21],"maj13#11":[0,4,7,11,14,18,21],"maj13(#11)":[0,4,7,11,14,18,21],"maj13/#11":[0,4,7,11,14,18,21],"\u039413(#11)":[0,4,7,11,14,18,21],"\u220613(#11)":[0,4,7,11,14,18,21],"7M(9,13)":[0,4,7,11,14,21],"7M/9/13":[0,4,7,11,14,21],"maj7(9,13)":[0,4,7,11,14,21],"maj7/9/13":[0,4,7,11,14,21],"maj9(13)":[0,4,7,11,14,21],"\u03949(13)":[0,4,7,11,14,21],"\u22069(13)":[0,4,7,11,14,21],"7M(11)":[0,4,7,11,17],"7M/11":[0,4,7,11,17],"maj7(11)":[0,4,7,11,17],"maj7/11":[0,4,7,11,17],"\u03947(11)":[0,4,7,11,17],"\u22067(11)":[0,4,7,11,17],"7M(#11)":[0,4,7,11,18],"7M/#11":[0,4,7,11,18],"maj7(#11)":[0,4,7,11,18],"maj7/#11":[0,4,7,11,18],"\u03947(#11)":[0,4,7,11,18],"\u22067(#11)":[0,4,7,11,18],"7M(13)":[0,4,7,11,21],"7M/13":[0,4,7,11,21],"maj7(13)":[0,4,7,11,21],"maj7/13":[0,4,7,11,21],"\u03947(13)":[0,4,7,11,21],"\u22067(13)":[0,4,7,11,21],addb9:[0,4,7,13],add9:[0,4,7,14],"add#9":[0,4,7,15],add11:[0,4,7,17],"add#11":[0,4,7,18],"+":[0,4,8],aug:[0,4,8],"+7":[0,4,8,10],"7#5":[0,4,8,10],"7(#5)":[0,4,8,10],"7+5":[0,4,8,10],aug7:[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"9#5":[0,4,8,10,14],"9(#5)":[0,4,8,10,14],"9+5":[0,4,8,10,14],"13#5":[0,4,8,10,14,21],"13(#5)":[0,4,8,10,14,21],"7M(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5)":[0,4,8,11],"7M(#5,9)":[0,4,8,11,14],"maj7#5/9":[0,4,8,11,14],"maj7(#5,9)":[0,4,8,11,14],"maj7#5#11":[0,4,8,11,18],"maj7(#5,#11)":[0,4,8,11,18],sus:[0,5,7],sus4:[0,5,7],"-7sus4":[0,5,7,10],"7sus":[0,5,7,10],"7sus4":[0,5,7,10],m7sus4:[0,5,7,10],min7sus4:[0,5,7,10],"7sus(b9)":[0,5,7,10,13],"7sus4(b9)":[0,5,7,10,13],"-9sus4":[0,5,7,10,14],"7sus4(9)":[0,5,7,10,14],"7sus4/9":[0,5,7,10,14],"9sus":[0,5,7,10,14],"9sus4":[0,5,7,10,14],m9sus4:[0,5,7,10,14],min9sus4:[0,5,7,10,14],"11sus4":[0,5,7,10,14,17],"13sus4":[0,5,7,10,14,21],"7sus(#9)":[0,5,7,10,15],"7sus4(#9)":[0,5,7,10,15],"7sus4(11)":[0,5,7,10,17],"7sus4(13)":[0,5,7,10,21],"7Msus":[0,5,7,11],"7Msus4":[0,5,7,11],maj7sus:[0,5,7,11],maj7sus4:[0,5,7,11],"#4":[0,6],b5:[0,6],"sus#4":[0,6,7],"7Msus#4":[0,6,11],"maj7sus#4":[0,6,11],5:[0,7],11:[0,7,10,14,17],"5(8)":[0,7,12],"5add8":[0,7,12],"5(9)":[0,7,14],"5add9":[0,7,14],"#5":[0,8],b6:[0,8]};ve.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]};function Wr(e){return e/1e6}function Vi(e,t){return Math.round(e*t*1e6)/1e6}$i.exports=ve});var Xr=P((b6,Ji)=>{"use strict";var hf={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};function ff(e){var t=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return hf[t]}Ji.exports=ff});var rn=P((m6,tn)=>{"use strict";var en,uf=Qi(),Zi=Xr();(function(){"use strict";var e,t,r,i,a,n,s,o=1,c,h,d,f,l,u,p,g={num:4,den:4},v=128,m,y=!0,k=105,b=95,w=85,C=[[k,b,w]],B=.25,L,N,_=0,F,q,D={},R,J=0,U,x=0,T=-.001,M=.4;en=function(A,I,Y,H){I||(I={}),H||(H={}),e=[],t=[0,0,0,0,0,0,0],i=!1,a=[],n=I.qpm,s=void 0,o=1,c=void 0,h=void 0,d=void 0,l=void 0,u=0,U=Y,g={num:4,den:4},y=!0,k=105,b=95,w=85,C=[],B=.25,L=void 0,N=void 0,_=0,F=[],q=!1,D={},R=1,A.length>0&&A[0].length>0&&(J=A[0][0].pickupLength),I.bassprog!==void 0&&!H.bassprog&&(H.bassprog=[I.bassprog]),I.bassvol!==void 0&&!H.bassvol&&(H.bassvol=[I.bassvol]),I.chordprog!==void 0&&!H.chordprog&&(H.chordprog=[I.chordprog]),I.chordvol!==void 0&&!H.chordvol&&(H.chordvol=[I.chordvol]),I.gchord!==void 0&&!H.gchord&&(H.gchord=[I.gchord]),p=new uf(A.length,I.chordsOff,H,g),V(A,I);for(var G=0;G<A.length;G++){r=0,p.setTranspose(r),f=-1;var Q=A[G];d=[{cmd:"program",channel:G,instrument:c}],l=void 0,m=0,p.setLastBarTime(0);var K=!1;(I.voicesOff===!0||I.voicesOff&&I.voicesOff.length&&I.voicesOff.indexOf(G)>=0)&&(K=!0);for(var $=0;$<Q.length;$++){var W=Q[$];switch(W.el_type){case"name":l={cmd:"text",type:"name",text:W.trackName};break;case"note":Ne(W,K);break;case"key":t=ae(W);break;case"meter":s||(s=W),g=W,p.setMeter(g),B=ie(g),ke();break;case"tempo":n?o=W.qpm?n/W.qpm:1:n=W.qpm,p.setTempoChangeFactor(o);break;case"transpose":r=W.transpose,p.setTranspose(r);break;case"bar":p.barEnd(W),e=[],G===0&&j(A.length+1),p.setRhythmHead(!1),m=z(W.time),p.setLastBarTime(m);break;case"bagpipes":i=!0;break;case"instrument":if(c===void 0&&(c=W.program),h=W.program,d.length>0&&d[d.length-1].cmd==="program")d[d.length-1].instrument=W.program;else{var Z;for(Z=d.length-1;Z>=0&&d[Z].cmd!=="program";Z--);(Z<0||d[Z].instrument!==W.program)&&d.push({cmd:"program",channel:0,instrument:W.program})}break;case"channel":S(W.channel);break;case"drum":D=$e(W.params),ke();break;case"gchordOn":p.gChordOn(W);break;case"beat":k=W.beats[0],b=W.beats[1],w=W.beats[2],W.volumesPerNotePitch?C=W.volumesPerNotePitch:C=[];break;case"vol":L=W.volume;break;case"volinc":N=W.volume;break;case"beataccents":y=W.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(W);break;default:console.log("MIDI creation. Unknown el_type: "+W.el_type+`
|
|
7
|
+
`);break}}d[0].instrument===void 0&&(d[0].instrument=c||0),l&&d.unshift(l),a.push(d),p.finish(),F.length>0&&(q=!0)}return I.detuneOctave&&oe(a,parseInt(I.detuneOctave,10)),p.addTrack(a),F.length>0&&a.push(F),{tempo:n,instrument:c,tracks:a,totalDuration:u}};function S(A){for(var I=d.length-1;I>=0;I--)if(d[I].cmd==="program"){d[I].channel=A;return}}function z(A){return A/1e6}function ee(A){return Math.round(A*o*1e6)/1e6}function V(A,I){for(var Y=0;Y<A.length;Y++){for(var H=A[Y],G={},Q=I.qpm,K=0,$=1,W=0;W<H.length;W++){var Z=H[W];if(Z.el_type==="tempo"){Q?$=Z.qpm?Q/Z.qpm:1:Q=Z.qpm;continue}Z.time=K;var ne=Z.duration?Z.duration:0;if(K+=Math.round(ne*$*1e6),Z.pitches){for(var ce=0;ce<Z.pitches.length;ce++){var re=Z.pitches[ce];if(re){if(re.duration=Z.duration,re.startTie)G[re.pitch]===void 0?G[re.pitch]={el:W,pitch:ce}:(H[G[re.pitch].el].pitches[G[re.pitch].pitch].duration+=re.duration,Z.pitches[ce]=null);else if(re.endTie){var se=G[re.pitch];if(se){var we=re.duration;delete H[se.el].pitches[se.pitch].startTie,H[se.el].pitches[se.pitch].duration+=we,Z.pitches[ce]=null,delete G[re.pitch]}else delete re.endTie}}}delete Z.duration}}for(var le in G)if(G.hasOwnProperty(le)){var qe=G[le];delete H[qe.el].pitches[qe.pitch].startTie}}}function ie(A){switch(parseInt(A.den,10)){case 2:return .5;case 4:return .25;case 8:return A.num%3===0?.375:.125;case 16:return .125}return .25}function Xe(A,I,Y){var H=Y-A;return H/I}function Ue(A,I,Y){if(I)return 0;let H=k,G=b,Q=w;Y!==void 0&&C.length>=Y+1&&(H=C[Y][0],G=C[Y][1],Q=C[Y][2]);var K;if(L!==void 0)K=L,L=void 0;else if(!y)K=G;else if(J>A)K=Q;else{var $=Xe(m,ie(g),A);$===0?K=H:parseInt($,10)===$?K=G:K=Q}return N&&(K+=N,N=void 0),K<0&&(K=0),K>127&&(K=127),I?0:K}function Be(A,I){var Y={};if(A.decoration)for(var H=0;H<A.decoration.length;H++)A.decoration[H]==="staccato"?Y.thisBreakBetweenNotes="staccato":A.decoration[H]==="tenuto"?Y.thisBreakBetweenNotes="tenuto":A.decoration[H]==="accent"?Y.velocity=Math.min(127,I*1.5):A.decoration[H]==="trill"?Y.noteModification="trill":A.decoration[H]==="lowermordent"?Y.noteModification="lowermordent":A.decoration[H]==="uppermordent"?Y.noteModification="pralltriller":A.decoration[H]==="mordent"?Y.noteModification="mordent":A.decoration[H]==="turn"?Y.noteModification="turn":A.decoration[H]==="roll"?Y.noteModification="roll":A.decoration[H]==="pralltriller"?Y.noteModification="pralltriller":A.decoration[H]==="trillh"&&(Y.noteModification="trillh");return Y}function Ce(A,I){var Y,H,G=I.start,Q,K=I.duration,$=ee(1/32);switch(A){case"trill":for(var W=2;K>0;)d.push({cmd:"note",pitch:I.pitch+W,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),W=W===2?0:2,K-=$,G+=$;break;case"trillh":for(var W=1;K>0;)d.push({cmd:"note",pitch:I.pitch+W,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),W=W===1?0:1,K-=$,G+=$;break;case"pralltriller":d.push({cmd:"note",pitch:I.pitch,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),K-=$,G+=$,d.push({cmd:"note",pitch:I.pitch+2,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),K-=$,G+=$,d.push({cmd:"note",pitch:I.pitch,volume:I.volume,start:G,duration:K,gap:0,instrument:h});break;case"mordent":case"lowermordent":d.push({cmd:"note",pitch:I.pitch,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),K-=$,G+=$,d.push({cmd:"note",pitch:I.pitch-2,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),K-=$,G+=$,d.push({cmd:"note",pitch:I.pitch,volume:I.volume,start:G,duration:K,gap:0,instrument:h});break;case"turn":$=I.duration/4,d.push({cmd:"note",pitch:I.pitch+2,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:I.pitch,volume:I.volume,start:G+$,duration:$,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:I.pitch-1,volume:I.volume,start:G+$*2,duration:$,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:I.pitch,volume:I.volume,start:G+$*3,duration:$,gap:0,instrument:h,style:"decoration"});break;case"roll":for(;K>0;)d.push({cmd:"note",pitch:I.pitch,volume:I.volume,start:G,duration:$,gap:0,instrument:h,style:"decoration"}),K-=$*2,G+=$*2;break}}function Ne(A,I){var Y=Ue(z(A.time),I);p.processChord(A);var H;if(A.gracenotes&&A.pitches&&A.pitches.length>0&&A.pitches[0]&&(H=he(A.gracenotes,A.pitches[0].duration),A.elem&&(A.elem.midiGraceNotePitches=je(H,z(A.time),Y*2/3,h))),A.elem){var G=z(A.time),Q=G/B/n*60*1e3;if(A.elem.currentTrackMilliseconds===void 0)A.elem.currentTrackMilliseconds=Q,A.elem.currentTrackWholeNotes=G;else if(A.elem.currentTrackMilliseconds.length===void 0)A.elem.currentTrackMilliseconds!==Q&&(A.elem.currentTrackMilliseconds=[A.elem.currentTrackMilliseconds,Q],A.elem.currentTrackWholeNotes=[A.elem.currentTrackWholeNotes,G]);else{for(var K=!1,$=0;$<A.elem.currentTrackMilliseconds.length;$++)A.elem.currentTrackMilliseconds[$]===Q&&(K=!0);K||(A.elem.currentTrackMilliseconds.push(Q),A.elem.currentTrackWholeNotes.push(G))}}if(A.pitches){var W="",Z=Be(A,Y);Z.thisBreakBetweenNotes&&(W=Z.thisBreakBetweenNotes),Z.velocity&&(Y=Z.velocity);var ne=A.pitches;A.style==="rhythm"&&(ne=p.setRhythmHead(!0,A)),A.elem&&(A.elem.midiPitches=[]);for(var ce=0;ce<ne.length;ce++){let w0=Y;!Z.velocity&&Array.isArray(A.decoration)&&A.decoration.length>ce&&(w0=Ue(z(A.time),I,ce));var re=ne[ce];if(re){re.startSlur&&(_+=re.startSlur.length),re.endSlur&&(_-=re.endSlur.length);var se=re.actualPitch?re.actualPitch:te(re);if(h===v&&U){var we=Zi(re);we&&U[we]&&(se=U[we].sound)}var le={cmd:"note",pitch:se,volume:w0,start:z(A.time),duration:ee(re.duration),instrument:h,startChar:A.elem.startChar,endChar:A.elem.endChar};if(le=Ve(le),A.gracenotes&&(le.duration=le.duration/2,le.start=le.start+le.duration),A.elem&&A.elem.midiPitches.push(le),Z.noteModification)Ce(Z.noteModification,le);else{switch(_>0?le.endType="tenuto":W&&(le.endType=W),le.endType){case"tenuto":le.gap=T;break;case"staccato":var qe=le.duration*M;le.gap=n/60*qe;break;default:le.gap=x;break}d.push(le)}}}f=d.length-1}var o0=X(A);u=Math.max(u,z(A.time)+ee(o0))}function X(A){return A.pitches&&A.pitches.length>0&&A.pitches[0]?A.pitches[0].duration:A.elem?A.elem.duration:A.duration}var ge=[0,2,4,5,7,9,11];function te(A){if(A.midipitch!==void 0)return A.midipitch;var I=A.pitch;if(A.accidental)switch(A.accidental){case"sharp":e[I]=1;break;case"flat":e[I]=-1;break;case"natural":e[I]=0;break;case"dblsharp":e[I]=2;break;case"dblflat":e[I]=-2;break;case"quartersharp":e[I]=.25;break;case"quarterflat":e[I]=-.25;break}var Y=Ke(I)*12+ge[Le(I)]+60;return e[I]!==void 0?Y+=e[I]:Y+=t[Le(I)],Y+=r,Y}function ae(A){var I=[0,0,0,0,0,0,0];if(!A.accidentals)return I;for(var Y=0;Y<A.accidentals.length;Y++){var H=A.accidentals[Y],G;switch(H.acc){case"flat":G=-1;break;case"quarterflat":G=-.25;break;case"sharp":G=1;break;case"quartersharp":G=.25;break;default:G=0;break}var Q=H.note.toLowerCase(),K=Le(Q.charCodeAt(0)-99);I[K]+=G}return I}function he(A,I){for(var Y=0,H=[],G,Q=0;Q<A.length;Q++)G=A[Q],Y+=G.duration;var K=I/2/Y;for(Q=0;Q<A.length;Q++){G=A[Q];var $=te(G);if(h===v&&U){var W=Zi(G);W&&U[W]&&($=U[W].sound)}var Z={pitch:$,duration:G.duration*K};Z=Ve(Z),H.push(Z)}return H}function je(A,I,Y,H){var G=[];Y=Math.round(Y);for(var Q=0;Q<A.length;Q++){var K=A[Q];d.push({cmd:"note",pitch:K.pitch,volume:Y,start:I,duration:K.duration,gap:0,instrument:H,style:"grace"}),G.push({pitch:K.pitch,durationInMeasures:K.duration,volume:Y,instrument:H}),I+=K.duration}return G}var Pe=.02930223664349;function Ve(A){var I=""+A.pitch;return I.indexOf(".75")>=0?(A.pitch=Math.round(A.pitch),A.cents=-50):I.indexOf(".25")>=0&&(A.pitch=Math.round(A.pitch),A.cents=50),A}function Ke(A){return Math.floor(A/7)}function Le(A){return A=A%7,A<0&&(A+=7),A}function $e(A){if(A.pattern.length===0||A.on===!1)return{on:!1};for(var I=A.pattern[0],Y=[],H="",G=0,Q=0;Q<I.length;Q++)if(I[Q]==="d"&&G++,I[Q]==="d"||I[Q]==="z")H.length!==0?(Y.push(H),H=I[Q]):H=H+I[Q];else{if(H.length===0)return{on:!1};H=H+I[Q]}if(H.length!==0&&Y.push(H),A.pattern.length!==G*2+1)return{on:!1};for(var K={on:!0,bars:A.bars,pattern:[]},$=ie(g),W=0,Z=0;Z<Y.length;Z++){H=Y[Z];for(var ne=1,ce=!1,re=0,se=1;se<H.length;se++)switch(H[se]){case"/":re!==0&&(ne*=re),re=0,ce=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":re=re*10+H[se];break;default:return{on:!1}}ce?(re===0&&(re=2),ne/=re):re&&(ne*=re),H[0]==="d"?(K.pattern.push({len:ne*$,pitch:A.pattern[1+W],velocity:A.pattern[1+W+G]}),W++):K.pattern.push({len:ne*$,pitch:null})}return R=A.bars?A.bars:1,K}function ke(){if(!(!D||!D.pattern)){for(var A=D,I=0,Y=g.num/g.den,H=0;H<A.pattern.length;H++)I+=A.pattern[H].len;var G=I/R/Y;for(H=0;H<A.pattern.length;H++)A.pattern[H].len=A.pattern[H].len/G;D=A}}function j(A){if(!(F.length===0&&!D.on)){var I=g.num/g.den;if(F.length===0){if(u<I)return;F.push({cmd:"program",channel:A,instrument:v})}if(D.on)for(var Y=m,H=0;H<D.pattern.length;H++){var G=ee(D.pattern[H].len);D.pattern[H].pitch&&F.push({cmd:"note",pitch:D.pattern[H].pitch,volume:D.pattern[H].velocity,start:Y,duration:G,gap:0,instrument:v}),Y+=G}}}function oe(A,I){for(var Y={},H=0;H<A.length;H++)for(var G=0;G<A[H].length;G++){var Q=A[H][G];Q.cmd==="note"&&(Y[Q.start]===void 0&&(Y[Q.start]=[]),Y[Q.start].push({track:H,event:G,pitch:Q.pitch}))}var K=Object.keys(Y);for(H=0;H<K.length;H++){var $=Y[K[H]];if($.length>1){$=$.sort(function(re,se){return re.pitch-se.pitch});var W=$[$.length-1],Z=W.pitch%12,ne=!1;for(G=0;!ne&&G<$.length-1;G++)$[G].pitch%12===Z&&(ne=!0);if(ne){var ce=A[W.track][W.event];ce.cents||(ce.cents=0),ce.cents+=I}}}}})();tn.exports=en});var on=P((y6,sn)=>{"use strict";function df(e,t){t||(t={});for(var r=!!t.lineBreaks,i=[],a=!1,n=[],s=[],o=[],c=[],h=[],d=[],f=[],l=0;l<e.length;l++){var u=nn(e[l]);if(u.staff){if(a&&!u.vskip)for(var p=i[i.length-1],g=0;g<p.staff.length;g++){var v=u.staff[g],m=p.staff[g];if(v&&(P0(v.meter,n[g])||(pf(v.meter,v.voices),n[g]=v.meter,delete v.meter),P0(v.key,s[g])||(gf(v.key,v.voices),s[g]=v.key,delete v.key),v.title&&(m.abbrevTitle=v.title),P0(v.clef,o[g])||(vf(v.clef,v.voices),o[g]=v.clef,delete v.clef),P0(v.vocalfont,c[g])||(Vt(v.vocalfont,v.voices,"vocalfont"),c[g]=v.vocalfont,delete v.vocalfont),P0(v.gchordfont,h[g])||(Vt(v.gchordfont,v.voices,"gchordfont"),h[g]=v.gchordfont,delete v.gchordfont),P0(v.tripletfont,d[g])||(Vt(v.tripletfont,v.voices,"tripletfont"),d[g]=v.tripletfont,delete v.tripletfont),P0(v.annotationfont,f[g])||(Vt(v.annotationfont,v.voices,"annotationfont"),f[g]=v.annotationfont,delete v.annotationfont)),v)for(var y=0;y<m.voices.length;y++){var k=m.voices[y],b=v.voices[y];r&&k.push({el_type:"break"}),b&&(m.voices[y]=k.concat(b))}}else{for(var w=0;w<u.staff.length;w++)s[w]=u.staff[w].key,n[w]=u.staff[w].meter,o[w]=u.staff[w].clef;i.push(nn(u))}a=!0}else a=!1,i.push(u)}return i}function an(e,t){return e==="abselem"?"abselem":t}function pf(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function gf(e,t){e.el_type="key",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function vf(e,t){e.el_type="clef",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function Vt(e,t,r){e.el_type="font",e.type=r,e.startChar=-1,e.endChar=-1;for(var i=0;i<t.length;i++)t[i].unshift(e)}function P0(e,t){if(!e)return!0;var r=JSON.stringify(e,an),i=JSON.stringify(t,an);return r===i}function nn(e){for(var t={},r=Object.keys(e),i=0;i<r.length;i++)if(r[i]!=="staff")t[r[i]]=e[r[i]];else{t.staff=[];for(var a=0;a<e.staff.length;a++){for(var n={},s=Object.keys(e.staff[a]),o=0;o<s.length;o++)if(s[o]!=="voices")n[s[o]]=e.staff[a][s[o]];else{n.voices=[];for(var c=0;c<e.staff[a].voices.length;c++)n.voices.push([].concat(e.staff[a].voices[c]))}t.staff.push(n)}}return t}sn.exports=df});var Ur=P((w6,hn)=>{"use strict";var cn=Qe(),ln=Me(),bf=Yr(),mf=rn(),yf=on(),wf=function(){this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset();function e(s,o,c,h){for(var d=0;d<h.length;d++)s[c][h[d]]=o[c][h[d]]}this.copyTopInfo=function(s){var o=["tempo","title","header","rhythm","origin","composer","author","partOrder"];e(this,s,"metaText",o),e(this,s,"metaTextInfo",o)},this.copyBottomInfo=function(s){var o=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];e(this,s,"metaText",o),e(this,s,"metaTextInfo",o)},this.getBeatLength=function(){var s=this.getMeterFraction(),o=1;return s.num===6||s.num===9||s.num===12||s.num===3&&s.den===8?o=3:s.den===8&&(s.num===5||s.num===7)&&(o=2),o/s.den};function t(s,o){for(var c=0,h=0;h<s.length;h++)if(s[h].staff)for(var d=0;d<s[h].staff.length;d++)for(var f=0;f<s[h].staff[d].voices.length;f++)for(var l=s[h].staff[d].voices[f],u=1,p=0;p<l.length;p++){var g=l[p].rest&&l[p].rest.type==="spacer";if(l[p].startTriplet&&(u=l[p].tripletMultiplier),l[p].duration&&!g&&l[p].el_type!=="tempo"&&(c+=l[p].duration*u),l[p].endTriplet&&(u=1),c>=o&&(c-=o),l[p].el_type==="bar")return c}return c}this.getPickupLength=function(){var s=this.getBarLength(),o=t(this.lines,s);return o<1e-8||s-o<1e-8?0:o},this.getBarLength=function(){var s=this.getMeterFraction();return s.num/s.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(s){var o;if(s)o=s;else{var c=this.metaText?this.metaText.tempo:null;o=this.getBpm(c)}o<=0&&(o=1);var h=this.getBeatsPerMeasure(),d=h/o;return d*6e4},this.getBeatsPerMeasure=function(){var s=this.getBeatLength(),o=this.getBarLength();return o/s},this.getMeter=function(){for(var s=0;s<this.lines.length;s++){var o=this.lines[s];if(o.staff)for(var c=0;c<o.staff.length;c++){var h=o.staff[c].meter;if(h)return h}}return{type:"common_time"}},this.getMeterFraction=function(){var s=this.getMeter(),o=4,c=4;if(s)if(s.type==="specified"){if(s.value&&s.value.length>0&&s.value[0].num.indexOf("+")>0){var h=s.value[0].num.split("+");o=0;for(var d=0;d<h.length;d++)o+=parseInt(h[d],10)}else o=parseInt(s.value[0].num,10);c=parseInt(s.value[0].den,10)}else s.type==="cut_time"?(o=2,c=2):s.type==="common_time"&&(o=4,c=4);return this.meter={num:o,den:c},this.meter},this.getKeySignature=function(){for(var s=0;s<this.lines.length;s++){var o=this.lines[s];if(o.staff){for(var c=0;c<o.staff.length;c++)if(o.staff[c].key)return o.staff[c].key}}return{}},this.getElementFromChar=function(s){for(var o=0;o<this.lines.length;o++){var c=this.lines[o];if(c.staff)for(var h=0;h<c.staff.length;h++)for(var d=c.staff[h],f=0;f<d.voices.length;f++)for(var l=d.voices[f],u=0;u<l.length;u++){var p=l[u];if(p.startChar&&p.endChar&&p.startChar<=s&&p.endChar>s)return p}}return null};function r(s){for(var o,c,h,d,f=s.length-1;f>=0;f--){var l=s[f];l.type==="bar"?(l.top=h,l.nextTop=o,o=h,l.bottom=d,l.nextBottom=c,c=d):l.type==="event"&&(h=l.top,d=l.top+l.height)}}function i(s){var o=[];for(var c in s)s.hasOwnProperty(c)&&o.push(s[c]);return o=o.sort(function(h,d){var f=h.milliseconds-d.milliseconds;return f!==0?f:h.type==="bar"?-1:1}),o}this.addElementToEvents=function(s,o,c,h,d,f,l,u,p,g){if(o.hint)return{isTiedState:void 0,duration:0};var v=o.durationClass?o.durationClass:o.duration;if(o.abcelem.rest&&o.abcelem.rest.type==="spacer"&&(v=0),v>0){for(var m=[],y=0;y<o.elemset.length;y++)o.elemset[y]!==null&&m.push(o.elemset[y]);var k=o.startTie;if(p!==void 0)s["event"+p].elements.push(m),g&&(s["event"+c]||(s["event"+c]={type:"event",milliseconds:c,line:f,measureNumber:l,top:h,height:d,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),s["event"+c].measureStart=!0,g=!1),k||(p=void 0);else{if(!s["event"+c])s["event"+c]={type:"event",milliseconds:c,line:f,measureNumber:l,top:h,height:d,left:o.x,width:o.w,elements:[m],startChar:o.abcelem.startChar,endChar:o.abcelem.endChar,startCharArray:[o.abcelem.startChar],endCharArray:[o.abcelem.endChar],midiPitches:o.abcelem.midiPitches?cn.cloneArray(o.abcelem.midiPitches):[]},o.abcelem.midiGraceNotePitches&&(s["event"+c].midiGraceNotePitches=cn.cloneArray(o.abcelem.midiGraceNotePitches));else{if(s["event"+c].left?s["event"+c].left=Math.min(s["event"+c].left,o.x):s["event"+c].left=o.x,s["event"+c].elements.push(m),s["event"+c].startCharArray.push(o.abcelem.startChar),s["event"+c].endCharArray.push(o.abcelem.endChar),s["event"+c].startChar===null&&(s["event"+c].startChar=o.abcelem.startChar),s["event"+c].endChar===null&&(s["event"+c].endChar=o.abcelem.endChar),o.abcelem.midiPitches&&o.abcelem.midiPitches.length){s["event"+c].midiPitches||(s["event"+c].midiPitches=[]);for(var y=0;y<o.abcelem.midiPitches.length;y++)s["event"+c].midiPitches.push(o.abcelem.midiPitches[y])}if(o.abcelem.midiGraceNotePitches&&o.abcelem.midiGraceNotePitches.length){s["event"+c].midiGraceNotePitches||(s["event"+c].midiGraceNotePitches=[]);for(var b=0;b<o.abcelem.midiGraceNotePitches.length;b++)s["event"+c].midiGraceNotePitches.push(o.abcelem.midiGraceNotePitches[b])}}g&&(s["event"+c].measureStart=!0,g=!1)}}return{isTiedState:p,duration:v/u,nextIsBar:g||o.type==="bar"}},this.makeVoicesArray=function(){for(var s=[],o=[],c={},h=0;h<this.engraver.staffgroups.length;h++){var d=this.engraver.staffgroups[h];if(d&&d.staffs&&d.staffs.length>0){var f=d.staffs[0],l=f.absoluteY,u=l-f.top*ln.STEP,p=d.staffs[d.staffs.length-1];l=p.absoluteY;for(var g=l-p.bottom*ln.STEP,v=g-u,m=d.voices,y=0;y<m.length;y++)if(!(m[y].staff&&m[y].staff.isTabStaff)){var k=!1;s[y]||(s[y]=[]),o[y]===void 0&&(o[y]=0);for(var b=m[y].children,w=0;w<b.length;w++)b[w].type==="tempo"&&(c[o[y]]=this.getBpm(b[w].abcelem)),s[y].push({top:u,height:v,line:d.line,measureNumber:o[y],elem:b[w]}),b[w].type==="bar"&&k&&o[y]++,(b[w].type==="note"||b[w].type==="rest")&&(k=!0)}}}return this.tempoLocations=c,s},this.setupEvents=function(s,o,c,h){h||(h=1);for(var d=[],f={},l=s,u,p=!0,g=this.makeVoicesArray(),v=0,m=0;m<g.length;m++){var y=l,k=Math.round(y*1e3),b=0,w=-1,C=g[m],B=c;o=this.getBeatLength()*B/60;for(var L=-1,N=0;N<C.length;N++){var _=C[N].measureNumber;L!==_&&this.tempoLocations[_]&&(B=this.tempoLocations[_],o=h*this.getBeatLength()*B/60,L=_);var F=C[N].elem,q=this.addElementToEvents(f,F,k,C[N].top,C[N].height,C[N].line,C[N].measureNumber,o,u,p);u=q.isTiedState,p=q.nextIsBar,y+=q.duration;var D;if(F.duration>0&&f["event"+k]&&(D="event"+k),k=Math.round(y*1e3),F.type==="bar"){var R=F.abcelem.type,J=R==="bar_right_repeat"||R==="bar_dbl_repeat",U=F.abcelem.startEnding==="1",x=R==="bar_left_repeat"||R==="bar_dbl_repeat"||R==="bar_right_repeat";if(J){N>0&&(f[D].endX=F.x),w===-1&&(w=N);var T=0;L=-1;for(var M=b;M<w;M++){_=C[M].measureNumber,L!==_&&this.tempoLocations[_]&&(B=this.tempoLocations[_],o=h*this.getBeatLength()*B/60,L=_);var S=C[M].elem;q=this.addElementToEvents(f,S,k,C[M].top,C[M].height,C[M].line,C[M].measureNumber,o,u,p),u=q.isTiedState,p=q.nextIsBar,y+=q.duration,T=k,k=Math.round(y*1e3)}f["event"+T]&&(f["event"+T].endX=C[w].elem.x),p=!0,w=-1}U&&(w=N),x&&(b=N)}}v=Math.max(v,k)}return d=i(f),r(d),n(this.lines,d),d.push({type:"end",milliseconds:v}),this.addUsefulCallbackInfo(d,B*h),d},this.addUsefulCallbackInfo=function(s,o){for(var c=this.millisecondsPerMeasure(o),h=0;h<s.length;h++){var d=s[h];d.millisecondsPerMeasure=c}};function a(s,o){for(;o<s.length&&s[o].left===null;)o++;return s[o]}function n(s,o){if(!(o.length<1)){for(var c=0;c<o.length-1;c++){var h=o[c],d=a(o,c+1);if(h.left!==null){var f=d&&h.top===d.top?d.left:s[h.line].staffGroup.w;h.endX!==void 0?f>h.left&&(h.endX=Math.min(h.endX,f)):h.endX=f}}var l=o[o.length-1];l.endX=s[l.line].staffGroup.w}}this.getBpm=function(s){var o;if(s||(s=this.metaText?this.metaText.tempo:null),s){o=s.bpm;var c=this.getBeatLength(),h=s.duration&&s.duration.length>0?s.duration[0]:c;o=o*h/c}if(!o){o=180;var d=this.getMeterFraction();d&&d.num!==3&&d.num%3===0&&(o=120)}return o},this.setTiming=function(s,o){if(o=o||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var c=this.metaText?this.metaText.tempo:null,h=this.getBpm(c),d=1;s?c&&(d=s/h):s=h;var f=this.getBeatLength(),l=s/60,u=this.getBarLength(),p=u/f*o/l;p&&(p-=this.getPickupLength()/f/l);var g=f*l;return this.noteTimings=this.setupEvents(p,g,s,d),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*l):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(s){s||(s={});var o=bf(this,s);return mf(o,s,this.formatting.percmap,this.formatting.midi)},this.deline=function(s){return yf(this.lines,s)},this.findSelectableElement=function(s){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(s):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};hn.exports=wf});var bn=P((x6,vn)=>{"use strict";var fn=Wt(),xf=function(e){var t=this,r={},i="";e.reset(),this.setVisualTranspose=function(a){a!==void 0&&(e.visualTranspose=a)},this.cleanUp=function(a,n,s){jr(e),delete e.runningFonts,Cf(e),e.metaText.tempo&&e.metaText.tempo.bpm&&!e.metaText.tempo.duration&&(e.metaText.tempo.duration=[e.getBeatLength()]),If(e);var o=!1,c,h,d;for(c=0;c<e.lines.length;c++)if(e.lines[c].staff!==void 0){var f=!1;for(h=0;h<e.lines[c].staff.length;h++)if(e.lines[c].staff[h]===void 0)o=!0,e.lines[c].staff[h]=null;else for(d=0;d<e.lines[c].staff[h].voices.length;d++)e.lines[c].staff[h].voices[d]===void 0?e.lines[c].staff[h].voices[d]=[]:Vr(e.lines[c].staff[h].voices[d])&&(f=!0);f||(e.lines[c]=null,o=!0)}if(o&&(e.lines=e.lines.filter(function(b){return!!b}),e.lines.forEach(function(b){b.staff&&(b.staff=b.staff.filter(function(w){return!!w}))})),a)for(;Ef(e.lines,a););if(n){for(o=!1,c=0;c<e.lines.length;c++)if(e.lines[c].staff!==void 0)for(h=0;h<e.lines[c].staff.length;h++){var l=!1;for(d=0;d<e.lines[c].staff[h].voices.length;d++)Nf(e.lines[c].staff[h].voices[d])&&(l=!0);l||(o=!0,e.lines[c].staff[h]=null)}o&&e.lines.forEach(function(b){b.staff&&(b.staff=b.staff.filter(function(w){return!!w}))})}for(_f(e.lines),c=0;c<e.lines.length;c++)if(e.lines[c].staff)for(h=0;h<e.lines[c].staff.length;h++)delete e.lines[c].staff[h].workingClef;for(var u=!1;kf(e);)u=!0;if(u)for(var p=0,g=dn(e.lines,p);g!=="not-found";)g=dn(e.lines,p),g?p++:Df(e.lines,p);for(var c=0;c<e.lines.length;c++){var v=e.lines[c].staff;if(v)for(e.staffNum=0;e.staffNum<v.length;e.staffNum++)for(v[e.staffNum].clef&&fn.fixClef(v[e.staffNum].clef),e.voiceNum=0;e.voiceNum<v[e.staffNum].voices.length;e.voiceNum++){var m=v[e.staffNum].voices[e.voiceNum];Sf(m,e.staffNum,e.voiceNum,s);for(var y=0;y<m.length;y++)m[y].el_type==="clef"&&fn.fixClef(m[y]);if(m.length>0&&m[m.length-1].barNumber){var k=pn(e.lines,c);k&&(k.staff[0].barNumber=m[m.length-1].barNumber),delete m[m.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,s},this.addTieToLastNote=function(a){var n=Af(e);return n&&n.pitches&&n.pitches.length>0?(n.pitches[0].startTie={},a&&(n.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(a,n,s,o){if(o.el_type=a,n!==null&&(o.startChar=n),s!==null&&(o.endChar=s),a==="note"){var c=Bf(o);c>=.25||o.force_end_beam_last&&e.potentialStartBeam!==void 0?Kt(e):o.end_beam&&e.potentialStartBeam!==void 0?o.rest===void 0?Lf(o,e):Kt(e):o.rest===void 0&&(e.potentialStartBeam===void 0?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o)}else Kt(e);return delete o.end_beam,delete o.force_end_beam_last,o.rest&&o.rest.type==="invisible"&&delete o.decoration,e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum?!1:(Pf(t,e,o,r,i),!0)},this.appendStartingElement=function(a,n,s,o){jr(e);var c;a==="key"&&(c=o.impliedNaturals,delete o.impliedNaturals,delete o.explicitAccidentals);var h=Object.assign({},o);if(e.lines[e.lineNum]){var d=e.lines[e.lineNum].staff;if(d){d.length<=e.staffNum&&(d[e.staffNum]={},d[e.staffNum].clef=Object.assign({},d[0].clef),d[e.staffNum].key=Object.assign({},d[0].key),d[0].meter&&(d[e.staffNum].meter=Object.assign({},d[0].meter)),d[e.staffNum].workingClef=Object.assign({},d[0].workingClef),d[e.staffNum].voices=[[]]),a==="clef"&&(d[e.staffNum].workingClef=h);for(var f=d[e.staffNum].voices[e.voiceNum],l=0;l<f.length;l++){if(f[l].el_type==="note"||f[l].el_type==="bar"){h.el_type=a,h.startChar=n,h.endChar=s,c&&(h.accidentals=c.concat(h.accidentals)),f.push(h);return}if(f[l].el_type===a){h.el_type=a,h.startChar=n,h.endChar=s,c&&(h.accidentals=c.concat(h.accidentals)),f[l]=h;return}}d[e.staffNum][a]=o}}},this.addSubtitle=function(a,n){gt(e,{subtitle:{text:a,startChar:n.startChar,endChar:n.endChar}})},this.addSpacing=function(a){e.vskipPending=a},this.addNewPage=function(a){gt(e,{newpage:a})},this.addSeparator=function(a,n,s,o){gt(e,{separator:{spaceAbove:Math.round(a),spaceBelow:Math.round(n),lineLength:Math.round(s),startChar:o.startChar,endChar:o.endChar}})},this.addText=function(a,n){gt(e,{text:{text:a,startChar:n.startChar,endChar:n.endChar}})},this.addCentered=function(a){gt(e,{text:[{text:a,center:!0}]})},this.changeVoiceScale=function(a){t.appendElement("scale",null,null,{size:a})},this.changeVoiceColor=function(a){t.appendElement("color",null,null,{color:a})},this.startNewLine=function(a){jr(e),a.currentVoiceName&&(i=a.currentVoiceName,r[a.currentVoiceName]=a),e.lines[e.lineNum]===void 0?qf(t,e,a):e.lines[e.lineNum].staff===void 0?(e.lineNum++,this.startNewLine(a)):e.lines[e.lineNum].staff[e.staffNum]===void 0?gn(t,e,a):e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum]===void 0?Kr(t,e,a):Vr(e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])?(e.lineNum++,this.startNewLine(a)):a.part&&t.appendElement("part",a.part.startChar,a.part.endChar,{title:a.part.title})},this.setRunningFont=function(a,n){e.runningFonts[a]=n},this.setBarNumberImmediate=function(a){var n=this.getCurrentVoice();if(n&&n.length>0){var s=n[n.length-1];if(s.el_type==="bar")s.barNumber!==void 0&&(s.barNumber=a);else return a-1}return a},this.hasBeginMusic=function(){for(var a=0;a<e.lines.length;a++)if(e.lines[a].staff)return!0;return!1},this.isFirstLine=function(a){for(var n=a-1;n>=0;n--)if(e.lines[n].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var a=Mf(e.lines,e.lineNum);if(!a)return null;var n=a.staff[e.staffNum];return n&&n.voices[e.voiceNum]!==void 0?n.voices[e.voiceNum]:null},this.setCurrentVoice=function(a,n,s){e.staffNum=a,e.voiceNum=n,i=s;for(var o=0;o<e.lines.length;o++)if(e.lines[o].staff&&(e.lines[o].staff[a]===void 0||e.lines[o].staff[a].voices[n]===void 0||!Vr(e.lines[o].staff[a].voices[n])))return e.lineNum=o,!!(!e.lines[o].staff[a]||e.lines[o].staff[a].voices[n]);return e.lineNum=o,!1},this.addMetaText=function(a,n,s){e.metaText[a]===void 0?(e.metaText[a]=n,e.metaTextInfo[a]=s):(typeof e.metaText[a]=="string"&&typeof n=="string"?e.metaText[a]+=`
|
|
8
|
+
`+n:(e.metaText[a]==="string"&&(e.metaText[a]=[{text:e.metaText[a]}]),typeof n=="string"&&(n=[{text:n}]),e.metaText[a]=e.metaText[a].concat(n)),e.metaTextInfo[a].endChar=s.endChar)},this.addMetaTextArray=function(a,n,s){e.metaText[a]===void 0?(e.metaText[a]=[n],e.metaTextInfo[a]=s):(e.metaText[a].push(n),e.metaTextInfo[a].endChar=s.endChar)},this.addMetaTextObj=function(a,n,s){e.metaText[a]=n,e.metaTextInfo[a]=s}};function un(e){if(!e||typeof e=="string")return!1;for(var t=0;t<e.length;t++)if(typeof e[t]!="string")return!1;return!0}function Cf(e){un(e.metaText.notes)&&(e.metaText.notes=e.metaText.notes.join(`
|
|
9
|
+
`)),un(e.metaText.history)&&(e.metaText.history=e.metaText.history.join(`
|
|
10
|
+
`))}function kf(e){for(var t=!1,r=0;r<e.lines.length;r++){var i=e.lines[r];if(i.staff)for(var a=0;a<i.staff.length;a++){for(var n=i.staff[a],s=[],o=0;o<n.voices.length;o++){var c=n.voices[o];s.push({hasOverlay:!1,voice:[],snip:[]});for(var h=0,d=!1,f=-1,l=0;l<c.length;l++){var u=c[l];if(u.el_type==="overlay"&&!d){t=!0,d=!0,f=l,s[o].hasOverlay=!0;for(var p=0;p<r;p++)e.lines[p].staff&&e.lines[p].staff.forEach(b=>{n.voices.length>=b.voices.length&&b.voices.forEach(w=>{let C=[];w.forEach(B=>{B.el_type==="bar"?C.push(B):B.el_type==="note"&&C.push({el_type:"note",duration:B.duration,rest:{type:"invisible"},startChar:B.startChar,endChar:B.endChar})}),b.voices.push(C)})})}else u.el_type==="bar"?(d?(d=!1,s[o].snip.push({start:f,len:l-f}),s[o].voice.push(u)):(h>0&&s[o].voice.push({el_type:"note",duration:h,rest:{type:"invisible"},startChar:u.startChar,endChar:u.endChar}),s[o].voice.push(u)),h=0):u.el_type==="note"?d?s[o].voice.push(u):(!u.rest||u.rest.type!=="spacer")&&(h+=u.duration):(u.el_type==="scale"||u.el_type==="stem"||u.el_type==="overlay"||u.el_type==="style"||u.el_type==="transpose"||u.el_type==="color")&&s[o].voice.push(u)}s[o].hasOverlay&&s[o].snip.length===0&&s[o].snip.push({start:f,len:c.length-f})}for(o=0;o<s.length;o++){var g=s[o];if(g.hasOverlay){g.voice.splice(0,0,{el_type:"stem",direction:"down"}),n.voices.push(g.voice);for(var v=g.snip.length-1;v>=0;v--){var m=g.snip[v];n.voices[o].splice(m.start,m.len),n.voices[o].splice(m.start+1,0,{el_type:"stem",direction:"auto"});var y=Tf(n.voices[o],m.start);n.voices[o].splice(y,0,{el_type:"stem",direction:"up"})}for(v=0;v<n.voices[n.voices.length-1].length;v++){n.voices[n.voices.length-1][v]=Object.assign({},n.voices[n.voices.length-1][v]);var k=n.voices[n.voices.length-1][v];k.el_type==="bar"&&k.startEnding&&delete k.startEnding,k.el_type==="bar"&&k.endEnding&&delete k.endEnding}}}}}return t}function Tf(e,t){for(var r=t-1;r>0&&e[r].el_type!=="bar";r--);return r}function _f(e){for(var t=!0,r=0;r<e.length;r++){var i=e[r];if(i.staff){for(var a=0;a<i.staff.length;a++){var n=i.staff[a];if(n.title){for(var s=!1,o=0;o<n.title.length;o++)n.title[o]?(n.title[o]=t?n.title[o].name:n.title[o].subname,n.title[o]?s=!0:n.title[o]=""):n.title[o]="";s||delete n.title}}t=!1}}}function Sf(e,t,r,i){i[t]||(i[t]=[]),i[t][r]||(i[t][r]=[]);for(var a,n=function(m,y,k){if(i[t][r][k]===void 0){for(a=0;a<i[t][r].length;a++)if(i[t][r][a]!==void 0){k=a;break}if(i[t][r][k]===void 0){var b=k*100+1;m.endSlur.forEach(function(B){b===B&&--b}),i[t][r][k]=[b]}}for(var w,C=0;C<y;C++)w=i[t][r][k].pop(),m.endSlur.push(w);return i[t][r][k].length===0&&delete i[t][r][k],w},s=function(m,y,k,b){m.startSlur=[],i[t][r][k]===void 0&&(i[t][r][k]=[]);for(var w=k*100+1,C=0;C<y;C++)b&&(b.forEach(function(B){w===B&&++w}),b.forEach(function(B){w===B&&++w}),b.forEach(function(B){w===B&&++w})),i[t][r][k].forEach(function(B){w===B&&++w}),i[t][r][k].forEach(function(B){w===B&&++w}),i[t][r][k].push(w),m.startSlur.push({label:w}),m.dottedSlur&&(m.startSlur[m.startSlur.length-1].style="dotted",delete m.dottedSlur),w++},o=0;o<e.length;o++){var c=e[o];if(c.el_type==="note"){if(c.gracenotes)for(var h=0;h<c.gracenotes.length;h++){if(c.gracenotes[h].endSlur){var d=c.gracenotes[h].endSlur;c.gracenotes[h].endSlur=[];for(var f=0;f<d;f++)n(c.gracenotes[h],1,20)}c.gracenotes[h].startSlur&&(a=c.gracenotes[h].startSlur,s(c.gracenotes[h],a,20))}if(c.endSlur&&(a=c.endSlur,c.endSlur=[],n(c,a,0)),c.startSlur&&(a=c.startSlur,s(c,a,0)),c.pitches){for(var l=[],u=0;u<c.pitches.length;u++)if(c.pitches[u].endSlur){var p=c.pitches[u].endSlur;c.pitches[u].endSlur=[];for(var g=0;g<p;g++){var v=n(c.pitches[u],1,u+1);l.push(v)}}for(u=0;u<c.pitches.length;u++)c.pitches[u].startSlur&&(a=c.pitches[u].startSlur,s(c.pitches[u],a,u+1,l));c.gracenotes&&c.pitches[0].endSlur&&c.pitches[0].endSlur[0]===100&&c.pitches[0].startSlur&&(c.gracenotes[0].endSlur?c.gracenotes[0].endSlur.push(c.pitches[0].startSlur[0].label):c.gracenotes[0].endSlur=[c.pitches[0].startSlur[0].label],c.pitches[0].endSlur.length===1?delete c.pitches[0].endSlur:c.pitches[0].endSlur[0]===100?c.pitches[0].endSlur.shift():c.pitches[0].endSlur[c.pitches[0].endSlur.length-1]===100&&c.pitches[0].endSlur.pop(),i[t][r][1].length===1?delete i[t][r][1]:i[t][r][1].pop())}}}}function Ef(e,t){for(var r=0;r<e.length;r++)if(e[r].staff!==void 0)for(var i=0;i<e[r].staff.length;i++)for(var a=[],n=0;n<e[r].staff[i].voices.length;n++)for(var s=e[r].staff[i].voices[n],o=0,c=0;c<s.length;c++)if(s[c].el_type==="bar"){if(o++,o>=t&&c<s.length-1){var h=pn(e,r);if(!h){var d=JSON.parse(JSON.stringify(e[r]));e.push(Object.assign({},d)),h=e[e.length-1];for(var f=0;f<h.staff.length;f++)for(var l=0;l<h.staff[f].voices.length;l++)h.staff[f].voices[l]=[]}var u=c+1,p=e[r].staff[i].voices[n].slice(u);return e[r].staff[i].voices[n]=e[r].staff[i].voices[n].slice(0,u),h.staff[i].voices[n]=a.concat(p.concat(h.staff[i].voices[n])),!0}}else s[c].duration||a.push(s[c]);return!1}function Mf(e,t){if(e.length<=t)return null;for(;t>=0;){if(e[t].staff)return e[t];t--}return null}function pn(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}function Af(e){if(!e.lines[e.lineNum]||!e.lines[e.lineNum].staff||!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.el_type==="note")return i}return null}function Bf(e){return e.duration?e.duration:0}function jr(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function Vr(e){for(var t=0;t<e.length;t++)if(e[t].el_type==="note"||e[t].el_type==="bar")return!0;return!1}function Nf(e){for(var t=0;t<e.length;t++)if(e[t].el_type==="note"&&(e[t].rest===void 0||e[t].chord!==void 0))return!0;return!1}function gt(e,t){e.vskipPending&&(t.vskip=e.vskipPending,delete e.vskipPending),e.lines.push(t)}function Pf(e,t,r,i,a){var n=t.lines[t.lineNum].staff[t.staffNum];if(r.pitches!==void 0){var s=n.workingClef.verticalPos;r.pitches.forEach(function(c){c.verticalPos=c.pitch-s})}if(r.gracenotes!==void 0){var o=n.workingClef.verticalPos;r.gracenotes.forEach(function(c){c.verticalPos=c.pitch-o})}n.voices.length<=t.voiceNum&&(i[a]||(i[a]={}),Kr(e,t,i[a])),n.voices[t.voiceNum].push(r)}function Lf(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}function Kt(e){e.potentialStartBeam!==void 0&&e.potentialEndBeam!==void 0&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function $t(e,t,r){if(e.runningFonts[t]){for(var i=!1,a=Object.keys(r),n=0;n<a.length;n++)e.runningFonts[t][a[n]]!==r[a[n]]&&(i=!0);i&&(e.lines[e.lineNum].staff[e.staffNum][t]=r)}e.runningFonts[t]=r}function Kr(e,t,r){var i=t.lines[t.lineNum].staff[t.staffNum];if(i.voices[t.voiceNum]=[],i.title||(i.title=[]),i.title[t.voiceNum]={name:r.name,subname:r.subname},r.style&&e.appendElement("style",null,null,{head:r.style}),r.stem)e.appendElement("stem",null,null,{direction:r.stem});else if(t.voiceNum>0){if(i.voices[0]!==void 0){for(var a=!1,n=0;n<i.voices[0].length;n++)i.voices[0].el_type==="stem"&&(a=!0);if(!a){var s={el_type:"stem",direction:"up"};i.voices[0].splice(0,0,s)}}e.appendElement("stem",null,null,{direction:"down"})}r.scale&&e.appendElement("scale",null,null,{size:r.scale}),r.color&&e.appendElement("color",null,null,{color:r.color})}function gn(e,t,r){r.key&&r.key.impliedNaturals&&(r.key.accidentals=r.key.accidentals.concat(r.key.impliedNaturals),delete r.key.impliedNaturals),t.lines[t.lineNum].staff[t.staffNum]={voices:[],clef:r.clef,key:r.key,workingClef:r.clef};var i=t.lines[t.lineNum].staff[t.staffNum];r.stafflines!==void 0&&(i.clef.stafflines=r.stafflines,i.workingClef.stafflines=r.stafflines),r.staffscale&&(i.staffscale=r.staffscale),r.annotationfont&&$t(t,"annotationfont",r.annotationfont),r.gchordfont&&$t(t,"gchordfont",r.gchordfont),r.tripletfont&&$t(t,"tripletfont",r.tripletfont),r.vocalfont&&$t(t,"vocalfont",r.vocalfont),r.bracket&&(i.bracket=r.bracket),r.brace&&(i.brace=r.brace),r.connectBarLines&&(i.connectBarLines=r.connectBarLines),r.barNumber&&(i.barNumber=r.barNumber),Kr(e,t,r),r.part&&e.appendElement("part",r.part.startChar,r.part.endChar,{title:r.part.title}),r.meter!==void 0&&(i.meter=r.meter),t.vskipPending&&(t.lines[t.lineNum].vskip=t.vskipPending,delete t.vskipPending)}function qf(e,t,r){t.lines[t.lineNum]={staff:[]},gn(e,t,r)}function dn(e,t){for(var r=!1,i=!1,a=0;a<e.length;a++){var n=e[a].staff;if(n)for(var s=0;s<n.length;s++){var o=n[s];if(t<o.voices.length){i=!0;for(var c=o.voices[t],h=[],d=0;d<c.length;d++){var f=c[d];f.el_type==="note"&&(!f.rest||f.chord)&&(r=!0)}}}}return i?r:"not-found"}function Df(e,t){for(var r=0;r<e.length;r++){var i=e[r].staff;if(i)for(var a=0;a<i.length;a++){var n=i[a];t<n.voices.length&&n.voices.splice(t,1)}}}function If(e){for(var t=1;t<e.lines.length;t++){var r=e.lines[t];if(r.subtitle){var i=e.lines[t-1];if(i.staff)for(var a=0;a<i.staff.length;a++)for(var n=0;n<i.staff[a].voices.length;n++){var s=i.staff[a].voices[n];if(s[s.length-1].el_type==="key"){s.pop();for(var o=e.lines[t];t<e.lines.length&&!o.staff;)t++,o=e.lines[t];if(o)for(var c=0;c<o.staff.length;c++){for(var h=o.staff[c].key.accidentals,d=[],f=0;f<h.length;f++)h[f].acc!=="natural"&&d.push(h[f]);o.staff[c].key.accidentals=d}}}}}}vn.exports=xf});var Qt=P((C6,yn)=>{"use strict";var k0=Qe(),mn=Ot(),Of=wi(),Ff=Di(),Hf=Oi(),zf=Rr(),Rf=Gi(),Gf=Ur(),Yf=bn(),Wf=function(){"use strict";var e=new Gf,t=new Yf(e),r,i="",a="";this.getTune=function(){var b={formatting:e.formatting,lines:e.lines,media:e.media,metaText:e.metaText,metaTextInfo:e.metaTextInfo,version:e.version,addElementToEvents:e.addElementToEvents,addUsefulCallbackInfo:e.addUsefulCallbackInfo,getTotalTime:e.getTotalTime,getTotalBeats:e.getTotalBeats,getBarLength:e.getBarLength,getBeatLength:e.getBeatLength,getBeatsPerMeasure:e.getBeatsPerMeasure,getBpm:e.getBpm,getMeter:e.getMeter,getMeterFraction:e.getMeterFraction,getPickupLength:e.getPickupLength,getKeySignature:e.getKeySignature,getElementFromChar:e.getElementFromChar,makeVoicesArray:e.makeVoicesArray,millisecondsPerMeasure:e.millisecondsPerMeasure,setupEvents:e.setupEvents,setTiming:e.setTiming,setUpAudio:e.setUpAudio,deline:e.deline,findSelectableElement:e.findSelectableElement,getSelectableArray:e.getSelectableArray};return e.lineBreaks&&(b.lineBreaks=e.lineBreaks),e.visualTranspose&&(b.visualTranspose=e.visualTranspose),e.chordGrid&&(b.chordGrid=e.chordGrid),b};function n(b,w,C){b.positioning||(b.positioning={}),b.positioning[w]=C}function s(b,w,C){b.fonts||(b.fonts={}),b.fonts[w]=C}var o={reset:function(){for(var b in this)this.hasOwnProperty(b)&&typeof this[b]!="function"&&delete this[b];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.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(b,w){return this[b].decoration!==w[b].decoration||this[b].face!==w[b].face||this[b].size!==w[b].size||this[b].style!==w[b].style||this[b].weight!==w[b].weight},addFormattingOptions:function(b,w,C){C==="note"?(this.vocalPosition!=="auto"&&n(b,"vocalPosition",this.vocalPosition),this.dynamicPosition!=="auto"&&n(b,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&n(b,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&n(b,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&n(b,"volumePosition",this.volumePosition),this.differentFont("annotationfont",w)&&s(b,"annotationfont",this.annotationfont),this.differentFont("gchordfont",w)&&s(b,"gchordfont",this.gchordfont),this.differentFont("vocalfont",w)&&s(b,"vocalfont",this.vocalfont),this.differentFont("tripletfont",w)&&s(b,"tripletfont",this.tripletfont)):C==="bar"&&(this.dynamicPosition!=="auto"&&n(b,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&n(b,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&n(b,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&n(b,"volumePosition",this.volumePosition),this.differentFont("measurefont",w)&&s(b,"measurefont",this.measurefont),this.differentFont("repeatfont",w)&&s(b,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var b=0;b<this.inTie.length;b++)if(this.endingHoldOver.inTie.push([]),this.inTie[b])for(var w=0;w<this.inTie[b].length;w++)this.endingHoldOver.inTie[b].push(this.inTie[b][w]);for(var C in this.inTieChord)this.inTieChord.hasOwnProperty(C)&&(this.endingHoldOver.inTieChord[C]=this.inTieChord[C])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var b=0;b<this.endingHoldOver.inTie.length;b++){this.inTie.push([]);for(var w=0;w<this.endingHoldOver.inTie[b].length;w++)this.inTie[b].push(this.endingHoldOver.inTie[b][w])}for(var C in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(C)&&(this.inTieChord[C]=this.endingHoldOver.inTieChord[C])}}},c=function(b){o.warnings||(o.warnings=[]),o.warnings.push(b)},h=function(b){o.warningObjects||(o.warningObjects=[]),o.warningObjects.push(b)},d=function(b){var w=b.replace(/\x12/g," ");return w=w.replace(/&/g,"&"),w=w.replace(/</g,"<"),w.replace(/>/g,">")},f=function(b,w,C){w||(w=" ");var B=w[C];(B===" "||!B)&&(B="SPACE");var L=d(w.substring(C-64,C))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+B+"</span>"+d(w.substring(C+1).substring(0,64));c("Music Line:"+r.lineIndex+":"+(C+1)+": "+b+": "+L),h({message:b,line:w,startChar:o.iChar+C,column:C})},l,u;this.getWarnings=function(){return o.warnings},this.getWarningObjects=function(){return o.warningObjects};var p=function(b,w){if(w.indexOf("")>=0){i+=w;return}if(w=i+w,i="",!b){f("Can't add words before the first line of music",b,0);return}w=k0.strip(w),w[w.length-1]!=="-"&&(w=w+" ");for(var C=[],B=0,L=!1,N=function(D){var R=k0.strip(w.substring(B,D));if(R=R.replace(/\\([-_*|~])/g,"$1"),B=D+1,R.length>0){L&&(R=R.replace(/~/g," "));var J=w[D];return J!=="_"&&J!=="-"&&(J=" "),C.push({syllable:r.translateString(R),divider:J}),L=!1,!0}return!1},_=!1,F=0;F<w.length;F++){switch(w[F]){case" ":case"":N(F);break;case"-":!_&&!N(F)&&C.length>0&&(k0.last(C).divider="-",C.push({skip:!0,to:"next"}));break;case"_":_||(N(F),C.push({skip:!0,to:"slur"}));break;case"*":_||(N(F),C.push({skip:!0,to:"next"}));break;case"|":_||(N(F),C.push({skip:!0,to:"bar"}));break;case"~":_||(L=!0);break}_=w[F]==="\\"}var q=!1;b.forEach(function(D){if(C.length!==0){if(C[0].skip){switch(C[0].to){case"next":D.el_type==="note"&&D.pitches!==null&&!q&&C.shift();break;case"slur":D.el_type==="note"&&D.pitches!==null&&C.shift();break;case"bar":D.el_type==="bar"&&C.shift();break}D.el_type!=="bar"&&(D.lyric===void 0?D.lyric=[{syllable:"",divider:" "}]:D.lyric.push({syllable:"",divider:" "}))}else if(D.el_type==="note"&&D.rest===void 0&&!q){var R=C.shift();R.syllable&&(R.syllable=R.syllable.replace(/ +/g,"\xA0")),D.lyric===void 0?D.lyric=[R]:D.lyric.push(R)}}})},g=function(b,w){if(w.indexOf("")>=0){a+=w;return}if(w=a+w,a="",!b){f("Can't add symbols before the first line of music",b,0);return}w=k0.strip(w),w[w.length-1]!=="-"&&(w=w+" ");for(var C=[],B=0,L=!1,N=function(q){var D=k0.strip(w.substring(B,q));if(B=q+1,D.length>0){L&&(D=D.replace(/~/g," "));var R=w[q];return R!=="_"&&R!=="-"&&(R=" "),C.push({syllable:r.translateString(D),divider:R}),L=!1,!0}return!1},_=0;_<w.length;_++)switch(w[_]){case" ":case"":N(_);break;case"-":!N(_)&&C.length>0&&(k0.last(C).divider="-",C.push({skip:!0,to:"next"}));break;case"_":N(_),C.push({skip:!0,to:"slur"});break;case"*":N(_),C.push({skip:!0,to:"next"});break;case"|":N(_),C.push({skip:!0,to:"bar"});break;case"~":L=!0;break}var F=!1;b.forEach(function(q){if(C.length!==0){if(C[0].skip)switch(C[0].to){case"next":q.el_type==="note"&&q.pitches!==null&&!F&&C.shift();break;case"slur":q.el_type==="note"&&q.pitches!==null&&C.shift();break;case"bar":q.el_type==="bar"&&C.shift();break}else if(q.el_type==="note"&&q.rest===void 0&&!F){var D=C.shift();q.lyric===void 0?q.lyric=[D]:q.lyric.push(D)}}})},v=function(b){if(k0.startsWith(b,"%%")){var w=mn.addDirective(b.substring(2));w&&f(w,b,2);return}var C=b.indexOf("%");if(C>=0&&(b=b.substring(0,C)),b=b.replace(/\s+$/,""),b.length!==0){if(i){p(t.getCurrentVoice(),b.substring(2));return}if(a){g(t.getCurrentVoice(),b.substring(2));return}if(b.length<2||b[1]!==":"||u.lineContinuation){u.parseMusic(b);return}var B=l.parseHeader(b);B.regular&&u.parseMusic(b),B.newline&&u.startNewLine(),B.words&&p(t.getCurrentVoice(),b.substring(2)),B.symbols&&g(t.getCurrentVoice(),b.substring(2))}};function m(b,w){b.push({el_type:"hint"});for(var C=0;C<w.length;C++){var B=w[C],L=Object.assign({},B);if(b.push(L),B.el_type==="bar")return}}function y(b,w){for(var C=0;C<b.length;C++){var B=b[C],L=w[C];if(L)for(var N=0;N<L.voices.length;N++){var _=L.voices[N],F=B.voices[N];F&&m(F,_)}}}function k(){for(var b=0;b<e.lines.length;b++){var w=e.lines[b].staff;if(w){for(var C=b+1;C<e.lines.length&&e.lines[C].staff===void 0;)C++;if(C<e.lines.length){var B=e.lines[C].staff;y(w,B)}}}}this.parse=function(b,w,C){w||(w={}),C||(C=0),e.reset(),b=b.replace(/\r\n?/g,`
|
|
11
|
+
`)+`
|
|
12
|
+
`;var B=b.split(`
|
|
13
|
+
\\`);if(B.length>1){for(var L=1;L<B.length;L++)for(;B[L].length>0&&B[L][0]!==`
|
|
14
|
+
`;)B[L]=B[L].substr(1),B[L-1]+=" ";b=B.join(" ")}b=b.replace(/\\%/g,"\u200B\uFF05"),b=b.replace(/\\([ \t]*)(%.*)*\n/g,function(J,U,x){var T=x?Array(x.length+1).join(" "):"";return U+""+T+`
|
|
15
|
+
`});var N=b.split(`
|
|
16
|
+
`);k0.last(N).length===0&&N.pop(),r=new Hf(N,o),l=new Of(r,f,o,e,t),u=new Ff(r,f,o,e,t,l),w.print&&(e.media="print"),o.reset(),o.iChar=C,w.visualTranspose?(o.globalTranspose=parseInt(w.visualTranspose),o.globalTranspose===0?o.globalTranspose=void 0:t.setVisualTranspose(w.visualTranspose)):o.globalTranspose=void 0,w.lineBreaks&&(o.lineBreaks=w.lineBreaks),l.reset(r,f,o,e);try{w.format&&mn.globalFormatting(w.format);for(var _=r.nextLine();_;){if(w.header_only&&o.is_in_header===!1||w.stop_on_warning&&o.warnings)throw"normal_abort";var F=o.is_in_header;v(_),F&&!o.is_in_header&&(t.setRunningFont("annotationfont",o.annotationfont),t.setRunningFont("gchordfont",o.gchordfont),t.setRunningFont("tripletfont",o.tripletfont),t.setRunningFont("vocalfont",o.vocalfont)),_=r.nextLine()}i&&p(t.getCurrentVoice(),""),a&&g(t.getCurrentVoice(),""),o.openSlurs=t.cleanUp(o.barsperstaff,o.staffnonote,o.openSlurs)}catch(J){if(J!=="normal_abort")throw J}var q=792,D=8.5*72;switch(o.papersize){case"legal":q=1008,D=8.5*72;break;case"A4":q=11.7*72,D=8.3*72;break}if(o.landscape){var R=q;q=D,D=R}if(e.formatting.pagewidth||(e.formatting.pagewidth=D),e.formatting.pageheight||(e.formatting.pageheight=q),w.hint_measures&&k(),zf.wrapLines(e,o.lineBreaks,o.barNumbers),w.chordGrid)try{e.chordGrid=Rf(e)}catch(J){switch(J.message){case"notCommonTime":f("Chord grid only works for 2/2 and 4/4 time.",0,0);break;case"noChords":f("No chords are found in the tune.",0,0);break;default:f(J.message,0,0)}}}};yn.exports=Wf});var xn=P((k6,wn)=>{"use strict";var vt=Qe(),Xf=function(e){"use strict";var t="",r=e.match(/(\s*)/);e=vt.strip(e);for(var i=e.split(`
|
|
17
|
+
X:`),a=1;a<i.length;a++)i[a]="X:"+i[a];var n=r?r[0].length:0,s=[];if(i.forEach(function(d){s.push({abc:d,startPos:n}),n+=d.length+1}),s.length>1&&!vt.startsWith(s[0].abc,"X:")){var o=s.shift(),c=o.abc.split(`
|
|
18
|
+
`);c.forEach(function(d){vt.startsWith(d,"%%")&&(t+=d+`
|
|
19
|
+
`)})}var h=t;return s.forEach(function(d){var f=d.abc.indexOf(`
|
|
20
|
+
|
|
21
|
+
`);f>0&&(d.abc=d.abc.substring(0,f)),d.pure=d.abc,d.abc=t+d.abc,d.title="";var l=d.pure.split("T:");l.length>1&&(l=l[1].split(`
|
|
22
|
+
`),d.title=vt.strip(l[0]));var u=d.pure.substring(2,d.pure.indexOf(`
|
|
23
|
+
`));d.id=vt.strip(u)}),{header:h,tunes:s}};wn.exports=Xf});var kn=P((T6,Cn)=>{"use strict";function $r(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace;var r=3;this.bar={pitch:r,pitch2:t*e,height:5}}$r.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)};$r.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var i=this.bar.pitch2/2;if(e.name=="dots.dot")return r?(t.pitch=i,!1):(t.pitch=i+this.lineSpace,!0);break}return r};Cn.exports=$r});var Qr=P((_6,Tn)=>{"use strict";var T0=function(t,r){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=t,this.voicetotal=r,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}};T0.prototype.addChild=function(e){if(e.type==="bar"){for(var t=!0,r=0;t&&r<this.children.length;r++)this.children[r].type.indexOf("staff-extra")<0&&this.children[r].type!=="tempo"&&(t=!1);t||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=e,this.setRange(e)};T0.prototype.setLimit=function(e,t){var r=t.specialY;r||(r=t),r[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],r[e]):this.specialY[e]=r[e])};T0.prototype.adjustRange=function(e){e.bottom!==void 0&&(this.bottom=Math.min(this.bottom,e.bottom)),e.top!==void 0&&(this.top=Math.max(this.top,e.top))};T0.prototype.setRange=function(e){this.adjustRange(e),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)};T0.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)};T0.prototype.addBeam=function(e){this.beams.push(e)};T0.prototype.setWidth=function(e){this.w=e};Tn.exports=T0});var Jt=P((S6,_n)=>{"use strict";var Uf=function(e,t,r,i){if(e)for(var a=0;a<e.length;a++){var n=e[a],s=n.getAttribute("highlight");s||(s="fill"),n.setAttribute(s,i);var o=n.getAttribute("class");o||(o=""),o=o.replace(r,""),o=o.replace(t,""),t.length>0&&(o.length>0&&o[o.length-1]!==" "&&(o+=" "),o+=t),n.setAttribute("class",o)}};_n.exports=Uf});var Jr=P((E6,Sn)=>{"use strict";var jf=Jt(),Vf=function(e,t){e===void 0&&(e="abcjs-note_selected"),t===void 0&&(t="#ff0000"),jf(this.elemset,e,"",t)};Sn.exports=Vf});var Zr=P((M6,En)=>{"use strict";var Kf=Jt(),$f=function(e,t){e===void 0&&(e="abcjs-note_selected"),t===void 0&&(t="#000000"),Kf(this.elemset,"",e,t)};En.exports=$f});var L0=P((A6,Mn)=>{"use strict";var Qf=Jr(),Jf=Zr(),Te=function(t,r,i,a,n,s){s||(s={}),this.tuneNumber=n,this.abcelem=t,this.duration=r,this.durationClass=s.durationClassOveride?s.durationClassOveride:this.duration,this.minspacing=i||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=a,t.extraClass&&(this.extraClass=t.extraClass),this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};Te.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}};Te.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),this.fixed.t===void 0?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),this.fixed.b===void 0?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)};Te.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)};Te.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),e.top!==void 0&&(this.fixed.t===void 0?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),e.bottom!==void 0&&(this.fixed.b===void 0?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)};Te.prototype.addFixed=function(e){this._addChild(e)};Te.prototype.addFixedX=function(e){this._addChild(e)};Te.prototype.addCentered=function(e){var t=e.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)};Te.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])};Te.prototype._addChild=function(e){var t=!0;this.abcelem.el_type=="clef"&&e.type=="barNumber"&&(t=!1),e.parent=this,this.children[this.children.length]=e,t&&this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)};Te.prototype.pushTop=function(e){e!==void 0&&(this.top===void 0?this.top=e:this.top=Math.max(e,this.top))};Te.prototype.pushBottom=function(e){e!==void 0&&(this.bottom===void 0?this.bottom=e:this.bottom=Math.min(e,this.bottom))};Te.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)};Te.prototype.center=function(e,t){var r=(t.x-e.x)/2+e.x;this.x=r-this.w/2;for(var i=0;i<this.children.length;i++)this.children[i].setX(this.x)};Te.prototype.setHint=function(){this.hint=!0};Te.prototype.highlight=function(e,t){Qf.bind(this)(e,t)};Te.prototype.unhighlight=function(e,t){Jf.bind(this)(e,t)};Mn.exports=Te});var e0=P((B6,An)=>{"use strict";var W0=function(t,r,i,a,n){switch(n=n||{},this.x=0,this.c=t,this.dx=r,this.w=i,this.pitch=a,this.scalex=n.scalex||1,this.scaley=n.scaley||1,this.type=n.type||"symbol",this.pitch2=n.pitch2,this.linewidth=n.linewidth,this.klass=n.klass,this.chordPos=n.chordPos,this.anchor=n.anchor?n.anchor:"middle",this.top=a,this.pitch2!==void 0&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=a,this.pitch2!==void 0&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),n.thickness&&(this.top+=n.thickness/2,this.bottom-=n.thickness/2),n.stemHeight&&(n.stemHeight>0?this.top+=n.stemHeight:this.bottom+=n.stemHeight),n.dim&&(this.dim=n.dim),n.position&&(this.position=n.position),n.voiceNumber!==void 0&&(this.voiceNumber=n.voiceNumber),this.height=n.height?n.height:4,n.top&&(this.top=n.top),n.bottom&&(this.bottom=n.bottom),n.name?this.name=n.name:this.c?this.name=this.c:this.name=this.type,n.realWidth?this.realWidth=n.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":n.position&&n.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":n.position&&n.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?n.position&&n.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};W0.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e=0,t=this.type==="chord"?this.realWidth/2:0,r=this.x-t-e,i=r+this.realWidth+e;return{left:r,right:i}};W0.prototype.invertLane=function(e){this.lane===void 0&&(this.lane=0),this.lane=e-this.lane-1};W0.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane};W0.prototype.getLane=function(){return this.lane===void 0?0:this.lane};W0.prototype.setX=function(e){this.x=e+this.dx};An.exports=W0});var In=P((N6,Dn)=>{"use strict";var Nn=L0(),ra=e0();function Zf(e){return e!=null&&e.constructor===Object}function ea(e,t){for(var r in t)t.hasOwnProperty(r)&&(Array.isArray(t[r])||Zf(t[r])||(e[r]=t[r]))}function Pn(e){var t=new Nn("",0,0,"",0);return ea(t,e),t.top=0,t.bottom=-1,e.abcelem&&(t.abcelem={},ea(t.abcelem,e.abcelem),t.abcelem.el_type==="note"&&(t.abcelem.el_type="tabNumber")),e.cloned=t,t}function eu(e,t){var r=Pn(e);if(t)for(var i=e.children,a=!0,n=0;n<i.length;n++){var s=i[n],o=new ra("",0,0,0,"");ea(o,s),a=t.tablature.setRelative(s,o,a),r.children.push(o)}return r}function tu(e,t,r){var i="tab.tiny",a=7.5;e.isTabBig&&(i="tab.big",a=10);var n={el_type:"tab",icon:i,Ypos:a};if(a+=e.tabSymbolOffset,!e.hideTabSymbol){var s=new Nn(n,0,0,"symbol",0);s.x=t;var o=new ra(i,0,0,7.5,"tab");o.x=r,s.children.push(o),s.abcelem.el_type=="tab"&&(o.pitch=a)}return s}function ru(e){if(e.extra)for(var t=0;t<e.extra.length;t++){var r=e.extra[t];if(r.type=="lyric")return{bottom:r.bottom,height:r.height}}return null}function Ln(){this.accidentals=null}function au(e){for(var t=0,r=0;r<e.length;r++)e[r].tabNameInfos||t++;return t}function ta(e,t,r,i,a){var n=i.num;i.note.quarter!=null&&(n=n.toString(),n+=i.note.quarter);var s=e.semantics.stringToPitch(i.str);r.notes.push({num:n,str:i.str,pitch:i.note.emit()});var o={type:"tabNumber"},c=new ra(n,0,0,s+.3,o);return c.x=t,c.isGrace=a,c.isAltered=i.note.isAltered,c}function qn(e,t){var r=0;if(e.extra){for(var i=0;i<e.extra.length;i++)if(e.extra[i].c.indexOf("noteheads")>=0){if(r===t)return e.extra[i].x+e.extra[i].w/2;r++}}return-1}function iu(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function Bn(e,t,r){var i=e.semantics.notesToNumber(t,r);if(i.error)return e.setError(i.error),i;if(i.graces&&i.notes){var a=i.notes.length-1;i.notes[a].graces=i.graces}return i}function nu(e,t,r,i,a){for(var n=0;n<i.length;n++){var s={el_type:"note",startChar:r.abcelem.startChar,endChar:r.abcelem.endChar,notes:[],grace:!0},o=qn(r,n),c=i[n],h=ta(e,o,s,c,!0);t.children.push(h),a.push(s)}}Ln.prototype.build=function(e,t,r,i,a,n,s){var o=au(t),c=t[a+i],h=t[s],d=null,f=null;c.children[0].abcelem.el_type!="clef"&&n!="none"&&c.children.splice(0,0,n);for(var l=0;l<c.children.length;l++){var u=c.children[l],p=u.x,g=p;switch(u.isClef&&(h.children.push(tu(e,p,g)),u.abcelem.type.indexOf("-8")>=0&&(e.semantics.clefTranspose=-12),u.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),u.type){case"staff-extra key-signature":this.accidentals=u.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var v=!1;l===c.children.length-1&&(v=!0);var m=eu(u,e);if(m.abcelem.barNumber){delete m.abcelem.barNumber;for(var y=0;y<m.children.length;y++)if(m.children[y].type==="barNumber"){m.children.splice(y,1);break}}m.abcelem.lastBar=v,h.children.push(m),r.push({el_type:u.abcelem.el_type,type:u.abcelem.type,endChar:u.abcelem.endChar,startChar:u.abcelem.startChar,abselem:m});break;case"rest":var k=iu(u);if(k){if(d=Bn(e,null,k),d.error)return;F={el_type:"note",startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,notes:[],grace:!0},nu(e,b,u,d.graces,r)}break;case"note":var b=Pn(u);b.x=u.heads[0].x+u.heads[0].w/2,b.lyricDim=ru(u);var w=u.abcelem.pitches,C=u.abcelem.gracenotes;if(b.type="tabNumber",d=Bn(e,w,C),d.error)return;if(d.graces){var B=d.notes.length-1;d.notes[B].graces=d.graces}f={el_type:"note",startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,notes:[]};for(var L=0;L<d.notes.length;L++){var N=d.notes[L];if(N.graces)for(var _=0;_<N.graces.length;_++){var F={el_type:"note",startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,notes:[],grace:!0},q=qn(u,_),D=N.graces[_],R=ta(e,q,F,D,!0);b.children.push(R),r.push(F)}var J=ta(e,b.x+u.heads[L].dx,f,N,!1);b.children.push(J)}f.notes.length>0&&(f.abselem=b,r.push(f),h.children.push(b));break}}};Dn.exports=Ln});var Fn=P((P6,On)=>{"use strict";var su=Qr(),ou=In(),cu=Me();function lu(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function hu(e){for(var t=0,r=0;r<e.children.length;r++){var i=e.children[r];i.specialY&&i.specialY.lyricHeightBelow>t&&(t=i.specialY.lyricHeightBelow)}return t}function fu(e,t,r){var i=e.semantics,a=t.controller.getTextSize,n=i.tabInfos(e),s=i.suppress(e),o=!0;if(s&&(o=!1),o){var c=a.calc(n,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:c.height,width:c.width},name:n},c.height}return 0}function uu(e,t){return t[e].isTabStaff?e===t.length-1?!0:!t[e+1].isTabStaff:!1}function du(e){for(var t=0,r=0;r<e.length;r++)e[r].isTabStaff||t++;return t}function pu(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function gu(e){for(var t=0;t<e.length;t++)if(e[t].isTabStaff){var r=pu(e,t);e[t].hasStaff=e[r],e[r].hasTab||(e[r].hasTab=[]),e[r].hasTab.push(e[t])}}function vu(e,t){return du(e)===1&&t.voices.length>1}function bu(e,t){for(var r=0,i=0,a=!0,n=0;a;){if(!t[r])return-1;if(t[r].isTabStaff||(n=t[r].voices.length),t[r].isTabStaff){if(i++,uu(r,t)&&i<n)return r+1}else if(i=0,r>=e&&(r+1==t.length||!t[r+1].isTabStaff))return r+1;if(r++,r>t.length)return-1}}function mu(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}function yu(e,t){var r=e[t],i=r.children[0].abcelem;return i.el_type==="clef"?null:t==0?"none":e[t-1].children[0]}function wu(e,t,r,i){var a=new ou,n={clef:{type:"TAB"}},s=e.linePitch*e.nbLines,o=r.staff;if(o){var c=o[0];if(c&&c.clef&&c.clef.stafflines==0){e.setError("No tablatures when stafflines=0");return}o.splice(o.length,0,n)}var h=r.staffGroup,d=h.voices,f=d[0],l=hu(f),u=3,p=i,g=h.staffs[p],v=s+u-g.bottom-l;g.isTabStaff&&(v=g.top);var m={bottom:-1,isTabStaff:!0,specialY:lu(),lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:v},y=bu(i,h.staffs);if(y!==-1){m.parentIndex=y-1,h.staffs.splice(y,0,m),h.height+=s+u;var k=mu(h.staffs,y),b=1;vu(h.staffs,k)&&(b=k.voices.length),n.voices=[];for(var w=0;w<b;w++){var C=new su(0,0);w>0&&(C.duplicate=!0);var B=fu(e,t,C)/cu.STEP;B=Math.max(B,1),h.staffs[i].top+=1,h.height+=B,C.staff=m;var L=d.length;d.splice(d.length,0,C);var N=yu(d,w+i);n.voices[w]=[],a.build(e,d,n.voices[w],w,i,N,L)}gu(h.staffs)}}On.exports=wu});var ia=P((L6,Hn)=>{"use strict";var xu={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},aa=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function Cu(e){var t=e.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(t&&t.length===5){var r=xu[t[1]],i=aa.indexOf(t[2]),a=t[4].length-t[3].length;return 48+i+r+a*12}return 0}function ku(e){e=parseInt(e,10);var t=Math.floor(e/12),r=e%12,i=aa[r];if(i==="-"&&(i="^"+aa[r-1]),t>4)for(i=i.toLowerCase(),t-=5;t>0;)i+="'",t--;else for(;t<4;)i+=",",t++;return i}Hn.exports={noteToMidi:Cu,midiToNote:ku}});var sa=P((q6,zn)=>{"use strict";var{noteToMidi:Tu,midiToNote:na}=ia();function Ge(e,t){var r=Tu(e);t&&(r+=t);var i=na(r),a=!1,n=!1,s=!1,o=null,c=null,h=!1,d=0;e.startsWith("_")?(a=!0,d=-1,e[1]=="/"?(a=!1,c="v",d=0):e[1]=="_"&&(h=!0,d-=1)):e.startsWith("^")?(n=!0,d=1,e[1]=="/"?(n=!1,c="^",d=0):e[1]=="^"&&(h=!0,d+=1)):e.startsWith("=")&&(o=!0,d=0),s=a||n||c!=null,(s||o)&&(c!=null||h?i=e.slice(2):i=e.slice(1));var f=(i.match(/,/g)||[]).length,l=(i.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=i,this.acc=d,this.isSharp=n,this.isKeySharp=!1,this.isDouble=h,this.isAltered=s,this.isFlat=a,this.isKeyFlat=!1,this.natural=o,this.quarter=c,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=l}function _u(e){var t=e.name,r=new Ge(t);return r.pitch=e.pitch,r.hasComma=e.hasComma,r.isLower=e.isLower,r.isQuoted=e.isQuoted,r.isSharp=e.isSharp,r.isKeySharp=e.isKeySharp,r.isFlat=e.isFlat,r.isKeyFlat=e.isKeyFlat,r}Ge.prototype.sameNoteAs=function(e){return e.pitch===this.pitch};Ge.prototype.isLowerThan=function(e){return e.pitch>this.pitch};Ge.prototype.checkKeyAccidentals=function(e,t){if(!(this.isAltered||this.natural)){if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(e)for(var r=this.name,i=0;i<e.length;i++){var a=e[i];r==a.note.toUpperCase()&&(a.acc=="flat"&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),a.acc=="sharp"&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}}};Ge.prototype.getAccidentalEquiv=function(){var e=_u(this);return e.isSharp||e.isKeySharp?(e=e.nextNote(),e.isFlat=!0,e.isSharp=!1,e.isKeySharp=!1):(e.isFlat||e.isKeyFlat)&&(e=e.prevNote(),e.isSharp=!0,e.isFlat=!1,e.isKeyFlat=!1),e};Ge.prototype.nextNote=function(){var e=na(this.pitch+1+this.pitchAltered);return new Ge(e)};Ge.prototype.prevNote=function(){var e=na(this.pitch-1+this.pitchAltered);return new Ge(e)};Ge.prototype.emitNoAccidentals=function(){var e=this.name;this.isLower&&(e=e.toLowerCase());for(var t=0;t<this.isQuoted;t++)e+="'";for(var r=0;r<this.hasComma;r++)e+=",";return e};Ge.prototype.emit=function(){var e=this.name;(this.isSharp||this.isKeySharp)&&(e="^"+e,this.isDouble&&(e="^"+e)),(this.isFlat||this.isKeyFlat)&&(e="_"+e,this.isDouble&&(e="_"+e)),this.quarter&&(this.quarter=="^"?e="^/"+e:e="_/"+e),this.natural&&(e="="+e);for(var t=1;t<=this.hasComma;t++)e+=",";if(this.isLower){e=e.toLowerCase();for(var r=1;r<=this.isQuoted;r++)e+="'"}return e};zn.exports=Ge});var Wn=P((D6,Yn)=>{"use strict";var Rn=sa(),Gn=["A","B","C","D","E","F","G"];function Su(e,t){var r=new Rn(e),i=new Rn(t);if(i.isLowerThan(r)){var a=r.emit(),n=i.emit();return{error:"Invalid string Instrument tuning : "+n+" string lower than "+a+" string"}}var s=[],o=Gn.indexOf(r.name),c=Gn.indexOf(i.name);if(o==-1||c==-1)return s;for(var h=!1;!h;)s.push(r.emit()),r=r.nextNote(),r.sameNoteAs(i)&&(h=!0);return s}Yn.exports=Su});var Vn=P((I6,jn)=>{"use strict";var{noteToMidi:Eu}=ia(),Zt=sa(),Mu=Wn();function Au(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var i=0;i<r.length;i++){for(var a=new Zt(r[i]),n=0;n<e.capo;n++)a=a.nextNote();t[i]=a.emit()}}return t}function Bu(e){var t=[],r=e.tuning;e.capo>0&&(r=e.capoTuning);for(var i=r.length-1,a=0;a<r.length;a++){var n=e.highestNote;a!=r.length-1&&(n=r[a+1]);var s=Mu(r[a],n);if(s.error)return s;t[i--]=s}return t}function Nu(e){var t=[];t[0]=[];for(var r=e.strings,i=1;i<r.length;i++)t[i]=r[i-1];return t}function Pu(e,t){for(var r=0;r<t.length-1;r++){var i=t[r],a=t[r+1];if(i.str==a.str){if(i.str==e.strings.length-1){i.num="?",a.num="?";return}a.num<i.num?(a.str++,a=Xn(e,a.note,a.str,e.secondPos,e.strings[a.str].length)):(i.str++,i=Xn(e,i.note,i.str,e.secondPos,e.strings[i.str].length)),t[r]=i,t[r+1]=a}}return null}function Lu(e,t){for(var r=[],i=0;i<t.length;i++)if(!t[i].endTie){var a=new Zt(t[i].name,e.clefTranspose);a.checkKeyAccidentals(e.accidentals,e.measureAccidentals);var n=oa(e,a);r.push(n)}return Pu(e,r),r}function Xn(e,t,r,i,a){var n=e.strings;t.checkKeyAccidentals(e.accidentals,e.measureAccidentals),i&&(n=i);var s=t.emitNoAccidentals(),o=n[r].indexOf(s),c=t.acc;if(o!=-1){if(i&&(o+=a),(t.isFlat||t.acc==-1)&&o==0){var h=t.getAccidentalEquiv();r++,o=n[r].indexOf(h.emit()),c=0}return{num:o+c,str:r,note:t}}return null}function oa(e,t){if(t.isAltered||t.natural){var r;t.isFlat?t.isDouble?r="__":r="_":t.isSharp?t.isDouble?r="^^":r="^":t.natural&&(r="="),e.measureAccidentals[t.name.toUpperCase()]=r}for(var i=e.stringPitches.length-1;i>=0;i--)if(t.pitch+t.pitchAltered>=e.stringPitches[i]){var a=t.pitch+t.pitchAltered-e.stringPitches[i];return t.quarter==="^"?a-=.5:t.quarter==="v"&&(a+=.5),{num:Math.round(a),str:e.stringPitches.length-1-i,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}X0.prototype.stringToPitch=function(e){var t=5.3,r=this.strings.length-1;return t+(r-e)*this.linePitch};function Un(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}X0.prototype.notesToNumber=function(e,t){var r,i,a=null,n=null;if(e&&(n=[],e.length>1?(n=Lu(this,e),n.error&&(a=n.error)):e[0].endTie||(r=new Zt(e[0].name,this.clefTranspose),r.checkKeyAccidentals(this.accidentals,this.measureAccidentals),i=oa(this,r),i?n.push(i):(Un(n,r),a=n.error))),a)return n;var s=null;if(t){s=[];for(var o=0;o<t.length;o++)r=new Zt(t[o].name,this.clefTranspose),r.checkKeyAccidentals(this.accidentals,this.measureAccidentals),i=oa(this,r),i?s.push(i):(Un(s,r),a=n.error)}return{notes:n,graces:s,error:a}};X0.prototype.toString=function(){for(var e=[],t=0;t<this.tuning.length;t++){var r=this.tuning[t].replace(/,/g,"").replace(/'/g,"").toUpperCase();r[0]==="_"?r=r[1]+"b ":r[0]==="^"&&(r=r[1]+"# "),e.push(r)}return e.join("")};X0.prototype.tabInfos=function(e){var t=e.params.label;if(t){var r=t.indexOf("%T"),i="";return r!=-1&&(i=this.toString(),e.capo>0&&(i+=" capo:"+e.capo),t=t.replace("%T",i)),t}return""};X0.prototype.suppress=function(e){var t=e.params.suppress;return!!t};function X0(e){var t=e.tuning,r=e.capo,i=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",i&&(this.highestNote=i),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var a=0;a<this.tuning.length;a++){var n=Eu(this.tuning[a])+this.capo;this.stringPitches.push(n)}if(this.capo>0&&(this.capoTuning=Au(this)),this.strings=Bu(this),this.strings.error){e.setError(this.strings.error),e.inError=!0;return}this.secondPos=Nu(this)}jn.exports=X0});var $n=P((O6,Kn)=>{"use strict";var qu=kn(),Du=Fn(),Iu=Vn();er.prototype.init=function(e,t,r,i){this.tune=e,this.params=r,this.tuneNumber=t,this.inError=!1,this.abcTune=e,this.linePitch=3,this.nbLines=i.defaultTuning.length,this.isTabBig=i.isTabBig,this.tabSymbolOffset=i.tabSymbolOffset,this.capo=r.capo,this.transpose=r.visualTranspose,this.hideTabSymbol=r.hideTabSymbol,this.tablature=new qu(this.nbLines,this.linePitch);var a=r.tuning;a||(a=i.defaultTuning),this.tuning=a,this.semantics=new Iu(this)};er.prototype.setError=function(e){e&&(this.error=e,this.inError=!0,this.tune.warnings?this.tune.warnings.push(e):this.tune.warnings=[e])};er.prototype.render=function(e,t,r){this.inError||this.tablature.bypass(t)||Du(this,e,t,r)};function er(){}var Ou=function(){return{name:"StringTab",tablature:er}};Kn.exports=Ou});var ca=P((F6,Qn)=>{"use strict";var Fu=$n(),Hu={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},zu={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new Fu),this.inited=!0);var i=null,a=0;if(r.tablature){var n=r.tablature;i=[];for(var s=0;s<n.length;s++){var o=n[s],c=o.instrument;if(c==null)return this.setError(e,"tablature 'instrument' is missing"),i;var h=Hu[c],d=null;if(h&&(d=this.plugins[h.name]),d){r.visualTranspose!=0&&(o.visualTranspose=r.visualTranspose),o.abcSrc=r.tablature.abcSrc;var f={classz:d,tuneNumber:t,params:o,instance:null,tabType:h};i.push(f),a++}else if(c==="")i.push(null);else return this.setError(e,"Undefined tablature plugin: "+c),i}}return i},layoutTablatures:function(t,r){var i=r.tablatures,a=0;if(i&&i.length>0)for(var n=i.length,s=0;s<n;++s)i[s]&&i[s].params.firstStaffOnly&&(i[s].params.suppress=!1);for(var o=0;o<r.lines.length;o++){var c=r.lines[o];if(c.staff&&a++,a>1&&i&&i.length>0)for(var n=i.length,s=0;s<n;++s)i[s].params.firstStaffOnly&&(i[s].params.suppress=!0);var h=c.staff;if(h){for(var d=h.length,f=0;f<h.length;f++)if(i[f]&&f<d){var l=i[f];l.instance==null&&(l.instance=new l.classz,l.instance.init(r,l.tuneNumber,l.params,l.tabType)),l.instance.render(t,c,f)}}}}};Qn.exports=zu});var bt=P((H6,Jn)=>{"use strict";var Ru=Qt(),Gu=xn(),Yu=ca(),g0={};(function(){"use strict";g0.numberOfTunes=function(i){var a=i.split(`
|
|
24
|
+
X:`),n=a.length;return n===0&&(n=1),n};var e=g0.TuneBook=function(i){var a=Gu(i);this.header=a.header,this.tunes=a.tunes};e.prototype.getTuneById=function(i){for(var a=0;a<this.tunes.length;a++)if(this.tunes[a].id===""+i)return this.tunes[a];return null},e.prototype.getTuneByTitle=function(i){for(var a=0;a<this.tunes.length;a++)if(this.tunes[a].title===i)return this.tunes[a];return null},g0.parseOnly=function(i,a){for(var n=g0.numberOfTunes(i),s=[],o=0;o<n;o++)s.push(1);function c(){}return g0.renderEngine(c,s,i,a)},g0.renderEngine=function(i,a,n,s){var o=[],c=function(m){return m&&!m.propertyIsEnumerable("length")&&typeof m=="object"&&typeof m.length=="number"};if(!(a===void 0||n===void 0)){c(a)||(a=[a]),s===void 0&&(s={});for(var h=s.startingTune?parseInt(s.startingTune,10):0,d=new e(n),f=new Ru,l=0;l<a.length;l++){var u=a[l];if(u==="*"||typeof u=="string"&&(u=document.getElementById(u)),u)if(h>=0&&h<d.tunes.length){f.parse(d.tunes[h].abc,s,d.tunes[h].startPos-d.header.length);var p=f.getTune();s.tablature&&(p.tablatures=Yu.preparePlugins(p,h,s));var g=f.getWarnings();g&&(p.warnings=g);var v=i(u,p,l,d.tunes[h].abc);o.push(v||p)}else u.innerHTML&&(u.innerHTML="");h++}return o}};function t(i){for(var a=[],n=0;n<i.lines.length;n++){var s=i.lines[n];if(s.staff)for(var o=0;o<s.staff.length;o++){var c=s.staff[o];if(!a[o])a[o]=c;else for(var h=0;h<c.voices.length;h++)a[o].voices[h]&&(a[o].voices[h]=a[o].voices[h].concat(c.voices[h]))}}return a}function r(i,a){for(var n=[],s=null,o=null,c=null,h=!1,d=0;d<i.voices.length;d++){var f=i.voices[d];n.push([]);for(var l=0;l<f.length;l++){var u=f[l];if(c===null&&u.startChar>=0&&(c=u.startChar,u.chord===void 0?o=s:o=null),u.chord&&(s=u),u.el_type==="bar"){if(h){var p=a.abc.substring(c,u.endChar),g={abc:p};s=o&&o.chord&&o.chord.length>0?o.chord[0].name:null,s&&(g.lastChord=s),u.startEnding&&(g.startEnding=u.startEnding),u.endEnding&&(g.endEnding=u.endEnding),n[d].push(g),c=null,h=!1}}else u.el_type==="note"&&(h=!0)}}return n}g0.extractMeasures=function(i){for(var a=[],n=new e(i),s=0;s<n.tunes.length;s++){for(var o=n.tunes[s],c=o.abc.split("K:"),h=c[1].split(`
|
|
25
|
+
`),d=c[0]+"K:"+h[0]+`
|
|
26
|
+
`,f=null,l=null,u=null,p=[],g=!1,v=g0.parseOnly(o.abc)[0],m=v.getPickupLength()>0,y=0;y<v.lines.length;y++){var k=v.lines[y];if(k.staff)for(var b=0;b<1;b++)for(var w=k.staff[b],C=0;C<1;C++)for(var B=w.voices[C],L=0;L<B.length;L++){var N=B[L];if(u===null&&N.startChar>=0&&(u=N.startChar,N.chord===void 0?l=f:l=null),N.chord&&(f=N),N.el_type==="bar"){if(g){var _=o.abc.substring(u,N.endChar),F={abc:_};f=l&&l.chord&&l.chord.length>0?l.chord[0].name:null,f&&(F.lastChord=f),N.startEnding&&(F.startEnding=N.startEnding),N.endEnding&&(F.endEnding=N.endEnding),p.push(F),u=null,g=!1}}else N.el_type==="note"&&(g=!0)}}a.push({header:d,measures:p,hasPickup:m})}return a}})();Jn.exports=g0});var ns=P((z6,is)=>{"use strict";var Zn=Lr(),{relativeMajor:es,transposeKey:la,relativeMode:ts,isLegalMode:Wu}=Br(),rs=Ar(),as;(function(){"use strict";as=function(y,k,b){if(k==="TEST")return{keyAccidentals:Zn,relativeMajor:es,transposeKey:la,relativeMode:ts,transposeChordName:rs};b=parseInt(b,10);var w=[],C;for(C=0;C<k.length;C++)w=w.concat(e(y,k[C],b));w=w.sort(function(N,_){return _.start-N.start});var B=y.split("");for(C=0;C<w.length;C++){var L=w[C];B.splice(L.start,L.end-L.start,L.note)}return B.join("")};function e(y,k,b){var w=[],C=k.getKeySignature();if(C.root==="Hp"||C.root==="HP")return w;w=w.concat(t(y,b));for(var B=0;B<k.lines.length;B++){var L=k.lines[B].staff;if(L)for(var N=0;N<L.length;N++){var _=L[N];_.clef.type!=="perc"&&(w=w.concat(r(y,_.voices,_.key,b)))}}return w}function t(y,k){for(var b=[],w=y.split("K:"),C=w[0].length,B=1;B<w.length;B++){var L=w[B],N=L.match(/^( *)([A-G])([#b]?)( ?)(\w*)/);if(N){var _=C+2+N[1].length,F=Wu(N[5])?N[5]:"",q=N[2]+N[3]+N[4]+F,D=c({root:N[2],acc:N[3],mode:F},k),R=D.root+D.acc+N[4]+D.mode;b.push({start:_,end:_+q.length,note:R})}C+=L.length+2}return b}function r(y,k,b,w){for(var C=[],B=c(b,w),L=0;L<k.length;L++)C=C.concat(n(y,k[L],b.root,i(b),B,w));return C}function i(y){for(var k={},b=0;b<y.accidentals.length;b++){var w=y.accidentals[b];w.acc==="flat"?k[w.note.toUpperCase()]="_":w.acc==="sharp"&&(k[w.note.toUpperCase()]="^")}return k}function a(y,k,b){var w=s.indexOf(y.root)-s.indexOf(k);return k==="none"&&(w=s.indexOf(y.root)),w===0?b>2?w+=7:b===-12&&(w-=7):b>0&&w<0?w+=7:b<0&&w>0&&(w-=7),b>12?w+=7:b<-12&&(w-=7),w}function n(y,k,b,w,C,B){for(var L=[],N=a(C,b,B),_={},F={},q=0;q<k.length;q++){var D=k[q];if(D.chord)for(var R=0;R<D.chord.length;R++){var J=D.chord[R];if(J.position==="default"){var U=C.accidentals.length&&C.accidentals[0].acc==="flat",x=rs(J.name,B,U,!0);x=x.replace(/♭/g,"b").replace(/♯/g,"#"),x!==J.name&&L.push(v(y,D.startChar,D.endChar,x))}}if(D.el_type==="note"&&D.pitches){for(var T=p(y,D.startChar,D.endChar),M=0;M<T.length;M++){var S=u(T[M].note,b,w,_);S.acc&&(_[S.name.toUpperCase()]=S.acc);var z=h(S,C,N,F);z.acc&&(F[z.upper]=z.acc),L.push({note:z.acc+z.name,start:T[M].index,end:T[M].index+T[M].note.length})}if(D.gracenotes)for(var ee=0;ee<D.gracenotes.length;ee++){var V=u(D.gracenotes[ee].name,b,w,_);V.acc&&(_[V.name.toUpperCase()]=V.acc);var ie=h(V,C,N,_);ie.acc&&(F[ie.upper]=ie.acc),L.push(g(y,D.startChar,D.endChar,ie.acc+ie.name,ee))}}else D.el_type==="bar"?(_={},F={}):D.el_type==="keySignature"&&(b=D.root,w=i(D),C=c(D,B),N=a(C,b,B))}return L}var s="CDEFGAB",o=[",,,,",",,,",",,",",","","'","''","'''","''''"];function c(y,k){if(y.root==="none")return{root:la("C",k),mode:"",acc:"",accidentals:[]};var b=es(y.root+y.acc+y.mode),w=la(b,k),C=ts(w,y.mode),B=Zn(w);return{root:C[0],mode:y.mode,acc:C.length>1?C[1]:"",accidentals:B}}function h(y,k,b,w){for(var C=y.pitch,B=s.indexOf(y.name),L=s.indexOf(k.root),N=(L+C)%7,_=B+b,F=y.oct;_>6;)F++,_-=7;for(;_<0;)F--,_+=7;for(var q=s[N],D="",R=y.adj,J="=",U=0;U<k.accidentals.length;U++)if(k.accidentals[U].note.toLowerCase()===q.toLowerCase()){R=R+(k.accidentals[U].acc==="flat"?-1:1),J=k.accidentals[U].acc==="flat"?"_":"^";break}var x;switch(R){case-2:D="__";break;case-1:D="_";break;case 0:D="=";break;case 1:D="^";break;case 2:D="^^";break;case-3:return x={},x.pitch=y.pitch-1,x.oct=y.oct,x.name=s[s.indexOf(y.name)-1],x.name||(x.name="B",x.oct--),x.name==="B"||x.name==="E"?x.adj=y.adj+1:x.adj=y.adj+2,h(x,k,b+1,w);case 3:return x={},x.pitch=y.pitch+1,x.oct=y.oct,x.name=s[s.indexOf(y.name)+1],x.name||(x.name="C",x.oct++),x.name==="C"||x.name==="F"?x.adj=y.adj-1:x.adj=y.adj-2,h(x,k,b+1,w)}switch((w[q]===D||!w[q]&&D===J)&&!y.courtesy&&(D=""),F){case 0:q=q+",,,";break;case 1:q=q+",,";break;case 2:q=q+",";break;case 4:q=q.toLowerCase();break;case 5:q=q.toLowerCase()+"'";break;case 6:q=q.toLowerCase()+"''";break;case 7:q=q.toLowerCase()+"'''";break;case 8:q=q.toLowerCase()+"''''";break}return F>4&&(q=q.toLowerCase()),{acc:D,name:q,upper:q.toUpperCase()}}var d=/([_^=]*)([A-Ga-g])([,']*)/,f=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,l=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function u(y,k,b,w){var C=k==="none"?0:s.indexOf(k),B=y.match(d),L=B[2].toUpperCase(),N=s.indexOf(L)-C;N<0&&(N+=7);var _=o.indexOf(B[3]);L===B[2]&&_--;var F=w[L]||b[L]||"=";return{acc:B[1],name:L,pitch:N,oct:_,adj:m(B[1],b[L],w[L]),courtesy:B[1]===F}}function p(y,k,b){for(var w=y.substring(k,b),C,B=[],L=/("[^"]+")+/g;(C=L.exec(w))!==null;)B.push({start:L.lastIndex-C[0].length,end:L.lastIndex});for(var N=/(![^!]+!)+/g;(C=N.exec(w))!==null;)B.push({start:N.lastIndex-C[0].length,end:N.lastIndex});for(var _=[],F=/([_^=]*)([A-Ga-g])([,']*)/g;(C=F.exec(w))!==null;){for(var q=!1,D=0;D<B.length;D++)F.lastIndex>=B[D].start&&F.lastIndex<=B[D].end&&(q=!0);q||_.push({note:C[0],index:k+F.lastIndex-C[0].length})}return _}function g(y,k,b,w,C){var B=y.substring(k,b),L=/\{/,N=/\}/,_=/([^\{]*)/,F=/(\/*)/,q=B.match(new RegExp(_.source+L.source+F.source+l.source+F.source+l.source+F.source+l.source+F.source+l.source+F.source+l.source+F.source+l.source+F.source+l.source+F.source+l.source+N.source));if(q){for(var D=1+q[1].length,R=0;R<C;R++)q[R*3+2]&&(D+=q[R*3+2].length),q[R*3+3]&&(D+=q[R*3+3].length),q[R*3+4]&&(D+=q[R*3+4].length),q[R*3+5]&&(D+=q[R*3+5].length);q[C*3+2]&&(D+=q[R*3+2].length),k+=D;var J=q[C*3+3]?q[C*3+3].length:0;J+=q[C*3+4]?q[C*3+4].length:0,J+=q[C*3+5]?q[C*3+5].length:0,b=k+J}return{start:k,end:b,note:w}}function v(y,k,b,w){var C=y.substring(k,b).match(/([^"]+)?(".+")+/);return C[1]&&(k+=C[1].length),b=k+C[2].length,{start:k+1,end:b-1,note:w}}function m(y,k,b){if(!y&&b&&(y=b),!y)return 0;switch(k){case void 0:switch(y){case"__":return-2;case"_":return-1;case"=":return 0;case"^":return 1;case"^^":return 2;default:return 0}case"_":switch(y){case"__":return-1;case"_":return 0;case"=":return 1;case"^":return 2;case"^^":return 3;default:return 0}case"^":switch(y){case"__":return-3;case"_":return-2;case"=":return-1;case"^":return 0;case"^^":return 1;default:return 0}}return 0}})();is.exports=as});var cs=P((R6,os)=>{"use strict";var q0=function(t,r,i,a){this.type="BeamElem",this.isflat=!!i,this.isgrace=!!(r&&r==="grace"),this.forceup=!!(this.isgrace||r&&r==="up"),this.forcedown=!!(r&&r==="down"),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=t,this.beams=[],a&&a.duration?(this.duration=a.duration,a.startTriplet&&(this.duration*=a.tripletMultiplier),this.duration=Math.round(this.duration*1e3)/1e3):this.duration=0};q0.prototype.setHint=function(){this.hint=!0};q0.prototype.runningDirection=function(e){var t=e.averagepitch;t!==void 0&&(this.total=Math.round(this.total+t),this.count||(this.count=0),this.count++)};q0.prototype.add=function(e){var t=e.abcelem.averagepitch;t!==void 0&&(e.abcelem.rest||(this.allrests=!1),e.beam=this,this.elems.push(e),this.total=Math.round(this.total+t),(this.min===void 0||e.abcelem.minpitch<this.min)&&(this.min=e.abcelem.minpitch),(this.max===void 0||e.abcelem.maxpitch>this.max)&&(this.max=e.abcelem.maxpitch))};q0.prototype.addBeam=function(e){this.beams.push(e)};q0.prototype.setStemDirection=function(){if(this.average=ss(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var e=6;this.stemsUp=this.average<e}delete this.count,this.total=0};q0.prototype.calcDir=function(){if(this.average=ss(this.total,this.elems.length),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var e=6;this.stemsUp=this.average<e}for(var t=this.stemsUp?"up":"down",r=0;r<this.elems.length;r++)for(var i=0;i<this.elems[r].heads.length;i++)this.elems[r].heads[i].stemDir=t};function ss(e,t){return t?e/t:0}os.exports=q0});var hs=P((G6,ls)=>{"use strict";var mt=function(t,r){this.startVoice=t,this.type=r};mt.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)};mt.prototype.continuing=function(e){this.lastContinuedVoice=e};mt.prototype.getWidth=function(){return 10};mt.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)};ls.exports=mt});var v0=P((Y6,us)=>{"use strict";var Xu=Me(),De={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.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"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,.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"],["m",3,-11],["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:12.1,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.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"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:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"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},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],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.85,-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}};De["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};De["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9};De["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};De["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var fs=function(e){for(var t=[],r=0,i=e.length;r<i;r++){t[r]=[];for(var a=0,n=e[r].length;a<n;a++)t[r][a]=e[r][a]}return t},Uu=function(e,t,r){for(var i=0,a=e.length;i<a;i++){var n=e[i],s,o;for(s=1,o=n.length;s<o;s++)n[s]*=s%2?t:r}},ju={printSymbol:function(e,t,r,i,a){if(!De[r])return null;var n=fs(De[r].d);n[0][1]+=e,n[0][2]+=t;for(var s="",o=0;o<n.length;o++)s+=n[o].join(" ");return a.path=s,i.path(a)},getPathForSymbol:function(e,t,r,i,a){if(i=i||1,a=a||1,!De[r])return null;var n=fs(De[r].d);return(i!==1||a!==1)&&Uu(n,i,a),n[0][1]+=e,n[0][2]+=t,n},getSymbolWidth:function(e){return De[e]?De[e].w:0},symbolHeightInPitches:function(e){var t=De[e]?De[e].h:0;return t/Xu.STEP},getSymbolAlign:function(e){return e.substring(0,7)==="scripts"&&e!=="scripts.roll"?"center":"left"},getYCorr:function(e){switch(e){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":return-1;case"rests.8th":return-1;case"rests.quarter":return-1;case"rests.16th":return-1;case"rests.32nd":return-1;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}},setSymbol:function(e,t){De[e]=t}};us.exports=ju});var ps=P((W6,ds)=>{"use strict";var Vu=L0(),yt=v0(),ha=e0(),Ku=function(e,t){var r,i=0;e.el_type="clef";var a=new Vu(e,0,10,"staff-extra clef",t);switch(a.isClef=!0,e.type){case"treble":r="clefs.G";break;case"tenor":r="clefs.C";break;case"alto":r="clefs.C";break;case"bass":r="clefs.F";break;case"treble+8":r="clefs.G",i=1;break;case"tenor+8":r="clefs.C",i=1;break;case"bass+8":r="clefs.F",i=1;break;case"alto+8":r="clefs.C",i=1;break;case"treble-8":r="clefs.G",i=-1;break;case"tenor-8":r="clefs.C",i=-1;break;case"bass-8":r="clefs.F",i=-1;break;case"alto-8":r="clefs.C",i=-1;break;case"none":return null;case"perc":r="clefs.perc";break;default:a.addFixed(new ha("clef="+e.type,0,0,void 0,{type:"debug"}))}var n=5;if(r){var s=yt.symbolHeightInPitches(r),o=$u(r);if(a.addRight(new ha(r,n,yt.getSymbolWidth(r),e.clefPos,{top:s+e.clefPos+o,bottom:e.clefPos+o})),i!==0){var c=.6666666666666666,h=(yt.getSymbolWidth(r)-yt.getSymbolWidth("8")*c)/2,d=i>0?a.top+3:a.bottom-1,f=i>0?a.top+3:a.bottom-3,l=f-2;e.type==="bass-8"&&(d=3,h=0),a.addRight(new ha("8",n+h,yt.getSymbolWidth("8")*c,d,{scalex:c,scaley:c,top:f,bottom:l}))}}return a};function $u(e){switch(e){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}ds.exports=Ku});var vs=P((X6,gs)=>{"use strict";var Qu=L0(),tr=v0(),Ju=e0(),Zu=function(e,t){if(e.el_type="keySignature",!e.accidentals||e.accidentals.length===0)return null;var r=new Qu(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var i=0;return e.accidentals.forEach(function(a){var n,s=0;switch(a.acc){case"sharp":n="accidentals.sharp",s=-3;break;case"natural":n="accidentals.nat";break;case"flat":n="accidentals.flat",s=-1.2;break;case"quartersharp":n="accidentals.halfsharp",s=-2.5;break;case"quarterflat":n="accidentals.halfflat",s=-1.2;break;default:n="accidentals.flat"}r.addRight(new Ju(n,i,tr.getSymbolWidth(n),a.verticalPos,{thickness:tr.symbolHeightInPitches(n),top:a.verticalPos+tr.symbolHeightInPitches(n)+s,bottom:a.verticalPos+s})),i+=tr.getSymbolWidth(n)+2},this),r};gs.exports=Zu});var ms=P((U6,bs)=>{"use strict";var t0=v0(),U0=e0(),ed=function(e,t,r,i){i||(i={});var a=i.dir!==void 0?i.dir:null,n=i.headx!==void 0?i.headx:0,s=i.extrax!==void 0?i.extrax:0,o=i.flag!==void 0?i.flag:null,c=i.dot!==void 0?i.dot:0,h=i.dotshiftx!==void 0?i.dotshiftx:0,d=i.scale!==void 0?i.scale:1,f=i.accidentalSlot!==void 0?i.accidentalSlot:[],l=i.shouldExtendStem!==void 0?i.shouldExtendStem:!1,u=i.printAccidentals!==void 0?i.printAccidentals:!0,p=i.chordPos,g=r.verticalPos,v,m=0,y=0,k=0;if(t===void 0)e.addFixed(new U0("pitch is undefined",0,0,0,{type:"debug"}));else if(t==="")v=new U0(null,0,0,g,{chordPos:p});else{var b=n;if(r.printer_shift){var w=r.printer_shift==="same"?1:0;b=a==="down"?-t0.getSymbolWidth(t)*d+w:t0.getSymbolWidth(t)*d-w}var C={scalex:d,scaley:d,thickness:t0.symbolHeightInPitches(t)*d,name:r.name,chordPos:p};if(v=new U0(t,b,t0.getSymbolWidth(t)*d,g,C),v.stemDir=a,o){var B=g+(a==="down"?-7:7)*d;l&&(a==="down"&&B>6&&(B=6),a==="up"&&B<6&&(B=6));var L=a==="down"?n:n+v.w-.6;e.addRight(new U0(o,L,t0.getSymbolWidth(o)*d,B,{scalex:d,scaley:d,chordPos:p}))}for(y=v.w+h-2+5*c;c>0;c--){var N=1-Math.abs(g)%2;e.addRight(new U0("dots.dot",v.w+h-2+5*c,t0.getSymbolWidth("dots.dot"),g+N,{chordPos:p}))}}if(v&&(v.highestVert=r.highestVert),u&&r.accidental){var _;switch(r.accidental){case"quartersharp":_="accidentals.halfsharp";break;case"dblsharp":_="accidentals.dblsharp";break;case"sharp":_="accidentals.sharp";break;case"quarterflat":_="accidentals.halfflat";break;case"flat":_="accidentals.flat";break;case"dblflat":_="accidentals.dblflat";break;case"natural":_="accidentals.nat"}for(var F=!1,q=s,D=0;D<f.length;D++)if(g-f[D][0]>=6){f[D][0]=g,q=f[D][1],F=!0;break}F===!1&&(q-=t0.getSymbolWidth(_)*d+2,f.push([g,q]),m=t0.getSymbolWidth(_)*d+2);var R=t0.symbolHeightInPitches(_);e.addExtra(new U0(_,q,t0.getSymbolWidth(_),g,{scalex:d,scaley:d,top:g+R/2,bottom:g-R/2,chordPos:p})),k=t0.getSymbolWidth(_)/2}return{notehead:v,accidentalshiftx:m,dotshiftx:y,extraLeft:k}};bs.exports=ed});var ws=P((j6,ys)=>{"use strict";var td=L0(),be=v0(),f0=e0(),rd=function(e,t){e.el_type="timeSignature";var r=new td(e,0,10,"staff-extra time-signature",t);if(e.type==="specified")for(var i=0,a=0;a<e.value.length;a++)if(a!==0&&(r.addRight(new f0("+",i+1,be.getSymbolWidth("+"),6,{thickness:be.symbolHeightInPitches("+")})),i+=be.getSymbolWidth("+")+2),e.value[a].den){for(var n=0,s=0;s<e.value[a].num.length;s++)n+=be.getSymbolWidth(e.value[a].num[s]);var o=0;for(s=0;s<e.value[a].num.length;s++)o+=be.getSymbolWidth(e.value[a].den[s]);var c=Math.max(n,o);r.addRight(new f0(e.value[a].num,i+(c-n)/2,n,8,{thickness:be.symbolHeightInPitches(e.value[a].num[0])})),r.addRight(new f0(e.value[a].den,i+(c-o)/2,o,4,{thickness:be.symbolHeightInPitches(e.value[a].den[0])})),i+=c}else{for(var h=0,d=0;d<e.value[a].num.length;d++)h+=be.getSymbolWidth(e.value[a].num[d]);r.addRight(new f0(e.value[a].num,i,h,6,{thickness:be.symbolHeightInPitches(e.value[a].num[0])})),i+=h}else e.type==="common_time"?r.addRight(new f0("timesig.common",0,be.getSymbolWidth("timesig.common"),6,{thickness:be.symbolHeightInPitches("timesig.common")})):e.type==="cut_time"?r.addRight(new f0("timesig.cut",0,be.getSymbolWidth("timesig.cut"),6,{thickness:be.symbolHeightInPitches("timesig.cut")})):e.type==="tempus_imperfectum"?r.addRight(new f0("timesig.imperfectum",0,be.getSymbolWidth("timesig.imperfectum"),6,{thickness:be.symbolHeightInPitches("timesig.imperfectum")})):e.type==="tempus_imperfectum_prolatio"?r.addRight(new f0("timesig.imperfectum2",0,be.getSymbolWidth("timesig.imperfectum2"),6,{thickness:be.symbolHeightInPitches("timesig.imperfectum2")})):e.type==="tempus_perfectum"?r.addRight(new f0("timesig.perfectum",0,be.getSymbolWidth("timesig.perfectum"),6,{thickness:be.symbolHeightInPitches("timesig.perfectum")})):e.type==="tempus_perfectum_prolatio"?r.addRight(new f0("timesig.perfectum2",0,be.getSymbolWidth("timesig.perfectum2"),6,{thickness:be.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",e);return r};ys.exports=rd});var Cs=P((V6,xs)=>{"use strict";var ad=function(t,r,i){this.type="DynamicDecoration",this.anchor=t,this.dec=r,i==="below"?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0};xs.exports=ad});var Ts=P((K6,ks)=>{"use strict";var id=function(t,r,i,a){this.type="CrescendoElem",this.anchor1=t,this.anchor2=r,this.dir=i,a==="above"?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0};ks.exports=id});var Ss=P(($6,_s)=>{"use strict";var nd=function(t,r){this.type="GlissandoElem",this.anchor1=t,this.anchor2=r};_s.exports=nd});var fa=P((Q6,Es)=>{"use strict";var Ie=function(t){this.type="TieElem",this.anchor1=t.anchor1,this.anchor2=t.anchor2,t.isGrace&&(this.isGrace=!0),t.fixedY&&(this.fixedY=!0),t.stemDir&&(this.stemDir=t.stemDir),t.voiceNumber!==void 0&&(this.voiceNumber=t.voiceNumber),t.style!==void 0&&(this.dotted=!0),this.internalNotes=[]};Ie.prototype.addInternalNote=function(e){this.internalNotes.push(e)};Ie.prototype.setEndAnchor=function(e){this.anchor2=e,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)};Ie.prototype.setStartX=function(e){this.startLimitX=e};Ie.prototype.setEndX=function(e){this.endLimitX=e};Ie.prototype.setHint=function(){this.hint=!0};Ie.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e;this.anchor1?e=this.anchor1.pitch:this.anchor2?e=this.anchor2.pitch:e=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=e>=6}};Ie.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(e=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(e=!0);for(var t=0;t<this.internalNotes.length;t++){var r=this.internalNotes[t];r.stemDir==="down"&&(e=!0)}this.above=e}};Ie.prototype.calcX=function(e,t){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.anchor2?this.startX=this.anchor2.x-20:this.startX=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t};Ie.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0};Ie.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&this.anchor1.stemDir==="up"&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&this.anchor2.stemDir==="up"&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch,this.anchor1.scalex===1){var r=!!this.anchor1.parent.beam,i=!!this.anchor2.parent.beam;if(r){var a=this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1];a||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b)}if(i){var n=this.anchor2.parent===this.anchor2.parent.beam.elems[0];n||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)};Ie.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}};Ie.prototype.getYBounds=function(){var e=10,t=1e3;this.isTie?(this.calcTieDirection(),this.calcX(e,t),this.calcTieY()):(this.calcSlurDirection(),this.calcX(e,t),this.calcSlurY());var r,i;return this.above?(i=Math.min(this.startY,this.endY),r=i+3):(r=Math.min(this.startY,this.endY),i=r-3),[r,i]};Es.exports=Ie});var Ns=P((J6,Bs)=>{"use strict";var sd=Cs(),rr=Ts(),od=Ss(),r0=v0(),D0=e0(),cd=fa(),ar=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},ld=function(e,t,r,i,a,n,s,o,c){for(var h,d=0;d<t.length;d++){if(t[d]==="staccato"||t[d]==="tenuto"||t[d]==="accent"&&!c){var f="scripts."+t[d];if(t[d]==="accent"&&(f="scripts.sforzato"),h===void 0?h=s==="down"?r+2:o-2:h=s==="down"?h+2:h-2,t[d]==="accent")s==="up"?h--:h++;else switch(h){case 2:case 4:case 6:case 8:case 10:s==="up"?h--:h++;break}r>9&&h++;var l=i/2;r0.getSymbolAlign(f)!=="center"&&(l-=r0.getSymbolWidth(f)/2),a.addFixedX(new D0(f,l,r0.getSymbolWidth(f),h))}if(t[d]==="slide"&&a.heads[0]){var u=a.heads[0].pitch;u-=2;var p=new D0("",-n-15,0,u-1),g=new D0("",-n-5,0,u+1);a.addFixedX(p),a.addFixedX(g),e.addOther(new cd({anchor1:p,anchor2:g,fixedY:!0}))}}return h===void 0&&(h=r),{above:h,below:a.bottom}},hd=function(e,t,r,i){for(var a=0;a<t.length;a++)switch(t[a]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var n=new sd(r,t[a],i);e.addOther(n)}},fd=function(e,t,r,i,a){function n(){if(i.heads.length===0)return 10;for(var h=i.heads[0].pitch,d=1;d<i.heads.length;d++)h=Math.max(h,i.heads[d].pitch);return h}function s(){if(i.heads.length===0)return 2;for(var h=i.heads[0].pitch,d=1;d<i.heads.length;d++)h=Math.min(h,i.heads[d].pitch);return h}function o(h,d){var f=a==="down"?s()+1:n()+9;a!=="down"&&d===1&&f--;var l=r/2;l+=a==="down"?-5:3;for(var u=0;u<d;u++)f-=1,i.addFixedX(new D0(h,l,r0.getSymbolWidth(h),f))}for(var c=0;c<e.length;c++)switch(e[c]){case"/":o("flags.ugrace",1);break;case"//":o("flags.ugrace",2);break;case"///":o("flags.ugrace",3);break;case"////":o("flags.ugrace",4);break}},ud=function(e,t,r,i,a,n,s,o){function c(g,v){g==="above"?i.above+=v:i.below-=v}function h(g){var v;return g==="above"?(v=i.above,v<n&&(v=n)):(v=i.below,v>s&&(v=s)),v}function d(g,v,m){var y=h(v),k=2,b=5;r.addFixedX(new D0(g,t/2,0,y+k,{type:"decoration",klass:"ornament",thickness:3,anchor:m})),c(v,b)}function f(g,v){var m=t/2;r0.getSymbolAlign(g)!=="center"&&(m-=r0.getSymbolWidth(g)/2);var y=r0.symbolHeightInPitches(g)+1,k=h(v);k=v==="above"?k+y/2:k-y/2,r.addFixedX(new D0(g,m,r0.getSymbolWidth(g),k,{klass:"ornament",thickness:r0.symbolHeightInPitches(g),position:v})),c(v,y)}for(var l={"+":"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",trillh:"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"},u=!1,p=0;p<e.length;p++)switch(e[p]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":d(e[p],a,"middle"),u=!0;break;case"D.C.alcoda":d("D.C. al coda",a,"end"),u=!0;break;case"D.C.alfine":d("D.C. al fine",a,"end"),u=!0;break;case"D.S.alcoda":d("D.S. al coda",a,"end"),u=!0;break;case"D.S.alfine":d("D.S. al fine",a,"end"),u=!0;break;case"fine":d("FINE",a,"middle"),u=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"trillh":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":f(l[e[p]],a),u=!0;break;case"invertedfermata":f(l[e[p]],"below"),u=!0;break;case"mark":r.klass="mark";break;case"accent":o&&(f("scripts.sforzato",a),u=!0);break}return u};function dd(e,t,r){for(var i=0;i<e.length;i++)switch(e[i]){case"arpeggio":for(var a=t.abcelem.minpitch-1;a<=t.abcelem.maxpitch;a+=2)t.addExtra(new D0("scripts.arpeggio",-r0.getSymbolWidth("scripts.arpeggio")*2-r,0,a+2,{klass:"ornament",thickness:r0.symbolHeightInPitches("scripts.arpeggio")}));break}}ar.prototype.endLine=function(e){this.startDiminuendoX&&(e.addOther(new rr(this.startDiminuendoX,As(e.children),">",this.dynamicPositioning)),this.startDiminuendoX=void 0),this.startCrescendoX&&(e.addOther(new rr(this.startCrescendoX,As(e.children),"<",this.dynamicPositioning)),this.startCrescendoX=void 0)};ar.prototype.dynamicDecoration=function(e,t,r,i){for(var a,n,s,o=0;o<t.length;o++)switch(t[o]){case"diminuendo(":this.startDiminuendoX=r,this.dynamicPositioning=i,a=void 0;break;case"diminuendo)":this.startDiminuendoX||(this.startDiminuendoX=Ms(e.children)),a={start:this.startDiminuendoX,stop:r},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=r,this.dynamicPositioning=i,n=void 0;break;case"crescendo)":this.startCrescendoX||(this.startCrescendoX=Ms(e.children)),n={start:this.startCrescendoX,stop:r},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=r,s=void 0;break;case"~)":case"glissando)":s={start:this.startGlissandoX,stop:r},this.startGlissandoX=void 0;break}a&&e.addOther(new rr(a.start,a.stop,">",i)),n&&e.addOther(new rr(n.start,n.stop,"<",i)),s&&e.addOther(new od(s.start,s.stop))};function Ms(e){for(var t=0;t<e.length;t++)if(e[t].abcelem.pitches)return e[t];return null}function As(e){return e[e.length-1]}ar.prototype.createDecoration=function(e,t,r,i,a,n,s,o,c,h,d){c||(c={ornamentPosition:"above",volumePosition:h?"above":"below",dynamicPosition:h?"above":"below"}),hd(e,t,a,c.volumePosition),this.dynamicDecoration(e,t,a,c.dynamicPosition),fd(t,r,i,a,s);var f=ld(e,t,r,i,a,n,s,o,d);f.above=Math.max(f.above,this.minTop),f.below=Math.min(f.below,o);var l=ud(t,i,a,f,c.ornamentPosition,this.minTop,o,d);dd(t,a,n)};Bs.exports=ar});var Ls=P((Z6,Ps)=>{"use strict";var pd=function(t,r,i){this.type="EndingElem",this.text=t,this.anchor1=r,this.anchor2=i,this.endingHeightAbove=5,this.pitch=void 0};Ps.exports=pd});var Ds=P((e4,qs)=>{"use strict";var gd=function(e){for(var t=0,r=0;r<e.voices.length;r++){var i=e.voices[r].staff;e.voices[r].duplicate||(t+=i.top,t+=-i.bottom)}return t};qs.exports=gd});var Os=P((t4,Is)=>{"use strict";var vd=Ds(),j0=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};j0.prototype.setLimit=function(e,t){t.specialY[e]&&(t.staff.specialY[e]?t.staff.specialY[e]=Math.max(t.staff.specialY[e],t.specialY[e]):t.staff.specialY[e]=t.specialY[e])};j0.prototype.addVoice=function(e,t,r){var i=this.voices.length;this.voices[i]=e,this.staffs[t]?this.staffs[t].voices.push(i):this.staffs[this.staffs.length]={top:10,bottom:2,lines:r,voices:[i],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},e.staff=this.staffs[t]};j0.prototype.setHeight=function(){this.height=vd(this)};j0.prototype.setWidth=function(e){this.w=e;for(var t=0;t<this.voices.length;t++)this.voices[t].setWidth(e)};j0.prototype.setStaffLimits=function(e){e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)};Is.exports=j0});var Hs=P((r4,Fs)=>{"use strict";var bd=L0(),md=e0(),ua=function(t,r,i){this.type="TempoElement",this.tempo=t,this.tempo.type="tempo",this.tuneNumber=r,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(i,t,r))};ua.prototype.setX=function(e){this.x=e};ua.prototype.createNote=function(e,t,r){var i=.75,a=t.duration[0],n=new bd(t,a,1,"tempo",r),s,o,c;a<=1/32?(c="noteheads.quarter",o="flags.u32nd",s=0):a<=1/16?(c="noteheads.quarter",o="flags.u16th",s=0):a<=3/32?(c="noteheads.quarter",o="flags.u16nd",s=1):a<=1/8?(c="noteheads.quarter",o="flags.u8th",s=0):a<=3/16?(c="noteheads.quarter",o="flags.u8th",s=1):a<=1/4?(c="noteheads.quarter",s=0):a<=3/8?(c="noteheads.quarter",s=1):a<=1/2?(c="noteheads.half",s=0):a<=3/4?(c="noteheads.half",s=1):a<=1?(c="noteheads.whole",s=0):a<=1.5?(c="noteheads.whole",s=1):a<=2?(c="noteheads.dbl",s=0):(c="noteheads.dbl",s=1);var h=e(n,c,{verticalPos:0},{dir:"up",flag:o,dot:s,scale:i}),d=h.notehead;n.addHead(d);var f;if(c!=="noteheads.whole"&&c!=="noteheads.dbl"){var l=.3333333333333333*i,u=5*i,p=d.dx+d.w,g=-.6;f=new md(null,p,0,l,{type:"stem",pitch2:u,linewidth:g}),n.addRight(f)}return n};Fs.exports=ua});var Rs=P((a4,zs)=>{"use strict";var ir=function(t,r,i){this.type="TripletElem",this.anchor1=r,this.number=t,this.durationClass=("d"+Math.round(r.parent.durationClass*1e3)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=i.flatBeams};ir.prototype.isClosed=function(){return!!this.anchor2};ir.prototype.middleNote=function(e){this.middleElems.push(e)};ir.prototype.setCloseAnchor=function(e){this.anchor2=e,(!this.anchor1.parent.beam||this.anchor1.stemDir==="up")&&(this.endingHeightAbove=4)};zs.exports=ir});var Ws=P((i4,Ys)=>{"use strict";function Gs(e){switch(e){case"B#":return"H#";case"B\u266F":return"H\u266F";case"B":return"H";case"Bb":return"B";case"B\u266D":return"B"}return e}function yd(e,t,r){var i=e.split(`
|
|
27
|
+
`);for(let a=0;a<i.length;a++){let s=i[a].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!s)continue;let o=s[1]||"",c=s[2]||"",h=s[4]||"";r&&(o=Gs(o),h=Gs(h));let d=t?"":"",f=h?"/"+h:"";i[a]=[o,c,f].join(d)}return i.join(`
|
|
28
|
+
`)}Ys.exports=yd});var js=P((n4,Us)=>{"use strict";var V0=e0(),da=Me(),wd=Ws(),xd=function(e,t,r,i,a,n,s,o){for(var c=0;c<r.chord.length;c++){var h=r.chord[c].position,d=r.chord[c].rel_position,f=h==="left"||h==="right"||h==="below"||h==="above"||!!d,l,u;f?(l="annotationfont",u="abcjs-annotation"):(l="gchordfont",u="abcjs-chord");var p=e.attr(l,u),g=r.chord[c].name,v;if(typeof g=="string")v=Xs(g,h,d,f,l,u,p,e,t,r,i,a,n,s,o),i=v.roomTaken,a=v.roomTakenRight;else for(var m=0;m<g.length;m++)v=Xs(g[m].text,h,d,f,l,u,p,e,t,r,i,a,n,s,o),i=v.roomTaken,a=v.roomTakenRight}return{roomTaken:i,roomTakenRight:a}};function Xs(e,t,r,i,a,n,s,o,c,h,d,f,l,u,p){for(var g=e.split(`
|
|
29
|
+
`),v=g.length-1;v>=0;v--){var m=g[v],y=0,k;i||(m=wd(m,u,p));var b=o.calc(m,a,n),w=b.width,C=b.height/da.STEP;switch(t){case"left":d+=w+7,y=-d,k=h.averagepitch,c.addExtra(new V0(m,y,w+4,k,{type:"text",height:C,dim:s,position:"left"}));break;case"right":f+=4,y=f,k=h.averagepitch,c.addRight(new V0(m,y,w+4,k,{type:"text",height:C,dim:s,position:"right"}));break;case"below":c.addRight(new V0(m,0,0,void 0,{type:"text",position:"below",height:C,dim:s,realWidth:w}));break;case"above":c.addRight(new V0(m,0,0,void 0,{type:"text",position:"above",height:C,dim:s,realWidth:w}));break;default:if(r){var B=r.y+3*da.STEP;c.addRight(new V0(m,y+r.x,0,h.minpitch+B/da.STEP,{position:"relative",type:"text",height:C,dim:s}))}else{var L="above";h.positioning&&h.positioning.chordPosition&&(L=h.positioning.chordPosition),L!=="hidden"&&c.addCentered(new V0(m,l/2,w,void 0,{type:"chord",position:L,height:C,dim:s,realWidth:w}))}}}return{roomTaken:d,roomTakenRight:f}}Us.exports=xd});var no=P((s4,io)=>{"use strict";var K0=L0(),$s=cs(),Vs=hs(),Qs=ps(),Js=vs(),xt=ms(),Zs=ws(),Cd=Ns(),eo=Ls(),wt=v0(),me=e0(),Ct=Me(),kd=Os(),to=Hs(),$0=fa(),Td=Rs(),_d=Qr(),ro=js(),Sd=Xr(),_0=Qe(),pa=function(e){var t=0;return e.duration&&(t=e.duration),t},i0=!1,a0={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",multi:"rests.multimeasure"},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"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.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"}},ye=function(e,t,r){this.decoration=new Cd,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=r.bagpipes,this.flatBeams=r.flatbeams,this.graceSlurs=r.graceSlurs,this.percmap=r.percmap,this.initialClef=r.initialClef,this.jazzchords=!!r.jazzchords,this.accentAbove=!!r.accentAbove,this.germanAlphabet=!!r.germanAlphabet,this.reset()};ye.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},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.startlimitelem=void 0,this.stemdir=void 0};ye.prototype.setStemHeight=function(e){this.stemHeight=Math.round(e*10/Ct.STEP)/10};ye.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t};ye.prototype.pushCrossLineElems=function(e,t){this.slursbyvoice[this.getCurrentVoiceId(e,t)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(e,t)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(e,t)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(e,t)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(e,t)]=this.voiceColor)};ye.prototype.popCrossLineElems=function(e,t){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(e,t)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(e,t)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(e,t)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(e,t)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(e,t)]};ye.prototype.containsLyrics=function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].voices.length;r++)for(var i=0;i<e[t].voices[r].length;i++){var a=e[t].voices[r][i];if(a.lyric){(!a.positioning||a.positioning.vocalPosition==="below")&&(this.hasVocals=!0);return}}};ye.prototype.createABCLine=function(e,t,r){this.minY=2,this.containsLyrics(e);var i=new kd(this.getTextSize);this.tempoSet=!1;for(var a=0;a<e.length;a++)i0&&this.restoreState(),i0=!1,this.createABCStaff(i,e[a],t,a,r);return i};ye.prototype.createABCStaff=function(e,t,r,i,a){e.getTextSize.updateFonts(t);for(var n=0;n<t.voices.length;n++){var s=new _d(n,t.voices.length);n===0?(s.barfrom=t.connectBarLines==="start"||t.connectBarLines==="continue",s.barto=t.connectBarLines==="continue"||t.connectBarLines==="end"):s.duplicate=!0,t.title&&t.title[n]&&(s.header=t.title[n].replace(/\\n/g,`
|
|
30
|
+
`),s.headerPosition=6+e.getTextSize.baselineToCenter(s.header,"voicefont","staff-extra voice-name",n,t.voices.length)/Ct.STEP),t.clef&&t.clef.type==="perc"&&(s.isPercussion=!0);var o=(!this.initialClef||a===0)&&Qs(t.clef,this.tuneNumber);o&&(n===0&&t.barNumber&&this.addMeasureNumber(t.barNumber,o),s.addChild(o),this.startlimitelem=o);var c=Js(t.key,this.tuneNumber);if(c&&(s.addChild(c),this.startlimitelem=c),t.meter){t.meter.type==="specified"?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var h=Zs(t.meter,this.tuneNumber);s.addChild(h),this.startlimitelem=h}s.duplicate&&(s.children=[]);var d=t.clef.stafflines||t.clef.stafflines===0?t.clef.stafflines:5;e.addVoice(s,i,d);var f=d===1;this.createABCVoice(t.voices[n],r,i,n,f,s),e.setStaffLimits(s),n===0&&(t.brace==="start"||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new Vs(s,"brace"))):t.brace==="end"&&e.brace?e.brace[e.brace.length-1].setBottomStaff(s):t.brace==="continue"&&e.brace&&e.brace[e.brace.length-1].continuing(s),t.bracket==="start"||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new Vs(s,"bracket"))):t.bracket==="end"&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(s):t.bracket==="continue"&&e.bracket&&e.bracket[e.bracket.length-1].continuing(s))}};function Ed(e,t){var r=e[t];if(r.el_type!=="note"||!r.startBeam||r.endBeam)return{count:1,elem:r};for(var i=[];t<e.length&&e[t].el_type==="note"&&(i.push(e[t]),!e[t].endBeam);)t++;return{count:i.length,elem:i}}ye.prototype.createABCVoice=function(e,t,r,i,a,n){this.popCrossLineElems(r,i),this.stemdir=this.isBagpipes?"down":null,this.abcline=e,this.partstartelem&&(this.partstartelem=new eo("",null,null),n.addOther(this.partstartelem));var s=n.voicetotal<2?-1:n.voicenumber;for(var o in this.slurs)this.slurs.hasOwnProperty(o)&&(this.slurs[o]=new $0({force:this.slurs[o].force,voiceNumber:s,stemDir:this.slurs[o].stemDir,style:this.slurs[o].dotted}),i0&&this.slurs[o].setHint(),n.addOther(this.slurs[o]));for(var c=0;c<this.ties.length;c++)this.ties[c]=new $0({force:this.ties[c].force,stemDir:this.ties[c].stemDir,voiceNumber:s,style:this.ties[c].dotted}),i0&&this.ties[c].setHint(),n.addOther(this.ties[c]);for(var h=0;h<this.abcline.length;h++)Md(this.abcline[h]),this.minY=Math.min(this.abcline[h].minpitch,this.minY);for(var d=r===0,f=0;f<this.abcline.length;){var l=Ed(this.abcline,f),u=this.createABCElement(d,a,n,l.elem);if(u)for(c=0;c<u.length;c++){if(!this.tempoSet&&t&&!t.suppress){this.tempoSet=!0;var p=new K0(t,0,0,"tempo",this.tuneNumber,{});p.addFixedX(new to(t,this.tuneNumber,xt)),n.addChild(p)}n.addChild(u[c])}f+=l.count}this.decoration.endLine(n),this.pushCrossLineElems(r,i)};ye.prototype.saveState=function(){this.tiesSave=_0.cloneArray(this.ties),this.slursSave=_0.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=_0.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=_0.cloneHashOfArrayOfHash(this.tiesbyvoice)};ye.prototype.restoreState=function(){this.ties=_0.cloneArray(this.tiesSave),this.slurs=_0.cloneHashOfHash(this.slursSave),this.slursbyvoice=_0.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=_0.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)};ye.prototype.createABCElement=function(e,t,r,i){var a=[];switch(i.el_type){case void 0:a=this.createBeam(t,r,i);break;case"note":a[0]=this.createNote(i,!1,t,r),this.triplet&&this.triplet.isClosed()&&(r.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":a[0]=this.createBarLine(r,i,e),r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"meter":a[0]=Zs(i,this.tuneNumber),this.startlimitelem=a[0],r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"clef":if(a[0]=Qs(i,this.tuneNumber),!a[0])return null;r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"key":var n=Js(i,this.tuneNumber);n&&(a[0]=n,this.startlimitelem=a[0]),r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"stem":this.stemdir=i.direction==="auto"?void 0:i.direction;break;case"part":var s=new K0(i,0,0,"part",this.tuneNumber),o=this.getTextSize.calc(i.title,"partsfont","part");s.addFixedX(new me(i.title,0,0,void 0,{type:"part",height:o.height/Ct.STEP})),a[0]=s;break;case"tempo":var c=new K0(i,0,0,"tempo",this.tuneNumber);i.suppress||c.addFixedX(new to(i,this.tuneNumber,xt)),a[0]=c;break;case"style":i.head==="normal"?delete this.style:this.style=i.head;break;case"hint":i0=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=i.size;break;case"color":this.voiceColor=i.color,r.color=this.voiceColor;break;default:var h=new K0(i,0,0,"unsupported",this.tuneNumber);h.addFixed(new me("element type "+i.el_type,0,0,void 0,{type:"debug"})),a[0]=h}return a};function Md(e){if(e.pitches){Ad(e);for(var t=0,r=0;r<e.pitches.length;r++)t+=e.pitches[r].verticalPos;e.averagepitch=t/e.pitches.length,e.minpitch=e.pitches[0].verticalPos,e.maxpitch=e.pitches[e.pitches.length-1].verticalPos}}ye.prototype.createBeam=function(e,t,r){var i=[],a=new $s(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);i0&&a.setHint();for(var n=0;n<r.length;n++)a.runningDirection(r[n]);a.setStemDirection();var s=this.stemdir;for(this.stemdir=a.stemsUp?"up":"down",n=0;n<r.length;n++){var o=r[n],c=this.createNote(o,!0,e,t);i.push(c),a.add(c),this.triplet&&this.triplet.isClosed()&&(t.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return a.calcDir(),t.addBeam(a),this.stemdir=s,i};var Ad=function(e){var t;do{t=!0;for(var r=0;r<e.pitches.length-1;r++)if(e.pitches[r].pitch>e.pitches[r+1].pitch){t=!1;var i=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=i}}while(!t)},ao=function(e,t,r,i,a,n,s,o,c){for(var h=r;h>11;h--)h%2===0&&!i&&e.addFixed(new me(null,o,(a+4)*c,h,{type:"ledger"}));for(h=t;h<1;h++)h%2===0&&!i&&e.addFixed(new me(null,o,(a+4)*c,h,{type:"ledger"}));for(h=0;h<n.length;h++){var d=a;s==="down"&&(d=-d),e.addFixed(new me(null,d+o,(a+4)*c,n[h],{type:"ledger"}))}};ye.prototype.addGraceNotes=function(e,t,r,i,a,n,s){var o=.6,c=3.5/5;a=Math.round(a*c);var h=null,d;e.gracenotes.length>1&&(h=new $s(a,"grace",n),i0&&h.setHint(),h.mainNote=r);var f,l=[];for(f=e.gracenotes.length-1;f>=0;f--)s+=10,l[f]=s,e.gracenotes[f].accidental&&(s+=7);for(f=0;f<e.gracenotes.length;f++){var u=e.gracenotes[f].verticalPos;d=h?null:a0.uflags[n?5:3];var p=[],g=xt(r,"noteheads.quarter",e.gracenotes[f],{dir:"up",headx:-l[f],extrax:-l[f],flag:d,scale:o*this.voiceScale,accidentalSlot:p});g.notehead.highestVert=g.notehead.pitch+a;var v=g.notehead;if(this.addSlursAndTies(r,e.gracenotes[f],v,t,"up",!0),r.addExtra(v),e.gracenotes[f].acciaccatura){var m=e.gracenotes[f].verticalPos+7*o,y=h?5:6;r.addRight(new me("flags.ugrace",-l[f]+y,0,m,{scalex:o,scaley:o}))}if(h){var k=e.gracenotes[f].duration/2;n&&(k/=2);var b={heads:[v],abcelem:{averagepitch:u,minpitch:u,maxpitch:u,duration:k}};h.add(b)}else{var w=u+.3333333333333333*o,C=u+7*o,B=v.dx+v.w,L=-.6;r.addExtra(new me(null,B,0,w,{type:"stem",pitch2:C,linewidth:L}))}ao(r,u,u,!1,wt.getSymbolWidth("noteheads.quarter"),[],!0,v.dx-1,.6);var N=e.rest&&(e.rest.type==="spacer"||e.rest.type==="invisible");f===0&&!n&&this.graceSlurs&&!N&&t.addOther(new $0({anchor1:v,anchor2:i,isGrace:!0}))}return h&&(h.calcDir(),t.addBeam(h)),s};function Bd(e,t,r,i,a,n,s,o,c){var h,d=7,f,l,u;switch(a&&(n==="down"&&(d=3),n==="up"&&(d=11)),s&&(r<.5||r<1?d=7:d=5),t.rest.type){case"whole":h=a0.rest[0],t.averagepitch=d,t.minpitch=d,t.maxpitch=d,i=0;break;case"rest":t.style==="rhythm"?h=a0.rhythm[-o]:h=a0.rest[-o],t.averagepitch=d,t.minpitch=d,t.maxpitch=d;break;case"invisible":case"invisible-multimeasure":case"spacer":h="",t.averagepitch=d,t.minpitch=d,t.maxpitch=d;break;case"multimeasure":h=a0.rest.multi,t.averagepitch=d,t.minpitch=d,t.maxpitch=d,i=0;var p=wt.getSymbolWidth(h);e.addHead(new me(h,p,p*2,7));var g=new me(""+t.rest.text,p,p,16,{type:"multimeasure-text"});e.addExtra(g)}if(t.rest.type.indexOf("multimeasure")<0&&t.rest.type!=="invisible"){var v=xt(e,h,{verticalPos:d},{dot:i,scale:c});f=v.notehead,f&&(e.addHead(f),l=v.accidentalshiftx,u=v.dotshiftx)}return{noteHead:f,roomTaken:l,roomTakenRight:u}}function Ks(e,t){for(var r=0;r<e.length;r++)if(JSON.stringify(e[r])===JSON.stringify(t))return;e.push(t)}ye.prototype.addNoteToAbcElement=function(e,t,r,i,a,n,s,o,c){var h=0,d,f=0,l=0,u,p,g=[],v=[],m=0,y=t.averagepitch>=6?"down":"up";i&&(y=i),a=t.style?t.style:a,(!a||a==="normal")&&(a="note");var k;n?k=a0[a].nostem:k=a0[a][-s],k||console.log("noteSymbol:",a,s,n);var b;for(b=y==="down"?t.pitches.length-2:1;y==="down"?b>=0:b<t.pitches.length;b=y==="down"?b-1:b+1){var w=t.pitches[y==="down"?b+1:b-1],C=t.pitches[b],B=y==="down"?w.pitch-C.pitch:C.pitch-w.pitch;B<=1&&!w.printer_shift&&(C.printer_shift=B?"different":"same",(C.verticalPos>11||C.verticalPos<1)&&g.push(C.verticalPos-C.verticalPos%2),y==="down"?f=wt.getSymbolWidth(k)+2:h=wt.getSymbolWidth(k)+2)}var L=t.pitches.length;for(b=0;b<t.pitches.length;b++){if(!o){var N;y==="down"&&b!==0||y==="up"&&b!==L-1?N=null:N=a0[y==="down"?"dflags":"uflags"][-s]}var _;if(t.pitches[b].style)_=a0[t.pitches[b].style][-s];else if(c.isPercussion&&this.percmap){_=k;var F=this.percmap[Sd(t.pitches[b])];F&&F.noteHead&&a0[F.noteHead]&&(_=a0[F.noteHead][-s])}else _=k;t.pitches[b].highestVert=t.pitches[b].verticalPos;var q=(i==="up"||y==="up")&&b===0,D=(i==="down"||y==="down")&&b===L-1;if(q||D){if((t.startSlur||L===1)&&(t.pitches[b].highestVert=t.pitches[L-1].verticalPos,pa(t)<1&&(i==="up"||y==="up")&&(t.pitches[b].highestVert+=6)),t.startSlur)for(t.pitches[b].startSlur||(t.pitches[b].startSlur=[]),p=0;p<t.startSlur.length;p++)Ks(t.pitches[b].startSlur,t.startSlur[p]);if(t.endSlur)for(t.pitches[b].highestVert=t.pitches[L-1].verticalPos,pa(t)<1&&(i==="up"||y==="up")&&(t.pitches[b].highestVert+=6),t.pitches[b].endSlur||(t.pitches[b].endSlur=[]),p=0;p<t.endSlur.length;p++)Ks(t.pitches[b].endSlur,t.endSlur[p])}var R=!o&&s<=-1,J=L>1?b+1:null,U=xt(e,_,t.pitches[b],{dir:y,extrax:-f,flag:N,dot:r,dotshiftx:h,scale:this.voiceScale,accidentalSlot:v,shouldExtendStem:!i,printAccidentals:!c.isPercussion,chordPos:J});m=Math.max(wt.getSymbolWidth(_),m),e.extraw-=U.extraLeft,d=U.notehead,d&&(this.addSlursAndTies(e,t.pitches[b],d,c,R?y:null,!1),t.gracenotes&&t.gracenotes.length>0&&(d.bottom=d.bottom-1),e.addHead(d)),f+=U.accidentalshiftx,l=Math.max(l,U.dotshiftx)}if(R){var x=Math.round(70*this.voiceScale)/10,T=y==="down"?t.minpitch-x:t.minpitch+1/3;T>6&&!i&&(T=6);var M=y==="down"?t.maxpitch-1/3:t.maxpitch+x;M<6&&!i&&(M=6);var S=y==="down"||e.heads.length===0?0:e.heads[0].w,z=y==="down"?1:-1;d&&d.c==="noteheads.slash.quarter"&&(y==="down"?M-=1:T+=1),d&&d.c==="noteheads.triangle.quarter"&&(y==="down"?M-=.7:T-=1.2),e.addRight(new me(null,S,0,T,{type:"stem",pitch2:M,linewidth:z,bottom:T-1})),u=Math.min(T,M)}return{noteHead:d,roomTaken:f,roomTakenRight:l,min:u,additionalLedgers:g,dir:y,symbolWidth:m}};ye.prototype.addLyric=function(e,t,r){var i="";t.lyric.forEach(function(s){var o=s.divider===" "?"":s.divider;i+=s.syllable+o+`
|
|
31
|
+
`});var a=this.getTextSize.calc(i,"vocalfont","lyric"),n=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new me(i,0,a.width,void 0,{type:"lyric",position:n,height:a.height/Ct.STEP,dim:this.getTextSize.attr("vocalfont","lyric"),voiceNumber:r}))};ye.prototype.createNote=function(e,t,r,i){var a=null,n=0,s=0,o=0,c=[],h,d=pa(e),f=!1;d===0&&(f=!0,d=.25,t=!0);for(var l=Math.floor(Math.log(d)/Math.log(2)),u=0,p=Math.pow(2,l),g=p/2;p<d;u++,p+=g,g/=2);e.startTriplet&&(this.tripletmultiplier=e.tripletMultiplier);var v=d*this.tripletmultiplier;e.rest&&e.rest.type==="multimeasure"&&(v=1),e.rest&&e.rest.type==="invisible-multimeasure"&&(v=this.measureLength*e.rest.text);var m=e.rest?"rest":"note",y=new K0(e,v,1,m,this.tuneNumber,{durationClassOveride:e.duration*this.tripletmultiplier});if(i0&&y.setHint(),e.rest){this.measureLength===d&&e.rest.type!=="invisible"&&e.rest.type!=="spacer"&&e.rest.type.indexOf("multimeasure")<0&&(e.rest.type="whole");var k=Bd(y,e,d,u,i.voicetotal>1,this.stemdir,r,l,this.voiceScale);a=k.noteHead,n=k.roomTaken,s=k.roomTakenRight}else{var b=this.addNoteToAbcElement(y,e,u,this.stemdir,this.style,f,l,t,i);b.min!==void 0&&(this.minY=Math.min(b.min,this.minY)),a=b.noteHead,n=b.roomTaken,s=b.roomTakenRight,c=b.additionalLedgers,h=b.dir,o=b.symbolWidth}if(e.lyric!==void 0&&this.addLyric(y,e,i.voicenumber),e.gracenotes!==void 0&&(n+=this.addGraceNotes(e,i,y,a,this.stemHeight*this.voiceScale,this.isBagpipes,n)),e.decoration){var w=t&&h!=="up"?Math.min(-3,y.bottom-6):y.bottom;this.decoration.createDecoration(i,e.decoration,y.top,a?a.w:0,y,n,h,w,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&y.addFixed(new me(e.barNumber,-10,0,0,{type:"barNumber"})),ao(y,e.minpitch,e.maxpitch,e.rest,o,c,h,-2,1),e.chord!==void 0){var C=ro(this.getTextSize,y,e,n,s,o,this.jazzchords,this.germanAlphabet);n=C.roomTaken,s=C.roomTakenRight}return e.startTriplet&&(this.triplet=new Td(e.startTriplet,a,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(a),this.triplet&&!e.startTriplet&&!e.endTriplet&&!(e.rest&&e.rest.type==="spacer")&&this.triplet.middleNote(a),y};ye.prototype.addSlursAndTies=function(e,t,r,i,a,n){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o<this.ties.length;o++)if(this.ties[o].anchor1&&this.ties[o].anchor1.pitch===r.pitch){this.ties[o].setEndAnchor(r),i.setRange(this.ties[o]),this.ties.splice(o,1),s=!0;break}s||(this.ties[0].setEndAnchor(r),i.setRange(this.ties[0]),this.ties.splice(0,1))}var c=i.voicetotal<2?-1:i.voicenumber;if(t.startTie){var h=new $0({anchor1:r,force:this.stemdir==="down"||this.stemdir==="up",stemDir:this.stemdir,isGrace:n,voiceNumber:c,style:t.startTie.style});i0&&h.setHint(),this.ties[this.ties.length]=h,i.addOther(h),e.startTie=!0}var d,f;if(t.endSlur)for(var l=0;l<t.endSlur.length;l++)f=t.endSlur[l],this.slurs[f]?(d=this.slurs[f],d.setEndAnchor(r),i.setRange(d),delete this.slurs[f]):(d=new $0({anchor2:r,stemDir:this.stemdir,voiceNumber:c}),i0&&d.setHint(),i.addOther(d)),this.startlimitelem&&d.setStartX(this.startlimitelem);else if(!n)for(var u in this.slurs)this.slurs.hasOwnProperty(u)&&this.slurs[u].addInternalNote(r);if(t.startSlur)for(l=0;l<t.startSlur.length;l++)f=t.startSlur[l].label,d=new $0({anchor1:r,stemDir:this.stemdir,voiceNumber:c,style:t.startSlur[l].style}),i0&&d.setHint(),this.slurs[f]=d,i.addOther(d)};ye.prototype.addMeasureNumber=function(e,t){var r=this.getTextSize.calc(e,"measurefont","bar-number"),i=0;t.isClef&&(i+=r.width/2);var a=r.width>10&&t.abcelem.type==="treble"?13.5:11;t.addFixed(new me(e,i,r.width,a+r.height/Ct.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))};ye.prototype.createBarLine=function(e,t,r){var i=new K0(t,0,10,"bar",this.tuneNumber),a=null,n=0;t.barNumber&&this.addMeasureNumber(t.barNumber,i);var s=t.type==="bar_right_repeat"||t.type==="bar_dbl_repeat",o=t.type!=="bar_left_repeat"&&t.type!=="bar_thick_thin"&&t.type!=="bar_invisible",c=t.type==="bar_right_repeat"||t.type==="bar_dbl_repeat"||t.type==="bar_left_repeat"||t.type==="bar_thin_thick"||t.type==="bar_thick_thin",h=t.type==="bar_left_repeat"||t.type==="bar_thick_thin"||t.type==="bar_thin_thin"||t.type==="bar_dbl_repeat",d=t.type==="bar_left_repeat"||t.type==="bar_dbl_repeat";if(s||d){for(var f in this.slurs)this.slurs.hasOwnProperty(f)&&this.slurs[f].setEndX(i);this.startlimitelem=i}if(s&&(i.addRight(new me("dots.dot",n,1,7)),i.addRight(new me("dots.dot",n,1,5)),n+=6),o&&(a=new me(null,n,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(a)),t.type==="bar_invisible"&&(a=new me(null,n,1,2,{type:"none",pitch2:10,linewidth:.6}),i.addRight(a)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,c?3:1,i,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),c&&(n+=4,a=new me(null,n,4,2,{type:"bar",pitch2:10,linewidth:4}),i.addRight(a),n+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=a,this.partstartelem=null),h&&(n+=3,a=new me(null,n,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(a)),d&&(n+=3,i.addRight(new me("dots.dot",n,1,7)),i.addRight(new me("dots.dot",n,1,5))),t.startEnding&&r&&e.voicenumber===0){var l=this.getTextSize.calc(t.startEnding,"repeatfont","").width;i.minspacing+=l+10,this.partstartelem=new eo(t.startEnding,a,null),e.addOther(this.partstartelem)}if(i.extraw-=5,t.chord!==void 0)var u=ro(this.getTextSize,i,t,0,0,0,!1,this.germanAlphabet);return i};io.exports=ye});var lo=P((o4,co)=>{"use strict";var Ae="http://www.w3.org/2000/svg";function fe(e){this.svg=va(),this.currentGroup=[],e.appendChild(this.svg)}fe.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=va(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}};fe.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)};fe.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var i=t/e*100;this.svg.parentNode.style["padding-bottom"]=i+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}};fe.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)};fe.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)};fe.prototype.setScale=function(e){e!==1?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")};fe.prototype.insertStyles=function(e){var t=document.createElementNS(Ae,"style");t.textContent=e,this.svg.insertBefore(t,this.svg.firstChild)};fe.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);if(this.dummySvg){var r=document.querySelector("body");r.removeChild(this.dummySvg),this.dummySvg=null}};function so(e,t,r){var i=r-e;return"M "+e+" "+t+" l "+i+" 0 l 0 1 l "+-i+" 0 z "}function oo(e,t,r){var i=r-t;return"M "+e+" "+t+" l 0 "+i+" l 1 0 l 0 "+-i+" z "}fe.prototype.rect=function(e){var t=[],r=e.x,i=e.y,a=e.x+e.width,n=e.y+e.height;return t.push(so(r,i,a)),t.push(so(r,n,a)),t.push(oo(a,i,n)),t.push(oo(r,n,i)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})};fe.prototype.dottedLine=function(e){var t=document.createElementNS(Ae,"line");t.setAttribute("x1",e.x1),t.setAttribute("x2",e.x2),t.setAttribute("y1",e.y1),t.setAttribute("y2",e.y2),t.setAttribute("stroke",e.stroke),t.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(t,this.svg.firstChild)};fe.prototype.rectBeneath=function(e){var t=document.createElementNS(Ae,"rect");t.setAttribute("x",e.x),t.setAttribute("width",e.width),t.setAttribute("y",e.y),t.setAttribute("height",e.height),e.stroke&&t.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&t.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&t.setAttribute("fill",e.fill),e["fill-opacity"]&&t.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(t,this.svg.firstChild)};fe.prototype.text=function(e,t,r,i){var a=document.createElementNS(Ae,"text");a.setAttribute("stroke","none");for(var n in t)t.hasOwnProperty(n)&&a.setAttribute(n,t[n]);for(var s=t["data-name"]=="free-text",o=(""+e).split(`
|
|
32
|
+
`),c=0;c<o.length;c++)if(!(s&&o[c]=="")){var h=document.createElementNS(Ae,"tspan");if(i)for(var d in i)i.hasOwnProperty(d)&&h.setAttribute(d,i[d]);if(h.setAttribute("x",t.x?t.x:0),c!==0&&h.setAttribute("dy","1.2em"),o[c].indexOf("")!==-1){var f=o[c].split("");if(h.textContent=f[0],f[1]){var l=document.createElementNS(Ae,"tspan");l.setAttribute("dy","-0.3em"),l.setAttribute("style","font-size:0.7em"),l.textContent=f[1],h.appendChild(l)}if(f[2]){var u=f[1]?"0.4em":"0.1em",p=document.createElementNS(Ae,"tspan");p.setAttribute("dy",u),p.setAttribute("style","font-size:0.7em"),p.textContent=f[2],h.appendChild(p)}}else s&&o[c].trim()==""?h.innerHTML=" ":h.textContent=o[c];a.appendChild(h)}return r?r.appendChild(a):this.append(a),a};fe.prototype.richTextLine=function(e,t,r,i,a,n){var s=document.createElementNS(Ae,"text");s.setAttribute("stroke","none"),s.setAttribute("class",i),s.setAttribute("x",t),s.setAttribute("y",r),s.setAttribute("text-anchor",a),s.setAttribute("dominant-baseline","middle");for(var o=0;o<e.length;o++){for(var c=e[o],h=document.createElementNS(Ae,"tspan"),d=Object.keys(c.attrs),f=0;f<d.length;f++){var l=c.attrs[d[f]];l!==""&&h.setAttribute(d[f],l)}h.textContent=c.content,s.appendChild(h)}return n?n.appendChild(s):this.append(s),s};fe.prototype.guessWidth=function(e,t){var r=this.createDummySvg(),i=this.text(e,t,r),a;try{a=i.getBBox(),isNaN(a.height)||!a.height?a={width:t["font-size"]/2,height:t["font-size"]+2}:a={width:a.width,height:a.height}}catch(n){a={width:t["font-size"]/2,height:t["font-size"]+2}}return r.removeChild(i),a};fe.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=va();var e=["display: block !important;","height: 1px;","width: 1px;","position: absolute;"];this.dummySvg.setAttribute("style",e.join(""));var t=document.querySelector("body");t.appendChild(this.dummySvg)}return this.dummySvg};var ga={};fe.prototype.getTextSize=function(e,t,r){if(typeof e=="number"&&(e=""+e),!e||e.match(/^\s+$/))return{width:0,height:0};var i;if(e.length<20&&(i=e+JSON.stringify(t),ga[i]))return ga[i];var a=!r;r||(r=this.text(e,t));var n;try{n=r.getBBox(),isNaN(n.height)||!n.height?n=this.guessWidth(e,t):n={width:n.width,height:n.height}}catch(s){n=this.guessWidth(e,t)}return a&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),i&&(ga[i]=n),n};fe.prototype.openGroup=function(e){e=e||{};var t=document.createElementNS(Ae,"g");return e.klass&&t.setAttribute("class",e.klass),e.fill&&t.setAttribute("fill",e.fill),e.stroke&&t.setAttribute("stroke",e.stroke),e["data-name"]&&t.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(t):this.append(t),this.currentGroup.unshift(t),t};fe.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&e.children.length===0?(e.parentElement.removeChild(e),null):e};fe.prototype.path=function(e){var t=document.createElementNS(Ae,"path");for(var r in e)e.hasOwnProperty(r)&&(r==="path"?t.setAttributeNS(null,"d",e.path):r==="klass"?t.setAttributeNS(null,"class",e[r]):e[r]!==void 0&&t.setAttributeNS(null,r,e[r]));return this.append(t),t};fe.prototype.pathToBack=function(e){var t=document.createElementNS(Ae,"path");for(var r in e)e.hasOwnProperty(r)&&(r==="path"?t.setAttributeNS(null,"d",e.path):r==="klass"?t.setAttributeNS(null,"class",e[r]):t.setAttributeNS(null,r,e[r]));return this.prepend(t),t};fe.prototype.lineToBack=function(e){for(var t=document.createElementNS(Ae,"line"),r=Object.keys(e),i=0;i<r.length;i++)t.setAttribute(r[i],e[r[i]]);return this.prepend(t),t};fe.prototype.append=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)};fe.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)};fe.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])};fe.prototype.moveElementToChild=function(e,t){e.appendChild(t)};function va(){var e=document.createElementNS(Ae,"svg");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("role","img"),e.setAttribute("fill","currentColor"),e.setAttribute("stroke","currentColor"),e}co.exports=fe});var fo=P((c4,ho)=>{"use strict";var ba=Me(),Nd=lo(),Oe=function(e){this.paper=new Nd(e),this.controller=null,this.space=3*ba.SPACE,this.padding={},this.reset(),this.firefox=navigator.userAgent.indexOf("Firefox/")>=0};Oe.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()};Oe.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint=e.media==="print",this.setPadding(e)};Oe.prototype.setLineThickness=function(e){this.lineThickness=e};Oe.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}};Oe.prototype.setPadding=function(e){function t(r,i,a,n,s){e.formatting[a]!==void 0?r.padding[i]=e.formatting[a]:r.paddingOverride[i]!==void 0?r.padding[i]=r.paddingOverride[i]:r.isPrint?r.padding[i]=n:r.padding[i]=s}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)};Oe.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e};Oe.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,staffTopMargin:0,stemHeight:26.67+10,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}};Oe.prototype.setVerticalSpace=function(e){e.staffsep!==void 0&&(this.spacing.staffSeparation=e.staffsep*4/3),e.composerspace!==void 0&&(this.spacing.composer=e.composerspace*4/3),e.partsspace!==void 0&&(this.spacing.parts=e.partsspace*4/3),e.textspace!==void 0&&(this.spacing.text=e.textspace*4/3),e.musicspace!==void 0&&(this.spacing.music=e.musicspace*4/3),e.titlespace!==void 0&&(this.spacing.title=e.titlespace*4/3),e.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=e.sysstaffsep*4/3),e.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=e.stafftopmargin*4/3),e.subtitlespace!==void 0&&(this.spacing.subtitle=e.subtitlespace*4/3),e.topspace!==void 0&&(this.spacing.top=e.topspace*4/3),e.vocalspace!==void 0&&(this.spacing.vocal=e.vocalspace*4/3),e.wordsspace!==void 0&&(this.spacing.words=e.wordsspace*4/3)};Oe.prototype.calcY=function(e){return this.y-e*ba.STEP};Oe.prototype.yToPitch=function(e){return e/ba.STEP};Oe.prototype.moveY=function(e,t){t===void 0&&(t=1),this.y+=e*t};Oe.prototype.absolutemoveY=function(e){this.y=e};ho.exports=Oe});var po=P((l4,uo)=>{"use strict";function Pd(e,t,r,i,a,n){var s=e.text;this.rows=[];var o;t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(s==="")this.rows.push({move:c.attr["font-size"]*2});else if(typeof s=="string"){let v=function(m){return m.replace(/^[ \t]*\n/gm,`X
|
|
33
|
+
`)};var g=v;this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:i,text:s,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"});var h=v(s);o=n.calc(h,"textfont","defined-text"),this.rows.push({move:o.height})}else if(s){for(var d=0,f=i,l="textfont",u=0;u<s.length;u++)s[u].font?l=s[u].font:l="textfont",this.rows.push({left:f,text:s[u].text,font:l,klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),o=n.calc(s[u].text,r.calc(l,"defined-text").font,"defined-text"),f+=o.width+o.height/2,d=Math.max(d,o.height);this.rows.push({move:d})}else if(e.length===1){var p=a/2;this.rows.push({left:p,text:e[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),o=n.calc(e[0].text,"textfont","defined-text"),this.rows.push({move:o.height})}}uo.exports=Pd});var vo=P((h4,go)=>{"use strict";function Ld(e,t,r){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t,absElemType:"separator"}),r&&this.rows.push({move:r})}go.exports=Ld});var mo=P((f4,bo)=>{"use strict";function qd(e,t,r,i,a,n){this.rows=[],e&&this.rows.push({move:e});var s=t.titleleft?"start":"middle",o=t.titleleft?a:i;this.rows.push({left:o,text:r.text,font:"subtitlefont",klass:"text subtitle",anchor:s,startChar:r.startChar,endChar:r.endChar,absElemType:"subtitle",name:"subtitle"});var c=n.calc(r.text,"subtitlefont","text subtitle");this.rows.push({move:c.height})}bo.exports=qd});var nr=P((u4,yo)=>{"use strict";function Dd(e,t,r){if(t.text){t.marginLeft||(t.marginLeft=0),t.klass||(t.klass=""),t.anchor||(t.anchor="start"),t.info||(t.info={startChar:-2,endChar:-2}),t.marginTop&&e.push({move:t.marginTop});var i={left:t.marginLeft,text:t.text,font:t.font,anchor:t.anchor,startChar:t.info.startChar,endChar:t.info.endChar,"dominant-baseline":t["dominant-baseline"]};t.absElemType&&(i.absElemType=t.absElemType),!t.inGroup&&t.klass&&(i.klass=t.klass),t.name&&(i.name=t.name),e.push(i);var a=r.calc("A",t.font,t.klass),n=t.text.split(`
|
|
34
|
+
`).length;if(t.text[t.text.length-1]===`
|
|
35
|
+
`&&n--,!t.noMove){var s=a.height*1.1*n;e.push({move:Math.round(s)}),t.marginBottom&&e.push({move:t.marginBottom})}}}yo.exports=Dd});var ma=P((d4,wo)=>{"use strict";var Id=nr();function Od(e,t,r,i,a,n,s,o){var c=o.calc("i",r,i);if(t==="")e.push({move:c.height});else{if(typeof t=="string"){Id(e,{marginLeft:n,text:t,font:r,klass:i,marginTop:s.marginTop,anchor:s.anchor,absElemType:s.absElemType,info:s.info,name:a},o);return}s.marginTop&&e.push({move:s.marginTop});var h=0,d=0,f={left:n,anchor:s.anchor,phrases:[]};i&&(f.klass=i),e.push(f);for(var l=0;l<t.length;l++){var u=t[l],p=u.font?u.font:o.attr(r,i).font,g={content:u.text};p&&(g.attrs={"font-family":o.getFamily(p.face),"font-size":p.size,"font-weight":p.weight,"font-style":p.style,"font-decoration":p.decoration}),f.phrases.push(g);var v=o.calc(u.text,p,i);h=Math.max(h,v.height),u.text[u.text.length-1]===" "&&(d=c.width)}e.push({move:h})}}wo.exports=Od});var Co=P((p4,xo)=>{"use strict";var sr=nr(),kt=ma();function Fd(e,t,r,i,a,n,s,o,c,h){if(this.rows=[],e.header&&n){var d=h.calc("X","headerfont","abcjs-header abcjs-meta-top").height;sr(this.rows,{marginLeft:s,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:t.header,name:"header"},h),sr(this.rows,{marginLeft:s+a/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:t.header,name:"header"},h),sr(this.rows,{marginLeft:s+a,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:t.header,name:"header"},h)}n&&this.rows.push({move:o.top});var f=r.titleleft?"start":"middle",l=r.titleleft?s:s+a/2;if(e.title){var u=c?"abcjs-title":"";kt(this.rows,e.title,"titlefont",u,"title",l,{marginTop:o.title,anchor:f,absElemType:"title",info:t.title},h)}if(i.length)for(var p=0;p<i.length&&i[p].subtitle;){var u=c?"abcjs-text abcjs-subtitle":"";kt(this.rows,i[p].subtitle.text,"subtitlefont",u,"subtitle",l,{marginTop:o.subtitle,anchor:f,absElemType:"subtitle",info:i[p].subtitle},h),p++}if(e.rhythm||e.origin||e.composer){if(this.rows.push({move:o.composer}),e.rhythm&&e.rhythm.length>0){var g=!!(e.composer||e.origin),u=c?"abcjs-rhythm":"";sr(this.rows,{marginLeft:s,text:e.rhythm,font:"infofont",klass:u,absElemType:"rhythm",noMove:g,info:t.rhythm,name:"rhythm"},h)}var v=!0;e.composer&&typeof e.composer!="string"&&(v=!1),e.origin&&typeof e.origin!="string"&&(v=!1);var m=e.composer?e.composer:"";if(e.origin&&(typeof m=="string"&&typeof e.origin=="string"?m+=" ("+e.origin+")":typeof m=="string"&&typeof e.origin!="string"?(m=[{text:m}],m.push({text:" ("}),m=m.concat(e.origin),m.push({text:")"})):(m.push({text:" ("}),m=m.concat(e.origin),m.push({text:")"}))),m){var u=c?"abcjs-composer":"";kt(this.rows,m,"composerfont",u,"composer",s+a,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},h)}}if(e.author&&e.author.length>0){var u=c?"abcjs-author":"";kt(this.rows,e.author,"composerfont",u,"author",s+a,{anchor:"end",absElemType:"author",info:t.author},h)}if(e.partOrder&&e.partOrder.length>0){var u=c?"abcjs-part-order":"";kt(this.rows,e.partOrder,"partsfont",u,"part-order",s,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},h)}}xo.exports=Fd});var _o=P((g4,To)=>{"use strict";var Tt=nr(),ko=ma();function or(e,t,r,i,a,n,s){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,i,a,n,s),this.extraText(e,i,a,n,s),e.footer&&r&&this.footer(e.footer,t,i,s)}or.prototype.unalignedWords=function(e,t,r,i,a){var n=i?"abcjs-unaligned-words":"",s="wordsfont",o=a.calc("i",s,n);this.rows.push({move:r.words}),ya(this.rows,"",e,t,s,"unalignedWords","unalignedWords",n,"unalignedWords",r,i,a),this.rows.push({move:o.height})};function I0(e,t,r,i,a,n,s){r&&(t&&(typeof r=="string"?r=t+r:r=[{text:t}].concat(r)),a=n?"abcjs-extra-text "+a:"",ko(e,r,"historyfont",a,"description",i,{absElemType:"extraText",anchor:"start"},s))}function ya(e,t,r,i,a,n,s,o,c,h,d,f){if(r){o=d?"abcjs-extra-text "+o:"";var l=f.calc("A",a,o);if(typeof r=="string")t&&(r=t+`
|
|
36
|
+
`+r),Tt(e,{marginLeft:i,text:r,font:a,absElemType:"extraText",name:c,"dominant-baseline":"middle",klass:o},f);else{e.push({startGroup:s,klass:o,name:c}),e.push({move:h.info}),t&&(Tt(e,{marginLeft:i,text:t,font:a,absElemType:"extraText",name:c,"dominant-baseline":"middle"},f),e.push({move:l.height*3/4}));for(var u=0;u<r.length;u++)ko(e,r[u],a,"",c,i,{anchor:"start"},f),u<r.length-1&&typeof r[u]=="string"&&typeof r[u+1]!="string"&&e.push({move:l.height*3/4});e.push({endGroup:s,absElemType:n,startChar:-1,endChar:-1,name:c}),e.push({move:l.height})}}}or.prototype.extraText=function(e,t,r,i,a){I0(this.rows,"Book: ",e.book,t,"abcjs-book",i,a),I0(this.rows,"Source: ",e.source,t,"abcjs-source",i,a),I0(this.rows,"Discography: ",e.discography,t,"abcjs-discography",i,a),ya(this.rows,"Notes:",e.notes,t,"historyfont","extraText","notes","abcjs-notes","description",r,i,a),I0(this.rows,"Transcription: ",e.transcription,t,"abcjs-transcription",i,a),ya(this.rows,"History:",e.history,t,"historyfont","extraText","history","abcjs-history","description",r,i,a),I0(this.rows,"Copyright: ",e["abc-copyright"],t,"abcjs-copyright",i,a),I0(this.rows,"Creator: ",e["abc-creator"],t,"abcjs-creator",i,a),I0(this.rows,"Edited By: ",e["abc-edited-by"],t,"abcjs-edited-by",i,a)};or.prototype.footer=function(e,t,r,i){var a="header meta-bottom",n="footerfont";this.rows.push({startGroup:"footer",klass:a}),Tt(this.rows,{marginLeft:r,text:e.left,font:n,klass:a,name:"footer"},i),Tt(this.rows,{marginLeft:r+t/2,text:e.center,font:n,klass:a,anchor:"middle",name:"footer"},i),Tt(this.rows,{marginLeft:r+t,text:e.right,font:n,klass:a,anchor:"end",name:"footer"},i)};To.exports=or});var xa=P((v4,So)=>{"use strict";function wa(e,t,r,i){if(e.indexOf(t)===0){var a=e.replace(t,""),n=parseInt(a,10);""+n===a&&(r[i]=n)}}function Hd(e,t){var r=[];if(e.absEl.elemset){for(var i={},a=0;a<e.absEl.elemset.length;a++){var n=e.absEl.elemset[a];if(n)for(var s=n.getAttribute("class").split(" "),o=0;o<s.length;o++)i[s[o]]=!0}for(var c=0;c<Object.keys(i).length;c++)r.push(Object.keys(i)[c])}for(var h={},d=0;d<r.length;d++)wa(r[d],"abcjs-v",h,"voice"),wa(r[d],"abcjs-l",h,"line"),wa(r[d],"abcjs-m",h,"measure");e.staffPos&&(h.staffPos=e.staffPos);for(var f=t.target;f&&f.dataset&&!f.dataset.name&&f.tagName.toLowerCase()!=="svg";)f=f.parentNode;for(var l=t.target;l&&l.dataset&&!l.dataset.index&&l.tagName.toLowerCase()!=="svg";)l=l.parentNode;return l&&l.dataset&&(h.name=l.dataset.name,h.clickedName=f.dataset.name,h.parentClasses=l.classList),f&&f.classList&&(h.clickedClasses=f.classList),h.selectableElement=e.svgEl,{classes:r,analysis:h}}So.exports=Hd});var Do=P((b4,qo)=>{"use strict";var cr=Me(),zd=xa();function Rd(e,t){if(e.rangeHighlight=Qd,e.dragging)for(var r=0;r<e.selectables.length;r++){var i=e.selectables[r];i.svgEl.getAttribute("selectable")==="true"&&(i.svgEl.setAttribute("tabindex",0),i.svgEl.setAttribute("data-index",r),i.svgEl.addEventListener("keydown",Wd.bind(e)),i.svgEl.addEventListener("keyup",Xd.bind(e)),i.svgEl.addEventListener("focus",Yd.bind(e)))}for(var a=0;a<t.length;a++)t[a].addEventListener("touchstart",Eo.bind(e),{passive:!0}),t[a].addEventListener("touchmove",Mo.bind(e),{passive:!0}),t[a].addEventListener("touchend",_t.bind(e),{passive:!0}),t[a].addEventListener("mousedown",Eo.bind(e)),t[a].addEventListener("mousemove",Mo.bind(e)),t[a].addEventListener("mouseup",_t.bind(e))}function Gd(e){var t=1,r=1,i=e.target.closest("svg"),a=0;i&&i.viewBox&&i.viewBox.baseVal&&(i.viewBox.baseVal.width!==0&&(t=i.viewBox.baseVal.width/i.clientWidth),i.viewBox.baseVal.height!==0&&(r=i.viewBox.baseVal.height/i.clientHeight),a=i.viewBox.baseVal.y);var n=e.target&&e.target.tagName==="svg",s,o;return n?(s=e.offsetX,o=e.offsetY):(s=e.layerX,o=e.layerY),s=s*t,o=o*r,[s,o+a]}function Yd(e){this.dragMechanism==="keyboard"&&this.dragYStep!==0&&this.dragTarget&&Bo.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragYStep=0}function Wd(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function Xd(e){var t=!1,r=e.target.dataset.index;switch(e.keyCode){case 13:case 32:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",_t.bind(this)(e);break;case 38:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*cr.STEP+")"));break;case 40:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*cr.STEP+")"));break;case 9:this.dragYStep!==0&&_t.bind(this)(e);break;default:break}t&&e.preventDefault()}function Ud(e,t){if(!t)return-1;var r=t.dataset;if(!r)return-1;for(var i=r.index,a=0;a<e.length;a++){var n=e[a].svgEl.dataset;if(n&&i===n.index)return a}return-1}function jd(e,t,r){for(var i=9999999,a=-1,n=0;n<e.selectables.length&&i>0;n++){var s=e.selectables[n];if(e.getDim(s),s.dim.left<t&&s.dim.right>t&&s.dim.top<r&&s.dim.bottom>r)a=n,i=0;else if(s.dim.top<r&&s.dim.bottom>r){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));o<i&&(i=o,a=n)}else if(s.dim.left<t&&s.dim.right>t){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));c<i&&(i=c,a=n)}else{var h=Math.abs(t-s.dim.left)>Math.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),d=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),f=Math.sqrt(h*h+d*d);f<i&&(i=f,a=n)}}return a>=0&&i<=12?a:-1}function Vd(e,t,r){if(e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY)return[t.offsetX,t.offsetY];var i=Math.abs(t.layerY/r-t.offsetY);return i<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}function Kd(e){if(!e)return null;if(e.tagName==="svg")return e;if(!e.getAttribute)return null;for(var t=e.getAttribute("selectable");!t;)e.parentElement?(e=e.parentElement,e.tagName==="svg"?t=!0:t=e.getAttribute("selectable")):t=!0;return e}function Ao(e,t){var r,i,a,n=Ud(e.selectables,Kd(t.target));return n>=0?(a=Vd(e.selectables[n].svgEl.getBBox(),t,e.scale),r=a[0],i=a[1]):(a=Gd(t),r=a[0],i=a[1],n=jd(e,r,i)),{x:r,y:i,clickedOn:n}}function Ca(e){if(!(!e||!e.target||!e.touches||e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,i=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=i,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function Eo(e){var t=e;e.type==="touchstart"&&(Ca(e),e.touches.length>0&&(t=e.touches[0]));var r=Ao(this,t);r.clickedOn>=0&&(e.type==="touchstart"||e.button===0)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(Jd(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function Mo(e){var t=e;if(e.type==="touchmove"&&(Ca(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var r=Ao(this,t),i=Math.round((r.y-this.dragMouseStart.y)/cr.STEP);i!==this.dragYStep&&(this.dragYStep=i,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+i*cr.STEP+")"))}}function _t(e){var t=e;e.type==="touchend"&&this.lastTouchMove&&(Ca(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(No.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),Bo.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),Zd(this.renderer.svg,"abcjs-dragging-in-progress"))}function $d(e){e>=0&&e<this.selectables.length&&(this.dragTarget=this.selectables[e],this.dragIndex=e,this.dragMechanism="keyboard",_t.bind(this)({target:this.dragTarget.svgEl}))}function Bo(e,t,r,i,a){for(var n=zd(e,a),s=n.classes,o=n.analysis,c=0;c<this.listeners.length;c++)this.listeners[c](e.absEl.abcelem,e.absEl.tuneNumber,s.join(" "),o,{step:t,max:r,index:i,setSelection:$d.bind(this)},a)}function No(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function Qd(e,t){No.bind(this)();for(var r=0;r<this.staffgroups.length;r++)for(var i=this.staffgroups[r].voices,a=0;a<i.length;a++)for(var n=i[a].children,s=0;s<n.length;s++){var o=n[s].abcelem.startChar,c=n[s].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=n[s],n[s].highlight(void 0,this.selectionColor))}}function Po(e){var t=e.getAttribute("class");t||(t="");for(var r=t.split(" "),i={},a=0;a<r.length;a++)i[r[a]]=!0;return i}function Lo(e,t){var r=[];for(var i in t)t.hasOwnProperty(i)&&r.push(i);e.setAttribute("class",r.join(" "))}function Jd(e,t){if(e){var r=Po(e.svg);r[t]=!0,Lo(e.svg,r)}}function Zd(e,t){if(e){var r=Po(e.svg);delete r[t],Lo(e.svg,r)}}qo.exports=Rd});var lr=P((m4,Io)=>{"use strict";function e2(e,t,r,i,a){return t+(i-t)/(r-e)*(a-e)}Io.exports=e2});var Ro=P((y4,zo)=>{"use strict";var t2=e0(),ka=Me(),Ta=lr(),r2=function(e){if(!(e.elems.length===0||e.allrests)){var t=i2(e.stemsUp,e.isgrace),r=e.elems[0],i=e.elems[e.elems.length-1],a=0,n=e.stemsUp?r.abcelem.maxpitch:r.abcelem.minpitch;a=Fo(r,e.stemsUp,n,a),a=Fo(i,e.stemsUp,n,a),a=Math.max(e.stemHeight,a+3);var s=n2(e.average,e.elems.length,a,e.stemsUp,r.abcelem.averagepitch,i.abcelem.averagepitch,e.isflat,e.min,e.max,e.isgrace),o=Ho(e.stemsUp,r,i);e.addBeam({startX:o[0],endX:o[1],startY:s[0],endY:s[1],dy:t});for(var c=l2(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),h=0;h<c.length;h++)e.addBeam(c[h]);s2(e.elems,e.stemsUp,e.beams[0],t,e.mainNote)}},Oo=function(e){return e===void 0?0:Math.floor(Math.log(e)/Math.log(2))};function Fo(e,t,r,i){if(!e.children)return i;for(var a=0;a<e.children.length;a++){var n=e.children[a];t&&n.top!==void 0&&n.c==="flags.ugrace"?i=Math.max(i,n.top-r):!t&&n.bottom!==void 0&&n.c==="flags.ugrace"&&(i=Math.max(i,r-n.bottom+7))}return i}function a2(e,t,r,i){if(i)return 0;var a=e-t,n=r/2;return a>n&&(a=n),a<-n&&(a=-n),a}function i2(e,t){var r=e?ka.STEP:-ka.STEP;return t&&(r=r*.4),r}function Ho(e,t,r){var i=t.heads[e?0:t.heads.length-1],a=r.heads[e?0:r.heads.length-1],n=i.x;e&&(n+=i.w-.6);var s=a.x;return s+=e?a.w:.6,[n,s]}function n2(e,t,r,i,a,n,s,o,c,h){var d=r-2,f=r-2,l=Math.round(i?Math.max(e+d,c+f):Math.min(e-d,o-f)),u=a2(a,n,t,s),p=l+Math.floor(u/2),g=l+Math.floor(-u/2);return h||(i&&l<6||!i&&l>6)&&(p=6,g=6),[p,g]}function s2(e,t,r,i,a){for(var n=0;n<e.length;n++){var s=e[n];if(!s.abcelem.rest){var o=!s.addExtra,c=o?a:s,h=s.heads[t?0:s.heads.length-1],d=1/5,f=h.pitch+(t?d:-d),l=t?h.w:0;o||(l+=h.dx);var u=h.x+l,p=Ta(r.startX,r.startY,r.endX,r.endY,u),g=t?-.6:.6;t||(p-=i/2/ka.STEP),o&&(l+=s.heads[0].dx),h.c==="noteheads.slash.quarter"&&(t?f+=1:f-=1);var v=new t2(null,l,0,f,{type:"stem",pitch2:p,linewidth:g});v.setX(c.x),c.addRight(v)}}}function o2(e,t){for(var r=t+1;r<e.length;r++)if(!e[r].abcelem.rest)return r;return-1}function c2(e,t){for(var r=t-1;r>=0;r--)if(!e[r].abcelem.rest)return r;return-1}function l2(e,t,r,i,a){for(var n=[],s=[],o=0;o<e.length;o++){var c=e[o];if(!c.abcelem.rest){var h=c.heads[t?0:c.heads.length-1],d=h.x+(t?h.w:0),f=Ta(r.startX,r.startY,r.endX,r.endY,d),l=t?-1.5:1.5;i&&(l=l*2/3);var u=c.abcelem.duration;u===0&&(u=.25);for(var p=Oo(u);p<-3;p++){var g=-4-p;if(s[g]?s[g].single=!1:s[g]={x:d+(t?-.6:0),y:f+l*(g+1),durlog:p,single:!0},o>0&&c.abcelem.beambr&&c.abcelem.beambr<=g+1){s[g].split||(s[g].split=[s[g].x]);var v=Ho(t,e[o-1],c);s[g].split[s[g].split.length-1]>=v[0]&&(v[0]+=c.w),s[g].split.push(v[0]),s[g].split.push(v[1])}}for(var m=s.length-1;m>=0;m--){var y=o2(e,o),k=y===-1||y<e.length&&Oo(e[y].abcelem.duration)>-m-4;if(k){var b=d,w=f+l*(m+1);if(s[m].single){var C=c2(e,o),B=C===-1,L=y===-1;if(B)b=d+5;else if(L)b=d-5;else{var N=e[C].abcelem.duration,_=e[y].abcelem.duration;N===_?b=o%2===0?d+5:d-5:b=N<_?d+5:d-5}w=Ta(r.startX,r.startY,r.endX,r.endY,b)+l*(m+1)}var F={startX:s[m].x,endX:b,startY:s[m].y,endY:w,dy:a};if(s[m].split!==void 0){var q=s[m].split;F.endX<=q[q.length-1]&&(q[q.length-1]-=c.w),q.push(F.endX),F.split=s[m].split}n.push(F),s=s.slice(0,m)}}}}return n}zo.exports=r2});var Yo=P((w4,Go)=>{"use strict";var h2=lr();function f2(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(e.hasBeam&&(t.elems[0]!==e.anchor1.parent||t.elems[t.elems.length-1]!==e.anchor2.parent)&&(e.hasBeam=!1),e.hasBeam){var r=_a(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=d2(r,e.anchor2.x,t),e.yTextPos+=_a(t)?3:-2,e.xTextPos=p2(r,e.anchor2.x),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,_a(t)&&(e.endingHeightAbove=4)}else{var i=u2(e);if(e.up=i,e.startNote=i?Math.max(e.anchor1.parent.top,9)+4:Math.min(e.anchor1.parent.bottom,0)-2,e.endNote=i?Math.max(e.anchor2.parent.top,9)+4:Math.min(e.anchor2.parent.bottom,0)-2,e.anchor1.parent.type==="rest"&&e.anchor2.parent.type!=="rest"?e.startNote=e.endNote:e.anchor2.parent.type==="rest"&&e.anchor1.parent.type!=="rest"&&(e.endNote=e.startNote),i){for(var a=0,n=0;n<e.middleElems.length;n++)a=Math.max(a,e.middleElems[n].top);a+=4,(a>e.startNote||a>e.endNote)&&(e.startNote=a+3,e.endNote=a+3)}else{for(var s=0,n=0;n<e.middleElems.length;n++)s=Math.min(s,e.middleElems[n].bottom-e.middleElems[n].height);s-=3,s<e.startNote&&s<e.endNote&&(e.startNote=Math.min(s,e.startNote)-2,e.endNote=Math.min(s,e.endNote)-2)}e.flatBeams&&(i?(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)):(e.startNote=Math.min(e.startNote,e.endNote),e.endNote=Math.min(e.startNote,e.endNote))),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1,e.bottom=e.yTextPos-2}}delete e.middleElems,delete e.flatBeams}function _a(e){return e.stemsUp}function u2(e){var t=0,r=0;if(e.anchor1&&(e.anchor1.stemDir==="up"&&t++,e.anchor1.stemDir==="down"&&r++),e.anchor2&&(e.anchor2.stemDir==="up"&&t++,e.anchor2.stemDir==="down"&&r++),e.middleElems)for(var i=0;i<e.middleElems.length;i++){var a=e.middleElems[i];a.stemDir==="up"&&t++,a.stemDir==="down"&&r++}return t>=r}function d2(e,t,r){if(r.beams.length===0)return 0;r=r.beams[0];var i=e+(t-e)/2;return h2(r.startX,r.startY,r.endX,r.endY,i)}function p2(e,t){return e+(t-e)/2}Go.exports=f2});var Uo=P((x4,Xo)=>{"use strict";var g2=Ro(),v2=lr(),b2=Yo(),m2=function(e){for(var t=0;t<e.beams.length;t++)if(e.beams[t].type==="BeamElem"){g2(e.beams[t]),y2(e.beams[t]);for(var r=0;r<e.beams[t].elems.length;r++)e.adjustRange(e.beams[t].elems[r])}for(e.staff.specialY.chordLines=w2(e.children),t=0;t<e.otherchildren.length;t++){var i=e.otherchildren[t];i.type==="TripletElem"&&(b2(i),e.adjustRange(i))}e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom)};function y2(e){for(var t=1.5,r=0;r<e.elems.length;r++){var i=e.elems[r];if(i.top)for(var a=k2(i,e),n=0;n<i.children.length;n++){var s=i.children[n];if(s.klass==="ornament"&&s.position!=="below"&&s.bottom-t<a){var o=a-s.bottom+t;s.bottom+=o,s.top+=o,s.pitch+=o,a=i.top=s.top}}}}function Wo(e,t){var r=t.getChordDim();if(r){for(var i=0;i<e.length;i++){var a=e[i]<r.left;if(a){i>0&&t.putChordInLane(i),e[i]=r.right;return}}e.push(r.right),t.putChordInLane(e.length-1)}}function w2(e){var t=[0],r=[0],i,a,n;for(i=0;i<e.length;i++){for(a=0;a<e[i].children.length;a++)n=e[i].children[a],n.chordHeightAbove&&Wo(t,n);for(a=e[i].children.length-1;a>=0;a--)n=e[i].children[a],n.chordHeightBelow&&Wo(r,n)}return(t.length>1||r.length>1)&&C2(e,t.length,r.length),{above:t.length,below:r.length}}function x2(e){for(var t=0,r=0;r<e.children.length;r++){var i=e.children[r];i.chordHeightBelow&&t++}return t}function C2(e,t,r){for(var i=0;i<e.length;i++)for(var a=x2(e[i]),n=0;n<e[i].children.length;n++){var s=e[i].children[n];s.chordHeightAbove&&s.invertLane(t)}}function k2(e,t){return t=t.beams[0],v2(t.startX,t.startY,t.endX,t.endY,e.x)}Xo.exports=m2});var Vo=P((C4,jo)=>{"use strict";var J0=Me(),T2=function(e,t){for(var r,i=0;i<t.staffs.length;i++){var a=t.staffs[i],n={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(e.showDebug&&e.showDebug.indexOf("box")>=0&&(a.originalTop=a.top,a.originalBottom=a.bottom),Q0(a,n,"lyricHeightAbove"),Q0(a,n,"chordHeightAbove",a.specialY.chordLines.above),a.specialY.endingHeightAbove&&(a.specialY.chordHeightAbove?a.top+=2:a.top+=a.specialY.endingHeightAbove+S0,n.endingHeightAbove=a.top),a.specialY.dynamicHeightAbove&&a.specialY.volumeHeightAbove?(a.top+=Math.max(a.specialY.dynamicHeightAbove,a.specialY.volumeHeightAbove)+S0,n.dynamicHeightAbove=a.top,n.volumeHeightAbove=a.top):(Q0(a,n,"dynamicHeightAbove"),Q0(a,n,"volumeHeightAbove")),Q0(a,n,"partHeightAbove"),Q0(a,n,"tempoHeightAbove"),a.specialY.lyricHeightBelow&&(a.specialY.lyricHeightBelow+=e.spacing.vocal/J0.STEP,n.lyricHeightBelow=a.bottom,a.bottom-=a.specialY.lyricHeightBelow+S0),a.specialY.chordHeightBelow){n.chordHeightBelow=a.bottom;var s=a.specialY.chordHeightBelow;a.specialY.chordLines.below&&(s*=a.specialY.chordLines.below),a.bottom-=s+S0}a.specialY.volumeHeightBelow&&a.specialY.dynamicHeightBelow?(n.volumeHeightBelow=a.bottom,n.dynamicHeightBelow=a.bottom,a.bottom-=Math.max(a.specialY.volumeHeightBelow,a.specialY.dynamicHeightBelow)+S0):a.specialY.volumeHeightBelow?(n.volumeHeightBelow=a.bottom,a.bottom-=a.specialY.volumeHeightBelow+S0):a.specialY.dynamicHeightBelow&&(n.dynamicHeightBelow=a.bottom,a.bottom-=a.specialY.dynamicHeightBelow+S0),e.showDebug&&e.showDebug.indexOf("box")>=0&&(a.positionY=n);for(var o=0;o<a.voices.length;o++){var c=t.voices[a.voices[o]],h=_2(n,c,e.spacing);a.bottom-=h}if(r!==void 0){var d=a.top-10,f=r+d,l=e.spacing.systemStaffSeparation/J0.STEP,u=l-f;u>0&&(a.top+=u)}a.top+=e.spacing.staffTopMargin/J0.STEP,r=2-a.bottom}},S0=1;function Q0(e,t,r,i){if(e.specialY[r]){var a=e.specialY[r];i&&(a*=i),e.top+=a+S0,t[r]=e.top}}function _2(e,t,r){var i,a,n=0;for(i=0;i<t.children.length;i++){a=t.children[i];var s=S2(e,a,r);s<a.bottom&&(n=a.bottom-s,a.bottom=s,t.bottom=s)}for(i=0;i<t.otherchildren.length;i++)switch(a=t.otherchildren[i],a.type){case"CrescendoElem":E2(e,a);break;case"DynamicDecoration":M2(e,a);break;case"EndingElem":A2(e,a);break;case"TieElem":var o=a.getYBounds();t.staff.top=Math.max(t.staff.top,o[0]),t.staff.top=Math.max(t.staff.top,o[1]),t.staff.bottom=Math.min(t.staff.bottom,o[0]),t.staff.bottom=Math.min(t.staff.bottom,o[1]);break}return n}function S2(e,t,r){for(var i=t.bottom,a=0;a<t.children.length;a++){var n=t.children[a];for(var s in t.specialY)t.specialY.hasOwnProperty(s)&&n[s]&&(n.pitch=e[s],s==="lyricHeightBelow"&&n.type==="lyric"&&n.voiceNumber&&(n.pitch-=n.voiceNumber*n[s],i=Math.min(t.bottom,n.pitch)),n.top===void 0&&(n.type==="TempoElement"?B2(e,n):N2(e,n,r),t.pushTop(n.top),t.pushBottom(n.bottom)))}return i}function E2(e,t){t.dynamicHeightAbove?t.pitch=e.dynamicHeightAbove:t.pitch=e.dynamicHeightBelow}function M2(e,t){t.volumeHeightAbove?t.pitch=e.volumeHeightAbove:t.pitch=e.volumeHeightBelow}function A2(e,t){t.pitch=e.endingHeightAbove-2}function B2(e,t){if(t.pitch=e.tempoHeightAbove,t.top=e.tempoHeightAbove,t.bottom=e.tempoHeightAbove,t.note){var r=t.pitch-t.totalHeightInPitches+1;t.note.top=r,t.note.bottom=r;for(var i=0;i<t.note.children.length;i++){var a=t.note.children[i];a.top+=r,a.bottom+=r,a.pitch+=r,a.pitch2!==void 0&&(a.pitch2+=r)}}}function N2(e,t,r){switch(t.type){case"part":t.top=e.partHeightAbove+t.height,t.bottom=e.partHeightAbove;break;case"text":case"chord":t.chordHeightAbove?(t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove):(t.top=e.chordHeightBelow,t.bottom=e.chordHeightBelow);break;case"lyric":t.lyricHeightAbove?(t.top=e.lyricHeightAbove,t.bottom=e.lyricHeightAbove):(t.top=e.lyricHeightBelow+r.vocal/J0.STEP,t.bottom=e.lyricHeightBelow+r.vocal/J0.STEP,t.pitch-=r.vocal/J0.STEP);break;case"debug":t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove;break}(t.pitch===void 0||t.top===void 0)&&console.error("RelativeElement position not set.",t.type,t.pitch,t.top,e)}jo.exports=T2});var $o=P((k4,Ko)=>{"use strict";var b0=function(){};b0.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0};b0.layoutEnded=function(e){return e.i>=e.children.length};b0.getNextX=function(e){return Math.max(e.minx,e.nextx)};b0.getSpacingUnits=function(e){return Math.sqrt(e.spacingduration*8)};b0.layoutOneItem=function(e,t,r,i,a){var n=r.children[r.i];if(!n)return 0;var s=e-r.minx,o=r.durationindex+n.duration>0?i:0;if(n.abcelem.el_type==="note"&&!n.abcelem.rest&&r.voicenumber!==0&&a){var c=a.children[a.i],h=c&&(n.abcelem.maxpitch<=c.abcelem.maxpitch+1&&n.abcelem.maxpitch>=c.abcelem.minpitch-1||n.abcelem.minpitch<=c.abcelem.maxpitch+1&&n.abcelem.minpitch>=c.abcelem.minpitch-1);if(h&&n.abcelem.minpitch===c.abcelem.minpitch&&n.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&n.heads&&n.heads.length>0&&c.heads[0].c===n.heads[0].c&&(h=!1),h){var d=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;n.adjustedWidth||(n.adjustedWidth=d+n.w),n.w=n.adjustedWidth;for(var f=0;f<n.children.length;f++){var l=n.children[f];l.name.indexOf("accidental")<0&&(l.adjustedWidth||(l.adjustedWidth=l.dx+d),l.dx=l.adjustedWidth)}}}var u=P2(n,o);return s<u&&(r.i===0||n.type!=="bar"||r.children[r.i-1].type!=="part"&&r.children[r.i-1].type!=="tempo")&&(e+=u-s),n.setX(e),r.spacingduration=n.duration,r.minx=e+L2(n),r.i!==r.children.length-1&&(r.minx+=n.minspacing),this.updateNextX(e,t,r),e};b0.shiftRight=function(e,t){var r=t.children[t.i];r&&(r.setX(r.x+e),t.minx+=e,t.nextx+=e)};b0.updateNextX=function(e,t,r){r.nextx=e+t*this.getSpacingUnits(r)};b0.updateIndices=function(e){this.layoutEnded(e)||(e.durationindex+=e.children[e.i].duration,e.children[e.i].type==="bar"&&(e.durationindex=Math.round(e.durationindex*64)/64),e.i++)};function P2(e,t){var r=0;return(e.type==="note"||e.type==="bar")&&(r=t),-e.extraw+r}function L2(e){return e.w}Ko.exports=b0});var Jo=P((T4,Qo)=>{"use strict";var Fe=$o();function q2(e){for(var t=0,r=0;r<e.length;r++){var i=e[r];if(i.children.length>0){var a=i.children.length-1,n=i.children[a];if(n.abcelem.el_type==="bar"){var s=n.children[0].x;s>t?t=s:n.children[0].x=t}}}}var D2=function(e,t,r,i,a){var n=1e-7,s=0,o=1e3,c=a;i.startx=c;var h,d=0;for(r&&console.log("init layout",e),h=0;h<i.voices.length;h++)Fe.beginLayout(c,i.voices[h]);for(var f=0;!I2(i.voices);){for(d=null,h=0;h<i.voices.length;h++)!Fe.layoutEnded(i.voices[h])&&(!d||Sa(i.voices[h])<d)&&(d=Sa(i.voices[h]));var l=[],u=[];for(h=0;h<i.voices.length;h++){var p=Sa(i.voices[h]);p-d>n?u.push(i.voices[h]):l.push(i.voices[h])}f=0;var g=0;for(h=0;h<l.length;h++)Fe.getNextX(l[h])>c&&(c=Fe.getNextX(l[h]),f=Fe.getSpacingUnits(l[h]),g=l[h].spacingduration);s+=f,o=Math.min(o,f),r&&console.log("currentduration: ",d,s,o);var v=void 0;for(h=0;h<l.length;h++){var m=l[h];m.voicenumber===0&&(v=h);var y=v!==void 0&&l[v].voicenumber!==m.voicenumber?l[v]:void 0;O2(m,y)||(y=void 0);var k=Fe.layoutOneItem(c,e,m,t,y),b=k-c;if(b>0){c=k;for(var w=0;w<h;w++)Fe.shiftRight(b,l[w])}}for(h=0;h<u.length;h++)u[h].spacingduration-=g,Fe.updateNextX(c,e,u[h]);for(h=0;h<l.length;h++){var C=l[h];Fe.updateIndices(C)}}for(h=0;h<i.voices.length;h++)Fe.getNextX(i.voices[h])>c&&(c=Fe.getNextX(i.voices[h]),f=Fe.getSpacingUnits(i.voices[h]));return q2(i.voices),s+=f,i.setWidth(c),{spacingUnits:s,minSpace:o}};function I2(e){for(var t=0;t<e.length;t++)if(!Fe.layoutEnded(e[t]))return!1;return!0}function Sa(e){return e.durationindex-(e.children[e.i]&&e.children[e.i].duration>0?0:5e-7)}function O2(e,t){return!e||!e.staff||!e.staff.voices||e.staff.voices.length===0||!t||!t.staff||!t.staff.voices||t.staff.voices.length===0?!1:e.staff.voices[0]===t.staff.voices[0]}Qo.exports=D2});var Ea=P((_4,tc)=>{"use strict";function F2(e,t,r,i,a){var n=e.padding.left,s=0,o,c;for(o=0;o<r.length;o++)r[o].header&&(c=t.calc(r[o].header,"voicefont",""),s=Math.max(s,c.width));if(s=Zo(s,i,t),s=Zo(s,a,t),s){var h=t.calc("A","voicefont","");s+=h.width}n+=s;var d=0;return d=ec(i,n,d),d=ec(a,n,d),n+d}function Zo(e,t,r){if(t){for(var i=0;i<t.length;i++)if(t[i].header){var a=r.calc(t[i].header,"voicefont","");e=Math.max(e,a.width)}}return e}function ec(e,t,r){if(e)for(var i=0;i<e.length;i++)H2(t,e[i]),r=Math.max(r,e[i].getWidth());return r}function H2(e,t){t.x=e}tc.exports=F2});var ac=P((S4,rc)=>{"use strict";var z2=Ea();function R2(e,t,r){var i=z2(e,t.getTextSize,t.voices,t.brace,t.bracket),a=G2(t,r.minPadding),n=a.totalDuration,s=a.minSpacing,o=s*n;r.minWidth&&(o=Math.max(o,r.minWidth));var c=r.minPadding?r.minPadding/2:2;t.startx=i,t.w=o+i;for(var h=0;h<t.voices.length;h++){var d=t.voices[h];d.startx=i,d.w=o+i;for(var f=i,l=!1,u=0,p=0;p<d.children.length;p++){var g=d.children[p];l||(g.duration!==0?(l=!0,u=(o+i-f)/n,t.gridStart=f):(g.x=f,f+=g.w+g.minspacing)),l&&(r.align==="center"?g.x=f+g.duration*u/2-g.w/2:g.duration===0?g.x=f+1-g.w:g.x=f+c-g.extraw,f+=g.duration*u);for(var v=0;v<g.children.length;v++){var m=g.children[v],y=m.dx?m.dx:0;m.x=g.x+y}}t.gridEnd=f}return o}function G2(e,t){for(var r=0,i=0,a=0;a<e.voices.length;a++){for(var n=0,s=e.voices[a],o=0;o<s.children.length;o++){var c=s.children[o];if(n+=c.duration,c.duration){var h=(c.w+t)/c.duration;r=Math.max(r,h)}}i=Math.max(i,n)}return{totalDuration:i,minSpacing:r}}rc.exports=R2});var nc=P((E4,ic)=>{"use strict";function Y2(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=i.staffGroup,n=[];if(a&&a&&a.staffs)for(var s=0;s<a.staffs.length;s++){for(var o=a.staffs[s],c={},h=0;h<o.voices.length;h++)for(var d=a.voices[o.voices[h]],f=0,l=0;l<d.children.length;l++){var u="T"+Math.round(f*1e3);c[u]||(c[u]=[]),d.children[l].abcelem.el_type==="note"&&(c[u].push(d.children[l]),f+=d.children[l].duration)}n.push(c)}t.push(n)}return t}ic.exports=Y2});var oc=P((M4,sc)=>{"use strict";var W2=Uo(),X2=Vo(),U2=Jo(),j2=Ea(),V2=ac(),K2=nc(),$2=function(e,t,r,i,a,n){var s,o,c=r;for(s=0;s<t.lines.length;s++)if(o=t.lines[s],o.staff){var h;n!==void 0?h=V2(e,o.staffGroup,n):h=Q2(e,c,i,o.staffGroup,t.formatting,s===t.lines.length-1,!1),Math.round(h)>Math.round(c)&&(c=h,a&&(s=-1))}for(s=0;s<t.lines.length;s++)if(o=t.lines[s],o.staffGroup&&o.staffGroup.voices){for(var d=0;d<o.staffGroup.voices.length;d++)W2(o.staffGroup.voices[d]);X2(e,o.staffGroup)}var f=K2(t.lines);for(s=0;s<t.lines.length;s++)o=t.lines[s],o.staffGroup&&e3(f[s]);for(s=0;s<t.lines.length;s++)o=t.lines[s],o.staffGroup&&o.staffGroup.setHeight();return c},Q2=function(e,t,r,i,a,n,s){for(var o=j2(e,i.getTextSize,i.voices,i.brace,i.bracket),c=r,h=0;h<8;h++){var d=U2(c,e.minPadding,s,i,o);if(c=J2(n,a.stretchlast,t+e.padding.left,i.w,c,d.spacingUnits,d.minSpace,e.padding.left+e.padding.right),s&&console.log("setXSpace",h,i.w,c,i.minspace),c===null)break}return Z2(i.voices),i.w-o};function J2(e,t,r,i,a,n,s,o){if(e)if(t===void 0){if(i/r<.66)return null}else{var c=1-(i+o)/r,h=c<t;if(!h)return null}if(Math.abs(r-i)<2)return null;var d=n*a,f=i-d;return n>0?(a=(r-f)/n,a*s>50&&(a=50/s),a):null}function Z2(e){for(var t=0;t<e.length;t++)for(var r=e[t],i=1;i<r.children.length-1;i++){var a=r.children[i];if(a.abcelem.rest&&(a.abcelem.rest.type==="whole"||a.abcelem.rest.type==="multimeasure")){var n=r.children[i-1],s=r.children[i+1];a.center(n,s)}}}function e3(e){for(var t=0;t<e.length;t++)for(var r=e[t],i=Object.keys(r),a=0;a<i.length;a++){var n=r[i[a]],s=n.length-1;if(n.length>1){var o=n[0].abcelem.rest&&n[0].abcelem.rest.type==="rest",c=n[s].abcelem.rest&&n[s].abcelem.rest.type==="rest";if(o&&!n[s].abcelem.rest){var h=n[0].children.find(function(p){return p.name.includes("rest")}),d=t3(n[s]);if(h){var f=h.bottom-d;f-=2,f<0&&n[0].children.length>0&&(n[0].bottom-=f,n[0].top-=f,n[0].children[0].bottom-=f,n[0].children[0].top-=f,n[0].children[0].pitch-=f)}}else if(c&&!n[0].abcelem.rest){var l=n[s].children.find(function(p){return p.name.includes("rest")});if(l){var u=l.top-r3(n[0]);u+=2,u>0&&n[s].children.length>0&&(n[s].bottom-=u,n[s].top-=u,n[s].children[0].bottom-=u,n[s].children[0].top-=u,n[s].children[0].pitch-=u)}}}}}function t3(e){if(e.children){for(var t=-90,r=0;r<e.children.length;r++){var i=e.children[r];i.type!=="chord"&&(t=Math.max(t,i.top))}if(t>-90)return t}return e.top}function r3(e){if(e.children){for(var t=90,r=0;r<e.children.length;r++){var i=e.children[r];i.type!=="lyric"&&(t=Math.min(t,i.bottom))}if(t<90)return t}return e.bottom}sc.exports=$2});var lc=P((A4,cc)=>{"use strict";var Ye=function(t){this.shouldAddClasses=t.shouldAddClasses,this.reset()};Ye.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null};Ye.prototype.incrLine=function(){this.lineNumber===null?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null};Ye.prototype.incrVoice=function(){this.voiceNumber===null?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null};Ye.prototype.isInMeasure=function(){return this.measureNumber!==null};Ye.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null};Ye.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0};Ye.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0};Ye.prototype.incrNote=function(){this.noteNumber++};Ye.prototype.measureTotal=function(){for(var e=0,t=0;t<this.lineNumber;t++)e+=this.measureTotalPerLine[t]?this.measureTotalPerLine[t]:0;return this.measureNumber&&(e+=this.measureNumber),e};Ye.prototype.getCurrent=function(e){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}};Ye.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),e==="abcjs-tab-number")return t.join(" ");if(e==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&t.push("l"+this.lineNumber),this.measureNumber!==null&&t.push("m"+this.measureNumber),this.measureNumber!==null&&t.push("mm"+this.measureTotal()),this.voiceNumber!==null&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&this.noteNumber!==null&&t.push("n"+this.noteNumber),t.length>0){t=t.join(" "),t=t.split(" ");for(var r=0;r<t.length;r++)t[r].indexOf("abcjs-")!==0&&t[r].length>0&&(t[r]="abcjs-"+t[r])}return t.join(" ")};cc.exports=Ye});var fc=P((B4,hc)=>{"use strict";var hr=function(t,r){this.formatting=t,this.classes=r};hr.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)};hr.prototype.getFamily=function(e){return e[0]==='"'&&e[e.length-1]==='"'?e.substring(1,e.length-1):e};hr.prototype.calc=function(e,t){var r;typeof e=="string"?(r=this.formatting[e],r?r={face:r.face,size:Math.round(r.size*4/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:r={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):r={face:e.face,size:Math.round(e.size*4/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var i=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;r.padding=r.size*i;var a={"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)};return{font:r,attr:a}};hc.exports=hr});var dc=P((N4,uc)=>{"use strict";var Z0=function(t,r){this.getFontAndAttr=t,this.svg=r};Z0.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)};Z0.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)};Z0.prototype.getFamily=function(e){return e[0]==='"'&&e[e.length-1]==='"'?e.substring(1,e.length-1):e};Z0.prototype.calc=function(e,t,r,i){var a;typeof t=="string"?a=this.attr(t,r):a={font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var n=this.svg.getTextSize(e,a.attr,i);return a.font.box?{height:n.height+a.font.padding*4,width:n.width+a.font.padding*4}:n};Z0.prototype.baselineToCenter=function(e,t,r,i,a){var n=this.calc(e,t,r).height,s=this.attr(t,r).font.size;return n*.5+(a-i-2)*s};uc.exports=Z0});var E0=P((P4,pc)=>{"use strict";var a3=function(){for(var e=0,t,r=arguments[e++],i=[],a,n,s,o;r;){if(a=/^[^\x25]+/.exec(r))i.push(a[0]);else if(a=/^\x25{2}/.exec(r))i.push("%");else if(a=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(r)){if((t=arguments[a[1]||e++])==null||t==null)throw"Too few arguments.";if(/[^s]/.test(a[7])&&typeof t!="number")throw"Expecting number but found "+typeof t;switch(a[7]){case"b":t=t.toString(2);break;case"c":t=String.fromCharCode(t);break;case"d":t=parseInt(t);break;case"e":t=a[6]?t.toExponential(a[6]):t.toExponential();break;case"f":t=a[6]?parseFloat(t).toFixed(a[6]):parseFloat(t);break;case"o":t=t.toString(8);break;case"s":t=(t=String(t))&&a[6]?t.substring(0,a[6]):t;break;case"u":t=Math.abs(t);break;case"x":t=t.toString(16);break;case"X":t=t.toString(16).toUpperCase();break}t=/[def]/.test(a[7])&&a[2]&&t>0?"+"+t:t,s=a[3]?a[3]=="0"?"0":a[3][1]:" ",o=a[5]-String(t).length,n=a[5]?str_repeat(s,o):"",i.push(a[4]?t+n:n+t)}else throw"Huh ?!";r=r.substring(a[0].length)}return i.join("")};pc.exports=a3});var n0=P((L4,gc)=>{"use strict";function i3(e){return parseFloat(e.toFixed(2))}gc.exports=i3});var m0=P((q4,bc)=>{"use strict";var vc=n0();function n3(e,t,r){var i=t.y;if(t.phrases){var o=e.paper.richTextLine(t.phrases,t.x,t.y,t.klass,t.anchor);return o}if(t.lane){var a=t.dim.font.size*.25;i+=(t.dim.font.size+a)*t.lane}var n;t.dim?(n=t.dim,n.attr.class=t.klass):n=e.controller.getFontAndAttr.calc(t.type,t.klass),t.anchor&&(n.attr["text-anchor"]=t.anchor),t["dominant-baseline"]&&(n.attr["dominant-baseline"]=t["dominant-baseline"]),n.attr.x=t.x,n.attr.y=i,t.centerVertically||(n.attr.y+=n.font.size),t.type==="debugfont"&&(console.log("Debug msg: "+t.text),n.attr.stroke="#ff0000"),t.cursor&&(n.attr.cursor=t.cursor);var s;t.name==="free-text"?s=t.text.replace(/^[ \t]*\n/gm,`
|
|
37
|
+
`):s=t.text.replace(/\n\n/g,`
|
|
38
|
+
|
|
39
|
+
`),s=s.replace(/^\n/,`\xA0
|
|
40
|
+
`),n.font.box&&(r||e.paper.openGroup({klass:n.attr.class,fill:e.foregroundColor,"data-name":t.name}),n.attr["text-anchor"]==="end"?n.attr.x-=n.font.padding:n.attr["text-anchor"]==="start"&&(n.attr.x+=n.font.padding),n.attr.y+=n.font.padding,delete n.attr.class),t.noClass&&delete n.attr.class,n.attr.x=vc(n.attr.x),n.attr.y=vc(n.attr.y),t.name&&(n.attr["data-name"]=t.name);var o=e.paper.text(s,n.attr);if(n.font.box){var c=o.getBBox(),h=0;n.attr["text-anchor"]==="middle"?h=c.width/2+n.font.padding:n.attr["text-anchor"]==="end"&&(h=c.width+n.font.padding*2);var d=0;t.centerVertically&&(d=c.height-n.font.padding),e.paper.rect({"data-name":"box",x:Math.round(t.x-h),y:Math.round(i-d),width:Math.round(c.width+n.font.padding*2),height:Math.round(c.height+n.font.padding*2)}),r||(o=e.paper.closeGroup())}return o}bc.exports=n3});var wc=P((D4,yc)=>{"use strict";var fr=E0(),s0=Me(),s3=m0();function o3(e,t,r){var i=t.startVoice.staff.absoluteY-s0.STEP*10;return t.endVoice&&t.endVoice.staff?t.endY=t.endVoice.staff.absoluteY-s0.STEP*2:t.lastContinuedVoice&&t.lastContinuedVoice.staff?t.endY=t.lastContinuedVoice.staff.absoluteY-s0.STEP*2:t.endY=t.startVoice.staff.absoluteY-s0.STEP*2,h3(e,t.x,i,t.endY,t.type,t.header,r)}function c3(e,t,r,i,a){t+=s0.STEP;var n=s0.STEP*.75,s=s0.STEP*.75,o=i-r,c=fr("M %f %f l %f %f l %f %f l %f %f z",t,r-s,0,o+s*2,n,0,0,-(o+s*2)),h=s0.STEP*2,d=s0.STEP;return c+=fr("M %f %f q %f %f %f %f q %f %f %f %f z",t+n,r-s,h*.6,d*.2,h,-d,-h*.1,d*.3,-h,d+s0.STEP),c+=fr("M %f %f q %f %f %f %f q %f %f %f %f z",t+n,r+s+o,h*.6,-d*.2,h,d,-h*.1,-d*.3,-h,-d-s0.STEP),e.paper.path({path:c,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(a),"data-name":a})}function l3(e,t,r,i,a){var n=i-r,s=mc(t,r,[7.5,-8,21,0,18.5,-10.5,7.5],[0,n/5.5,n/3.14,n/2,n/2.93,n/4.88,0]);return s+=mc(t,r,[0,17.5,-7.5,6.6,-5,20,0],[n/2,n/1.46,n/1.22,n,n/1.19,n/1.42,n/2]),e.paper.path({path:s,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(a),"data-name":a})}function mc(e,t,r,i){return fr("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",e+r[0],t+i[0],e+r[1],t+i[1],e+r[2],t+i[2],e+r[3],t+i[3],e+r[4],t+i[4],e+r[5],t+i[5],e+r[6],t+i[6])}var h3=function(e,t,r,i,a,n,s){var o;if(n){e.paper.openGroup({klass:e.controller.classes.generate("staff-extra voice-name"),"data-name":a});var c=r+(i-r)/2;c=c-e.controller.getTextSize.baselineToCenter(n,"voicefont","staff-extra voice-name",0,1),s3(e,{x:e.padding.left,y:c,text:n,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return a==="brace"?o=l3(e,t,r,i,a):a==="bracket"&&(o=c3(e,t,r,i,a)),n&&(o=e.paper.closeGroup()),s.wrapSvgEl({el_type:a,startChar:-1,endChar:-1},o),o};yc.exports=o3});var et=P((I4,xc)=>{"use strict";function f3(e,t,r){var i=e.paper.path(t);return i}xc.exports=f3});var kc=P((O4,Cc)=>{"use strict";var u3=E0(),d3=et(),p3=n0();function g3(e,t,r){(!t.anchor1||!t.anchor2||!t.anchor1.heads||!t.anchor2.heads||t.anchor1.heads.length===0||t.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var i=4,a=e.calcY(t.anchor1.heads[0].pitch),n=e.calcY(t.anchor2.heads[0].pitch),s=t.anchor1.x+t.anchor1.w/2,o=t.anchor2.x+t.anchor2.w/2,c=v3(s,a,o,n),h=t.anchor1.w/2+i,d=t.anchor2.w/2+i,f=b3(s,a,o,n),l=Ma(a,f,h),u=Ma(n,f,-d),p=m3(c-h-d),g=T3(e,s+h,l,p,f);return r.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},g),[g]}function v3(e,t,r,i){var a=r-e,n=i-t;return Math.sqrt(a*a+n*n)}function b3(e,t,r,i){return(i-t)/(r-e)}function Ma(e,t,r){return p3(e+r*t)}function m3(e){var t=5;return Math.max(2,Math.floor((e-t*2)/6))}var y3=[[3.5,-4.8]],w3=[[1.5,-1],[.3,-.3],[-3.5,3.8]],x3=[[-1.5,2]],C3=[[3,4],[3,-4]],k3=[[-3,4],[-3,-4]];function St(e,t){for(var r="",i=0;i<e.length;i++)r+="l"+e[i][0]+" "+Ma(e[i][1],t,e[i][0]);return r}var T3=function(e,t,r,i,a){var n=u3("M %f %f",t,r);n+=St(y3,a);var s;for(s=0;s<i;s++)n+=St(C3,a);for(n+=St(w3,a),s=0;s<i;s++)n+=St(k3,a);return n+=St(x3,a)+"z",d3(e,{path:n,highlight:"stroke",stroke:e.foregroundColor,class:e.controller.classes.generate("decoration"),"data-name":"glissando"})};Cc.exports=g3});var Sc=P((F4,_c)=>{"use strict";var _3=E0(),S3=et(),tt=n0();function E3(e,t,r){t.pitch===void 0&&window.console.error("Crescendo Element y-coordinate not set.");var i=e.calcY(t.pitch)+4,a=8,n=t.anchor1?t.anchor1.x:0,s=t.anchor2?t.anchor2.x:800,o;return t.dir==="<"?o=Tc(e,i+a/2,i,i+a/2,i+a,n,s):o=Tc(e,i,i+a/2,i+a,i+a/2,n,s),r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},o),[o]}var Tc=function(e,t,r,i,a,n,s){t=tt(t),r=tt(r),i=tt(i),a=tt(a),n=tt(n),s=tt(s);var o=_3("M %f %f L %f %f M %f %f L %f %f",n,t,s,r,n,i,s,a);return S3(e,{path:o,highlight:"stroke",stroke:e.foregroundColor,class:e.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};_c.exports=E3});var ur=P((H4,Mc)=>{"use strict";var Ec=n0();function Et(){this.ingroup=!1}Et.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()};Et.prototype.isInGroup=function(){return this.ingroup};Et.prototype.addPath=function(e){if(e=e||[],e.length!==0){e[0][0]="m",e[0][1]=Ec(e[0][1]-this.lastM[0]),e[0][2]=Ec(e[0][2]-this.lastM[1]),this.lastM[0]+=e[0][1],this.lastM[1]+=e[0][2],this.path.push(e[0]);for(var t=1,r=e.length;t<r;t++)e[t][0]==="m"&&(this.lastM[0]+=e[t][1],this.lastM[1]+=e[t][2]),this.path.push(e[t])}};Et.prototype.endGroup=function(e,t,r){this.ingroup=!1;for(var i="",a=0;a<this.path.length;a++)i+=this.path[a].join(" ");this.path=[];var n=this.paper.closeGroup();if(n){var s=this.controller.classes.generate(e);s&&(r&&(s+=" "+r),n.setAttribute("class",s)),n.setAttribute("fill",this.controller.renderer.foregroundColor),n.setAttribute("stroke","none"),n.setAttribute("data-name",t)}return n};var M3=new Et;Mc.exports=M3});var dr=P((z4,Nc)=>{"use strict";var Ac=m0(),rt=v0(),Bc=ur();function A3(e,t,r,i,a){var n,s;if(!i)return null;if(i.length>1&&i.indexOf(".")<0){var o=Bc.isInGroup()?"":a.klass;e.paper.openGroup({"data-name":a.name,klass:o});for(var c=0,h=0;h<i.length;h++){var d=i[h];s=rt.getYCorr(d),n=rt.printSymbol(t+c,e.calcY(r+s),d,e.paper,{stroke:a.stroke,fill:a.fill}),n?h<i.length-1&&(c+=B3(d,i[h+1],rt.getSymbolWidth(d))):Ac(e,{x:t,y:e.y,text:"no symbol:"+i,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}var f=e.paper.closeGroup();return f}else return s=rt.getYCorr(i),Bc.isInGroup()?n=rt.printSymbol(t,e.calcY(r+s),i,e.paper,{"data-name":a.name}):n=rt.printSymbol(t,e.calcY(r+s),i,e.paper,{klass:a.klass,stroke:a.stroke,fill:a.fill,"data-name":a.name}),n||(Ac(e,{x:t,y:e.y,text:"no symbol:"+i,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}function B3(e,t,r){var i=r;return e==="f"&&t==="f"&&(i=i*2/3),e==="p"&&t==="p"&&(i=i*5/6),e==="f"&&t==="z"&&(i=i*5/8),i}Nc.exports=A3});var Lc=P((R4,Pc)=>{"use strict";var N3=dr();function P3(e,t,r){t.pitch===void 0&&window.console.error("Dynamic Element y-coordinate not set.");var i=1,a=1,n=N3(e,t.anchor.x,t.pitch,t.dec,{scalex:i,scaley:a,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},n),[n]}Pc.exports=P3});var Dc=P((G4,qc)=>{"use strict";var L3=E0(),q3=m0(),D3=et(),pr=n0();function I3(e,t,r){e.paper.openGroup({klass:e.controller.classes.generate("triplet "+t.durationClass),"data-name":"triplet"}),t.hasBeam||O3(e,t.anchor1.x,t.startNote,t.anchor2.x+t.anchor2.w,t.endNote,t.up),q3(e,{x:t.xTextPos,y:e.calcY(t.yTextPos-1),text:""+t.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+t.number},!0);var i=e.paper.closeGroup();return r.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},i),i}function gr(e,t,r,i){return L3("M %f %f L %f %f",pr(e),pr(t),pr(r),pr(i))}function O3(e,t,r,i,a,n){r=e.calcY(r),a=e.calcY(a);var s=n?5:-5,o="";o+=gr(t,r,t,r+s),o+=gr(i,a,i,a+s);var c=t+(i-t)/2,h=8,d=(a-r)/(i-t),f=c-h,l=r+(f-t)*d;o+=gr(t,r,f,l);var u=c+h,p=r+(u-t)*d;o+=gr(u,p,i,a),D3(e,{path:o,stroke:e.foregroundColor,"data-name":"triplet-bracket"})}qc.exports=I3});var Oc=P((Y4,Ic)=>{"use strict";var Aa=E0(),F3=m0(),H3=et(),O0=n0();function z3(e,t,r,i,a){t.pitch===void 0&&window.console.error("Ending Element y-coordinate not set.");var n=O0(e.calcY(t.pitch)),s=20,o="";t.anchor1&&(r=O0(t.anchor1.x+t.anchor1.w),o+=Aa("M %f %f L %f %f ",r,n,r,O0(n+s))),t.anchor2&&(i=O0(t.anchor2.x),o+=Aa("M %f %f L %f %f ",i,n,i,O0(n+s))),o+=Aa("M %f %f L %f %f ",r,n,i,n),e.paper.openGroup({klass:e.controller.classes.generate("ending"),fill:e.foregroundColor,"data-name":"ending"}),H3(e,{path:o,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&F3(e,{x:O0(r+5),y:O0(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var c=e.paper.closeGroup();return a.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},c),[c]}Ic.exports=z3});var zc=P((W4,Hc)=>{"use strict";var Fc=E0(),We=n0();function R3(e,t,r,i,a){G3(t,r,i);var n="";t.anchor1?n+="abcjs-start-m"+t.anchor1.parent.counters.measure+"-n"+t.anchor1.parent.counters.note:n+="abcjs-start-edge",t.anchor2?n+=" abcjs-end-m"+t.anchor2.parent.counters.measure+"-n"+t.anchor2.parent.counters.note:n+=" abcjs-end-edge",t.hint&&(n="abcjs-hint");var s=t.fixedY?1.5:0,o=Y3(e,t.startX,t.endX,t.startY+s,t.endY+s,t.above,n,t.isTie,t.dotted),c=-1;t.anchor1&&!t.isTie&&(c=t.anchor1.parent.abcelem.startChar-1);var h=-1;return t.anchor2&&!t.isTie&&(h=t.anchor2.parent.abcelem.endChar+1),a.wrapSvgEl({el_type:"slur",startChar:c,endChar:h},o),[o]}var G3=function(e,t,r){!e.anchor1||!e.anchor2||e.anchor1.pitch===e.anchor2.pitch&&e.internalNotes.length===0?e.isTie=!0:e.isTie=!1,e.isTie?(e.calcTieDirection(),e.calcX(t,r),e.calcTieY()):(e.calcSlurDirection(),e.calcX(t,r),e.calcSlurY()),e.avoidCollisionAbove()},Y3=function(e,t,r,i,a,n,s,o,c){var h=o?1.2:1.5;t=We(t+6),r=We(r+4),i=i+(n?h:-h),a=a+(n?h:-h);var d=We(e.calcY(i)),f=We(e.calcY(a)),l=r-t,u=f-d,p=Math.sqrt(l*l+u*u),g=l/p,v=u/p,m=p/3.5,y=o?10:25,k=(n?-1:1)*Math.min(y,Math.max(4,m)),b=We(t+m*g-k*v),w=We(d+m*v+k*g),C=We(r-m*g-k*v),B=We(f-m*v+k*g),L=2;s?s+=" slur":s="slur",s+=o?" tie":" legato";var N;if(c){s+=" dotted";var _=Fc("M %f %f C %f %f %f %f %f %f",t,d,b,w,C,B,r,f);N=e.paper.path({path:_,stroke:e.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:e.controller.classes.generate(s),"data-name":o?"tie":"slur"})}else{var F=Fc("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t,d,b,w,C,B,r,f,We(C-L*v),We(B+L*g),We(b-L*v),We(w+L*g),t,d);N=e.paper.path({path:F,stroke:"none",fill:e.foregroundColor,class:e.controller.classes.generate(s),"data-name":o?"tie":"slur"})}return N};Hc.exports=R3});var Wc=P((X4,Yc)=>{"use strict";var W3=et(),at=n0();function X3(e,t){if(t.beams.length!==0){for(var r="",i=0;i<t.beams.length;i++){var a=t.beams[i];if(a.split){for(var n=U3(e,a.startX,a.startY,a.endX,a.endY),s=[],o=0;o<a.split.length;o+=2)s.push([a.split[o],a.split[o+1]]);for(o=0;o<s.length;o++){var c=Gc(a.startX,a.startY,n,s[o][0]),h=Gc(a.startX,a.startY,n,s[o][1]);r+=Rc(e,s[o][0],c,s[o][1],h,a.dy)}}else r+=Rc(e,a.startX,a.startY,a.endX,a.endY,a.dy)}var d=("abcjs-d"+t.duration).replace(/\./g,"-"),f=e.controller.classes.generate("beam-elem "+d),l=W3(e,{path:r,stroke:"none",fill:e.foregroundColor,class:f});return[l]}}function Rc(e,t,r,i,a,n){r=at(e.calcY(r)),a=at(e.calcY(a)),t=at(t),i=at(i);var s=at(r+n),o=at(a+n);return"M"+t+" "+r+" L"+i+" "+a+"L"+i+" "+o+" L"+t+" "+s+"z"}function U3(e,t,r,i,a){return(a-r)/(i-t)}function Gc(e,t,r,i){var a=i-e;return t+a*r}Yc.exports=X3});var vr=P((U4,Xc)=>{"use strict";var j3=ur(),it=n0();function V3(e,t,r,i,a,n,s){if(r<0||i<a){var o=it(a);a=it(i),i=o}else i=it(i),a=it(a);t=it(t);var c=it(t+r);if(e.firefox){t+=r/2;var d={x1:t,x2:t,y1:i,y2:a,stroke:e.foregroundColor,"stroke-width":Math.abs(r)};return n&&(d.class=n),s&&(d["data-name"]=s),e.paper.lineToBack(d)}for(var h=[["M",t,i],["L",t,a],["L",c,a],["L",c,i],["z"]],d={path:""},f=0;f<h.length;f++)d.path+=h[f].join(" ");return n&&(d.class=n),s&&(d["data-name"]=s),j3.isInGroup()||(d.stroke="none",d.fill=e.foregroundColor),e.paper.pathToBack(d)}Xc.exports=V3});var jc=P((j4,Uc)=>{"use strict";var K3=E0(),br=n0();function $3(e,t,r,i,a,n,s){var o=e.foregroundColor;t=br(t),r=br(r);var c=br(i-s),h=br(i+s);if(e.firefox){i+=s/2;var d={x1:t,x2:r,y1:i,y2:i,stroke:e.foregroundColor,"stroke-width":Math.abs(s*2)};return a&&(d.class=a),n&&(d["data-name"]=n),e.paper.lineToBack(d)}var f=K3("M %f %f L %f %f L %f %f L %f %f z",t,c,r,c,r,h,t,h),l={path:f,stroke:"none",fill:o};n&&(l["data-name"]=n),a&&(l.class=a);var u=e.paper.pathToBack(l);return u}Uc.exports=$3});var Ba=P((V4,Vc)=>{"use strict";var Q3=jc();function J3(e,t,r,i,a,n,s){var o=e.calcY(i);return Q3(e,t,r,o,a,n,s)}Vc.exports=J3});var Na=P((K4,$c)=>{"use strict";var y0=m0(),Kc=vr(),Z3=Ba(),ep=dr();function tp(e,t,r){t.pitch===void 0&&window.console.error(t.type+" Relative Element y-coordinate not set.");var i=e.calcY(t.pitch);switch(t.type){case"symbol":if(t.c===null)return null;var a="symbol";t.klass&&(a+=" "+t.klass),t.graphelem=ep(e,t.x,t.pitch,t.c,{scalex:t.scalex,scaley:t.scaley,klass:e.controller.classes.generate(a),name:t.name});break;case"debug":t.graphelem=y0(e,{x:t.x,y:e.calcY(15),text:""+t.c,type:"debugfont",klass:e.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:t.dim},!1);break;case"tabNumber":var n="middle",s="tabnumberfont",o="abcjs-tab-number";t.isGrace&&(s="tabgracefont",i+=2.5,o="tab-grace"),t.graphelem=y0(e,{x:t.x,y:i,text:""+t.c,type:s,klass:e.controller.classes.generate(o),anchor:n,centerVertically:!1,dim:t.dim,cursor:"default"},!1);break;case"barNumber":t.graphelem=y0(e,{x:t.x,y:i,text:""+t.c,type:"measurefont",klass:e.controller.classes.generate("bar-number"),anchor:"middle",dim:t.dim,name:"bar-number"},!0);break;case"lyric":t.graphelem=y0(e,{x:t.x,y:i,text:t.c,type:"vocalfont",klass:e.controller.classes.generate("lyric"),anchor:"middle",dim:t.dim,name:"lyric"},!1);break;case"chord":t.graphelem=y0(e,{x:t.x,y:i,text:t.c,type:"gchordfont",klass:e.controller.classes.generate("chord"),anchor:"middle",dim:t.dim,lane:t.getLane(),name:"chord"},!1);break;case"decoration":t.graphelem=y0(e,{x:t.x,y:i+6,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:t.anchor,centerVertically:!0,dim:t.dim},!1);break;case"text":t.graphelem=y0(e,{x:t.x,y:i,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"start",centerVertically:t.centerVertically,dim:t.dim,lane:t.getLane(),name:"annotation"},!1);break;case"multimeasure-text":t.graphelem=y0(e,{x:t.x+t.w/2,y:i,text:t.c,type:"tempofont",klass:e.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:t.dim},!1);break;case"part":t.graphelem=y0(e,{x:t.x,y:i,text:t.c,type:"partsfont",klass:e.controller.classes.generate("part"),anchor:"start",dim:t.dim,name:t.c},!0);break;case"bar":t.graphelem=Kc(e,t.x,t.linewidth+e.lineThickness,i,r||e.calcY(t.pitch2),null,"bar");break;case"stem":var c=t.linewidth>0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=Kc(e,t.x,c,i,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=Z3(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness);break}return t.scalex!==1&&t.graphelem&&rp(e.paper,t.graphelem,t.scalex,t.scaley,t.x,i),t.graphelem}function rp(e,t,r,i,a,n){e.setAttributeOnElement(t,{transform:"translate("+a+" "+n+") scale("+r+","+i+") translate(-"+a+" -"+n+")"})}$c.exports=tp});var Jc=P(($4,Qc)=>{"use strict";var ap=Na(),Pa=m0();function ip(e,t){var r=t.x;t.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var i=2,a=e.calcY(t.pitch)+2,n,s;if(t.tempo.preString){n=Pa(e,{x:r,y:a,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),s=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",n);var o=s.width,c=o/t.tempo.preString.length;r+=o+c}if(t.note){t.note.setX(r);for(var h=0;h<t.note.children.length;h++)ap(e,t.note.children[h],r);r+=t.note.w+5;var d="= "+t.tempo.bpm;n=Pa(e,{x:r,y:a,text:d,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"}),s=e.controller.getTextSize.calc(d,"tempofont","tempo",n);var f=s.width,l=f/d.length;r+=f+l}t.tempo.postString&&Pa(e,{x:r,y:a,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}Qc.exports=ip});var r1=P((Q4,t1)=>{"use strict";var np=Jc(),sp=Na(),op=Me(),Zc=Jt(),e1=ur();function cp(e,t,r,i,a){if(!t.invisible){var n=t.children.length>0&&t.children[0].type==="TempoElement";t.elemset=[],e1.beginGroup(e.paper,e.controller);for(var s=0;s<t.children.length;s++){var o=t.children[s];switch(o.type){case"TempoElement":np(e,o);break;default:var c=sp(e,o,r);if(o.type==="symbol"&&o.c&&o.c.indexOf("notehead")>=0&&c.setAttribute("class","abcjs-notehead"),c&&o.chordPos&&o.name.indexOf("flags.")!==0){var h=c.getAttribute("class");h?h=h+" abcjs-chord-pos-"+o.chordPos:h="abcjs-chord-pos-"+o.chordPos,c.setAttribute("class",h)}}}var h=t.type;if((t.type==="note"||t.type==="rest")&&(t.counters=e.controller.classes.getCurrent(),h+=" d"+Math.round(t.durationClass*1e3)/1e3,h=h.replace(/\./g,"-"),t.abcelem.pitches))for(var d=0;d<t.abcelem.pitches.length;d++)h+=" p"+t.abcelem.pitches[d].pitch;var f=e1.endGroup(h,t.type,t.extraClass);if(f){if(t.cloned&&(t.cloned.overrideClasses=f.className.baseVal),t.overrideClasses){var l=f.classList&&f.classList.length>0?f.classList[0]+" ":"";f.setAttribute("class",l+t.overrideClasses)}if(n)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,i.add(t,f,!1,a);else{t.elemset.push(f);var u=!1;(t.type==="note"||t.type==="tabNumber")&&(u=!0),i.add(t,f,u,a)}}else t.elemset.length>0&&i.add(t,t.elemset[0],t.type==="note",a);if(t.klass&&Zc(t.elemset,"mark","","#00ff00"),t.hint&&Zc(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var p=0;p<t.heads.length;p++)t.notePositions.push({x:t.heads[p].x+t.heads[p].w/2,y:a.zero-t.heads[p].pitch*op.STEP})}}}t1.exports=cp});var n1=P((J4,i1)=>{"use strict";var lp=kc(),hp=Sc(),fp=Lc(),up=Dc(),dp=Oc(),pp=zc(),gp=Wc(),vp=m0(),a1=r1();function bp(e,t,r,i,a){var n=t.w-1;e.staffbottom=t.staff.bottom;var s=e.foregroundColor;if(t.color&&(e.foregroundColor=t.color),t.header){var o=vp(e,{x:e.padding.left,y:e.calcY(t.headerPosition),text:t.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);i.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:t.header},o)}var c,h,d=!1;for(c=0;c<t.children.length;c++){h=t.children[c],(h.type==="note"||h.type==="rest")&&(d=!0);var f=!1;h.type!=="staff-extra"&&!e.controller.classes.isInMeasure()&&(e.controller.classes.startMeasure(),f=!0),t.staff.isTabStaff&&(h.invisible=!1,h.type=="bar"&&h.abcelem.lastBar&&(r=t.topLine)),a1(e,h,t.barto||c===t.children.length-1?r:0,i,a),(h.type==="note"||mp(h))&&e.controller.classes.incrNote(),h.type==="bar"&&!f&&d&&e.controller.classes.incrMeasure()}for(e.controller.classes.startMeasure(),c=0;c<t.beams.length;c++){var l=t.beams[c];l==="bar"?e.controller.classes.incrMeasure():gp(e,l,i)}for(e.controller.classes.startMeasure(),c=0;c<t.otherchildren.length;c++)if(h=t.otherchildren[c],h==="bar")e.controller.classes.incrMeasure();else switch(h.type){case"GlissandoElem":h.elemset=lp(e,h,i);break;case"CrescendoElem":h.elemset=hp(e,h,i);break;case"DynamicDecoration":h.elemset=fp(e,h,i);break;case"TripletElem":up(e,h,i);break;case"EndingElem":h.elemset=dp(e,h,t.startx+10,n,i);break;case"TieElem":h.elemset=pp(e,h,t.startx+10,n,i);break;default:console.log(h),a1(e,h,t.startx+10,n,i,a)}e.foregroundColor=s}function mp(e){return e.type!=="rest"?!1:!!(e.abcelem&&e.abcelem.rest&&e.abcelem.rest.type!=="spacer")}i1.exports=bp});var c1=P((Z4,o1)=>{"use strict";var s1=Ba();function yp(e,t,r,i,a,n){var s="abcjs-top-line",o=2;a&&(o=a),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var c=0,h=0;if(i===1)s1(e,t,r,6,s,null,n+e.lineThickness),c=e.calcY(10),h=e.calcY(2);else for(var d=i-1;d>=0;d--){var f=(d+1)*o;h=e.calcY(f),c===0&&(c=h),s1(e,t,r,f,s,null,n+e.lineThickness),s=void 0}return e.paper.closeGroup(),[c,h]}o1.exports=yp});var h1=P((e5,l1)=>{"use strict";function wp(e,t,r){var i=e.paper.rectBeneath(t);return r&&e.paper.text(r,{x:0,y:t.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),i}l1.exports=wp});var u1=P((t5,f1)=>{"use strict";function xp(e,t){var r="rgba(0,0,0,255)",i="rgba(0,0,0,0)",a=Math.round(e.y),n=e.controller.width,s=(n-t)/2,o=s+t,c="M "+s+" "+a+" L "+o+" "+a+" L "+o+" "+(a+1)+" L "+s+" "+(a+1)+" L "+s+" "+a+" z";e.paper.pathToBack({path:c,stroke:i,fill:r,class:e.controller.classes.generate("defined-text")})}f1.exports=xp});var La=P((r5,d1)=>{"use strict";var Cp=u1(),kp=m0();function Tp(e,t,r){for(var i=0;i<t.rows.length;i++){var a=t.rows[i];if(a.absmove)e.absolutemoveY(a.absmove);else if(a.move)e.moveY(a.move);else if(a.text||a.phrases){var n=a.left?a.left:0,s=kp(e,{x:n,y:e.y,text:a.text,phrases:a.phrases,"dominant-baseline":a["dominant-baseline"],type:a.font,klass:a.klass,name:a.name,anchor:a.anchor});a.absElemType&&r.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:a.text},s)}else if(a.separator)Cp(e,a.separator);else if(a.startGroup)e.paper.openGroup({klass:a.klass,"data-name":a.name});else if(a.endGroup){var o=e.paper.closeGroup();a.absElemType&&r.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:""},o)}}}d1.exports=Tp});var v1=P((a5,g1)=>{"use strict";var nt=Me(),_p=wc(),Sp=n1(),Ep=c1(),mr=h1(),Mp=vr(),Ap=La();function Bp(e,t,r,i){for(var a,n=e.y,s=0;s<t.staffs.length;s++){var o=t.staffs[s];e.moveY(nt.STEP,o.top),o.absoluteY=e.y,e.showDebug&&(e.showDebug.indexOf("box")>=0&&o.voices&&Np(e,t.voices,o.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:n,y2:n,stroke:"#0000ff"}),mr(e,{x:e.padding.left,y:e.calcY(o.originalTop),width:e.controller.width,height:e.calcY(o.originalBottom)-e.calcY(o.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),a=0,b(o,"chordHeightAbove"),b(o,"chordHeightBelow"),b(o,"dynamicHeightAbove"),b(o,"dynamicHeightBelow"),b(o,"endingHeightAbove"),b(o,"lyricHeightAbove"),b(o,"lyricHeightBelow"),b(o,"partHeightAbove"),b(o,"tempoHeightAbove"),b(o,"volumeHeightAbove"),b(o,"volumeHeightBelow"))),e.moveY(nt.STEP,-o.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var c,h,d=2,f=0,l=0;l<t.voices.length;l++){var u=t.voices[l].staff,p=t.voices[l].tabNameInfos;if(e.y=u.absoluteY,e.controller.classes.incrVoice(),!t.voices[l].duplicate){if(c||(c=e.calcY(10)),h=e.calcY(d),u.lines!==0){u.linePitch&&(d=u.linePitch),e.controller.classes.newMeasure();var g=Ep(e,t.startx,t.w,u.lines,u.linePitch,.35);h=g[1],u.bottomLine=h,u.topLine=g[0],u.hasTab&&(f=u.topLine),u.hasStaff&&(f=u.hasStaff.topLine,t.voices[l].barto=!0,t.voices[l].topLine=c)}p1(e,u.absoluteY,t.brace,l,r),p1(e,u.absoluteY,t.bracket,l,r)}Sp(e,t.voices[l],f,r,{top:n,zero:e.y,height:t.height*nt.STEP});var v=0;if(p){var m={rows:[]};m.rows.push({absmove:h+2});var y=8;m.rows.push({left:t.startx+y,text:p.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),m.rows.push({move:p.textSize.height}),Ap(e,m),v=p.textSize.height}e.controller.classes.newMeasure(),t.voices[l].duplicate||(f=e.calcY(2+v))}e.controller.classes.newMeasure();var k=t.staffs.length;k>1&&(c=t.staffs[0].topLine,h=t.staffs[k-1].bottomLine,Mp(e,t.startx,.6,c,h,null)),e.y=n;function b(w,C){var B=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(w.positionY&&w.positionY[C]){var L=w.specialY[C]*nt.STEP;C==="chordHeightAbove"&&w.specialY.chordLines&&w.specialY.chordLines.above&&(L*=w.specialY.chordLines.above),C==="chordHeightBelow"&&w.specialY.chordLines&&w.specialY.chordLines.below&&(L*=w.specialY.chordLines.below),mr(e,{x:e.padding.left,y:e.calcY(w.positionY[C]),width:e.controller.width,height:L,fill:B[a],stroke:B[a],"fill-opacity":.4,"stroke-opacity":.4},C.substr(0,4)),a+=1,a>6&&(a=0)}}}function p1(e,t,r,i,a){if(r)for(var n=0;n<r.length;n++)r[n].isStartVoice(i)&&(r[n].startY=t-nt.STEP*10,r[n].elemset=_p(e,r[n],a))}function Np(e,t,r){for(var i=0;i<r.length;i++)for(var a=t[r[i]].children,n=0;n<a.length;n++){var s=a[n],o=s.getFixedCoords();if(!(s.invisible||o.t===void 0||o.b===void 0)){var c=(o.t-o.b)*nt.STEP;mr(e,{x:o.x,y:e.calcY(o.t),width:o.w,height:c,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var h=0;h<s.children.length;h++){var d=s.children[h],f=d.getChordDim();if(f){var l=e.calcY(d.pitch);l+=d.dim.font.size*d.getLane(),mr(e,{x:f.left,y:l,width:f.right-f.left,height:d.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}g1.exports=Bp});var m1=P((i5,b1)=>{"use strict";function Pp(e,t,r,i){var a=(t+e.padding.left+e.padding.right)*r,n=(e.y+e.padding.bottom)*r;if(e.isPrint&&(n=Math.max(n,1056)),e.ariaLabel!==""){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}var c=["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"];e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+c.join(" ")+"}");var h={overflow:"hidden"};i==="resize"?e.paper.setResponsiveWidth(a,n):(h.width="",h.height=n+"px",r<1?(h.width=a+"px",e.paper.setSize(a/r,n/r)):e.paper.setSize(a,n)),e.paper.setScale(r),e.paper.setParentStyles(h)}b1.exports=Pp});var w1=P((n5,y1)=>{"use strict";var Lp=Jr(),qp=Zr();function Mt(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}Mt.prototype.getElements=function(){return this.elements};Mt.prototype.add=function(e,t,r,i){if(this.canSelect(e)){var a;this.selectTypes===void 0?a={selectable:!1,"data-index":this.elements.length}:a={selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,a);var n={absEl:e,svgEl:t,isDraggable:r};i!==void 0&&(n.staffPos=i),this.elements.push(n)}};Mt.prototype.canSelect=function(e){return this.selectTypes===!1||!e||!e.abcelem?!1:this.selectTypes===!0?!0:this.selectTypes===void 0?e.abcelem.el_type==="note"||e.abcelem.el_type==="tabNumber":this.selectTypes.indexOf(e.abcelem.el_type)>=0};Mt.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:Lp,unhighlight:qp};this.add(r,t,!1)};y1.exports=Mt});var _1=P((s5,T1)=>{"use strict";var At=dr(),Dp=vr();function Ip(e,t,r,i,a){let n=a.gchordfont,s=a.partsfont,o=a.annotationfont,c=a.repeatfont,h=a.textfont,d=a.subtitlefont,f=50,l=10,u=14,p=10,g=20,v=16;e.paper.openGroup({klass:"abcjs-chord-grid"}),t.forEach(m=>{switch(m.type){case"text":st(e,m.text,r,e.y,16,h,null,null,!1),e.moveY(v);break;case"subtitle":st(e,m.subtitle,r,e.y+p,20,d,null,"abcjs-subtitle",!1),e.moveY(g);break;case"part":if(m.lines.length>0){st(e,m.name,r,e.y+p,20,d,m.name,"abcjs-part",!1),e.moveY(g);let y=m.lines[0].length,k=i/y;m.lines.forEach((b,w)=>{let C=!1,B=!1;b.forEach(N=>{N.ending&&(C=!0),N.annotations&&N.annotations.length>0&&(B=!0)});let L=B?u:C?l:0;b.forEach((N,_)=>{if(!N.noBorder){e.paper.rect({x:r+_*k,y:e.y,width:k,height:L+f}),e.paper.rect({x:r+_*k+1,y:e.y+1,width:k-2,height:L+f-2});let q=0,D=0,R=e.y,J=r+k*_;N.hasStartRepeat&&(x1(e,J,R,R+f+L,!0,L),q=12),N.hasEndRepeat&&(x1(e,J+k,R,R+f+L,!1,L),D=12);let U=0;N.ending&&(U=st(e,N.ending,r+_*k+4,R+10,12,c,null,null,!1).getBBox().width+4),Hp(e,R,r+q,k,w,_,N.chord,n,q+D,f,L),N.annotations&&N.annotations.length>0&&Fp(e,R,r+_*k+U,N.annotations,o),L&&e.paper.rectBeneath({x:r+_*k,y:e.y,width:k,height:L,fill:"#e8e8e8",stroke:"none"})}}),e.moveY(L+f)}),e.moveY(g)}break}}),e.paper.closeGroup()}function Op(e,t,r,i){var a=t-10,n=t+10,s=r+10,o=r-10,c=t-10,h=-e.yToPitch(i)+2,d=t+6.5,f=-e.yToPitch(i)-2.3;e.paper.lineToBack({x1:a,x2:n,y1:s,y2:o,"stroke-width":"3px","stroke-linecap":"round"}),At(e,c,h,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),At(e,d,f,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function x1(e,t,r,i,a,n){let s=a?t+2:t-4,o=a?t+9:t-11;e.paper.openGroup({klass:"abcjs-repeat"}),Dp(e,s,3+e.lineThickness,r,i,null,"bar"),At(e,o,-e.yToPitch(n)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),At(e,o,-e.yToPitch(n)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e.paper.closeGroup()}var C1={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function Fp(e,t,r,i,a){r+=3;let n;for(let s=0;s<i.length;s++)switch(i[s]){case"segno":case"coda":case"fermata":{r+=12,n=At(e,r,-3,C1[i[s]],{scalex:1,scaley:1,name:C1[i[s]]});let o=n.getBBox();r+=o.width}break;default:st(e,i[s],r,t+12,12,a,null,null,!1)}}function Hp(e,t,r,i,a,n,s,o,c,h,d){let f=r+i*n;!s[1]&&!s[2]&&!s[3]?Rp(e,f,t+d,i-c,h,s[0],o,d):!s[1]&&!s[3]?Gp(e,f,t,i-c,h,s[0],s[2],o,d):Yp(e,f,t,i-c,h,s,o,d)}function F0(e,t,r,i,a,n,s){let o=st(e,a,t,r,i,n,null,"abcjs-chord",!0),c=o.getBBox(),h=i;for(;c.width>s&&h>=14;)h-=2,o.setAttribute("font-size",h),c=o.getBBox()}var zp=34,k1=26,yr=20,H0=-3;function Rp(e,t,r,i,a,n,s,o){n==="%"?Op(e,t+i/2,r+a/2,o+a/2):F0(e,t+i/2,r+a/2+H0,zp,n,s,i)}function Gp(e,t,r,i,a,n,s,o,c){e.paper.lineToBack({x1:t,x2:t+i,y1:r+a+c,y2:r+2}),F0(e,t+i/4,r+a/4+5+c+H0,k1,n,o,i/2),F0(e,t+3*i/4,r+3*a/4+c+H0,k1,s,o,i/2)}function Yp(e,t,r,i,a,n,s,o){e.paper.lineToBack({x1:t+3,x2:t+i-3,y1:r+a/2+o,y2:r+a/2+o}),e.paper.lineToBack({x1:t+i/2,x2:t+i/2,y1:r+3+o,y2:r+a-3+o}),n[0]&&F0(e,t+i/4,r+a/4+2+o+H0,yr,wr(n[0]),s,i/2),n[1]&&F0(e,t+3*i/4,r+a/4+2+o+H0,yr,wr(n[1]),s,i/2),n[2]&&F0(e,t+i/4,r+3*a/4+o+H0,yr,wr(n[2]),s,i/2),n[3]&&F0(e,t+3*i/4,r+3*a/4+o+H0,yr,wr(n[3]),s,i/2)}function wr(e){return e==="No Chord"?"N.C.":e}function st(e,t,r,i,a,n,s,o,c){let h={x:r,y:i,stroke:"none","font-size":a,"font-style":n.style,"font-family":n.face,"font-weight":n.weight,"text-decoration":n.decoration};return s&&(h["data-name"]=s),o&&(h.class=o),h["text-anchor"]=c?"middle":"start",e.paper.text(t,h,null,{"alignment-baseline":"middle"})}T1.exports=Ip});var M1=P((o5,E1)=>{"use strict";var Wp=v1(),Xp=m1(),qa=La(),S1=Me(),Up=w1(),jp=_1();function Vp(e,t,r,i,a,n,s,o,c,h,d){var f=new Up(e.paper,o,c),l={};t.shouldAddClasses&&(l.klass="abcjs-meta-top"),e.paper.openGroup(l),e.moveY(e.padding.top),qa(e,r.topText,f),e.paper.closeGroup(),e.moveY(e.spacing.music);let u=!1;d&&r.chordGrid&&(jp(e,r.chordGrid,e.padding.left,i,r.formatting),d==="noMusic"&&(u=!0));var p=[],g=0;if(!u)for(var v=0;v<r.lines.length;v++){t.incrLine();var m=r.lines[v];if(m.staff){if(g++,r.formatting.maxStaves&&g>r.formatting.maxStaves)break;t.shouldAddClasses&&(l.klass="abcjs-staff-wrapper abcjs-l"+t.lineNumber),e.paper.openGroup(l),m.vskip&&e.moveY(m.vskip),p.length>=1?$p(e,e.spacing.staffSeparation,p[p.length-1],m.staffGroup):v>0&&e.moveY(e.spacing.staffSeparation);var y=Kp(e,m.staffGroup,f,v);y.line=h+v,p.push(y),e.paper.closeGroup()}else m.nonMusic&&(t.shouldAddClasses&&(l.klass="abcjs-non-music"),e.paper.openGroup(l),qa(e,m.nonMusic,f),e.paper.closeGroup())}return t.reset(),u||r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(l.klass="abcjs-meta-bottom"),e.paper.openGroup(l),e.moveY(24),qa(e,r.bottomText,f),e.paper.closeGroup()),Xp(e,a,s,n),{staffgroups:p,selectables:f.getElements()}}function Kp(e,t,r,i){Wp(e,t,r,i);var a=t.height*S1.STEP;return e.moveY(a),t}function $p(e,t,r,i){var a=r.staffs[r.staffs.length-1],n=-(a.bottom-2),s=i.staffs[0].top-10,o=s+n,c=o*S1.STEP;c<t&&e.moveY(t-c)}E1.exports=Vp});var B1=P((c5,A1)=>{"use strict";var Qp=xa();function Jp(e){for(var t=e;t&&t.attributes&&t.tagName.toLowerCase()!=="svg"&&!t.attributes.selectable;)t=t.parentNode;if(t&&t.attributes&&t.attributes.selectable){var r=t.attributes["data-index"].nodeValue;if(r&&(r=parseInt(r,10),r>=0&&r<this.selectables.length)){var i=this.selectables[r],a=Qp(i,e);return a.index=r,a.element=i,a}}return null}A1.exports=Jp});var xr=P((l5,D1)=>{"use strict";var Zp=Me(),eg=no(),tg=fo(),rg=po(),ag=vo(),ig=mo(),N1=Co(),ng=_o(),sg=Do(),P1=oc(),og=lc(),L1=fc(),q1=dc(),cg=M1(),lg=ca(),hg=B1(),u0=function(e,t){t=t||{},this.findSelectableElement=hg,this.oneSvgPerLine=t.oneSvgPerLine,this.selectionColor=t.selectionColor,this.dragColor=t.dragColor?t.dragColor:t.selectionColor,this.dragging=!!t.dragging,this.selectTypes=t.selectTypes,this.responsive=t.responsive,this.space=3*Zp.SPACE,this.initialClef=t.initialClef,this.timeBasedLayout=t.timeBasedLayout,this.expandToWidest=!!t.expandToWidest,this.scale=t.scale?parseFloat(t.scale):0,this.classes=new og({shouldAddClasses:t.add_classes}),this.scale>.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new tg(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),t.chordGrid&&(this.chordGrid=t.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",t.ariaLabel!==void 0&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};u0.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)};u0.prototype.engraveABC=function(e,t,r){e[0]===void 0&&(e=[e]),this.reset();for(var i=0;i<e.length;i++)t===void 0&&(t=i),this.getFontAndAttr=new L1(e[i].formatting,this.classes),this.getTextSize=new q1(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[i],t,r)};u0.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)};u0.prototype.getMeasureWidths=function(e){this.reset(),this.getFontAndAttr=new L1(e.formatting,this.classes),this.getTextSize=new q1(this.getFontAndAttr,this.renderer.paper);var t=this.jazzchords;this.setupTune(e,0),this.constructTuneElements(e),P1(this.renderer,e,0,this.space,this.timeBasedLayout);for(var r=[],i,a=!0,n=0;n<e.lines.length;n++){var s=e.lines[n];if(s.staff){if(a&&(i={left:0,measureWidths:[],total:0},r.push(i),a=!1),s.staffGroup.voices.length>0)for(var o=s.staffGroup.voices[0],c=!1,h=0,d=0;d<o.children.length;d++){var f=o.children[d];!c&&!f.isClef&&!f.isKeySig&&(c=!0,i.left=f.x,h=f.x),f.type==="bar"&&(i.measureWidths.push(f.x-h),i.total+=f.x-h,h=f.x)}}else a=!0}return this.jazzchords=t,r};u0.prototype.setupTune=function(e,t){this.classes.reset(),e.formatting.jazzchords!==void 0&&(this.jazzchords=e.formatting.jazzchords),e.formatting.accentAbove!==void 0&&(this.accentAbove=e.formatting.accentAbove),this.renderer.newTune(e),this.engraver=new eg(this.getTextSize,t,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:e.formatting.graceSlurs!==!1,percmap:e.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=e.getMeterFraction().num/e.getMeterFraction().den,e.formatting.staffwidth?this.width=e.formatting.staffwidth*1.33:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var r=e.formatting.scale?e.formatting.scale:this.scale;return this.responsive==="resize"&&(r=void 0),r===void 0&&(r=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(r),r};u0.prototype.constructTuneElements=function(e){e.topText=new N1(e.metaText,e.metaTextInfo,e.formatting,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var t,r,i=!1,a=!1;for(t=0;t<e.lines.length;t++)if(r=e.lines[t],r.staff)a=!0,r.staffGroup=this.engraver.createABCLine(r.staff,i?null:e.metaText.tempo,t),i=!0;else if(r.subtitle){if(a){var n=this.width/2+this.renderer.padding.left;r.nonMusic=new ig(this.renderer.spacing.subtitle,e.formatting,r.subtitle,n,this.renderer.padding.left,this.getTextSize)}}else r.text!==void 0?(a=!0,r.nonMusic=new rg(r.text,r.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):r.separator!==void 0&&r.separator.lineLength&&(a=!0,r.nonMusic=new ag(r.separator.spaceAbove,r.separator.lineLength,r.separator.spaceBelow));e.bottomText=new ng(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)};u0.prototype.engraveTune=function(e,t,r){var i=this.jazzchords,a=this.setupTune(e,t);this.constructTuneElements(e);var n=P1(this.renderer,e,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&n>this.width+1&&(e.topText=new N1(e.metaText,e.metaTextInfo,e.formatting,e.lines,n,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o<s;++o){var c=e.lines[o];if(c.nonMusic&&c.nonMusic.rows&&c.nonMusic.rows.length>0)for(var h=c.nonMusic.rows.length,d=0;d<h;++d){var f=c.nonMusic.rows[d];f.left&&(c.subtitle?f.left=n/2+this.renderer.padding.left:c.text&&c.text.length>0&&c.text[0].center&&(f.left=n/2+this.renderer.padding.left))}}e.tablatures&&lg.layoutTablatures(this.renderer,e);var l=cg(this.renderer,this.classes,e,this.width,n,this.responsive,a,this.selectTypes,t,r,this.chordGrid);if(this.staffgroups=l.staffgroups,this.selectables=l.selectables,this.oneSvgPerLine){var u=this.renderer.paper.svg.parentNode;this.svgs=fg(this.renderer,u,e.metaText.title,this.responsive,a)}else this.svgs=[this.renderer.paper.svg];sg(this,this.svgs),this.jazzchords=i};function fg(e,t,r,i,a){r||(r="Untitled");var n=t.querySelector("svg");i==="resize"&&(t.style.paddingBottom="");for(var s=n.querySelector("style"),o=i==="resize"?n.viewBox.baseVal.width:n.getAttribute("width"),c=t.querySelectorAll("svg > g"),h=0,d=[],f=[],l=0;l<c.length;l++){var u=c[l],p=u.getBBox(),g=p.y-h,v=p.height+g,m=document.createElement("div"),y="overflow: hidden;";i!=="resize"&&(y+="height:"+v*a+"px;"),m.setAttribute("style",y);var k=ug(n),b='Sheet Music for "'+r+'" section '+(l+1);k.setAttribute("aria-label",b),i!=="resize"&&k.setAttribute("height",v),i==="resize"&&(k.style.position="");var w=e.firefox?v+1:v;k.setAttribute("viewBox","0 "+h+" "+o+" "+w),k.appendChild(s.cloneNode(!0));var C=document.createElement("title");C.innerText=b,k.appendChild(C),k.appendChild(u),m.appendChild(k),f.push(k),t.appendChild(m),h=p.y+p.height}return t.removeChild(n),f}function ug(e){for(var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg"),i=0;i<e.attributes.length;i++){var a=e.attributes[i];a.name!=="height"&&a.name!="aria-label"&&r.setAttribute(a.name,a.value)}return r}u0.prototype.getDim=function(e){if(!e.dim){var t=e.svgEl.getBBox();e.dim={left:Math.round(t.x),top:Math.round(t.y),right:Math.round(t.x+t.width),bottom:Math.round(t.y+t.height)}}return e.dim};u0.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e};D1.exports=u0});var Da=P((f5,H1)=>{"use strict";var dg=bt(),h5=Ur(),O1=xr(),pg=Qt(),gg=Rr(),Cr={};function I1(){var e=window.innerWidth;for(var t in Cr)if(Cr.hasOwnProperty(t)){var r=Cr[t],i=r.offsetLeft;e-=i*2,r.style.width=e+"px"}}try{window.addEventListener("resize",I1),window.addEventListener("orientationChange",I1)}catch(e){}function F1(e,t,r,i,a){r.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",Cr[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='<div class="abcjs-inner scroll-amount"></div>',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var n=new O1(e,r);if(n.engraveABC(t,i,a),t.engraver=n,r.viewportVertical||r.viewportHorizontal){var s=e.parentNode;s.style.width=e.style.width}}var vg=function(e,t,r,i,a){var n={},s;if(r){for(s in r)r.hasOwnProperty(s)&&(n[s]=r[s]);n.warnings_id&&n.tablature&&(n.tablature.warning_id=n.warnings_id)}if(i)for(s in i)i.hasOwnProperty(s)&&(s==="listener"?i[s].highlight&&(n.clickListener=i[s].highlight):n[s]=i[s]);if(a)for(s in a)a.hasOwnProperty(s)&&(n[s]=a[s]);function o(c,h,d,f){var l=!1;return c==="*"&&(l=!0,c=document.createElement("div"),c.setAttribute("style","visibility: hidden;"),document.body.appendChild(c)),!l&&n.wrap&&n.staffwidth?(h=bg(c,h,d,f,n),h):(n.afterParsing&&n.afterParsing(h,d,f),F1(c,h,n,d,0),l&&c.parentNode.removeChild(c),null)}return dg.renderEngine(o,e,t,n)};function bg(e,t,r,i,a){var n=new O1(e,a),s=n.getMeasureWidths(t),o=gg.calcLineWraps(t,s,a);if(o.reParse){var c=new pg;c.parse(i,o.revisedParams),t=c.getTune();var h=c.getWarnings();h&&(t.warnings=h)}return a.afterParsing&&a.afterParsing(t,r,i),F1(e,t,o.revisedParams,r,0),t.explanation=o.explanation,t}H1.exports=vg});var R1=P((u5,z1)=>{"use strict";var mg=bt(),yg=xr(),wg=function(e,t){function r(i,a,n,s){i=document.createElement("div"),i.setAttribute("style","visibility: hidden;"),document.body.appendChild(i);var o=new yg(i,t),c=o.getMeasureWidths(a);return i.parentNode.removeChild(i),{sections:c}}return mg.renderEngine(r,"*",e,t)};z1.exports=wg});var kr=P((d5,G1)=>{"use strict";var xg={};G1.exports=xg});var W1=P((p5,Y1)=>{"use strict";var Ia=kr(),Cg=function(e,t,r,i){Ia[t]||(Ia[t]={});var a=Ia[t];return a[r]||(a[r]=new Promise(function(n,s){var o=new XMLHttpRequest;let c=e+t+"-mp3/"+r+".mp3";o.open("GET",c,!0),o.responseType="arraybuffer",o.onload=function(){if(o.status!==200){s(Error("Can't load sound at "+c+" status="+o.status));return}var h=function(f){n({instrument:t,name:r,status:"loaded",audioBuffer:f})},d=i.decodeAudioData(o.response,h,function(){s(Error("Can't decode sound at "+c))});d&&typeof d.catch=="function"&&d.catch(s)},o.onerror=function(){s(Error("Can't load sound at "+c))},o.send()}).catch(n=>{throw console.error("Didn't load note",t,r,":",n.message),n})),a[r]};Y1.exports=Cg});var Tr=P((g5,X1)=>{"use strict";var kg=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];X1.exports=kg});var j1=P((v5,U1)=>{"use strict";var Oa=Tr(),Tg=function(e){for(var t=[],r=0;r<e.tracks.length;r++)t.push([]);var i={},a=Oa[0];return e.tracks.forEach(function(n,s){n.forEach(function(o){switch(o.cmd){case"note":var c=o.instrument!==void 0?Oa[o.instrument]:a;if(o.duration>0){var h=o.gap?o.gap:0,d=o.duration;h=Math.min(h,d*2/3);var f={pitch:o.pitch,instrument:c,start:Math.round(o.start*1e6)/1e6,end:Math.round((o.start+d-h)*1e6)/1e6,volume:o.volume};o.startChar&&(f.startChar=o.startChar),o.endChar&&(f.endChar=o.endChar),o.style&&(f.style=o.style),o.cents&&(f.cents=o.cents),t[s].push(f)}break;case"program":a=Oa[o.instrument];break;case"text":break;default:console.log("Unhandled midi event",o)}})}),t};U1.exports=Tg});var Bt=P((b5,V1)=>{"use strict";function _g(e){if(e)window.abcjsAudioContext=e;else if(!window.abcjsAudioContext){var t=window.AudioContext||window.webkitAudioContext;if(t)window.abcjsAudioContext=new t;else return!1}return window.abcjsAudioContext.state!=="suspended"}V1.exports=_g});var z0=P((m5,K1)=>{"use strict";var Sg=Bt();function Eg(){return window.abcjsAudioContext||Sg(),window.abcjsAudioContext}K1.exports=Eg});var Nt=P((y5,$1)=>{"use strict";var Mg=z0();function Ag(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var e=Mg();if(e)return e.resume!==void 0}$1.exports=Ag});var _r=P((w5,Q1)=>{"use strict";var Bg={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};Q1.exports=Bg});var Z1=P((x5,J1)=>{"use strict";var Ng=function(e){return window.URL.createObjectURL(Pg(e.audioBuffers))};function Pg(e){var t=e[0],r=t.numberOfChannels,i=t.length*r*2+44,a=new ArrayBuffer(i),n=new DataView(a),s=[],o,c,h=0,d=0;for(l(1179011410),l(i-8),l(1163280727),l(544501094),l(16),f(1),f(r),l(t.sampleRate),l(t.sampleRate*2*r),f(r*2),f(16),l(1635017060),l(i-d-4),o=0;o<r;o++)s.push(t.getChannelData(o));for(;d<i;){for(o=0;o<s.length;o++)c=Math.max(-1,Math.min(1,s[o][h])),c=(.5+c<0?c*32768:c*32767)|0,n.setInt16(d,c,!0),d+=2;h++}return new Blob([a],{type:"audio/wav"});function f(u){n.setUint16(d,u,!0),d+=2}function l(u){n.setUint32(d,u,!0),d+=4}}J1.exports=Ng});var Fa=P((C5,el)=>{"use strict";function Lg(e){return Math.pow(2,e/1200)}el.exports=Lg});var al=P((k5,rl)=>{"use strict";var tl=kr(),qg=_r(),Dg=Fa();function Ig(e,t,r,i,a,n,s,o,c){var h=window.OfflineAudioContext||window.webkitOfflineAudioContext,d=r.len*r.tempoMultiplier;n&&(d+=n/1e3),d-=o,d<0&&(d=.005);var f=new h(2,Math.floor((d+s)*t),t),l=qg[r.pitch];if(!tl[r.instrument])return c&&c("placeNote skipped (instrument empty): "+r.instrument+":"+l),Promise.resolve();var u=tl[r.instrument][l];return u?u.then(function(p){var g=f.createBufferSource();g.buffer=p.audioBuffer;var v=r.volume/96*a;g.gainNode=f.createGain(),r.pan&&f.createStereoPanner&&(g.panNode=f.createStereoPanner(),g.panNode.pan.setValueAtTime(r.pan,0)),g.gainNode.gain.value=v,g.gainNode.gain.linearRampToValueAtTime(g.gainNode.gain.value,d),g.gainNode.gain.linearRampToValueAtTime(0,d+s),r.cents&&(g.playbackRate.value=Dg(r.cents)),g.panNode?(g.panNode.connect(f.destination),g.gainNode.connect(g.panNode)):g.gainNode.connect(f.destination),g.connect(g.gainNode),g.start(0),g.noteOff?g.noteOff(d+s):g.stop(d+s);var m;return f.oncomplete=function(y){if(y.renderedBuffer&&y.renderedBuffer.getChannelData)for(var k=0;k<i.length;k++){var b=i[k]*r.tempoMultiplier;n&&(b-=n/1e3),b<0&&(b=0),b=Math.floor(b*t),Og(e,y.renderedBuffer,b)}c&&c("placeNote: "+r.instrument+":"+l),m()},f.startRendering(),new Promise(function(y){m=y})}).catch(function(p){return c&&c("placeNote catch: "+p.message),Promise.reject(p)}):(c&&c("placeNote skipped: "+r.instrument+":"+l),Promise.resolve())}var Og=function(e,t,r){for(var i=0;i<2;i++)for(var a=t.getChannelData(i),n=e.getChannelData(i),s=0;s<a.length;s++)n[s+r]+=a[s]};rl.exports=Ig});var Er=P((T5,ol)=>{"use strict";var Fg=W1(),Hg=j1(),zg=Bt(),ue=z0(),Rg=Nt(),Gg=_r(),Sr=Tr(),Yg=Z1(),Wg=al(),il=kr(),R0="MIDI is not supported in this browser.",nl="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",sl="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/",Xg="https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/";function Ug(){var e=this;e.audioBufferPossible=void 0,e.directSource=[],e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.audioBuffers=[],e.duration=void 0,e.isRunning=!1,e.options={},e.pickupLength=0,e.init=function(i){i||(i={}),i.options&&(e.options=i.options),zg(i.audioContext);var a=ue().currentTime;if(e.debugCallback=i.debugCallback,e.debugCallback&&e.debugCallback("init called"),e.audioBufferPossible=e._deviceCapable(),!e.audioBufferPossible)return Promise.reject({status:"NotSupported",message:R0});var n=i.options?i.options:{};e.soundFontUrl=n.soundFontUrl?n.soundFontUrl:sl,e.soundFontUrl[e.soundFontUrl.length-1]!=="/"&&(e.soundFontUrl+="/"),n.soundFontVolumeMultiplier||n.soundFontVolumeMultiplier===0?e.soundFontVolumeMultiplier=n.soundFontVolumeMultiplier:e.soundFontUrl===sl||e.soundFontUrl===Xg?e.soundFontVolumeMultiplier=3:e.soundFontUrl===nl?e.soundFontVolumeMultiplier=.4:e.soundFontVolumeMultiplier=1,n.programOffsets?e.programOffsets=n.programOffsets:e.soundFontUrl===nl?e.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:e.programOffsets={};var s=n.fadeLength!==void 0?parseInt(n.fadeLength,10):NaN;if(e.fadeLength=isNaN(s)?200:s,s=n.noteEnd!==void 0?parseInt(n.noteEnd,10):NaN,e.noteEnd=isNaN(s)?0:s,e.pan=n.pan,e.meterSize=1,i.visualObj){e.flattened=i.visualObj.setUpAudio(n);var o=i.visualObj.getMeterFraction();o.den&&(e.meterSize=o.num/o.den),e.pickupLength=i.visualObj.getPickupLength()}else if(i.sequence)e.flattened=i.sequence;else return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));e.millisecondsPerMeasure=i.millisecondsPerMeasure?i.millisecondsPerMeasure:i.visualObj?i.visualObj.millisecondsPerMeasure(e.flattened.tempo):1e3,e.beatsPerMeasure=i.visualObj?i.visualObj.getBeatsPerMeasure():4,e.sequenceCallback=n.sequenceCallback,e.callbackContext=n.callbackContext,e.onEnded=n.onEnded,e.meterFraction=i.visualObj?i.visualObj.getMeterFraction():{den:1};var c={},h=[],d=[],f=Sr[0];e.flattened.tracks.forEach(function(v){v.forEach(function(m){if(m.cmd==="program"&&Sr[m.instrument]&&(f=Sr[m.instrument]),m.pitch!==void 0){var y=m.pitch,k=Gg[y],b=m.instrument!==void 0?Sr[m.instrument]:f;if(k)if(c[b]||(c[b]={}),!il[b]||!il[b][k])c[b][k]=!0;else{var w=b+":"+k;h.indexOf(w)<0&&h.push(w)}else{var C=b+":"+k;console.log("Can't find note: ",y,C),d.indexOf(C)<0&&d.push(C)}}})}),e.debugCallback&&e.debugCallback("note gathering time = "+Math.floor((ue().currentTime-a)*1e3)+"ms"),a=ue().currentTime;var l=[];Object.keys(c).forEach(function(v){Object.keys(c[v]).forEach(function(m){l.push({instrument:v,note:m})})}),e.debugCallback&&e.debugCallback("notes "+JSON.stringify(l));for(var u=[],p=256,g=0;g<l.length;g+=p)u.push(l.slice(g,g+p));return new Promise(function(v,m){var y={cached:h,error:d,loaded:[]},k=0,b=function(){e.debugCallback&&e.debugCallback("loadBatch idx="+k+" len="+u.length),k<u.length?e._loadBatch(u[k],e.soundFontUrl,a).then(function(w){e.debugCallback&&e.debugCallback("loadBatch then"),a=ue().currentTime,w&&(w.error&&(y.error=y.error.concat(w.error)),w.loaded&&(y.loaded=y.loaded.concat(w.loaded))),k++,b()},m):(e.debugCallback&&e.debugCallback("resolve init"),v(y))};b()})},e._loadBatch=(function(i,a,n,s){var o=[];return i.forEach(function(c){e.debugCallback&&e.debugCallback("getNote "+c.instrument+":"+c.note),o.push(Fg(a,c.instrument,c.note,ue()))}),Promise.all(o).then(function(c){e.debugCallback&&e.debugCallback("mp3 load time = "+Math.floor((ue().currentTime-n)*1e3)+"ms");for(var h=[],d=[],f=[],l=[],u=0;u<c.length;u++){var p=c[u],g=p.instrument+":"+p.name;p.status==="loaded"?h.push(g):p.status==="pending"?f.push(g):p.status==="cached"?d.push(g):l.push(g+" "+p.message)}if(f.length>0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(f)),s?s=s*2:s=50,s<9e4)return new Promise(function(y,k){setTimeout(function(){var b=[];for(u=0;u<f.length;u++)g=f[u].split(":"),b.push({instrument:g[0],note:g[1]});e.debugCallback&&e.debugCallback("retry "+JSON.stringify(b)),e._loadBatch(b,a,n,s).then(function(w){y(w)}).catch(function(w){k(w)})},s)});for(var v=[],m=0;m<i.length;m++)v.push(i[m].instrument+"/"+i[m].note);return e.debugCallback&&e.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+v.join(", ")))}else return e.debugCallback&&e.debugCallback("loadBatch resolve"),Promise.resolve({loaded:h,cached:d,error:l})}).catch(function(c){e.debugCallback&&e.debugCallback("loadBatch catch "+c.message)})}),e.prime=function(){var i=e.fadeLength/1e3;return e.isRunning=!1,e.audioBufferPossible?(e.debugCallback&&e.debugCallback("prime called"),new Promise(function(a,n){try{let b=function(w){var C=w&&w.audioBuffers&&w.audioBuffers.length>0?w.audioBuffers[0].duration:0;return{status:ue().state,duration:C}};var k=b,s=ue().currentTime,o=e.millisecondsPerMeasure/1e3/e.meterSize;if(e.duration=e.flattened.totalDuration*o,e.duration<=0)return e.audioBuffers=[],a({status:"empty",seconds:0});e.duration+=i;var c=Math.floor(ue().sampleRate*e.duration);e.stop();var h=Hg(e.flattened);if(e.options.swing){var d=e.options.drumIntro?0:e.pickupLength;r(h,e.options.swing,e.meterFraction,d)}e.sequenceCallback&&e.sequenceCallback(h,e.callbackContext);var f=t(h.length,e.pan),l={};h.forEach(function(w,C){var B=f&&f.length>C?f[C]:0;w.forEach(function(L){var N=L.instrument+":"+L.pitch+":"+L.volume+":"+Math.round((L.end-L.start)*1e3)/1e3+":"+B+":"+o+":"+(L.cents?L.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+N),l[N]||(l[N]=[]),l[N].push(L.start)})});for(var u=[],p=ue().createBuffer(2,c,ue().sampleRate),g=0;g<Object.keys(l).length;g++){var v=Object.keys(l)[g],m=v.split(":"),y=m[6]!==void 0?parseFloat(m[6]):0;m={instrument:m[0],pitch:parseInt(m[1],10),volume:parseInt(m[2],10),len:parseFloat(m[3]),pan:parseFloat(m[4]),tempoMultiplier:parseFloat(m[5]),cents:y},u.push(Wg(p,ue().sampleRate,m,l[v],e.soundFontVolumeMultiplier,e.programOffsets[m.instrument],i,e.noteEnd/1e3,e.debugCallback))}e.audioBuffers=[p],e.debugCallback&&(e.debugCallback("sampleRate = "+ue().sampleRate),e.debugCallback("totalSamples = "+c),e.debugCallback("creationTime = "+Math.floor((ue().currentTime-s)*1e3)+"ms")),Promise.all(u).then(function(){ue().state==="suspended"?ue().resume().then(function(){a(b(e))}):ue().state==="interrupted"?ue().suspend().then(function(){ue().resume().then(function(){a(b(e))})}):a(b(e))}).catch(function(w){n(w)})}catch(b){n(b)}})):Promise.reject(new Error(R0))};function t(i,a){if(a==null)return null;var n=[];if(a.length){for(var s=0;s<i;s++)if(s<a.length){var o=parseFloat(a[s]);o<-1?o=-1:o>1&&(o=1),n.push(o)}else n.push(0);return n}else{var c=parseFloat(a);if(c*(i-1)>2)return null;for(var h=i%2===0,d=h?0-c/2:0,f=d+c,l=0;l<i;l++)h=l%2===0,h?(n.push(d),d-=c):(n.push(f),f+=c);return n}return null}e.start=function(){if(!e.audioBufferPossible)throw new Error(R0);e.debugCallback&&e.debugCallback("start called");var i=e.pausedTimeSec?e.pausedTimeSec:0;e._kickOffSound(i),e.startTimeSec=ue().currentTime-i,e.pausedTimeSec=void 0,e.debugCallback&&e.debugCallback("MIDI STARTED",e.startTimeSec)},e.pause=function(){if(!e.audioBufferPossible)throw new Error(R0);return e.debugCallback&&e.debugCallback("pause called"),e.pausedTimeSec=e.stop(),e.pausedTimeSec},e.resume=function(){e.start()},e.seek=function(i,a){var n;switch(a){case"seconds":n=i;break;case"beats":n=i*e.millisecondsPerMeasure/e.beatsPerMeasure/1e3;break;default:n=(e.duration-e.fadeLength/1e3)*i;break}if(!e.audioBufferPossible)throw new Error(R0);e.debugCallback&&e.debugCallback("seek called sec="+n),e.isRunning?(e.stop(),e._kickOffSound(n)):e.pausedTimeSec=n,e.pausedTimeSec=n},e.stop=function(){e.isRunning=!1,e.pausedTimeSec=void 0,e.directSource.forEach(function(a){try{a.stop()}catch(n){console.log("direct source didn't stop:",n)}}),e.directSource=[];var i=ue().currentTime-e.startTimeSec;return i},e.finished=function(){e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.isRunning=!1},e.download=function(){return Yg(e)},e.getAudioBuffer=function(){return e.audioBuffers[0]},e.getIsRunning=function(){return e.isRunning},e._deviceCapable=function(){return Rg()?!0:(console.warn(R0),e.debugCallback&&e.debugCallback(R0),!1)},e._kickOffSound=function(i){e.isRunning=!0,e.directSource=[],e.audioBuffers.forEach(function(a,n){e.directSource[n]=ue().createBufferSource(),e.directSource[n].buffer=a,e.directSource[n].connect(ue().destination)}),e.directSource.forEach(function(a){a.start(0,i)}),e.onEnded&&(e.directSource[0].onended=function(){e.onEnded(e.callbackContext)})};function r(i,a,n,s){if(!(n.den!==4&&n.den!==8)&&(a=parseFloat(a),!(isNaN(a)||a<=50))){a>75&&(a=75),a=a/50-1;var o=0,c=.25;n.den===8&&(c=c/2);for(var h=c/2,d=h*a,f=0;f<i.length;f++)for(var l=i[f],u=0;u<l.length;u++){var p=l[u];if((p.start-s)%h===0&&(p.start-s)%c!==0&&(u===0||l[u-1].start<=l[u].start-h)&&(u===l.length-1||l[u+1].start>=l[u].start+h)){var g=p.start;p.start+=d,p.volume*=1+o,u>0&&l[u-1].end===g&&(l[u-1].end=p.start,l[u-1].volume*=1-o)}}}}}ol.exports=Ug});var Ha=P((_5,cl)=>{"use strict";var jg=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,r){e.tracks[t].push({channel:0,cmd:"program",instrument:r}),e.currentInstrument[t]=r},e.appendNote=function(t,r,i,a,n){var s={cmd:"note",duration:i,gap:0,instrument:e.currentInstrument[t],pitch:r,start:e.starts[t],volume:a};n&&(s.cents=n),e.tracks[t].push(s),e.starts[t]+=i,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}};cl.exports=jg});var hl=P((S5,ll)=>{"use strict";var Vg=`
|
|
41
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">
|
|
42
|
+
<g transform="translate(0,700) scale(0.1,-0.1)" >
|
|
43
|
+
<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55
|
|
44
|
+
-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128
|
|
45
|
+
-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79
|
|
46
|
+
-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60
|
|
47
|
+
-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507
|
|
48
|
+
-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21
|
|
49
|
+
-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12
|
|
50
|
+
-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33
|
|
51
|
+
-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0
|
|
52
|
+
-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51
|
|
53
|
+
153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48
|
|
54
|
+
107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57
|
|
55
|
+
74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52
|
|
56
|
+
100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45
|
|
57
|
+
143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29
|
|
58
|
+
165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34
|
|
59
|
+
115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33
|
|
60
|
+
-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90
|
|
61
|
+
-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138
|
|
62
|
+
115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191
|
|
63
|
+
50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21
|
|
64
|
+
7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17
|
|
65
|
+
-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10
|
|
66
|
+
-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66
|
|
67
|
+
50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73
|
|
68
|
+
39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53
|
|
69
|
+
-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43
|
|
70
|
+
-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339
|
|
71
|
+
-19z"></path>
|
|
72
|
+
<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0
|
|
73
|
+
-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72
|
|
74
|
+
l69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279
|
|
75
|
+
268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74
|
|
76
|
+
-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19
|
|
77
|
+
-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31
|
|
78
|
+
93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59
|
|
79
|
+
62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89
|
|
80
|
+
89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146
|
|
81
|
+
67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56
|
|
82
|
+
31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64
|
|
83
|
+
48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22
|
|
84
|
+
25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14
|
|
85
|
+
18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50
|
|
86
|
+
47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138
|
|
87
|
+
-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10
|
|
88
|
+
-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20
|
|
89
|
+
-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19
|
|
90
|
+
-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25
|
|
91
|
+
-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18
|
|
92
|
+
-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11
|
|
93
|
+
-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168
|
|
94
|
+
16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71
|
|
95
|
+
37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108
|
|
96
|
+
63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65
|
|
97
|
+
61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86
|
|
98
|
+
12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030
|
|
99
|
+
0 -1086 -11z"></path>
|
|
100
|
+
</g>
|
|
101
|
+
</svg>
|
|
102
|
+
`;ll.exports=Vg});var ul=P((E5,fl)=>{"use strict";var Kg=`
|
|
103
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">
|
|
104
|
+
<g>
|
|
105
|
+
<polygon points="4 0 23 12.5 4 25"/>
|
|
106
|
+
</g>
|
|
107
|
+
</svg>
|
|
108
|
+
`;fl.exports=Kg});var pl=P((M5,dl)=>{"use strict";var $g=`
|
|
109
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">
|
|
110
|
+
<g>
|
|
111
|
+
<rect width="8.23" height="25"/>
|
|
112
|
+
<rect width="8.23" height="25" x="17"/>
|
|
113
|
+
</g>
|
|
114
|
+
</svg>
|
|
115
|
+
`;dl.exports=$g});var vl=P((A5,gl)=>{"use strict";var Qg=`
|
|
116
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">
|
|
117
|
+
<circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>
|
|
118
|
+
</svg>
|
|
119
|
+
`;gl.exports=Qg});var ml=P((B5,bl)=>{"use strict";var Jg=`
|
|
120
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">
|
|
121
|
+
<g>
|
|
122
|
+
<polygon points="5 12.5 24 0 24 25"/>
|
|
123
|
+
<rect width="3" height="25" x="0" y="0"/>
|
|
124
|
+
</g>
|
|
125
|
+
</svg>
|
|
126
|
+
`;bl.exports=Jg});var Ra=P((N5,wl)=>{"use strict";var Zg=Nt(),yl=Bt(),Lt=z0(),ev=hl(),tv=ul(),rv=pl(),av=vl(),iv=ml();function nv(e,t){var r=this;if(typeof e=="string"){var i=e;if(e=document.querySelector(i),!e)throw new Error('Cannot find element "'+i+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(r.parent=e,r.options={},t&&(r.options=Object.assign({},t)),r.options.ac&&yl(r.options.ac),sv(r.parent,r.options),ov(r),r.disable=function(n){var s=r.parent.querySelector(".abcjs-inline-audio");n?s.classList.add("abcjs-disabled"):s.classList.remove("abcjs-disabled")},r.setWarp=function(n,s){var o=r.parent.querySelector(".abcjs-midi-tempo");o.value=Math.round(s),r.setTempo(n)},r.setTempo=function(n){var s=r.parent.querySelector(".abcjs-midi-current-tempo");s&&(s.innerHTML=Math.round(n))},r.resetAll=function(){for(var n=r.parent.querySelectorAll(".abcjs-pushed"),s=0;s<n.length;s++){var o=n[s];o.classList.remove("abcjs-pushed")}},r.pushPlay=function(n){var s=r.parent.querySelector(".abcjs-midi-start");s&&(n?s.classList.add("abcjs-pushed"):s.classList.remove("abcjs-pushed"))},r.pushLoop=function(n){var s=r.parent.querySelector(".abcjs-midi-loop");s&&(n?s.classList.add("abcjs-pushed"):s.classList.remove("abcjs-pushed"))},r.setProgress=function(n,s){var o=r.parent.querySelector(".abcjs-midi-progress-background"),c=r.parent.querySelector(".abcjs-midi-progress-indicator");if(!(!o||!c)){var h=o.clientWidth,d=h*n;c.style.left=d+"px";var f=r.parent.querySelector(".abcjs-midi-clock");if(f){var l=s*n/1e3,u=Math.floor(l/60),p=Math.floor(l%60),g=p<10?"0"+p:p;f.innerHTML=u+":"+g}}},r.options.afterResume){var a=!1;r.options.ac?a=r.options.ac.state!=="suspended":Lt()&&(a=Lt().state!=="suspended"),a&&r.options.afterResume()}}function sv(e,t){var r=!!t.loopHandler,i=!!t.restartHandler,a=!!t.playHandler||!!t.playPromiseHandler,n=!!t.progressHandler,s=!!t.warpHandler,o=t.hasClock!==!1,c=`<div class="abcjs-inline-audio">
|
|
127
|
+
`;if(r){var h=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.",d=t.repeatAria?t.repeatAria:h;c+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+h+'" aria-label="'+d+'">'+ev+`</button>
|
|
128
|
+
`}if(i){var f=t.restartTitle?t.restartTitle:"Click to go to beginning.",l=t.restartAria?t.restartAria:f;c+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+f+'" aria-label="'+l+'">'+iv+`</button>
|
|
129
|
+
`}if(a){var u=t.playTitle?t.playTitle:"Click to play/pause.",p=t.playAria?t.playAria:u;c+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+u+'" aria-label="'+p+'">'+tv+rv+av+`</button>
|
|
130
|
+
`}if(n){var g=t.randomTitle?t.randomTitle:"Click to change the playback position.",v=t.randomAria?t.randomAria:g;c+='<button type="button" class="abcjs-midi-progress-background" title="'+g+'" aria-label="'+v+`"><span class="abcjs-midi-progress-indicator"></span></button>
|
|
131
|
+
`}if(o&&(c+=`<span class="abcjs-midi-clock"></span>
|
|
132
|
+
`),s){var m=t.warpTitle?t.warpTitle:"Change the playback speed.",y=t.warpAria?t.warpAria:m,k=t.bpm?t.bpm:"BPM";c+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+m+'" aria-label="'+y+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+k+`)</span></span>
|
|
133
|
+
`}c+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',c+=`</div>
|
|
134
|
+
`,e.innerHTML=c}function Pt(e,t,r,i,a){var n=!0;if(Lt()?n=Lt().state==="suspended":yl(),!Zg())throw{status:"NotSupported",message:"This browser does not support audio."};(n||a)&&r&&r.classList.add("abcjs-loading"),n?Lt().resume().then(function(){i?i().then(function(s){za(e,t,r,a)}):za(e,t,r,a)}):za(e,t,r,a)}function za(e,t,r,i){i?e(t).then(function(){r&&r.classList.remove("abcjs-loading")}):(e(t),r&&r.classList.remove("abcjs-loading"))}function ov(e){var t=!!e.options.loopHandler,r=!!e.options.restartHandler,i=!!e.options.playHandler||!!e.options.playPromiseHandler,a=!!e.options.progressHandler,n=!!e.options.warpHandler,s=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(o){Pt(e.options.loopHandler,o,s,e.options.afterResume)}),r&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(o){Pt(e.options.restartHandler,o,s,e.options.afterResume)}),i&&s.addEventListener("click",function(o){Pt(e.options.playPromiseHandler||e.options.playHandler,o,s,e.options.afterResume,!!e.options.playPromiseHandler)}),a&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(o){Pt(e.options.progressHandler,o,s,e.options.afterResume)}),n&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(o){Pt(e.options.warpHandler,o,s,e.options.afterResume)})}wl.exports=nv});var kl=P((P5,Cl)=>{"use strict";var cv=Ha(),lv=Er(),hv=z0();function fv(e,t,r,i,a){for(var n=new cv,s=0;s<e.length;s++){var o=e[s],c=n.addTrack();if(n.setInstrument(c,o.instrument),s===0&&t)for(var h=0;h<t.length;h++){var d=t[h];n.appendNote(c,d.pitch,1/64,d.volume,d.cents)}n.appendNote(c,o.pitch,o.duration,o.volume,o.cents)}var f=hv();return f.state==="suspended"?f.resume().then(function(){return xl(n,r,i,a)}):xl(n,r,i,a)}function xl(e,t,r,i){var a=new lv;return a.init({sequence:e,millisecondsPerMeasure:t,options:{soundFontUrl:r},debugCallback:i}).then(function(){return a.prime()}).then(function(){return a.start(),Promise.resolve()})}Cl.exports=fv});var Ga=P((L5,_l)=>{"use strict";var uv=Ra(),dv=Er(),pv=Dt(),Tl=z0();function gv(){var e=this;e.warp=100,e.cursorControl=null,e.visualObj=null,e.timer=null,e.midiBuffer=null,e.options=null,e.currentTempo=null,e.control=null,e.isLooping=!1,e.isStarted=!1,e.isLoaded=!1,e.isLoading=!1,e.load=function(r,i,a){a||(a={}),a.displayPlay===void 0&&(a.displayPlay=!0),a.displayProgress===void 0&&(a.displayProgress=!0),e.control=new uv(r,{loopHandler:a.displayLoop?e.toggleLoop:void 0,restartHandler:a.displayRestart?e.restart:void 0,playPromiseHandler:a.displayPlay?e.play:void 0,progressHandler:a.displayProgress?e.randomAccess:void 0,warpHandler:a.displayWarp?e.onWarp:void 0,afterResume:e.init}),e.cursorControl=i,e.disable(!0)},e.disable=function(r){e.control&&e.control.disable(r)},e.setTune=function(r,i,a){return e.visualObj=r,e.disable(!1),e.options=a||{},e.control&&(e.pause(),e.setProgress(0,1),e.control.resetAll(),e.restart(),e.isStarted=!1),e.isLooping=!1,i?e.go():Promise.resolve({status:"no-audio-context"})},e.go=function(){e.isLoading=!0;var r=e.visualObj.millisecondsPerMeasure()*100/e.warp;e.currentTempo=Math.round(e.visualObj.getBeatsPerMeasure()/r*6e4),e.control&&e.control.setTempo(e.currentTempo),e.percent=0;var i;return e.midiBuffer||(e.midiBuffer=new dv),Tl().resume().then(function(a){return e.midiBuffer.init({visualObj:e.visualObj,options:e.options,millisecondsPerMeasure:r})}).then(function(a){return i=a,e.midiBuffer.prime()}).then(function(){var a=16;return e.cursorControl&&e.cursorControl.beatSubdivisions!==void 0&&parseInt(e.cursorControl.beatSubdivisions,10)>=1&&parseInt(e.cursorControl.beatSubdivisions,10)<=64&&(a=parseInt(e.cursorControl.beatSubdivisions,10)),e.timer=new pv(e.visualObj,{beatCallback:e.beatCallback,eventCallback:e.eventCallback,lineEndCallback:e.lineEndCallback,qpm:e.currentTempo,extraMeasuresAtBeginning:e.cursorControl?e.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:e.cursorControl?e.cursorControl.lineEndAnticipation:0,beatSubdivisions:a}),e.cursorControl&&e.cursorControl.onReady&&typeof e.cursorControl.onReady=="function"&&e.cursorControl.onReady(e),e.isLoaded=!0,e.isLoading=!1,Promise.resolve({status:"created",notesStatus:i})})},e.destroy=function(){e.timer&&(e.timer.reset(),e.timer.stop(),e.timer=null),e.midiBuffer&&(e.midiBuffer.stop(),e.midiBuffer=null),e.setProgress(0,1),e.control&&e.control.resetAll()},e.play=function(){return e.runWhenReady(e._play,void 0)};function t(r){return new Promise(function(i){setTimeout(i,r)})}e.runWhenReady=function(r,i){return e.visualObj?e.isLoading?t(500).then(function(){return e.isLoading?e.runWhenReady(r,i):r(i)}):e.isLoaded?r(i):e.go().then(function(){return r(i)}):Promise.resolve({status:"loading"})},e._play=function(){return Tl().resume().then(function(){return e.isStarted=!e.isStarted,e.isStarted?(e.cursorControl&&e.cursorControl.onStart&&typeof e.cursorControl.onStart=="function"&&e.cursorControl.onStart(),e.midiBuffer.start(),e.timer.start(e.percent),e.control&&e.control.pushPlay(!0)):e.pause(),Promise.resolve({status:"ok"})})},e.pause=function(){e.timer&&(e.timer.pause(),e.midiBuffer.pause(),e.control&&e.control.pushPlay(!1))},e.toggleLoop=function(){e.isLooping=!e.isLooping,e.control&&e.control.pushLoop(e.isLooping)},e.restart=function(){e.timer&&(e.timer.setProgress(0),e.midiBuffer.seek(0))},e.randomAccess=function(r){return e.runWhenReady(e._randomAccess,r)},e._randomAccess=function(r){var i=r.target.classList.contains("abcjs-midi-progress-indicator")?r.target.parentNode:r.target,a=(r.x-i.getBoundingClientRect().left)/i.offsetWidth;return a<0&&(a=0),a>1&&(a=1),e.seek(a),Promise.resolve({status:"ok"})},e.seek=function(r,i){e.timer&&e.midiBuffer&&(e.timer.setProgress(r,i),e.midiBuffer.seek(r,i))},e.setWarp=function(r){if(parseInt(r,10)>0){e.warp=parseInt(r,10);var i=e.isStarted,a=e.percent;return e.destroy(),e.isStarted=!1,e.go().then(function(){return e.setProgress(a,e.midiBuffer.duration*1e3),e.control&&e.control.setWarp(e.currentTempo,e.warp),i?e.play().then(function(){return e.seek(a),Promise.resolve()}):(e.seek(a),Promise.resolve())})}return Promise.resolve()},e.onWarp=function(r){var i=r.target.value;return e.setWarp(i)},e.setProgress=function(r,i){e.percent=r,e.control&&e.control.setProgress(r,i)},e.finished=function(){if(e.timer.reset(),e.isLooping)return e.timer.start(0),e.midiBuffer.finished(),e.midiBuffer.start(),"continue";e.timer.stop(),e.isStarted&&(e.control&&e.control.pushPlay(!1),e.isStarted=!1,e.midiBuffer.finished(),e.cursorControl&&e.cursorControl.onFinished&&typeof e.cursorControl.onFinished=="function"&&e.cursorControl.onFinished(),e.setProgress(0,1))},e.beatCallback=function(r,i,a,n){var s=r/i;e.setProgress(s,a),e.cursorControl&&e.cursorControl.onBeat&&typeof e.cursorControl.onBeat=="function"&&e.cursorControl.onBeat(r,i,a,n)},e.eventCallback=function(r){if(r)e.cursorControl&&e.cursorControl.onEvent&&typeof e.cursorControl.onEvent=="function"&&e.cursorControl.onEvent(r);else return e.finished()},e.lineEndCallback=function(r,i){e.cursorControl&&e.cursorControl.onLineEnd&&typeof e.cursorControl.onLineEnd=="function"&&e.cursorControl.onLineEnd(r,i)},e.getUrl=function(){return e.midiBuffer.download()},e.download=function(r){var i=e.getUrl(),a=document.createElement("a");document.body.appendChild(a),a.setAttribute("style","display: none;"),a.href=i,a.download=r||"output.wav",a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a)}}_l.exports=gv});var Ya=P((q5,El)=>{"use strict";var vv=Fa(),Sl;(function(){"use strict";function e(d,f){for(var l in f)f.hasOwnProperty(l)&&d.setAttribute(l,f[l]);return d}function t(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}t.prototype.setTempo=function(d){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+o(Math.round(6e7/d),6),this.endTrack())},t.prototype.setGlobalInfo=function(d,f,l,u){if(this.trackcount===0){this.startTrack();var p=Math.round(6e7/d);this.track+="%00%FF%51%03"+o(p,6),l&&(this.track+=a(l)),u&&(this.track+=n(u)),f&&(this.track+=i(f,"%01")),this.endTrack()}},t.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},t.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var d=o(this.track.length/3+4,8);this.track="MTrk"+d+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},t.prototype.setText=function(d,f){d==="name"&&(this.trackName=i(f,"%03"))},t.prototype.setInstrument=function(d){this.trackInstrument="%00%C0"+o(d,2),this.instrument=d},t.prototype.setChannel=function(d,f){this.channel=d;var l="%00%B"+this.channel.toString(16);this.track+=l+"%79%00",this.track+=l+"%40%00",this.track+=l+"%5B%30",f||(f=0),f=Math.round((f+1)*64),this.track+=l+"%0A"+o(f,2),this.track+=l+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var r=4096;t.prototype.startNote=function(d,f,l){if(this.track+=h(this.silencelength),this.silencelength=0,l){this.track+="%e"+this.channel.toString(16);var u=Math.round(vv(l)*r);this.track+=c(8192+u),this.track+=h(0),this.noteWarped[d]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+d.toString(16)+o(f,2)},t.prototype.endNote=function(d){this.track+=h(this.silencelength),this.silencelength=0,this.noteWarped[d]&&(this.track+="%e"+this.channel.toString(16),this.track+=c(8192),this.track+=h(0),this.noteWarped[d]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+d.toString(16)+"%00"},t.prototype.addRest=function(d){this.silencelength+=d,this.silencelength<0&&(this.silencelength=0)},t.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+o(this.trackcount,4)+"%01%e0"+this.trackstrings},t.prototype.embed=function(d,f){var l=this.getData(),u=e(document.createElement("a"),{href:l});if(u.innerHTML="download midi",d.insertBefore(u,d.firstChild),!f){var p=e(document.createElement("embed"),{src:l,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});d.insertBefore(p,d.firstChild)}};function i(d,f){for(var l="",u=0;u<d.length;u++)l+=o(d.charCodeAt(u),2);return"%00%FF"+f+o(l.length/3,2)+l}function a(d){if(!d||!d.accidentals)return"";for(var f="%00%FF%59%02",l=0,u=256,p=0;p<d.accidentals.length;p++)d.accidentals[p].acc==="sharp"?l++:d.accidentals[p].acc==="flat"&&u--;var g=o(u!==256?u:l,2),v=d.mode==="m"?"%01":"%00";return f+g+v}function n(d){var f="%00%FF%58%04"+o(d.num,2),l={1:0,2:1,4:2,8:3,16:4,32:5},u=l[d.den];if(!u)return"";f+=o(u,2);var p;switch(d.num+"/"+d.den){case"2/4":case"3/4":case"4/4":case"5/4":p=24;break;case"6/4":p=72;break;case"2/2":case"3/2":case"4/2":p=48;break;case"3/8":case"6/8":case"9/8":case"12/8":p=36;break}return p?(f+=o(p,2),f+"%08"):""}function s(d){for(var f="",l=0;l<d.length;l+=2)f+="%",f+=d.substr(l,2);return f}function o(d,f){var l=d.toString(16);for(l=l.split(".")[0];l.length<f;)l="0"+l;return l.length>f&&(l=l.substring(0,f)),s(l)}function c(d){d=Math.round(d);var f=d%128,l=d-f;return o(l*2+f,4)}function h(d){var f=0,l=[];for(d=Math.round(d);d!==0;)l.push(d&127),d=d>>7;for(var u=l.length-1;u>=0;u--){f=f<<8;var p=l[u];u!==0&&(p=p|128),f=f|p}var g=f.toString(16).length;return g+=g%2,o(f,g)}Sl=function(){return new t}})();El.exports=Sl});var Bl=P((D5,Al)=>{"use strict";var bv=Ya(),Ml;(function(){"use strict";var e=1920;Ml=function(i,a){a===void 0&&(a={});var n=i.setUpAudio(a),s=bv(),o=i.metaText?i.metaText.title:void 0;o&&o.length>128&&(o=o.substring(0,124)+"...");var c=i.getKeySignature(),h=i.getMeterFraction(),d=n.tempo,f=d/60;if(h.den===8&&h.num!==5&&h.num!==7){var l=i.millisecondsPerMeasure();d=6e4/(l/h.num)/2,f=d/60}s.setGlobalInfo(d,o,c,h);for(var u=0;u<n.tracks.length;u++){s.startTrack();for(var p={},g=0;g<n.tracks[u].length;g++){var v=n.tracks[u][g];switch(v.cmd){case"text":s.setText(v.type,v.text);break;case"program":var m=0;a.pan&&a.pan.length>u&&(m=a.pan[u]),v.instrument===128?(s.setChannel(9,m),s.setInstrument(0)):(s.setChannel(v.channel,m),s.setInstrument(v.instrument));break;case"note":var y=v.gap*f,k=v.start,b=k+v.duration-y;p[k]||(p[k]=[]),p[k].push({pitch:v.pitch,volume:v.volume,cents:v.cents}),p[b]||(p[b]=[]),p[b].push({pitch:v.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+v.cmd)}}t(s,p,e),s.endTrack()}return s.getData()};function t(r,i,a){for(var n=Object.keys(i),s=0;s<n.length;s++)n[s]=parseFloat(n[s]);n.sort(function(u,p){return u-p});for(var o=0,c=0;c<n.length;c++){var h=i[n[c]];if(n[c]>o){var d=(n[c]-o)*a;r.addRest(d),o=n[c]}for(var f=0;f<h.length;f++){var l=h[f];l.volume?r.startNote(l.pitch,l.volume,l.cents):r.endNote(l.pitch)}}}})();Al.exports=Ml});var Pl=P((I5,Nl)=>{"use strict";var mv=bt(),yv=Bl(),wv=function(e,t){var r={};if(t)for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.generateInline=!1;function a(n,s,o){var c=yv(s,r);switch(r.midiOutputType){case"encoded":return c;case"binary":var h=c.replace("data:audio/midi,","");h=h.replace(/MThd/g,"%4d%54%68%64"),h=h.replace(/MTrk/g,"%4d%54%72%6b");for(var d=new ArrayBuffer(h.length/3),f=new Uint8Array(d),l=0;l<h.length/3;l++){var u=l*3+1,p=parseInt(h.substring(u,u+2),16);f[l]=p}return f;default:return Cv(s,r,c,o)}}return typeof e=="string"?mv.renderEngine(a,"*",e,r):a(null,e,0)};function xv(e){var t={};return e&&t.toString.call(e)==="[object Function]"}var Cv=function(e,t,r,i){var a=["abcjs-download-midi","abcjs-midi-"+i];t.downloadClass&&a.push(t.downloadClass);var n='<div class="'+a.join(" ")+'">';t.preTextDownload&&(n+=t.preTextDownload);var s=e.metaText&&e.metaText.title?e.metaText.title:"Untitled",o;t.downloadLabel&&xv(t.downloadLabel)?o=t.downloadLabel(e,i):t.downloadLabel?o=t.downloadLabel.replace(/%T/,s):o='Download MIDI for "'+s+'"',s=s.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var c=t.fileName?t.fileName:s+".midi";return n+='<a download="'+c+'" href="'+r+'">'+o+"</a>",t.postTextDownload&&(n+=t.postTextDownload),n+"</div>"};Nl.exports=wv});var Xa=P((O5,Ll)=>{"use strict";try{typeof window.CustomEvent!="function"&&(Wa=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},Wa.prototype=window.Event.prototype,window.CustomEvent=Wa)}catch(e){}var Wa,M0=function(e){this.isEditArea=!0,typeof e=="string"?(this.textarea=document.getElementById(e),this.textarea||(this.textarea=document.querySelector(e))):this.textarea=e,this.initialText=this.textarea.value,this.isDragging=!1};M0.prototype.addSelectionListener=function(e){this.textarea.onmousemove=function(t){this.isDragging&&e.fireSelectionChanged()}};M0.prototype.addChangeListener=function(e){this.changelistener=e,this.textarea.onkeyup=function(){e.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,e.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,e.fireChanged()},this.textarea.onchange=function(){e.fireChanged()}};M0.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}};M0.prototype.setSelection=function(e,t){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(e,t);else if(this.textarea.createTextRange){var r=this.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",t),r.moveStart("character",e),r.select()}this.textarea.focus()};M0.prototype.getString=function(){return this.textarea.value};M0.prototype.setString=function(e){this.textarea.value=e,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()};M0.prototype.getElem=function(){return this.textarea};Ll.exports=M0});var Ol=P((F5,Il)=>{"use strict";var Dl=Qe(),kv=Ga(),Tv=Nt(),_v=Da(),ql=Xa();function Sv(e){var t={},r;if(e.abcjsParams)for(r in e.abcjsParams)e.abcjsParams.hasOwnProperty(r)&&(t[r]=e.abcjsParams[r]);if(e.midi_options)for(r in e.midi_options)e.midi_options.hasOwnProperty(r)&&(t[r]=e.midi_options[r]);if(e.parser_options)for(r in e.parser_options)e.parser_options.hasOwnProperty(r)&&(t[r]=e.parser_options[r]);if(e.render_options)for(r in e.render_options)e.render_options.hasOwnProperty(r)&&(t[r]=e.render_options[r]);return t.tablature&&e.warnings_id&&(t.tablature.warnings_id=e.warnings_id),t}var _e=function(e,t){this.abcjsParams=Sv(t),t.indicate_changed&&(this.indicate_changed=!0),typeof e=="string"?this.editarea=new ql(e):e.isEditArea?this.editarea=e:this.editarea=new ql(e),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),t.canvas_id?this.div=t.canvas_id:t.paper_id?this.div=t.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),t.selectionChangeCallback&&(this.selectionChangeCallback=t.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),t.synth&&Tv()&&(this.synth={el:t.synth.el,cursorControl:t.synth.cursorControl,options:t.synth.options}),t.generate_midi&&(this.generate_midi=t.generate_midi,this.abcjsParams.generateDownload&&(typeof t.midi_download_id=="string"?this.downloadMidi=document.getElementById(t.midi_download_id):t.midi_download_id&&(this.downloadMidi=t.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof t.midi_id=="string"?this.inlineMidi=document.getElementById(t.midi_id):t.midi_id&&(this.inlineMidi=t.midi_id))),t.warnings_id?typeof t.warnings_id=="string"?this.warningsdiv=document.getElementById(t.warnings_id):this.warningsdiv=t.warnings_id:t.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=t.onchange,this.redrawCallback=t.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(r,i){var a=function(n,s){var o=n.className;return o.length>0&&(o===s||new RegExp("(^|\\s)"+s+"(\\s|$)").test(o))};return a(r,i)||(r.className+=(r.className?" ":"")+i),r},this.removeClassName=function(r,i){return r.className=Dl.strip(r.className.replace(new RegExp("(^|\\s+)"+i+"(\\s+|$)")," ")),r},this.setReadOnly=function(r){var i="abc_textarea_readonly",a=this.editarea.getElem();r?(a.setAttribute("readonly","yes"),this.addClassName(a,i)):(a.removeAttribute("readonly"),this.removeClassName(a,i))}};_e.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var t=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new kv,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],t,this.synth.options)}};_e.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=_v(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}};_e.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()};_e.prototype.getTunes=function(){return this.tunes};_e.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}};_e.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)};_e.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(t){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)};_e.prototype.fireSelectionChanged=function(){this.updateSelection()};_e.prototype.setDirtyStyle=function(e){if(this.indicate_changed!==void 0){var t=function(n,s){var o=function(c,h){var d=c.className;return d.length>0&&(d===h||new RegExp("(^|\\s)"+h+"(\\s|$)").test(d))};return o(n,s)||(n.className+=(n.className?" ":"")+s),n},r=function(n,s){return n.className=Dl.strip(n.className.replace(new RegExp("(^|\\s+)"+s+"(\\s+|$)")," ")),n},i="abc_textarea_dirty",a=this.editarea.getElem();e?t(a,i):r(a,i)}};_e.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){e.modelChanged()},300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}};_e.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)};_e.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()};_e.prototype.highlight=function(e,t,r,i,a,n){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,r,i,a,n)};_e.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()};_e.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()};_e.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()};Il.exports=_e});var Rl=P((H5,zl)=>{"use strict";var Ev=Za(),Fl=ri(),Hl=bt(),Mv=Yr(),Av=ns(),He={};He.signature="abcjs-basic v"+Ev;Object.keys(Fl).forEach(function(e){He[e]=Fl[e]});Object.keys(Hl).forEach(function(e){He[e]=Hl[e]});He.renderAbc=Da();He.tuneMetrics=R1();He.TimingCallbacks=Dt();var Bv=v0();He.setGlyph=Bv.setSymbol;He.strTranspose=Av;var Nv=Er(),Pv=Tr(),Lv=_r(),qv=Ha(),Dv=Ra(),Iv=Bt(),Ov=z0(),Fv=Nt(),Hv=kl(),zv=Ga(),Rv=Pl(),Gv=Ya();He.synth={CreateSynth:Nv,instrumentIndexToName:Pv,pitchToNoteName:Lv,SynthController:zv,SynthSequence:qv,CreateSynthControl:Dv,registerAudioContext:Iv,activeAudioContext:Ov,supportsAudio:Fv,playEvent:Hv,getMidiFile:Rv,sequence:Mv,midiRenderer:Gv};He.Editor=Ol();He.EditArea=Xa();He.test={Parse:Qt(),EngraverController:xr()};zl.exports=He});var Vv={};eh(Vv,{default:()=>jv});var Va=th(Rl(),1);var Ua={d:[["M",9.3,.09],["c",0,-.12,-.31,-.28,-.37,-.31],["l",-8.83,-4.65],["c",-.06,0,-.09,.03,-.09,.06],["l",0,19.28],["c",0,.09,.06,.16,.16,.16],["l",.81,0],["c",.09,0,.16,-.06,.16,-.15],["l",0,-10.32],["l",7.81,-3.69],["c",.06,-.03,.37,-.19,.37,-.37],["z"],["m",-8.18,2.85],["l",0,-6.04],["l",5.92,3.26],["z"]],w:9.3,h:19.5},ja={d:[["M",13.05,-.22],["c",0,-.12,-.31,-.25,-.37,-.28],["l",-4.46,-1.86],["l",0,-7.66],["c",0,-.09,-.06,-.15,-.15,-.15],["l",-.81,0],["c",-.09,0,-.15,.06,-.15,.16],["l",0,7.16],["l",-3.16,-1.33],["l",0,-4.96],["c",0,-.09,-.06,-.15,-.15,-.15],["l",-.81,0],["c",-.09,0,-.15,.06,-.15,.16],["l",0,4.5],["l",-2.76,-1.15],["c",-.06,0,-.06,.06,-.06,.09],["l",0,.9],["c",0,.16,0,.19,.06,.22],["l",2.76,1.15],["l",0,6.67],["l",-2.76,1.15],["c",-.06,.03,-.06,.06,-.06,.19],["l",0,.93],["c",0,.06,.03,.09,.06,.09],["l",2.76,-1.18],["l",0,5.3],["c",0,.09,.06,.16,.16,.16],["l",.81,0],["c",.09,0,.16,-.06,.16,-.15],["l",0,-5.77],["l",3.16,-1.36],["l",0,6.26],["c",0,.09,.06,.16,.16,.16],["l",.81,0],["c",.09,0,.16,-.06,.16,-.15],["l",0,-6.73],["l",4.46,-1.92],["c",.06,0,.37,-.19,.37,-.4],["z"],["m",-9.11,2.98],["l",0,-5.73],["l",3.16,1.33],["l",0,3.07],["z"],["m",4.28,-1.8],["l",0,-2.14],["l",2.57,1.05],["z"]],w:13.05,h:20.03};var Gl,Ee=(Gl=Va.default)!=null?Gl:Va,Yl="_/",Wl="^/";function Xl(){Ee.setGlyph("accidentals.halfflat",Ua),Ee.setGlyph("accidentals.halfsharp",ja)}Xl();function Yv(e){return Yl+e}function Wv(e){return Wl+e}var G5=Ee.renderAbc,Y5=Ee.parseOnly,W5=Ee.tuneMetrics,X5=Ee.numberOfTunes,U5=Ee.extractMeasures,j5=Ee.strTranspose,V5=Ee.setGlyph,K5=Ee.TimingCallbacks,$5=Ee.synth,Q5=Ee.Editor,J5=Ee.EditArea,Z5=Ee.TuneBook,Xv="abcfajs v0.1.0 ("+Ee.signature+")",Uv={...Ee,signature:Xv,KORON:Yl,SORI:Wl,KORON_GLYPH:Ua,SORI_GLYPH:ja,koron:Yv,sori:Wv,installPersianAccidentals:Xl},Ul=Uv;var jv=Ul;return rh(Vv);})();
|
|
135
|
+
ABCJS=ABCJS.default;
|