vexflow
Version:
A JavaScript library for rendering music notation and guitar tablature
1 lines • 754 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Vex=e():t.Vex=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){var e="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return l(t,arguments,c(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),u(i,t)})(t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function l(t,e,n){return(l=s()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&u(o,n.prototype),o}).apply(null,arguments)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.r(e);var h=function(){};function f(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function p(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}h.L=function(t,e){if(e){var n=Array.prototype.slice.call(e).join(" ");window.console.log(t+": "+n)}},h.MakeException=function(t){return function(e){function n(e,i){var o;return r(this,n),(o=b(this,c(n).call(this,e))).name=t,o.message=e,o.data=i,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(n,e),n}(a(Error))},h.RERR=h.RuntimeError=function(){function t(e,n){r(this,t),this.code=e,this.message=n}var e,n,i;return e=t,(n=[{key:"toString",value:function(){return"[RuntimeError] "+this.code+":"+this.message}}])&&o(e.prototype,n),i&&o(e,i),t}(),h.Merge=function(t,e){for(var n in e)t[n]=e[n];return t},h.Min=Math.min,h.Max=Math.max,h.forEach=function(t,e){for(var n=0;n<t.length;n++)e(t[n],n)},h.RoundN=function(t,e){return t%e>=e/2?parseInt(t/e,10)*e+e:parseInt(t/e,10)*e},h.MidLine=function(t,e){var n=e+(t-e)/2;return n%2>0&&(n=h.RoundN(10*n,5)/10),n},h.SortAndUnique=function(t,e,n){if(t.length>1){var i,o=[];t.sort(e);for(var r=0;r<t.length;++r)0!==r&&n(t[r],i)||o.push(t[r]),i=t[r];return o}return t},h.Contains=function(t,e){for(var n=t.length;n--;)if(t[n]===e)return!0;return!1},h.getCanvasContext=function(t){if(!t)throw new h.RERR("BadArgument","Invalid canvas selector: "+t);var e=document.getElementById(t);if(!e||!e.getContext)throw new h.RERR("UnsupportedBrowserError","This browser does not support HTML5 Canvas");return e.getContext("2d")},h.drawDot=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#55";t.save(),t.setFillStyle(i),t.beginPath(),t.arc(e,n,3,0,2*Math.PI,!0),t.closePath(),t.fill(),t.restore()},h.BM=function(t,e){var n=(new Date).getTime();e();var i=(new Date).getTime()-n;h.L(t+i+"ms")},h.StackTrace=function(){return(new Error).stack},h.W=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e.join(" ");window.console.log("Warning: ",i,h.StackTrace())},(h.Prefix=function(t){return h.Prefix.prefix+t}).prefix="vf-";var m=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.set(e,n)}return p(t,null,[{key:"GCD",value:function(t,e){if("number"!=typeof t||"number"!=typeof e)throw new h.RERR("BadArgument","Invalid numbers: ".concat(t,", ").concat(e));for(var n;0!==e;)n=e,e=t%e,t=n;return t}},{key:"LCM",value:function(e,n){return e*n/t.GCD(e,n)}},{key:"LCMM",value:function(e){if(0===e.length)return 0;if(1===e.length)return e[0];if(2===e.length)return t.LCM(e[0],e[1]);var n=e[0];return e.shift(),t.LCM(n,t.LCMM(e))}}]),p(t,[{key:"set",value:function(t,e){return this.numerator=void 0===t?1:t,this.denominator=void 0===e?1:e,this}},{key:"value",value:function(){return this.numerator/this.denominator}},{key:"simplify",value:function(){var e=this.numerator,n=this.denominator,i=t.GCD(e,n);return e/=i,(n/=i)<0&&(n=-n,e=-e),this.set(e,n)}},{key:"add",value:function(e,n){var i,o;e instanceof t?(i=e.numerator,o=e.denominator):(i=void 0!==e?e:0,o=void 0!==n?n:1);var r=t.LCM(this.denominator,o),b=r/this.denominator,a=r/o,s=this.numerator*b+i*a;return this.set(s,r)}},{key:"subtract",value:function(e,n){var i,o;e instanceof t?(i=e.numerator,o=e.denominator):(i=void 0!==e?e:0,o=void 0!==n?n:1);var r=t.LCM(this.denominator,o),b=r/this.denominator,a=r/o,s=this.numerator*b-i*a;return this.set(s,r)}},{key:"multiply",value:function(e,n){var i,o;return e instanceof t?(i=e.numerator,o=e.denominator):(i=void 0!==e?e:1,o=void 0!==n?n:1),this.set(this.numerator*i,this.denominator*o)}},{key:"divide",value:function(e,n){var i,o;return e instanceof t?(i=e.numerator,o=e.denominator):(i=void 0!==e?e:1,o=void 0!==n?n:1),this.set(this.numerator*o,this.denominator*i)}},{key:"equals",value:function(e){var n=t.__compareA.copy(e).simplify(),i=t.__compareB.copy(this).simplify();return n.numerator===i.numerator&&n.denominator===i.denominator}},{key:"greaterThan",value:function(e){var n=t.__compareB.copy(this);return n.subtract(e),n.numerator>0}},{key:"greaterThanEquals",value:function(e){var n=t.__compareB.copy(this);return n.subtract(e),n.numerator>=0}},{key:"lessThan",value:function(t){return!this.greaterThanEquals(t)}},{key:"lessThanEquals",value:function(t){return!this.greaterThan(t)}},{key:"clone",value:function(){return new t(this.numerator,this.denominator)}},{key:"copy",value:function(t){return"number"==typeof t?this.set(t||0,1):this.set(t.numerator,t.denominator)}},{key:"quotient",value:function(){return Math.floor(this.numerator/this.denominator)}},{key:"fraction",value:function(){return this.numerator%this.denominator}},{key:"abs",value:function(){return this.denominator=Math.abs(this.denominator),this.numerator=Math.abs(this.numerator),this}},{key:"toString",value:function(){return this.numerator+"/"+this.denominator}},{key:"toSimplifiedString",value:function(){return t.__tmp.copy(this).simplify().toString()}},{key:"toMixedString",value:function(){var e="",n=this.quotient(),i=t.__tmp.copy(this);return n<0?i.abs().fraction():i.fraction(),0!==n?(e+=n,0!==i.numerator&&(e+=" "+i.toSimplifiedString())):e=0===i.numerator?"0":i.toSimplifiedString(),e}},{key:"parse",value:function(t){var e=t.split("/"),n=parseInt(e[0],10),i=e[1]?parseInt(e[1],10):1;return this.set(n,i)}}]),t}();function y(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function d(t,e,n){return e&&y(t.prototype,e),n&&y(t,n),t}m.__compareA=new m,m.__compareB=new m,m.__tmp=new m;var _=h.MakeException("RegistryError");function g(t,e,n,i,o){t[e][n]||(t[e][n]={}),t[e][n][i]=o}var v=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.clear()}return d(t,null,[{key:"INDEXES",get:function(){return["type"]}}]),d(t,[{key:"clear",value:function(){return this.index={id:{},type:{},class:{}},this}},{key:"updateIndex",value:function(t){var e=t.id,n=t.name,i=t.value,o=t.oldValue,r=this.getElementById(e);null!==o&&this.index[n][o]&&delete this.index[n][o][e],null!==i&&g(this.index,n,i,r.getAttribute("id"),r)}},{key:"register",value:function(e,n){var i=this;if(!(n=n||e.getAttribute("id")))throw new _("Can't add element without `id` attribute to registry",e);return e.setAttribute("id",n),g(this.index,"id",n,n,e),t.INDEXES.forEach((function(t){i.updateIndex({id:n,name:t,value:e.getAttribute(t),oldValue:null})})),e.onRegister(this),this}},{key:"getElementById",value:function(t){return this.index.id[t]?this.index.id[t][t]:null}},{key:"getElementsByAttribute",value:function(t,e){var n=this.index[t];return n&&n[e]?Object.keys(n[e]).map((function(t){return n[e][t]})):[]}},{key:"getElementsByType",value:function(t){return this.getElementsByAttribute("type",t)}},{key:"getElementsByClass",value:function(t){return this.getElementsByAttribute("class",t)}},{key:"onUpdate",value:function(e){var n=e.id,i=e.name,o=e.value,r=e.oldValue;return function(t,e){return t.filter((function(t){return t===e})).length>0}(t.INDEXES.concat(["id","class"]),i)?(this.updateIndex({id:n,name:i,value:o,oldValue:r}),this):this}}],[{key:"enableDefaultRegistry",value:function(e){t.defaultRegistry=e}},{key:"getDefaultRegistry",value:function(){return t.defaultRegistry}},{key:"disableDefaultRegistry",value:function(){t.defaultRegistry=null}}]),t}();function x(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function k(t,e,n){return e&&w(t.prototype,e),n&&w(t,n),t}v.defaultRegistry=null;var S=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.type;x(this,t),this.attrs={id:t.newID(),el:null,type:n||"Base",classes:{}},this.boundingBox=null,this.context=null,this.rendered=!1,this.fontStack=q.DEFAULT_FONT_STACK,this.musicFont=q.DEFAULT_FONT_STACK[0],v.getDefaultRegistry()&&v.getDefaultRegistry().register(this)}return k(t,null,[{key:"newID",value:function(){return"auto"+t.ID++}}]),k(t,[{key:"setFontStack",value:function(t){return this.fontStack=t,this.musicFont=t[0],this}},{key:"getFontStack",value:function(){return this.fontStack}},{key:"setStyle",value:function(t){return this.style=t,this}},{key:"getStyle",value:function(){return this.style}},{key:"applyStyle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.context,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getStyle();return e?(t.save(),e.shadowColor&&t.setShadowColor(e.shadowColor),e.shadowBlur&&t.setShadowBlur(e.shadowBlur),e.fillStyle&&t.setFillStyle(e.fillStyle),e.strokeStyle&&t.setStrokeStyle(e.strokeStyle),e.lineWidth&&t.setLineWidth(e.lineWidth),this):this}},{key:"restoreStyle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.context,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getStyle();return e?(t.restore(),this):this}},{key:"drawWithStyle",value:function(){this.checkContext(),this.applyStyle(),this.draw(),this.restoreStyle()}},{key:"hasClass",value:function(t){return!0===this.attrs.classes[t]}},{key:"addClass",value:function(t){return this.attrs.classes[t]=!0,this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:t,oldValue:null}),this}},{key:"removeClass",value:function(t){return delete this.attrs.classes[t],this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:null,oldValue:t}),this}},{key:"onRegister",value:function(t){return this.registry=t,this}},{key:"isRendered",value:function(){return this.rendered}},{key:"setRendered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.rendered=t,this}},{key:"getAttributes",value:function(){return this.attrs}},{key:"getAttribute",value:function(t){return this.attrs[t]}},{key:"setAttribute",value:function(t,e){var n=this.attrs.id,i=this.attrs[t];return this.attrs[t]=e,this.registry&&this.registry.onUpdate({id:n,name:t,value:e,oldValue:i}),this}},{key:"getContext",value:function(){return this.context}},{key:"setContext",value:function(t){return this.context=t,this}},{key:"getBoundingBox",value:function(){return this.boundingBox}},{key:"checkContext",value:function(){if(!this.context)throw new h.RERR("NoContext","No rendering context attached to instance");return this.context}}]),t}();function T(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}S.ID=1e3;var O=function(){function t(e,n,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.addPoint(e,n),this.addPoint(i,o)}var e,n,i;return e=t,(n=[{key:"width",value:function(){return this.x2-this.x1}},{key:"height",value:function(){return this.y2-this.y1}},{key:"noOp",value:function(){}},{key:"addPoint",value:function(t,e){null!=t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}},{key:"addX",value:function(t){this.addPoint(t,null)}},{key:"addY",value:function(t){this.addPoint(null,t)}},{key:"addQuadraticCurve",value:function(t,e,n,i,o,r){var b=t+2/3*(n-t),a=e+2/3*(i-e),s=b+1/3*(o-t),l=a+1/3*(r-e);this.addBezierCurve(t,e,b,a,s,l,o,r)}},{key:"addBezierCurve",value:function(t,e,n,i,o,r,b,a){var s,l=[t,e],u=[n,i],c=[o,r],h=[b,a];this.addPoint(l[0],l[1]),this.addPoint(h[0],h[1]);var f=function(t,e){return Math.pow(1-t,3)*l[e]+3*Math.pow(1-t,2)*t*u[e]+3*(1-t)*Math.pow(t,2)*c[e]+Math.pow(t,3)*h[e]};for(s=0;s<=1;s++){var p=6*l[s]-12*u[s]+6*c[s],m=-3*l[s]+9*u[s]-9*c[s]+3*h[s],y=3*u[s]-3*l[s];if(0!==m){var d=Math.pow(p,2)-4*y*m;if(!(d<0)){var _=(-p+Math.sqrt(d))/(2*m);0<_&&_<1&&(0===s&&this.addX(f(_,s)),1===s&&this.addY(f(_,s)));var g=(-p-Math.sqrt(d))/(2*m);0<g&&g<1&&(0===s&&this.addX(f(g,s)),1===s&&this.addY(f(g,s)))}}else{if(0===p)continue;var v=-y/p;0<v&&v<1&&(0===s&&this.addX(f(v,s)),1===s&&this.addY(f(v,s)))}}}}])&&T(e.prototype,n),i&&T(e,i),t}();function E(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function P(t,e,n){return e&&E(t.prototype,e),n&&E(t,n),t}var C=function(){function t(e,n,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=n,this.w=i,this.h=o}return P(t,null,[{key:"copy",value:function(e){return new t(e.x,e.y,e.w,e.h)}}]),P(t,[{key:"getX",value:function(){return this.x}},{key:"getY",value:function(){return this.y}},{key:"getW",value:function(){return this.w}},{key:"getH",value:function(){return this.h}},{key:"setX",value:function(t){return this.x=t,this}},{key:"setY",value:function(t){return this.y=t,this}},{key:"setW",value:function(t){return this.w=t,this}},{key:"setH",value:function(t){return this.h=t,this}},{key:"move",value:function(t,e){this.x+=t,this.y+=e}},{key:"clone",value:function(){return t.copy(this)}},{key:"mergeWith",value:function(t,e){var n=t,i=this.x<n.x?this.x:n.x,o=this.y<n.y?this.y:n.y,r=Math.max(this.x+this.w,n.x+n.w)-i,b=Math.max(this.y+this.h,n.y+n.h)-o;return this.x=i,this.y=o,this.w=r,this.h=b,e&&this.draw(e),this}},{key:"draw",value:function(t,e,n){e||(e=0),n||(n=0),t.rect(this.x+e,this.y+n,this.w,this.h),t.stroke()}}]),t}();function R(t){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){B(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function B(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M(t,e){return!e||"object"!==R(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function F(t){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function D(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function j(t,e,n){return e&&D(t.prototype,e),n&&D(t,n),t}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function z(t,e,n,i,o,r){var b,a,s,l=0;function u(){return e+t[l++]*i}function c(){return n+t[l++]*o}function h(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];r[t].apply(r,n)}for(;l<t.length;)switch(b=t[l++]){case"m":case"l":h(b,u(),c());break;case"q":a=u(),s=c(),h(b,u(),c(),a,s);break;case"b":a=u(),s=c(),h(b,u(),c(),u(),c(),a,s)}}var Y=function(t){function e(t,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=M(this,F(e).call(this))).setAttribute("type","Glyph"),o.code=t,o.point=n,o.options={fontStack:o.getFontStack(),category:null},o.metrics=null,o.x_shift=0,o.y_shift=0,o.originShift={x:0,y:0},i?o.setOptions(i):o.reset(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(e,t),j(e,null,[{key:"lookupFontMetric",value:function(t){var e=t.font,n=t.category,i=t.code,o=t.key,r=t.defaultValue,b=e.lookupMetric("glyphs.".concat(n,".").concat(i,".").concat(o),null);return null===b&&(b=e.lookupMetric("glyphs.".concat(n,".").concat(o),r)),b}},{key:"lookupGlyph",value:function(t,e){if(!t)throw h.RERR("BAD_FONTSTACK","Font stack is misconfigured");for(var n,i,o=0;o<t.length&&!(n=(i=t[o]).getGlyphs()[e]);o++);if(!n)throw new h.RERR("BadGlyph","Glyph ".concat(e," does not exist in font."));return{glyph:n,font:i}}},{key:"loadMetrics",value:function(t,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.lookupGlyph(t,n),b=r.glyph,a=r.font,s=o?e.lookupFontMetric({font:a,category:o,code:n,key:"shiftX",defaultValue:0}):0,l=o?e.lookupFontMetric({font:a,category:o,code:n,key:"shiftY",defaultValue:0}):0,u=o?e.lookupFontMetric({font:a,category:o,code:n,key:"scale",defaultValue:1}):1,c=b.x_min,f=b.x_max,p=b.ha,m=!0;if(b.o)return m?b.cached_outline?i=b.cached_outline:(i=b.o.split(" "),b.cached_outline=i):(b.cached_outline&&delete b.cached_outline,i=b.o.split(" ")),{x_min:c,x_max:f,x_shift:s,y_shift:l,scale:u,ha:p,outline:i,font:a};throw new h.RERR("BadGlyph","Glyph ".concat(n," has no outline defined."))}},{key:"renderGlyph",value:function(t,n,i,o,r,b){var a=N({fontStack:q.DEFAULT_FONT_STACK,category:null},b),s=e.loadMetrics(a.fontStack,r,a.category),l=72*(o=a.category?e.lookupFontMetric({font:s.font,category:a.category,code:r,key:"point",defaultValue:o}):o)/(100*s.font.getResolution());return e.renderOutline(t,s.outline,l*s.scale,n+s.x_shift,i+s.y_shift,b),s}},{key:"renderOutline",value:function(t,e,n,i,o,r){t.beginPath(),t.moveTo(i,o),z(e,i,o,n,-n,{m:t.moveTo.bind(t),l:t.lineTo.bind(t),q:t.quadraticCurveTo.bind(t),b:t.bezierCurveTo.bind(t)}),t.fill()}},{key:"getOutlineBoundingBox",value:function(t,e,n,i){var o=new O;return z(t,n,i,e,-e,{m:o.addPoint.bind(o),l:o.addPoint.bind(o),q:o.addQuadraticCurve.bind(o),b:o.addBezierCurve.bind(o),z:o.noOp.bind(o)}),new C(o.x1,o.y1,o.width(),o.height())}}]),j(e,[{key:"getCode",value:function(){return this.code}},{key:"setOptions",value:function(t){this.options=N({},this.options,{},t),this.reset()}},{key:"setPoint",value:function(t){return this.point=t,this}},{key:"setStave",value:function(t){return this.stave=t,this}},{key:"setXShift",value:function(t){return this.x_shift=t,this}},{key:"setYShift",value:function(t){return this.y_shift=t,this}},{key:"reset",value:function(){this.metrics=e.loadMetrics(this.options.fontStack,this.code,this.options.category),this.point=this.options.category?e.lookupFontMetric({category:this.options.category,font:this.metrics.font,code:this.code,key:"point",defaultValue:this.point}):this.point,this.scale=72*this.point/(100*this.metrics.font.getResolution()),this.bbox=e.getOutlineBoundingBox(this.metrics.outline,this.scale*this.metrics.scale,this.metrics.x_shift,this.metrics.y_shift)}},{key:"getMetrics",value:function(){if(!this.metrics)throw new h.RuntimeError("BadGlyph","Glyph ".concat(this.code," is not initialized."));return{x_min:this.metrics.x_min*this.scale*this.metrics.scale,x_max:this.metrics.x_max*this.scale*this.metrics.scale,width:this.bbox.getW(),height:this.bbox.getH()}}},{key:"setOriginX",value:function(t){var e=this.bbox,n=(t-Math.abs(e.getX()/e.getW()))*e.getW();this.originShift.x=-n}},{key:"setOriginY",value:function(t){var e=this.bbox,n=(t-Math.abs(e.getY()/e.getH()))*e.getH();this.originShift.y=-n}},{key:"setOrigin",value:function(t,e){this.setOriginX(t),this.setOriginY(e)}},{key:"render",value:function(t,n,i){if(!this.metrics)throw new h.RuntimeError("BadGlyph","Glyph ".concat(this.code," is not initialized."));var o=this.metrics.outline,r=this.scale*this.metrics.scale;this.setRendered(),this.applyStyle(t),e.renderOutline(t,o,r,n+this.originShift.x+this.metrics.x_shift,i+this.originShift.y+this.metrics.y_shift),this.restoreStyle(t)}},{key:"renderToStave",value:function(t){if(this.checkContext(),!this.metrics)throw new h.RuntimeError("BadGlyph","Glyph ".concat(this.code," is not initialized."));if(!this.stave)throw new h.RuntimeError("GlyphError","No valid stave");var n=this.metrics.outline,i=this.scale*this.metrics.scale;this.setRendered(),this.applyStyle(),e.renderOutline(this.context,n,i,t+this.x_shift+this.metrics.x_shift,this.stave.getYForGlyphs()+this.y_shift+this.metrics.y_shift),this.restoreStyle()}}]),e}(S);function I(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var G=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e,this.metrics=n,this.fontData=i,this.codePoints={}}var e,n,i;return e=t,(n=[{key:"getName",value:function(){return this.name}},{key:"getResolution",value:function(){return this.fontData.resolution}},{key:"getMetrics",value:function(){return this.metrics}},{key:"lookupMetric",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=t.split("."),i=this.metrics,o=0;o<n.length;o++){if(void 0===i[n[o]]){if(void 0!==e)return e;throw new h.RERR("INVALID_KEY","Invalid music font metric key: ".concat(t))}i=i[n[o]]}return i}},{key:"getFontData",value:function(){return this.fontData}},{key:"getGlyphs",value:function(){return this.fontData.glyphs}},{key:"getCodePoints",value:function(){return this.codePoints}},{key:"setCodePoints",value:function(t){return this.codePoints=t,this}}])&&I(e.prototype,n),i&&I(e,i),t}(),X={Bravura:new G("Bravura",{name:"Bravura",smufl:!0,stave:{padding:12},clef:{default:{point:32,width:26},small:{point:26,width:20},annotations:{"8va":{smuflCode:"timeSig8",default:{point:18,treble:{line:-1.4,shiftX:12}},small:{point:16,treble:{line:-.2,shiftX:8}}},"8vb":{smuflCode:"timeSig8",default:{point:18,treble:{line:6,shiftX:10},bass:{line:3.5,shiftX:1}},small:{point:16,treble:{line:5.3,shiftX:6},bass:{line:3.1,shiftX:.5}}}},lineCount:{8:{point:55,shiftY:14},7:{point:47,shiftY:8},6:{point:32,shiftY:1},5:{point:30,shiftY:-6},4:{point:23,shiftY:-12}}},pedalMarking:{up:{point:40},down:{point:34}},digits:{shiftLine:-1,point:34,tupletPoint:22,shiftY:-6},articulation:{articStaccatissimoAbove:{padding:2},articStaccatissimoBelow:{padding:2}},tremolo:{default:{point:25,spacing:5,offsetYStemUp:-5,offsetYStemDown:5,offsetXStemUp:11,offsetXStemDown:1},grace:{point:18,spacing:4,offsetYStemUp:-5,offsetYStemDown:5,offsetXStemUp:7,offsetXStemDown:1}},stem:{noteHead:{noteheadTriangleUpHalf:{offsetYBaseStemUp:5,offsetYBaseStemDown:4},noteheadTriangleUpBlack:{offsetYBaseStemUp:5,offsetYBaseStemDown:4},noteheadTriangleUpWhole:{offsetYBaseStemUp:5,offsetYBaseStemDown:4},noteheadXHalf:{offsetYBaseStemUp:-4,offsetYBaseStemDown:4},noteheadXBlack:{offsetYBaseStemUp:-4,offsetYBaseStemDown:4},noteheadXWhole:{offsetYBaseStemUp:-4,offsetYBaseStemDown:4},noteheadBlack:{offsetYBaseStemDown:2},noteheadSquareWhite:{offsetYBaseStemDown:-5,offsetYBaseStemUp:5}}},glyphs:{coda:{point:20,shiftX:-7,shiftY:8},segno:{shiftX:-7},flag:{shiftX:-.75,tabStem:{shiftX:-1.75},staveTempo:{shiftX:-1}},clef:{gClef:{default:{scale:1.1,shiftY:1},small:{shiftY:1.5}},fClef:{default:{shiftY:-.5}}},ornament:{ornamentTurn:{scale:1.2},ornamentTurnSlash:{scale:1.2}},stroke:{arrowheadBlackDown:{straight:{shiftX:-4.5},wiggly:{shiftX:-1,shiftY:1}},arrowheadBlackUp:{straight:{shiftX:-.85},wiggly:{shiftX:-1,shiftY:1}}},textNote:{point:34,breathMarkTick:{point:36,shiftY:9},breathMarkComma:{point:36},segno:{point:30,shiftX:-7,shiftY:8},coda:{point:20,shiftX:-7,shiftY:8},ornamentTrill:{shiftX:-8,shiftY:8},ornamentTurn:{point:42},ornamentTurnSlash:{point:42},ornamentMordent:{shiftX:-8},ornamentShortTrill:{shiftX:-8}},noteHead:{standard:{restQuarterStemUp:{point:35},restQuarterStemDown:{point:35}},custom:{noteheadCircleXStemUp:{shiftX:1.5},noteheadCircleXStemDown:{shiftX:.25},noteheadDiamondHalfStemUp:{shiftX:1.5},noteheadDiamondBlackStemUp:{shiftX:1.5},noteheadDiamondWholeStemUp:{shiftX:1},noteheadXHalfStemUp:{shiftX:-2},noteheadXHalfStemDown:{shiftX:1},noteheadXWholeStemUp:{shiftX:-4},noteheadXWholeStemDown:{shiftX:1},noteheadSquareWhiteStemDown:{shiftX:.25},noteheadSquareWhiteStemUp:{shiftX:-.75},noteheadSquareBlackStemUp:{shiftX:-.75},noteheadTriangleUpWholeStemUp:{shiftX:-.75}}}}},{glyphs:{bracketTop:{x_min:0,x_max:469,y_min:0,y_max:295,ha:295,o:"m 0 168 l 0 0 l 180 0 b 674 390 410 43 616 150 b 675 405 675 396 675 400 b 664 425 675 416 671 422 b 628 405 651 425 635 415 b 157 179 613 389 432 199 l 12 179 b 0 168 3 179 0 177 z"},bracketBottom:{x_min:0,x_max:469,y_min:-295,y_max:0,ha:295,o:"m 0 0 l 0 -168 b 12 -179 0 -177 3 -179 l 157 -179 b 628 -405 432 -199 613 -389 b 664 -425 635 -415 651 -425 b 675 -405 671 -422 675 -416 b 674 -390 675 -400 675 -396 b 180 0 616 -150 410 -43 z"},barlineTick:{x_min:0,x_max:36,y_min:868,y_max:1120,ha:252,o:"m 52 1250 l 52 1613 l 0 1613 l 0 1250 z"},breathMarkTick:{x_min:0,x_max:500,y_min:0,y_max:502,ha:502,o:"m 0 374 b 9 334 0 367 0 343 b 179 19 40 312 164 121 b 192 0 179 3 186 0 b 210 19 197 0 207 6 b 698 701 245 197 507 658 b 720 714 714 704 720 711 b 698 723 720 720 711 723 b 197 186 455 714 210 202 b 186 176 194 179 189 176 b 176 186 179 176 176 186 b 9 367 143 266 27 359 b 0 374 6 372 3 374 z"},segno:{x_min:4,x_max:550,y_min:-27,y_max:759,ha:786,o:"m 29 687 b 295 449 75 582 284 454 b 304 438 301 446 304 444 b 295 415 304 432 301 425 b 78 22 285 395 78 22 b 73 3 75 16 73 9 b 114 -39 73 -20 91 -39 b 150 -17 128 -39 143 -30 b 377 395 150 -17 373 386 b 395 402 377 393 389 402 b 704 176 416 397 704 312 b 624 75 704 120 670 82 b 613 73 621 75 616 73 b 562 138 586 73 562 94 l 562 154 b 485 249 562 209 526 249 b 468 246 480 249 474 248 b 366 153 415 233 366 210 b 540 -12 366 65 455 -12 b 600 -1 559 -12 579 -9 b 792 251 716 37 792 131 b 789 292 792 264 791 278 b 523 588 768 451 540 579 b 498 611 505 598 498 603 b 501 619 498 613 500 616 b 732 1032 508 631 732 1032 b 737 1053 736 1040 737 1045 b 697 1093 737 1076 719 1093 b 661 1073 683 1093 668 1086 b 423 647 661 1073 432 660 b 410 635 419 639 416 635 b 396 639 406 635 402 636 b 128 792 383 644 166 727 b 108 868 120 808 108 838 b 186 958 108 907 125 948 l 194 958 b 217 939 203 958 213 955 l 220 929 b 325 805 230 890 252 805 b 425 901 384 805 425 840 b 413 969 425 923 420 946 b 220 1060 390 1035 294 1060 b 6 793 120 1060 6 936 b 29 687 6 759 13 723 z m 680 589 b 762 671 726 589 762 626 b 680 753 762 717 726 753 b 598 671 635 753 598 717 b 680 589 598 626 635 589 z m 120 298 b 202 380 166 298 202 334 b 120 462 202 425 166 462 b 37 380 75 462 37 425 b 120 298 37 334 75 298 z"},coda:{x_min:-4,x_max:955,y_min:-158,y_max:898,ha:1056,o:"m -6 541 b 20 507 -6 523 0 507 l 210 507 b 660 0 226 238 426 19 l 660 -202 b 694 -228 660 -222 675 -228 b 729 -202 713 -228 729 -222 l 729 0 b 1178 507 962 19 1164 238 l 1349 507 b 1375 541 1369 507 1375 523 b 1349 576 1375 560 1369 576 l 1178 576 b 729 1083 1164 847 962 1064 l 729 1269 b 694 1293 729 1287 713 1293 b 660 1269 675 1293 660 1287 l 660 1083 b 210 576 426 1064 226 848 l 20 576 b -6 541 0 576 -6 560 z m 940 576 l 729 576 l 729 1002 b 940 576 930 985 940 809 z m 729 507 l 940 507 b 729 69 936 287 909 91 z m 455 576 b 660 1002 455 809 455 985 l 660 576 z m 660 507 l 660 69 b 455 507 474 91 456 285 z"},gClef:{x_min:0,x_max:671,y_min:-658,y_max:1098,ha:1756,o:"m 524 -363 b 624 -354 557 -363 595 -360 b 645 -367 639 -351 642 -350 b 684 -657 662 -464 684 -589 b 455 -896 684 -870 540 -896 b 340 -854 377 -896 340 -873 b 386 -829 340 -844 353 -840 b 482 -694 431 -816 482 -778 b 344 -547 482 -615 432 -547 b 190 -713 248 -547 190 -624 b 464 -948 190 -806 246 -948 b 747 -660 560 -948 747 -904 b 706 -351 747 -577 721 -441 b 724 -327 703 -334 704 -336 b 966 16 870 -269 966 -147 b 619 363 966 200 831 363 b 577 389 582 363 582 363 l 541 598 b 550 625 539 615 541 616 b 824 1174 706 770 824 953 b 730 1509 824 1299 789 1423 b 655 1581 708 1541 671 1581 b 562 1512 635 1581 590 1544 b 420 1064 455 1394 420 1214 b 441 828 420 981 431 887 b 428 793 444 811 445 808 b 0 125 220 622 0 416 b 524 -363 0 -125 171 -363 z m 115 29 b 249 363 115 114 130 228 b 469 567 336 459 402 513 b 490 562 484 579 487 577 l 520 377 b 498 343 524 350 524 351 b 289 63 372 300 289 186 b 455 -192 289 -66 357 -158 b 494 -200 467 -196 484 -200 b 511 -184 505 -200 511 -193 b 490 -166 511 -174 500 -170 b 386 -12 429 -140 386 -78 b 530 157 386 71 442 132 b 559 145 553 163 556 161 l 631 -284 b 611 -304 634 -300 632 -300 b 530 -311 588 -308 559 -311 b 115 29 278 -311 115 -171 z m 677 1358 b 763 1240 724 1358 763 1319 b 513 851 763 1080 626 950 b 494 863 503 842 497 844 b 485 995 488 900 485 949 b 677 1358 485 1220 589 1358 z m 635 168 b 848 -66 752 158 848 60 b 713 -271 848 -157 793 -230 b 690 -262 696 -279 693 -279 l 619 148 b 635 168 616 166 618 170 z"},cClef:{x_min:0,x_max:699,y_min:-506,y_max:506,ha:1012,o:"m 269 -694 b 300 -724 269 -714 279 -724 l 301 -724 b 331 -694 321 -724 331 -714 l 331 -63 b 344 -55 331 -52 338 -53 b 472 -265 382 -65 442 -102 b 500 -301 477 -288 485 -301 b 530 -262 516 -301 523 -287 b 684 -128 549 -199 582 -128 b 804 -409 778 -128 804 -220 b 651 -683 804 -598 770 -683 b 528 -644 631 -683 528 -674 b 567 -622 528 -636 552 -628 b 625 -528 596 -612 625 -583 b 527 -429 625 -465 583 -429 b 416 -547 465 -429 416 -471 b 667 -729 416 -638 495 -729 b 1007 -413 903 -729 1007 -563 b 706 -76 1007 -215 897 -76 b 618 -89 664 -76 636 -84 b 576 -88 603 -94 589 -96 b 524 0 556 -75 524 -29 b 576 88 524 29 556 75 b 618 89 589 96 603 94 b 706 76 636 84 664 76 b 1007 413 897 76 1007 215 b 667 729 1007 563 903 729 b 416 547 495 729 416 638 b 527 429 416 471 465 429 b 625 528 583 429 625 465 b 567 622 625 583 596 612 b 528 644 552 628 528 636 b 651 683 528 674 631 683 b 804 409 770 683 804 598 b 684 128 804 220 778 128 b 530 262 582 128 549 199 b 500 301 523 287 516 301 b 472 265 485 301 477 288 b 344 55 442 102 382 65 b 331 63 338 53 331 52 l 331 694 b 301 724 331 714 321 724 l 300 724 b 269 694 279 724 269 714 z m 30 -724 l 154 -724 b 184 -694 174 -724 184 -714 l 184 694 b 154 724 184 714 174 724 l 30 724 b 0 694 10 724 0 714 l 0 -694 b 30 -724 0 -714 10 -724 z"},fClef:{x_min:-5,x_max:684,y_min:-635,y_max:262,ha:897,o:"m 12 -914 b 36 -907 19 -914 27 -912 b 765 -40 390 -734 765 -478 b 363 377 765 210 612 377 b 0 56 112 377 0 194 b 177 -158 0 -59 60 -158 b 330 -6 268 -158 330 -95 b 192 144 330 86 262 144 b 120 134 153 144 138 134 b 96 160 101 134 96 145 b 330 323 96 217 183 323 b 549 -53 482 323 549 173 b 14 -871 549 -455 350 -680 b -7 -897 1 -878 -7 -886 b 12 -914 -7 -906 -1 -914 z m 906 101 b 985 180 950 101 985 135 b 906 259 985 225 950 259 b 827 180 861 259 827 225 b 906 101 827 135 861 101 z m 907 -258 b 985 -180 952 -258 985 -225 b 907 -102 985 -135 952 -102 b 829 -180 863 -102 829 -135 b 907 -258 829 -225 863 -258 z"},unpitchedPercussionClef1:{x_min:0,x_max:382,y_min:-250,y_max:250,ha:500,o:"m 320 338 l 320 -338 b 340 -360 320 -350 328 -360 l 530 -360 b 550 -338 541 -360 550 -350 l 550 338 b 530 360 550 350 541 360 l 340 360 b 320 338 328 360 320 350 z m 20 -360 l 210 -360 b 230 -338 222 -360 230 -350 l 230 338 b 210 360 230 350 222 360 l 20 360 b 0 338 9 360 0 350 l 0 -338 b 20 -360 0 -350 9 -360 z"},"6stringTabClef":{x_min:-3,x_max:408,y_min:-748,y_max:764,ha:1512,o:"m 39 -399 l 39 -1077 l 344 -1077 b 544 -883 467 -1077 544 -995 b 420 -719 544 -802 507 -752 b 514 -572 482 -690 514 -639 b 314 -399 514 -472 442 -399 z m 88 -328 l 160 -125 l 420 -125 l 491 -328 l 588 -328 l 350 348 l 238 348 l -4 -328 z m 26 1100 l 26 1024 l 249 1024 l 249 422 l 336 422 l 336 1024 l 557 1024 l 557 1100 z m 125 -768 l 337 -768 b 458 -884 418 -768 458 -818 b 337 -1001 458 -949 418 -1001 l 125 -1001 z m 292 -475 b 428 -583 389 -475 428 -514 b 292 -691 428 -652 389 -691 l 125 -691 l 125 -475 z m 292 256 l 397 -52 l 181 -52 z"},timeSig0:{x_min:20,x_max:450,y_min:-250,y_max:251,ha:501,o:"m 338 -360 b 648 0 510 -360 648 -199 b 338 361 648 200 510 361 b 29 0 167 361 29 200 b 338 -360 29 -199 167 -360 z m 230 10 b 338 317 230 180 278 317 b 446 10 397 317 446 180 b 338 -295 446 -158 397 -295 b 230 10 278 -295 230 -158 z"},timeSig1:{x_min:20,x_max:314,y_min:-250,y_max:251,ha:501,o:"m 29 0 b 45 -20 29 -7 33 -16 b 58 -23 50 -22 56 -23 b 78 -10 72 -23 78 -10 b 156 117 78 -10 140 89 b 170 131 161 127 167 131 b 179 111 176 131 179 120 l 179 -261 b 115 -315 179 -294 145 -315 b 91 -337 105 -315 91 -320 b 122 -360 91 -353 104 -360 l 429 -360 b 452 -337 452 -360 452 -337 b 431 -315 452 -337 452 -315 b 384 -265 410 -315 384 -289 l 384 328 b 356 361 384 351 376 360 b 281 356 336 361 300 356 b 206 360 253 356 228 357 b 199 361 203 360 200 361 b 173 334 184 361 179 347 l 35 19 b 29 0 35 19 29 10 z"},timeSig2:{x_min:20,x_max:426,y_min:-257,y_max:254,ha:511,o:"m 29 170 b 42 108 29 150 33 130 b 160 29 63 63 108 29 b 261 156 248 29 261 120 b 161 275 261 242 161 246 b 275 330 164 295 190 330 b 405 192 403 330 405 233 b 193 -102 405 60 297 -39 b 33 -314 114 -153 58 -223 b 69 -370 33 -336 40 -370 b 203 -282 101 -370 118 -282 b 410 -360 261 -282 282 -360 b 606 -131 472 -360 583 -354 b 589 -111 606 -114 599 -111 b 570 -125 577 -111 573 -117 b 569 -130 570 -127 569 -128 b 513 -192 554 -164 543 -192 b 488 -187 505 -192 498 -190 b 445 -171 469 -180 459 -179 b 289 -137 416 -160 348 -137 b 236 -145 271 -137 252 -140 b 422 -42 268 -94 390 -50 b 613 147 523 -14 613 27 b 330 366 613 300 464 366 b 69 275 229 366 140 357 b 29 170 45 245 29 209 z"},timeSig3:{x_min:20,x_max:401,y_min:-251,y_max:249,ha:500,o:"m 29 -203 b 275 -361 32 -315 134 -359 l 288 -361 b 577 -161 431 -361 577 -288 l 577 -151 b 537 -50 575 -109 564 -82 b 503 -20 528 -39 517 -29 l 472 -3 l 425 10 b 410 17 418 12 413 12 b 409 24 409 20 409 22 b 415 37 409 30 410 36 b 459 50 431 42 446 43 b 547 181 517 78 547 115 b 307 357 547 314 367 353 b 285 359 300 357 292 359 b 37 200 161 359 37 276 b 154 84 37 153 65 89 l 161 84 b 256 177 225 84 256 130 l 256 189 b 209 248 252 242 216 245 b 180 268 202 251 180 248 l 180 274 b 240 310 183 298 228 310 b 374 199 363 310 374 233 l 374 189 b 199 36 374 82 289 40 b 164 12 184 35 164 27 b 200 -6 164 -6 189 -6 b 379 -137 366 -6 379 -118 b 269 -307 379 -289 301 -307 b 256 -305 264 -307 258 -305 b 216 -282 245 -304 217 -304 l 216 -275 b 249 -180 216 -243 248 -222 b 145 -76 249 -120 207 -76 b 130 -78 140 -76 135 -76 b 60 -115 105 -82 78 -96 b 29 -203 36 -137 29 -171 z"},timeSig4:{x_min:20,x_max:450,y_min:-250,y_max:251,ha:501,o:"m 58 -161 l 325 -161 l 325 -252 b 268 -302 325 -291 294 -302 b 235 -330 245 -302 235 -315 b 262 -360 235 -344 240 -360 l 569 -360 b 598 -330 583 -360 598 -350 b 566 -301 598 -310 580 -301 b 521 -246 552 -301 521 -292 l 521 -161 l 626 -161 b 648 -134 641 -161 648 -151 b 626 -107 648 -117 642 -107 l 521 -107 l 521 202 b 504 226 521 213 520 226 b 475 213 491 226 484 223 l 338 48 b 325 14 333 40 325 32 l 325 -107 l 131 -107 b 481 334 246 -9 477 318 b 482 341 481 337 482 338 b 461 361 482 353 472 361 b 363 359 448 361 389 359 b 261 361 337 359 272 361 b 228 334 248 361 228 357 b 43 -105 228 156 86 -45 l 35 -117 b 33 -121 35 -118 33 -120 b 29 -137 30 -127 29 -132 b 58 -161 29 -151 40 -161 z"},timeSig5:{x_min:20,x_max:383,y_min:-251,y_max:246,ha:497,o:"m 29 -183 b 284 -361 29 -302 107 -361 b 552 -125 456 -361 552 -255 b 314 112 552 6 445 112 b 122 71 230 112 168 98 b 115 69 120 69 117 69 b 109 79 109 69 109 75 l 109 85 b 117 179 109 85 115 166 b 138 197 118 190 125 197 l 144 197 b 285 184 158 194 226 184 b 492 323 485 184 492 300 b 472 353 492 341 488 353 b 295 340 454 353 341 340 b 101 354 249 340 125 351 b 66 330 75 354 68 341 l 50 10 l 50 7 b 79 -14 50 -12 65 -14 b 111 14 94 -14 95 -1 b 209 62 125 29 160 62 b 357 -125 258 62 357 35 b 235 -304 357 -284 272 -304 b 202 -300 223 -304 212 -304 b 184 -279 194 -295 186 -289 b 202 -259 184 -269 194 -264 b 256 -163 235 -239 256 -203 b 144 -50 256 -99 206 -50 b 30 -157 66 -50 35 -107 b 29 -183 29 -166 29 -174 z"},timeSig6:{x_min:20,x_max:414,y_min:-249,y_max:251,ha:500,o:"m 29 4 l 29 -1 b 73 -200 30 -68 42 -143 b 324 -359 132 -307 203 -359 b 513 -307 389 -359 461 -348 b 596 -137 563 -266 596 -202 b 379 72 596 -24 490 72 b 248 22 333 72 285 55 b 239 19 245 19 242 19 b 226 53 230 19 226 30 b 346 327 230 320 315 327 b 393 305 374 327 393 320 b 357 251 393 285 366 268 b 347 209 350 238 347 223 b 369 150 347 187 354 166 b 439 120 379 131 420 120 b 554 229 500 120 554 167 b 553 245 554 235 554 239 b 348 361 539 337 426 361 b 85 209 239 360 137 307 b 29 4 53 148 29 72 z m 320 3 b 405 -158 366 3 405 -69 b 320 -320 405 -248 366 -320 b 236 -158 274 -320 236 -248 b 320 3 236 -69 274 3 z"},timeSig7:{x_min:20,x_max:421,y_min:-250,y_max:249,ha:499,o:"m 29 71 b 45 48 29 71 30 48 b 66 76 56 48 60 60 b 164 196 81 112 99 196 b 374 88 222 196 291 88 b 446 118 415 88 435 109 b 459 124 451 121 456 124 b 469 111 465 124 468 120 b 272 -112 469 71 359 -10 b 173 -315 217 -176 173 -259 b 200 -360 173 -346 173 -360 b 294 -347 226 -360 258 -347 b 412 -360 330 -347 397 -360 b 435 -307 426 -360 435 -348 b 606 288 435 -66 606 140 l 606 294 b 582 351 606 333 606 351 b 552 336 580 351 557 346 b 485 236 541 318 521 236 b 262 359 449 236 382 359 b 137 307 179 359 157 325 b 98 281 117 288 108 282 b 60 315 86 281 68 301 b 43 325 58 321 50 325 b 29 308 36 325 29 321 z"},timeSig8:{x_min:20,x_max:416,y_min:-259,y_max:259,ha:518,o:"m 29 -190 b 301 -373 29 -315 158 -373 b 599 -117 445 -373 599 -311 b 481 52 599 -30 549 17 b 567 204 533 85 567 132 b 317 373 567 351 356 373 b 36 176 150 373 36 297 b 161 -16 36 76 92 23 b 29 -190 86 -52 29 -99 z m 111 -183 b 225 -48 111 -125 161 -72 b 436 -219 330 -94 436 -124 b 295 -325 436 -276 392 -325 b 111 -183 199 -325 111 -276 z m 314 331 b 482 207 360 331 482 308 b 406 85 482 150 454 112 b 168 240 291 125 168 150 b 314 331 168 301 251 331 z"},timeSig9:{x_min:20,x_max:414,y_min:-249,y_max:251,ha:500,o:"m 246 -69 b 377 -19 292 -69 340 -52 b 386 -16 380 -16 383 -16 b 399 -50 395 -16 399 -27 b 279 -324 395 -317 310 -324 b 232 -302 251 -324 232 -317 b 268 -248 232 -282 259 -265 b 278 -206 275 -235 278 -220 b 256 -147 278 -184 271 -163 b 186 -117 246 -128 204 -117 b 71 -226 125 -117 71 -164 b 72 -242 71 -232 71 -236 b 276 -359 86 -334 199 -359 b 540 -206 386 -357 488 -304 b 596 -1 572 -145 596 -69 l 596 4 b 552 203 595 71 583 145 b 301 361 492 310 422 361 b 112 310 236 361 164 351 b 29 140 62 269 29 204 b 246 -69 29 27 135 -69 z m 220 161 b 305 323 220 251 259 323 b 389 161 351 323 389 251 b 305 0 389 72 351 0 b 220 161 259 0 220 72 z"},timeSigCommon:{x_min:5,x_max:424,y_min:-249,y_max:251,ha:500,o:"m 101 -262 b 321 -359 156 -328 235 -359 b 611 -88 573 -359 611 -130 b 589 -56 611 -56 595 -56 b 567 -82 577 -56 567 -58 b 363 -311 567 -268 409 -311 b 184 40 246 -311 184 -197 b 372 327 184 278 294 327 b 477 278 446 327 477 292 b 451 246 477 265 472 246 b 360 140 393 246 360 184 b 471 32 360 58 431 32 b 580 156 471 32 580 36 b 336 361 580 344 363 361 b 7 -14 131 361 7 180 b 101 -262 7 -108 42 -190 z"},timeSigCutCommon:{x_min:0,x_max:418,y_min:-359,y_max:361,ha:720,o:"m 225 -346 b 252 -382 235 -350 252 -369 l 252 -492 b 276 -517 252 -505 265 -517 b 302 -492 292 -517 302 -505 l 302 -379 b 318 -359 302 -370 308 -363 b 602 -85 563 -354 602 -130 b 579 -58 600 -58 586 -58 l 573 -58 b 559 -82 567 -58 559 -60 b 354 -310 559 -266 400 -310 b 317 -305 340 -310 328 -308 b 302 -284 311 -304 302 -295 l 302 287 b 338 323 302 297 328 321 b 363 324 347 324 356 324 b 468 275 436 324 468 289 b 442 243 468 264 464 243 b 351 137 384 243 351 181 b 462 30 351 56 422 30 b 572 154 462 30 572 35 b 318 357 572 295 441 357 b 302 390 310 359 302 383 l 302 495 b 276 520 302 507 292 520 b 252 495 265 520 252 507 l 252 369 b 235 346 252 359 238 346 l 196 331 b 0 -14 66 275 0 122 b 225 -346 0 -150 86 -310 z m 232 259 b 236 262 233 262 235 262 b 252 239 243 262 252 251 l 252 -235 b 243 -252 252 -248 248 -252 b 236 -248 240 -252 238 -251 b 177 37 197 -193 177 -96 b 232 259 177 147 200 215 z"},noteheadDoubleWhole:{x_min:0,x_max:599,y_min:-155,y_max:155,ha:310,o:"m 423 -180 b 733 1 657 -180 733 -98 l 733 -213 b 747 -223 733 -219 740 -223 l 766 -223 b 780 -213 773 -223 780 -219 l 780 212 b 766 223 780 217 773 223 l 747 223 b 733 212 740 223 733 217 l 733 1 b 438 180 733 104 572 180 b 130 1 248 180 130 101 b 423 -180 130 -92 210 -180 z m 284 58 b 400 147 284 131 333 147 b 577 -45 498 147 577 42 b 469 -145 577 -115 533 -145 b 331 -71 409 -145 369 -112 b 284 58 305 -37 284 12 z m 815 -213 b 829 -223 815 -219 824 -223 l 848 -223 b 863 -213 857 -223 863 -219 l 863 212 b 848 223 863 217 857 223 l 829 223 b 815 212 824 223 815 217 z m 82 212 l 82 -213 b 96 -223 82 -219 88 -223 l 114 -223 b 128 -213 121 -223 128 -219 l 128 212 b 114 223 128 217 121 223 l 96 223 b 82 212 88 223 82 217 z m 13 -223 l 32 -223 b 45 -213 39 -223 45 -219 l 45 212 b 32 223 45 217 39 223 l 13 223 b 0 212 4 223 0 217 l 0 -213 b 13 -223 0 -219 4 -223 z"},noteheadWhole:{x_min:0,x_max:422,y_min:-125,y_max:125,ha:250,o:"m 0 3 b 297 -180 0 -94 82 -180 b 608 3 533 -180 608 -98 b 311 180 608 105 445 180 b 0 3 120 180 0 101 z m 156 56 b 160 91 156 68 157 79 b 274 148 176 141 229 148 b 452 -45 373 148 452 42 b 386 -141 452 -89 433 -130 b 341 -147 372 -145 356 -147 b 206 -72 289 -147 236 -112 b 156 56 177 -39 156 10 z"},noteheadHalf:{x_min:0,x_max:295,y_min:-125,y_max:125,ha:250,o:"m 140 -180 b 425 60 377 -180 425 13 b 282 180 425 134 366 180 b 0 -60 68 180 0 14 b 140 -180 0 -137 60 -180 z m 42 -63 b 318 121 42 7 251 121 b 372 91 346 121 361 108 b 380 63 376 82 380 73 b 108 -125 380 1 177 -125 b 50 -92 78 -125 60 -109 b 42 -63 46 -84 42 -73 z"},noteheadBlack:{x_min:0,x_max:295,y_min:-125,y_max:125,ha:250,o:"m 0 -60 b 140 -180 0 -135 62 -180 b 425 60 268 -180 425 -62 b 285 180 425 134 367 180 b 0 -60 127 180 0 63 z"},noteheadXWhole:{x_min:0,x_max:377,y_min:-125,y_max:125,ha:250,o:"m 0 148 b 12 124 0 140 4 131 l 132 0 l 12 -124 b 1 -148 4 -131 1 -140 b 32 -180 1 -164 14 -180 l 158 -180 b 179 -171 166 -180 173 -177 l 272 -95 l 364 -171 b 384 -180 370 -177 377 -180 l 511 -180 b 543 -148 528 -180 543 -164 b 531 -124 543 -140 539 -131 l 412 0 l 531 124 b 541 148 539 131 541 140 b 513 180 541 164 528 180 l 384 180 b 364 171 377 180 370 177 l 272 94 l 179 171 b 158 180 173 177 166 180 l 30 180 b 0 148 16 180 0 164 z m 245 0 l 88 141 l 157 141 l 272 45 l 386 141 l 456 141 l 300 0 l 456 -141 l 386 -141 l 272 -45 l 157 -141 l 88 -141 z"},noteheadXHalf:{x_min:0,x_max:334,y_min:-125,y_max:125,ha:250,o:"m 32 -180 l 184 -180 b 209 -170 193 -180 203 -177 l 271 -99 l 363 -171 b 384 -180 370 -176 377 -180 l 445 -180 b 478 -147 461 -180 478 -163 b 465 -125 478 -138 474 -131 l 341 -22 l 474 127 b 481 148 480 131 481 138 b 448 180 481 166 468 180 l 295 180 b 271 170 287 180 278 177 l 209 98 l 115 171 b 95 180 109 177 104 180 l 36 180 b 4 148 19 180 4 164 b 14 124 4 140 7 132 l 140 22 l 7 -127 b 0 -148 3 -131 0 -138 b 32 -180 0 -166 14 -180 z m 95 148 l 233 33 l 334 148 l 410 148 l 274 -6 l 445 -148 l 384 -148 l 248 -35 l 147 -148 l 71 -148 l 206 4 l 36 148 z"},noteheadXBlack:{x_min:0,x_max:290,y_min:-125,y_max:125,ha:250,o:"m 0 -158 b 19 -180 0 -170 7 -180 b 29 -176 23 -180 26 -179 l 207 -24 l 389 -176 b 399 -180 392 -179 396 -180 b 418 -160 410 -180 418 -168 b 410 -143 418 -153 415 -147 l 239 0 l 410 144 b 418 160 415 147 418 154 b 399 180 418 171 408 180 b 389 177 396 180 392 179 l 207 26 l 29 177 b 17 180 26 179 22 180 b 0 161 7 180 0 170 b 7 144 0 156 3 148 l 179 0 l 7 -143 b 0 -158 1 -147 0 -153 z"},noteheadCircleX:{x_min:0,x_max:249,y_min:-125,y_max:125,ha:250,o:"m 0 0 b 179 -180 0 -99 81 -180 b 359 0 278 -180 359 -99 b 179 180 359 99 278 180 b 0 0 81 180 0 99 z m 69 84 l 151 1 l 68 -84 b 40 0 49 -60 40 -30 b 69 84 40 32 50 60 z m 180 -27 l 262 -111 b 179 -138 239 -128 210 -138 b 95 -111 148 -138 120 -128 z m 209 1 l 291 84 b 317 0 307 60 317 30 b 292 -82 317 -30 308 -59 z m 179 138 b 261 112 210 138 238 128 l 180 30 l 98 112 b 179 138 121 128 148 138 z"},noteheadTriangleUpWhole:{x_min:0,x_max:319,y_min:-125,y_max:125,ha:250,o:"m 0 -166 b 14 -180 0 -173 6 -180 l 445 -180 b 459 -166 454 -180 459 -173 b 458 -158 459 -163 458 -160 l 239 173 b 228 180 238 177 233 180 b 216 173 225 180 219 177 l 1 -158 b 0 -166 1 -160 0 -163 z m 145 -96 b 228 108 145 -17 197 56 b 310 -98 259 55 310 -17 b 288 -137 310 -111 301 -137 l 170 -137 b 145 -96 157 -137 145 -109 z"},noteheadTriangleUpHalf:{x_min:0,x_max:285,y_min:-125,y_max:125,ha:250,o:"m 14 -180 l 396 -180 b 410 -166 406 -180 410 -173 b 409 -158 410 -163 410 -161 l 228 173 b 215 180 226 174 220 180 b 202 173 210 180 204 177 l 3 -157 b 0 -166 1 -160 0 -163 b 14 -180 0 -173 7 -180 z m 115 -138 l 232 76 l 297 -37 l 246 -138 z"},noteheadTriangleUpBlack:{x_min:0,x_max:293,y_min:-125,y_max:125,ha:250,o:"m 422 -180 l 207 180 l 0 -180 z"},noteheadDiamondWhole:{x_min:0,x_max:270,y_min:-125,y_max:125,ha:250,o:"m 4 7 l 258 -179 b 264 -180 261 -179 262 -180 b 272 -176 268 -180 271 -179 l 386 -23 b 389 -16 387 -20 389 -19 b 383 -7 389 -13 386 -9 l 130 179 b 122 180 128 180 125 180 b 115 177 120 180 117 180 l 3 23 b 0 17 1 20 0 19 b 4 7 0 16 3 10 z m 109 111 b 112 112 109 112 111 112 b 118 111 115 112 117 111 l 320 -37 b 324 -46 323 -39 324 -42 b 275 -111 278 -111 276 -111 b 268 -108 272 -111 271 -109 l 66 40 b 62 48 65 42 62 45 z"},noteheadDiamondHalf:{x_min:0,x_max:251,y_min:-125,y_max:125,ha:250,o:"m 4 -7 l 174 -177 b 180 -180 176 -180 179 -180 b 189 -177 183 -180 186 -180 l 359 -7 b 361 0 360 -6 361 -3 b 359 7 361 3 360 4 l 189 177 b 180 180 186 179 183 180 b 174 177 179 180 176 179 l 4 7 b 0 0 1 4 0 3 b 4 -7 0 -3 1 -6 z m 215 73 b 266 26 238 73 266 50 b 138 -71 266 -12 176 -71 b 96 -50 121 -71 108 -63 b 88 -24 89 -43 88 -32 b 215 73 88 13 177 73 z"},noteheadDiamondBlack:{x_min:0,x_max:250,y_min:-125,y_max:125,ha:250,o:"m 4 -7 l 173 -177 b 180 -180 176 -180 177 -180 b 187 -177 181 -180 184 -180 l 357 -6 b 360 1 359 -4 360 -1 b 357 9 360 4 359 7 l 189 177 b 180 180 187 179 184 180 b 171 177 177 180 173 179 l 3 9 b 0 1 0 6 0 4 b 4 -7 0 -1 1 -4 z"},noteheadSquareWhite:{x_min:0,x_max:313,y_min:-125,y_max:125,ha:250,o:"m 451 -180 l 451 180 l 0 180 l 0 -180 z m 40 -138 l 40 140 l 410 140 l 410 -138 z"},noteheadSquareBlack:{x_min:0,x_max:313,y_min:-125,y_max:125,ha:250,o:"m 451 -180 l 451 180 l 0 180 l 0 -180 z"},augmentationDot:{x_min:0,x_max:100,y_min:-50,y_max:50,ha:100,o:"m 72 -72 b 144 0 112 -72 144 -40 b 72 72 144 40 112 72 b 0 0 32 72 0 40 b 72 -72 0 -40 32 -72 z"},tremolo1