/*! For license information please see opensheetmusicdisplay.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.opensheetmusicdisplay=e():t.opensheetmusicdisplay=e()}(this,(()=>(()=>{var t={5179:(t,e,i)=>{"use strict";i.d(e,{B:()=>r});var s=i(655),n=i(6308),r=function(){function t(t,e){for(var i=[],n=2;n{"use strict";i.d(e,{K:()=>s});var s=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},9397:(t,e,i)=>{"use strict";function s(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var i={get passive(){return e=!0,!1}},s=function(){};t.document.addEventListener("test",s,i),t.document.removeEventListener("test",s,i)}catch(t){e=!1}return e}(t)&&{passive:!0}}i.d(e,{K:()=>s})},7474:(t,e,i)=>{"use strict";i.r(e),i.d(e,{MDCIconButtonToggle:()=>v,MDCIconButtonToggleFoundation:()=>S,cssClasses:()=>g,strings:()=>b});var s=i(655),n=i(5179),r=i(9397);var o,a=i(6308),l={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},h={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},u={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},c=["touchstart","pointerdown","mousedown","keydown"],d=["touchend","pointerup","mouseup","contextmenu"],p=[],f=function(t){function e(i){var n=t.call(this,(0,s.pi)((0,s.pi)({},e.defaultAdapter),i))||this;return n.activationAnimationHasEnded_=!1,n.activationTimer_=0,n.fgDeactivationRemovalTimer_=0,n.fgScale_="0",n.frame_={width:0,height:0},n.initialSize_=0,n.layoutFrame_=0,n.maxRadius_=0,n.unboundedCoords_={left:0,top:0},n.activationState_=n.defaultActivationState_(),n.activationTimerCallback_=function(){n.activationAnimationHasEnded_=!0,n.runDeactivationUXLogicIfReady_()},n.activateHandler_=function(t){return n.activate_(t)},n.deactivateHandler_=function(){return n.deactivate_()},n.focusHandler_=function(){return n.handleFocus()},n.blurHandler_=function(){return n.handleBlur()},n.resizeHandler_=function(){return n.layout()},n}return(0,s.ZT)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return h},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple_();if(this.registerRootHandlers_(i),i){var s=e.cssClasses,n=s.ROOT,r=s.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(n),t.adapter.isUnbounded()&&(t.adapter.addClass(r),t.layoutInternal_())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,s=i.ROOT,n=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(s),t.adapter.removeClass(n),t.removeCssVars_()}))}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){t.layoutInternal_(),t.layoutFrame_=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple_=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(c.forEach((function(t){e.adapter.registerInteractionHandler(t,e.activateHandler_)})),this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler_)),this.adapter.registerInteractionHandler("focus",this.focusHandler_),this.adapter.registerInteractionHandler("blur",this.blurHandler_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):d.forEach((function(t){e.adapter.registerDocumentInteractionHandler(t,e.deactivateHandler_)}))},e.prototype.deregisterRootHandlers_=function(){var t=this;c.forEach((function(e){t.adapter.deregisterInteractionHandler(e,t.activateHandler_)})),this.adapter.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),d.forEach((function(e){t.adapter.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)}))},e.prototype.removeCssVars_=function(){var t=this,i=e.strings;Object.keys(i).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(i[e],null)}))},e.prototype.activate_=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState_;if(!i.isActivated){var s=this.previousActivationEvent_;s&&void 0!==t&&s.type!==t.type||(i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&p.length>0&&p.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState_():(void 0!==t&&(p.push(t.target),this.registerDeactivationHandlers_(t)),i.wasElementMadeActive=this.checkElementMadeActive_(t),i.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame((function(){p=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive_(t),i.wasElementMadeActive&&e.animateActivation_()),i.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())}))))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,i=e.strings,s=i.VAR_FG_TRANSLATE_START,n=i.VAR_FG_TRANSLATE_END,r=e.cssClasses,o=r.FG_DEACTIVATION,a=r.FG_ACTIVATION,l=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var h="",u="";if(!this.adapter.isUnbounded()){var c=this.getFgTranslationCoordinates_(),d=c.startPoint,p=c.endPoint;h=d.x+"px, "+d.y+"px",u=p.x+"px, "+p.y+"px"}this.adapter.updateCssVariable(s,h),this.adapter.updateCssVariable(n,u),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(a),this.activationTimer_=setTimeout((function(){return t.activationTimerCallback_()}),l)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,i=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,i){if(!t)return{x:0,y:0};var s,n,r=e.x,o=e.y,a=r+i.left,l=o+i.top;if("touchstart"===t.type){var h=t;s=h.changedTouches[0].pageX-a,n=h.changedTouches[0].pageY-l}else{var u=t;s=u.pageX-a,n=u.pageY-l}return{x:s,y:n}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:t.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,s=this.activationState_,n=s.hasDeactivationUXRun,r=s.isActivated;(n||!r)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer_=setTimeout((function(){t.adapter.removeClass(i)}),u.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout((function(){return t.previousActivationEvent_=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var i=(0,s.pi)({},e);e.isProgrammatic?(requestAnimationFrame((function(){return t.animateDeactivation_(i)})),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame((function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(i),t.resetActivationState_()})))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=function(){this.frame_=this.adapter.computeBoundingRect();var t=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+e.numbers.PADDING;var i=Math.floor(t*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize_=i-1:this.initialSize_=i,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,i=t.VAR_FG_SIZE,s=t.VAR_LEFT,n=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize_+"px"),this.adapter.updateCssVariable(r,this.fgScale_),this.adapter.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter.updateCssVariable(s,this.unboundedCoords_.left+"px"),this.adapter.updateCssVariable(n,this.unboundedCoords_.top+"px"))},e}(a.K),m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return(0,s.ZT)(e,t),e.attachTo=function(t,i){void 0===i&&(i={isUnbounded:void 0});var s=new e(t);return void 0!==i.isUnbounded&&(s.unbounded=i.isUnbounded),s},e.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return function(t,e){void 0===e&&(e=!1);var i,s=window.CSS;if("boolean"==typeof o&&!e)return o;if(!s||"function"!=typeof s.supports)return!1;var n=s.supports("--css-vars","yes"),r=s.supports("(--css-vars: yes)")&&s.supports("color","#00000000");return i=n||r,e||(o=i),i}()},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(e){return t.root.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,(0,r.K)())},deregisterInteractionHandler:function(e,i){return t.root.removeEventListener(e,i,(0,r.K)())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return e=t.root,i=":active",(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,i);var e,i},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,(0,r.K)())},registerInteractionHandler:function(e,i){return t.root.addEventListener(e,i,(0,r.K)())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root.classList.remove(e)},updateCssVariable:function(e,i){return t.root.style.setProperty(e,i)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!0,configurable:!0}),e.prototype.activate=function(){this.foundation.activate()},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.layout=function(){this.foundation.layout()},e.prototype.getDefaultFoundation=function(){return new f(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root;this.unbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded_=function(){this.foundation.setUnbounded(Boolean(this.unbounded_))},e}(n.B),g={ICON_BUTTON_ON:"mdc-icon-button--on",ROOT:"mdc-icon-button"},b={ARIA_LABEL:"aria-label",ARIA_PRESSED:"aria-pressed",DATA_ARIA_LABEL_OFF:"data-aria-label-off",DATA_ARIA_LABEL_ON:"data-aria-label-on",CHANGE_EVENT:"MDCIconButtonToggle:change"},S=function(t){function e(i){var n=t.call(this,(0,s.pi)((0,s.pi)({},e.defaultAdapter),i))||this;return n.hasToggledAriaLabel=!1,n}return(0,s.ZT)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return g},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},hasClass:function(){return!1},notifyChange:function(){},removeClass:function(){},getAttr:function(){return null},setAttr:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this.adapter.getAttr(b.DATA_ARIA_LABEL_ON),e=this.adapter.getAttr(b.DATA_ARIA_LABEL_OFF);if(t&&e){if(null!==this.adapter.getAttr(b.ARIA_PRESSED))throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");this.hasToggledAriaLabel=!0}else this.adapter.setAttr(b.ARIA_PRESSED,String(this.isOn()))},e.prototype.handleClick=function(){this.toggle(),this.adapter.notifyChange({isOn:this.isOn()})},e.prototype.isOn=function(){return this.adapter.hasClass(g.ICON_BUTTON_ON)},e.prototype.toggle=function(t){if(void 0===t&&(t=!this.isOn()),t?this.adapter.addClass(g.ICON_BUTTON_ON):this.adapter.removeClass(g.ICON_BUTTON_ON),this.hasToggledAriaLabel){var e=t?this.adapter.getAttr(b.DATA_ARIA_LABEL_ON):this.adapter.getAttr(b.DATA_ARIA_LABEL_OFF);this.adapter.setAttr(b.ARIA_LABEL,e||"")}else this.adapter.setAttr(b.ARIA_PRESSED,""+t)},e}(a.K),y=S.strings,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rippleComponent=e.createRipple(),e}return(0,s.ZT)(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this;this.handleClick=function(){t.foundation.handleClick()},this.listen("click",this.handleClick)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.ripple.destroy(),t.prototype.destroy.call(this)},e.prototype.getDefaultFoundation=function(){var t=this;return new S({addClass:function(e){return t.root.classList.add(e)},hasClass:function(e){return t.root.classList.contains(e)},notifyChange:function(e){t.emit(y.CHANGE_EVENT,e)},removeClass:function(e){return t.root.classList.remove(e)},getAttr:function(e){return t.root.getAttribute(e)},setAttr:function(e,i){return t.root.setAttribute(e,i)}})},Object.defineProperty(e.prototype,"ripple",{get:function(){return this.rippleComponent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"on",{get:function(){return this.foundation.isOn()},set:function(t){this.foundation.toggle(t)},enumerable:!0,configurable:!0}),e.prototype.createRipple=function(){var t=new m(this.root);return t.unbounded=!0,t},e}(n.B)},5088:(t,e,i)=>{"use strict";i.r(e),i.d(e,{MDCSlider:()=>T,MDCSliderFoundation:()=>w,cssClasses:()=>o,numbers:()=>l,strings:()=>a});var s=i(655),n=i(5179),r=i(9397),o={ACTIVE:"mdc-slider--active",DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",FOCUS:"mdc-slider--focus",HAS_TRACK_MARKER:"mdc-slider--display-markers",IN_TRANSIT:"mdc-slider--in-transit",IS_DISCRETE:"mdc-slider--discrete",DISABLE_TOUCH_ACTION:"mdc-slider--disable-touch-action"},a={ARIA_DISABLED:"aria-disabled",ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUENOW:"aria-valuenow",CHANGE_EVENT:"MDCSlider:change",INPUT_EVENT:"MDCSlider:input",PIN_VALUE_MARKER_SELECTOR:".mdc-slider__pin-value-marker",STEP_DATA_ATTR:"data-step",THUMB_CONTAINER_SELECTOR:".mdc-slider__thumb-container",TRACK_MARKER_CONTAINER_SELECTOR:".mdc-slider__track-marker-container",TRACK_SELECTOR:".mdc-slider__track"},l={PAGE_FACTOR:4},h={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},u={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function c(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}var d=i(6308),p="undefined"!=typeof window,f=p&&!!window.PointerEvent,m=f?["pointerdown"]:["mousedown","touchstart"],g=f?["pointerup"]:["mouseup","touchend"],b={mousedown:"mousemove",pointerdown:"pointermove",touchstart:"touchmove"},S="ArrowDown",y="ArrowLeft",v="ArrowRight",E="ArrowUp",_="End",x="Home",M="PageDown",P="PageUp",w=function(t){function e(i){var n=t.call(this,(0,s.pi)((0,s.pi)({},e.defaultAdapter),i))||this;return n.savedTabIndex_=NaN,n.active_=!1,n.inTransit_=!1,n.isDiscrete_=!1,n.hasTrackMarker_=!1,n.handlingThumbTargetEvt_=!1,n.min_=0,n.max_=100,n.step_=0,n.value_=0,n.disabled_=!1,n.preventFocusState_=!1,n.thumbContainerPointerHandler_=function(){return n.handlingThumbTargetEvt_=!0},n.interactionStartHandler_=function(t){return n.handleDown_(t)},n.keydownHandler_=function(t){return n.handleKeydown_(t)},n.focusHandler_=function(){return n.handleFocus_()},n.blurHandler_=function(){return n.handleBlur_()},n.resizeHandler_=function(){return n.layout()},n}return(0,s.ZT)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},getAttribute:function(){return null},setAttribute:function(){},removeAttribute:function(){},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabIndex:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerThumbContainerInteractionHandler:function(){},deregisterThumbContainerInteractionHandler:function(){},registerBodyInteractionHandler:function(){},deregisterBodyInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},notifyInput:function(){},notifyChange:function(){},setThumbContainerStyleProperty:function(){},setTrackStyleProperty:function(){},setMarkerValue:function(){},setTrackMarkers:function(){},isRTL:function(){return!1}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.isDiscrete_=this.adapter.hasClass(o.IS_DISCRETE),this.hasTrackMarker_=this.adapter.hasClass(o.HAS_TRACK_MARKER),m.forEach((function(e){t.adapter.registerInteractionHandler(e,t.interactionStartHandler_),t.adapter.registerThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)})),f&&this.adapter.addClass(o.DISABLE_TOUCH_ACTION),this.adapter.registerInteractionHandler("keydown",this.keydownHandler_),this.adapter.registerInteractionHandler("focus",this.focusHandler_),this.adapter.registerInteractionHandler("blur",this.blurHandler_),this.adapter.registerResizeHandler(this.resizeHandler_),this.layout(),this.isDiscrete_&&0===this.getStep()&&(this.step_=1)},e.prototype.destroy=function(){var t=this;m.forEach((function(e){t.adapter.deregisterInteractionHandler(e,t.interactionStartHandler_),t.adapter.deregisterThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)})),this.adapter.deregisterInteractionHandler("keydown",this.keydownHandler_),this.adapter.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter.deregisterResizeHandler(this.resizeHandler_)},e.prototype.setupTrackMarker=function(){this.isDiscrete_&&this.hasTrackMarker_&&0!==this.getStep()&&this.adapter.setTrackMarkers(this.getStep(),this.getMax(),this.getMin())},e.prototype.layout=function(){this.rect_=this.adapter.computeBoundingRect(),this.updateUIForCurrentValue_()},e.prototype.getValue=function(){return this.value_},e.prototype.setValue=function(t){this.setValue_(t,!1)},e.prototype.getMax=function(){return this.max_},e.prototype.setMax=function(t){if(tthis.max_)throw new Error("Cannot set min to be greater than the slider's maximum value");this.min_=t,this.setValue_(this.value_,!1,!0),this.adapter.setAttribute(a.ARIA_VALUEMIN,String(this.min_)),this.setupTrackMarker()},e.prototype.getStep=function(){return this.step_},e.prototype.setStep=function(t){if(t<0)throw new Error("Step cannot be set to a negative number");this.isDiscrete_&&("number"!=typeof t||t<1)&&(t=1),this.step_=t,this.setValue_(this.value_,!1,!0),this.setupTrackMarker()},e.prototype.isDisabled=function(){return this.disabled_},e.prototype.setDisabled=function(t){this.disabled_=t,this.toggleClass_(o.DISABLED,this.disabled_),this.disabled_?(this.savedTabIndex_=this.adapter.getTabIndex(),this.adapter.setAttribute(a.ARIA_DISABLED,"true"),this.adapter.removeAttribute("tabindex")):(this.adapter.removeAttribute(a.ARIA_DISABLED),isNaN(this.savedTabIndex_)||this.adapter.setAttribute("tabindex",String(this.savedTabIndex_)))},e.prototype.handleDown_=function(t){var e=this;if(!this.disabled_){this.preventFocusState_=!0,this.setInTransit_(!this.handlingThumbTargetEvt_),this.handlingThumbTargetEvt_=!1,this.setActive_(!0);var i=function(t){e.handleMove_(t)},s=b[t.type],n=function(){e.handleUp_(),e.adapter.deregisterBodyInteractionHandler(s,i),g.forEach((function(t){return e.adapter.deregisterBodyInteractionHandler(t,n)}))};this.adapter.registerBodyInteractionHandler(s,i),g.forEach((function(t){return e.adapter.registerBodyInteractionHandler(t,n)})),this.setValueFromEvt_(t)}},e.prototype.handleMove_=function(t){t.preventDefault(),this.setValueFromEvt_(t)},e.prototype.handleUp_=function(){this.setActive_(!1),this.adapter.notifyChange()},e.prototype.getClientX_=function(t){return t.targetTouches&&t.targetTouches.length>0?t.targetTouches[0].clientX:t.clientX},e.prototype.setValueFromEvt_=function(t){var e=this.getClientX_(t),i=this.computeValueFromClientX_(e);this.setValue_(i,!0)},e.prototype.computeValueFromClientX_=function(t){var e=this.max_,i=this.min_,s=(t-this.rect_.left)/this.rect_.width;return this.adapter.isRTL()&&(s=1-s),i+s*(e-i)},e.prototype.handleKeydown_=function(t){var e=this.getKeyId_(t),i=this.getValueForKeyId_(e);isNaN(i)||(t.preventDefault(),this.adapter.addClass(o.FOCUS),this.setValue_(i,!0),this.adapter.notifyChange())},e.prototype.getKeyId_=function(t){return t.key===y||37===t.keyCode?y:t.key===v||39===t.keyCode?v:t.key===E||38===t.keyCode?E:t.key===S||40===t.keyCode?S:t.key===x||36===t.keyCode?x:t.key===_||35===t.keyCode?_:t.key===P||33===t.keyCode?P:t.key===M||34===t.keyCode?M:""},e.prototype.getValueForKeyId_=function(t){var e=this,i=e.max_,s=e.min_,n=e.step_||(i-s)/100;switch(this.adapter.isRTL()&&(t===y||t===v)&&(n=-n),t){case y:case S:return this.value_-n;case v:case E:return this.value_+n;case x:return this.min_;case _:return this.max_;case P:return this.value_+n*l.PAGE_FACTOR;case M:return this.value_-n*l.PAGE_FACTOR;default:return NaN}},e.prototype.handleFocus_=function(){this.preventFocusState_||this.adapter.addClass(o.FOCUS)},e.prototype.handleBlur_=function(){this.preventFocusState_=!1,this.adapter.removeClass(o.FOCUS)},e.prototype.setValue_=function(t,e,i){if(void 0===i&&(i=!1),t!==this.value_||i){var s=this.min_,n=this.max_,r=t===s||t===n;this.step_&&!r&&(t=this.quantize_(t)),tn&&(t=n),t=t||0,this.value_=t,this.adapter.setAttribute(a.ARIA_VALUENOW,String(this.value_)),this.updateUIForCurrentValue_(),e&&(this.adapter.notifyInput(),this.isDiscrete_&&this.adapter.setMarkerValue(t))}},e.prototype.quantize_=function(t){return Math.round(t/this.step_)*this.step_},e.prototype.updateUIForCurrentValue_=function(){var t=this,e=this,i=e.max_,s=e.min_,n=(e.value_-s)/(i-s),r=n*this.rect_.width;this.adapter.isRTL()&&(r=this.rect_.width-r);var o=p?function(t,e){if(c(t)&&e in h){var i=t.document.createElement("div"),s=h[e],n=s.standard,r=s.prefixed;return n in i.style?n:r}return e}(window,"transform"):"transform",a=p?function(t,e){if(c(t)&&e in u){var i=t.document.createElement("div"),s=u[e],n=s.standard,r=s.prefixed;return s.cssProperty in i.style?n:r}return e}(window,"transitionend"):"transitionend";if(this.inTransit_){var l=function(){t.setInTransit_(!1),t.adapter.deregisterThumbContainerInteractionHandler(a,l)};this.adapter.registerThumbContainerInteractionHandler(a,l)}requestAnimationFrame((function(){t.adapter.setThumbContainerStyleProperty(o,"translateX("+r+"px) translateX(-50%)"),t.adapter.setTrackStyleProperty(o,"scaleX("+n+")")}))},e.prototype.setActive_=function(t){this.active_=t,this.toggleClass_(o.ACTIVE,this.active_)},e.prototype.setInTransit_=function(t){this.inTransit_=t,this.toggleClass_(o.IN_TRANSIT,this.inTransit_)},e.prototype.toggleClass_=function(t,e){e?this.adapter.addClass(t):this.adapter.removeClass(t)},e}(d.K),T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.foundation.getMin()},set:function(t){this.foundation.setMin(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.foundation.getMax()},set:function(t){this.foundation.setMax(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this.foundation.getStep()},set:function(t){this.foundation.setStep(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.thumbContainer_=this.root.querySelector(a.THUMB_CONTAINER_SELECTOR),this.track_=this.root.querySelector(a.TRACK_SELECTOR),this.pinValueMarker_=this.root.querySelector(a.PIN_VALUE_MARKER_SELECTOR),this.trackMarkerContainer_=this.root.querySelector(a.TRACK_MARKER_CONTAINER_SELECTOR)},e.prototype.getDefaultFoundation=function(){var t=this;return new w({hasClass:function(e){return t.root.classList.contains(e)},addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},getAttribute:function(e){return t.root.getAttribute(e)},setAttribute:function(e,i){return t.root.setAttribute(e,i)},removeAttribute:function(e){return t.root.removeAttribute(e)},computeBoundingRect:function(){return t.root.getBoundingClientRect()},getTabIndex:function(){return t.root.tabIndex},registerInteractionHandler:function(e,i){return t.listen(e,i,(0,r.K)())},deregisterInteractionHandler:function(e,i){return t.unlisten(e,i,(0,r.K)())},registerThumbContainerInteractionHandler:function(e,i){t.thumbContainer_.addEventListener(e,i,(0,r.K)())},deregisterThumbContainerInteractionHandler:function(e,i){t.thumbContainer_.removeEventListener(e,i,(0,r.K)())},registerBodyInteractionHandler:function(t,e){return document.body.addEventListener(t,e)},deregisterBodyInteractionHandler:function(t,e){return document.body.removeEventListener(t,e)},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},notifyInput:function(){return t.emit(a.INPUT_EVENT,t)},notifyChange:function(){return t.emit(a.CHANGE_EVENT,t)},setThumbContainerStyleProperty:function(e,i){t.thumbContainer_.style.setProperty(e,i)},setTrackStyleProperty:function(e,i){return t.track_.style.setProperty(e,i)},setMarkerValue:function(e){return t.pinValueMarker_.innerText=e.toLocaleString()},setTrackMarkers:function(e,i,s){var n=e.toLocaleString(),r="linear-gradient(to right, currentColor 2px, transparent 0) 0 center / calc((100% - 2px) / (("+i.toLocaleString()+" - "+s.toLocaleString()+") / "+n+")) 100% repeat-x";t.trackMarkerContainer_.style.setProperty("background",r)},isRTL:function(){return"rtl"===getComputedStyle(t.root).direction}})},e.prototype.initialSyncWithDOM=function(){var t=this.parseFloat_(this.root.getAttribute(a.ARIA_VALUENOW),this.value),e=this.parseFloat_(this.root.getAttribute(a.ARIA_VALUEMIN),this.min),i=this.parseFloat_(this.root.getAttribute(a.ARIA_VALUEMAX),this.max);e>=this.max?(this.max=i,this.min=e):(this.min=e,this.max=i),this.step=this.parseFloat_(this.root.getAttribute(a.STEP_DATA_ATTR),this.step),this.value=t,this.disabled=this.root.hasAttribute(a.ARIA_DISABLED)&&"false"!==this.root.getAttribute(a.ARIA_DISABLED),this.foundation.setupTrackMarker()},e.prototype.layout=function(){this.foundation.layout()},e.prototype.stepUp=function(t){void 0===t&&(t=this.step||1),this.value+=t},e.prototype.stepDown=function(t){void 0===t&&(t=this.step||1),this.value-=t},e.prototype.parseFloat_=function(t,e){var i=parseFloat(t);return"number"==typeof i&&isFinite(i)?i:e},e}(n.B)},7729:t=>{t.exports=function(t){var n=t.createGain(),r=n._voltage=function(t){var e=t.createBufferSource(),s=t.createBuffer(1,2,t.sampleRate);return s.getChannelData(0).set(i),e.buffer=s,e.loop=!0,e}(t),o=s(r),a=s(r),l=s(r);return n._startAmount=s(a),n._endAmount=s(l),n._multiplier=s(o),n._multiplier.connect(n),n._startAmount.connect(n),n._endAmount.connect(n),n.value=o.gain,n.startValue=a.gain,n.endValue=l.gain,n.startValue.value=0,n.endValue.value=0,Object.defineProperties(n,e),n};var e={attack:{value:0,writable:!0},decay:{value:0,writable:!0},sustain:{value:1,writable:!0},release:{value:0,writable:!0},getReleaseDuration:{value:function(){return this.release}},start:{value:function(t){var e=this._multiplier.gain,i=this._startAmount.gain,s=this._endAmount.gain;this._voltage.start(t),this._decayFrom=this._decayFrom=t+this.attack,this._startedAt=t;var r=this.sustain;e.cancelScheduledValues(t),i.cancelScheduledValues(t),s.cancelScheduledValues(t),s.setValueAtTime(0,t),this.attack?(e.setValueAtTime(0,t),e.linearRampToValueAtTime(1,t+this.attack),i.setValueAtTime(1,t),i.linearRampToValueAtTime(0,t+this.attack)):(e.setValueAtTime(1,t),i.setValueAtTime(0,t)),this.decay&&e.setTargetAtTime(r,this._decayFrom,n(this.decay))}},stop:{value:function(t,e){e&&(t-=this.release);var i=t+this.release;if(this.release){var s=this._multiplier.gain,r=this._startAmount.gain,o=this._endAmount.gain;s.cancelScheduledValues(t),r.cancelScheduledValues(t),o.cancelScheduledValues(t);var a=n(this.release);if(this.attack&&t=1&&(r=1),r}(0,0,this._startedAt,this._decayFrom,t);s.linearRampToValueAtTime(l,t),r.linearRampToValueAtTime(1-l,t),r.setTargetAtTime(0,t,a)}o.setTargetAtTime(1,t,a),s.setTargetAtTime(0,t,a)}return this._voltage.stop(i),i}},onended:{get:function(){return this._voltage.onended},set:function(t){this._voltage.onended=t}}},i=new Float32Array([1,1]);function s(t){var e=t.context.createGain();return t.connect(e),e}function n(t){return Math.log(t+1)/Math.log(100)}},4158:t=>{"use strict";t.exports={decode:function(t,e){for(var i,s,n,r=t.replace(/[^A-Za-z0-9\+\/]/g,""),o=r.length,a=e?Math.ceil((3*o+1>>2)/e)*e:3*o+1>>2,l=new Uint8Array(a),h=0,u=0,c=0;c64&&n<91?n-65:n>96&&n<123?n-71:n>47&&n<58?n+4:43===n?62:47===n?63:0)<<18-6*s,3===s||o-c==1){for(i=0;i<3&&u>>(16>>>i&24)&255;h=0}return l}}},9799:t=>{"use strict";t.exports=function(t,e){return new Promise((function(i,s){var n=new XMLHttpRequest;e&&(n.responseType=e),n.open("GET",t),n.onload=function(){200===n.status?i(n.response):s(Error(n.statusText))},n.onerror=function(){s(Error("Network Error"))},n.send()}))}},7665:(t,e,i)=>{"use strict";var s=i(4158),n=i(9799);function r(t){return function(e){return"string"==typeof e&&t.test(e)}}function o(t,e){return"string"==typeof t?t+e:"function"==typeof t?t(e):e}function a(t,e,i,s){var n,r=e instanceof ArrayBuffer?l:h(e)?u:(n=e)&&"function"==typeof n.then?c:d(e)?p:function(t){return t&&"object"==typeof t}(e)?f:m(e)?g:b(e)?S:y(e)?v:null;return r?r(t,e,i||{}):s?Promise.resolve(s):Promise.reject("Source not valid ("+e+")")}function l(t,e,i){return new Promise((function(i,s){t.decodeAudioData(e,(function(t){i(t)}),(function(){s("Can't decode audio data ("+e.slice(0,30)+"...)")}))}))}a.fetch=n;var h=r(/\.(mp3|wav|ogg)(\?.*)?$/i);function u(t,e,i){var s=o(i.from,e);return a(t,a.fetch(s,"arraybuffer"),i)}function c(t,e,i){return e.then((function(e){return a(t,e,i)}))}var d=Array.isArray;function p(t,e,i){return Promise.all(e.map((function(e){return a(t,e,i,e)})))}function f(t,e,i){var s={},n=Object.keys(e).map((function(n){if(i.only&&-1===i.only.indexOf(n))return null;var r=e[n];return a(t,r,i,r).then((function(t){s[n]=t}))}));return Promise.all(n).then((function(){return s}))}var m=r(/\.json(\?.*)?$/i);function g(t,e,i){var s=o(i.from,e);return a(t,a.fetch(s,"text").then(JSON.parse),i)}var b=r(/^data:audio/);function S(t,e,i){var n=e.indexOf(",");return a(t,s.decode(e.slice(n+1)).buffer,i)}var y=r(/\.js(\?.*)?$/i);function v(t,e,i){var s=o(i.from,e);return a(t,a.fetch(s,"text").then(E),i)}function E(t){var e=t.indexOf("MIDI.Soundfont.");if(e<0)throw Error("Invalid MIDI.js Soundfont format");e=t.indexOf("=",e)+2;var i=t.lastIndexOf(",");return JSON.parse(t.slice(e,i)+"}")}t.exports&&(t.exports=a),"undefined"!=typeof window&&(window.loadAudio=a)},8011:function(t,e){var i,s;void 0===(s="function"==typeof(i=function(){"use strict";return function(t){for(var e={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},i={number:function(t){return+u("number",t)},"coordinate pair":function(t){var e=u("number",t);return null!==e||t?(u("comma"),{x:+e,y:+u("number",!0)}):null},"arc definition":function(t){var e=i["coordinate pair"](t);if(!e&&!t)return null;u("comma");var s=+u("number",!0);u("comma",!0);var n=!!+u("flag",!0);u("comma");var r=!!+u("flag",!0);return u("comma"),{radii:e,rotation:s,large:n,clockwise:r,end:i["coordinate pair"](!0)}}},s=0,n=[];s= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};var c="[object Object]";s.prototype={constructor:s,logger:h.default,log:h.default.log,registerHelper:function(t,e){if(r.toString.call(t)===c){if(e)throw new o.default("Arg not supported with multiple helpers");r.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(r.toString.call(t)===c)r.extend(this.partials,t);else{if(void 0===e)throw new o.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(r.toString.call(t)===c){if(e)throw new o.default("Arg not supported with multiple decorators");r.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){u.resetLoggedProperties()}};var d=h.default.log;e.log=d,e.createFrame=r.createFrame,e.logger=h.default},function(t,e){"use strict";function i(t){return n[t]}function s(t){for(var e=1;e":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,o=/[&<>"'`=]/,a=Object.prototype.toString;e.toString=a;var l=function(t){return"function"==typeof t};l(/x/)&&(e.isFunction=l=function(t){return"function"==typeof t&&"[object Function]"===a.call(t)}),e.isFunction=l;var h=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===a.call(t)};e.isArray=h},function(t,e,i){"use strict";function s(t,e){var i=e&&e.loc,o=void 0,a=void 0,l=void 0,h=void 0;i&&(o=i.start.line,a=i.end.line,l=i.start.column,h=i.end.column,t+=" - "+o+":"+l);for(var u=Error.prototype.constructor.call(this,t),c=0;c0?(i.ids&&(i.ids=[i.name]),t.helpers.each(e,i)):n(this);if(i.data&&i.ids){var o=s.createFrame(i.data);o.contextPath=s.appendContextPath(i.data.contextPath,i.name),i={data:o}}return r(e,i)}))},t.exports=e.default},function(t,e,i){"use strict";var s=i(13).default,n=i(43).default,r=i(55).default,o=i(60).default,a=i(1).default;e.__esModule=!0;var l=i(5),h=a(i(6));e.default=function(t){t.registerHelper("each",(function(t,e){function i(e,i,s){p&&(p.key=e,p.index=i,p.first=0===i,p.last=!!s,f&&(p.contextPath=f+e)),d+=a(t[e],{data:p,blockParams:l.blockParams([t[e],e],[f+e,null])})}if(!e)throw new h.default("Must pass iterator to #each");var a=e.fn,u=e.inverse,c=0,d="",p=void 0,f=void 0;if(e.data&&e.ids&&(f=l.appendContextPath(e.data.contextPath,e.ids[0])+"."),l.isFunction(t)&&(t=t.call(this)),e.data&&(p=l.createFrame(e.data)),t&&"object"==typeof t)if(l.isArray(t))for(var m=t.length;cn;)F(t,i=s[n++],e[i]);return t},G=function(t,e){return void 0===e?x(t):V(x(t),e)},W=function(t){var e=A.call(this,t);return!(e||!r(this,t)||!r(R,t)||r(this,L)&&this[L][t])||e},U=function(t,e){var i=E(t=y(t),e);return!i||!r(R,e)||r(t,L)&&t[L][e]||(i.enumerable=!0),i},H=function(t){for(var e,i=M(y(t)),s=[],n=0;i.length>n;)r(R,e=i[n++])||e==L||s.push(e);return s},z=function(t){for(var e,i=M(y(t)),s=[],n=0;i.length>n;)r(R,e=i[n++])&&s.push(R[e]);return s},j=h((function(){var t=P();return"[null]"!=T([t])||"{}"!=T({a:t})||"{}"!=T(Object(t))}));N||(P=function(){if(O(this))throw TypeError("Symbol is not a constructor");return D(d(arguments.length>0?arguments[0]:void 0))},l(P.prototype,"toString",(function(){return this._k})),O=function(t){return t instanceof P},s.create=G,s.isEnum=W,s.getDesc=U,s.setDesc=F,s.setDescs=V,s.getNames=m.get=H,s.getSymbols=z,o&&!i(41)&&l(k,"propertyIsEnumerable",W,!0));var X={for:function(t){return r(C,t+="")?C[t]:C[t]=P(t)},keyFor:function(t){return f(C,t)},useSetter:function(){I=!0},useSimple:function(){I=!1}};s.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),(function(t){var e=p(t);X[t]=N?e:D(e)})),I=!0,a(a.G+a.W,{Symbol:P}),a(a.S,"Symbol",X),a(a.S+a.F*!N,"Object",{create:G,defineProperty:F,defineProperties:V,getOwnPropertyDescriptor:U,getOwnPropertyNames:H,getOwnPropertySymbols:z}),w&&a(a.S+a.F*(!N||j),"JSON",{stringify:function(t){if(void 0!==t&&!O(t)){for(var e,i,s=[t],n=1,r=arguments;r.length>n;)s.push(r[n++]);return"function"==typeof(e=s[1])&&(i=e),!i&&b(e)||(e=function(t,e){if(i&&(e=i.call(this,t,e)),!O(e))return e}),s[1]=e,T.apply(w,s)}}}),c(P,"Symbol"),c(Math,"Math",!0),c(n.JSON,"JSON",!0)},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){t.exports=!i(19)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){var s=i(16),n=i(21),r=i(22),o="prototype",a=function(t,e,i){var l,h,u,c=t&a.F,d=t&a.G,p=t&a.S,f=t&a.P,m=t&a.B,g=t&a.W,b=d?n:n[e]||(n[e]={}),S=d?s:p?s[e]:(s[e]||{})[o];for(l in d&&(i=e),i)(h=!c&&S&&l in S)&&l in b||(u=h?S[l]:i[l],b[l]=d&&"function"!=typeof S[l]?i[l]:m&&h?r(u,s):g&&S[l]==u?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e[o]=t[o],e}(u):f&&"function"==typeof u?r(Function.call,u):u,f&&((b[o]||(b[o]={}))[l]=u))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,t.exports=a},function(t,e){var i=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=i)},function(t,e,i){var s=i(23);t.exports=function(t,e,i){if(s(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,s){return t.call(e,i,s)};case 3:return function(i,s,n){return t.call(e,i,s,n)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){t.exports=i(25)},function(t,e,i){var s=i(9),n=i(26);t.exports=i(18)?function(t,e,i){return s.setDesc(t,e,n(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){var s=i(16),n="__core-js_shared__",r=s[n]||(s[n]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e,i){var s=i(9).setDesc,n=i(17),r=i(29)("toStringTag");t.exports=function(t,e,i){t&&!n(t=i?t:t.prototype,r)&&s(t,r,{configurable:!0,value:e})}},function(t,e,i){var s=i(27)("wks"),n=i(30),r=i(16).Symbol;t.exports=function(t){return s[t]||(s[t]=r&&r[t]||(r||n)("Symbol."+t))}},function(t,e){var i=0,s=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+s).toString(36))}},function(t,e,i){var s=i(9),n=i(32);t.exports=function(t,e){for(var i,r=n(t),o=s.getKeys(r),a=o.length,l=0;a>l;)if(r[i=o[l++]]===e)return i}},function(t,e,i){var s=i(33),n=i(35);t.exports=function(t){return s(n(t))}},function(t,e,i){var s=i(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==s(t)?t.split(""):Object(t)}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,i){var s=i(32),n=i(9).getNames,r={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.get=function(t){return o&&"[object Window]"==r.call(t)?function(t){try{return n(t)}catch(t){return o.slice()}}(t):n(s(t))}},function(t,e,i){var s=i(9);t.exports=function(t){var e=s.getKeys(t),i=s.getSymbols;if(i)for(var n,r=i(t),o=s.isEnum,a=0;r.length>a;)o.call(t,n=r[a++])&&e.push(n);return e}},function(t,e,i){var s=i(34);t.exports=Array.isArray||function(t){return"Array"==s(t)}},function(t,e,i){var s=i(40);t.exports=function(t){if(!s(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=!0},function(t,e){},function(t,e,i){t.exports={default:i(44),__esModule:!0}},function(t,e,i){i(45),i(51),t.exports=i(29)("iterator")},function(t,e,i){"use strict";var s=i(46)(!0);i(48)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=s(e,i),this._i+=t.length,{value:t,done:!1})}))},function(t,e,i){var s=i(47),n=i(35);t.exports=function(t){return function(e,i){var r,o,a=String(n(e)),l=s(i),h=a.length;return l<0||l>=h?t?"":void 0:(r=a.charCodeAt(l))<55296||r>56319||l+1===h||(o=a.charCodeAt(l+1))<56320||o>57343?t?a.charAt(l):r:t?a.slice(l,l+2):o-56320+(r-55296<<10)+65536}}},function(t,e){var i=Math.ceil,s=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?s:i)(t)}},function(t,e,i){"use strict";var s=i(41),n=i(20),r=i(24),o=i(25),a=i(17),l=i(49),h=i(50),u=i(28),c=i(9).getProto,d=i(29)("iterator"),p=!([].keys&&"next"in[].keys()),f="@@iterator",m="keys",g="values",b=function(){return this};t.exports=function(t,e,i,S,y,v,E){h(i,e,S);var _,x,M=function(t){if(!p&&t in I)return I[t];switch(t){case m:case g:return function(){return new i(this,t)}}return function(){return new i(this,t)}},P=e+" Iterator",w=y==g,T=!1,I=t.prototype,L=I[d]||I[f]||y&&I[y],A=L||M(y);if(L){var C=c(A.call(new t));u(C,P,!0),!s&&a(I,f)&&o(C,d,b),w&&L.name!==g&&(T=!0,A=function(){return L.call(this)})}if(s&&!E||!p&&!T&&I[d]||o(I,d,A),l[e]=A,l[P]=b,y)if(_={values:w?A:M(g),keys:v?A:M(m),entries:w?M("entries"):A},E)for(x in _)x in I||r(I,x,_[x]);else n(n.P+n.F*(p||T),e,_);return _}},function(t,e){t.exports={}},function(t,e,i){"use strict";var s=i(9),n=i(26),r=i(28),o={};i(25)(o,i(29)("iterator"),(function(){return this})),t.exports=function(t,e,i){t.prototype=s.create(o,{next:n(1,i)}),r(t,e+" Iterator")}},function(t,e,i){i(52);var s=i(49);s.NodeList=s.HTMLCollection=s.Array},function(t,e,i){"use strict";var s=i(53),n=i(54),r=i(49),o=i(32);t.exports=i(48)(Array,"Array",(function(t,e){this._t=o(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,n(1)):n(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])}),"values"),r.Arguments=r.Array,s("keys"),s("values"),s("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,i){t.exports={default:i(56),__esModule:!0}},function(t,e,i){i(51),i(45),t.exports=i(57)},function(t,e,i){var s=i(39),n=i(58);t.exports=i(21).getIterator=function(t){var e=n(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return s(e.call(t))}},function(t,e,i){var s=i(59),n=i(29)("iterator"),r=i(49);t.exports=i(21).getIteratorMethod=function(t){if(null!=t)return t[n]||t["@@iterator"]||r[s(t)]}},function(t,e,i){var s=i(34),n=i(29)("toStringTag"),r="Arguments"==s(function(){return arguments}());t.exports=function(t){var e,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=(e=Object(t))[n])?i:r?s(e):"Object"==(o=s(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e,i){t.exports={default:i(61),__esModule:!0}},function(t,e,i){i(62),t.exports=i(21).Object.keys},function(t,e,i){var s=i(63);i(64)("keys",(function(t){return function(e){return t(s(e))}}))},function(t,e,i){var s=i(35);t.exports=function(t){return Object(s(t))}},function(t,e,i){var s=i(20),n=i(21),r=i(19);t.exports=function(t,e){var i=(n.Object||{})[t]||Object[t],o={};o[t]=e(i),s(s.S+s.F*r((function(){i(1)})),"Object",o)}},function(t,e,i){"use strict";var s=i(1).default;e.__esModule=!0;var n=s(i(6));e.default=function(t){t.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new n.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},t.exports=e.default},function(t,e,i){"use strict";var s=i(1).default;e.__esModule=!0;var n=i(5),r=s(i(6));e.default=function(t){t.registerHelper("if",(function(t,e){if(2!=arguments.length)throw new r.default("#if requires exactly one argument");return n.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||n.isEmpty(t)?e.inverse(this):e.fn(this)})),t.registerHelper("unless",(function(e,i){if(2!=arguments.length)throw new r.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:i.inverse,inverse:i.fn,hash:i.hash})}))},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("log",(function(){for(var e=[void 0],i=arguments[arguments.length-1],s=0;s=0?e:parseInt(t,10)}return t},log:function(t){if(t=n.lookupLevel(t),"undefined"!=typeof console&&n.lookupLevel(n.level)<=t){var e=n.methodMap[t];console[e]||(e="log");for(var i=arguments.length,s=Array(i>1?i-1:0),r=1;r=d.LAST_COMPATIBLE_COMPILER_REVISION&&e<=d.COMPILER_REVISION)){if(e2&&E.push("'"+this.terminals_[S]+"'");x=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:c,expected:E})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+p);switch(g[0]){case 1:s.push(p),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),s.push(g[1]),p=null,f?(p=f,f=null):(h=this.lexer.yyleng,a=this.lexer.yytext,l=this.lexer.yylineno,c=this.lexer.yylloc,u>0&&u--);break;case 2:if(y=this.productions_[g[1]][1],_.$=n[n.length-y],_._$={first_line:r[r.length-(y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(y||1)].first_column,last_column:r[r.length-1].last_column},d&&(_._$.range=[r[r.length-(y||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.call(_,a,h,l,this.yy,g[1],n,r)))return b;y&&(s=s.slice(0,-1*y*2),n=n.slice(0,-1*y),r=r.slice(0,-1*y)),s.push(this.productions_[g[1]][0]),n.push(_.$),r.push(_._$),v=o[s[s.length-2]][s[s.length-1]],s.push(v);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,i,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)||(e=i,s=o,this.options.flex));o++);return e?((n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[s],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,i,s){function n(t,i){return e.yytext=e.yytext.substring(t,e.yyleng-i+t)}switch(i){case 0:if("\\\\"===e.yytext.slice(-2)?(n(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(n(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:case 5:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(n(5,9),"END_RAW_BLOCK");case 6:case 22:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:case 23:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 24:return 73;case 25:case 26:case 41:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=n(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=n(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return t}();return e.lexer=i,t.prototype=e,e.Parser=t,new t}();e.default=i,t.exports=e.default},function(t,e,i){"use strict";function s(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function n(t,e,i){void 0===e&&(e=t.length);var s=t[e-1],n=t[e-2];return s?"ContentStatement"===s.type?(n||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(s.original):void 0:i}function r(t,e,i){void 0===e&&(e=-1);var s=t[e+1],n=t[e+2];return s?"ContentStatement"===s.type?(n||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(s.original):void 0:i}function o(t,e,i){var s=t[null==e?0:e+1];if(s&&"ContentStatement"===s.type&&(i||!s.rightStripped)){var n=s.value;s.value=s.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),s.rightStripped=s.value!==n}}function a(t,e,i){var s=t[null==e?t.length-1:e-1];if(s&&"ContentStatement"===s.type&&(i||!s.leftStripped)){var n=s.value;return s.value=s.value.replace(i?/\s+$/:/[ \t]+$/,""),s.leftStripped=s.value!==n,s.leftStripped}}var l=i(1).default;e.__esModule=!0;var h=l(i(88));s.prototype=new h.default,s.prototype.Program=function(t){var e=!this.options.ignoreStandalone,i=!this.isRootSeen;this.isRootSeen=!0;for(var s=t.body,l=0,h=s.length;l0)throw new r.default("Invalid path: "+s,{loc:i});".."===h&&o++}}return{type:"PathExpression",data:t,depth:o,parts:n,original:s,loc:i}},e.prepareMustache=function(t,e,i,s,n,r){var o=s.charAt(3)||s.charAt(2),a="{"!==o&&"&"!==o;return{type:/\*/.test(s)?"Decorator":"MustacheStatement",path:t,params:e,hash:i,escaped:a,strip:n,loc:this.locInfo(r)}},e.prepareRawBlock=function(t,e,i,n){s(t,i);var r={type:"Program",body:e,strip:{},loc:n=this.locInfo(n)};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}},e.prepareBlock=function(t,e,i,n,o,a){n&&n.path&&s(t,n);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var h=void 0,u=void 0;if(i){if(l)throw new r.default("Unexpected inverse block on decorator",i);i.chain&&(i.program.body[0].closeStrip=n.strip),u=i.strip,h=i.program}return o&&(o=h,h=e,e=o),{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:h,openStrip:t.strip,inverseStrip:u,closeStrip:n&&n.strip,loc:this.locInfo(a)}},e.prepareProgram=function(t,e){if(!e&&t.length){var i=t[0].loc,s=t[t.length-1].loc;i&&s&&(e={source:i.source,start:{line:i.start.line,column:i.start.column},end:{line:s.end.line,column:s.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,i,n){return s(t,i),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:i&&i.strip,loc:this.locInfo(n)}};var r=n(i(6))},function(t,e,i){"use strict";function s(){}function n(t,e){if(t===e)return!0;if(h.isArray(t)&&h.isArray(e)&&t.length===e.length){for(var i=0;i1)throw new l.default("Unsupported number of partial arguments: "+i.length,t);i.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):i.push({type:"PathExpression",parts:[],depth:0}));var s=t.name.original,n="SubExpression"===t.name.type;n&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var r=t.indent||"";this.options.preventIndent&&r&&(this.opcode("appendContent",r),r=""),this.opcode("invokePartial",n,s,r),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){r(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,i){var s=t.path,n=s.parts[0],r=null!=e||null!=i;this.opcode("getContext",s.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",i),s.strict=!0,this.accept(s),this.opcode("invokeAmbiguous",n,r)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,i){var s=this.setupFullMustacheParams(t,e,i),n=t.path,r=n.parts[0];if(this.options.knownHelpers[r])this.opcode("invokeKnownHelper",s.length,r);else{if(this.options.knownHelpersOnly)throw new l.default("You specified knownHelpersOnly, but used the unknown helper "+r,t);n.strict=!0,n.falsy=!0,this.accept(n),this.opcode("invokeHelper",s.length,n.original,u.default.helpers.simpleId(n))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],i=u.default.helpers.scopedId(t),s=!t.depth&&!i&&this.blockParamIndex(e);s?this.opcode("lookupBlockParam",s,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,i):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,i=0,s=e.length;for(this.opcode("pushHash");i=0)return[e,n]}}}},function(t,e,i){"use strict";function s(t){this.value=t}function n(){}var r=i(60).default,o=i(1).default;e.__esModule=!0;var a=i(4),l=o(i(6)),h=i(5),u=o(i(92));n.prototype={nameLookup:function(t,e){return this.internalNameLookup(t,e)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=a.COMPILER_REVISION;return[t,a.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,i){return h.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:i?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,e){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(e),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,e,i,s){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!s,this.name=this.environment.name,this.isChild=!!i,this.context=i||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var n=t.opcodes,r=void 0,o=void 0,a=void 0,h=void 0;for(a=0,h=n.length;a0&&(i+=", "+s.join(", "));var n=0;r(this.aliases).forEach((function(t){var s=e.aliases[t];s.children&&s.referenceCount>1&&(i+=", alias"+ ++n+"="+t,s.children[0]="alias"+n)})),this.lookupPropertyFunctionIsUsed&&(i+=", "+this.lookupPropertyFunctionVarDeclaration());var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var a=this.mergeSource(i);return t?(o.push(a),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),") {\n ",a,"}"])},mergeSource:function(t){var e=this.environment.isSimple,i=!this.forceBuffer,s=void 0,n=void 0,r=void 0,o=void 0;return this.source.each((function(t){t.appendToBuffer?(r?t.prepend(" + "):r=t,o=t):(r&&(n?r.prepend("buffer += "):s=!0,o.add(";"),r=o=void 0),n=!0,e||(i=!1))})),i?r?(r.prepend("return "),o.add(";")):n||this.source.push('return "";'):(t+=", buffer = "+(s?"":this.initializeBuffer()),r?(r.prepend("return buffer + "),o.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(s?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(t){var e=this.aliasable("container.hooks.blockHelperMissing"),i=[this.contextName(0)];this.setupHelperArgs(t,0,i);var s=this.popStack();i.splice(1,0,s),this.push(this.source.functionCall(e,"call",i))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var i=this.topStack();e.splice(1,0,i),this.pushSource(["if (!",this.lastHelper,") { ",i," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack((function(t){return[" != null ? ",t,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,i,s){var n=0;s||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[n++])),this.resolvePath("context",t,n,e,i)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,i){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,i)},resolvePath:function(t,e,i,s,n){var r=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,i,s,n){var r=e.popStack(),o=i.length;for(t&&o--;sthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,i=t.length;e{t.exports=function t(e,i,s){function n(o,a){if(!i[o]){if(!e[o]){if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=i[o]={exports:{}};e[o][0].call(h.exports,(function(t){return n(e[o][1][t]||t)}),h,h.exports,t,e,i,s)}return i[o].exports}for(var r=void 0,o=0;o>2,a=(3&e)<<4|i>>4,l=1>6:64,h=2>4,i=(15&o)<<4|(a=r.indexOf(t.charAt(h++)))>>2,s=(3&a)<<6|(l=r.indexOf(t.charAt(h++))),d[u++]=e,64!==a&&(d[u++]=i),64!==l&&(d[u++]=s);return d}},{"./support":30,"./utils":32}],2:[function(t,e,i){"use strict";var s=t("./external"),n=t("./stream/DataWorker"),r=t("./stream/Crc32Probe"),o=t("./stream/DataLengthProbe");function a(t,e,i,s,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=i,this.compression=s,this.compressedContent=n}a.prototype={getContentWorker:function(){var t=new n(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new n(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,e,i){return t.pipe(new r).pipe(new o("uncompressedSize")).pipe(e.compressWorker(i)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,i){"use strict";var s=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,i){"use strict";var s=t("./utils"),n=function(){for(var t,e=[],i=0;i<256;i++){t=i;for(var s=0;s<8;s++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==s.getTypeOf(t)?function(t,e,i,s){var r=n,o=0+i;t^=-1;for(var a=0;a>>8^r[255&(t^e[a])];return-1^t}(0|e,t,t.length):function(t,e,i,s){var r=n,o=0+i;t^=-1;for(var a=0;a>>8^r[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,i){"use strict";i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,e,i){"use strict";var s;s="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:s}},{lie:37}],7:[function(t,e,i){"use strict";var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),r=t("./utils"),o=t("./stream/GenericWorker"),a=s?"uint8array":"array";function l(t,e){o.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}i.magic="\b\0",r.inherits(l,o),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(r.transformTo(a,t.data),!1)},l.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},i.compressWorker=function(t){return new l("Deflate",t)},i.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,i){"use strict";function s(t,e){var i,s="";for(i=0;i>>=8;return s}function n(t,e,i,n,o,u){var c,d,p=t.file,f=t.compression,m=u!==a.utf8encode,g=r.transformTo("string",u(p.name)),b=r.transformTo("string",a.utf8encode(p.name)),S=p.comment,y=r.transformTo("string",u(S)),v=r.transformTo("string",a.utf8encode(S)),E=b.length!==p.name.length,_=v.length!==S.length,x="",M="",P="",w=p.dir,T=p.date,I={crc32:0,compressedSize:0,uncompressedSize:0};e&&!i||(I.crc32=t.crc32,I.compressedSize=t.compressedSize,I.uncompressedSize=t.uncompressedSize);var L=0;e&&(L|=8),m||!E&&!_||(L|=2048);var A=0,C=0;w&&(A|=16),"UNIX"===o?(C=798,A|=function(t,e){var i=t;return t||(i=e?16893:33204),(65535&i)<<16}(p.unixPermissions,w)):(C=20,A|=function(t){return 63&(t||0)}(p.dosPermissions)),c=T.getUTCHours(),c<<=6,c|=T.getUTCMinutes(),c<<=5,c|=T.getUTCSeconds()/2,d=T.getUTCFullYear()-1980,d<<=4,d|=T.getUTCMonth()+1,d<<=5,d|=T.getUTCDate(),E&&(M=s(1,1)+s(l(g),4)+b,x+="up"+s(M.length,2)+M),_&&(P=s(1,1)+s(l(y),4)+v,x+="uc"+s(P.length,2)+P);var R="";return R+="\n\0",R+=s(L,2),R+=f.magic,R+=s(c,2),R+=s(d,2),R+=s(I.crc32,4),R+=s(I.compressedSize,4),R+=s(I.uncompressedSize,4),R+=s(g.length,2),R+=s(x.length,2),{fileRecord:h.LOCAL_FILE_HEADER+R+g+x,dirRecord:h.CENTRAL_FILE_HEADER+s(C,2)+R+s(y.length,2)+"\0\0\0\0"+s(A,4)+s(n,4)+g+x+y}}var r=t("../utils"),o=t("../stream/GenericWorker"),a=t("../utf8"),l=t("../crc32"),h=t("../signature");function u(t,e,i,s){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=i,this.encodeFileName=s,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(u,o),u.prototype.push=function(t){var e=t.meta.percent||0,i=this.entriesCount,s=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,o.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:i?(e+100*(i-s-1))/i:100}}))},u.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var i=n(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:i.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,i=n(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(i.dirRecord),e)this.push({data:function(t){return h.DATA_DESCRIPTOR+s(t.crc32,4)+s(t.compressedSize,4)+s(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:i.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)i=(i<<8)+this.byteAt(e);return this.index+=t,i},readString:function(t){return s.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":32}],19:[function(t,e,i){"use strict";var s=t("./Uint8ArrayReader");function n(t){s.call(this,t)}t("../utils").inherits(n,s),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,i){"use strict";var s=t("./DataReader");function n(t){s.call(this,t)}t("../utils").inherits(n,s),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,e,i){"use strict";var s=t("./ArrayReader");function n(t){s.call(this,t)}t("../utils").inherits(n,s),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,i){"use strict";var s=t("../utils"),n=t("../support"),r=t("./ArrayReader"),o=t("./StringReader"),a=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=s.getTypeOf(t);return s.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new a(t):n.uint8array?new l(s.transformTo("uint8array",t)):new r(s.transformTo("array",t)):new o(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,i){"use strict";i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,i){"use strict";var s=t("./GenericWorker"),n=t("../utils");function r(t){s.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(r,s),r.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},e.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,i){"use strict";var s=t("./GenericWorker"),n=t("../crc32");function r(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(r,s),r.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,i){"use strict";var s=t("../utils"),n=t("./GenericWorker");function r(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}s.inherits(r,n),r.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}n.prototype.processChunk.call(this,t)},e.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,i){"use strict";var s=t("../utils"),n=t("./GenericWorker");function r(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=s.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}s.inherits(r,n),r.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,i){"use strict";function s(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var i=0;i "+t:t}},e.exports=s},{}],29:[function(t,e,i){"use strict";var s=t("../utils"),n=t("./ConvertWorker"),r=t("./GenericWorker"),o=t("../base64"),a=t("../support"),l=t("../external"),h=null;if(a.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,e,i){var o=e;switch(e){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=e,this._mimeType=i,s.checkSupport(o),this._worker=t.pipe(new n(o)),t.lock()}catch(t){this._worker=new r("error"),this._worker.error(t)}}u.prototype={accumulate:function(t){return function(t,e){return new l.Promise((function(i,n){var r=[],a=t._internalType,l=t._outputType,h=t._mimeType;t.on("data",(function(t,i){r.push(t),e&&e(i)})).on("error",(function(t){r=[],n(t)})).on("end",(function(){try{var t=function(t,e,i){switch(t){case"blob":return s.newBlob(s.transformTo("arraybuffer",e),i);case"base64":return o.encode(e);default:return s.transformTo(t,e)}}(l,function(t,e){var i,s=0,n=null,r=0;for(i=0;i>>6:(i<65536?e[o++]=224|i>>>12:(e[o++]=240|i>>>18,e[o++]=128|i>>>12&63),e[o++]=128|i>>>6&63),e[o++]=128|63&i);return e}(t)},i.utf8decode=function(t){return n.nodebuffer?s.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,i,n,r,o=t.length,l=new Array(2*o);for(e=i=0;e>10&1023,l[i++]=56320|1023&n)}return l.length!==i&&(l.subarray?l=l.subarray(0,i):l.length=i),s.applyFromCharCode(l)}(t=s.transformTo(n.uint8array?"uint8array":"array",t))},s.inherits(h,o),h.prototype.processChunk=function(t){var e=s.transformTo(n.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var r=e;(e=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),e.set(r,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var o=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+a[t[i]]>e?i:e}(e),l=e;o!==e.length&&(n.uint8array?(l=e.subarray(0,o),this.leftOver=e.subarray(o,e.length)):(l=e.slice(0,o),this.leftOver=e.slice(o,e.length))),this.push({data:i.utf8decode(l),meta:t.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=h,s.inherits(u,o),u.prototype.processChunk=function(t){this.push({data:i.utf8encode(t.data),meta:t.meta})},i.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,i){"use strict";var s=t("./support"),n=t("./base64"),r=t("./nodejsUtils"),o=t("./external");function a(t){return t}function l(t,e){for(var i=0;i>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=s(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e,i,s,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(i<65536?e[o++]=224|i>>>12:(e[o++]=240|i>>>18,e[o++]=128|i>>>12&63),e[o++]=128|i>>>6&63),e[o++]=128|63&i);return e},i.buf2binstring=function(t){return l(t,t.length)},i.binstring2buf=function(t){for(var e=new s.Buf8(t.length),i=0,n=e.length;i>10&1023,h[s++]=56320|1023&n)}return l(h,s)},i.utf8border=function(t,e){var i;for((e=e||t.length)>t.length&&(e=t.length),i=e-1;0<=i&&128==(192&t[i]);)i--;return i<0||0===i?e:i+o[t[i]]>e?i:e}},{"./common":41}],43:[function(t,e,i){"use strict";e.exports=function(t,e,i,s){for(var n=65535&t|0,r=t>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3>>1:t>>>1;e[i]=t}return e}();e.exports=function(t,e,i,n){var r=s,o=n+i;t^=-1;for(var a=n;a>>8^r[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,i){"use strict";var s,n=t("../utils/common"),r=t("./trees"),o=t("./adler32"),a=t("./crc32"),l=t("./messages"),h=0,u=0,c=-2,d=2,p=8,f=286,m=30,g=19,b=2*f+1,S=15,y=3,v=258,E=v+y+1,_=42,x=113;function M(t,e){return t.msg=l[e],e}function P(t){return(t<<1)-(4t.avail_out&&(i=t.avail_out),0!==i&&(n.arraySet(t.output,e.pending_buf,e.pending_out,i,t.next_out),t.next_out+=i,e.pending_out+=i,t.total_out+=i,t.avail_out-=i,e.pending-=i,0===e.pending&&(e.pending_out=0))}function I(t,e){r._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,T(t.strm)}function L(t,e){t.pending_buf[t.pending++]=e}function A(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function C(t,e){var i,s,n=t.max_chain_length,r=t.strstart,o=t.prev_length,a=t.nice_match,l=t.strstart>t.w_size-E?t.strstart-(t.w_size-E):0,h=t.window,u=t.w_mask,c=t.prev,d=t.strstart+v,p=h[r+o-1],f=h[r+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(h[(i=e)+o]===f&&h[i+o-1]===p&&h[i]===h[r]&&h[++i]===h[r+1]){r+=2,i++;do{}while(h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&rl&&0!=--n);return o<=t.lookahead?o:t.lookahead}function R(t){var e,i,s,r,l,h,u,c,d,p,f=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-E)){for(n.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=i=t.hash_size;s=t.head[--e],t.head[e]=f<=s?s-f:0,--i;);for(e=i=f;s=t.prev[--e],t.prev[e]=f<=s?s-f:0,--i;);r+=f}if(0===t.strm.avail_in)break;if(h=t.strm,u=t.window,c=t.strstart+t.lookahead,p=void 0,(d=r)<(p=h.avail_in)&&(p=d),i=0===p?0:(h.avail_in-=p,n.arraySet(u,h.input,h.next_in,p,c),1===h.state.wrap?h.adler=o(h.adler,u,p,c):2===h.state.wrap&&(h.adler=a(h.adler,u,p,c)),h.next_in+=p,h.total_in+=p,p),t.lookahead+=i,t.lookahead+t.insert>=y)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y)if(s=r._tr_tally(t,t.strstart-t.match_start,t.match_length-y),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=y){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=y&&(t.ins_h=(t.ins_h<=y&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-y,s=r._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-y),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(R(t),0===t.lookahead&&e===h)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var s=t.block_start+i;if((0===t.strstart||t.strstart>=s)&&(t.lookahead=t.strstart-s,t.strstart=s,I(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-E&&(I(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(I(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(I(t,!1),t.strm.avail_out),1)})),new B(4,4,8,4,N),new B(4,5,16,8,N),new B(4,6,32,32,N),new B(4,4,16,16,k),new B(8,16,32,32,k),new B(8,16,128,128,k),new B(8,32,128,256,k),new B(32,128,258,1024,k),new B(32,258,258,4096,k)],i.deflateInit=function(t,e){return V(t,e,p,15,8,0)},i.deflateInit2=V,i.deflateReset=F,i.deflateResetKeep=O,i.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,u):c},i.deflate=function(t,e){var i,n,o,l;if(!t||!t.state||5>8&255),L(n,n.gzhead.time>>16&255),L(n,n.gzhead.time>>24&255),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(L(n,255&n.gzhead.extra.length),L(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=a(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(L(n,0),L(n,0),L(n,0),L(n,0),L(n,0),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,3),n.status=x);else{var d=p+(n.w_bits-8<<4)<<8;d|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(d|=32),d+=31-d%31,n.status=x,A(n,d),0!==n.strstart&&(A(n,t.adler>>>16),A(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),T(t),o=n.pending,n.pending!==n.pending_buf_size));)L(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),T(t),o=n.pending,n.pending===n.pending_buf_size)){l=1;break}l=n.gzindexo&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===l&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),T(t),o=n.pending,n.pending===n.pending_buf_size)){l=1;break}l=n.gzindexo&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===l&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&T(t),n.pending+2<=n.pending_buf_size&&(L(n,255&t.adler),L(n,t.adler>>8&255),t.adler=0,n.status=x)):n.status=x),0!==n.pending){if(T(t),0===t.avail_out)return n.last_flush=-1,u}else if(0===t.avail_in&&P(e)<=P(i)&&4!==e)return M(t,-5);if(666===n.status&&0!==t.avail_in)return M(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==h&&666!==n.status){var f=2===n.strategy?function(t,e){for(var i;;){if(0===t.lookahead&&(R(t),0===t.lookahead)){if(e===h)return 1;break}if(t.match_length=0,i=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(I(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(I(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(I(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var i,s,n,o,a=t.window;;){if(t.lookahead<=v){if(R(t),t.lookahead<=v&&e===h)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=y&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=y?(i=r._tr_tally(t,1,t.match_length-y),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=r._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(I(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(I(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(I(t,!1),0===t.strm.avail_out)?1:2}(n,e):s[n.level].func(n,e);if(3!==f&&4!==f||(n.status=666),1===f||3===f)return 0===t.avail_out&&(n.last_flush=-1),u;if(2===f&&(1===e?r._tr_align(n):5!==e&&(r._tr_stored_block(n,0,0,!1),3===e&&(w(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),T(t),0===t.avail_out))return n.last_flush=-1,u}return 4!==e?u:n.wrap<=0?1:(2===n.wrap?(L(n,255&t.adler),L(n,t.adler>>8&255),L(n,t.adler>>16&255),L(n,t.adler>>24&255),L(n,255&t.total_in),L(n,t.total_in>>8&255),L(n,t.total_in>>16&255),L(n,t.total_in>>24&255)):(A(n,t.adler>>>16),A(n,65535&t.adler)),T(t),0=i.w_size&&(0===a&&(w(i.head),i.strstart=0,i.block_start=0,i.insert=0),p=new n.Buf8(i.w_size),n.arraySet(p,e,f-i.w_size,i.w_size,0),e=p,f=i.w_size),l=t.avail_in,h=t.next_in,d=t.input,t.avail_in=f,t.next_in=0,t.input=e,R(i);i.lookahead>=y;){for(s=i.strstart,r=i.lookahead-(y-1);i.ins_h=(i.ins_h<>>=v=y>>>24,f-=v,0==(v=y>>>16&255))w[r++]=65535&y;else{if(!(16&v)){if(0==(64&v)){y=m[(65535&y)+(p&(1<>>=v,f-=v),f<15&&(p+=P[s++]<>>=v=y>>>24,f-=v,!(16&(v=y>>>16&255))){if(0==(64&v)){y=g[(65535&y)+(p&(1<>>=v,f-=v,(v=r-o)<_){if(u<(v=_-v)&&i.sane){t.msg="invalid distance too far back",i.mode=30;break t}if(M=d,(x=0)===c){if(x+=h-v,v>3,p&=(1<<(f-=E<<3))-1,t.next_in=s,t.next_out=r,t.avail_in=s>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=u,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new s.Buf32(c),e.distcode=e.distdyn=new s.Buf32(d),e.sane=1,e.back=-1,l):h}function g(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,m(t)):h}function b(t,e){var i,s;return t&&t.state?(s=t.state,e<0?(i=0,e=-e):(i=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=o.wsize?(s.arraySet(o.window,e,i-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(n<(r=o.wsize-o.wnext)&&(r=n),s.arraySet(o.window,e,i-n,r,o.wnext),(n-=r)?(s.arraySet(o.window,e,i-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,i.check=r(i.check,F,2,0),y=S=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&S)<<8)+(S>>8))%31){t.msg="incorrect header check",i.mode=30;break}if(8!=(15&S)){t.msg="unknown compression method",i.mode=30;break}if(y-=4,N=8+(15&(S>>>=4)),0===i.wbits)i.wbits=N;else if(N>i.wbits){t.msg="invalid window size",i.mode=30;break}i.dmax=1<>8&1),512&i.flags&&(F[0]=255&S,F[1]=S>>>8&255,i.check=r(i.check,F,2,0)),y=S=0,i.mode=3;case 3:for(;y<32;){if(0===g)break t;g--,S+=c[f++]<>>8&255,F[2]=S>>>16&255,F[3]=S>>>24&255,i.check=r(i.check,F,4,0)),y=S=0,i.mode=4;case 4:for(;y<16;){if(0===g)break t;g--,S+=c[f++]<>8),512&i.flags&&(F[0]=255&S,F[1]=S>>>8&255,i.check=r(i.check,F,2,0)),y=S=0,i.mode=5;case 5:if(1024&i.flags){for(;y<16;){if(0===g)break t;g--,S+=c[f++]<>>8&255,i.check=r(i.check,F,2,0)),y=S=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(g<(M=i.length)&&(M=g),M&&(i.head&&(N=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),s.arraySet(i.head.extra,c,f,M,N)),512&i.flags&&(i.check=r(i.check,c,M,f)),g-=M,f+=M,i.length-=M),i.length))break t;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===g)break t;for(M=0;N=c[f+M++],i.head&&N&&i.length<65536&&(i.head.name+=String.fromCharCode(N)),N&&M>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=12;break;case 10:for(;y<32;){if(0===g)break t;g--,S+=c[f++]<>>=7&y,y-=7&y,i.mode=27;break}for(;y<3;){if(0===g)break t;g--,S+=c[f++]<>>=1)){case 0:i.mode=14;break;case 1:if(_(i),i.mode=20,6!==e)break;S>>>=2,y-=2;break t;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=30}S>>>=2,y-=2;break;case 14:for(S>>>=7&y,y-=7&y;y<32;){if(0===g)break t;g--,S+=c[f++]<>>16^65535)){t.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&S,y=S=0,i.mode=15,6===e)break t;case 15:i.mode=16;case 16:if(M=i.length){if(g>>=5,y-=5,i.ndist=1+(31&S),S>>>=5,y-=5,i.ncode=4+(15&S),S>>>=4,y-=4,286>>=3,y-=3}for(;i.have<19;)i.lens[V[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,B={bits:i.lenbits},k=a(0,i.lens,0,19,i.lencode,0,i.work,B),i.lenbits=B.bits,k){t.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have>>16&255,L=65535&O,!((T=O>>>24)<=y);){if(0===g)break t;g--,S+=c[f++]<>>=T,y-=T,i.lens[i.have++]=L;else{if(16===L){for(D=T+2;y>>=T,y-=T,0===i.have){t.msg="invalid bit length repeat",i.mode=30;break}N=i.lens[i.have-1],M=3+(3&S),S>>>=2,y-=2}else if(17===L){for(D=T+3;y>>=T)),S>>>=3,y-=3}else{for(D=T+7;y>>=T)),S>>>=7,y-=7}if(i.have+M>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=30;break}for(;M--;)i.lens[i.have++]=N}}if(30===i.mode)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,B={bits:i.lenbits},k=a(1,i.lens,0,i.nlen,i.lencode,0,i.work,B),i.lenbits=B.bits,k){t.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,B={bits:i.distbits},k=a(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,B),i.distbits=B.bits,k){t.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===e)break t;case 20:i.mode=21;case 21:if(6<=g&&258<=b){t.next_out=m,t.avail_out=b,t.next_in=f,t.avail_in=g,i.hold=S,i.bits=y,o(t,E),m=t.next_out,d=t.output,b=t.avail_out,f=t.next_in,c=t.input,g=t.avail_in,S=i.hold,y=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;I=(O=i.lencode[S&(1<>>16&255,L=65535&O,!((T=O>>>24)<=y);){if(0===g)break t;g--,S+=c[f++]<>A)])>>>16&255,L=65535&O,!(A+(T=O>>>24)<=y);){if(0===g)break t;g--,S+=c[f++]<>>=A,y-=A,i.back+=A}if(S>>>=T,y-=T,i.back+=T,i.length=L,0===I){i.mode=26;break}if(32&I){i.back=-1,i.mode=12;break}if(64&I){t.msg="invalid literal/length code",i.mode=30;break}i.extra=15&I,i.mode=22;case 22:if(i.extra){for(D=i.extra;y>>=i.extra,y-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;I=(O=i.distcode[S&(1<>>16&255,L=65535&O,!((T=O>>>24)<=y);){if(0===g)break t;g--,S+=c[f++]<>A)])>>>16&255,L=65535&O,!(A+(T=O>>>24)<=y);){if(0===g)break t;g--,S+=c[f++]<>>=A,y-=A,i.back+=A}if(S>>>=T,y-=T,i.back+=T,64&I){t.msg="invalid distance code",i.mode=30;break}i.offset=L,i.extra=15&I,i.mode=24;case 24:if(i.extra){for(D=i.extra;y>>=i.extra,y-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===b)break t;if(M=E-b,i.offset>M){if((M=i.offset-M)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=30;break}P=M>i.wnext?(M-=i.wnext,i.wsize-M):i.wnext-M,M>i.length&&(M=i.length),w=i.window}else w=d,P=m-i.offset,M=i.length;for(bS?(v=O[F+c[M]],N[k+c[M]]):(v=96,0),p=1<>L)+(f-=p)]=y<<24|v<<16|E|0,0!==f;);for(p=1<>=1;if(0!==p?(R&=p-1,R+=p):R=0,M++,0==--B[x]){if(x===w)break;x=e[i+c[M]]}if(T>>7)]}function w(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function T(t,e,i){t.bi_valid>h-i?(t.bi_buf|=e<>h-t.bi_valid,t.bi_valid+=i-h):(t.bi_buf|=e<>>=1,i<<=1,0<--e;);return i>>>1}function A(t,e,i){var s,n,r=new Array(l+1),o=0;for(s=1;s<=l;s++)r[s]=o=o+i[s-1]<<1;for(n=0;n<=e;n++){var a=t[2*n+1];0!==a&&(t[2*n]=L(r[a]++,a))}}function C(t){var e;for(e=0;e>1;1<=i;i--)k(t,r,i);for(n=h;i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],k(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=s,r[2*n]=r[2*i]+r[2*s],t.depth[n]=(t.depth[i]>=t.depth[s]?t.depth[i]:t.depth[s])+1,r[2*i+1]=r[2*s+1]=n,t.heap[1]=n++,k(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var i,s,n,r,o,a,h=e.dyn_tree,u=e.max_code,c=e.stat_desc.static_tree,d=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(r=0;r<=l;r++)t.bl_count[r]=0;for(h[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)m<(r=h[2*h[2*(s=t.heap[i])+1]+1]+1)&&(r=m,g++),h[2*s+1]=r,u>=7;s>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(o=t.static_len+3+7>>>3)<=n&&(n=o)):n=o=i+5,i+4<=n&&-1!==e?G(t,e,i,s):4===t.strategy||o===n?(T(t,2+(s?1:0),3),B(t,f,m)):(T(t,4+(s?1:0),3),function(t,e,i,s){var n;for(T(t,e-257,5),T(t,i-1,5),T(t,s-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(b[i]+r+1)]++,t.dyn_dtree[2*P(e)]++),t.last_lit===t.lit_bufsize-1},i._tr_align=function(t){T(t,2,3),I(t,256,f),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,i){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,s){(function(t){!function(t,e){"use strict";if(!t.setImmediate){var i,s,n,r,o=1,a={},l=!1,h=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,i="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick((function(){d(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,i=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=i,e}}()?(r="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",p,!1):t.attachEvent("onmessage",p),function(e){t.postMessage(r+e,"*")}):t.MessageChannel?((n=new MessageChannel).port1.onmessage=function(t){d(t.data)},function(t){n.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(s=h.documentElement,function(t){var e=h.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,s.removeChild(e),e=null},s.appendChild(e)}):function(t){setTimeout(d,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),s=0;s=0&&i<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+i;if(r=i,!1!==n&&function(t){var i=(s[t]||"silent").toUpperCase();if(typeof window!==e&&h){try{return void(window.localStorage[h]=i)}catch(t){}try{window.document.cookie=encodeURIComponent(h)+"="+i+";"}catch(t){}}}(i),o.call(a,i,t),typeof console===e&&i{t.exports=function t(e,i,s){function n(o,a){if(!i[o]){if(!e[o]){if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=i[o]={exports:{}};e[o][0].call(h.exports,(function(t){return n(e[o][1][t]||t)}),h,h.exports,t,e,i,s)}return i[o].exports}for(var r=void 0,o=0;o{"use strict";function s(t,e){return Array(e+1).join(t)}function n(t){return"number"==typeof t}function r(t,e){return Math.pow(2,(t-69)/12)*(e||440)}i.r(e),i.d(e,{acc:()=>m,alt:()=>S,build:()=>c,chroma:()=>y,freq:()=>p,letter:()=>f,midi:()=>d,oct:()=>v,parse:()=>h,pc:()=>g,regex:()=>a,step:()=>b});var o=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function a(){return o}var l=[0,2,4,5,7,9,11];function h(t,e,i){if("string"!=typeof t)return null;var s=o.exec(t);if(!s||!e&&s[4])return null;var n={letter:s[1].toUpperCase(),acc:s[2].replace(/x/g,"##")};n.pc=n.letter+n.acc,n.step=(n.letter.charCodeAt(0)+3)%7,n.alt="b"===n.acc[0]?-n.acc.length:n.acc.length;var a=l[n.step]+n.alt;return n.chroma=a<0?12+a:a%12,s[3]&&(n.oct=+s[3],n.midi=a+12*(n.oct+1),n.freq=r(n.midi,i)),e&&(n.tonicOf=s[4]),n}var u="CDEFGAB";function c(t,e,i){return null==t?null:t.step?c(t.step,t.alt,t.oct):t<0||t>6?null:u.charAt(t)+(n(r=e)?r<0?s("b",-r):s("#",r):"")+function(t){return n(t)?""+t:""}(i);var r}function d(t){if((n(t)||"string"==typeof t)&&t>=0&&t<128)return+t;var e=h(t);return e&&void 0!==e.midi?e.midi:null}function p(t,e){var i=d(t);return null===i?null:r(i,e)}function f(t){return(h(t)||{}).letter}function m(t){return(h(t)||{}).acc}function g(t){return(h(t)||{}).pc}function b(t){return(h(t)||{}).step}function S(t){return(h(t)||{}).alt}function y(t){return(h(t)||{}).chroma}function v(t){return(h(t)||{}).oct}},9316:t=>{t.exports=function(t){return t.on=function(e,i){if(1===arguments.length&&"function"==typeof e)return t.on("event",e);var s="on"+e;return t[s]?t[s].push(i):t[s]=[i],t},t}},224:(t,e,i)=>{"use strict";var s=i(9451),n=i(9316),r=i(3861),o=i(6041),a=i(1549);function l(t,e,i){return a(o(r(n(s(t,e,i)))))}t.exports&&(t.exports=l),"undefined"!=typeof window&&(window.SamplePlayer=l)},1549:(t,e,i)=>{var s=i(2846);t.exports=function(t){return t.listenToMidi=function(e,i){var n={},r=i||{},o=r.gain||function(t){return t/127};return e.onmidimessage=function(e){var i=e.messageType?e:s(e);if("noteon"===i.messageType&&0===i.velocity&&(i.messageType="noteoff"),!r.channel||i.channel===r.channel)switch(i.messageType){case"noteon":n[i.key]=t.play(i.key,0,{gain:o(i.velocity)});break;case"noteoff":n[i.key]&&(n[i.key].stop(),delete n[i.key])}},t},t}},3861:(t,e,i)=>{"use strict";var s=i(9046),n=function(t){return function(t){return null!==t&&t!==[]&&t>=0&&t<129}(t)?+t:s.midi(t)};t.exports=function(t){if(t.buffers){var e=t.opts.map,i="function"==typeof e?e:n,s=function(t){return t?i(t)||t:null};t.buffers=function(t,e){return Object.keys(t).reduce((function(i,s){return i[e(s)]=t[s],i}),{})}(t.buffers,s);var r=t.start;t.start=function(t,e,i){var n=s(t),o=n%1;return o&&(n=Math.floor(n),i=Object.assign(i||{},{cents:Math.floor(100*o)})),r(n,e,i)}}return t}},9451:(t,e,i)=>{"use strict";var s=i(7729),n={},r={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0};function o(t){return"number"==typeof t}var a=["attack","decay","sustain","release"];t.exports=function(t,e,i){var l=!1,h=0,u={},c=t.createGain();c.gain.value=1;var d=Object.assign({},r,i),p={context:t,out:c,opts:d};return e instanceof AudioBuffer?p.buffer=e:p.buffers=e,p.start=function(e,i,s){if(p.buffer&&null!==e)return p.start(null,e,i);var r=e?p.buffers[e]:p.buffer;if(r){if(l){var o=s||n;i=Math.max(t.currentTime,i||0),p.emit("start",i,e,o);var a=f(e,r,o);return a.id=function(e,i){return i.id=h++,u[i.id]=i,i.startTime=t.currentTime,i.source.onended=function(){var e=t.currentTime;i.source.disconnect(),i.env.disconnect(),i.disconnect(),p.emit("ended",e,i.id,i)},i.id}(0,a),a.env.start(i),a.source.start(i),p.emit("started",i,a.id,a),o.duration&&a.stop(i+o.duration),a}console.warn("SamplePlayer not connected to any node.")}else console.warn("Buffer "+e+" not found.")},p.play=function(t,e,i){return p.start(t,e,i)},p.stop=function(t,e){var i;return(e=e||Object.keys(u)).map((function(e){return(i=u[e])?(i.stop(t),i.id):null}))},p.connect=function(t){return l=!0,c.connect(t),p},p.emit=function(t,e,i,s){p.onevent&&p.onevent(t,e,i,s);var n=p["on"+t];n&&n.forEach((t=>{t(e,i,s)}))},p;function f(e,i,n){var r,l=t.createGain();return l.gain.value=0,l.connect(c),l.env=function(t,e,i){var n=s(t),r=e.adsr||i.adsr;return a.forEach((function(t,s){n[t]=r?r[s]:e[t]||i[t]})),n.value.value=o(e.gain)?e.gain:o(i.gain)?i.gain:1,n}(t,n,d),l.env.connect(l.gain),l.source=t.createBufferSource(),l.source.buffer=i,l.source.connect(l),l.source.loop=n.loop||d.loop,l.source.playbackRate.value=(r=n.cents||d.cents)?Math.pow(2,r/1200):1,l.source.loopStart=n.loopStart||d.loopStart,l.source.loopEnd=n.loopEnd||d.loopEnd,l.stop=function(i){var s=i||t.currentTime;p.emit("stop",s,e);var n=l.env.stop(s);l.source.stop(n)},l}}},6041:t=>{"use strict";var e=Array.isArray,i={};t.exports=function(t){return t.schedule=function(s,n){var r,o,a,l,h=t.context.currentTime,u=s{"use strict";var e=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/,i=[0,2,4,5,7,9,11];function s(t,s,r){if("string"!=typeof t)return null;var o=e.exec(t);if(!o||!s&&o[4])return null;var a={letter:o[1].toUpperCase(),acc:o[2].replace(/x/g,"##")};return a.pc=a.letter+a.acc,a.step=(a.letter.charCodeAt(0)+3)%7,a.alt="b"===a.acc[0]?-a.acc.length:a.acc.length,a.chroma=i[a.step]+a.alt,o[3]&&(a.oct=+o[3],a.midi=a.chroma+12*(a.oct+1),a.freq=n(a.midi,r)),s&&(a.tonicOf=o[4]),a}function n(t,e){return Math.pow(2,(t-69)/12)*(e||440)}var r={parse:s,regex:function(){return e},midiToFreq:n};["letter","acc","pc","step","alt","chroma","oct","midi","freq"].forEach((function(t){r[t]=function(e){var i=s(e);return i&&void 0!==i[t]?i[t]:null}})),t.exports=r},8346:(t,e,i)=>{"use strict";var s=i(7665),n=i(224);function r(t){return/\.js(\?.*)?$/i.test(t)}function o(t,e,i){return"https://gleitz.github.io/midi-js-soundfonts/"+(e="FluidR3_GM"===e?e:"MusyngKite")+"/"+t+"-"+(i="ogg"===i?i:"mp3")+".js"}var a=i(975);a.instrument=function t(e,i,a){if(1===arguments.length)return function(i,s){return t(e,i,s)};var l=a||{},h=l.isSoundfontURL||r,u=l.nameToUrl||o,c=h(i)?i:u(i,l.soundfont,l.format);return s(e,c,{only:l.only||l.notes}).then((function(t){var s=n(e,t,l).connect(l.destination?l.destination:e.destination);return s.url=c,s.name=i,s}))},a.nameToUrl=o,t.exports&&(t.exports=a),"undefined"!=typeof window&&(window.Soundfont=a)},975:(t,e,i)=>{"use strict";var s=i(8681);function n(t,e){if(console.warn("new Soundfont() is deprected"),console.log("Please use Soundfont.instrument() instead of new Soundfont().instrument()"),!(this instanceof n))return new n(t);this.nameToUrl=e||n.nameToUrl,this.ctx=t,this.instruments={},this.promises=[]}function r(t,e){return e=e||{},function(i,n,r,o){console.warn("The oscillator player is deprecated."),console.log("Starting with version 0.9.0 you will have to wait until the soundfont is loaded to play sounds.");var a=i>0&&i<129?+i:s.midi(i),l=a?s.midiToFreq(a,440):null;if(l){r=r||.2;var h=(o=o||{}).destination||e.destination||t.destination,u=o.vcoType||e.vcoType||"sine",c=o.gain||e.gain||.4,d=t.createOscillator();d.type=u,d.frequency.value=l;var p=t.createGain();return p.gain.value=c,d.connect(p),p.connect(h),d.start(n),r>0&&d.stop(n+r),d}}}n.prototype.onready=function(t){console.warn("deprecated API"),console.log("Please use Promise.all(Soundfont.instrument(), Soundfont.instrument()).then() instead of new Soundfont().onready()"),Promise.all(this.promises).then(t)},n.prototype.instrument=function(t,e){console.warn("new Soundfont().instrument() is deprecated."),console.log("Please use Soundfont.instrument() instead.");var i=this.ctx;if((t=t||"default")in this.instruments)return this.instruments[t];var s={name:t,play:r(i,e)};if(this.instruments[t]=s,"default"!==t){var o=n.instrument(i,t,e).then((function(t){return s.play=t.play,s}));this.promises.push(o),s.onready=function(t){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),o.then(t)}}else s.onready=function(t){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),t()};return s},n.loadBuffers=function(t,e,i){return console.warn("Soundfont.loadBuffers is deprecate."),console.log("Use Soundfont.instrument(..) and get buffers properties from the result."),n.instrument(t,e,i).then((function(t){return t.buffers}))},n.noteToMidi=s.midi,t.exports=n},8151:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorPosChangedData=void 0,e.CursorPosChangedData=class{constructor(t=0,e=void 0,i=0,s=void 0,n=0){this.ResetOccurred=!1,this.CurrentMeasureIndex=t,this.CurrentRepetition=e,this.CurrentRepetitionIteration=i,this.PredictedPosition=s,this.CurrentBpm=n}}},1797:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Fraction=void 0;class i{constructor(t=0,e=1,i=0,s=!0){this.numerator=0,this.denominator=1,this.wholeValue=0,this.numerator=t,this.denominator=e,this.wholeValue=i,s&&this.simplify(),this.setRealValue()}static max(t,e){return t.RealValue>e.RealValue?t:e}static Equal(t,e){return t.wholeValue===e.wholeValue&&t.Denominator===e.Denominator&&t.Numerator===e.Numerator}static createFromFraction(t){return new i(t.numerator,t.denominator,t.wholeValue,!1)}static plus(t,e){const i=t.clone();return i.Add(e),i}static minus(t,e){const i=t.clone();return i.Sub(e),i}static multiply(t,e){return new i((t.wholeValue*t.denominator+t.numerator)*(e.wholeValue*e.denominator+e.numerator),t.denominator*e.denominator)}static greatestCommonDenominator(t,e){if(0===t)return e;if(1===e)return 1;for(;Math.abs(e)>=1&&Math.abs(t)>=1;)t>e?t-=e:e-=t;const i=Math.round(t);return Math.max(i,1)}toString(){let t=this.numerator+"/"+this.denominator;return 0!==this.wholeValue&&(t=this.wholeValue+" "+t),t}clone(){return new i(this.numerator,this.denominator,this.wholeValue,!1)}get Numerator(){return this.numerator}set Numerator(t){this.numerator!==t&&(this.numerator=t,this.simplify(),this.setRealValue())}get Denominator(){return this.denominator}set Denominator(t){this.denominator!==t&&(this.denominator=t,0!==this.numerator&&this.simplify(),this.setRealValue())}get WholeValue(){return this.wholeValue}set WholeValue(t){this.wholeValue!==t&&(this.wholeValue=t,this.setRealValue())}GetExpandedNumerator(){return this.wholeValue*this.denominator+this.numerator}calculateNumberOfNeededDots(){let t=1,e=2;const i=this.GetExpandedNumerator();for(;et;)e.Numerator++;if(this.numerator>this.denominator){const s=new i(this.numerator-1,this.denominator,this.wholeValue);for(;s.Denominator>t;)s.Numerator--;if(s.Denominatori.maximumAllowedNumber){const t=this.denominator/i.maximumAllowedNumber;this.numerator=Math.round(this.numerator/t),this.denominator=Math.round(this.denominator/t)}if(this.numerator>i.maximumAllowedNumber){const t=this.numerator/i.maximumAllowedNumber;this.numerator=Math.round(this.numerator/t),this.denominator=Math.round(this.denominator/t)}}isOnBeat(t){const e=this.distanceFromBeat(t);return Math.abs(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Matrix2D=void 0;const s=i(9086);class n{constructor(){this.matrix=[];for(let t=0;t<2;t++){this.matrix[t]=[];for(let e=0;e<2;e++)this.matrix[t][e]=0}}static getRotationMatrix(t){const e=new n,i=Math.cos(t),s=Math.sin(t);return e.matrix[0][0]=i,e.matrix[0][1]=-s,e.matrix[1][0]=s,e.matrix[1][1]=i,e}scalarMultiplication(t){for(let e=0;e<2;e++)for(let i=0;i<2;i++)this.matrix[e][i]*=t}getTransposeMatrix(){const t=new n;for(let e=0;e<2;e++)for(let i=0;i<2;i++)t.matrix[e][i]=this.matrix[i][e];return t}vectorMultiplication(t){const e=new s.PointF2D;return e.x=t.x*this.matrix[0][0]+t.y*this.matrix[0][1],e.y=t.x*this.matrix[1][0]+t.y*this.matrix[1][1],e}}e.Matrix2D=n},9651:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MusicSheetErrors=void 0,e.MusicSheetErrors=class{constructor(){this.measureErrors={},this.errors=[],this.tempErrors=[]}finalizeMeasure(t){let e=this.measureErrors[t];e||(e=[]),this.measureErrors[t]=e.concat(this.tempErrors),this.tempErrors=[]}pushMeasureError(t){this.tempErrors.push(t)}push(t){this.errors.push(t)}}},9855:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OSMDColor=void 0;class i{constructor(t,e,i){this.alpha=255,this.red=t,this.green=e,this.blue=i}static get Black(){return new i(0,0,0)}static get DeepSkyBlue(){return new i(0,191,255)}static get Green(){return new i(20,160,20)}static get Magenta(){return new i(255,0,255)}static get Orange(){return new i(255,128,0)}static get Red(){return new i(240,20,20)}static get Disabled(){return new i(225,225,225)}static get DarkBlue(){return new i(0,0,140)}static get Debug1(){return new i(200,0,140)}static get Debug2(){return new i(100,100,200)}static get Debug3(){return new i(0,50,140)}toHexString(){let t=(256|this.red).toString(16).slice(1)+(256|this.green).toString(16).slice(1)+(256|this.blue).toString(16).slice(1);return t+=(256|this.alpha).toString(16).slice(1),"#"+t}toString(){return"rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")"}}e.OSMDColor=i},8640:(t,e)=>{"use strict";var i,s;Object.defineProperty(e,"__esModule",{value:!0}),e.Pitch=e.AccidentalEnum=e.NoteEnum=void 0,function(t){t[t.C=0]="C",t[t.D=2]="D",t[t.E=4]="E",t[t.F=5]="F",t[t.G=7]="G",t[t.A=9]="A",t[t.B=11]="B"}(i=e.NoteEnum||(e.NoteEnum={})),function(t){t[t.SHARP=0]="SHARP",t[t.FLAT=1]="FLAT",t[t.NONE=2]="NONE",t[t.NATURAL=3]="NATURAL",t[t.DOUBLESHARP=4]="DOUBLESHARP",t[t.DOUBLEFLAT=5]="DOUBLEFLAT",t[t.TRIPLESHARP=6]="TRIPLESHARP",t[t.TRIPLEFLAT=7]="TRIPLEFLAT",t[t.QUARTERTONESHARP=8]="QUARTERTONESHARP",t[t.QUARTERTONEFLAT=9]="QUARTERTONEFLAT",t[t.SLASHFLAT=10]="SLASHFLAT",t[t.THREEQUARTERSSHARP=11]="THREEQUARTERSSHARP",t[t.THREEQUARTERSFLAT=12]="THREEQUARTERSFLAT",t[t.SLASHQUARTERSHARP=13]="SLASHQUARTERSHARP",t[t.SLASHSHARP=14]="SLASHSHARP",t[t.DOUBLESLASHFLAT=15]="DOUBLESLASHFLAT",t[t.SORI=16]="SORI",t[t.KORON=17]="KORON"}(s=e.AccidentalEnum||(e.AccidentalEnum={}));class n{constructor(t,e,i,r=void 0,o=!1){this.accidental=s.NONE,this.fundamentalNote=t,this.octave=e,this.accidental=i,this.accidentalXml=r,this.halfTone=t+12*(e+n.octXmlDiff)+n.HalfTonesFromAccidental(i),o||(this.frequency=n.calcFrequency(this),this.nextFrequency=n.calcFrequency(this,"next"),this.prevFrequency=n.calcFrequency(this,"prev"))}static getNoteEnumString(t){switch(t){case i.C:return"C";case i.D:return"D";case i.E:return"E";case i.F:return"F";case i.G:return"G";case i.A:return"A";case i.B:return"B";default:return""}}static lineShiftFromNoteEnum(t,e){if(0===e)return[t,0];const i=n.pitchEnumValues,s=i.indexOf(t);let r=0,o=(s+e)%i.length;return s+e>i.length-1&&(r=1),o<0&&(o=i.length+o,r=-1),[i[o],r]}static CalculateTransposedHalfTone(t,e){const i=t.fundamentalNote+t.AccidentalHalfTones+e;return n.WrapAroundCheck(i,12)}static WrapAroundCheck(t,e){let i=0;for(;t<0;)t+=e,i--;for(;t>=e;)t-=e,i++;return{overflow:i,halftone:t}}static calcFrequency(t,e){const s="musicScore"===window.DYProjectName?{"-2":[11,3],"-7":[12],"-9":[5],12:[33,34,35,37,38,2],24:[39]}:{"-2":[4,12,23],"-7":[13],"-9":[6],12:[5,116,55]};let r,o=0;if(t instanceof n){const e=t;o=e.octave-1,r=e.fundamentalNote-i.A+e.AccidentalHalfTones}else"number"==typeof t&&(r=t-57);const a=window.DYSubjectId;let l=0;if("COLEXIU"===window.DYEnvironment&&(s[12]=[120]),window.xmlNeedAdjustVoice)for(const t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&s[t].includes(a)){l=parseFloat(t);break}let h=r+l;return"next"===e&&h++,"prev"===e&&h--,442*Math.pow(2,o)*Math.pow(2,h/12)}static calcFractionalKey(t){return Math.log(t/440)/Math.LN10*n.halftoneFactor+57}static fromFrequency(t){const e=n.calcFractionalKey(t)+.5,i=Math.floor(e/12)-n.octXmlDiff,r=Math.floor(e)%12;let o=r,a=s.NONE;return-1===this.pitchEnumValues.indexOf(o)&&(o=r-1,a=s.SHARP),new n(o,i,a)}static fromHalftone(t){const e=Math.floor(t/12)-n.octXmlDiff,i=t%12;let r=i,o=s.NONE;return-1===this.pitchEnumValues.indexOf(r)&&(r=i-1,o=s.SHARP),new n(r,e,o)}static ceiling(t){let e=t%=12;return-1===this.pitchEnumValues.indexOf(e)&&(e=t+1),e}static floor(t){let e=t%=12;return-1===this.pitchEnumValues.indexOf(e)&&(e=t-1),e}static HalfTonesFromAccidental(t){switch(t){case s.NONE:return 0;case s.SHARP:return 1;case s.FLAT:return-1;case s.NATURAL:return 0;case s.DOUBLESHARP:return 2;case s.DOUBLEFLAT:return-2;case s.TRIPLESHARP:return 3;case s.TRIPLEFLAT:return-3;case s.QUARTERTONESHARP:return.5;case s.QUARTERTONEFLAT:return-.5;case s.SLASHFLAT:return-.51;case s.THREEQUARTERSSHARP:return 1.5;case s.THREEQUARTERSFLAT:return-1.5;case s.SLASHQUARTERSHARP:return.0013;case s.SLASHSHARP:return.0014;case s.DOUBLESLASHFLAT:return-.0015;case s.SORI:return.0016;case s.KORON:return.0017;default:throw new Error("Unhandled AccidentalEnum value")}}static AccidentalFromHalfTones(t){switch(t){case 0:return s.NONE;case 1:return s.SHARP;case-1:return s.FLAT;case 2:return s.DOUBLESHARP;case-2:return s.DOUBLEFLAT;case 3:return s.TRIPLESHARP;case-3:return s.TRIPLEFLAT;case.5:return s.QUARTERTONESHARP;case-.5:return s.QUARTERTONEFLAT;case 1.5:return s.THREEQUARTERSSHARP;case-1.5:return s.THREEQUARTERSFLAT;default:return t>0&&t<1?s.QUARTERTONESHARP:t<0&&t>-1?s.QUARTERTONEFLAT:s.QUARTERTONESHARP}}static accidentalVexflow(t){let e;switch(t){case s.NATURAL:e="n";break;case s.FLAT:e="b";break;case s.SHARP:e="#";break;case s.DOUBLESHARP:e="##";break;case s.TRIPLESHARP:e="###";break;case s.DOUBLEFLAT:e="bb";break;case s.TRIPLEFLAT:e="bbs";break;case s.QUARTERTONESHARP:e="+";break;case s.QUARTERTONEFLAT:e="d";break;case s.SLASHFLAT:e="bs";break;case s.THREEQUARTERSSHARP:e="++";break;case s.THREEQUARTERSFLAT:e="db";break;case s.SLASHQUARTERSHARP:e="+-";break;case s.SLASHSHARP:e="++-";break;case s.DOUBLESLASHFLAT:e="bss";break;case s.SORI:e="o";break;case s.KORON:e="k"}return e}get AccidentalHalfTones(){return n.HalfTonesFromAccidental(this.accidental)}get Octave(){return this.octave}get FundamentalNote(){return this.fundamentalNote}get Accidental(){return this.accidental}get AccidentalXml(){return this.accidentalXml}get Frequency(){return this.frequency}static get OctaveXmlDifference(){return n.octXmlDiff}getHalfTone(){return this.halfTone}getTransposedPitch(t){if(t>12)throw new Error("rewrite this method to handle bigger octave changes or don't use is with bigger octave changes!");return t>0?this.getHigherPitchByTransposeFactor(t):t<0?this.getLowerPitchByTransposeFactor(-t):this}DoEnharmonicChange(){switch(this.accidental){case s.FLAT:case s.DOUBLEFLAT:this.fundamentalNote=this.getPreviousFundamentalNote(this.fundamentalNote),this.accidental=n.AccidentalFromHalfTones(this.halfTone-(this.fundamentalNote+12*(this.octave+n.octXmlDiff)));break;case s.SHARP:case s.DOUBLESHARP:this.fundamentalNote=this.getNextFundamentalNote(this.fundamentalNote),this.accidental=n.AccidentalFromHalfTones(this.halfTone-(this.fundamentalNote+12*(this.octave+n.octXmlDiff)));break;default:return}}ToString(){let t=n.accidentalVexflow(this.accidental);return t||(t=""),"Key: "+n.getNoteEnumString(this.fundamentalNote)+t+", Note: "+this.fundamentalNote+", octave: "+this.octave.toString()}ToStringShort(t=0){let e=n.accidentalVexflow(this.accidental);e||(e="");const i=this.octave+t;return n.getNoteEnumString(this.fundamentalNote)+e+i}get ToStringShortGet(){return this.ToStringShort(0)}OperatorEquals(t){const e=this;return!(!e||!t)&&e.FundamentalNote===t.FundamentalNote&&e.Octave===t.Octave&&e.Accidental===t.Accidental}OperatorNotEqual(t){return!(this===t)}OperatorFundamentalGreaterThan(t){const e=this;return e.Octave===t.Octave?e.FundamentalNote>t.FundamentalNote:e.Octave>t.Octave}OperatorFundamentalLessThan(t){const e=this;return e.Octave===t.Octave?e.FundamentalNoten.pitchEnumValues.length-1?(i=n.pitchEnumValues[e+t-n.pitchEnumValues.length],r++):i=n.pitchEnumValues[e+t],new n(i,r,s.NONE)}getLowerPitchByTransposeFactor(t){const e=n.pitchEnumValues.indexOf(this.fundamentalNote);let i,r=this.octave;return e-t<0?(i=n.pitchEnumValues[n.pitchEnumValues.length+e-t],r--):i=n.pitchEnumValues[e-t],new n(i,r,s.NONE)}getNextFundamentalNote(t){let e=n.pitchEnumValues.indexOf(t);return e=(e+1)%n.pitchEnumValues.length,n.pitchEnumValues[e]}getPreviousFundamentalNote(t){const e=n.pitchEnumValues.indexOf(t);return e>0?n.pitchEnumValues[e-1]:n.pitchEnumValues[n.pitchEnumValues.length-1]}}e.Pitch=n,n.pitchEnumValues=[i.C,i.D,i.E,i.F,i.G,i.A,i.B],n.halftoneFactor=12/(Math.LN2/Math.LN10),n.octXmlDiff=3},7359:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaybackSettings=void 0;const s=i(1797);class n{constructor(t=new s.Fraction,e=100){this.rhythm=t,this.beatsPerMinute=e,this.beatLengthInMilliseconds=6e4/e,this.beatRealValue=1/4}static createFrom(t){return new n(t.Rhythm,t.BeatsPerMinute)}get BeatsPerMinute(){return this.beatsPerMinute}set BeatsPerMinute(t){this.beatsPerMinute=t,this.beatLengthInMilliseconds=6e4/this.beatsPerMinute}get Rhythm(){return this.rhythm}set Rhythm(t){this.rhythm=t}get BeatRealValue(){return this.beatRealValue}get BeatLengthInMilliseconds(){return this.beatLengthInMilliseconds}getDurationInMilliseconds(t){return("number"==typeof t?t:t.RealValue)*this.BeatLengthInMilliseconds/this.beatRealValue}getDurationAsNoteDuration(t,e=1024){const i=t/this.BeatLengthInMilliseconds;let n=Math.floor(i);const r=new s.Fraction(n,4),o=i-n;return n=Math.round(o/(1/e)/4),0!==o&&0===n&&t>0&&(n=1),r.Add(new s.Fraction(n,e)),r}}e.PlaybackSettings=n},9086:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointF2D=void 0;class i{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e}static get Empty(){return new i}static pointsAreEqual(t,e){return t.x===e.x&&t.y===e.y}ToString(){return"["+this.x+", "+this.y+"]"}}e.PointF2D=i},3278:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RectangleF2D=void 0;const s=i(739),n=i(9086);class r{constructor(t,e,i,s){this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=i,this.height=s}static createFromLocationAndSize(t,e){return new r(t.x,t.y,e.width,e.height)}get Location(){return new n.PointF2D(this.x,this.y)}get Size(){return new s.SizeF2D(this.width,this.height)}}e.RectangleF2D=r},739:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeF2D=void 0,e.SizeF2D=class{constructor(t=0,e=0){this.width=t,this.height=e}}},8918:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(1797),e),n(i(8363),e),n(i(9651),e),n(i(9855),e),n(i(8640),e),n(i(9086),e),n(i(3278),e),n(i(739),e)},1394:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(556),e)},556:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTopFont=e.isSpecialMark=e.isGradientWords=e.formatSpeedKeyword=e.isSpeedHiddenKeyword=e.isSpeedKeyword=e.SpeedHiddenKeyword=e.SpeedKeyword=e.SpecialWords=e.GRADIENT_SPEED_RESET_TAG=e.GRADIENT_SPEED_CLOSE_TAG=e.GradientWords=e.HideWords=e.SpecialMarks=e.SpeedTag=void 0;const s=i(1274);e.SpeedTag={Grava:40,Largo:46,Lento:52,Adagio:56,Larghetto:60,Andante:66,Anderato:69,Andantino:69,Moderato:88,Allegretto:108,"Allegro Moderato":108,Allegro:132,Vivace:152,Vivo:160,Vivacissimo:168,Presto:184,Prestissimo:208},e.SpecialMarks=["纯律","纯律结束"],e.HideWords=["跳过下一个","b","#","§","º","X"],e.GradientWords=["poco rit.","rall.","rit.","accel.","molto rit.","molto rall","lentando","poco accel.","calando"],e.GRADIENT_SPEED_CLOSE_TAG="结束范围速度",e.GRADIENT_SPEED_RESET_TAG="a tempo",e.SpecialWords=[e.GRADIENT_SPEED_CLOSE_TAG],e.SpeedKeyword="速度 ",e.SpeedHiddenKeyword="仅文本速度 ",e.isSpeedKeyword=function(t){return 0===t.indexOf(e.SpeedKeyword)},e.isSpeedHiddenKeyword=function(t){return 0===t.indexOf(e.SpeedHiddenKeyword)},e.formatSpeedKeyword=function(t){return t.replace(e.SpeedHiddenKeyword,"").replace(e.SpeedKeyword,"")},e.isGradientWords=function(t){return e.GradientWords.includes(t)},e.isSpecialMark=function(t){return[...Object.keys(e.SpeedTag),...e.SpecialMarks,...e.SpecialWords,...e.HideWords].map((t=>t.trim().toLocaleUpperCase())).includes(t.toLocaleUpperCase().trim())},e.isTopFont=function(t){return[s.TextAlignmentEnum.CenterTop,s.TextAlignmentEnum.RightTop].includes(t)}},6387:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ColoringModes=void 0,(i=e.ColoringModes||(e.ColoringModes={}))[i.XML=0]="XML",i[i.AutoColoring=1]="AutoColoring",i[i.CustomColorSet=2]="CustomColorSet"},5284:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.DrawingParametersEnum=void 0,(i=e.DrawingParametersEnum||(e.DrawingParametersEnum={})).allon="allon",i.compact="compact",i.compacttight="compacttight",i.default="default",i.leadsheet="leadsheet",i.preview="preview",i.thumbnail="thumbnail"},2562:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.FontStyleString=e.FontStyles=void 0,(i=e.FontStyles||(e.FontStyles={}))[i.Regular=0]="Regular",i[i.Bold=1]="Bold",i[i.Italic=2]="Italic",i[i.BoldItalic=3]="BoldItalic",i[i.Underlined=4]="Underlined",e.FontStyleString={Bold:1,BoldItalic:3,Italic:2,Regular:0,Underlined:4}},96:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.FontStringNames=e.FontString=e.Fonts=void 0,(i=e.Fonts||(e.Fonts={}))[i.TimesNewRoman=0]="TimesNewRoman",i[i.Kokila=1]="Kokila",i[i.Gonville=2]="Gonville",e.FontString={Gonville:2,Kokila:1,TimesNewRoman:0},e.FontStringNames={0:"Times New Roman",1:"Kokila",2:"Gonville"}},4112:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractionType=void 0,(i=e.InteractionType||(e.InteractionType={}))[i.SingleTouch=0]="SingleTouch",i[i.DoubleTouch=1]="DoubleTouch",i[i.TouchUp=2]="TouchUp",i[i.TouchDown=3]="TouchDown",i[i.Move=4]="Move"},2406:(t,e)=>{"use strict";var i,s;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageBoxType=e.PlaybackState=void 0,(s=e.PlaybackState||(e.PlaybackState={}))[s.Stopped=0]="Stopped",s[s.Running=1]="Running",(i=e.MessageBoxType||(e.MessageBoxType={}))[i.Info=0]="Info",i[i.Warning=1]="Warning",i[i.Error=2]="Error"},1274:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.TextAlignment=e.TextAlignmentEnum=void 0,function(t){t[t.LeftTop=0]="LeftTop",t[t.LeftCenter=1]="LeftCenter",t[t.LeftBottom=2]="LeftBottom",t[t.CenterTop=3]="CenterTop",t[t.CenterCenter=4]="CenterCenter",t[t.CenterBottom=5]="CenterBottom",t[t.RightTop=6]="RightTop",t[t.RightCenter=7]="RightCenter",t[t.RightBottom=8]="RightBottom"}(i=e.TextAlignmentEnum||(e.TextAlignmentEnum={})),e.TextAlignment=class{static IsLeft(t){return t===i.LeftTop||t===i.LeftCenter||t===i.LeftBottom}static IsCenterAligned(t){return t===i.CenterTop||t===i.CenterCenter||t===i.CenterBottom}static IsRight(t){return t===i.RightTop||t===i.RightCenter||t===i.RightBottom}}},7119:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.TieTypes=void 0,(i=e.TieTypes||(e.TieTypes={})).SIMPLE="",i.HAMMERON="H",i.PULLOFF="P",i.SLIDE="S",i.TAPPING="T"},5544:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(6387),e),n(i(5284),e),n(i(2562),e),n(i(96),e),n(i(1274),e),n(i(7119),e),n(i(2406),e)},7056:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MXLHelper=void 0;const n=i(9228),r=s(i(5733)),o=s(i(2043));e.MXLHelper=class{static MXLtoIXmlElement(t){const e=new r.default;return e.loadAsync(t).then((t=>e.file("META-INF/container.xml").async("text")),(t=>{throw t})).then((t=>{const i=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return e.file(i).async("text")}),(t=>{throw t})).then((t=>{const e=(new DOMParser).parseFromString(t,"text/xml"),i=new n.IXmlElement(e.documentElement);return Promise.resolve(i)}),(t=>{throw t})).then((t=>t),(t=>{throw new Error("extractSheetFromMxl: "+t.message)}))}static MXLtoXMLstring(t){const e=new r.default;return e.loadAsync(t).then((t=>e.file("META-INF/container.xml").async("text")),(t=>{throw o.default.error(t),t})).then((t=>{const i=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return e.file(i).async("text")}),(t=>{throw t}))}}},9228:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IXmlElement=void 0;class i{constructor(t){if(this.hasAttributes=!1,!t)throw new Error("IXmlElement: expected Element, got undefined");this.elem=t,this.name=t.nodeName.toLowerCase(),t.hasAttributes()&&(this.hasAttributes=!0,this.firstAttribute=t.attributes[0]),this.hasElements=t.hasChildNodes(),1===t.childNodes.length&&t.childNodes[0].nodeType===Node.TEXT_NODE?this.value=t.childNodes[0].nodeValue:this.value=""}attribute(t){return this.elem.attributes.getNamedItem(t)}attributes(){if(!this.attrs){const t=this.elem.attributes,e=[];for(let i=0;i0){let s;for(let i=0,n=e.length;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AClassHierarchyTrackable=void 0,e.AClassHierarchyTrackable=class{isInstanceOfClass(t){let e=this.constructor.prototype;for(;e;){if(t===e.constructor.name)return!0;e=e.__proto__}return!1}}},834:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2245:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5015:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7596:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5569:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5627:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},9888:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},3582:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},8282:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},702:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7872:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5028:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7331:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(9733),e),n(i(834),e),n(i(2245),e),n(i(5015),e),n(i(2890),e),n(i(7596),e),n(i(5569),e),n(i(5627),e),n(i(9888),e),n(i(3582),e),n(i(8282),e),n(i(702),e),n(i(7872),e),n(i(5028),e)},1211:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringUtil=void 0,e.StringUtil=class{static StringContainsSeparatedWord(t,e,i=!1){return new RegExp("( |^)"+e+"([ .]|$)",i?"i":void 0).test(t)}}},9986:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextTranslation=void 0;class i{static translateText(t,e){return void 0===i.DefaultTextTranslation?e:i.DefaultTextTranslation.translate(t,e)}translate(t,e){return e}}e.TextTranslation=i},5199:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(1211),e)},5205:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(8918),e),n(i(5544),e),n(i(9633),e),n(i(7331),e),n(i(5199),e),n(i(1394),e)},415:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDisplayInteractionManager=void 0,e.AbstractDisplayInteractionManager=class{constructor(){this.listeners=[],this.zoomGestureActive=!1,this.touchCount=0,this.touchActive=!1,this.touchMoving=!1,this.displayWidth=1,this.displayHeight=1,this.displayDpi=96,this.maxNumerOfFingers=2,this.movementThreshInch=.075,this.interactionWasZoomGesture=!1}addListener(t){this.listeners.push(t)}get ZoomGestureActive(){return this.zoomGestureActive}get WasZoomGestureActive(){return this.interactionWasZoomGesture}displaySizeChanged(t,e){this.displayWidth=t,this.displayHeight=e;for(const t of this.listeners)t.displaySizeChanged(this.displayWidth,this.displayHeight)}Dispose(){this.dispose()}Initialize(){this.initialize()}get DisplayDpi(){return this.displayDpi}get TouchActive(){return this.touchActive}get TouchMoving(){return this.touchMoving}touchDown(t,e,i){this.interactionWasZoomGesture=!1;const s=t/this.displayWidth,n=e/this.displayHeight;this.lastRelPosX=s,this.lastRelPosY=n,this.lastPixelX=t,this.lastPixelY=e,this.touchActive=!0,this.touchMoving=!1,this.touchCount=Math.min(this.touchCount+1,this.maxNumerOfFingers);for(const t of this.listeners)t.mouseDown(s,n,!i)}move(t,e){if(this.touchActive&&!this.zoomGestureActive){const i=t/this.displayWidth,s=e/this.displayHeight,n=i-this.lastRelPosX,r=s-this.lastRelPosY;this.touchMoving=!0;for(const t of this.listeners)t.mouseMove(i,s,n,r)}}zoomGestureStarted(){this.zoomGestureActive=!0}zoomGestureCompleted(){this.zoomGestureActive=!1,this.interactionWasZoomGesture=!0}zoomGestureMove(t){this.zoomGestureActive&&this.listeners.forEach((function(e){e.zoom(t)}))}touchUp(t,e){this.touchActive=!1,this.touchMoving=!1,this.touchCount=Math.max(0,this.touchCount-1);const i=t/this.displayWidth,s=e/this.displayHeight;for(const t of this.listeners)t.mouseUp(i,s)}click(t,e){if(!this.mouseDidMove(this.lastPixelX,t,this.lastPixelY,e)&&!this.ZoomGestureActive){const i=t/this.displayWidth,s=e/this.displayHeight;for(const t of this.listeners)t.positionTouched(i,s)}}doubleClick(t,e){if(!this.mouseDidMove(this.lastPixelX,t,this.lastPixelY,e)&&!this.ZoomGestureActive){const i=t/this.displayWidth,s=e/this.displayHeight;for(const t of this.listeners)t.positionDoubleTouched(i,s)}}mouseDidMove(t,e,i,s){const n=Math.abs(t-e)/this.displayDpi,r=Math.abs(i-s)/this.displayDpi;return n>this.movementThreshInch||r>this.movementThreshInch}}},6045:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractZoomView=void 0,e.AbstractZoomView=class{constructor(t){this.aspectRatio=1,this.zoomViews=[],this.mouseZoomMode=!1,this.autoScrollY=!0,this.displayInteractionManager=t,this.displayInteractionManager.addListener(this),this.offsetXMin=Number.MIN_VALUE,this.offsetYMin=Number.MIN_VALUE,this.rangeXMin=1,this.rangeYMin=1,this.offsetXMax=Number.MAX_VALUE,this.offsetYMax=Number.MAX_VALUE,this.rangeXMax=1e9,this.rangeYMax=1e9,this.XScrollingEnabled=!1,this.YScrollingEnabled=!0}positionTouched(t,e){if(!this.convertToUnitsReady())return;const i=this.getPositionInUnits(t,e);this.unitPosTouched(i,t,e)}get TouchActive(){return this.displayInteractionManager.TouchActive}get TouchMoving(){return this.displayInteractionManager.TouchMoving}positionDoubleTouched(t,e){if(!this.convertToUnitsReady())return;const i=this.getPositionInUnits(t,e);this.unitPosDoubleTouched(i,t,e)}get UsesManuallyControlledZoomMode(){return this.usesManuallyControlledZoomMode}set UsesManuallyControlledZoomMode(t){this.usesManuallyControlledZoomMode=t}mouseDown(t,e,i=!1){if(!this.convertToUnitsReady())return;this.selectScrollControllerY(!1),this.lastRangeX=Math.max(1,this.RangeX),this.lastRangeY=Math.max(1,this.RangeY),this.lastOffsetX=this.OffsetX,this.lastOffsetY=this.OffsetY;const s=this.getPositionInUnits(t,e);this.unitPosTouchDown(s,t,e),this.usesManuallyControlledZoomMode||(this.mouseZoomMode=!!i)}mouseUp(t,e){const i=this.getPositionInUnits(t,e);this.unitPosTouchUp(i,t,e)}mouseMove(t,e,i,s){this.mouseZoomMode?(Math.abs(i-0)>1e-8&&(this.RangeX=Math.abs(this.lastRangeX/(1+i))),!this.lockRanges&&Math.abs(s-0)>1e-8&&(this.RangeY=Math.abs(this.lastRangeY/(1-s)))):(Math.abs(i-0)>1e-8&&(this.OffsetX=this.lastOffsetX-i*this.RangeX),Math.abs(s-0)>1e-8&&(this.OffsetY=this.lastOffsetY-s*this.RangeY));const n=this.getPositionInUnits(t,e);this.unitPosMove(n,t,e)}zoom(t){this.RangeX=Math.abs(this.lastRangeX/t)}addZoomView(t){this.zoomViews.push(t)}get OffsetX(){return this.offsetX}set OffsetX(t){this.offsetX=Math.min(this.offsetXMax,Math.max(this.offsetXMin,t));for(const t of this.zoomViews)t.viewportXChanged(this.offsetX,this.RangeX)}get OffsetY(){return this.offsetY}set OffsetY(t){this.offsetY=t,this.offsetY>this.offsetYMax?this.offsetY=this.offsetYMax:this.offsetY{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaybackCursorUserInteractionManager=void 0;const s=i(4112);e.PlaybackCursorUserInteractionManager=class{constructor(t,e){this.graphic=t}userDisplayInteraction(t,e,i){if(i===s.InteractionType.SingleTouch){const t=this.graphic.GetNearestVoiceEntry(e);console.log(t)}}}},56:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScreenViewingRegion=void 0;const s=i(4759),n=i(8918);class r{constructor(t,e,i,n){this.psi=new s.BoundingBox(void 0),this.displaySizeInPixel=t,this.RelativeDisplaySize=e,this.RelativeDisplayPosition=i,this.WidthInUnits=n}static createWithRelativeDefaults(t,e){return new r(t,new n.SizeF2D(1,1),new n.PointF2D(0,0),e)}static createWithDefaults(){return new r(new n.SizeF2D(1,1),new n.SizeF2D(1,1),new n.PointF2D(0,0),1)}get UpperLeftPositionInUnits(){return this.psi.AbsolutePosition}set UpperLeftPositionInUnits(t){this.psi.AbsolutePosition=t}get DisplaySizeInPixel(){return this.displaySizeInPixel}set DisplaySizeInPixel(t){this.displaySizeInPixel=t,this.regionSizeInPixel=new n.SizeF2D(this.displaySizeInPixel.width*this.relativeRegionSize.width,this.displaySizeInPixel.height*this.relativeRegionSize.height),this.recalculateDependentVariables()}get RelativeDisplaySize(){return this.relativeRegionSize}set RelativeDisplaySize(t){this.relativeRegionSize=t,this.regionSizeInPixel=new n.SizeF2D(this.displaySizeInPixel.width*this.relativeRegionSize.width,this.displaySizeInPixel.height*this.relativeRegionSize.height),this.recalculateDependentVariables()}get RegionSizeInPixel(){return this.regionSizeInPixel}get WidthInUnits(){return this.psi.BorderRight}set WidthInUnits(t){this.psi.BorderRight=t,this.recalculateDependentVariables()}get ViewRegionInUnits(){return new n.SizeF2D(this.psi.BorderRight,this.psi.BorderBottom)}isVisible(t,e){const i=this.psi.collisionDetection(t);return this.psi.liesInsideBorders(t),i}isInsideDisplayArea(t,e){return this.RelativeDisplayPosition.x<=t&&t<=this.RelativeDisplayPosition.x+this.RelativeDisplaySize.width&&this.RelativeDisplayPosition.y<=e&&e<=this.RelativeDisplayPosition.y+this.RelativeDisplaySize.height}transformToUnitCoordinates(t){return new n.PointF2D(this.UpperLeftPositionInUnits.x+this.ViewRegionInUnits.width*((t.x-this.RelativeDisplayPosition.x)/this.RelativeDisplaySize.width),this.UpperLeftPositionInUnits.y+this.ViewRegionInUnits.height*((t.y-this.RelativeDisplayPosition.y)/this.RelativeDisplaySize.height))}transformLengthXToUnitCoordinates(t){return t/this.horizontalUnitToPixelRatio}transformLengthYToUnitCoordinates(t){return t/this.verticalUnitToPixelRatio}recalculateDependentVariables(){const t=this.regionSizeInPixel.width/this.regionSizeInPixel.height;this.psi.BorderBottom=this.psi.BorderRight/t,this.horizontalUnitToPixelRatio=this.regionSizeInPixel.width/this.ViewRegionInUnits.width,this.verticalUnitToPixelRatio=this.regionSizeInPixel.height/this.ViewRegionInUnits.height}}e.ScreenViewingRegion=r},7969:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SheetRenderingManager=void 0;const s=i(56),n=i(8918),r=i(6045),o=i(4112),a=i(7108);class l extends r.AbstractZoomView{constructor(t,e){super(t),this.mainViewingRegion=s.ScreenViewingRegion.createWithDefaults(),this.tryAgainToRenderCount=0,this.yOffsetMouseDown=Number.MIN_VALUE,this.unlockCursorDistancePixel=50,this.relativeTopPosition=.06,this.internalPreviewImageScale=3,this.listeners=[],this.LockDisplayToCursor=!0,this.ZoomActive=!1,this.rules=e,this.addZoomView(this),this.lockRanges=!0,this.TopBarHeightInPixel=70,this.BottomBarHeightInPixel=0,this.rules.UseDefaultVoiceInteractionListener&&this.listeners.push(new a.VoiceEntryInteractionListener(this))}addListener(t){this.listeners.push(t)}get Listeners(){return this.listeners}convertToUnitsReady(){return void 0!==this.graphicalMusicSheet}unitPosTouched(t,e,i){if(!this.SingleTouchDisabled){const s=new n.PointF2D(e,i);this.handleUserDisplayInteraction(s,t,o.InteractionType.SingleTouch)}}unitPosDoubleTouched(t,e,i){if(!this.DoubleTouchDisabled){const s=new n.PointF2D(e,i);this.handleUserDisplayInteraction(s,t,o.InteractionType.DoubleTouch)}}unitPosTouchDown(t,e,i){const s=new n.PointF2D(e,i);this.handleUserDisplayInteraction(s,t,o.InteractionType.TouchDown),this.yOffsetMouseDown=t.y}unitPosTouchUp(t,e,i){const s=new n.PointF2D(e,i);this.handleUserDisplayInteraction(s,t,o.InteractionType.TouchUp),!1===this.displayInteractionManager.WasZoomGestureActive&&this.unlockFromCursorIfNecessary(t),this.yOffsetMouseDown=Number.MIN_VALUE}unitPosMove(t,e,i){const s=new n.PointF2D(e,i);this.handleUserDisplayInteraction(s,t,o.InteractionType.Move),this.unlockFromCursorIfNecessary(t)}get MainViewingRegion(){return this.mainViewingRegion}setMusicSheet(t){this.graphicalMusicSheet=t,this.adaptDisplayLimitsToSheet(),this.setYOffset(0,!0)}viewportXChanged(t,e){void 0!==this.graphicalMusicSheet&&this.horizontalViewportChanged(t,e)}viewportYChanged(t,e){void 0!==this.graphicalMusicSheet&&(this.yOffsetMouseDown<=Number.MIN_VALUE+.5&&(this.yOffsetMouseDown=t),this.verticalViewportChanged(t,e))}displaySizeChanged(t,e){super.viewSizeChanged(t,e),Math.abs(t-0)<1e-7||Math.abs(e-0)<1e-7||(void 0!==this.graphicalMusicSheet&&this.graphicalMusicSheet.EnforceRedrawOfMusicSystems(),this.mainViewingRegion.DisplaySizeInPixel=new n.SizeF2D(t,e),this.adaptDisplayLimitsToSheet())}calcDisplayYPosition(t){return t.PositionAndShape.AbsolutePosition.y+t.PositionAndShape.BorderMarginTop-this.topBarHeightInUnits()-this.relativeTopPosition*this.heightWithoutTopBottomBarsInUnits()}yPositionForLastSystem(t){return t.PositionAndShape.AbsolutePosition.y+t.PositionAndShape.BorderMarginBottom-this.topBarHeightInUnits()-(1-this.relativeTopPosition)*this.heightWithoutTopBottomBarsInUnits()}scorePositionChanged(t,e,i,s,n,r){const o=this.calcDisplayYPosition(s);this.setYPosition(o,r)}setXPosition(t,e){this.LockDisplayToCursor&&this.setXOffset(t,e)}setYPosition(t,e){this.LockDisplayToCursor&&this.setYOffset(t,e)}get DrawingParameters(){return this.musicSheetDrawer.drawingParameters}topBarHeightInUnits(){return this.mainViewingRegion.transformLengthYToUnitCoordinates(this.TopBarHeightInPixel)}bottomBarHeightInUnits(){return this.mainViewingRegion.transformLengthYToUnitCoordinates(this.BottomBarHeightInPixel)}heightWithoutTopBottomBarsInUnits(){return this.mainViewingRegion.ViewRegionInUnits.height-this.topBarHeightInUnits()-this.bottomBarHeightInUnits()}activePositionToBottomBarHeight(){return(this.mainViewingRegion.ViewRegionInUnits.height-this.topBarHeightInUnits()-this.bottomBarHeightInUnits())*(1-2*this.relativeTopPosition)}getClickPosition(t,e){return this.mainViewingRegion.transformToUnitCoordinates(new n.PointF2D(t,e))}graphicalObjectIsVisible(t){return this.mainViewingRegion.isVisible(t,!1)}adaptDisplayLimitsToSheet(){if(void 0===this.graphicalMusicSheet||0===this.graphicalMusicSheet.MusicPages.length||0===this.graphicalMusicSheet.MusicPages[0].MusicSystems.length)return;this.offsetXMin=0,this.rangeXMin=this.graphicalMusicSheet.MinAllowedSystemWidth,this.rangeXMax=300,this.offsetYMin=-.3*this.RangeY;const t=this.graphicalMusicSheet.MusicPages.last().PositionAndShape;this.offsetYMax=Math.max(0,t.BorderMarginBottom-.7*this.RangeY),this.OffsetY>this.offsetYMax&&this.setYOffset(this.offsetYMax,!0)}horizontalViewportChanged(t,e){this.mainViewingRegion.WidthInUnits!==e&&(this.mainViewingRegion.WidthInUnits=e)}verticalViewportChanged(t,e){this.mainViewingRegion.UpperLeftPositionInUnits=new n.PointF2D(this.mainViewingRegion.UpperLeftPositionInUnits.x,t)}unlockFromCursorIfNecessary(t){!1===this.LockDisplayToCursor||this.ZoomActive||this.displayInteractionManager.ZoomGestureActive||this.displayInteractionManager.WasZoomGestureActive||Math.abs((t.y-this.yOffsetMouseDown)*this.mainViewingRegion.RegionSizeInPixel.height/this.mainViewingRegion.ViewRegionInUnits.height)>this.unlockCursorDistancePixel&&(this.LockDisplayToCursor=!1)}getPositionInUnits(t,e){return this.mainViewingRegion.transformToUnitCoordinates(new n.PointF2D(t,e))}handleUserDisplayInteraction(t,e,i){switch(i){case o.InteractionType.TouchDown:case o.InteractionType.SingleTouch:case o.InteractionType.DoubleTouch:case o.InteractionType.TouchUp:case o.InteractionType.TouchDown:case o.InteractionType.Move:for(const s of this.listeners)s.userDisplayInteraction(t,e,i);break;default:throw new Error("type")}}setStartPosition(t){var e;void 0!==this.graphicalMusicSheet&&(this.graphicalMusicSheet.ParentMusicSheet.SelectionStart=t,null===(e=this.PlaybackManager)||void 0===e||e.reset())}get GraphicalMusicSheet(){return this.graphicalMusicSheet}}e.SheetRenderingManager=l},7108:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VoiceEntryInteractionListener=void 0;const s=i(4112);e.VoiceEntryInteractionListener=class{constructor(t){this.renderingManager=t}userDisplayInteraction(t,e,i){var n,r;switch(i){case s.InteractionType.TouchDown:case s.InteractionType.SingleTouch:case s.InteractionType.DoubleTouch:{const t=this.renderingManager.GraphicalMusicSheet.GetNearestVoiceEntry(e);if(t&&void 0!==t.parentStaffEntry.parentVerticalContainer){const e=t.parentStaffEntry.parentVerticalContainer.AbsoluteTimestamp;this.renderingManager.setStartPosition(e),void 0!==(null===(n=t.notes[0])||void 0===n?void 0:n.sourceNote.Pitch)&&(null===(r=this.renderingManager.PlaybackManager)||void 0===r||r.playVoiceEntry(t.parentVoiceEntry))}break}}}}},4821:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebDisplayInteractionManager=void 0;const s=i(415),n=i(9086),r=i(1649);class o extends s.AbstractDisplayInteractionManager{constructor(t){super(),this.fullOffsetLeft=0,this.fullOffsetTop=0,this.fullScrollTop=0,this.fullScrollLeft=0,this.parentScrollMap=new Map,this.scrollCallbackMap=new Map,this.timeout=void 0,this.resizeObserver=void 0,this.EventCallbackMap=new r.Dictionary,this.DOUBLE_CLICK_WINDOW=200,this.lastClick=0,this.osmdSheetMusicContainer=t,this.listenForInteractions()}get FullOffsetTop(){return this.fullOffsetTop}get FullScrollTop(){return this.fullScrollTop}get FullOffsetLeft(){return this.fullOffsetLeft}get FullScrollLeft(){return this.fullScrollLeft}static resizeCallback(t,e){clearTimeout(e.timeout),e.timeout=setTimeout((()=>{e.fullOffsetLeft=0,e.fullOffsetTop=0;let t=e.osmdSheetMusicContainer;for(;t;)e.fullOffsetLeft+=t.offsetLeft,e.fullOffsetTop+=t.offsetTop,t=t.offsetParent;e.resizeEventListener(),e.deregisterScrollOffsets(),e.registerScrollOffsets()}),500)}registerScrollOffsets(){let t=this.osmdSheetMusicContainer;this.fullScrollTop=0,this.fullScrollLeft=0;const e=this;for(;t&&t!==document.documentElement;){if(this.parentScrollMap.set(t,[t.scrollTop,t.scrollLeft]),this.fullScrollLeft+=t.scrollLeft,this.fullScrollTop+=t.scrollTop,t.scrollHeight>t.clientHeight){const i=function(t){const i=e.parentScrollMap.get(this),s=i[0],n=i[1];e.fullScrollTop=e.fullScrollTop-s+this.scrollTop,e.fullScrollLeft=e.fullScrollLeft-n+this.scrollLeft,e.parentScrollMap.set(this,[this.scrollTop,this.scrollLeft])};this.scrollCallbackMap.set(t,i),t.addEventListener("scroll",i)}t=t.parentElement}}deregisterScrollOffsets(){for(const t of this.scrollCallbackMap.keys())t.removeEventListener("scroll",this.scrollCallbackMap.get(t));this.scrollCallbackMap.clear()}initialize(){this.fullOffsetLeft=0,this.fullOffsetTop=0;let t=this.osmdSheetMusicContainer;const e=[],i=this;for(window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((t=>{o.resizeCallback(t,i)})));t;)this.fullOffsetLeft+=t.offsetLeft,this.fullOffsetTop+=t.offsetTop,this.resizeObserver?this.resizeObserver.observe(t):e.push(t),t=t.offsetParent;if(this.resizeObserver)this.disposeResizeListener=()=>{i.resizeObserver.disconnect(),i.resizeObserver=void 0};else{let t=()=>{o.resizeCallback(e,i)};window.addEventListener("resize",t),this.disposeResizeListener=()=>{window.removeEventListener("resize",t),t=void 0}}i.registerScrollOffsets()}dispose(){this.disposeResizeListener();for(const t of this.EventCallbackMap.keys()){const e=this.EventCallbackMap.getValue(t);e[0].removeEventListener(t,e[1])}this.EventCallbackMap.clear(),this.deregisterScrollOffsets(),this.scrollCallbackMap.clear(),this.parentScrollMap.clear()}isTouch(){if("ontouchstart"in window||window.DocumentTouch)return!0;if(!window.matchMedia)return!1;const t=["(",["-webkit-","-moz-","-o-","-ms-"].join("touch-enabled),("),"heartz",")"].join("");return window.matchMedia(t).matches}get downEventName(){return this.isTouch()?"touchstart":"mousedown"}get moveEventName(){return this.isTouch()?"touchmove":"mousemove"}listenForInteractions(){const t=this.downEventListener.bind(this),e=this.touchEndEventListener.bind(this),i=this.moveEventListener.bind(this);this.osmdSheetMusicContainer.addEventListener("mousedown",t),this.osmdSheetMusicContainer.addEventListener("touchend",e),document.addEventListener(this.moveEventName,i),this.EventCallbackMap.setValue("mousedown",[this.osmdSheetMusicContainer,t]),this.EventCallbackMap.setValue("touchend",[this.osmdSheetMusicContainer,e]),this.EventCallbackMap.setValue(this.moveEventName,[document,i])}downEventListener(t){const e=(new Date).getTime(),i=e-this.lastClick;clearTimeout(this.clickTimeout);let s=0,n=0;this.isTouch()&&t instanceof TouchEvent?(s=t.touches[0].pageX,n=t.touches[0].pageY):t instanceof MouseEvent&&(s=t.pageX,n=t.pageY);const r=this.getOffsetCoordinates(s,n);if(i0)this.doubleClick(r.x,r.y);else{const t=this;this.clickTimeout=setTimeout((function(){clearTimeout(this.clickTimeout),t.isTouch()?t.touchDown(r.x,r.y,void 0):t.click(r.x,r.y)}),this.DOUBLE_CLICK_WINDOW)}this.lastClick=e}moveEventListener(t){let e=0,i=0;if(this.isTouch()&&t instanceof TouchEvent){let s;t.touches&&t.touches.length>0?s=t.touches[0]:t.changedTouches&&t.changedTouches.length>0&&(s=t.changedTouches[0]),e=null==s?void 0:s.clientX,i=null==s?void 0:s.clientY}else t instanceof MouseEvent&&(e=t.clientX,i=t.clientY);const s=this.getOffsetCoordinates(e,i);this.move(s.x,s.y)}touchEndEventListener(t){let e;t.touches&&t.touches.length>0?e=t.touches[0]:t.changedTouches&&t.changedTouches.length>0&&(e=t.changedTouches[0]);const i=this.getOffsetCoordinates(null==e?void 0:e.pageX,null==e?void 0:e.pageY);this.touchUp(i.x,i.y)}resizeEventListener(){this.displaySizeChanged(this.osmdSheetMusicContainer.clientWidth,this.osmdSheetMusicContainer.clientHeight)}getOffsetCoordinates(t,e){const i=t-this.fullOffsetLeft+this.fullScrollLeft,s=e-this.fullOffsetTop+this.fullScrollTop;return new n.PointF2D(i,s)}}e.WebDisplayInteractionManager=o},2660:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebSheetRenderingManager=void 0;const s=i(7969);class n extends s.SheetRenderingManager{mouseMove(t,e,i,s){const n=this.getPositionInUnits(t,e);this.unitPosMove(n,t,e)}}e.WebSheetRenderingManager=n},2571:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(415),e),n(i(6045),e),n(i(7570),e),n(i(56),e),n(i(7969),e),n(i(4821),e)},1703:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidEnumArgumentException=e.ArgumentOutOfRangeException=e.MusicSheetReadingException=void 0,e.MusicSheetReadingException=class{constructor(t,e){this.message=t,e&&(this.message+=" "+e.toString())}},e.ArgumentOutOfRangeException=class{constructor(t){this.message=t}},e.InvalidEnumArgumentException=class{constructor(t){this.message=t}}},6791:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGraphicalExpression=void 0;const s=i(4785),n=i(8911);class r extends s.GraphicalObject{constructor(t,e,i){super(),this.expression=e,this.parentMeasure=i,this.boundingBox=new n.BoundingBox(this,t.PositionAndShape),this.parentStaffLine=t,this.parentStaffLine.AbstractExpressions.push(this),this.rules=t.ParentMusicSystem.rules}get Label(){return this.label}get ParentStaffLine(){return this.parentStaffLine}get SourceExpression(){return this.expression}get Placement(){return this.expression.Placement}}e.AbstractGraphicalExpression=r},6055:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGraphicalInstruction=void 0;const s=i(4785);class n extends s.GraphicalObject{constructor(t){super(),this.parent=t}get Parent(){return this.parent}set Parent(t){this.parent=t}}e.AbstractGraphicalInstruction=n},1070:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccidentalCalculator=void 0;const s=i(8640),n=i(8640),r=i(1649),o=i(4040);e.AccidentalCalculator=class{constructor(){this.keySignatureNoteAlterationsDict=new r.Dictionary,this.currentAlterationsComparedToKeyInstructionList=[],this.currentInMeasureNoteAlterationsDict=new r.Dictionary}get ActiveKeyInstruction(){return this.activeKeyInstruction}set ActiveKeyInstruction(t){this.activeKeyInstruction=t,this.reactOnKeyInstructionChange()}doCalculationsAtEndOfMeasure(){this.currentInMeasureNoteAlterationsDict.clear(),this.currentAlterationsComparedToKeyInstructionList.clear();for(const t of this.keySignatureNoteAlterationsDict.keys())this.currentInMeasureNoteAlterationsDict.setValue(t,this.keySignatureNoteAlterationsDict.getValue(t))}checkAccidental(t,e){if(!e)return;const i=e.FundamentalNote+12*e.Octave,r=this.currentAlterationsComparedToKeyInstructionList.indexOf(i)>=0;if(this.currentInMeasureNoteAlterationsDict.containsKey(i)){if(r&&this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(i),1),this.currentInMeasureNoteAlterationsDict.getValue(i)!==e.AccidentalHalfTones){this.keySignatureNoteAlterationsDict.containsKey(i)&&this.keySignatureNoteAlterationsDict.getValue(i)!==e.AccidentalHalfTones?(this.currentAlterationsComparedToKeyInstructionList.push(i),this.currentInMeasureNoteAlterationsDict.setValue(i,e.AccidentalHalfTones)):e.Accidental!==s.AccidentalEnum.NONE&&this.currentInMeasureNoteAlterationsDict.remove(i);const r=this.currentInMeasureNoteAlterationsDict.getValue(i);if(e.Accidental===s.AccidentalEnum.NONE&&(e=.5===Math.abs(r)?new n.Pitch(e.FundamentalNote,e.Octave,s.AccidentalEnum.NONE):new n.Pitch(e.FundamentalNote,e.Octave,s.AccidentalEnum.NATURAL)),this.isAlterAmbiguousAccidental(e.Accidental)&&!e.AccidentalXml)return;o.MusicSheetCalculator.symbolFactory.addGraphicalAccidental(t,e)}}else if(e.Accidental!==s.AccidentalEnum.NONE){if(r||this.currentAlterationsComparedToKeyInstructionList.push(i),this.currentInMeasureNoteAlterationsDict.setValue(i,e.AccidentalHalfTones),this.isAlterAmbiguousAccidental(e.Accidental)&&!e.AccidentalXml)return;o.MusicSheetCalculator.symbolFactory.addGraphicalAccidental(t,e)}else r&&(e=new n.Pitch(e.FundamentalNote,e.Octave,s.AccidentalEnum.NATURAL),this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(i),1),o.MusicSheetCalculator.symbolFactory.addGraphicalAccidental(t,e))}isAlterAmbiguousAccidental(t){return t===s.AccidentalEnum.SLASHFLAT||t===s.AccidentalEnum.QUARTERTONEFLAT}reactOnKeyInstructionChange(){const t=this.activeKeyInstruction.AlteratedNotes;let e;e=this.activeKeyInstruction.Key>0?s.AccidentalEnum.SHARP:s.AccidentalEnum.FLAT,this.keySignatureNoteAlterationsDict.clear(),this.currentAlterationsComparedToKeyInstructionList.length=0;for(let i=-9;i<9;i++)for(let s=0;sthis.borderLeft?this.borderLeft:this.borderMarginLeft}set BorderMarginLeft(t){this.borderMarginLeft=t,this.calculateMarginRectangle()}get BorderMarginRight(){return this.borderMarginRightthis.borderTop?this.borderTop:this.borderMarginTop}set BorderMarginTop(t){this.borderMarginTop=t,this.calculateMarginRectangle()}get BorderMarginBottom(){return this.borderMarginBottom-1&&this.parent.ChildElements.splice(t,1)}this.parent=t,(null===(i=null===(e=this.parent)||void 0===e?void 0:e.ChildElements)||void 0===i?void 0:i.indexOf(this))>-1?n.default.error("BoundingBox of "+this.dataObject.constructor.name+" already in children list of "+this.parent.dataObject.constructor.name+"'s BoundingBox"):null===(r=null===(s=this.parent)||void 0===s?void 0:s.ChildElements)||void 0===r||r.push(this)}get DataObject(){return this.dataObject}get Center(){return new o.PointF2D(this.RelativePosition.x+(this.BorderMarginRight+this.BorderMarginLeft),this.RelativePosition.y+(this.BorderMarginBottom+this.BorderMarginTop))}setAbsolutePositionFromParent(){this.parent?(this.absolutePosition.x=this.parent.AbsolutePosition.x+this.relativePosition.x,this.absolutePosition.y=this.parent.AbsolutePosition.y+this.relativePosition.y):this.absolutePosition=this.relativePosition}calculateAbsolutePosition(){this.absolutePosition.x=this.relativePosition.x,this.absolutePosition.y=this.relativePosition.y;let t=this.parent;for(;t;)this.absolutePosition.x+=t.relativePosition.x,this.absolutePosition.y+=t.relativePosition.y,t=t.parent}calculateAbsolutePositionsRecursiveWithoutTopelement(){this.absolutePosition.x=0,this.absolutePosition.y=0;for(let t=0,e=this.ChildElements.length;t.001;break;case c.Up:case c.Down:s=this.relativePosition.y,t.calculateMarginPositionAlongDirection(this,e),n=Math.abs(s-this.relativePosition.y)>.001;break;default:throw new r.ArgumentOutOfRangeException("direction")}}while(n)}collisionDetection(t){const e=Math.min(this.AbsolutePosition.x+this.borderRight,t.absolutePosition.x+t.borderRight)-Math.max(this.AbsolutePosition.x+this.borderLeft,t.absolutePosition.x+t.borderLeft),i=Math.min(this.AbsolutePosition.y+this.borderBottom,t.absolutePosition.y+t.borderBottom)-Math.max(this.AbsolutePosition.y+this.borderTop,t.absolutePosition.y+t.borderTop);return e>0&&i>0}liesInsideBorders(t){const e=this.AbsolutePosition.x+this.borderLeft<=t.absolutePosition.x+t.borderLeft&&t.absolutePosition.x+t.borderLeft<=this.AbsolutePosition.x+this.borderRight,i=this.AbsolutePosition.x+this.borderLeft<=t.absolutePosition.x+t.borderRight&&t.absolutePosition.x+t.borderRight<=this.AbsolutePosition.x+this.borderRight;if(e&&i){const e=this.AbsolutePosition.y+this.borderTop<=t.absolutePosition.y+t.borderTop&&t.absolutePosition.y+t.borderTop<=this.AbsolutePosition.y+this.borderBottom,i=this.AbsolutePosition.y+this.borderTop<=t.absolutePosition.y+t.borderBottom&&t.absolutePosition.y+t.borderBottom<=this.AbsolutePosition.y+this.borderBottom;if(e&&i)return!0}return!1}pointLiesInsideBorders(t){return this.AbsolutePosition.x+this.borderLeft<=t.x&&t.x<=this.AbsolutePosition.x+this.borderRight&&this.AbsolutePosition.y+this.borderTop<=t.y&&t.y<=this.AbsolutePosition.y+this.borderBottom}marginCollisionDetection(t){const e=Math.min(this.AbsolutePosition.x+this.borderMarginRight,t.absolutePosition.x+t.borderMarginRight)-Math.max(this.AbsolutePosition.x+this.borderMarginLeft,t.absolutePosition.x+t.borderMarginLeft),i=Math.min(this.AbsolutePosition.y+this.borderMarginBottom,t.absolutePosition.y+t.borderMarginBottom)-Math.max(this.AbsolutePosition.y+this.borderMarginTop,t.absolutePosition.y+t.borderMarginTop);return e>0&&i>0}liesInsideMargins(t){const e=this.AbsolutePosition.x+this.borderMarginLeft<=t.absolutePosition.x+t.borderMarginLeft&&t.absolutePosition.x+t.borderMarginLeft<=this.AbsolutePosition.x+this.borderMarginRight,i=this.AbsolutePosition.x+this.borderMarginLeft<=t.absolutePosition.x+t.borderMarginRight&&t.absolutePosition.x+t.borderMarginRight<=this.AbsolutePosition.x+this.borderMarginRight;if(e&&i){const e=this.AbsolutePosition.y+this.borderMarginTop<=t.absolutePosition.y+t.borderMarginTop&&t.absolutePosition.y+t.borderMarginTop<=this.AbsolutePosition.y+this.borderMarginBottom,i=this.AbsolutePosition.y+this.borderMarginTop<=t.absolutePosition.y+t.borderMarginBottom&&t.absolutePosition.y+t.borderMarginBottom<=this.AbsolutePosition.y+this.borderMarginBottom;if(e&&i)return!0}return!1}pointLiesInsideMargins(t){return this.AbsolutePosition.x+this.borderMarginLeft<=t.x&&t.x<=this.AbsolutePosition.x+this.borderMarginRight&&this.AbsolutePosition.y+this.borderMarginTop<=t.y&&t.y<=this.AbsolutePosition.y+this.borderMarginBottom}computeNonOverlappingPosition(t,e,i){this.RelativePosition=new o.PointF2D(i.x,i.y),this.setAbsolutePositionFromParent();let s=0,n=!1;do{switch(e){case c.Left:case c.Right:s=this.relativePosition.x,t.calculatePositionAlongDirection(this,e),n=Math.abs(s-this.relativePosition.x)>1e-4;break;case c.Up:case c.Down:s=this.relativePosition.y,t.calculatePositionAlongDirection(this,e),n=Math.abs(s-this.relativePosition.y)>1e-4;break;default:throw new r.ArgumentOutOfRangeException("direction")}}while(n)}getClickedObjectOfType(t){const e=this.dataObject;if(this.pointLiesInsideBorders(t)&&e)return e;for(let e=0,i=this.childElements.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Clickable=void 0;const s=i(4785);class n extends s.GraphicalObject{}e.Clickable=n},8155:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoColorSet=e.NoteState=e.GraphicalLayers=e.StyleSets=e.OUTLINE_AND_FILL_STYLE_DICT=e.OutlineAndFillStyleEnum=void 0;const s=i(1649);var n,r,o,a,l;!function(t){t[t.BaseWritingColor=0]="BaseWritingColor",t[t.FollowingCursor=1]="FollowingCursor",t[t.AlternativeFollowingCursor=2]="AlternativeFollowingCursor",t[t.PlaybackCursor=3]="PlaybackCursor",t[t.Highlighted=4]="Highlighted",t[t.ErrorUnderlay=5]="ErrorUnderlay",t[t.Selected=6]="Selected",t[t.SelectionSymbol=7]="SelectionSymbol",t[t.DebugColor1=8]="DebugColor1",t[t.DebugColor2=9]="DebugColor2",t[t.DebugColor3=10]="DebugColor3",t[t.SplitScreenDivision=11]="SplitScreenDivision",t[t.GreyTransparentOverlay=12]="GreyTransparentOverlay",t[t.MarkedArea1=13]="MarkedArea1",t[t.MarkedArea2=14]="MarkedArea2",t[t.MarkedArea3=15]="MarkedArea3",t[t.MarkedArea4=16]="MarkedArea4",t[t.MarkedArea5=17]="MarkedArea5",t[t.MarkedArea6=18]="MarkedArea6",t[t.MarkedArea7=19]="MarkedArea7",t[t.MarkedArea8=20]="MarkedArea8",t[t.MarkedArea9=21]="MarkedArea9",t[t.MarkedArea10=22]="MarkedArea10",t[t.Comment1=23]="Comment1",t[t.Comment2=24]="Comment2",t[t.Comment3=25]="Comment3",t[t.Comment4=26]="Comment4",t[t.Comment5=27]="Comment5",t[t.Comment6=28]="Comment6",t[t.Comment7=29]="Comment7",t[t.Comment8=30]="Comment8",t[t.Comment9=31]="Comment9",t[t.Comment10=32]="Comment10"}(n=e.OutlineAndFillStyleEnum||(e.OutlineAndFillStyleEnum={})),e.OUTLINE_AND_FILL_STYLE_DICT=new s.Dictionary,e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.BaseWritingColor,"Thistle"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.FollowingCursor,"Aqua"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.AlternativeFollowingCursor,"Azure"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.PlaybackCursor,"Bisque"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Highlighted,"CadetBlue"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.ErrorUnderlay,"DarkBlue"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Selected,"DarkGoldenRod"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.SelectionSymbol,"BlanchedAlmond"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.DebugColor1,"Chartreuse"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.DebugColor2,"DarkGreen"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.DebugColor3,"DarkOrange"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.SplitScreenDivision,"FireBrick"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.GreyTransparentOverlay,"DarkSalmon"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea1,"DarkSeaGreen"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea2,"DarkOrchid"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea3,"Aquamarine"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea4,"DarkKhaki"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea5,"ForestGreen"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea6,"AliceBlue"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea7,"DeepPink"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea8,"Coral"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea9,"DarkOliveGreen"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.MarkedArea10,"Chocolate"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment1,"DodgerBlue"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment2,"Blue"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment3,"Beige"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment4,"Crimson"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment5,"Fuchsia"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment6,"Brown"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment7,"BlanchedAlmond"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment8,"CornflowerBlue"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment9,"Cornsilk"),e.OUTLINE_AND_FILL_STYLE_DICT.setValue(n.Comment10,"DarkGrey"),(l=e.StyleSets||(e.StyleSets={}))[l.MarkedArea=0]="MarkedArea",l[l.Comment=1]="Comment",(a=e.GraphicalLayers||(e.GraphicalLayers={}))[a.Background=0]="Background",a[a.Highlight=1]="Highlight",a[a.MeasureError=2]="MeasureError",a[a.SelectionSymbol=3]="SelectionSymbol",a[a.Cursor=4]="Cursor",a[a.PSI_Debug=5]="PSI_Debug",a[a.Notes=6]="Notes",a[a.Comment=7]="Comment",a[a.Debug_above=8]="Debug_above",(o=e.NoteState||(e.NoteState={}))[o.Normal=0]="Normal",o[o.Selected=1]="Selected",o[o.Follow_Confirmed=2]="Follow_Confirmed",o[o.QFeedback_NotFound=3]="QFeedback_NotFound",o[o.QFeedback_OK=4]="QFeedback_OK",o[o.QFeedback_Perfect=5]="QFeedback_Perfect",o[o.Debug1=6]="Debug1",o[o.Debug2=7]="Debug2",o[o.Debug3=8]="Debug3",(r=e.AutoColorSet||(e.AutoColorSet={})).C="#d82c6b",r.D="#F89D15",r.E="#FFE21A",r.F="#4dbd5c",r.G="#009D96",r.A="#43469d",r.B="#76429c",r.Rest="#000000"},5074:(t,e)=>{"use strict";var i,s,n;Object.defineProperty(e,"__esModule",{value:!0}),e.PhonicScoreModes=e.MusicSymbolDrawingStyle=e.DrawingMode=void 0,(n=e.DrawingMode||(e.DrawingMode={}))[n.All=0]="All",n[n.NoOverlays=1]="NoOverlays",n[n.Leadsheet=2]="Leadsheet",(s=e.MusicSymbolDrawingStyle||(e.MusicSymbolDrawingStyle={}))[s.Normal=0]="Normal",s[s.Disabled=1]="Disabled",s[s.Selected=2]="Selected",s[s.Clickable=3]="Clickable",s[s.PlaybackSymbols=4]="PlaybackSymbols",s[s.FollowSymbols=5]="FollowSymbols",s[s.QFeedbackNotFound=6]="QFeedbackNotFound",s[s.QFeedbackOk=7]="QFeedbackOk",s[s.QFeedbackPerfect=8]="QFeedbackPerfect",s[s.Debug1=9]="Debug1",s[s.Debug2=10]="Debug2",s[s.Debug3=11]="Debug3",(i=e.PhonicScoreModes||(e.PhonicScoreModes={}))[i.Following=0]="Following",i[i.Midi=1]="Midi",i[i.Manual=2]="Manual"},7459:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawingParameters=void 0;const s=i(1405),n=i(3748),r=i(5284);e.DrawingParameters=class{constructor(t=r.DrawingParametersEnum.default,e){this.drawCursors=!0,this.drawTitle=!0,this.drawSubtitle=!0,this.drawLyricist=!0,this.drawComposer=!0,this.drawCopyright=!1,this.drawCredits=!0,this.drawPartNames=!0,this.fingeringPosition=n.PlacementEnum.Left,this.drawHiddenNotes=!1,this.rules=e,this.rules||(this.rules=new s.EngravingRules),this.DrawingParametersEnum=t}set DrawingParametersEnum(t){switch(this.drawingParametersEnum=t,t){case r.DrawingParametersEnum.allon:this.setForAllOn();break;case r.DrawingParametersEnum.thumbnail:this.setForThumbnail();break;case r.DrawingParametersEnum.leadsheet:this.setForLeadsheet();break;case r.DrawingParametersEnum.compact:this.setForCompactMode();break;case r.DrawingParametersEnum.compacttight:this.setForCompactTightMode();break;case r.DrawingParametersEnum.default:default:this.setForDefault()}}get DrawingParametersEnum(){return this.drawingParametersEnum}setForAllOn(){this.drawHighlights=!0,this.drawErrors=!0,this.drawSelectionStartSymbol=!0,this.drawSelectionEndSymbol=!0,this.drawCursors=!0,this.drawActivitySymbols=!0,this.drawScrollIndicator=!0,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0,this.DrawTitle=!0,this.DrawSubtitle=!0,this.DrawComposer=!0,this.DrawLyricist=!0,this.drawCredits=!0,this.DrawPartNames=!0,this.drawHiddenNotes=!0,this.rules.CompactMode=!1}setForDefault(){this.rules.loadDefaultValues(),this.setForAllOn(),this.drawHiddenNotes=!1}setForThumbnail(){this.drawHighlights=!1,this.drawErrors=!1,this.drawSelectionStartSymbol=!1,this.drawSelectionStartSymbol=!1,this.drawCursors=!1,this.drawActivitySymbols=!1,this.drawScrollIndicator=!1,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0,this.drawHiddenNotes=!1}setForCompactMode(){this.rules.CompactMode=!0,this.DrawCredits=!1,this.drawHiddenNotes=!1}setForCompactTightMode(){this.setForCompactMode(),this.DrawPartNames=!1,this.rules.VoiceSpacingMultiplierVexflow=.65,this.rules.VoiceSpacingAddendVexflow=2,this.rules.MinSkyBottomDistBetweenStaves=1,this.rules.MinSkyBottomDistBetweenSystems=1,this.rules.BetweenStaffDistance=2.5,this.rules.StaffDistance=3.5,this.rules.MinimumDistanceBetweenSystems=1,this.rules.PageBottomMargin=0,this.rules.PageLeftMargin=2,this.rules.PageRightMargin=2}setForLeadsheet(){this.drawHighlights=!1,this.drawErrors=!1,this.drawSelectionStartSymbol=!0,this.drawSelectionEndSymbol=!0,this.drawCursors=!0,this.drawActivitySymbols=!1,this.drawScrollIndicator=!0,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0}get DrawCredits(){return this.drawCredits}set DrawCredits(t){this.drawCredits=t,this.DrawComposer=t,this.DrawTitle=t,this.DrawSubtitle=t,this.DrawLyricist=t,this.DrawCopyright=t}get DrawTitle(){return this.drawTitle}set DrawTitle(t){this.drawTitle=t,this.rules.RenderTitle=t,t||(this.DrawSubtitle=!1)}get DrawSubtitle(){return this.drawSubtitle}set DrawSubtitle(t){this.drawSubtitle=t,this.rules.RenderSubtitle=t,t&&(this.DrawTitle=!0)}get DrawComposer(){return this.drawComposer}set DrawComposer(t){this.drawComposer=t,this.rules.RenderComposer=t}get DrawLyricist(){return this.drawLyricist}set DrawLyricist(t){this.drawLyricist=t,this.rules.RenderLyricist=t}get DrawCopyright(){return this.drawCopyright}set DrawCopyright(t){this.drawCopyright=t,this.rules.RenderCopyright=t}get DrawPartNames(){return this.drawPartNames}set DrawPartNames(t){this.drawPartNames=t,this.rules.RenderPartNames=t,this.rules.RenderPartNames||(this.rules.RenderPartAbbreviations=!1)}get FingeringPosition(){return this.fingeringPosition}set FingeringPosition(t){this.fingeringPosition=t,this.rules.FingeringPosition=t}get Rules(){return this.rules}set Rules(t){this.rules=t}}},1405:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PageFormat=e.EngravingRules=void 0;const n=i(599),r=s(i(2043)),o=i(1274),a=i(3748),l=i(41),h=i(6387),u=i(1649),c=i(5544),d=i(8640),p=i(4123),f=i(3486);class m{constructor(){this.DYSlursStartingAtSameStaffEntryYOffset=0,this.DYMinNoteWidth=0,this.DYWorkId=0,this.DYWorkSpecial=!1,this.DYContainerId="osmdCanvasPage",this.DYSVGContainerId="osmdSvgPage",this.DYMusicScoreType="staff",this.DYMusicScoreId="",this.DYCustomRepeatCount=0,this.DYMusicClientType="",this.NoteDistances=[1,1,1.3,1.6,2,2.5,3,4],this.NoteDistancesScalingFactors=[1,2,4,8,16,32,64,128],this.DurationDistanceDict={},this.DurationScalingDistanceDict={},this.NoteToGraphicalNoteMapObjectCount=0,this.RenderCount=0,this.PlayAlreadyStartedNotesFromCursorPosition=!1,this.PlaybackSkipNotesSafetyInterval=.02,this.UseDefaultVoiceInteractionListener=!0,this.LimitCursorPositionToCurrentMeasure=!0,this.loadDefaultValues()}loadDefaultValues(){this.SamplingUnit=3*m.unit,this.MpatMode=!0,this.SheetTitleHeight=4,this.SheetSubtitleHeight=2,this.SheetMinimumDistanceBetweenTitleAndSubtitle=1,this.SheetComposerHeight=2,this.SheetAuthorHeight=2,this.SheetCopyrightHeight=1.5,this.SheetCopyrightMargin=2,this.SheetComposerSubtitleUseLegacyParsing=!1,this.CompactMode=!1,this.PagePlacementEnum=n.PagePlacementEnum.Down,this.PageHeight=100001,this.PageTopMargin=5,this.PageTopMarginNarrow=0,this.PageBottomMargin=5,this.PageLeftMargin=5,this.PageRightMargin=5,this.TitleTopDistance=5,this.TitleBottomDistance=1,this.StaffDistance=7,this.BetweenStaffDistance=5,this.MinimumStaffLineDistance=4,this.MinSkyBottomDistBetweenStaves=1,this.StaffHeight=4,this.TabStaffInterlineHeight=1.1111,this.BetweenStaffLinesDistance=m.unit,this.SystemLeftMargin=0,this.SystemRightMargin=0,this.SystemLabelsRightMargin=2,this.SystemComposerDistance=2,this.SystemLyricistDistance=2,this.InstrumentLabelTextHeight=2,this.MinimumDistanceBetweenSystems=7,this.MinSkyBottomDistBetweenSystems=5,this.LastSystemMaxScalingFactor=1.4,this.AutoBeamNotes=!1,this.AutoBeamOptions={beam_middle_rests_only:!1,beam_rests:!1,maintain_stem_directions:!1},this.AutoBeamTabs=!1,this.BeamWidth=m.unit/2,this.BeamSpaceWidth=m.unit/3,this.BeamForwardLength=1.25*m.unit,this.FlatBeams=!1,this.FlatBeamOffset=20,this.FlatBeamOffsetPerBeam=10,this.ClefLeftMargin=.5,this.ClefRightMargin=.75,this.PercussionOneLineCutoff=3,this.PercussionForceVoicesOneLineCutoff=1,this.PercussionUseXMLDisplayStep=!0,this.PercussionXMLDisplayStepNoteValueShift=0,this.PercussionOneLineXMLDisplayStepOctaveOffset=0,this.PercussionUseCajon2NoteSystem=!1,this.BetweenKeySymbolsDistance=.2,this.KeyRightMargin=.75,this.RhythmRightMargin=1.25,this.ShowRhythmAgainAfterPartEndOrFinalBarline=!0,this.NewPartAndSystemAfterFinalBarline=!1,this.InStaffClefScalingFactor=.8,this.DistanceBetweenNaturalAndSymbolWhenCancelling=.4,this.NoteHelperLinesOffset=.25,this.MeasureLeftMargin=.7,this.MeasureRightMargin=0,this.DistanceBetweenLastInstructionAndRepetitionBarline=1,this.ArpeggioDistance=.6,this.StaccatoShorteningFactor=2,this.IdealStemLength=3,this.StemNoteHeadBorderYOffset=.2,this.StemMargin=.2,this.StemMinLength=2.5,this.StemMaxLength=4.5,this.BeamSlopeMaxAngle=10,this.StemMinAllowedDistanceBetweenNoteHeadAndBeamLine=1,this.SetWantedStemDirectionByXml=!0,this.GraceNoteScalingFactor=.6,this.GraceNoteXOffset=.2,this.GraceNoteGroupXMargin=0,this.WedgeOpeningLength=1.2,this.WedgeMeasureEndOpeningLength=.75,this.WedgeMeasureBeginOpeningLength=.75,this.WedgePlacementAboveY=-1.5,this.WedgePlacementBelowY=1.5,this.WedgeHorizontalMargin=.6,this.WedgeVerticalMargin=.5,this.DistanceOffsetBetweenTwoHorizontallyCrossedWedges=.3,this.WedgeMinLength=2,this.WedgeEndDistanceBetweenTimestampsFactor=1.75,this.SoftAccentWedgePadding=.4,this.SoftAccentSizeFactor=.6,this.DistanceBetweenAdjacentDynamics=.75,this.TempoChangeMeasureValidity=4,this.TempoContinousFactor=.7,this.StaccatoScalingFactor=.8,this.BetweenDotsDistance=.8,this.OrnamentAccidentalScalingFactor=.65,this.ChordSymbolTextHeight=2,this.ChordSymbolTextAlignment=o.TextAlignmentEnum.LeftBottom,this.ChordSymbolRelativeXOffset=-1,this.ChordSymbolExtraXShiftForShortChordSymbols=.3,this.ChordSymbolExtraXShiftWidthThreshold=2,this.ChordSymbolXSpacing=1,this.ChordOverlapAllowedIntoNextMeasure=0,this.ChordSymbolYOffset=.1,this.ChordSymbolYPadding=0,this.ChordSymbolYAlignment=!0,this.ChordSymbolYAlignmentScope="staffline",this.ChordSymbolWholeMeasureRestXOffset=0,this.ChordSymbolWholeMeasureRestXOffsetMeasure1=-2,this.ChordAccidentalTexts=new u.Dictionary,this.resetChordAccidentalTexts(this.ChordAccidentalTexts,!1),this.ChordSymbolLabelTexts=new u.Dictionary,this.resetChordSymbolLabelTexts(this.ChordSymbolLabelTexts),this.CustomChords=[],this.resetChordNames(),this.RepetitionSymbolsYOffset=0,this.RepetitionEndInstructionXShiftAsPercentOfStaveWidth=.4,this.RehearsalMarkXOffsetDefault=10,this.RehearsalMarkXOffset=0,this.RehearsalMarkXOffsetSystemStartMeasure=-20,this.RehearsalMarkYOffsetDefault=-15,this.RehearsalMarkYOffset=0,this.RehearsalMarkFontSize=10,this.MeasureNumberLabelHeight=1.5*m.unit,this.MeasureNumberLabelOffset=2,this.MeasureNumberLabelXOffset=-.5,this.TupletsRatioed=!1,this.TupletsBracketed=!1,this.TripletsBracketed=!1,this.TupletsBracketedUseXMLValue=!0,this.TupletNumberLabelHeight=1.5*m.unit,this.TupletNumberYOffset=.5,this.TupletNumberLimitConsecutiveRepetitions=!0,this.TupletNumberMaxConsecutiveRepetitions=2,this.TupletNumberAlwaysDisableAfterFirstMax=!0,this.TupletNumberUseShowNoneXMLValue=!0,this.LabelMarginBorderFactor=.1,this.TupletVerticalLineLength=.5,this.TupletNumbersInTabs=!0,this.TabTupletYOffsetBottom=1,this.TabTupletYOffsetTop=-3.5,this.TabTupletYOffsetEffects=1.5,this.TabTupletsBracketed=!0,this.TabBeamsRendered=!0,this.TabKeySignatureRendered=!1,this.TabKeySignatureSpacingAdded=!0,this.TabTimeSignatureRendered=!1,this.TabTimeSignatureSpacingAdded=!0,this.TabFingeringsRendered=!1,this.SlurPlacementFromXML=!0,this.SlurPlacementAtStems=!1,this.SlurPlacementUseSkyBottomLine=!1,this.BezierCurveStepSize=1e3,this.calculateCurveParametersArrays(),this.TieGhostObjectWidth=.75,this.TieYPositionOffsetFactor=.3,this.MinimumNeededXspaceForTieGhostObject=1,this.TieHeightMinimum=.28,this.TieHeightMaximum=1.2,this.TieHeightInterpolationK=.0288,this.TieHeightInterpolationD=.136,this.SlurNoteHeadYOffset=.5,this.SlurEndArticulationYOffset=.8,this.SlurStartArticulationYOffsetOfArticulation=.5,this.SlurStemXOffset=.3,this.SlurSlopeMaxAngle=15,this.SlurTangentMinAngle=30,this.SlurTangentMaxAngle=80,this.SlurHeightFactor=1,this.SlurHeightFlattenLongSlursFactorByWidth=.24,this.SlurHeightFlattenLongSlursFactorByAngle=.36,this.SlurHeightFlattenLongSlursCutoffAngle=47,this.SlurHeightFlattenLongSlursCutoffWidth=16,this.SlursStartingAtSameStaffEntryYOffset=.8,this.SlurMaximumYControlPointDistance=void 0,this.GlissandoNoteOffset=.5,this.GlissandoStafflineStartMinimumWidth=1,this.GlissandoStafflineStartYDistanceToNote=.8,this.GlissandoStafflineEndOffset=1,this.GlissandoDefaultWidth=.1,this.RepetitionAllowFirstMeasureBeginningRepeatBarline=!1,this.RepetitionEndingLabelHeight=2,this.RepetitionEndingLabelXOffset=.5,this.RepetitionEndingLabelYOffset=.3,this.RepetitionEndingLineYLowerOffset=.5,this.RepetitionEndingLineYUpperOffset=.3,this.VoltaOffset=2.5,this.LyricsAlignmentStandard=o.TextAlignmentEnum.LeftBottom,this.LyricsHeight=2,this.LyricsYOffsetToStaffHeight=0,this.LyricsYMarginToBottomLine=.2,this.LyricsExtraXShiftForShortLyrics=.5,this.LyricsExtraXShiftForShortLyricsWidthThreshold=1.4,this.LyricsUseXPaddingForLongLyrics=!0,this.LyricsXPaddingFactorForLongLyrics=1,this.LyricsXPaddingWidthThreshold=1.7,this.LyricsXPaddingReductionForLongNotes=.7,this.LyricsXPaddingReductionForLastNoteInMeasure=1.2,this.LyricsXPaddingForLastNoteInMeasure=!0,this.VerticalBetweenLyricsDistance=.5,this.HorizontalBetweenLyricsDistance=.2,this.BetweenSyllableMaximumDistance=10,this.BetweenSyllableMinimumDistance=.5,this.LyricOverlapAllowedIntoNextMeasure=3.4,this.MinimumDistanceBetweenDashes=10,this.MaximumLyricsElongationFactor=2.5,this.TempoYSpacing=.5,this.InstantaneousTempoTextHeight=2.3,this.ContinuousDynamicTextHeight=2.3,this.MoodTextHeight=2.3,this.UnknownTextHeight=2,this.ContinuousTempoTextHeight=2.3,this.DynamicExpressionMaxDistance=2,this.DynamicExpressionSpacer=.5,this.IgnoreRepeatedDynamics=!1,this.ExpressionsUseXMLColor=!0,this.VexFlowDefaultNotationFontScale=39,this.VexFlowDefaultTabFontScale=39,this.TremoloStrokeScale=1,this.TremoloYSpacingScale=1,this.TremoloBuzzRollThickness=.25,this.StemWidth=.15,this.StaffLineWidth=.1,this.StaffLineColor=void 0,this.LedgerLineWidth=1,this.LedgerLineStrokeStyle=void 0,this.LedgerLineColorDefault="#000000",this.WedgeLineWidth=.12,this.TupletLineWidth=.12,this.LyricUnderscoreLineWidth=.12,this.SystemThinLineWidth=.12,this.SystemBoldLineWidth=m.unit/2,this.SystemRepetitionEndingLineWidth=.12,this.SystemDotWidth=m.unit/2,this.DistanceBetweenVerticalSystemLines=.35,this.DistanceBetweenDotAndLine=.7,this.RepeatEndStartPadding=2,this.OctaveShiftLineWidth=.12,this.OctaveShiftVerticalLineLength=m.unit,this.OctaveShiftOnWholeMeasureNoteUntilEndOfMeasure=!1,this.GraceLineWidth=this.StaffLineWidth*this.GraceNoteScalingFactor,this.MultipleRestMeasureDefaultWidth=4,this.MultipleRestMeasureAddKeySignature=!0,this.FixedMeasureWidth=!1,this.FixedMeasureWidthFixedValue=void 0,this.FixedMeasureWidthUseForPickupMeasures=!1,this.MinimumCrossedBeamDifferenceMargin=1e-4,this.SheetMaximumWidth=32767,this.VoiceSpacingMultiplierVexflow=.85,this.VoiceSpacingAddendVexflow=3,this.PickupMeasureWidthMultiplier=1,this.PickupMeasureRepetitionSpacing=.8,this.PickupMeasureSpacingSingleNoteAddend=1.6,this.DisplacedNoteMargin=.1,this.MinNoteDistance=2,this.SubMeasureXSpacingThreshold=35,this.MeasureDynamicsMaxScalingFactor=2.5,this.WholeRestXShiftVexflow=-1.5,this.MetronomeMarksDrawn=!0,this.MetronomeMarkXShift=-6,this.MetronomeMarkYShift=-1,this.SoftmaxFactorVexFlow=15,this.StaggerSameWholeNotes=!0,this.AlignRests=l.AlignRestOption.Never,this.RestCollisionYPadding=0,this.FillEmptyMeasuresWithWholeRest=l.FillEmptyMeasuresWithWholeRests.No,this.ArpeggiosGoAcrossVoices=!1,this.RenderArpeggios=!0,this.RenderSlurs=!0,this.RenderGlissandi=!0,this.ColoringMode=h.ColoringModes.XML,this.ColoringEnabled=!0,this.ColorStemsLikeNoteheads=!1,this.ColorBeams=!0,this.ColorFlags=!0,this.applyDefaultColorMusic("#000000"),this.DefaultColorCursor="#33e02f",this.DefaultFontFamily="Times New Roman",this.DefaultFontStyle=c.FontStyles.Regular,this.DefaultVexFlowNoteFont="gonville",this.MaxMeasureToDrawIndex=Number.MAX_VALUE,this.MinMeasureToDrawIndex=0,this.MaxSystemToDrawNumber=Number.MAX_VALUE,this.MaxPageToDrawNumber=Number.MAX_VALUE,this.RenderComposer=!0,this.RenderTitle=!0,this.RenderSubtitle=!0,this.RenderLyricist=!0,this.RenderCopyright=!1,this.RenderPartNames=!0,this.RenderPartAbbreviations=!0,this.RenderSystemLabelsAfterFirstPage=!0,this.RenderFingerings=!0,this.RenderMeasureNumbers=!0,this.RenderMeasureNumbersOnlyAtSystemStart=!1,this.UseXMLMeasureNumbers=!0,this.RenderLyrics=!0,this.RenderChordSymbols=!0,this.RenderMultipleRestMeasures=!0,this.AutoGenerateMultipleRestMeasuresFromRestMeasures=!0,this.RenderRehearsalMarks=!0,this.RenderClefsAtBeginningOfStaffline=!0,this.RenderKeySignatures=!0,this.RenderTimeSignatures=!0,this.RenderPedals=!0,this.RenderWavyLines=!0,this.ArticulationPlacementFromXML=!0,this.BreathMarkDistance=.8,this.FingeringPosition=a.PlacementEnum.AboveOrBelow,this.FingeringPositionFromXML=!0,this.FingeringPositionGrace=a.PlacementEnum.Left,this.FingeringInsideStafflines=!1,this.FingeringLabelFontHeight=1.7,this.FingeringOffsetX=0,this.FingeringOffsetY=0,this.FingeringPaddingY=-.2,this.FingeringTextSize=1.5,this.RenderStringNumbersClassical=!0,this.StringNumberOffsetY=0,this.NewSystemAtXMLNewSystemAttribute=!1,this.NewPageAtXMLNewPageAttribute=!1,this.NewSystemAtXMLNewPageAttribute=!1,this.RestoreCursorAfterRerender=!0,this.StretchLastSystemLine=!1,this.IgnoreBracketsWords=!0,this.PlaceWordsInsideStafflineFromXml=!1,this.PlaceWordsInsideStafflineYOffset=.9,this.UseJustifiedBuilder=!0,this.PageFormat=g.UndefinedPageFormat,this.PageBackgroundColor=void 0,this.PerformanceMode=!1,this.RenderSingleHorizontalStaffline=!1,this.SpacingBetweenTextLines=0,this.NoteToGraphicalNoteMap=new u.Dictionary,this.NoteToGraphicalNoteMapObjectCount=0,this.SkyBottomLineBatchMinMeasures=5,this.SkyBottomLineWebGLMinMeasures=80,this.AlwaysSetPreferredSkyBottomLineBackendAutomatically=!0,this.DisableWebGLInFirefox=!0,this.DisableWebGLInSafariAndIOS=!0,this.setPreferredSkyBottomLineBackendAutomatically();try{this.MaxInstructionsConstValue=this.ClefLeftMargin+this.ClefRightMargin+this.KeyRightMargin+this.RhythmRightMargin+11}catch(t){r.default.info("EngravingRules()",t)}this.MpatMode&&(this.NewPartAndSystemAfterFinalBarline=!0)}setPreferredSkyBottomLineBackendAutomatically(t=-1){var e,i,s,n;let r="",o="";"object"==typeof globalThis&&(r=null!==(i=null===(e=globalThis.navigator)||void 0===e?void 0:e.vendor)&&void 0!==i?i:"",o=null!==(n=null===(s=globalThis.navigator)||void 0===s?void 0:s.userAgent)&&void 0!==n?n:"");let a=!1;(this.DisableWebGLInSafariAndIOS&&/apple/i.test(r)||this.DisableWebGLInFirefox&&o.includes("Firefox"))&&(a=!0),this.PreferredSkyBottomLineBatchCalculatorBackend=l.SkyBottomLineBatchCalculatorBackendType.Plain,a||t>=this.SkyBottomLineWebGLMinMeasures&&(this.PreferredSkyBottomLineBatchCalculatorBackend=l.SkyBottomLineBatchCalculatorBackendType.WebGL)}applyDefaultColorMusic(t){this.DefaultColorMusic=t,this.DefaultColorNotehead=t,this.DefaultColorRest=t,this.DefaultColorStem=t,this.DefaultColorLabel=t,this.DefaultColorLyrics=t,this.DefaultColorTitle=t,this.LedgerLineColorDefault=t}addGraphicalNoteToNoteMap(t,e){t.NoteToGraphicalNoteObjectId=this.NoteToGraphicalNoteMapObjectCount,this.NoteToGraphicalNoteMap.setValue(t.NoteToGraphicalNoteObjectId,e),this.NoteToGraphicalNoteMapObjectCount++}GNote(t){return f.GraphicalNote.FromNote(t,this)}clearMusicSheetObjects(){this.NoteToGraphicalNoteMap=new u.Dictionary,this.NoteToGraphicalNoteMapObjectCount=0}resetChordAccidentalTexts(t,e){t.setValue(d.AccidentalEnum.SHARP,e?"♯":"#"),t.setValue(d.AccidentalEnum.FLAT,e?"♭":"b"),t.setValue(d.AccidentalEnum.DOUBLEFLAT,e?"𝄫":"bb"),t.setValue(d.AccidentalEnum.DOUBLESHARP,e?"𝄪":"x")}setChordSymbolLabelText(t,e){this.ChordSymbolLabelTexts.setValue(t,e)}resetChordSymbolLabelTexts(t){return t.setValue(p.ChordSymbolEnum.minor,"m"),t.setValue(p.ChordSymbolEnum.augmented,"aug"),t.setValue(p.ChordSymbolEnum.diminished,"dim"),t.setValue(p.ChordSymbolEnum.dominant,"7"),t.setValue(p.ChordSymbolEnum.majorseventh,"maj7"),t.setValue(p.ChordSymbolEnum.minorseventh,"m7"),t.setValue(p.ChordSymbolEnum.diminishedseventh,"dim7"),t.setValue(p.ChordSymbolEnum.augmentedseventh,"aug7"),t.setValue(p.ChordSymbolEnum.halfdiminished,`m7${this.ChordAccidentalTexts.getValue(d.AccidentalEnum.FLAT)}5`),t.setValue(p.ChordSymbolEnum.majorminor,"m(maj7)"),t.setValue(p.ChordSymbolEnum.majorsixth,"maj6"),t.setValue(p.ChordSymbolEnum.minorsixth,"m6"),t.setValue(p.ChordSymbolEnum.dominantninth,"9"),t.setValue(p.ChordSymbolEnum.majorninth,"maj9"),t.setValue(p.ChordSymbolEnum.minorninth,"m9"),t.setValue(p.ChordSymbolEnum.dominant11th,"11"),t.setValue(p.ChordSymbolEnum.major11th,"maj11"),t.setValue(p.ChordSymbolEnum.minor11th,"m11"),t.setValue(p.ChordSymbolEnum.dominant13th,"13"),t.setValue(p.ChordSymbolEnum.major13th,"maj13"),t.setValue(p.ChordSymbolEnum.minor13th,"m13"),t.setValue(p.ChordSymbolEnum.suspendedsecond,"sus2"),t.setValue(p.ChordSymbolEnum.suspendedfourth,"sus4"),t.setValue(p.ChordSymbolEnum.power,"5"),t.setValue(p.ChordSymbolEnum.none,"N.C."),t}addChordName(t,e,i,s,n){if(void 0!==p.ChordSymbolEnum[e]){const r={adds:i,alts:s,subs:n};this.CustomChords.push(p.CustomChord.createCustomChord(t,p.ChordSymbolEnum[e],r))}}renameChord(t,e){p.CustomChord.renameCustomChord(t,e,this.CustomChords)}resetChordNames(){const t=this.ChordAccidentalTexts.getValue(d.AccidentalEnum.SHARP),e=this.ChordAccidentalTexts.getValue(d.AccidentalEnum.FLAT);this.addChordName("alt","major",[`${t}5`,`${e}9`,`${t}9`],[`${e}5`],[]),this.addChordName("7alt","dominant",[`${t}5`,`${e}9`,`${t}9`],[`${e}5`],[]),this.addChordName("7sus4","dominant",["4"],[],["3"]),this.addChordName("7sus4","suspendedfourth",["7"],[],[]),this.addChordName("9sus4","dominantninth",["4"],[],["3"]),this.addChordName("9sus4","suspendedfourth",["9"],[],[]),this.addChordName("11sus4","dominant11th",["4"],[],["3"]),this.addChordName("11sus4","suspendedfourth",["11"],[],[]),this.addChordName("13sus4","dominant13th",["4"],[],["3"]),this.addChordName("13sus4","suspendedfourth",["13"],[],[]),this.addChordName("7sus2","dominant",["2"],[],["3"]),this.addChordName("7sus2","suspendedsecond",["7"],[],[]),this.addChordName(`m7${e}5`,"minorseventh",[],[`${e}5`],[]),this.addChordName("9sus2","dominantninth",["2"],[],["3"]),this.addChordName("9sus2","suspendedsecond",["9"],[],[]),this.addChordName("11sus2","dominant11th",["2"],[],["3"]),this.addChordName("11sus2","suspendedsecond",["11"],[],[]),this.addChordName("13sus2","dominant13th",["2"],[],["3"]),this.addChordName("13sus2","suspendedsecond",["13"],[],[]),this.addChordName("m(maj9)","majorminor",["9"],[],[]),this.addChordName("m(maj11)","majorminor",["11"],[],[]),this.addChordName("m(maj13)","majorminor",["13"],[],[]),this.addChordName("69","majorsixth",["9"],[],[]),this.addChordName("mi69","minorsixth",["9"],[],[])}calculateCurveParametersArrays(){this.TPower3=new Array(this.BezierCurveStepSize),this.OneMinusTPower3=new Array(this.BezierCurveStepSize),this.FactorOne=new Array(this.BezierCurveStepSize),this.FactorTwo=new Array(this.BezierCurveStepSize);for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalChordSymbolContainer=void 0;const s=i(2255),n=i(9946),r=i(4123),o=i(8911),a=i(4785),l=i(9086);class h extends a.GraphicalObject{constructor(t,e,i,s,n,r){super(),this.chordSymbolContainer=t,this.boundingBox=new o.BoundingBox(this,e),this.rules=r,this.calculateLabel(i,n,s)}get GetChordSymbolContainer(){return this.chordSymbolContainer}get GraphicalLabel(){return this.graphicalLabel}calculateLabel(t,e,i){const o=r.ChordSymbolContainer.calculateChordText(this.chordSymbolContainer,e,i);this.graphicalLabel=new n.GraphicalLabel(new s.Label(o),t,this.rules.ChordSymbolTextAlignment,this.rules,this.boundingBox),this.graphicalLabel.PositionAndShape.RelativePosition=new l.PointF2D(this.rules.ChordSymbolRelativeXOffset,0),this.graphicalLabel.Label.colorDefault=this.rules.DefaultColorChordSymbol}}e.GraphicalChordSymbolContainer=h},374:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalContinuousDynamicExpression=void 0;const n=i(6729),r=i(7839),o=i(9086),a=i(6791),l=i(3748),h=s(i(2043));class u extends a.AbstractGraphicalExpression{constructor(t,e,i){super(e,t,i),this.lines=[],this.isSplittedPart=!1,this.notToBeRemoved=!1}get StartMeasure(){return this.startMeasure}set StartMeasure(t){this.startMeasure=t}get EndMeasure(){return this.endMeasure}set EndMeasure(t){this.endMeasure=t}get EndStaffLine(){return this.endMeasure?this.endMeasure.ParentStaffLine:void 0}get IsSplittedPart(){return this.isSplittedPart}set IsSplittedPart(t){this.isSplittedPart=t}get IsVerbal(){return this.ContinuousDynamic.Label&&this.ContinuousDynamic.Label.length>0}get NotToBeRemoved(){return this.notToBeRemoved}set NotToBeRemoved(t){this.notToBeRemoved=t}get Lines(){return this.lines}get ContinuousDynamic(){return this.SourceExpression}updateSkyBottomLine(){var t;const e=this.parentStaffLine.SkyBottomLineCalculator,i=this.IsVerbal?this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginLeft:0,s=this.IsVerbal?this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginRight:0;switch(!this.IsSoftAccent&&!this.IsVerbal&&this.lines.length<2&&h.default.warn("Not enough lines for SkyBottomLine calculation"),this.IsVerbal||this.ContinuousDynamic.DynamicType!==r.ContDynamicEnum.crescendo&&this.ContinuousDynamic.DynamicType!==r.ContDynamicEnum.diminuendo&&h.default.warn("GraphicalContinuousDynamicExpression.updateSkyBottomLine(): unhandled continuous dynamic type. start measure: "+(null===(t=this.startMeasure)||void 0===t?void 0:t.MeasureNumber)),this.Placement){case l.PlacementEnum.Above:if(this.IsSoftAccent)e.updateSkyLineWithWedge(this.lines[0].Start,this.lines[0].End),e.updateSkyLineWithWedge(this.lines[2].End,this.lines[2].Start),e.updateSkyLineWithLine(this.lines[0].End,this.lines[2].End,this.lines[0].End.y);else if(this.IsVerbal){const t=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;e.updateSkyLineInRange(i,s,t)}else this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.crescendo?e.updateSkyLineWithWedge(this.lines[0].Start,this.lines[0].End):this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.diminuendo&&e.updateSkyLineWithWedge(this.lines[0].End,this.lines[0].Start);break;case l.PlacementEnum.Below:if(this.IsVerbal){const t=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;e.updateBottomLineInRange(i,s,t)}else this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.crescendo?e.updateBottomLineWithWedge(this.lines[1].Start,this.lines[1].End):this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.diminuendo&&e.updateBottomLineWithWedge(this.lines[1].End,this.lines[1].Start);break;default:h.default.error("Placement for GraphicalContinuousDynamicExpression is unknown")}}createCrescendoLines(t,e,i,s=this.rules.WedgeOpeningLength,n=this.rules.WedgeLineWidth){const r=new o.PointF2D(t,i),a=new o.PointF2D(e,i-s/2),l=new o.PointF2D(e,i+s/2);this.addWedgeLines(r,a,l,n)}createFirstHalfCrescendoLines(t,e,i,s=this.rules.WedgeMeasureEndOpeningLength,n=this.rules.WedgeLineWidth){const r=new o.PointF2D(t,i),a=new o.PointF2D(e,i-s/2),l=new o.PointF2D(e,i+s/2);this.addWedgeLines(r,a,l,n)}createSecondHalfCrescendoLines(t,e,i,s=this.rules.WedgeMeasureBeginOpeningLength,n=this.rules.WedgeOpeningLength,r=this.rules.WedgeLineWidth){const a=new o.PointF2D(t,i-s/2),l=new o.PointF2D(t,i+s/2),h=new o.PointF2D(e,i-n/2),u=new o.PointF2D(e,i+n/2);this.addDoubleLines(a,h,l,u,r)}recalculateCrescendoLines(t,e,i){const s=Math.abs(this.lines[0].Start.y-this.lines[1].Start.y)>1e-4;this.lines.clear(),s?this.createSecondHalfCrescendoLines(t,e,i):this.isSplittedPart?this.createFirstHalfCrescendoLines(t,e,i):this.createCrescendoLines(t,e,i)}createDiminuendoLines(t,e,i,s=this.rules.WedgeOpeningLength,n=this.rules.WedgeLineWidth){const r=new o.PointF2D(t,i-s/2),a=new o.PointF2D(t,i+s/2),l=new o.PointF2D(e,i);this.addWedgeLines(l,r,a,n)}createFirstHalfDiminuendoLines(t,e,i,s=this.rules.WedgeOpeningLength,n=this.rules.WedgeMeasureEndOpeningLength,r=this.rules.WedgeLineWidth){const a=new o.PointF2D(t,i-s/2),l=new o.PointF2D(t,i+s/2),h=new o.PointF2D(e,i-n/2),u=new o.PointF2D(e,i+n/2);this.addDoubleLines(a,h,l,u,r)}createSecondHalfDiminuendoLines(t,e,i,s=this.rules.WedgeMeasureBeginOpeningLength,n=this.rules.WedgeLineWidth){const r=new o.PointF2D(t,i-s/2),a=new o.PointF2D(t,i+s/2),l=new o.PointF2D(e,i);this.addWedgeLines(l,r,a,n)}recalculateDiminuendoLines(t,e,i){const s=Math.abs(this.lines[0].End.y-this.lines[1].End.y)>1e-4;this.lines.clear(),s?this.createFirstHalfDiminuendoLines(t,e,i):this.isSplittedPart?this.createSecondHalfDiminuendoLines(t,e,i):this.createDiminuendoLines(t,e,i)}createFirstHalfLines(t,e,i,s=this.rules.WedgeOpeningLength,n=this.rules.WedgeMeasureEndOpeningLength,o=this.rules.WedgeLineWidth){this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.crescendo?this.createFirstHalfCrescendoLines(t,e,i,n,o):this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.diminuendo&&this.createFirstHalfDiminuendoLines(t,e,i,s,n,o)}createSecondHalfLines(t,e,i,s=this.rules.WedgeMeasureBeginOpeningLength,n=this.rules.WedgeOpeningLength,o=this.rules.WedgeLineWidth){this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.crescendo?this.createSecondHalfCrescendoLines(t,e,i,s,n,o):this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.diminuendo&&this.createSecondHalfDiminuendoLines(t,e,i,s,o)}createLines(t,e,i,s=this.rules.WedgeOpeningLength,n=this.rules.WedgeLineWidth){this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.crescendo?this.createCrescendoLines(t,e,i,s,n):this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.diminuendo&&this.createDiminuendoLines(t,e,i,s,n)}calcPsi(){this.IsVerbal?this.PositionAndShape.calculateBoundingBox():(this.PositionAndShape.RelativePosition=this.lines[0].Start,this.PositionAndShape.BorderMarginTop=this.lines[0].End.y-this.lines[0].Start.y,this.PositionAndShape.BorderMarginBottom=this.lines[1].End.y-this.lines[1].Start.y,this.PositionAndShape.Center.y=(this.PositionAndShape.BorderMarginTop+this.PositionAndShape.BorderMarginBottom)/2,this.IsSoftAccent?(this.PositionAndShape.BorderMarginLeft=0,this.PositionAndShape.BorderMarginRight=this.lines[3].Start.x-this.lines[0].Start.x):this.ContinuousDynamic.DynamicType===r.ContDynamicEnum.crescendo?(this.PositionAndShape.BorderMarginLeft=0,this.PositionAndShape.BorderMarginRight=this.lines[0].End.x-this.lines[0].Start.x):(this.PositionAndShape.BorderMarginLeft=this.lines[0].End.x-this.lines[0].Start.x,this.PositionAndShape.BorderMarginRight=0))}cleanUp(){this.lines.clear()}shiftYPosition(t){this.IsVerbal?(this.PositionAndShape.RelativePosition.y+=t,this.PositionAndShape.calculateBoundingBox()):(this.lines[0].Start.y+=t,this.lines[0].End.y+=t,this.lines[1].End.y+=t)}squeeze(t){this.IsVerbal||Math.abs(this.lines[0].End.x-this.lines[0].Start.x)0?this.lines[0].Start.x+=t:(this.lines[0].End.x+=t,this.lines[1].End.x+=t):t<0?this.lines[0].Start.x+=t:(this.lines[0].End.x+=t,this.lines[1].End.x+=t),this.calcPsi())}addWedgeLines(t,e,i,s){const r=new n.GraphicalLine(t,e,s),o=new n.GraphicalLine(t,i,s);this.rules.DefaultColorMusic&&(r.colorHex=this.rules.DefaultColorMusic,o.colorHex=this.rules.DefaultColorMusic),this.lines.push(r),this.lines.push(o)}addDoubleLines(t,e,i,s,r){const o=new n.GraphicalLine(t,e,r),a=new n.GraphicalLine(i,s,r);this.rules.DefaultColorMusic&&(o.colorHex=this.rules.DefaultColorMusic,a.colorHex=this.rules.DefaultColorMusic),this.lines.push(o),this.lines.push(a)}}e.GraphicalContinuousDynamicExpression=u},5330:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalCurve=void 0;const s=i(9086);class n{constructor(){n.tPow3=new Array(n.bezierCurveStepSize),n.oneMinusTPow3=new Array(n.bezierCurveStepSize),n.bezierFactorOne=new Array(n.bezierCurveStepSize),n.bezierFactorTwo=new Array(n.bezierCurveStepSize);for(let t=0;t=n.bezierCurveStepSize?new s.PointF2D:new s.PointF2D(n.oneMinusTPow3[e]*this.bezierStartPt.x+n.bezierFactorOne[e]*this.bezierStartControlPt.x+n.bezierFactorTwo[e]*this.bezierEndControlPt.x+n.tPow3[e]*this.bezierEndPt.x,n.oneMinusTPow3[e]*this.bezierStartPt.y+n.bezierFactorOne[e]*this.bezierStartControlPt.y+n.bezierFactorTwo[e]*this.bezierEndControlPt.y+n.tPow3[e]*this.bezierEndPt.y)}}e.GraphicalCurve=n,n.bezierCurveStepSize=1e3},1443:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalGlissando=void 0;const s=i(9086),n=i(8911),r=i(6729);e.GraphicalGlissando=class{constructor(t){this.Glissando=t,this.staffEntries=[]}calculateLine(t){const e=this.staffEntries[0],i=this.staffEntries[this.staffEntries.length-1],o=e.findGraphicalNoteFromNote(this.Glissando.StartNote),a=i.findGraphicalNoteFromNote(this.Glissando.EndNote);if(!o&&!a)return;const l=e.parentMeasure.ParentStaffLine;let h,u,c,d;if(o&&e.parentMeasure.ParentStaffLine===this.StaffLine)h=o.PositionAndShape.RelativePosition.x+o.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x+o.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x+t.GlissandoNoteOffset,c=o.PositionAndShape.AbsolutePosition.y;else{h=i.parentMeasure.beginInstructionsWidth-.4;const e=this.Glissando.Direction===n.ColDirEnum.Down?-1:1;c=a.PositionAndShape.AbsolutePosition.y+e*t.GlissandoStafflineStartYDistanceToNote}if(a&&i.parentMeasure.ParentStaffLine===this.StaffLine)u=a.PositionAndShape.RelativePosition.x+a.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x+a.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x-.5-t.GlissandoNoteOffset,h>u&&(h=u-t.GlissandoStafflineStartMinimumWidth),d=a.PositionAndShape.AbsolutePosition.y;else{if(l.Measures.last().parentSourceMeasure.HasEndLine)return;u=l.PositionAndShape.Size.width,u-h>t.GlissandoStafflineEndOffset&&(h=u-t.GlissandoStafflineEndOffset);const e=this.Glissando.Direction===n.ColDirEnum.Down?1:-1;d=o.PositionAndShape.AbsolutePosition.y+e*t.GlissandoStafflineStartYDistanceToNote}const p=new s.PointF2D(h,c),f=new s.PointF2D(u,d);void 0===this.Width&&(this.Width=t.GlissandoDefaultWidth),this.Line=new r.GraphicalLine(p,f,this.Width)}}},9428:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalInstantaneousDynamicExpression=void 0;const n=i(6791),r=i(3748),o=s(i(2043));class a extends n.AbstractGraphicalExpression{constructor(t,e,i){super(e,t,i.parentSourceMeasure),this.mInstantaneousDynamicExpression=t,this.mMeasure=i}updateSkyBottomLine(){const t=this.parentStaffLine.SkyBottomLineCalculator,e=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginLeft,i=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginRight;let s=0;switch(this.Placement){case r.PlacementEnum.Above:s=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginTop,t.updateSkyLineInRange(e,i,s);break;case r.PlacementEnum.Below:s=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginBottom,t.updateBottomLineInRange(e,i,s);break;default:o.default.error("Placement for GraphicalInstantaneousDynamicExpression is unknown")}}}e.GraphicalInstantaneousDynamicExpression=a},5277:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalInstantaneousTempoExpression=void 0;const s=i(6791);class n extends s.AbstractGraphicalExpression{constructor(t,e){super(e.PositionAndShape.Parent.DataObject,t,t.parentMeasure),this.label=e}get GraphicalLabel(){return this.label}updateSkyBottomLine(){}}e.GraphicalInstantaneousTempoExpression=n},9946:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalLabel=void 0;const s=i(1274),n=i(8911),r=i(4278),o=i(4040);class a extends r.Clickable{constructor(t,e,i,s,r=void 0){super(),this.CenteringXShift=0,this.label=t,this.boundingBox=new n.BoundingBox(this,r),this.label.fontHeight=e,this.label.textAlignment=i,this.rules=s,this.rules.MpatMode&&"TRIO"===this.label.text&&(this.label.fontFamily="Arial")}get Label(){return this.label}toString(){return`${this.label.text} (${this.boundingBox.RelativePosition.x},${this.boundingBox.RelativePosition.y})`}setLabelPositionAndShapeBorders(){var t,e;if(""===this.Label.text.trim())return;this.TextLines=[];const i=null!==(e=null===(t=this.rules)||void 0===t?void 0:t.LabelMarginBorderFactor)&&void 0!==e?e:.1,n=this.Label.text.split(/[\n\r]+/g),r=n.length;let a=0;for(let t=0;t0&&this.TextLines.length>1&&(l+=this.rules.SpacingBetweenTextLines*r/10);const h=this.PositionAndShape;switch(this.Label.textAlignment){case s.TextAlignmentEnum.CenterBottom:h.BorderTop=-l,h.BorderLeft=-a/2,h.BorderBottom=0,h.BorderRight=a/2;break;case s.TextAlignmentEnum.CenterCenter:h.BorderTop=-l/2,h.BorderLeft=-a/2,h.BorderBottom=l/2,h.BorderRight=a/2;break;case s.TextAlignmentEnum.CenterTop:h.BorderTop=0,h.BorderLeft=-a/2,h.BorderBottom=l,h.BorderRight=a/2;break;case s.TextAlignmentEnum.LeftBottom:h.BorderTop=-l,h.BorderLeft=0,h.BorderBottom=0,h.BorderRight=a;break;case s.TextAlignmentEnum.LeftCenter:h.BorderTop=-l/2,h.BorderLeft=0,h.BorderBottom=l/2,h.BorderRight=a;break;case s.TextAlignmentEnum.LeftTop:h.BorderTop=0,h.BorderLeft=0,h.BorderBottom=l,h.BorderRight=a;break;case s.TextAlignmentEnum.RightBottom:h.BorderTop=-l,h.BorderLeft=-a,h.BorderBottom=0,h.BorderRight=0;break;case s.TextAlignmentEnum.RightCenter:h.BorderTop=-l/2,h.BorderLeft=-a,h.BorderBottom=l/2,h.BorderRight=0;break;case s.TextAlignmentEnum.RightTop:h.BorderTop=0,h.BorderLeft=-a,h.BorderBottom=l,h.BorderRight=0}h.BorderMarginTop=h.BorderTop-l*i,h.BorderMarginLeft=h.BorderLeft-l*i,h.BorderMarginBottom=h.BorderBottom+l*i,h.BorderMarginRight=h.BorderRight+l*i}}e.GraphicalLabel=a},6729:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalLine=void 0;const s=i(8155);e.GraphicalLine=class{constructor(t,e,i=0,n=s.OutlineAndFillStyleEnum.BaseWritingColor,r=void 0){this.start=t,this.end=e,this.width=i,this.styleId=n,this.colorHex=r}get Start(){return this.start}set Start(t){this.start=t}get End(){return this.end}set End(t){this.end=t}get Width(){return this.width}set Width(t){this.width=t}}},5091:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalLyricEntry=void 0;const s=i(9946),n=i(2255),r=i(9086),o=i(1274);e.GraphicalLyricEntry=class{constructor(t,e,i,a){this.lyricsEntry=t,this.graphicalStaffEntry=e;const l=e.parentMeasure.parentSourceMeasure.Rules.LyricsAlignmentStandard;t.Text.length>=4&&t.Parent.Notes[0].Length.Denominator>4&&o.TextAlignmentEnum.LeftBottom;const h=new n.Label(t.Text);h.isLyricText=!0;const u=this.graphicalStaffEntry.parentMeasure.parentSourceMeasure.Rules;this.graphicalLabel=new s.GraphicalLabel(h,i,l,u,e.PositionAndShape),this.graphicalLabel.Label.colorDefault=u.DefaultColorLyrics,this.graphicalLabel.PositionAndShape.RelativePosition=new r.PointF2D(0,a),this.graphicalLabel.setLabelPositionAndShapeBorders(),this.graphicalLabel.PositionAndShape.Size.width1&&t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalLyricWord=void 0,e.GraphicalLyricWord=class{constructor(t){this.graphicalLyricsEntries=[],this.lyricWord=t,this.initialize()}get GetLyricWord(){return this.lyricWord}get GraphicalLyricsEntries(){return this.graphicalLyricsEntries}set GraphicalLyricsEntries(t){this.graphicalLyricsEntries=t}isFilled(){for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalMarkedArea=void 0,e.GraphicalMarkedArea=class{constructor(t,e=void 0,i=void 0,s=void 0){this.systemRectangle=t,this.labelRectangle=e,this.label=i,this.settings=s}}},1513:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalMeasure=void 0;const s=i(4785),n=i(1797),r=i(8911),o=i(9086);class a extends s.GraphicalObject{constructor(t=void 0,e=void 0,i=void 0){super(),this.hasOnlyRests=!1,this.measureNumber=-1,this.ShowTimeSignature=!0,this.ShowKeySignature=!0,this.isTabMeasure=!1,this.parentStaff=t,this.parentSourceMeasure=e,this.parentStaffLine=i,i?(this.parentStaff=i.ParentStaff,this.PositionAndShape=new r.BoundingBox(this,i.PositionAndShape)):this.PositionAndShape=new r.BoundingBox(this),this.PositionAndShape.BorderBottom=4,this.parentSourceMeasure&&(this.measureNumber=this.parentSourceMeasure.MeasureNumber),this.staffEntries=[]}get ParentStaff(){return this.parentStaff}get ParentMusicSystem(){return this.parentMusicSystem}set ParentMusicSystem(t){this.parentMusicSystem=t}get MeasureNumber(){return this.measureNumber}get FirstInstructionStaffEntry(){return this.firstInstructionStaffEntry}set FirstInstructionStaffEntry(t){this.firstInstructionStaffEntry=t}get LastInstructionStaffEntry(){return this.lastInstructionStaffEntry}set LastInstructionStaffEntry(t){this.lastInstructionStaffEntry=t}get ParentStaffLine(){return this.parentStaffLine}set ParentStaffLine(t){this.parentStaffLine=t,this.parentStaffLine&&(this.PositionAndShape.Parent=this.parentStaffLine.PositionAndShape)}resetLayout(){throw new Error("not implemented")}getLineWidth(t){throw new Error("not implemented")}addClefAtBegin(t){throw new Error("not implemented")}addKeyAtBegin(t,e,i){throw new Error("not implemented")}addRhythmAtBegin(t,e){throw new Error("not implemented")}addClefAtEnd(t,e=!0){throw new Error("not implemented")}setPositionInStaffline(t){this.PositionAndShape.RelativePosition=new o.PointF2D(t,0)}setWidth(t){this.PositionAndShape.BorderRight=t}layoutSymbols(){throw new Error("not implemented")}findGraphicalStaffEntryFromTimestamp(t){var e;for(let i=0,s=this.staffEntries.length;i1}isVisible(){return this.ParentStaff.ParentInstrument.Visible}getGraphicalMeasureDurationFromStaffEntries(){let t=new n.Fraction(0,1);const e=[];for(let t=0,i=this.staffEntries.length;t0&&r.Add(e.notes[0].graphicalNoteLength);t.lt(r)&&(t=n.Fraction.createFromFraction(r))}return t}addGraphicalStaffEntry(t){this.staffEntries.push(t)}addGraphicalStaffEntryAtTimestamp(t){if(t)if(0===this.staffEntries.length||this.staffEntries[this.staffEntries.length-1].relInMeasureTimestamp.lt(t.relInMeasureTimestamp))this.staffEntries.push(t);else for(let e=this.staffEntries.length-1;e>=0;e--){if(this.staffEntries[e].relInMeasureTimestamp.lt(t.relInMeasureTimestamp)){this.staffEntries.splice(e+1,0,t);break}0===e&&this.staffEntries.splice(e,0,t)}}isPianoRightHand(){return this.isUpperStaffOfInstrument()}isPianoLeftHand(){return this.isLowerStaffOfInstrument()}isUpperStaffOfInstrument(){return 1===this.parentStaff.ParentInstrument.Staves.length||this.ParentStaff===this.parentStaff.ParentInstrument.Staves[0]}isLowerStaffOfInstrument(){return 1!==this.parentStaff.ParentInstrument.Staves.length&&this.ParentStaff===this.ParentStaff.ParentInstrument.Staves.last()}beginsWithLineRepetition(){const t=this.parentSourceMeasure;return!!t&&t.beginsWithLineRepetition()}endsWithLineRepetition(){const t=this.parentSourceMeasure;return!!t&&t.endsWithLineRepetition()}beginsWithWordRepetition(){const t=this.parentSourceMeasure;return!!t&&t.beginsWithWordRepetition()}endsWithWordRepetition(){const t=this.parentSourceMeasure;return!!t&&t.endsWithWordRepetition()}getTransposedHalftones(){return this.parentStaff.ParentInstrument.GetMusicSheet.Transpose+this.parentStaff.ParentInstrument.Transpose}}e.GraphicalMeasure=a},599:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagePlacementEnum=e.GraphicalMusicPage=void 0;const s=i(8911),n=i(4785),r=i(9086);class o extends n.GraphicalObject{constructor(t){super(),this.musicSystems=[],this.labels=[],this.parent=t,this.boundingBox=new s.BoundingBox(this,void 0)}get MusicSystems(){return this.musicSystems}set MusicSystems(t){this.musicSystems=t}get Labels(){return this.labels}set Labels(t){this.labels=t}get Parent(){return this.parent}set Parent(t){this.parent=t}get PageNumber(){return this.pageNumber}set PageNumber(t){this.pageNumber=t}setMusicPageAbsolutePosition(t,e){return new r.PointF2D(0,0)}}var a;e.GraphicalMusicPage=o,(a=e.PagePlacementEnum||(e.PagePlacementEnum={}))[a.Down=0]="Down",a[a.Right=1]="Right",a[a.RightDown=2]="RightDown"},4324:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SystemImageProperties=e.GraphicalMusicSheet=void 0;const n=i(525),r=i(6729),o=i(9086),a=i(289),l=i(5198),h=i(1797),u=i(8911),c=s(i(2043)),d=i(2337),p=i(4278),f=i(5974),m=i(4785);e.GraphicalMusicSheet=class{constructor(t,e){this.musicPages=[],this.measureList=[],this.verticalGraphicalStaffEntryContainers=[],this.cursors=[],this.leadSheet=!1,this.musicSheet=t,this.numberOfStaves=this.musicSheet.Staves.length,this.calculator=e,this.calculator.initialize(this)}get ParentMusicSheet(){return this.musicSheet}get GetCalculator(){return this.calculator}get JianpuKeySignature(){return this.jianpuKeySignature}set JianpuKeySignature(t){this.jianpuKeySignature=t}get MusicPages(){return this.musicPages}set MusicPages(t){this.musicPages=t}get MeasureList(){return this.measureList}set MeasureList(t){this.measureList=t}get VerticalGraphicalStaffEntryContainers(){return this.verticalGraphicalStaffEntryContainers}set VerticalGraphicalStaffEntryContainers(t){this.verticalGraphicalStaffEntryContainers=t}get Title(){return this.title}set Title(t){this.title=t}get Subtitle(){return this.subtitle}set Subtitle(t){this.subtitle=t}get Composer(){return this.composer}set Composer(t){this.composer=t}get Lyricist(){return this.lyricist}set Lyricist(t){this.lyricist=t}get Copyright(){return this.copyright}set Copyright(t){this.copyright=t}get Cursors(){return this.cursors}get SelectionStartSymbol(){return this.selectionStartSymbol}get SelectionEndSymbol(){return this.selectionEndSymbol}get MinAllowedSystemWidth(){return this.minAllowedSystemWidth}set MinAllowedSystemWidth(t){this.minAllowedSystemWidth=t}get NumberOfStaves(){return this.numberOfStaves}get LeadSheet(){return this.leadSheet}set LeadSheet(t){this.leadSheet=t}static transformRelativeToAbsolutePosition(t){for(let e=0;e=0;s--){const t=null===(i=this.measureList[s])||void 0===i?void 0:i[e];if(t)return t}}findGraphicalStaffEntryFromMeasureList(t,e,i){for(let s=e;s0)return i.staffEntries[0]}}getFirstVisibleMeasuresListFromIndices(t,e){const i=[],s=this.measureList[0].length;for(let n=t;n<=e;n++)for(let t=0;t=0;e--){if(this.verticalGraphicalStaffEntryContainers[e].AbsoluteTimestamp.lt(t)){const i=new n.VerticalGraphicalStaffEntryContainer(this.numberOfStaves,t);return this.verticalGraphicalStaffEntryContainers.splice(e+1,0,i),i}if(this.verticalGraphicalStaffEntryContainers[e].AbsoluteTimestamp.Equals(t))return this.verticalGraphicalStaffEntryContainers[e]}}GetVerticalContainerFromTimestamp(t,e=0){const i=d.CollectionUtil.binarySearch(this.verticalGraphicalStaffEntryContainers,new n.VerticalGraphicalStaffEntryContainer(0,t),n.VerticalGraphicalStaffEntryContainer.compareByTimestamp,e);if(i>=0)return this.verticalGraphicalStaffEntryContainers[i]}GetInterpolatedIndexInVerticalContainers(t){const e=this.verticalGraphicalStaffEntryContainers;if(1===e.length)return 0;let i,s,n=0,r=e.length-1;if(t.lte(e[e.length-1].AbsoluteTimestamp)){for(;r-n>1;){const i=Math.floor((r+n)/2);if(e[n].AbsoluteTimestamp.Equals(t)){r=n;break}if(e[r].AbsoluteTimestamp.Equals(t)){n=r;break}if(e[i].AbsoluteTimestamp.Equals(t))return this.verticalGraphicalStaffEntryContainers.indexOf(e[i]);t.lt(e[i].AbsoluteTimestamp)?r=i:n=i}if(n===r)return this.verticalGraphicalStaffEntryContainers.indexOf(e[n]);i=e[n].AbsoluteTimestamp,s=e[r].AbsoluteTimestamp}else i=e[e.length-1].AbsoluteTimestamp,s=h.Fraction.plus(this.getLongestStaffEntryDuration(e.length-1),i),r=e.length;const o=s.RealValue-i.RealValue,a=r-(s.RealValue-t.RealValue)/o;return Math.min(a,this.verticalGraphicalStaffEntryContainers.length-1)}getVisibleStavesIndicesFromSourceMeasure(t){const e=[],i=[];for(let i=0,s=t.length;i=0;)s=this.measureList[--i][t];return this.measureList[i][t]}getMeasureIndex(t,e,i){for(e=0;e{var e;return void 0!==(null===(e=t.parentStaffEntry)||void 0===e?void 0:e.relInMeasureTimestamp)}))}GetNearestNote(t,e){const i=this.GetNearestVoiceEntry(t);if(!i)return;let s,n=Number.MAX_SAFE_INTEGER;for(const e of i.notes){const i=e.PositionAndShape.AbsolutePosition.y,r=Math.abs(e.PositionAndShape.AbsolutePosition.x-t.x),o=Math.abs(i-t.y);r+os.PositionAndShape.RelativePosition.x&&(i=s):i=s)}}catch(t){c.default.info("GraphicalMusicSheet.getStaffEntry",t)}return i}GetPreviousVisibleContainerIndex(t){for(let e=t-1;e>=0;e--){const t=this.verticalGraphicalStaffEntryContainers[e].StaffEntries;for(let i=0,s=t.length;i=0;t--)if(i=this.getStaffEntry(t),i){if(!e)return i;if(i.sourceStaffEntry.ParentStaff.ParentInstrument.Visible)return i}}findClosestRightStaffEntry(t,e){let i;for(let s=Math.max(0,Math.ceil(t));s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalNote=void 0;const s=i(8640),n=i(4785),r=i(4040),o=i(8911);class a extends n.GraphicalObject{constructor(t,e,i,n=void 0){super(),this.DrawnAccidental=s.AccidentalEnum.NONE,this.lineShift=0,this.sourceNote=t,this.parentVoiceEntry=e,this.PositionAndShape=new o.BoundingBox(this,e.PositionAndShape),this.graphicalNoteLength=n||t.Length,this.numberOfDots=this.calculateNumberOfNeededDots(this.graphicalNoteLength),this.rules=i,this.rules.addGraphicalNoteToNoteMap(t,this)}Transpose(t,e,i,s){let n=this.sourceNote.Pitch;return r.MusicSheetCalculator.transposeCalculator&&(n=r.MusicSheetCalculator.transposeCalculator.transposePitch(this.sourceNote.Pitch,t,i)),n}calculateNumberOfNeededDots(t){return this.sourceNote&&this.sourceNote.NoteTuplet?0:t.calculateNumberOfNeededDots()}get ParentMusicPage(){return this.parentVoiceEntry.parentStaffEntry.parentMeasure.ParentMusicSystem.Parent}static FromNote(t,e){return e.NoteToGraphicalNoteMap.getValue(t.NoteToGraphicalNoteObjectId)}ToStringShort(t=0){var e;return null===(e=this.sourceNote)||void 0===e?void 0:e.ToStringShort(t)}get ToStringShortGet(){return this.ToStringShort(0)}}e.GraphicalNote=a},4785:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalObject=void 0;const s=i(9733);class n extends s.AClassHierarchyTrackable{get PositionAndShape(){return this.boundingBox}set PositionAndShape(t){this.boundingBox=t}}e.GraphicalObject=n},873:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalOctaveShift=void 0;const s=i(4785),n=i(5853),r=i(8911),o=i(158),a=i(1703);class l extends s.GraphicalObject{constructor(t,e){super(),this.getOctaveShift=t,this.setSymbol(),this.PositionAndShape=new r.BoundingBox(this,e)}setSymbol(){switch(this.getOctaveShift.Type){case n.OctaveEnum.VA8:this.octaveSymbol=o.MusicSymbol.VA8;break;case n.OctaveEnum.VB8:this.octaveSymbol=o.MusicSymbol.VB8;break;case n.OctaveEnum.MA15:this.octaveSymbol=o.MusicSymbol.MA15;break;case n.OctaveEnum.MB15:this.octaveSymbol=o.MusicSymbol.MB15;break;default:throw new a.ArgumentOutOfRangeException("")}}}e.GraphicalOctaveShift=l},4082:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalPedal=void 0;const s=i(4785),n=i(8911),r=i(158);class o extends s.GraphicalObject{constructor(t,e){super(),this.getPedal=t,this.setSymbol(),this.PositionAndShape=new n.BoundingBox(this,e)}setSymbol(){!this.getPedal.IsLine&&this.getPedal.IsSign?this.pedalSymbol=r.MusicSymbol.PEDAL_SYMBOL:this.getPedal.IsLine&&this.getPedal.IsSign?this.pedalSymbol=r.MusicSymbol.PEDAL_MIXED:this.pedalSymbol=r.MusicSymbol.PEDAL_BRACKET}}e.GraphicalPedal=o},3411:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalRectangle=void 0;const s=i(8911),n=i(4785);class r extends n.GraphicalObject{constructor(t,e,i,n){super(),this.boundingBox=new s.BoundingBox(this,i),this.boundingBox.RelativePosition=t,this.boundingBox.BorderRight=e.x-t.x,this.boundingBox.BorderBottom=e.y-t.y,this.style=n}}e.GraphicalRectangle=r},9876:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalSlur=void 0;const n=i(9086),r=i(5330),o=i(3748),a=i(8363),l=i(2947),h=i(1797),u=i(908);var c=s(i(9124)).default.Flow;class d extends r.GraphicalCurve{constructor(t,e){super(),this.staffEntries=[],this.slur=t,this.rules=e}static Compare(t,e){if(t.staffEntries.length<1)return-1;if(e.staffEntries.length<1)return 1;const i=h.Fraction.minus(t.staffEntries[t.staffEntries.length-1].getAbsoluteTimestamp(),t.staffEntries[0].getAbsoluteTimestamp()),s=h.Fraction.minus(e.staffEntries[e.staffEntries.length-1].getAbsoluteTimestamp(),e.staffEntries[0].getAbsoluteTimestamp());return i.RealValue>s.RealValue?1:s.RealValue>i.RealValue?-1:0}calculateCurve(t){const e=this.staffEntries[0],i=this.staffEntries[this.staffEntries.length-1];let s=e.findGraphicalNoteFromNote(this.slur.StartNote);!s&&this.graceStart&&(s=e.findGraphicalNoteFromGraceNote(this.slur.StartNote)),s||(s=e.findEndTieGraphicalNoteFromNoteWithStartingSlur(this.slur.StartNote,this.slur));let r=i.findGraphicalNoteFromNote(this.slur.EndNote);!r&&this.graceEnd&&(r=i.findGraphicalNoteFromGraceNote(this.slur.EndNote));const l=e.parentMeasure.ParentStaffLine,h=l.SkyBottomLineCalculator;this.calculatePlacement(h,l);const u=this.calculateStartAndEnd(s,r,l,t,h),c=u.startX,d=u.endX;let p=u.startY,f=u.endY;const m=t.SlurTangentMinAngle,g=t.SlurTangentMaxAngle;let b;if(this.placement===o.PlacementEnum.Above){p-=t.SlurNoteHeadYOffset,f-=t.SlurNoteHeadYOffset;const e=new n.PointF2D(this.staffEntries[0].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[0].PositionAndShape.RelativePosition.x,p);s?e.x+=this.staffEntries[0].PositionAndShape.BorderRight:e.x=this.staffEntries[0].parentMeasure.beginInstructionsWidth,this.graceStart&&(e.x+=i.PositionAndShape.RelativePosition.x);const o=new n.PointF2D(this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].PositionAndShape.RelativePosition.x,f);if(r?o.x+=this.staffEntries[this.staffEntries.length-1].PositionAndShape.BorderLeft:o.x=this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.Size.width,this.graceEnd&&(o.x+=i.staffEntryParent.PositionAndShape.RelativePosition.x),b=this.calculateTopPoints(e,o,l,h),0===b.length){const t=new n.PointF2D((o.x-e.x)/2+e.x,(o.y-e.y)/2+e.y);b.push(t)}const u=Math.atan((f-p)/(d-c)),S=new n.PointF2D(0,0);let y=new n.PointF2D(d-c,-(f-p));const v=a.Matrix2D.getRotationMatrix(u),E=v.getTransposeMatrix();y=v.vectorMultiplication(y);const _=this.calculateTranslatedAndRotatedPointListAbove(b,c,p,v),x=this.calculateMaxLeftSlope(_,S,y),M=this.calculateMaxRightSlope(_,S,y),P=S.y-S.x*x,w=y.y-y.x*M,T=new n.PointF2D;let I=!1;Math.abs(Math.abs(x)-Math.abs(M))<1e-4?(T.x=y.x/2,T.y=0,I=!0):(T.x=(w-P)/(x-M),T.y=x*T.x+P);const L=this.calculateHeightWidthRatio(y.x,_),A=0,C=0;let R=m,N=-m;if(!I){const t=this.calculateAngles(m,x,M,g);R=t.startAngle,N=t.endAngle}const k=this.calculateControlPoints(y.x,R,N,_,L,p,f);let B=k.startControlPoint,D=k.endControlPoint;B=E.vectorMultiplication(B),B.x+=c,B.y=-B.y+p,D=E.vectorMultiplication(D),D.x+=c,D.y=-D.y+p,this.bezierStartPt=new n.PointF2D(c,p-A),this.bezierStartControlPt=new n.PointF2D(B.x,B.y-A),this.bezierEndControlPt=new n.PointF2D(D.x,D.y-C),this.bezierEndPt=new n.PointF2D(d,f-C);const O=l.SkyLine.length,F=h.getLeftIndexForPointX(this.bezierStartPt.x,O),V=h.getLeftIndexForPointX(this.bezierEndPt.x,O),G=this.bezierEndPt.x-this.bezierStartPt.x,W=h.SamplingUnit;for(let t=F;t=F&&(l.SkyLine[s]=Math.min(l.SkyLine[s],i.y)),s++,s=F&&(l.BottomLine[s]=Math.max(l.BottomLine[s],i.y)),s++,s0)return void(this.placement=o.PlacementEnum.Above);const i=this.staffEntries[0],s=this.staffEntries[this.staffEntries.length-1],n=i.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection;if(n===s.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection)this.placement=n===u.StemDirectionType.Up?o.PlacementEnum.Below:o.PlacementEnum.Above,this.rules.SlurPlacementAtStems&&(this.placement=n===u.StemDirectionType.Up?o.PlacementEnum.Above:o.PlacementEnum.Below);else{let n=i.PositionAndShape.BorderLeft+i.PositionAndShape.RelativePosition.x+i.parentMeasure.PositionAndShape.RelativePosition.x,r=s.PositionAndShape.BorderRight+s.PositionAndShape.RelativePosition.x+s.parentMeasure.PositionAndShape.RelativePosition.x;this.graceStart&&(n+=s.PositionAndShape.RelativePosition.x),this.graceEnd&&(r+=s.staffEntryParent.PositionAndShape.RelativePosition.x);const a=-1*t.getSkyLineMinInRange(n,r),l=t.getBottomLineMaxInRange(n,r)-e.StaffHeight;this.placement=l>a?o.PlacementEnum.Above:o.PlacementEnum.Below}}calculateTopPoints(t,e,i,s){const r=[];let o=s.getRightIndexForPointX(t.x,i.SkyLine.length),a=s.getLeftIndexForPointX(e.x,i.SkyLine.length);o<0&&(o=0),a>=i.SkyLine.length&&(a=i.SkyLine.length-1);for(let t=o;t=i.BottomLine.length&&(a=i.BottomLine.length-1);for(let t=o;tu&&t>c&&(h+=t/70*this.rules.SlurHeightFlattenLongSlursFactorByWidth,h*=1+e/30*this.rules.SlurHeightFlattenLongSlursFactorByAngle,l/=h);const p=Math.min(.5,Math.max(.1,1.7*e/80*l*Math.pow(Math.max(r,.05),.4))),f=Math.min(.5,Math.max(.1,1.7*-i/80*l*Math.pow(Math.max(r,.05),.4))),m=new n.PointF2D;m.x=t*p*Math.cos(e*d.degreesToRadiansFactor),m.y=t*p*Math.sin(e*d.degreesToRadiansFactor);const g=new n.PointF2D;g.x=t-t*f*Math.cos(i*d.degreesToRadiansFactor),g.y=-t*f*Math.sin(i*d.degreesToRadiansFactor);let b=m.y-g.y;for(;this.rules.SlurMaximumYControlPointDistance&&Math.abs(b)>this.rules.SlurMaximumYControlPointDistance;)b<0?(m.y+=1,g.y-=1):(m.y-=1,g.y+=1),b=m.y-g.y;return{startControlPoint:m,endControlPoint:g}}calculateAngles(t,e,i,s){let n=Math.atan(e)/d.degreesToRadiansFactor;e>0?n+=20:n-=20;let r=Math.atan(i)/d.degreesToRadiansFactor;return i<0?r-=20:r+=20,{startAngle:Math.min(Math.max(t,n),s),endAngle:Math.max(Math.min(-t,r),-s)}}}e.GraphicalSlur=d,d.degreesToRadiansFactor=Math.PI/180},3023:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalStaffEntry=void 0;const s=i(8911),n=i(1797),r=i(4785),o=i(2337),a=i(4040);class l extends r.GraphicalObject{constructor(t,e=void 0,i=void 0){super(),this.graphicalChordContainers=[],this.tabStaffEntry=void 0,this.MaxAccidentals=0,this.graphicalInstructions=[],this.ties=[],this.graphicalTies=[],this.lyricsEntries=[],this.parentMeasure=t,this.graphicalVoiceEntries=[],this.sourceStaffEntry=e,i?(this.staffEntryParent=i,this.parentVerticalContainer=i.parentVerticalContainer,this.PositionAndShape=new s.BoundingBox(this,i.PositionAndShape)):this.PositionAndShape=new s.BoundingBox(this,t.PositionAndShape),e&&(this.relInMeasureTimestamp=e.Timestamp),this.FingeringEntries=[]}get GraphicalInstructions(){return this.graphicalInstructions}get GraphicalTies(){return this.graphicalTies}get LyricsEntries(){return this.lyricsEntries}set LyricsEntries(t){this.lyricsEntries=t}getAbsoluteTimestamp(){const t=this.parentMeasure.parentSourceMeasure.AbsoluteTimestamp.clone();return this.relInMeasureTimestamp&&t.Add(this.relInMeasureTimestamp),t}findTieGraphicalNoteFromNote(t){var e;const i=(null===(e=window.GYM)||void 0===e?void 0:e.graceCustom)||!1;for(const e of this.graphicalVoiceEntries)for(const s of e.notes){const e=s.sourceNote;if(i){if(t.NoteToGraphicalNoteObjectId==e.NoteToGraphicalNoteObjectId)return s}else if(!e.isRest()&&e.Pitch.FundamentalNote===t.Pitch.FundamentalNote&&e.Pitch.Octave===t.Pitch.Octave&&e.getAbsoluteTimestamp().Equals(t.getAbsoluteTimestamp()))return s}}findEndTieGraphicalNoteFromNoteWithStartingSlur(t,e){if(t)for(const i of this.graphicalVoiceEntries)if(i.parentVoiceEntry===t.ParentVoiceEntry)for(const t of i.notes){const i=t.sourceNote;if(i.NoteTie&&-1!==i.NoteSlurs.indexOf(e))return t}}findGraphicalNoteFromGraceNote(t){if(t)for(const e of this.graphicalVoiceEntries)if(e.parentVoiceEntry===t.ParentVoiceEntry)for(const i of e.notes)if(i.sourceNote===t)return i}findGraphicalNoteFromNote(t){if(t)for(const e of this.graphicalVoiceEntries)if(e.parentVoiceEntry===t.ParentVoiceEntry)for(const i of e.notes)if(i.sourceNote===t&&this.getAbsoluteTimestamp().Equals(t.getAbsoluteTimestamp()))return i}getGraphicalNoteDurationFromVoice(t){for(const e of this.graphicalVoiceEntries)if(e.parentVoiceEntry.ParentVoice===t)return e.notes[0].graphicalNoteLength;return new n.Fraction(0,1)}findVoiceEntryGraphicalNotes(t){for(const e of this.graphicalVoiceEntries)if(e.parentVoiceEntry===t)return e.notes}isVoiceEntryPartOfLinkedVoiceEntry(t){if(this.sourceStaffEntry.Link)for(let e=0,i=this.sourceStaffEntry.Link.LinkStaffEntries.length;e0&&(t=e)}return t}findStaffEntryMaxNoteLength(){let t=new n.Fraction(0,1);for(const e of this.graphicalVoiceEntries)for(const i of e.notes){const e=i.graphicalNoteLength;t.lt(e)&&e.GetExpandedNumerator()>0&&(t=e)}return t}findOrCreateGraphicalVoiceEntry(t){for(const e of this.graphicalVoiceEntries)if(e.parentVoiceEntry===t)return e;const e=a.MusicSheetCalculator.symbolFactory.createVoiceEntry(t,this);return this.graphicalVoiceEntries.push(e),e}findOrCreateGraphicalVoiceEntryFromGraphicalNote(t){for(const e of this.graphicalVoiceEntries)if(e===t.parentVoiceEntry)return e;const e=a.MusicSheetCalculator.symbolFactory.createVoiceEntry(t.sourceNote.ParentVoiceEntry,this);return this.graphicalVoiceEntries.push(e),e}addGraphicalNoteToListAtCorrectYPosition(t,e){const i=t.notes;if(0===i.length||e.PositionAndShape.RelativePosition.y=0;t--){if(i[t].PositionAndShape.RelativePosition.y>e.PositionAndShape.RelativePosition.y){i.splice(t+1,0,e);break}if(0===t){i.splice(0,0,e);break}}}hasOnlyRests(){return this.sourceStaffEntry.hasOnlyRests}getSkylineMin(){var t;const e=null===(t=this.parentMeasure)||void 0===t?void 0:t.ParentStaffLine.SkyBottomLineCalculator;if(!e)return;const[i,s]=this.getAbsoluteStartAndEnd();return e.getSkyLineMinInRange(i,s)}getHighestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getSkylineMin()}getLowestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getBottomlineMax()}getBottomlineMax(){var t;const e=null===(t=this.parentMeasure)||void 0===t?void 0:t.ParentStaffLine.SkyBottomLineCalculator;if(!e)return;const[i,s]=this.getAbsoluteStartAndEnd();return e.getBottomLineMaxInRange(i,s)}getAbsoluteStartAndEnd(){let t=this.PositionAndShape.AbsolutePosition.x;return t-=this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.x,[t,t+this.PositionAndShape.Size.width]}}e.GraphicalStaffEntry=l},8898:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalStaffEntryLink=void 0,e.GraphicalStaffEntryLink=class{constructor(t){this.graphicalLinkedStaffEntries=[],this.staffEntryLink=t,this.initialize()}get GetStaffEntryLink(){return this.staffEntryLink}get GraphicalLinkedStaffEntries(){return this.graphicalLinkedStaffEntries}set GraphicalLinkedStaffEntries(t){this.graphicalLinkedStaffEntries=t}isFilled(){for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalTie=void 0,e.GraphicalTie=class{constructor(t,e=void 0,i=void 0){this.tie=t,this.startNote=e,this.endNote=i}get SVGElement(){return this.vfTie.getAttribute("el")}get GetTie(){return this.tie}get StartNote(){return this.startNote}get Tie(){return this.tie}set StartNote(t){this.startNote=t}get EndNote(){return this.endNote}set EndNote(t){this.endNote=t}}},4462:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalUnknownExpression=void 0;const n=i(6791),r=i(3748),o=s(i(2043));class a extends n.AbstractGraphicalExpression{constructor(t,e,i,s,n=void 0){super(t,new r.AbstractExpression(i),s),this.label=e,this.sourceMultiExpression=n}updateSkyBottomLine(){const t=this.parentStaffLine.SkyBottomLineCalculator,e=this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginLeft,i=this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginRight;switch(this.Placement){case r.PlacementEnum.Above:const s=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;t.updateSkyLineInRange(e,i,s);break;case r.PlacementEnum.Below:const n=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;t.updateBottomLineInRange(e,i,n);break;default:o.default.error("Placement for GraphicalUnknownExpression is unknown")}}}e.GraphicalUnknownExpression=a},5974:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalVoiceEntry=void 0;const s=i(4785),n=i(8911),r=i(1405);class o extends s.GraphicalObject{constructor(t,e,i){super(),this.parentVoiceEntry=t,this.parentStaffEntry=e,this.PositionAndShape=new n.BoundingBox(this,e?e.PositionAndShape:void 0,!0),this.notes=[],this.rules=i||(e?e.parentMeasure.parentSourceMeasure.Rules:new r.EngravingRules)}sort(){return this.notes.sort(((t,e)=>{var i,s,n,r;return(null!==(s=null===(i=e.sourceNote.Pitch)||void 0===i?void 0:i.getHalfTone())&&void 0!==s?s:0)-(null!==(r=null===(n=t.sourceNote.Pitch)||void 0===n?void 0:n.getHalfTone())&&void 0!==r?r:0)})),this.notes}sortForVexflow(){return this.notes.sort(((t,e)=>{var i,s,n;return(null!==(s=null===(i=t.sourceNote.Pitch)||void 0===i?void 0:i.getHalfTone())&&void 0!==s?s:0)-(null!==(n=e.sourceNote.Pitch.getHalfTone())&&void 0!==n?n:0)})),this.notes}color(){}}e.GraphicalVoiceEntry=o},8682:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicalWavyLine=void 0;const s=i(8911),n=i(4785);class r extends n.GraphicalObject{constructor(t,e){super(),this.getWavyLine=t,this.PositionAndShape=new s.BoundingBox(this,e)}}e.GraphicalWavyLine=r},8823:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},642:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JustifiedMusicSystemBuilder=void 0;const s=i(5623);class n extends s.MusicSystemBuilder{buildMusicSystems(){var t;this.currentSystemParams=new s.SystemBuildParameters;const e=[];let i=0,n=-1;for(let t=0,s=this.measureList.length;t0?(n=t-1,e.push({startIndex:i,endIndex:n}),i=t):r.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(n=t,e.push({startIndex:i,endIndex:n}),i=t+1)}i0?Number(e):6,p===e||d+f>n&&p%2==0?(o.push(p),d=s,p=1):p++}else d>n?(o.push(p),d=s,p=1):p++;m=s>n?e+1:Math.ceil(m),u===m?c+=1:(r.push(c),u=m,c=1)}r.push(c),o.push(p),o=o.filter(Boolean)}return o.length>1&&1===o[o.length-1]&&(o[o.length-2]=o[o.length-2]-1,o[o.length-1]=o[o.length-1]+1),console.log(o,r),this.buildPreparedMusicSystems(o)}buildPreparedMusicSystems(t){let e=!1;this.currentSystemParams=new s.SystemBuildParameters,this.currentSystemParams.currentSystem=this.initMusicSystem();for(let i=0,s=this.measureList.length;i0&&this.rules.RenderMultipleRestMeasures){a.isReducedToMultiRest=!0,a.multipleRestMeasureNumber=1;const i=a.multipleRestMeasures-1;r+=i;for(let s=1;s<=i;s++){const i=t.SourceMeasures.indexOf(a)+s;if(i>=t.SourceMeasures.length)break;const n=t.SourceMeasures[i];n.multipleRestMeasureNumber=s+1,n.isReducedToMultiRest=!0,e.push([void 0])}}}if(this.rules.AutoGenerateMultipleRestMeasuresFromRestMeasures&&this.rules.RenderMultipleRestMeasures){let r,a=0;for(let l=0,h=t.SourceMeasures.length;l0){r.isReducedToMultiRest=!0,r.multipleRestMeasureNumber=1,a++,h.multipleRestMeasureNumber=a,h.isReducedToMultiRest=!0;for(let t=0;t1){r.multipleRestMeasures=a;const t=this.createGraphicalMeasuresForSourceMeasure(r,i,n,o,s);e[r.measureListIndex]=t,a=0,r=void 0}else a=0,r=void 0}if(a>1){r.multipleRestMeasures=a,r.isReducedToMultiRest=!0;const t=this.createGraphicalMeasuresForSourceMeasure(r,i,n,o,s);e[r.measureListIndex]=t,a=0,r=void 0}}const a=s.map((t=>t.ClefType===l.ClefEnum.percussion));this.handleStaffEntries(a),this.calculateVerticalContainersList(),this.setIndicesToVerticalGraphicalContainers()}calculate(){this.musicSystems=[],this.clearSystemsAndMeasures(),this.clearRecreatedObjects(),this.createGraphicalTies(),this.calculateSheetLabelBoundingBoxes(),this.calculateXLayout(this.graphicalMusicSheet,this.maxInstrNameLabelLength()),this.graphicalMusicSheet.MusicPages.length=0,this.calculateMusicSystems(),n.GraphicalMusicSheet.transformRelativeToAbsolutePosition(this.graphicalMusicSheet)}calculateXLayout(t,e){var i;if(this.graphicalMusicSheet.MeasureList.length>0){let t,e=0;for(let i=0;ie&&(e=s),U.setMeasuresMinStaffEntriesWidth(t,s)}if(this.rules.FixedMeasureWidth){let s=e;this.rules.FixedMeasureWidthFixedValue&&(s=this.rules.FixedMeasureWidthFixedValue);for(let e=0;e1;if(1===n&&e.Measures[0].parentSourceMeasure.ImplicitMeasure&&(o=!1),o)return;0!==r.MeasureNumber&&1!==r.MeasureNumber||(i=r.MeasureNumber),s=r!==e.Measures[0]&&this.rules.MeasureNumberLabelXOffset?this.rules.MeasureNumberLabelXOffset:0;const a=this.rules.UseXMLMeasureNumbers&&1===r.MeasureNumber&&1!==r.parentSourceMeasure.getPrintedMeasureNumber();((r.MeasureNumber===i||r.MeasureNumber>=i+this.rules.MeasureNumberLabelOffset)&&!r.parentSourceMeasure.ImplicitMeasure||a)&&((1!==r.MeasureNumber||1===r.MeasureNumber&&r!==e.Measures[0]||a)&&this.calculateSingleMeasureNumberPlacement(r,e,t,s),i=r.MeasureNumber)}}calculateSingleMeasureNumberPlacement(t,e,i,s=0){const n=t.parentSourceMeasure.getPrintedMeasureNumber().toString(),r=new I.Label(n),o=new g.GraphicalLabel(r,this.rules.MeasureNumberLabelHeight,b.TextAlignmentEnum.LeftBottom,this.rules),a=e.SkyBottomLineCalculator;o.setLabelPositionAndShapeBorders(),o.PositionAndShape.Parent=i.PositionAndShape;const l=e.PositionAndShape.RelativePosition.x+t.PositionAndShape.RelativePosition.x-o.PositionAndShape.BorderMarginLeft+s;let h,u=l,c=l-o.PositionAndShape.BorderLeft+o.PositionAndShape.BorderRight;u-=e.PositionAndShape.RelativePosition.x,c-=e.PositionAndShape.RelativePosition.x;const d=u+.5,p=c-.5,m=a.getSkyLineMinInRange(d,p);if(t===e.Measures[0]){let e=0;if(i.GroupBrackets.length>0)for(const t of i.GroupBrackets)e=Math.min(e,t.PositionAndShape.BorderTop);else t.ParentStaff.ParentInstrument.Parent&&(e=-1);h=Math.min(m,e)}else h=m;h=Math.min(0,h),o.PositionAndShape.RelativePosition=new f.PointF2D(l,h),i.MeasureNumberLabels.push(o)}calculateMeasureNumberSkyline(t){const e=t.StaffLines[0];for(const i of t.MeasureNumberLabels){let t=i.PositionAndShape.RelativePosition.x,s=t-i.PositionAndShape.BorderLeft+i.PositionAndShape.BorderRight;t-=e.PositionAndShape.RelativePosition.x,s-=e.PositionAndShape.RelativePosition.x,e.SkyBottomLineCalculator.updateSkyLineInRange(t,s,i.PositionAndShape.RelativePosition.y+i.PositionAndShape.BorderMarginTop)}}layoutGraphicalTie(t,e,i){throw new Error(this.abstractNotImplementedErrorMessage)}calculateSingleStaffLineLyricsPosition(t,e){let i=0,s=this.rules.StaffHeight;const n=new Map,r=[],o=t.SkyBottomLineCalculator;let a=t.Measures.length;for(let e=0;e0){r.push(e),i=Math.max(i,e.LyricsEntries.length);const t=e.PositionAndShape.RelativePosition.x+l.x;let n=Number.MAX_VALUE,a=Number.MIN_VALUE;for(let i=0;i0){const e=t.PositionAndShape.Size.width;let i=r[0].PositionAndShape.RelativePosition.x+r[0].PositionAndShape.BorderMarginLeft+r[0].parentMeasure.PositionAndShape.RelativePosition.x;i=i>e?e:i,o.updateBottomLineInRange(i,e,l)}return r}calculateLyricsExtendsAndDashes(t){for(let e=0,i=t.length;e0||t.UnknownList.length>0){let e="";for(let i=0,s=t.EntriesList.length;i-50){let t=l/10;t+=this.rules.PlaceWordsInsideStafflineYOffset,c.PositionAndShape.RelativePosition.y=t}new F.GraphicalUnknownExpression(s,c,u,null===(n=o[i])||void 0===n?void 0:n.parentSourceMeasure,t)}}clearRecreatedObjects(){for(let t=0,e=this.staffEntriesWithGraphicalTies.length;tt.length-1&&(P.default.debug("minimum measure to draw index out of range. resetting min measure index to limit."),this.rules.MinMeasureToDrawIndex=t.length-1);const e=[];for(let i=this.rules.MinMeasureToDrawIndex,s=t.length;i0){let t=0;0===r.staffEntries[0].relInMeasureTimestamp.RealValue&&(t=r.staffEntries[0].PositionAndShape.RelativePosition.x,1===r.MeasureNumber&&(t+=this.rules.ChordSymbolWholeMeasureRestXOffsetMeasure1));let i=t+(r.PositionAndShape.Size.width-r.endInstructionsWidth-t)*(e.relInMeasureTimestamp.RealValue/r.parentSourceMeasure.Duration.RealValue)+h.PositionAndShape.BorderMarginLeft;o&&(i=Math.max(i,o.PositionAndShape.RelativePosition.x+o.GraphicalLabel.PositionAndShape.Size.width+this.rules.ChordSymbolXSpacing)),h.PositionAndShape.RelativePosition.x=i,h.PositionAndShape.Parent=r.staffEntries[0].PositionAndShape.Parent}const u=h.PositionAndShape,c=u.Parent;if(c.DataObject instanceof a.GraphicalMeasure&&0===e.relInMeasureTimestamp.RealValue&&(u.RelativePosition.x=Math.max(r.beginInstructionsWidth,u.RelativePosition.x),1===r.MeasureNumber&&u.RelativePosition.x>3&&(u.RelativePosition.x+=this.rules.ChordSymbolWholeMeasureRestXOffsetMeasure1)),0===e.PositionAndShape.RelativePosition.x){const i=t.GraphicalMeasures[n];for(const t of i){let i=!1;for(const s of t.staffEntries)if(s.relInMeasureTimestamp===e.relInMeasureTimestamp&&0!==s.PositionAndShape.RelativePosition.x){u.RelativePosition.x=s.PositionAndShape.RelativePosition.x,i=!0;break}if(i)break}}const d=u.BorderMarginLeft+c.AbsolutePosition.x+u.RelativePosition.x,p=u.BorderMarginRight+c.AbsolutePosition.x+u.RelativePosition.x;(!this.rules.ChordSymbolYAlignment||s>0)&&(s=i.getSkyLineMinInRange(d,p));let f=0;0===l?(f+=this.rules.ChordSymbolYOffset,f+=.1):f+=this.rules.ChordSymbolYPadding,f*=-1;const m=h.GraphicalLabel;m.PositionAndShape.RelativePosition.y=s+f,m.setLabelPositionAndShapeBorders(),m.PositionAndShape.calculateBoundingBox(),i.updateSkyLineInRange(d,p,s+m.PositionAndShape.BorderMarginTop),o=h}}}}calculateAlignedChordSymbolsOffset(t,e){let i=Number.MAX_SAFE_INTEGER;for(const s of t)for(const t of s.graphicalChordContainers){const s=t.PositionAndShape,n=s.Parent;let r=s.BorderMarginLeft+n.AbsolutePosition.x,o=s.BorderMarginRight+n.AbsolutePosition.x;n.DataObject instanceof a.GraphicalMeasure&&(r+=n.DataObject.beginInstructionsWidth,o+=n.DataObject.beginInstructionsWidth),i=Math.min(i,e.getSkyLineMinInRange(r,o))}return i}layoutMeasureWithWholeRest(t,e,i){}layoutBeams(t){}layoutArticulationMarks(t,e,i){}layoutOrnament(t,e,i){}calculateRestNotePlacementWithinGraphicalBeam(t,e,i,s,n){}calculateTupletNumbers(){if(!this.rules.TupletNumberLimitConsecutiveRepetitions)return;let t,e,i,s=-1,n=0;const r={};for(const o of this.graphicalMusicSheet.ParentMusicSheet.Instruments)for(const a of o.Voices){n=0,r[a.VoiceId]={};for(const o of a.VoiceEntries)if(o.Notes.length>0){const l=o.Notes[0];if(!l.NoteTuplet||l.NoteTuplet.shouldBeBracketed(this.rules.TupletsBracketedUseXMLValue,this.rules.TupletsBracketed,this.rules.TripletsBracketed)){s=-1,n=0,e=void 0,t=void 0;continue}if(l.NoteTuplet===i)continue;let h=l.TypeLength;if(h||(P.default.warn("note missing TypeLength"),h=l.NoteTuplet.Fractions[0]),l.NoteTuplet!==e&&r[a.VoiceId][l.NoteTuplet.TupletLabelNumber]&&r[a.VoiceId][l.NoteTuplet.TupletLabelNumber][h.RealValue]){l.NoteTuplet.RenderTupletNumber=!1,i=l.NoteTuplet;continue}l.NoteTuplet.TupletLabelNumber===s&&h.Equals(t)&&!l.NoteTuplet.Bracket||(s=l.NoteTuplet.TupletLabelNumber,t=h,n=0),e=l.NoteTuplet,n++,n<=this.rules.TupletNumberMaxConsecutiveRepetitions&&(l.NoteTuplet.RenderTupletNumber=!0),n>this.rules.TupletNumberMaxConsecutiveRepetitions&&(l.NoteTuplet.RenderTupletNumber=!1,this.rules.TupletNumberAlwaysDisableAfterFirstMax&&(r[a.VoiceId][s]||(r[a.VoiceId][s]={}),r[a.VoiceId][s][h.RealValue]=!0)),i=e}}}calculateSlurs(){}calculateGlissandi(){}calculateDynamicExpressionsForMultiExpression(t,e,i){}calculateGraphicalVerbalContinuousDynamic(t,e){const i=t.Label,s=e.x+i.PositionAndShape.BorderMarginLeft,n=e.x+i.PositionAndShape.BorderMarginRight,r=t.ContinuousDynamic.Placement,o=t.ParentStaffLine.SkyBottomLineCalculator;let a;r===A.PlacementEnum.Below?(a=o.getBottomLineMaxInRange(s,n),i.PositionAndShape.RelativePosition=new f.PointF2D(e.x,a-i.PositionAndShape.BorderMarginTop)):(a=o.getSkyLineMinInRange(s,n),i.PositionAndShape.RelativePosition=new f.PointF2D(e.x,a-i.PositionAndShape.BorderMarginBottom))}calculateGraphicalContinuousDynamic(t,e){var i;const s=t.IsSoftAccent,n=t.ParentStaffLine.ParentStaff.idInMusicSheet,o=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(t.ContinuousDynamic.EndMultiExpression.SourceMeasureParent,n);if(!o)return void P.default.warn("MusicSheetCalculator.calculateGraphicalContinuousDynamic: No endMeasure found");t.EndMeasure=o;const a=t.ParentStaffLine,l=o.ParentStaffLine,h=l&&a===l;let u=!1;l?u=null==l?void 0:l.isPartOfMultiStaffInstrument():a&&(u=null==a?void 0:a.isPartOfMultiStaffInstrument());const c=r.Fraction.createFromFraction(t.ContinuousDynamic.EndMultiExpression.AbsoluteTimestamp),d=this.graphicalMusicSheet.GetVerticalContainerFromTimestamp(c),p=d.getFirstNonNullStaffEntry().parentMeasure,f=p.PositionAndShape.AbsolutePosition.x+p.PositionAndShape.BorderRight;let m=new r.Fraction(0,0,0);for(const t of d.StaffEntries){const e=null===(i=null==t?void 0:t.sourceStaffEntry)||void 0===i?void 0:i.calculateMaxNoteLength(!1);(null==e?void 0:e.gt(m))&&(m=e)}const g=!s&&t.ContinuousDynamic.DynamicType===k.ContDynamicEnum.diminuendo,b=this.getRelativePositionInStaffLineFromTimestamp(c,n,l,u,0,g),S=r.Fraction.plus(c,m),y=this.getRelativePositionInStaffLineFromTimestamp(S,n,l,u,0,t.ContinuousDynamic.DynamicType===k.ContDynamicEnum.diminuendo),v=this.rules.SoftAccentWedgePadding,E=d.getFirstNonNullStaffEntry().PositionAndShape.Size.width,_=this.rules.SoftAccentSizeFactor;s?(e.x-=E/2*_+v,b.x=e.x+E/2*_):y.x>b.x&&y.xw){const t=M.StaffLines[e].PositionAndShape.RelativePosition.y-a.PositionAndShape.RelativePosition.y-this.rules.StaffHeight;V=this.rules.StaffHeight+t/2}else V=this.rules.WedgePlacementBelowY;V-=this.rules.WedgeOpeningLength/2,h||(G=V);let i=T.getBottomLineMaxInRange(R,D);i>V&&(V=i);const s=!1;if(wthis.rules.StaffHeight?n-this.rules.WedgeVerticalMargin:this.rules.StaffHeight+this.rules.WedgeOpeningLength,t.NotToBeRemoved=!0}}h||(i=l.SkyBottomLineCalculator.getBottomLineMaxInRange(N,O),i>G&&(G=i),G+=this.rules.WedgeOpeningLength/2,G+=this.rules.WedgeVerticalMargin),s||(V+=this.rules.WedgeOpeningLength/2,V+=this.rules.WedgeVerticalMargin)}else if(I===A.PlacementEnum.Above){if(1===a.ParentStaff.ParentInstrument.Staves.length)V=this.rules.WedgePlacementAboveY;else{let t=0;w>0&&(t=w-1);const e=M.StaffLines[t];V=-(a.PositionAndShape.RelativePosition.y-e.PositionAndShape.RelativePosition.y-this.rules.StaffHeight)/2}V+=this.rules.WedgeOpeningLength/2,h||(G=V);let t=T.getSkyLineMinInRange(R,D);t1&&w>0){const t=a.findClosestStaffEntry(R),i=a.findClosestStaffEntry(D);if(t&&i){t.parentVerticalContainer;const i=w-1;if(e){const t=M.StaffLines[i],e=t.SkyBottomLineCalculator.getBottomLineMaxInRange(R,D);V=(a.PositionAndShape.RelativePosition.y-t.PositionAndShape.RelativePosition.y-e-this.rules.StaffHeight)/2+this.rules.StaffHeight}}}h||(t=l.SkyBottomLineCalculator.getSkyLineMinInRange(N,O),tn&&(n=t),n+=this.rules.WedgeOpeningLength/2,n+=this.rules.WedgeVerticalMargin}else if(I===A.PlacementEnum.Above){const t=s.SkyBottomLineCalculator.getSkyLineMinInRange(N,O);t-n/2?-n/2:i-t.PositionAndShape.BorderMarginBottom}else a=i-t.PositionAndShape.BorderMarginBottom;t.PositionAndShape.RelativePosition=new f.PointF2D(e.x,a)}else if(t.Placement===A.PlacementEnum.Below){const i=o.getBottomLineMaxInRange(n,r),l=s.ParentStaff.ParentInstrument.Staves[s.ParentStaff.ParentInstrument.Staves.length-1];if(s.isPartOfMultiStaffInstrument()&&s.ParentStaff!==l){const e=s.ParentMusicSystem.StaffLines[s.ParentMusicSystem.StaffLines.indexOf(s)+1].PositionAndShape.RelativePosition.y-s.PositionAndShape.RelativePosition.y-this.rules.StaffHeight;a=i+t.PositionAndShape.BorderMarginBottomt.PositionAndShape.Size.width&&(p=t.PositionAndShape.Size.width-this.rules.MeasureRightMargin,d=p-h.PositionAndShape.MarginSize.width,e.x=d-h.PositionAndShape.BorderMarginLeft);const m=t.SkyBottomLineCalculator;return c=n===A.PlacementEnum.Below?m.getBottomLineMaxInRange(d,p)+a:m.getSkyLineMinInRange(d,p)-a,h.PositionAndShape.RelativePosition=new f.PointF2D(e.x,c),n===A.PlacementEnum.Below?m.updateBottomLineInRange(d,p,h.PositionAndShape.BorderMarginBottom+c):m.updateSkyLineInRange(d,p,h.PositionAndShape.BorderMarginTop+c),h}calculateTempoExpressionsForMultiTempoExpression(t,e,i,s){W={};const n=r.Fraction.plus(t.AbsoluteTimestamp,e.Timestamp),o=this.graphicalMusicSheet.MeasureList[i];let a=new f.PointF2D;if(e.ContinuousTempo||e.InstantaneousTempo){if(this.rules.MinMeasureToDrawIndex>0)return;if(!o[0])return;let r=o[0].ParentStaffLine,l=o[0].PositionAndShape.RelativePosition.x,h=0;for(let t=0;t0){r=o[t].ParentStaffLine,l=o[t].PositionAndShape.RelativePosition.x,h=t;break}if(a=this.getRelativePositionInStaffLineFromTimestamp(n,h,r,r.isPartOfMultiStaffInstrument(),l),e.EntriesList.length>0&&e.EntriesList[0].Expression instanceof R.InstantaneousTempoExpression&&(e.EntriesList[0].Expression.Placement=A.PlacementEnum.Above,r.Measures[0].staffEntries.length>0&&0===Math.abs(a.x-r.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x)&&r.ParentMusicSystem===this.musicSystems[0])){const t=r.Measures[0].FirstInstructionStaffEntry;if(t){const e=t.GraphicalInstructions.last();a.x=e.PositionAndShape.RelativePosition.x}this.rules.CompactMode&&(a.x=r.PositionAndShape.RelativePosition.x+r.Measures[0].PositionAndShape.RelativePosition.x)}for(const n of e.EntriesList){let o=b.TextAlignmentEnum.CenterBottom;this.rules.CompactMode&&(o=b.TextAlignmentEnum.LeftBottom);const l=this.calculateLabel(r,a,n.label,e.getFontstyleOfFirstEntry(),n.Expression.Placement,this.rules.UnknownTextHeight,o,this.rules.TempoYSpacing);if(n.Expression.ColorXML&&this.rules.ExpressionsUseXMLColor&&(l.ColorXML=n.Expression.ColorXML),n.Expression instanceof R.InstantaneousTempoExpression){for(const t of r.AbstractExpressions)t instanceof C.GraphicalInstantaneousTempoExpression&&(t.SourceExpression.Label,n.Expression.Label);new C.GraphicalInstantaneousTempoExpression(n.Expression,l).ParentStaffLine||P.default.warn("Adding staffline didn't work"),n.Expression.Enum===R.TempoEnum.metronomeMark&&(W[i]=n.Expression)}else n.Expression,N.ContinuousTempoExpression;if(s===t.TempoExpressions.length-1)for(const t of Object.values(W))this.createMetronomeMark(t,i);else if(n.Expression instanceof N.ContinuousTempoExpression){for(const t of r.AbstractExpressions)t instanceof C.GraphicalInstantaneousTempoExpression&&(t.SourceExpression.Label,n.Expression.Label);r.AbstractExpressions.push(new C.GraphicalInstantaneousTempoExpression(n.Expression,l))}}}}createMetronomeMark(t,e){throw new Error(this.abstractNotImplementedErrorMessage)}graphicalMeasureCreatedCalculations(t){}clearSystemsAndMeasures(){for(let t=0,e=this.graphicalMusicSheet.MusicPages.length;t-1&&i.PositionAndShape.ChildElements.splice(t,1),i.FirstInstructionStaffEntry=void 0,i.beginInstructionsWidth=0}if(i.LastInstructionStaffEntry){const t=i.PositionAndShape.ChildElements.indexOf(i.LastInstructionStaffEntry.PositionAndShape);t>-1&&i.PositionAndShape.ChildElements.splice(t,1),i.LastInstructionStaffEntry=void 0,i.endInstructionsWidth=0}}e.Measures=[],e.PositionAndShape.ChildElements=[]}i.StaffLines.length=0,i.PositionAndShape.ChildElements=[]}e.MusicSystems=[],e.PositionAndShape.ChildElements=[]}this.graphicalMusicSheet.MusicPages=[]}handleVoiceEntry(t,e,i,s,n,r,o,a,l,h=void 0,u=void 0){t.StemDirectionXml!==d.StemDirectionType.Undefined&&this.rules.SetWantedStemDirectionByXml&&void 0!==t.StemDirectionXml?t.WantedStemDirection=t.StemDirectionXml:this.calculateStemDirectionFromVoices(t);const c=e.findOrCreateGraphicalVoiceEntry(t);c.octaveShiftValue=a;const p=e.tabStaffEntry;let f;p&&(f=p.findOrCreateGraphicalVoiceEntry(t));for(let s=0,l=t.Notes.length;s-1)continue;let d;if(t.IsGrace?d=U.symbolFactory.createGraceNote(l,c,n,this.rules,a):(d=U.symbolFactory.createNote(l,c,n,a,this.rules,void 0),U.stafflineNoteCalculator.trackNote(d)),l.Pitch&&this.checkNoteForAccidental(d,i,n,a),this.resetYPositionForLeadSheet(d.PositionAndShape),e.addGraphicalNoteToListAtCorrectYPosition(c,d),d.PositionAndShape.calculateBoundingBox(),this.leadSheet||(void 0!==l.NoteBeam&&l.PrintObject&&(l instanceof G.TabNote&&!this.rules.TabBeamsRendered||this.handleBeam(d,l.NoteBeam,o)),void 0!==l.NoteTuplet&&l.PrintObject&&this.handleTuplet(d,l.NoteTuplet,r)),f){const t=U.symbolFactory.createNote(l,f,n,a,this.rules,void 0);p.addGraphicalNoteToListAtCorrectYPosition(f,t),t.PositionAndShape.calculateBoundingBox(),this.leadSheet||l.NoteTuplet&&this.handleTuplet(t,l.NoteTuplet,r)}}return t.Articulations.length>0&&this.handleVoiceEntryArticulations(t.Articulations,t,e),t.TechnicalInstructions.length>0&&this.handleVoiceEntryTechnicalInstructions(t.TechnicalInstructions,t,e),t.LyricsEntries.size()>0&&this.handleVoiceEntryLyrics(t,e,s),t.OrnamentContainer&&this.handleVoiceEntryOrnaments(t.OrnamentContainer,t,e),a}resetYPositionForLeadSheet(t){this.leadSheet&&(t.RelativePosition=new f.PointF2D(t.RelativePosition.x,0))}layoutVoiceEntries(t,e){if(t.PositionAndShape.RelativePosition=new f.PointF2D(0,0),!this.leadSheet)for(const e of t.graphicalVoiceEntries){const i=e.notes;if(0===i.length)continue;const s=i[0].sourceNote.ParentVoiceEntry,n=void 0!==i[0].sourceNote.Pitch;this.layoutVoiceEntry(s,i,t,n)}}maxInstrNameLabelLength(){var t;let e=0;for(const i of this.graphicalMusicSheet.ParentMusicSheet.Instruments)if((null===(t=i.NameLabel)||void 0===t?void 0:t.print)&&i.Voices.length>0&&i.Voices[0].Visible){let t=i.NameLabel;this.rules.RenderPartNames||(t=new I.Label("",t.textAlignment,t.font));const s=new g.GraphicalLabel(t,this.rules.InstrumentLabelTextHeight,b.TextAlignmentEnum.LeftCenter,this.rules);s.setLabelPositionAndShapeBorders(),e=Math.max(e,s.PositionAndShape.MarginSize.width)}return this.rules.RenderPartNames?e:0}calculateSheetLabelBoundingBoxes(){var t;const e=this.graphicalMusicSheet.ParentMusicSheet,i=this.rules.DefaultColorTitle;if(void 0!==e.Title&&this.rules.RenderTitle){const t=new g.GraphicalLabel(e.Title,this.rules.SheetTitleHeight,b.TextAlignmentEnum.CenterBottom,this.rules);t.Label.IsCreditLabel=!0,t.Label.colorDefault=i,this.graphicalMusicSheet.Title=t,t.setLabelPositionAndShapeBorders()}else this.rules.RenderTitle||(this.graphicalMusicSheet.Title=void 0);if(void 0!==e.Subtitle&&this.rules.RenderSubtitle){const t=new g.GraphicalLabel(e.Subtitle,this.rules.SheetSubtitleHeight,b.TextAlignmentEnum.CenterCenter,this.rules);t.Label.IsCreditLabel=!0,t.Label.colorDefault=i,this.graphicalMusicSheet.Subtitle=t,t.setLabelPositionAndShapeBorders()}else this.rules.RenderSubtitle||(this.graphicalMusicSheet.Subtitle=void 0);if(void 0!==e.Composer&&this.rules.RenderComposer){const t=new g.GraphicalLabel(e.Composer,this.rules.SheetComposerHeight,b.TextAlignmentEnum.RightCenter,this.rules);t.Label.IsCreditLabel=!0,t.Label.colorDefault=i,this.graphicalMusicSheet.Composer=t,t.setLabelPositionAndShapeBorders()}else this.rules.RenderComposer||(this.graphicalMusicSheet.Composer=void 0);if(void 0!==e.Lyricist&&this.rules.RenderLyricist){const t=new g.GraphicalLabel(e.Lyricist,this.rules.SheetAuthorHeight,b.TextAlignmentEnum.RightCenter,this.rules);t.Label.IsCreditLabel=!0,t.Label.colorDefault=i,this.graphicalMusicSheet.Lyricist=t,t.setLabelPositionAndShapeBorders()}else this.rules.RenderLyricist||(this.graphicalMusicSheet.Lyricist=void 0);if(void 0!==e.Copyright&&this.rules.RenderCopyright){const t=new g.GraphicalLabel(e.Copyright,this.rules.SheetCopyrightHeight,b.TextAlignmentEnum.CenterBottom,this.rules);t.Label.IsCreditLabel=!0,t.Label.colorDefault=i,this.graphicalMusicSheet.Copyright=t,t.setLabelPositionAndShapeBorders()}else this.rules.RenderCopyright||(this.graphicalMusicSheet.Copyright=void 0);const s=null===(t=this.graphicalMusicSheet.musicSheet.sourceMeasures)||void 0===t?void 0:t[0];if(s&&s.FirstInstructionsStaffEntries.length>0){const t=s.FirstInstructionsStaffEntries[0];let n,r,o;for(let e=0,i=t.Instructions.length;e0&&1===t.graphicalVoiceEntries[0].notes.length){const i=t.graphicalVoiceEntries[0].notes[0];!i.sourceNote.Pitch&&new r.Fraction(1,2).lt(i.sourceNote.Length)&&this.layoutMeasureWithWholeRest(i,t,e)}}}}}}optimizeRestNotePlacement(t,e){if(0===t.graphicalVoiceEntries.length)return;const i=t.graphicalVoiceEntries[0].notes;if(0===i.length)return;const s=i[0],n=s.sourceNote.isRest();if(2===t.graphicalVoiceEntries.length){let e=!1;const i=t.graphicalVoiceEntries[1].notes;i.length>0&&(e=i[0].sourceNote.isRest()),n&&e?this.calculateTwoRestNotesPlacementWithCollisionDetection(t):(n||e)&&this.calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote(t)}else if(n&&t!==e.staffEntries[0]&&t!==e.staffEntries[e.staffEntries.length-1]){const i=e.staffEntries.indexOf(t),n=e.staffEntries[i-1],r=e.staffEntries[i+1];if(1===n.graphicalVoiceEntries.length){const e=n.graphicalVoiceEntries[0].notes[0];if(void 0!==e.sourceNote.NoteBeam&&1===r.graphicalVoiceEntries.length){const i=r.graphicalVoiceEntries[0].notes[0];void 0!==i.sourceNote.NoteBeam&&e.sourceNote.NoteBeam===i.sourceNote.NoteBeam&&(this.calculateRestNotePlacementWithinGraphicalBeam(t,s,e,r,i),t.PositionAndShape.calculateBoundingBox())}}}}getRelativePositionInStaffLineFromTimestamp(t,e,i,s,n=0,o=!1){let a,l,h=new f.PointF2D;const u=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,c=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(t),d=Math.min(Math.floor(c),u-1),p=Math.min(Math.ceil(c),u-1);if(d<0||e<0)return h;if(a=this.getFirstLeftNotNullStaffEntryFromContainer(d,e,s),l=this.getFirstRightNotNullStaffEntryFromContainer(p,e,s),a&&l){let e=a.parentMeasure.PositionAndShape.RelativePosition.x;n>0&&(e=n);let s=a.PositionAndShape.RelativePosition.x+e,u=l.PositionAndShape.RelativePosition.x+l.parentMeasure.PositionAndShape.RelativePosition.x;const c=t.RealValue>l.getAbsoluteTimestamp().RealValue;n>0?u=l.PositionAndShape.RelativePosition.x+e:o&&(a.getAbsoluteTimestamp().RealValue===t.RealValue||c)&&(s=a.PositionAndShape.RelativePosition.x+a.PositionAndShape.BorderLeft+e,u=s);let d=0;if(a!==l){const e=a.getAbsoluteTimestamp(),i=l.getAbsoluteTimestamp();d=r.Fraction.minus(t,e).RealValue/r.Fraction.minus(i,e).RealValue}a.parentMeasure.ParentStaffLine!==l.parentMeasure.ParentStaffLine&&(a.parentMeasure.ParentStaffLine===i?u=i.PositionAndShape.Size.width:s=i.PositionAndShape.RelativePosition.x),h=new f.PointF2D(s+(u-s)*d,0)}return h}getRelativeXPositionFromTimestamp(t){const e=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,i=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(t),s=Math.max(0,Math.min(Math.round(i),e-1)),n=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[s].getFirstNonNullStaffEntry();return n.PositionAndShape.RelativePosition.x+n.parentMeasure.PositionAndShape.RelativePosition.x}calculatePageLabels(t){var e,i;this.rules.RenderSingleHorizontalStaffline&&(t.PositionAndShape.BorderRight=t.PositionAndShape.Size.width,t.PositionAndShape.calculateBoundingBox(),this.graphicalMusicSheet.ParentMusicSheet.pageWidth=t.PositionAndShape.Size.width);let s=10,n=-1;if(t.MusicSystems.length>0){const e=t.MusicSystems[0];s=e.PositionAndShape.RelativePosition.y+e.PositionAndShape.BorderTop;const i=t.MusicSystems[t.MusicSystems.length-1];n=i.PositionAndShape.RelativePosition.y+i.PositionAndShape.BorderBottom}if(this.graphicalMusicSheet.Title&&this.rules.RenderTitle){const e=this.graphicalMusicSheet.Title;e.PositionAndShape.Parent=t.PositionAndShape;const i=new f.PointF2D;i.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,i.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight,e.PositionAndShape.RelativePosition=i,t.Labels.push(e)}if(this.graphicalMusicSheet.Subtitle&&this.rules.RenderTitle&&this.rules.RenderSubtitle){const i=this.graphicalMusicSheet.Subtitle;i.PositionAndShape.Parent=t.PositionAndShape;const s=new f.PointF2D;s.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,s.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight+this.rules.SheetMinimumDistanceBetweenTitleAndSubtitle;const n=null===(e=i.TextLines)||void 0===e?void 0:e.length;n>1&&(s.y+=i.PositionAndShape.BorderBottom*(n-1)/n),i.PositionAndShape.RelativePosition=s,t.Labels.push(i)}const r=this.graphicalMusicSheet.Composer;let o;const a=this.graphicalMusicSheet.Composer&&this.rules.RenderComposer&&this.graphicalMusicSheet.Lyricist&&this.rules.RenderLyricist?2:0;if(r&&this.rules.RenderComposer){r.PositionAndShape.Parent=t.PositionAndShape,r.setLabelPositionAndShapeBorders();const e=new f.PointF2D;e.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth-this.rules.PageRightMargin,e.y=s,e.y-=this.rules.SystemComposerDistance;const n=null===(i=r.TextLines)||void 0===i?void 0:i.length;n>1&&(e.y-=r.PositionAndShape.BorderBottom*(n-1)/n),o=e.y,e.y-=a,r.PositionAndShape.RelativePosition=e,t.Labels.push(r)}const l=this.graphicalMusicSheet.Lyricist;if(l&&this.rules.RenderLyricist){l.PositionAndShape.Parent=t.PositionAndShape,l.setLabelPositionAndShapeBorders();const e=new f.PointF2D;e.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth-this.rules.PageRightMargin,e.y=s,e.y-=this.rules.SystemLyricistDistance,e.y+=l.PositionAndShape.BorderBottom,e.y=Math.min(e.y,null!=o?o:Number.MAX_SAFE_INTEGER),e.y+=a,l.PositionAndShape.RelativePosition=e,t.Labels.push(l)}const h=this.graphicalMusicSheet.Copyright;if(h&&this.rules.RenderCopyright){h.PositionAndShape.Parent=t.PositionAndShape,h.setLabelPositionAndShapeBorders();const e=new f.PointF2D;e.x=t.PositionAndShape.Size.width/2,e.y=n+this.rules.SheetCopyrightMargin,e.y-=h.PositionAndShape.BorderTop,h.PositionAndShape.RelativePosition=e,t.Labels.push(h)}}createGraphicalTies(){for(let t=0;t=0&&this.staffEntriesWithGraphicalTies.push(a)}a=r}}setTieDirections(t){if(!t)return;const e=t.ties;if(1===e.length){const t=e[0];if(t.TieDirection===A.PlacementEnum.NotYetDefined){const e=t.Notes[0].ParentVoiceEntry.ParentVoice.VoiceId;2!==e&&6!==e||(t.TieDirection=A.PlacementEnum.Below)}}if(e.length>1){let t;for(const i of e){const e=i.Notes[0];(!t||e.Pitch.getHalfTone()>t.Pitch.getHalfTone())&&(t=e)}for(const i of e)i.TieDirection===A.PlacementEnum.NotYetDefined&&(i.Notes[0]===t?i.TieDirection=A.PlacementEnum.Above:i.TieDirection=A.PlacementEnum.Below)}}createAccidentalCalculators(){const t=[],e=this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();if(e)for(let i=0;i1)return;E=U.symbolFactory.createGraphicalMeasure(t,v)}if(E.hasError=t.getErrorInMeasure(u),t.FirstInstructionsStaffEntries[u])for(let e=0,i=t.FirstInstructionsStaffEntries[u].Instructions.length;e0){const e=o.Instructions[0];U.symbolFactory.createInStaffClef(t,e)}this.rules.RenderChordSymbols&&(null===(y=o.ChordContainers)||void 0===y?void 0:y.length)>0&&(o.ParentStaff.ParentInstrument.HasChordSymbols=!0,U.symbolFactory.createChordSymbols(o,t,s.ActiveKeyInstruction,this.graphicalMusicSheet.ParentMusicSheet.Transpose))}}if(s.doCalculationsAtEndOfMeasure(),t.LastInstructionsStaffEntries[u]){const e=t.LastInstructionsStaffEntries[u];for(let t=0,i=e.Instructions.length;t=1&&0===E.staffEntries.length){const e=new m.SourceStaffEntry(new L.VerticalSourceStaffEntryContainer(E.parentSourceMeasure,E.parentSourceMeasure.AbsoluteTimestamp,E.parentSourceMeasure.CompleteNumberOfStaves),v);if(0===v.Voices.length){const t=new V.Voice(E.ParentStaff.ParentInstrument,-1);v.Voices.push(t)}const i=new d.VoiceEntry(new r.Fraction(0,1),v.Voices[0],e);let s=t.Duration;0===s.RealValue&&(s=t.ActiveTimeSignature.clone());const n=new o.Note(i,e,s,void 0,t,!0);n.IsWholeMeasureRest=!0,n.PrintObject=this.rules.FillEmptyMeasuresWithWholeRest===D.FillEmptyMeasuresWithWholeRests.YesVisible,i.addNote(n);const a=U.symbolFactory.createStaffEntry(e,E);E.addGraphicalStaffEntry(a),a.relInMeasureTimestamp=i.Timestamp;const h=U.symbolFactory.createVoiceEntry(i,a);a.graphicalVoiceEntries.push(h);const u=U.symbolFactory.createNote(n,h,new l.ClefInstruction,c.OctaveEnum.NONE,this.rules);U.stafflineNoteCalculator.trackNote(u),h.notes.push(u)}E.hasOnlyRests=!0;for(const t of E.staffEntries)if(E.hasOnlyRests=t.hasOnlyRests(),!E.hasOnlyRests)break;return E}checkNoteForAccidental(t,e,i,s){let n=t.sourceNote.Pitch;const r=t.parentVoiceEntry.parentStaffEntry.parentMeasure.getTransposedHalftones();0!==r&&t.sourceNote.ParentStaffEntry.ParentStaff.ParentInstrument.MidiInstrumentId!==M.MidiInstrument.Percussion&&(n=t.Transpose(e.ActiveKeyInstruction,i,r,s),t.sourceNote.TransposedPitch=n),t.sourceNote.halfTone=n.getHalfTone(),e.checkAccidental(t,n)}handleStaffEntries(t){for(let e=0,i=this.graphicalMusicSheet.MeasureList.length;e0&&!this.rules.PercussionUseCajon2NoteSystem&&t[e]&&(-1===this.rules.PercussionOneLineCutoff||U.stafflineNoteCalculator.getStafflineUniquePositionCount(e)0&&t.graphicalVoiceEntries[0].notes.length>0&&(this.layoutVoiceEntries(t,e),this.layoutStaffEntry(t));this.graphicalMeasureCreatedCalculations(s)}}}}calculateSkyBottomLines(){for(const t of this.musicSystems)for(const e of t.StaffLines)e.SkyBottomLineCalculator.calculateLines()}calculateExpressionAlignements(){}calculateStaffEntryArticulationMarks(){for(let t=0,e=this.musicSystems.length;t0&&this.layoutArticulationMarks(e.Articulations,e,i)}}}}}}calculateOrnaments(){for(let t=0,e=this.musicSystems.length;t0&&e.LyricVersesNumbers.sort()}for(let e=0,i=this.musicSystems.length;e=0&&(s=e.GraphicalLyricsEntries[i+1]),!s)return;const n=t.StaffEntryParent.parentMeasure.ParentStaffLine,r=s.StaffEntryParent.parentMeasure.ParentStaffLine,o=t.StaffEntryParent,a=s.StaffEntryParent;if(t.StaffEntryParent.parentMeasure.ParentStaffLine===s.StaffEntryParent.parentMeasure.ParentStaffLine){const e=o.parentMeasure.PositionAndShape.RelativePosition.x+o.PositionAndShape.RelativePosition.x+t.GraphicalLabel.PositionAndShape.RelativePosition.x+t.GraphicalLabel.PositionAndShape.BorderMarginRight-t.GraphicalLabel.CenteringXShift,i=a.parentMeasure.PositionAndShape.RelativePosition.x+a.PositionAndShape.RelativePosition.x+t.GraphicalLabel.PositionAndShape.RelativePosition.x+s.GraphicalLabel.PositionAndShape.BorderMarginLeft,r=t.GraphicalLabel.PositionAndShape.RelativePosition.y;let l=1;i-e>3*this.rules.MinimumDistanceBetweenDashes&&(l=Math.floor((i-e)/this.rules.MinimumDistanceBetweenDashes)-1),1===l?this.calculateSingleDashForLyricWord(n,e,i,r):this.calculateDashes(n,e,i,r)}else{const e=o.parentMeasure.PositionAndShape.RelativePosition.x+o.PositionAndShape.RelativePosition.x+t.GraphicalLabel.PositionAndShape.BorderMarginRight,i=n.Measures[n.Measures.length-1],l=i.PositionAndShape.RelativePosition.x+i.PositionAndShape.Size.width;let h=t.GraphicalLabel.PositionAndShape.RelativePosition.y;if(this.calculateDashes(n,e,l,h),r&&r.Measures[0]&&a.parentMeasure.ParentStaffLine&&(a!==a.parentMeasure.staffEntries[0]||a.parentMeasure!==a.parentMeasure.ParentStaffLine.Measures[0])){const t=r.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,e=a.parentMeasure.PositionAndShape.RelativePosition.x+a.PositionAndShape.RelativePosition.x+s.GraphicalLabel.PositionAndShape.BorderMarginLeft;h=s.GraphicalLabel.PositionAndShape.RelativePosition.y,this.calculateDashes(r,t,e,h)}}}calculateDashes(t,e,i,s){let n=i-e;if(n<3*this.rules.MinimumDistanceBetweenDashes)this.calculateSingleDashForLyricWord(t,e,i,s);else{const r=Math.floor(n/this.rules.MinimumDistanceBetweenDashes)-1,o=n/(r+1);let a=0;for(e+=o,i-=o;a<=Math.floor(r/2)&&i>e;)n=this.calculateRightAndLeftDashesForLyricWord(t,e,i,s),e+=o,i-=o,a++;n>2*o&&this.calculateSingleDashForLyricWord(t,e,i,s)}}calculateSingleDashForLyricWord(t,e,i,s){const n=new I.Label("-");n.colorDefault=this.rules.DefaultColorLyrics;let r=this.rules.LyricsHeight;i-e<.8&&(r*=.8,s-=.1*r);const o=new g.GraphicalLabel(n,r,b.TextAlignmentEnum.CenterBottom,this.rules);o.setLabelPositionAndShapeBorders(),t.LyricsDashes.push(o),-1===this.staffLinesWithLyricWords.indexOf(t)&&this.staffLinesWithLyricWords.push(t),o.PositionAndShape.Parent=t.PositionAndShape;const a=new f.PointF2D(e+(i-e)/2,s);o.PositionAndShape.RelativePosition=a}calculateLyricExtend(t){let e=t.GraphicalLabel.PositionAndShape.RelativePosition.y;const i=t.StaffEntryParent,s=i.parentMeasure.ParentStaffLine;let n,r;const o=i.parentMeasure.ParentStaff.idInMusicSheet;for(let t=i.parentVerticalContainer.Index+1;t0)break;n=e,r=n.parentMeasure.ParentStaffLine,r||(r=i.parentMeasure.ParentStaffLine)}}if(n&&r)if(s===r&&n.parentMeasure.ParentStaffLine){const r=i.parentMeasure.PositionAndShape.RelativePosition.x+i.PositionAndShape.RelativePosition.x+t.GraphicalLabel.PositionAndShape.BorderMarginRight,o=n.parentMeasure.PositionAndShape.RelativePosition.x+n.PositionAndShape.RelativePosition.x+n.PositionAndShape.BorderMarginRight;e-=t.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(s,r,o,e)}else{const o=s.Measures[s.Measures.length-1].PositionAndShape,a=i.parentMeasure.PositionAndShape.RelativePosition.x+i.PositionAndShape.RelativePosition.x+t.GraphicalLabel.PositionAndShape.BorderMarginRight,l=o.RelativePosition.x+o.Size.width;if(e-=t.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(s,a,l,e),!n)return;if(n.parentMeasure.ParentStaffLine&&n.parentMeasure.staffEntries&&(n!==n.parentMeasure.staffEntries[0]||n.parentMeasure!==n.parentMeasure.ParentStaffLine.Measures[0])){const t=r.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,i=n.parentMeasure.PositionAndShape.RelativePosition.x+n.PositionAndShape.RelativePosition.x+n.PositionAndShape.BorderMarginRight;this.calculateSingleLyricWordWithUnderscore(r,t,i,e)}}}calculateSingleLyricWordWithUnderscore(t,e,i,s){const n=new f.PointF2D(e,s),r=new f.PointF2D(i,s),o=new T.GraphicalLine(n,r,this.rules.LyricUnderscoreLineWidth);o.colorHex=this.rules.DefaultColorLyrics,t.LyricLines.push(o),-1===this.staffLinesWithLyricWords.indexOf(t)&&this.staffLinesWithLyricWords.push(t)}calculateRightAndLeftDashesForLyricWord(t,e,i,s){const n=new I.Label("-");n.colorDefault=this.rules.DefaultColorLyrics;const r=new g.GraphicalLabel(n,this.rules.LyricsHeight,b.TextAlignmentEnum.CenterBottom,this.rules);r.setLabelPositionAndShapeBorders(),t.LyricsDashes.push(r),-1===this.staffLinesWithLyricWords.indexOf(t)&&this.staffLinesWithLyricWords.push(t),r.PositionAndShape.Parent=t.PositionAndShape;const o=new f.PointF2D(e,s);r.PositionAndShape.RelativePosition=o;const a=new I.Label("-"),l=new g.GraphicalLabel(a,this.rules.LyricsHeight,b.TextAlignmentEnum.CenterBottom,this.rules);l.setLabelPositionAndShapeBorders(),t.LyricsDashes.push(l),l.PositionAndShape.Parent=t.PositionAndShape;const h=new f.PointF2D(i,s);return l.PositionAndShape.RelativePosition=h,l.PositionAndShape.RelativePosition.x-r.PositionAndShape.RelativePosition.x}calculateDynamicExpressions(){const t=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,this.rules.MaxMeasureToDrawIndex);for(let e=Math.min(this.rules.MinMeasureToDrawIndex,this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length);e<=t;e++){const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[e];this.dynamicExpressionMap.clear();for(let i=0;i=0;i--)if(this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[i].StaffEntries[e])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[i].StaffEntries[e]}getFirstRightNotNullStaffEntryFromContainer(t,e,i){if(this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[t].StaffEntries[e])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[t].StaffEntries[e];for(let i=t+1;i0||e.StaffLinkedExpressions[i][s].UnknownList.length>0)&&this.calculateMoodAndUnknownExpression(e.StaffLinkedExpressions[i][s],t,i)}}calculateStemDirectionFromVoices(t){if(void 0!==t.ParentSourceStaffEntry.Link)return t===t.ParentSourceStaffEntry.VoiceEntries[0]?void(t.WantedStemDirection=d.StemDirectionType.Up):void(t.WantedStemDirection=d.StemDirectionType.Down);t.ParentVoice instanceof v.LinkedVoice?t.WantedStemDirection=d.StemDirectionType.Down:t.ParentSourceStaffEntry.VoiceEntries.length>1&&(t.WantedStemDirection=d.StemDirectionType.Up)}setBeamNotesWantedStemDirections(t){if(!(t.Notes.length>0))return;const e=t.Notes[0].NoteBeam;if(e)for(const i of e.Notes)if(i.ParentVoiceEntry.WantedStemDirection!==d.StemDirectionType.Undefined&&i.ParentVoiceEntry.ParentSourceStaffEntry.ParentStaff.Id===t.ParentSourceStaffEntry.ParentStaff.Id){t.WantedStemDirection=i.ParentVoiceEntry.WantedStemDirection;break}}}e.MusicSheetCalculator=U},1494:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MusicSheetDrawer=e.LabelRenderSpecs=void 0;const s=i(8911),n=i(8155),r=i(6729),o=i(3278),a=i(9086),l=i(9946),h=i(2255),u=i(556),c=i(1274),d=i(1703),p=i(158),f=i(5074);class m{}e.LabelRenderSpecs=m,e.MusicSheetDrawer=class{constructor(t,e){this.drawableBoundingBoxElement="None",this.skyLineVisible=!1,this.bottomLineVisible=!1,this.needSpecialArrTs=[],this.phonicScoreMode=f.PhonicScoreModes.Manual,this.textMeasurer=t,this.splitScreenLineColor=-1,this.drawingParameters=e,this.rules=e.Rules}set Mode(t){this.phonicScoreMode=t}drawSheet(t){if(this.graphicalMusicSheet=t,this.rules=t.ParentMusicSheet.Rules,this.drawSplitScreenLine(),this.drawingParameters.drawCursors)for(const e of t.Cursors){if(!e)continue;const t=new s.BoundingBox(e);t.AbsolutePosition=e.Start,t.BorderBottom=e.End.y-e.Start.y,t.BorderRight=e.Width/2,t.BorderLeft=-e.Width/2,this.isVisible(t)&&this.drawLineAsVerticalRectangle(e,n.GraphicalLayers.Cursor)}this.drawingParameters.drawScrollIndicator&&this.drawScrollIndicator();const e=Math.min(this.graphicalMusicSheet.MusicPages.length,this.rules.MaxPageToDrawNumber);for(let t=0;tt[0])).filter(Boolean))||[],i=[];let n=!1;for(let r=0;rt.x-e.x)))||void 0===p?void 0:p[0])||void 0===f?void 0:f.measure;break}}}catch(t){console.log("🚀 ~ error",t)}let n=0;n=s?(null===(m=s.stave)||void 0===m?void 0:m.end_x)||0:(null===(g=y.sourceNote.SourceMeasure.VerticalMeasureList[0])||void 0===g?void 0:g.getVFStave()).end_x;const u=0;E.ScreenPosition.x=n,E.ScreenPosition.y=0===e?10*(t.PositionAndShape.Parent.AbsolutePosition.y-3-u):10*e}const M=["C","G","D","A","E","B","F#","C#","G#","F","Bb","Eb","Ab","Db","Gb","Cb","Fb","D#","A#","E#"];M.includes(v.text)&&(E.ScreenPosition.y=10*(t.PositionAndShape.Parent.AbsolutePosition.y+t.PositionAndShape.Parent.BorderTop+t.PositionAndShape.Parent.BorderMarginTop)),["play","listen"].includes(v.text.toLocaleLowerCase())&&v.textAlignment===c.TextAlignmentEnum.LeftBottom&&(E.ScreenPosition.y=10*(t.PositionAndShape.Parent.AbsolutePosition.y-1+t.PositionAndShape.Parent.BorderBottom));const P=["ffp","p-f","sfzp","szf","sffzp"];for(let t=0;t0&&((0,u.isTopFont)(t.Label.textAlignment)||[c.TextAlignmentEnum.CenterBottom].includes(t.Label.textAlignment))){let e=-1,i=!1;for(const s of(null==x?void 0:x.AbstractExpressions)||[])if(s.Label===t?e=null===(b=null==s?void 0:s.parentMeasure)||void 0===b?void 0:b.measureListIndex:(null===(S=s.expression)||void 0===S?void 0:S.TempoInBpm)&&(i=s.expression.TempoInBpm>0),i&&e>-1){E.ScreenPosition.y-=40;break}}this.renderLabel(t,e,E)}calculateLabel(t){var e,i;const s=new m,n=t.Label;s.ScreenPosition=this.applyScreenTransformation(t.PositionAndShape.AbsolutePosition),s.FontHeightInPixel=this.calculatePixelDistance(n.fontHeight);const r=this.calculatePixelDistance(t.PositionAndShape.Size.width);switch(s.BitmapWidth=Math.ceil(r),s.BitmapHeight=t.TextLines?Math.ceil(s.FontHeightInPixel*(.2+t.TextLines.length)):10,n.textAlignment){case c.TextAlignmentEnum.LeftTop:break;case c.TextAlignmentEnum.LeftCenter:s.ScreenPosition.y-=s.BitmapHeight/2;break;case c.TextAlignmentEnum.LeftBottom:s.ScreenPosition.y-=s.BitmapHeight;break;case c.TextAlignmentEnum.CenterTop:s.ScreenPosition.x-=s.BitmapWidth/2;break;case c.TextAlignmentEnum.CenterCenter:s.ScreenPosition.x-=s.BitmapWidth/2,s.ScreenPosition.y-=s.BitmapHeight/2;break;case c.TextAlignmentEnum.CenterBottom:s.ScreenPosition.x-=s.BitmapWidth/2,s.ScreenPosition.y-=s.BitmapHeight,"筒音作5"===n.text&&"jianpu"===this.rules.DYMusicScoreType&&(s.ScreenPosition.x=80);break;case c.TextAlignmentEnum.RightTop:s.ScreenPosition.x-=s.BitmapWidth;break;case c.TextAlignmentEnum.RightCenter:s.ScreenPosition.x-=s.BitmapWidth,s.ScreenPosition.y-=s.BitmapHeight/2;break;case c.TextAlignmentEnum.RightBottom:s.ScreenPosition.x-=s.BitmapWidth,s.ScreenPosition.y-=s.BitmapHeight;break;default:throw new d.ArgumentOutOfRangeException("")}const o=t.PositionAndShape.Parent.DataObject,a=[1,3,7,9,15,20,22,24,28,30,36,41];this.rules.DYMusicScoreId&&"1722157850347765762"===this.rules.DYMusicScoreId&&("."===n.text&&(s.ScreenPosition.x=142,s.ScreenPosition.y=134),"T"===n.text&&(this.needSpecialArrTs.push(s),1===(null===(i=null===(e=null==o?void 0:o.measures)||void 0===e?void 0:e[0])||void 0===i?void 0:i.MeasureNumber)?s.ScreenPosition.y+=20:s.ScreenPosition.y-=20));for(let t in this.needSpecialArrTs)a.includes(Number(t))&&(this.needSpecialArrTs[t].ScreenPosition.x-=20);return s}applyScreenTransformations(t){const e=[];for(const i of t)e.push(this.applyScreenTransformation(i));return e}drawSplitScreenLine(){}renderRectangle(t,e,i,s=void 0,n=1){throw new Error("not implemented")}drawScrollIndicator(){}drawSelectionStartSymbol(t){}drawSelectionEndSymbol(t){}renderLabel(t,e,i){throw new Error("not implemented")}renderSystemToScreen(t,e,i){}drawSkyLine(t){}drawBottomLine(t){}drawInstrumentBrace(t,e){}drawGroupBracket(t,e){}isVisible(t){return!0}drawMusicSystem(t){const e=this.getSystemAbsBoundingRect(t),i=this.getSytemBoundingBoxInPixels(e);this.drawMusicSystemComponents(t,i,e)}getSytemBoundingBoxInPixels(t){const e=this.applyScreenTransformationForRect(t);return e.x=Math.round(e.x),e.y=Math.round(e.y),e}getSystemAbsBoundingRect(t){const e=t.PositionAndShape.BoundingRectangle;return new o.RectangleF2D(t.PositionAndShape.AbsolutePosition.x+t.PositionAndShape.BorderLeft-1,t.PositionAndShape.AbsolutePosition.y+t.PositionAndShape.BorderTop-1,e.width+6,e.height+2)}drawMusicSystemComponents(t,e,i){const s=this.graphicalMusicSheet.SelectionStartSymbol,r=this.graphicalMusicSheet.SelectionEndSymbol;this.drawingParameters.drawSelectionStartSymbol&&void 0!==s&&this.isVisible(s.PositionAndShape)&&this.drawSelectionStartSymbol(s),this.drawingParameters.drawSelectionEndSymbol&&void 0!==r&&this.isVisible(r.PositionAndShape)&&this.drawSelectionEndSymbol(r);for(const e of t.StaffLines)this.drawStaffLine(e),this.rules.RenderLyrics&&(e.LyricsDashes.length>0&&this.drawDashes(e.LyricsDashes),e.LyricLines.length>0&&this.drawLyricLines(e.LyricLines,e));for(const e of t.SystemLines)this.drawSystemLineObject(e);if(this.rules.RenderSystemLabelsAfterFirstPage||t.Parent===t.Parent.Parent.MusicPages[0])for(const e of t.Labels)e.SVGNode=this.drawLabel(e,n.GraphicalLayers.Notes);const o=this.graphicalMusicSheet.ParentMusicSheet.Instruments,a=o.filter((t=>t.Visible)).length;for(const e of t.InstrumentBrackets)this.drawInstrumentBrace(e,t);if(o.length>0)if(a>1)for(const e of t.GroupBrackets)this.drawGroupBracket(e,t);else for(const e of t.GroupBrackets)e.Visible=!1;if(!this.leadSheet)for(const e of t.MeasureNumberLabels)e.SVGNode=this.drawLabel(e,n.GraphicalLayers.Notes);for(const e of t.StaffLines)this.drawStaffLineSymbols(e);this.drawingParameters.drawMarkedAreas&&this.drawMarkedAreas(t)}activateSystemRendering(t,e,i,s){return!0}drawSystemLineObject(t){}drawStaffLine(t){for(const e of t.Measures)this.drawMeasure(e),e.parentSourceMeasure&&(e.parentSourceMeasure.WasRendered=!0);this.rules.RenderLyrics&&t.LyricsDashes.length>0&&this.drawDashes(t.LyricsDashes),this.drawOctaveShifts(t),this.drawPedals(t),this.drawWavyLines(t),this.drawExpressions(t),this.skyLineVisible&&this.drawSkyLine(t),this.bottomLineVisible&&this.drawBottomLine(t)}drawLyricLines(t,e){e.LyricLines.forEach((t=>{t.Start.y+=e.PositionAndShape.AbsolutePosition.y,t.End.y+=e.PositionAndShape.AbsolutePosition.y,t.Start.x+=e.PositionAndShape.AbsolutePosition.x,t.End.x+=e.PositionAndShape.AbsolutePosition.x,this.drawGraphicalLine(t,this.rules.LyricUnderscoreLineWidth,t.colorHex)}))}drawExpressions(t){}drawGraphicalLine(t,e,i="black"){return this.drawLine(t.Start,t.End,i,e)}drawLine(t,e,i="#FF0000FF",s){}drawDashes(t){t.forEach((t=>t.SVGNode=this.drawLabel(t,n.GraphicalLayers.Notes)))}drawOctaveShifts(t){}drawStaffLines(t){if(t.StaffLines){const e=t.PositionAndShape.AbsolutePosition;for(let i=0;i<5;i++)this.drawLineAsHorizontalRectangleWithOffset(t.StaffLines[i],e,n.GraphicalLayers.Notes)}}drawSymbol(t,e,i,s=1,r=n.GraphicalLayers.Notes){}get leadSheet(){return this.graphicalMusicSheet.LeadSheet}set leadSheet(t){this.graphicalMusicSheet.LeadSheet=t}drawPage(t){if(this.isVisible(t.PositionAndShape)){for(const e of t.MusicSystems)this.isVisible(e.PositionAndShape)&&this.drawMusicSystem(e);if(t===t.Parent.MusicPages[0])for(const e of t.Labels)e.SVGNode=this.drawLabel(e,n.GraphicalLayers.Notes);this.drawableBoundingBoxElement&&this.drawBoundingBoxes(t.PositionAndShape,0,this.drawableBoundingBoxElement)}}drawBoundingBoxes(t,e=0,i="all"){const s=t.DataObject.constructor.name;let n=!1;"all"===i&&(n=!0),(n||s===i)&&this.drawBoundingBox(t,void 0,!0,s,e),e++,t.ChildElements.forEach((t=>this.drawBoundingBoxes(t,e,i)))}drawBoundingBox(t,e=void 0,i=!1,s=void 0,u=0){let d=new o.RectangleF2D(t.AbsolutePosition.x+t.BorderMarginLeft,t.AbsolutePosition.y+t.BorderMarginTop,t.BorderMarginRight-t.BorderMarginLeft,t.BorderMarginBottom-t.BorderMarginTop);i&&(this.drawLineAsHorizontalRectangle(new r.GraphicalLine(new a.PointF2D(t.AbsolutePosition.x-1,t.AbsolutePosition.y),new a.PointF2D(t.AbsolutePosition.x+1,t.AbsolutePosition.y),.1,n.OutlineAndFillStyleEnum.BaseWritingColor,e),u-1),this.drawLineAsVerticalRectangle(new r.GraphicalLine(new a.PointF2D(t.AbsolutePosition.x,t.AbsolutePosition.y-1),new a.PointF2D(t.AbsolutePosition.x,t.AbsolutePosition.y+1),.1,n.OutlineAndFillStyleEnum.BaseWritingColor,e),u-1)),d=this.applyScreenTransformationForRect(d);const p=this.renderRectangle(d,n.GraphicalLayers.Background,u,e,.5);if(s){const t=new h.Label(s),e=new m;e.BitmapWidth=d.width,e.BitmapHeight=d.height,e.FontHeightInPixel=d.height,e.ScreenPosition=new a.PointF2D(d.x,d.y+12),this.renderLabel(new l.GraphicalLabel(t,.8,c.TextAlignmentEnum.CenterCenter,this.rules),u,e)}return p}drawMarkedAreas(t){for(const e of t.GraphicalMarkedAreas)e&&(e.systemRectangle&&this.drawRectangle(e.systemRectangle,n.GraphicalLayers.Background),e.settings&&(e.settings.SVGNode=this.drawLabel(e.settings,n.GraphicalLayers.Comment)),e.labelRectangle&&this.drawRectangle(e.labelRectangle,n.GraphicalLayers.Background),e.label&&(e.label.SVGNode=this.drawLabel(e.label,n.GraphicalLayers.Comment)))}drawStaffLineSymbols(t){const e=t.ParentStaff.ParentInstrument,i=t.PositionAndShape.AbsolutePosition.x,s=t.PositionAndShape.AbsolutePosition.y+2,o=t.PositionAndShape.BorderRight;e.highlight&&this.drawingParameters.drawHighlights&&this.drawLineAsHorizontalRectangle(new r.GraphicalLine(new a.PointF2D(i,s),new a.PointF2D(i+o,s),4,n.OutlineAndFillStyleEnum.Highlighted),n.GraphicalLayers.Highlight);let l=f.MusicSymbolDrawingStyle.Disabled,h=p.MusicSymbol.PLAY,u=this.drawingParameters.drawActivitySymbols;switch(this.phonicScoreMode){case f.PhonicScoreModes.Midi:h=p.MusicSymbol.PLAY,this.midiPlaybackAvailable&&t.ParentStaff.audible&&(l=f.MusicSymbolDrawingStyle.PlaybackSymbols);break;case f.PhonicScoreModes.Following:h=p.MusicSymbol.MIC,t.ParentStaff.following&&(l=f.MusicSymbolDrawingStyle.FollowSymbols);break;default:u=!1}if(u){const t=new a.PointF2D(i+o+2,s);this.drawSymbol(h,l,t)}if(this.drawingParameters.drawErrors)for(const e of t.Measures){const t=e.PositionAndShape,i=t.AbsolutePosition.x,s=t.AbsolutePosition.y+2;e.hasError&&this.graphicalMusicSheet.ParentMusicSheet.DrawErroneousMeasures&&this.drawLineAsHorizontalRectangle(new r.GraphicalLine(new a.PointF2D(i,s),new a.PointF2D(i+t.BorderRight,s),4,n.OutlineAndFillStyleEnum.ErrorUnderlay),n.GraphicalLayers.MeasureError)}}}},158:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.MusicSymbol=void 0,(i=e.MusicSymbol||(e.MusicSymbol={}))[i.Unused_first_Symbol=0]="Unused_first_Symbol",i[i.BLACK_HEAD=1]="BLACK_HEAD",i[i.UPWARDS_TAIL=2]="UPWARDS_TAIL",i[i.DOWNWARDS_TAIL=3]="DOWNWARDS_TAIL",i[i.UPWARDS_DOUBLE_TAIL=4]="UPWARDS_DOUBLE_TAIL",i[i.DOWNWARDS_DOUBLE_TAIL=5]="DOWNWARDS_DOUBLE_TAIL",i[i.UPWARDS_TRIPLE_TAIL=6]="UPWARDS_TRIPLE_TAIL",i[i.DOWNWARDS_TRIPLE_TAIL=7]="DOWNWARDS_TRIPLE_TAIL",i[i.UPWARDS_QUAD_TAIL=8]="UPWARDS_QUAD_TAIL",i[i.DOWNWARDS_QUAD_TAIL=9]="DOWNWARDS_QUAD_TAIL",i[i.ROUND_HEAD=10]="ROUND_HEAD",i[i.WHITE_HEAD=11]="WHITE_HEAD",i[i.G_CLEF=12]="G_CLEF",i[i.F_CLEF=13]="F_CLEF",i[i.C_CLEF=14]="C_CLEF",i[i.BREVE=15]="BREVE",i[i.BREVE_REST=16]="BREVE_REST",i[i.COMMON_TIME=17]="COMMON_TIME",i[i.CUT_TIME=18]="CUT_TIME",i[i.WHOLE_REST=19]="WHOLE_REST",i[i.HALF_REST=20]="HALF_REST",i[i.QUARTER_REST=21]="QUARTER_REST",i[i.EIGHTH_REST=22]="EIGHTH_REST",i[i.SIXTEENTH_REST=23]="SIXTEENTH_REST",i[i.THIRTYSECOND_REST=24]="THIRTYSECOND_REST",i[i.SIXTYFOURTH_REST=25]="SIXTYFOURTH_REST",i[i.FLAT=26]="FLAT",i[i.SHARP=27]="SHARP",i[i.NATURAL=28]="NATURAL",i[i.DOUBLE_FLAT=29]="DOUBLE_FLAT",i[i.DOUBLE_SHARP=30]="DOUBLE_SHARP",i[i.ZERO=31]="ZERO",i[i.ONE=32]="ONE",i[i.TWO=33]="TWO",i[i.THREE=34]="THREE",i[i.FOUR=35]="FOUR",i[i.FIVE=36]="FIVE",i[i.SIX=37]="SIX",i[i.SEVEN=38]="SEVEN",i[i.EIGHT=39]="EIGHT",i[i.NINE=40]="NINE",i[i.DOT=41]="DOT",i[i.FERMATA=42]="FERMATA",i[i.INVERTED_FERMATA=43]="INVERTED_FERMATA",i[i.SPICCATO=44]="SPICCATO",i[i.TENUTO=45]="TENUTO",i[i.MARCATO=46]="MARCATO",i[i.MARCATISSIMO=47]="MARCATISSIMO",i[i.INVERTED_MARCATISSIMO=48]="INVERTED_MARCATISSIMO",i[i.P=49]="P",i[i.F=50]="F",i[i.S=51]="S",i[i.Z=52]="Z",i[i.M=53]="M",i[i.R=54]="R",i[i.SEGNO=55]="SEGNO",i[i.CODA=56]="CODA",i[i.DRUM_CLEF=57]="DRUM_CLEF",i[i.G_CLEF_SUB8=58]="G_CLEF_SUB8",i[i.G_CLEF_SUPER8=59]="G_CLEF_SUPER8",i[i.G_CLEF_SUB15=60]="G_CLEF_SUB15",i[i.G_CLEF_SUPER15=61]="G_CLEF_SUPER15",i[i.F_CLEF_SUB8=62]="F_CLEF_SUB8",i[i.F_CLEF_SUPER8=63]="F_CLEF_SUPER8",i[i.F_CLEF_SUB15=64]="F_CLEF_SUB15",i[i.F_CLEF_SUPER15=65]="F_CLEF_SUPER15",i[i.DOWN_BOW=66]="DOWN_BOW",i[i.MORDENT=67]="MORDENT",i[i.INVERTED_MORDENT=68]="INVERTED_MORDENT",i[i.TURN=69]="TURN",i[i.INVERTED_TURN=70]="INVERTED_TURN",i[i.LEFTHAND_PIZZICATO=71]="LEFTHAND_PIZZICATO",i[i.RELEASE_PED=72]="RELEASE_PED",i[i.ENGAGE_PED=73]="ENGAGE_PED",i[i.VA8=74]="VA8",i[i.VB8=75]="VB8",i[i.TRILL=76]="TRILL",i[i.MA15=77]="MA15",i[i.MB15=78]="MB15",i[i.HIGH=79]="HIGH",i[i.PLAY=80]="PLAY",i[i.MIC=81]="MIC",i[i.SNAP_PIZZICATO=82]="SNAP_PIZZICATO",i[i.NATURAL_HARMONIC=83]="NATURAL_HARMONIC",i[i.EditPen=84]="EditPen",i[i.PEDAL_BRACKET=85]="PEDAL_BRACKET",i[i.PEDAL_MIXED=86]="PEDAL_MIXED",i[i.PEDAL_SYMBOL=87]="PEDAL_SYMBOL"},7142:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MusicSystem=void 0;const n=i(6842),r=i(8911),o=i(1797),a=i(1274),l=i(9946),h=i(4785),u=i(9086),c=i(6894),d=s(i(8805)),p=i(1225),f=i(2255);class m extends h.GraphicalObject{constructor(t){super(),this.needsToBeRedrawn=!0,this.staffLines=[],this.graphicalMeasures=[],this.labels=new d.default,this.measureNumberLabels=[],this.objectsToRedraw=[],this.instrumentBrackets=[],this.groupBrackets=[],this.graphicalMarkedAreas=[],this.systemLines=[],this.breaksPage=!1,this.id=t,this.boundingBox=new r.BoundingBox(this),this.maxLabelLength=0}get Parent(){return this.parent}set Parent(t){if(this.parent){const t=this.parent.MusicSystems.indexOf(this,0);t>-1&&this.parent.MusicSystems.splice(t,1)}this.parent=t,this.boundingBox.Parent=t.PositionAndShape}get NextSystem(){const t=this.Parent.MusicSystems.indexOf(this);return t!==this.Parent.MusicSystems.length?this.Parent.MusicSystems[t+1]:void 0}get StaffLines(){return this.staffLines}get GraphicalMeasures(){return this.graphicalMeasures}get MeasureNumberLabels(){return this.measureNumberLabels}get Labels(){return this.labels.values()}get ObjectsToRedraw(){return this.objectsToRedraw}get InstrumentBrackets(){return this.instrumentBrackets}get GroupBrackets(){return this.groupBrackets}get GraphicalMarkedAreas(){return this.graphicalMarkedAreas}get SystemLines(){return this.systemLines}get Id(){return this.id}createSystemLeftLine(t,e,i){let s=-t/2;i&&(s=this.maxLabelLength+e-t/2);const n=this.staffLines[0].Measures[0];let r;this.staffLines.length>1&&(r=this.staffLines[this.staffLines.length-1].Measures[0]);const o=this.createSystemLine(s,t,c.SystemLinesEnum.SingleThin,p.SystemLinePosition.MeasureBegin,this,n,r);this.SystemLines.push(o),o.PositionAndShape.RelativePosition=new u.PointF2D(s,0),o.PositionAndShape.BorderLeft=0,o.PositionAndShape.BorderRight=t,o.PositionAndShape.BorderTop=o.PositionAndShape.Parent.BorderTop,o.PositionAndShape.BorderBottom=o.PositionAndShape.Parent.BorderBottom,this.createLinesForSystemLine(o)}createVerticalLineForMeasure(t,e,i,s,n,r){const o=r.ParentStaffLine,a=new u.PointF2D(o.PositionAndShape.RelativePosition.x,o.PositionAndShape.RelativePosition.y),l=o.ParentStaff.ParentInstrument.Staves;if(o.ParentStaff===l[0]){let h;l.length>1&&(h=this.getBottomStaffLine(o).Measures[n]);const c=this.createSystemLine(t,e,i,s,this,r,h),d=a.x+t;c.PositionAndShape.RelativePosition=new u.PointF2D(d,0),c.PositionAndShape.BorderLeft=0,c.PositionAndShape.BorderRight=e,this.SystemLines.push(c)}}setYPositionsToVerticalLineObjectsAndCreateLines(t){}calculateBorders(t){}alignBeginInstructions(){}GetLeftBorderAbsoluteXPosition(){return this.StaffLines[0].PositionAndShape.AbsolutePosition.x+this.StaffLines[0].Measures[0].beginInstructionsWidth}GetRightBorderAbsoluteXPosition(){return this.StaffLines[0].PositionAndShape.AbsolutePosition.x+this.StaffLines[0].StaffLines[0].End.x}AddGraphicalMeasures(t){for(let e=0,i=t.length;e1){let t,e;for(let s=0,n=this.staffLines.length;sthis.maxLabelLength&&(this.maxLabelLength=i.PositionAndShape.Size.width,e=r)}this.updateMusicSystemStaffLineXPosition(e)}setMusicSystemLabelsYPosition(){this.labels.forEach(((t,e)=>{let i=0,s=0;for(let e=0;e0&&(e.PositionAndShape.RelativePosition=new u.PointF2D(0,i/s+2))}))}checkStaffEntriesForStaffEntryLink(){let t=!1,e=!1;for(let i=0;i=0;i--){if(e=t.InstrumentalGroups[i],!(e instanceof n.Instrument))return this.findLastVisibleInstrumentInInstrumentalGroup(e);if(!0===e.Visible)return e}}updateMusicSystemStaffLineXPosition(t){for(let e=0,i=this.StaffLines.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureBuildParameters=e.SystemBuildParameters=e.MusicSystemBuilder=void 0;const s=i(599),n=i(3331),r=i(5198),o=i(289),a=i(9086),l=i(6729),h=i(6894),u=i(4040),c=i(289),d=i(2337),p=i(1225),f=i(2343);e.MusicSystemBuilder=class{constructor(){this.musicSystems=[],this.globalSystemIndex=0,this.leadSheet=!1}initialize(t,e,i){this.leadSheet=t.LeadSheet,this.graphicalMusicSheet=t,this.rules=this.graphicalMusicSheet.ParentMusicSheet.Rules,this.measureList=e,this.numberOfVisibleStaffLines=i,this.activeRhythm=new Array(this.numberOfVisibleStaffLines),this.activeKeys=new Array(this.numberOfVisibleStaffLines),this.activeClefs=new Array(this.numberOfVisibleStaffLines),this.initializeActiveInstructions(this.measureList[0])}buildMusicSystems(){var t,e,i;const s=this.getFullPageSystemWidth();let n=!1;this.measureListIndex=0,this.currentSystemParams=new m,this.currentSystemParams.currentSystem=this.initMusicSystem();let r=0,o=0;for(;this.measureListIndex0){if(this.rules.MaxSystemToDrawNumber===this.musicSystems.length)return this.finalizeCurrentSystem(this.measureList[this.measureList.length-1],!this.rules.StretchLastSystemLine,!1),this.musicSystems;this.finalizeCurrentAndCreateNewSystem(this.measureList[this.measureList.length-1],!this.rules.StretchLastSystemLine,!1)}return this.musicSystems}calculateSystemYLayout(){for(const t of this.musicSystems)this.optimizeDistanceBetweenStaffLines(t);this.calculateMusicSystemsRelativePositions()}setMeasureWidth(t,e,i,s){for(let n=0,r=t.length;n0&&(r.beginInstructionsWidth=i),s>0&&(r.endInstructionsWidth=s)}}finalizeCurrentAndCreateNewSystem(t,e=!1,i=!0,s=!1){this.finalizeCurrentSystem(t,e,i,s),this.currentSystemParams=new m,void 0!==t&&this.measureListIndex=1){const e=this.currentSystemParams.currentSystem.GraphicalMeasures[this.currentSystemParams.currentSystem.GraphicalMeasures.length-1];let i=0;const s=t[t.length-1];s.endLine===h.SystemLinesEnum.DotsBoldBoldDots&&(s.endLine=h.SystemLinesEnum.DotsThinBold,i=e[0].getLineWidth(h.SystemLinesEnum.DotsBoldBoldDots)/2-e[0].getLineWidth(h.SystemLinesEnum.DotsThinBold)),this.currentSystemParams.currentSystemFixWidth-=i;for(let t=0,s=e.length;t1){r=!0;break}let o=0;for(let e=0;e=0&&this.measureList[s]){const e=null===(p=this.measureList[s][0])||void 0===p?void 0:p.parentSourceMeasure;(null==e?void 0:e.ImplicitMeasure)&&(null==e?void 0:e.RhythmPrinted)&&(t=!1)}t&&(e.addRhythmAtBegin(g,i),e.parentSourceMeasure.RhythmPrinted=g,E=!0)}return(y||v||E)&&(b+=e.beginInstructionsWidth,E&&(b+=this.rules.RhythmRightMargin)),b}addInstructionsAtMeasureEnd(t,e,i){if(!t||!t.Instructions||0===t.Instructions.length)return 0;for(let s=0,n=t.Instructions.length;s0&&(this.currentSystemParams.systemMeasures.push({beginLine:h.SystemLinesEnum.None,endLine:h.SystemLinesEnum.None}),this.currentSystemParams.currentWidth+=s,this.currentSystemParams.currentSystemFixWidth+=s)}addExtraInstructionMeasure(t,e,i){const s=this.currentSystemParams.currentSystem,n=u.MusicSheetCalculator.symbolFactory.createExtraGraphicalMeasure(s.StaffLines[t]);[].push(n),e&&n.addKeyAtBegin(e,this.activeKeys[t],this.activeClefs[t]),void 0!==i&&i.PrintObject&&n.addRhythmAtBegin(i),n.PositionAndShape.BorderLeft=0,n.PositionAndShape.BorderTop=0,n.PositionAndShape.BorderBottom=this.rules.StaffHeight;const r=this.rules.MeasureLeftMargin+n.beginInstructionsWidth+this.rules.MeasureRightMargin;return n.PositionAndShape.BorderRight=r,s.StaffLines[t].Measures.push(n),r}addStaveMeasuresToSystem(t){if(t[0]){const e=[];for(let i=0;i1){const t=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,i.measureListIndex+i.multipleRestMeasures-1);i=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[t]}}finally{}const s=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures,n=s[this.measureListIndex];let r=!1;return n.allRests&&(r=null===(e=null===(t=s[this.measureListIndex+n.multipleRestMeasures-1])||void 0===t?void 0:t.endsWithLineRepetition)||void 0===e?void 0:e.call(t)),this.nextMeasureBeginsLineRepetition()&&this.thisMeasureEndsLineRepetition()?h.SystemLinesEnum.DotsBoldBoldDots:this.thisMeasureEndsLineRepetition()||r?h.SystemLinesEnum.DotsThinBold:this.nextMeasureHasKeyInstructionChange()||this.thisMeasureEndsWordRepetition()||this.nextMeasureBeginsWordRepetition()?h.SystemLinesEnum.DoubleThin:i&&void 0!==i.endingBarStyleEnum?i.endingBarStyleEnum:h.SystemLinesEnum.SingleThin}getLineWidth(t,e,i){let s=t.getLineWidth(e);return e===h.SystemLinesEnum.DotsBoldBoldDots&&(s/=2),i&&e===h.SystemLinesEnum.BoldThinDots&&(s+=this.rules.DistanceBetweenLastInstructionAndRepetitionBarline),s}previousMeasureEndsLineRepetition(){if(0===this.measureListIndex)return!1;for(let t=0,e=this.measureList[this.measureListIndex-1].length;t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||!this.measureList[t])return!1;for(let e=0,i=this.measureList[t].length;e=n))break;e=s,n=s.multipleRestMeasureNumber}return e.endsWithLineRepetition()}}return!1}nextMeasureBeginsWordRepetition(){const t=this.measureListIndex+1;if(t>=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||t>this.measureList.length-1)return!1;for(let e=0,i=this.measureList[t].length;e1)for(let t=1;tr&&(r=s)}for(let o=0;othis.rules.PageHeight-this.rules.PageBottomMargin&&(n++,n<=4&&console.log(`warning: could not fit a single system on page ${e.PageNumber} and measure number ${s.GraphicalMeasures[0][0].MeasureNumber}.\n The PageFormat may be too small for this sheet."\n Will not give further warnings for all pages, only total.`))}else{const n=this.musicSystems[o-1],l=n.StaffLines[n.StaffLines.length-1],h=l.PositionAndShape;let u=this.findRequiredDistanceWithSkyBottomLine(n,s);u=Math.max(r,u),u+=this.rules.MinSkyBottomDistBetweenSystems,"GYM"===(null===(t=null===window||void 0===window?void 0:window.appName)||void 0===t?void 0:t.toLocaleUpperCase())&&(u=u<16?16:u);const c=this.hasExpressionCounts(s);c.TempoCount>0&&this.rules.MetronomeMarksDrawn&&(u+=2),c.OtherCount>0&&this.rules.MetronomeMarksDrawn&&(u+=2),u=Math.max(u,this.rules.MinimumDistanceBetweenSystems+l.StaffHeight);const d=i+h.RelativePosition.y+u,p=d+s.PositionAndShape.BorderMarginBottom;if(this.rules.NewPageAtXMLNewPageAttribute&&n.breaksPage||!(p0&&console.log(`total amount of pages that couldn't fit a single music system: ${n} of ${e.PageNumber}`)}findRequiredDistanceWithSkyBottomLine(t,e){const i=t.StaffLines[t.StaffLines.length-1],s=e.StaffLines[0],n=i.BottomLine,r=s.SkyLine,o=i.PositionAndShape,a=s.PositionAndShape,l=1/this.rules.SamplingUnit;let h=0;for(let t=0;t=r.length)break;const s=Math.max(0,i-6),u=Math.min(r.length-1,i+6);let c=0;for(let t=s;t<=u;t++)c=Math.min(c,r[t]);const d=e-c;h=Math.max(d,h)}return 0===h&&(h=o.BorderBottom-a.BorderTop),h}};class m{constructor(){this.systemMeasures=[],this.systemMeasureIndex=0,this.currentWidth=0,this.currentSystemFixWidth=0,this.currentSystemVarWidth=0,this.maxLabelLength=0}IsSystemStartMeasure(){return 0===this.systemMeasureIndex}}e.SystemBuildParameters=m,e.MeasureBuildParameters=class{}},4574:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OctaveShiftParams=void 0,e.OctaveShiftParams=class{constructor(t,e,i){this.getOpenOctaveShift=t,this.getAbsoluteStartTimestamp=e,this.getAbsoluteEndTimestamp=i}}},9067:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionEndSymbol=void 0;const s=i(4785),n=i(8155),r=i(9086),o=i(8911),a=i(6729),l=i(2337);class h extends s.GraphicalObject{constructor(t,e){super();const i=e,s=t.PositionAndShape.AbsolutePosition.y,h=l.CollectionUtil.last(t.StaffLines).PositionAndShape.RelativePosition.y+4;this.verticalLine=new a.GraphicalLine(new r.PointF2D(i,s),new r.PointF2D(i,s+h),.4,n.OutlineAndFillStyleEnum.SelectionSymbol);for(let e=0,n=t.StaffLines.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionStartSymbol=void 0;const s=i(9086),n=i(8155),r=i(6729),o=i(4785),a=i(8911),l=i(2337);class h extends o.GraphicalObject{constructor(t,e){super();const i=e,o=t.PositionAndShape.AbsolutePosition.y,h=l.CollectionUtil.last(t.StaffLines).PositionAndShape.RelativePosition.y+4;this.verticalLine=new r.GraphicalLine(new s.PointF2D(i,o),new s.PointF2D(i,o+h),.4,n.OutlineAndFillStyleEnum.SelectionSymbol);for(let e=0,n=t.StaffLines.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SkyBottomLineCalculationResult=void 0,e.SkyBottomLineCalculationResult=class{constructor(t,e){this.skyLine=t,this.bottomLine=e}}},6040:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SkyBottomLineCalculator=void 0;i(9086);const n=i(5820),r=s(i(2043)),o=i(1378),a=i(4028);e.SkyBottomLineCalculator=class{constructor(t){this.mStaffLineParent=t,this.mRules=t.ParentMusicSystem.rules}updateLines(t){const e=this.StaffLineParent.Measures;if(t.length!==e.length)if(r.default.warn("SkyBottomLineCalculator: lengths of calculation result array and measure array do not match"),t.length(t-h)/n.unitInPixels+this.StaffLineParent.TopLineOffset));const u=Math.min(...this.mBottomLine);this.mBottomLine=this.mBottomLine.map((t=>(t-u)/n.unitInPixels+this.StaffLineParent.BottomLineOffset))}calculateLines(){const t=Math.max(Math.ceil(this.StaffLineParent.PositionAndShape.Size.width*this.SamplingUnit),1);this.mSkyLine=[],this.mBottomLine=[];const e=new a.CanvasVexFlowBackend(this.StaffLineParent.ParentMusicSystem.rules);for(const t of this.StaffLineParent.Measures){t.PositionAndShape.calculateAbsolutePositionsRecursive(0,0);const i=t.getVFStave();let s=i.getWidth();if(s>0||t.IsExtraGraphicalMeasure||(r.default.warn("SkyBottomLineCalculator: width not > 0 in measure "+t.MeasureNumber),s=50),!(s>=50)&&t.IsExtraGraphicalMeasure)continue;e.initializeHeadless(s);const n=e.getContext(),o=e.getCanvas();s=o.width;const a=o.height;"jianpu"===this.mRules.DYMusicScoreType||i.setY(i.y+100);const l=i.getWidth();i.setWidth(s),t.format(),i.setWidth(l);try{t.draw(n)}catch(t){r.default.warn("SkyBottomLineCalculator.calculateLines.draw",t)}const h=n.getImageData(0,0,s,a),u=4,c=Math.max(Math.ceil(t.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),d=new Array(c),p=new Array(c);for(let t=0;t0){d[t]=e;break}}for(let e=a;e>0;e--){const i=e*s*u+t*u;if(h.data[i+3]>0){p[t]=e;break}}}for(let t=0;t(t-Math.max(...this.mSkyLine))/n.unitInPixels+this.StaffLineParent.TopLineOffset)),this.mBottomLine=this.mBottomLine.map((t=>(t-Math.min(...this.mBottomLine))/n.unitInPixels+this.StaffLineParent.BottomLineOffset))}updateSkyLineWithLine(t,e,i){const s=Math.floor(t.x*this.SamplingUnit),n=Math.ceil(e.x*this.SamplingUnit);for(let t=s+1;t=this.BottomLine.length&&(i=this.BottomLine.length-1),s<0&&(s=0),s>=this.BottomLine.length&&(s=this.BottomLine.length),this.SkyLine[i]=t.y;for(let t=i+1;t=this.BottomLine.length&&(i=this.BottomLine.length-1),s<0&&(s=0),s>=this.BottomLine.length&&(s=this.BottomLine.length),this.BottomLine[i]=t.y;for(let t=i+1;tt))}setBottomLineWithValue(t){this.BottomLine.forEach((e=>t))}getLeftIndexForPointX(t,e){const i=Math.floor(t*this.SamplingUnit);return i<0?0:i>=e?e-1:i}getRightIndexForPointX(t,e){const i=Math.ceil(t*this.SamplingUnit);return i<0?0:i>=e?e-1:i}updateStaffLineBorders(){this.mStaffLineParent.PositionAndShape.BorderTop=this.getSkyLineMin(),this.mStaffLineParent.PositionAndShape.BorderMarginTop=this.getSkyLineMin(),this.mStaffLineParent.PositionAndShape.BorderBottom=this.getBottomLineMax(),this.mStaffLineParent.PositionAndShape.BorderMarginBottom=this.getBottomLineMax()}getSkyLineMin(){return Math.min(...this.SkyLine.filter((t=>!isNaN(t))))}getSkyLineMinAtPoint(t){const e=Math.round(t*this.SamplingUnit);return this.mSkyLine[e]}getSkyLineMinInRange(t,e){return this.getMinInRange(this.SkyLine,t,e)}getBottomLineMax(){return Math.max(...this.BottomLine.filter((t=>!isNaN(t))))}getBottomLineMaxAtPoint(t){const e=Math.round(t*this.SamplingUnit);return this.mBottomLine[e]}getBottomLineMaxInRange(t,e){return this.getMaxInRange(this.BottomLine,t,e)}getBottomLineMaxInBoundingBox(t){const e=Math.floor(t.AbsolutePosition.x+t.BorderLeft),i=Math.ceil(t.AbsolutePosition.x+t.BorderRight);return this.getMaxInRange(this.mBottomLine,e,i)}updateWithBoundingBoxRecursively(t){if(t.ChildElements&&t.ChildElements.length>0)for(const e of t.ChildElements)this.updateWithBoundingBoxRecursively(e);else{const e=t.BorderTop+t.AbsolutePosition.y,i=t.BorderBottom+t.AbsolutePosition.y;if(e<0){const i=Math.floor(t.AbsolutePosition.x+t.BorderLeft),s=Math.ceil(t.AbsolutePosition.x+t.BorderRight);this.updateInRange(this.mSkyLine,i,s,e)}else if(i>this.StaffLineParent.StaffHeight){const e=Math.floor(t.AbsolutePosition.x+t.BorderLeft),s=Math.ceil(t.AbsolutePosition.x+t.BorderRight);this.updateInRange(this.mBottomLine,e,s,i)}}}findPreviousValidNumber(t,e){for(let i=t;i>=0;i--)if(!isNaN(e[i]))return e[i];return 0}findNextValidNumber(t,e){if(t>=e.length)return e[t-1];for(let i=t;it.length&&(i=t.length);for(let n=e;nMath.abs(t[n])?s:t[n]}setInRange(t,e=0,i=t.length,s=0){if(e=Math.floor(e*this.SamplingUnit),(i=Math.ceil(i*this.SamplingUnit))t.length&&(i=t.length);for(let n=e;n=t.length&&(e=t.length-1),i<0&&(i=0),i>=t.length&&(i=t.length),e>=0&&i<=t.length?Math.min(...t.slice(e,i+1)):void 0):Number.MAX_VALUE}getMaxInRange(t,e,i){return e=Math.floor(e*this.SamplingUnit),i=Math.ceil(i*this.SamplingUnit),t?(e<0&&(e=0),e>=t.length&&(e=t.length-1),i<0&&(i=0),i>=t.length&&(i=t.length),e>=0&&i<=t.length?Math.max(...t.slice(e,i+1)):void 0):Number.MIN_VALUE}get SamplingUnit(){return this.mRules.SamplingUnit}get StaffLineParent(){return this.mStaffLineParent}get SkyLine(){return this.mSkyLine}get BottomLine(){return this.mBottomLine}}},8965:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SkyBottomLineCalculatorSVG=void 0;const n=i(6040),r=s(i(8011)),o=i(5820),a=i(9505);class l extends n.SkyBottomLineCalculator{recursiveUpdate(t,e,i,s){const n=t.getBBox(),a=n.y/o.unitInPixels,l=n.height/o.unitInPixels+a,[h,u]=s;if(ae.bottom)switch(t.tagName.toLowerCase()){case"g":for(const n of t.children)this.recursiveUpdate(n,e,i,s);break;case"circle":case"rect":case"line":case"path":let c=Math.floor((n.x-i.x)/o.unitInPixels*this.mRules.SamplingUnit);const d=c+Math.ceil(n.width/o.unitInPixels*this.mRules.SamplingUnit);if(t.parentElement.classList.contains("vf-beams")&&t.hasAttribute("d")){const e=(0,r.default)(t.getAttribute("d"));if(5===e.length){const t=e[0],i=e[3],s=(i.end.y-t.end.y)/(i.end.x-t.end.x);let n=t.end.y/o.unitInPixels;for(;c<=d;c++)nu[c]&&(u[c]=n),n+=s/this.mRules.SamplingUnit}}else for(;c<=d;c++)au[c]&&(u[c]=l)}}calculateLinesForMeasure(t,e){var i,s,n;const r=e.getBBox(),a=Math.max(Math.round(t.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),l=r.height/o.unitInPixels,h=e.getElementsByClassName("vf-stave")[0].getBBox();let u=(null==h?void 0:h.height)/o.unitInPixels,c=(null==h?void 0:h.y)/o.unitInPixels;const d=t.getVFStave();let p=((null===(i=d.options)||void 0===i?void 0:i.num_lines)?d.options.num_lines:5)-1,f=-1,m=0;const g=[p];for(const t of null===(s=d.options)||void 0===s?void 0:s.line_config)t.visible?(-1===f&&(f=m),g.push(m)):p--,m++;-1===f&&(f=0),p=g.pop()-f;const b=null===(n=d.options)||void 0===n?void 0:n.spacing_between_lines_px,S=p*b/o.unitInPixels;u-S>.2&&(u=S,c=f*b/o.unitInPixels);const y=c+u,v=new Array(a).fill(c),E=new Array(a).fill(y),_=[v,E];if(l>u)for(const t of e.children)this.recursiveUpdate(t,{top:c,bottom:y},r,[v,E]);return _}calculateLines(){this.mSkyLine=[],this.mBottomLine=[];const t=document.createElement("div");document.body.append(t);const e=new a.SvgVexFlowBackend(this.mRules);e.initialize(t,1,"0");const i=e.getContext(),s=i.openGroup();s.classList.add("staffline");for(const t of this.StaffLineParent.Measures){t.PositionAndShape.calculateAbsolutePositionsRecursive(0,0),t.setAbsoluteCoordinates(t.PositionAndShape.AbsolutePosition.x*o.unitInPixels,t.PositionAndShape.AbsolutePosition.y*o.unitInPixels);const e=t.draw(i),[s,n]=this.calculateLinesForMeasure(t,e);this.mSkyLine.push(...s),this.mBottomLine.push(...n)}i.closeGroup();for(const t of s.getElementsByClassName("vf-ties"))for(const e of t.childNodes)if("path"===e.nodeName.toLowerCase()){const t=e.getBBox();let i=Math.floor(t.x/o.unitInPixels*this.mRules.SamplingUnit);const s=i+Math.ceil(t.width/o.unitInPixels*this.mRules.SamplingUnit),n=t.y/o.unitInPixels,r=t.height/o.unitInPixels+n;for(;i<=s;i++)nthis.mBottomLine[i]&&(this.mBottomLine[i]=r)}e.clear(),t.remove()}}e.SkyBottomLineCalculatorSVG=l},9953:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaffLine=void 0;const s=i(8911),n=i(4785),r=i(4196),o=i(9086),a=i(4040);class l extends n.GraphicalObject{constructor(t,e){super(),this.measures=[],this.staffLines=new Array(5),this.octaveShifts=[],this.lyricLines=[],this.lyricsDashes=[],this.abstractExpressions=[],this.graphicalSlurs=[],this.graphicalGlissandi=[],this.Pedals=[],this.WavyLines=[],this.parentMusicSystem=t,this.parentStaff=e,this.boundingBox=new s.BoundingBox(this,t.PositionAndShape),this.skyBottomLine=a.MusicSheetCalculator.symbolFactory.createSkyBottomLineCalculator(this),this.staffHeight=this.parentMusicSystem.rules.StaffHeight,this.topLineOffset=0,this.bottomLineOffset=4,this.calculateStaffLineOffsets()}calculateStaffLineOffsets(){if(this.ParentStaff.isTab)5===this.ParentStaff.StafflineCount?this.staffHeight=this.bottomLineOffset=6*this.ParentStaff.ParentInstrument.GetMusicSheet.Rules.TabStaffInterlineHeight:this.staffHeight=this.bottomLineOffset=this.ParentStaff.ParentInstrument.GetMusicSheet.Rules.TabStaffInterlineHeight*this.ParentStaff.StafflineCount;else switch(this.ParentStaff.StafflineCount){case 4:this.bottomLineOffset=1;break;case 3:this.topLineOffset=1,this.bottomLineOffset=1;break;case 2:this.topLineOffset=2,this.bottomLineOffset=1;break;case 1:this.topLineOffset=2,this.bottomLineOffset=2}}get Measures(){return this.measures}set Measures(t){this.measures=t}get StaffLines(){return this.staffLines}set StaffLines(t){this.staffLines=t}get Index(){return this.parentMusicSystem.StaffLines.indexOf(this)}get NextStaffLine(){const t=this.Index;return t!==this.parentMusicSystem.StaffLines.length?this.parentMusicSystem.StaffLines[t+1]:void 0}get LyricLines(){return this.lyricLines}get AbstractExpressions(){return this.abstractExpressions}set AbstractExpressions(t){this.abstractExpressions=t}set LyricLines(t){this.lyricLines=t}get LyricsDashes(){return this.lyricsDashes}set LyricsDashes(t){this.lyricsDashes=t}get ParentMusicSystem(){return this.parentMusicSystem}set ParentMusicSystem(t){this.parentMusicSystem=t}get ParentStaff(){return this.parentStaff}set ParentStaff(t){this.parentStaff=t}get SkyBottomLineCalculator(){return this.skyBottomLine}get SkyLine(){return this.skyBottomLine.SkyLine}get BottomLine(){return this.skyBottomLine.BottomLine}get OctaveShifts(){return this.octaveShifts}set OctaveShifts(t){this.octaveShifts=t}get StaffHeight(){return this.staffHeight}get TopLineOffset(){return this.topLineOffset}get BottomLineOffset(){return this.bottomLineOffset}get GraphicalSlurs(){return this.graphicalSlurs}get GraphicalGlissandi(){return this.graphicalGlissandi}addSlurToStaffline(t){this.graphicalSlurs.push(t)}addGlissandoToStaffline(t){this.graphicalGlissandi.push(t),t.StaffLine=this}addActivitySymbolClickArea(){const t=new r.StaffLineActivitySymbol(this),e=this.PositionAndShape;t.PositionAndShape.RelativePosition=new o.PointF2D(e.RelativePosition.x+e.BorderRight+.5,e.RelativePosition.y+.5),t.PositionAndShape.Parent=this.parentMusicSystem.PositionAndShape}isPartOfMultiStaffInstrument(){return this.parentStaff.ParentInstrument.Staves.length>1}findClosestStaffEntry(t){let e;for(let i=0,s=this.Measures.length;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaffLineActivitySymbol=void 0;const s=i(4785),n=i(8911);class r extends s.GraphicalObject{constructor(t){super(),this.parentStaffLine=t;const e=t.PositionAndShape;this.boundingBox=new n.BoundingBox(this,e),this.boundingBox.BorderRight=6,this.boundingBox.BorderBottom=4.5,this.boundingBox.BorderLeft=-1.5,this.boundingBox.BorderTop=-1.5}}e.StaffLineActivitySymbol=r},7771:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemLine=void 0;const s=i(6894),n=i(8911),r=i(4785);class o extends r.GraphicalObject{constructor(t,e,i,s,r=void 0){super(),this.lineType=t,this.linePosition=e,this.parentMusicSystem=i,this.topMeasure=s,this.bottomMeasure=r,this.parentTopStaffLine=null==s?void 0:s.ParentStaffLine,this.boundingBox=new n.BoundingBox(this,i.PositionAndShape)}static getObjectWidthForLineType(t,e){switch(e){case s.SystemLinesEnum.SingleThin:return t.SystemThinLineWidth;case s.SystemLinesEnum.DoubleThin:return 2*t.SystemThinLineWidth+t.DistanceBetweenVerticalSystemLines;case s.SystemLinesEnum.ThinBold:return t.SystemThinLineWidth+t.SystemBoldLineWidth+t.DistanceBetweenVerticalSystemLines;case s.SystemLinesEnum.BoldThinDots:case s.SystemLinesEnum.DotsThinBold:return t.SystemThinLineWidth+t.SystemBoldLineWidth+t.DistanceBetweenVerticalSystemLines+t.SystemDotWidth+t.DistanceBetweenDotAndLine;case s.SystemLinesEnum.DotsBoldBoldDots:return 2*t.SystemBoldLineWidth+2*t.SystemDotWidth+2*t.DistanceBetweenDotAndLine+t.DistanceBetweenVerticalSystemLines;default:return 0}}}e.SystemLine=o},1225:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.SystemLinePosition=void 0,(i=e.SystemLinePosition||(e.SystemLinePosition={}))[i.MeasureBegin=0]="MeasureBegin",i[i.MeasureEnd=1]="MeasureEnd"},6894:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.SystemLinesEnumHelper=e.SystemLinesEnum=void 0,function(t){t[t.SingleThin=0]="SingleThin",t[t.DoubleThin=1]="DoubleThin",t[t.ThinBold=2]="ThinBold",t[t.BoldThinDots=3]="BoldThinDots",t[t.DotsThinBold=4]="DotsThinBold",t[t.DotsBoldBoldDots=5]="DotsBoldBoldDots",t[t.None=6]="None",t[t.Dotted=7]="Dotted",t[t.Dashed=8]="Dashed",t[t.Bold=9]="Bold",t[t.BoldThin=10]="BoldThin",t[t.DoubleBold=11]="DoubleBold",t[t.Tick=12]="Tick",t[t.Short=13]="Short"}(i=e.SystemLinesEnum||(e.SystemLinesEnum={})),e.SystemLinesEnumHelper=class{static xmlBarlineStyleToSystemLinesEnum(t){return"regular"===t?i.SingleThin:"dotted"===t?i.Dotted:"dashed"===t?i.Dashed:"heavy"===t?i.Bold:"light-light"===t?i.DoubleThin:"light-heavy"===t?i.ThinBold:"heavy-light"===t?i.BoldThin:"heavy-heavy"===t?i.DoubleBold:"tick"===t?i.Tick:"short"===t?i.Short:"none"===t?i.None:i.SingleThin}}},525:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalGraphicalStaffEntryContainer=void 0,e.VerticalGraphicalStaffEntryContainer=class{constructor(t,e){this.staffEntries=[],this.absoluteTimestamp=e,this.staffEntries=new Array(t)}get Index(){return this.index}set Index(t){this.index=t}get AbsoluteTimestamp(){return this.absoluteTimestamp}get StaffEntries(){return this.staffEntries}set StaffEntries(t){this.staffEntries=t}static compareByTimestamp(t,e){const i=t.absoluteTimestamp.RealValue,s=e.absoluteTimestamp.RealValue;return is?1:0}getFirstNonNullStaffEntry(){for(let t=0,e=this.staffEntries.length;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignmentManager=void 0;const s=i(9344),n=i(9086);e.AlignmentManager=class{constructor(t){this.parentStaffline=t,this.rules=this.parentStaffline.ParentMusicSystem.rules}alignDynamicExpressions(){var t,e,i,n;const r=[];let o=new Array;for(let i=0;i0){const e=t.map((t=>t.PositionAndShape.Center.y)),r=Math.max(...e),o=(null===(i=window.GYM)||void 0===i?void 0:i.noNeedContinuousDynamic)||!1,a=(null===(n=window.GYM)||void 0===n?void 0:n.noNeedGraphicalContinuousDynamic)||!1;for(let i=0;i0?t[i-1]:void 0;if(e){const t=this.getOverlap(n.PositionAndShape,e.PositionAndShape);n.squeeze(-(t.x+this.rules.DynamicExpressionSpacer))}if(s){const t=this.getOverlap(s.PositionAndShape,n.PositionAndShape);n.squeeze(t.x+this.rules.DynamicExpressionSpacer)}}}}}getDistance(t,e){const i=t.RelativePosition.x+t.BorderMarginRight,s=e.RelativePosition.x+e.BorderMarginLeft,r=t.RelativePosition.y+t.BorderMarginBottom,o=e.RelativePosition.y+e.BorderMarginTop;return new n.PointF2D(s-i,o-r)}getOverlap(t,e){return new n.PointF2D(t.RelativePosition.x+t.BorderMarginRight-(e.RelativePosition.x+e.BorderMarginLeft),t.RelativePosition.y+t.BorderMarginBottom-(e.RelativePosition.y+e.BorderMarginTop))}}},4028:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasVexFlowBackend=void 0;var n=s(i(9124)).default.Flow;const r=i(709),o=i(8129),a=i(41),l=i(599);class h extends r.VexFlowBackend{constructor(t){super(),this.rules=t}getVexflowBackendType(){return n.Renderer.Backends.CANVAS}getOSMDBackendType(){return a.BackendType.Canvas}getCanvasSize(){var t;return null===(t=document.getElementById("osmdCanvasPage"+this.graphicalMusicPage.PageNumber))||void 0===t?void 0:t.offsetHeight}initialize(t,e){this.zoom=e,this.canvas=document.createElement("canvas"),this.graphicalMusicPage||(this.graphicalMusicPage=new l.GraphicalMusicPage(void 0),this.graphicalMusicPage.PageNumber=1),this.canvas.id="osmdCanvasVexFlowBackendCanvas"+this.graphicalMusicPage.PageNumber,this.inner=document.createElement("div"),this.inner.id="osmdCanvasPage"+this.graphicalMusicPage.PageNumber,this.inner.style.position="relative",this.canvas.style.zIndex="0",this.inner.appendChild(this.canvas),t.appendChild(this.inner),this.renderer=new n.Renderer(this.canvas,this.getVexflowBackendType()),this.ctx=this.renderer.getContext()}initializeHeadless(t=300,e=300){this.graphicalMusicPage||(this.graphicalMusicPage=new l.GraphicalMusicPage(void 0),this.graphicalMusicPage.PageNumber=1),this.canvas=document.createElement("canvas"),this.canvas.width=t,this.canvas.height=e,this.renderer=new n.Renderer(this.canvas,this.getVexflowBackendType()),this.ctx=this.renderer.getContext()}getContext(){return this.ctx}free(){this.canvas&&(this.canvas.width=0,this.canvas.height=0,this.canvas.remove(),delete this.canvas,this.canvas=null)}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.rules.PageBackgroundColor&&(this.ctx.save(),this.ctx.setFillStyle(this.rules.PageBackgroundColor),this.zoom=1,this.ctx.fillRect(0,0,this.canvas.width/this.zoom,this.canvas.height/this.zoom),this.ctx.restore())}scale(t){this.ctx.scale(t,t)}translate(t,e){this.CanvasRenderingCtx.translate(t,e)}renderText(t,e,i,s,n,r,a=void 0,l=void 0){const h=this.CanvasRenderingCtx.font;this.CanvasRenderingCtx.save(),this.CanvasRenderingCtx.font=o.VexFlowConverter.font(t,e,i,this.rules,l),this.CanvasRenderingCtx.fillStyle=a,this.CanvasRenderingCtx.strokeStyle=a,this.CanvasRenderingCtx.fillText(s,r.x,r.y+n),this.CanvasRenderingCtx.restore(),this.CanvasRenderingCtx.font=h}renderRectangle(t,e,i,s=1){const n=this.CanvasRenderingCtx.fillStyle;this.CanvasRenderingCtx.fillStyle=i||o.VexFlowConverter.style(e),this.CanvasRenderingCtx.globalAlpha=s,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.CanvasRenderingCtx.fillStyle=n,this.CanvasRenderingCtx.globalAlpha=1}renderLine(t,e,i="#FF0000FF",s=2,n){const r=this.CanvasRenderingCtx.strokeStyle;this.CanvasRenderingCtx.strokeStyle=i,this.CanvasRenderingCtx.beginPath(),this.CanvasRenderingCtx.moveTo(t.x,t.y),this.CanvasRenderingCtx.lineTo(e.x,e.y),this.CanvasRenderingCtx.stroke(),this.CanvasRenderingCtx.strokeStyle=r}renderCurve(t){this.ctx.beginPath(),this.ctx.moveTo(t[0].x,t[0].y),this.ctx.bezierCurveTo(t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y),this.ctx.lineTo(t[7].x,t[7].y),this.ctx.bezierCurveTo(t[6].x,t[6].y,t[5].x,t[5].y,t[4].x,t[4].y),this.ctx.lineTo(t[0].x,t[0].y),this.ctx.closePath(),this.ctx.fill()}renderPath(t,e=!0,i){let s;this.ctx.beginPath();for(const e of t)s?this.ctx.lineTo(e.x,e.y):(this.ctx.moveTo(e.x,e.y),s=e);this.ctx.closePath(),e?this.ctx.fill():this.ctx.stroke()}get CanvasRenderingCtx(){return this.ctx.vexFlowCanvasContext}}e.CanvasVexFlowBackend=h},9505:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SvgVexFlowBackend=void 0;const n=s(i(9124));var r=n.default.Flow;const o=i(709),a=i(8129),l=i(2562),h=i(41),u=s(i(2043));class c extends o.VexFlowBackend{constructor(t){super(),this.rules=t,this.textId=0}getVexflowBackendType(){return r.Renderer.Backends.SVG}getOSMDBackendType(){return h.BackendType.SVG}getCanvasSize(){var t;return null===(t=document.getElementById("osmdCanvasPage"+this.graphicalMusicPage.PageNumber))||void 0===t?void 0:t.offsetHeight}initialize(t,e,i=void 0){this.zoom=e,this.canvas=document.createElement("div"),i||(i=this.graphicalMusicPage?this.graphicalMusicPage.PageNumber.toString():"1"),this.canvas.id="osmdCanvasPage"+i,this.inner=this.canvas,this.inner.style.position="relative",this.canvas.style.zIndex="0",t.appendChild(this.inner),this.renderer=new n.default.Flow.Renderer(this.canvas,this.getVexflowBackendType()),this.ctx=this.renderer.getContext(),this.ctx.svg.id="osmdSvgPage"+i}getContext(){return this.ctx}getSvgElement(){return this.ctx.svg}removeNode(t){var e;const i=null===(e=this.ctx)||void 0===e?void 0:e.svg;if(!i)return!1;try{i.removeChild(t)}catch(t){return u.default.error(t),!1}return!0}free(){const t=this.ctx.svg;for(;t.lastChild;)t.removeChild(t.lastChild)}clear(){this.ctx&&(this.free(),this.rules.PageBackgroundColor&&(this.ctx.svg.style["background-color"]=this.rules.PageBackgroundColor))}scale(t){this.ctx.scale(t,t)}translate(t,e){}renderText(t,e,i,s,n,r,o=void 0,h=void 0){this.ctx.save();const u=this.ctx.openGroup("text");o&&(this.ctx.attributes.fill=o,this.ctx.attributes.stroke=o);let c=h;h&&"default"!==h||(c=this.rules.DefaultFontFamily),this.ctx.setFont(c,t,a.VexFlowConverter.fontStyle(e)),this.ctx.attributes["font-size"]=`${t}px`,this.ctx.state["font-size"]=`${t}px`;let d="normal",p="normal";switch(e){case l.FontStyles.Bold:d="bold";break;case l.FontStyles.Italic:p="italic";break;case l.FontStyles.BoldItalic:d="bold",p="italic";break;default:d="normal"}return this.ctx.attributes["font-weight"]=d,this.ctx.state["font-weight"]=d,this.ctx.attributes["font-style"]=p,this.ctx.state["font-style"]=p,this.ctx.fillText(s,r.x,r.y+n),this.ctx.closeGroup(),this.ctx.restore(),u}renderRectangle(t,e,i,s=1){this.ctx.save();const n=this.ctx.openGroup("rect");return this.ctx.attributes.fill=i||a.VexFlowConverter.style(e),this.ctx.attributes["fill-opacity"]=s,this.ctx.fillRect(t.x,t.y,t.width,t.height),this.ctx.restore(),this.ctx.attributes["fill-opacity"]=1,this.ctx.closeGroup(),n}renderLine(t,e,i="#FF0000FF",s=2,n){this.ctx.save();const r=this.ctx.openGroup("line",n);return this.ctx.beginPath(),this.ctx.moveTo(t.x,t.y),this.ctx.lineTo(e.x,e.y),this.ctx.attributes.stroke=i,this.ctx.lineWidth=s,this.ctx.stroke(),this.ctx.closeGroup(),this.ctx.restore(),r}renderCurve(t){const e=this.ctx.openGroup("curve");return this.ctx.beginPath(),this.ctx.moveTo(t[0].x,t[0].y),this.ctx.bezierCurveTo(t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y),this.ctx.lineTo(t[7].x,t[7].y),this.ctx.bezierCurveTo(t[6].x,t[6].y,t[5].x,t[5].y,t[4].x,t[4].y),this.ctx.lineTo(t[0].x,t[0].y),this.ctx.closePath(),this.ctx.fill(),this.ctx.closeGroup(),e}renderPath(t,e=!0,i){const s=this.ctx.openGroup("path",i);let n;this.ctx.beginPath();for(const e of t)n?this.ctx.lineTo(e.x,e.y):(this.ctx.moveTo(e.x,e.y),n=e);return this.ctx.closePath(),e?this.ctx.fill():this.ctx.stroke(),this.ctx.stroke(),this.ctx.closeGroup(),s}export(){const t=this.ctx.svg.cloneNode(!0),e=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),i=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",e);i.replaceChild(t,i.documentElement);const s=(new XMLSerializer).serializeToString(i),n=document.createElement("a");n.href="data:image/svg+xml; charset=utf8, "+encodeURIComponent(s.replace(/>\n\r<")),n.download="opensheetmusicdisplay_download.svg",n.innerHTML=window.location.href+"/download",document.body.appendChild(n)}}e.SvgVexFlowBackend=c},709:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowBackend=e.VexFlowBackends=void 0;var n=s(i(9124)).default.Flow;e.VexFlowBackends=class{},e.VexFlowBackend=class{getInnerElement(){return this.inner}getCanvas(){return this.canvas}getRenderElement(){let t=this.canvas;return this.getVexflowBackendType()===n.Renderer.Backends.CANVAS&&(t=this.inner),t}getRenderer(){return this.renderer}removeAllChildrenFromContainer(t){for(;0!==t.children.length;)t.removeChild(t.children.item(0))}removeFromContainer(t){const e=this.getRenderElement();for(let i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowContinuousDynamicExpression=void 0;const s=i(374),n=i(9946),r=i(2255),o=i(1274),a=i(2562);class l extends s.GraphicalContinuousDynamicExpression{constructor(t,e,i,s){if(super(t,e,i),this.IsVerbal){const e=new r.Label(t.Label);this.label=new n.GraphicalLabel(e,s||this.rules.ContinuousDynamicTextHeight,o.TextAlignmentEnum.LeftCenter,this.rules,this.PositionAndShape),this.label.Label.fontStyle=a.FontStyles.Italic,this.label.setLabelPositionAndShapeBorders(),this.PositionAndShape.calculateBoundingBox()}}}e.VexFlowContinuousDynamicExpression=l},8129:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowConverter=void 0;var n=s(i(9124)).default.Flow;const r=i(289),o=i(8640),a=i(1797),l=i(3331),h=i(5198),u=i(5198),c=i(8640),d=i(8640),p=i(6894),f=i(2562),m=i(96),g=i(8155),b=s(i(2043)),S=i(908),y=i(1225),v=i(5922),E=i(766),_=i(5820),x=i(3544),M=i(3029),P=i(2953),w=i(3748);class T{static durations(t,e){const i=[],s=t.clone();for(;s.RealValue>1e-4;){const t=s.RealValue;if(t>=2)i.push("1/2"),s.Sub(new a.Fraction(2,1));else if(t>=1)i.push("w"),s.Sub(new a.Fraction(1,1));else if(t<1&&t>=.5){if(e&&t>.5)return["w"];i.push("h"),s.Sub(new a.Fraction(1,2))}else if(t<.5&&t>=.25){if(e&&t>.25)return["h"];i.push("q"),s.Sub(new a.Fraction(1,4))}else if(t<.25&&t>=.125){if(e&&t>.125)return["q"];i.push("8"),s.Sub(new a.Fraction(1,8))}else if(t<.125&&t>=.0625){if(e&&t>.0625)return["8"];i.push("16"),s.Sub(new a.Fraction(1,16))}else if(t<.0625&&t>=.03125){if(e&&t>.03125)return["16"];i.push("32"),s.Sub(new a.Fraction(1,32))}else if(t<.03125&&t>=.015625){if(e&&t>.015625)return["32"];i.push("64"),s.Sub(new a.Fraction(1,64))}else{if(e)return["64"];i.push("128"),s.Sub(new a.Fraction(1,128))}}return i}static pitch(t,e,i,s=void 0,n=void 0){let a=n;void 0===n&&(a=3),e&&void 0===n&&(a=0,i.ClefType===r.ClefEnum.F&&(a=2),i.ClefType===r.ClefEnum.C&&(a=2));const l=d.NoteEnum[t.FundamentalNote].toLowerCase(),h=o.Pitch.accidentalVexflow(t.Accidental),u=t.Octave-i.OctaveOffset+a;let c="";return s&&(c=this.NoteHeadCode(s)),[l+"n/"+u+c,h,i]}static restToNotePitch(t,e){let i=t.Octave;switch(e){case r.ClefEnum.C:case r.ClefEnum.F:i+=2;case r.ClefEnum.G:}return new o.Pitch(t.FundamentalNote,i,c.AccidentalEnum.NONE)}static NoteHeadCode(t){const e=t.Filled?"2":"1";switch(t.Shape){case E.NoteHeadShape.NORMAL:return"";case E.NoteHeadShape.DIAMOND:return"/D"+e;case E.NoteHeadShape.TRIANGLE:return"/T"+e;case E.NoteHeadShape.TRIANGLE_INVERTED:return"/TI";case E.NoteHeadShape.X:return"/X"+e;case E.NoteHeadShape.CIRCLEX:return"/X3";case E.NoteHeadShape.RECTANGLE:return"/R"+e;case E.NoteHeadShape.SQUARE:return"/S"+e;case E.NoteHeadShape.SLASH:default:return""}}static GhostNotes(t){const e=[],i=T.durations(t,!1);for(const t of i)e.push(new n.GhostNote({duration:t}));return e}static StaveNote(t){var e,i,s,l,u,c,d,p,f,m,g,b,y,v,M,P,w,I,L;t.sortForVexflow();const A=t.notes,C=t.parentStaffEntry.parentMeasure.parentSourceMeasure.Rules,R=A[0];let N,k=[];const B=[],D=R.graphicalNoteLength,O=void 0!==R.sourceNote.NoteTuplet;let F,V=T.durations(D,O)[0];T.idx+=1,void 0!==R.sourceNote.TypeLength&&R.sourceNote.TypeLength!==D&&0!==R.sourceNote.TypeLength.RealValue&&(V=T.durations(R.sourceNote.TypeLength,O)[0],R.numberOfDots=R.sourceNote.DotsXml);let G,W,U=R.numberOfDots,H=!1,z=0,j=!1,X=!1;for(const t of A){if(U=1&&e.length-1>=a+1&&(r=null===(u=null===(l=e[a-1])||void 0===l?void 0:l.graphicalVoiceEntries[0])||void 0===u?void 0:u.parentVoiceEntry,o=null===(d=null===(c=e[a+1])||void 0===c?void 0:c.graphicalVoiceEntries[0])||void 0===d?void 0:d.parentVoiceEntry,r&&o)){const e=r.Notes[0],i=o.Notes[0];if((null===(p=e.NoteBeam)||void 0===p?void 0:p.Notes.includes(i))&&1!==i.ParentStaffEntry.ParentStaff.StafflineCount){const e=r.Notes.last().Pitch,i=t.Clef(),s=T.pitch(T.restToNotePitch(e.getTransposedPitch(-2),i.ClefType),!1,i);4===e.FundamentalNote&&(k=[s[0]])}}}}if((t.sourceNote.IsWholeMeasureRest||D.RealValue===t.sourceNote.SourceMeasure.ActiveTimeSignature.RealValue)&&(k="staff"===C.DYMusicScoreType?["d/5"]:["R/5"],V="w",U=0,H=!0,z=C.WholeRestXShiftVexflow*_.unitInPixels),[...t.sourceNote.ParentStaff.Voices].filter((t=>1!=(null==t?void 0:t.VoiceId))).length){const e=t.parentVoiceEntry.parentStaffEntry.graphicalVoiceEntries,i=t.parentVoiceEntry.parentVoiceEntry.ParentVoice.VoiceId;let s,n;for(const r of e)for(const e of r.notes){if(e===t||e.sourceNote.isRest()||!e.sourceNote.PrintObject){t.lineShift=-2;continue}const r=e.parentVoiceEntry.parentVoiceEntry.WantedStemDirection,o=1===i||5===i,a=o?1:-1,l=e.sourceNote.Pitch.getHalfTone();(!s||1===a&&l>s||-1===a&&l0){let e=3;const i=t.Clef();switch(i.ClefType){case r.ClefEnum.F:e=5;break;case r.ClefEnum.C:e=4}G=o.Pitch.fromHalftone(s),k=[T.pitch(G,!0,i,void 0,e)[0]]}}break}t.sourceNote.Notehead&&t.sourceNote.Notehead.Shape===E.NoteHeadShape.SLASH&&(j=!0);const n=t.vfpitch;if(null===(m=null===(f=n[2])||void 0===f?void 0:f.Parent)||void 0===m?void 0:m.Instructions)for(let t=0,e=n[2].Parent.Instructions.length;t0&&C.RenderLyrics&&C.LyricsUseXPaddingForLongLyrics){const e=t.parentStaffEntry.parentMeasure,n=[];for(let i=e.staffEntries.indexOf(t.parentStaffEntry)+1;i.25){i=!1;break}if(e.LyricsEntries.length>0)break;s+=32*a.Fraction.minus(n,o).RealValue,o=n}}if(C.RenderLyrics&&C.LyricsUseXPaddingForLongLyrics&&e.length>0&&i){let i=!1,n=0;for(const t of A)if(t.sourceNote.Length.RealValue<=.125){i=!0;break}let r=!1;for(const o of e){const e=C.LyricsXPaddingWidthThreshold;let a=o.GraphicalLabel.PositionAndShape.Size.width;if(o.hasDashFromLyricWord()&&(a+=.5),a>e){n+=a-e;const o=t.parentStaffEntry,l=o.parentMeasure.staffEntries,h=l.indexOf(o)===l.length-1;h&&(s+=C.LyricsXPaddingReductionForLastNoteInMeasure),i||(s+=C.LyricsXPaddingReductionForLongNotes),!C.LyricsXPaddingForLastNoteInMeasure&&h||a>e+s&&(r=!0,n-=s);break}}r&&(W.paddingRight=10*C.LyricsXPaddingFactorForLongLyrics*n)}}const q=t.notes[0].lineShift;if(0!==q&&(W.getKeyProps()[0].line+=q),A.length>1)for(let t=0;t1&&1==t.notes[0].sourceNote.ParentVoiceEntry.ParentVoice.VoiceId&&(W.getKeyProps()[0].line=4.5);const $=null===(P=window.GYM)||void 0===P?void 0:P.customBassDrum;if($&&W.isRest()&&("q"===W.getDuration()&&(W.getKeyProps()[0].line=$),"h"===W.getDuration()&&(W.getKeyProps()[0].line=$-1)),W.getKeyProps().forEach((({line:e},i)=>t.notes[i].staffLine=e)),(C.LedgerLineWidth||C.LedgerLineStrokeStyle)&&(W.ledgerLineStyle||(W.ledgerLineStyle={}),C.LedgerLineWidth&&(W.ledgerLineStyle.lineWidth=C.LedgerLineWidth),C.LedgerLineStrokeStyle&&(W.ledgerLineStyle.strokeStyle=C.LedgerLineStrokeStyle)),C.ColoringEnabled){const e=C.DefaultColorStem;let i=t.parentVoiceEntry.StemColor;!i&&e&&(i=e);const s={fillStyle:i,strokeStyle:i};i&&(W.setStemStyle(s),W.flag&&C.ColorFlags&&W.setFlagStyle(s))}if(W.x_shift=z,t.parentVoiceEntry.IsGrace&&t.notes[0].sourceNote.NoteBeam&&(t.parentVoiceEntry.WantedStemDirection=t.notes[0].sourceNote.NoteBeam.Notes[0].ParentVoiceEntry.WantedStemDirection),t.parentVoiceEntry){let e=t.parentVoiceEntry.WantedStemDirection;const i=(null===(w=window.GYM)||void 0===w?void 0:w.stemDirectionNote)||[],s=null==i?void 0:i.find((e=>e.id===t.notes[0].sourceNote.NoteToGraphicalNoteObjectId));switch(s&&"number"==typeof(null==s?void 0:s.direction)&&(e=s.direction),e){case S.StemDirectionType.Up:W.setStemDirection(n.Stem.UP),t.parentVoiceEntry.StemDirection=S.StemDirectionType.Up;break;case S.StemDirectionType.Down:W.setStemDirection(n.Stem.DOWN),t.parentVoiceEntry.StemDirection=S.StemDirectionType.Down}}for(let t=0,e=A.length;t0&&"single"===i){const i=new n.Tremolo(e);i.extra_stroke_scale=C.TremoloStrokeScale,i.y_spacing_scale=C.TremoloYSpacingScale,W&&"w"===W.duration&&W.stem.setExtension(-9),W.addModifier(t,i)}if(e>0&&"start"===i&&this.noteTremoloList.push(W),e>0&&"stop"===i){if(this.noteTremoloList.push(W),this.noteTremoloList.filter((t=>"w"===t.duration)).length===this.noteTremoloList.length)try{this.noteTremoloList[0].keyProps&&this.noteTremoloList[1].keyProps&&(null===(I=(this.noteTremoloList[0].keyProps[0].line>this.noteTremoloList[1].keyProps[0].line?this.noteTremoloList[1]:this.noteTremoloList[0]).stem)||void 0===I||I.setResetHeight(30))}catch(t){console.error("设置都是全音符,stem的高度失败")}const i=new n.Tremolo(e,[...this.noteTremoloList]);i.extra_stroke_scale=1.2,i.y_spacing_scale=1.2,i.x_shift=-30,W.addModifier(t,i),this.noteTremoloList=[]}this.glissandoList.length&&(W.setVibrato(this.glissandoList[0].vfnote[0]),this.glissandoList=[]),"start"===A[t].sourceNote.glissandoType&&this.glissandoList.push(A[t])}if(this.slideNote){try{W.setSlideNote(this.slideNote)}catch(t){console.error(t)}this.slideNote=null}if("start"===t.notes[0].sourceNote.slideType&&(this.slideNote=W),.25===K.Length.RealValue&&K.Notehead&&!1===K.Notehead.Filled){const t=W.getKeyProps();for(let e=0;e1){let t=W.getKeyProps().filter((t=>!t.code&&t.line>3));(null===(L=window.GYM)||void 0===L?void 0:L.stemDirectionNote)||t.length!==k.length||W.setStemDirection(-1)}"jianpu"===C.DYMusicScoreType&&window&&window.sett&&window.sett.keySignature&&W.addAccidental(0,new n.Accidental("#"));try{const t=["b","#","§","º","X"],e={b:"b","#":"#","§":"n",º:"bb",X:"##"};for(const i of A){const s=i.sourceNote.voiceEntry.Timestamp;for(const r of i.sourceNote.SourceMeasure.StaffLinkedExpressions)for(const i of r){const r=a.Fraction.Equal(s,i.Timestamp),o=i.EntriesList.map((t=>t.label)).filter((e=>t.includes(e))).map((t=>e[t]));if(r){for(const t of o)t&&W.addAnnotation(0,new n.Annotation(t));break}}}}catch(t){}return W}static generateArticulations(t,e,i){var s,r,o,a,l,h;if(t&&"GhostNote"!==t.getAttribute("type"))for(const u of e.sourceNote.ParentVoiceEntry.Articulations){let c,d=n.Modifier.Position.ABOVE;t.getStemDirection()===n.Stem.UP&&(d=n.Modifier.Position.BELOW);const p=u.articulationEnum;switch(i.ArticulationPlacementFromXML&&(u.placement===w.PlacementEnum.Above?d=n.Modifier.Position.ABOVE:u.placement===w.PlacementEnum.Below&&(d=n.Modifier.Position.BELOW)),p){case S.ArticulationEnum.accent:{c=new n.Articulation("a>");const t=e.sourceNote.NoteSlurs;for(const s of t)s.StartNote===e.sourceNote&&(s.PlacementXml===w.PlacementEnum.Above?c.setYShift(10*-i.SlurStartArticulationYOffsetOfArticulation):s.PlacementXml===w.PlacementEnum.Below&&c.setYShift(10*i.SlurStartArticulationYOffsetOfArticulation));break}case S.ArticulationEnum.breathmark:c=new n.Articulation("abr"),u.placement===w.PlacementEnum.Above&&(d=n.Modifier.Position.ABOVE),c.breathMarkDistance=i.BreathMarkDistance;break;case S.ArticulationEnum.downbow:c=new n.Articulation("am"),void 0===u.placement&&(d=n.Modifier.Position.ABOVE,u.placement=w.PlacementEnum.Above);break;case S.ArticulationEnum.fermata:c=new n.Articulation("a@a"),d=n.Modifier.Position.ABOVE,u.placement=w.PlacementEnum.Above;break;case S.ArticulationEnum.marcatodown:c=new n.Articulation("a|");break;case S.ArticulationEnum.marcatoup:c=new n.Articulation("a^"),d=n.Modifier.Position.ABOVE;break;case S.ArticulationEnum.invertedfermata:{const t=e.sourceNote.ParentVoiceEntry;if(t!==e.sourceNote.ParentVoiceEntry.ParentSourceStaffEntry.VoiceEntries.last()){t.Articulations=t.Articulations.slice(t.Articulations.indexOf(u)),t.ParentSourceStaffEntry.VoiceEntries.last().Articulations.push(u);continue}c=new n.Articulation("a@u"),d=n.Modifier.Position.BELOW,u.placement=w.PlacementEnum.Below;break}case S.ArticulationEnum.lefthandpizzicato:c=new n.Articulation("a+");break;case S.ArticulationEnum.naturalharmonic:c=new n.Articulation("ah");break;case S.ArticulationEnum.snappizzicato:c=new n.Articulation("ao");break;case S.ArticulationEnum.staccatissimo:c=new n.Articulation("av");break;case S.ArticulationEnum.staccato:c=new n.Articulation("a.");break;case S.ArticulationEnum.tenuto:c=new n.Articulation("a-");break;case S.ArticulationEnum.upbow:c=new n.Articulation("a|"),void 0===u.placement&&(d=n.Modifier.Position.ABOVE,u.placement=w.PlacementEnum.Above);break;case S.ArticulationEnum.strongaccent:c=new n.Articulation("a^")}c&&(!t.hasStem()&&!t.isRest()&&p==S.ArticulationEnum.accent&&t.getLineNumber()>=3&&(d=n.Modifier.Position.ABOVE,(null===(r=null===(s=null==t?void 0:t.modifiers)||void 0===s?void 0:s.filter((t=>["TREMOLO"].includes(t.getCategory().toLocaleUpperCase()))))||void 0===r?void 0:r.length)&&c.setYShift(-16)),p===S.ArticulationEnum.strongaccent&&(d=n.Modifier.Position.ABOVE,(null===(o=window.GYM)||void 0===o?void 0:o.customArtPosition)&&(1===t.getStemDirection()?d=n.Modifier.Position.ABOVE:(d=n.Modifier.Position.BELOW,c=new n.Articulation("a|")))),(null===(a=window.GYM)||void 0===a?void 0:a.customAccentItem)&&p===S.ArticulationEnum.accent&&(d=n.Modifier.Position.ABOVE),!(null===(l=window.GYM)||void 0===l?void 0:l.customLefthandpizzicatoItem)||p!==S.ArticulationEnum.lefthandpizzicato&&p!==S.ArticulationEnum.naturalharmonic||(d=n.Modifier.Position.ABOVE),p===S.ArticulationEnum.tenuto&&"w"===t.getDuration()&&(null===(h=window.GYM)||void 0===h?void 0:h.customTenutoItem)&&(d=n.Modifier.Position.ABOVE),c.setPosition(d),t.addModifier(0,c))}}static generateOrnaments(t,e){let i,s=n.Modifier.Position.ABOVE;switch(e.placement===w.PlacementEnum.Below&&(s=n.Modifier.Position.BELOW),e.GetOrnament){case v.OrnamentEnum.DelayedInvertedTurn:i=new n.Ornament("turn_inverted"),i.setDelayed(!0);break;case v.OrnamentEnum.DelayedTurn:i=new n.Ornament("turn"),i.setDelayed(!0);break;case v.OrnamentEnum.InvertedMordent:i=new n.Ornament("mordent"),i.setDelayed(!1);break;case v.OrnamentEnum.InvertedTurn:i=new n.Ornament("turn_inverted"),i.setDelayed(!1);break;case v.OrnamentEnum.Mordent:i=new n.Ornament("mordent_inverted"),i.setDelayed(!1);break;case v.OrnamentEnum.Trill:i=new n.Ornament("tr"),i.setDelayed(!1);break;case v.OrnamentEnum.Turn:i=new n.Ornament("turn"),i.setDelayed(!1);break;default:return void b.default.warn("unhandled OrnamentEnum type: "+e.GetOrnament)}i&&(e.AccidentalBelow!==c.AccidentalEnum.NONE&&i.setLowerAccidental(o.Pitch.accidentalVexflow(e.AccidentalBelow)),e.AccidentalAbove!==c.AccidentalEnum.NONE&&i.setUpperAccidental(o.Pitch.accidentalVexflow(e.AccidentalAbove)),i.setPosition(s),t.addModifier(0,i))}static StrokeTypeFromArpeggioType(t){switch(t){case M.ArpeggioType.ARPEGGIO_DIRECTIONLESS:return n.Stroke.Type.ARPEGGIO_DIRECTIONLESS;case M.ArpeggioType.BRUSH_DOWN:return n.Stroke.Type.BRUSH_UP;case M.ArpeggioType.BRUSH_UP:return n.Stroke.Type.BRUSH_DOWN;case M.ArpeggioType.RASQUEDO_DOWN:return n.Stroke.Type.RASQUEDO_UP;case M.ArpeggioType.RASQUEDO_UP:return n.Stroke.Type.RASQUEDO_DOWN;case M.ArpeggioType.ROLL_DOWN:return n.Stroke.Type.ROLL_UP;case M.ArpeggioType.ROLL_UP:return n.Stroke.Type.ROLL_DOWN;default:return n.Stroke.Type.ARPEGGIO_DIRECTIONLESS}}static CreateTabNote(t){const e=[],i=t.notes.reverse(),s=[],r=t.notes[0].graphicalNoteLength,o=void 0!==t.notes[0].sourceNote.NoteTuplet;let a=T.durations(r,o)[0],l=0;for(const i of t.notes){const r=i.sourceNote;let o={str:r.StringNumberTab,fret:r.FretNumber};i.sourceNote instanceof P.TabNote||(b.default.info(`invalid tab note: ${i.sourceNote.Pitch.ToString()} in measure ${t.parentStaffEntry.parentMeasure.MeasureNumber}, likely missing XML string+fret number.`),o={str:1,fret:0}),e.push(o),r.BendArray&&r.BendArray.forEach((function(t){let e;const i=t.bendalter-o.fret;e=i>1?"Full":1===i?"1/2":"1/4","up"===t.direction?s.push({type:n.Bend.UP,text:e,width:10}):s.push({type:n.Bend.DOWN,text:e,width:10})})),l{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowGlissando=void 0;const s=i(1443);class n extends s.GraphicalGlissando{}e.VexFlowGlissando=n},4679:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowGraphicalNote=void 0;const s=i(3486),n=i(8129),r=i(5853);class o extends s.GraphicalNote{constructor(t,e,i,s=r.OctaveEnum.NONE,o,a=void 0){if(super(t,e,o,a),this.clef=i,this.octaveShift=s,t.Pitch){const e=t.isRest()?t.Pitch:r.OctaveShift.getPitchFromOctaveShift(t.Pitch,s);this.vfpitch=n.VexFlowConverter.pitch(e,t.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0}}setAccidental(t){const e=this.drawPitch(t);this.vfpitch=n.VexFlowConverter.pitch(e,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.DrawnAccidental=e.Accidental}drawPitch(t){return r.OctaveShift.getPitchFromOctaveShift(t,this.octaveShift)}Transpose(t,e,i,s){const o=super.Transpose(t,e,i,s),a=r.OctaveShift.getPitchFromOctaveShift(o,this.octaveShift);return this.vfpitch=n.VexFlowConverter.pitch(a,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0,a}setIndex(t,e){this.vfnote=[t,e],this.vfnoteIndex=e}notehead(t=void 0){let e=t;e||(e=this.vfnote[0]);const i=e.note_heads;return i&&i.length>this.vfnoteIndex&&i[this.vfnoteIndex]?e.note_heads[this.vfnoteIndex]:{line:0}}Clef(){return this.clef}getSVGId(){if(this.vfnote)return this.vfnote[0].getAttribute("id")}getSVGGElement(){if(this.vfnote)return this.vfnote[0].getAttribute("el")}getStemSVG(){return document.getElementById("vf-"+this.getSVGId()+"-stem")}getBeamSVGs(){const t=[];for(let e=0;;e++){const i=document.getElementById(`vf-${this.getSVGId()}-beam${e}`);if(!i)break;t.push(i)}return t}}e.VexFlowGraphicalNote=o},8144:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowGraphicalSymbolFactory=void 0;var n=s(i(9124)).default.Flow;const r=i(8494),o=i(7330),a=i(9252),l=i(5853),h=i(4679),u=i(4146),c=i(5460),d=i(8129),p=i(8790),f=i(4828),m=i(4405),g=i(6040),b=i(8965);e.VexFlowGraphicalSymbolFactory=class{constructor(){this.hasBBox=!1,void 0!==document.createElementNS("http://www.w3.org/2000/svg","g").getBBox&&(this.hasBBox=!0)}createMusicSystem(t,e){return new r.VexFlowMusicSystem(t,e)}createStaffLine(t,e){return new f.VexFlowStaffLine(t,e)}createSkyBottomLineCalculator(t){return t.ParentMusicSystem.rules.PerformanceMode&&this.hasBBox?new b.SkyBottomLineCalculatorSVG(t):new g.SkyBottomLineCalculator(t)}createGraphicalMeasure(t,e,i=!1){return new o.VexFlowMeasure(e,t,void 0)}createMultiRestMeasure(t,e,i){return new m.VexFlowMultiRestMeasure(e,t,i)}createTabStaffMeasure(t,e){return new p.VexFlowTabMeasure(e,t)}createExtraGraphicalMeasure(t){const e=new o.VexFlowMeasure(t.ParentStaff,void 0,t);return e.IsExtraGraphicalMeasure=!0,e.ExtraGraphicalMeasurePreviousMeasure=t.Measures.last(),e}createStaffEntry(t,e){return new a.VexFlowStaffEntry(e,t,void 0)}createVoiceEntry(t,e){return new c.VexFlowVoiceEntry(t,e)}createNote(t,e,i,s=l.OctaveEnum.NONE,n,r=void 0){return new h.VexFlowGraphicalNote(t,e,i,s,n,r)}createGraceNote(t,e,i,s,n=l.OctaveEnum.NONE){return new h.VexFlowGraphicalNote(t,e,i,n,s)}addGraphicalAccidental(t,e){t.setAccidental(e)}addFermataAtTiedEndNote(t,e){}createInStaffClef(t,e){const i=t,s=d.VexFlowConverter.Clef(e,"small");i.vfClefBefore=new n.ClefNote(s.type,s.size,s.annotation)}createChordSymbols(t,e,i,s){const n=e.parentMeasure.parentSourceMeasure.Rules;let r=0;const o=n.ChordSymbolXSpacing;for(const a of t.ChordContainers){let t=e.PositionAndShape;1===e.graphicalVoiceEntries.length&&1===e.graphicalVoiceEntries[0].notes.length&&e.graphicalVoiceEntries[0].notes[0].sourceNote.isWholeRest()&&(t=e.parentMeasure.PositionAndShape,r+=e.parentMeasure.beginInstructionsWidth,r+=n.ChordSymbolWholeMeasureRestXOffset);const l=new u.GraphicalChordSymbolContainer(a,t,n.ChordSymbolTextHeight,i,s,e.parentMeasure.parentSourceMeasure.Rules),h=l.GraphicalLabel;h.PositionAndShape.RelativePosition.y-=n.ChordSymbolYOffset,h.setLabelPositionAndShapeBorders();let c=0;h.PositionAndShape.Size.width{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowInstantaneousDynamicExpression=void 0;const s=i(9428),n=i(9793),r=i(9946),o=i(2255),a=i(1274),l=i(2562);class h extends s.GraphicalInstantaneousDynamicExpression{constructor(t,e,i){super(t,e,i);const s=new o.Label(this.Expression);this.label=new r.GraphicalLabel(s,this.rules.ContinuousDynamicTextHeight,a.TextAlignmentEnum.CenterCenter,this.rules,this.PositionAndShape),this.label.Label.fontStyle=l.FontStyles.BoldItalic,this.label.setLabelPositionAndShapeBorders(),this.PositionAndShape.calculateBoundingBox()}get InstantaneousDynamic(){return this.mInstantaneousDynamicExpression}get Expression(){return n.DynamicEnum[this.mInstantaneousDynamicExpression.DynEnum]}}e.VexFlowInstantaneousDynamicExpression=h},8939:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowInstrumentBrace=void 0;var n=s(i(9124)).default.Flow;const r=i(5575);class o extends r.VexFlowInstrumentBracket{constructor(t,e,i=0){super(t,e,i),this.vexflowConnector.setType(n.StaveConnector.type.BRACE)}}e.VexFlowInstrumentBrace=o},5575:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowInstrumentBracket=void 0;var n=s(i(9124)).default.Flow;const r=i(4785),o=i(8911),a=i(5820);class l extends r.GraphicalObject{constructor(t,e,i=0){super(),this.Visible=!0,this.PositionAndShape=new o.BoundingBox(this,t.ParentMusicSystem.PositionAndShape);const s=t.Measures[0],r=e.Measures[0];this.addConnector(s.getVFStave(),r.getVFStave(),n.StaveConnector.type.BRACKET,i)}draw(t){this.Visible&&this.vexflowConnector.setContext(t).draw();const e=this.vexflowConnector,i=e.top_stave.getYForLine(0),s=e.bottom_stave.getYForLine(e.bottom_stave.getNumLines()-1)+e.thickness;this.PositionAndShape.AbsolutePosition.x=(e.top_stave.getX()-2+e.x_shift)/a.unitInPixels,this.PositionAndShape.AbsolutePosition.y=i/a.unitInPixels,this.PositionAndShape.Size.height=(s-i)/a.unitInPixels,this.PositionAndShape.Size.width=12/a.unitInPixels}addConnector(t,e,i,s){this.vexflowConnector=new n.StaveConnector(t,e).setType(i).setXShift(-5*s)}}e.VexFlowInstrumentBracket=l},7330:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StavePositionEnum=e.VexFlowMeasure=void 0;var n=s(i(9124)).default.Flow;const r=i(1513),o=i(6894),a=i(289),l=i(8129),h=i(9224);var u=n.NoteSubGroup;const c=s(i(2043)),d=i(5820),p=i(6189),f=i(1225),m=i(908),g=i(5460),b=i(1797),S=i(1405),y=i(1357),v=i(3748),E=i(2478);let _=!1;class x extends r.GraphicalMeasure{constructor(t,e,i){super(t,e,i),this.octaveOffset=3,this.vfVoices={},this.vfTies=[],this.vfRepetitionWords=[],this.hasMetronomeMark=!1,this.connectors=[],this.beams={},this.autoVfBeams=[],this.autoTupletVfBeams=[],this.vfbeams={},this.tuplets={},this.vftuplets={},this.minimumStaffEntriesWidth=-1,this.rules=i?i.ParentMusicSystem.rules:e?e.Rules:new S.EngravingRules,this.resetLayout()}setAbsoluteCoordinates(t,e){this.stave.setX(t).setY(e)}resetLayout(){this.stave=new n.Stave(0,0,0,{fill_style:this.rules.StaffLineColor,space_above_staff_ln:0,space_below_staff_ln:0,DYMusicScoreType:this.rules.DYMusicScoreType}),this.InitiallyActiveClef&&(this.stave.clef=l.VexFlowConverter.Clef(this.InitiallyActiveClef).type),this.stave.MeasureNumber=this.MeasureNumber,this.hasMetronomeMark=!1,this.ParentStaff&&this.setLineNumber(this.ParentStaff.StafflineCount),this.stave.setBegBarType(n.Barline.type.NONE),this.parentSourceMeasure&&this.parentSourceMeasure.endingBarStyleEnum===o.SystemLinesEnum.None&&this.stave.setEndBarType(n.Barline.type.NONE),this.updateInstructionWidth()}clean(){this.vfTies.length=0,this.connectors=[],this.resetLayout()}getLineWidth(t){switch(t){case o.SystemLinesEnum.BoldThinDots:case o.SystemLinesEnum.DotsThinBold:return 10/d.unitInPixels;case o.SystemLinesEnum.DotsBoldBoldDots:return 10/d.unitInPixels+this.rules.RepeatEndStartPadding;default:return 0}}addClefAtBegin(t){if(this.rules.RenderClefsAtBeginningOfStaffline){if(this.octaveOffset=t.OctaveOffset,"jianpu"!==this.rules.DYMusicScoreType)if(t.ClefType===a.ClefEnum.TAB)this.stave.addClef("tab",void 0,void 0,void 0);else{const e=l.VexFlowConverter.Clef(t,"default");this.stave.addClef(e.type,e.size,e.annotation,n.StaveModifier.Position.BEGIN)}this.updateInstructionWidth()}}setLineNumber(t){5!==t&&(0===t?(this.stave.setNumLines(0),this.stave.getBottomLineY=function(){return this.getYForLine(this.options.num_lines)}):1===t?(this.stave.options.line_config=[{visible:!1},{visible:!1},{visible:!0},{visible:!1},{visible:!1}],this.stave.getBottomLineY=function(){return this.getYForLine(2)}):2===t?(this.stave.options.line_config=[{visible:!1},{visible:!1},{visible:!0},{visible:!0},{visible:!1}],this.stave.getBottomLineY=function(){return this.getYForLine(3)}):3===t?(this.stave.options.line_config=[{visible:!1},{visible:!0},{visible:!0},{visible:!0},{visible:!1}],this.stave.getBottomLineY=function(){return this.getYForLine(2)}):(this.stave.setNumLines(t),this.stave.getBottomLineY=function(){return this.getYForLine(this.options.num_lines)}))}addKeyAtBegin(t,e,i){var s;if(this.rules.RenderKeySignatures&&this.ShowKeySignature&&(!this.isTabMeasure||this.rules.TabKeySignatureRendered||this.rules.TabKeySignatureSpacingAdded)&&(!(null===(s=this.parentSourceMeasure)||void 0===s?void 0:s.isReducedToMultiRest)||this.rules.MultipleRestMeasureAddKeySignature)){if(this.stave.setKeySignature(l.VexFlowConverter.keySignature(t),l.VexFlowConverter.keySignature(e),void 0),this.isTabMeasure&&!this.rules.TabKeySignatureRendered){const t=this.stave.getModifiers();for(const e of t)if(e instanceof n.KeySignature){e.setStyle({fillStyle:"#00000000"}),e.hidden=!0;break}}this.updateInstructionWidth()}}addRhythmAtBegin(t,e){var i;if(this.isTabMeasure&&!this.rules.TabTimeSignatureRendered&&!this.rules.TabTimeSignatureSpacingAdded)return;if("jianpu"===this.rules.DYMusicScoreType&&e&&e>0){const t=null===(i=window.GYM)||void 0===i?void 0:i.multitrack;t&&t>1&&(_=!0)}else _=!1;const s=l.VexFlowConverter.TimeSignature(t);_||this.stave.addModifier(s,n.StaveModifier.Position.BEGIN,{numerator:t.Rhythm.Numerator,denominator:t.Rhythm.Denominator}),(!this.ShowTimeSignature||this.isTabMeasure&&!this.rules.TabTimeSignatureRendered)&&(s.setStyle({fillStyle:"#00000000"}),s.hidden=!0),this.updateInstructionWidth()}addClefAtEnd(t,e=!0){const i=l.VexFlowConverter.Clef(t,"small");if(e||!this.stave.endClef){this.stave.setEndClef(i.type,i.size,i.annotation);for(const t of this.stave.getModifiers())if(e){const e=t.originalStrokeStyle,i=t.originalFillStyle;t.getStyle()&&(e&&i?(t.getStyle().strokeStyle=e,t.getStyle().fillStyle=i):(t.getStyle().strokeStyle=null,t.getStyle().fillStyle=null))}else if("clefs"===t.getCategory()&&t.getPosition()===n.StaveModifier.Position.END&&t.type===i.type){const e="#12345600",i=t.getStyle();i&&(t.originalStrokeStyle=i.strokeStyle,t.originalFillStyle=i.fillStyle),t.setStyle({strokeStyle:e,fillStyle:e})}return this.parentSourceMeasure.hasEndClef=!0,this.updateInstructionWidth()}}addMeasureLine(t,e,i=!0){switch(e){case f.SystemLinePosition.MeasureBegin:t===o.SystemLinesEnum.BoldThinDots&&(i||(this.stave.modifiers[0].draw=function(t){switch(t.checkContext(),this.setRendered(),this.type){case n.Barline.type.SINGLE:this.drawVerticalBar(t,this.x,!1);break;case n.Barline.type.DOUBLE:this.drawVerticalBar(t,this.x,!0);break;case n.Barline.type.END:this.drawVerticalEndBar(t,this.x);break;case n.Barline.type.REPEAT_BEGIN:this.drawRepeatBar(t,this.x,!0);break;case n.Barline.type.REPEAT_END:this.drawRepeatBar(t,this.x,!1);break;case n.Barline.type.REPEAT_BOTH:this.drawRepeatBar(t,this.x,!1),this.drawRepeatBar(t,this.x,!0)}}),this.stave.setBegBarType(n.Barline.type.REPEAT_BEGIN));break;case f.SystemLinePosition.MeasureEnd:switch(t){case o.SystemLinesEnum.DotsBoldBoldDots:this.stave.setEndBarType(n.Barline.type.REPEAT_BOTH);break;case o.SystemLinesEnum.DotsThinBold:this.stave.setEndBarType(n.Barline.type.REPEAT_END);break;case o.SystemLinesEnum.DoubleThin:this.stave.setEndBarType(n.Barline.type.DOUBLE);break;case o.SystemLinesEnum.ThinBold:this.stave.setEndBarType(n.Barline.type.END);break;case o.SystemLinesEnum.None:this.stave.setEndBarType(n.Barline.type.NONE)}}}addMeasureNumber(){const t=this.MeasureNumber.toString(),e=M.ABOVE;this.stave.setText(t,e,{justification:1,shift_x:0,shift_y:0})}addWordRepetition(t){let e,i=n.StaveModifier.Position.END;const s=this.beginInstructionsWidth;switch(t.type){case p.RepetitionInstructionEnum.Segno:e=n.Repetition.type.SEGNO_LEFT,i=n.StaveModifier.Position.LEFT;break;case p.RepetitionInstructionEnum.Coda:e=n.Repetition.type.CODA_LEFT,i=n.StaveModifier.Position.LEFT;break;case p.RepetitionInstructionEnum.DaCapo:e=n.Repetition.type.DC;break;case p.RepetitionInstructionEnum.DalSegno:e=n.Repetition.type.DS;break;case p.RepetitionInstructionEnum.Fine:e=n.Repetition.type.FINE;break;case p.RepetitionInstructionEnum.ToCoda:e=n.Repetition.type.TO_CODA;break;case p.RepetitionInstructionEnum.DaCapoAlFine:e=n.Repetition.type.DC_AL_FINE;break;case p.RepetitionInstructionEnum.DaCapoAlCoda:e=n.Repetition.type.DC_AL_CODA;break;case p.RepetitionInstructionEnum.DalSegnoAlFine:e=n.Repetition.type.DS_AL_FINE;break;case p.RepetitionInstructionEnum.DalSegnoAlCoda:e=n.Repetition.type.DS_AL_CODA}if(e){if(this.stave.getModifiers().find((t=>t.symbol_type===e)))return;const t=new n.Repetition(e,s,-this.rules.RepetitionSymbolsYOffset);return t.xShiftAsPercentOfStaveWidth=this.rules.RepetitionEndInstructionXShiftAsPercentOfStaveWidth,void this.stave.addModifier(t,i)}this.addVolta(t)}addVolta(t){var e;let i=n.Volta.type.BEGIN;if(t.type===p.RepetitionInstructionEnum.Ending){switch(t.alignment){case p.AlignmentType.Begin:i=this.parentSourceMeasure.endsRepetitionEnding()?n.Volta.type.BEGIN_END:n.Volta.type.BEGIN;break;case p.AlignmentType.End:if(this.parentSourceMeasure.beginsRepetitionEnding())return;i=n.Volta.type.END}const s=this.ParentStaffLine.SkyBottomLineCalculator,r=this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginLeft+.4,o=Math.max(this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginRight,r+.4),a=s.getSkyLineMinInRange(r,o)-2;let l,h=-6.1+this.rules.VoltaOffset,u=this.rules.VoltaOffset;a0){c.default.trace(`Ghost Found in between (measure ${this.MeasureNumber})`);const e=this.createGhostGves(s);i.splice(t,0,...e),t+=e.length}}else{const e=b.Fraction.minus(n,this.parentSourceMeasure.AbsoluteTimestamp);if(e.RealValue>0){c.default.trace(`Ghost Found at start (measure ${this.MeasureNumber})`);const s=this.createGhostGves(e);i.splice(0,0,...s),t+=s.length}}e=r}const s=b.Fraction.plus(this.parentSourceMeasure.AbsoluteTimestamp,this.parentSourceMeasure.Duration),n=b.Fraction.minus(s,e);if(n.RealValue>0){c.default.trace(`Ghost Found at end (measure ${this.MeasureNumber})`);const t=this.createGhostGves(n);i=i.concat(t)}return i}createGhostGves(t){const e=l.VexFlowConverter.GhostNotes(t),i=[];for(const t of e){const e=new g.VexFlowVoiceEntry(void 0,void 0,this.rules);e.vfStaveNote=t,i.push(e)}return i}handleBeam(t,e){const i=t.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;let s,n=this.beams[i];n||(n=this.beams[i]=[]);for(const t of n)t[0]===e&&(s=t);s||(s=[e,[]],n.push(s));const r=t.parentVoiceEntry;s[1].indexOf(r)<0&&s[1].push(r)}handleTuplet(t,e){const i=t.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;e=t.sourceNote.NoteTuplet;let s,n=this.tuplets[i];n||(n=this.tuplets[i]=[]);for(const t of n)t[0]===e&&(s=t);s||(s=[e,[]],n.push(s));const r=t.parentVoiceEntry;s[1].indexOf(r)<0&&s[1].push(r)}finalizeBeams(){if(this.vfbeams={},this.isTabMeasure&&!this.rules.TabBeamsRendered)return;const t=[];for(const e in this.beams)if(this.beams.hasOwnProperty(e)){let i=this.vfbeams[e];i||(i=this.vfbeams[e]=[]);for(const s of this.beams[e]){let e=!1;for(const t of s[0].Notes)if(t.Length.RealValue>=new b.Fraction(1,4).RealValue&&(!t.TypeLength||t.TypeLength.RealValue>.125)){e=!0;break}if(e){c.default.debug("Beam between note >= quarter, likely tremolo, currently unsupported. continuing.");continue}const r=[],o=s[0],a=s[1];let l=!0;for(const t of a)t.parentVoiceEntry.ParentVoice===o.Notes[0].ParentVoiceEntry.ParentVoice&&(l=t.parentVoiceEntry.WantedStemDirection===m.StemDirectionType.Undefined);let h,u=!1;const d=[];for(const e of a){const i=e.vfStaveNote;i&&(r.push(i),t.push(i)),e.parentVoiceEntry.IsGrace&&(u=!0),e.parentVoiceEntry.StemColor&&this.rules.ColoringEnabled&&d.push(e.parentVoiceEntry.StemColor)}if(r.length>1){const t=new n.Beam(r,l);if(u&&(t.render_options.beam_width=3,t.render_options.partial_beam_length=4),d.length>=2&&this.rules.ColorBeams){h=d[0];for(const t of d)if(t!==h){h=void 0;break}t.setStyle({fillStyle:h,strokeStyle:h})}this.rules.FlatBeams&&(t.render_options.flat_beams=!0,t.render_options.flat_beam_offset=this.rules.FlatBeamOffset,t.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),i.push(t)}else c.default.debug("Warning! Beam with no notes!")}}this.rules.AutoBeamNotes&&this.autoBeamNotes(t)}autoBeamNotes(t){if(!this.rules.AutoBeamTabs&&this.isTabMeasure)return;let e,i=60,s=[],r=[],o=[];this.autoTupletVfBeams=[];const a=[];this.autoVfBeams=[];let l=this.parentSourceMeasure.ActiveTimeSignature;l||(l=this.parentSourceMeasure.Duration);for(const u of this.staffEntries)for(const c of u.graphicalVoiceEntries){const d=c.vfStaveNote,p=c.notes[0],f={vfStaveNote:d,sourceNote:p.sourceNote},m=u.relInMeasureTimestamp.isOnBeat(l),g=r.length>=2,S=p.sourceNote.Length.RealValue-new b.Fraction(1,4).RealValue>-b.Fraction.FloatInaccuracyTolerance,y=c.parentVoiceEntry.IsGrace||S||t.contains(d);if(y||m){if(g){for(const t of r)s.push(t);a.push(s.slice()),s=[]}if(r=[],y)continue}const v=c.notes[0].sourceNote.NoteTuplet;if(v){let t=!1;for(const e of v.Notes){for(const i of e)if(i.NoteTypeXml>=E.NoteType.QUARTER||i.ParentVoiceEntry.IsGrace||i.isRest()&&!this.rules.AutoBeamOptions.beam_rests){t=!0;break}if(t)break}if(e){if(e!==v){if(o.length>1){const t=[];for(const e of o)t.push(e.vfStaveNote);const e=new n.Beam(t,!0);this.rules.FlatBeams&&(e.render_options.flat_beams=!0,e.render_options.flat_beam_offset=this.rules.FlatBeamOffset,e.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoTupletVfBeams.push(e);const s=new h.Beam(i++);s.AutoGenerated=!0;for(const t of o)s.addNoteToBeam(t.sourceNote)}o=[],e=v}}else e=v;t||o.push(f)}else e=void 0,r.push(f)}if(o.length>=2){const t=[];for(const e of o)t.push(e.vfStaveNote);const e=new n.Beam(t,!0);this.rules.FlatBeams&&(e.render_options.flat_beams=!0,e.render_options.flat_beam_offset=this.rules.FlatBeamOffset,e.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoTupletVfBeams.push(e);const s=new h.Beam(i++);s.AutoGenerated=!0;for(const t of o)s.addNoteToBeam(t.sourceNote)}if(r.length>=2){for(const t of r)s.push(t);a.push(s)}const u=this.rules.AutoBeamOptions,c={beam_middle_only:u.beam_middle_rests_only,beam_rests:u.beam_rests,maintain_stem_directions:u.maintain_stem_directions};if(u.groups&&u.groups.length){const t=[];for(const e of u.groups)t.push(new n.Fraction(e[0],e[1]));c.groups=t}for(const t of a){const e=[];for(const i of t)e.push(i.vfStaveNote);const i=n.Beam.generateBeams(e,c);for(const t of i)this.rules.FlatBeams&&(t.render_options.flat_beams=!0,t.render_options.flat_beam_offset=this.rules.FlatBeamOffset,t.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoVfBeams.push(t)}}finalizeTuplets(){this.vftuplets={};for(const t in this.tuplets)if(this.tuplets.hasOwnProperty(t)){let e=this.vftuplets[t];e||(e=this.vftuplets[t]=[]);for(const i of this.tuplets[t]){const t=[],s=i[1];for(const e of s)t.push(e.vfStaveNote);if(t.length>1){const s=i[0],r=s.Notes[0][0].NormalNotes,o=s.shouldBeBracketed(this.rules.TupletsBracketedUseXMLValue,this.rules.TupletsBracketed,this.rules.TripletsBracketed,this.isTabMeasure,this.rules.TabTupletsBracketed);let a=n.Tuplet.LOCATION_TOP;s.tupletLabelNumberPlacement===v.PlacementEnum.Below&&(a=n.Tuplet.LOCATION_BOTTOM);let l=0;if(this.isTabMeasure&&(l=10*this.rules.TabTupletYOffsetBottom,a===n.Tuplet.LOCATION_TOP)){l=-10*this.rules.TabTupletYOffsetTop;const t=s.Notes[0][0];(null==t?void 0:t.hasTabEffects())&&(l-=10*this.rules.TabTupletYOffsetEffects)}const h=new n.Tuplet(t,{bracketed:o,location:a,notes_occupied:r,num_notes:s.TupletLabelNumber,ratioed:this.rules.TupletsRatioed,y_offset:l});e.push(h)}else c.default.debug("Warning! Tuplet with no notes! Trying to ignore, but this is a serious problem.")}}}layoutStaffEntry(t){}graphicalMeasureCreatedCalculations(){let t,e=[];const i=[];for(const s of this.staffEntries){t=!1,e=[];for(const r of s.graphicalVoiceEntries)if(r.parentVoiceEntry.IsGrace)e.push(r),i.push(r),t||(t=r.parentVoiceEntry.GraceSlur);else if(r.vfStaveNote=l.VexFlowConverter.StaveNote(r),e.length>0){const i=[];for(let t=0;t0&&(s.GraceSlash=!1);const n=l.VexFlowConverter.StaveNote(s);s.vfStaveNote=n,i.push(n)}const s=new n.GraceNoteGroup(i,t);s.spacing=10*this.rules.GraceNoteGroupXMargin,r.vfStaveNote.addModifier(0,s),e=[]}}if(e.length>0)for(const t of e)t.vfStaveNote=l.VexFlowConverter.StaveNote(t),t.parentVoiceEntry.GraceAfterMainNote=!0;this.finalizeBeams(),this.finalizeTuplets();const s=this.getVoicesWithinMeasure();if(this.rules.RenderFingerings)for(const t of this.staffEntries)t.setModifierXOffsets();for(const t of s){if(!t)continue;this.vfVoices[t.VoiceId]=new n.Voice({beat_value:this.parentSourceMeasure.ActiveTimeSignature.Denominator,num_beats:this.parentSourceMeasure.ActiveTimeSignature.Numerator,resolution:n.RESOLUTION}).setMode(n.Voice.Mode.SOFT);const e=this.getRestFilledVexFlowStaveNotesPerVoice(t);for(const i of e){if(i.parentVoiceEntry&&i.parentVoiceEntry.IsGrace&&!i.parentVoiceEntry.GraceAfterMainNote)continue;const e=i;if(0===e.vfStaveNote.getTicks().denominator&&(e.vfStaveNote.getTicks().denominator=1),0===i.notes.length||!i.notes[0]||!i.notes[0].sourceNote.PrintObject){this.vfVoices[t.VoiceId].addTickable(e.vfStaveNote);continue}const s=e.parentStaffEntry;if(s&&s.vfClefBefore){const t=new u([s.vfClefBefore]);e.vfStaveNote.getCategory&&"stavenotes"===e.vfStaveNote.getCategory()&&e.vfStaveNote.addModifier(0,t)}i.parentVoiceEntry&&this.rules.RenderFingerings&&(this.rules.FingeringPosition!==v.PlacementEnum.Left&&this.rules.FingeringPosition!==v.PlacementEnum.Right||this.createFingerings(i),this.createStringNumber(i)),this.createArpeggio(i),this.vfVoices[t.VoiceId].addTickable(e.vfStaveNote)}}this.setStemDirectionFromVexFlow();for(const t of i)this.createFingerings(t),this.createStringNumber(t),this.createArpeggio(t);this.createArticulations(),this.createOrnaments()}createArpeggio(t){if(t.parentVoiceEntry&&t.parentVoiceEntry.Arpeggio){const e=t.parentVoiceEntry.Arpeggio;if(t.notes&&t.notes.length>1){const i=l.VexFlowConverter.StrokeTypeFromArpeggioType(e.type),s=new n.Stroke(i,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&t.vfStaveNote.addStroke(0,s)}else c.default.debug(`[OSMD] arpeggio in measure ${this.MeasureNumber} could not be drawn.\n voice entry had less than two notes, arpeggio is likely between voice entries, not currently supported in Vexflow.`)}}setStemDirectionFromVexFlow(){for(const t of this.staffEntries)for(const e of t.graphicalVoiceEntries)for(const t of e.notes){const i=t.vfnote;if(i&&i[0])switch(i[0].getStemDirection()){case n.Stem.UP:e.parentVoiceEntry.StemDirection=m.StemDirectionType.Up;break;case n.Stem.DOWN:e.parentVoiceEntry.StemDirection=m.StemDirectionType.Down}}}createArticulations(){for(let t=0,e=this.staffEntries.length;ti)for(const e of t.notes)if(!e.sourceNote.Fingering&&(e.sourceNote.Fingering=s.pop(),i++,0===s.length))break;let r=-1;for(const s of t.notes){const o=s.sourceNote.Fingering;if(!o){r++;continue}r++;let a=this.rules.FingeringPosition;this.rules.FingeringPositionGrace===v.PlacementEnum.AboveOrBelow&&(this.isUpperStaffOfInstrument()?a=v.PlacementEnum.Above:this.isLowerStaffOfInstrument()&&(a=v.PlacementEnum.Below)),o.placement!==v.PlacementEnum.NotYetDefined&&(a=o.placement);let l,h=this.rules.FingeringOffsetX;switch(a){default:case v.PlacementEnum.Left:l=n.StaveModifier.Position.LEFT,h-=s.baseFingeringXOffset*d.unitInPixels;break;case v.PlacementEnum.Right:l=n.StaveModifier.Position.RIGHT,h+=s.baseFingeringXOffset*d.unitInPixels;break;case v.PlacementEnum.Above:l=n.StaveModifier.Position.ABOVE;break;case v.PlacementEnum.Below:l=n.StaveModifier.Position.BELOW;break;case v.PlacementEnum.NotYetDefined:const e=t.parentStaffEntry.sourceStaffEntry.ParentStaff;t.notes.length>1||t.parentStaffEntry.graphicalVoiceEntries.length>1?l=n.StaveModifier.Position.LEFT:0===e.idInMusicSheet?(l=n.StaveModifier.Position.ABOVE,a=v.PlacementEnum.Above):(l=n.StaveModifier.Position.BELOW,a=v.PlacementEnum.Below)}const u=new n.FretHandFinger(o.value);if(u.setPosition(l),u.setOffsetX(h),a===v.PlacementEnum.Above||a===v.PlacementEnum.Below){const t=a===v.PlacementEnum.Above?-1:1,s=a===v.PlacementEnum.Above?r:i-1-r;if(this.rules.FingeringInsideStafflines&&i>1){const e=u.getWidth()/2,n=2.5*i;u.setOffsetY(t*(s+n)*e)}else if(!this.rules.FingeringInsideStafflines){const i=new n.StringNumber(o.value);i.radius=0,i.setPosition(l),i.setOffsetY(t*s*i.getWidth()*2/3),e.vfStaveNote.addModifier(r,i);continue}}e.vfStaveNote.addModifier(r,u)}}createStringNumber(t){if(!this.rules.RenderStringNumbersClassical)return;const e=t;t.notes.forEach(((i,s)=>{const r=i.sourceNote.StringInstruction;if(r){let o=r.value;switch(o){case"1":o="I";break;case"2":o="II";break;case"3":o="III";break;case"4":o="IV";break;case"5":o="V";break;case"6":o="VI"}const a=new n.StringNumber(o);a.radius=0;const l=-this.rules.StringNumberOffsetY;t.notes.length>1||t.parentStaffEntry.graphicalVoiceEntries.length>1?(a.setOffsetX(13*i.baseStringNumberXOffset),a.setPosition(n.Modifier.Position.RIGHT)):a.setPosition(n.Modifier.Position.ABOVE),a.setOffsetY(l),e.vfStaveNote.addModifier(s,a)}}))}lineTo(t,e){const i=new n.StaveConnector(t.getVFStave(),this.stave);i.setType(e),this.connectors.push(i)}getVFStave(){return this.stave}updateInstructionWidth(){let t=0,e=0;const i=this.stave.getModifiers();for(const s of i)s.getPosition()===M.BEGIN?t+=s.getWidth()+s.getPadding(void 0):s.getPosition()===M.END&&(e+=s.getWidth()+s.getPadding(void 0));this.beginInstructionsWidth=(null!=t?t:0)/d.unitInPixels,this.endInstructionsWidth=(null!=e?e:0)/d.unitInPixels}addStaveTie(t,e){this.vfTies.push(t),e.vfTie=t,e.Tie.TieDirection===v.PlacementEnum.Below&&t.setDirection(1)}}var M;e.VexFlowMeasure=x,function(t){t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.ABOVE=3]="ABOVE",t[t.BELOW=4]="BELOW",t[t.BEGIN=5]="BEGIN",t[t.END=6]="END"}(M=e.StavePositionEnum||(e.StavePositionEnum={}))},4405:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowMultiRestMeasure=void 0;var n=s(i(9124)).default.Flow;const r=i(7330);class o extends r.VexFlowMeasure{constructor(t,e=void 0,i=void 0){super(t,e,i),this.minimumStaffEntriesWidth=-1,i?this.rules=i.ParentMusicSystem.rules:e&&(this.rules=e.Rules),this.resetLayout(),this.multiRestElement=new n.MultiMeasureRest(e.multipleRestMeasures,{})}draw(t){var e,i,s,n,r;const o=t.openGroup();null===(e=null==o?void 0:o.classList)||void 0===e||e.add("vf-measure");const a=t.openGroup();null===(i=null==a?void 0:a.classList)||void 0===i||i.add("vf-stave"),null==a||a.setAttribute("id",null===(n=null===(s=this.stave)||void 0===s?void 0:s.attrs)||void 0===n?void 0:n.id),this.stave.setContext(t).draw(),t.closeGroup();const l=t.openGroup();null===(r=null==l?void 0:l.classList)||void 0===r||r.add("vf-voices"),this.multiRestElement.setStave(this.stave),this.multiRestElement.setContext(t),this.multiRestElement.draw(),t.closeGroup();for(const e of this.connectors)e.setContext(t).draw();return t.closeGroup(),o}format(){}getVoicesWithinMeasure(){return[]}getGraphicalVoiceEntriesPerVoice(t){return[]}getRestFilledVexFlowStaveNotesPerVoice(t){return[]}handleBeam(t,e){}handleTuplet(t,e){}finalizeBeams(){}finalizeTuplets(){}layoutStaffEntry(t){}graphicalMeasureCreatedCalculations(){}createArticulations(){}createOrnaments(){}createFingerings(t){}getVFStave(){return this.stave}}e.VexFlowMultiRestMeasure=o},8738:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowMusicSheetCalculator=void 0;const n=i(4040),r=i(8144),o=i(1513),a=i(5309),l=i(5922),h=i(2942),u=s(i(9124));var c=u.default.Flow;const d=s(i(2043)),p=i(5820),f=i(5091),m=i(8720),g=i(9520),b=i(6351),S=i(556),y=i(1274),v=i(9876),E=i(9344),_=i(9667),x=i(41),M=i(7781),P=i(2478),w=i(8129),T=i(2343),I=i(4146),L=i(6894),A=i(3010),C=i(158),R=i(2337),N=i(3602),k=i(448),B=i(4462);class D extends n.MusicSheetCalculator{constructor(t){var e,i,s,o,a,l,c,d;super(),this.beamsNeedUpdate=!1,this.rules=t,n.MusicSheetCalculator.symbolFactory=new r.VexFlowGraphicalSymbolFactory,n.MusicSheetCalculator.TextMeasurer=new h.VexFlowTextMeasurer(this.rules),n.MusicSheetCalculator.stafflineNoteCalculator=new M.VexflowStafflineNoteCalculator(this.rules),"gonville"===(null===(e=this.rules.DefaultVexFlowNoteFont)||void 0===e?void 0:e.toLowerCase())?u.default.Flow.DEFAULT_FONT_STACK=[null===(i=u.default.Flow.Fonts)||void 0===i?void 0:i.Gonville,null===(s=u.default.Flow.Fonts)||void 0===s?void 0:s.Bravura,null===(o=u.default.Flow.Fonts)||void 0===o?void 0:o.Custom]:"petaluma"===(null===(a=this.rules.DefaultVexFlowNoteFont)||void 0===a?void 0:a.toLowerCase())&&(u.default.Flow.DEFAULT_FONT_STACK=[null===(l=u.default.Flow.Fonts)||void 0===l?void 0:l.Petaluma,null===(c=u.default.Flow.Fonts)||void 0===c?void 0:c.Gonville,null===(d=u.default.Flow.Fonts)||void 0===d?void 0:d.Bravura])}clearRecreatedObjects(){super.clearRecreatedObjects(),n.MusicSheetCalculator.stafflineNoteCalculator=new M.VexflowStafflineNoteCalculator(this.rules);for(const t of this.graphicalMusicSheet.MeasureList)for(const e of t)null==e||e.clean()}formatMeasures(){for(const t of this.graphicalMusicSheet.MeasureList)if(t&&t[0]){t.find((t=>null==t?void 0:t.isVisible())).format();for(const e of t){for(const t of e.staffEntries)t.calculateXPosition();e.finalizeBeams()}}this.beamsNeedUpdate=!1}calculateMeasureXLayout(t){const e=[];for(const i of t)(null==i?void 0:i.isVisible())&&e.push(i);if(0===e.length)return 0;t=e;const i=[],s=new c.Formatter({softmaxFactor:this.rules.SoftmaxFactorVexFlow});let r=t[0].staffEntries.length,o=1;for(const e of t){if(!e)continue;let t=0;for(const i of e.staffEntries)t+=i.setMaxAccidentals();e.parentSourceMeasure.ImplicitMeasure&&(r=Math.max(e.staffEntries.length,r),o=Math.max(e.staffEntries.length+t,o));const n=e.vfVoices,a=[];for(const t in n)if(n.hasOwnProperty(t)){const s=n[t];e.hasOnlyRests&&!s.ticksUsed.equals(s.totalTicks)&&(s.ticksUsed=s.totalTicks),a.push(s),i.push(s)}0!==a.length?s.joinVoices(a):d.default.debug("Found a measure with no voices. Continuing anyway.",n)}let a=12;const l=t[0].parentSourceMeasure;if(i.length>0){if(a=s.preCalculateMinTotalWidth(i)/p.unitInPixels*this.rules.VoiceSpacingMultiplierVexflow+this.rules.VoiceSpacingAddendVexflow+.3*r,null==l?void 0:l.ImplicitMeasure){a=l.Duration.RealValue/l.ActiveTimeSignature.RealValue*a;let t=0;const e=l.measureListIndex;if(e>1)for(const i of this.graphicalMusicSheet.MeasureList[e-1]){const e=null==i?void 0:i.parentSourceMeasure.endingBarStyleEnum;if(e===L.SystemLinesEnum.ThinBold||e===L.SystemLinesEnum.DotsThinBold){t=this.rules.PickupMeasureRepetitionSpacing;break}}a+=t,r>1?a+=.3*o*1.5:e>1&&1===r&&(a+=this.rules.PickupMeasureSpacingSingleNoteAddend),a*=this.rules.PickupMeasureWidthMultiplier}n.MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(t,a);const e=(t,e)=>{s.formatToStave(i,e.getVFStave())},h=(t,e)=>{s.formatToStave(i,e.getVFStave(),{align_rests:!0,context:void 0})};for(const i of t){if(this.rules.AlignRests===x.AlignRestOption.Never)i.formatVoices=e;else if(this.rules.AlignRests===x.AlignRestOption.Always)i.formatVoices=h;else if(this.rules.AlignRests===x.AlignRestOption.Auto){let t=!1;for(const e of i.staffEntries){let i=0,s=0;for(const n of e.graphicalVoiceEntries)if(n.parentVoiceEntry.IsGrace||n&&n.notes&&n.notes[0]&&n.notes[0].sourceNote&&n.notes[0].sourceNote.PrintObject&&i++,n&&n.notes&&n.notes[0]&&n.notes[0].sourceNote&&n.notes[0].sourceNote.isRest()&&n.notes[0].sourceNote.PrintObject&&s++,i>1&&s>=1){t=!0;break}if(t)break}i.formatVoices=t?h:e}if(i===t[0]){const t=i;t.formatVoices(a*p.unitInPixels,t)}}}for(const e of t)if(e)for(const t of e.staffEntries)t.calculateXPosition();for(const e of t){if(!e)continue;const t=e.vfVoices,i=[];for(const e in t)t.hasOwnProperty(e)&&i.push(t[e]);0!==i.length?s.joinVoices(i):d.default.debug("Found a measure with no voices. Continuing anyway.",t)}return a}calculateElongationFactor(t,e,i,s,n,r,a,l){let h=n,u=0;for(const c of t){const t=c.GraphicalLabel.Label.textAlignment;let d=a,p=l;if(c instanceof f.GraphicalLyricEntry&&c.ParentLyricWord){c.LyricsEntry.SyllableIndex>0&&(d=this.rules.BetweenSyllableMinimumDistance,y.TextAlignment.IsCenterAligned(t)&&(d+=1));const e=c.ParentLyricWord.GetLyricWord.Syllables;e.length>1&&c.LyricsEntry.SyllableIndex4&&(w*=1.1)):i[u]&&(w=b/S),M=Math.max(P,w),h=Math.max(h,M);let T=Math.max(b-S||0,0);i[u]&&(T+=i[u].cumulativeOverlap),i[u]={cumulativeOverlap:T,extend:c instanceof f.GraphicalLyricEntry&&c.LyricsEntry.extend,labelWidth:g,measureNumber:r,sourceNoteDuration:c instanceof f.GraphicalLyricEntry&&c.LyricsEntry&&c.LyricsEntry.Parent.Notes[0].Length,text:c instanceof f.GraphicalLyricEntry?c.LyricsEntry.Text:c.GraphicalLabel.Label.text,xPosition:_},u++}return h}calculateElongationFactorFromStaffEntries(t,e,i,s){let n=i;const r={},o={};for(const i of t)i.LyricsEntries.length>0&&this.rules.RenderLyrics&&(n=this.calculateElongationFactor(i.LyricsEntries,i,r,e,n,s,this.rules.HorizontalBetweenLyricsDistance,this.rules.LyricOverlapAllowedIntoNextMeasure)),i.graphicalChordContainers.length>0&&this.rules.RenderChordSymbols&&(n=this.calculateElongationFactor(i.graphicalChordContainers,i,o,e,n,s,this.rules.ChordSymbolXSpacing,this.rules.ChordOverlapAllowedIntoNextMeasure));return n}calculateMeasureWidthFromStaffEntries(t,e){var i;let s=1;if(!(null===(i=window.GYM)||void 0===i?void 0:i.multitrack))for(const i of t)i&&0!==i.staffEntries.length&&(s=this.calculateElongationFactorFromStaffEntries(i.staffEntries,e,s,i.MeasureNumber),s=1);return s=Math.min(s,this.rules.MaximumLyricsElongationFactor),e*s}createGraphicalTie(t,e,i,s,n){return new a.GraphicalTie(t,s,n)}updateStaffLineBorders(t){t.SkyBottomLineCalculator.updateStaffLineBorders()}graphicalMeasureCreatedCalculations(t){t.rules=this.rules,t.graphicalMeasureCreatedCalculations()}layoutVoiceEntry(t,e,i,s){for(let t=0;t=2&&(d=h.vfnote[0],f=h.vfnote[1]);let m=0;if(u&&u.vfnote&&u.vfnote.length>=2&&(p=u.vfnote[0],m=u.vfnote[1]),e){if(d){const e=new c.StaveTie({first_indices:[f],first_note:d}),i=h.parentVoiceEntry.parentStaffEntry.parentMeasure;if(p){"w"===p.getDuration()&&(null===(n=null===(s=p.keyProps)||void 0===s?void 0:s[0])||void 0===n?void 0:n.line)>=3&&p.setStemDirection(-1);let t=(null===(r=window.GYM)||void 0===r?void 0:r.tieDirection)||0;1===Math.abs(t)&&((null===(a=null===(o=p.keyProps)||void 0===o?void 0:o[0])||void 0===a?void 0:a.line)>=3?p.setStemDirection(-t):p.setStemDirection(t)),null==e||e.setDirection(p.getStemDirection())}if(i.vfTies.length>0){const t=i.vfTies[0].direction;null==e||e.setDirection(t?-t:1)}i.addStaveTie(e,t)}if(p){const e=new c.StaveTie({last_indices:[m],last_note:p}),i=u.parentVoiceEntry.parentStaffEntry.parentMeasure;if(i.vfTies.length>0){const t=i.vfTies[0].direction;null==e||e.setDirection(t?-t:1)}i.addStaveTie(e,t)}}else if(d||p){let e;if(i)if("S"===t.Tie.Type){const i=t.StartNote.sourceNote,s=t.EndNote.sourceNote;let n=1;i.FretNumber>s.FretNumber&&(n=-1),e=new c.TabSlide({first_indices:[f],first_note:d,last_indices:[m],last_note:p},n)}else e=new c.TabTie({first_indices:[f],first_note:d,last_indices:[m],last_note:p},t.Tie.Type);else{e=new c.StaveTie({first_indices:[f],first_note:d,last_indices:[m],last_note:p});const i=t.Tie.getTieDirection(h.sourceNote);i===T.PlacementEnum.Below?e.setDirection(1):i===T.PlacementEnum.Above&&e.setDirection(-1)}const s=u.parentVoiceEntry.parentStaffEntry.parentMeasure,n=(null===(l=window.GYM)||void 0===l?void 0:l.graceCustom)||!1;n&&e.setDirection(n.direction),s.addStaveTie(e,t)}}calculateDynamicExpressionsForMultiExpression(t,e,i){if(ethis.rules.MaxMeasureToDrawIndex)return;const s=t.AbsoluteTimestamp,n=this.graphicalMusicSheet.MeasureList[e],r=n[i].ParentStaffLine,o=n[i];if(!r)return;const a=t.StartingContinuousDynamic,l=void 0!==a&&!a.IsStartOfSoftAccent,h=this.getRelativePositionInStaffLineFromTimestamp(s,i,r,null==r?void 0:r.isPartOfMultiStaffInstrument(),void 0,l);if(h.x<=0&&(h.x=o.beginInstructionsWidth+this.rules.RhythmRightMargin),t.InstantaneousDynamic){const e=new b.VexFlowInstantaneousDynamicExpression(t.InstantaneousDynamic,r,o);this.calculateGraphicalInstantaneousDynamicExpression(e,h,s),this.dynamicExpressionMap.set(s.RealValue,e.PositionAndShape)}if(a){const e=new E.VexFlowContinuousDynamicExpression(a,r,o.parentSourceMeasure);if(e.StartMeasure=o,e.IsSoftAccent=t.StartingContinuousDynamic.IsStartOfSoftAccent,!e.IsVerbal&&a.EndMultiExpression)try{this.calculateGraphicalContinuousDynamic(e,h),e.updateSkyBottomLine()}catch(t){}else e.IsVerbal?this.calculateGraphicalVerbalContinuousDynamic(e,h):d.default.warn("This continuous dynamic is not covered. measure"+t.SourceMeasureParent.MeasureNumber)}}createMetronomeMark(t,e){var i,s,n,r,o,a,l,h,u,c,d;const f=Math.max(t.ParentMultiTempoExpression.SourceMeasureParent.MeasureNumber-1,0),m=e||f,g=Math.max(t.StaffNumber-1,0),b=this.graphicalMusicSheet.MeasureList[m][g].getVFStave();let y="q";if(t.beatUnit){const e=P.NoteTypeHandler.getNoteDurationFromType(t.beatUnit);y=w.VexFlowConverter.durations(e,!1)[0]}let v=this.rules.MetronomeMarkYShift,E=!1;const x=[];if(t.parentMeasure){for(const e of t.parentMeasure.StaffLinkedExpressions)for(const t of e)t&&t instanceof T.UnknownExpression&&x.push(t);for(const e of t.parentMeasure.TempoExpressions){const s=(null===(i=e.InstantaneousTempo)||void 0===i?void 0:i.Enum)===_.TempoEnum.metronomeMark;if(!t.beatUnit&&e.InstantaneousTempo.beatUnit){const e=P.NoteTypeHandler.getNoteDurationFromType(t.beatUnit);y=w.VexFlowConverter.durations(e,!1)[0]}if(e.getPlacementOfFirstEntry()===T.PlacementEnum.Above&&!s){E=!0;break}}}E&&(v-=1.4);const M=null===(s=this.graphicalMusicSheet.MeasureList[0][0].ParentStaffLine)||void 0===s?void 0:s.SkyLine;let I=t.TempoInBpm,L="",A="",C="";for(const t of this.graphicalMusicSheet.MeasureList[m][g].parentSourceMeasure.TempoExpressions){if(A=t.CombinedExpressionsText,(0,S.isSpecialMark)(t.CombinedExpressionsText)){L=t.CombinedExpressionsText;break}if((0,S.isSpeedKeyword)(t.CombinedExpressionsText)||(0,S.isSpeedHiddenKeyword)(t.CombinedExpressionsText)){L=(0,S.formatSpeedKeyword)(t.CombinedExpressionsText),I=t.sourceMeasure.TempoInBPM,(0,S.isSpeedKeyword)(t.CombinedExpressionsText)&&(C=y);break}}const R={bpm:t.TempoInBpm,dots:t.dotted,duration:y,name:L};L&&(R.bpm=I/(R.dots?1.5:1),(0,S.isSpeedKeyword)(A)?R.duration=C:I!==S.SpeedTag[L]&&S.SpeedTag[L]||(R.duration=""));const N=(null===(a=null===(o=null===(r=null===(n=this.graphicalMusicSheet.MeasureList[m][g])||void 0===n?void 0:n.vfVoices)||void 0===r?void 0:r[1])||void 0===o?void 0:o.boundingBox)||void 0===a?void 0:a.y)||0;if(this.rules.MetronomeMarksDrawn){if(M){const t=(null===(h=null===(l=this.graphicalMusicSheet.MeasureList[0])||void 0===l?void 0:l[g])||void 0===h?void 0:h.ParentStaffLine).Measures.map((t=>t.MeasureNumber-1));if(N&&t.includes(m)&&((0,S.isSpeedKeyword)(A)||(0,S.isSpeedHiddenKeyword)(A))){const t=M.slice(0,9);let e=Math.min(...t);e=e<0?e-1:e,v+=e}t.includes(m)&&x.length?M[0]=Math.min(M[0],-4.5+v-4):M[0]=Math.min(M[0],-4.5+v)}b.options.line_config.reduce(((t,e)=>(e.visible&&t++,t)),0)<5&&(v-=2),b.setTempo(R,v*p.unitInPixels);let e=0;try{e+=(null===(d=null===(c=null===(u=this.graphicalMusicSheet.MeasureList[m][g])||void 0===u?void 0:u.vfVoices)||void 0===c?void 0:c[1])||void 0===d?void 0:d.getTickables())[t.parentMeasure.metronomeNoteIndex].getBoundingBox().getX()-b.getNoteStartX()}catch(t){}b.getModifiers()[b.getModifiers().length-1].setShiftX(e)}}calculateRehearsalMark(t){var e,i,s,n,r,o,a,l,h;const u=t.rehearsalExpression;if(!u)return;const c=null===(s=null===(i=null===(e=t.VerticalMeasureList)||void 0===e?void 0:e[0])||void 0===i?void 0:i.getVFStave)||void 0===s?void 0:s.call(i);if(!c)return;const d=-this.rules.RehearsalMarkYOffsetDefault-this.rules.RehearsalMarkYOffset;let p=this.rules.RehearsalMarkXOffsetDefault+this.rules.RehearsalMarkXOffset;t.IsSystemStartMeasure&&(p+=this.rules.RehearsalMarkXOffsetSystemStartMeasure);const f=this.rules.RehearsalMarkFontSize,m=c.getModifiers(),g=m.find((t=>"repetitions"===t.getCategory().toLocaleLowerCase()));if(g&&g.setShiftY(g.y_shift-10),c.setSection(u.label,d,p,f),null===(o=null===(r=null===(n=t.VerticalMeasureList)||void 0===n?void 0:n[0])||void 0===r?void 0:r.ParentStaffLine)||void 0===o?void 0:o.AbstractExpressions){const e=m.find((t=>"stavesection"===t.getCategory().toLocaleLowerCase()));for(let i of(null===(h=null===(l=null===(a=null==t?void 0:t.VerticalMeasureList)||void 0===a?void 0:a[0])||void 0===l?void 0:l.ParentStaffLine)||void 0===h?void 0:h.AbstractExpressions)||[])i instanceof B.GraphicalUnknownExpression&&(e&&(i.Label.PositionAndShape.RelativePosition.y-=.5),g&&(i.Label.PositionAndShape.RelativePosition.y-=1.7))}}calculateSingleOctaveShift(t,e,i,s){var n;const r=e.OctaveShiftStart,o=r.ParentStartMultiExpression.Timestamp,a=null===(n=r.ParentEndMultiExpression)||void 0===n?void 0:n.Timestamp,l=this.rules.MinMeasureToDrawIndex,h=this.rules.MaxMeasureToDrawIndex;let u,c,p=this.graphicalMusicSheet.MeasureList[i][s].ParentStaffLine;if(p||(p=this.graphicalMusicSheet.MeasureList[l][s].ParentStaffLine),u=r.ParentEndMultiExpression?this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(r.ParentEndMultiExpression.SourceMeasureParent,s):this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(s,!0),u.MeasureNumber>h+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(s,!0)),c=r.ParentEndMultiExpression?this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(r.ParentStartMultiExpression.SourceMeasureParent,s):this.graphicalMusicSheet.MeasureList[l][s],c.MeasureNumberh||u.parentSourceMeasure.measureListIndexh)return;let f=u.ParentStaffLine;if(f||(f=p),u&&p&&f){const t=new g.VexFlowOctaveShift(r,p.PositionAndShape);if(!t.startNote){let e;for(const t of c.staffEntries)if(t){e=t;break}if(!e)return;if(t.setStartNote(e),!t.startNote)return}if(!t.endNote){let e;for(let t=u.staffEntries.length-1;t>=0;t++)if(u.staffEntries[t]){e=u.staffEntries[t];break}if(!e)return void(t.graphicalEndAtMeasureEnd=!0);if(t.setEndNote(e),!t.endNote)return}let e=c.findGraphicalStaffEntryFromTimestamp(o);e||(e=c.staffEntries[0]);let i=u.findGraphicalStaffEntryFromTimestamp(a);if(i||(i=u.staffEntries[u.staffEntries.length-1]),t.setStartNote(e),f!==p){t.endsOnDifferentStaffLine=!0;let n=this.findLastStafflineMeasure(p);void 0===n&&(n=u);const o=n.staffEntries[n.staffEntries.length-1];t.setEndNote(o),t.graphicalEndAtMeasureEnd=!0,t.endMeasure=n;const a=f.ParentMusicSystem.Id-p.ParentMusicSystem.Id;if(a>0)for(let t=p.ParentMusicSystem.Id;t=0;e--){const i=t.Measures[e];if(i.staffEntries.length>0)return i}}calculateSinglePedal(t,e,i,s){var n;const r=e.PedalStart,o=r.ParentStartMultiExpression.Timestamp,a=null===(n=r.ParentEndMultiExpression)||void 0===n?void 0:n.Timestamp,l=this.rules.MinMeasureToDrawIndex,h=this.rules.MaxMeasureToDrawIndex;let u,c,p=this.graphicalMusicSheet.MeasureList[i][s].ParentStaffLine;if(p||(p=this.graphicalMusicSheet.MeasureList[l][s].ParentStaffLine),u=r.ParentEndMultiExpression?this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(r.ParentEndMultiExpression.SourceMeasureParent,s):this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(s,!0),u||(u=r.ParentStartMultiExpression.SourceMeasureParent.VerticalMeasureList[s]),u.MeasureNumber>h+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(s,!0)),r.ParentEndMultiExpression?c=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(r.ParentStartMultiExpression.SourceMeasureParent,s):(c=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(r.ParentStartMultiExpression.SourceMeasureParent,s),c||(c=this.graphicalMusicSheet.MeasureList[l][s])),c.MeasureNumberh||u.parentSourceMeasure.measureListIndexh)return;let f=u.ParentStaffLine;if(f||(f=p),u&&p&&f){let t=!1;p!==f&&(t=!0);const e=new A.VexFlowPedal(r,p.PositionAndShape,!1,t);e.setEndsStave(u,a);let i=c.findGraphicalStaffEntryFromTimestamp(o);i||(i=c.staffEntries[0]);let n=u.findGraphicalStaffEntryFromTimestamp(a);if(n||(n=u.staffEntries[u.staffEntries.length-1]),!e.setStartNote(i))return;if(e.setBeginsStave(e.startNote.isRest(),o),f!==p)if(e.pedalSymbol===C.MusicSymbol.PEDAL_SYMBOL){e.setEndNote(n),e.setEndMeasure(u),e.ReleaseText=" ",e.CalculateBoundingBox(),this.calculatePedalSkyBottomLine(e.startVfVoiceEntry,e.endVfVoiceEntry,e,p);const t=f.Measures[0],i=new A.VexFlowPedal(r,t.PositionAndShape);e.setEndsStave(u,a);const s=t.staffEntries[0];if(!i.setStartNote(s))return;i.setEndNote(n),i.setEndMeasure(u),e.setEndMeasure(u),f.Pedals.push(i),i.CalculateBoundingBox(),i.DepressText=" ",this.calculatePedalSkyBottomLine(i.startVfVoiceEntry,i.endVfVoiceEntry,i,f)}else{let t=this.findLastStafflineMeasure(p);void 0===t&&(t=u);const i=t.staffEntries[t.staffEntries.length-1];e.setEndNote(i),e.setEndMeasure(u),e.ChangeEnd=!1;const o=f.ParentMusicSystem.Id-p.ParentMusicSystem.Id;if(o>0){let t=1;for(let i=p.ParentMusicSystem.Id;ih+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(s,!0)),c=r.ParentEndMultiExpression?this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(r.ParentStartMultiExpression.SourceMeasureParent,s):this.graphicalMusicSheet.MeasureList[l][s],c.MeasureNumberh||u.parentSourceMeasure.measureListIndexh)return;let f=u.ParentStaffLine;if(f||(f=p),u&&p&&f){const t=new k.VexflowVibratoBracket(r,p.PositionAndShape,c.ParentStaff.isTab);let e=c.findGraphicalStaffEntryFromTimestamp(o);e||(e=c.staffEntries[0]);let i=u.findGraphicalStaffEntryFromTimestamp(a);if(i||(i=u.staffEntries[u.staffEntries.length-1]),t.setStartNote(e),f!==p){let e=p.Measures[p.Measures.length-1];void 0===e&&(e=u);const n=e.staffEntries[e.staffEntries.length-1];if(t.setEndNote(n),f.ParentMusicSystem.Id-p.ParentMusicSystem.Id>0)for(let t=p.ParentMusicSystem.Id;tf){const t=f;f=m,m=t}s.SkyBottomLineCalculator.updateBottomLineInRange(m,f,g+t)}for(const t of s.Pedals){const e=t,i=e.getPedalMarking();if(g>i.line+3+(s.StaffLines.length-1)){const t=i.render_options.text_margin_right/10;let n,l=e.startVfVoiceEntry.PositionAndShape.AbsolutePosition.x-t;e.setLine(g-3-(s.StaffLines.length-1));let u=null===(r=e.endVfVoiceEntry)||void 0===r?void 0:r.PositionAndShape;if(u||(u=e.endMeasure.PositionAndShape),e.EndSymbolPositionAndShape){const e=c.render_options.glyph_point_size/20;n=l+3.4;const i=u.AbsolutePosition.x-t,r=i+1.5;s.SkyBottomLineCalculator.updateBottomLineInRange(l,n,g+e),s.SkyBottomLineCalculator.updateBottomLineInRange(i,r,g+e)}else{const r=i.render_options.bracket_height/10;if(i.EndsStave)n=u.AbsolutePosition.x+u.Size.width-t;else switch(c.style){case h.BRACKET_OPEN_END:case h.BRACKET_OPEN_BOTH:case h.MIXED_OPEN_END:n=u.AbsolutePosition.x+u.BorderRight-t;break;default:n=u.AbsolutePosition.x+u.BorderLeft-t}const d=null===(a=null===(o=e.endVfVoiceEntry)||void 0===o?void 0:o.parentStaffEntry)||void 0===a?void 0:a.vfClefBefore;if(d&&(n+=d.getWidth()/10),l>n){const t=l;l=n,n=t}s.SkyBottomLineCalculator.updateBottomLineInRange(l,n,g+r)}}}}calculateOctaveShiftSkyBottomLine(t,e,i,s){if(!e)return void d.default.warn("octaveshift: no endStaffEntry");let n=e.PositionAndShape;i.graphicalEndAtMeasureEnd&&(n=e.parentMeasure.PositionAndShape);let r=t.PositionAndShape.Size.width,o=n.Size.width;t.hasOnlyRests()?r=-r:r/=2,i.graphicalEndAtMeasureEnd||(e.hasOnlyRests()?o*=2:o/=2,t===e&&(o*=2));let a=t.PositionAndShape.AbsolutePosition.x-r,l=n.AbsolutePosition.x+o;if(a>l){const t=a;a=l,l=t}i.PositionAndShape.Size.width=l-a;const h=i.getTextBracket(),u=h.font.size/10;if(h.position===c.TextBracket.Positions.TOP){const t=Math.ceil(s.SkyBottomLineCalculator.getSkyLineMinInRange(a,l));if(t===1/0)return;h.start.getStave().options.top_text_position=Math.abs(t),s.SkyBottomLineCalculator.updateSkyLineInRange(a,l,t-2*u)}else{const i=s.SkyBottomLineCalculator.getBottomLineMaxInRange(a,l);if(i===1/0)return;h.start.getStave().options.bottom_text_position=i,t.parentMeasure!==e.parentMeasure&&(h.stop.getStave().options.bottom_text_position=i),s.SkyBottomLineCalculator.updateBottomLineInRange(a,l,i+1.5*u)}}calculateWordRepetitionInstruction(t,e){let i;const s=this.graphicalMusicSheet.MeasureList[e];for(let t=0,e=s.length;tt.StaffLines)));let e=0;for(const i of t)for(const t of i.Measures)t&&e++;this.rules.AlwaysSetPreferredSkyBottomLineBackendAutomatically&&this.rules.setPreferredSkyBottomLineBackendAutomatically(e);for(const e of t)e.SkyBottomLineCalculator.calculateLines()}calculateExpressionAlignements(){for(const t of this.musicSystems)for(const e of t.StaffLines)try{e.AlignmentManager.alignDynamicExpressions(),e.AbstractExpressions.forEach((t=>{t.updateSkyBottomLine()}))}catch(t){}}handleTiedGraphicalNote(t,e,i,s,n,r,o,a){}handleBeam(t,e,i){t.parentVoiceEntry.parentStaffEntry.parentMeasure.handleBeam(t,e)}handleVoiceEntryLyrics(t,e,i){t.LyricsEntries.forEach(((t,s)=>{const n=new f.GraphicalLyricEntry(s,e,this.rules.LyricsHeight,this.rules.StaffHeight);if(e.LyricsEntries.push(n),n.GraphicalLabel.setLabelPositionAndShapeBorders(),s.Word){const t=s.Word.Syllables.indexOf(s);let e=i.indexOf(s.Word);if(-1===e&&(i.push(s.Word),e=i.indexOf(s.Word)),0===this.graphicalLyricWords.length||e>this.graphicalLyricWords.length-1){const e=new m.GraphicalLyricWord(s.Word);n.ParentLyricWord=e,e.GraphicalLyricsEntries[t]=n,this.graphicalLyricWords.push(e)}else{const s=this.graphicalLyricWords[e];n.ParentLyricWord=s,s.GraphicalLyricsEntries[t]=n,s.isFilled()&&(i.splice(e,1),this.graphicalLyricWords.splice(this.graphicalLyricWords.indexOf(s),1))}}}))}handleVoiceEntryOrnaments(t,e,i){}handleVoiceEntryArticulations(t,e,i){}handleVoiceEntryTechnicalInstructions(t,e,i){}handleTuplet(t,e,i){t.parentVoiceEntry.parentStaffEntry.parentMeasure.handleTuplet(t,e)}findIndexGraphicalSlurFromSlur(t,e){for(let i=0;i=0){const t=e[i];-1===t.staffEntries.indexOf(s)&&t.staffEntries.push(s),e.splice(i,1)}}}for(const t of e)-1===t.staffEntries.indexOf(s)&&t.staffEntries.push(s)}}for(const t of this.musicSystems)for(const e of t.StaffLines){const t=e.GraphicalSlurs.sort(v.GraphicalSlur.Compare);for(const e of t)e.slur.isCrossed()||e.calculateCurve(this.rules)}}calculateGlissandi(){const t={};for(const e of this.graphicalMusicSheet.MeasureList[0])t[e.ParentStaff.idInMusicSheet]=[];for(const e of this.musicSystems)for(const i of e.StaffLines){const e=t[i.ParentStaff.idInMusicSheet];for(let t=0;t=0){const t=e[i];-1===t.staffEntries.indexOf(s)&&t.staffEntries.push(s),e.splice(i,1)}}}}for(const t of e)-1===t.staffEntries.indexOf(s)&&t.staffEntries.push(s)}}for(const t of this.musicSystems)for(const e of t.StaffLines)for(const t of e.GraphicalGlissandi)if(e.ParentStaff.isTab){const e=t.Glissando.StartNote,i=t.Glissando.EndNote,s=t.staffEntries[0].findGraphicalNoteFromNote(e),n=t.staffEntries.last().findGraphicalNoteFromNote(i);if(!s&&!n)return;let r,o,a,l,h=1;e.FretNumber>i.FretNumber&&(h=-1),s&&s.vfnote&&s.vfnote.length>=2&&(a=s.vfnote[0],r=[0]),n&&n.vfnote&&n.vfnote.length>=2&&(l=n.vfnote[0],o=[0]);const u=new c.TabSlide({first_indices:r,first_note:a,last_indices:o,last_note:l},h),d=null==s?void 0:s.parentVoiceEntry.parentStaffEntry.parentMeasure;d&&(d.vfTies.push(u),t.vfTie=u);const p=null==n?void 0:n.parentVoiceEntry.parentStaffEntry.parentMeasure;p&&(p.vfTies.push(u),t.vfTie=u)}}}e.VexFlowMusicSheetCalculator=D},5820:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowMusicSheetDrawer=e.unitInPixels=void 0;const n=s(i(9124)),r=i(1494),o=i(3278),a=i(9086),l=i(2942),h=i(8155),u=i(3748),c=i(5277),d=i(9428),p=s(i(2043)),f=i(374),m=i(7459),g=i(4462),b=i(9505);e.unitInPixels=10;class S extends r.MusicSheetDrawer{constructor(t=new m.DrawingParameters){super(new l.VexFlowTextMeasurer(t.Rules),t),this.backends=[],this.zoom=1,this.pageIdx=0,this.getDotId=(t,e)=>e?String(t.Label.PositionAndShape.RelativePosition[e]):String(t.Label.PositionAndShape.RelativePosition.x)+String(t.Label.PositionAndShape.RelativePosition.y),this.hasDot=(t,e,i,s)=>{const n=e||Object.values(s);for(const e of n){if(i)return t.x===e.x&&t.y===e.y;if(t.x===e.x)return!0}return!1}}get Zoom(){return this.zoom}get Backends(){return this.backends}initializeBackendForPage(t){this.backend=this.backends[t.PageNumber-1]}drawSheet(t){var i,s,r;"gonville"===this.rules.DefaultVexFlowNoteFont&&(n.default.Flow.DEFAULT_FONT_STACK=[null===(i=n.default.Flow.Fonts)||void 0===i?void 0:i.Gonville,null===(s=n.default.Flow.Fonts)||void 0===s?void 0:s.Bravura,null===(r=n.default.Flow.Fonts)||void 0===r?void 0:r.Custom]),n.default.Flow.STAVE_LINE_THICKNESS=this.rules.StaffLineWidth*e.unitInPixels,n.default.Flow.STEM_WIDTH=this.rules.StemWidth*e.unitInPixels,n.default.Flow.DEFAULT_NOTATION_FONT_SCALE=this.rules.VexFlowDefaultNotationFontScale,n.default.Flow.DEFAULT_TAB_FONT_SCALE=this.rules.VexFlowDefaultTabFontScale,this.pageIdx=0;for(const e of t.MusicPages){if(e.PageNumber>this.rules.MaxPageToDrawNumber)break;const t=this.backends[this.pageIdx];t.graphicalMusicPage=e,t.scale(this.zoom),this.pageIdx+=1}this.pageIdx=0,this.backend=this.backends[0],super.drawSheet(t)}drawPage(t){t&&(this.backend=this.backends[t.PageNumber-1],super.drawPage(t),this.pageIdx+=1)}clear(){for(const t of this.backends)t.clear()}setZoom(t){this.zoom=t}calculatePixelDistance(t){return t*e.unitInPixels}drawStaffLine(t){const e=this.backend.getContext().openGroup();e&&e.classList.add("staffline"),super.drawStaffLine(t);const i=t.PositionAndShape.AbsolutePosition;this.rules.RenderSlurs&&this.drawSlurs(t,i),this.backend.getContext().closeGroup(),this.rules.RenderGlissandi&&this.drawGlissandi(t,i)}drawSlurs(t,e){var i,s,n,r;const o=null===(i=window.GYM)||void 0===i?void 0:i.vfcurveItem;for(let i=0;i(!t.index||t.index===i)&&t.MeasureNumberXML==a.staffEntries[a.staffEntries.length-1].parentMeasure.MeasureNumber));t&&(a.bezierEndControlPt.y+=(null===(s=null==t?void 0:t.bezierEndControlPt)||void 0===s?void 0:s.y)?t.bezierEndControlPt.y:0,a.bezierEndPt.y+=(null===(n=null==t?void 0:t.bezierEndPt)||void 0===n?void 0:n.y)?t.bezierEndPt.y:0,a.bezierStartControlPt.y+=(null===(r=null==t?void 0:t.bezierStartControlPt)||void 0===r?void 0:r.y)?t.bezierStartControlPt.y:0)}catch(t){console.log(t)}this.drawSlur(a,e)}}}drawGlissandi(t,e){for(const i of t.GraphicalGlissandi)this.drawGlissando(i,e)}drawGlissando(t,e){if(t.StaffLine.ParentStaff.isTab||t.calculateLine(this.rules),t.Line){const i=new a.PointF2D(t.Line.Start.x+e.x,t.Line.Start.y),s=new a.PointF2D(t.Line.End.x+e.x,t.Line.End.y);this.drawLine(i,s,t.Color,t.Width)}else{const e=t.vfTie;if(e){const t=this.backend.getContext();e.setContext(t),e.draw()}}}drawSlur(t,e){const i=[];let s,n,r,o;"jianpu"===this.rules.DYMusicScoreType?((t.placement>0||t.bezierStartPt.y>0)&&(t.bezierStartPt.y=-.8,t.bezierStartControlPt.y=-2.5),s=new a.PointF2D(t.bezierStartPt.x+e.x,t.bezierStartPt.y+e.y),n=new a.PointF2D(t.bezierStartControlPt.x+e.x,t.bezierStartControlPt.y+e.y),r=new a.PointF2D(t.bezierEndControlPt.x+e.x,t.bezierStartControlPt.y+e.y),o=new a.PointF2D(t.bezierEndPt.x+e.x,t.bezierStartPt.y+e.y)):(s=new a.PointF2D(t.bezierStartPt.x+e.x,t.bezierStartPt.y+e.y),n=new a.PointF2D(t.bezierStartControlPt.x+e.x,t.bezierStartControlPt.y+e.y),r=new a.PointF2D(t.bezierEndControlPt.x+e.x,t.bezierEndControlPt.y+e.y),o=new a.PointF2D(t.bezierEndPt.x+e.x,t.bezierEndPt.y+e.y)),i.push(this.applyScreenTransformation(s)),i.push(this.applyScreenTransformation(n)),i.push(this.applyScreenTransformation(r)),i.push(this.applyScreenTransformation(o)),t.placement===u.PlacementEnum.Above?(s.y-=.05,n.y-=.3,r.y-=.3,o.y-=.05):(s.y+=.05,n.y+=.3,r.y+=.3,o.y+=.05),i.push(this.applyScreenTransformation(s)),i.push(this.applyScreenTransformation(n)),i.push(this.applyScreenTransformation(r)),i.push(this.applyScreenTransformation(o)),t.SVGElement=this.backend.renderCurve(i)}drawMeasure(t){t.setAbsoluteCoordinates(t.PositionAndShape.AbsolutePosition.x*e.unitInPixels,t.PositionAndShape.AbsolutePosition.y*e.unitInPixels);const i=this.backend.getContext();try{t.draw(i)}catch(t){p.default.warn("VexFlowMusicSheetDrawer.drawMeasure",t)}let s=0;for(const e of t.staffEntries)this.drawStaffEntry(e),s=this.drawBuzzRolls(e,s)}drawBuzzRolls(t,e){var i;for(const s of t.graphicalVoiceEntries)for(const t of s.notes)if(null===(i=t.sourceNote.TremoloInfo)||void 0===i?void 0:i.tremoloUnmeasured){const i=this.rules.TremoloBuzzRollThickness,s=.9,n=.5,r=t;let o,l;const h=r.vfnote[0].getStemDirection();let u;if(this.backend instanceof b.SvgVexFlowBackend&&(u=r.getStemSVG()),void 0!==(null==u?void 0:u.getBbox)){const t=u.getBBox();o=new a.PointF2D(t.x/10,t.y/10),l=t.height/10}else l=r.vfnote[0].getStemLength()/10,o=new a.PointF2D(r.vfnote[0].getStem().x_begin/10,r.vfnote[0].getStem().y_top/10),1===h&&(o.y-=l);let c=o.y+l/3;r.vfnote[0].getBeamCount()>1&&(c=o.y+l/2,-1===h&&(c-=n+.2));const d=o.x-.5,p=c,f=[],m=[new a.PointF2D(0,-i),new a.PointF2D(s-i,0),new a.PointF2D(-s+i,-n),new a.PointF2D(0,-i),new a.PointF2D(s,0),new a.PointF2D(0,i),new a.PointF2D(-s+i,0),new a.PointF2D(s-i,n),new a.PointF2D(0,i),new a.PointF2D(-s,0)];let g=new a.PointF2D(d,p);f.push(g);for(const t of m)g=f.last(),f.push(new a.PointF2D(g.x+t.x,g.y-t.y));this.DrawPath(f,r.ParentMusicPage,!0,`buzzRoll${e}`),e++}return e}drawLine(t,i,s="#000000FF",n=.2){return t=this.applyScreenTransformation(t),i=this.applyScreenTransformation(i),this.backend.renderLine(t,i,s,n*e.unitInPixels)}DrawOverlayLine(t,i,s,n="#FF0000FF",r=.2,o){if(!s.PageNumber||s.PageNumber>this.backends.length||s.PageNumber<1)return void console.log("VexFlowMusicSheetDrawer.drawOverlayLine: invalid page number / music page number doesn't correspond to an existing backend.");const a=s.PageNumber-1,l=this.backends[a];return t=this.applyScreenTransformation(t),i=this.applyScreenTransformation(i),o||(o=`overlayLine ${t.x}/${t.y}`),l.renderLine(t,i,n,r*e.unitInPixels,o)}DrawPath(t,e,i=!0,s){const n=e.PageNumber-1,r=this.backends[n],o=[];for(const e of t)o.push(this.applyScreenTransformation(e));return r.renderPath(o,i,s)}drawSkyLine(t){const e=t.PositionAndShape.AbsolutePosition,i=t.PositionAndShape.Size.width;this.drawSampledLine(t.SkyLine,e,i)}drawBottomLine(t){const e=new a.PointF2D(t.PositionAndShape.AbsolutePosition.x,t.PositionAndShape.AbsolutePosition.y),i=t.PositionAndShape.Size.width;this.drawSampledLine(t.BottomLine,e,i,"#0000FFFF")}drawSampledLine(t,e,i,s="#FF0000FF"){const n=[];let r=0;for(let e=0;e0){const e=this.rules.SamplingUnit;let r,l,h=new a.PointF2D(o.x,o.y),u=new a.PointF2D(n[0]/e+o.x,o.y);this.drawLine(h,u,s),t[0]>=0&&(r=new a.PointF2D(n[0]/e+o.x,o.y),l=new a.PointF2D(n[0]/e+o.x,o.y+t[n[0]]),this.drawLine(r,l,s));for(let i=1;i0)for(const e of t.FingeringEntries)e.SVGNode=this.drawLabel(e,h.GraphicalLayers.Notes);if(void 0!==t.graphicalChordContainers&&t.graphicalChordContainers.length>0)for(const e of t.graphicalChordContainers){const t=e.GraphicalLabel;t.SVGNode=this.drawLabel(t,h.GraphicalLayers.Notes)}this.rules.RenderLyrics&&t.LyricsEntries.length>0&&this.drawLyrics(t.LyricsEntries,h.GraphicalLayers.Notes)}drawLyrics(t,e){t.forEach((t=>{const i=t.GraphicalLabel;i.Label.colorDefault=this.rules.DefaultColorLyrics,i.SVGNode=this.drawLabel(i,e)}))}drawInstrumentBrace(t,e){t.draw(this.backend.getContext())}drawGroupBracket(t,e){t.draw(this.backend.getContext())}drawOctaveShifts(t){for(const e of t.OctaveShifts)if(e){const t=e,i=this.backend.getContext(),s=t.getTextBracket();this.rules.DefaultColorMusic&&(s.render_options.color=this.rules.DefaultColorMusic),s.setContext(i);try{s.draw()}catch(t){p.default.warn(t)}}}drawPedals(t){for(const e of t.Pedals)if(e){const t=e,i=this.backend.getContext(),s=t.getPedalMarking();s.render_options.color=this.rules.DefaultColorMusic,s.setContext(i),s.draw()}}drawWavyLines(t){for(const e of t.WavyLines)if(e){const t=e,i=this.backend.getContext(),s=t.getVibratoBracket();s.setContext(i),s.draw()}}getMaxExpressionsYAndDots(t){var e,i;const s=[];let n=0;for(const e of t.measures)s.push(e.measureNumber);const r={},o={},a={};for(const e of t.AbstractExpressions)if(e instanceof g.GraphicalUnknownExpression&&s.includes(e.parentMeasure.MeasureNumber)){const t=this.getDotId(e),i=this.getDotId(e,"x");o[t]||(o[t]=[]),a[i]||(a[i]=[]),this.hasDot(e.Label.PositionAndShape.RelativePosition,o[t],!0)||(o[t].push(e.Label.PositionAndShape.RelativePosition),a[i].push(e.Label.PositionAndShape.RelativePosition)),r[t]=e.Label.PositionAndShape.RelativePosition}let l=0;for(const r of t.AbstractExpressions){const t=null===(e=r.parentMeasure)||void 0===e?void 0:e.MeasureNumber;if(r instanceof g.GraphicalUnknownExpression&&s.includes(t)){const e=null===(i=r.parentMeasure.verticalMeasureList[0])||void 0===i?void 0:i.stave,s=(null==e?void 0:e.end_x)-(null==e?void 0:e.x),o=this.getDotId(r,"x");if(1===(a[o]||[]).length&&l!==t){const t=r.Label.PositionAndShape.AbsolutePosition.y;n=0===n?t:Math.min(n,t)}1!==(a[o]||[]).length&&s/10Number.EPSILON){let e=Math.min(...t.Lines.map((t=>t.Start.x))),i=Math.min(...t.Lines.map((t=>t.Start.y)));t.Lines[0].Start.x=e,t.Lines[1].Start.x=e,t.Lines[0].Start.y=i+this.rules.WedgeOpeningLength/2,t.Lines[1].Start.y=i+2*this.rules.WedgeOpeningLength,t.Lines[0].End.y+=this.rules.WedgeOpeningLength/2,t.Lines[1].End.y+=this.rules.WedgeOpeningLength}}catch(t){}const i=this.backend.getContext();i.openGroup("lineGroup");for(const i of t.Lines){const s=new a.PointF2D(t.ParentStaffLine.PositionAndShape.AbsolutePosition.x+i.Start.x,t.ParentStaffLine.PositionAndShape.AbsolutePosition.y+i.Start.y),n=new a.PointF2D(t.ParentStaffLine.PositionAndShape.AbsolutePosition.x+i.End.x,t.ParentStaffLine.PositionAndShape.AbsolutePosition.y+i.End.y);this.drawLine(s,n,null!==(e=i.colorHex)&&void 0!==e?e:"#000000",i.Width)}i.closeGroup()}}renderLabel(t,e,i){return this._renderLabel(t,i)}_renderLabel(t,i){var s;if(!t.Label.print)return;const n=t.Label.fontHeight*e.unitInPixels,{font:r}=t.Label;let o;this.rules.ColoringEnabled&&(o=t.Label.colorDefault,t.ColorXML&&(o=t.ColorXML),t.Label.color&&(o=t.Label.color.toString()),o||(o=this.rules.DefaultColorLabel));let l,{fontStyle:h,fontFamily:u}=t.Label;h||(h=this.rules.DefaultFontStyle),u||(u=this.rules.DefaultFontFamily);for(let e=0;e<(null===(s=t.TextLines)||void 0===s?void 0:s.length);e++){const s=t.TextLines[e],u=this.calculatePixelDistance(s.xOffset),c=new a.PointF2D(i.ScreenPosition.x+u,i.ScreenPosition.y),d=this.backend.renderText(n,h,r,s.text,i.FontHeightInPixel,c,o,t.Label.fontFamily);l?l.appendChild(d):l=d,i.ScreenPosition.y=i.ScreenPosition.y+i.FontHeightInPixel,t.TextLines.length>1&&(i.ScreenPosition.y+=this.rules.SpacingBetweenTextLines)}return l}renderRectangle(t,e,i,s,n){return this.backend.renderRectangle(t,i,s,n)}applyScreenTransformation(t){return new a.PointF2D(t.x*e.unitInPixels,t.y*e.unitInPixels)}applyScreenTransformationForRect(t){return new o.RectangleF2D(t.x*e.unitInPixels,t.y*e.unitInPixels,t.width*e.unitInPixels,t.height*e.unitInPixels)}}e.VexFlowMusicSheetDrawer=S},8494:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowMusicSystem=void 0;const s=i(7142),n=i(6894),r=i(7771),o=i(8129),a=i(5575),l=i(8939);class h extends s.MusicSystem{constructor(t,e){super(t),this.rules=e}calculateBorders(t){if(0===this.staffLines.length)return;const e=this.calcBracketsWidth();this.boundingBox.BorderLeft=-e,this.boundingBox.BorderMarginLeft=-e,this.boundingBox.XBordersHaveBeenSet=!0;const i=this.staffLines[0].SkyBottomLineCalculator.getSkyLineMin();this.boundingBox.BorderTop=i,this.boundingBox.BorderMarginTop=i;const s=this.staffLines[this.staffLines.length-1],n=s.SkyBottomLineCalculator.getBottomLineMax()+s.PositionAndShape.RelativePosition.y;this.boundingBox.BorderBottom=n,this.boundingBox.BorderMarginBottom=n,this.boundingBox.XBordersHaveBeenSet=!0,this.boundingBox.YBordersHaveBeenSet=!0}createSystemLine(t,e,i,s,a,l,h=void 0){const u=l;let c=!1;if(h&&(c=!0,h.lineTo(l,o.VexFlowConverter.line(i,s)),h.addMeasureLine(i,s),i===n.SystemLinesEnum.DotsBoldBoldDots)){const t=h.ParentStaffLine.Measures.indexOf(h)+1,e=h.ParentStaffLine.Measures[t],i=l.ParentStaffLine.Measures[t];e&&i&&(e.lineTo(i,o.VexFlowConverter.line(n.SystemLinesEnum.BoldThinDots,s)),e.addMeasureLine(n.SystemLinesEnum.BoldThinDots,s))}return u&&u.addMeasureLine(i,s,c),new r.SystemLine(i,s,this,l,h)}createInstrumentBracket(t,e){const i=t,s=e,n=new l.VexFlowInstrumentBrace(i,s);this.InstrumentBrackets.push(n)}createGroupBracket(t,e,i){const s=t,n=e;if(0===i){const t=new a.VexFlowInstrumentBracket(s,n,i);this.GroupBrackets.push(t)}else{const t=new l.VexFlowInstrumentBrace(s,n,i);this.GroupBrackets.push(t)}}}e.VexFlowMusicSystem=h},9520:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowOctaveShift=void 0;var n=s(i(9124)).default.Flow;const r=i(873),o=i(5853),a=s(i(2043));class l extends r.GraphicalOctaveShift{constructor(t,e){switch(super(t,e),t.Type){case o.OctaveEnum.VA8:this.position=n.TextBracket.Positions.TOP,this.supscript="va",this.text="8";break;case o.OctaveEnum.MA15:this.position=n.TextBracket.Positions.TOP,this.supscript="ma",this.text="15";break;case o.OctaveEnum.VB8:this.position=n.TextBracket.Positions.BOTTOM,this.supscript="vb",this.text="8";break;case o.OctaveEnum.MB15:this.position=n.TextBracket.Positions.BOTTOM,this.supscript="mb",this.text="15";break;default:a.default.error("Unknown or NONE octaveshift. This should not be called!")}}setStartNote(t){for(const e of t.graphicalVoiceEntries){const t=e;if(null==t?void 0:t.vfStaveNote)return this.startNote=t.vfStaveNote,!0}return!1}setEndNote(t){var e;for(const i of t.graphicalVoiceEntries){const s=i;if(null==s?void 0:s.vfStaveNote)return this.endNote=s.vfStaveNote,this.endMeasure=t.parentMeasure,(null===(e=this.endMeasure)||void 0===e?void 0:e.parentSourceMeasure.Rules.OctaveShiftOnWholeMeasureNoteUntilEndOfMeasure)&&s.notes[0].sourceNote.isWholeMeasureNote()&&(this.graphicalEndAtMeasureEnd=!0),!0}return!1}getTextBracket(){let t,e=this.endNote;const i=this;this.graphicalEndAtMeasureEnd&&(t={getAbsoluteX:()=>10*(i.endMeasure.PositionAndShape.AbsolutePosition.x+i.endMeasure.PositionAndShape.Size.width),getGlyph:()=>({getWidth:()=>0})}),t&&(e=t);const s=new n.TextBracket({position:this.position,start:this.startNote,stop:e,superscript:this.supscript,text:this.text});return this.endsOnDifferentStaffLine&&(s.render_options.show_bracket=!1),s}}e.VexFlowOctaveShift=l},3010:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowPedal=void 0;const n=s(i(9124)),r=i(8911),o=i(4082),a=i(158);class l extends o.GraphicalPedal{constructor(t,e,i=!1,s=!1){switch(super(t,e),this.vfStyle=n.default.Flow.PedalMarking.Styles.BRACKET,this.ChangeBegin=!1,this.ChangeEnd=!1,this.line=-3,this.EndSymbolPositionAndShape=void 0,this.ChangeBegin=t.ChangeBegin,this.ChangeEnd=t.ChangeEnd,this.pedalSymbol){case a.MusicSymbol.PEDAL_SYMBOL:this.vfStyle=n.default.Flow.PedalMarking.Styles.TEXT,this.EndSymbolPositionAndShape=new r.BoundingBox(this,e);break;case a.MusicSymbol.PEDAL_MIXED:this.vfStyle=i&&s?n.default.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:i?n.default.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:s?n.default.Flow.PedalMarking.Styles.MIXED_OPEN_END:n.default.Flow.PedalMarking.Styles.MIXED;break;case a.MusicSymbol.PEDAL_BRACKET:default:this.vfStyle=i&&s?n.default.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:i?n.default.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:s?n.default.Flow.PedalMarking.Styles.BRACKET_OPEN_END:n.default.Flow.PedalMarking.Styles.BRACKET}}setStartNote(t){if(!t)return!1;for(const e of t.graphicalVoiceEntries){const t=e;if(null==t?void 0:t.vfStaveNote)return this.startNote=t.vfStaveNote,this.startVfVoiceEntry=t,!0}return!1}setEndNote(t){if(!t)return!1;for(const e of t.graphicalVoiceEntries){const t=e;if(null==t?void 0:t.vfStaveNote)return this.endNote=t.vfStaveNote,this.endVfVoiceEntry=t,!0}return!1}setEndMeasure(t){this.endMeasure=t}CalculateBoundingBox(){}setLine(t){this.line=t}getPedalMarking(){const t=new n.default.Flow.PedalMarking([this.startNote,this.endNote]);return this.endMeasure&&t.setEndStave(this.endMeasure.getVFStave()),t.setStyle(this.vfStyle),t.setLine(this.line),t.setCustomText(this.DepressText,this.ReleaseText),this.endVfVoiceEntry&&!this.getPedal.EndsStave||(t.EndsStave=!0),this.getPedal.BeginsStave&&(t.BeginsStave=!0),t.ChangeBegin=this.ChangeBegin,t.ChangeEnd=this.ChangeEnd,t}setEndsStave(t,e){(null==e?void 0:e.gte(t.parentSourceMeasure.Duration))&&(this.getPedal.EndsStave=!0)}setBeginsStave(t,e){t&&0===e.RealValue&&(this.getPedal.BeginsStave=!0)}}e.VexFlowPedal=l},8041:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowSlur=e.CurvePositionEnum=void 0;var n,r=s(i(9124)).default.Flow;!function(t){t[t.NEAR_HEAD=1]="NEAR_HEAD",t[t.NEAR_TOP=2]="NEAR_TOP"}(n=e.CurvePositionEnum||(e.CurvePositionEnum={}));class o{constructor(t){this.vfStartNote=void 0,this.vfEndNote=void 0,this.parentSlur=t}static createFromVexflowSlur(t){return new o(t.parentSlur)}get vfSlur(){return this.parentSlur}curve_Options(){return{cps:[{x:0,y:10},{x:0,y:10}],invert:!1,position:n.NEAR_TOP,position_end:n.NEAR_TOP,spacing:2,thickness:2,x_shift:0,y_shift:10}}createVexFlowCurve(){this.vfCurve=new r.Curve(this.vfStartNote,this.vfEndNote,void 0)}}e.VexFlowSlur=o},9252:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowStaffEntry=void 0;const s=i(3023),n=i(5820),r=i(8640);class o extends s.GraphicalStaffEntry{constructor(t,e,i){super(t,e,i)}calculateXPosition(){const t=this.parentMeasure.getVFStave();let e=0;for(const i of this.graphicalVoiceEntries)if(i.vfStaveNote){if(i.vfStaveNote.setStave(t),!i.vfStaveNote.preFormatted)continue;i.applyBordersFromVexflow();let s=!1,r=this.PositionAndShape;i.notes[0].sourceNote.isWholeRest()&&!this.hasOnlyRests()&&(s=!0,r=i.PositionAndShape),this.parentMeasure.ParentStaff.isTab?r.RelativePosition.x=(i.vfStaveNote.getAbsoluteX()+i.vfStaveNote.glyph.getWidth())/n.unitInPixels:(r.RelativePosition.x=i.vfStaveNote.getBoundingBox().getX()/n.unitInPixels,s&&(r.RelativePosition.x-=t.getNoteStartX()/n.unitInPixels,r.RelativePosition.x-=1.3));const o=i.notes[0].sourceNote;o.isRest()&&o.Length.RealValue===this.parentMeasure.parentSourceMeasure.ActiveTimeSignature.RealValue&&(r.RelativePosition.x+=this.parentMeasure.parentSourceMeasure.Rules.WholeRestXShiftVexflow-.1,i.PositionAndShape.BorderLeft=-.7,i.PositionAndShape.BorderRight=.7),i.PositionAndShape.BorderLeftt.staffLine)),i=this.calculateModifierXOffsets(e,1),s=this.calculateModifierXOffsets(e,.5);t.forEach(((t,e)=>{t.baseFingeringXOffset=s[e],t.baseStringNumberXOffset=i[e]}))}calculateModifierXOffsets(t,e){const i=[];for(let s=0;s=0;o--){if(Math.abs(t[s]-t[o])<=e&&n===i[o]){n++,r=!0;break}r=!1}i.push(n)}return i}}e.VexFlowStaffEntry=o},4828:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowStaffLine=void 0;const s=i(9953),n=i(449);class r extends s.StaffLine{constructor(t,e){super(t,e),this.slursInVFStaffLine=[],this.alignmentManager=new n.AlignmentManager(this)}get SlursInVFStaffLine(){return this.slursInVFStaffLine}addVFSlurToVFStaffline(t){this.slursInVFStaffLine.push(t)}get AlignmentManager(){return this.alignmentManager}}e.VexFlowStaffLine=r},8790:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowTabMeasure=void 0;var n=s(i(9124)).default.Flow;const r=i(7330),o=i(8129),a=s(i(2043));class l extends r.VexFlowMeasure{constructor(t,e=void 0,i=void 0){super(t,e,i),this.isTabMeasure=!0}resetLayout(){var t;const e=null!==(t=this.ParentStaff.StafflineCount)&&void 0!==t?t:6;this.stave=new n.TabStave(0,0,0,{space_above_staff_ln:0,space_below_staff_ln:0,num_lines:e}),this.updateInstructionWidth()}graphicalMeasureCreatedCalculations(){for(let t=0,e=this.staffEntries.length;t1){const i=o.VexFlowConverter.StrokeTypeFromArpeggioType(e.type),s=new n.Stroke(i,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&t.vfStaveNote.addStroke(0,s)}else a.default.debug(`[OSMD] arpeggio in measure ${this.MeasureNumber} could not be drawn.\n voice entry had less than two notes, arpeggio is likely between voice entries, not currently supported in Vexflow.`)}if(t.vfGhostNotes)for(const i of t.vfGhostNotes)this.vfVoices[e.VoiceId].addTickable(i);else this.vfVoices[e.VoiceId].addTickable(t.vfStaveNote)}else if(t.vfGhostNotes)for(const i of t.vfGhostNotes)this.vfVoices[e.VoiceId].addTickable(i);else this.vfVoices[e.VoiceId].addTickable(t.vfStaveNote)}}}}e.VexFlowTabMeasure=l},2942:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowTextMeasurer=void 0;const s=i(8129);e.VexFlowTextMeasurer=class{constructor(t){this.fontSize=20,this.fontSizeStandard=this.fontSize;const e=document.createElement("canvas");this.context=e.getContext("2d"),this.rules=t}computeTextWidthToHeightRatio(t,e,i,n=void 0,r=this.fontSize){return this.context.font=s.VexFlowConverter.font(r,i,e,this.rules,n),this.context.measureText(t).width/r}setFontSize(t=this.fontSizeStandard){return this.fontSize=t,t}}},5460:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexFlowVoiceEntry=void 0;const s=i(5974),n=i(5820),r=i(6387);class o extends s.GraphicalVoiceEntry{constructor(t,e,i){super(t,e,i)}applyBordersFromVexflow(){var t;const e=this.vfStaveNote;if(!e.getNoteHeadBeginX)return;const i=e.getBoundingBox(),s=e.getNoteHeadBeginX()-i.x;this.PositionAndShape.RelativePosition.y=i.y/n.unitInPixels,this.PositionAndShape.BorderTop=0,this.PositionAndShape.BorderBottom=i.h/n.unitInPixels;const r=(e.width-(null!==(t=e.paddingRight)&&void 0!==t?t:0))/2;this.PositionAndShape.BorderLeft=-(s+r)/n.unitInPixels,this.PositionAndShape.BorderRight=(i.w-s)/n.unitInPixels}set vfStaveNote(t){this.mVexFlowStaveNote=t}get vfStaveNote(){return this.mVexFlowStaveNote}color(){var t;const e=this.rules.DefaultColorNotehead,i=this.rules.DefaultColorRest,s=this.rules.DefaultColorStem,n="#00000000";let o,a;const l=this.vfStaveNote;for(let s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VexflowStafflineNoteCalculator=void 0;const s=i(8640),n=i(4679),r=i(1649),o=i(289),a=i(908);class l{constructor(t){this.staffPitchListMapping=new r.Dictionary,this.baseLineNote=s.NoteEnum.B,this.baseLineOctave=1,this.rules=t}trackNote(t){if(!(t instanceof n.VexFlowGraphicalNote)||t.Clef().ClefType!==o.ClefEnum.percussion||t.sourceNote.isRest()||0===this.rules.PercussionOneLineCutoff||-1===this.rules.PercussionForceVoicesOneLineCutoff)return;const e=t.parentVoiceEntry.parentStaffEntry.sourceStaffEntry.ParentStaff.idInMusicSheet;let i;this.staffPitchListMapping.containsKey(e)||this.staffPitchListMapping.setValue(e,new Array),i=this.staffPitchListMapping.getValue(e);const s=t.sourceNote.Pitch;l.findOrInsert(i,s)}static PitchIndexOf(t,e,i=0){if(i>t.length-1)return-1;for(let s=i;sthis.rules.PercussionOneLineCutoff&&!r&&!this.rules.PercussionUseCajon2NoteSystem)return t;const o=t,h=t.sourceNote.Pitch;let u=this.baseLineNote,c=this.baseLineOctave;if(this.rules.PercussionUseCajon2NoteSystem?h.FundamentalNote===s.NoteEnum.C&&(u=s.NoteEnum.G,c=1):this.rules.PercussionUseXMLDisplayStep&&void 0!==t.sourceNote.displayStepUnpitched&&(u=t.sourceNote.displayStepUnpitched,c=t.sourceNote.displayOctaveUnpitched+this.rules.PercussionOneLineXMLDisplayStepOctaveOffset),i.length<=this.rules.PercussionForceVoicesOneLineCutoff)o.setAccidental(new s.Pitch(u,c,h.Accidental));else{const t=l.PitchIndexOf(i,h);if(t>-1){const e=Math.ceil(i.length/2);if(!this.rules.PercussionUseXMLDisplayStep)if(t>=e)switch(c=2,(t-e)%5){case 1:u=s.NoteEnum.E;break;case 2:u=s.NoteEnum.G;break;case 3:u=s.NoteEnum.B;break;case 4:u=s.NoteEnum.D,c=3;break;default:u=s.NoteEnum.C}else switch(t%5){case 1:u=s.NoteEnum.F;break;case 2:u=s.NoteEnum.D;break;case 3:u=s.NoteEnum.B,c=0;break;case 4:u=s.NoteEnum.G,c=0;break;default:u=s.NoteEnum.A}const n=new s.Pitch(u,c,h.Accidental);o.setAccidental(n);const r=o.parentVoiceEntry.parentVoiceEntry;!this.rules.SetWantedStemDirectionByXml&&r.Notes.length<2&&(n.Octave>this.baseLineOctave||n.FundamentalNote===this.baseLineNote&&n.Octave===this.baseLineOctave?o.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=a.StemDirectionType.Up:o.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=a.StemDirectionType.Down)}}return o}getStafflineUniquePositionCount(t){return this.staffPitchListMapping.containsKey(t)?this.staffPitchListMapping.getValue(t).length:0}}e.VexflowStafflineNoteCalculator=l},448:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VexflowVibratoBracket=void 0;const n=i(8682),r=s(i(9124));class o extends n.GraphicalWavyLine{constructor(t,e,i=!1){super(t,e),this.line=1,this.isVibrato=!1,this.toEndOfStopStave=!1,this.isVibrato=i}get ToEndOfStopStave(){return this.toEndOfStopStave}setStartNote(t){for(const e of t.graphicalVoiceEntries){const t=e;if(null==t?void 0:t.vfStaveNote)return this.startNote=t.vfStaveNote,this.startVfVoiceEntry=t,!0}return!1}setEndNote(t){for(const e of t.graphicalVoiceEntries){const t=e;if(null==t?void 0:t.vfStaveNote){this.endNote=t.vfStaveNote,this.endVfVoiceEntry=t;const e=this.endVfVoiceEntry.parentStaffEntry.parentMeasure.staffEntries,i=e[e.length-1];return this.toEndOfStopStave=i===this.endVfVoiceEntry.parentStaffEntry,!0}}return!1}CalculateBoundingBox(){const t=this.getVibratoBracket();this.boundingBox.Size.height=.2*t.render_options.wave_height}getVibratoBracket(){const t=new r.default.Flow.VibratoBracket({start:this.startNote,stop:this.endNote,toEndOfStopStave:this.toEndOfStopStave});return t.setLine(this.line),this.isVibrato?t.render_options.vibrato_width=20:t.render_options.wave_girth=4,t}}e.VexflowVibratoBracket=o},9839:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(449),e),n(i(4028),e),n(i(9505),e),n(i(709),e),n(i(9344),e),n(i(8129),e),n(i(3602),e),n(i(4679),e),n(i(8144),e),n(i(6351),e),n(i(8939),e),n(i(5575),e),n(i(7330),e),n(i(4405),e),n(i(8738),e),n(i(5820),e),n(i(8494),e),n(i(9520),e),n(i(8041),e),n(i(9252),e),n(i(4828),e),n(i(7781),e),n(i(8790),e),n(i(2942),e),n(i(5460),e)},4759:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(6791),e),n(i(6055),e),n(i(1070),e),n(i(449),e),n(i(8911),e),n(i(4278),e),n(i(8155),e),n(i(5074),e),n(i(7459),e),n(i(1405),e),n(i(4146),e),n(i(374),e),n(i(5330),e),n(i(1443),e),n(i(9428),e),n(i(5277),e),n(i(9946),e),n(i(6729),e),n(i(5091),e),n(i(8720),e),n(i(7963),e),n(i(1513),e),n(i(599),e),n(i(4324),e),n(i(3486),e),n(i(4785),e),n(i(873),e),n(i(3411),e),n(i(9876),e),n(i(3023),e),n(i(8898),e),n(i(5309),e),n(i(5974),e),n(i(8823),e),n(i(4040),e),n(i(1494),e),n(i(158),e),n(i(7142),e),n(i(5623),e),n(i(4574),e),n(i(9067),e),n(i(3501),e),n(i(6040),e),n(i(9953),e),n(i(4196),e),n(i(7771),e),n(i(1225),e),n(i(6894),e),n(i(525),e),n(i(9839),e)},6842:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Instrument=void 0;const s=i(884),n=i(2255),r=i(0);class o extends s.InstrumentalGroup{constructor(t,e,i,s){super(void 0,i,s),this.Transpose=0,this.voices=[],this.staves=[],this.hasLyrics=!1,this.hasChordSymbols=!1,this.playbackTranspose=0,this.lyricVersesNumbers=[],this.subInstruments=[],this.id=t,this.idString=e,this.nameLabel=new n.Label(e)}get Voices(){return this.voices}get Staves(){return this.staves}get NameLabel(){return this.nameLabel}get HasLyrics(){return this.hasLyrics}set HasLyrics(t){this.hasLyrics=t}get HasChordSymbols(){return this.hasChordSymbols}set HasChordSymbols(t){this.hasChordSymbols=t}get LyricVersesNumbers(){return this.lyricVersesNumbers}set LyricVersesNumbers(t){this.lyricVersesNumbers=t}get Name(){return this.nameLabel.text}set Name(t){this.nameLabel.text=t}get IdString(){return this.idString}get Id(){return this.id}get MidiInstrumentId(){return this.subInstruments[0].midiInstrumentID}set MidiInstrumentId(t){this.subInstruments[0].midiInstrumentID=t}get Volume(){return this.subInstruments[0].volume}set Volume(t){for(let e=0,i=this.subInstruments.length;e0&&this.Voices[0].Visible}set Visible(t){for(let e=0,i=this.Voices.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InstrumentNames=void 0;const s=i(289);class n{}e.InstrumentNames=n,n.MidiInstrument={banjo:s.MidiInstrument.Banjo,blockfloete:s.MidiInstrument.Recorder,brass:s.MidiInstrument.Trombone,bratsche:s.MidiInstrument.Viola,cello:s.MidiInstrument.Cello,clarinet:s.MidiInstrument.Clarinet,contrabass:s.MidiInstrument.Contrabass,"steel drum":s.MidiInstrument.Steel_Drums,drums:s.MidiInstrument.Percussion,flute:s.MidiInstrument.Flute,floete:s.MidiInstrument.Flute,frenchhorn:s.MidiInstrument.French_Horn,gitarre:s.MidiInstrument.Acoustic_Guitar_nylon,guitar:s.MidiInstrument.Acoustic_Guitar_nylon,harfe:s.MidiInstrument.Orchestral_Harp,harp:s.MidiInstrument.Orchestral_Harp,klarinette:s.MidiInstrument.Clarinet,klavier:s.MidiInstrument.Acoustic_Grand_Piano,kontrabass:s.MidiInstrument.Contrabass,oboe:s.MidiInstrument.Oboe,organ:s.MidiInstrument.Church_Organ,orgel:s.MidiInstrument.Church_Organ,orgue:s.MidiInstrument.Church_Organ,percussion:s.MidiInstrument.Percussion,piano:s.MidiInstrument.Acoustic_Grand_Piano,piccolo:s.MidiInstrument.Piccolo,posaune:s.MidiInstrument.Trombone,recorder:s.MidiInstrument.Recorder,sax:s.MidiInstrument.Tenor_Sax,schlagwerk:s.MidiInstrument.Percussion,schlagzeug:s.MidiInstrument.Percussion,steeldrum:s.MidiInstrument.Steel_Drums,streicher:s.MidiInstrument.String_Ensemble_1,strings:s.MidiInstrument.String_Ensemble_1,tpt:s.MidiInstrument.Trumpet,trombone:s.MidiInstrument.Trombone,trompete:s.MidiInstrument.Trumpet,trumpet:s.MidiInstrument.Trumpet,tuba:s.MidiInstrument.Tuba,unnamed:s.MidiInstrument.Acoustic_Grand_Piano,viola:s.MidiInstrument.Viola,violin:s.MidiInstrument.Violin,"violon-c":s.MidiInstrument.Cello,"violon.":s.MidiInstrument.Violin,voice:s.MidiInstrument.Synth_Voice,woodblock:s.MidiInstrument.Woodblock,alt:s.MidiInstrument.Synth_Voice,alto:s.MidiInstrument.Synth_Voice,bariton:s.MidiInstrument.Synth_Voice,baritone:s.MidiInstrument.Synth_Voice,bass:s.MidiInstrument.Synth_Voice,sopran:s.MidiInstrument.Synth_Voice,tenor:s.MidiInstrument.Synth_Voice},n.MidiInstrumentSounds={"brass.alphorn":s.MidiInstrument.French_Horn,"brass.alto-horn":s.MidiInstrument.French_Horn,"brass.baritone-horn":s.MidiInstrument.French_Horn,"brass.bugle":s.MidiInstrument.Trumpet,"brass.bugle.alto":s.MidiInstrument.Trumpet,"brass.bugle.baritone":s.MidiInstrument.Trombone,"brass.bugle.contrabass":s.MidiInstrument.Trombone,"brass.bugle.euphonium-bugle":s.MidiInstrument.French_Horn,"brass.bugle.mellophone-bugle":s.MidiInstrument.French_Horn,"brass.bugle.soprano":s.MidiInstrument.Trumpet,"brass.cimbasso":s.MidiInstrument.Trombone,"brass.conch-shell":s.MidiInstrument.Flute,"brass.cornet":s.MidiInstrument.Trumpet,"brass.cornet.soprano":s.MidiInstrument.Trumpet,"brass.cornett":s.MidiInstrument.Trumpet,"brass.cornett.tenor":s.MidiInstrument.Trumpet,"brass.cornettino":s.MidiInstrument.Trumpet,"brass.didgeridoo":s.MidiInstrument.Flute,"brass.euphonium":s.MidiInstrument.French_Horn,"brass.fiscorn":s.MidiInstrument.French_Horn,"brass.flugelhorn":s.MidiInstrument.French_Horn,"brass.french-horn":s.MidiInstrument.French_Horn,"brass.group":s.MidiInstrument.Brass_Section,"brass.group.synth":s.MidiInstrument.Synth_Brass_1,"brass.helicon":s.MidiInstrument.French_Horn,"brass.horagai":s.MidiInstrument.Trumpet,"brass.kuhlohorn":s.MidiInstrument.French_Horn,"brass.mellophone":s.MidiInstrument.French_Horn,"brass.natural-horn":s.MidiInstrument.French_Horn,"brass.ophicleide":s.MidiInstrument.French_Horn,"brass.posthorn":s.MidiInstrument.French_Horn,"brass.saxhorn":s.MidiInstrument.French_Horn,"brass.sousaphone":s.MidiInstrument.Tuba,"brass.trombone":s.MidiInstrument.Trombone,"brass.trombone.alto":s.MidiInstrument.Trombone,"brass.trombone.bass":s.MidiInstrument.Trombone,"brass.trombone.contrabass":s.MidiInstrument.Trombone,"brass.trombone.tenor":s.MidiInstrument.Trombone,"brass.trumpet":s.MidiInstrument.Trumpet,"brass.trumpet.baroque":s.MidiInstrument.Trumpet,"brass.trumpet.bass":s.MidiInstrument.Trombone,"brass.trumpet.bflat":s.MidiInstrument.Trumpet,"brass.trumpet.c":s.MidiInstrument.Trumpet,"brass.trumpet.d":s.MidiInstrument.Trumpet,"brass.trumpet.piccolo":s.MidiInstrument.Trumpet,"brass.trumpet.pocket":s.MidiInstrument.Trumpet,"brass.trumpet.slide":s.MidiInstrument.Trumpet,"brass.trumpet.tenor":s.MidiInstrument.Trumpet,"brass.tuba":s.MidiInstrument.Tuba,"brass.tuba.bass":s.MidiInstrument.Tuba,"brass.tuba.subcontrabass":s.MidiInstrument.Tuba,"brass.vienna-horn":s.MidiInstrument.French_Horn,"brass.wagner-tuba":s.MidiInstrument.French_Horn,"drum.ashiko":s.MidiInstrument.Shakuhachi,"drum.bass-drum":s.MidiInstrument.Percussion,"drum.bongo":s.MidiInstrument.Percussion,"drum.bougarabou":s.MidiInstrument.Percussion,"drum.buffalo-drum":s.MidiInstrument.Percussion,"drum.cajon":s.MidiInstrument.Percussion,"drum.chenda":s.MidiInstrument.Percussion,"drum.chu-daiko":s.MidiInstrument.Percussion,"drum.conga":s.MidiInstrument.Percussion,"drum.cuica":s.MidiInstrument.Percussion,"drum.dabakan":s.MidiInstrument.Percussion,"drum.daff":s.MidiInstrument.Percussion,"drum.dafli":s.MidiInstrument.Percussion,"drum.daibyosi":s.MidiInstrument.Percussion,"drum.damroo":s.MidiInstrument.Percussion,"drum.darabuka":s.MidiInstrument.Percussion,"drum.def":s.MidiInstrument.Percussion,"drum.dhol":s.MidiInstrument.Percussion,"drum.dholak":s.MidiInstrument.Percussion,"drum.djembe":s.MidiInstrument.Percussion,"drum.doira":s.MidiInstrument.Percussion,"drum.dondo":s.MidiInstrument.Percussion,"drum.doun-doun-ba":s.MidiInstrument.Percussion,"drum.duff":s.MidiInstrument.Percussion,"drum.dumbek":s.MidiInstrument.Percussion,"drum.fontomfrom":s.MidiInstrument.Percussion,"drum.frame-drum":s.MidiInstrument.Percussion,"drum.frame-drum.arabian":s.MidiInstrument.Percussion,"drum.geduk":s.MidiInstrument.Percussion,"drum.ghatam":s.MidiInstrument.Percussion,"drum.gome":s.MidiInstrument.Percussion,"drum.group":s.MidiInstrument.Percussion,"drum.group.chinese":s.MidiInstrument.Percussion,"drum.group.ewe":s.MidiInstrument.Percussion,"drum.group.indian":s.MidiInstrument.Percussion,"drum.group.set":s.MidiInstrument.Percussion,"drum.hand-drum":s.MidiInstrument.Percussion,"drum.hira-daiko":s.MidiInstrument.Percussion,"drum.ibo":s.MidiInstrument.Percussion,"drum.igihumurizo":s.MidiInstrument.Percussion,"drum.inyahura":s.MidiInstrument.Percussion,"drum.ishakwe":s.MidiInstrument.Percussion,"drum.jang-gu":s.MidiInstrument.Percussion,"drum.kagan":s.MidiInstrument.Percussion,"drum.kakko":s.MidiInstrument.Percussion,"drum.kanjira":s.MidiInstrument.Percussion,"drum.kendhang":s.MidiInstrument.Percussion,"drum.kendhang.ageng":s.MidiInstrument.Percussion,"drum.kendhang.ciblon":s.MidiInstrument.Percussion,"drum.kenkeni":s.MidiInstrument.Percussion,"drum.khol":s.MidiInstrument.Percussion,"drum.kick-drum":s.MidiInstrument.Percussion,"drum.kidi":s.MidiInstrument.Percussion,"drum.ko-daiko":s.MidiInstrument.Percussion,"drum.kpanlogo":s.MidiInstrument.Percussion,"drum.kudum":s.MidiInstrument.Percussion,"drum.lambeg":s.MidiInstrument.Percussion,"drum.lion-drum":s.MidiInstrument.Percussion,"drum.log-drum":s.MidiInstrument.Percussion,"drum.log-drum.african":s.MidiInstrument.Percussion,"drum.log-drum.native":s.MidiInstrument.Percussion,"drum.log-drum.nigerian":s.MidiInstrument.Percussion,"drum.madal":s.MidiInstrument.Percussion,"drum.maddale":s.MidiInstrument.Percussion,"drum.mridangam":s.MidiInstrument.Percussion,"drum.naal":s.MidiInstrument.Percussion,"drum.nagado-daiko":s.MidiInstrument.Percussion,"drum.nagara":s.MidiInstrument.Percussion,"drum.naqara":s.MidiInstrument.Percussion,"drum.o-daiko":s.MidiInstrument.Percussion,"drum.okawa":s.MidiInstrument.Percussion,"drum.okedo-daiko":s.MidiInstrument.Percussion,"drum.pahu-hula":s.MidiInstrument.Percussion,"drum.pakhawaj":s.MidiInstrument.Percussion,"drum.pandeiro":s.MidiInstrument.Percussion,"drum.pandero":s.MidiInstrument.Percussion,"drum.powwow":s.MidiInstrument.Percussion,"drum.pueblo":s.MidiInstrument.Percussion,"drum.repinique":s.MidiInstrument.Percussion,"drum.riq":s.MidiInstrument.Percussion,"drum.rototom":s.MidiInstrument.Percussion,"drum.sabar":s.MidiInstrument.Percussion,"drum.sakara":s.MidiInstrument.Percussion,"drum.sampho":s.MidiInstrument.Percussion,"drum.sangban":s.MidiInstrument.Percussion,"drum.shime-daiko":s.MidiInstrument.Percussion,"drum.slit-drum":s.MidiInstrument.Percussion,"drum.slit-drum.krin":s.MidiInstrument.Percussion,"drum.snare-drum":s.MidiInstrument.Percussion,"drum.snare-drum.electric":s.MidiInstrument.Synth_Drum,"drum.sogo":s.MidiInstrument.Percussion,"drum.surdo":s.MidiInstrument.Percussion,"drum.tabla":s.MidiInstrument.Percussion,"drum.tabla.bayan":s.MidiInstrument.Percussion,"drum.tabla.dayan":s.MidiInstrument.Percussion,"drum.tabor":s.MidiInstrument.Percussion,"drum.taiko":s.MidiInstrument.Taiko_Drum,"drum.talking":s.MidiInstrument.Percussion,"drum.tama":s.MidiInstrument.Percussion,"drum.tamborim":s.MidiInstrument.Percussion,"drum.tamborita":s.MidiInstrument.Percussion,"drum.tambourine":s.MidiInstrument.Percussion,"drum.tamte":s.MidiInstrument.Percussion,"drum.tangku":s.MidiInstrument.Percussion,"drum.tan-tan":s.MidiInstrument.Percussion,"drum.taphon":s.MidiInstrument.Percussion,"drum.tar":s.MidiInstrument.Percussion,"drum.tasha":s.MidiInstrument.Percussion,"drum.tenor-drum":s.MidiInstrument.Percussion,"drum.teponaxtli":s.MidiInstrument.Percussion,"drum.thavil":s.MidiInstrument.Percussion,"drum.the-box":s.MidiInstrument.Percussion,"drum.timbale":s.MidiInstrument.Percussion,"drum.timpani":s.MidiInstrument.Timpani,"drum.tinaja":s.MidiInstrument.Percussion,"drum.toere":s.MidiInstrument.Percussion,"drum.tombak":s.MidiInstrument.Percussion,"drum.tom-tom":s.MidiInstrument.Melodic_Tom,"drum.tom-tom.synth":s.MidiInstrument.Melodic_Tom,"drum.tsuzumi":s.MidiInstrument.Percussion,"drum.tumbak":s.MidiInstrument.Percussion,"drum.uchiwa-daiko":s.MidiInstrument.Percussion,"drum.udaku":s.MidiInstrument.Percussion,"drum.udu":s.MidiInstrument.Percussion,"drum.zarb":s.MidiInstrument.Percussion,"effect.applause":s.MidiInstrument.Applause,"effect.gunshot":s.MidiInstrument.Gunshot,"effect.helicopter":s.MidiInstrument.Helicopter,"effect.telephone-ring":s.MidiInstrument.Telephone_Ring,"keyboard.accordion":s.MidiInstrument.Accordion,"keyboard.bandoneon":s.MidiInstrument.Accordion,"keyboard.celesta":s.MidiInstrument.Celesta,"keyboard.clavichord":s.MidiInstrument.Harpsichord,"keyboard.clavichord.synth":s.MidiInstrument.Harpsichord,"keyboard.concertina":s.MidiInstrument.Accordion,"keyboard.fortepiano":s.MidiInstrument.Acoustic_Grand_Piano,"keyboard.harmonium":s.MidiInstrument.Drawbar_Organ,"keyboard.harpsichord":s.MidiInstrument.Harpsichord,"keyboard.ondes-martenot":s.MidiInstrument.Pad_3_polysynth,"keyboard.organ":s.MidiInstrument.Church_Organ,"keyboard.organ.drawbar":s.MidiInstrument.Percussive_Organ,"keyboard.organ.percussive":s.MidiInstrument.Rock_Organ,"keyboard.organ.pipe":s.MidiInstrument.Church_Organ,"keyboard.organ.reed":s.MidiInstrument.Church_Organ,"keyboard.organ.rotary":s.MidiInstrument.Rock_Organ,"keyboard.piano":s.MidiInstrument.Acoustic_Grand_Piano,"keyboard.piano.electric":s.MidiInstrument.Electric_Grand_Piano,"keyboard.piano.grand":s.MidiInstrument.Acoustic_Grand_Piano,"keyboard.piano.honky-tonk":s.MidiInstrument.Honky_tonk_Piano,"keyboard.piano.prepared":s.MidiInstrument.Acoustic_Grand_Piano,"keyboard.piano.toy":s.MidiInstrument.Honky_tonk_Piano,"keyboard.piano.upright":s.MidiInstrument.Acoustic_Grand_Piano,"keyboard.virginal":s.MidiInstrument.Acoustic_Grand_Piano,"metal.adodo":s.MidiInstrument.Xylophone,"metal.anvil":s.MidiInstrument.Xylophone,"metal.babendil":s.MidiInstrument.Xylophone,"metal.bells.agogo":s.MidiInstrument.Agogo,"metal.bells.almglocken":s.MidiInstrument.Tubular_Bells,"metal.bells.bell-plate":s.MidiInstrument.Tubular_Bells,"metal.bells.bell-tree":s.MidiInstrument.Tubular_Bells,"metal.bells.carillon":s.MidiInstrument.Tubular_Bells,"metal.bells.chimes":s.MidiInstrument.Tinkle_Bell,"metal.bells.chimta":s.MidiInstrument.Tubular_Bells,"metal.bells.chippli":s.MidiInstrument.Tubular_Bells,"metal.bells.church":s.MidiInstrument.Tubular_Bells,"metal.bells.cowbell":s.MidiInstrument.Percussion,"metal.bells.dawuro":s.MidiInstrument.Percussion,"metal.bells.gankokwe":s.MidiInstrument.Percussion,"metal.bells.ghungroo":s.MidiInstrument.Percussion,"metal.bells.hatheli":s.MidiInstrument.Percussion,"metal.bells.jingle-bell":s.MidiInstrument.Percussion,"metal.bells.khartal":s.MidiInstrument.Percussion,"metal.bells.mark-tree":s.MidiInstrument.Percussion,"metal.bells.sistrum":s.MidiInstrument.Percussion,"metal.bells.sleigh-bells":s.MidiInstrument.Percussion,"metal.bells.temple":s.MidiInstrument.Percussion,"metal.bells.tibetan":s.MidiInstrument.Percussion,"metal.bells.tinklebell":s.MidiInstrument.Percussion,"metal.bells.trychel":s.MidiInstrument.Percussion,"metal.bells.wind-chimes":s.MidiInstrument.Percussion,"metal.bells.zills":s.MidiInstrument.Percussion,"metal.berimbau":s.MidiInstrument.Flute,"metal.brake-drums":s.MidiInstrument.Percussion,"metal.crotales":s.MidiInstrument.Percussion,"metal.cymbal.bo":s.MidiInstrument.Percussion,"metal.cymbal.ceng-ceng":s.MidiInstrument.Percussion,"metal.cymbal.chabara":s.MidiInstrument.Percussion,"metal.cymbal.chinese":s.MidiInstrument.Percussion,"metal.cymbal.ching":s.MidiInstrument.Percussion,"metal.cymbal.clash":s.MidiInstrument.Percussion,"metal.cymbal.crash":s.MidiInstrument.Percussion,"metal.cymbal.finger":s.MidiInstrument.Percussion,"metal.cymbal.hand":s.MidiInstrument.Percussion,"metal.cymbal.kesi":s.MidiInstrument.Percussion,"metal.cymbal.manjeera":s.MidiInstrument.Percussion,"metal.cymbal.reverse":s.MidiInstrument.Percussion,"metal.cymbal.ride":s.MidiInstrument.Percussion,"metal.cymbal.sizzle":s.MidiInstrument.Percussion,"metal.cymbal.splash":s.MidiInstrument.Percussion,"metal.cymbal.suspended":s.MidiInstrument.Percussion,"metal.cymbal.tebyoshi":s.MidiInstrument.Percussion,"metal.cymbal.tibetan":s.MidiInstrument.Percussion,"metal.cymbal.tingsha":s.MidiInstrument.Percussion,"metal.flexatone":s.MidiInstrument.Percussion,"metal.gong":s.MidiInstrument.Percussion,"metal.gong.ageng":s.MidiInstrument.Percussion,"metal.gong.agung":s.MidiInstrument.Percussion,"metal.gong.chanchiki":s.MidiInstrument.Percussion,"metal.gong.chinese":s.MidiInstrument.Percussion,"metal.gong.gandingan":s.MidiInstrument.Percussion,"metal.gong.kempul":s.MidiInstrument.Percussion,"metal.gong.kempyang":s.MidiInstrument.Percussion,"metal.gong.ketuk":s.MidiInstrument.Percussion,"metal.gong.kkwenggwari":s.MidiInstrument.Percussion,"metal.gong.luo":s.MidiInstrument.Percussion,"metal.gong.singing":s.MidiInstrument.Percussion,"metal.gong.thai":s.MidiInstrument.Percussion,"metal.guira":s.MidiInstrument.Percussion,"metal.hang":s.MidiInstrument.Percussion,"metal.hi-hat":s.MidiInstrument.Percussion,"metal.jaw-harp":s.MidiInstrument.Percussion,"metal.kengong":s.MidiInstrument.Percussion,"metal.murchang":s.MidiInstrument.Percussion,"metal.musical-saw":s.MidiInstrument.Percussion,"metal.singing-bowl":s.MidiInstrument.Percussion,"metal.spoons":s.MidiInstrument.Percussion,"metal.steel-drums":s.MidiInstrument.Percussion,"metal.tamtam":s.MidiInstrument.Percussion,"metal.thundersheet":s.MidiInstrument.Percussion,"metal.triangle":s.MidiInstrument.Percussion,"metal.washboard":s.MidiInstrument.Percussion,"pitched-percussion.angklung":s.MidiInstrument.Xylophone,"pitched-percussion.balafon":s.MidiInstrument.Xylophone,"pitched-percussion.bell-lyre":s.MidiInstrument.Xylophone,"pitched-percussion.bells":s.MidiInstrument.Tubular_Bells,"pitched-percussion.bianqing":s.MidiInstrument.Xylophone,"pitched-percussion.bianzhong":s.MidiInstrument.Xylophone,"pitched-percussion.bonang":s.MidiInstrument.Xylophone,"pitched-percussion.cimbalom":s.MidiInstrument.Xylophone,"pitched-percussion.crystal-glasses":s.MidiInstrument.Xylophone,"pitched-percussion.dan-tam-thap-luc":s.MidiInstrument.Xylophone,"pitched-percussion.fangxiang":s.MidiInstrument.Xylophone,"pitched-percussion.gandingan-a-kayo":s.MidiInstrument.Xylophone,"pitched-percussion.gangsa":s.MidiInstrument.Xylophone,"pitched-percussion.gender":s.MidiInstrument.Xylophone,"pitched-percussion.giying":s.MidiInstrument.Xylophone,"pitched-percussion.glass-harmonica":s.MidiInstrument.Xylophone,"pitched-percussion.glockenspiel":s.MidiInstrument.Glockenspiel,"pitched-percussion.glockenspiel.alto":s.MidiInstrument.Glockenspiel,"pitched-percussion.glockenspiel.soprano":s.MidiInstrument.Glockenspiel,"pitched-percussion.gyil":s.MidiInstrument.Xylophone,"pitched-percussion.hammer-dulcimer":s.MidiInstrument.Dulcimer,"pitched-percussion.handbells":s.MidiInstrument.Tubular_Bells,"pitched-percussion.handchimes":s.MidiInstrument.Tubular_Bells,"pitched-percussion.kalimba":s.MidiInstrument.Kalimba,"pitched-percussion.kantil":s.MidiInstrument.Xylophone,"pitched-percussion.khim":s.MidiInstrument.Xylophone,"pitched-percussion.kulintang":s.MidiInstrument.Xylophone,"pitched-percussion.kulintang-a-kayo":s.MidiInstrument.Xylophone,"pitched-percussion.kulintang-a-tiniok":s.MidiInstrument.Xylophone,"pitched-percussion.likembe":s.MidiInstrument.Xylophone,"pitched-percussion.luntang":s.MidiInstrument.Xylophone,"pitched-percussion.marimba":s.MidiInstrument.Marimba,"pitched-percussion.marimba.bass":s.MidiInstrument.Marimba,"pitched-percussion.mbira":s.MidiInstrument.Marimba,"pitched-percussion.mbira.array":s.MidiInstrument.Marimba,"pitched-percussion.metallophone":s.MidiInstrument.Xylophone,"pitched-percussion.metallophone.alto":s.MidiInstrument.Xylophone,"pitched-percussion.metallophone.bass":s.MidiInstrument.Xylophone,"pitched-percussion.metallophone.soprano":s.MidiInstrument.Xylophone,"pitched-percussion.music-box":s.MidiInstrument.Glockenspiel,"pitched-percussion.pelog-panerus":s.MidiInstrument.Xylophone,"pitched-percussion.pemade":s.MidiInstrument.Xylophone,"pitched-percussion.penyacah":s.MidiInstrument.Xylophone,"pitched-percussion.ranat.ek":s.MidiInstrument.Xylophone,"pitched-percussion.ranat.ek-lek":s.MidiInstrument.Xylophone,"pitched-percussion.ranat.thum":s.MidiInstrument.Xylophone,"pitched-percussion.ranat.thum-lek":s.MidiInstrument.Xylophone,"pitched-percussion.reyong":s.MidiInstrument.Xylophone,"pitched-percussion.sanza":s.MidiInstrument.Xylophone,"pitched-percussion.saron-barung":s.MidiInstrument.Xylophone,"pitched-percussion.saron-demong":s.MidiInstrument.Xylophone,"pitched-percussion.saron-panerus":s.MidiInstrument.Xylophone,"pitched-percussion.slendro-panerus":s.MidiInstrument.Xylophone,"pitched-percussion.slentem":s.MidiInstrument.Xylophone,"pitched-percussion.tsymbaly":s.MidiInstrument.Xylophone,"pitched-percussion.tubes":s.MidiInstrument.Tubular_Bells,"pitched-percussion.tubular-bells":s.MidiInstrument.Tubular_Bells,"pitched-percussion.vibraphone":s.MidiInstrument.Vibraphone,"pitched-percussion.xylophone":s.MidiInstrument.Xylophone,"pitched-percussion.xylophone.alto":s.MidiInstrument.Xylophone,"pitched-percussion.xylophone.bass":s.MidiInstrument.Xylophone,"pitched-percussion.xylophone.soprano":s.MidiInstrument.Xylophone,"pitched-percussion.xylorimba":s.MidiInstrument.Xylophone,"pitched-percussion.yangqin":s.MidiInstrument.Xylophone,"pluck.archlute":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.autoharp":s.MidiInstrument.Orchestral_Harp,"pluck.baglama":s.MidiInstrument.Orchestral_Harp,"pluck.bajo":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.alto":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.bass":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.contrabass":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.piccolo":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.prima":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.secunda":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.bandola":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.bandura":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.bandurria":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.banjo":s.MidiInstrument.Banjo,"pluck.banjo.tenor":s.MidiInstrument.Banjo,"pluck.banjolele":s.MidiInstrument.Banjo,"pluck.barbat":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.bass":s.MidiInstrument.Electric_Bass_finger,"pluck.bass.acoustic":s.MidiInstrument.Acoustic_Bass,"pluck.bass.bolon":s.MidiInstrument.Electric_Bass_finger,"pluck.bass.electric":s.MidiInstrument.Electric_Bass_finger,"pluck.bass.fretless":s.MidiInstrument.Fretless_Bass,"pluck.bass.guitarron":s.MidiInstrument.Acoustic_Bass,"pluck.bass.synth":s.MidiInstrument.Synth_Bass_1,"pluck.bass.synth.lead":s.MidiInstrument.Synth_Bass_2,"pluck.celtic-harp":s.MidiInstrument.Orchestral_Harp,"pluck.charango":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.chitarra-battente":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.cithara":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.cittern":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.cuatro":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.dulcimer":s.MidiInstrument.Dulcimer,"pluck.dutar":s.MidiInstrument.Acoustic_Grand_Piano,"pluck.duxianqin":s.MidiInstrument.Dulcimer,"pluck.ektara":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.acoustic":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.electric":s.MidiInstrument.Electric_Guitar_clean,"pluck.guitar.nylon-string":s.MidiInstrument.Electric_Guitar_clean,"pluck.guitar.pedal-steel":s.MidiInstrument.Electric_Guitar_clean,"pluck.guitar.portuguese":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.requinto":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.resonator":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.steel-string":s.MidiInstrument.Acoustic_Guitar_steel,"pluck.harp":s.MidiInstrument.Orchestral_Harp,"pluck.harp-guitar":s.MidiInstrument.Orchestral_Harp,"pluck.huapanguera":s.MidiInstrument.Orchestral_Harp,"pluck.lute":s.MidiInstrument.Acoustic_Grand_Piano,"pluck.lyre":s.MidiInstrument.Orchestral_Harp,"pluck.mandobass":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandocello":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandola":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandolin":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandolin.octave":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.setar":s.MidiInstrument.Acoustic_Guitar_nylon,"pluck.shamisen":s.MidiInstrument.Shamisen,"pluck.sitar":s.MidiInstrument.Sitar,"pluck.synth":s.MidiInstrument.Electric_Bass_pick,"pluck.synth.charang":s.MidiInstrument.Electric_Bass_pick,"pluck.synth.chiff":s.MidiInstrument.Electric_Bass_pick,"pluck.synth.stick":s.MidiInstrument.Electric_Bass_pick,"pluck.tambura":s.MidiInstrument.Acoustic_Grand_Piano,"pluck.ukulele":s.MidiInstrument.Banjo,"pluck.ukulele.tenor":s.MidiInstrument.Banjo,"strings.arpeggione":s.MidiInstrument.Cello,"strings.cello":s.MidiInstrument.Cello,"strings.cello.piccolo":s.MidiInstrument.Cello,"strings.contrabass":s.MidiInstrument.Contrabass,"strings.fiddle":s.MidiInstrument.Fiddle,"strings.fiddle.hardanger":s.MidiInstrument.Fiddle,"strings.group":s.MidiInstrument.String_Ensemble_1,"strings.group.synth":s.MidiInstrument.Synth_Strings_1,"strings.octobass":s.MidiInstrument.Contrabass,"strings.tromba-marina":s.MidiInstrument.Contrabass,"strings.vielle":s.MidiInstrument.Violin,"strings.viol":s.MidiInstrument.Violin,"strings.viol.alto":s.MidiInstrument.Violin,"strings.viol.bass":s.MidiInstrument.Violin,"strings.viol.tenor":s.MidiInstrument.Violin,"strings.viol.treble":s.MidiInstrument.Violin,"strings.viol.violone":s.MidiInstrument.Violin,"strings.viola":s.MidiInstrument.Viola,"strings.viola-damore":s.MidiInstrument.Viola,"strings.violin":s.MidiInstrument.Violin,"strings.violono.piccolo":s.MidiInstrument.Violin,"strings.violotta":s.MidiInstrument.Viola,"synth.group":s.MidiInstrument.Pad_3_polysynth,"synth.group.fifths":s.MidiInstrument.Pad_3_polysynth,"synth.group.orchestra":s.MidiInstrument.Orchestra_Hit,"synth.pad":s.MidiInstrument.Pad_1_new_age,"synth.pad.bowed":s.MidiInstrument.Pad_1_new_age,"synth.pad.choir":s.MidiInstrument.Pad_4_choir,"synth.pad.halo":s.MidiInstrument.Acoustic_Grand_Piano,"synth.pad.polysynth":s.MidiInstrument.Pad_3_polysynth,"voice.alto":s.MidiInstrument.Voice_Oohs,"voice.baritone":s.MidiInstrument.Voice_Oohs,"voice.bass":s.MidiInstrument.Voice_Oohs,"voice.female":s.MidiInstrument.Synth_Voice,"voice.kazoo":s.MidiInstrument.Flute,"voice.male":s.MidiInstrument.Voice_Oohs,"voice.mezzo-soprano":s.MidiInstrument.Voice_Oohs,"voice.soprano":s.MidiInstrument.Voice_Oohs,"voice.synth":s.MidiInstrument.Synth_Voice,"voice.tenor":s.MidiInstrument.Voice_Oohs,"voice.vocals":s.MidiInstrument.Choir_Aahs,"wind.flutes.flute":s.MidiInstrument.Flute,"wind.flutes.flute.alto":s.MidiInstrument.Flute,"wind.flutes.flute.bass":s.MidiInstrument.Flute,"wind.flutes.flute.contra-alto":s.MidiInstrument.Flute,"wind.flutes.flute.contrabass":s.MidiInstrument.Flute,"wind.flutes.flute.double-contrabass":s.MidiInstrument.Flute,"wind.flutes.flute.irish":s.MidiInstrument.Flute,"wind.flutes.flute.piccolo":s.MidiInstrument.Piccolo,"wind.flutes.flute.subcontrabass":s.MidiInstrument.Flute,"wind.flutes.ocarina":s.MidiInstrument.Ocarina,"wind.flutes.panpipes":s.MidiInstrument.Pan_Flute,"wind.flutes.recorder":s.MidiInstrument.Acoustic_Grand_Piano,"wind.flutes.recorder.alto":s.MidiInstrument.Recorder,"wind.flutes.recorder.bass":s.MidiInstrument.Recorder,"wind.flutes.recorder.contrabass":s.MidiInstrument.Recorder,"wind.flutes.recorder.descant":s.MidiInstrument.Recorder,"wind.flutes.recorder.garklein":s.MidiInstrument.Recorder,"wind.flutes.recorder.great-bass":s.MidiInstrument.Recorder,"wind.flutes.recorder.sopranino":s.MidiInstrument.Recorder,"wind.flutes.recorder.soprano":s.MidiInstrument.Recorder,"wind.flutes.recorder.tenor":s.MidiInstrument.Recorder,"wind.flutes.shakuhachi":s.MidiInstrument.Shakuhachi,"wind.flutes.whistle":s.MidiInstrument.Whistle,"wind.flutes.whistle.alto":s.MidiInstrument.Whistle,"wind.flutes.whistle.low-irish":s.MidiInstrument.Whistle,"wind.flutes.whistle.shiva":s.MidiInstrument.Whistle,"wind.flutes.whistle.slide":s.MidiInstrument.Whistle,"wind.flutes.whistle.tin":s.MidiInstrument.Whistle,"wind.flutes.whistle.tin.bflat":s.MidiInstrument.Whistle,"wind.flutes.whistle.tin.c":s.MidiInstrument.Whistle,"wind.flutes.whistle.tin.d":s.MidiInstrument.Whistle,"wind.group":s.MidiInstrument.Flute,"wind.pipes.bagpipes":s.MidiInstrument.Bag_pipe,"wind.reed.basset-horn":s.MidiInstrument.Bassoon,"wind.reed.bassoon":s.MidiInstrument.Bassoon,"wind.reed.bombarde":s.MidiInstrument.Bassoon,"wind.reed.clarinet":s.MidiInstrument.Clarinet,"wind.reed.clarinet.a":s.MidiInstrument.Clarinet,"wind.reed.clarinet.alto":s.MidiInstrument.Clarinet,"wind.reed.clarinet.bass":s.MidiInstrument.Clarinet,"wind.reed.clarinet.basset":s.MidiInstrument.Clarinet,"wind.reed.clarinet.bflat":s.MidiInstrument.Clarinet,"wind.reed.clarinet.contra-alto":s.MidiInstrument.Clarinet,"wind.reed.clarinet.contrabass":s.MidiInstrument.Clarinet,"wind.reed.clarinet.d":s.MidiInstrument.Clarinet,"wind.reed.clarinet.eflat":s.MidiInstrument.Clarinet,"wind.reed.clarinet.g":s.MidiInstrument.Clarinet,"wind.reed.clarinet.piccolo":s.MidiInstrument.Clarinet,"wind.reed.clarinet.piccolo.aflat":s.MidiInstrument.Clarinet,"wind.reed.clarinette-damour":s.MidiInstrument.Clarinet,"wind.reed.contrabass":s.MidiInstrument.Clarinet,"wind.reed.contrabassoon":s.MidiInstrument.Clarinet,"wind.reed.cornamuse":s.MidiInstrument.Bag_pipe,"wind.reed.english-horn":s.MidiInstrument.English_Horn,"wind.reed.harmonica":s.MidiInstrument.Harmonica,"wind.reed.harmonica.bass":s.MidiInstrument.Harmonica,"wind.reed.oboe":s.MidiInstrument.Oboe,"wind.reed.oboe.bass":s.MidiInstrument.Oboe,"wind.reed.oboe.piccolo":s.MidiInstrument.Oboe,"wind.reed.oboe-da-caccia":s.MidiInstrument.Oboe,"wind.reed.oboe-damore":s.MidiInstrument.Oboe,"wind.reed.saxonette":s.MidiInstrument.Soprano_Sax,"wind.reed.saxophone":s.MidiInstrument.Alto_Sax,"wind.reed.saxophone.alto":s.MidiInstrument.Alto_Sax,"wind.reed.saxophone.aulochrome":s.MidiInstrument.Alto_Sax,"wind.reed.saxophone.baritone":s.MidiInstrument.Baritone_Sax,"wind.reed.saxophone.bass":s.MidiInstrument.Baritone_Sax,"wind.reed.saxophone.contrabass":s.MidiInstrument.Baritone_Sax,"wind.reed.saxophone.melody":s.MidiInstrument.Baritone_Sax,"wind.reed.saxophone.mezzo-soprano":s.MidiInstrument.Alto_Sax,"wind.reed.saxophone.sopranino":s.MidiInstrument.Soprano_Sax,"wind.reed.saxophone.sopranissimo":s.MidiInstrument.Soprano_Sax,"wind.reed.saxophone.soprano":s.MidiInstrument.Soprano_Sax,"wind.reed.saxophone.subcontrabass":s.MidiInstrument.Baritone_Sax,"wind.reed.saxophone.tenor":s.MidiInstrument.Tenor_Sax,"wood.bones":s.MidiInstrument.Woodblock,"wood.castanets":s.MidiInstrument.Woodblock,"wood.claves":s.MidiInstrument.Woodblock,"wood.drum-sticks":s.MidiInstrument.Woodblock,"wood.gourd":s.MidiInstrument.Woodblock,"wood.granite-block":s.MidiInstrument.Woodblock,"wood.guban":s.MidiInstrument.Woodblock,"wood.guiro":s.MidiInstrument.Woodblock,"wood.hyoushigi":s.MidiInstrument.Woodblock,"wood.ipu":s.MidiInstrument.Woodblock,"wood.jam-block":s.MidiInstrument.Woodblock,"wood.kaekeeke":s.MidiInstrument.Woodblock,"wood.kagul":s.MidiInstrument.Woodblock,"wood.kalaau":s.MidiInstrument.Woodblock,"wood.kashiklar":s.MidiInstrument.Woodblock,"wood.kubing":s.MidiInstrument.Woodblock,"wood.pan-clappers":s.MidiInstrument.Woodblock,"wood.sand-block":s.MidiInstrument.Woodblock,"wood.slapstick":s.MidiInstrument.Woodblock,"wood.stir-drum":s.MidiInstrument.Woodblock,"wood.temple-block":s.MidiInstrument.Woodblock,"wood.tic-toc-block":s.MidiInstrument.Woodblock,"wood.tonetang":s.MidiInstrument.Woodblock,"wood.wood-block":s.MidiInstrument.Woodblock}},884:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InstrumentalGroup=void 0,e.InstrumentalGroup=class{constructor(t,e,i){this.instrumentalGroups=[],this.name=t,this.musicSheet=e,this.parent=i}get InstrumentalGroups(){return this.instrumentalGroups}get Parent(){return this.parent}get Name(){return this.name}set Name(t){this.name=t}get GetMusicSheet(){return this.musicSheet}}},7181:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&s(e,t,i);return n(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.AUIController=void 0;const o=r(i(177));e.AUIController=class{constructor(t=document.body,e=!1,i="beforeend"){this.eventListeners=[],this.parentElement=t,this.insertLocation=i,this.isTouchDevice=e,this.initialize()}addListener(t){this.eventListeners.push(t)}generateHtmlTemplate(t,e={}){return o.compile(t)(e)}generateAndInsertHtmlTemplate(t,e={},i=this.insertLocation,s=this.parentElement){const n=this.generateHtmlTemplate(t,e);s.insertAdjacentHTML(i,n)}get downEventName(){return this.isTouchDevice?"ontouchstart":"onmousedown"}get upEventName(){return this.isTouchDevice?"ontouchend":"onmouseup"}get moveEventName(){return this.isTouchDevice?"ontouchmove":"onmousemove"}}},9603:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},7058:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},6287:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},4543:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},4207:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},6331:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextTranslation=void 0,e.ITextTranslation=class{static translateText(t,e){if(!this.defaultTextTranslation)return e}}},9984:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},4854:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},4143:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(9603),e),n(i(7058),e),n(i(6287),e),n(i(4207),e),n(i(6331),e),n(i(9984),e),n(i(7181),e),n(i(4854),e),n(i(4543),e)},2255:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Label=void 0;const s=i(1274),n=i(96);e.Label=class{constructor(t="",e=s.TextAlignmentEnum.CenterBottom,i=void 0,n=!0){this.IsCreditLabel=!1,this.isLyricText=!1,this.text=t,this.print=n,this.textAlignment=e,this.font=i,this.fontFamily=void 0}set font(t){this.fontEnumValue=t,this.fontFamily=n.FontStringNames[t]}get font(){return this.fontEnumValue}ToString(){return this.text}}},5278:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampTransform=e.MusicPartManager=void 0;const s=i(1797),n=i(301);e.MusicPartManager=class{constructor(t){this.musicSheet=t}reInit(){this.init()}init(){this.parts=this.musicSheet.Repetitions.slice(),this.sheetStart=this.musicSheet.SelectionStart=new s.Fraction(0,1),this.sheetEnd=this.musicSheet.SelectionEnd=this.musicSheet.SheetEndTimestamp,this.calcMapping()}getCurrentRepetitionTimestampTransform(t){let e;for(let i=this.timestamps.length-1;i>=0;i--)if(e=this.timestamps[i],t.gte(e.from))return e;return this.timestamps[0]}absoluteEnrolledToSheetTimestamp(t){if(0===this.timestamps.length)return t;const e=this.getCurrentRepetitionTimestampTransform(t);return s.Fraction.plus(t,s.Fraction.minus(e.to,e.from))}get Parts(){return this.parts}get MusicSheet(){return this.musicSheet}getIterator(t){return t?new n.MusicPartManagerIterator(this.musicSheet,t,void 0):new n.MusicPartManagerIterator(this.musicSheet,this.musicSheet.SelectionStart,this.musicSheet.SelectionEnd)}setSelectionStart(t){this.musicSheet.SelectionStart=t,this.musicSheet.SelectionEnd=void 0}setSelectionRange(t,e){this.musicSheet.SelectionStart=null!=t?t:this.sheetStart,this.musicSheet.SelectionEnd=null!=e?e:this.sheetEnd}calcMapping(){this.timestamps=[];const t=this.getIterator();let e=t.CurrentRepetition,i=new r(t.CurrentEnrolledTimestamp.clone(),t.CurrentSourceTimestamp.clone(),void 0,0);for(this.timestamps.push(i);!t.EndReached;){if(t.JumpOccurred||e!==t.CurrentRepetition){if(e=t.CurrentRepetition,t.backJumpOccurred){const e=t.JumpResponsibleRepetition;i.nextBackJump=t.CurrentEnrolledTimestamp,i.curRepetition=e,i.curRepetitionIteration=t.CurrentJumpResponsibleRepetitionIterationBeforeJump;for(let t=this.timestamps.length-2;t>=0&&!e.AbsoluteTimestamp.gt(this.timestamps[t].to)&&!this.timestamps[t].curRepetition;t--)this.timestamps[t].nextBackJump=i.nextBackJump,this.timestamps[t].curRepetition=e,this.timestamps[t].curRepetitionIteration=i.curRepetitionIteration}i=new r(t.CurrentEnrolledTimestamp.clone(),t.CurrentSourceTimestamp.clone(),void 0,0),this.timestamps.push(i)}t.moveToNext()}}};class r{constructor(t,e,i,s){this.from=t,this.to=e,this.curRepetition=i,this.curRepetitionIteration=s,this.nextBackJump=void 0,this.nextForwardJump=void 0}}e.TimestampTransform=r},301:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MusicPartManagerIterator=void 0;const n=i(1797),r=i(5356),o=i(3331),a=i(7839),l=s(i(2043)),h=i(530);class u{constructor(t,e,i){this.currentMeasureIndex=0,this.currentPartIndex=0,this.currentVoiceEntryIndex=-1,this.currentDynamicEntryIndex=0,this.currentTempoEntryIndex=0,this.currentDynamicChangingExpressions=[],this.repetitionIterationCountDictKeys=[],this.repetitionIterationCountDictValues=[],this.currentRepetition=void 0,this.endReached=!1,this.frontReached=!1,this.currentTimeStamp=new n.Fraction(0,1),this.currentEnrolledMeasureTimestamp=new n.Fraction(0,1),this.currentRelativeInMeasureTimestamp=new n.Fraction(0,1),this.currentVerticalContainerInMeasureTimestamp=new n.Fraction(0,1),this.jumpResponsibleRepetition=void 0,this.activeDynamicExpressions=[],this.SkipInvisibleNotes=!0,this.testNoteIdx=0;try{this.frontReached=!0,this.musicSheet=t,this.currentBpm=t.userStartTempoInBPM,this.currentVoiceEntries=void 0,this.frontReached=!1;for(const t of this.musicSheet.Repetitions)this.setRepetitionIterationCount(t,1);for(let e=0;e=this.JumpResponsibleRepetition.StartIndex&&i.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(i)}}handleRepetitionsAtMeasureEnd(){for(let t=0,e=this.currentMeasure.LastRepetitionInstructions.length;t-1&&this.getRepetitionIterationCount(i)=this.JumpResponsibleRepetition.StartIndex&&i.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(i),this.repetitionIterationCountDictKeys.contains(i))){const t=i.getForwardJumpTargetForIteration(this.getRepetitionIterationCount(i));if(t>=0)return this.currentMeasureIndex=t,this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentVoiceEntryIndex=-1,this.jumpResponsibleRepetition=i,void(this.forwardJumpOccurred=!0);-2===t&&(this.endReached=!0)}}}this.currentMeasureIndex++,void 0!==this.JumpResponsibleRepetition&&this.currentMeasureIndex>this.JumpResponsibleRepetition.EndIndex&&(this.jumpResponsibleRepetition=void 0)}doBackJump(t){this.currentMeasureIndex=t.getBackwardJumpTarget(),this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentVoiceEntryIndex=-1,this.incrementRepetitionIterationCount(t),this.jumpResponsibleRepetition=t,this.backJumpOccurred=!0}activateCurrentRhythmInstructions(){if(void 0!==this.currentMeasure&&this.currentMeasure.FirstInstructionsStaffEntries.length>0&&void 0!==this.currentMeasure.FirstInstructionsStaffEntries[0]){const t=this.currentMeasure.FirstInstructionsStaffEntries[0].Instructions;for(let e=0,i=t.length;e0&&(this.currentDynamicEntryIndex>=t.length||t[this.currentDynamicEntryIndex].parMultiExpression().AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentDynamicEntryIndex--;for(;this.currentDynamicEntryIndex0&&(this.currentTempoEntryIndex>=e.length||e[this.currentTempoEntryIndex].AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentTempoEntryIndex--;for(;this.currentTempoEntryIndex0){this.currentVoiceEntryIndex--;const t=this.currentMeasure.VerticalSourceStaffEntryContainers[this.currentVoiceEntryIndex];this.currentVoiceEntries=this.getVoiceEntries(t),this.currentVerticalContainerInMeasureTimestamp=t.Timestamp,this.currentTimeStamp=n.Fraction.plus(this.currentMeasure.AbsoluteTimestamp,this.currentVerticalContainerInMeasureTimestamp),this.activateCurrentDynamicOrTempoInstructions();const e=this.musicSheet.SelectionEnd;return e&&this.currentTimeStamp.lt(e)&&(this.endReached=!1),void(this.currentMeasureIndex=this.musicSheet.SourceMeasures.indexOf(this.CurrentMeasure))}if(0!==this.currentVoiceEntryIndex||0===this.currentMeasureIndex)this.frontReached=!0,this.currentTimeStamp=new n.Fraction(-1,1);else{const t=this.musicSheet.SourceMeasures[this.currentMeasureIndex-1];this.currentMeasureIndex--,this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex];const e=t.VerticalSourceStaffEntryContainers[t.VerticalSourceStaffEntryContainers.length-1];this.currentVoiceEntries=this.getVoiceEntries(e),this.currentVerticalContainerInMeasureTimestamp=e.Timestamp,this.currentVoiceEntryIndex=t.VerticalSourceStaffEntryContainers.length-1,this.currentTimeStamp=n.Fraction.plus(this.currentMeasure.AbsoluteTimestamp,e.Timestamp),this.activateCurrentDynamicOrTempoInstructions();const i=this.musicSheet.SelectionEnd;i&&this.currentTimeStamp.lt(i)&&(this.endReached=!1)}}recursiveMove(){var t,e,i,s;if(this.currentVoiceEntryIndex++,0===this.currentVoiceEntryIndex&&(this.handleRepetitionsAtMeasureBegin(),this.activateCurrentRhythmInstructions()),this.currentVoiceEntryIndex>=0&&this.currentVoiceEntryIndex=0&&this.currentMeasureIndex0){if(!t)return!0;for(let t=0,i=e.length;t0){const t=this.TimestampSortedTempoExpressionsList[0];if(t.InstantaneousTempo)return t.InstantaneousTempo.TempoInBpm;if(t.ContinuousTempo)return t.ContinuousTempo.StartTempo}return this.userStartTempoInBPM}get Errors(){return this.musicSheetErrors.measureErrors}get FirstMeasureNumber(){try{return this.getFirstSourceMeasure().MeasureNumber}catch(t){return d.default.info("MusicSheet.FirstMeasureNumber: ",t),0}}get LastMeasureNumber(){try{return this.getLastSourceMeasure().MeasureNumber}catch(t){return d.default.info("MusicSheet.LastMeasureNumber: ",t),0}}get CurrentEnrolledPosition(){return this.currentEnrolledPosition.clone()}set CurrentEnrolledPosition(t){this.currentEnrolledPosition=t.clone()}get Transpose(){return this.transpose}set Transpose(t){this.transpose=t}get FullNameString(){return this.ComposerString+" "+this.TitleString}get IdString(){return this.idString}set IdString(t){this.idString=t}getEnrolledSelectionStartTimeStampWorkaround(){const t=this.MusicPartManager.getIterator(this.SelectionStart);return n.Fraction.createFromFraction(t.CurrentEnrolledTimestamp)}get SheetEndTimestamp(){const t=this.getLastSourceMeasure();return n.Fraction.plus(t.AbsoluteTimestamp,t.Duration)}getSourceMeasureFromTimeStamp(t){for(let e=0,i=this.sourceMeasures.length;e0&&i.Voices[0].Visible&&t.push(i)}return t}}e.MusicSheet=g,g.defaultTitle="defaultTitle"},6656:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MappingSourceMusicPart=void 0,e.MappingSourceMusicPart=class{constructor(t,e,i,s=-1,n=!1){this.repetitionRun=-1,this.sourceMusicPart=t,this.parentPartListEntry=i,this.startTimestamp=e.clone(),this.repetitionRun=s,this.parentRepetition=i,this.isEnding=n}get IsRepetition(){return void 0!==this.parentRepetition}get IsEnding(){return this.isEnding}get IsLastRepetitionRun(){return this.IsRepetition&&this.repetitionRun+1===this.parentRepetition.UserNumberOfRepetitions}get RepetitionRun(){return this.repetitionRun}get ParentPartListEntry(){return this.parentPartListEntry}get SourceMusicPart(){return this.sourceMusicPart}get StartTimestamp(){return this.startTimestamp}CompareTo(t){return t?this.startTimestamp.CompareTo(t.startTimestamp):1}}},3766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartListEntry=void 0,e.PartListEntry=class{constructor(t){this.enrolledTimestamps=[],this.visible=!0,this.musicSheet=t}get Visible(){return this.visible}set Visible(t){this.visible=t}getFirstSourceMeasure(){return this.musicSheet.SourceMeasures[this.startIndex]}getLastSourceMeasure(){return this.musicSheet.SourceMeasures[this.endIndex]}}},1717:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RepetitionEndingPart=e.Repetition=void 0;const n=i(8817),r=i(1797),o=i(3766),a=s(i(2043));class l extends o.PartListEntry{constructor(t,e=!1){super(t),this.backwardJumpInstructions=[],this.endingParts=[],this.endingIndexDict={},this.userNumberOfRepetitions=0,this.visibles=[],this.fromWords=!1,this.repetitonIterationOrder=[],this.numberOfEndings=1,this.musicSheet2=t,this.virtualOverallRepetition=e}get BackwardJumpInstructions(){return this.backwardJumpInstructions}get EndingIndexDict(){return this.endingIndexDict}get EndingParts(){return this.endingParts}get Visibles(){return this.visibles}set Visibles(t){this.visibles=t}get DefaultNumberOfRepetitions(){let t=2;return this.virtualOverallRepetition&&(t=1),Math.max(t,Object.keys(this.endingIndexDict).length,this.checkRepetitionForMultipleLyricVerses())}get UserNumberOfRepetitions(){return this.userNumberOfRepetitions}set UserNumberOfRepetitions(t){this.userNumberOfRepetitions=t,this.repetitonIterationOrder=[];const e=this.userNumberOfRepetitions-this.NumberOfEndings;for(let t=1;t<=this.userNumberOfRepetitions;t++)t<=e?this.repetitonIterationOrder.push(1):this.repetitonIterationOrder.push(t-e)}getForwardJumpTargetForIteration(t){const e=this.repetitonIterationOrder[t-1];return this.endingIndexDict[e]?this.endingIndexDict[e].part.StartIndex:-1}getBackwardJumpTarget(){return this.startMarker.measureIndex}setEndingsStartIndex(t,e){const i=new h(new n.SourceMusicPart(this.musicSheet2,e,e));this.endingParts.push(i);for(const e of t)try{this.endingIndexDict[e]=i,i.endingIndices.push(e),this.numberOfEndings{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SourceMusicPart=void 0;const s=i(3766),n=i(1797);class r extends s.PartListEntry{constructor(t,e,i){super(t),this.musicSheet=t,this.startIndex=e,this.endIndex=i}get MeasuresCount(){return this.endIndex-this.startIndex+1}get StartIndex(){return this.startIndex}get EndIndex(){return this.endIndex}get ParentRepetition(){return this.parentRepetition}set ParentRepetition(t){this.parentRepetition=t}get AbsoluteTimestamp(){return n.Fraction.createFromFraction(this.musicSheet.SourceMeasures[this.startIndex].AbsoluteTimestamp)}setStartIndex(t){this.startIndex=t}setEndIndex(t){this.endIndex=t}}e.SourceMusicPart=r},4990:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(6656),e),n(i(3766),e),n(i(1717),e),n(i(8817),e)},4170:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaybackEntry=void 0;const s=i(8918),n=i(6591);e.PlaybackEntry=class{constructor(t){this.notes=[],this.TimestampShift=new s.Fraction,this.parentVoiceEntry=t;for(const e of t.Notes)this.Notes.push(new n.PlaybackNote(this,e))}get ParentVoiceEntry(){return this.parentVoiceEntry}get Notes(){return this.notes}get Length(){if(this.Notes.length>0)return this.Notes[0].Length}set Length(t){for(const e of this.Notes)e.Length=t}get HasNotes(){return this.Notes.length>0}}},9822:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaybackIterator=void 0;const s=i(1649),n=i(1566);e.PlaybackIterator=class{constructor(t){this.voiceCursors=new s.Dictionary,this.musicSheet=t;for(const e of t.PlaybackDataDict.keys()){const i=new n.VoicePlaybackData(e,t.PlaybackDataDict.getValue(e),t.Rules);this.voiceCursors.setValue(e,i)}this.Reset()}get NextEntryTimestamp(){return this.nextEntryTimestamp}get DueEntries(){return this.dueEntries}Update(t){const e=[];let i;for(const s of this.voiceCursors.values()){const n=s.update(t);e.push(...s.DueEntries),void 0!==n&&(void 0===i||i.RealValue>n.RealValue)&&(i=n)}return this.nextEntryTimestamp=i,this.dueEntries=e,this.DueEntries}Reset(){this.nextEntryTimestamp=void 0;const t=[];let e;for(const i of this.voiceCursors.values()){const s=i.reset(this.musicSheet.SelectionStart);t.push(...i.DueEntries),void 0!==s&&(void 0===e||e.RealValue>s.RealValue)&&(e=s)}return this.nextEntryTimestamp=e,this.dueEntries=t,this.nextEntryTimestamp}}},6591:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaybackNote=void 0;const s=i(6550),n=i(8918);class r{constructor(t,e){if(this.parentEntry=t,this.parentNote=e,this.ParentNote.PlaybackNote=this,this.Length=this.ParentNote.Length,void 0!==e.Pitch){const t=this.ParentNote.ParentStaff.ParentInstrument.MidiInstrumentId===s.MidiInstrument.Percussion;this.MidiKey=t?r.noteToMidiDrumKey(e):e.Pitch.getHalfTone()+12}else this.MidiKey=0}setLength(){void 0!==this.ParentNote.NoteTie&&this.ParentNote.NoteTie.StartNote===this.ParentNote&&(this.Length=this.ParentNote.NoteTie.Duration)}get ParentEntry(){return this.parentEntry}get ParentNote(){return this.parentNote}static noteToMidiDrumKey(t){var e;const i=t.Pitch.getHalfTone()-12,r=null===(e=t.Notehead)||void 0===e?void 0:e.Shape;switch(t.Pitch.Octave){case 1:switch(t.Pitch.FundamentalNote){case n.NoteEnum.D:return 44;case n.NoteEnum.E:return 35;case n.NoteEnum.F:return 36;case n.NoteEnum.G:return 41;case n.NoteEnum.A:return 43;case n.NoteEnum.B:return r===s.NoteHeadShape.TRIANGLE?54:47;default:return i}case 2:switch(t.Pitch.FundamentalNote){case n.NoteEnum.C:return r===s.NoteHeadShape.X?37:38;case n.NoteEnum.D:return r===s.NoteHeadShape.X?59:48;case n.NoteEnum.E:switch(r){case s.NoteHeadShape.X:return 42;case s.NoteHeadShape.CIRCLEX:return 46;case s.NoteHeadShape.TRIANGLE:return 56;default:return 50}case n.NoteEnum.F:return r===s.NoteHeadShape.DIAMOND?53:51;case n.NoteEnum.G:switch(r){case s.NoteHeadShape.CIRCLEX:case s.NoteHeadShape.DIAMOND:return 46;default:return 42}case n.NoteEnum.A:return 49;case n.NoteEnum.B:return 57;default:return i}case 3:return t.Pitch.FundamentalNote===n.NoteEnum.C?r===s.NoteHeadShape.CIRCLEX?52:55:i;default:return i}}}e.PlaybackNote=r},1596:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaybackNoteGenerator=void 0;const s=i(4257),n=i(8918);class r{calculate(t){const e=new s.MusicPartManagerIterator(t);for(;!e.EndReached;){const i=e.CurrentEnrolledTimestamp,s=e.CurrentAudibleVoiceEntries();for(const e of s)this.handleVoiceEntry(t,e,i);e.moveToNext()}}handleVoiceEntry(t,e,i){if(e.IsGrace)return;const s=e.ParentVoice;let o;t.PlaybackDataDict.containsKey(s)?o=t.PlaybackDataDict.getValue(s):(o=[],t.PlaybackDataDict.setValue(s,o));for(const t of e.PlaybackEntries)if(t.HasNotes){for(const e of t.Notes)e.setLength();const e=n.Fraction.plus(i,t.TimestampShift);r.addEntrySorted(o,t,e)}}static addEntrySorted(t,e,i){if(0===t.length)t.push({enrolledTimestamp:i,playbackEntry:e});else for(let s=t.length-1;s>=0;s--){const n=t[s];if(i.RealValue>n.enrolledTimestamp.RealValue){if(s===t.length-1){t.push({enrolledTimestamp:i,playbackEntry:e});break}t.splice(s+1,0,{enrolledTimestamp:i,playbackEntry:e});break}}}}e.PlaybackNoteGenerator=r},1566:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VoicePlaybackData=void 0;const s=i(8918);e.VoicePlaybackData=class{constructor(t,e,i){this.playbackEntries=[],this.dueEntries=[],this.parentVoice=t,this.playbackEntries=e,this.rules=i}get ParentVoice(){return this.parentVoice}get PlaybackEntries(){return this.playbackEntries}get DueEntries(){return this.dueEntries}get NextEntryTimestamp(){return this.nextEntryTimestamp}isAudible(){return this.ParentVoice.Audible}reset(t){if(this.playbackIndex=0,this.nextEntryTimestamp=void 0,this.dueEntries.clear(),!this.ParentVoice.Audible)return void(this.playbackIndex=0);let e=!1;for(let i=this.playbackIndex;it.RealValue){this.nextEntryTimestamp=s.enrolledTimestamp,this.playbackIndex=Math.max(0,i-1),e=!0;break}}return!e&&this.playbackEntries.length>0&&(this.playbackIndex=this.playbackEntries.length-1),this.nextEntryTimestamp}update(t){if(this.nextEntryTimestamp=void 0,this.dueEntries.clear(),this.ParentVoice.Audible){for(let e=this.playbackIndex;et.RealValue){this.nextEntryTimestamp=i.enrolledTimestamp,this.playbackIndex=e;break}const s=i.enrolledTimestamp.clone();if(s.Add(i.playbackEntry.Notes[0].Length),i.enrolledTimestamp.lt(t)){if(!this.rules.PlayAlreadyStartedNotesFromCursorPosition){const e=this.rules.PlaybackSkipNotesSafetyInterval;if(Math.abs(i.enrolledTimestamp.RealValue-t.RealValue)>e)continue}if(s.lt(t))continue}this.dueEntries.push(i)}if(void 0===this.nextEntryTimestamp){if(this.playbackEntries.length>0){const e=this.playbackEntries.last(),i=s.Fraction.plus(e.enrolledTimestamp,e.playbackEntry.Length);i.RealValue>t.RealValue&&(this.nextEntryTimestamp=i)}this.playbackIndex=Number.MAX_SAFE_INTEGER}return this.nextEntryTimestamp}}}},1295:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(1596),e)},2393:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.InstrumentReader=void 0;const n=i(8109),r=i(9050),o=i(289),a=i(5198),l=i(3331),h=i(1797),u=i(556),c=i(6331),d=i(1703),p=i(289),f=i(3331),m=i(5198),g=s(i(2043)),b=i(289),S=i(2905),y=i(4671),v=i(3755),E=i(908),_=i(2478),x=i(6894);e.InstrumentReader=class{constructor(t,e,i,s){this.voiceGeneratorsDict={},this.staffMainVoiceGeneratorDict={},this.divisions=0,this.currentClefNumber=1,this.currentXmlMeasureIndex=0,this.activeKeyHasBeenInitialized=!1,this.abstractInstructions=[],this.soundTempos=new Map,this.xmlNotes=[],this.repetitionInstructionReader=e,this.xmlMeasureList=i,this.musicSheet=s.GetMusicSheet,this.instrument=s,this.activeClefs=new Array(s.Staves.length),this.activeClefsHaveBeenInitialized=new Array(s.Staves.length);for(let t=0;t=this.xmlMeasureList.length)return!1;this.currentMeasure=t,this.followingMultirestMeasures=Math.max(this.followingMultirestMeasures-1,0),this.inSourceMeasureInstrumentIndex=this.musicSheet.getGlobalStaffIndexOfFirstStaff(this.instrument),this.repetitionInstructionReader&&this.repetitionInstructionReader.prepareReadingMeasure(t,this.currentXmlMeasureIndex);let b=new h.Fraction(0,1),y=new h.Fraction(0,1),v=!1;this.maxTieNoteFraction=new h.Fraction(0,1);let E=!1;const _=[];let M=!1;try{const P=this.xmlMeasureList[this.currentXmlMeasureIndex],w=P.elements();if(t.Rules.UseXMLMeasureNumbers&&!Number.isInteger(t.MeasureNumberXML)){const e=parseInt(null===(s=P.attribute("number"))||void 0===s?void 0:s.value,10);Number.isInteger(e)&&(t.MeasureNumberXML=e)}let T;for(let s=0;s0&&(T=w[s-1]),"print"===P.name){const e=P.attribute("new-system");"yes"===(null==e?void 0:e.value)&&(t.printNewSystemXml=!0);const i=P.attribute("new-page");"yes"===(null==i?void 0:i.value)&&(t.printNewPageXml=!0)}else if("attributes"===P.name){const e=P.element("divisions");if(e&&(this.divisions=parseInt(e.value,10),isNaN(this.divisions))){const t=c.ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(g.default.debug("InstrumentReader.readNextXmlMeasure",t),this.divisions=this.readDivisionsFromNotes(),!(this.divisions>0))throw v=!0,new d.MusicSheetReadingException(t+this.instrument.Name);this.musicSheet.SheetErrors.push(t+this.instrument.Name)}if(!P.element("divisions")&&0===this.divisions&&0===this.currentXmlMeasureIndex){const t=c.ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(this.divisions=this.readDivisionsFromNotes(),!(this.divisions>0))throw v=!0,new d.MusicSheetReadingException(t+this.instrument.Name);this.musicSheet.SheetErrors.push(t+this.instrument.Name)}this.addAbstractInstruction(P,i,T,b.clone()),b.Equals(new h.Fraction(0,1))&&this.isAttributesNodeAtBeginOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],P)&&this.saveAbstractInstructionList(this.instrument.Staves.length,!0),this.isAttributesNodeAtEndOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],P,b)&&this.saveClefInstructionAtEndOfMeasure();const s=P.elements("staff-details");for(const t of s){const e=t.element("staff-lines");if(e){let i=1;const s=t.attribute("number");s&&(i=parseInt(s.value,10)),this.instrument.Staves[i-1].StafflineCount=parseInt(e.value,10)}}const n=P.element("measure-style");if(n){const e=n.element("multiple-rest");if(e){const i=e.value;let s=0;try{s=Number.parseInt(i,10),void 0!==t.multipleRestMeasures&&s!==t.multipleRestMeasures?t.multipleRestMeasures=0:(t.multipleRestMeasures=s,this.currentMultirestStartMeasure=t,this.followingMultirestMeasures=s+1)}catch(t){console.log("multirest parse error: "+t)}}}}else if("note"===P.name){let t=!0;"no"===(null===(n=P.attribute("print-object"))||void 0===n?void 0:n.value)&&(t=!1);const s=this.getNoteStaff(P);this.currentStaff=this.instrument.Staves[s-1];const r=void 0!==P.element("chord");if(P.element("voice")){const t=parseInt(P.element("voice").value,10);this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(t,s-1)}else r&&this.currentVoiceGenerator||(this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(1,s-1));let o,a=0,l=new h.Fraction(0,1),u=2,d=!1;if(P.element("duration")){if(a=parseInt(P.element("duration").value,10),isNaN(a)){const t=c.ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid Note Duration.");this.musicSheet.SheetErrors.pushMeasureError(t),g.default.debug("InstrumentReader.readNextXmlMeasure",t);continue}if(l=new h.Fraction(a,4*this.divisions),0===a?l=this.getNoteDurationFromTypeNode(P):o=this.getNoteDurationFromTypeNode(P),P.element("time-modification")){l=this.getNoteDurationForTuplet(P);const t=P.element("time-modification");(null==t?void 0:t.element("normal-notes"))&&(u=parseInt(t.element("normal-notes").value,10)),d=!0}}const p=void 0!==P.element("rest"),f=P.combinedElement("notations"),m=void 0!==P.element("grace")||0===a||r&&E;let S=!1,v=!1;if(m){const t=P.element("duration"),e=P.element("grace");e&&e.attributes()&&e.attribute("slash")&&"yes"===e.attribute("slash").value&&(S=!0),t||(l=this.getNoteDurationFromTypeNode(P)),f&&f.element("slur")&&(v=!0)}const[x,M]=this.getCueNoteAndNoteTypeXml(P),[w,T,I]=this.getStemDirectionAndColors(P);let L,A=0,C="",R="",N="";if(f){const t=f.element("ornaments");if(t){L=this.getTremoloInfo(t),this.getWavyLines(t,P,b,y);const e=t.element("tremolo");if(e){const t=e.attribute("type");if(C=t.value,t){const i=parseInt(e.value,10);i>0&&(A=i),"start"!==t.value&&"stop"!==t.value||(l=new h.Fraction(parseInt(P.element("duration").value,10),4*this.divisions))}}const i=t.elements("wavy-line");if(void 0!==i)for(const t of i){const e=this.expressionReaders[this.readExpressionStaffNumber(P)-1];e&&(e.readExpressionParameters(t,this.instrument,this.divisions,b,y,this.currentMeasure.MeasureNumber,!1),e.addWavyLine(t,this.currentMeasure,b,y))}}f.elements("glissando").find((t=>"start"===t.attribute("type").value))&&(R="start");f.elements("slide").find((t=>"start"===t.attribute("type").value))&&(N="start")}const k=r?y.clone():b.clone();this.currentStaffEntry=this.currentMeasure.findOrCreateStaffEntry(k,this.inSourceMeasureInstrumentIndex+s-1,this.currentStaff).staffEntry,(!this.currentVoiceGenerator.hasVoiceEntry()||!r&&!m&&!E||m&&!E||m&&!r||!m&&E)&&this.currentVoiceGenerator.createVoiceEntry(k,this.currentStaffEntry,this.activeKey,this.ActiveRhythm,m,S,v),m||r||(y=b.clone(),b.Add(l)),r&&void 0!==this.currentStaffEntry&&this.currentStaffEntry.ParentStaff!==this.currentStaff&&(this.currentStaffEntry=this.currentVoiceGenerator.checkForStaffEntryLink(this.inSourceMeasureInstrumentIndex+s-1,this.currentStaff,this.currentStaffEntry,this.currentMeasure));const B=void 0!==this.currentStaffEntry&&void 0!==this.currentStaffEntry.Timestamp&&this.currentStaffEntry.Timestamp.Equals(new h.Fraction(0,1))&&!this.currentStaffEntry.hasNotes();this.saveAbstractInstructionList(this.instrument.Staves.length,B),this.activeRhythm,d||m||(l=new h.Fraction(a,4*this.divisions));const D=P.elements("dot").length;if(this.currentVoiceGenerator.read(P,l,o,M,u,p,this.currentStaffEntry,this.currentMeasure,e,this.maxTieNoteFraction,r,i,t,x,m,w,L,T,I,D,C,R,N),void 0!==f&&f.element("dynamics")){const t=this.expressionReaders[this.readExpressionStaffNumber(P)-1];t&&(t.readExpressionParameters(P,this.instrument,this.divisions,b,y,this.currentMeasure.MeasureNumber,!1),t.read(P,this.currentMeasure,y,void 0,_.length))}E=m}else if("forward"===P.name){const t=parseInt(P.element("duration").value,10);b.Add(new h.Fraction(t,4*this.divisions))}else if("backup"===P.name){const t=parseInt(P.element("duration").value,10);b.Sub(new h.Fraction(t,4*this.divisions)),b.IsNegative()&&(b=new h.Fraction(0,1)),y.Sub(new h.Fraction(t,4*this.divisions)),y.IsNegative()&&(y=new h.Fraction(0,1))}else if("direction"===P.name){const t=P.elements("direction-type"),e=P.element("direction-type");let i=Math.min(1,b.RealValue);void 0!==this.activeRhythm&&this.activeRhythm.Rhythm&&(i/=this.activeRhythm.Rhythm.RealValue);let s=!1;if(this.repetitionInstructionReader&&(s=this.repetitionInstructionReader.handleRepetitionInstructionsFromWordsOrSymbols(e,i)),!s){let i=this.expressionReaders[0];const s=this.readExpressionStaffNumber(P)-1;if(snull==t?void 0:t.toLocaleLowerCase())).includes(null===(r=s.value)||void 0===r?void 0:r.toLocaleLowerCase())&&(this.currentGradualChangeMeasure=this.currentMeasure,this.currentMeasure.speedInfo={startWord:null===(o=s.value)||void 0===o?void 0:o.toLocaleLowerCase(),startXmlNoteIndex:_.length,endXmlNoteIndex:0,resetXmlNoteIndex:0,startMeasureListIndex:this.currentXmlMeasureIndex,endMeasureListIndex:0,resetMeasureListIndex:0},this.xmlNotes=[]),s.value.startsWith(u.GRADIENT_SPEED_CLOSE_TAG)&&(null===(a=this.currentGradualChangeMeasure)||void 0===a?void 0:a.speedInfo)&&(this.currentGradualChangeMeasure.speedInfo=Object.assign(Object.assign({},this.currentGradualChangeMeasure.speedInfo),{endXmlNoteIndex:this.xmlNotes.length,endMeasureListIndex:this.currentXmlMeasureIndex})),(null===(l=s.value)||void 0===l?void 0:l.toLocaleLowerCase())==="a tempo".toLocaleLowerCase()&&(null===(p=this.currentGradualChangeMeasure)||void 0===p?void 0:p.speedInfo)){const{endXmlNoteIndex:t,resetXmlNoteIndex:e,endMeasureListIndex:i}=this.currentGradualChangeMeasure.speedInfo;0===e&&(this.currentGradualChangeMeasure.speedInfo=Object.assign(Object.assign({},this.currentGradualChangeMeasure.speedInfo),{endXmlNoteIndex:t||this.xmlNotes.length,endMeasureListIndex:i||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex})),this.xmlNotes=[]}M=!(!s.value||"hiddenspeed"!==s.value.toLocaleLowerCase())}if(t.find((t=>t.element("metronome")))&&(null===(f=this.currentGradualChangeMeasure)||void 0===f?void 0:f.speedInfo)){const{endXmlNoteIndex:t,resetXmlNoteIndex:e,endMeasureListIndex:i}=this.currentGradualChangeMeasure.speedInfo;0===e&&(this.currentGradualChangeMeasure.speedInfo=Object.assign(Object.assign({},this.currentGradualChangeMeasure.speedInfo),{endXmlNoteIndex:t||this.xmlNotes.length,endMeasureListIndex:i||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex})),this.xmlNotes=[]}i.readExpressionParameters(P,this.instrument,this.divisions,b,y,this.currentMeasure.MeasureNumber,!1),i.read(P,this.currentMeasure,b,y.clone(),_.length,M)}}}else if("barline"===P.name){this.repetitionInstructionReader&&this.repetitionInstructionReader.handleLineRepetitionInstructions(P)&&(this.currentMeasure.HasEndLine=!0);const t=P.attribute("location");if(s===w.length-1||t&&"right"===t.value){const t=null===(m=P.element("bar-style"))||void 0===m?void 0:m.value;t&&(this.currentMeasure.endingBarStyleXml=t,this.currentMeasure.endingBarStyleEnum=x.SystemLinesEnumHelper.xmlBarlineStyleToSystemLinesEnum(t))}}else if("sound"===P.name)try{if(P.attribute("tempo")){const t=parseFloat(P.attribute("tempo").value);P.element("offset")&&(this.soundTempos.has(this.currentXmlMeasureIndex)||this.soundTempos.set(this.currentXmlMeasureIndex,[]),this.soundTempos.get(this.currentXmlMeasureIndex).push(t)),0===this.currentXmlMeasureIndex&&(this.musicSheet.DefaultStartTempoInBpm=t,this.musicSheet.HasBPMInfo=!0)}}catch(t){g.default.debug("InstrumentReader.readTempoInstruction",t)}else if("harmony"===P.name){const t=this.getNoteStaff(P);this.currentStaff=this.instrument.Staves[t-1];const e=b.clone();this.currentStaffEntry=this.currentMeasure.findOrCreateStaffEntry(e,this.inSourceMeasureInstrumentIndex+t-1,this.currentStaff).staffEntry,this.currentStaffEntry.ChordContainers.push(S.ChordSymbolReader.readChordSymbol(P,this.musicSheet,this.activeKey))}}for(const t in this.voiceGeneratorsDict)this.voiceGeneratorsDict.hasOwnProperty(t)&&this.voiceGeneratorsDict[t].checkForOpenBeam();if(this.currentXmlMeasureIndex===this.xmlMeasureList.length-1){for(let t=0;t{this.voiceGeneratorsDict[t].finalizeReadingMeasure()})),this.musicSheet.HasBPMInfo?0===t.TempoInBPM&&this.previousMeasure&&(this.currentMeasure.TempoInBPM=this.previousMeasure.TempoInBPM):this.currentMeasure.TempoInBPM=120}catch(t){if(v)throw new d.MusicSheetReadingException(t.Message);const e=c.ITextTranslation.translateText("ReaderErrorMessages/MeasureError","Error while reading Measure.");this.musicSheet.SheetErrors.pushMeasureError(e),g.default.debug("InstrumentReader.readNextXmlMeasure",e,t)}return this.previousMeasure=this.currentMeasure,this.currentXmlMeasureIndex+=1,!0}getStemDirectionAndColors(t){let e,i=E.StemDirectionType.Undefined;const s=t.element("stem");if(s){i=this.getStemDirectionType(s);const t=s.attribute("color");t&&(e=this.parseXmlColor(t.value))}let n=this.getNoteHeadColorXml(t);const r=this.getNoteColorXml(t);return r&&!n&&(n=r),r&&!e&&(e=r),[i,e,n]}parseXmlColor(t){if(t)return 7===t.length?t:9===t.length?"#"+t.substr(3):void 0}doCalculationsAfterDurationHasBeenSet(){for(const t in this.voiceGeneratorsDict)this.voiceGeneratorsDict.hasOwnProperty(t)&&this.voiceGeneratorsDict[t].checkOpenTies()}getOrCreateVoiceGenerator(t,e){const i=this.instrument.Staves[e];let s=this.voiceGeneratorsDict[t];if(s)-1===i.Voices.indexOf(s.GetVoice)&&i.Voices.push(s.GetVoice);else{const r=this.staffMainVoiceGeneratorDict[e];r?(s=new n.VoiceGenerator(this.pluginManager,i,t,this.slurReader,r.GetVoice),i.Voices.push(s.GetVoice),this.voiceGeneratorsDict[t]=s):(s=new n.VoiceGenerator(this.pluginManager,i,t,this.slurReader),i.Voices.push(s.GetVoice),this.voiceGeneratorsDict[t]=s,this.staffMainVoiceGeneratorDict[e]=s)}return s}createExpressionGenerators(t){this.expressionReaders=new Array(t);for(let e=0;e0?this.musicSheet.SourceMeasures[0]:this.currentMeasure;const i=new o.ClefInstruction(p.ClefEnum.G,0,2);let s;e.FirstInstructionsStaffEntries[t]?(s=e.FirstInstructionsStaffEntries[t],s.removeFirstInstructionOfTypeClefInstruction()):(s=new r.SourceStaffEntry(void 0,void 0),e.FirstInstructionsStaffEntries[t]=s),i.Parent=s,s.Instructions.splice(0,0,i)}createDefaultKeyInstruction(){let t;t=this.musicSheet.SourceMeasures.length>0?this.musicSheet.SourceMeasures[0]:this.currentMeasure;const e=new a.KeyInstruction(void 0,0,m.KeyEnum.major);for(let i=this.inSourceMeasureInstrumentIndex;i0&&"backup"===i[s-1].name)return!0;let n=-1;for(let t=0;t0||n<0}isAttributesNodeAtEndOfMeasure(t,e,i){var s;if(i.Equals(null===(s=this.ActiveRhythm)||void 0===s?void 0:s.Rhythm))return!0;const n=t.elements().slice();let r=0;for(let t=0;to}getNoteDurationFromTypeNode(t){const e=t.element("type");if(e){const t=e.value;return _.NoteTypeHandler.getNoteDurationFromType(t)}return new h.Fraction(0,4*this.divisions)}addAbstractInstruction(t,e,i,s){if(t.element("divisions")&&1===t.elements().length)return;const n=t.element("transpose");if(n){const t=n.element("chromatic");t&&(this.instrument.PlaybackTranspose=parseInt(t.value,10))}const r=t.elements("clef");let u;if(r.length>0)for(let t=0,e=r.length;tthis.currentClefNumber&&(a=this.currentClefNumber),this.currentClefNumber=a+1}catch(t){u=c.ITextTranslation.translateText("ReaderErrorMessages/ClefError","Invalid clef. Using default."),this.musicSheet.SheetErrors.pushMeasureError(u),a=1,this.currentClefNumber=a+1}const m=new o.ClefInstruction(i,l,n);this.abstractInstructions.push([a,m,s])}if(void 0!==t.element("key")&&this.instrument.MidiInstrumentId!==b.MidiInstrument.Percussion){let e=0;const i=t.element("key").element("fifths");if(i)try{e=parseInt(i.value,10)}catch(t){u=c.ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key. Set to default."),this.musicSheet.SheetErrors.pushMeasureError(u),e=0,g.default.debug("InstrumentReader.addAbstractInstruction",u,t)}let n=m.KeyEnum.none,r=t.element("key");if(r&&(r=r.element("mode")),r)try{n=m.KeyEnum[r.value]}catch(t){u=c.ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key/mode. Set to default."),this.musicSheet.SheetErrors.pushMeasureError(u),n=m.KeyEnum.major,g.default.debug("InstrumentReader.addAbstractInstruction",u,t)}const o=new a.KeyInstruction(void 0,e,n);this.abstractInstructions.push([1,o,s])}if(t.element("time")){const e=t.element("time");let i=f.RhythmSymbolEnum.NONE,n=!0;if(void 0!==e&&e.hasAttributes){const t=e.attribute("symbol");t&&("common"===t.value?i=f.RhythmSymbolEnum.COMMON:"cut"===t.value&&(i=f.RhythmSymbolEnum.CUT));const s=e.attribute("print-object");s&&"no"===s.value&&(n=!1)}let r=0,o=0;const a=e&&void 0!==e.element("senza-misura"),d=t.elements("time"),p=[],m=[];for(let t=0,e=d.length;t0&&void 0!==m&&p.length===m.length){const t=p.length,e=new Array(t);let i=0;for(let s=0;s=0;i--){const s=this.abstractInstructions[i],n=s[0],h=s[1],u=s[2];if(h instanceof o.ClefInstruction){const t=h;if(0===this.currentXmlMeasureIndex||n<=this.activeClefs.length&&t!==this.activeClefs[n-1])if(e||void 0===this.currentStaffEntry||this.currentStaffEntry.hasNotes()||n-1!==this.instrument.Staves.indexOf(this.currentStaffEntry.ParentStaff))if(e){if(0!==u.RealValue)continue;let e;if(this.currentMeasure){const s=t,a=this.inSourceMeasureInstrumentIndex+n-1,l=this.currentMeasure.FirstInstructionsStaffEntries[a];if(0===this.currentXmlMeasureIndex)if(l)if(void 0===this.currentMeasure.FirstInstructionsStaffEntries[a]||l.Instructions[0]instanceof o.ClefInstruction){const t=new r.SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[a]=t,s.Parent=t,t.Instructions.push(s)}else e=l,s.Parent=e,e.removeFirstInstructionOfTypeClefInstruction(),e.Instructions.splice(0,0,s),this.activeClefsHaveBeenInitialized[n-1]=!0;else e=new r.SourceStaffEntry(void 0,void 0),this.currentMeasure.FirstInstructionsStaffEntries[a]=e,s.Parent=e,e.Instructions.push(s),this.activeClefsHaveBeenInitialized[n-1]=!0;else if(this.activeClefsHaveBeenInitialized[n-1]){let t=this.previousMeasure;this.followingMultirestMeasures>0&&this.currentMeasure.Rules.RenderMultipleRestMeasures&&(t=this.currentMultirestStartMeasure);const e=new r.SourceStaffEntry(void 0,void 0);t.LastInstructionsStaffEntries[a]=e,s.Parent=e,e.Instructions.push(s)}else{const t=this.musicSheet.SourceMeasures[0];t.FirstInstructionsStaffEntries[a]?(e=t.FirstInstructionsStaffEntries[a],e.removeFirstInstructionOfTypeClefInstruction()):e=new r.SourceStaffEntry(void 0,void 0),s.Parent=e,e.Instructions.splice(0,0,s),this.activeClefsHaveBeenInitialized[n-1]=!0}this.activeClefs[n-1]=t,this.abstractInstructions.splice(i,1)}}else{let e;const s=this.activeRhythm.Rhythm;s.RealValue>0&&u.RealValue/s.RealValue>.9&&s.RealValue!==u.RealValue&&(this.currentMeasure.LastInstructionsStaffEntries[n-1]||(this.currentMeasure.LastInstructionsStaffEntries[n-1]=new r.SourceStaffEntry(void 0,this.instrument.Staves[n-1])),e=this.currentMeasure.LastInstructionsStaffEntries[n-1]),e&&(t.Parent=e,e.Instructions.push(t),this.activeClefs[n-1]=t,this.abstractInstructions.splice(i,1))}else{const e=t,s=this.currentStaffEntry;if(u&&Math.abs(u.RealValue-s.Timestamp.RealValue)>.01)continue;e.Parent=s,s.removeFirstInstructionOfTypeClefInstruction(),s.Instructions.push(e),this.activeClefs[n-1]=t,this.abstractInstructions.splice(i,1)}else n<=this.activeClefs.length&&t===this.activeClefs[n-1]&&this.abstractInstructions.splice(i,1)}if(h instanceof a.KeyInstruction){const e=h;if(this.activeKey&&this.activeKey.Key===e.Key)this.abstractInstructions.splice(i,1);else{let s;if(this.activeKey=e,this.abstractInstructions.splice(i,1),this.activeKeyHasBeenInitialized?s=this.currentMeasure:(this.activeKeyHasBeenInitialized=!0,s=this.currentXmlMeasureIndex>0?this.musicSheet.SourceMeasures[0]:this.currentMeasure),s)for(let i=this.inSourceMeasureInstrumentIndex;i=0;t--){const e=this.abstractInstructions[t][0],i=this.abstractInstructions[t][1];if(i instanceof o.ClefInstruction){const s=i;if(!this.activeClefs[e-1]||s.ClefType!==this.activeClefs[e-1].ClefType||s.ClefType===this.activeClefs[e-1].ClefType&&s.Line!==this.activeClefs[e-1].Line){const i=new r.SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[this.inSourceMeasureInstrumentIndex+e-1]=i;const n=s;n.Parent=i,i.Instructions.push(n),this.activeClefs[e-1]=s,this.abstractInstructions.splice(t,1)}}}}getNoteDurationForTuplet(t){let e=new h.Fraction(0,1);const i=this.getNoteDurationFromTypeNode(t);if(t.element("time-modification")){const s=t.element("time-modification");if(s&&void 0!==s.element("actual-notes")&&s.element("normal-notes")){const t=s.element("actual-notes"),n=s.element("normal-notes");if(void 0!==t&&n){const s=parseInt(t.value,10),r=parseInt(n.value,10);e=new h.Fraction(r*i.Numerator,s*i.Denominator)}}}return e}readExpressionStaffNumber(t){let e=1;if(t.element("staff")){const i=t.element("staff");if(i)try{e=parseInt(i.value,10)}catch(t){const i=c.ITextTranslation.translateText("ReaderErrorMessages/ExpressionStaffError","Invalid Expression staff number. Set to default.");this.musicSheet.SheetErrors.pushMeasureError(i),e=1,g.default.debug("InstrumentReader.readExpressionStaffNumber",i,t)}}return e}readDivisionsFromNotes(){let t=0,e=this.currentXmlMeasureIndex,i=!1;for(;!i;){const s=this.xmlMeasureList[e].elements();for(let e=0,n=s.length;e0){i=!0;break}}if(0===t&&(e++,e===this.xmlMeasureList.length)){const t=c.ITextTranslation.translateText("ReaderErrorMEssages/DivisionsError","Invalid divisions value at Instrument: ");throw new d.MusicSheetReadingException(t+this.instrument.Name)}}return t}getCueNoteAndNoteTypeXml(t){let e=!1;t.element("cue")&&(e=!0);const i=t.element("type");let s=_.NoteType.UNDEFINED;if(i){const t=i.attribute("size");"cue"===(null==t?void 0:t.value)&&(e=!0),s=_.NoteTypeHandler.StringToNoteType(i.value)}return[e,s]}getStemDirectionType(t){switch(t.value){case"down":return E.StemDirectionType.Down;case"up":return E.StemDirectionType.Up;case"double":return E.StemDirectionType.Double;case"none":return E.StemDirectionType.None;default:return E.StemDirectionType.Undefined}}getNoteHeadColorXml(t){const e=t.element("notehead");if(e){const t=e.attribute("color");if(t)return this.parseXmlColor(t.value)}return null}getNoteColorXml(t){const e=t.attribute("color");return e?this.parseXmlColor(e.value):null}getTremoloInfo(t){let e,i;const s=t.element("tremolo");if(s){const t=s.attribute("type");if(t){if("single"===t.value){const t=parseInt(s.value,10);t>0&&(e=t)}else e=0;"unmeasured"===t.value&&(i=!0)}}return{tremoloStrokes:e,tremoloUnmeasured:i}}getWavyLines(t,e,i,s){const n=t.elements("wavy-line");if(n)for(const t of n){const n=this.expressionReaders[this.readExpressionStaffNumber(e)-1];n&&(n.readExpressionParameters(t,this.instrument,this.divisions,i,s,this.currentMeasure.MeasureNumber,!1),n.addWavyLine(t,this.currentMeasure,i,s))}}getNoteStaff(t){let e=1;return this.instrument.Staves.length>1&&t.element("staff")&&(e=parseInt(t.element("staff").value,10),isNaN(e)&&(g.default.debug("InstrumentReader.readNextXmlMeasure.get staff number"),e=1)),e}}},1372:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MusicSheetReader=void 0;const n=i(7514),r=i(5942),o=i(1797),a=i(2393),l=i(6842),h=i(6331),u=i(1703),c=s(i(2043)),d=i(3331),p=i(3331),f=i(9050),m=i(884),g=i(5142),b=i(289),S=i(2255),y=i(8736),v=i(1405),E=i(2458),_=i(1274);class x{constructor(t=void 0,e=new v.EngravingRules){this.completeNumberOfStaves=0,this.pluginManager=new E.ReaderPluginManager,this.afterSheetReadingModules=t||[],this.repetitionInstructionReader=y.MusicSymbolModuleFactory.createRepetitionInstructionReader(),this.repetitionCalculator=y.MusicSymbolModuleFactory.createRepetitionCalculator(),this.rules=e}get PluginManager(){return this.pluginManager}get CompleteNumberOfStaves(){return this.completeNumberOfStaves}static doCalculationsAfterDurationHasBeenSet(t){for(const e of t)e.doCalculationsAfterDurationHasBeenSet()}createMusicSheet(t,e){try{return this._createMusicSheet(t,e)}catch(t){return void c.default.error("MusicSheetReader.CreateMusicSheet",t)}}_removeFromArray(t,e){const i=t.indexOf(e);-1!==i&&t.splice(i,1)}trimString(t){return t.replace(/^\s+|\s+$/g,"")}_lastElement(t){return t[t.length-1]}_createMusicSheet(t,e){const i=[];let s=0;if(this.musicSheet=new n.MusicSheet,this.musicSheet.Path=e,this.musicSheet.Rules=this.rules,!t)throw new u.MusicSheetReadingException("Undefined root element");this.pushSheetLabels(t,e);const a=t.element("part-list");if(!a)throw new u.MusicSheetReadingException("Undefined partListNode");const l=t.elements("part"),c=a.elements();this.initializeReading(c,l,i);let d=!0;this.currentFraction=new o.Fraction(0,1);let p=!1,f=t.element("identification");for(f&&(f=f.element("encoding")),f&&(f=f.element("software")),void 0!==f&&"Guitar Pro 5"===f.value&&(p=!0);d;){void 0!==this.currentMeasure&&this.currentMeasure.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(s=0),this.currentMeasure=new r.SourceMeasure(this.completeNumberOfStaves,this.musicSheet.Rules);for(const t of i)try{d=d&&t.readNextXmlMeasure(this.currentMeasure,this.currentFraction,p)}catch(t){const e=h.ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading instruments.");throw new u.MusicSheetReadingException(e,t)}d&&(this.musicSheet.addMeasure(this.currentMeasure),this.checkIfRhythmInstructionsAreSetAndEqual(i),this.checkSourceMeasureForNullEntries(),s=this.setSourceMeasureDuration(i,s),x.doCalculationsAfterDurationHasBeenSet(i),this.currentMeasure.AbsoluteTimestamp=this.currentFraction.clone(),this.musicSheet.SheetErrors.finalizeMeasure(this.currentMeasure.MeasureNumber),this.currentFraction.Add(this.currentMeasure.Duration),this.previousMeasure=this.currentMeasure)}this.repetitionInstructionReader&&(this.repetitionInstructionReader.removeRedundantInstructions(),this.repetitionCalculator&&this.repetitionCalculator.calculateRepetitions(this.musicSheet,this.repetitionInstructionReader.repetitionInstructions)),0===this.musicSheet.DefaultStartTempoInBpm&&(this.musicSheet.DefaultStartTempoInBpm=100),this.musicSheet.checkForInstrumentWithNoVoice(),this.musicSheet.fillStaffList();for(let t=0,e=this.afterSheetReadingModules.length;ti){if(this.areRhythmInstructionsMixed(e)&&n.SymbolEnum!==p.RhythmSymbolEnum.NONE)continue;i=n.Rhythm.RealValue,s=e.indexOf(n)}}if(e.length>0&&e.lengtht.Denominator){const i=e.Denominator/t.Denominator;t.expand(i)}}checkIfMeasureIsImplicit(t,e){return!(this.previousMeasure||!t.lt(e))||!!this.previousMeasure&&o.Fraction.plus(this.previousMeasure.Duration,t).Equals(e)}allInstrumentsHaveSameDuration(t,e){let i=0;for(let s=0,n=t.length;s=0;t--)for(let e=this.currentMeasure.VerticalSourceStaffEntryContainers[t].StaffEntries.length-1;e>=0;e--){const i=this.currentMeasure.VerticalSourceStaffEntryContainers[t].StaffEntries[e];if(i)for(let t=i.VoiceEntries.length-1;t>=0;t--){const e=i.VoiceEntries[t];0===e.Notes.length&&(this._removeFromArray(e.ParentVoice.VoiceEntries,e),this._removeFromArray(i.VoiceEntries,e))}void 0!==i&&0===i.VoiceEntries.length&&0===i.ChordContainers.length&&(this.currentMeasure.VerticalSourceStaffEntryContainers[t].StaffEntries[e]=void 0)}for(let t=this.currentMeasure.VerticalSourceStaffEntryContainers.length-1;t>=0;t--){let e=0;for(let i=0,s=this.currentMeasure.VerticalSourceStaffEntryContainers[t].StaffEntries.length;i0){const t=e[0].elements("rights");if(t.length>0)for(let e=0,i=t.length;eo||d)if(a||d){if(u||"right"===c)h?h+="\n"+t:h=t;else if(r||"right"!==c&&"left"!==c)l?l+="\n"+t:l=t;else if("left"===c){this.musicSheet.Lyricist||(this.musicSheet.Lyricist=new S.Label(t));break}}else a=t}}}}if(!this.musicSheet.Title&&a&&(this.musicSheet.Title=new S.Label(this.trimString(a))),!this.musicSheet.Subtitle&&l&&(this.musicSheet.Subtitle=new S.Label(this.trimString(l))),h){let t=!1;this.musicSheet.Composer?(null!==(n=h.match("\n"))&&void 0!==n?n:[]).length+1>=(null!==(r=this.musicSheet.Composer.text.match("\n"))&&void 0!==r?r:[]).length+1&&(t=!0):t=!0,t&&(this.musicSheet.Composer=new S.Label(this.trimString(h)))}}readTitleAndComposerFromCreditsLegacy(t){var e,i,s;const n=this.computeSystemYCoordinates(t);if(0===n)return;let r,o,a,l=1,h=0;const u=t.elements("credit");for(let t=0,c=u.length;tn||m){if(!this.musicSheet.Title&&!m){const e=null===(s=t.attribute("font-size"))||void 0===s?void 0:s.value;if(e){const i=parseFloat(e);l0&&n.MidiInstrumentId!==b.MidiInstrument.Percussion&&(t.midiInstrumentID=Math.max(0,parseInt(s.value,10)-1));else if("midi-unpitched"===s.name)t.fixedKey=Math.max(0,parseInt(s.value,10));else if("volume"===s.name)try{const e=parseFloat(s.value);t.volume=e/127}catch(t){c.default.debug("ExpressionReader.readExpressionParameters","read volume",t)}else if("pan"===s.name)try{const e=parseFloat(s.value);t.pan=e/64}catch(t){c.default.debug("ExpressionReader.readExpressionParameters","read pan",t)}}catch(t){c.default.info("MusicSheetReader.createInstrumentGroups midi settings: ",t)}}}}catch(t){c.default.info("MusicSheetReader.createInstrumentGroups: ",t)}}if(0===n.SubInstruments.length){const t=new g.SubInstrument(n);n.SubInstruments.push(t)}i[t]=n,s?(s.InstrumentalGroups.push(n),this.musicSheet.Instruments.push(n)):(this.musicSheet.InstrumentalGroups.push(n),this.musicSheet.Instruments.push(n))}else if("part-group"===r.name&&"start"===r.attribute("type").value){const t=new m.InstrumentalGroup("group",this.musicSheet,s);s?s.InstrumentalGroups.push(t):this.musicSheet.InstrumentalGroups.push(t),s=t}else if("part-group"===r.name&&"stop"===r.attribute("type").value&&s){if(1===s.InstrumentalGroups.length){const t=s.InstrumentalGroups[0];s.Parent?(s.Parent.InstrumentalGroups.push(t),this._removeFromArray(s.Parent.InstrumentalGroups,s)):(this.musicSheet.InstrumentalGroups.push(t),this._removeFromArray(this.musicSheet.InstrumentalGroups,s))}s=s.Parent}}}catch(t){const e=h.ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading Instruments");throw new u.MusicSheetReadingException(e,t)}for(let t=0,e=this.musicSheet.Instruments.length;t0){const i=t[0];if(i){let t=i.element("attributes");t&&(t=t.element("staves")),t?e+=parseInt(t.value,10):e++}}}if(isNaN(e)||e<=0){const t=h.ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of staves.");throw new u.MusicSheetReadingException(t)}return e}getInstrumentNumberOfStavesFromXml(t){let e=0;const i=t.element("measure");if(i){const t=i.element("attributes");let s;t&&(s=t.element("staves")),e=t&&s?parseInt(s.value,10):1}if(isNaN(e)||e<=0){const t=h.ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of Staves.");throw new u.MusicSheetReadingException(t)}return e}}e.MusicSheetReader=x},8736:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MusicSymbolModuleFactory=void 0;const s=i(9934),n=i(6789);e.MusicSymbolModuleFactory=class{static createRepetitionInstructionReader(){return new s.RepetitionInstructionReader}static createRepetitionCalculator(){return new n.RepetitionCalculator}}},7677:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ArticulationReader=void 0;const n=i(908),r=s(i(2043)),o=i(1357),a=i(5922),l=i(3748),h=i(8640),u=i(1662),c=i(6943),d=i(8084);e.ArticulationReader=class{constructor(t){this.rules=t}getAccEnumFromString(t){switch(t){case"sharp":return h.AccidentalEnum.SHARP;case"flat":return h.AccidentalEnum.FLAT;case"natural":return h.AccidentalEnum.NATURAL;case"double-sharp":case"sharp-sharp":return h.AccidentalEnum.DOUBLESHARP;case"double-flat":case"flat-flat":return h.AccidentalEnum.DOUBLEFLAT;case"triple-sharp":return h.AccidentalEnum.TRIPLESHARP;case"triple-flat":return h.AccidentalEnum.TRIPLEFLAT;case"quarter-sharp":return h.AccidentalEnum.QUARTERTONESHARP;case"quarter-flat":return h.AccidentalEnum.QUARTERTONEFLAT;case"three-quarters-sharp":return h.AccidentalEnum.THREEQUARTERSSHARP;case"three-quarters-flat":return h.AccidentalEnum.THREEQUARTERSFLAT;case"slash-quarter-sharp":return h.AccidentalEnum.SLASHQUARTERSHARP;case"slash-sharp":return h.AccidentalEnum.SLASHSHARP;case"double-slash-flat":return h.AccidentalEnum.DOUBLESLASHFLAT;case"sori":return h.AccidentalEnum.SORI;case"koron":return h.AccidentalEnum.KORON;default:return h.AccidentalEnum.NONE}}addArticulationExpression(t,e){var i,s;if(void 0!==t&&t.elements().length>0){const o=t.elements();for(let t=0,a=o.length;t0&&e.Articulations[0].articulationEnum!==n.ArticulationEnum.staccato&&e.Articulations.splice(0,0,p);else if("breathmark"===h)r===l.PlacementEnum.NotYetDefined&&(p.placement=l.PlacementEnum.Above);else if("strongaccent"===h){const t=null===(s=null==a?void 0:a.attribute("type"))||void 0===s?void 0:s.value;"up"===t?p.articulationEnum=n.ArticulationEnum.marcatoup:"down"===t&&(p.articulationEnum=n.ArticulationEnum.marcatodown)}else if(t===n.ArticulationEnum.softaccent){const t=e.ParentSourceStaffEntry.ParentStaff.Id-1;r===l.PlacementEnum.NotYetDefined&&(r=l.PlacementEnum.Above,t>0&&(r=l.PlacementEnum.Below));const i=e.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure,s=new c.MultiExpression(i,e.Timestamp);s.StartingContinuousDynamic=new d.ContinuousDynamicExpression(d.ContDynamicEnum.crescendo,r,t,i,null,-1),s.StartingContinuousDynamic.IsStartOfSoftAccent=!0,s.StartingContinuousDynamic.StartMultiExpression=s,s.StartingContinuousDynamic.EndMultiExpression=s,s.EndingContinuousDynamic=new d.ContinuousDynamicExpression(d.ContDynamicEnum.diminuendo,r,t,i,null,-1),s.EndingContinuousDynamic.StartMultiExpression=s,s.EndingContinuousDynamic.EndMultiExpression=s,i.StaffLinkedExpressions[t].push(s)}if(!e.hasArticulation(p))switch(e.Articulations.push(p),p.articulationEnum){case n.ArticulationEnum.staccato:case n.ArticulationEnum.staccatissimo:e.DurationModifier=p;break;case n.ArticulationEnum.accent:case n.ArticulationEnum.strongaccent:e.VolumeModifier=p}}}catch(t){const e="Invalid note articulation.";return void r.default.debug("addArticulationExpression",e,t)}}}}addFermata(t,e){var i;let s=n.ArticulationEnum.fermata;t.attributes().length>0&&t.attribute("type")&&"inverted"===t.attribute("type").value&&(s=n.ArticulationEnum.invertedfermata);let r=l.PlacementEnum.Above;"below"===(null===(i=t.attribute("placement"))||void 0===i?void 0:i.value)&&(r=l.PlacementEnum.Below),e.Articulations.push(new u.Articulation(s,r))}addTechnicalArticulations(t,e,i){var s,r;const a={bend:n.ArticulationEnum.bend,"down-bow":n.ArticulationEnum.downbow,"open-string":n.ArticulationEnum.naturalharmonic,"snap-pizzicato":n.ArticulationEnum.snappizzicato,stopped:n.ArticulationEnum.lefthandpizzicato,"up-bow":n.ArticulationEnum.upbow,harmonic:n.ArticulationEnum.naturalharmonic};for(const i in a){if(!a.hasOwnProperty(i))continue;const n=a[i],o=t.element(i);if(o){let t;"above"===(null===(s=o.attribute("placement"))||void 0===s?void 0:s.value)&&(t=l.PlacementEnum.Above),"below"===(null===(r=o.attribute("placement"))||void 0===r?void 0:r.value)&&(t=l.PlacementEnum.Below);const i=new u.Articulation(n,t);e.hasArticulation(i)||e.Articulations.push(i)}}const h=t.elements("fingering");for(const t of h){const s=this.createTechnicalInstruction(t,i);s.type=o.TechnicalInstructionType.Fingering,i.Fingering||(i.Fingering=s),e.TechnicalInstructions.push(s)}const c=t.element("string");if(c){const t=this.createTechnicalInstruction(c,i);t.type=o.TechnicalInstructionType.String,i.StringInstruction=t,e.TechnicalInstructions.push(t)}}createTechnicalInstruction(t,e){const i=new o.TechnicalInstruction;i.sourceNote=e,i.value=t.value;const s=t.attribute("placement");return this.rules.FingeringPositionFromXML&&(i.placement=this.getPlacement(s)),i}getPlacement(t,e=l.PlacementEnum.NotYetDefined){if(e!==l.PlacementEnum.NotYetDefined)return e;if(!t)return l.PlacementEnum.NotYetDefined;switch(t.value){case"above":return l.PlacementEnum.Above;case"below":return l.PlacementEnum.Below;case"left":return l.PlacementEnum.Left;case"right":return l.PlacementEnum.Right;default:return l.PlacementEnum.NotYetDefined}}addOrnament(t,e){if(t){let i;const s={"delayed-inverted-turn":a.OrnamentEnum.DelayedInvertedTurn,"delayed-turn":a.OrnamentEnum.DelayedTurn,"inverted-mordent":a.OrnamentEnum.InvertedMordent,"inverted-turn":a.OrnamentEnum.InvertedTurn,mordent:a.OrnamentEnum.Mordent,"trill-mark":a.OrnamentEnum.Trill,turn:a.OrnamentEnum.Turn};for(const e in s){if(!s.hasOwnProperty(e))continue;const n=t.element(e);if(n){i=new a.OrnamentContainer(s[e]);const t=n.attribute("placement");t&&"below"===t.value&&(i.placement=l.PlacementEnum.Below)}}if(i){const s=t.elements("accidental-mark");if(s){let t=l.PlacementEnum.Below,e=h.AccidentalEnum.NONE;const n=s;for(let s=0,r=n.length;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicsCalculator=void 0;const s=i(5517),n=i(2343);class r{static fillDynamicsList(t,e,i){for(let n=0;n=0&&i[e].push(new s.DynamicsContainer(o.InstantaneousDynamic,e))}if(void 0!==o.StartingContinuousDynamic){i[n].push(new s.DynamicsContainer(o.StartingContinuousDynamic,o.StaffNumber));const e=this.getOtherStaffIndexIfLinkedStavesAreDetected(t,n,o.StartingContinuousDynamic.Placement);e>=0&&i[e].push(new s.DynamicsContainer(o.StartingContinuousDynamic,e))}}}}static getOtherStaffIndexIfLinkedStavesAreDetected(t,e,i){const s=t.getStaffFromIndex(e),r=s.ParentInstrument.Staves.indexOf(s),o=s.ParentInstrument.Staves.length;return o>1&&0===r&&i===n.PlacementEnum.Below?e+1:o>1&&1===r&&i===n.PlacementEnum.Above?e-1:-1}static fillDynamicExpressions(t){const e=t.DynListStaves,i=t.getCompleteNumberOfStaves(),o=t.TimestampSortedDynamicExpressionsList;for(let t=0;t0?s.RealValue>0?(u=n.Fraction.multiply(n.Fraction.minus(s,r),u),this.directionTimestamp=n.Fraction.plus(u,s)):this.directionTimestamp=n.Fraction.createFromFraction(u):this.offsetDivisions<0&&(s.RealValue>0?(u=n.Fraction.multiply(n.Fraction.minus(s,r),u),this.directionTimestamp=n.Fraction.minus(s,u)):this.directionTimestamp=n.Fraction.createFromFraction(u));const c=t.element("direction-type");let d;if(c&&(d=c.element("wedge"),d)){const t=d.attribute("default-y");t&&(h=this.readPosition(t))}this.WedgeYPosXml=h;const p=t.attribute("placement");if(p)try{const t=p.value;"below"===t?this.placement=f.PlacementEnum.Below:"above"===t&&(this.placement=f.PlacementEnum.Above)}catch(t){const e=g.ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement -> set to default.");b.default.debug("ExpressionReader.readExpressionParameters",e,t),this.musicSheet.SheetErrors.pushMeasureError(e),this.placement=f.PlacementEnum.Below}if(this.placement===f.PlacementEnum.NotYetDefined)try{if(c){const t=c.element("dynamics");if(t){const e=t.attribute("default-y");e&&this.readExpressionPlacement(e,"read dynamics y pos")}if(d){const t=d.attribute("default-y");t&&this.readExpressionPlacement(t,"read wedge y pos")}const e=c.element("words");if(e){const t=e.attribute("default-y");t&&this.readExpressionPlacement(t,"read words y pos")}const i=c.element("rehearsal");if(i){const t=i.attribute("default-y");t&&this.readExpressionPlacement(t,"read rehearsal pos")}}}catch(t){const e=g.ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement. Set to default.");b.default.debug("ExpressionReader.readExpressionParameters",e,t),this.musicSheet.SheetErrors.pushMeasureError(e),this.placement=f.PlacementEnum.Below}this.placement===f.PlacementEnum.NotYetDefined&&(e.Staves.length>1?this.placement=f.PlacementEnum.Below:e.HasLyrics?this.placement=f.PlacementEnum.Above:this.placement=f.PlacementEnum.Below)}read(t,e,i,s=void 0,r=0,o){let a=!1,l=!1;const h=t.element("sound");if(h){const t=h.attribute("tempo"),i=h.attribute("dynamics");if(t){const i=t.value.match(/^(\d+)(\.\d+)?$/);(null==i?void 0:i.length)>0?this.soundTempo=Math.round(Number.parseFloat(t.value)):(b.default.info("invalid xml tempo: "+t.value),this.soundTempo=100),e.TempoInBPM=this.soundTempo,0===this.musicSheet.DefaultStartTempoInBpm&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,a=!0}if(i){const t=i.value.match(/\d+/);this.soundDynamic=void 0!==t?parseInt(t[0],10):100,l=!0}}const u=t.element("direction-type");if(!u)return;let d=u.element("metronome");if(d){e.metronomeNoteIndex=r;const t=d.element("beat-unit"),s=void 0!==d.element("beat-unit-dot"),a=d.element("per-minute");if(void 0!==t&&a){d.hasAttributes&&void 0!==d.attribute("default-x")&&(this.directionTimestamp=n.Fraction.createFromFraction(i));const r=parseFloat(a.value);!o&&this.createNewTempoExpressionIfNeeded(e);const l=new c.InstantaneousTempoExpression(void 0,this.placement,this.staffNumber,r,this.currentMultiTempoExpression,!0);l.parentMeasure=e,this.soundTempo=r,e.TempoInBPM=this.soundTempo*(s?1.5:1),0===this.musicSheet.DefaultStartTempoInBpm&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),1===e.MeasureNumberXML&&0===this.musicSheet.SourceMeasures.length&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,l.dotted=s,l.beatUnit=t.value,this.currentMultiTempoExpression.addExpression(l,""),this.currentMultiTempoExpression.CombinedExpressionsText="test"}}else if(d=u.element("dynamics"),d){const s=void 0!==t.element("notations");this.interpretInstantaneousDynamics(d,e,i,s)}else if(d=u.element("words"),d){const t=u.elements("words");let s="";for(const e of t)s+=e.value;if(d.value=s,a||(0,y.isSpeedKeyword)(d.value)||(0,y.isSpeedHiddenKeyword)(d.value)){this.createNewTempoExpressionIfNeeded(e),this.currentMultiTempoExpression.CombinedExpressionsText=d.value,((0,y.isSpeedKeyword)(d.value)||(0,y.isSpeedHiddenKeyword)(d.value))&&(d.value=void 0);const t=new c.InstantaneousTempoExpression(d.value,this.placement,this.staffNumber,this.soundTempo,this.currentMultiTempoExpression);this.currentMultiTempoExpression.addExpression(t,"")}else l||this.interpretWords(d,e,i)}else d=u.element("wedge"),d?this.interpretWedge(d,e,s,e.MeasureNumber):(d=u.element("rehearsal"),d&&this.interpretRehearsalMark(d,e,i,e.MeasureNumber))}closeOpenExpressions(t,e){for(const i of this.openContinuousDynamicExpressions)this.createNewMultiExpressionIfNeeded(t,i.NumberXml,e),this.closeOpenContinuousDynamic(i,t,e);this.openContinuousTempoExpression&&this.closeOpenContinuousTempo(n.Fraction.plus(t.AbsoluteTimestamp,e))}addOctaveShift(t,e,i){var s;let n=1;const r=t.element("staff");if(r)try{n=parseInt(r.value,10)}catch(t){const e=g.ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftStaffError","Invalid octave shift staff number. Set to default");this.musicSheet.SheetErrors.pushMeasureError(e),n=1,b.default.debug("ExpressionReader.addOctaveShift",e,t)}const o=t.element("direction-type");if(o){const r=o.element("octave-shift"),a=this.readPlacement(t);if(void 0!==r&&r.hasAttributes)try{const t=this.readNumber(r);if(r.attribute("size")){const o=parseInt(r.attribute("size").value,10);let l=0;8===o?l=1:15===o&&(l=2);let u=null===(s=r.attribute("type"))||void 0===s?void 0:s.value;if(u||(a===f.PlacementEnum.Above?u="down":a===f.PlacementEnum.Below&&(u="up")),"up"===u||"down"===u){const i=new h.OctaveShift(u,l);i.StaffNumber=n,this.getMultiExpression=this.createNewMultiExpressionIfNeeded(e,t),this.getMultiExpression.OctaveShiftStart=i,i.ParentStartMultiExpression=this.getMultiExpression,this.openOctaveShift=i}else"stop"===u?this.openOctaveShift&&(this.getMultiExpression=this.createNewMultiExpressionIfNeeded(e,this.openOctaveShift.numberXml,i),this.getMultiExpression.OctaveShiftEnd=this.openOctaveShift,this.openOctaveShift.ParentEndMultiExpression=this.getMultiExpression,this.openOctaveShift=void 0):u||b.default.debug("octave-shift missing type in xml")}}catch(t){const e=g.ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftError","Error while reading octave shift.");this.musicSheet.SheetErrors.pushMeasureError(e),b.default.debug("ExpressionReader.addOctaveShift",e,t)}}}addPedalMarking(t,e,i){var s,n,r;const o=t.element("direction-type");if(o){const t=o.element("pedal");if(void 0!==t&&t.hasAttributes){let o=!1,a=!1;try{switch("yes"===(null===(s=t.attribute("line"))||void 0===s?void 0:s.value)?a=!0:"no"===(null===(n=t.attribute("line"))||void 0===n?void 0:n.value)?(a=!1,o=!0):"yes"===(null===(r=t.attribute("sign"))||void 0===r?void 0:r.value)?o=!0:(o=!1,a=!0),t.attribute("type").value){case"start":this.openPedal&&this.openPedal.IsLine&&this.endOpenPedal(e),this.createNewMultiExpressionIfNeeded(e,-1),this.openPedal=new E.Pedal(a,o),this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openPedal&&this.endOpenPedal(e,i);break;case"change":this.openPedal&&this.openPedal.IsLine&&(this.openPedal.ChangeEnd=!0,this.createNewMultiExpressionIfNeeded(e,-1),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.createNewMultiExpressionIfNeeded(e,-1),this.openPedal=new E.Pedal(a,o),this.openPedal.ChangeBegin=!0,this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression)}}catch(t){const e=g.ITextTranslation.translateText("ReaderErrorMessages/PedalError","Error while reading pedal.");this.musicSheet.SheetErrors.pushMeasureError(e),b.default.debug("ExpressionReader.addPedalMarking",e,t)}}}}endOpenPedal(t,e){this.createNewMultiExpressionIfNeeded(t,-1,e),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.openPedal=void 0}addWavyLine(t,e,i,s){if(t&&t.hasAttributes)try{switch(t.attribute("type").value){case"start":this.createNewMultiExpressionIfNeeded(e,-1),this.openWavyLine=new _.WavyLine(this.placement),this.getMultiExpression.WavyLineStart=this.openWavyLine,this.openWavyLine.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openWavyLine&&(this.createNewMultiExpressionIfNeeded(e,-1,i),this.getMultiExpression.WavyLineEnd=this.openWavyLine,this.openWavyLine.ParentEndMultiExpression=this.getMultiExpression,this.openWavyLine=void 0)}}catch(t){const e=g.ITextTranslation.translateText("ReaderErrorMessages/WavyLineError","Error while reading wavy-line.");this.musicSheet.SheetErrors.pushMeasureError(e),b.default.debug("ExpressionReader.addWavyLine",e,t)}}initialize(){this.placement=f.PlacementEnum.NotYetDefined,this.soundTempo=0,this.soundDynamic=0,this.offsetDivisions=0}readPlacement(t){var e;const i=null===(e=t.attribute("placement"))||void 0===e?void 0:e.value;return"above"===i?f.PlacementEnum.Above:"below"===i?f.PlacementEnum.Below:f.PlacementEnum.NotYetDefined}readExpressionPlacement(t,e){try{const e=this.readPosition(t);e<0?this.placement=f.PlacementEnum.Below:e>0&&(this.placement=f.PlacementEnum.Above)}catch(t){b.default.debug("ExpressionReader.readExpressionParameters",e,t)}}readPosition(t){try{const e=parseInt(t.value,10);return e<0?this.placement=f.PlacementEnum.Below:e>0&&(this.placement=f.PlacementEnum.Above),e}catch(t){b.default.debug("ExpressionReader.readExpressionParameters",t)}}interpretInstantaneousDynamics(t,e,i,s){var r,o,a;if(t.hasElements){t.hasAttributes&&t.attribute("default-x")&&(this.directionTimestamp=n.Fraction.createFromFraction(i));const h=this.readNumber(t);let u=null===(r=t.elements()[0])||void 0===r?void 0:r.name;if("other-dynamics"===u&&(u=t.elements()[0].value),u){if(null===(o=e.Rules)||void 0===o?void 0:o.IgnoreRepeatedDynamics){let t;try{t=l.DynamicEnum[u]}catch(t){const e=g.ITextTranslation.translateText("ReaderErrorMessages/DynamicError","Error while reading dynamic.");return void this.musicSheet.SheetErrors.pushMeasureError(e)}if((null===(a=this.activeInstantaneousDynamic)||void 0===a?void 0:a.DynEnum)===t)return}s?this.createNewMultiExpressionIfNeeded(e,h,n.Fraction.createFromFraction(i)):this.createNewMultiExpressionIfNeeded(e,h);const t=new l.InstantaneousDynamicExpression(u,this.soundDynamic,this.placement,this.staffNumber,e);t.InMeasureTimestamp=i.clone(),this.getMultiExpression.addExpression(t,""),this.initialize(),this.activeInstantaneousDynamic?this.activeInstantaneousDynamic.DynEnum=t.DynEnum:this.activeInstantaneousDynamic=new l.InstantaneousDynamicExpression(u,0,f.PlacementEnum.NotYetDefined,1,e)}}}interpretWords(t,e,i){var s;const r=t.value;if(e.Rules.IgnoreBracketsWords&&(/^\(\s*\)$/.test(r)||/^\[\s*\]$/.test(r)))return;let o;const a=t.attribute("font-style");let l,h,u;a&&(l=a.value,"italic"===l&&(o=S.FontStyles.Italic));const c=t.attribute("font-weight");c&&(h=c.value,"bold"===h&&(o=S.FontStyles.Bold,"italic"===l&&(o=S.FontStyles.BoldItalic)));const d=t.attribute("color");let p;if(d&&(u=d.value),e.Rules.PlaceWordsInsideStafflineFromXml){const e=null===(s=t.attribute("default-y"))||void 0===s?void 0:s.value;(null==e?void 0:e.length)>0&&(p=Number.parseInt(e,10))}if(r.length>0){if(t.hasAttributes&&t.attribute("default-x")&&(this.directionTimestamp=n.Fraction.createFromFraction(i)),this.checkIfWordsNodeIsRepetitionInstruction(r))return;this.fillMultiOrTempoExpression(r,e,i,o,u,p),this.initialize()}}readNumber(t){var e;let i=1;const s=null===(e=t.attribute("number"))||void 0===e?void 0:e.value;return s&&(i=Number.parseInt(s,10)),i}interpretWedge(t,e,i,s){var r,a;void 0!==t&&t.hasAttributes&&t.attribute("default-x")&&(this.directionTimestamp=n.Fraction.createFromFraction(i));const l=this.readNumber(t),h=null===(a=null===(r=t.attribute("type"))||void 0===r?void 0:r.value)||void 0===a?void 0:a.toLowerCase();this.lastWedge&&this.lastWedge.parentMeasure.MeasureNumberXML===e.MeasureNumberXML&&this.lastWedge.StaffNumber===this.staffNumber&&this.placement===this.lastWedge.Placement&&void 0!==this.WedgeYPosXml&&this.lastWedge.YPosXml===this.WedgeYPosXml&&this.lastWedge.StartMultiExpression.Timestamp.Equals(this.directionTimestamp)&&this.lastWedge.DynamicType===o.ContDynamicEnum[h]||("stop"===h?this.createNewMultiExpressionIfNeeded(e,l,i):this.createNewMultiExpressionIfNeeded(e,l),this.addWedge(t,e,i),this.initialize())}interpretRehearsalMark(t,e,i,s){e.rehearsalExpression=new v.RehearsalExpression(t.value,this.placement)}createNewMultiExpressionIfNeeded(t,e,i=void 0){i||(i=this.directionTimestamp);let s=this.getMultiExpression;return(!s||s&&(s.SourceMeasureParent!==t||s.numberXml!==e||s.SourceMeasureParent===t&&s.Timestamp!==i))&&(this.getMultiExpression=s=new u.MultiExpression(t,n.Fraction.createFromFraction(i)),t.StaffLinkedExpressions[this.globalStaffIndex].push(s)),s}createNewTempoExpressionIfNeeded(t){this.currentMultiTempoExpression&&this.currentMultiTempoExpression.SourceMeasureParent===t&&this.currentMultiTempoExpression.Timestamp===this.directionTimestamp||(this.currentMultiTempoExpression=new r.MultiTempoExpression(t,n.Fraction.createFromFraction(this.directionTimestamp)),t.TempoExpressions.push(this.currentMultiTempoExpression))}addWedge(t,e,i){if(void 0!==t&&t.hasAttributes){const s=this.readNumber(t),n=t.attribute("type").value.toLowerCase();try{if("crescendo"===n||"diminuendo"===n){const t=new o.ContinuousDynamicExpression(o.ContDynamicEnum[n],this.placement,this.staffNumber,e,this.activeInstantaneousDynamic,s);this.lastWedge=t,this.lastWedge.YPosXml=this.WedgeYPosXml,this.openContinuousDynamicExpressions.push(t);let i=this.getMultiExpression;i||(i=this.createNewMultiExpressionIfNeeded(e,s)),i.StartingContinuousDynamic=t,t.StartMultiExpression=i,void 0!==this.activeInstantaneousDynamic&&this.activeInstantaneousDynamic.StaffNumber===t.StaffNumber&&(this.activeInstantaneousDynamic=void 0)}else if("stop"===n)for(const t of this.openContinuousDynamicExpressions)t.NumberXml===s&&this.closeOpenContinuousDynamic(t,e,i)}catch(t){const e="ReaderErrorMessages/WedgeError, Error while reading Crescendo / Diminuendo.";this.musicSheet.SheetErrors.pushMeasureError(e),b.default.debug("ExpressionReader.addWedge",e,t)}}}fillMultiOrTempoExpression(t,e,i,s,n,r=void 0){if(!t)return;const o=t.trim();this.createExpressionFromString("",o,e,i,t,s,n,r)}createExpressionFromString(t,e,i,s,n,r,l,h=void 0){if(c.InstantaneousTempoExpression.isInputStringInstantaneousTempo(e)||a.ContinuousTempoExpression.isInputStringContinuousTempo(e)){if(i.TempoExpressions.length>0)for(let t=0,s=i.TempoExpressions.length;t0)for(let t=0,s=i.TempoExpressions.length;t0&&!this.hasDigit(e)&&this.globalStaffIndex>0){if(s.EntriesList[0].label.indexOf(e)>=0)return!1;break}}let f=m.TextAlignmentEnum.CenterBottom;this.musicSheet.Rules.CompactMode&&(f=m.TextAlignmentEnum.LeftBottom);const g=new p.UnknownExpression(e,this.placement,f,this.staffNumber);return g.fontStyle=r,g.ColorXML=l,g.defaultYXml=h,u.addExpression(g,t),!1}closeOpenContinuousDynamic(t,e,i){if(!t)return;const s=t.NumberXml;t.EndMultiExpression=this.createNewMultiExpressionIfNeeded(e,s,i),t.StartMultiExpression.EndingContinuousDynamic=t,this.openContinuousDynamicExpressions=this.openContinuousDynamicExpressions.filter((e=>e!==t))}closeOpenContinuousTempo(t){this.openContinuousTempoExpression.AbsoluteEndTimestamp=t,this.openContinuousTempoExpression=void 0}checkIfWordsNodeIsRepetitionInstruction(t){return"coda"===(t=t.trim().toLowerCase())||"tocoda"===t||"to coda"===t||"fine"===t||"d.c."===t||"dacapo"===t||"da capo"===t||"d.s."===t||"dalsegno"===t||"dal segno"===t||"d.c. al fine"===t||"d.s. al fine"===t||"d.c. al coda"===t||"d.s. al coda"===t}hasDigit(t){return/\d/.test(t)}}},2535:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LyricsReader=void 0;const s=i(2672),n=i(7274),r=i(6331);e.LyricsReader=class{constructor(t){this.openLyricWords={},this.musicSheet=t}addLyricEntry(t,e){var i,o;if(t){const a=t;for(let t=0,l=a.length;t0)for(let t=n;t0;)try{const t=this.openRepetitions.last();if(t.RepetitonUnderConstruction.FromWords){if(t.WaitingForCoda){let e=t.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex+1;e>=this.musicSheet.SourceMeasures.length&&(e=-1),t.RepetitonUnderConstruction.setEndingStartIndex(2,e)}else if(0===t.RepetitonUnderConstruction.BackwardJumpInstructions.length){this.openRepetitions.splice(this.openRepetitions.length-1,1);continue}}else if(0===t.RepetitonUnderConstruction.BackwardJumpInstructions.length){const e=s.length-1,i=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.BackJumpLine,n.AlignmentType.End,t.RepetitonUnderConstruction);t.RepetitonUnderConstruction.BackwardJumpInstructions.push(i),s[e].LastRepetitionInstructions.push(i)}this.finalizeRepetition(this.openRepetitions.last())}catch(t){try{const t=this.openRepetitions.last().RepetitonUnderConstruction;for(const e of this.repetitionInstructions)e.parentRepetition===t&&(e.parentRepetition=void 0);this.openRepetitions.splice(this.openRepetitions.length-1,1)}catch(t){l.default.error("RepetitionCalculator: calculateRepetitions2",t)}}let o=!1;const u=this.musicSheet.SourceMeasures.length-1;for(const t of this.musicSheet.Repetitions)if(0===t.StartIndex&&t.EndIndex===u){o=!0;break}if(!o){const t=new a.Repetition(this.musicSheet,!0);t.FromWords=!0,t.startMarker=new n.RepetitionInstruction(0,n.RepetitionInstructionEnum.StartLine),t.startMarker.parentRepetition=t,this.musicSheet.SourceMeasures[0].FirstRepetitionInstructions.push(t.startMarker),t.endMarker=new n.RepetitionInstruction(u,n.RepetitionInstructionEnum.BackJumpLine),t.endMarker.parentRepetition=t,t.BackwardJumpInstructions.push(t.endMarker),t.UserNumberOfRepetitions=t.DefaultNumberOfRepetitions,this.musicSheet.Repetitions.push(t)}for(let t=0,e=this.musicSheet.SourceMeasures.length;t1&&e.FirstRepetitionInstructions.sort(r.RepetitionInstructionComparer.Compare),e.LastRepetitionInstructions.length>1&&e.LastRepetitionInstructions.sort(r.RepetitionInstructionComparer.Compare)}}handleRepetitionInstructions(t){var e,i,s,r,a,l,h;let u;switch(t.type){case n.RepetitionInstructionEnum.StartLine:u=this.createNewRepetition(this.currentMeasureIndex),t.parentRepetition=u.RepetitonUnderConstruction,u.RepetitonUnderConstruction.FromWords=!1,u.RepetitonUnderConstruction.startMarker=t,null===(e=this.currentMeasure)||void 0===e||e.FirstRepetitionInstructions.push(t);break;case n.RepetitionInstructionEnum.BackJumpLine:u=this.getOrCreateCurrentRepetition2(!1),t.parentRepetition=u.RepetitonUnderConstruction,u.RepetitonUnderConstruction.BackwardJumpInstructions.push(t),null===(i=this.currentMeasure)||void 0===i||i.LastRepetitionInstructions.push(t),0===u.RepetitonUnderConstruction.EndingParts.length&&this.finalizeRepetition(u);break;case n.RepetitionInstructionEnum.Ending:if(u=this.getOrCreateCurrentRepetition(),t.parentRepetition=u.RepetitonUnderConstruction,t.endingIndices.contains(1)&&t.alignment===n.AlignmentType.Begin){if(u.RepetitonUnderConstruction.BackwardJumpInstructions.length>0||u.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)){u=void 0;for(let t=this.openRepetitions.length-1;t>=0;t--){const e=this.openRepetitions[t];if(0===e.RepetitonUnderConstruction.BackwardJumpInstructions.length)for(u=e;this.openRepetitions.length-1>t;){const t=this.openRepetitions.last();this.finalizeRepetition(t)}}void 0===u&&(u=this.createNewRepetition(0),u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(0,n.RepetitionInstructionEnum.None))}void 0===u.RepetitonUnderConstruction.forwardJumpInstruction&&(u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(this.currentMeasureIndex-1,n.RepetitionInstructionEnum.ForwardJump,n.AlignmentType.End,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].LastRepetitionInstructions.push(u.RepetitonUnderConstruction.forwardJumpInstruction))}if(t.alignment===n.AlignmentType.Begin)u.RepetitonUnderConstruction.setEndingsStartIndex(t.endingIndices,this.currentMeasureIndex),null===(s=this.currentMeasure)||void 0===s||s.FirstRepetitionInstructions.push(t);else for(let e=0,i=t.endingIndices.length;e0&&Math.abs(u.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex-this.currentMeasureIndex)<=1)break;if(this.openRepetitions.length&&(null===(h=null===(l=null===(a=this.openRepetitions)||void 0===a?void 0:a.find((t=>t.RepetitonUnderConstruction.startMarker.type===n.RepetitionInstructionEnum.StartLine)))||void 0===l?void 0:l.RepetitonUnderConstruction)||void 0===h?void 0:h.StartIndex)===this.currentMeasureIndex)break;u=this.createNewRepetition(this.currentMeasureIndex),t.parentRepetition=u.RepetitonUnderConstruction,u.RepetitonUnderConstruction.FromWords=!0,u.SegnoFound=!0,u.RepetitonUnderConstruction.startMarker=t,this.currentMeasure.FirstRepetitionInstructions.push(t);break;case n.RepetitionInstructionEnum.Fine:if(0===this.openRepetitions.length)break;if(u=this.getCurrentRepetition(!0),void 0===u)break;t.parentRepetition=u.RepetitonUnderConstruction,u.RepetitonUnderConstruction.FromWords=!0,void 0===u.RepetitonUnderConstruction.forwardJumpInstruction?(u.FineFound=!0,u.RepetitonUnderConstruction.forwardJumpInstruction=t,u.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.currentMeasure.LastRepetitionInstructions.push(t)):this.currentMeasure.LastRepetitionInstructions.push(new n.RepetitionInstruction(this.currentMeasureIndex,n.RepetitionInstructionEnum.Fine,n.AlignmentType.End,void 0));break;case n.RepetitionInstructionEnum.ToCoda:if(0===this.openRepetitions.length)break;if(u=this.getCurrentRepetition(!0),void 0===u)break;void 0===u.RepetitonUnderConstruction.forwardJumpInstruction&&(t.parentRepetition=u.RepetitonUnderConstruction,u.RepetitonUnderConstruction.FromWords=!0,u.ToCodaFound=!0,u.RepetitonUnderConstruction.forwardJumpInstruction=t,this.currentMeasure.LastRepetitionInstructions.push(t));break;case n.RepetitionInstructionEnum.Coda:if(0===this.openRepetitions.length)break;u=this.getOrCreateCurrentRepetition2(!0),t.parentRepetition=u.RepetitonUnderConstruction,u.WaitingForCoda?(u.CodaFound=!0,u.RepetitonUnderConstruction.setEndingStartIndex(2,this.currentMeasureIndex),this.currentMeasure.LastRepetitionInstructions.push(t),this.finalizeRepetition(u),this.currentMeasureIndex>0&&(this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].printNewSystemXml=!0)):u.ToCodaFound||(0===u.RepetitonUnderConstruction.BackwardJumpInstructions.length?(u.ToCodaFound=!0,u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(this.currentMeasureIndex,n.RepetitionInstructionEnum.ToCoda,n.AlignmentType.End,u.RepetitonUnderConstruction),this.currentMeasure.LastRepetitionInstructions.push(u.RepetitonUnderConstruction.forwardJumpInstruction)):this.currentMeasure.LastRepetitionInstructions.push(new n.RepetitionInstruction(this.currentMeasureIndex,n.RepetitionInstructionEnum.Coda,n.AlignmentType.Begin,void 0)));break;case n.RepetitionInstructionEnum.DaCapo:u=this.getOrCreateCurrentRepetition(),u.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&this.finalizeRepetition(u),0!==u.RepetitonUnderConstruction.StartIndex&&(u=this.createNewRepetition(0)),t.parentRepetition=u.RepetitonUnderConstruction,u.RepetitonUnderConstruction.FromWords=!0,u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(0,n.RepetitionInstructionEnum.None,n.AlignmentType.Begin,u.RepetitonUnderConstruction),u.RepetitonUnderConstruction.BackwardJumpInstructions.push(t),this.currentMeasure.LastRepetitionInstructions.push(t),0===u.RepetitonUnderConstruction.EndingParts.length&&this.finalizeRepetition(u);break;case n.RepetitionInstructionEnum.DalSegno:if(u=this.getOrCreateCurrentRepetition2(!0),u.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(u),u=this.createNewRepetition(0),u.RepetitonUnderConstruction.FromWords=!0,u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(0,n.RepetitionInstructionEnum.None,n.AlignmentType.Begin,u.RepetitonUnderConstruction)),t.parentRepetition=u.RepetitonUnderConstruction,!u.SegnoFound){const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.Segno,t.measureIndex);e>=0&&(u.SegnoFound=!0,u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.Segno,n.AlignmentType.Begin,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[e].FirstRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.startMarker))}u.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)&&u.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),u.RepetitonUnderConstruction.BackwardJumpInstructions.push(t),this.currentMeasure.LastRepetitionInstructions.push(t);break;case n.RepetitionInstructionEnum.DalSegnoAlFine:if(0===this.openRepetitions.length)break;if(u=this.getOrCreateCurrentRepetition2(!0),t.parentRepetition=u.RepetitonUnderConstruction,!u.SegnoFound){const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.Segno,t.measureIndex);e>=0&&(u.SegnoFound=!0,u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.Segno,n.AlignmentType.Begin,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[e].FirstRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.startMarker))}if(!u.FineFound){const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.Fine,t.measureIndex);e>=0&&(u.FineFound=!0,u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.Fine,n.AlignmentType.Begin,u.RepetitonUnderConstruction),u.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[e].LastRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.forwardJumpInstruction))}u.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||u.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),u.RepetitonUnderConstruction.BackwardJumpInstructions.push(t),this.currentMeasure.LastRepetitionInstructions.push(t);break;case n.RepetitionInstructionEnum.DaCapoAlFine:if(u=this.getOrCreateCurrentRepetition(),u.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(u),u=this.createNewRepetition(0)),void 0!==u.RepetitonUnderConstruction.startMarker&&0!==u.RepetitonUnderConstruction.StartIndex&&(u=this.createNewRepetition(0)),u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(0,n.RepetitionInstructionEnum.None,n.AlignmentType.Begin,u.RepetitonUnderConstruction),u.RepetitonUnderConstruction.FromWords=!0,t.parentRepetition=u.RepetitonUnderConstruction,!u.FineFound){const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.Fine,t.measureIndex);e>=0&&(u.FineFound=!0,u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.Fine,n.AlignmentType.Begin,u.RepetitonUnderConstruction),u.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[e].LastRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.forwardJumpInstruction))}u.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||u.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),u.RepetitonUnderConstruction.BackwardJumpInstructions.push(t),this.currentMeasure.LastRepetitionInstructions.push(t);break;case n.RepetitionInstructionEnum.DalSegnoAlCoda:if(0===this.openRepetitions.length)break;if(u=this.getOrCreateCurrentRepetition2(!0),t.parentRepetition=u.RepetitonUnderConstruction,!u.SegnoFound){const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.Segno,t.measureIndex);e>=0&&(u.SegnoFound=!0,u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.Segno,n.AlignmentType.Begin,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[e].FirstRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.startMarker))}if(!u.ToCodaFound){const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.ToCoda,t.measureIndex);if(e>=0)u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.ToCoda,n.AlignmentType.Begin,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[e].LastRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.forwardJumpInstruction),u.ToCodaFound=!0;else{const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.Coda,t.measureIndex);e>=0&&(u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.ToCoda,n.AlignmentType.Begin,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[e].LastRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.forwardJumpInstruction),u.ToCodaFound=!0)}}u.ToCodaFound&&(u.WaitingForCoda=!0),u.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||u.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),u.RepetitonUnderConstruction.BackwardJumpInstructions.push(t),this.currentMeasure.LastRepetitionInstructions.push(t);break;case n.RepetitionInstructionEnum.DaCapoAlCoda:if(u=this.getOrCreateCurrentRepetition(),(u.RepetitonUnderConstruction.BackwardJumpInstructions.length>0||0===u.RepetitonUnderConstruction.EndingParts.length)&&(this.finalizeRepetition(u),u=this.createNewRepetition(0)),void 0!==u.RepetitonUnderConstruction.startMarker&&0!==u.RepetitonUnderConstruction.StartIndex&&(u=this.createNewRepetition(0)),u.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(0,n.RepetitionInstructionEnum.None,n.AlignmentType.Begin,u.RepetitonUnderConstruction),u.RepetitonUnderConstruction.FromWords=!0,t.parentRepetition=u.RepetitonUnderConstruction,!u.ToCodaFound){const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.ToCoda,t.measureIndex);if(e>=0)u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.ToCoda,n.AlignmentType.Begin,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[e].LastRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.forwardJumpInstruction),u.ToCodaFound=!0;else{const e=this.findInstructionInMainListBackwards(n.RepetitionInstructionEnum.Coda,t.measureIndex);e>=0&&(u.RepetitonUnderConstruction.forwardJumpInstruction=new n.RepetitionInstruction(e,n.RepetitionInstructionEnum.ToCoda,n.AlignmentType.Begin,u.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[e].LastRepetitionInstructions.splice(0,0,u.RepetitonUnderConstruction.forwardJumpInstruction),u.ToCodaFound=!0)}}u.ToCodaFound&&(u.WaitingForCoda=!0),u.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||u.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),u.RepetitonUnderConstruction.BackwardJumpInstructions.push(t),this.currentMeasure.LastRepetitionInstructions.push(t);break;case n.RepetitionInstructionEnum.None:break;default:throw new o.ArgumentOutOfRangeException("currentRepetitionInstruction")}return!0}findInstructionInMainListBackwards(t,e){for(let i=this.repetitionInstructions.length-1;i>=0;i--){const s=this.repetitionInstructions[i];if(s.measureIndex<=e&&s.type===t)return s.measureIndex}return-1}finalizeRepetition(t){const e=t.RepetitonUnderConstruction;if(e.BackwardJumpInstructions.length>0){let t=!0;const i=this.getLastFinalizedRepetition();if(void 0!==i&&e.coversIdenticalMeasures(i)){if(e.NumberOfEndings>i.NumberOfEndings){const t=this.musicSheet.Repetitions.indexOf(i,0);t>-1&&this.musicSheet.Repetitions.splice(t,1),i.removeFromRepetitionInstructions(),this.musicSheet.Repetitions.push(e)}t=!1,e.removeFromRepetitionInstructions()}else this.musicSheet.Repetitions.push(e);if(t){e.startMarker.type===n.RepetitionInstructionEnum.None&&this.musicSheet.SourceMeasures[e.StartIndex].FirstRepetitionInstructions.push(e.startMarker),console.log("设置循环次数3",null===window||void 0===window?void 0:window.DYCustomRepeatCount,this.rules.DYCustomRepeatCount,e.DefaultNumberOfRepetitions);const t=(null===window||void 0===window?void 0:window.DYCustomRepeatCount)>e.DefaultNumberOfRepetitions?null===window||void 0===window?void 0:window.DYCustomRepeatCount:e.DefaultNumberOfRepetitions;e.UserNumberOfRepetitions=t||this.rules.DYCustomRepeatCount||e.DefaultNumberOfRepetitions}}this.openRepetitions.splice(this.openRepetitions.length-1,1)}getCurrentRepetition(t){let e;for(let i=this.openRepetitions.length-1;i>=0;i--)if(this.openRepetitions[i].RepetitonUnderConstruction.FromWords===t){for(e=this.openRepetitions[i];i0)return this.openRepetitions.last();const t=this.createNewRepetition(0);return t.RepetitonUnderConstruction.startMarker=new n.RepetitionInstruction(0,n.RepetitionInstructionEnum.None,n.AlignmentType.Begin,t.RepetitonUnderConstruction),t}getOrCreateCurrentRepetition2(t){let e;if(this.openRepetitions.length&&this.openRepetitions.last().RepetitonUnderConstruction.EndingParts.length<2)for(let i=this.openRepetitions.length-1;i>=0;i--)if(e=this.openRepetitions[i],e.RepetitonUnderConstruction.FromWords===t){for(;i0){const t=this.openRepetitions.last(),e=t.RepetitonUnderConstruction;if(e.BackwardJumpInstructions.length>0){const i=Object.keys(e.EndingIndexDict);(0===i.length||e.EndingIndexDict[i[i.length-1]].part.EndIndex>=0)&&this.finalizeRepetition(t)}}const e=new u(this.musicSheet);return this.lastRepetitionCommonPartStartIndex=t,this.openRepetitions.push(e),e}getLastFinalizedRepetition(){if(this.musicSheet.Repetitions.length>0)return this.musicSheet.Repetitions.last()}};class u{constructor(t){this.RepetitonUnderConstruction=new a.Repetition(t)}}e.RepetitionBuildingContainer=u},9934:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RepetitionInstructionReader=void 0;const s=i(6189),n=i(6189),r=i(1211);e.RepetitionInstructionReader=class{set MusicSheet(t){this.musicSheet=t,this.xmlMeasureList=new Array(this.musicSheet.Instruments.length),this.repetitionInstructions=[]}prepareReadingMeasure(t,e){this.currentMeasureIndex=e}handleLineRepetitionInstructions(t){let e=!1;if(t.elements().length>0){let i="",n=!1,r="",o="",a="";const l=[],h=t.element("bar-style");h&&(a=h.value),i=t.attributes().length>0&&t.attribute("location")?t.attribute("location").value:"right";const u=t.elements();for(let t=0,e=u.length;t0)if("left"===i){if("start"===o){const t=new s.RepetitionInstruction(this.currentMeasureIndex,s.RepetitionInstructionEnum.Ending,s.AlignmentType.Begin,void 0,l);this.addInstruction(this.repetitionInstructions,t)}if("forward"===r){const t=new s.RepetitionInstruction(this.currentMeasureIndex,s.RepetitionInstructionEnum.StartLine);this.addInstruction(this.repetitionInstructions,t)}}else{if("stop"===o){const t=new s.RepetitionInstruction(this.currentMeasureIndex,s.RepetitionInstructionEnum.Ending,s.AlignmentType.End,void 0,l);this.addInstruction(this.repetitionInstructions,t)}if("backward"===r){const t=new s.RepetitionInstruction(this.currentMeasureIndex,s.RepetitionInstructionEnum.BackJumpLine);this.addInstruction(this.repetitionInstructions,t)}}}return e}handleRepetitionInstructionsFromWordsOrSymbols(t,e){const i=t.element("words"),n=this.currentMeasureIndex;if(i){const t="d\\s?\\.s\\.",e=i.value.trim().toLowerCase();if(r.StringUtil.StringContainsSeparatedWord(e,t+" al fine",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.DalSegnoAlFine);return this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,t+" al coda",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.DalSegnoAlCoda);return this.addInstruction(this.repetitionInstructions,t),!0}const o="d\\.\\s?c\\.";if(r.StringUtil.StringContainsSeparatedWord(e,o+" al fine",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.DaCapoAlFine);return this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,o+" al coda",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.DaCapoAlCoda);return this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,o)||r.StringUtil.StringContainsSeparatedWord(e,"da\\s?capo",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.DaCapo);return this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,t,!0)||r.StringUtil.StringContainsSeparatedWord(e,"dal\\s?segno",!0)){let t;return t=r.StringUtil.StringContainsSeparatedWord(e,"al\\s?coda",!0)?new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.DalSegnoAlCoda):new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.DalSegno),this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,"to\\s?coda",!0)||r.StringUtil.StringContainsSeparatedWord(e,"a (la )?coda",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.ToCoda);return this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,"fine",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.Fine);return this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,"coda",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,t),!0}if(r.StringUtil.StringContainsSeparatedWord(e,"segno",!0)){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,t),!0}}else{if(t.element("segno")){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,t),!0}if(t.element("coda")){const t=new s.RepetitionInstruction(n,s.RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,t),!0}}return!1}removeRedundantInstructions(){let t=0,e=0,i=0,r=0;for(let n=0;n0&&this.findInstructionInPreviousMeasure(n,o.measureIndex,s.RepetitionInstructionEnum.ToCoda)&&(o.type=s.RepetitionInstructionEnum.None),0===e&&0===i&&(o.type=s.RepetitionInstructionEnum.ToCoda,o.alignment=s.AlignmentType.End,o.measureIndex--);break;case s.RepetitionInstructionEnum.Segno:if(t-r>0){let t=!1;for(let n=0,r=this.repetitionInstructions.length;n0?s.RepetitionInstructionEnum.DalSegnoAlCoda:s.RepetitionInstructionEnum.DalSegno,o.type=s.RepetitionInstructionEnum.None,t=!0;break;case s.RepetitionInstructionEnum.DalSegno:case s.RepetitionInstructionEnum.DalSegnoAlFine:case s.RepetitionInstructionEnum.DalSegnoAlCoda:o.type=s.RepetitionInstructionEnum.None,t=!0}if(t)break}if(t)break;o.type=i-e>0?s.RepetitionInstructionEnum.DalSegnoAlCoda:s.RepetitionInstructionEnum.DalSegno,o.alignment=s.AlignmentType.End,o.measureIndex--}}if(this.backwardSearchForPreviousIdenticalInstruction(n,o)||o.type===s.RepetitionInstructionEnum.None)this.repetitionInstructions.splice(n,1),n--;else switch(o.type){case s.RepetitionInstructionEnum.Fine:break;case s.RepetitionInstructionEnum.ToCoda:i++;break;case s.RepetitionInstructionEnum.Coda:e++;break;case s.RepetitionInstructionEnum.Segno:t++;break;case s.RepetitionInstructionEnum.DalSegnoAlFine:case s.RepetitionInstructionEnum.DalSegnoAlCoda:r++}}this.repetitionInstructions.sort(n.RepetitionInstructionComparer.Compare)}findInstructionInPreviousMeasure(t,e,i){for(let s=t-1;s>=0;s--){const t=this.repetitionInstructions[s];if(e-t.measureIndex==1&&t.type===i)return!0}return!1}backwardSearchForPreviousIdenticalInstruction(t,e){for(let i=t-1;i>=0;i--)if(this.repetitionInstructions[i].equals(e))return!0;return!1}addInstruction(t,e){let i=!0;for(let s=0,n=t.length;s0){const t=s.attribute("type").value;let o=1;try{s.attribute("number")&&(o=parseInt(s.attribute("number").value,10))}catch(t){r.default.debug("VoiceGenerator.addSlur number: ",t)}let h=a.PlacementEnum.NotYetDefined;const u=s.attribute("placement");u&&u.value&&("above"===u.value?h=a.PlacementEnum.Above:"below"===u.value&&(h=a.PlacementEnum.Below));const c=s.attribute("orientation");if(c&&c.value&&("over"===c.value?h=a.PlacementEnum.Above:"under"===c.value&&(h=a.PlacementEnum.Below)),"start"===t){let t=new n.Slur;this.openSlurDict[o]=t,t.StartNote=e,t.idx=i,t.PlacementXml=h}else if("stop"===t){const t=this.openSlurDict[o];if(t){const n=s.name;if("slide"===n||"glissando"===n){const i=t.StartNote,s=new l.Glissando(i);s.AddNote(e),s.EndNote=e,e.NoteGlissando=s,delete this.openSlurDict[o]}else t.idx=i,t.EndNote=e,e.isDuplicateSlur(t)||(e.NoteSlurs.push(t),t.StartNote.NoteSlurs.push(t)),delete this.openSlurDict[o]}}}}catch(t){const e=o.ITextTranslation.translateText("ReaderErrorMessages/SlurError","Error while reading slur.");this.musicSheet.SheetErrors.pushMeasureError(e)}}}},1651:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(7677),e),n(i(2905),e),n(i(8198),e),n(i(4671),e),n(i(2535),e),n(i(6789),e),n(i(9934),e),n(i(3755),e)},2458:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReaderPluginManager=void 0;const n=s(i(2043));e.ReaderPluginManager=class{constructor(){this.voiceMeasureReadPlugins=[]}addVoiceMeasureReadPlugin(t){this.voiceMeasureReadPlugins.push(t)}processVoiceMeasureReadPlugins(t,e,i){for(const s of this.voiceMeasureReadPlugins)try{s.measureReadCalculations(t,e,i)}catch(t){n.default.info("VoiceGenerator.addSingleNote: ",t)}}}},8109:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.VoiceGenerator=void 0;const n=i(2947),r=i(3884),o=i(908),a=i(5253),l=i(9050),h=i(9224),u=i(4555),c=i(5544),d=i(8069),p=i(1797),f=i(6331),m=i(2535),g=i(1703),b=i(8640),S=i(8640),y=i(4447),v=s(i(2043)),E=i(8640),_=i(2337),x=i(7677),M=i(766),P=i(3029),w=i(2478),T=i(2953),I=i(3748);e.VoiceGenerator=class{constructor(t,e,i,s,o=void 0){this.openBeams=[],this.beamNumberOffset=0,this.currentOctaveShift=0,this.tupletDict={},this.openTupletNumber=0,this.currMeasureVoiceEntries=[],this.graceVoiceEntriesTempList=[],this.staff=e,this.instrument=e.ParentInstrument,this.musicSheet=this.instrument.GetMusicSheet,this.slurReader=s,this.pluginManager=t,this.voice=o?new n.LinkedVoice(this.instrument,i,o):new r.Voice(this.instrument,i),this.instrument.Voices.push(this.voice),this.staff.Voices.push(this.voice),this.lyricsReader=new m.LyricsReader(this.musicSheet),this.articulationReader=new x.ArticulationReader(this.musicSheet.Rules)}get openTieDict(){return this.staff.openTieDict}get GetVoice(){return this.voice}get OctaveShift(){return this.currentOctaveShift}set OctaveShift(t){this.currentOctaveShift=t}createVoiceEntry(t,e,i,s,n=!1,r=!1,a=!1){this.activeKey=i,this.activeRhythm=s,this.currentVoiceEntry=new o.VoiceEntry(p.Fraction.createFromFraction(t),this.voice,e,!0,n,r,a),n?this.graceVoiceEntriesTempList.push(this.currentVoiceEntry):(this.currentNormalVoiceEntry=this.currentVoiceEntry,this.currMeasureVoiceEntries.push(this.currentNormalVoiceEntry),this.graceVoiceEntriesTempList.length>0&&(this.currentVoiceEntry.GraceVoiceEntriesBefore=this.graceVoiceEntriesTempList,this.graceVoiceEntriesTempList=[]))}finalizeReadingMeasure(){this.graceVoiceEntriesTempList.length>0&&void 0!==this.currentNormalVoiceEntry&&this.currentNormalVoiceEntry.GraceVoiceEntriesAfter.concat(this.graceVoiceEntriesTempList),this.graceVoiceEntriesTempList=[],this.pluginManager.processVoiceMeasureReadPlugins(this.currMeasureVoiceEntries,this.activeKey,this.activeRhythm),this.currMeasureVoiceEntries.length=0,this.openBeams.length>1&&this.handleOpenBeam()}read(t,e,i,s,n,r,o,a,l,h,u,d,p,m,g,b,S,y,E,_,x,M,w){this.currentStaffEntry=o,this.currentMeasure=a;try{this.currentNote=r?this.addRestNote(t.element("rest"),e,s,i,n,p,m,E,t):this.addSingleNote(t,e,s,i,n,u,d,p,m,g,b,S,y,E,x,M,w),this.currentNote.DotsXml=_;const o=t.elements("lyric");void 0!==this.lyricsReader&&o&&(this.lyricsReader.addLyricEntry(o,this.currentVoiceEntry),this.voice.Parent.HasLyrics=!0);let a=!1;const f=t.element("notations");if(f){this.articulationReader&&this.readArticulations(f,this.currentVoiceEntry,this.currentNote);const e=f.elements("slur"),i=f.elements("slide"),s=f.elements("glissando");void 0!==this.slurReader&&(e.length>0||i.length>0)&&!this.currentNote.ParentVoiceEntry.IsGrace&&(this.slurReader.addSlur(e,this.currentNote),i.length>0&&this.slurReader.addSlur(i,this.currentNote),s.length>0&&this.slurReader.addSlur(s,this.currentNote));const n=f.elements("tuplet");n.length>0&&(this.openTupletNumber=this.addTuplet(t,n),a=!0);const r=f.element("arpeggiate");if(void 0!==r){let t;if(this.currentVoiceEntry.Arpeggio)t=this.currentVoiceEntry.Arpeggio;else{let e=!1;for(const i of this.currentStaffEntry.VoiceEntries)if(i.Arpeggio){e=!0,t=i.Arpeggio;break}if(!e){let e=P.ArpeggioType.ARPEGGIO_DIRECTIONLESS;const i=r.attribute("direction");if(i)switch(i.value){case"up":e=P.ArpeggioType.ROLL_UP;break;case"down":e=P.ArpeggioType.ROLL_DOWN;break;default:e=P.ArpeggioType.ARPEGGIO_DIRECTIONLESS}t=new P.Arpeggio(this.currentVoiceEntry,e),this.currentVoiceEntry.Arpeggio=t}}t.addNote(this.currentNote)}const o=f.elements("tied");o.length>0&&this.addTie(o,l,h,c.TieTypes.SIMPLE);const u=f.element("technical");if(u){const t=u.elements("hammer-on");t.length>0&&this.addTie(t,l,h,c.TieTypes.HAMMERON);const e=u.elements("pull-off");e.length>0&&this.addTie(e,l,h,c.TieTypes.PULLOFF)}}void 0===t.element("time-modification")||a||this.handleTimeModificationNode(t)}catch(t){v.default.warn(t);const e=f.ITextTranslation.translateText("ReaderErrorMessages/NoteError","Ignored erroneous Note.");this.musicSheet.SheetErrors.pushMeasureError(e),this.musicSheet.SheetErrors.pushMeasureError(t)}return this.currentNote}checkForStaffEntryLink(t,e,i,s){const n=new y.StaffEntryLink(this.currentVoiceEntry);n.LinkStaffEntries.push(i),i.Link=n;const r=this.currentVoiceEntry.Timestamp.clone(),o=s.getVerticalContainerByTimestamp(r);return(i=o.StaffEntries[t])||(i=new l.SourceStaffEntry(o,e),o.StaffEntries[t]=i),i.VoiceEntries.push(this.currentVoiceEntry),n.LinkStaffEntries.push(i),i.Link=n,i}checkForOpenBeam(){this.openBeams.length>0&&this.currentNote&&this.handleOpenBeam()}checkOpenTies(){const t=this.openTieDict;for(const e in t)if(t.hasOwnProperty(e)){const i=t[e];p.Fraction.plus(i.StartNote.ParentStaffEntry.Timestamp,i.Duration).lt(i.StartNote.SourceMeasure.Duration)&&delete t[e]}}hasVoiceEntry(){return void 0!==this.currentVoiceEntry}readArticulations(t,e,i){const s=t.element("articulations");s&&this.articulationReader.addArticulationExpression(s,e);const n=t.element("fermata");n&&this.articulationReader.addFermata(n,e);const r=t.element("technical");r&&this.articulationReader.addTechnicalArticulations(r,e,i);const o=t.element("ornaments");o&&this.articulationReader.addOrnament(o,e)}addSingleNote(t,e,i,s,n,r,l,h,u,c,d,m,y,_,x,P,w){var I;let L,A,C,R,N=0,k=b.AccidentalEnum.NONE,B=S.NoteEnum.C,D=S.NoteEnum.C,O=0,F=0;const V=t.elements();for(let t=0,e=V.length;t{const e=t.getAttribute("begin"),i=t.getAttribute("end");Y.push({begin:e?e/1e3:0,end:i?i/1e3:0})})),this.addNoteInfo(U,i,h,u,n,D,F,_,_,Y),U.TypeLength=s,U.IsGraceNote=c,U.StemDirectionXml=d,U.TremoloInfo=m,U.PlaybackInstrumentId=A,(void 0!==C&&"normal"!==C||void 0!==R)&&(U.Notehead=new M.Notehead(U,C,R)),U.NoteheadColorXml=_,U.NoteheadColor=_,U.PlaybackInstrumentId=A,U.TremoloType=x,U.glissandoType=P,U.slideType=w,this.currentVoiceEntry.addNote(U),d===o.StemDirectionType.None&&(y="#00000000"),this.currentVoiceEntry.StemDirectionXml=d,y&&(this.currentVoiceEntry.StemColorXml=y,this.currentVoiceEntry.StemColor=y,U.StemColorXml=y),t.elements("beam")&&!r&&this.createBeam(t,U),U}addRestNote(t,e,i,s,n,r,o,l,h){var u;const c=p.Fraction.createFromFraction(e),d=t.element("display-step"),f=t.element("display-octave");let m,g,y;d&&f&&(m=S.NoteEnum[d.value.toUpperCase()],g=parseInt(f.value,10),y=new E.Pitch(m,g,b.AccidentalEnum.NONE,void 0,!0));const v=new a.Note(this.currentVoiceEntry,this.currentStaffEntry,c,y,this.currentMeasure,!0);let _=[];const x=t.element("times")||h.element("times"),M=null===(u=null==x?void 0:x.elem)||void 0===u?void 0:u.getElementsByTagName("time");return M&&M.length&&Array.from(M).forEach((t=>{const e=t.getAttribute("begin"),i=t.getAttribute("end");_.push({begin:e?e/1e3:0,end:i?i/1e3:0})})),this.addNoteInfo(v,i,r,o,n,m,g,l,l,_),v.TypeLength=s,this.currentVoiceEntry.Notes.push(v),this.openBeams.length>0&&this.openBeams.last().ExtendedNoteList.push(v),v}addNoteInfo(t,e,i,s,n,r,o,a,l,h){t.NoteTypeXml=e,t.PrintObject=i,t.IsCueNote=s,t.NormalNotes=n,t.displayStepUnpitched=r,t.displayOctaveUnpitched=o,t.NoteheadColorXml=a,t.NoteheadColor=a,t.noteTimeInfo=h}createBeam(t,e){var i;try{const s=t.element("beam");let n;if(void 0!==s&&s.hasAttributes&&(n=s.attribute("number")),n){let s=parseInt(n.value,10);const r=t.elements("beam"),o=r[0].value;r&&("begin"===o?(s===(null===(i=this.openBeams.last())||void 0===i?void 0:i.BeamNumber)?(this.beamNumberOffset++,s+=this.beamNumberOffset):this.openBeams.last()&&this.handleOpenBeam(),this.openBeams.push(new h.Beam(s,this.beamNumberOffset))):s+=this.beamNumberOffset);let a=!1;if(!(s>0&&s<=this.openBeams.length&&this.openBeams[s-1]))return void v.default.debug("[OSMD] invalid beamnumber");for(let t=0,e=this.openBeams[s-1].Notes.length;t1){let n=t.element("time-modification");n&&(n=n.element("actual-notes"));const r=e;for(let e=0,a=r.length;e1&&this.openTupletNumber--),this.tupletDict[e]=l;const u=[];u.push(this.currentNote),l.Notes.push(u),l.Fractions.push(this.getTupletNoteDurationFromType(t)),this.currentNote.NoteTuplet=l,this.openTupletNumber=e}else if("stop"===l.value){let e=1;a.attribute("number")&&(e=parseInt(a.attribute("number").value,10));const i=this.tupletDict[e];if(i){const s=a.attribute("placement");s&&("below"===s.value?i.tupletLabelNumberPlacement=I.PlacementEnum.Below:i.tupletLabelNumberPlacement=I.PlacementEnum.Above,i.PlacementFromXml=!0);const n=[];if(n.push(this.currentNote),i.Notes.push(n),!i.PlacementFromXml){let t=!1;for(const e of i.Notes){for(const s of e)if(!s.isRest()){s.StemDirectionXml===o.StemDirectionType.Down?i.tupletLabelNumberPlacement=I.PlacementEnum.Below:i.tupletLabelNumberPlacement=I.PlacementEnum.Above,t=!0;break}if(t)break}}i.Fractions.push(this.getTupletNoteDurationFromType(t)),this.currentNote.NoteTuplet=i,delete this.tupletDict[e],0===Object.keys(this.tupletDict).length?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--}}}}}else if(e[0]){const n=e[0];if(n.hasAttributes){const e=n.attribute("type").value;let r=1;n.attribute("number")&&(r=parseInt(n.attribute("number").value,10));const a=isNaN(r),l=this.readShowNumberNoneGiven(n),h=n.attribute("bracket");if(h&&"yes"===h.value?(s=!0,i=!0):h&&"no"===h.value&&(i=!1),"start"===e){let e=0,o=t.element("time-modification");if(o&&(o=o.element("actual-notes")),o&&(e=parseInt(o.value,10),isNaN(e))){const t=f.ITextTranslation.translateText("ReaderErrorMessages/TupletNoteDurationError","Invalid tuplet note duration.");throw this.musicSheet.SheetErrors.pushMeasureError(t),new g.MusicSheetReadingException(t)}a&&(this.openTupletNumber++,r=this.openTupletNumber);let h=this.tupletDict[r];h||(h=this.tupletDict[r]=new d.Tuplet(e,s),h.BracketedXmlValue=i,h.ShowNumberNoneGivenInXml=l,h.tupletLabelNumberPlacement=I.PlacementEnum.Above);const u=n.attribute("placement");u&&("below"===u.value?h.tupletLabelNumberPlacement=I.PlacementEnum.Below:h.tupletLabelNumberPlacement=I.PlacementEnum.Above,h.PlacementFromXml=!0);const c=[];c.push(this.currentNote),h.Notes.push(c),h.Fractions.push(this.getTupletNoteDurationFromType(t)),this.currentNote.NoteTuplet=h,this.openTupletNumber=r}else if("stop"===e){a&&(r=this.openTupletNumber);const e=this.tupletDict[this.openTupletNumber];if(e){const i=n.attribute("placement");i&&("below"===i.value?e.tupletLabelNumberPlacement=I.PlacementEnum.Below:e.tupletLabelNumberPlacement=I.PlacementEnum.Above,e.PlacementFromXml=!0);const s=[];if(s.push(this.currentNote),e.Notes.push(s),!e.PlacementFromXml){let t=!1;for(const i of e.Notes){for(const s of i)if(!s.isRest()){s.StemDirectionXml===o.StemDirectionType.Down?e.tupletLabelNumberPlacement=I.PlacementEnum.Below:e.tupletLabelNumberPlacement=I.PlacementEnum.Above,t=!0;break}if(t)break}}e.Fractions.push(this.getTupletNoteDurationFromType(t)),this.currentNote.NoteTuplet=e,0===Object.keys(this.tupletDict).length?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--,delete this.tupletDict[r]}}}}return this.openTupletNumber}readShowNumberNoneGiven(t){const e=t.attribute("show-number");return!(!(null==e?void 0:e.value)||"none"!==e.value)}handleTimeModificationNode(t){if(this.tupletDict[this.openTupletNumber])try{const e=this.tupletDict[this.openTupletNumber],i=_.CollectionUtil.last(e.Notes);let s;i[0].ParentVoiceEntry.Timestamp.Equals(this.currentVoiceEntry.Timestamp)?s=i:(s=[],e.Notes.push(s),e.Fractions.push(this.getTupletNoteDurationFromType(t))),s.push(this.currentNote),this.currentNote.NoteTuplet=e}catch(t){const e=f.ITextTranslation.translateText("ReaderErrorMessages/TupletNumberError","Invalid tuplet number.");throw this.musicSheet.SheetErrors.pushMeasureError(e),t}else if(this.currentVoiceEntry.Notes.length>0){const t=this.currentVoiceEntry.Notes[0];if(t.NoteTuplet){const e=t.NoteTuplet;_.CollectionUtil.last(e.Notes).push(this.currentNote),this.currentNote.NoteTuplet=e}}}addTie(t,e,i,s){if(t)if(1===t.length){const e=t[0];if(void 0!==e&&e.attributes()){const t=this.getTieDirection(e),i=e.attribute("type").value;try{if("start"===i){const e=this.findCurrentNoteInTieDict(this.currentNote);e<0&&delete this.openTieDict[e];const i=this.getNextAvailableNumberForTie(),n=new u.Tie(this.currentNote,s);this.openTieDict[i]=n,n.TieNumber=i,n.TieDirection=t}else if("stop"===i){const t=this.findCurrentNoteInTieDict(this.currentNote),e=this.openTieDict[t];e&&(e.AddNote(this.currentNote),delete this.openTieDict[t])}}catch(t){const e=f.ITextTranslation.translateText("ReaderErrorMessages/TieError","Error while reading tie.");this.musicSheet.SheetErrors.pushMeasureError(e)}}}else if(2===t.length){const e=this.findCurrentNoteInTieDict(this.currentNote);if(e>=0){const i=this.openTieDict[e];i.AddNote(this.currentNote);for(const e of t)if("start"===e.attribute("type").value){const t=this.getTieDirection(e);i.NoteIndexToTieDirection[i.Notes.length-1]=t}}}}getTieDirection(t){let e=I.PlacementEnum.NotYetDefined;const i=t.attribute("placement");i&&("above"===i.value?e=I.PlacementEnum.Above:"below"===i.value&&(e=I.PlacementEnum.Below));const s=t.attribute("orientation");return s&&("over"===s.value?e=I.PlacementEnum.Above:"under"===s.value&&(e=I.PlacementEnum.Below)),e}getNextAvailableNumberForTie(){const t=Object.keys(this.openTieDict);if(0===t.length)return 1;t.sort(((t,e)=>+t-+e));for(let e=0;e{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ArpeggioType=e.Arpeggio=void 0,e.Arpeggio=class{constructor(t,e=i.ARPEGGIO_DIRECTIONLESS){this.parentVoiceEntry=t,this.type=e,this.notes=[]}addNote(t){this.notes.push(t),t.Arpeggio=this}},function(t){t[t.BRUSH_DOWN=1]="BRUSH_DOWN",t[t.BRUSH_UP=2]="BRUSH_UP",t[t.ROLL_DOWN=3]="ROLL_DOWN",t[t.ROLL_UP=4]="ROLL_UP",t[t.RASQUEDO_DOWN=5]="RASQUEDO_DOWN",t[t.RASQUEDO_UP=6]="RASQUEDO_UP",t[t.ARPEGGIO_DIRECTIONLESS=7]="ARPEGGIO_DIRECTIONLESS"}(i=e.ArpeggioType||(e.ArpeggioType={}))},1662:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Articulation=void 0,e.Articulation=class{constructor(t,e){this.articulationEnum=t,this.placement=e}Equals(t){return t.articulationEnum===this.articulationEnum&&t.placement===this.placement}}},9224:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.BeamEnum=e.Beam=void 0,e.Beam=class{constructor(t=1,e=0){this.notes=[],this.extendedNoteList=[],this.BeamNumberOffsetToXML=0,this.AutoGenerated=!1,this.BeamNumber=t,this.BeamNumberOffsetToXML=e}get Notes(){return this.notes}set Notes(t){this.notes=t}get ExtendedNoteList(){return this.extendedNoteList}set ExtendedNoteList(t){this.extendedNoteList=t}addNoteToBeam(t){t&&(t.NoteBeam=this,this.notes.push(t),this.extendedNoteList.push(t))}},(i=e.BeamEnum||(e.BeamEnum={}))[i.BeamNone=-1]="BeamNone",i[i.BeamBegin=0]="BeamBegin",i[i.BeamContinue=1]="BeamContinue",i[i.BeamEnd=2]="BeamEnd",i[i.BeamForward=3]="BeamForward",i[i.BeamBackward=4]="BeamBackward"},4123:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChordSymbolEnum=e.ChordDegreeText=e.CustomChord=e.Degree=e.ChordSymbolContainer=void 0;const s=i(8640),n=i(4040),r=i(8640);e.ChordSymbolContainer=class{constructor(t,e,i,s,n){this.rootPitch=t,this.chordKind=e,this.bassPitch=i,this.degrees=s,this.rules=n}get RootPitch(){return this.rootPitch}get ChordKind(){return this.chordKind}get BassPitch(){return this.bassPitch}get ChordDegrees(){return this.degrees}static calculateChordText(t,e,i){let o=t.RootPitch;if(n.MusicSheetCalculator.transposeCalculator&&(o=n.MusicSheetCalculator.transposeCalculator.transposePitch(t.RootPitch,i,e)),t.ChordKind===l.none)return t.getTextFromChordKindEnum(t.ChordKind);let h=s.Pitch.getNoteEnumString(o.FundamentalNote);o.Accidental!==r.AccidentalEnum.NONE&&(h+=t.getTextForAccidental(o.Accidental));const u={adds:[],alts:[],subs:[]};for(const e of t.ChordDegrees)if(e){let i="";switch(e.alteration!==r.AccidentalEnum.NONE&&(i+=t.getTextForAccidental(e.alteration)),i+=e.value,e.text){case a.add:u.adds.push(i);break;case a.alter:u.alts.push(i);break;case a.subtract:u.subs.push(i)}}let c=t.getTextFromChordKindEnum(t.ChordKind);const d=["adds","alts","subs"],p=t.rules.CustomChords;for(const e of p){if(e.chordKind!==t.chordKind)continue;let i=!0;for(const t of d){for(const s of e.degrees[t]||[])if(u[t].indexOf(s)<0){i=!1;break}if(!i)break}if(i){for(const t of d)for(const i of e.degrees[t]||[])u[t].splice(u[t].indexOf(i),1);c=e.alternateName}}if(h+=c,u.adds.length>0&&(h+="("+u.adds.join(",")+")"),u.alts.length>0&&(h+="(alt "+u.alts.join(",")+")"),u.subs.length>0&&(h+="(omit "+u.subs.join(",")+")"),t.BassPitch){let r=t.BassPitch;n.MusicSheetCalculator.transposeCalculator&&(r=n.MusicSheetCalculator.transposeCalculator.transposePitch(t.BassPitch,i,e)),h+="/",h+=s.Pitch.getNoteEnumString(r.FundamentalNote),h+=t.getTextForAccidental(r.Accidental)}return h}getTextForAccidental(t){const e=this.rules.ChordAccidentalTexts.getValue(t);return void 0!==e?e:""}getTextFromChordKindEnum(t){var e;return null!==(e=this.rules.ChordSymbolLabelTexts.getValue(t))&&void 0!==e?e:""}},e.Degree=class{constructor(t,e,i){this.value=t,this.alteration=e,this.text=i}};class o{constructor(t,e,i){this.alternateName=t,this.chordKind=e,this.degrees=i}static createCustomChord(t,e,i){return new o(t,e,i)}static renameCustomChord(t,e,i){for(const s of i)s.alternateName===t&&(s.alternateName=e)}}var a,l;e.CustomChord=o,function(t){t[t.add=0]="add",t[t.alter=1]="alter",t[t.subtract=2]="subtract"}(a=e.ChordDegreeText||(e.ChordDegreeText={})),function(t){t[t.major=0]="major",t[t.minor=1]="minor",t[t.augmented=2]="augmented",t[t.diminished=3]="diminished",t[t.dominant=4]="dominant",t[t.majorseventh=5]="majorseventh",t[t.minorseventh=6]="minorseventh",t[t.diminishedseventh=7]="diminishedseventh",t[t.augmentedseventh=8]="augmentedseventh",t[t.halfdiminished=9]="halfdiminished",t[t.majorminor=10]="majorminor",t[t.majorsixth=11]="majorsixth",t[t.minorsixth=12]="minorsixth",t[t.dominantninth=13]="dominantninth",t[t.majorninth=14]="majorninth",t[t.minorninth=15]="minorninth",t[t.dominant11th=16]="dominant11th",t[t.major11th=17]="major11th",t[t.minor11th=18]="minor11th",t[t.dominant13th=19]="dominant13th",t[t.major13th=20]="major13th",t[t.minor13th=21]="minor13th",t[t.suspendedsecond=22]="suspendedsecond",t[t.suspendedfourth=23]="suspendedfourth",t[t.Neapolitan=24]="Neapolitan",t[t.Italian=25]="Italian",t[t.French=26]="French",t[t.German=27]="German",t[t.pedal=28]="pedal",t[t.power=29]="power",t[t.Tristan=30]="Tristan",t[t.none=31]="none"}(l=e.ChordSymbolEnum||(e.ChordSymbolEnum={}))},3748:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.PlacementEnum=e.AbstractExpression=void 0,e.AbstractExpression=class{constructor(t){this.placement=t}static isStringInStringList(t,e){for(let i=0,s=t.length;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTempoExpression=void 0;const s=i(3748);class n extends s.AbstractExpression{constructor(t,e,i,s){super(e),this.label=t,this.staffNumber=i,this.parentMultiTempoExpression=s}get Label(){return this.label}set Label(t){this.label=t}get Placement(){return this.placement}set Placement(t){this.placement=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get ParentMultiTempoExpression(){return this.parentMultiTempoExpression}static isStringInStringList(t,e){for(const i of t)if(n.stringContainsSeparatedWord(e.toLowerCase().trim(),i.toLowerCase().trim()))return!0;return!1}static stringContainsSeparatedWord(t,e){return t===e||-1!==t.indexOf(" "+e)||-1!==t.indexOf(e+" ")}}e.AbstractTempoExpression=n},7839:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContDynamicEnum=e.ContinuousDynamicExpression=void 0;const s=i(3748),n=i(1797);class r extends s.AbstractExpression{constructor(t,e,i,s,n,r,o=""){super(e),super.parentMeasure=s,this.NumberXml=r,this.dynamicType=t,this.label=o,this.staffNumber=i,this.activeInstantaneousDynamic=n,this.startVolume=1,this.endVolume=1,this.setStartAndEndVolume(),""!==o&&this.setType()}setStartAndEndVolume(){this.activeInstantaneousDynamic&&(this.dynamicType===o.crescendo&&(this.startVolume=this.activeInstantaneousDynamic.Volume,this.endVolume=1.2*this.activeInstantaneousDynamic.Volume),this.dynamicType===o.diminuendo&&(this.startVolume=this.activeInstantaneousDynamic.Volume,this.endVolume=.8*this.activeInstantaneousDynamic.Volume))}get DynamicType(){return this.dynamicType}set DynamicType(t){this.dynamicType=t}get StartMultiExpression(){return this.startMultiExpression}set StartMultiExpression(t){this.startMultiExpression=t}get EndMultiExpression(){return this.endMultiExpression}set EndMultiExpression(t){this.endMultiExpression=t}get Placement(){return this.placement}set Placement(t){this.placement=t}get StartVolume(){return this.startVolume}set StartVolume(t){this.startVolume=t}get EndVolume(){return this.endVolume}set EndVolume(t){this.endVolume=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get Label(){return this.label}set Label(t){this.label=t,this.setType()}static isInputStringContinuousDynamic(t){return!!t&&(r.isStringInStringList(r.listContinuousDynamicIncreasing,t)||r.isStringInStringList(r.listContinuousDynamicDecreasing,t))}getInterpolatedDynamic(t){const e=this.StartMultiExpression.AbsoluteTimestamp;let i;if(i=this.EndMultiExpression?this.EndMultiExpression.AbsoluteTimestamp:n.Fraction.plus(this.startMultiExpression.SourceMeasureParent.AbsoluteTimestamp,this.startMultiExpression.SourceMeasureParent.Duration),t.lt(e))return-1;if(i.lt(t))return-2;const s=n.Fraction.minus(t,e).RealValue/n.Fraction.minus(i,e).RealValue;return Math.max(0,Math.min(99.9,this.startVolume+(this.endVolume-this.startVolume)*s))}isWedge(){return!this.label}setType(){r.isStringInStringList(r.listContinuousDynamicIncreasing,this.label)?this.dynamicType=o.crescendo:r.isStringInStringList(r.listContinuousDynamicDecreasing,this.label)&&(this.dynamicType=o.diminuendo)}}var o;e.ContinuousDynamicExpression=r,r.listContinuousDynamicIncreasing=["crescendo","cresc","cresc.","cres."],r.listContinuousDynamicDecreasing=["decrescendo","decresc","decr.","diminuendo","dim.","dim"],function(t){t[t.crescendo=0]="crescendo",t[t.diminuendo=1]="diminuendo"}(o=e.ContDynamicEnum||(e.ContDynamicEnum={}))},280:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContinuousTempoType=e.ContinuousTempoExpression=void 0;const s=i(1797),n=i(9775);class r extends n.AbstractTempoExpression{constructor(t,e,i,s){super(t,e,i,s),this.setTempoType()}static isInputStringContinuousTempo(t){return!!t&&(r.isStringInStringList(r.listContinuousTempoFaster,t)||r.isStringInStringList(r.listContinuousTempoSlower,t))}static isIncreasingTempo(t){return t<=o.piuMosso}static isDecreasingTempo(t){return t>=o.allargando&&t<=o.ritenuto}get TempoType(){return this.tempoType}set TempoType(t){this.tempoType=t}get StartTempo(){return this.startTempo}set StartTempo(t){this.startTempo=t}get EndTempo(){return this.endTempo}set EndTempo(t){this.endTempo=t}get AbsoluteEndTimestamp(){return this.absoluteEndTimestamp}set AbsoluteEndTimestamp(t){this.absoluteEndTimestamp=t}get AbsoluteTimestamp(){return this.ParentMultiTempoExpression.AbsoluteTimestamp}getAbsoluteFloatTimestamp(){return this.ParentMultiTempoExpression.AbsoluteTimestamp.RealValue}getInterpolatedTempo(t){const e=s.Fraction.plus(this.parentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.parentMultiTempoExpression.Timestamp);if(t.lt(e))return-1;if(this.absoluteEndTimestamp.lt(t))return-2;const i=s.Fraction.minus(t,e).RealValue/s.Fraction.minus(this.absoluteEndTimestamp,e).RealValue;return Math.max(0,Math.min(250,this.startTempo+(this.endTempo-this.startTempo)*i))}setTempoType(){r.isStringInStringList(r.listContinuousTempoFaster,this.label)?this.tempoType=o.accelerando:r.isStringInStringList(r.listContinuousTempoSlower,this.label)&&(this.tempoType=o.ritardando)}}var o;e.ContinuousTempoExpression=r,r.listContinuousTempoFaster=["accelerando","piu mosso","poco piu","stretto"],r.listContinuousTempoSlower=["poco meno","meno mosso","piu lento","calando","allargando","rallentando","ritardando","ritenuto","ritard.","ritard","rit.","rit","riten.","riten"],function(t){t[t.accelerando=0]="accelerando",t[t.stretto=1]="stretto",t[t.stringendo=2]="stringendo",t[t.mosso=3]="mosso",t[t.piuMosso=4]="piuMosso",t[t.allargando=5]="allargando",t[t.calando=6]="calando",t[t.menoMosso=7]="menoMosso",t[t.rallentando=8]="rallentando",t[t.ritardando=9]="ritardando",t[t.ritard=10]="ritard",t[t.rit=11]="rit",t[t.ritenuto=12]="ritenuto",t[t.rubato=13]="rubato",t[t.precipitando=14]="precipitando"}(o=e.ContinuousTempoType||(e.ContinuousTempoType={}))},5853:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OctaveEnum=e.OctaveShift=void 0;const s=i(8640);var n;e.OctaveShift=class{constructor(t,e){this.numberXml=1,this.setOctaveShiftValue(t,e)}get Type(){return this.octaveValue}set Type(t){this.octaveValue=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get ParentStartMultiExpression(){return this.startMultiExpression}set ParentStartMultiExpression(t){this.startMultiExpression=t}get ParentEndMultiExpression(){return this.endMultiExpression}set ParentEndMultiExpression(t){this.endMultiExpression=t}setOctaveShiftValue(t,e){this.octaveValue=1===e&&"down"===t?n.VA8:1===e&&"up"===t?n.VB8:2===e&&"down"===t?n.MA15:2===e&&"up"===t?n.MB15:n.NONE}static getPitchFromOctaveShift(t,e){if(!t)return;let i=t.Octave;switch(e){case n.VA8:i-=1;break;case n.VB8:i+=1;break;case n.MA15:i-=2;break;case n.MB15:i+=2;break;case n.NONE:default:i+=0}return new s.Pitch(t.FundamentalNote,i,t.Accidental)}},function(t){t[t.VA8=0]="VA8",t[t.VB8=1]="VB8",t[t.MA15=2]="MA15",t[t.MB15=3]="MB15",t[t.NONE=4]="NONE"}(n=e.OctaveEnum||(e.OctaveEnum={}))},308:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pedal=void 0,e.Pedal=class{constructor(t=!1,e=!0){this.ChangeEnd=!1,this.ChangeBegin=!1,this.EndsStave=!1,this.BeginsStave=!1,this.line=t,this.sign=e}get IsLine(){return this.line}get IsSign(){return this.sign}}},1928:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Slur=void 0;const s=i(1797);e.Slur=class{constructor(){}get StartNote(){return this.startNote}set StartNote(t){this.startNote=t}get EndNote(){return this.endNote}set EndNote(t){this.endNote=t}startNoteHasMoreStartingSlurs(){if(!this.startNote)return!1;for(let t=0,e=this.startNote.NoteSlurs.length;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WavyLine=void 0;const s=i(3748);class n extends s.AbstractExpression{constructor(t){super(t)}}e.WavyLine=n},8084:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(7839),e),n(i(280),e),n(i(5853),e),n(i(1928),e)},4802:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicExpressionSymbolEnum=void 0,(i=e.DynamicExpressionSymbolEnum||(e.DynamicExpressionSymbolEnum={}))[i.p=0]="p",i[i.f=1]="f",i[i.s=2]="s",i[i.z=3]="z",i[i.m=4]="m",i[i.r=5]="r"},9793:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicEnum=e.InstantaneousDynamicExpression=void 0;const n=i(3748),r=i(4802),o=i(1703),a=s(i(2043)),l=i(1649);class h extends n.AbstractExpression{constructor(t,e,i,s,n){super(i),super.parentMeasure=n,this.dynamicEnum=u[t.toLowerCase()],this.soundDynamic=e,this.staffNumber=s}static staticConstructor(){h.dynamicToRelativeVolumeDict.setValue(u.ffffff,1),h.dynamicToRelativeVolumeDict.setValue(u.fffff,126/127),h.dynamicToRelativeVolumeDict.setValue(u.ffff,125/127),h.dynamicToRelativeVolumeDict.setValue(u.fff,124/127),h.dynamicToRelativeVolumeDict.setValue(u.ff,122/127),h.dynamicToRelativeVolumeDict.setValue(u.f,108/127),h.dynamicToRelativeVolumeDict.setValue(u.mf,76/127),h.dynamicToRelativeVolumeDict.setValue(u.sf,.5),h.dynamicToRelativeVolumeDict.setValue(u.sfp,.5),h.dynamicToRelativeVolumeDict.setValue(u.sfpp,.5),h.dynamicToRelativeVolumeDict.setValue(u.fp,.5),h.dynamicToRelativeVolumeDict.setValue(u.rf,.5),h.dynamicToRelativeVolumeDict.setValue(u.rfz,.5),h.dynamicToRelativeVolumeDict.setValue(u.sfz,.5),h.dynamicToRelativeVolumeDict.setValue(u.sffz,.5),h.dynamicToRelativeVolumeDict.setValue(u.fz,.5),h.dynamicToRelativeVolumeDict.setValue(u.mp,60/127),h.dynamicToRelativeVolumeDict.setValue(u.p,28/127),h.dynamicToRelativeVolumeDict.setValue(u.pp,12/127),h.dynamicToRelativeVolumeDict.setValue(u.ppp,10/127),h.dynamicToRelativeVolumeDict.setValue(u.pppp,7/127),h.dynamicToRelativeVolumeDict.setValue(u.ppppp,5/127),h.dynamicToRelativeVolumeDict.setValue(u.pppppp,4/127)}get ParentMultiExpression(){return this.multiExpression}set ParentMultiExpression(t){this.multiExpression=t}get DynEnum(){return this.dynamicEnum}set DynEnum(t){this.dynamicEnum=t}get SoundDynamic(){return this.soundDynamic}set SoundDynamic(t){this.soundDynamic=t}get Placement(){return this.placement}set Placement(t){this.placement=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get Length(){return Math.abs(this.length)<1e-4&&(this.length=this.calculateLength()),this.length}get MidiVolume(){return 127*this.Volume}get Volume(){return h.dynamicToRelativeVolumeDict.getValue(this.dynamicEnum)}static isInputStringInstantaneousDynamic(t){return!!t&&h.isStringInStringList(h.listInstantaneousDynamics,t)}getDynamicExpressionSymbol(t){switch(t){case"p":return r.DynamicExpressionSymbolEnum.p;case"f":return r.DynamicExpressionSymbolEnum.f;case"s":return r.DynamicExpressionSymbolEnum.s;case"z":return r.DynamicExpressionSymbolEnum.z;case"m":return r.DynamicExpressionSymbolEnum.m;case"r":return r.DynamicExpressionSymbolEnum.r;default:throw new o.InvalidEnumArgumentException("unknown DynamicExpressionSymbolEnum: "+t)}}calculateLength(){return a.default.debug("[Andrea] instantaneousDynamicExpression: not implemented: calculateLength!"),0}}var u;e.InstantaneousDynamicExpression=h,h.dynamicToRelativeVolumeDict=new l.Dictionary,h.listInstantaneousDynamics=["pppppp","ppppp","pppp","ppp","pp","p","ffffff","fffff","ffff","fff","ff","f","mf","mp","sf","sff","sp","spp","fp","rf","rfz","sfz","sffz","fz"],function(t){t[t.pppppp=0]="pppppp",t[t.ppppp=1]="ppppp",t[t.pppp=2]="pppp",t[t.ppp=3]="ppp",t[t.pp=4]="pp",t[t.p=5]="p",t[t.mp=6]="mp",t[t.mf=7]="mf",t[t.f=8]="f",t[t.ff=9]="ff",t[t.fff=10]="fff",t[t.ffff=11]="ffff",t[t.fffff=12]="fffff",t[t.ffffff=13]="ffffff",t[t.sf=14]="sf",t[t.sff=15]="sff",t[t.sfp=16]="sfp",t[t.sfpp=17]="sfpp",t[t.fp=18]="fp",t[t.rf=19]="rf",t[t.rfz=20]="rfz",t[t.sfz=21]="sfz",t[t.sffz=22]="sffz",t[t.fz=23]="fz",t[t.other=24]="other"}(u=e.DynamicEnum||(e.DynamicEnum={})),h.staticConstructor()},9667:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TempoEnum=e.InstantaneousTempoExpression=void 0;const s=i(9775),n=i(1703),r=i(1797);class o extends s.AbstractTempoExpression{constructor(t,e,i,s,n,r=!1){super(t,e,i,n),this.isMetronomeMark=r,this.setTempoAndTempoType(s)}static getDefaultValueForTempoType(t){switch(t){case a.larghissimo:return 20;case a.grave:return 30;case a.lento:return 48;case a.largo:return 52;case a.larghetto:return 63;case a.adagio:return 70;case a.adagietto:return 75;case a.andanteModerato:return 88;case a.andante:return 92;case a.andantino:return 96;case a.moderato:return 106;case a.allegretto:return 112;case a.allegroModerato:return 118;case a.allegro:return 130;case a.vivace:return 140;case a.vivacissimo:return 155;case a.allegrissimo:return 170;case a.presto:return 184;case a.prestissimo:return 200;default:throw new n.ArgumentOutOfRangeException("tempoEnum")}}static isInputStringInstantaneousTempo(t){return!!t&&(o.isStringInStringList(o.listInstantaneousTempoLarghissimo,t)||o.isStringInStringList(o.listInstantaneousTempoGrave,t)||o.isStringInStringList(o.listInstantaneousTempoLento,t)||o.isStringInStringList(o.listInstantaneousTempoLargo,t)||o.isStringInStringList(o.listInstantaneousTempoLarghetto,t)||o.isStringInStringList(o.listInstantaneousTempoAdagio,t)||o.isStringInStringList(o.listInstantaneousTempoAdagietto,t)||o.isStringInStringList(o.listInstantaneousTempoAndanteModerato,t)||o.isStringInStringList(o.listInstantaneousTempoAndante,t)||o.isStringInStringList(o.listInstantaneousTempoAndantino,t)||o.isStringInStringList(o.listInstantaneousTempoModerato,t)||o.isStringInStringList(o.listInstantaneousTempoAllegretto,t)||o.isStringInStringList(o.listInstantaneousTempoAllegroModerato,t)||o.isStringInStringList(o.listInstantaneousTempoAllegro,t)||o.isStringInStringList(o.listInstantaneousTempoVivace,t)||o.isStringInStringList(o.listInstantaneousTempoVivacissimo,t)||o.isStringInStringList(o.listInstantaneousTempoAllegrissimo,t)||o.isStringInStringList(o.listInstantaneousTempoPresto,t)||o.isStringInStringList(o.listInstantaneousTempoPrestissimo,t)||o.isStringInStringList(o.listInstantaneousTempoChangesGeneral,t))}get Label(){return this.label}set Label(t){this.label=t}get Placement(){return this.placement}set Placement(t){this.placement=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get Enum(){return this.tempoEnum}get TempoInBpm(){return this.tempoInBpm}set TempoInBpm(t){this.tempoInBpm=t}get ParentMultiTempoExpression(){return this.parentMultiTempoExpression}getAbsoluteTimestamp(){return r.Fraction.plus(this.ParentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.ParentMultiTempoExpression.Timestamp)}getAbsoluteFloatTimestamp(){return r.Fraction.plus(this.ParentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.ParentMultiTempoExpression.Timestamp).RealValue}setTempoAndTempoType(t){return this.label?o.isStringInStringList(o.listInstantaneousTempoLarghissimo,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.larghissimo)),this.tempoInBpm=t,void(this.tempoEnum=a.larghissimo)):o.isStringInStringList(o.listInstantaneousTempoGrave,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.grave)),this.tempoInBpm=t,void(this.tempoEnum=a.grave)):o.isStringInStringList(o.listInstantaneousTempoLento,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.lento)),this.tempoInBpm=t,void(this.tempoEnum=a.lento)):o.isStringInStringList(o.listInstantaneousTempoLargo,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.largo)),this.tempoInBpm=t,void(this.tempoEnum=a.largo)):o.isStringInStringList(o.listInstantaneousTempoLarghetto,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.larghetto)),this.tempoInBpm=t,void(this.tempoEnum=a.larghetto)):o.isStringInStringList(o.listInstantaneousTempoAdagio,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.adagio)),this.tempoInBpm=t,void(this.tempoEnum=a.adagio)):o.isStringInStringList(o.listInstantaneousTempoAdagietto,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.adagietto)),this.tempoInBpm=t,void(this.tempoEnum=a.adagietto)):o.isStringInStringList(o.listInstantaneousTempoAndanteModerato,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.andanteModerato)),this.tempoInBpm=t,void(this.tempoEnum=a.andanteModerato)):o.isStringInStringList(o.listInstantaneousTempoAndante,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.andante)),this.tempoInBpm=t,void(this.tempoEnum=a.andante)):o.isStringInStringList(o.listInstantaneousTempoAndantino,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.andantino)),this.tempoInBpm=t,void(this.tempoEnum=a.andantino)):o.isStringInStringList(o.listInstantaneousTempoModerato,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.moderato)),this.tempoInBpm=t,void(this.tempoEnum=a.moderato)):o.isStringInStringList(o.listInstantaneousTempoAllegretto,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.allegretto)),this.tempoInBpm=t,void(this.tempoEnum=a.allegretto)):o.isStringInStringList(o.listInstantaneousTempoAllegroModerato,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.allegroModerato)),this.tempoInBpm=t,void(this.tempoEnum=a.allegroModerato)):o.isStringInStringList(o.listInstantaneousTempoAllegro,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.allegro)),this.tempoInBpm=t,void(this.tempoEnum=a.allegro)):o.isStringInStringList(o.listInstantaneousTempoVivace,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.vivace)),this.tempoInBpm=t,void(this.tempoEnum=a.vivace)):o.isStringInStringList(o.listInstantaneousTempoVivacissimo,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.vivacissimo)),this.tempoInBpm=t,void(this.tempoEnum=a.vivacissimo)):o.isStringInStringList(o.listInstantaneousTempoAllegrissimo,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.allegrissimo)),this.tempoInBpm=t,void(this.tempoEnum=a.allegrissimo)):o.isStringInStringList(o.listInstantaneousTempoPresto,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.presto)),this.tempoInBpm=t,void(this.tempoEnum=a.presto)):o.isStringInStringList(o.listInstantaneousTempoPrestissimo,this.label)?(0===t&&(t=o.getDefaultValueForTempoType(a.prestissimo)),this.tempoInBpm=t,void(this.tempoEnum=a.prestissimo)):o.isStringInStringList(o.listInstantaneousTempoAddons,this.label)?(this.tempoInBpm=0,void(this.tempoEnum=a.addon)):o.isStringInStringList(o.listInstantaneousTempoChangesGeneral,this.label)?(this.tempoInBpm=0,void(this.tempoEnum=a.changes)):void 0:(this.tempoInBpm=t,void(this.tempoEnum=a.metronomeMark))}}var a;e.InstantaneousTempoExpression=o,o.listInstantaneousTempoLarghissimo=["Larghissimo","Sehr breit","very, very slow"],o.listInstantaneousTempoGrave=["Grave","Schwer","slow and solemn"],o.listInstantaneousTempoLento=["Lento","Lent","Langsam","slowly"],o.listInstantaneousTempoLargo=["Largo","Breit","broadly"],o.listInstantaneousTempoLarghetto=["Larghetto","Etwas breit","rather broadly"],o.listInstantaneousTempoAdagio=["Adagio","Langsam","Ruhig","slow and stately"],o.listInstantaneousTempoAdagietto=["Adagietto","Ziemlich ruhig","Ziemlich langsam","rather slow"],o.listInstantaneousTempoAndanteModerato=["Andante moderato"],o.listInstantaneousTempoAndante=["Andante","Gehend","Schreitend","at a walking pace"],o.listInstantaneousTempoAndantino=["Andantino","Maestoso"],o.listInstantaneousTempoModerato=["Moderato","Mäßig","Modéré","moderately"],o.listInstantaneousTempoAllegretto=["Allegretto","Animato","fast"],o.listInstantaneousTempoAllegroModerato=["Allegro moderato"],o.listInstantaneousTempoAllegro=["Allegro","Rapide","Vite","Rasch","Schnell","Fröhlich"],o.listInstantaneousTempoVivace=["Vivace","Allegro Assai","Lebhaft","Lebendig","lively and fast"],o.listInstantaneousTempoVivacissimo=["Vivacissimo","Sehr lebhaft","Sehr lebendig"],o.listInstantaneousTempoAllegrissimo=["Allegrissimo","very fast"],o.listInstantaneousTempoPresto=["Presto","Sehr schnell","Geschwind"],o.listInstantaneousTempoPrestissimo=["Prestissimo","äußerst schnell"],o.listInstantaneousTempoChangesGeneral=["tempo primo","a tempo","tempo i","rubato","doppio movimento","rallentando","ritardando","ritard.","rit.","ritard","rall...","accelerando","accel"],o.listInstantaneousTempoAddons=["assai","amoroso","cantabile","con brio","con dolore","con espressione","con fuoco","con moto","con spirito","spiritoso","espressivo","giocoso","giusto","grazioso","lesto","lugubre","maestoso","ma non troppo","marcato","molto","morendo","mosso","non tanto","piu","un poco","poco","quasi","risoluto","scherzando","sostenuto","teneramente","tempo giusto","tranquillo","sehr","lieblich","liebevoll","mit Leidenschaft","mit Liebe","amourös","gesanglich","mit Schwung","mit Feuer","mit Schmerz","mit Ausdruck","mit Bewegung","geistvoll","ausdrucksvoll","freudig","verspielt","angemessen","graziös","mit Grazie","flink","behände","traurig","klagend","majestätisch","aber nicht zu sehr","markant","gemäßigt","viel","sehr","ersterbend","bewegt","nicht zu sehr","mehr","ein wenig","gleichsam","entschlossen","zupackend","heiter","nachdrücklich","getragen","gewichtig","zart","zärtlich","im angemessenen Zeitmaß","ruhig","ein wenig","alla marcia","ad libitum","alla breve"],function(t){t[t.none=0]="none",t[t.larghissimo=1]="larghissimo",t[t.grave=2]="grave",t[t.lento=3]="lento",t[t.largo=4]="largo",t[t.larghetto=5]="larghetto",t[t.adagio=6]="adagio",t[t.adagietto=7]="adagietto",t[t.andanteModerato=8]="andanteModerato",t[t.andante=9]="andante",t[t.andantino=10]="andantino",t[t.moderato=11]="moderato",t[t.allegretto=12]="allegretto",t[t.allegroModerato=13]="allegroModerato",t[t.allegro=14]="allegro",t[t.vivace=15]="vivace",t[t.vivacissimo=16]="vivacissimo",t[t.allegrissimo=17]="allegrissimo",t[t.presto=18]="presto",t[t.prestissimo=19]="prestissimo",t[t.lastRealTempo=20]="lastRealTempo",t[t.addon=21]="addon",t[t.changes=22]="changes",t[t.metronomeMark=23]="metronomeMark"}(a=e.TempoEnum||(e.TempoEnum={}))},7527:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoodEnum=e.MoodExpression=void 0;const s=i(3748);class n extends s.AbstractExpression{constructor(t,e,i){super(e),this.label=t,this.staffNumber=i,this.setMoodType()}static isInputStringMood(t){return!!t&&(n.isStringInStringList(n.listMoodAffettuoso,t)||n.isStringInStringList(n.listMoodAgitato,t)||n.isStringInStringList(n.listMoodAnimato,t)||n.isStringInStringList(n.listMoodAppassionato,t)||n.isStringInStringList(n.listMoodBrillante,t)||n.isStringInStringList(n.listMoodCantabile,t)||n.isStringInStringList(n.listMoodDolce,t)||n.isStringInStringList(n.listMoodEnergico,t)||n.isStringInStringList(n.listMoodEroico,t)||n.isStringInStringList(n.listMoodEspressivo,t)||n.isStringInStringList(n.listMoodFurioso,t)||n.isStringInStringList(n.listMoodGiocoso,t)||n.isStringInStringList(n.listMoodGioioso,t)||n.isStringInStringList(n.listMoodGrandioso,t)||n.isStringInStringList(n.listMoodGrazioso,t)||n.isStringInStringList(n.listMoodLacrimoso,t)||n.isStringInStringList(n.listMoodLeggiero,t)||n.isStringInStringList(n.listMoodMaestoso,t)||n.isStringInStringList(n.listMoodMalinconico,t)||n.isStringInStringList(n.listMoodMarcato,t)||n.isStringInStringList(n.listMoodMarziale,t)||n.isStringInStringList(n.listMoodMesto,t)||n.isStringInStringList(n.listMoodMorendo,t)||n.isStringInStringList(n.listMoodNobilmente,t)||n.isStringInStringList(n.listMoodPatetico,t)||n.isStringInStringList(n.listMoodPesante,t)||n.isStringInStringList(n.listMoodSaltando,t)||n.isStringInStringList(n.listMoodSautille,t)||n.isStringInStringList(n.listMoodScherzando,t)||n.isStringInStringList(n.listMoodSostenuto,t)||n.isStringInStringList(n.listMoodSpiccato,t)||n.isStringInStringList(n.listMoodTenerezza,t)||n.isStringInStringList(n.listMoodTranquillamente,t)||n.isStringInStringList(n.listMoodTrionfante,t))}get Label(){return this.label}set Label(t){this.label=t}get Mood(){return this.moodType}set Mood(t){this.moodType=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get Placement(){return this.placement}set Placement(t){this.placement=t}setMoodType(){n.isStringInStringList(n.listMoodAffettuoso,this.label)?this.moodType=r.Affettuoso:n.isStringInStringList(n.listMoodAgitato,this.label)?this.moodType=r.Agitato:n.isStringInStringList(n.listMoodAnimato,this.label)?this.moodType=r.Animato:n.isStringInStringList(n.listMoodAppassionato,this.label)?this.moodType=r.Appassionato:n.isStringInStringList(n.listMoodBrillante,this.label)?this.moodType=r.Brillante:n.isStringInStringList(n.listMoodCantabile,this.label)?this.moodType=r.Cantabile:n.isStringInStringList(n.listMoodDolce,this.label)?this.moodType=r.Dolce:n.isStringInStringList(n.listMoodEnergico,this.label)?this.moodType=r.Energico:n.isStringInStringList(n.listMoodEroico,this.label)?this.moodType=r.Eroico:n.isStringInStringList(n.listMoodEspressivo,this.label)?this.moodType=r.Espressivo:n.isStringInStringList(n.listMoodFurioso,this.label)?this.moodType=r.Furioso:n.isStringInStringList(n.listMoodGiocoso,this.label)?this.moodType=r.Giocoso:n.isStringInStringList(n.listMoodGioioso,this.label)?this.moodType=r.Gioioso:n.isStringInStringList(n.listMoodGrandioso,this.label)?this.moodType=r.Grandioso:n.isStringInStringList(n.listMoodGrazioso,this.label)?this.moodType=r.Grazioso:n.isStringInStringList(n.listMoodLacrimoso,this.label)?this.moodType=r.Lacrimoso:n.isStringInStringList(n.listMoodLeggiero,this.label)?this.moodType=r.Leggiero:n.isStringInStringList(n.listMoodMaestoso,this.label)?this.moodType=r.Maestoso:n.isStringInStringList(n.listMoodMalinconico,this.label)?this.moodType=r.Malinconico:n.isStringInStringList(n.listMoodMarcato,this.label)?this.moodType=r.Marcato:n.isStringInStringList(n.listMoodMarziale,this.label)?this.moodType=r.Marziale:n.isStringInStringList(n.listMoodMesto,this.label)?this.moodType=r.Mesto:n.isStringInStringList(n.listMoodMorendo,this.label)?this.moodType=r.Morendo:n.isStringInStringList(n.listMoodNobilmente,this.label)?this.moodType=r.Nobilmente:n.isStringInStringList(n.listMoodPatetico,this.label)?this.moodType=r.Patetico:n.isStringInStringList(n.listMoodPesante,this.label)?this.moodType=r.Pesante:n.isStringInStringList(n.listMoodSaltando,this.label)?this.moodType=r.Saltando:n.isStringInStringList(n.listMoodSautille,this.label)?this.moodType=r.Sautille:n.isStringInStringList(n.listMoodScherzando,this.label)?this.moodType=r.Scherzando:n.isStringInStringList(n.listMoodSostenuto,this.label)?this.moodType=r.Sostenuto:n.isStringInStringList(n.listMoodSpiccato,this.label)?this.moodType=r.Spiccato:n.isStringInStringList(n.listMoodTenerezza,this.label)?this.moodType=r.Tenerezza:n.isStringInStringList(n.listMoodTranquillamente,this.label)?this.moodType=r.Tranquillamente:n.isStringInStringList(n.listMoodTrionfante,this.label)&&(this.moodType=r.Trionfante)}}var r;e.MoodExpression=n,n.listMoodAffettuoso=["affettuoso"],n.listMoodAgitato=["agitato"],n.listMoodAppassionato=["appassionato"],n.listMoodAnimato=["animato","lively"],n.listMoodBrillante=["brillante"],n.listMoodCantabile=["cantabile"],n.listMoodDolce=["dolce"],n.listMoodEnergico=["energico"],n.listMoodEroico=["eroico"],n.listMoodEspressivo=["espressivo"],n.listMoodFurioso=["furioso"],n.listMoodGiocoso=["giocoso"],n.listMoodGioioso=["gioioso"],n.listMoodLacrimoso=["lacrimoso"],n.listMoodGrandioso=["grandioso"],n.listMoodGrazioso=["grazioso"],n.listMoodLeggiero=["leggiero"],n.listMoodMaestoso=["maestoso"],n.listMoodMalinconico=["malinconico"],n.listMoodMarcato=["marcato"],n.listMoodMarziale=["marziale"],n.listMoodMesto=["mesto"],n.listMoodMorendo=["morendo"],n.listMoodNobilmente=["nobilmente"],n.listMoodPatetico=["patetico"],n.listMoodPesante=["pesante"],n.listMoodSautille=["sautille"],n.listMoodSaltando=["saltando"],n.listMoodScherzando=["scherzando"],n.listMoodSostenuto=["sostenuto"],n.listMoodSpiccato=["spiccato"],n.listMoodTenerezza=["tenerezza"],n.listMoodTranquillamente=["tranquillamente"],n.listMoodTrionfante=["trionfante"],function(t){t[t.Affettuoso=0]="Affettuoso",t[t.Agitato=1]="Agitato",t[t.Appassionato=2]="Appassionato",t[t.Animato=3]="Animato",t[t.Brillante=4]="Brillante",t[t.Cantabile=5]="Cantabile",t[t.Dolce=6]="Dolce",t[t.Energico=7]="Energico",t[t.Eroico=8]="Eroico",t[t.Espressivo=9]="Espressivo",t[t.Furioso=10]="Furioso",t[t.Giocoso=11]="Giocoso",t[t.Gioioso=12]="Gioioso",t[t.Lacrimoso=13]="Lacrimoso",t[t.Grandioso=14]="Grandioso",t[t.Grazioso=15]="Grazioso",t[t.Leggiero=16]="Leggiero",t[t.Maestoso=17]="Maestoso",t[t.Malinconico=18]="Malinconico",t[t.Marcato=19]="Marcato",t[t.Marziale=20]="Marziale",t[t.Mesto=21]="Mesto",t[t.Morendo=22]="Morendo",t[t.Nobilmente=23]="Nobilmente",t[t.Patetico=24]="Patetico",t[t.Pesante=25]="Pesante",t[t.Sautille=26]="Sautille",t[t.Saltando=27]="Saltando",t[t.Scherzando=28]="Scherzando",t[t.Sostenuto=29]="Sostenuto",t[t.Spiccato=30]="Spiccato",t[t.Tenerezza=31]="Tenerezza",t[t.Tranquillamente=32]="Tranquillamente",t[t.Trionfante=33]="Trionfante",t[t.Vivace=34]="Vivace"}(r=e.MoodEnum||(e.MoodEnum={}))},6943:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiExpressionEntry=e.MultiExpression=void 0;const s=i(1797),n=i(9793),r=i(7839),o=i(7527),a=i(1614),l=i(3748),h=i(2562);e.MultiExpression=class{constructor(t,e){this.unknownList=[],this.moodList=[],this.expressions=[],this.sourceMeasure=t,this.timestamp=e}get SourceMeasureParent(){return this.sourceMeasure}set SourceMeasureParent(t){this.sourceMeasure=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get Timestamp(){return this.timestamp}set Timestamp(t){this.timestamp=t}get AbsoluteTimestamp(){return s.Fraction.plus(this.timestamp,this.sourceMeasure.AbsoluteTimestamp)}get InstantaneousDynamic(){return this.instantaneousDynamic}set InstantaneousDynamic(t){this.instantaneousDynamic=t}get EndingContinuousDynamic(){return this.endingContinuousDynamic}set EndingContinuousDynamic(t){this.endingContinuousDynamic=t}get StartingContinuousDynamic(){return this.startingContinuousDynamic}set StartingContinuousDynamic(t){this.startingContinuousDynamic=t}get MoodList(){return this.moodList}get UnknownList(){return this.unknownList}get EntriesList(){return this.expressions}get OctaveShiftStart(){return this.octaveShiftStart}set OctaveShiftStart(t){this.octaveShiftStart=t}get OctaveShiftEnd(){return this.octaveShiftEnd}set OctaveShiftEnd(t){this.octaveShiftEnd=t}get CombinedExpressionsText(){return this.combinedExpressionsText}set CombinedExpressionsText(t){this.combinedExpressionsText=t}getPlacementOfFirstEntry(){let t=l.PlacementEnum.Above;return this.expressions.length>0&&(this.expressions[0].expression instanceof n.InstantaneousDynamicExpression||this.expressions[0].expression instanceof r.ContinuousDynamicExpression||this.expressions[0].expression instanceof o.MoodExpression||this.expressions[0].expression instanceof a.UnknownExpression)&&(t=this.expressions[0].expression.Placement),t}getFontstyleOfFirstEntry(){var t;let e=h.FontStyles.Regular;return this.expressions.length>0&&(this.expressions[0].expression instanceof r.ContinuousDynamicExpression||this.expressions[0].expression instanceof o.MoodExpression?e=h.FontStyles.Italic:this.expressions[0].expression instanceof a.UnknownExpression&&(e=null!==(t=this.expressions[0].expression.fontStyle)&&void 0!==t?t:h.FontStyles.Regular)),e}addExpression(t,e){t instanceof n.InstantaneousDynamicExpression?(this.instantaneousDynamic&&this.removeExpressionFromEntryList(this.InstantaneousDynamic),this.instantaneousDynamic=t,this.instantaneousDynamic.ParentMultiExpression=this):t instanceof r.ContinuousDynamicExpression?this.startingContinuousDynamic=t:t instanceof o.MoodExpression?this.moodList.push(t):t instanceof a.UnknownExpression&&this.unknownList.push(t),this.addExpressionToEntryList(t,e)}CompareTo(t){return this.Timestamp.RealValue>t.Timestamp.RealValue?1:this.Timestamp.RealValue{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TempoExpressionEntry=e.MultiTempoExpression=void 0;const s=i(1797),n=i(9667),r=i(3748),o=i(2562),a=i(280);e.MultiTempoExpression=class{constructor(t,e){this.expressions=[],this.sourceMeasure=t,this.timestamp=e}get Timestamp(){return this.timestamp}get AbsoluteTimestamp(){return s.Fraction.plus(this.sourceMeasure.AbsoluteTimestamp,this.timestamp)}get SourceMeasureParent(){return this.sourceMeasure}set SourceMeasureParent(t){this.sourceMeasure=t}get InstantaneousTempo(){return this.instantaneousTempo}get ContinuousTempo(){return this.continuousTempo}get EntriesList(){return this.expressions}get CombinedExpressionsText(){return this.combinedExpressionsText}set CombinedExpressionsText(t){this.combinedExpressionsText=t}getPlacementOfFirstEntry(){let t=r.PlacementEnum.Above;return this.expressions.length>0&&(this.expressions[0].Expression instanceof n.InstantaneousTempoExpression||this.expressions[0].Expression instanceof a.ContinuousTempoExpression)&&(t=this.expressions[0].Expression.Placement),t}getFontstyleOfFirstEntry(){let t=o.FontStyles.Regular;return this.expressions[0].Expression instanceof n.InstantaneousTempoExpression?t=o.FontStyles.Bold:this.expressions[0].Expression instanceof a.ContinuousTempoExpression&&(t=o.FontStyles.Italic),t}addExpression(t,e){if(this.checkIfAlreadyExists(t))return;t instanceof n.InstantaneousTempoExpression?this.instantaneousTempo=t:t instanceof a.ContinuousTempoExpression&&(this.continuousTempo=t);const i=new l;i.prefix=e,i.Expression=t,i.label=t.Label,this.expressions.push(i)}CompareTo(t){return this.Timestamp.RealValue>t.Timestamp.RealValue?1:this.Timestamp.RealValue{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RehearsalExpression=void 0;const s=i(3748);class n extends s.AbstractExpression{constructor(t,e){super(e),this.label=t}}e.RehearsalExpression=n},1614:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnknownExpression=void 0;const s=i(3748),n=i(1274);class r extends s.AbstractExpression{constructor(t,e,i,s){super(e),this.label=t,this.staffNumber=s,void 0===i&&(i=n.TextAlignmentEnum.LeftBottom),this.textAlignment=i}get Label(){return this.label}get Placement(){return this.placement}set Placement(t){this.placement=t}get StaffNumber(){return this.staffNumber}set StaffNumber(t){this.staffNumber=t}get TextAlignment(){return this.textAlignment}}e.UnknownExpression=r},2343:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(3748),e),n(i(9775),e),n(i(4802),e),n(i(9793),e),n(i(9667),e),n(i(7527),e),n(i(6943),e),n(i(6124),e),n(i(7513),e),n(i(1614),e)},7198:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Glissando=void 0;const s=i(1797),n=i(8911);e.Glissando=class{constructor(t){this.notes=[],this.XMLNumber=1,this.AddNote(t),this.StartNote=t,this.Direction=n.ColDirEnum.NotYetDefined}get Notes(){return this.notes}get Duration(){const t=new s.Fraction;for(const e of this.notes)t.Add(e.Length);return t}get Pitch(){return this.StartNote.Pitch}AddNote(t){this.notes.push(t),t.NoteGlissando=this,2===this.notes.length&&(this.notes[0].Pitch.getHalfTone(){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicsContainer=void 0;const s=i(7839),n=i(9793);e.DynamicsContainer=class{constructor(t,e){t instanceof s.ContinuousDynamicExpression?this.continuousDynamicExpression=t:t instanceof n.InstantaneousDynamicExpression&&(this.instantaneousDynamicExpression=t),this.staffNumber=e}static Compare(t,e){return t.parMultiExpression().AbsoluteTimestamp.CompareTo(e.parMultiExpression().AbsoluteTimestamp)}parMultiExpression(){return this.continuousDynamicExpression?this.continuousDynamicExpression.StartMultiExpression:this.instantaneousDynamicExpression?this.instantaneousDynamicExpression.ParentMultiExpression:void 0}}},5517:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(5356),e)},1877:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractNotationInstruction=void 0,e.AbstractNotationInstruction=class{constructor(t){this.printObject=!0,this.parent=t}get Parent(){return this.parent}set Parent(t){this.parent=t}get PrintObject(){return this.printObject}set PrintObject(t){this.printObject=t}}},289:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MidiInstrument=e.ClefEnum=e.ClefInstruction=void 0;const s=i(8640),n=i(1877),r=i(8640),o=i(8640),a=i(1703);class l extends n.AbstractNotationInstruction{constructor(t=h.G,e=0,i=2){super(void 0),this.clefType=h.G,this.line=2,this.octaveOffset=0,this.line=i,this.clefType=t,this.octaveOffset=e,this.calcParameters()}static getDefaultClefFromMidiInstrument(t){switch(t){case u.Acoustic_Grand_Piano:case u.Electric_Bass_finger:case u.Electric_Bass_pick:case u.Fretless_Bass:case u.Slap_Bass_1:case u.Slap_Bass_2:case u.Synth_Bass_1:case u.Synth_Bass_2:case u.Contrabass:return new l(h.F,0,4);default:return new l(h.G,0,2)}}static getAllPossibleClefs(){const t=[];for(let e=0;e<=2;e++){const i=new l(h.G,e,2);t.push(i)}for(let e=-2;e<=0;e++){const i=new l(h.F,e,4);t.push(i)}return t}static isSupportedClef(t){switch(t){case h.G:case h.F:case h.C:case h.percussion:case h.TAB:return!0;default:return!1}}get ClefType(){return this.clefType}set ClefType(t){this.clefType=t}get Line(){return this.line}set Line(t){this.line=t}get OctaveOffset(){return this.octaveOffset}set OctaveOffset(t){this.octaveOffset=t}get ClefPitch(){return this.clefPitch}set ClefPitch(t){this.clefPitch=t}get ReferenceCyPosition(){return this.referenceCyPosition}set ReferenceCyPosition(t){this.referenceCyPosition=t}Equals(t){return this===t||!(!this||!t)&&this.clefPitch===t.clefPitch&&this.Line===t.Line}NotEqual(t){return!this.Equals(t)}ToString(){return"ClefType: "+this.clefType}calcParameters(){switch(this.clefType){case h.G:this.clefPitch=new s.Pitch(r.NoteEnum.G,1+this.octaveOffset,o.AccidentalEnum.NONE),this.referenceCyPosition=5-this.line+2;break;case h.F:this.clefPitch=new s.Pitch(r.NoteEnum.F,0+this.octaveOffset,o.AccidentalEnum.NONE),this.referenceCyPosition=5-this.line+1.5;break;case h.C:this.clefPitch=new s.Pitch(r.NoteEnum.C,1+this.octaveOffset,o.AccidentalEnum.NONE),this.referenceCyPosition=5-this.line;break;case h.percussion:this.clefPitch=new s.Pitch(r.NoteEnum.C,2,o.AccidentalEnum.NONE),this.referenceCyPosition=2;break;case h.TAB:this.clefPitch=new s.Pitch(r.NoteEnum.G,0,o.AccidentalEnum.NONE),this.referenceCyPosition=0;break;default:throw new a.ArgumentOutOfRangeException("clefType")}}}var h,u;e.ClefInstruction=l,function(t){t[t.G=0]="G",t[t.F=1]="F",t[t.C=2]="C",t[t.percussion=3]="percussion",t[t.TAB=4]="TAB"}(h=e.ClefEnum||(e.ClefEnum={})),function(t){t[t.None=-1]="None",t[t.Acoustic_Grand_Piano=0]="Acoustic_Grand_Piano",t[t.Bright_Acoustic_Piano=1]="Bright_Acoustic_Piano",t[t.Electric_Grand_Piano=2]="Electric_Grand_Piano",t[t.Honky_tonk_Piano=3]="Honky_tonk_Piano",t[t.Electric_Piano_1=4]="Electric_Piano_1",t[t.Electric_Piano_2=5]="Electric_Piano_2",t[t.Harpsichord=6]="Harpsichord",t[t.Clavinet=7]="Clavinet",t[t.Celesta=8]="Celesta",t[t.Glockenspiel=9]="Glockenspiel",t[t.Music_Box=10]="Music_Box",t[t.Vibraphone=11]="Vibraphone",t[t.Marimba=12]="Marimba",t[t.Xylophone=13]="Xylophone",t[t.Tubular_Bells=14]="Tubular_Bells",t[t.Dulcimer=15]="Dulcimer",t[t.Drawbar_Organ=16]="Drawbar_Organ",t[t.Percussive_Organ=17]="Percussive_Organ",t[t.Rock_Organ=18]="Rock_Organ",t[t.Church_Organ=19]="Church_Organ",t[t.Reed_Organ=20]="Reed_Organ",t[t.Accordion=21]="Accordion",t[t.Harmonica=22]="Harmonica",t[t.Tango_Accordion=23]="Tango_Accordion",t[t.Acoustic_Guitar_nylon=24]="Acoustic_Guitar_nylon",t[t.Acoustic_Guitar_steel=25]="Acoustic_Guitar_steel",t[t.Electric_Guitar_jazz=26]="Electric_Guitar_jazz",t[t.Electric_Guitar_clean=27]="Electric_Guitar_clean",t[t.Electric_Guitar_muted=28]="Electric_Guitar_muted",t[t.Overdriven_Guitar=29]="Overdriven_Guitar",t[t.Distortion_Guitar=30]="Distortion_Guitar",t[t.Guitar_harmonics=31]="Guitar_harmonics",t[t.Acoustic_Bass=32]="Acoustic_Bass",t[t.Electric_Bass_finger=33]="Electric_Bass_finger",t[t.Electric_Bass_pick=34]="Electric_Bass_pick",t[t.Fretless_Bass=35]="Fretless_Bass",t[t.Slap_Bass_1=36]="Slap_Bass_1",t[t.Slap_Bass_2=37]="Slap_Bass_2",t[t.Synth_Bass_1=38]="Synth_Bass_1",t[t.Synth_Bass_2=39]="Synth_Bass_2",t[t.Violin=40]="Violin",t[t.Viola=41]="Viola",t[t.Cello=42]="Cello",t[t.Contrabass=43]="Contrabass",t[t.Tremolo_Strings=44]="Tremolo_Strings",t[t.Pizzicato_Strings=45]="Pizzicato_Strings",t[t.Orchestral_Harp=46]="Orchestral_Harp",t[t.Timpani=47]="Timpani",t[t.String_Ensemble_1=48]="String_Ensemble_1",t[t.String_Ensemble_2=49]="String_Ensemble_2",t[t.Synth_Strings_1=50]="Synth_Strings_1",t[t.Synth_Strings_2=51]="Synth_Strings_2",t[t.Choir_Aahs=52]="Choir_Aahs",t[t.Voice_Oohs=53]="Voice_Oohs",t[t.Synth_Voice=54]="Synth_Voice",t[t.Orchestra_Hit=55]="Orchestra_Hit",t[t.Trumpet=56]="Trumpet",t[t.Trombone=57]="Trombone",t[t.Tuba=58]="Tuba",t[t.Muted_Trumpet=59]="Muted_Trumpet",t[t.French_Horn=60]="French_Horn",t[t.Brass_Section=61]="Brass_Section",t[t.Synth_Brass_1=62]="Synth_Brass_1",t[t.Synth_Brass_2=63]="Synth_Brass_2",t[t.Soprano_Sax=64]="Soprano_Sax",t[t.Alto_Sax=65]="Alto_Sax",t[t.Tenor_Sax=66]="Tenor_Sax",t[t.Baritone_Sax=67]="Baritone_Sax",t[t.Oboe=68]="Oboe",t[t.English_Horn=69]="English_Horn",t[t.Bassoon=70]="Bassoon",t[t.Clarinet=71]="Clarinet",t[t.Piccolo=72]="Piccolo",t[t.Flute=73]="Flute",t[t.Recorder=74]="Recorder",t[t.Pan_Flute=75]="Pan_Flute",t[t.Blown_Bottle=76]="Blown_Bottle",t[t.Shakuhachi=77]="Shakuhachi",t[t.Whistle=78]="Whistle",t[t.Ocarina=79]="Ocarina",t[t.Lead_1_square=80]="Lead_1_square",t[t.Lead_2_sawtooth=81]="Lead_2_sawtooth",t[t.Lead_3_calliope=82]="Lead_3_calliope",t[t.Lead_4_chiff=83]="Lead_4_chiff",t[t.Lead_5_charang=84]="Lead_5_charang",t[t.Lead_6_voice=85]="Lead_6_voice",t[t.Lead_7_fifths=86]="Lead_7_fifths",t[t.Lead_8_bass_lead=87]="Lead_8_bass_lead",t[t.Pad_1_new_age=88]="Pad_1_new_age",t[t.Pad_2_warm=89]="Pad_2_warm",t[t.Pad_3_polysynth=90]="Pad_3_polysynth",t[t.Pad_4_choir=91]="Pad_4_choir",t[t.Pad_5_bowed=92]="Pad_5_bowed",t[t.Pad_6_metallic=93]="Pad_6_metallic",t[t.Pad_7_halo=94]="Pad_7_halo",t[t.Pad_8_sweep=95]="Pad_8_sweep",t[t.FX_1_rain=96]="FX_1_rain",t[t.FX_2_soundtrack=97]="FX_2_soundtrack",t[t.FX_3_crystal=98]="FX_3_crystal",t[t.FX_4_atmosphere=99]="FX_4_atmosphere",t[t.FX_5_brightness=100]="FX_5_brightness",t[t.FX_6_goblins=101]="FX_6_goblins",t[t.FX_7_echoes=102]="FX_7_echoes",t[t.FX_8_scifi=103]="FX_8_scifi",t[t.Sitar=104]="Sitar",t[t.Banjo=105]="Banjo",t[t.Shamisen=106]="Shamisen",t[t.Koto=107]="Koto",t[t.Kalimba=108]="Kalimba",t[t.Bag_pipe=109]="Bag_pipe",t[t.Fiddle=110]="Fiddle",t[t.Shanai=111]="Shanai",t[t.Tinkle_Bell=112]="Tinkle_Bell",t[t.Agogo=113]="Agogo",t[t.Steel_Drums=114]="Steel_Drums",t[t.Woodblock=115]="Woodblock",t[t.Taiko_Drum=116]="Taiko_Drum",t[t.Melodic_Tom=117]="Melodic_Tom",t[t.Synth_Drum=118]="Synth_Drum",t[t.Reverse_Cymbal=119]="Reverse_Cymbal",t[t.Guitar_Fret_Noise=120]="Guitar_Fret_Noise",t[t.Breath_Noise=121]="Breath_Noise",t[t.Seashore=122]="Seashore",t[t.Bird_Tweet=123]="Bird_Tweet",t[t.Telephone_Ring=124]="Telephone_Ring",t[t.Helicopter=125]="Helicopter",t[t.Applause=126]="Applause",t[t.Gunshot=127]="Gunshot",t[t.Percussion=128]="Percussion"}(u=e.MidiInstrument||(e.MidiInstrument={}))},5198:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyEnum=e.NoteEnumToHalfToneLink=e.KeyInstruction=void 0;const s=i(1877),n=i(8640),r=i(8640);class o extends s.AbstractNotationInstruction{constructor(t=void 0,e=0,i=a.major){super(t),this.isTransposedBy=0,this.Key=e,this.keyTypeOriginal=e,this.mode=i,this.alteratedNotes=this.calcAlteratedNotes()}static copy(t){const e=new o(t.parent,t.Key,t.Mode);return e.keyTypeOriginal=t.keyTypeOriginal,e}static getAllPossibleMajorKeyInstructions(){const t=[];for(let e=-7;e<7;e++){const i=new o(void 0,e,a.major);t.push(i)}return t}get Key(){return this.keyType}set Key(t){this.keyType=t,this.alteratedNotes=this.calcAlteratedNotes()}get Mode(){return this.mode}set Mode(t){this.mode=t}get AlteratedNotes(){return this.alteratedNotes}calcAlteratedNotes(){const t=[];if(this.keyType>0)for(let e=0;e=0}getAlterationForPitch(t){return this.keyType>0&&this.alteratedNotes.indexOf(t.FundamentalNote)<=this.keyType?r.AccidentalEnum.SHARP:this.keyType<0&&this.alteratedNotes.indexOf(t.FundamentalNote)<=Math.abs(this.keyType)?r.AccidentalEnum.FLAT:r.AccidentalEnum.NONE}ToString(){return"Key: "+this.keyType+this.mode}OperatorEquals(t){const e=this;return e===t||!(!e||!t)&&e.Key===t.Key&&e.Mode===t.Mode}OperatorNotEqual(t){return!this.OperatorEquals(t)}}var a;e.KeyInstruction=o,o.sharpPositionList=[n.NoteEnum.F,n.NoteEnum.C,n.NoteEnum.G,n.NoteEnum.D,n.NoteEnum.A,n.NoteEnum.E,n.NoteEnum.B],o.flatPositionList=[n.NoteEnum.B,n.NoteEnum.E,n.NoteEnum.A,n.NoteEnum.D,n.NoteEnum.G,n.NoteEnum.C,n.NoteEnum.F],e.NoteEnumToHalfToneLink=class{constructor(t,e){this.note=t,this.halfTone=e}},function(t){t[t.major=0]="major",t[t.minor=1]="minor",t[t.none=2]="none",t[t.dorian=3]="dorian",t[t.phrygian=4]="phrygian",t[t.lydian=5]="lydian",t[t.mixolydian=6]="mixolydian",t[t.aeolian=7]="aeolian",t[t.ionian=8]="ionian",t[t.locrian=9]="locrian"}(a=e.KeyEnum||(e.KeyEnum={}))},6189:(t,e)=>{"use strict";var i,s;Object.defineProperty(e,"__esModule",{value:!0}),e.AlignmentType=e.RepetitionInstructionEnum=e.RepetitionInstruction=e.RepetitionInstructionComparer=void 0,e.RepetitionInstructionComparer=class{static Compare(t,e){if(void 0!==t.parentRepetition&&e.parentRepetition){if(t.alignment===s.End&&e.alignment===s.End){if(t.parentRepetition.StartIndexe.parentRepetition.StartIndex)return-1}if(t.alignment===s.Begin&&e.alignment===s.Begin){if(t.parentRepetition.EndIndexe.parentRepetition.EndIndex)return-1}}return 0}},e.RepetitionInstruction=class{constructor(t,e,i=s.End,n=void 0,r=void 0){this.endingIndices=void 0,this.measureIndex=t,r&&(this.endingIndices=r.slice()),this.type=e,this.alignment=i,this.parentRepetition=n}CompareTo(t){const e=t;if(this.measureIndex>e.measureIndex)return 1;if(this.measureIndex{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RhythmSymbolEnum=e.RhythmInstruction=void 0;const s=i(1877);class n extends s.AbstractNotationInstruction{constructor(t,e){super(void 0),this.rhythm=t,this.numerator=t.Numerator,this.denominator=t.Denominator,this.symbolEnum=e}get Rhythm(){return this.rhythm}set Rhythm(t){this.rhythm=t}get SymbolEnum(){return this.symbolEnum}set SymbolEnum(t){this.symbolEnum=t}clone(){return new n(this.rhythm.clone(),this.symbolEnum)}OperatorEquals(t){const e=this;return e===t||!(!e||!t)&&e.numerator===t.numerator&&e.denominator===t.denominator}OperatorNotEqual(t){return!(this===t)}ToString(){return"Rhythm: "+this.rhythm.toString()}}var r;e.RhythmInstruction=n,(r=e.RhythmSymbolEnum||(e.RhythmSymbolEnum={}))[r.NONE=0]="NONE",r[r.COMMON=1]="COMMON",r[r.CUT=2]="CUT"},1357:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.TechnicalInstruction=e.TechnicalInstructionType=void 0,(i=e.TechnicalInstructionType||(e.TechnicalInstructionType={}))[i.Fingering=0]="Fingering",i[i.String=1]="String",e.TechnicalInstruction=class{}},6065:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(1877),e),n(i(289),e),n(i(5198),e),n(i(6189),e),n(i(3331),e),n(i(1357),e)},2947:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedVoice=void 0;const s=i(3884);class n extends s.Voice{constructor(t,e,i){super(t,e),this.master=i}get Master(){return this.master}}e.LinkedVoice=n},7274:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LyricsEntry=void 0;const s=i(2562);e.LyricsEntry=class{constructor(t,e,i,s,n=-1){this.text=t,this.word=i,this.parent=s,this.verseNumber=e,n>=0&&(this.syllableIndex=n)}get Text(){return this.text}set Text(t){this.text=t}get Word(){return this.word}get Parent(){return this.parent}set Parent(t){this.parent=t}get VerseNumber(){return this.verseNumber}get SyllableIndex(){return this.syllableIndex}get IsTranslation(){return this.VerseNumber.endsWith("translation")}get IsChorus(){return this.VerseNumber.startsWith("chorus")}get FontStyle(){return this.IsChorus||this.IsTranslation?s.FontStyles.Italic:s.FontStyles.Regular}}},2672:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LyricWord=void 0,e.LyricWord=class{constructor(){this.syllables=[]}get Syllables(){return this.syllables}containsVoiceEntry(t){for(let e=0,i=this.Syllables.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Appearance=e.Note=void 0;const s=i(1797);var n;e.Note=class{constructor(t,e,i,s,n,r){this.slurs=[],this.playbackInstrumentId=void 0,this.notehead=void 0,this.printObject=!0,this.voiceEntry=t,this.parentStaffEntry=e,this.length=i,this.pitch=s,this.sourceMeasure=n,this.isRestFlag=null!=r&&r,this.noteTremoloType="",this.glissandoType="",this.slideType="",this.halfTone=s?s.getHalfTone():0}get NoteAsString(){return this.pitch.toString()}ToStringShort(t=0){var e;return!this.Pitch||this.isRest()?"rest":null===(e=this.Pitch)||void 0===e?void 0:e.ToStringShort(t)}get ToStringShortGet(){return this.ToStringShort(0)}get TremoloType(){return this.noteTremoloType}set TremoloType(t){this.noteTremoloType=t}get ParentVoiceEntry(){return this.voiceEntry}set ParentVoiceEntry(t){this.voiceEntry=t}get ParentStaffEntry(){return this.parentStaffEntry}get ParentStaff(){return this.parentStaffEntry.ParentStaff}get Length(){return this.length}set PlaybackNote(t){this.playbackNote=t}get PlaybackNote(){return this.playbackNote}set Length(t){this.length=t}get SourceMeasure(){return this.sourceMeasure}get TypeLength(){return this.typeLength}set TypeLength(t){this.typeLength=t}get NoteTypeXml(){return this.noteTypeXml}set NoteTypeXml(t){this.noteTypeXml=t}get NormalNotes(){return this.normalNotes}set NormalNotes(t){this.normalNotes=t}get Pitch(){return this.pitch}get NoteBeam(){return this.beam}set NoteBeam(t){this.beam=t}set Notehead(t){this.notehead=t}get Notehead(){return this.notehead}get NoteTuplet(){return this.tuplet}set NoteTuplet(t){this.tuplet=t}get NoteGlissando(){return this.glissando}set NoteGlissando(t){this.glissando=t}get NoteTie(){return this.tie}set NoteTie(t){this.tie=t}get NoteSlurs(){return this.slurs}set NoteSlurs(t){this.slurs=t}get PlaybackInstrumentId(){return this.playbackInstrumentId}set PlaybackInstrumentId(t){this.playbackInstrumentId=t}get PrintObject(){return this.printObject}set PrintObject(t){this.printObject=t}get Arpeggio(){return this.arpeggio}set Arpeggio(t){this.arpeggio=t}get IsCueNote(){return this.isCueNote}set IsCueNote(t){this.isCueNote=t}get StemDirectionXml(){return this.stemDirectionXml}set StemDirectionXml(t){this.stemDirectionXml=t}get TremoloStrokes(){var t;return null===(t=this.TremoloInfo)||void 0===t?void 0:t.tremoloStrokes}get StemColorXml(){return this.stemColorXml}set StemColorXml(t){this.stemColorXml=t}get NoteheadColorXml(){return this.noteheadColorXml}set NoteheadColorXml(t){this.noteheadColorXml=t}get NoteheadColor(){return this.noteheadColor}set NoteheadColor(t){this.noteheadColor=t}get NoteheadColorCurrentlyRendered(){return this.noteheadColorCurrentlyRendered}set NoteheadColorCurrentlyRendered(t){this.noteheadColorCurrentlyRendered=t}isRest(){return this.isRestFlag}isWholeRest(){return this.isRest()&&this.Length.RealValue===this.sourceMeasure.ActiveTimeSignature.RealValue}isWholeMeasureNote(){return this.Length.RealValue===this.sourceMeasure.ActiveTimeSignature.RealValue}ToString(){return this.pitch?this.Pitch.ToString()+", length: "+this.length.toString():"rest note, length: "+this.length.toString()}getAbsoluteTimestamp(){return s.Fraction.plus(this.voiceEntry.Timestamp,this.sourceMeasure.AbsoluteTimestamp)}isDuplicateSlur(t){for(let e=0,i=this.slurs.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoteTypeHandler=e.NoteType=void 0;const s=i(1797),n=i(6331),r=i(1703);var o;!function(t){t[t.UNDEFINED=0]="UNDEFINED",t[t._1024th=1]="_1024th",t[t._512th=2]="_512th",t[t._256th=3]="_256th",t[t._128th=4]="_128th",t[t._64th=5]="_64th",t[t._32nd=6]="_32nd",t[t._16th=7]="_16th",t[t.EIGTH=8]="EIGTH",t[t.QUARTER=9]="QUARTER",t[t.HALF=10]="HALF",t[t.WHOLE=11]="WHOLE",t[t.BREVE=12]="BREVE",t[t.LONG=13]="LONG",t[t.MAXIMA=14]="MAXIMA"}(o=e.NoteType||(e.NoteType={}));class a{static NoteTypeToString(t){return this.NoteTypeXmlValues[t]}static StringToNoteType(t){const e=this.NoteTypeXmlValues.indexOf(t);return-1!==e?e:o.UNDEFINED}static getNoteDurationFromType(t){switch(t){case"1024th":return new s.Fraction(1,1024);case"512th":return new s.Fraction(1,512);case"256th":return new s.Fraction(1,256);case"128th":return new s.Fraction(1,128);case"64th":return new s.Fraction(1,64);case"32th":case"32nd":return new s.Fraction(1,32);case"16th":return new s.Fraction(1,16);case"eighth":return new s.Fraction(1,8);case"quarter":return new s.Fraction(1,4);case"half":return new s.Fraction(1,2);case"whole":return new s.Fraction(1,1);case"breve":return new s.Fraction(2,1);case"long":return new s.Fraction(4,1);case"maxima":return new s.Fraction(8,1);default:{const t=n.ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid note duration.");throw new r.MusicSheetReadingException(t)}}}}e.NoteTypeHandler=a,a.NoteTypeXmlValues=["","1024th","512th","256th","128th","64th","32nd","16th","eigth","quarter","half","whole","breve","long","maxima"]},766:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NoteHeadShape=e.Notehead=void 0;const n=s(i(2043));class r{constructor(t,e,i=void 0){this.sourceNote=t,this.setShapeFromXml(e,i)}setShapeFromXml(t,e=void 0){this.shape=r.ShapeTypeXmlToShape(t);let i=e;void 0===i&&(this.sourceNote?i=this.sourceNote.Length.Denominator>2:(n.default.warn("notehead: sourceNote and filledXmlAttribute undefined."),i=!0)),this.filled=i}get SourceNote(){return this.sourceNote}get Shape(){return this.shape}get Filled(){return this.filled}static ShapeTypeXmlToShape(t){switch(t.toLowerCase()){case"normal":return o.NORMAL;case"x":return o.X;case"slash":return o.SLASH;case"diamond":return o.DIAMOND;case"square":case"la":return o.SQUARE;case"do":case"triangle":return o.TRIANGLE;case"inverted triangle":return o.TRIANGLE_INVERTED;case"rectangle":return o.RECTANGLE;case"circle-x":return o.CIRCLEX;default:return n.default.info("unsupported/unhandled xml notehead '"+t+"'. Using normal notehead."),o.NORMAL}}}var o;e.Notehead=r,function(t){t[t.CIRCLEX=0]="CIRCLEX",t[t.DIAMOND=1]="DIAMOND",t[t.NORMAL=2]="NORMAL",t[t.RECTANGLE=3]="RECTANGLE",t[t.SLASH=4]="SLASH",t[t.SQUARE=5]="SQUARE",t[t.TRIANGLE=6]="TRIANGLE",t[t.TRIANGLE_INVERTED=7]="TRIANGLE_INVERTED",t[t.X=8]="X"}(o=e.NoteHeadShape||(e.NoteHeadShape={}))},5922:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OrnamentEnum=e.OrnamentContainer=void 0;const s=i(8640),n=i(3748);var r;e.OrnamentContainer=class{constructor(t){this.placement=n.PlacementEnum.Above,this.accidentalAbove=s.AccidentalEnum.NONE,this.accidentalBelow=s.AccidentalEnum.NONE,this.ornament=t}get GetOrnament(){return this.ornament}get AccidentalAbove(){return this.accidentalAbove}set AccidentalAbove(t){this.accidentalAbove=t}get AccidentalBelow(){return this.accidentalBelow}set AccidentalBelow(t){this.accidentalBelow=t}},(r=e.OrnamentEnum||(e.OrnamentEnum={}))[r.Trill=0]="Trill",r[r.Turn=1]="Turn",r[r.InvertedTurn=2]="InvertedTurn",r[r.DelayedTurn=3]="DelayedTurn",r[r.DelayedInvertedTurn=4]="DelayedInvertedTurn",r[r.Mordent=5]="Mordent",r[r.InvertedMordent=6]="InvertedMordent"},5942:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SourceMeasure=void 0;const s=i(1797),n=i(141),r=i(9050),o=i(6189),a=i(908),l=i(289),h=i(5198),u=i(6894);let c=null;e.SourceMeasure=class{constructor(t,e){this.printNewSystemXml=!1,this.printNewPageXml=!1,this.IsSystemStartMeasure=!1,this.hasLyrics=!1,this.hasMoodExpressions=!1,this.allRests=!1,this.isReducedToMultiRest=!1,this.multipleRestMeasureNumber=0,this.staffLinkedExpressions=[],this.tempoExpressions=[],this.verticalSourceStaffEntryContainers=[],this.graphicalMeasureErrors=[],this.firstRepetitionInstructions=[],this.lastRepetitionInstructions=[],this.metronomeNoteIndex=0,this.WasRendered=!1,this.completeNumberOfStaves=t,this.implicitMeasure=!1,this.hasEndLine=!1,this.endingBarStyleXml="",this.endingBarStyleEnum=u.SystemLinesEnum.SingleThin,this.firstInstructionsStaffEntries=new Array(t),this.lastInstructionsStaffEntries=new Array(t),this.rules=e,this.TempoInBPM=0;for(let e=0;e1)return t[this.measureListIndex-1]}get Rules(){return this.rules}get VerticalMeasureList(){return this.verticalMeasureList}set VerticalMeasureList(t){this.verticalMeasureList=t}get TempoInBPM(){return this.tempoInBPM}set TempoInBPM(t){this.tempoInBPM=t}findOrCreateStaffEntry(t,e,i){let s,o;for(const e of this.verticalSourceStaffEntryContainers)if(e.Timestamp.Equals(t)){o=e;break}if(o)return o.StaffEntries[e]?s=o.StaffEntries[e]:(s=new r.SourceStaffEntry(o,i),o.StaffEntries[e]=s),{createdNewContainer:!1,staffEntry:s};const a=this.verticalSourceStaffEntryContainers[this.verticalSourceStaffEntryContainers.length-1];if(0===this.verticalSourceStaffEntryContainers.length||a.Timestamp.lt(t)){const o=new n.VerticalSourceStaffEntryContainer(this,t.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.push(o),s=new r.SourceStaffEntry(o,i),o.StaffEntries[e]=s}else for(let o=this.verticalSourceStaffEntryContainers.length-1;o>=0;o--){if(this.verticalSourceStaffEntryContainers[o].Timestamp.lt(t)){const a=new n.VerticalSourceStaffEntryContainer(this,t.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(o+1,0,a),s=new r.SourceStaffEntry(a,i),a.StaffEntries[e]=s;break}if(0===o){const a=new n.VerticalSourceStaffEntryContainer(this,t.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(o,0,a),s=new r.SourceStaffEntry(a,i),a.StaffEntries[e]=s;break}}return{createdNewContainer:!0,staffEntry:s}}findOrCreateVoiceEntry(t,e){let i,s=!1;for(const s of t.VoiceEntries)if(s.ParentVoice===e){i=s;break}return i||(i=new a.VoiceEntry(t.Timestamp,e,t),s=!0),{createdVoiceEntry:s,voiceEntry:i}}getPreviousSourceStaffEntryFromIndex(t,e){for(let i=e-1;i>=0;i--)if(this.verticalSourceStaffEntryContainers[i][t])return this.verticalSourceStaffEntryContainers[i][t]}getVerticalContainerIndexByTimestamp(t){for(let e=0,i=this.VerticalSourceStaffEntryContainers.length;e=0;e--){const t=this.verticalSourceStaffEntryContainers[e][r+n];if(void 0!==t&&t.hasTie()&&i.lt(s.Fraction.plus(t.Timestamp,t.calculateMaxNoteLength()))){i=s.Fraction.plus(t.Timestamp,t.calculateMaxNoteLength());break}}}n.push(i)}for(let t=0,e=n.length;t0)return!0}return!1}beginsWithLineRepetition(){for(let t=0,e=this.FirstRepetitionInstructions.length;t=0;s--)if(i=this.verticalSourceStaffEntryContainers[s].StaffEntries[t],i&&(!e||i.VoiceEntries.length>0))return i}canBeReducedToMultiRest(){var t,e,i,s,n,r;if(this.firstRepetitionInstructions.length>0||this.lastRepetitionInstructions.length>0)return!1;let o=!0,a=!1;for(const t of this.verticalSourceStaffEntryContainers)if(t)for(const e of t.StaffEntries)if(e&&e.ParentStaff.ParentInstrument.Visible){if(e.ChordContainers.length>0)return!1;e.ParentStaff.hasLyrics&&(a=!0);for(const t of e.VoiceEntries){for(const e of t.Notes)if(!e.isRest()){o=!1;break}if(!o)break}}if(!o||a||this.hasMoodExpressions||this.tempoExpressions.length>0)return!1;for(const t of this.staffLinkedExpressions)if(t.length>0)return!1;for(const t of this.lastInstructionsStaffEntries)for(let e=0,i=null==t?void 0:t.Instructions.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SourceStaffEntry=void 0;const s=i(1797),n=i(289),r=i(5198),o=i(3331);e.SourceStaffEntry=class{constructor(t,e){this.voiceEntries=[],this.instructions=[],this.chordSymbolContainers=[],this.verticalContainerParent=t,this.parentStaff=e}get ParentStaff(){return this.parentStaff}get VerticalContainerParent(){return this.verticalContainerParent}get Timestamp(){if(this.VerticalContainerParent)return this.VerticalContainerParent.Timestamp}get AbsoluteTimestamp(){if(this.VerticalContainerParent)return s.Fraction.plus(this.VerticalContainerParent.ParentMeasure.AbsoluteTimestamp,this.VerticalContainerParent.Timestamp)}get VoiceEntries(){return this.voiceEntries}set VoiceEntries(t){this.voiceEntries=t}get Link(){return this.staffEntryLink}set Link(t){this.staffEntryLink=t}get Instructions(){return this.instructions}set Instructions(t){this.instructions=t}get ChordContainers(){return this.chordSymbolContainers}set ChordContainers(t){this.chordSymbolContainers=t}removeAllInstructionsOfTypeClefInstruction(){let t=0,e=0;for(;t0)return!0;return!1}hasTie(){for(let t=0,e=this.VoiceEntries.length;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Staff=void 0,e.Staff=class{constructor(t,e){this.isTab=!1,this.voices=[],this.volume=1,this.stafflineCount=5,this.hasLyrics=!1,this.openTieDict={},this.parentInstrument=t,this.id=e,this.audible=!0,this.following=!0}get ParentInstrument(){return this.parentInstrument}set ParentInstrument(t){this.parentInstrument=t}get Voices(){return this.voices}get Solo(){return this.solo}set Solo(t){this.solo=t}get Id(){return this.id}get Volume(){return this.volume}set Volume(t){this.volume=t}get StafflineCount(){return this.stafflineCount}set StafflineCount(t){this.stafflineCount=t}toString(){return"Staff "+this.idInMusicSheet.toString()}}},4447:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StaffEntryLink=void 0,e.StaffEntryLink=class{constructor(t){this.linkStaffEntries=[],this.voiceEntry=t}get GetVoiceEntry(){return this.voiceEntry}get LinkStaffEntries(){return this.linkStaffEntries}set LinkStaffEntries(t){this.linkStaffEntries=t}}},2953:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabNote=void 0;const s=i(5253);class n extends s.Note{constructor(t,e,i,s,n,r,o,a){super(t,e,i,s,n),this.stringNumberTab=r,this.fretNumber=o,this.bendArray=a}get StringNumberTab(){return this.stringNumberTab}get FretNumber(){return this.fretNumber}get BendArray(){return this.bendArray}hasTabEffects(){var t;return(null===(t=this.bendArray)||void 0===t?void 0:t.length)>0}}e.TabNote=n},4555:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Tie=void 0;const n=i(1797),r=i(3748),o=s(i(2043));e.Tie=class{constructor(t,e){this.notes=[],this.TieNumber=1,this.TieDirection=r.PlacementEnum.NotYetDefined,this.NoteIndexToTieDirection={},this.AddNote(t),this.type=e}getTieDirection(t){if(!t)return this.TieDirection;for(let e=0;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tuplet=void 0,e.Tuplet=class{constructor(t,e=!1){this.PlacementFromXml=!1,this.RenderTupletNumber=!0,this.notes=[],this.fractions=[],this.tupletLabelNumber=t,this.bracket=e}shouldBeBracketed(t,e,i,s=!1,n=!1){if(s)return n;if(t&&void 0!==this.BracketedXmlValue)return this.BracketedXmlValue;const r=this.Notes[0][0].NoteBeam;if(!r)return!0;for(const t of this.Notes)if(t[0].NoteBeam!==r)return!0;return this.Bracket||3===this.TupletLabelNumber&&i||3!==this.TupletLabelNumber&&e}get TupletLabelNumber(){return this.tupletLabelNumber}set TupletLabelNumber(t){this.tupletLabelNumber=t}get Notes(){return this.notes}set Notes(t){this.notes=t}get Fractions(){return this.fractions}set Fractions(t){this.fractions=t}get Bracket(){return this.bracket}set Bracket(t){this.bracket=t}getNoteIndex(t){for(let e=this.notes.length-1;e>=0;e--)for(let i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalSourceStaffEntryContainer=void 0;const s=i(1797);e.VerticalSourceStaffEntryContainer=class{constructor(t,e,i){this.staffEntries=[],this.comments=[],this.timestamp=e,this.staffEntries=new Array(i),this.parentMeasure=t}$get$(t){return this.staffEntries[t]}$set$(t,e){this.staffEntries[t]=e}get Timestamp(){return this.timestamp}set Timestamp(t){this.timestamp=t}get StaffEntries(){return this.staffEntries}set StaffEntries(t){this.staffEntries=t}get Comments(){return this.comments}set Comments(t){this.comments=t}get ParentMeasure(){return this.parentMeasure}set ParentMeasure(t){this.parentMeasure=t}getAbsoluteTimestamp(){return s.Fraction.plus(this.timestamp,this.parentMeasure.AbsoluteTimestamp)}}},3884:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Voice=void 0,e.Voice=class{constructor(t,e){this.voiceEntries=[],this.volume=1,this.parent=t,this.visible=!0,this.audible=!0,this.following=!0,this.voiceId=e,this.uniqueVoiceId="I:"+this.parent.Id+" V: "+this.voiceId}get VoiceEntries(){return this.voiceEntries}get Parent(){return this.parent}get Visible(){return this.visible}set Visible(t){this.visible=t}get Audible(){return this.audible}set Audible(t){this.audible=t}get Following(){return this.following}set Following(t){this.following=t}get Solo(){return this.solo}set Solo(t){this.solo=t}get VoiceId(){return this.voiceId}get Volume(){return this.volume}set Volume(t){this.volume=t}toString(){return this.uniqueVoiceId}}},908:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StemDirectionType=e.ArticulationEnum=e.VoiceEntry=void 0;const s=i(1649),n=i(4170),r=i(6591);var o,a;e.VoiceEntry=class{constructor(t,e,i,r=!0,o=!1,l=!1,h=!1){if(this.notes=[],this.graceVoiceEntriesBefore=[],this.graceVoiceEntriesAfter=[],this.articulations=[],this.playbackEntries=[],this.technicalInstructions=[],this.lyricsEntries=new s.Dictionary,this.wantedStemDirection=a.Undefined,this.stemDirectionXml=a.Undefined,this.stemDirection=a.Undefined,this.timestamp=t,this.parentVoice=e,this.parentSourceStaffEntry=i,this.isGrace=o,this.graceAfterMainNote=!1,this.graceNoteSlash=l,this.graceSlur=h,o||e.VoiceEntries.push(this),r&&void 0!==i){const t=i.VoiceEntries;-1===t.indexOf(this)&&t.push(this)}this.mainPlaybackEntry=new n.PlaybackEntry(this),this.PlaybackEntries.push(this.mainPlaybackEntry)}get ParentSourceStaffEntry(){return this.parentSourceStaffEntry}get ParentVoice(){return this.parentVoice}get Timestamp(){return this.timestamp}set Timestamp(t){this.timestamp=t}get Notes(){return this.notes}addNote(t){this.notes.push(t),t.isRest()||void 0!==t.NoteTie&&t.NoteTie.StartNote!==t||this.MainPlaybackEntry.Notes.push(new r.PlaybackNote(this.MainPlaybackEntry,t))}get GraceVoiceEntriesBefore(){return this.graceVoiceEntriesBefore}set GraceVoiceEntriesBefore(t){this.graceVoiceEntriesBefore=t;for(const t of this.graceVoiceEntriesBefore)t.parentSourceStaffEntry=this.ParentSourceStaffEntry}get GraceVoiceEntriesAfter(){return this.graceVoiceEntriesAfter}set GraceVoiceEntriesAfter(t){this.graceVoiceEntriesAfter=t;for(const t of this.graceVoiceEntriesAfter)t.parentSourceStaffEntry=this.ParentSourceStaffEntry}get IsGrace(){return this.isGrace}set IsGrace(t){this.isGrace=t}get GraceAfterMainNote(){return this.graceAfterMainNote}set GraceAfterMainNote(t){this.graceAfterMainNote=t}get GraceNoteSlash(){return this.graceNoteSlash}set GraceNoteSlash(t){this.graceNoteSlash=t}get GraceSlur(){return this.graceSlur}set GraceSlur(t){this.graceSlur=t}get Articulations(){return this.articulations}get PlaybackEntries(){return this.playbackEntries}get Fermata(){return this.fermata}get MainPlaybackEntry(){return this.mainPlaybackEntry}set MainPlaybackEntry(t){this.mainPlaybackEntry=t}removeMainPlaybackEntry(){void 0!==this.mainPlaybackEntry&&this.removePlaybackEntry(this.mainPlaybackEntry)}removePlaybackEntry(t){this.mainPlaybackEntry===t&&(this.mainPlaybackEntry=void 0);const e=this.playbackEntries.indexOf(t);e>-1&&this.playbackEntries.splice(e,1)}set Articulations(t){this.articulations=t}get TechnicalInstructions(){return this.technicalInstructions}get LyricsEntries(){return this.lyricsEntries}get Arpeggio(){return this.arpeggio}set Arpeggio(t){this.arpeggio=t}get OrnamentContainer(){return this.ornamentContainer}set OrnamentContainer(t){this.ornamentContainer=t}set WantedStemDirection(t){this.wantedStemDirection=t}get WantedStemDirection(){return this.wantedStemDirection}set StemDirectionXml(t){this.stemDirectionXml=t}get StemDirectionXml(){return this.stemDirectionXml}set StemDirection(t){this.stemDirection=t}get StemDirection(){return this.stemDirection}get StemColorXml(){return this.stemColorXml}set StemColorXml(t){this.stemColorXml=t}get StemColor(){return this.stemColor}set StemColor(t){this.stemColor=t}get VolumeModifier(){return this.volumeModifier}set VolumeModifier(t){this.volumeModifier=t}get DurationModifier(){return this.durationModifier}set DurationModifier(t){this.durationModifier=t}hasArticulation(t){for(const e of this.articulations)if(e.Equals(t))return!0;return!1}static isSupportedArticulation(t){switch(t){case o.accent:case o.strongaccent:case o.softaccent:case o.invertedstrongaccent:case o.staccato:case o.staccatissimo:case o.spiccato:case o.tenuto:case o.fermata:case o.invertedfermata:case o.breathmark:case o.caesura:case o.lefthandpizzicato:case o.naturalharmonic:case o.snappizzicato:case o.upbow:case o.downbow:case o.bend:return!0;default:return!1}}hasTie(){for(let t=0,e=this.Notes.length;t0)return!0;return!1}isStaccato(){for(const t of this.Articulations)if(t.articulationEnum===o.staccato)return!0;return!1}isAccent(){for(const t of this.Articulations)if(t.articulationEnum===o.accent||t.articulationEnum===o.strongaccent)return!0;return!1}getVerseNumberForLyricEntry(t){let e="1";return this.lyricsEntries.forEach(((i,s)=>{t===s&&(e=i)})),e}},function(t){t[t.accent=0]="accent",t[t.strongaccent=1]="strongaccent",t[t.softaccent=2]="softaccent",t[t.marcatoup=3]="marcatoup",t[t.marcatodown=4]="marcatodown",t[t.invertedstrongaccent=5]="invertedstrongaccent",t[t.staccato=6]="staccato",t[t.staccatissimo=7]="staccatissimo",t[t.spiccato=8]="spiccato",t[t.tenuto=9]="tenuto",t[t.fermata=10]="fermata",t[t.invertedfermata=11]="invertedfermata",t[t.breathmark=12]="breathmark",t[t.caesura=13]="caesura",t[t.lefthandpizzicato=14]="lefthandpizzicato",t[t.naturalharmonic=15]="naturalharmonic",t[t.snappizzicato=16]="snappizzicato",t[t.upbow=17]="upbow",t[t.downbow=18]="downbow",t[t.scoop=19]="scoop",t[t.plop=20]="plop",t[t.doit=21]="doit",t[t.falloff=22]="falloff",t[t.stress=23]="stress",t[t.unstress=24]="unstress",t[t.detachedlegato=25]="detachedlegato",t[t.otherarticulation=26]="otherarticulation",t[t.bend=27]="bend"}(o=e.ArticulationEnum||(e.ArticulationEnum={})),function(t){t[t.Undefined=-1]="Undefined",t[t.Up=0]="Up",t[t.Down=1]="Down",t[t.None=2]="None",t[t.Double=3]="Double"}(a=e.StemDirectionType||(e.StemDirectionType={}))},6550:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(3029),e),n(i(9224),e),n(i(4123),e),n(i(7198),e),n(i(2947),e),n(i(5253),e),n(i(766),e),n(i(2478),e),n(i(5922),e),n(i(5942),e),n(i(9050),e),n(i(0),e),n(i(4447),e),n(i(4555),e),n(i(8069),e),n(i(141),e),n(i(3884),e),n(i(908),e),n(i(6065),e),n(i(5253),e),n(i(2478),e),n(i(5942),e),n(i(9050),e),n(i(141),e),n(i(4555),e)},4761:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(1703),e),n(i(6842),e),n(i(7988),e),n(i(884),e),n(i(2255),e),n(i(7514),e),n(i(5142),e),n(i(6550),e),n(i(4990),e),n(i(4257),e),n(i(9714),e),n(i(4759),e),n(i(4143),e),n(i(1295),e)},3495:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AJAX=void 0,e.AJAX=class{static ajax(t,e=9e3){let i;const s=t.indexOf(".mxl")>-1?"text/plain; charset=x-user-defined":"application/xml";if(XMLHttpRequest)i=new XMLHttpRequest;else{if(!ActiveXObject)return Promise.reject(new Error("XMLHttp not supported."));i=new ActiveXObject("Microsoft.XMLHTTP")}return i.timeout=e,new Promise(((e,n)=>{i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(200===i.status||0===i.status&&i.responseText?e(i.responseText):n(new Error("Could not retrieve requested URL "+i.status)))},i.ontimeout=t=>{n(new Error("Server request Timeout"))},i.overrideMimeType(s),i.open("GET",t,!0),i.send()}))}}},530:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;const s=i(301),n=i(1797);e.Cursor=class{constructor(t,e,i){this.hidden=!1,this.currentPageNumber=1,this.skipInvisibleNotes=!0,this.ScrollPosition="center",this.noteGraphicalId=0,this.container=t,this.openSheetMusicDisplay=e,this.rules=this.openSheetMusicDisplay.EngravingRules,this.cursorOptions=i;let s=0;for(this.cursorElementId="cursorImg-0";document.getElementById(this.cursorElementId);)s++,this.cursorElementId=`cursorImg-${s}`;this.noteGraphicalId=0;const n=document.createElement("img");n.id=this.cursorElementId,n.style.position="absolute",!0===this.cursorOptions.follow?(this.wantedZIndex="-1",n.style.zIndex=this.wantedZIndex):(this.wantedZIndex="-2",n.style.zIndex=this.wantedZIndex),this.cursorElement=n,this.container.appendChild(n)}cursorPositionChanged(t,e){for(;this.iterator.currentTimeStamp.lt(t)&&!this.iterator.EndReached;)this.iterator.moveToNext();this.iterator.CurrentEnrolledTimestamp.gt(t)&&(this.iterator=new s.MusicPartManagerIterator(this.manager.MusicSheet,t)),this.updateWithTimestamp(e.PredictedPosition)}pauseOccurred(t){}selectionEndReached(t){}resetOccurred(t){this.reset()}notesPlaybackEventOccurred(t){}adjustToBackgroundColor(){let t;t=this.rules.PageBackgroundColor?"1":this.wantedZIndex,this.cursorElement.style.zIndex=t}init(t,e){this.manager=t,this.graphic=e,this.reset(),this.hidden=!1}show(){this.hidden=!1,this.update(),this.adjustToBackgroundColor()}resetIterator(){if(!this.openSheetMusicDisplay.Sheet||!this.openSheetMusicDisplay.Sheet.SourceMeasures)return void console.log("OSMD.Cursor.resetIterator(): sheet or measures were null/undefined.");const t=this.openSheetMusicDisplay.Sheet.SourceMeasures.length-1;let e=this.rules.MinMeasureToDrawIndex;e=Math.min(e,t);let i=this.rules.MaxMeasureToDrawIndex;if(i=Math.min(i,t),this.openSheetMusicDisplay.Sheet&&(!this.openSheetMusicDisplay.Sheet.SelectionStart||this.openSheetMusicDisplay.Sheet.SelectionStart.WholeValuei){const t=this.openSheetMusicDisplay.Sheet.SourceMeasures[i];this.openSheetMusicDisplay.Sheet.SelectionEnd=n.Fraction.plus(t.AbsoluteTimestamp,t.Duration)}this.iterator=this.manager.getIterator(),this.iterator.SkipInvisibleNotes=this.skipInvisibleNotes}getStaffEntryFromVoiceEntry(t){const e=t.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure.measureListIndex,i=t.ParentSourceStaffEntry.ParentStaff.idInMusicSheet;return this.graphic.findGraphicalStaffEntryFromMeasureList(i,e,t.ParentSourceStaffEntry)}updateWithTimestamp(t){const e=this.manager.absoluteEnrolledToSheetTimestamp(t),i=this.graphic.calculateXPositionFromTimestamp(e),s=i[0],n=i[1];this.updateCurrentPageFromSystem(n);const r=i[2];if(!r)return;const o=Math.max(r.parentMeasure.MeasureNumber,1);let a;for(const t of this.graphic.MeasureList[o-1])if(t){a=t;break}const l=this.graphic.calculateCursorPoints(s,n),h=l[0].y,u=l[1].y-h;if(a){if(this.updateWidthAndStyle(a.PositionAndShape,s,h,u),this.openSheetMusicDisplay.FollowCursor){const t=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:t<1e3?"smooth":"auto",block:this.ScrollPosition})}this.cursorElement.style.display=""}}update(){if(this.hidden||void 0===this.hidden||null===this.hidden)return;this.updateCurrentPage();const t=this.Iterator;let e,i=t.CurrentVisibleVoiceEntries(),s=t.CurrentMeasureIndex,n=0,r=0,o=0;if(0!==i.length||t.FrontReached||t.EndReached||(t.moveToPrevious(),i=t.CurrentVisibleVoiceEntries(),t.moveToNext()),t.FrontReached&&0===i.length){t.moveToNext(),i=t.CurrentVisibleVoiceEntries();const s=this.findVisibleGraphicalMeasure(t.CurrentMeasureIndex);n=s.PositionAndShape.AbsolutePosition.x,e=s.ParentMusicSystem,t.moveToPrevious()}else if(t.EndReached||!t.CurrentVoiceEntries||0===i.length){t.moveToPrevious(),i=t.CurrentVisibleVoiceEntries(),s=t.CurrentMeasureIndex;const r=this.findVisibleGraphicalMeasure(t.CurrentMeasureIndex);n=r.PositionAndShape.AbsolutePosition.x+r.PositionAndShape.Size.width,e=r.ParentMusicSystem,t.moveToNext()}else if(t.CurrentMeasure.isReducedToMultiRest){const i=this.findVisibleGraphicalMeasure(t.CurrentMeasureIndex),s=i.parentSourceMeasure.multipleRestMeasures,r=t.CurrentMeasure.multipleRestMeasureNumber/(s+1),o=i.PositionAndShape.Size.width-i.beginInstructionsWidth;n=i.PositionAndShape.AbsolutePosition.x+i.beginInstructionsWidth+r*o,e=i.ParentMusicSystem}else{const t=i.map((t=>this.getStaffEntryFromVoiceEntry(t))).sort(((t,e)=>{var i,s,n,r;return(null===(s=null===(i=null==t?void 0:t.PositionAndShape)||void 0===i?void 0:i.AbsolutePosition)||void 0===s?void 0:s.x)<=(null===(r=null===(n=null==e?void 0:e.PositionAndShape)||void 0===n?void 0:n.AbsolutePosition)||void 0===r?void 0:r.x)?-1:1}))[0];t&&(n=t.PositionAndShape.AbsolutePosition.x,e=t.parentMeasure.ParentMusicSystem)}if(!e)return;r=e.PositionAndShape.AbsolutePosition.y+e.StaffLines[0].PositionAndShape.RelativePosition.y;let a=e.PositionAndShape.AbsolutePosition.y;const l=e.StaffLines[e.StaffLines.length-1];l&&(a+=l.PositionAndShape.RelativePosition.y+l.StaffHeight),o=a-r;const h=this.findVisibleGraphicalMeasure(s);if(!h)return;const u=h.PositionAndShape;if(this.updateWidthAndStyle(u,n,r,o),this.openSheetMusicDisplay.FollowCursor&&this.cursorOptions.follow)if(this.openSheetMusicDisplay.EngravingRules.RenderSingleHorizontalStaffline)this.cursorElement.scrollIntoView({behavior:"smooth",inline:"center"});else{const t=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:t<1e3?"smooth":"auto",block:"center"})}this.cursorElement.style.display=""}findVisibleGraphicalMeasure(t){for(let t=0;t{i.push.apply(i,t.Notes)})),i}GNotesUnderCursor(t){const e=this.VoicesUnderCursor(t),i=[];return e.forEach((t=>{i.push(...t.Notes.map((t=>this.rules.GNote(t))))})),i}updateCurrentPage(){let t=this.iterator.currentTimeStamp;t.RealValue<0&&(t=new n.Fraction(0,0));for(const e of this.graphic.MusicPages)if(e.MusicSystems.last().GetSystemsLastTimeStamp().gt(t)){const t=e.PageNumber;return t!==this.currentPageNumber&&(this.container.removeChild(this.cursorElement),this.container=document.getElementById(this.rules.DYContainerId+t),this.container.appendChild(this.cursorElement)),this.currentPageNumber=t}return 1}get SkipInvisibleNotes(){return this.skipInvisibleNotes}set SkipInvisibleNotes(t){this.skipInvisibleNotes=t,this.iterator.SkipInvisibleNotes=t}get CursorOptions(){return this.cursorOptions}set CursorOptions(t){this.cursorOptions=t}updateCurrentPageFromSystem(t){if(null==t?void 0:t.Parent){const e=t.Parent.PageNumber;return e!==this.currentPageNumber&&(this.container.removeChild(this.cursorElement),this.container=document.getElementById(this.rules.DYContainerId+e),this.container.appendChild(this.cursorElement)),this.currentPageNumber=e}return 1}Dispose(){this.rules=void 0,this.openSheetMusicDisplay=void 0,this.cursorOptions=void 0}}},41:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OSMDOptions=e.SkyBottomLineBatchCalculatorBackendType=e.BackendType=e.FillEmptyMeasuresWithWholeRests=e.AlignRestOption=e.CursorType=void 0;const s=i(5284);var n,r,o,a,l;(l=e.CursorType||(e.CursorType={}))[l.Standard=0]="Standard",l[l.ThinLeft=1]="ThinLeft",l[l.ShortThinTopLeft=2]="ShortThinTopLeft",l[l.CurrentArea=3]="CurrentArea",l[l.CurrentAreaLeft=4]="CurrentAreaLeft",(a=e.AlignRestOption||(e.AlignRestOption={}))[a.Never=0]="Never",a[a.Always=1]="Always",a[a.Auto=2]="Auto",(o=e.FillEmptyMeasuresWithWholeRests||(e.FillEmptyMeasuresWithWholeRests={}))[o.No=0]="No",o[o.YesVisible=1]="YesVisible",o[o.YesInvisible=2]="YesInvisible",function(t){t[t.SVG=0]="SVG",t[t.Canvas=1]="Canvas"}(n=e.BackendType||(e.BackendType={})),(r=e.SkyBottomLineBatchCalculatorBackendType||(e.SkyBottomLineBatchCalculatorBackendType={}))[r.Plain=0]="Plain",r[r.WebGL=1]="WebGL",e.OSMDOptions=class{static OSMDOptionsStandard(){return{autoResize:!0,backend:"svg",drawingParameters:s.DrawingParametersEnum.default}}static BackendTypeFromString(t){return t&&"canvas"===t.toLowerCase()?n.Canvas:n.SVG}}},9629:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.OpenSheetMusicDisplay=void 0;const n=i(9228),r=i(8738),o=i(1372),a=i(4324),l=i(4040),h=i(5820),u=i(9505),c=i(4028),d=i(530),p=i(7056),f=i(3495),m=s(i(2043)),g=i(7459),b=i(5284),S=i(6387),y=i(41),v=i(1405),E=i(3748),_=i(1649),x=i(8155),M=i(8640),P=i(1596),w=i(2660),T=i(4821),I=i(8198);class L{constructor(t,e=y.OSMDOptions.OSMDOptionsStandard(),i=new v.EngravingRules){if(this.version="1.8.7-audio-extended",this.cursorsOptions=[],this.cursors=[],this.zoom=1,this.zoomUpdated=!1,this.loadUrlTimeout=5e3,this.rules=i,"string"==typeof t?this.container=document.getElementById(t):t&&"appendChild"in t&&(this.container=t),!this.container)throw new Error("Please pass a valid div container to OpenSheetMusicDisplay");void 0===e.autoResize&&(e.autoResize=!0),this.backendType=y.BackendType.SVG,this.setOptions(e),this.interactionManager=new T.WebDisplayInteractionManager(this.container),this.renderingManager=new w.WebSheetRenderingManager(this.interactionManager,this.rules)}get cursor(){return this.cursors[0]}get Cursor(){return this.cursor}get RenderingManager(){return this.renderingManager}set PlaybackManager(t){this.renderingManager&&(this.renderingManager.PlaybackManager=t)}get PlaybackManager(){var t;return null===(t=this.renderingManager)||void 0===t?void 0:t.PlaybackManager}isUrl(t){return t.length<2083}isMxl(t){return"PK"===t.substr(0,4)}processMxl(t,e,i){p.MXLHelper.MXLtoXMLstring(t).then((t=>{e(this.processStringXml(t))}),(t=>{m.default.error(new Error("[OSMD] Invalid MXL file: "+t)),i(new Error("[OSMD] Invalid MXL file: "+t))}))}processStringXml(t){const e=new DOMParser;if(""===t.substr(0,3))return m.default.debug("[OSMD] UTF with BOM detected, truncate first three bytes and pass along: "+t),e.parseFromString(t.substr(3),"application/xml");if(t.substr(0,6).includes("{i.isMxl(t)?i.processMxl(t,e,s):e(i.processStringXml(t))}),(t=>{throw s(t),t}));else{const t=new Error("[OSMD] osmd.load(string): Could not process string. Did not find {t.init(this.sheet.MusicPartManager,this.graphic)})),this.drawingParameters.DrawingParametersEnum===b.DrawingParametersEnum.leadsheet&&(this.graphic.LeadSheet=!0),this.renderingManager.setMusicSheet(this.graphic),this.interactionManager.Initialize()}render(){var t;if(!this.graphic)throw new Error("OpenSheetMusicDisplay: Before rendering a music sheet, please load a MusicXML file");null===(t=this.drawer)||void 0===t||t.clear();let e=this.container.offsetWidth;this.rules.RenderSingleHorizontalStaffline&&(e=this.rules.SheetMaximumWidth),this.sheet.pageWidth=e/this.zoom/10,this.renderingManager.MainViewingRegion.WidthInUnits=this.sheet.pageWidth,this.rules.PageFormat&&!this.rules.PageFormat.IsUndefined?(this.rules.PageHeight=this.sheet.pageWidth/this.rules.PageFormat.aspectRatio,m.default.debug("[OSMD] PageHeight: "+this.rules.PageHeight)):(m.default.debug("[OSMD] endless/undefined pageformat, id: "+this.rules.PageFormat.idString),this.rules.PageHeight=100001),this.graphic.reCalculate(),this.drawingParameters.drawCursors&&(this.graphic.Cursors.length=0),this.createOrRefreshRenderBackend(),this.needBackendUpdate=!1,this.drawer.setZoom(this.zoom);for(const t of this.sheet.SourceMeasures)t.WasRendered=!1;this.drawer.drawSheet(this.graphic),this.enableOrDisableCursors(this.drawingParameters.drawCursors),this.drawingParameters.drawCursors&&this.cursors.forEach((t=>{t.update()})),this.zoomUpdated=!1,this.interactionManager.displaySizeChanged(this.container.clientWidth,this.container.clientHeight),this.rules.RenderCount++}createOrRefreshRenderBackend(){if(this.drawer&&this.drawer.Backends){this.drawer.Backends[0]&&this.drawer.Backends[0].removeAllChildrenFromContainer(this.container);for(const t of this.drawer.Backends)t.free();this.drawer.Backends.clear()}this.drawingParameters.Rules=this.rules,this.drawer=new h.VexFlowMusicSheetDrawer(this.drawingParameters),this.drawer.drawableBoundingBoxElement=this.DrawBoundingBox,this.drawer.bottomLineVisible=this.drawBottomLine,this.drawer.skyLineVisible=this.drawSkyLine;let t,e=this.container.offsetWidth;this.rules.RenderSingleHorizontalStaffline&&(e=10*(this.EngravingRules.PageLeftMargin+this.graphic.MusicPages[0].PositionAndShape.Size.width+this.EngravingRules.PageRightMargin)*this.zoom);const i=32767;for(const s of this.graphic.MusicPages){if(s.PageNumber>this.rules.MaxPageToDrawNumber)break;const n=this.createBackend(this.backendType,s),r=" exceeds CanvasBackend limit of 32767. Cutting off score.";n.getOSMDBackendType()===y.BackendType.Canvas&&e>i&&(m.default.warn("[OSMD] Warning: width of "+e+r),e=i),this.rules.PageFormat&&!this.rules.PageFormat.IsUndefined?t=e/this.rules.PageFormat.aspectRatio:(t=s.PositionAndShape.Size.height,t+=this.rules.PageBottomMargin,n.getOSMDBackendType()===y.BackendType.Canvas&&(t+=.1),t+=s.PositionAndShape.BorderTop,this.rules.RenderTitle&&(t+=this.rules.TitleTopDistance),t*=10*this.zoom),n.getOSMDBackendType()===y.BackendType.Canvas&&t>i&&(m.default.warn("[OSMD] Warning: height of "+t+r),t=Math.min(t,i)),n.resize(e,t),n.clear(),n.getContext().setFillStyle(this.rules.DefaultColorMusic),n.getContext().setStrokeStyle(this.rules.DefaultColorMusic),this.drawer.Backends.push(n),this.graphic.drawer=this.drawer}}exportSVG(){var t;for(const e of null===(t=this.drawer)||void 0===t?void 0:t.Backends)e instanceof u.SvgVexFlowBackend&&e.export()}IsReadyToRender(){return void 0!==this.graphic}clear(){var t;null===(t=this.drawer)||void 0===t||t.clear(),this.reset()}dispose(){this.disposeResizeListener&&this.disposeResizeListener(),this.InteractionManager&&this.InteractionManager.Dispose()}setOptions(t){if(this.rules||(this.rules=new v.EngravingRules),this.drawingParameters||t.drawingParameters?t.drawingParameters&&(this.drawingParameters?this.drawingParameters.DrawingParametersEnum=b.DrawingParametersEnum[t.drawingParameters.toLowerCase()]:this.drawingParameters=new g.DrawingParameters(b.DrawingParametersEnum[t.drawingParameters],this.rules)):this.drawingParameters=new g.DrawingParameters(b.DrawingParametersEnum.default,this.rules),null==t)return void m.default.warn("warning: osmd.setOptions() called without an options parameter, has no effect.\nexample usage: osmd.setOptions({drawCredits: false, drawPartNames: false})");this.OnXMLRead=function(t){return t},t.onXMLRead&&(this.OnXMLRead=t.onXMLRead);let e=!this.drawer||!this.drawer.Backends||this.drawer.Backends.length<1;if(void 0!==t.backend){const i=y.OSMDOptions.BackendTypeFromString(t.backend);e=e||this.backendType!==i,this.backendType=i}this.needBackendUpdate=e,void 0!==t.autoBeam&&(this.rules.AutoBeamNotes=t.autoBeam);const i=t.autoBeamOptions;if(i&&(void 0===i.maintain_stem_directions&&(i.maintain_stem_directions=!1),this.rules.AutoBeamOptions=i,i.groups&&i.groups.length))for(const t of i.groups)if(2!==t.length)throw new Error("Each fraction in autoBeamOptions.groups must be of length 2, e.g. [3,4] for beaming three fourths");void 0!==t.percussionOneLineCutoff&&(this.rules.PercussionOneLineCutoff=t.percussionOneLineCutoff),0!==this.rules.PercussionOneLineCutoff&&void 0!==t.percussionForceVoicesOneLineCutoff&&(this.rules.PercussionForceVoicesOneLineCutoff=t.percussionForceVoicesOneLineCutoff),void 0!==t.alignRests&&(this.rules.AlignRests=t.alignRests),void 0!==t.coloringMode&&this.setColoringMode(t),void 0!==t.coloringEnabled&&(this.rules.ColoringEnabled=t.coloringEnabled),void 0!==t.colorStemsLikeNoteheads&&(this.rules.ColorStemsLikeNoteheads=t.colorStemsLikeNoteheads),t.disableCursor&&(this.drawingParameters.drawCursors=!1),t.drawHiddenNotes&&(this.drawingParameters.drawHiddenNotes=!0),void 0!==t.drawCredits&&(this.drawingParameters.DrawCredits=t.drawCredits),void 0!==t.drawComposer&&(this.drawingParameters.DrawComposer=t.drawComposer),void 0!==t.drawTitle&&(this.drawingParameters.DrawTitle=t.drawTitle),void 0!==t.drawSubtitle&&(this.drawingParameters.DrawSubtitle=t.drawSubtitle),void 0!==t.drawLyricist&&(this.drawingParameters.DrawLyricist=t.drawLyricist),void 0!==t.drawMetronomeMarks&&(this.rules.MetronomeMarksDrawn=t.drawMetronomeMarks),void 0!==t.drawPartNames&&(this.drawingParameters.DrawPartNames=t.drawPartNames,t.drawPartAbbreviations||(this.rules.RenderPartAbbreviations=t.drawPartNames)),void 0!==t.drawPartAbbreviations&&(this.rules.RenderPartAbbreviations=t.drawPartAbbreviations),!1===t.drawFingerings&&(this.rules.RenderFingerings=!1),void 0!==t.drawMeasureNumbers&&(this.rules.RenderMeasureNumbers=t.drawMeasureNumbers),t.drawMeasureNumbersOnlyAtSystemStart&&(this.rules.RenderMeasureNumbersOnlyAtSystemStart=t.drawMeasureNumbersOnlyAtSystemStart),void 0!==t.drawLyrics&&(this.rules.RenderLyrics=t.drawLyrics),void 0!==t.drawTimeSignatures&&(this.rules.RenderTimeSignatures=t.drawTimeSignatures),void 0!==t.drawSlurs&&(this.rules.RenderSlurs=t.drawSlurs),void 0!==t.measureNumberInterval&&(this.rules.MeasureNumberLabelOffset=t.measureNumberInterval),void 0!==t.useXMLMeasureNumbers&&(this.rules.UseXMLMeasureNumbers=t.useXMLMeasureNumbers),void 0!==t.fingeringPosition&&(this.rules.FingeringPosition=E.AbstractExpression.PlacementEnumFromString(t.fingeringPosition)),void 0!==t.fingeringInsideStafflines&&(this.rules.FingeringInsideStafflines=t.fingeringInsideStafflines),void 0!==t.newSystemFromXML&&(this.rules.NewSystemAtXMLNewSystemAttribute=t.newSystemFromXML),void 0!==t.newSystemFromNewPageInXML&&(this.rules.NewSystemAtXMLNewPageAttribute=t.newSystemFromNewPageInXML),void 0!==t.newPageFromXML&&(this.rules.NewPageAtXMLNewPageAttribute=t.newPageFromXML),void 0!==t.fillEmptyMeasuresWithWholeRest&&(this.rules.FillEmptyMeasuresWithWholeRest=t.fillEmptyMeasuresWithWholeRest),void 0!==t.followCursor&&(this.FollowCursor=t.followCursor),void 0!==t.setWantedStemDirectionByXml&&(this.rules.SetWantedStemDirectionByXml=t.setWantedStemDirectionByXml),t.darkMode?(this.rules.applyDefaultColorMusic("#FFFFFF"),this.rules.PageBackgroundColor="#000000"):!1===t.darkMode&&(this.rules.applyDefaultColorMusic("#000000"),this.rules.PageBackgroundColor=void 0),t.defaultColorMusic&&this.rules.applyDefaultColorMusic(t.defaultColorMusic),t.defaultColorNotehead&&(this.rules.DefaultColorNotehead=t.defaultColorNotehead),t.defaultColorRest&&(this.rules.DefaultColorRest=t.defaultColorRest),t.defaultColorStem&&(this.rules.DefaultColorStem=t.defaultColorStem),t.defaultColorLabel&&(this.rules.DefaultColorLabel=t.defaultColorLabel),t.defaultColorTitle&&(this.rules.DefaultColorTitle=t.defaultColorTitle),t.defaultFontFamily&&(this.rules.DefaultFontFamily=t.defaultFontFamily),t.defaultFontStyle&&(this.rules.DefaultFontStyle=t.defaultFontStyle),t.drawUpToMeasureNumber&&(this.rules.MaxMeasureToDrawIndex=t.drawUpToMeasureNumber-1),t.drawFromMeasureNumber&&(this.rules.MinMeasureToDrawIndex=t.drawFromMeasureNumber-1),t.drawUpToPageNumber&&(this.rules.MaxPageToDrawNumber=t.drawUpToPageNumber),t.drawUpToSystemNumber&&(this.rules.MaxSystemToDrawNumber=t.drawUpToSystemNumber),t.tupletsRatioed&&(this.rules.TupletsRatioed=!0),t.tupletsBracketed&&(this.rules.TupletsBracketed=!0),t.tripletsBracketed&&(this.rules.TripletsBracketed=!0),t.autoResize?(this.resizeHandlerAttached||this.autoResize(),this.autoResizeEnabled=!0):!1===t.autoResize&&(this.autoResizeEnabled=!1),void 0!==t.pageFormat&&this.setPageFormat(t.pageFormat),void 0!==t.pageBackgroundColor&&(this.rules.PageBackgroundColor=t.pageBackgroundColor),void 0!==t.performanceMode&&(this.rules.PerformanceMode=t.performanceMode),void 0!==t.renderSingleHorizontalStaffline&&(this.rules.RenderSingleHorizontalStaffline=t.renderSingleHorizontalStaffline),void 0!==t.spacingFactorSoftmax&&(this.rules.SoftmaxFactorVexFlow=t.spacingFactorSoftmax),void 0!==t.spacingBetweenTextLines&&(this.rules.SpacingBetweenTextLines=t.spacingBetweenTextLines),void 0!==t.stretchLastSystemLine&&(this.rules.StretchLastSystemLine=t.stretchLastSystemLine),void 0!==t.autoGenerateMultipleRestMeasuresFromRestMeasures&&(this.rules.AutoGenerateMultipleRestMeasuresFromRestMeasures=t.autoGenerateMultipleRestMeasuresFromRestMeasures),void 0!==t.cursorsOptions?this.cursorsOptions=t.cursorsOptions:this.cursorsOptions=[{type:y.CursorType.Standard,color:this.EngravingRules.DefaultColorCursor,alpha:.5,follow:!0}],void 0!==t.preferredSkyBottomLineBatchCalculatorBackend&&(this.rules.PreferredSkyBottomLineBatchCalculatorBackend=t.preferredSkyBottomLineBatchCalculatorBackend),void 0!==t.skyBottomLineBatchMinMeasures&&(this.rules.SkyBottomLineBatchMinMeasures=t.skyBottomLineBatchMinMeasures)}setColoringMode(t){if(t.coloringMode===S.ColoringModes.XML)return void(this.rules.ColoringMode=S.ColoringModes.XML);const e=[M.NoteEnum.C,M.NoteEnum.D,M.NoteEnum.E,M.NoteEnum.F,M.NoteEnum.G,M.NoteEnum.A,M.NoteEnum.B];let i;if(t.coloringMode===S.ColoringModes.CustomColorSet){if(!t.coloringSetCustom||8!==t.coloringSetCustom.length)throw new Error("Invalid amount of colors: With coloringModes.customColorSet, you have to provide a coloringSetCustom parameter (array) with 8 strings (C to B, rest note).");for(const e of t.coloringSetCustom)if(!/^\#[0-9a-fA-F]{6}$/.test(e))throw new Error("One of the color strings in options.coloringSetCustom was not a valid HTML Hex color:\n"+e);i=t.coloringSetCustom}else if(t.coloringMode===S.ColoringModes.AutoColoring){i=[];const t=Object.keys(x.AutoColorSet);for(let e=0;e{t.hide()})),this.sheet=void 0,this.graphic=void 0,this.zoom=1,this.rules.RenderCount=0}autoResize(){const t=this;this.handleResize((()=>{}),(()=>{var e;(null===(e=this.graphic)||void 0===e?void 0:e.GetCalculator)instanceof r.VexFlowMusicSheetCalculator&&(this.graphic.GetCalculator.beamsNeedUpdate=!0),t.IsReadyToRender()&&t.render()}))}handleResize(t,e){let i,s;const n=this;function r(){n.AutoResizeEnabled&&(i=(new Date).getTime(),s||(t(),i=(new Date).getTime(),s=window.setTimeout(o,200)))}function o(){s=void 0,window.clearTimeout(s),(new Date).getTime()-i<200?s=window.setTimeout(o,200):e()}window.attachEvent?window.attachEvent("onresize",r):window.addEventListener("resize",r),this.disposeResizeListener=()=>{window.detachEvent?window.detachEvent("onresize",r):window.removeEventListener("resize",r),this.resizeHandlerAttached=!1},this.resizeHandlerAttached=!0,window.setTimeout(t,0),window.setTimeout(e,1)}enableOrDisableCursors(t){var e,i,s,n,r,o,a,l,h;if(this.drawingParameters.drawCursors=t,t){for(let t=0;t{t.hide()}))}createBackend(t,e){let i;return i=void 0===t||t===y.BackendType.SVG?new u.SvgVexFlowBackend(this.rules):new c.CanvasVexFlowBackend(this.rules),i.graphicalMusicPage=e,i.initialize(this.container,this.zoom),i}static StringToPageFormat(t){let e=v.PageFormat.UndefinedPageFormat;if(t.match("^[0-9]+x[0-9]+$")){const i=t.split("x"),s=Number.parseInt(i[0],10),n=Number.parseInt(i[1],10);s>0&&s<32768&&n>0&&n<32768&&(e=new v.PageFormat(s,n,`customPageFormat${t}`))}return t=(t=(t=t.replace(" ","_")).replace("Landscape","L")).replace("Portrait","P"),L.PageFormatStandards.hasOwnProperty(t)?(e=L.PageFormatStandards[t],e):e}setPageFormat(t){const e=L.StringToPageFormat(t);this.needBackendUpdate=!e.Equals(this.rules.PageFormat),this.rules.PageFormat=e}setCustomPageFormat(t,e){if(t>0&&e>0){const i=new v.PageFormat(t,e);this.rules.PageFormat=i}}set DrawSkyLine(t){this.drawSkyLine=t,this.drawer&&(this.drawer.skyLineVisible=t)}get DrawSkyLine(){return this.drawer.skyLineVisible}set DrawBottomLine(t){this.drawBottomLine=t,this.drawer&&(this.drawer.bottomLineVisible=t)}get DrawBottomLine(){return this.drawer.bottomLineVisible}set DrawBoundingBox(t){this.setDrawBoundingBox(t,!0)}get DrawBoundingBox(){return this.drawBoundingBox}setDrawBoundingBox(t,e=!1){this.drawBoundingBox=t,this.drawer&&(this.drawer.drawableBoundingBoxElement=t),e&&this.render()}get AutoResizeEnabled(){return this.autoResizeEnabled}set AutoResizeEnabled(t){this.autoResizeEnabled=t}get Zoom(){return this.zoom}set Zoom(t){var e;this.zoom=t,this.zoomUpdated=!0,(null===(e=this.graphic)||void 0===e?void 0:e.GetCalculator)instanceof r.VexFlowMusicSheetCalculator&&(this.graphic.GetCalculator.beamsNeedUpdate=this.zoomUpdated)}set FollowCursor(t){this.followCursor=t}get FollowCursor(){return this.followCursor}set TransposeCalculator(t){l.MusicSheetCalculator.transposeCalculator=t}get TransposeCalculator(){return l.MusicSheetCalculator.transposeCalculator}get Sheet(){return this.sheet}get Drawer(){return this.drawer}get GraphicSheet(){return this.graphic}get DrawingParameters(){return this.drawingParameters}get EngravingRules(){return this.rules}get InteractionManager(){return this.interactionManager}get Version(){return this.version}}e.OpenSheetMusicDisplay=L,L.PageFormatStandards={A3_L:new v.PageFormat(420,297,"A3_L"),A3_P:new v.PageFormat(297,420,"A3_P"),A4_L:new v.PageFormat(297,210,"A4_L"),A4_P:new v.PageFormat(210,297,"A4_P"),A5_L:new v.PageFormat(210,148,"A5_L"),A5_P:new v.PageFormat(148,210,"A5_P"),A6_L:new v.PageFormat(148,105,"A6_L"),A6_P:new v.PageFormat(105,148,"A6_P"),Endless:v.PageFormat.UndefinedPageFormat,Letter_L:new v.PageFormat(279.4,215.9,"Letter_L"),Letter_P:new v.PageFormat(215.9,279.4,"Letter_P")}},2861:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(3495),e),n(i(530),e),n(i(41),e),n(i(9629),e)},419:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&s(e,t,i);return n(e,t),e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BasicAudioPlayer=void 0;const a=i(289),l=r(i(8346)),h=o(i(722));e.BasicAudioPlayer=class{constructor(){this.ac=new AudioContext,this.channelVolumes=[],this.memoryLoadedSoundFonts=new Map,this.channelToSoundFont=new Map,this.SoundfontInstrumentOptions={from:void 0,nameToUrl:void 0},this.GainMultiplier=1,this.SoundfontInstrumentOptions.nameToUrl=this.nameToSoundfontUrl}async open(t,e=16){void 0===this.piano&&(this.piano=await l.instrument(this.ac,h.default[a.MidiInstrument.Acoustic_Grand_Piano].toLowerCase(),this.SoundfontInstrumentOptions));for(let t=0;t=128)return;const n=Math.min(1,this.channelVolumes[t]*i);this.memoryLoadedSoundFonts.get(this.channelToSoundFont.get(t)).schedule(0,[{note:e,duration:s/1e3,gain:n*this.GainMultiplier}])}stopSound(t,e){}async setSound(t,e){void 0===this.memoryLoadedSoundFonts.get(e)&&await this.loadSoundFont(e),this.channelToSoundFont.set(t,e)}async loadSoundFont(t){if(void 0!==this.memoryLoadedSoundFonts.get(t))return this.memoryLoadedSoundFonts.get(t);let e=h.default[t].toLowerCase();t===a.MidiInstrument.Percussion&&(e="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/percussion-mp3.js");const i=await l.instrument(this.ac,e,this.SoundfontInstrumentOptions);return this.memoryLoadedSoundFonts.set(t,i),i}nameToSoundfontUrl(t,e,i){let s="https://gleitz.github.io/midi-js-soundfonts/"+(e="FluidR3_GM"===e?e:"MusyngKite")+"/"+t+"-"+(i="ogg"===i?i:"mp3")+".js";const n={"honky_tonk_piano-mp3.js":"honkytonk_piano-mp3.js","synth_voice-mp3.js":"synth_choir-mp3.js","lead_8_bass_lead-mp3.js":"lead_8_bass__lead-mp3.js"};for(const t of Object.keys(n))s=s.replace(t,n[t]);return s}setVolume(t,e){this.channelVolumes[t]=e}setSoundFontFilePath(t,e){}playbackHasStopped(){}getMemoryLoadedSoundFonts(){return[...this.memoryLoadedSoundFonts.values()]}}},3575:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetronomeInstrument=void 0,e.MetronomeInstrument=class{constructor(t,e,i,s,n,r){this.id=t,this.name=e,this.visible=i,this.audible=s,this.Volume=n,this.MidiInstrumentId=r}get PreCountVolume(){return this.preCountVolume>=0?this.preCountVolume:this.Volume}set PreCountVolume(t){this.preCountVolume=t}get Audible(){return this.audible}set Audible(t){this.audible=t}get Visible(){return this.visible}set Visible(t){this.visible=t}get Mute(){return!this.Audible}set Mute(t){this.Audible=!t}get Name(){return this.name}setVoiceAudible(t,e){throw new Error("Method not implemented.")}setStaffAudible(t,e){throw new Error("Method not implemented.")}setVoiceFollowing(t,e){throw new Error("Method not implemented.")}setStaffFollow(t,e){throw new Error("Method not implemented.")}setVoicePitchMonitor(t,e){throw new Error("Method not implemented.")}setStaffPitchMonitor(t,e){throw new Error("Method not implemented.")}setInstrumentParameter(t,e){throw new Error("Method not implemented.")}get Id(){return this.id}}},936:function(t,e,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PlaybackManager=e.ChannelNote=void 0;const n=i(4257),r=i(9822),o=i(1649),a=i(6550),l=i(8918),h=i(3575),u=i(8151),c=i(9986),d=i(4761),p=i(8084),f=s(i(2043)),m=i(2406);class g{constructor(t,e,i=void 0){this.note=i,this.key=t,this.channel=e}}e.ChannelNote=g,e.PlaybackManager=class{constructor(t,e,i,s){this.overrideBPM=void 0,this.listeners=[],this.percussionChannel=10,this.metronomeChannel=9,this.instrumentToStaffToMidiChannelDict=new o.Dictionary,this.instrumentIdMapping=new o.Dictionary,this.freeMidiChannels=[],this.notesToStop=new o.Dictionary,this.metronomeNote=new g(88,this.metronomeChannel),this.metronomeNoteFirstBeat=new g(64,this.metronomeChannel),this.currentMeasure=void 0,this.currentTimestamp=void 0,this.closestNextTimestamp=void 0,this.currentMetronomeBaseTimestamp=void 0,this.currentBeatDuration=void 0,this.currentIteratorSourceTimeStamp=void 0,this.beatCounter=0,this.runningState=m.PlaybackState.Stopped,this.isRunning=!1,this.isInitialized=!1,this.isPlaying=!1,this.metronomeSoundPlayed=!1,this.DummySoundPlayed=!1,this.StopAtUnrenderedMeasures=!0,this.tempoImpactFactor=1,this.defaultVolume=.8,this.currentVolume=this.defaultVolume,this.dynamicImpactFactor=.6,this.scorePositionChangedData=new u.CursorPosChangedData,this.tooManyInstruments=!1,this.metronomeOnlyBPM=100,this.highlightPlayedNotes=!1,this.MoveCursorDuringPrecount=!0,this.doPreCount=!0,this.IgnoreFixedInstrumentKeysForPercussion=!0,this.SoloAttenuationValue=0;const n=c.TextTranslation.translateText("Playback/LabelMetronome","Metronome");this.metronome=new h.MetronomeInstrument(-1,n,!1,!0,0,a.MidiInstrument.Percussion),this.timingSource=t,this.audioMetronomePlayer=e,this.audioPlayer=i,this.messageViewer=s}addListener(t){this.listeners.includes(t)||this.listeners.push(t)}removeListener(t){const e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}get CursorIterator(){return this.cursorIterator}get InstrumentIdMapping(){return this.instrumentIdMapping}get RunningState(){return this.runningState}set RunningState(t){this.runningState=t}get DoPreCount(){return this.doPreCount}set DoPreCount(t){this.doPreCount!==t&&(this.doPreCount=t)}get Metronome(){return this.metronome}get MetronomeOnlyBPM(){return this.metronomeOnlyBPM}set MetronomeOnlyBPM(t){this.metronomeOnlyBPM=t}get OriginalBpm(){return this.currentReferenceBPM}playDummySound(){const t=this.audioPlayer.ac,e=t.createBuffer(1,1,22050),i=t.createBufferSource();i.buffer=e,i.connect(t.destination),i.start?i.start(0):i.noteOn(0),this.DummySoundPlayed=!0}playVoiceEntry(t){const e=t;if(void 0!==e){if(this.stopAllCurrentlyPlayingNotes(),this.highlightPlayedNotes){const t=[];for(const i of e.Notes)i.state=d.NoteState.Selected,t.push(i)}const t=this.instrumentToStaffToMidiChannelDict.getValue(e.Notes[0].ParentStaff),i=e.ParentVoice.Parent,s=i.MidiInstrumentId===a.MidiInstrument.Percussion,n=.8,r=[],o=this.musicPartManager.MusicSheet.Transpose,l=e.ParentVoice.Parent.PlaybackTranspose;for(const a of e.MainPlaybackEntry.Notes.filter((t=>0!==t.MidiKey))){let e=a.MidiKey;if(s||(e+=l+o),void 0!==a.ParentNote.PlaybackInstrumentId){const t=i.getSubInstrument(a.ParentNote.PlaybackInstrumentId);void 0!==t&&t.fixedKey>=0&&(e=t.fixedKey)}try{void 0!==this.audioPlayer&&this.audioPlayer.playSound(t,e,n,500)}catch(t){f.default.info("PlaybackManager.playVoiceEntry: ",t)}r.push(new g(e,t,a))}}}initialize(t){if(this.isInitialized&&(this.stopAllCurrentlyPlayingNotes(),void 0!==this.audioPlayer&&this.audioPlayer.close(),this.cursorIterator=void 0,this.playbackIterator=void 0),this.isInitialized=!1,this.musicPartManager=t,void 0!==this.musicPartManager){const t=this.musicPartManager.MusicSheet;if(this.cursorIterator=this.musicPartManager.getIterator(),this.playbackIterator=new r.PlaybackIterator(t),void 0!==this.audioPlayer){const e=Array.from(new Set(t.Instruments.map((t=>t.MidiInstrumentId))));this.audioPlayer.open(e,16),this.audioPlayer.setSound(this.percussionChannel,a.MidiInstrument.Percussion),this.audioPlayer.setSound(this.metronomeChannel,a.MidiInstrument.Woodblock)}this.currentReferenceBPM=this.sheetStartBPM=t.getExpressionsStartTempoInBPM(),this.tempoUserFactor=t.userStartTempoInBPM/this.sheetStartBPM;let e=0;this.tooManyInstruments=!1,this.instrumentToStaffToMidiChannelDict.clear(),this.instrumentIdMapping.clear();for(let t=0;ta.MidiInstrument.Percussion)return!1;try{const i=e===a.MidiInstrument.Percussion;if(-1===t)void 0===this.audioPlayer||i||this.audioPlayer.setSound(0,e);else{let s=!1;const n=this.musicPartManager.MusicSheet;let r;r=-2===t?n.Instruments.find((e=>e.Id===t)):n.Instruments[t],this.instrumentIdMapping.setValue(r.Id,r);for(const t of r.Staves){let n=this.instrumentToStaffToMidiChannelDict.getValue(t);const r=n===this.percussionChannel;if(i){const t=n;n=this.percussionChannel,t>0&&!r&&(this.freeMidiChannels.push(t),this.freeMidiChannels.sort(((t,e)=>t-e)))}else(n<0||r)&&(this.freeMidiChannels.length>0?(n=this.freeMidiChannels[0],this.freeMidiChannels.shift()):(this.tooManyInstruments=!0,n=15,this.instrumentToStaffToMidiChannelDict.setValue(t,n),s=!0));this.instrumentToStaffToMidiChannelDict.setValue(t,n),void 0===this.audioPlayer||i||this.audioPlayer.setSound(n,e)}if(s)return!1}return!0}catch(t){return f.default.info("PlaybackManager.setSound: ",t),!1}}setBpm(t){this.tempoUserFactor=t/this.sheetStartBPM,this.setTempo()}handlePlaybackEvent(){var t,e;const i=this.resetRequested;this.resetRequested=!1;let s=i,n=!1;if(i){const t=this.DoPreCount;this.doReset(t)}if(void 0===this.musicPartManager)return;this.currentTimestamp=this.timingSource.getCurrentTimestamp(),n=this.cursorIterator.EndReached;const r=this.cursorIterator.CurrentMeasure;if(this.StopAtUnrenderedMeasures&&r&&!r.WasRendered&&!r.isReducedToMultiRest&&(n=!0),this.stopFinishedNotes(),this.processTempoInstructions(),this.RunningState===m.PlaybackState.Running){const i=this.currentTimestamp.gte(this.cursorIterator.CurrentEnrolledTimestamp)&&!n;if(i){if(this.isPreCounting=!1,this.currentMeasure!==this.cursorIterator.CurrentMeasure&&void 0!==this.cursorIterator.CurrentMeasure){this.currentMeasure=this.cursorIterator.CurrentMeasure,this.startRhythmBeats=this.currentMeasure.ActiveTimeSignature.Numerator,this.startRhythmDenominator=this.currentMeasure.ActiveTimeSignature.Denominator;const t=this.cursorIterator.CurrentRelativeInMeasureTimestamp;this.currentMetronomeBaseTimestamp=l.Fraction.minus(this.cursorIterator.CurrentEnrolledTimestamp,t),this.currentBeatDuration=new l.Fraction(1,this.currentMeasure.Duration.Denominator);const e=this.currentMeasure.TempoInBPM;e!==this.currentBPM&&e>0&&this.bpmChanged(e,!1);const i=new l.Fraction;for(this.beatCounter=0;i.lt(t);)i.Add(this.currentBeatDuration),this.beatCounter++;this.playNextMetronomeAt=l.Fraction.plus(this.currentMetronomeBaseTimestamp,new l.Fraction(this.beatCounter,this.currentMeasure.Duration.Denominator))}const t=this.cursorIterator.getCurrentDynamicChangingExpressions();for(const e of t){const t=this.musicPartManager.MusicSheet.getStaffFromIndex(e.staffNumber),i=this.instrumentToStaffToMidiChannelDict.getValue(t);let s=this.currentVolume;if(void 0!==e.parMultiExpression().StartingContinuousDynamic){const t=e.parMultiExpression().StartingContinuousDynamic.getInterpolatedDynamic(this.cursorIterator.CurrentSourceTimestamp);t>=0&&(s=this.calculateFinalVolume(t))}else s=this.calculateFinalVolume(e.parMultiExpression().InstantaneousDynamic.Volume);try{void 0!==this.audioPlayer&&this.audioPlayer.setVolume(i,s)}catch(t){f.default.info("PlaybackManager.handlePlaybackEvent: ",t)}}t.clear()}const r=this.playbackIterator.Update(this.currentTimestamp);if(r.length>0&&this.DoPlayback){const i=[];for(const s of r){if(this.StopAtUnrenderedMeasures&&!s.playbackEntry.ParentVoiceEntry.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure.WasRendered)continue;const n=s.playbackEntry,r=n.ParentVoiceEntry;if(0===n.Notes.length)continue;const o=r.ParentVoice.Parent,h=r.Notes[0].ParentStaff,u=d.MusicSheet.getIndexFromStaff(h);let c=this.instrumentToStaffToMidiChannelDict.getValue(h);const m=o.MidiInstrumentId===a.MidiInstrument.Percussion;m&&(c=this.percussionChannel);const b=this.cursorIterator.ActiveDynamicExpressions[u];if(b instanceof p.ContinuousDynamicExpression){const t=b.getInterpolatedDynamic(this.cursorIterator.CurrentSourceTimestamp);if(t>=0){const e=this.calculateFinalVolume(t);try{void 0!==this.audioPlayer&&this.audioPlayer.setVolume(c,e)}catch(t){f.default.info("PlaybackManager.handlePlaybackEvent: ",t)}}}let S=o.Volume*h.Volume*r.ParentVoice.Volume;const y=this.SoloActive&&!(o.Solo||r.ParentVoice.Solo||h.Solo);y&&(S*=this.SoloAttenuationValue);const v=void 0!==r.VolumeModifier;v&&(S*=1.3,S=Math.min(1,S));const E=this.musicPartManager.MusicSheet.Transpose,_=null!==(t=o.PlaybackTranspose)&&void 0!==t?t:0;for(const t of n.Notes.filter((t=>0!==t.MidiKey))){let n=t.MidiKey;if(m||(n+=_+E),void 0!==t.ParentNote.PlaybackInstrumentId){const i=o.getSubInstrument(t.ParentNote.PlaybackInstrumentId);void 0!==i&&(!(i.fixedKey>=0)||m&&this.IgnoreFixedInstrumentKeysForPercussion||(n=i.fixedKey)),S=(null!==(e=null==i?void 0:i.volume)&&void 0!==e?e:1)*h.Volume*r.ParentVoice.Volume,y&&(S*=this.SoloAttenuationValue),v&&(S*=1.3,S=Math.min(1,S))}let a,u=l.Fraction.createFromFraction(t.Length);void 0!==r.DurationModifier?(u=new l.Fraction(2*u.Numerator,3*u.Denominator),a=l.Fraction.plus(s.enrolledTimestamp,u)):a=l.Fraction.plus(s.enrolledTimestamp,u);try{void 0!==this.audioPlayer&&this.audioPlayer.playSound(c,n,S,this.timingSource.getDurationInMs(u))}catch(t){f.default.info("PlaybackManager.handlePlaybackEvent. Failed playing sound: ",t)}this.notesToStop.containsKey(a)||this.notesToStop.setValue(a,[]),this.notesToStop.getValue(a).push(new g(n,c,t)),this.highlightPlayedNotes&&(t.ParentNote.state=d.NoteState.Selected),i.push(t)}}this.NotesPlaybackEventOccurred(i)}if(i&&(this.currentIteratorSourceTimeStamp=this.cursorIterator.CurrentSourceTimestamp,this.currentMeasureIndex=this.cursorIterator.CurrentMeasureIndex,this.cursorIterator.moveToNext(),this.nextIteratorTimestamp=this.cursorIterator.CurrentEnrolledTimestamp,s=!0),this.stopMetronomeSound(),n&&this.currentTimestamp.gte(this.cursorIterator.CurrentEnrolledTimestamp)){for(const t of this.listeners)null==t||t.selectionEndReached(void 0);this.handleEndReached()}else{if(this.currentTimestamp.gte(this.playNextMetronomeAt)){s=!0;const t=this.beatCounter%this.startRhythmBeats==0;this.playMetronomeSound(t),this.beatCounter++}void 0!==this.currentMetronomeBaseTimestamp&&(this.playNextMetronomeAt=l.Fraction.plus(this.currentMetronomeBaseTimestamp,new l.Fraction(this.beatCounter,this.startRhythmDenominator))),this.calculateClosestNextTimestamp()}}else this.isPlaying=!1;r.Rules.RenderCount>0&&(s||n&&!this.loopTriggeredReset)&&this.updateScoreCursorPosition(i)}NotesPlaybackEventOccurred(t){for(const e of this.listeners)null==e||e.notesPlaybackEventOccurred(t)}calculateFinalVolume(t){return(t-this.defaultVolume)*this.dynamicImpactFactor+this.defaultVolume}loop(){try{if(this.isRunning=!0,this.isPlaying)try{if(this.isRunning&&this.isInitialized&&(this.handlePlaybackEvent(),void 0!==this.closestNextTimestamp)){const t=this.timingSource.getWaitingTimeForTimestampInMs(this.closestNextTimestamp);window.setTimeout((()=>{this.loop()}),Math.max(0,t))}}catch(t){this.pause(),this.reset();const e=c.TextTranslation.translateText("MidiPlaybackError","An error occurred at the Midi Playback.");f.default.info("PlaybackManager.loop: "+e+" ",t),void 0!==this.messageViewer&&void 0!==this.messageViewer.MessageOccurred&&this.messageViewer.MessageOccurred(m.MessageBoxType.Error,e)}}catch(t){const e=c.TextTranslation.translateText("MidiPlaybackLoopError","An error occurred at the Midi Playback. Please restart the program in order for the Playback to be availiable again.");f.default.info("PlaybackManager.loop: "+e+" ",t),void 0!==this.messageViewer&&void 0!==this.messageViewer.MessageOccurred&&this.messageViewer.MessageOccurred(m.MessageBoxType.Error,e)}this.isRunning=!1}stopAllCurrentlyPlayingNotes(){try{if(void 0!==this.audioPlayer){this.audioPlayer.stopSound(this.metronomeNoteFirstBeat.channel,this.metronomeNoteFirstBeat.key),this.audioPlayer.stopSound(this.metronomeNote.channel,this.metronomeNote.key);for(const t of this.notesToStop.values())for(const e of t)this.audioPlayer.stopSound(e.channel,e.key)}const t=[];for(const e of this.notesToStop.values())for(const i of e)i.note.ParentNote.state=d.NoteState.Normal,t.push(i.note.ParentNote);this.highlightPlayedNotes,this.notesToStop.clear()}catch(t){f.default.info("PlaybackManager.stoppAllCurrentlyPlayingNotes: ",t)}}doReset(t,e=1){if(this.nextIteratorTimestamp=void 0,this.playNextMetronomeAt=void 0,this.closestNextTimestamp=void 0,this.currentMeasure=void 0,this.beatCounter=0,this.fermataActive=!1,this.stopAllCurrentlyPlayingNotes(),void 0!==this.musicPartManager&&(this.cursorIterator=this.musicPartManager.getIterator()),void 0===this.cursorIterator)return;this.playbackIterator.Reset(),this.currentIteratorSourceTimeStamp=this.cursorIterator.CurrentSourceTimestamp,this.nextIteratorTimestamp=this.cursorIterator.CurrentEnrolledTimestamp,this.currentMeasure=this.cursorIterator.CurrentMeasure,this.currentMeasureIndex=this.cursorIterator.CurrentMeasureIndex,this.startRhythmBeats=this.cursorIterator.currentPlaybackSettings().Rhythm.Numerator,this.startRhythmDenominator=this.cursorIterator.currentPlaybackSettings().Rhythm.Denominator;let i=new l.Fraction;if(t){this.isPreCounting=!0;const t=new l.Fraction(this.startRhythmBeats*e,this.startRhythmDenominator),s=this.musicPartManager.MusicSheet.SourceMeasures[this.currentMeasureIndex].Duration,n=s.Numerator+s.WholeValue*s.Denominator,r=new l.Fraction(n*e,s.Denominator),o=l.Fraction.plus(this.musicPartManager.MusicSheet.SourceMeasures[this.currentMeasureIndex].AbsoluteTimestamp,r).Sub(this.currentIteratorSourceTimeStamp);if(i=t,t.gte(o)){const e=l.Fraction.minus(t,o);e.RealValue/t.RealValue<.5?i.Add(e):i=e}}this.currentMetronomeBaseTimestamp=this.playNextMetronomeAt=l.Fraction.minus(this.cursorIterator.CurrentEnrolledTimestamp,i),this.timingSource.setTimeAndBpm(this.currentMetronomeBaseTimestamp,this.cursorIterator.currentPlaybackSettings().BeatsPerMinute),this.calculateClosestNextTimestamp()}calculateClosestNextTimestamp(){const t=[];this.notesToStop.size()>0&&t.push(this.notesToStop.keys().reduce(((t,e)=>t.lt(e)?t:e))),void 0!==this.playbackIterator.NextEntryTimestamp&&t.push(this.playbackIterator.NextEntryTimestamp),void 0!==this.nextIteratorTimestamp&&t.push(this.nextIteratorTimestamp),void 0!==this.playNextMetronomeAt&&t.push(this.playNextMetronomeAt),t.length>0?this.closestNextTimestamp=t.reduce(((t,e)=>t.lt(e)?t:e)):this.closestNextTimestamp=void 0}handleEndReached(){this.pause()}updateScoreCursorPosition(t){if(!this.isPreCounting||this.MoveCursorDuringPrecount){this.scorePositionChangedData.CurrentMeasureIndex=this.currentMeasureIndex,this.scorePositionChangedData.CurrentRepetition=this.currentRepetition,this.scorePositionChangedData.PredictedPosition=this.currentTimestamp,this.scorePositionChangedData.CurrentBpm=this.musicPartManager.MusicSheet.SheetPlaybackSetting.BeatsPerMinute,this.scorePositionChangedData.ResetOccurred=t;for(const t of this.listeners)null==t||t.cursorPositionChanged(this.currentIteratorSourceTimeStamp,this.scorePositionChangedData)}}stopMetronomeSound(){this.metronomeSoundPlayed&&(void 0!==this.audioPlayer&&(this.audioPlayer.stopSound(this.metronomeNoteFirstBeat.channel,this.metronomeNoteFirstBeat.key),this.audioPlayer.stopSound(this.metronomeNote.channel,this.metronomeNote.key)),this.metronomeSoundPlayed=!1)}playMetronomeSound(t){if(this.metronome.Audible||this.metronome.Solo||this.isPreCounting){let e=this.isPreCounting?this.metronome.PreCountVolume:this.metronome.Volume;if(this.isPreCounting||!this.SoloActive||this.metronome.Solo||(e*=this.SoloAttenuationValue),e>0){if(t)try{void 0!==this.audioPlayer&&this.audioPlayer.playSound(this.metronomeNoteFirstBeat.channel,this.metronomeNoteFirstBeat.key,e,1e3),void 0!==this.audioMetronomePlayer&&this.audioMetronomePlayer.playFirstBeatSample(e)}catch(t){f.default.info("PlaybackManager.playMetronomeSound: ",t)}else try{void 0!==this.audioPlayer&&this.audioPlayer.playSound(this.metronomeNote.channel,this.metronomeNote.key,e,1e3),void 0!==this.audioMetronomePlayer&&this.audioMetronomePlayer.playBeatSample(e)}catch(t){f.default.info("PlaybackManager.playMetronomeSound: ",t)}this.metronomeSoundPlayed=!0}}}stopFinishedNotes(){let t;t=void 0!==this.currentTimestamp?this.notesToStop.keys().filter((t=>t.lte(this.currentTimestamp))):this.notesToStop.keys();for(const e of t){const t=this.notesToStop.getValue(e);if(void 0!==this.audioPlayer)for(const e of t)this.audioPlayer.stopSound(e.channel,e.key);const i=[];for(const e of t)e.note.ParentNote.state=d.NoteState.Normal,i.push(e.note.ParentNote);this.highlightPlayedNotes,this.notesToStop.remove(e)}}processTempoInstructions(){Math.abs(this.currentReferenceBPM-this.cursorIterator.CurrentBpm)>.001&&this.changeTempo(this.cursorIterator.CurrentBpm),this.handleFermata()}handleFermata(){let t=!1;if(!this.cursorIterator.EndReached&&this.currentTimestamp.gte(this.cursorIterator.CurrentEnrolledTimestamp))for(const e of this.cursorIterator.CurrentVoiceEntries)t=void 0!==e.Fermata;t?this.fermataActive||(this.fermataActive=!0,this.changeTempo(this.cursorIterator.CurrentBpm/3)):this.fermataActive&&(this.fermataActive=!1,this.changeTempo(this.cursorIterator.CurrentBpm))}bpmChanged(t,e){var i,s;t>0?(e&&(null===(s=null===(i=this.musicPartManager)||void 0===i?void 0:i.MusicSheet.SourceMeasures)||void 0===s?void 0:s.length)>0&&(this.overrideBPM=t,this.musicPartManager.MusicSheet.SourceMeasures.forEach((e=>{e.TempoInBPM=t}))),this.currentBPM=t,this.timingSource.setBpm(t)):f.default.info("invalid bpm set: "+t+". Ignoring.")}volumeChanged(t,e){this.currentVolume=e/100,-1===t?this.metronome.Volume=this.currentVolume:this.instrumentIdMapping.getValue(t).Volume=this.currentVolume}volumeMute(t){-1===t?this.metronome.Mute=!0:this.instrumentIdMapping.getValue(t).Audible=!1}volumeUnmute(t){-1===t?this.metronome.Mute=!1:this.instrumentIdMapping.getValue(t).Audible=!0}changeTempo(t){f.default.debug("PlaybackManager.changeTempo",`current tempo in BPM: ${t}`),t>0&&(this.currentReferenceBPM=t,this.setTempo())}setTempo(){this.currentBPM=this.tempoUserFactor*this.getCurrentReferenceBPM(),this.timingSource.setBpm(this.currentBPM)}getCurrentReferenceBPM(){return(this.currentReferenceBPM-this.sheetStartBPM)*this.tempoImpactFactor+this.sheetStartBPM}checkForSoloDeactivated(){if(void 0===this.musicPartManager.MusicSheet)return void(this.SoloActive=!1);let t=!1;for(const e of this.musicPartManager.MusicSheet.Instruments){for(const i of e.Staves)t=t||i.Solo;for(const i of e.Voices)t=t||i.Solo}t=t||this.Metronome.Solo,t||(this.SoloActive=!1)}getSheetDurationInMs(t=!0){if(t)return this.getSheetDurationInMsWithRepeats();let e=0;for(const t of this.musicPartManager.MusicSheet.SourceMeasures){let i=t.TempoInBPM;0===i&&(i=this.sheetStartBPM);const s=6e4/i;e+=t.Duration.RealValue*s/.25}return e}getSheetDurationInMsWithRepeats(){let t=0;const e=new n.MusicPartManagerIterator(this.musicPartManager.MusicSheet);let i=0;for(;!e.EndReached;){const s=e.CurrentMeasure;let n=s.TempoInBPM;0===n&&(n=this.sheetStartBPM);const r=6e4/n;for(t+=s.Duration.RealValue*r/.25;!e.EndReached&&(e.moveToNext(),e.CurrentMeasure===s&&!e.backJumpOccurred);)if(i++,i>=1e7)return f.default.error("getSheetDuration: hit maximum loop limit"),t}return t}getSheetDurationInMsEvenBpm(){return this.timingSource.getDurationInMs(this.musicPartManager.MusicSheet.SheetEndTimestamp)}}},2011:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTimingSource=void 0;const s=i(8918);e.AbstractTimingSource=class{constructor(){this.anchorTimestamp=new s.Fraction}setBpm(t){this.anchorTimestamp=s.Fraction.createFromFraction(this.getCurrentTimestamp()),void 0!==this.Settings&&(this.Settings.BeatsPerMinute=t),this.reset()}setTimeAndBpm(t,e){this.anchorTimestamp=s.Fraction.createFromFraction(t),void 0!==this.Settings&&e&&(this.Settings.BeatsPerMinute=e),this.reset()}getCurrentTimestamp(){const t=this.getCurrentTimeInMs(),e=this.getDuration(t);return s.Fraction.plus(e,this.anchorTimestamp)}getWaitingTimeForTimestampInMs(t){const e=this.getCurrentTimestamp(),i=s.Fraction.minus(t,e);return this.getDurationInMs(i)}getDurationInMs(t){return Math.round(this.Settings.getDurationInMilliseconds(t))}getDuration(t){return void 0===this.Settings?new s.Fraction:this.Settings.getDurationAsNoteDuration(t)}getCurrentTimeInMs(){throw new Error("not implemented")}getTimestampForTimeInMs(t){throw new Error("not implemented")}start(){throw new Error("not implemented")}pause(){throw new Error("not implemented")}reset(){throw new Error("not implemented")}getCurrentAudioDelayRevisedTimestamp(){throw new Error("not implemented")}}},5141:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinearTimingSource=void 0;const s=i(2011),n=i(8918);class r extends s.AbstractTimingSource{constructor(){super(),this.audioContext=new AudioContext,this.audioInputDelay=320,this.lastResetTime=0,this.logEnabled=!0,this.audioContext.suspend(),this.lastResetTime=this.audioContext.currentTime}getCurrentTimeInMs(){return 1e3*(this.audioContext.currentTime-this.lastResetTime)}getCurrentAudioDelayRevisedTimestamp(){return n.Fraction.plus(this.getDuration(this.getCurrentTimeInMs()-this.audioInputDelay),this.anchorTimestamp)}getTimestampForTimeInMs(t){const e=this.getCurrentTimeInMs()-t,i=this.getCurrentTimestamp(),s=this.Settings.getDurationAsNoteDuration(e);return n.Fraction.minus(i,s)}start(){return this.logEnabled&&console.log("Start linear timing source"),this.audioContext.resume()}pause(){return this.logEnabled&&console.log("Pause linear timing source"),this.audioContext.suspend()}reset(){this.logEnabled&&console.log("Reset linear timing source"),this.lastResetTime=this.audioContext.currentTime}}e.LinearTimingSource=r},8731:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ControlPanel=void 0;const s=i(7181),n=i(5088),r=i(7474),o=i(1649);class a extends s.AUIController{constructor(){super(...arguments),this.bpmValue=80,this.volumeSliders=new o.Dictionary,this.volumeSliderElements=new o.Dictionary}volumeMute(t){throw new Error("Method not implemented.")}volumeUnmute(t){throw new Error("Method not implemented.")}bpmChanged(t){this.bpmValue=t,this.bpmSlider&&(this.bpmSlider.value=this.bpmValue)}volumeChanged(t,e){throw new Error("Method not implemented.")}play(){throw new Error("Method not implemented.")}pause(){throw new Error("Method not implemented.")}reset(){throw new Error("Method not implemented.")}get IsClosed(){return this.controlPanelElement.classList.contains("hide")}clearVolumeTracks(){for(const t of this.volumeSliders.values())t.destroy();this.volumeSliders.clear();for(const t of this.volumeSliderElements.values())t.parentElement.remove();this.volumeSliderElements.clear()}addVolumeTrack(t,e,i=80){const s=this.generateHtmlTemplate("",{name:t,id:e.toString()});this.volumeToolbarElement.insertAdjacentHTML("beforeend",s);const o=this.volumeToolbarElement.lastChild,a=o.getElementsByClassName("volume-slider")[0],l=o.getElementsByClassName("mute-button")[0],h=new r.MDCIconButtonToggle(l);h.initialize(),this.volumeSliderElements.setValue(e,a);const u=new n.MDCSlider(a);u.value=i,u.initialize();const c=this;h.listen("MDCIconButtonToggle:change",(function(t){t.preventDefault();for(const i of c.eventListeners)t.detail.isOn?i.volumeMute(e):(i.volumeUnmute(e),l.classList.remove("mdc-ripple-upgraded--background-focused"))})),h.on=!1,u.listen("MDCSlider:input",(()=>{for(const t of c.eventListeners)t.volumeChanged(e,u.value)})),this.volumeSliders.setValue(e,u)}initialize(){}hideAndClear(){this.controlPanelElement.classList.add("hide")}show(){var t;this.controlPanelElement.classList.remove("hide");const e=this;if(this.metronomeToolbarElement.classList.contains("hide"))for(const t of e.volumeSliders.keys()){let i=e.volumeSliders.getValue(t);i.destroy(),i=new n.MDCSlider(e.volumeSliderElements.getValue(t)),i.initialize(),i.listen("MDCSlider:input",(()=>{for(const s of e.eventListeners)s.volumeChanged(t,i.value)}))}else null===(t=this.bpmSlider)||void 0===t||t.destroy(),this.bpmSlider=new n.MDCSlider(this.controlPanelElement.getElementsByClassName("metronome-slider")[0]),this.bpmSlider.initialize(),this.bpmSlider.value=this.bpmValue,this.bpmSlider.listen("MDCSlider:input",(()=>{this.bpmValue=e.bpmSlider.value;for(const t of e.eventListeners)t.bpmChanged(e.bpmSlider.value)}))}}e.ControlPanel=a},293:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(936),e),n(i(419),e),n(i(5141),e),n(i(8731),e)},722:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["Acoustic_Grand_Piano","Bright_Acoustic_Piano","Electric_Grand_Piano","Honky_tonk_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_Voice","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"]},8265:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransposeCalculator=void 0;const s=i(8918);class n{transposePitch(t,e,i){let r=s.NoteEnum.C,o=0,a=s.AccidentalEnum.NONE;const l=s.Pitch.CalculateTransposedHalfTone(t,i);let h=l.halftone,u=l.overflow;for(let e=0;eh)break}for(let i=0;ih){let l=i;const c=s.Pitch.HalfTonesFromAccidental(t.Accidental);for((c>0||0===c&&e.Key>=0)&&l--;l<0;)l+=7,h+=12,u--;for(;l>=7;)l-=7,h-=12,u++;r=n.noteEnums[l],a=s.Pitch.AccidentalFromHalfTones(h-r),o=t.Octave+u;break}return new s.Pitch(r,o,a)}transposeKey(t,e){let i=0,s=0;for(;i=12;)r-=12;for(;r<0;)r+=12;t.Key=n.keyMapping[r],t.isTransposedBy=e}}e.TransposeCalculator=n,n.keyMapping=[0,-5,2,-3,4,-1,6,1,-4,3,-2,5],n.noteEnums=[s.NoteEnum.C,s.NoteEnum.D,s.NoteEnum.E,s.NoteEnum.F,s.NoteEnum.G,s.NoteEnum.A,s.NoteEnum.B]},5742:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(8265),e)},8447:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(e,i);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,n)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),n=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(i(5742),e)},2337:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionUtil=void 0,Array.prototype.last||Object.defineProperty(Array.prototype,"last",{enumerable:!1,writable:!0,value:function(){return this[this.length-1]}}),Array.prototype.clear||Object.defineProperty(Array.prototype,"clear",{enumerable:!1,writable:!0,value:function(){this.length=0}}),Array.prototype.contains||Object.defineProperty(Array.prototype,"contains",{enumerable:!1,writable:!0,value:function(t){return-1!==this.indexOf(t)}}),e.CollectionUtil=class{static contains2(t,e){for(let i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PSMath=void 0;class i{static log(t,e){return Math.log(e)/Math.log(t)}static log10(t){return i.log(10,t)}static meanSimple(t){let e=0;for(let i=0;i{"use strict";i.d(e,{ZT:()=>n,fl:()=>a,pi:()=>r});var s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},s(t,e)};function n(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var r=function(){return r=Object.assign||function(t){for(var e,i=1,s=arguments.length;i0)&&!(s=r.next()).done;)o.push(s.value)}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return o}function a(){for(var t=[],e=0;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=i(278),r=function(){function t(t){this.root=null,this.compare=t||s.defaultCompare,this.nElements=0}return t.prototype.add=function(t){return!s.isUndefined(t)&&null!==this.insertNode(this.createNode(t))&&(this.nElements++,!0)},t.prototype.clear=function(){this.root=null,this.nElements=0},t.prototype.isEmpty=function(){return 0===this.nElements},t.prototype.size=function(){return this.nElements},t.prototype.contains=function(t){return!s.isUndefined(t)&&null!==this.searchNode(this.root,t)},t.prototype.search=function(t){var e=this.searchNode(this.root,t);if(null!==e)return e.element},t.prototype.remove=function(t){var e=this.searchNode(this.root,t);return null!==e&&(this.removeNode(e),this.nElements--,!0)},t.prototype.inorderTraversal=function(t){this.inorderTraversalAux(this.root,t,{stop:!1})},t.prototype.preorderTraversal=function(t){this.preorderTraversalAux(this.root,t,{stop:!1})},t.prototype.postorderTraversal=function(t){this.postorderTraversalAux(this.root,t,{stop:!1})},t.prototype.levelTraversal=function(t){this.levelTraversalAux(this.root,t)},t.prototype.minimum=function(){if(!this.isEmpty()&&null!==this.root)return this.minimumAux(this.root).element},t.prototype.maximum=function(){if(!this.isEmpty()&&null!==this.root)return this.maximumAux(this.root).element},t.prototype.forEach=function(t){this.inorderTraversal(t)},t.prototype.toArray=function(){var t=[];return this.inorderTraversal((function(e){return t.push(e),!0})),t},t.prototype.height=function(){return this.heightAux(this.root)},t.prototype.searchNode=function(t,e){for(var i=1;null!==t&&0!==i;)(i=this.compare(e,t.element))<0?t=t.leftCh:i>0&&(t=t.rightCh);return t},t.prototype.transplant=function(t,e){null===t.parent?this.root=e:t===t.parent.leftCh?t.parent.leftCh=e:t.parent.rightCh=e,null!==e&&(e.parent=t.parent)},t.prototype.removeNode=function(t){if(null===t.leftCh)this.transplant(t,t.rightCh);else if(null===t.rightCh)this.transplant(t,t.leftCh);else{var e=this.minimumAux(t.rightCh);e.parent!==t&&(this.transplant(e,e.rightCh),e.rightCh=t.rightCh,e.rightCh.parent=e),this.transplant(t,e),e.leftCh=t.leftCh,e.leftCh.parent=e}},t.prototype.inorderTraversalAux=function(t,e,i){null===t||i.stop||(this.inorderTraversalAux(t.leftCh,e,i),i.stop||(i.stop=!1===e(t.element),i.stop||this.inorderTraversalAux(t.rightCh,e,i)))},t.prototype.levelTraversalAux=function(t,e){var i=new n.default;for(null!==t&&i.enqueue(t),t=i.dequeue()||null;null!=t;){if(!1===e(t.element))return;null!==t.leftCh&&i.enqueue(t.leftCh),null!==t.rightCh&&i.enqueue(t.rightCh),t=i.dequeue()||null}},t.prototype.preorderTraversalAux=function(t,e,i){null===t||i.stop||(i.stop=!1===e(t.element),i.stop||(this.preorderTraversalAux(t.leftCh,e,i),i.stop||this.preorderTraversalAux(t.rightCh,e,i)))},t.prototype.postorderTraversalAux=function(t,e,i){null===t||i.stop||(this.postorderTraversalAux(t.leftCh,e,i),i.stop||(this.postorderTraversalAux(t.rightCh,e,i),i.stop||(i.stop=!1===e(t.element))))},t.prototype.minimumAux=function(t){for(;null!=t&&null!==t.leftCh;)t=t.leftCh;return t},t.prototype.maximumAux=function(t){for(;null!=t&&null!==t.rightCh;)t=t.rightCh;return t},t.prototype.heightAux=function(t){return null===t?-1:Math.max(this.heightAux(t.leftCh),this.heightAux(t.rightCh))+1},t.prototype.insertNode=function(t){for(var e=null,i=this.root;null!==i;){var s=this.compare(t.element,i.element);if(0===s)return null;s<0?(e=i,i=i.leftCh):(e=i,i=i.rightCh)}return t.parent=e,null===e?this.root=t:this.compare(t.element,e.element)<0?e.leftCh=t:e.rightCh=t,t},t.prototype.createNode=function(t){return{element:t,leftCh:null,rightCh:null,parent:null}},t}();e.default=r},2070:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=i(8805),r=i(7818),o=function(){function t(t){this.toStrF=t||s.defaultToString,this.dictionary=new n.default(this.toStrF),this.nElements=0}return t.prototype.add=function(t,e){if(void 0===e&&(e=1),s.isUndefined(t)||e<=0)return!1;if(this.contains(t))this.dictionary.getValue(t).copies+=e;else{var i={value:t,copies:e};this.dictionary.setValue(t,i)}return this.nElements+=e,!0},t.prototype.count=function(t){return this.contains(t)?this.dictionary.getValue(t).copies:0},t.prototype.contains=function(t){return this.dictionary.containsKey(t)},t.prototype.remove=function(t,e){if(void 0===e&&(e=1),s.isUndefined(t)||e<=0)return!1;if(this.contains(t)){var i=this.dictionary.getValue(t);return e>i.copies?this.nElements-=i.copies:this.nElements-=e,i.copies-=e,i.copies<=0&&this.dictionary.remove(t),!0}return!1},t.prototype.toArray=function(){for(var t=[],e=0,i=this.dictionary.values();e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=function(){function t(t){this.table={},this.nElements=0,this.toStr=t||s.defaultToString}return t.prototype.getValue=function(t){var e=this.table["$"+this.toStr(t)];if(!s.isUndefined(e))return e.value},t.prototype.setValue=function(t,e){if(!s.isUndefined(t)&&!s.isUndefined(e)){var i,n="$"+this.toStr(t),r=this.table[n];return s.isUndefined(r)?(this.nElements++,i=void 0):i=r.value,this.table[n]={key:t,value:e},i}},t.prototype.remove=function(t){var e="$"+this.toStr(t),i=this.table[e];if(!s.isUndefined(i))return delete this.table[e],this.nElements--,i.value},t.prototype.keys=function(){var t=[];for(var e in this.table)if(s.has(this.table,e)){var i=this.table[e];t.push(i.key)}return t},t.prototype.values=function(){var t=[];for(var e in this.table)if(s.has(this.table,e)){var i=this.table[e];t.push(i.value)}return t},t.prototype.forEach=function(t){for(var e in this.table)if(s.has(this.table,e)){var i=this.table[e];if(!1===t(i.key,i.value))return}},t.prototype.containsKey=function(t){return!s.isUndefined(this.getValue(t))},t.prototype.clear=function(){this.table={},this.nElements=0},t.prototype.size=function(){return this.nElements},t.prototype.isEmpty=function(){return this.nElements<=0},t.prototype.toString=function(){var t="{";return this.forEach((function(e,i){t+="\n\t"+e+" : "+i})),t+"\n}"},t}();e.default=n},2734:function(t,e,i){"use strict";var s,n=this&&this.__extends||(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var r=i(8805),o=i(9205),a=function(t){function e(e,i){var s=t.call(this,i)||this;return s.defaultFactoryFunction=e,s}return n(e,t),e.prototype.setDefault=function(e,i){var s=t.prototype.getValue.call(this,e);return o.isUndefined(s)?(this.setValue(e,i),i):s},e.prototype.getValue=function(t){return this.setDefault(t,this.defaultFactoryFunction())},e}(r.default);e.default=a},2422:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=i(1229),r=function(){function t(t){this.data=[],this.compare=t||s.defaultCompare}return t.prototype.leftChildIndex=function(t){return 2*t+1},t.prototype.rightChildIndex=function(t){return 2*t+2},t.prototype.parentIndex=function(t){return Math.floor((t-1)/2)},t.prototype.minIndex=function(t,e){return e>=this.data.length?t>=this.data.length?-1:t:this.compare(this.data[t],this.data[e])<=0?t:e},t.prototype.siftUp=function(t){for(var e=this.parentIndex(t);t>0&&this.compare(this.data[e],this.data[t])>0;)n.swap(this.data,e,t),t=e,e=this.parentIndex(t)},t.prototype.siftDown=function(t){for(var e=this.minIndex(this.leftChildIndex(t),this.rightChildIndex(t));e>=0&&this.compare(this.data[t],this.data[e])>0;)n.swap(this.data,e,t),t=e,e=this.minIndex(this.leftChildIndex(t),this.rightChildIndex(t))},t.prototype.peek=function(){return this.data.length>0?this.data[0]:void 0},t.prototype.add=function(t){return!s.isUndefined(t)&&(this.data.push(t),this.siftUp(this.data.length-1),!0)},t.prototype.removeRoot=function(){if(this.data.length>0){var t=this.data[0];return this.data[0]=this.data[this.data.length-1],this.data.splice(this.data.length-1,1),this.data.length>0&&this.siftDown(0),t}},t.prototype.contains=function(t){var e=s.compareToEquals(this.compare);return n.contains(this.data,t,e)},t.prototype.size=function(){return this.data.length},t.prototype.isEmpty=function(){return this.data.length<=0},t.prototype.clear=function(){this.data.length=0},t.prototype.forEach=function(t){n.forEach(this.data,t)},t}();e.default=r},3272:function(t,e,i){"use strict";var s,n=this&&this.__extends||(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var r=i(8805),o=i(9205),a=function(){function t(t,e){this.key=t,this.value=e}return t.prototype.unlink=function(){this.prev.next=this.next,this.next.prev=this.prev},t}(),l=function(){function t(){this.key=null,this.value=null}return t.prototype.unlink=function(){this.prev.next=this.next,this.next.prev=this.prev},t}(),h=function(t){function e(e){var i=t.call(this,e)||this;return i.head=new l,i.tail=new l,i.head.next=i.tail,i.tail.prev=i.head,i}return n(e,t),e.prototype.appendToTail=function(t){var e=this.tail.prev;e.next=t,t.prev=e,t.next=this.tail,this.tail.prev=t},e.prototype.getLinkedDictionaryPair=function(t){if(!o.isUndefined(t)){var e="$"+this.toStr(t);return this.table[e]}},e.prototype.getValue=function(t){var e=this.getLinkedDictionaryPair(t);if(!o.isUndefined(e))return e.value},e.prototype.remove=function(e){var i=this.getLinkedDictionaryPair(e);if(!o.isUndefined(i))return t.prototype.remove.call(this,e),i.unlink(),i.value},e.prototype.clear=function(){t.prototype.clear.call(this),this.head.next=this.tail,this.tail.prev=this.head},e.prototype.replace=function(t,e){var i="$"+this.toStr(e.key);e.next=t.next,e.prev=t.prev,this.remove(t.key),e.prev.next=e,e.next.prev=e,this.table[i]=e,++this.nElements},e.prototype.setValue=function(t,e){if(!o.isUndefined(t)&&!o.isUndefined(e)){var i=this.getLinkedDictionaryPair(t),s=new a(t,e),n="$"+this.toStr(t);return o.isUndefined(i)?(this.appendToTail(s),this.table[n]=s,void++this.nElements):(this.replace(i,s),i.value)}},e.prototype.keys=function(){var t=[];return this.forEach((function(e,i){t.push(e)})),t},e.prototype.values=function(){var t=[];return this.forEach((function(e,i){t.push(i)})),t},e.prototype.forEach=function(t){for(var e=this.head.next;e.next;){if(!1===t(e.key,e.value))return;e=e.next}},e}(r.default);e.default=h},5456:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=i(1229),r=function(){function t(){this.firstNode=null,this.lastNode=null,this.nElements=0}return t.prototype.add=function(t,e){if(s.isUndefined(e)&&(e=this.nElements),e<0||e>this.nElements||s.isUndefined(t))return!1;var i=this.createNode(t);if(0===this.nElements||null===this.lastNode)this.firstNode=i,this.lastNode=i;else if(e===this.nElements)this.lastNode.next=i,this.lastNode=i;else if(0===e)i.next=this.firstNode,this.firstNode=i;else{var n=this.nodeAtIndex(e-1);if(null===n)return!1;i.next=n.next,n.next=i}return this.nElements++,!0},t.prototype.first=function(){if(null!==this.firstNode)return this.firstNode.element},t.prototype.last=function(){if(null!==this.lastNode)return this.lastNode.element},t.prototype.elementAtIndex=function(t){var e=this.nodeAtIndex(t);if(null!==e)return e.element},t.prototype.indexOf=function(t,e){var i=e||s.defaultEquals;if(s.isUndefined(t))return-1;for(var n=this.firstNode,r=0;null!==n;){if(i(n.element,t))return r;r++,n=n.next}return-1},t.prototype.contains=function(t,e){return this.indexOf(t,e)>=0},t.prototype.remove=function(t,e){var i=e||s.defaultEquals;if(this.nElements<1||s.isUndefined(t))return!1;for(var n=null,r=this.firstNode;null!==r;){if(i(r.element,t))return null===n?(this.firstNode=r.next,r===this.lastNode&&(this.lastNode=null)):r===this.lastNode?(this.lastNode=n,n.next=r.next,r.next=null):(n.next=r.next,r.next=null),this.nElements--,!0;n=r,r=r.next}return!1},t.prototype.clear=function(){this.firstNode=null,this.lastNode=null,this.nElements=0},t.prototype.equals=function(e,i){var n=i||s.defaultEquals;return e instanceof t&&this.size()===e.size()&&this.equalsAux(this.firstNode,e.firstNode,n)},t.prototype.equalsAux=function(t,e,i){for(;null!==t&&null!==e;){if(!i(t.element,e.element))return!1;t=t.next,e=e.next}return!0},t.prototype.removeElementAtIndex=function(t){if(!(t<0||t>=this.nElements||null===this.firstNode||null===this.lastNode)){var e;if(1===this.nElements)e=this.firstNode.element,this.firstNode=null,this.lastNode=null;else{var i=this.nodeAtIndex(t-1);null===i?(e=this.firstNode.element,this.firstNode=this.firstNode.next):i.next===this.lastNode&&(e=this.lastNode.element,this.lastNode=i),null!==i&&null!==i.next&&(e=i.next.element,i.next=i.next.next)}return this.nElements--,e}},t.prototype.forEach=function(t){for(var e=this.firstNode;null!==e&&!1!==t(e.element);)e=e.next},t.prototype.reverse=function(){for(var t=null,e=this.firstNode,i=null;null!==e;)i=e.next,e.next=t,t=e,e=i;i=this.firstNode,this.firstNode=this.lastNode,this.lastNode=i},t.prototype.toArray=function(){for(var t=[],e=this.firstNode;null!==e;)t.push(e.element),e=e.next;return t},t.prototype.size=function(){return this.nElements},t.prototype.isEmpty=function(){return this.nElements<=0},t.prototype.toString=function(){return n.toString(this.toArray())},t.prototype.nodeAtIndex=function(t){if(t<0||t>=this.nElements)return null;if(t===this.nElements-1)return this.lastNode;for(var e=this.firstNode,i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=i(8805),r=i(1229),o=function(){function t(t,e,i){void 0===i&&(i=!1),this.dict=new n.default(t),this.equalsF=e||s.defaultEquals,this.allowDuplicate=i}return t.prototype.getValue=function(t){var e=this.dict.getValue(t);return s.isUndefined(e)?[]:r.copy(e)},t.prototype.setValue=function(t,e){if(s.isUndefined(t)||s.isUndefined(e))return!1;var i=this.dict.getValue(t);return s.isUndefined(i)?(this.dict.setValue(t,[e]),!0):!(!this.allowDuplicate&&r.contains(i,e,this.equalsF)||(i.push(e),0))},t.prototype.remove=function(t,e){if(s.isUndefined(e)){var i=this.dict.remove(t);return!s.isUndefined(i)}var n=this.dict.getValue(t);return!(s.isUndefined(n)||!r.remove(n,e,this.equalsF)||(0===n.length&&this.dict.remove(t),0))},t.prototype.keys=function(){return this.dict.keys()},t.prototype.values=function(){for(var t=[],e=0,i=this.dict.values();e{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER",t[t.INSIDE_AT_END=2]="INSIDE_AT_END",t[t.INSIDE_AT_START=3]="INSIDE_AT_START"}(i||(i={}));var s=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.rootIds=t,this.nodes=e,this.initRootIds(),this.initNodes()}return t.prototype.initRootIds=function(){for(var t=0,e=this.rootIds;t-1&&this.insertIdIntoRoot(e,i),this.nodes)if(this.nodes.hasOwnProperty(s)){var n=this.findNodeId(s,t);n>-1&&this.insertIdIntoNode(s,e,n)}},t.prototype.insertIdAfterId=function(t,e){var i=this.findRootId(t);for(var s in i>-1&&this.insertIdIntoRoot(e,i+1),this.nodes)if(this.nodes.hasOwnProperty(s)){var n=this.findNodeId(s,t);n>-1&&this.insertIdIntoNode(s,e,n+1)}},t.prototype.insertIdIntoId=function(t,e){this.nodeInsertAtEnd(t,e),this.nodes[e]=[]},t.prototype.insertIdIntoRoot=function(t,e){if(void 0===e)this.rootInsertAtEnd(t);else if(e<0){var i=this.rootIds.length;this.rootIds.splice(e+i+1,0,t)}else this.rootIds.splice(e,0,t);this.nodes[t]=this.nodes[t]||[]},t.prototype.insertIdIntoNode=function(t,e,i){if(this.nodes[t]=this.nodes[t]||[],this.nodes[e]=this.nodes[e]||[],void 0===i)this.nodeInsertAtEnd(t,e);else if(i<0){var s=this.nodes[t].length;this.nodes[t].splice(i+s+1,0,e)}else this.nodes[t].splice(i,0,e)},t.prototype.moveId=function(t,e,s){var n=t,r=this.findRootId(n);for(var o in this.nodes[e],this.nodes)if(this.nodes.hasOwnProperty(o)){this.findNodeId(o,e);break}var a=e,l=this.findRootId(a);for(var o in this.nodes[e],this.nodes)if(this.nodes.hasOwnProperty(o)){this.findNodeId(o,e);break}if(r>-1){if(l>-1)switch(this.rootDelete(r),l>r&&l--,s){case i.BEFORE:this.insertIdIntoRoot(n,l);break;case i.AFTER:this.insertIdIntoRoot(n,l+1);break;case i.INSIDE_AT_START:this.nodeInsertAtStart(a,n);break;case i.INSIDE_AT_END:this.nodeInsertAtEnd(a,n)}else for(var o in this.rootDelete(r),this.nodes)if(this.nodes.hasOwnProperty(o)&&(h=this.findNodeId(o,a))>-1){switch(s){case i.BEFORE:this.insertIdIntoNode(o,n,h);break;case i.AFTER:this.insertIdIntoNode(o,n,h+1);break;case i.INSIDE_AT_START:this.nodeInsertAtStart(a,n);break;case i.INSIDE_AT_END:this.nodeInsertAtEnd(a,n)}break}}else if(l>-1){for(var o in this.nodes)if(this.nodes.hasOwnProperty(o)&&(h=this.findNodeId(o,n))>-1){this.nodeDeleteAtIndex(o,h);break}switch(s){case i.BEFORE:this.insertIdIntoRoot(n,l);break;case i.AFTER:this.insertIdIntoRoot(n,l+1);break;case i.INSIDE_AT_START:this.nodeInsertAtStart(a,n);break;case i.INSIDE_AT_END:this.nodeInsertAtEnd(a,n)}}else{for(var o in this.nodes)if(this.nodes.hasOwnProperty(o)&&(h=this.findNodeId(o,n))>-1){this.nodeDeleteAtIndex(o,h);break}for(var o in this.nodes){var h;if(this.nodes.hasOwnProperty(o)&&(h=this.findNodeId(o,a))>-1){switch(s){case i.BEFORE:this.insertIdIntoNode(o,n,h);break;case i.AFTER:this.insertIdIntoNode(o,n,h+1);break;case i.INSIDE_AT_START:this.nodeInsertAtStart(a,n);break;case i.INSIDE_AT_END:this.nodeInsertAtEnd(a,n)}break}}}},t.prototype.swapArrayElements=function(t,e,i){var s=t[e];return t[e]=t[i],t[i]=s,t},t.prototype.rootDeleteId=function(t){var e=this.findRootId(t);e>-1&&this.rootDelete(e)},t.prototype.nodeAndSubNodesDelete=function(t){for(var e=[],i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=i(2422),r=function(){function t(t){this.heap=new n.default(s.reverseCompareFunction(t))}return t.prototype.enqueue=function(t){return this.heap.add(t)},t.prototype.add=function(t){return this.heap.add(t)},t.prototype.dequeue=function(){if(0!==this.heap.size()){var t=this.heap.peek();return this.heap.removeRoot(),t}},t.prototype.peek=function(){return this.heap.peek()},t.prototype.contains=function(t){return this.heap.contains(t)},t.prototype.isEmpty=function(){return this.heap.isEmpty()},t.prototype.size=function(){return this.heap.size()},t.prototype.clear=function(){this.heap.clear()},t.prototype.forEach=function(t){this.heap.forEach(t)},t}();e.default=r},278:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(5456),n=function(){function t(){this.list=new s.default}return t.prototype.enqueue=function(t){return this.list.add(t)},t.prototype.add=function(t){return this.list.add(t)},t.prototype.dequeue=function(){if(0!==this.list.size()){var t=this.list.first();return this.list.removeElementAtIndex(0),t}},t.prototype.peek=function(){if(0!==this.list.size())return this.list.first()},t.prototype.size=function(){return this.list.size()},t.prototype.contains=function(t,e){return this.list.contains(t,e)},t.prototype.isEmpty=function(){return this.list.size()<=0},t.prototype.clear=function(){this.list.clear()},t.prototype.forEach=function(t){this.list.forEach(t)},t}();e.default=n},7818:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205),n=i(1229),r=i(8805),o=function(){function t(t){this.dictionary=new r.default(t)}return t.prototype.contains=function(t){return this.dictionary.containsKey(t)},t.prototype.add=function(t){return!this.contains(t)&&!s.isUndefined(t)&&(this.dictionary.setValue(t,t),!0)},t.prototype.intersection=function(t){var e=this;this.forEach((function(i){return t.contains(i)||e.remove(i),!0}))},t.prototype.union=function(t){var e=this;t.forEach((function(t){return e.add(t),!0}))},t.prototype.difference=function(t){var e=this;t.forEach((function(t){return e.remove(t),!0}))},t.prototype.isSubsetOf=function(t){if(this.size()>t.size())return!1;var e=!0;return this.forEach((function(i){return!!t.contains(i)||(e=!1,!1)})),e},t.prototype.remove=function(t){return!!this.contains(t)&&(this.dictionary.remove(t),!0)},t.prototype.forEach=function(t){this.dictionary.forEach((function(e,i){return t(i)}))},t.prototype.toArray=function(){return this.dictionary.values()},t.prototype.isEmpty=function(){return this.dictionary.isEmpty()},t.prototype.size=function(){return this.dictionary.size()},t.prototype.clear=function(){this.dictionary.clear()},t.prototype.toString=function(){return n.toString(this.toArray())},t}();e.default=o},5669:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(5456),n=function(){function t(){this.list=new s.default}return t.prototype.push=function(t){return this.list.add(t,0)},t.prototype.add=function(t){return this.list.add(t,0)},t.prototype.pop=function(){return this.list.removeElementAtIndex(0)},t.prototype.peek=function(){return this.list.first()},t.prototype.size=function(){return this.list.size()},t.prototype.contains=function(t,e){return this.list.contains(t,e)},t.prototype.isEmpty=function(){return this.list.isEmpty()},t.prototype.clear=function(){this.list.clear()},t.prototype.forEach=function(t){this.list.forEach(t)},t}();e.default=n},1229:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(9205);function n(t,e,i){for(var n=i||s.defaultEquals,r=t.length,o=0;o=0;r--)if(n(t[r],e))return r;return-1},e.contains=function(t,e,i){return n(t,e,i)>=0},e.remove=function(t,e,i){var s=n(t,e,i);return!(s<0||(t.splice(s,1),0))},e.frequency=function(t,e,i){for(var n=i||s.defaultEquals,r=t.length,o=0,a=0;a=t.length||i<0||i>=t.length)return!1;var s=t[e];return t[e]=t[i],t[i]=s,!0},e.toString=function(t){return"["+t.toString()+"]"},e.forEach=function(t,e){for(var i=0,s=t;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(1229);e.arrays=s;var n=i(2070);e.Bag=n.default;var r=i(8071);e.BSTree=r.default;var o=i(3176);e.BSTreeKV=o.default;var a=i(8805);e.Dictionary=a.default;var l=i(2422);e.Heap=l.default;var h=i(3272);e.LinkedDictionary=h.default;var u=i(5456);e.LinkedList=u.default;var c=i(6072);e.MultiDictionary=c.default;var d=i(2734);e.FactoryDictionary=d.default;var p=i(2734);e.DefaultDictionary=p.default;var f=i(278);e.Queue=f.default;var m=i(5994);e.PriorityQueue=m.default;var g=i(7818);e.Set=g.default;var b=i(5669);e.Stack=b.default;var S=i(1489);e.MultiRootTree=S.default;var y=i(9205);e.util=y},9205:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.prototype.hasOwnProperty;function s(t){return"function"==typeof t}function n(t){return void 0===t}function r(t){return"[object String]"===Object.prototype.toString.call(t)}e.has=function(t,e){return i.call(t,e)},e.defaultCompare=function(t,e){return t{"use strict";i.d(e,{k:()=>s});class s{static copy(t){return new s(t.x,t.y,t.w,t.h)}constructor(t,e,i,s){this.x=t,this.y=e,this.w=i,this.h=s}getX(){return this.x}getY(){return this.y}getW(){return this.w}getH(){return this.h}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setW(t){return this.w=t,this}setH(t){return this.h=t,this}move(t,e){this.x+=t,this.y+=e}clone(){return s.copy(this)}mergeWith(t,e){const i=t,s=this.x{"use strict";i.d(e,{o:()=>r});var s=i(4552),n=i(3493);class r extends n.Modifier{static get CATEGORY(){return"dots"}static format(t,e){const i=e.right_shift;if(!t||0===t.length)return!1;const s=[],n={};for(let e=0;ee.line-t.line));let r=i,o=0,a=null,l=null,h=null,u=0;for(let t=0;to?r:o,a=d,l=i}return e.right_shift+=o,!0}constructor(){super(),this.setAttribute("type","Dot"),this.note=null,this.index=null,this.position=n.Modifier.Position.RIGHT,this.radius=2,this.setWidth(5),this.dot_shiftY=0}getCategory(){return r.CATEGORY}setNote(t){this.note=t,"gracenotes"===this.note.getCategory()&&(this.radius*=.5,this.setWidth(3))}setDotShiftY(t){return this.dot_shiftY=t,this}draw(){if(this.checkContext(),this.setRendered(),!this.note||null===this.index)throw new s.s.RERR("NoAttachedNote","Can't draw dot without a note and index.");const t=this.note.stave.options.spacing_between_lines_px,e=this.note.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});"tabnotes"===this.note.getCategory()&&(e.y=this.note.getStemExtents().baseY+1);const i=e.x+this.x_shift+this.width-this.radius;let n=this.dot_shiftY*t;this.note&&"jianpu"==this.note.DYMusicScoreType&&(n=-5);const r=e.y+this.y_shift+n,o=this.context;o.beginPath(),o.arc(i,r,this.radius,0,2*Math.PI,!1),o.fill()}}},2088:(t,e,i)=>{"use strict";i.d(e,{W:()=>r});var s=i(4552),n=i(8194);class r{static newID(){return"auto"+r.ID++}constructor({type:t}={}){this.attrs={id:r.newID(),el:null,type:t||"Base",classes:{}},this.boundingBox=null,this.context=null,this.rendered=!1,n.B.getDefaultRegistry()&&n.B.getDefaultRegistry().register(this)}setStyle(t){return this.style=t,this}getStyle(){return this.style}applyStyle(t=this.context,e=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}restoreStyle(t=this.context,e=this.getStyle()){return e?(t.restore(),this):this}drawWithStyle(){this.checkContext(),this.applyStyle(),this.draw(),this.restoreStyle()}hasClass(t){return!0===this.attrs.classes[t]}addClass(t){return this.attrs.classes[t]=!0,this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:t,oldValue:null}),this}removeClass(t){return delete this.attrs.classes[t],this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:null,oldValue:t}),this}onRegister(t){return this.registry=t,this}isRendered(){return this.rendered}setRendered(t=!0){return this.rendered=t,this}getAttributes(){return this.attrs}getAttribute(t){return this.attrs[t]}setAttribute(t,e){const i=this.attrs.id,s=this.attrs[t];return this.attrs[t]=e,this.registry&&this.registry.onUpdate({id:i,name:t,value:e,oldValue:s}),this}getContext(){return this.context}setContext(t){return this.context=t,this}getBoundingBox(){return this.boundingBox}checkContext(){if(!this.context)throw new s.s.RERR("NoContext","No rendering context attached to instance");return this.context}}r.ID=1e3},3042:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});const s={glyphs:{v0:{x_min:0,x_max:514.5,ha:525,o:"m 236 648 b 246 648 238 648 242 648 b 288 646 261 648 283 648 b 472 513 364 634 428 587 b 514 347 502 464 514 413 b 462 163 514 272 499 217 b 257 44 409 83 333 44 b 50 163 181 44 103 83 b 0 347 14 217 0 272 b 40 513 0 413 12 464 b 236 648 87 591 155 638 m 277 614 b 253 616 273 616 261 616 b 242 616 247 616 243 616 b 170 499 193 609 181 589 b 159 348 163 446 159 398 b 166 222 159 308 161 266 b 201 91 174 138 183 106 b 257 76 215 81 235 76 b 311 91 277 76 299 81 b 347 222 330 106 338 138 b 353 348 352 266 353 308 b 344 499 353 398 351 446 b 277 614 333 587 322 606 m 257 -1 l 258 -1 l 255 -1 l 257 -1 m 257 673 l 258 673 l 255 673 l 257 673 "},v1:{x_min:-1.359375,x_max:344.359375,ha:351,o:"m 126 637 l 129 638 l 198 638 l 266 638 l 269 635 b 274 631 272 634 273 632 l 277 627 l 277 395 b 279 156 277 230 277 161 b 329 88 281 123 295 106 b 344 69 341 81 344 79 b 337 55 344 62 343 59 l 333 54 l 197 54 l 61 54 l 58 55 b 50 69 53 59 50 62 b 65 88 50 79 53 81 b 80 97 72 91 74 93 b 117 156 103 113 112 129 b 117 345 117 161 117 222 l 117 528 l 100 503 l 38 406 b 14 383 24 384 23 383 b -1 398 5 383 -1 390 b 4 415 -1 403 1 409 b 16 437 5 416 10 426 l 72 539 l 100 596 b 121 632 119 631 119 631 b 126 637 122 634 125 635 m 171 -1 l 172 -1 l 170 -1 l 171 -1 m 171 673 l 172 673 l 170 673 l 171 673 "},v2:{x_min:-1.359375,x_max:458.6875,ha:468,o:"m 197 648 b 216 648 201 648 208 648 b 258 646 232 648 253 648 b 419 546 333 637 393 599 b 432 489 428 528 432 509 b 356 342 432 440 405 384 b 235 278 322 313 288 295 b 69 170 166 256 107 217 b 69 169 69 170 69 169 b 69 169 69 169 69 169 b 74 173 69 169 72 170 b 209 222 112 204 163 222 b 310 195 247 222 274 215 b 371 179 332 184 352 179 b 396 181 379 179 387 179 b 428 202 409 184 423 194 b 442 212 431 209 436 212 b 458 197 450 212 458 206 b 441 148 458 190 449 165 b 299 44 409 84 353 44 b 288 45 295 44 292 44 b 250 61 274 45 268 49 b 122 99 212 86 164 99 b 73 91 104 99 88 97 b 28 63 53 84 34 72 b 14 54 25 56 20 54 b 1 62 9 54 4 56 l -1 65 l -1 79 b 0 99 -1 91 0 95 b 2 113 1 102 2 108 b 164 309 20 197 81 272 b 285 470 232 341 277 398 b 287 487 287 476 287 481 b 171 595 287 551 239 595 b 155 595 166 595 160 595 b 142 592 145 594 142 594 b 145 589 142 592 142 591 b 179 527 168 576 179 551 b 132 455 179 496 163 467 b 104 451 122 452 112 451 b 27 530 62 451 27 487 b 29 555 27 538 27 546 b 197 648 44 601 115 639 m 228 -1 l 230 -1 l 227 -1 l 228 -1 m 228 673 l 230 673 l 227 673 l 228 673 "},v3:{x_min:-1.359375,x_max:409.6875,ha:418,o:"m 174 648 b 191 648 176 648 183 648 b 225 648 204 648 220 648 b 402 523 317 638 389 588 b 404 503 404 517 404 510 b 402 484 404 495 404 488 b 264 373 389 437 334 394 b 257 370 259 371 257 371 b 257 370 257 370 257 370 b 264 369 258 370 261 369 b 409 202 359 334 409 267 b 318 72 409 152 381 104 b 200 43 281 52 240 43 b 23 113 134 43 69 68 b 0 169 6 129 0 149 b 77 249 0 210 29 249 l 77 249 b 152 174 125 249 152 212 b 103 102 152 145 137 116 b 103 102 103 102 103 102 b 147 94 103 101 132 95 b 153 94 149 94 151 94 b 265 206 219 94 265 141 b 264 226 265 213 265 219 b 147 355 253 299 204 353 b 126 371 133 356 126 362 b 147 388 126 383 132 388 b 254 474 196 391 238 424 b 259 502 258 484 259 494 b 182 592 259 544 228 582 b 156 595 175 595 166 595 b 115 592 142 595 129 594 l 111 591 l 115 588 b 152 524 141 574 152 549 b 92 449 152 491 130 458 b 76 448 87 448 81 448 b -1 530 32 448 -1 488 b 20 581 -1 548 5 566 b 174 648 55 619 108 641 m 204 -1 l 205 -1 l 202 -1 l 204 -1 m 204 673 l 205 673 l 202 673 l 204 673 "},v4:{x_min:0,x_max:468.21875,ha:478,o:"m 174 637 b 232 638 175 638 189 638 b 277 638 245 638 259 638 l 378 638 l 381 635 b 389 623 386 632 389 627 b 382 609 389 617 386 613 b 366 589 381 606 372 598 l 313 528 l 245 451 l 209 410 l 155 348 l 84 267 b 59 240 72 252 59 240 b 59 240 59 240 59 240 b 151 238 59 238 68 238 l 242 238 l 242 303 b 243 371 242 369 242 370 b 289 426 245 374 254 385 l 303 441 l 317 456 l 338 483 l 360 506 l 371 520 b 386 527 375 526 381 527 b 400 519 392 527 397 524 b 401 440 401 516 401 514 b 401 377 401 423 401 402 l 401 238 l 426 238 b 453 237 449 238 450 238 b 465 217 461 234 465 226 b 460 202 465 212 464 206 b 426 197 454 197 453 197 l 401 197 l 401 180 b 451 88 402 129 412 109 b 468 69 465 81 468 79 b 461 55 468 62 466 59 l 458 54 l 321 54 l 185 54 l 182 55 b 175 69 176 59 175 62 b 191 88 175 79 176 81 b 240 180 230 109 240 129 l 240 197 l 125 197 b 73 195 104 195 87 195 b 8 197 10 195 9 197 b 0 212 2 199 0 205 b 0 212 0 212 0 212 b 20 242 0 219 0 219 b 163 610 104 344 163 492 b 174 637 163 628 166 634 m 234 -1 l 235 -1 l 232 -1 l 234 -1 m 234 673 l 235 673 l 232 673 l 234 673 "},v5:{x_min:0,x_max:409.6875,ha:418,o:"m 47 637 b 53 638 49 638 50 638 b 69 634 55 638 61 637 b 210 610 114 619 161 610 b 363 634 259 610 311 619 b 382 638 372 637 378 638 b 392 634 386 638 389 637 b 397 623 396 630 397 627 b 393 610 397 620 396 616 b 298 505 368 552 338 520 b 212 494 277 498 246 494 b 65 517 163 494 106 502 b 61 517 62 517 61 517 b 61 517 61 517 61 517 b 51 408 61 517 51 412 b 51 408 51 408 51 408 b 51 408 51 408 51 408 b 61 412 53 408 55 409 b 125 434 80 421 103 430 b 185 441 145 440 166 441 b 409 244 310 441 409 353 b 401 191 409 227 406 209 b 197 43 375 105 287 43 b 159 47 183 43 171 44 b 23 123 112 56 61 86 b 0 180 6 140 0 159 b 76 260 0 220 31 260 b 92 259 81 260 87 259 b 152 183 132 251 152 216 b 100 112 152 152 134 122 b 95 111 98 112 95 111 b 95 111 95 111 95 111 b 129 98 95 109 119 101 b 148 97 136 97 141 97 b 264 235 206 97 261 158 b 265 248 265 240 265 244 b 210 398 265 312 243 373 b 179 408 201 406 194 408 b 174 408 178 408 176 408 b 53 369 130 408 88 394 b 34 359 39 359 38 359 b 17 374 24 359 17 365 b 39 628 17 384 38 625 b 47 637 40 631 43 635 m 204 -1 l 205 -1 l 202 -1 l 204 -1 m 204 673 l 205 673 l 202 673 l 204 673 "},v6:{x_min:0,x_max:475.03125,ha:485,o:"m 255 648 b 274 648 259 648 266 648 b 314 646 288 648 307 648 b 450 555 374 637 438 594 b 454 530 453 546 454 538 b 375 451 454 485 416 451 b 328 467 359 451 343 455 b 300 526 310 483 300 503 b 352 598 300 557 319 589 b 356 599 355 598 356 599 b 352 602 356 599 355 601 b 288 616 330 612 308 616 b 210 584 257 616 230 605 b 164 433 189 559 174 508 b 160 374 163 415 160 381 b 160 374 160 374 160 374 b 160 374 160 374 160 374 b 168 377 160 374 164 376 b 258 395 200 390 228 395 b 366 367 294 395 328 387 b 475 223 436 333 475 283 b 472 197 475 215 473 206 b 349 65 462 141 419 95 b 259 43 317 51 288 43 b 167 69 230 43 200 52 b 4 290 80 113 20 195 b 0 349 1 309 0 328 b 20 467 0 391 6 433 b 255 648 58 563 155 637 m 269 363 b 257 363 265 363 261 363 b 210 345 236 363 220 356 b 186 226 196 324 186 272 b 187 198 186 216 186 206 b 213 95 191 151 202 112 b 257 76 221 83 238 76 b 270 77 261 76 266 76 b 321 156 299 81 310 99 b 329 229 326 183 329 206 b 321 301 329 252 326 274 b 269 363 311 342 298 359 m 236 -1 l 238 -1 l 235 -1 l 236 -1 m 236 673 l 238 673 l 235 673 l 236 673 "},v7:{x_min:0,x_max:442.359375,ha:451,o:"m 147 648 b 166 649 153 649 160 649 b 313 598 217 649 273 630 b 340 587 323 588 328 587 l 341 587 b 412 628 367 587 390 601 b 427 638 416 635 421 638 b 439 632 431 638 435 637 b 442 623 441 630 442 628 b 430 569 442 616 439 603 b 352 369 408 492 377 410 b 300 259 325 324 313 298 b 273 84 283 205 273 140 b 265 55 273 65 272 59 l 261 54 l 181 54 l 99 54 l 96 55 b 91 61 95 56 92 59 l 89 63 l 89 77 b 147 263 89 133 111 202 b 261 401 176 313 212 355 b 378 541 315 449 349 489 l 382 548 l 375 544 b 240 495 333 512 285 495 b 129 535 198 495 160 509 b 84 560 108 552 95 560 b 76 559 81 560 78 560 b 31 487 59 555 43 530 b 14 470 27 473 24 470 b 1 477 8 470 4 471 l 0 480 l 0 553 l 0 627 l 1 630 b 16 638 4 635 9 638 b 23 635 17 638 20 637 b 49 626 36 626 39 626 b 96 638 59 626 80 630 b 104 639 99 638 102 639 b 117 644 107 641 112 642 b 147 648 125 645 137 648 m 220 -1 l 221 -1 l 219 -1 l 220 -1 m 220 673 l 221 673 l 219 673 l 220 673 "},v8:{x_min:0,x_max:488.640625,ha:499,o:"m 217 648 b 245 649 225 648 235 649 b 453 516 343 649 430 595 b 458 478 455 503 458 491 b 412 370 458 440 441 398 b 411 369 412 369 411 369 b 415 365 411 367 412 367 b 488 231 462 331 488 281 b 472 165 488 208 483 186 b 243 43 434 86 338 43 b 63 104 178 43 112 62 b 0 233 20 140 0 186 b 73 365 0 283 24 331 l 77 369 l 72 374 b 29 476 42 406 29 441 b 217 648 29 557 103 635 m 258 605 b 242 606 253 605 247 606 b 157 552 198 606 157 580 b 160 541 157 548 159 544 b 319 413 176 503 242 452 l 337 403 l 338 406 b 359 476 352 428 359 452 b 258 605 359 537 318 595 m 138 326 b 130 330 134 328 130 330 b 130 330 130 330 130 330 b 107 305 127 330 112 313 b 84 231 91 281 84 256 b 243 86 84 156 151 86 b 249 87 245 86 246 87 b 347 156 303 88 347 120 b 344 172 347 162 345 167 b 156 319 325 227 257 281 b 138 326 151 322 144 324 m 243 -1 l 245 -1 l 242 -1 l 243 -1 m 243 673 l 245 673 l 242 673 l 243 673 "},v9:{x_min:0,x_max:475.03125,ha:485,o:"m 191 646 b 212 649 198 648 205 649 b 255 644 227 649 243 646 b 458 448 348 616 428 539 b 475 342 469 415 475 378 b 460 244 475 308 469 274 b 193 44 421 124 303 44 b 91 69 157 44 122 51 b 19 161 43 97 19 126 b 21 181 19 167 20 174 b 98 241 32 220 65 241 b 170 186 129 241 160 223 b 172 166 171 179 172 173 b 121 94 172 134 152 102 b 117 93 118 94 117 93 b 121 90 117 93 118 91 b 185 76 142 80 164 76 b 270 119 220 76 251 91 b 308 259 287 145 300 194 b 313 317 310 277 313 310 b 313 317 313 317 313 317 b 313 317 313 317 313 317 b 304 315 313 317 308 316 b 216 295 273 302 245 295 b 145 308 193 295 170 299 b 19 398 88 327 42 360 b 0 469 5 420 0 444 b 24 551 0 496 8 526 b 191 646 54 596 125 637 m 227 614 b 215 616 224 616 220 616 b 202 614 210 616 206 616 b 152 535 174 610 163 592 b 144 463 147 509 144 485 b 152 391 144 440 147 417 b 216 328 163 344 179 328 b 280 391 253 328 269 344 b 288 463 285 417 288 440 b 280 535 288 485 285 509 b 227 614 269 594 258 610 m 236 -1 l 238 -1 l 235 -1 l 236 -1 m 236 673 l 238 673 l 235 673 l 236 673 "},vx:{x_min:0,x_max:406.96875,ha:415,o:"m 21 183 b 28 183 24 183 25 183 b 42 181 34 183 39 183 b 127 108 47 179 47 179 b 202 41 168 72 202 41 b 279 108 204 41 238 72 b 357 177 321 145 356 176 b 375 183 363 181 370 183 b 406 151 392 183 406 169 b 404 137 406 147 405 141 b 322 62 401 131 398 129 b 251 0 284 27 251 0 b 322 -63 251 -1 284 -29 b 404 -138 398 -130 401 -133 b 406 -152 405 -142 406 -148 b 375 -184 406 -170 392 -184 b 357 -179 370 -184 363 -183 b 279 -109 356 -177 321 -147 b 202 -43 238 -73 204 -43 b 127 -109 202 -43 168 -73 b 49 -179 85 -147 50 -177 b 31 -184 43 -183 36 -184 b 0 -152 13 -184 0 -170 b 2 -138 0 -148 0 -142 b 83 -63 5 -133 8 -130 b 155 0 122 -29 155 -1 b 83 62 155 0 122 27 b 8 129 43 97 10 127 b 0 151 2 136 0 144 b 21 183 0 165 8 177 "},va:{x_min:-149.71875,x_max:148.359375,ha:151,o:"m -8 -1 b -1 0 -5 -1 -4 0 b 16 -11 5 0 13 -4 b 83 -186 17 -12 47 -90 l 148 -358 l 148 -363 b 127 -385 148 -376 138 -385 b 112 -378 122 -385 118 -383 b 54 -226 110 -374 114 -385 b 0 -81 24 -147 0 -81 b -55 -226 -1 -81 -25 -147 b -114 -378 -115 -385 -111 -374 b -129 -385 -119 -383 -123 -385 b -149 -363 -140 -385 -149 -376 l -149 -358 l -84 -186 b -19 -11 -49 -90 -19 -12 b -8 -1 -17 -8 -12 -4 "},vb:{x_min:0,x_max:428.75,ha:438,o:"m 262 186 b 273 186 266 186 272 186 b 274 186 273 186 274 186 b 285 186 274 186 280 186 b 428 48 375 181 428 122 b 386 -68 428 12 416 -29 b 155 -187 329 -145 236 -187 b 12 -111 92 -187 38 -162 b 0 -51 4 -91 0 -72 b 262 186 0 58 122 179 "},vc:{x_min:0,x_max:447.8125,ha:457,o:"m 0 86 l 0 173 l 223 173 l 447 173 l 447 86 l 447 0 l 223 0 l 0 0 l 0 86 "},vf:{x_min:0,x_max:370.21875,ha:378,o:"m 0 0 l 0 277 l 61 277 l 122 277 l 122 0 l 122 -278 l 61 -278 l 0 -278 l 0 0 m 246 -1 l 246 277 l 308 277 l 370 277 l 370 -1 l 370 -278 l 308 -278 l 246 -278 l 246 -1 "},v10:{x_min:0,x_max:559.421875,ha:571,o:"m 5 127 b 14 127 6 127 9 127 b 51 126 25 127 43 127 b 175 98 93 122 138 112 l 186 94 b 279 51 210 86 255 65 b 285 47 280 51 283 48 b 319 27 291 44 311 31 l 326 22 b 359 0 332 19 352 4 l 367 -6 b 371 -9 368 -6 370 -8 l 379 -15 b 387 -22 383 -18 386 -20 l 398 -30 l 411 -40 l 417 -47 l 427 -55 l 434 -61 b 441 -66 436 -62 439 -65 l 446 -72 l 453 -77 l 462 -87 b 558 -188 490 -113 549 -176 b 559 -195 559 -191 559 -194 b 548 -205 559 -201 555 -205 b 541 -204 547 -205 544 -205 b 534 -198 539 -201 536 -199 l 525 -191 b 481 -162 518 -187 490 -167 b 472 -155 477 -159 472 -156 b 468 -152 470 -155 469 -154 b 461 -149 466 -152 464 -151 b 428 -130 454 -145 441 -137 b 371 -99 413 -122 372 -99 b 363 -95 371 -99 367 -98 b 353 -91 357 -94 353 -91 b 348 -90 353 -91 352 -91 b 332 -81 343 -87 341 -86 b 27 -12 230 -37 127 -13 b 0 -5 4 -11 2 -11 b 0 58 0 -2 0 27 b 0 122 0 88 0 120 b 5 127 1 124 4 126 "},v11:{x_min:-155.171875,x_max:153.8125,ha:157,o:"m -137 353 b -130 353 -136 353 -133 353 b -112 349 -125 353 -119 352 b -100 342 -110 347 -104 344 b 0 317 -69 326 -35 317 b 111 349 38 317 76 328 b 129 353 117 352 123 353 b 153 327 142 353 153 344 b 144 302 153 320 153 317 b 27 6 93 226 50 113 b 21 -13 24 -11 24 -11 b 0 -26 17 -22 8 -26 b -24 -12 -9 -26 -19 -22 b -28 5 -24 -9 -27 -2 b -145 302 -53 117 -95 224 b -155 327 -155 317 -155 320 b -137 353 -155 340 -148 349 "},v18:{x_min:0,x_max:323.9375,ha:331,o:"m 217 535 b 225 537 220 537 221 537 b 245 524 235 537 242 533 l 246 521 l 247 390 l 247 258 l 273 265 b 306 270 288 269 299 270 b 322 259 315 270 319 267 b 323 208 323 256 323 233 b 322 158 323 184 323 159 b 288 140 318 148 315 147 b 247 130 254 131 247 130 b 247 65 247 130 247 104 b 247 20 247 51 247 36 l 247 -88 l 273 -81 b 306 -76 289 -77 299 -76 b 318 -81 311 -76 315 -77 b 323 -123 323 -87 323 -86 l 323 -138 l 323 -154 b 318 -195 323 -191 323 -190 b 269 -210 314 -199 315 -199 b 249 -216 259 -213 250 -216 l 247 -216 l 247 -349 l 246 -483 l 245 -487 b 225 -499 242 -495 234 -499 b 206 -487 219 -499 210 -495 l 205 -483 l 205 -355 l 205 -227 l 204 -227 l 181 -233 l 138 -244 b 117 -249 127 -247 117 -249 b 115 -385 115 -249 115 -256 l 115 -523 l 114 -526 b 95 -538 110 -534 102 -538 b 74 -526 87 -538 78 -534 l 73 -523 l 73 -391 b 72 -260 73 -269 73 -260 b 72 -260 72 -260 72 -260 b 19 -273 61 -263 23 -273 b 0 -260 10 -273 4 -267 b 0 -209 0 -256 0 -256 l 0 -162 l 1 -158 b 61 -134 5 -148 5 -148 l 73 -131 l 73 -22 b 72 86 73 79 73 86 b 72 86 72 86 72 86 b 19 74 61 83 23 74 b 0 86 10 74 4 79 b 0 137 0 90 0 90 l 0 184 l 1 188 b 61 212 5 198 5 198 l 73 215 l 73 348 l 73 481 l 74 485 b 95 498 78 492 87 498 b 103 495 98 498 100 496 b 114 485 107 494 111 489 l 115 481 l 115 353 l 115 226 l 121 226 b 159 235 123 227 141 231 l 198 247 l 205 248 l 205 384 l 205 521 l 206 524 b 217 535 209 528 212 533 m 205 9 b 205 119 205 70 205 119 l 205 119 b 182 113 204 119 194 116 l 138 102 b 117 97 127 99 117 97 b 115 -12 115 97 115 91 l 115 -122 l 121 -120 b 159 -111 123 -119 141 -115 l 198 -101 l 205 -98 l 205 9 "},v1b:{x_min:0,x_max:559.421875,ha:571,o:"m 544 204 b 548 204 545 204 547 204 b 559 194 555 204 559 199 b 559 190 559 192 559 191 b 530 156 559 188 556 184 b 462 86 510 134 481 104 b 453 76 458 81 454 77 l 446 70 l 441 65 b 434 59 439 63 436 61 l 427 54 b 409 37 426 51 416 44 b 392 23 398 29 394 26 b 387 19 389 22 387 20 b 379 13 386 19 383 16 l 371 8 l 367 5 l 359 -1 l 337 -16 b 285 -48 319 -29 298 -41 l 279 -52 b 186 -95 255 -66 210 -87 l 175 -99 b 23 -129 127 -117 68 -129 b 17 -129 20 -129 19 -129 b 1 -123 2 -129 2 -129 b 0 -49 0 -122 0 -83 b 0 4 0 -22 0 1 b 27 11 2 9 4 9 b 185 31 78 12 145 20 b 198 34 186 31 193 33 b 314 73 234 44 277 58 b 349 88 328 79 340 84 b 353 90 352 90 353 90 b 363 94 353 90 357 93 b 371 98 367 97 371 98 b 428 129 372 98 413 120 b 461 148 441 136 454 144 b 468 151 464 149 466 151 b 472 154 469 152 470 154 b 481 161 473 155 477 158 b 525 190 490 166 518 186 l 534 197 b 540 201 536 198 539 199 b 544 204 541 202 544 204 "},v1d:{x_min:0,x_max:619.3125,ha:632,o:"m 274 184 b 307 186 285 186 296 186 b 616 22 465 186 597 116 b 619 -1 617 13 619 5 b 308 -187 619 -104 483 -187 b 0 -1 133 -187 0 -102 b 5 36 0 11 1 23 b 274 184 29 115 141 176 m 289 161 b 272 162 284 162 277 162 b 171 41 209 162 171 108 b 205 -73 171 5 182 -34 b 345 -163 243 -133 298 -163 b 436 -98 385 -163 420 -142 b 446 -43 443 -80 446 -62 b 289 161 446 47 377 147 "},v1e:{x_min:-402.890625,x_max:401.53125,ha:410,o:"m -219 173 b -213 174 -217 174 -215 174 b -202 173 -209 174 -205 173 b -114 86 -200 172 -179 151 b -28 0 -66 37 -28 0 b 40 84 -28 0 2 37 b 117 174 111 173 110 172 b 122 174 118 174 119 174 b 132 173 125 174 129 173 b 295 11 134 172 171 134 l 307 -1 l 336 34 b 374 76 366 72 368 74 b 381 77 375 77 378 77 b 401 56 392 77 401 68 b 400 48 401 54 401 51 b 223 -172 397 41 230 -166 b 210 -176 220 -174 215 -176 b 201 -174 206 -176 204 -176 b 112 -87 198 -173 178 -152 b 27 0 65 -38 27 0 b -42 -86 27 0 -4 -38 b -118 -174 -112 -174 -111 -173 b -123 -176 -119 -176 -121 -176 b -133 -174 -126 -176 -130 -174 b -296 -12 -136 -173 -172 -137 l -308 0 l -337 -34 b -375 -77 -367 -73 -370 -76 b -382 -79 -377 -79 -379 -79 b -402 -58 -393 -79 -402 -69 b -401 -49 -402 -55 -402 -52 b -224 172 -398 -43 -228 167 b -219 173 -223 172 -220 173 "},v1f:{x_min:-340.28125,x_max:338.921875,ha:346,o:"m -32 520 b -29 521 -31 520 -31 521 b -23 519 -27 521 -24 520 b -20 513 -21 517 -20 516 b -21 506 -20 512 -20 509 b -31 474 -23 502 -27 488 l -53 402 l -66 352 l -68 349 l -57 349 b -32 351 -51 349 -40 351 b 123 370 19 352 74 359 b 137 371 127 370 133 371 b 170 356 152 371 164 366 b 171 355 170 355 170 355 b 216 366 174 355 183 358 b 280 378 268 377 266 377 b 287 378 283 378 284 378 b 332 349 307 378 322 369 b 338 319 336 341 338 330 b 332 301 338 310 336 302 b 242 280 329 299 246 280 b 242 280 242 280 242 280 b 235 288 236 280 235 283 b 235 292 235 290 235 291 b 236 302 236 297 236 299 b 220 337 236 316 230 330 l 216 340 l 210 335 b 159 276 189 322 172 301 b 118 149 152 265 156 274 b 81 34 84 36 85 36 b -8 13 78 33 -4 13 b -8 13 -8 13 -8 13 b -14 20 -12 15 -14 15 b -8 44 -14 24 -12 31 b -2 66 -5 55 -2 65 b -2 66 -2 66 -2 66 l -2 66 b -43 41 -2 66 -21 55 b -114 4 -98 8 -98 8 b -144 0 -123 0 -134 0 b -242 99 -197 0 -242 43 b -242 109 -242 102 -242 105 b -212 219 -240 122 -242 116 b -185 312 -197 270 -185 312 l -185 312 b -189 312 -185 312 -186 312 b -259 312 -200 312 -227 312 b -321 310 -291 312 -310 310 b -334 312 -330 310 -334 312 b -340 319 -338 313 -340 316 b -336 326 -340 322 -338 324 b -291 337 -334 326 -314 331 l -247 347 l -210 348 b -172 348 -190 348 -172 348 b -168 363 -172 348 -171 355 b -145 442 -151 424 -145 441 b -133 452 -144 444 -140 446 l -77 489 b -32 520 -53 506 -32 520 m 57 334 b 53 335 55 335 54 335 b 44 334 50 335 49 335 b -70 316 8 326 -28 320 b -78 309 -78 316 -78 316 b -108 202 -80 305 -88 274 b -141 81 -136 112 -141 93 b -140 74 -141 79 -141 77 b -117 49 -137 59 -127 49 b -107 52 -114 49 -110 51 b 16 127 -106 54 14 126 b 42 217 16 127 42 215 b 49 241 42 222 44 229 b 73 320 53 251 73 317 b 57 334 73 327 65 333 "},v20:{x_min:-571.671875,x_max:570.3125,ha:582,o:"m -559 351 b -551 352 -556 352 -553 352 b -530 338 -543 352 -533 348 b -529 169 -530 337 -529 291 l -529 1 l -507 27 l -441 112 b -382 174 -394 169 -390 174 b -378 174 -381 174 -379 174 b -281 86 -370 174 -375 179 b -196 0 -234 37 -196 0 b -126 84 -196 0 -164 37 b -50 174 -55 173 -57 172 b -44 174 -49 174 -47 174 b -35 173 -42 174 -38 173 b 53 86 -32 172 -12 151 b 138 0 100 37 138 0 b 208 84 140 0 170 37 b 284 174 279 173 279 172 b 289 174 285 174 288 174 b 300 173 294 174 298 173 b 462 11 303 172 340 134 l 475 -1 l 503 34 b 541 76 534 72 536 74 b 548 77 544 77 545 77 b 570 56 560 77 570 68 b 567 48 570 54 568 51 b 392 -172 564 41 397 -166 b 378 -176 387 -174 382 -176 b 368 -174 375 -176 371 -176 b 280 -87 367 -173 347 -152 b 194 0 234 -38 194 0 b 126 -86 194 0 163 -38 b 49 -174 54 -174 55 -173 b 44 -176 47 -176 46 -176 b 34 -174 40 -176 36 -174 b -54 -87 31 -173 10 -152 b -140 0 -102 -38 -140 0 b -209 -86 -140 0 -171 -38 b -285 -174 -280 -174 -279 -173 b -291 -176 -287 -176 -288 -176 b -300 -174 -294 -176 -298 -174 b -464 -11 -303 -173 -374 -102 l -476 0 l -506 -37 b -539 -76 -528 -65 -537 -74 b -551 -80 -543 -79 -547 -80 b -570 -68 -558 -80 -566 -76 l -571 -65 l -571 136 b -570 340 -571 331 -571 337 b -559 351 -568 344 -564 348 "},v22:{x_min:0,x_max:432.828125,ha:442,o:"m 209 186 b 213 187 210 187 212 187 b 216 187 215 187 216 187 b 224 174 216 186 220 180 b 420 -1 269 105 338 43 b 432 -12 431 -8 432 -9 b 421 -23 432 -15 432 -16 b 228 -180 345 -70 264 -137 b 219 -188 221 -188 221 -188 l 219 -188 b 208 -177 215 -188 215 -188 b 10 1 163 -106 93 -44 b 0 11 0 6 0 8 b 10 22 0 13 0 15 b 202 179 87 69 167 136 b 209 186 206 183 209 186 "},v23:{x_min:0,x_max:133.390625,ha:136,o:"m 54 66 b 65 68 58 68 61 68 b 122 37 88 68 110 56 b 133 -1 130 26 133 12 b 104 -58 133 -23 123 -44 b 66 -69 92 -65 78 -69 b 10 -38 44 -69 23 -58 b 0 -1 2 -27 0 -13 b 54 66 0 30 20 61 "},v25:{x_min:0,x_max:318.5,ha:325,o:"m 20 376 b 167 377 23 377 96 377 b 296 376 231 377 294 377 b 318 347 311 371 318 359 b 296 316 318 333 311 320 b 159 315 294 315 227 315 b 21 316 91 315 24 315 b 0 345 6 320 0 333 b 20 376 0 359 6 371 "},v26:{x_min:-21.78125,x_max:483.1875,ha:493,o:"m -8 631 b -1 632 -6 632 -4 632 b 19 620 8 632 16 628 b 20 383 20 616 20 616 l 20 148 l 21 151 b 140 199 59 183 102 199 b 206 179 164 199 187 192 l 210 176 l 210 396 l 210 617 l 212 621 b 231 632 216 628 223 632 b 250 620 239 632 247 628 b 251 383 251 616 251 616 l 251 148 l 254 151 b 370 199 291 183 332 199 b 415 191 385 199 400 197 b 483 84 458 176 483 134 b 461 0 483 58 476 29 b 332 -142 439 -40 411 -72 l 255 -215 b 231 -229 240 -229 239 -229 b 216 -223 224 -229 220 -227 b 210 -158 210 -217 210 -223 b 210 -120 210 -148 210 -136 l 210 -29 l 205 -34 b 100 -142 182 -65 159 -88 l 23 -215 b -1 -229 9 -229 6 -229 b -20 -216 -9 -229 -17 -224 l -21 -212 l -21 201 l -21 616 l -20 620 b -8 631 -17 624 -13 630 m 110 131 b 96 133 106 133 100 133 b 89 133 93 133 91 133 b 24 87 63 129 40 113 l 20 80 l 20 -37 l 20 -156 l 23 -152 b 144 81 96 -72 144 20 l 144 83 b 110 131 144 113 134 126 m 341 131 b 328 133 337 133 332 133 b 322 133 326 133 323 133 b 257 87 296 129 273 113 l 251 80 l 251 -37 l 251 -156 l 255 -152 b 375 81 328 -72 375 20 l 375 83 b 341 131 375 113 367 126 "},v27:{x_min:0,x_max:432.828125,ha:442,o:"m 208 184 b 213 187 209 186 212 187 b 224 176 217 187 221 183 b 245 147 225 172 235 159 b 419 -1 288 90 347 38 b 431 -8 424 -4 431 -8 b 432 -12 432 -9 432 -11 b 430 -18 432 -13 432 -16 b 364 -61 424 -20 383 -47 b 225 -183 307 -102 250 -152 b 223 -187 224 -184 223 -187 b 220 -188 221 -188 220 -188 b 208 -176 216 -188 210 -184 b 187 -148 205 -173 197 -159 b 12 0 144 -90 84 -38 b 0 11 4 5 0 8 b 16 24 0 13 4 18 b 183 158 83 69 141 115 b 208 184 194 169 198 173 m 183 105 b 176 113 181 109 176 113 b 172 109 176 113 175 112 b 92 45 149 90 117 62 l 88 41 l 102 31 b 247 -105 160 -6 210 -55 l 254 -115 l 257 -112 l 269 -102 b 340 -45 287 -87 319 -61 l 344 -43 l 330 -33 b 183 105 272 6 221 54 "},v28:{x_min:-73.5,x_max:72.140625,ha:74,o:"m -72 252 l -73 254 l 0 254 l 72 254 l 70 252 b 0 -1 70 248 0 -1 b -72 252 -1 -1 -72 248 "},v29:{x_min:-590.71875,x_max:589.359375,ha:601,o:"m 175 273 b 182 274 178 273 181 274 b 202 262 190 274 198 269 b 204 158 204 259 204 259 l 204 56 l 250 112 b 303 174 296 172 298 172 b 308 174 304 174 307 174 b 318 173 313 174 317 173 b 481 11 322 172 357 134 l 494 -1 l 522 34 b 560 76 553 72 555 74 b 567 77 563 77 564 77 b 589 56 579 77 589 68 b 586 48 589 54 588 51 b 411 -172 583 41 416 -166 b 397 -176 406 -174 401 -176 b 387 -174 393 -176 390 -176 b 299 -87 386 -173 366 -152 b 213 0 253 -38 213 0 b 208 -6 213 0 210 -2 l 204 -12 l 204 -147 b 204 -210 204 -173 204 -194 b 198 -292 204 -297 204 -287 b 183 -299 194 -297 189 -299 b 164 -287 175 -299 167 -295 b 163 -174 163 -284 163 -284 l 161 -63 l 119 -117 b 65 -176 76 -170 73 -176 b 61 -176 63 -176 62 -176 b -35 -87 51 -174 57 -180 b -121 0 -83 -38 -121 0 b -190 -86 -122 0 -152 -38 b -266 -174 -261 -174 -259 -173 b -272 -176 -268 -176 -270 -176 b -281 -174 -276 -176 -280 -174 b -371 -86 -284 -173 -304 -152 b -457 0 -417 -38 -457 0 l -457 0 b -477 -26 -457 0 -470 -16 b -548 -227 -524 -88 -548 -161 b -536 -303 -548 -254 -544 -280 b -533 -317 -534 -309 -533 -313 b -553 -338 -533 -330 -541 -338 b -577 -315 -566 -338 -571 -333 b -590 -227 -586 -287 -590 -258 b -518 -9 -590 -154 -564 -77 b -465 56 -509 2 -504 8 l -402 134 b -363 174 -374 170 -371 174 b -359 174 -362 174 -360 174 b -262 86 -351 174 -356 179 b -176 0 -216 37 -176 0 b -107 84 -176 0 -145 37 b -31 174 -36 173 -38 172 b -25 174 -29 174 -28 174 b -16 173 -23 174 -19 173 b 147 11 -13 172 35 123 l 157 -1 l 160 1 l 163 4 l 163 130 b 164 260 163 256 163 258 b 175 273 166 266 170 270 "},v2a:{x_min:-21.78125,x_max:366.140625,ha:374,o:"m 276 1378 b 284 1379 279 1379 281 1379 b 306 1360 292 1379 298 1374 b 352 1247 326 1326 343 1286 b 366 1139 362 1213 366 1175 b 347 1009 366 1093 359 1049 l 344 1002 l 347 992 b 352 971 348 986 351 977 b 366 863 362 936 366 899 b 347 732 366 818 359 773 l 344 725 l 347 716 b 352 695 348 710 351 700 b 366 588 362 659 366 623 b 223 262 366 464 314 345 b 189 233 212 252 212 252 b 35 76 126 183 73 129 b -1 16 20 56 2 27 b -19 4 -4 9 -12 4 l -21 4 l -21 137 l -21 270 l -17 270 b 186 344 59 281 134 308 b 319 606 270 399 319 499 b 317 650 319 620 319 635 l 315 659 l 314 655 b 223 537 288 607 258 570 b 189 509 212 528 212 528 b 35 352 126 459 73 405 b -1 292 20 333 2 303 b -19 280 -4 285 -12 280 l -21 280 l -21 413 l -21 546 l -17 546 b 186 620 59 557 134 584 b 319 882 270 675 319 775 b 317 925 319 896 319 911 l 315 935 l 314 931 b 223 813 288 884 258 846 b 189 785 212 805 212 805 b 35 628 126 735 73 681 b -1 569 20 609 2 580 b -19 556 -4 562 -12 556 l -21 556 l -21 689 l -21 823 l -17 823 b 202 907 68 835 152 867 b 319 1157 280 968 319 1061 b 270 1338 319 1218 303 1281 b 262 1358 264 1349 262 1353 b 262 1364 262 1360 262 1363 b 276 1378 265 1371 269 1376 "},v2c:{x_min:-597.53125,x_max:596.171875,ha:608,o:"m -413 173 b -408 174 -412 174 -409 174 b -397 173 -404 174 -400 173 b -308 86 -394 172 -374 151 b -223 0 -261 37 -223 0 b -153 84 -223 0 -191 37 b -77 174 -83 173 -84 172 b -72 174 -76 174 -74 174 b -62 173 -68 174 -63 173 b 25 86 -59 172 -39 151 b 112 0 73 37 111 0 b 181 84 112 0 144 37 b 257 174 251 173 251 172 b 262 174 258 174 261 174 b 273 173 266 174 270 173 b 436 9 276 172 347 101 l 447 -1 l 477 36 b 522 79 511 79 513 79 l 522 79 b 552 51 533 79 539 73 b 596 -112 582 6 596 -51 b 567 -262 596 -161 586 -213 b 539 -322 558 -287 544 -316 b 524 -327 534 -326 529 -327 b 504 -315 515 -327 507 -323 b 503 -308 503 -312 503 -309 b 511 -285 503 -302 504 -297 b 555 -113 540 -227 555 -169 b 544 -34 555 -86 551 -59 b 522 19 540 -16 530 8 l 521 22 l 481 -26 l 405 -122 b 353 -176 366 -172 362 -176 b 349 -176 352 -176 351 -176 b 253 -87 341 -176 347 -180 b 167 0 206 -38 167 0 b 99 -86 167 0 136 -38 b 21 -174 27 -174 28 -173 b 17 -176 20 -176 19 -176 b 6 -174 13 -176 9 -174 b -81 -87 4 -173 -14 -152 b -167 0 -129 -38 -167 0 b -236 -86 -167 0 -198 -38 b -313 -174 -307 -174 -306 -173 b -318 -176 -314 -176 -315 -176 b -328 -174 -321 -176 -325 -174 b -491 -12 -330 -173 -367 -137 l -503 0 l -530 -34 b -570 -77 -562 -73 -564 -76 b -577 -79 -571 -79 -574 -79 b -597 -58 -588 -79 -597 -69 b -596 -49 -597 -55 -597 -52 b -417 172 -593 -43 -423 167 b -413 173 -417 172 -415 173 "},v2d:{x_min:0,x_max:438.28125,ha:447,o:"m 212 190 b 219 191 213 191 216 191 b 236 176 225 191 228 190 b 419 18 277 105 341 49 b 436 5 431 13 434 11 b 438 -1 438 4 438 1 b 424 -16 438 -8 432 -13 b 356 -49 409 -20 379 -36 b 234 -180 306 -83 258 -133 b 219 -192 230 -188 224 -192 b 200 -176 213 -192 206 -187 b 9 -15 157 -102 89 -45 b 0 0 2 -12 0 -6 b 16 18 0 9 2 12 b 200 176 93 48 159 104 b 212 190 205 186 208 188 m 239 113 b 236 117 238 116 238 117 b 230 108 235 117 234 115 b 92 -15 196 58 140 8 b 88 -18 91 -16 88 -18 b 92 -20 88 -18 91 -19 b 198 -116 130 -43 166 -74 b 200 -117 200 -117 200 -117 b 201 -117 200 -117 201 -117 b 264 -43 212 -98 242 -62 b 345 15 288 -19 321 4 b 348 18 347 16 348 16 b 344 20 348 18 347 19 b 239 113 307 41 266 79 "},v2f:{x_min:-1.359375,x_max:680.5625,ha:694,o:"m 597 1042 b 604 1042 600 1042 602 1042 b 642 1002 627 1042 642 1022 b 619 966 642 988 635 974 b 439 927 574 942 503 927 l 426 927 l 426 921 b 430 838 428 893 430 866 b 345 480 430 696 398 560 b 179 391 307 423 249 391 b 156 392 171 391 164 392 b 138 394 149 394 142 394 b 103 434 115 396 103 416 b 129 471 103 451 111 466 b 141 474 133 473 137 474 b 172 459 153 474 164 469 b 181 455 175 456 176 455 b 187 456 182 455 185 455 b 253 520 212 460 234 483 b 315 836 294 605 315 714 b 311 928 315 867 314 898 b 302 945 310 943 311 942 b 245 953 283 950 262 953 b 130 891 193 953 149 931 b 84 860 119 870 102 860 b 36 905 61 860 39 877 b 36 910 36 907 36 909 b 80 970 36 931 50 949 b 249 1017 125 1000 187 1017 b 322 1009 273 1017 299 1014 l 341 1003 b 436 991 372 995 406 991 b 577 1031 495 991 545 1004 b 597 1042 583 1038 590 1041 m 416 360 b 424 360 419 360 421 360 b 481 309 454 360 479 338 b 503 145 484 280 495 199 b 585 -185 525 16 555 -106 b 630 -245 596 -213 613 -237 l 634 -247 l 638 -245 b 647 -244 641 -245 645 -244 b 680 -278 666 -244 680 -262 b 664 -308 680 -290 675 -301 b 638 -312 658 -310 650 -312 b 613 -309 631 -312 623 -310 b 477 -201 555 -303 502 -260 b 417 -2 460 -159 434 -72 b 416 5 417 1 416 5 b 416 5 416 5 416 5 b 411 -5 415 5 413 0 b 359 -97 397 -33 377 -70 b 353 -106 355 -102 353 -105 b 359 -112 353 -108 355 -109 b 409 -130 375 -123 390 -129 b 426 -134 420 -130 421 -131 b 431 -147 428 -137 431 -141 b 420 -162 431 -152 427 -159 b 382 -169 409 -166 396 -169 b 323 -155 363 -169 341 -165 l 317 -152 l 314 -155 b 62 -303 240 -240 148 -295 b 36 -305 55 -305 44 -305 b 23 -303 29 -305 24 -305 b -1 -273 6 -299 -1 -287 b 31 -240 -1 -256 10 -240 b 36 -240 32 -240 34 -240 b 42 -241 38 -241 39 -241 b 134 -204 63 -241 99 -226 b 367 288 265 -115 357 81 b 375 330 368 313 370 320 b 416 360 383 347 400 358 m 360 -359 b 379 -359 363 -359 371 -359 b 424 -360 396 -359 416 -359 b 646 -502 536 -373 624 -430 b 649 -527 649 -510 649 -519 b 530 -673 649 -578 604 -635 l 521 -677 l 529 -681 b 653 -811 592 -714 637 -762 b 660 -853 658 -827 660 -839 b 645 -911 660 -873 656 -892 b 426 -1021 608 -981 519 -1021 b 283 -989 377 -1021 328 -1011 b 235 -949 249 -972 239 -964 b 234 -936 234 -946 234 -941 b 234 -928 234 -934 234 -931 l 235 -925 l 234 -927 l 225 -934 b 87 -982 186 -966 138 -982 b 80 -982 85 -982 83 -982 b 55 -981 70 -981 58 -981 b 17 -943 32 -981 17 -964 b 54 -904 17 -921 35 -904 b 78 -914 62 -904 72 -909 l 83 -918 l 88 -918 b 190 -831 122 -918 166 -881 b 269 -506 242 -727 269 -612 b 268 -462 269 -492 269 -477 b 266 -449 266 -458 266 -452 b 265 -444 266 -445 266 -444 b 257 -446 264 -444 261 -445 b 132 -545 196 -470 152 -505 b 88 -573 122 -563 104 -573 b 39 -523 63 -573 39 -553 b 63 -476 39 -505 44 -494 b 360 -359 136 -408 235 -369 m 419 -424 b 393 -423 411 -423 406 -423 l 375 -423 l 377 -426 b 379 -439 377 -427 378 -434 b 383 -510 382 -463 383 -487 b 314 -811 383 -609 360 -710 b 266 -893 296 -850 285 -870 b 264 -898 265 -896 264 -898 l 264 -898 b 264 -898 264 -898 264 -898 b 268 -898 264 -898 266 -898 b 273 -898 270 -898 272 -898 b 300 -909 283 -898 291 -900 b 426 -957 340 -941 385 -957 b 476 -949 443 -957 460 -954 b 547 -853 522 -931 547 -893 b 485 -745 547 -816 526 -775 b 397 -707 460 -727 432 -714 b 366 -675 375 -703 366 -692 b 396 -642 366 -657 377 -645 b 530 -557 455 -637 511 -601 b 536 -527 534 -548 536 -537 b 419 -424 536 -480 490 -437 "},v30:{x_min:-21.78125,x_max:367.5,ha:375,o:"m 276 1900 b 284 1901 279 1900 281 1901 b 306 1883 291 1901 298 1896 b 367 1686 347 1825 367 1757 b 343 1558 367 1643 359 1600 l 338 1549 l 343 1537 b 367 1411 359 1497 367 1454 b 343 1282 367 1367 359 1324 l 338 1272 l 343 1261 b 367 1135 359 1221 367 1178 b 343 1007 367 1090 359 1047 l 338 996 l 343 985 b 367 859 359 945 367 902 b 343 731 367 814 359 771 l 338 720 l 343 709 b 367 582 359 667 367 626 b 289 362 367 503 340 426 b 239 312 276 345 259 330 b 29 77 152 237 76 152 b -1 18 14 54 2 30 b -19 4 -4 11 -12 4 l -21 4 l -21 133 l -20 260 l -13 262 b 98 299 17 269 62 284 b 111 305 103 302 110 305 b 167 334 123 310 156 327 b 319 595 264 391 319 491 b 313 659 319 616 318 638 b 310 667 311 664 311 667 b 307 663 310 667 308 666 b 240 588 289 637 269 614 b 16 331 141 505 62 413 b -1 294 8 316 1 302 b -19 280 -4 287 -12 280 l -21 280 l -21 408 l -20 537 l -13 538 b 98 576 17 545 62 560 b 111 581 103 578 110 581 b 167 610 123 587 156 603 b 319 871 264 667 319 767 b 313 935 319 892 318 913 b 310 942 311 941 311 942 b 307 939 310 942 308 941 b 240 864 289 913 269 889 b 16 607 141 781 62 689 b -1 570 8 592 1 578 b -19 556 -4 563 -12 556 l -21 556 l -21 684 l -20 813 l -13 814 b 98 852 17 821 62 836 b 111 857 103 855 110 857 b 167 886 123 863 156 880 b 319 1147 264 943 319 1043 b 313 1211 319 1168 318 1189 b 310 1218 311 1217 311 1218 b 307 1215 310 1218 308 1217 b 240 1140 289 1188 269 1165 b 16 884 141 1057 62 966 b -1 846 8 868 1 855 b -19 832 -4 839 -12 832 l -21 832 l -21 960 l -20 1089 l -13 1090 b 98 1128 17 1097 62 1111 b 111 1134 103 1131 110 1134 b 167 1163 123 1139 156 1156 b 319 1424 264 1220 319 1320 b 313 1486 319 1444 318 1465 b 310 1494 311 1493 311 1494 b 307 1492 310 1494 308 1493 b 240 1417 289 1464 269 1442 b 16 1160 141 1333 62 1242 b -1 1121 8 1145 1 1131 b -19 1109 -4 1115 -12 1109 l -21 1109 l -21 1236 l -20 1365 l -13 1367 b 98 1404 17 1374 62 1388 b 111 1410 103 1407 110 1410 b 250 1508 172 1437 215 1467 b 319 1701 296 1564 319 1633 b 270 1859 319 1757 303 1814 b 262 1882 265 1868 262 1875 b 276 1900 262 1890 266 1896 "},v31:{x_min:0,x_max:386.5625,ha:394,o:"m 0 173 l 0 347 l 193 347 l 386 347 l 386 173 l 386 0 l 193 0 l 0 0 l 0 173 "},v33:{x_min:-423.3125,x_max:421.9375,ha:431,o:"m -10 276 b -2 277 -8 277 -5 277 b 17 265 5 277 13 273 b 19 163 19 260 19 260 l 19 68 l 39 45 b 277 -95 122 -34 200 -81 b 289 -97 281 -97 285 -97 b 378 0 332 -97 371 -54 b 378 11 378 4 378 6 b 302 83 378 55 345 83 b 242 66 283 83 262 77 b 208 56 231 59 219 56 b 148 120 175 56 148 81 b 200 186 148 151 164 172 b 261 198 220 194 240 198 b 420 45 341 198 411 137 b 421 22 421 37 421 29 b 257 -198 421 -86 347 -188 b 242 -198 251 -198 247 -198 b 20 -105 181 -198 95 -163 l 19 -104 l 19 -183 b 19 -216 19 -195 19 -206 b 12 -273 19 -272 17 -267 b -2 -278 8 -277 2 -278 b -21 -266 -10 -278 -19 -274 b -23 -165 -23 -263 -23 -262 l -23 -69 l -44 -47 b -250 86 -117 23 -183 66 b -295 94 -270 93 -284 94 b -315 91 -302 94 -308 94 b -381 5 -356 81 -381 43 b -355 -56 -381 -16 -372 -40 b -299 -81 -338 -73 -319 -81 b -246 -68 -283 -81 -265 -77 b -212 -58 -234 -61 -223 -58 b -168 -77 -196 -58 -179 -65 b -151 -122 -156 -90 -151 -105 b -179 -174 -151 -141 -160 -162 b -239 -195 -194 -184 -217 -192 b -257 -197 -245 -195 -250 -197 b -423 -5 -349 -197 -423 -113 b -423 0 -423 -4 -423 -1 b -277 194 -420 97 -362 173 b -247 197 -268 197 -258 197 b -24 104 -185 197 -100 162 l -23 102 l -23 181 b -21 265 -23 260 -23 260 b -10 276 -20 269 -14 274 "},v34:{x_min:0,x_max:622.03125,ha:635,o:"m 398 417 b 406 419 401 419 404 419 b 427 398 417 419 427 409 b 427 391 427 395 427 392 b 34 -274 424 385 38 -272 b 20 -280 29 -278 25 -280 b 0 -259 9 -280 0 -270 b 0 -252 0 -256 0 -254 b 393 413 2 -247 389 410 b 398 417 394 415 397 416 m 592 417 b 600 419 594 419 597 419 b 622 398 611 419 622 409 b 620 391 622 395 620 392 b 227 -274 617 385 231 -272 b 213 -280 223 -278 219 -280 b 193 -259 202 -280 193 -270 b 194 -252 193 -256 193 -254 b 586 413 196 -247 582 410 b 592 417 588 415 590 416 "},v36:{x_min:-1.359375,x_max:1064.390625,ha:1086,o:"m 296 692 b 314 694 302 694 307 694 b 386 685 337 694 366 689 b 548 498 480 660 548 580 b 548 481 548 492 548 487 b 455 395 541 426 499 395 b 370 462 420 395 383 417 b 362 496 364 477 362 488 b 377 514 362 509 367 514 b 393 501 386 514 390 510 b 432 474 397 484 413 474 b 470 487 445 474 458 478 b 491 530 484 496 491 510 b 490 544 491 534 491 539 b 333 660 479 606 411 657 l 323 662 l 315 646 b 269 524 285 591 269 556 b 321 431 269 492 287 466 b 349 395 338 413 343 408 b 363 342 359 378 363 362 b 359 312 363 333 362 322 b 285 158 348 266 318 206 b 281 152 283 155 281 152 b 281 152 281 152 281 152 b 287 154 283 152 284 152 b 318 155 298 154 308 155 b 461 98 371 155 419 136 l 464 97 l 483 112 b 503 129 494 120 503 127 b 504 130 503 129 504 129 b 503 138 504 131 503 134 b 500 180 500 152 500 166 b 553 326 500 238 518 288 b 604 366 560 331 592 358 b 649 381 617 376 632 381 b 696 362 665 381 681 374 b 724 302 714 347 724 324 b 695 238 724 278 714 255 b 660 210 691 234 662 212 b 579 148 658 209 582 151 b 579 148 579 148 579 148 b 596 106 579 144 589 119 b 622 77 604 88 609 83 b 657 69 632 72 645 69 b 748 112 688 69 721 84 b 755 123 754 117 755 120 b 755 127 755 124 755 126 b 751 165 752 137 751 151 b 758 219 751 183 754 202 b 894 387 774 290 820 347 b 896 390 896 388 896 388 b 891 398 896 391 895 392 b 622 560 827 477 730 535 b 600 580 605 564 600 569 b 617 596 600 591 607 596 b 628 595 622 596 624 596 b 1057 248 846 552 1020 412 b 1064 191 1061 229 1064 209 b 922 0 1064 94 1005 9 b 902 -1 916 -1 909 -1 b 774 76 847 -1 800 26 b 769 83 770 81 770 83 b 769 81 769 83 769 83 b 627 -1 733 29 677 -1 b 548 27 597 -1 570 8 b 515 88 537 37 525 61 l 513 95 l 510 93 l 453 45 b 390 0 396 0 396 0 b 390 0 390 0 390 0 b 374 15 381 0 377 4 b 268 105 359 69 314 105 b 250 104 262 105 257 105 l 243 102 l 234 90 b 155 1 201 49 159 2 b 147 -1 152 0 149 -1 b 130 15 138 -1 130 6 b 132 20 130 18 132 19 b 136 31 133 22 134 27 b 220 131 149 74 178 109 b 231 137 225 134 230 136 b 302 278 280 202 302 244 b 265 335 302 299 295 309 b 209 442 234 363 213 402 b 209 455 209 446 209 451 b 279 648 209 502 232 564 l 285 659 l 283 659 b 176 627 238 653 210 645 b 57 477 111 594 66 538 b 55 459 55 471 55 464 b 72 409 55 437 61 415 b 93 403 78 405 87 403 b 152 467 123 403 151 431 b 168 488 153 483 157 488 b 185 462 181 488 185 483 l 185 460 b 137 344 183 409 168 369 b 78 322 119 328 98 322 b 13 360 50 322 25 335 b -1 426 4 380 -1 402 b 89 610 -1 488 32 559 b 296 692 147 659 210 685 m 926 348 b 921 353 924 351 922 353 b 914 348 920 353 918 351 b 823 167 857 306 823 237 b 828 124 823 154 826 138 b 890 31 837 79 862 40 b 896 31 892 31 894 31 b 956 104 916 31 940 59 b 970 191 965 129 970 159 b 966 241 970 208 969 224 b 926 348 959 277 945 313 m 627 326 b 619 326 624 326 622 326 b 598 316 611 326 604 323 b 568 215 579 288 568 255 b 568 208 568 213 568 210 b 571 183 570 195 570 184 l 571 183 b 594 201 571 183 582 191 l 634 231 b 660 259 653 247 656 248 b 664 278 662 266 664 272 b 627 326 664 299 649 320 "},v38:{x_min:-1.359375,x_max:651.96875,ha:665,o:"m 389 644 b 405 645 394 645 400 645 b 504 566 450 645 492 613 b 507 541 506 557 507 549 b 480 471 507 514 498 489 l 477 467 l 483 470 b 609 591 539 485 586 531 b 613 601 611 595 613 599 b 631 609 619 607 624 609 b 651 588 641 609 651 602 b 200 -946 651 584 204 -941 b 182 -957 197 -953 190 -957 b 163 -945 174 -957 166 -953 b 161 -939 161 -942 161 -942 b 217 -743 161 -931 170 -904 b 272 -555 247 -639 272 -555 b 272 -555 272 -555 272 -555 b 264 -560 272 -555 268 -557 b 140 -603 227 -589 182 -603 b 36 -567 102 -603 65 -592 b -1 -487 12 -548 -1 -517 b 17 -427 -1 -466 5 -445 b 103 -380 38 -395 70 -380 b 191 -433 137 -380 172 -398 b 205 -484 201 -448 205 -466 b 178 -553 205 -509 196 -535 l 175 -557 l 182 -555 b 307 -435 236 -539 284 -494 b 372 -213 308 -430 372 -215 b 372 -213 372 -213 372 -213 b 364 -219 372 -213 368 -216 b 240 -262 328 -247 283 -262 b 137 -226 202 -262 166 -249 b 99 -145 112 -206 99 -176 b 118 -84 99 -124 106 -104 b 204 -38 138 -54 171 -38 b 292 -91 238 -38 273 -56 b 306 -141 302 -106 306 -124 b 279 -212 306 -167 296 -194 l 276 -215 l 281 -213 b 408 -93 336 -198 385 -151 b 473 129 409 -88 473 127 b 473 129 473 129 473 129 b 465 122 473 129 469 126 b 341 80 428 94 383 80 b 236 115 303 80 266 91 b 200 195 213 136 200 165 b 217 256 200 217 206 238 b 304 303 239 287 272 303 b 393 249 338 303 374 285 b 406 199 402 234 406 217 b 379 129 406 173 397 148 l 377 126 l 382 127 b 509 248 436 142 485 190 b 574 470 510 254 574 469 b 574 470 574 470 574 470 b 566 464 574 470 570 467 b 442 421 529 435 484 421 b 337 458 404 421 367 433 b 300 537 313 478 300 508 b 389 644 300 585 334 635 "},v39:{x_min:-171.5,x_max:251.8125,ha:257,o:"m -8 631 b -1 632 -6 632 -4 632 b 19 620 8 632 16 628 b 20 553 20 616 20 614 b 20 491 20 503 20 491 l 20 491 b 153 535 47 501 149 535 b 174 514 167 535 174 524 b 164 496 174 508 171 501 b 92 470 164 495 132 484 l 20 445 l 20 390 b 20 363 20 378 20 370 b 20 333 20 340 20 333 l 20 333 b 153 377 47 344 149 377 b 174 356 167 377 174 367 b 164 338 174 349 171 342 b 92 312 164 338 132 326 l 20 288 l 20 219 l 20 148 l 21 151 b 137 199 59 183 99 199 b 182 191 152 199 167 197 b 251 84 227 176 251 134 b 228 0 251 58 243 29 b 100 -142 206 -40 178 -72 l 23 -215 b -1 -229 9 -229 6 -229 b -20 -216 -9 -229 -17 -224 b -21 30 -21 -212 -21 -212 b -21 273 -21 163 -21 273 b -84 252 -21 273 -50 263 b -152 230 -133 234 -145 230 b -157 231 -155 230 -156 231 b -171 252 -166 234 -171 244 b -160 270 -171 259 -167 266 b -27 316 -159 270 -93 294 l -21 319 l -21 374 b -21 431 -21 406 -21 431 b -84 409 -21 431 -50 421 b -152 388 -133 392 -145 388 b -157 390 -155 388 -156 388 b -171 409 -166 392 -171 401 b -160 428 -171 417 -167 424 b -27 474 -159 428 -93 451 l -21 476 l -21 546 b -20 620 -21 614 -21 616 b -8 631 -17 624 -13 630 m 110 131 b 96 133 106 133 100 133 b 89 133 93 133 91 133 b 24 87 63 129 40 113 l 20 80 l 20 -37 l 20 -156 l 23 -152 b 144 81 96 -72 144 20 l 144 83 b 110 131 144 113 134 126 "},v3b:{x_min:0,x_max:484.5625,ha:494,o:"m 228 245 b 239 247 234 247 239 247 b 243 247 240 247 242 247 b 303 238 257 247 287 242 b 484 -2 417 208 484 104 b 412 -177 484 -65 461 -127 b 243 -248 363 -226 303 -248 b 6 -63 138 -248 36 -180 b 0 -1 1 -41 0 -20 b 228 245 0 127 98 240 m 255 181 b 240 183 247 183 245 183 b 232 181 238 183 235 183 b 142 152 200 180 168 170 l 138 149 l 190 97 l 242 44 l 294 97 l 345 149 l 340 152 b 255 181 315 169 284 180 m 147 -54 l 197 -1 l 147 51 l 95 104 l 91 99 b 62 -1 72 70 62 34 b 66 -43 62 -15 63 -29 b 91 -101 72 -63 80 -84 l 95 -106 l 147 -54 m 393 99 b 389 104 390 102 389 104 b 337 51 389 104 366 80 l 285 -1 l 337 -54 l 389 -106 l 393 -101 b 421 -1 412 -72 421 -36 b 393 99 421 34 412 69 m 294 -98 b 242 -45 265 -69 242 -45 b 190 -98 242 -45 219 -69 l 138 -151 l 142 -154 b 242 -184 172 -174 206 -184 b 340 -154 276 -184 311 -174 l 345 -151 l 294 -98 "},v3c:{x_min:0,x_max:450.53125,ha:460,o:"m 189 302 b 204 303 193 302 198 303 b 303 224 250 303 292 270 b 306 199 304 216 306 208 b 279 129 306 173 296 147 l 276 126 l 281 127 b 408 249 337 142 385 190 b 412 259 409 254 412 258 b 430 267 417 265 423 267 b 450 247 441 267 450 259 b 200 -605 450 242 204 -599 b 182 -616 197 -612 190 -616 b 163 -602 174 -616 166 -610 b 161 -598 161 -601 161 -601 b 217 -402 161 -589 170 -562 b 272 -213 247 -298 272 -213 b 272 -213 272 -213 272 -213 b 264 -219 272 -213 268 -216 b 140 -262 227 -247 182 -262 b 36 -226 102 -262 65 -249 b 0 -145 12 -206 0 -176 b 17 -84 0 -124 5 -104 b 103 -38 38 -54 70 -38 b 191 -91 137 -38 172 -56 b 205 -141 201 -106 205 -124 b 178 -212 205 -167 196 -194 l 175 -215 l 182 -213 b 307 -93 236 -198 284 -151 b 372 129 308 -88 372 127 b 372 129 372 129 372 129 b 364 122 372 129 368 126 b 240 80 328 94 283 80 b 137 115 202 80 166 91 b 99 194 111 136 99 165 b 189 302 99 244 133 292 "},v3e:{x_min:0,x_max:406.96875,ha:415,o:"m 21 183 b 28 183 24 183 25 183 b 42 181 34 183 39 183 b 127 108 47 179 47 179 b 202 41 168 72 202 41 b 279 108 204 41 238 72 b 357 177 321 145 356 176 b 375 183 363 181 370 183 b 406 151 392 183 406 169 b 404 137 406 147 405 141 b 322 62 401 131 398 129 b 251 0 284 27 251 0 b 322 -63 251 -1 284 -29 b 404 -138 398 -130 401 -133 b 406 -152 405 -142 406 -148 b 375 -184 406 -170 392 -184 b 357 -179 370 -184 363 -183 b 279 -109 356 -177 321 -147 b 202 -43 238 -73 204 -43 b 127 -109 202 -43 168 -73 b 49 -179 85 -147 50 -177 b 31 -184 43 -183 36 -184 b 0 -152 13 -184 0 -170 b 2 -138 0 -148 0 -142 b 83 -63 5 -133 8 -130 b 155 0 122 -29 155 -1 b 83 62 155 0 122 27 b 8 129 43 97 10 127 b 0 151 2 136 0 144 b 21 183 0 165 8 177 "},v3f:{x_min:-24.5,x_max:317.140625,ha:324,o:"m -24 -147 l -24 -5 l -20 -5 b -1 -19 -12 -5 -4 -11 b 58 -123 6 -43 31 -86 b 196 -278 93 -173 134 -219 b 317 -570 274 -356 317 -460 b 294 -713 317 -617 308 -666 l 289 -724 l 294 -735 b 317 -873 308 -780 317 -827 b 235 -1132 317 -963 288 -1054 b 209 -1165 228 -1140 224 -1146 b 189 -1177 204 -1172 196 -1177 b 171 -1164 182 -1177 175 -1172 b 168 -1154 170 -1161 168 -1159 b 181 -1132 168 -1149 172 -1142 b 269 -891 238 -1064 269 -975 b 269 -881 269 -886 269 -884 b 262 -814 269 -857 265 -827 b 258 -800 261 -811 259 -806 b 142 -628 240 -731 198 -667 b -8 -589 112 -606 47 -589 b -20 -589 -13 -589 -19 -589 l -24 -589 l -24 -449 l -24 -308 l -20 -308 b -1 -322 -12 -308 -4 -313 b 58 -424 6 -345 31 -388 b 194 -580 93 -476 136 -523 b 259 -660 221 -606 245 -635 b 261 -663 259 -662 261 -663 b 264 -656 262 -663 262 -660 b 269 -587 268 -632 269 -610 b 264 -521 269 -566 268 -544 b 262 -512 264 -517 262 -513 b 258 -498 261 -509 259 -503 b 142 -326 240 -428 198 -365 b -8 -287 112 -303 47 -288 b -20 -287 -13 -287 -19 -287 l -24 -287 l -24 -147 "},v40:{x_min:-1.359375,x_max:436.921875,ha:446,o:"m 213 205 b 217 205 215 205 216 205 b 234 194 224 205 234 199 b 236 187 234 194 235 190 l 245 167 l 261 129 l 270 106 b 355 -61 294 54 329 -13 b 420 -163 381 -105 402 -138 b 436 -188 435 -184 436 -184 b 436 -191 436 -190 436 -190 b 421 -206 436 -201 431 -206 l 421 -206 l 416 -206 l 405 -201 b 217 -158 347 -172 283 -158 b 31 -201 153 -158 88 -172 l 20 -206 l 14 -206 l 14 -206 b 0 -191 5 -206 0 -201 b -1 -188 0 -190 -1 -190 b 14 -163 -1 -186 0 -184 b 95 -34 36 -136 72 -77 b 166 106 119 8 148 68 l 175 129 l 183 148 l 200 188 b 213 205 205 199 208 202 "},v41:{x_min:-1.359375,x_max:556.6875,ha:568,o:"m 294 322 b 318 323 299 322 308 323 b 360 320 334 323 352 322 b 526 217 430 310 490 273 b 543 166 537 202 543 184 b 447 70 543 117 503 70 b 445 70 447 70 446 70 b 359 159 394 72 359 113 b 368 201 359 173 362 187 b 442 245 382 229 412 245 b 455 244 446 245 451 245 b 460 244 458 244 460 244 b 460 244 460 244 460 244 b 454 248 460 244 458 245 b 325 291 417 276 372 291 b 285 287 313 291 299 290 b 144 -2 183 269 144 190 b 281 -290 144 -208 179 -280 b 304 -291 289 -291 298 -291 b 524 -105 412 -291 506 -212 b 541 -84 526 -88 530 -84 b 556 -101 551 -84 556 -90 b 549 -138 556 -111 553 -122 b 334 -322 521 -237 435 -310 b 302 -324 323 -323 313 -324 b 13 -101 172 -324 54 -234 b -1 -1 4 -68 -1 -34 b 294 322 -1 161 121 303 "},v42:{x_min:-348.4375,x_max:24.5,ha:25,o:"m -330 155 b -322 156 -329 156 -326 156 b -315 156 -319 156 -317 156 b -298 147 -311 155 -308 154 b -19 30 -224 98 -122 55 l 2 26 b 24 -1 17 22 24 13 b 2 -27 24 -15 17 -23 l -19 -31 b -298 -148 -122 -56 -224 -99 b -322 -158 -313 -158 -315 -158 b -348 -131 -338 -158 -348 -145 b -344 -117 -348 -127 -347 -122 b -328 -104 -341 -112 -338 -111 b -127 -8 -269 -65 -202 -33 b -106 0 -115 -4 -106 -1 b -127 6 -106 0 -115 2 b -328 102 -202 31 -269 63 b -344 116 -338 109 -341 111 b -348 130 -347 120 -348 124 b -330 155 -348 141 -341 152 "},v43:{x_min:-442.359375,x_max:441,ha:450,o:"m -31 487 b -1 488 -21 488 -10 488 b 434 104 216 488 397 330 b 441 27 438 79 441 47 b 439 12 441 20 439 15 b 419 0 435 4 427 0 b 404 5 413 0 408 1 b 398 30 400 11 398 13 b 0 351 390 213 213 351 b -59 348 -20 351 -39 349 b -400 30 -251 324 -393 191 b -405 5 -400 13 -401 11 b -420 0 -409 1 -415 0 b -441 12 -428 0 -436 4 b -442 27 -441 15 -442 20 b -435 104 -442 47 -439 79 b -31 487 -401 316 -235 474 m -13 131 b -1 133 -9 133 -5 133 b 51 105 19 133 39 123 b 61 70 58 95 61 83 b 51 34 61 58 58 45 b -1 6 39 16 19 6 b -46 27 -17 6 -34 13 b -62 69 -57 38 -62 54 b -13 131 -62 98 -44 124 "},v44:{x_min:-21.78125,x_max:251.8125,ha:257,o:"m -8 631 b -1 632 -6 632 -4 632 b 19 620 8 632 16 628 b 20 383 20 616 20 616 l 20 148 l 21 151 b 137 199 59 183 99 199 b 182 191 152 199 167 197 b 251 84 227 176 251 134 b 228 0 251 58 243 29 b 100 -142 206 -40 178 -72 l 23 -215 b 0 -229 9 -229 6 -229 b -20 -216 -9 -229 -17 -224 l -21 -212 l -21 201 l -21 616 l -20 620 b -8 631 -17 624 -13 630 m 110 131 b 96 133 106 133 100 133 b 89 133 93 133 91 133 b 24 87 63 129 40 113 l 20 80 l 20 -37 l 20 -156 l 23 -152 b 144 81 96 -72 144 20 l 144 83 b 110 131 144 113 134 126 "},v45:{x_min:-402.890625,x_max:401.53125,ha:410,o:"m -10 273 b -4 274 -9 273 -6 274 b 16 262 4 274 12 269 b 17 158 17 259 17 259 l 17 56 l 62 112 b 117 174 110 172 110 172 b 122 174 118 174 119 174 b 132 173 125 174 129 173 b 295 11 134 172 171 134 l 307 -1 l 336 34 b 374 76 366 72 368 74 b 381 77 375 77 378 77 b 401 56 392 77 401 68 b 400 48 401 54 401 51 b 223 -172 397 41 230 -166 b 210 -176 220 -174 215 -176 b 201 -174 206 -176 204 -176 b 112 -87 198 -173 178 -152 b 27 0 65 -38 27 0 b 21 -6 27 0 24 -2 l 17 -12 l 17 -147 b 17 -210 17 -173 17 -194 b 10 -292 17 -297 16 -287 b -2 -299 6 -297 2 -299 b -21 -287 -10 -299 -19 -295 b -24 -174 -23 -284 -23 -284 l -24 -63 l -66 -117 b -121 -176 -110 -170 -114 -176 b -125 -176 -122 -176 -123 -176 b -296 -12 -134 -174 -125 -184 l -308 0 l -337 -34 b -375 -77 -367 -73 -370 -76 b -382 -79 -377 -79 -379 -79 b -402 -58 -393 -79 -402 -69 b -401 -49 -402 -55 -402 -52 b -224 170 -398 -43 -231 165 b -212 174 -221 173 -216 174 b -202 173 -208 174 -205 174 b -39 11 -200 172 -151 122 l -28 -1 l -25 1 l -24 4 l -24 130 b -23 260 -24 256 -24 258 b -10 273 -20 266 -16 270 "},v46:{x_min:0,x_max:627.46875,ha:640,o:"m 306 190 b 314 191 308 191 311 191 b 326 184 318 191 322 190 l 336 173 b 510 52 377 127 442 80 b 515 49 513 51 515 49 b 611 16 537 40 579 24 b 627 0 624 13 627 9 b 607 -18 627 -11 624 -13 b 330 -181 490 -49 389 -109 b 314 -192 323 -190 319 -192 b 306 -191 311 -192 308 -192 b 294 -177 302 -188 302 -188 b 257 -140 287 -170 265 -148 b 19 -18 193 -84 114 -44 b 0 0 2 -13 0 -11 b 16 16 0 9 2 13 b 110 49 47 24 89 40 b 117 52 111 49 114 51 b 145 65 126 56 130 58 b 281 163 200 93 245 124 b 300 186 288 170 291 174 b 306 190 300 187 303 188 m 317 137 b 313 142 315 141 314 142 b 308 137 313 142 311 141 b 161 4 276 84 220 33 b 155 0 159 1 155 0 b 163 -4 155 0 159 -2 b 308 -138 220 -34 276 -84 b 313 -142 311 -141 313 -142 b 317 -138 314 -142 315 -141 b 464 -4 351 -84 406 -34 b 470 0 468 -2 470 0 b 464 4 470 0 468 1 b 317 137 406 33 351 84 "},v47:{x_min:-24.5,x_max:315.78125,ha:322,o:"m -24 -145 l -24 -5 l -20 -5 b 1 -26 -10 -5 -6 -9 b 175 -241 31 -86 96 -166 b 314 -548 259 -323 304 -420 b 315 -589 315 -555 315 -571 b 314 -630 315 -606 315 -623 b 298 -730 311 -664 306 -699 l 295 -742 l 296 -748 b 314 -850 304 -778 311 -813 b 315 -892 315 -857 315 -874 b 314 -932 315 -909 315 -925 b 298 -1032 311 -967 306 -1002 l 295 -1045 l 296 -1050 b 314 -1153 304 -1081 311 -1115 b 315 -1193 315 -1160 315 -1177 b 314 -1235 315 -1211 315 -1228 b 217 -1526 306 -1338 270 -1444 b 201 -1533 213 -1532 208 -1533 b 182 -1522 193 -1533 185 -1529 b 179 -1514 181 -1518 179 -1517 b 189 -1489 179 -1508 182 -1501 b 266 -1217 240 -1403 266 -1308 b 262 -1156 266 -1196 265 -1177 b 110 -907 247 -1043 190 -950 b 0 -889 87 -895 50 -889 l -1 -889 l -24 -889 l -24 -749 l -24 -610 l -20 -610 b 1 -631 -10 -610 -6 -614 b 175 -846 31 -691 96 -771 b 259 -956 213 -884 236 -914 b 265 -966 262 -961 264 -966 b 265 -966 265 -966 265 -966 b 265 -953 265 -964 265 -959 b 266 -920 266 -943 266 -932 b 262 -853 266 -898 265 -873 b 110 -605 247 -741 190 -648 b 0 -587 87 -592 50 -587 l -1 -587 l -24 -587 l -24 -448 l -24 -308 l -20 -308 b 1 -328 -10 -308 -6 -312 b 175 -544 31 -388 96 -469 b 259 -655 213 -581 236 -612 b 265 -663 262 -659 264 -663 b 265 -663 265 -663 265 -663 b 265 -650 265 -663 265 -657 b 266 -617 266 -641 266 -630 b 262 -551 266 -595 265 -570 b 110 -303 247 -438 190 -345 b 0 -284 87 -290 50 -284 l -1 -284 l -24 -284 l -24 -145 "},v49:{x_min:0,x_max:630.203125,ha:643,o:"m 308 204 b 314 205 310 205 313 205 b 326 201 319 205 323 204 b 355 154 328 199 338 180 b 401 83 362 142 392 95 l 409 72 b 431 41 412 66 424 49 b 619 -174 498 -51 570 -134 b 630 -192 626 -180 630 -186 b 626 -202 630 -195 628 -199 b 616 -206 623 -205 620 -206 b 552 -188 608 -206 592 -202 b 310 -155 488 -169 392 -155 b 268 -156 295 -155 281 -155 b 77 -188 197 -161 126 -173 b 13 -206 35 -202 20 -206 b 9 -206 12 -206 10 -206 b 0 -191 2 -202 0 -197 b 8 -176 0 -186 2 -180 b 204 49 58 -136 138 -43 l 220 72 l 227 83 b 295 188 245 108 281 166 b 308 204 299 197 304 202 m 315 147 b 314 147 315 147 314 147 b 314 147 314 147 314 147 b 306 129 314 145 310 138 l 296 105 b 281 72 292 97 284 77 l 274 56 b 181 -123 247 -4 212 -72 l 174 -134 l 176 -133 b 314 -123 215 -127 272 -123 b 451 -133 356 -123 413 -127 l 454 -134 l 449 -123 b 353 56 417 -72 381 -4 l 347 72 b 332 105 344 77 336 97 l 322 129 b 315 147 318 138 315 145 "},v4a:{x_min:70.78125,x_max:378.390625,ha:315,o:"m 246 373 b 254 373 249 373 251 373 b 372 324 303 373 360 351 b 378 302 377 317 378 309 b 338 251 378 278 362 255 b 328 249 334 249 332 249 b 283 294 303 249 283 270 b 288 315 283 301 284 308 b 289 319 289 317 289 319 b 289 319 289 319 289 319 b 283 320 289 320 287 320 b 270 322 279 322 274 322 b 206 288 242 322 215 308 b 206 283 206 287 206 285 b 257 223 206 267 230 238 b 284 206 272 213 277 210 b 351 90 328 173 351 130 b 340 47 351 74 348 59 b 205 -30 314 -2 264 -30 b 182 -29 198 -30 190 -30 b 84 15 147 -24 103 -5 b 70 48 74 24 70 36 b 108 99 70 70 85 94 b 121 102 112 101 117 102 b 167 56 147 102 167 80 b 159 31 167 48 164 40 l 156 26 l 157 26 b 190 20 167 22 178 20 b 220 26 201 20 212 22 b 258 65 243 34 258 51 b 257 70 258 66 258 69 b 204 126 249 94 234 109 b 114 258 148 158 114 209 b 125 302 114 273 118 288 b 246 373 147 342 193 370 "},v4b:{x_min:0,x_max:503.609375,ha:514,o:"m 274 430 b 277 430 276 430 277 430 b 310 394 296 430 310 415 b 308 383 310 391 308 387 b 306 367 307 381 307 374 b 236 120 298 305 272 210 b 40 -273 189 -5 125 -134 b 20 -287 35 -283 27 -287 b 5 -281 14 -287 9 -285 b 0 -267 1 -277 0 -273 b 9 -242 0 -262 2 -255 b 246 395 137 -12 232 242 b 274 430 249 416 257 427 m 468 430 b 472 430 469 430 470 430 b 503 394 490 430 503 415 b 502 383 503 391 503 387 b 499 367 502 381 500 374 b 431 120 491 305 465 210 b 234 -273 382 -5 318 -134 b 213 -287 228 -283 220 -287 b 198 -281 208 -287 202 -285 b 193 -267 194 -277 193 -273 b 202 -242 193 -262 196 -255 b 439 395 330 -12 426 242 b 468 430 442 416 451 427 "},v4d:{x_min:-311.6875,x_max:310.328125,ha:317,o:"m -9 388 b -2 390 -8 390 -5 390 b 5 388 1 390 4 390 b 19 378 10 387 16 383 b 23 333 23 371 23 371 b 24 298 23 299 24 298 b 81 276 34 298 65 285 b 213 91 145 240 190 177 b 224 24 217 76 224 36 b 257 24 224 24 235 24 b 299 19 292 24 292 24 b 310 -1 306 15 310 6 b 299 -23 310 -11 306 -19 b 257 -27 292 -27 292 -27 b 224 -29 235 -27 224 -29 b 213 -95 224 -40 217 -80 b 81 -280 190 -181 145 -244 b 24 -301 65 -290 34 -301 b 23 -335 24 -301 23 -303 l 23 -340 b 17 -381 23 -374 23 -374 b -1 -391 13 -388 5 -391 b -21 -381 -9 -391 -17 -388 b -27 -340 -27 -374 -27 -374 l -27 -335 b -28 -301 -27 -303 -27 -301 b -85 -280 -38 -301 -69 -290 b -217 -95 -149 -244 -194 -181 b -228 -29 -221 -80 -228 -40 b -259 -27 -228 -29 -238 -27 b -300 -23 -294 -27 -294 -27 b -311 -2 -307 -19 -311 -11 b -294 23 -311 8 -304 19 b -259 24 -291 23 -284 24 b -228 24 -239 24 -228 24 b -217 91 -228 36 -221 76 b -85 276 -194 177 -149 240 b -28 298 -69 285 -38 298 b -27 333 -27 298 -27 299 b -27 371 -27 362 -27 369 b -9 388 -24 378 -17 385 m -27 136 b -28 247 -27 197 -28 247 b -61 216 -31 247 -53 226 b -123 33 -95 172 -121 98 l -125 24 l -76 24 l -27 24 l -27 136 m 29 242 b 24 247 27 245 24 247 b 23 136 24 247 23 197 l 23 24 l 72 24 l 121 24 l 119 33 b 29 242 115 116 77 206 m -27 -140 l -27 -27 l -76 -27 l -125 -27 l -123 -36 b -61 -220 -121 -102 -95 -176 b -28 -251 -53 -230 -31 -251 b -27 -140 -28 -251 -27 -201 m 119 -36 l 121 -27 l 72 -27 l 23 -27 l 23 -140 b 24 -251 23 -201 24 -251 b 57 -220 27 -251 49 -230 b 119 -36 91 -176 117 -102 "},v4e:{x_min:0,x_max:239.5625,ha:244,o:"m 10 460 b 20 462 13 462 14 462 b 39 449 28 462 35 458 l 40 446 l 40 326 b 40 205 40 259 40 205 b 127 227 40 205 80 215 b 220 249 196 244 213 249 b 227 247 224 249 225 248 b 238 237 231 245 235 241 l 239 233 l 239 -106 l 239 -448 l 238 -451 b 219 -463 234 -459 225 -463 b 198 -451 210 -463 202 -459 l 197 -448 l 197 -324 b 197 -201 197 -248 197 -201 b 110 -223 196 -201 157 -210 b 17 -245 42 -240 24 -245 b 10 -242 13 -245 13 -244 b 0 -233 6 -241 2 -237 l 0 -230 l 0 108 l 0 446 l 0 449 b 10 460 2 453 6 458 m 197 22 b 197 70 197 41 197 58 b 196 116 197 113 197 116 l 196 116 b 118 97 196 116 160 106 l 40 77 l 40 -18 b 40 -112 40 -69 40 -112 l 119 -93 l 197 -73 l 197 22 "},v51:{x_min:-1.359375,x_max:455.96875,ha:465,o:"m 352 541 b 357 542 353 542 355 542 b 377 530 364 542 372 537 l 378 526 l 378 394 l 379 262 l 404 266 b 436 270 420 269 430 270 b 450 265 443 270 446 269 b 455 220 455 259 455 260 l 455 208 l 455 161 l 454 156 b 411 140 449 147 447 147 b 378 133 393 137 379 134 b 378 68 378 133 378 106 b 378 22 378 54 378 38 l 379 -87 l 404 -83 b 436 -79 420 -80 430 -79 b 450 -84 443 -79 446 -80 b 455 -129 455 -90 455 -88 l 455 -141 l 455 -188 l 454 -192 b 413 -209 449 -202 447 -202 b 382 -215 398 -212 383 -215 l 378 -215 l 378 -345 l 378 -380 b 375 -485 378 -484 378 -480 b 357 -494 371 -491 364 -494 b 340 -485 351 -494 344 -491 b 336 -383 337 -480 336 -484 l 336 -349 l 336 -223 l 334 -223 b 291 -231 334 -223 314 -227 l 247 -240 l 247 -371 l 246 -503 l 245 -506 b 225 -519 242 -514 234 -519 b 206 -506 219 -519 210 -514 l 205 -503 l 205 -376 l 205 -248 l 160 -256 l 115 -265 l 115 -396 l 115 -527 l 114 -531 b 95 -544 110 -539 102 -544 b 76 -531 87 -544 78 -539 l 73 -527 l 73 -399 b 73 -273 73 -330 73 -273 b 49 -277 73 -273 61 -274 b 17 -281 32 -280 24 -281 b 4 -276 10 -281 8 -280 b -1 -234 0 -269 -1 -272 b 0 -219 -1 -229 0 -224 l 0 -170 l 1 -167 b 10 -158 2 -163 6 -159 b 49 -149 13 -156 16 -155 l 73 -145 l 73 -34 b 73 76 73 26 73 76 b 49 72 73 76 61 74 b 17 68 32 69 24 68 b 4 73 10 68 8 69 b -1 115 0 80 -1 77 b 0 130 -1 120 0 124 l 0 179 l 1 181 b 10 191 2 186 6 190 b 49 199 13 192 16 194 l 73 204 l 73 338 b 73 374 73 352 73 365 b 77 483 73 484 73 477 b 95 492 81 489 88 492 b 111 483 100 492 107 489 b 115 378 115 477 115 483 l 115 342 b 117 212 115 223 115 212 b 204 229 117 212 200 227 l 205 229 l 205 365 l 205 502 l 206 505 b 225 517 210 513 219 517 b 245 505 234 517 242 513 l 246 502 l 247 369 l 247 237 l 249 237 b 336 254 253 238 336 254 b 337 390 336 254 337 302 l 337 526 l 338 530 b 352 541 341 535 347 539 m 336 15 b 336 126 336 102 336 126 l 336 126 b 291 117 336 126 315 122 l 247 109 l 247 -1 l 247 -112 l 249 -112 b 336 -95 253 -111 336 -95 b 336 15 336 -95 336 -56 m 205 -120 b 205 -55 205 -120 205 -93 b 205 -9 205 -41 205 -24 l 205 101 l 160 93 l 115 84 l 115 -26 b 115 -83 115 -49 115 -69 b 117 -137 115 -133 115 -137 b 205 -120 118 -137 204 -120 "},v52:{x_min:-10.890625,x_max:298.078125,ha:294,o:"m 138 473 b 142 474 140 473 141 474 b 164 459 148 474 153 470 b 191 402 183 442 191 423 b 181 353 191 388 187 371 b 178 349 179 352 178 349 b 179 348 178 348 179 348 b 185 349 181 348 182 348 b 255 376 210 355 234 363 b 272 381 264 381 266 381 b 298 355 287 381 298 370 b 288 330 298 348 298 345 b 171 34 238 254 194 141 b 166 13 168 16 168 16 b 144 1 161 5 152 1 b 121 15 134 1 125 5 b 115 33 119 18 117 24 b 0 330 91 145 49 252 b -10 355 -9 345 -10 348 b 13 381 -10 371 0 381 b 31 376 19 381 25 380 b 132 345 61 358 103 345 l 136 345 l 137 355 b 145 378 138 359 142 370 b 152 415 149 394 152 405 b 137 452 152 427 148 438 b 133 464 134 458 133 460 b 138 473 133 467 134 470 "},v53:{x_min:0,x_max:902.421875,ha:921,o:"m 17 240 b 24 241 19 241 21 241 b 32 240 28 241 31 241 b 46 229 38 238 43 234 b 50 88 50 223 50 237 b 50 -1 50 63 50 34 b 50 -90 50 -36 50 -65 b 46 -231 50 -238 50 -224 b 25 -242 42 -238 34 -242 b 0 -224 14 -242 4 -235 b 0 2 0 -222 0 -108 b 0 223 0 112 0 220 b 17 240 2 230 9 237 m 110 240 b 118 241 111 241 114 241 b 126 240 121 241 123 241 b 142 223 133 237 140 230 b 144 123 144 220 144 205 b 144 29 144 45 144 29 b 144 29 144 29 144 29 b 393 183 166 106 264 167 b 450 186 412 184 431 186 b 756 29 600 186 732 120 b 756 29 756 29 756 29 b 758 123 758 29 758 45 b 760 227 758 226 758 223 b 784 241 766 237 774 241 b 804 229 792 241 800 237 b 809 88 808 223 809 237 l 809 -1 l 809 -90 b 804 -231 809 -238 808 -224 b 784 -242 800 -238 792 -242 b 762 -231 775 -242 766 -238 b 758 -124 756 -224 758 -231 b 756 -30 758 -47 758 -30 b 756 -30 756 -30 756 -30 b 509 -184 736 -108 637 -169 b 450 -187 488 -187 469 -187 b 144 -30 300 -187 168 -122 b 144 -30 144 -30 144 -30 b 144 -124 144 -30 144 -47 b 140 -231 144 -231 144 -224 b 118 -242 134 -238 126 -242 b 92 -224 107 -242 96 -235 b 92 2 92 -222 92 -108 b 92 223 92 112 92 220 b 110 240 95 230 102 237 m 432 161 b 413 162 426 162 420 162 b 313 41 351 162 313 109 b 347 -73 313 5 323 -34 b 487 -163 385 -133 439 -163 b 578 -97 526 -163 562 -142 b 588 -43 585 -80 588 -62 b 432 161 588 47 518 147 m 868 240 b 876 241 869 241 872 241 b 884 240 879 241 882 241 b 898 229 890 238 894 234 b 902 88 902 223 902 237 l 902 -1 l 902 -90 b 898 -231 902 -238 902 -224 b 876 -242 892 -238 884 -242 b 852 -224 865 -242 854 -235 b 850 2 850 -222 850 -108 b 852 223 850 112 850 220 b 868 240 853 230 860 237 "},v54:{x_min:-24.5,x_max:317.140625,ha:324,o:"m -24 -161 l -24 -5 l -20 -5 b 0 -24 -9 -5 -2 -12 b 171 -315 21 -124 84 -233 b 317 -660 268 -406 317 -531 b 187 -1014 317 -782 274 -909 b 161 -1034 172 -1034 171 -1034 b 141 -1013 149 -1034 141 -1025 b 152 -991 141 -1004 142 -1002 b 266 -682 228 -899 266 -788 b 174 -430 266 -588 236 -498 b -23 -317 136 -388 66 -348 b -24 -161 -23 -316 -24 -285 "},v55:{x_min:0,x_max:551.25,ha:563,o:"m 289 644 b 304 645 294 645 299 645 b 404 566 349 645 392 613 b 406 541 405 557 406 549 b 379 471 406 514 397 489 l 377 467 l 382 470 b 509 591 438 485 485 531 b 513 601 510 595 513 599 b 530 609 518 607 524 609 b 551 588 540 609 551 602 b 200 -605 551 584 204 -599 b 182 -616 197 -612 190 -616 b 163 -602 174 -616 166 -610 b 161 -598 161 -601 161 -601 b 217 -402 161 -589 170 -562 b 272 -213 247 -298 272 -213 b 272 -213 272 -213 272 -213 b 264 -219 272 -213 268 -216 b 140 -262 227 -247 182 -262 b 36 -226 102 -262 65 -249 b 0 -145 12 -206 0 -176 b 17 -84 0 -124 5 -104 b 103 -38 38 -54 70 -38 b 191 -91 137 -38 172 -56 b 205 -141 201 -106 205 -124 b 178 -212 205 -167 196 -194 l 175 -215 l 182 -213 b 307 -93 236 -198 284 -151 b 372 129 308 -88 372 127 b 372 129 372 129 372 129 b 364 122 372 129 368 126 b 240 80 328 94 283 80 b 137 115 202 80 166 91 b 99 195 112 136 99 165 b 118 256 99 217 106 238 b 204 303 138 287 171 303 b 292 249 238 303 273 285 b 306 199 302 234 306 217 b 279 129 306 173 296 148 l 276 126 l 281 127 b 408 248 336 142 385 190 b 473 470 409 254 473 469 b 473 470 473 470 473 470 b 465 464 473 470 469 467 b 341 421 428 435 383 421 b 236 458 303 421 266 433 b 200 537 212 478 200 508 b 289 644 200 585 234 635 "},v58:{x_min:-21.78125,x_max:367.5,ha:375,o:"m 259 1553 b 265 1553 261 1553 264 1553 b 288 1540 272 1553 277 1550 b 367 1351 340 1493 367 1424 b 336 1221 367 1308 357 1263 l 332 1211 l 333 1208 b 367 1077 356 1170 367 1124 b 336 945 367 1032 357 986 l 332 935 l 333 932 b 367 800 356 893 367 848 b 336 669 367 756 357 710 l 332 659 l 333 656 b 367 523 356 617 367 571 b 345 412 367 485 360 446 b 231 273 322 356 284 310 b -1 19 121 195 27 93 b -17 4 -4 11 -10 5 l -21 4 l -21 134 l -21 265 l -17 265 b 133 291 20 265 96 278 b 318 537 245 328 318 433 b 307 603 318 559 315 582 b 303 614 304 612 304 614 b 298 609 302 614 300 613 b 231 549 281 589 258 567 b -1 295 121 471 27 369 b -17 280 -4 287 -10 281 l -21 280 l -21 410 l -21 541 l -17 541 b 133 567 20 541 96 555 b 318 813 245 605 318 709 b 307 880 318 835 315 859 b 303 891 304 888 304 891 b 298 885 302 891 300 888 b 231 825 281 866 258 843 b -1 571 121 748 27 645 b -17 556 -4 563 -10 557 l -21 556 l -21 687 l -21 817 l -17 817 b 133 843 20 817 96 830 b 318 1089 245 881 318 985 b 307 1156 318 1111 315 1134 b 303 1167 304 1164 304 1167 b 298 1161 302 1167 300 1164 b 231 1102 281 1140 258 1120 b -1 848 121 1024 27 921 b -17 832 -4 839 -10 834 l -21 832 l -21 963 l -21 1093 l -17 1093 b 114 1113 12 1093 78 1103 b 313 1314 215 1142 289 1218 b 318 1364 317 1331 318 1347 b 255 1511 318 1422 295 1478 b 243 1532 247 1519 243 1525 b 259 1553 243 1540 250 1550 "},v59:{x_min:0,x_max:464.140625,ha:474,o:"m 0 0 l 0 347 l 76 347 l 153 347 l 153 0 l 153 -348 l 76 -348 l 0 -348 l 0 0 m 308 -1 l 308 347 l 386 347 l 464 347 l 464 -1 l 464 -348 l 386 -348 l 308 -348 l 308 -1 "},v5a:{x_min:-171.5,x_max:170.140625,ha:174,o:"m -6 566 b 0 567 -5 567 -2 567 b 14 556 6 567 12 563 b 92 285 14 555 50 433 b 170 13 166 33 170 19 b 168 13 170 13 170 13 b 161 1 168 8 167 4 l 159 0 l 122 0 l 84 0 l 81 1 b 21 195 76 5 78 -5 b -32 381 -8 297 -32 381 b -87 197 -32 381 -57 298 b -141 8 -115 94 -140 9 b -155 0 -142 2 -149 0 b -171 15 -163 0 -171 5 b -14 556 -171 18 -24 528 b -6 566 -14 560 -10 564 "},v5b:{x_min:-441,x_max:439.640625,ha:449,o:"m -428 -2 b -421 0 -427 -1 -424 0 b -406 -6 -416 0 -409 -2 b -400 -31 -401 -12 -400 -15 b -1 -352 -392 -215 -215 -352 b 58 -349 19 -352 38 -351 b 398 -31 250 -326 392 -192 b 404 -6 398 -15 400 -12 b 419 -1 408 -2 413 -1 b 439 -13 427 -1 435 -5 b 439 -29 439 -16 439 -22 b 434 -105 439 -48 438 -80 b 0 -489 397 -333 213 -489 b -68 -484 -23 -489 -44 -488 b -441 -36 -280 -452 -436 -263 b -441 -30 -441 -34 -441 -31 b -428 -2 -441 -11 -439 -5 m -13 -9 b -1 -8 -9 -8 -5 -8 b 50 -36 19 -8 39 -19 b 61 -72 57 -47 61 -59 b 50 -106 61 -84 57 -97 b -1 -134 39 -124 19 -134 b -46 -115 -17 -134 -34 -129 b -62 -72 -57 -102 -62 -87 b -13 -9 -62 -44 -44 -16 "},v5c:{x_min:0,x_max:447.8125,ha:457,o:"m 0 -87 l 0 0 l 223 0 l 447 0 l 447 -87 l 447 -174 l 223 -174 l 0 -174 l 0 -87 "},v5d:{x_min:-1.359375,x_max:592.078125,ha:604,o:"m 280 692 b 295 694 283 692 289 694 b 310 692 300 694 307 692 b 357 630 340 684 357 657 b 336 580 357 612 351 594 b 311 538 321 566 311 549 b 352 492 311 512 330 492 b 366 495 357 492 362 492 b 397 553 390 503 397 517 b 415 603 397 576 402 591 b 460 623 427 617 443 623 b 509 599 479 623 498 614 b 522 559 518 587 522 573 b 494 506 522 538 513 519 b 451 495 481 498 473 496 b 415 488 432 495 426 494 b 394 449 404 483 394 464 b 394 448 394 448 394 448 l 394 440 l 397 433 b 428 409 404 420 413 413 b 438 408 431 408 435 408 b 479 431 450 408 462 415 b 528 455 495 448 510 455 b 548 452 534 455 541 453 b 592 391 577 442 592 416 b 549 331 592 365 577 340 b 528 327 541 328 534 327 b 479 351 510 327 495 335 b 438 374 464 367 450 374 b 417 369 431 374 424 373 b 394 333 402 360 394 348 b 400 312 394 326 396 319 b 451 287 408 294 420 288 b 513 258 484 285 499 278 b 522 223 519 247 522 234 b 461 159 522 190 496 159 b 449 161 457 159 453 159 b 397 229 416 167 397 191 b 366 288 397 265 390 278 b 352 290 362 290 357 290 b 315 262 336 290 321 280 b 311 245 313 256 311 251 b 334 204 311 233 318 220 b 355 170 348 190 351 184 b 357 152 356 166 357 159 b 355 136 357 147 356 140 b 295 88 345 104 321 88 b 232 152 264 88 232 112 b 255 204 232 174 238 186 b 279 244 273 222 279 231 l 279 245 b 238 290 279 270 259 290 b 224 288 234 290 228 290 b 193 229 200 278 193 265 b 141 161 193 191 174 167 b 129 159 137 159 133 159 b 68 223 93 159 68 190 b 77 258 68 234 70 247 b 138 287 91 278 106 285 b 185 302 166 287 175 291 b 196 333 193 312 196 323 b 174 369 196 347 187 360 b 152 374 166 373 159 374 b 111 351 140 374 126 367 b 62 327 95 335 80 327 b 51 328 58 327 54 327 b -1 391 16 334 -1 363 b 53 455 -1 420 17 449 b 62 455 57 455 59 455 b 111 431 80 455 95 448 b 152 408 127 415 140 408 b 161 409 155 408 159 408 b 193 433 176 413 186 420 l 196 440 l 196 448 b 196 451 196 449 196 449 b 190 471 196 459 194 463 b 137 495 182 489 167 495 l 134 495 l 134 495 b 68 560 95 495 68 521 b 129 623 68 596 95 623 b 144 621 134 623 138 623 b 193 553 175 614 193 589 b 224 495 193 517 200 503 b 238 492 228 492 234 492 b 279 538 259 492 279 512 b 254 580 279 549 269 566 b 232 630 239 594 232 612 b 280 692 232 657 250 684 m 307 456 b 295 458 303 458 299 458 b 230 391 258 458 230 426 b 236 360 230 381 231 371 b 295 324 249 337 272 324 b 353 360 318 324 341 337 b 360 391 357 370 360 381 b 307 456 360 421 340 451 "},v60:{x_min:-590.71875,x_max:589.359375,ha:601,o:"m -367 173 b -362 174 -366 174 -364 174 b -351 173 -357 174 -353 173 b -262 86 -348 172 -328 151 b -176 0 -216 37 -176 0 b -107 84 -176 0 -145 37 b -31 174 -36 173 -38 172 b -25 174 -29 174 -28 174 b -16 173 -23 174 -19 173 b 72 86 -13 172 6 151 b 157 0 119 37 157 0 b 227 84 159 0 189 37 b 303 174 298 173 296 172 b 308 174 304 174 307 174 b 318 173 313 174 317 173 b 481 11 322 172 357 134 l 494 -1 l 522 34 b 560 76 553 72 555 74 b 567 77 563 77 564 77 b 589 56 579 77 589 68 b 586 48 589 54 588 51 b 411 -172 583 41 416 -166 b 397 -176 406 -174 401 -176 b 387 -174 393 -176 390 -176 b 299 -87 386 -173 366 -152 b 213 0 253 -38 213 0 b 144 -86 213 0 182 -38 b 68 -174 73 -174 74 -173 b 62 -176 66 -176 65 -176 b 53 -174 59 -176 55 -174 b -35 -87 50 -173 29 -152 b -121 0 -83 -38 -121 0 b -190 -86 -122 0 -152 -38 b -266 -174 -261 -174 -259 -173 b -272 -176 -268 -176 -270 -176 b -281 -174 -276 -176 -280 -174 b -371 -86 -284 -173 -304 -152 b -457 0 -417 -38 -457 0 l -457 0 b -477 -26 -457 0 -470 -16 b -548 -227 -524 -88 -548 -161 b -536 -303 -548 -254 -544 -280 b -533 -317 -534 -309 -533 -313 b -553 -338 -533 -330 -541 -338 b -577 -315 -566 -338 -571 -333 b -590 -227 -586 -287 -590 -258 b -518 -9 -590 -154 -564 -77 b -465 56 -509 2 -504 8 l -402 134 b -367 173 -375 169 -372 172 "},v62:{x_min:46.28125,x_max:669.671875,ha:563,o:"m 183 376 b 189 376 185 376 187 376 b 212 374 197 376 208 376 b 265 337 234 369 253 355 b 274 317 268 331 273 320 b 274 316 274 317 274 316 b 280 323 276 316 276 319 b 311 358 288 337 299 348 b 319 366 315 360 318 365 b 356 376 326 373 340 376 b 382 371 364 376 374 374 b 428 337 400 366 417 352 b 436 317 431 331 436 320 b 438 316 436 317 436 316 b 442 323 438 316 439 319 b 475 358 451 337 462 348 b 483 366 477 360 481 365 b 518 376 488 373 503 376 b 544 373 528 376 536 376 b 604 285 579 360 604 326 b 597 249 604 273 601 258 b 543 63 596 247 544 70 b 541 54 543 61 541 55 b 540 44 540 51 540 47 b 552 23 540 33 545 23 b 552 23 552 23 552 23 b 647 126 586 29 627 72 b 658 138 651 136 653 138 b 660 138 660 138 660 138 b 669 129 666 137 669 136 b 654 88 669 122 665 109 b 562 -12 631 43 602 9 l 549 -19 b 521 -27 540 -24 530 -27 b 447 30 490 -27 458 -4 b 443 58 445 38 443 48 b 450 93 443 72 446 84 b 504 278 453 97 504 272 b 507 288 506 283 506 287 b 509 298 507 292 509 295 b 491 326 509 310 502 320 b 487 327 490 327 488 327 b 479 324 484 327 483 326 b 441 270 462 316 443 288 b 435 249 441 265 436 254 b 398 127 434 248 419 195 b 362 4 379 61 362 5 b 328 -1 359 -1 362 -1 b 314 -1 323 -1 319 -1 b 302 -1 310 -1 306 -1 b 266 4 266 -1 269 -1 b 265 6 265 5 265 5 b 303 144 265 13 272 34 b 343 278 325 216 343 276 b 344 288 343 281 344 285 b 345 298 345 291 345 295 b 330 326 345 310 340 320 b 323 327 328 327 325 327 b 317 324 322 327 321 326 b 279 270 300 316 281 288 b 273 249 279 265 274 254 b 236 127 272 248 255 195 b 200 4 216 61 200 5 b 164 -1 197 -1 198 -1 b 151 -1 161 -1 156 -1 b 140 -1 147 -1 142 -1 b 103 4 104 -1 106 -1 b 103 6 103 5 103 5 b 141 144 103 13 108 34 b 181 278 161 216 179 276 b 182 288 181 281 181 285 b 183 298 182 291 183 295 b 168 324 183 310 178 320 b 160 327 166 326 163 327 b 141 320 156 327 151 324 b 69 230 112 305 85 272 b 57 215 65 217 62 215 b 55 215 57 215 55 215 b 46 224 49 215 46 217 b 59 260 46 231 50 242 b 151 363 81 306 112 341 b 161 369 155 365 160 367 b 183 376 166 371 174 374 "},v68:{x_min:-597.53125,x_max:596.171875,ha:608,o:"m -533 324 b -525 327 -530 326 -528 327 b -504 305 -514 327 -504 317 b -504 305 -504 305 -504 305 b -513 284 -504 299 -504 299 b -556 112 -541 226 -556 167 b -545 33 -556 84 -552 58 b -524 -20 -541 15 -532 -9 l -522 -23 l -491 15 l -413 111 b -355 174 -367 169 -363 174 b -351 174 -353 174 -352 174 b -254 86 -343 174 -348 179 b -168 -1 -208 37 -168 -1 b -100 84 -168 -1 -137 37 b -23 173 -28 173 -29 172 b -19 174 -21 174 -20 174 b -8 173 -14 174 -10 173 b 155 11 -5 172 43 123 l 166 -1 l 168 1 l 170 4 l 170 130 b 171 260 170 256 170 258 b 191 274 175 269 183 274 b 205 267 196 274 201 272 b 212 158 212 262 210 273 l 212 56 l 257 112 b 311 173 304 172 304 172 b 317 174 313 174 314 174 b 326 173 319 174 323 173 b 490 11 329 172 366 134 l 502 -1 l 530 34 b 568 76 560 72 563 74 b 575 77 570 77 573 77 b 596 56 586 77 596 68 b 594 48 596 54 596 51 b 417 -172 592 41 424 -166 b 405 -176 415 -174 409 -176 b 396 -174 401 -176 398 -176 b 307 -87 393 -173 372 -152 b 221 -1 259 -38 221 -1 b 216 -6 221 -1 219 -2 l 212 -12 l 212 -147 b 212 -210 212 -173 212 -194 b 205 -292 212 -297 210 -287 b 191 -299 201 -297 196 -299 b 172 -287 183 -299 175 -295 b 170 -174 171 -284 171 -284 l 170 -63 l 127 -117 b 73 -176 84 -170 80 -176 b 68 -176 72 -176 70 -176 b -27 -87 59 -174 65 -180 b -114 0 -74 -38 -112 0 b -182 -86 -114 0 -145 -38 b -258 -174 -253 -174 -253 -173 b -264 -176 -259 -176 -262 -176 b -274 -174 -268 -176 -272 -174 b -438 -11 -277 -173 -348 -102 l -449 0 l -479 -37 b -524 -80 -513 -80 -514 -80 l -524 -80 b -553 -52 -534 -80 -540 -74 b -597 109 -583 -8 -597 48 b -560 280 -597 165 -585 224 b -533 324 -548 310 -540 322 "},v6c:{x_min:-1.359375,x_max:193.28125,ha:197,o:"m 78 233 b 87 233 81 233 84 233 b 187 140 132 233 174 195 b 193 102 190 127 193 115 b 43 -113 193 22 136 -62 b 27 -119 36 -116 31 -119 b 19 -108 21 -119 19 -115 b 29 -97 19 -102 20 -101 b 102 13 73 -72 102 -27 b 92 51 102 26 98 40 l 91 54 l 84 54 b 8 104 53 54 21 74 b -1 142 1 116 -1 130 b 78 233 -1 187 31 227 "},v6d:{x_min:-590.71875,x_max:589.359375,ha:601,o:"m 544 335 b 553 337 548 337 551 337 b 575 313 563 337 570 330 b 589 226 583 285 589 256 b 517 8 589 152 563 76 b 464 -58 507 -4 503 -9 l 401 -136 b 362 -176 372 -172 370 -176 b 357 -176 360 -176 359 -176 b 261 -87 349 -174 355 -180 b 175 0 215 -38 175 0 b 106 -86 175 0 144 -38 b 29 -174 35 -174 36 -173 b 24 -176 28 -176 27 -176 b 14 -174 21 -176 17 -174 b -73 -87 12 -173 -8 -152 b -159 0 -121 -38 -159 0 b -228 -86 -160 0 -190 -38 b -304 -174 -299 -174 -298 -173 b -310 -176 -306 -176 -308 -176 b -319 -174 -314 -176 -318 -174 b -483 -12 -323 -173 -359 -137 l -495 0 l -524 -34 b -562 -77 -553 -73 -556 -76 b -568 -79 -564 -79 -566 -79 b -590 -58 -581 -79 -590 -69 b -588 -49 -590 -55 -589 -52 b -412 170 -585 -43 -417 165 b -398 174 -408 173 -402 174 b -389 173 -394 174 -392 174 b -300 86 -387 172 -366 151 b -215 -1 -254 37 -215 -1 b -145 84 -215 -1 -183 37 b -69 173 -74 173 -76 172 b -63 174 -68 174 -66 174 b -54 173 -61 174 -57 173 b 34 86 -51 172 -31 151 b 119 -1 81 37 119 -1 b 189 84 121 -1 151 37 b 265 173 259 173 258 172 b 270 174 266 174 269 174 b 280 173 274 174 279 173 b 370 84 283 172 303 151 b 455 -1 416 37 455 -1 l 455 -1 b 476 24 455 -1 469 15 b 547 226 522 87 547 159 b 534 302 547 252 543 278 b 532 317 533 308 532 313 b 544 335 532 326 536 333 "},v6f:{x_min:-80.3125,x_max:78.9375,ha:81,o:"m 63 191 b 69 192 65 192 66 192 b 77 188 72 192 76 191 b 78 183 78 187 78 186 b 74 158 78 179 77 172 l 66 115 b 9 -161 49 30 10 -158 b -10 -187 6 -172 -1 -181 b -34 -194 -17 -191 -25 -194 b -80 -147 -58 -194 -80 -174 b -80 -141 -80 -144 -80 -142 b 9 70 -80 -134 -73 -117 l 49 163 b 63 191 59 188 61 190 "},v70:{x_min:0,x_max:436.921875,ha:446,o:"m 213 190 b 217 191 215 191 216 191 b 231 184 223 191 228 188 b 249 154 240 167 246 159 b 419 18 292 91 348 45 b 436 -1 435 11 436 8 b 424 -16 436 -9 434 -13 b 308 -87 394 -26 340 -59 b 231 -186 276 -117 257 -142 b 219 -192 228 -191 225 -192 b 198 -174 209 -192 208 -191 b 47 -33 161 -113 110 -63 b 10 -16 34 -26 17 -19 b 0 -1 2 -13 0 -9 b 17 18 0 8 1 11 b 198 173 95 48 156 101 b 213 190 206 187 208 188 "},v72:{x_min:-423.3125,x_max:421.9375,ha:431,o:"m -262 197 b -247 197 -257 197 -253 197 b -118 162 -210 197 -163 184 b 40 45 -61 134 -13 98 b 277 -95 119 -33 200 -81 b 289 -97 281 -97 285 -97 b 378 0 332 -97 371 -55 b 378 11 378 4 378 6 b 302 83 378 55 345 83 b 242 66 283 83 262 77 b 208 56 231 59 219 56 b 148 120 175 56 148 81 b 201 186 148 151 164 172 b 261 198 220 194 240 198 b 420 45 341 198 411 136 b 421 22 421 37 421 29 b 245 -199 421 -93 338 -199 b 238 -198 243 -199 240 -199 b -44 -47 148 -194 50 -141 b -250 86 -114 22 -183 66 b -295 94 -270 91 -283 94 b -315 91 -302 94 -307 94 b -381 4 -356 81 -381 43 b -355 -56 -381 -18 -372 -40 b -298 -81 -338 -73 -319 -81 b -246 -68 -283 -81 -265 -77 b -212 -58 -234 -61 -223 -58 b -178 -69 -200 -58 -189 -62 b -151 -122 -160 -81 -151 -101 b -171 -167 -151 -138 -157 -155 b -239 -195 -185 -181 -213 -192 b -257 -197 -245 -197 -250 -197 b -423 -5 -352 -197 -423 -109 b -412 65 -423 16 -419 40 b -262 197 -389 137 -329 188 "},v74:{x_min:-206.890625,x_max:428.75,ha:438,o:"m 389 -351 b 394 -351 390 -351 393 -351 b 428 -385 413 -351 428 -367 b 428 -394 428 -388 428 -391 b 394 -428 426 -406 421 -410 l 332 -473 l 269 -516 l 205 -560 l 141 -603 l 77 -648 l 13 -692 l -50 -737 l -114 -780 l -145 -802 b -171 -813 -157 -810 -163 -813 b -175 -813 -172 -813 -174 -813 b -206 -777 -194 -811 -206 -795 b -202 -760 -206 -771 -205 -766 b -87 -675 -197 -752 -206 -757 l -34 -639 l 83 -557 l 145 -514 l 209 -470 l 272 -427 b 389 -351 375 -356 381 -352 "},v75:{x_min:-149.71875,x_max:148.359375,ha:151,o:"m -137 381 b -130 383 -134 383 -133 383 b -111 371 -122 383 -114 378 b -55 224 -110 370 -85 305 b 0 80 -25 145 -1 80 b 54 224 0 80 24 145 b 112 377 114 384 110 373 b 127 384 118 381 122 384 b 148 362 138 384 148 374 l 148 356 l 83 183 b 16 9 47 88 17 11 b -1 0 12 2 5 0 b -14 5 -5 0 -10 1 b -84 183 -19 9 -13 -6 l -149 356 l -149 362 b -137 381 -149 371 -145 378 "},v78:{x_min:0,x_max:193.28125,ha:197,o:"m 85 514 b 95 517 88 517 89 517 b 114 505 103 517 110 513 l 115 502 l 115 376 b 115 249 115 306 115 249 b 141 258 117 249 127 252 l 167 266 l 172 266 b 190 254 181 265 187 262 l 193 251 l 193 202 l 193 188 b 187 147 193 149 191 152 b 147 130 183 142 182 141 l 115 119 l 115 9 b 115 -99 115 -51 115 -99 b 141 -91 115 -99 127 -95 b 171 -81 166 -81 167 -81 l 171 -81 b 191 -94 181 -81 189 -87 b 193 -142 191 -97 193 -120 b 191 -195 193 -167 191 -194 b 125 -227 187 -205 187 -204 l 115 -230 l 115 -366 l 115 -503 l 114 -506 b 95 -519 110 -514 102 -519 b 74 -506 87 -519 78 -514 l 73 -503 l 73 -374 b 73 -245 73 -260 73 -245 b 73 -245 73 -245 73 -245 b 55 -252 72 -245 63 -249 l 32 -260 b 19 -263 27 -262 23 -263 b 4 -256 13 -263 8 -260 b 0 -215 0 -251 0 -254 b 0 -199 0 -210 0 -206 l 0 -152 l 1 -149 b 8 -140 2 -145 5 -141 b 42 -127 9 -140 24 -133 l 73 -116 l 73 -5 b 73 23 73 4 73 15 b 73 105 73 70 73 105 b 49 97 73 105 61 101 b 17 88 32 91 23 88 b 4 95 10 88 8 91 b 0 137 0 101 0 98 b 0 151 0 141 0 145 l 0 199 l 1 202 b 43 224 5 212 5 212 l 73 234 l 73 367 l 73 502 l 74 505 b 85 514 77 509 81 513 "},v79:{x_min:-1.359375,x_max:899.703125,ha:918,o:"m 307 349 b 332 351 315 351 323 351 b 443 340 367 351 408 347 b 741 47 607 306 720 195 b 744 0 743 31 744 16 b 660 -303 744 -90 713 -206 b 28 -755 534 -531 304 -695 b 14 -756 23 -755 19 -756 b -1 -741 4 -756 -1 -750 b 21 -720 -1 -731 1 -728 b 567 -56 337 -601 548 -344 b 568 -11 568 -41 568 -24 b 442 285 568 129 525 233 b 325 319 406 308 367 319 b 93 177 232 319 137 266 b 84 154 91 170 84 155 b 84 154 84 154 84 154 b 88 156 84 154 85 155 b 159 177 110 170 134 177 b 257 134 194 177 231 162 b 294 41 281 108 294 73 b 171 -97 294 -24 246 -90 b 156 -98 166 -97 161 -98 b 6 74 73 -98 6 -22 b 6 80 6 76 6 79 b 307 349 10 223 141 340 m 839 215 b 845 216 841 216 842 216 b 862 213 852 216 860 215 b 899 163 887 206 899 184 b 872 117 899 145 890 127 b 847 111 865 112 856 111 b 808 130 833 111 818 117 b 796 162 800 140 796 151 b 839 215 796 187 812 212 m 839 -112 b 845 -112 841 -112 842 -112 b 862 -115 852 -112 860 -113 b 899 -165 887 -122 899 -144 b 872 -210 899 -183 890 -201 b 847 -217 865 -215 856 -217 b 808 -198 833 -217 818 -210 b 796 -165 800 -188 796 -177 b 839 -112 796 -140 812 -116 "},v7a:{x_min:-1.359375,x_max:386.5625,ha:394,o:"m 249 535 b 257 537 251 537 253 537 b 276 524 266 537 273 533 l 277 521 l 279 419 l 279 316 l 304 323 b 337 328 319 326 330 328 b 353 316 347 328 349 324 b 355 266 355 315 355 290 b 353 215 355 241 355 217 b 319 198 349 206 347 205 b 279 187 284 190 279 188 b 279 156 279 187 279 174 b 279 136 279 151 279 144 l 279 84 l 289 87 l 330 98 b 367 105 352 102 362 105 b 378 101 372 105 375 104 b 386 61 385 95 386 94 b 386 40 386 55 386 48 l 386 -5 l 385 -8 b 374 -19 383 -12 378 -18 b 291 -40 372 -19 347 -26 b 279 -43 284 -41 279 -43 b 279 -83 279 -43 279 -59 b 279 -95 279 -87 279 -91 l 279 -145 l 304 -140 b 337 -133 321 -136 330 -133 b 349 -140 343 -133 347 -136 b 355 -181 355 -145 355 -142 l 355 -197 l 355 -210 b 349 -252 355 -249 355 -247 b 300 -269 345 -258 347 -258 b 280 -274 291 -272 281 -273 l 279 -274 l 277 -378 l 277 -483 l 276 -487 b 257 -499 273 -495 265 -499 b 238 -487 249 -499 242 -495 l 236 -483 l 236 -384 l 236 -285 l 235 -285 l 212 -291 l 170 -301 b 148 -308 159 -305 148 -306 b 147 -415 147 -308 147 -313 l 147 -523 l 145 -526 b 126 -538 141 -534 133 -538 b 106 -526 118 -538 110 -534 l 104 -523 l 104 -420 b 103 -317 104 -326 104 -317 b 103 -317 103 -317 103 -317 b 50 -330 92 -322 54 -330 b 31 -317 42 -330 35 -326 b 29 -267 29 -315 29 -315 l 29 -219 l 32 -216 b 92 -192 36 -206 36 -206 l 104 -190 l 104 -138 b 103 -87 104 -91 104 -87 b 103 -87 103 -87 103 -87 b 88 -91 103 -87 96 -88 l 49 -101 b 17 -106 32 -105 23 -106 b 6 -102 13 -106 10 -105 b -1 -62 0 -97 -1 -95 b 0 -41 -1 -56 0 -49 l 0 4 l 1 6 b 10 16 2 11 6 15 b 91 37 12 18 38 24 l 104 41 l 104 93 b 103 144 104 140 104 144 b 103 144 103 144 103 144 b 50 131 92 141 54 131 b 31 144 42 131 35 137 b 29 195 29 147 29 148 l 29 242 l 32 245 b 92 269 36 255 36 255 l 104 273 l 104 377 l 104 481 l 106 485 b 126 498 110 492 118 498 b 134 495 129 498 132 496 b 145 485 138 494 142 489 l 147 481 l 147 383 l 147 283 l 152 284 b 190 294 155 285 171 290 l 230 303 l 236 305 l 236 413 l 236 521 l 238 524 b 249 535 240 528 243 533 m 236 126 b 235 177 236 154 236 177 l 235 177 b 213 172 235 177 225 174 l 170 161 b 147 155 157 158 147 155 b 147 124 147 155 147 142 b 147 102 147 117 147 111 l 147 52 l 153 54 l 228 72 l 236 74 l 236 126 m 236 -105 b 235 -54 236 -65 236 -54 l 235 -54 b 231 -55 235 -54 234 -54 b 172 -69 227 -55 204 -62 l 149 -76 l 147 -76 l 147 -127 l 147 -179 l 152 -177 b 190 -167 155 -177 171 -173 l 230 -158 l 236 -156 l 236 -105 "},v7c:{x_min:0,x_max:300.8125,ha:307,o:"m 49 505 b 53 506 50 505 51 506 b 70 496 58 506 62 503 b 81 485 73 492 78 488 l 96 473 l 111 459 l 122 449 l 134 438 l 182 396 l 255 330 b 292 291 292 298 292 298 l 292 290 l 292 284 l 283 270 b 209 36 234 197 209 113 b 288 -170 209 -44 235 -119 b 299 -184 295 -179 299 -181 b 300 -191 300 -187 300 -188 b 285 -206 300 -199 294 -206 b 280 -206 283 -206 281 -206 b 247 -201 270 -202 259 -201 b 176 -222 223 -201 197 -208 b 114 -340 136 -249 114 -292 b 172 -471 114 -384 134 -433 b 185 -492 182 -481 185 -487 b 181 -502 185 -496 183 -499 b 171 -508 176 -505 174 -508 b 152 -498 166 -508 160 -503 b 0 -284 65 -428 12 -352 b 0 -260 0 -278 0 -270 b 1 -238 0 -252 0 -242 b 148 -140 16 -177 73 -140 b 209 -148 167 -140 189 -142 b 215 -149 212 -148 215 -149 b 215 -149 215 -149 215 -149 l 215 -149 b 201 -136 215 -148 209 -142 l 157 -97 l 96 -41 b 17 34 21 24 17 29 b 17 37 17 36 17 36 b 17 38 17 37 17 38 b 25 56 17 44 17 44 b 110 298 81 131 110 219 b 46 474 110 367 88 431 b 38 491 40 480 38 487 b 49 505 38 498 42 502 "},v7d:{x_min:-1.359375,x_max:436.921875,ha:446,o:"m 213 205 b 217 205 215 205 216 205 b 234 194 224 205 234 199 b 236 187 234 194 235 190 l 245 167 l 261 129 l 270 106 b 355 -61 294 54 329 -13 b 420 -163 381 -105 402 -138 b 436 -188 435 -184 436 -184 b 436 -191 436 -190 436 -190 b 421 -206 436 -201 431 -206 l 421 -206 l 416 -206 l 405 -201 b 217 -158 347 -172 283 -158 b 31 -201 153 -158 88 -172 l 20 -206 l 14 -206 l 14 -206 b 0 -191 5 -206 0 -201 b -1 -188 0 -190 -1 -190 b 14 -163 -1 -186 0 -184 b 95 -34 36 -136 72 -77 b 166 106 119 8 148 68 l 175 129 l 183 148 l 200 188 b 213 205 205 199 208 202 "},v7f:{x_min:0,x_max:367.5,ha:375,o:"m 0 124 l 0 187 l 61 187 l 122 187 l 122 138 l 122 91 l 153 61 l 183 30 l 213 61 l 243 91 l 243 138 l 243 187 l 306 187 l 367 187 l 367 124 l 367 61 l 321 61 l 274 61 l 243 30 l 213 0 l 243 -31 l 274 -62 l 321 -62 l 367 -62 l 367 -124 l 367 -188 l 306 -188 l 243 -188 l 243 -140 l 243 -93 l 213 -62 l 183 -31 l 153 -62 l 122 -93 l 122 -140 l 122 -188 l 61 -188 l 0 -188 l 0 -124 l 0 -62 l 46 -62 l 92 -62 l 123 -31 l 153 0 l 123 30 l 92 61 l 46 61 l 0 61 l 0 124 "},v80:{x_min:29.9375,x_max:420.578125,ha:371,o:"m 115 345 b 221 347 117 345 166 347 b 411 345 306 347 409 345 b 420 330 416 342 420 335 b 415 319 420 326 419 321 b 178 118 397 303 179 118 b 178 117 178 118 178 117 b 181 117 178 117 178 117 b 189 117 182 117 185 117 b 193 117 190 117 191 117 b 247 98 215 117 232 111 b 296 75 266 83 280 76 b 302 75 299 75 300 75 b 322 91 311 75 315 79 b 322 91 322 91 322 91 b 322 91 322 91 322 91 b 319 91 322 91 321 91 b 313 90 318 90 315 90 b 283 107 300 90 288 97 b 277 126 279 114 277 121 b 319 167 277 149 295 167 b 319 167 319 167 319 167 b 362 118 347 167 362 147 b 355 82 362 108 359 96 b 311 33 349 65 340 55 b 224 1 284 12 253 1 b 194 5 213 1 204 2 b 168 18 183 8 178 11 b 110 36 151 30 130 36 b 57 15 88 36 68 29 b 47 11 54 12 51 11 b 31 20 40 11 34 13 b 29 26 31 22 29 25 b 68 66 29 36 39 45 b 285 250 73 71 281 248 b 285 250 285 250 285 250 b 231 252 285 252 261 252 b 137 250 190 252 141 250 b 93 227 122 248 110 241 b 78 220 88 222 83 220 b 66 227 74 220 70 222 b 63 234 65 229 63 231 b 85 291 63 241 69 252 b 115 345 108 342 108 344 "},v81:{x_min:0,x_max:428.75,ha:438,o:"m 262 186 b 273 186 266 186 272 186 b 274 186 273 186 274 186 b 285 186 274 186 280 186 b 428 48 375 181 428 122 b 386 -68 428 12 416 -29 b 155 -187 329 -145 236 -187 b 12 -111 92 -187 38 -162 b 0 -51 4 -91 0 -72 b 262 186 0 58 122 179 m 366 131 b 352 134 362 133 357 134 b 219 81 321 134 269 115 b 47 -111 126 23 50 -62 b 47 -112 47 -111 47 -112 b 77 -136 47 -129 58 -136 b 264 -45 118 -136 194 -101 b 382 109 336 12 382 76 b 366 131 382 120 377 129 "},v83:{x_min:-1.359375,x_max:847.96875,ha:865,o:"m 488 1499 b 495 1500 490 1500 492 1500 b 541 1465 507 1500 521 1490 b 679 1078 622 1372 679 1210 b 677 1050 679 1068 677 1060 b 477 642 668 893 604 764 l 443 609 l 431 596 l 431 592 l 438 562 l 449 508 l 460 458 b 481 355 475 390 481 355 b 481 355 481 355 481 355 b 490 356 481 355 485 355 b 528 358 495 356 511 358 b 558 356 540 358 552 356 b 839 95 699 338 808 237 b 847 22 845 72 847 47 b 631 -303 847 -113 766 -242 b 620 -309 623 -308 620 -309 l 620 -310 b 631 -359 620 -310 626 -333 l 646 -435 l 660 -496 b 672 -588 668 -535 672 -563 b 664 -653 672 -610 669 -630 b 383 -875 630 -792 509 -875 b 201 -810 321 -875 257 -855 b 129 -680 151 -768 129 -730 b 274 -530 129 -592 200 -530 b 351 -553 300 -530 326 -538 b 412 -669 393 -582 412 -626 b 287 -805 412 -735 366 -800 l 279 -805 l 285 -809 b 383 -830 318 -823 351 -830 b 586 -718 464 -830 540 -789 b 626 -584 612 -678 626 -631 b 619 -528 626 -566 623 -548 b 612 -495 619 -526 616 -510 b 577 -324 590 -387 577 -324 b 577 -324 577 -324 577 -324 b 568 -326 575 -324 571 -324 b 528 -334 558 -328 537 -333 b 465 -338 506 -337 485 -338 b 24 -11 269 -338 87 -206 b -1 145 8 41 -1 93 b 96 442 -1 249 32 351 b 322 714 166 541 236 626 l 352 745 l 345 782 l 332 843 l 315 921 b 303 984 310 950 304 978 b 295 1082 298 1017 295 1049 b 413 1426 295 1208 336 1329 b 488 1499 436 1456 477 1496 m 549 1301 b 541 1301 547 1301 544 1301 b 411 1207 500 1301 447 1263 b 355 1004 374 1152 355 1079 b 359 942 355 984 356 963 b 371 881 362 927 363 917 l 385 818 b 392 782 389 799 392 784 l 392 782 b 434 828 393 782 424 816 b 607 1165 534 941 594 1060 b 608 1193 608 1175 608 1183 b 597 1270 608 1224 604 1254 b 549 1301 589 1286 571 1299 m 398 528 b 393 555 396 542 393 553 b 392 555 393 555 393 555 b 317 470 390 555 347 505 b 190 298 266 408 212 334 b 127 70 148 227 127 148 b 155 -77 127 19 137 -30 b 468 -303 209 -216 333 -303 b 519 -299 484 -303 502 -302 b 568 -284 541 -295 568 -287 l 568 -284 b 563 -263 568 -284 566 -274 l 534 -120 l 511 -13 l 496 61 l 480 133 b 469 187 472 176 469 187 b 468 188 469 187 469 188 b 416 162 462 188 430 172 b 337 13 364 126 337 69 b 413 -124 337 -40 363 -93 b 428 -144 424 -131 428 -137 b 428 -149 428 -145 428 -148 b 409 -166 426 -161 419 -166 b 394 -162 405 -166 400 -165 b 240 77 302 -122 240 -27 l 240 77 b 430 342 240 197 315 301 l 436 344 l 426 394 l 398 528 m 548 194 b 526 195 540 195 532 195 b 519 195 524 195 521 195 l 514 195 l 518 177 l 539 79 l 552 15 l 566 -48 l 594 -187 l 605 -240 b 612 -266 609 -254 611 -266 b 612 -266 612 -266 612 -266 b 641 -248 613 -266 630 -256 b 744 -98 692 -212 730 -156 b 751 -40 749 -79 751 -59 b 548 194 751 76 665 181 "},v84:{x_min:25.859375,x_max:164.6875,ha:168,o:"m 34 369 b 40 370 35 370 38 370 b 59 353 49 370 50 367 b 164 40 122 254 155 158 b 164 0 164 33 164 16 b 164 -40 164 -16 164 -34 b 59 -353 155 -158 122 -254 b 40 -371 53 -366 47 -371 b 34 -370 38 -371 36 -370 b 25 -358 28 -367 25 -363 b 31 -337 25 -352 27 -347 b 92 0 72 -234 92 -117 b 31 335 92 116 72 233 b 25 356 27 345 25 352 b 34 369 25 363 28 366 "},v86:{x_min:-571.671875,x_max:570.3125,ha:582,o:"m -386 173 b -381 174 -385 174 -383 174 b -370 173 -377 174 -372 173 b -281 86 -367 172 -347 151 b -196 0 -235 37 -196 0 b -126 84 -196 0 -164 37 b -50 174 -55 173 -57 172 b -44 174 -49 174 -47 174 b -35 173 -42 174 -38 173 b 53 86 -32 172 -12 151 b 138 0 100 37 138 0 b 208 84 140 0 170 37 b 284 174 279 173 277 172 b 289 174 285 174 288 174 b 299 173 294 174 298 173 b 462 11 303 172 338 134 l 475 -1 l 503 34 b 541 76 534 72 536 74 b 548 77 544 77 545 77 b 570 56 560 77 570 68 b 567 48 570 54 568 51 b 392 -172 564 41 397 -166 b 378 -176 387 -174 382 -176 b 368 -174 374 -176 371 -176 b 280 -87 367 -173 345 -152 b 194 0 234 -38 194 0 b 125 -86 194 0 163 -38 b 49 -174 54 -174 55 -173 b 43 -176 47 -176 46 -176 b 34 -174 40 -176 36 -174 b -54 -87 31 -173 10 -152 b -140 0 -102 -38 -140 0 b -209 -86 -141 0 -171 -38 b -285 -174 -280 -174 -279 -173 b -291 -176 -287 -176 -289 -176 b -300 -174 -295 -176 -299 -174 b -464 -12 -304 -173 -340 -137 l -476 0 l -504 -34 b -543 -77 -534 -73 -537 -76 b -549 -79 -545 -79 -547 -79 b -571 -58 -562 -79 -571 -69 b -568 -49 -571 -55 -570 -52 b -392 172 -566 -43 -396 167 b -386 173 -390 172 -387 173 "},v8a:{x_min:-170.140625,x_max:168.78125,ha:172,o:"m -160 567 b -122 567 -159 567 -149 567 l -87 567 l -84 566 b -74 553 -78 563 -77 560 b -20 366 -73 551 -49 466 b 31 186 8 267 31 186 b 85 371 31 186 55 269 b 140 559 114 473 138 557 b 153 567 141 564 148 567 b 168 559 159 567 166 564 b 168 555 168 557 168 557 b 92 281 168 548 159 513 b 14 13 50 134 14 13 b 0 0 14 6 6 0 b -17 15 -8 0 -17 8 b -93 283 -17 15 -51 136 b -170 552 -166 533 -170 548 b -170 553 -170 552 -170 552 b -160 567 -170 560 -167 564 "},v8b:{x_min:0,x_max:319.859375,ha:326,o:"m 149 508 b 159 509 152 509 155 509 b 186 494 170 509 181 503 b 190 440 190 487 190 488 l 190 430 l 190 377 l 242 377 l 251 377 b 303 373 298 377 296 377 b 319 345 314 367 319 356 b 304 319 319 335 314 324 b 250 315 296 315 299 315 l 242 315 l 190 315 l 190 262 l 190 252 b 186 198 190 204 190 205 b 159 183 179 188 170 183 b 132 198 148 183 138 188 b 127 252 127 205 127 204 l 127 262 l 127 315 l 76 315 l 68 315 b 14 319 20 315 21 315 b 0 347 4 324 0 335 b 14 373 0 356 4 367 b 68 377 21 377 20 377 l 76 377 l 127 377 l 127 430 l 127 440 b 132 494 127 488 127 487 b 149 508 136 501 142 505 "},v8c:{x_min:-330.75,x_max:329.390625,ha:336,o:"m -133 483 b -117 484 -127 484 -122 484 b 31 373 -51 484 9 440 b 35 348 34 365 35 356 b -25 285 35 313 10 285 b -87 331 -55 285 -76 302 b -167 402 -100 376 -133 402 b -191 398 -175 402 -183 401 b -227 341 -215 388 -227 369 b -225 320 -227 334 -227 327 b -13 74 -209 230 -125 133 b 6 65 -4 70 5 66 l 9 63 l 10 65 b 117 231 12 68 40 112 l 189 341 l 242 424 b 268 460 262 456 264 458 b 283 464 273 463 277 464 b 308 438 296 464 308 453 l 308 437 b 287 396 308 430 308 428 l 95 98 l 59 43 l 58 41 l 65 37 b 253 -156 151 -8 217 -77 b 281 -285 272 -199 281 -244 b 148 -481 281 -381 231 -463 b 115 -485 137 -484 126 -485 b -32 -376 51 -485 -9 -442 b -36 -349 -35 -366 -36 -358 b 25 -287 -36 -315 -12 -287 b 85 -333 54 -287 74 -302 b 166 -403 99 -377 133 -403 b 190 -399 174 -403 182 -402 b 225 -342 215 -390 225 -370 b 224 -322 225 -335 225 -328 b 12 -76 208 -231 125 -134 b -8 -66 2 -72 -6 -68 l -10 -65 l -12 -66 b -118 -231 -13 -68 -42 -113 l -190 -342 l -243 -426 b -269 -462 -264 -458 -265 -458 b -284 -466 -274 -464 -279 -466 b -310 -440 -298 -466 -310 -455 l -310 -438 b -288 -398 -310 -430 -308 -430 l -96 -99 l -59 -44 l -59 -43 l -66 -38 b -281 284 -198 33 -281 158 l -281 284 b -133 483 -281 392 -220 474 m 254 177 b 266 179 258 177 262 179 b 319 149 287 179 307 167 b 329 115 326 140 329 127 b 319 79 329 102 326 90 b 268 51 307 61 287 51 b 221 72 250 51 234 58 b 205 115 210 84 205 99 b 254 177 205 142 223 170 m -281 -54 b -269 -52 -277 -52 -273 -52 b -223 -73 -253 -52 -235 -59 b -206 -116 -212 -84 -206 -101 b -216 -151 -206 -129 -209 -141 b -269 -179 -228 -170 -249 -179 b -314 -159 -285 -179 -302 -173 b -330 -116 -325 -147 -330 -131 b -281 -54 -330 -88 -313 -61 "},v8d:{x_min:-1.359375,x_max:255.890625,ha:261,o:"m 118 514 b 127 517 121 517 122 517 b 147 505 136 517 142 513 l 148 502 l 148 403 b 148 306 148 351 148 306 b 174 315 149 306 160 310 l 200 324 l 205 323 b 223 312 213 323 220 319 l 225 308 l 225 260 b 225 245 225 255 225 249 b 220 204 225 208 224 209 b 179 188 216 199 215 199 l 148 177 l 148 124 l 148 70 l 189 84 b 236 98 219 94 230 98 b 247 94 240 98 243 97 b 255 52 254 88 255 87 b 255 33 255 47 255 40 l 254 -12 l 253 -15 b 249 -22 253 -18 250 -20 l 245 -24 l 196 -41 l 148 -58 l 148 -108 b 148 -158 148 -136 148 -158 b 174 -148 148 -158 160 -154 b 204 -140 198 -140 200 -140 l 204 -140 b 224 -152 213 -140 221 -145 b 225 -201 224 -155 225 -177 b 224 -254 225 -226 224 -251 b 157 -284 220 -262 220 -262 l 148 -288 l 148 -395 l 148 -503 l 147 -506 b 127 -519 142 -514 134 -519 b 107 -506 119 -519 111 -514 l 106 -503 l 106 -403 b 106 -303 106 -316 106 -303 b 104 -303 104 -303 104 -303 b 88 -310 104 -303 96 -306 l 63 -319 b 51 -322 59 -320 55 -322 b 36 -315 46 -322 40 -319 b 31 -273 32 -309 31 -312 b 31 -258 31 -269 31 -263 l 31 -210 l 34 -206 b 40 -198 35 -204 38 -199 b 74 -186 42 -197 57 -191 l 106 -173 l 106 -123 b 106 -97 106 -112 106 -104 b 106 -72 106 -76 106 -72 b 104 -72 106 -72 106 -72 b 20 -99 89 -79 23 -99 b 0 -84 10 -99 2 -93 b -1 -37 0 -81 -1 -59 b 0 11 -1 -15 0 9 b 58 40 4 22 2 22 l 106 56 l 106 109 b 106 123 106 115 106 119 b 106 162 106 147 106 162 b 81 155 106 162 93 159 b 50 147 65 149 55 147 b 36 152 43 147 40 148 b 31 194 32 158 31 156 b 31 209 31 198 31 204 l 31 256 l 34 260 b 76 281 38 269 38 269 l 106 292 l 106 396 l 106 502 l 107 505 b 118 514 110 509 114 513 "},v8f:{x_min:-21.78125,x_max:362.0625,ha:369,o:"m 302 1031 b 308 1032 304 1032 307 1032 b 330 1016 318 1032 325 1027 b 362 867 351 970 362 920 b 340 738 362 824 353 780 l 336 727 l 340 717 b 362 591 355 677 362 634 b 257 323 362 496 325 401 b 204 272 243 306 227 290 b 20 56 129 206 66 133 b -1 18 12 44 0 22 b -19 4 -4 9 -12 4 l -21 4 l -21 140 l -21 276 l -12 277 b 167 333 61 288 127 309 b 319 598 262 388 319 491 b 311 664 319 620 317 642 l 310 673 l 304 664 b 204 548 279 620 250 587 b 20 333 129 483 66 409 b -1 292 12 320 0 298 b -19 280 -4 285 -12 280 l -21 280 l -21 416 l -21 552 l -12 553 b 167 609 61 564 127 585 b 319 874 264 666 319 770 b 294 992 319 914 311 954 b 288 1011 288 1004 288 1007 b 302 1031 288 1021 294 1028 "},v90:{x_min:-171.5,x_max:483.1875,ha:493,o:"m -8 631 b -1 632 -6 632 -4 632 b 19 620 8 632 16 628 b 20 495 20 616 20 616 b 20 373 20 427 20 373 b 115 410 20 373 63 390 l 210 448 l 210 531 b 212 620 210 614 210 616 b 231 632 215 628 223 632 b 246 627 236 632 242 631 b 251 541 251 620 251 628 l 251 463 l 315 489 b 387 514 368 509 381 514 b 393 513 390 514 392 514 b 406 494 402 510 406 502 b 397 476 406 487 404 480 b 323 446 396 474 363 462 l 251 417 l 251 283 l 251 148 l 254 151 b 370 199 291 183 332 199 b 415 191 385 199 400 197 b 483 84 458 176 483 134 b 461 0 483 58 476 29 b 332 -142 439 -40 411 -72 l 255 -215 b 231 -229 240 -229 239 -229 b 216 -223 224 -229 220 -227 b 210 -158 210 -217 210 -223 b 210 -120 210 -148 210 -136 l 210 -29 l 205 -34 b 100 -142 182 -65 159 -88 l 23 -215 b -1 -229 9 -229 6 -229 b -19 -217 -9 -229 -16 -224 l -20 -215 l -21 48 l -21 310 l -83 287 b -152 262 -133 266 -145 262 b -157 263 -153 262 -155 262 b -171 283 -166 266 -171 274 b -161 301 -171 290 -167 297 b -91 328 -160 302 -129 315 l -21 356 l -21 487 l -20 617 l -19 621 b -8 631 -17 626 -12 630 m 210 288 b 210 401 210 351 210 401 b 114 365 209 401 167 384 l 20 327 l 20 238 l 20 148 l 21 151 b 140 199 59 183 102 199 b 206 180 164 199 187 192 l 209 177 b 209 177 209 177 209 177 b 210 288 210 177 210 199 m 110 131 b 96 133 106 133 100 133 b 89 133 93 133 91 133 b 24 87 63 129 40 113 l 20 80 l 20 -37 l 20 -156 l 23 -152 b 144 81 96 -72 144 20 l 144 83 b 110 131 144 113 134 126 m 341 131 b 328 133 337 133 332 133 b 322 133 326 133 323 133 b 257 87 296 129 273 113 l 251 80 l 251 -37 l 251 -156 l 255 -152 b 375 81 328 -72 375 20 l 375 83 b 341 131 375 113 367 126 "},v92:{x_min:0,x_max:598.890625,ha:611,o:"m 62 181 b 77 183 66 183 72 183 b 91 181 83 183 88 183 b 202 131 100 180 106 177 l 299 87 l 394 131 b 517 183 499 181 502 183 b 519 183 517 183 518 183 b 598 104 567 183 598 144 b 577 49 598 84 592 65 b 518 15 567 38 563 37 b 484 0 499 6 484 0 b 518 -16 484 -1 499 -8 b 577 -51 563 -38 567 -40 b 598 -105 592 -66 598 -86 b 519 -184 598 -145 567 -184 b 517 -184 518 -184 517 -184 b 394 -133 502 -184 499 -183 l 299 -88 l 202 -133 b 81 -184 99 -183 95 -184 b 77 -184 80 -184 78 -184 b 0 -105 29 -184 0 -145 b 20 -51 0 -86 5 -66 b 80 -16 29 -40 34 -38 b 114 -1 98 -8 114 -1 b 80 15 114 0 98 6 b 20 49 34 37 29 38 b 0 104 6 65 0 84 b 62 181 0 140 23 174 m 88 134 b 74 136 85 134 80 136 b 68 134 72 136 69 136 b 46 104 54 130 46 117 b 55 81 46 95 49 88 b 149 34 59 76 53 80 b 224 -1 190 15 224 0 b 144 -38 224 -1 187 -18 b 54 -84 59 -79 58 -79 b 46 -105 49 -90 46 -98 b 76 -137 46 -122 58 -137 b 78 -137 77 -137 77 -137 b 194 -86 87 -137 76 -141 b 298 -36 250 -58 298 -36 b 298 -36 298 -36 298 -36 b 402 -84 299 -36 345 -58 b 518 -137 522 -141 510 -137 b 521 -137 519 -137 519 -137 b 551 -105 539 -137 551 -122 b 541 -83 551 -98 548 -90 b 447 -36 537 -77 544 -81 b 374 -1 406 -16 374 -1 b 447 34 374 0 406 15 b 541 81 544 80 537 76 b 551 104 548 88 551 97 b 521 136 551 120 539 136 b 518 136 519 136 519 136 b 517 136 518 136 517 136 l 517 136 b 402 83 511 136 511 136 b 298 34 345 56 299 34 b 298 34 298 34 298 34 b 194 84 298 34 250 56 b 88 134 137 111 89 133 "},v93:{x_min:0,x_max:438.28125,ha:447,o:"m 212 205 b 219 205 213 205 216 205 b 239 183 228 205 231 204 b 421 -163 298 40 363 -83 b 438 -191 434 -180 438 -186 b 436 -197 438 -192 438 -195 b 424 -206 434 -204 431 -206 b 406 -201 420 -206 415 -205 b 216 -156 347 -172 281 -156 b 23 -205 148 -156 80 -173 b 14 -206 20 -206 17 -206 b 0 -191 6 -206 0 -201 b 6 -176 0 -187 1 -183 b 202 192 63 -104 142 45 b 212 205 205 199 208 202 m 264 48 l 249 81 l 243 94 l 242 91 b 89 -126 208 36 137 -66 b 81 -138 85 -133 81 -138 b 81 -138 81 -138 81 -138 b 81 -138 81 -138 81 -138 b 95 -133 81 -138 87 -136 b 280 -94 156 -108 221 -94 b 334 -98 299 -94 317 -95 b 343 -99 338 -99 343 -99 b 343 -99 343 -99 343 -99 b 338 -94 343 -99 341 -97 b 264 48 318 -58 287 1 "},v94:{x_min:-149.71875,x_max:148.359375,ha:151,o:"m -9 215 b 0 217 -6 217 -4 217 b 19 205 8 217 14 213 b 20 142 20 202 20 201 l 20 84 l 23 84 b 144 -27 81 74 129 30 b 148 -66 147 -40 148 -54 b 36 -213 148 -134 103 -197 b 0 -219 24 -217 12 -219 b -145 -104 -68 -219 -129 -173 b -149 -68 -148 -91 -149 -79 b -24 84 -149 6 -98 74 l -21 84 l -21 142 b -19 205 -20 201 -20 202 b -9 215 -17 209 -13 213 m -21 -15 b -23 41 -21 37 -21 41 b -23 41 -23 41 -23 41 b -76 11 -35 40 -62 26 b -108 -65 -98 -11 -108 -38 b -1 -176 -108 -122 -65 -176 b 107 -65 63 -176 107 -122 b 74 11 107 -38 96 -11 b 20 41 61 26 32 41 b 20 -15 20 41 20 15 b 19 -74 20 -72 20 -72 b 0 -87 14 -83 6 -87 b -19 -74 -8 -87 -16 -83 b -21 -15 -20 -72 -20 -72 "},v95:{x_min:0,x_max:406.96875,ha:415,o:"m 55 181 b 70 183 61 183 66 183 b 111 170 85 183 99 179 b 160 130 115 167 137 149 l 202 95 l 245 130 b 319 181 299 176 302 179 b 334 183 325 183 330 183 b 406 109 375 183 406 148 b 401 81 406 99 405 91 b 348 24 394 65 390 59 b 318 -1 332 11 318 0 b 348 -26 318 -1 332 -12 b 401 -83 390 -61 394 -66 b 406 -111 405 -93 406 -101 b 334 -184 406 -149 375 -184 b 319 -183 330 -184 325 -184 b 245 -131 302 -180 299 -177 l 202 -97 l 160 -131 b 85 -183 107 -177 103 -180 b 70 -184 80 -184 76 -184 b 0 -111 31 -184 0 -149 b 4 -83 0 -101 1 -93 b 58 -26 10 -66 16 -61 b 88 -1 74 -12 88 -1 b 58 24 88 0 74 11 b 10 69 23 54 17 59 b 0 109 2 81 0 95 b 55 181 0 142 21 173 m 83 133 b 72 136 78 136 76 136 b 57 131 66 136 61 134 b 46 109 49 126 46 117 b 50 93 46 104 47 98 b 107 45 51 91 77 70 b 160 0 137 20 160 0 b 107 -47 160 -1 137 -22 b 50 -94 77 -72 51 -93 b 46 -111 47 -99 46 -105 b 59 -134 46 -120 50 -130 b 72 -137 62 -136 68 -137 b 83 -136 76 -137 80 -136 b 144 -84 84 -134 107 -116 b 202 -36 176 -58 202 -36 b 261 -84 202 -36 230 -58 b 323 -136 299 -116 321 -134 b 334 -137 326 -136 330 -137 b 345 -134 338 -137 343 -136 b 360 -111 355 -130 360 -120 b 355 -94 360 -105 359 -99 b 299 -47 353 -93 329 -72 b 245 0 269 -22 245 -1 b 299 45 245 0 269 20 b 355 93 329 70 353 91 b 360 109 359 98 360 104 b 345 133 360 119 355 129 b 334 136 343 134 338 136 b 323 134 330 136 326 134 b 261 83 321 133 299 115 b 202 34 230 56 202 34 b 144 83 202 34 176 56 b 83 133 106 115 84 133 "},v97:{x_min:-228.671875,x_max:227.3125,ha:232,o:"m -217 487 l -213 488 l 0 488 l 212 488 l 216 487 b 225 476 220 484 224 480 l 227 473 l 227 244 l 227 15 l 225 12 b 206 0 223 4 215 0 b 197 1 204 0 200 0 b 187 12 193 4 189 6 l 186 15 l 186 138 l 186 262 l -1 262 l -187 262 l -187 138 l -187 15 l -189 12 b -208 0 -193 4 -200 0 b -227 12 -216 0 -223 4 l -228 15 l -228 244 l -228 473 l -227 476 b -217 487 -225 480 -221 484 "},v9a:{x_min:-21.78125,x_max:367.5,ha:375,o:"m 230 1031 b 238 1032 232 1032 235 1032 b 259 1014 245 1032 251 1027 b 367 662 330 906 367 782 b 364 602 367 641 367 621 b 232 317 352 488 304 384 b 57 120 155 245 103 187 b -1 18 31 84 6 40 b -19 4 -4 11 -12 4 l -21 4 l -21 159 l -21 315 l -16 315 b 96 335 10 315 62 324 b 315 695 227 380 315 527 b 313 738 315 709 314 724 b 224 991 304 825 273 916 b 216 1013 219 999 216 1007 b 230 1031 216 1021 220 1028 "},v9b:{x_min:-24.5,x_max:313.0625,ha:319,o:"m -24 -133 l -24 -5 l -20 -5 b -1 -19 -12 -5 -4 -11 b 142 -213 13 -61 74 -144 b 258 -376 196 -269 230 -315 b 313 -605 295 -449 313 -528 b 292 -742 313 -652 306 -699 b 288 -752 289 -748 288 -752 b 288 -752 288 -752 288 -752 b 292 -764 289 -753 291 -757 b 313 -907 306 -811 313 -860 b 292 -1045 313 -954 306 -1002 b 288 -1054 289 -1050 288 -1054 b 288 -1054 288 -1054 288 -1054 b 292 -1067 289 -1054 291 -1060 b 313 -1210 306 -1113 313 -1161 b 292 -1346 313 -1257 306 -1304 b 288 -1357 289 -1353 288 -1357 b 288 -1357 288 -1357 288 -1357 b 292 -1368 289 -1357 291 -1363 b 313 -1512 306 -1415 313 -1464 b 292 -1648 313 -1560 306 -1605 b 288 -1660 289 -1654 288 -1660 b 288 -1660 288 -1660 288 -1660 b 292 -1671 289 -1660 291 -1665 b 313 -1814 306 -1719 313 -1766 b 250 -2040 313 -1897 291 -1977 b 232 -2062 238 -2057 236 -2059 b 221 -2065 230 -2063 225 -2065 b 200 -2045 210 -2065 201 -2057 b 200 -2043 200 -2044 200 -2044 b 208 -2026 200 -2037 202 -2034 b 269 -1826 249 -1966 269 -1897 b 153 -1544 269 -1726 230 -1625 b -9 -1472 115 -1506 58 -1481 b -21 -1471 -14 -1471 -19 -1471 l -24 -1471 l -24 -1343 l -24 -1215 l -20 -1215 b -1 -1229 -12 -1215 -4 -1221 b 142 -1424 13 -1270 74 -1353 b 257 -1582 196 -1478 228 -1524 b 264 -1594 261 -1589 264 -1594 l 264 -1594 b 265 -1582 264 -1594 264 -1589 b 270 -1525 268 -1562 270 -1544 b 153 -1243 270 -1424 228 -1321 b -9 -1170 115 -1203 58 -1178 b -21 -1168 -14 -1170 -19 -1168 l -24 -1168 l -24 -1041 l -24 -913 l -20 -913 b -1 -927 -12 -913 -4 -918 b 142 -1121 13 -967 74 -1050 b 257 -1281 196 -1175 228 -1221 b 264 -1292 261 -1286 264 -1292 l 264 -1292 b 265 -1279 264 -1292 264 -1286 b 270 -1222 268 -1261 270 -1242 b 153 -941 270 -1121 228 -1018 b -9 -867 115 -900 58 -875 b -21 -866 -14 -867 -19 -866 l -24 -866 l -24 -738 l -24 -610 l -20 -610 b -1 -624 -12 -610 -4 -616 b 142 -818 13 -664 74 -749 b 257 -978 196 -873 228 -918 b 264 -989 261 -984 264 -989 l 264 -989 b 265 -977 264 -989 264 -984 b 270 -920 268 -959 270 -939 b 153 -638 270 -818 228 -716 b -9 -564 115 -598 58 -573 b -21 -563 -14 -564 -19 -563 l -24 -563 l -24 -435 l -24 -308 l -20 -308 b -1 -322 -12 -308 -4 -313 b 142 -516 13 -363 74 -446 b 257 -675 196 -571 228 -616 b 264 -687 261 -681 264 -687 l 264 -687 b 265 -674 264 -687 264 -681 b 270 -617 268 -656 270 -637 b 153 -335 270 -516 228 -413 b -9 -262 115 -295 58 -270 b -21 -260 -14 -262 -19 -260 l -24 -260 l -24 -133 "},v9c:{x_min:-166.0625,x_max:-25.859375,ha:0,o:"m -49 369 b -42 370 -46 369 -44 370 b -27 360 -36 370 -29 366 b -25 355 -27 359 -25 358 b -32 335 -25 351 -28 347 b -92 52 -66 248 -87 159 b -93 -1 -93 43 -93 20 b -92 -54 -93 -23 -93 -45 b -32 -337 -85 -162 -66 -251 b -25 -355 -27 -349 -25 -352 b -42 -371 -25 -365 -32 -371 b -61 -353 -50 -371 -51 -369 b -163 -63 -119 -262 -153 -165 b -166 -1 -166 -37 -166 -31 b -163 62 -166 30 -166 36 b -61 352 -153 163 -119 260 b -49 369 -54 365 -51 366 "},v9e:{x_min:0,x_max:607.0625,ha:619,o:"m 243 631 b 250 632 246 632 249 632 b 270 620 259 632 268 628 l 272 616 l 272 201 l 272 -212 l 270 -216 b 251 -229 268 -224 259 -229 b 227 -215 243 -229 240 -229 l 151 -142 b 32 -16 81 -80 53 -49 b 0 84 9 18 0 52 b 111 199 0 149 42 199 b 137 197 119 199 127 198 b 228 151 168 191 197 177 l 231 148 l 231 383 b 232 620 231 616 231 616 b 243 631 234 624 238 630 m 168 131 b 152 133 163 133 157 133 b 107 102 130 133 111 120 b 106 86 107 97 106 91 b 111 41 106 73 108 56 b 227 -152 125 -13 171 -90 l 231 -156 l 231 -37 l 231 80 l 225 87 b 168 131 210 111 190 126 m 347 631 b 353 632 348 632 351 632 b 374 620 363 632 371 628 b 375 383 375 616 375 616 l 375 148 l 377 151 b 492 199 415 183 454 199 b 537 191 507 199 522 197 b 607 84 582 176 607 134 b 583 0 607 58 598 29 b 455 -142 562 -40 533 -72 l 378 -215 b 355 -229 364 -229 362 -229 b 334 -216 345 -229 337 -224 l 333 -212 l 333 201 l 333 616 l 334 620 b 347 631 337 624 341 630 m 465 131 b 451 133 461 133 455 133 b 445 133 449 133 446 133 b 379 87 419 129 396 113 l 375 80 l 375 -37 l 375 -156 l 378 -152 b 499 81 451 -72 499 20 l 499 83 b 465 131 499 113 490 126 "},va3:{x_min:58.53125,x_max:228.671875,ha:294,o:"m 138 371 b 142 373 140 371 141 373 b 178 342 149 373 156 366 b 228 251 217 297 228 278 b 228 244 228 248 228 247 b 176 147 227 212 212 184 b 123 73 152 122 132 93 b 121 62 122 70 121 66 b 145 13 121 48 129 31 b 153 -2 151 6 153 1 b 149 -9 153 -5 152 -6 b 144 -11 148 -11 145 -11 b 129 -1 140 -11 136 -8 b 61 87 89 37 68 68 b 58 113 59 95 58 105 b 110 215 58 144 74 177 b 163 287 134 240 155 269 b 166 299 166 291 166 295 b 141 348 166 313 157 330 b 133 360 134 356 133 358 b 133 363 133 362 133 362 b 138 371 133 367 136 370 "},va5:{x_min:0,x_max:349.8125,ha:357,o:"m 88 302 b 103 303 93 302 98 303 b 202 224 149 303 191 270 b 205 199 204 216 205 208 b 178 129 205 173 196 147 l 175 126 l 182 127 b 307 249 236 142 284 190 b 313 259 308 254 311 258 b 329 267 317 265 323 267 b 349 247 340 267 349 259 b 201 -263 349 242 204 -258 b 182 -273 197 -270 190 -273 b 163 -260 174 -273 166 -269 b 161 -256 161 -259 161 -258 b 217 -59 161 -248 170 -220 b 272 129 247 43 272 127 b 272 129 272 129 272 129 b 264 122 272 129 268 126 b 140 80 227 94 183 80 b 36 115 102 80 65 91 b 0 194 10 136 0 165 b 88 302 0 244 32 292 "},va9:{x_min:-24.5,x_max:314.421875,ha:321,o:"m -24 -145 l -24 -5 l -20 -5 b 0 -23 -9 -5 -2 -12 b 27 -87 4 -38 14 -66 b 138 -220 53 -136 88 -177 b 235 -328 179 -255 208 -288 b 314 -592 287 -409 314 -501 b 292 -732 314 -639 307 -687 l 289 -742 l 294 -756 b 314 -896 307 -802 314 -849 b 292 -1035 314 -943 307 -991 l 289 -1045 l 294 -1057 b 314 -1197 307 -1104 314 -1152 b 292 -1338 314 -1246 307 -1292 l 289 -1347 l 294 -1360 b 314 -1500 307 -1407 314 -1454 b 273 -1689 314 -1565 300 -1628 b 250 -1712 265 -1710 261 -1712 b 228 -1691 236 -1712 228 -1704 l 228 -1685 l 234 -1675 b 270 -1507 258 -1621 270 -1564 b 98 -1193 270 -1381 209 -1261 b 40 -1174 76 -1179 58 -1174 b -10 -1189 24 -1174 8 -1178 b -20 -1192 -14 -1192 -16 -1192 l -24 -1192 l -24 -1052 l -24 -913 l -20 -913 b 0 -931 -9 -913 -2 -920 b 27 -995 4 -946 14 -974 b 138 -1128 53 -1043 88 -1085 b 257 -1275 190 -1172 228 -1220 b 262 -1283 259 -1279 262 -1283 l 262 -1283 b 269 -1249 264 -1282 268 -1260 b 270 -1206 270 -1233 270 -1220 b 98 -891 270 -1075 206 -957 b 40 -871 76 -877 58 -871 b -10 -886 24 -871 8 -875 b -20 -889 -14 -889 -16 -889 l -24 -889 l -24 -749 l -24 -610 l -20 -610 b 0 -628 -9 -610 -2 -617 b 27 -692 4 -644 14 -671 b 138 -825 53 -741 88 -782 b 257 -973 190 -870 228 -917 b 262 -981 259 -977 262 -981 l 262 -981 b 269 -946 264 -979 268 -957 b 270 -903 270 -931 270 -917 b 98 -588 270 -774 206 -655 b 40 -569 76 -574 58 -569 b -10 -584 24 -569 8 -574 b -20 -587 -14 -587 -16 -587 l -24 -587 l -24 -448 l -24 -308 l -20 -308 b 0 -326 -9 -308 -2 -315 b 27 -390 4 -341 14 -369 b 138 -523 53 -438 88 -480 b 257 -670 190 -567 228 -614 b 262 -678 259 -674 262 -678 b 262 -678 262 -678 262 -678 b 269 -644 264 -677 268 -656 b 270 -601 270 -628 270 -614 b 98 -285 270 -471 206 -352 b 40 -266 76 -273 58 -266 b -10 -281 24 -266 8 -272 b -20 -284 -14 -284 -16 -284 l -24 -284 l -24 -145 "},vaa:{x_min:-1.359375,x_max:752.703125,ha:768,o:"m 490 985 b 504 986 495 986 500 986 b 604 907 551 986 593 954 b 607 884 607 900 607 892 b 581 813 607 857 597 831 l 578 810 l 583 811 b 710 932 638 827 687 873 b 714 943 711 936 713 942 b 730 952 720 949 725 952 b 752 931 741 952 752 943 b 200 -946 752 927 204 -941 b 182 -957 197 -953 190 -957 b 163 -945 174 -957 166 -953 b 161 -939 161 -942 161 -942 b 217 -743 161 -931 170 -904 b 272 -555 247 -639 272 -555 b 272 -555 272 -555 272 -555 b 264 -560 272 -555 268 -557 b 140 -603 227 -589 182 -603 b 36 -567 102 -603 65 -592 b -1 -487 12 -548 -1 -517 b 17 -427 -1 -466 5 -445 b 103 -380 38 -395 70 -380 b 191 -433 137 -380 172 -398 b 205 -484 201 -448 205 -466 b 178 -553 205 -509 196 -535 l 175 -557 l 182 -555 b 307 -435 236 -539 284 -494 b 372 -213 308 -430 372 -215 b 372 -213 372 -213 372 -213 b 364 -219 372 -213 368 -216 b 240 -262 328 -247 283 -262 b 137 -226 202 -262 166 -249 b 99 -145 112 -206 99 -176 b 118 -84 99 -124 106 -104 b 204 -38 138 -54 171 -38 b 292 -91 238 -38 273 -56 b 306 -141 302 -106 306 -124 b 279 -212 306 -167 296 -194 l 276 -215 l 281 -213 b 408 -93 336 -198 385 -151 b 473 129 409 -88 473 127 b 473 129 473 129 473 129 b 465 122 473 129 469 126 b 341 80 428 94 383 80 b 236 115 303 80 266 91 b 200 195 213 136 200 165 b 217 256 200 217 206 238 b 304 303 239 287 272 303 b 393 249 338 303 374 285 b 406 199 402 234 406 217 b 379 129 406 173 397 148 l 377 126 l 382 127 b 509 248 436 142 485 190 b 574 470 510 254 574 469 b 574 470 574 470 574 470 b 566 464 574 470 570 467 b 442 421 529 435 484 421 b 337 458 404 421 367 433 b 300 538 314 477 300 508 b 318 598 300 559 306 580 b 404 645 340 630 372 645 b 494 592 439 645 475 627 b 507 541 502 577 507 559 b 480 471 507 516 498 489 l 477 467 l 483 470 b 608 589 537 485 586 531 b 675 811 611 595 675 810 b 675 811 675 811 675 811 b 666 806 675 811 671 809 b 543 763 628 777 585 763 b 438 799 504 763 468 775 b 401 878 412 820 401 849 b 490 985 401 928 434 977 "},vab:{x_min:0,x_max:272.21875,ha:278,o:"m 243 631 b 250 632 246 632 249 632 b 270 620 259 632 268 628 l 272 616 l 272 201 l 272 -212 l 270 -216 b 251 -229 268 -224 259 -229 b 227 -215 243 -229 240 -229 l 151 -142 b 32 -16 81 -80 53 -49 b 0 84 9 18 0 52 b 111 199 0 149 42 199 b 137 197 119 199 127 198 b 228 151 168 191 197 177 l 231 148 l 231 383 b 232 620 231 616 231 616 b 243 631 234 624 238 630 m 168 131 b 152 133 163 133 157 133 b 107 102 130 133 111 120 b 106 86 107 97 106 91 b 111 41 106 73 108 56 b 227 -152 125 -13 171 -90 l 231 -156 l 231 -37 l 231 80 l 225 87 b 168 131 210 111 190 126 "},vad:{x_min:0,x_max:873.828125,ha:892,o:"m 0 0 l 0 703 l 81 703 l 164 703 l 164 0 l 164 -705 l 81 -705 l 0 -705 l 0 0 m 225 0 l 225 703 l 246 703 l 268 703 l 268 366 l 268 30 l 274 36 b 314 79 284 44 302 63 b 413 302 357 137 392 213 b 432 327 419 324 421 327 b 449 306 443 327 447 322 b 611 115 457 195 529 115 b 651 122 624 115 638 117 b 728 316 705 140 724 188 b 729 388 728 342 729 366 b 671 635 729 533 711 602 b 581 662 649 652 616 662 b 477 637 545 662 510 653 l 475 635 l 477 634 b 503 627 488 632 495 631 b 545 556 532 612 545 584 b 491 480 545 524 526 491 b 465 474 481 476 473 474 b 379 563 417 474 379 516 b 389 602 379 576 382 588 b 541 691 409 641 479 681 b 582 694 555 692 568 694 b 865 462 714 694 834 598 b 873 392 871 440 873 416 b 865 317 873 367 871 341 b 639 84 839 194 748 101 b 612 83 630 83 620 83 b 511 116 577 83 543 94 b 504 120 509 119 506 120 b 504 120 504 120 504 120 b 469 59 504 120 488 93 l 432 -1 l 469 -61 b 504 -122 488 -94 504 -122 b 504 -122 504 -122 504 -122 b 511 -117 506 -122 509 -120 b 612 -84 543 -95 577 -84 b 665 -91 630 -84 647 -87 b 869 -338 771 -122 850 -216 b 873 -392 872 -356 873 -374 b 798 -595 873 -469 847 -539 b 581 -695 741 -662 660 -695 b 406 -626 517 -695 454 -671 b 381 -563 389 -607 381 -585 b 465 -477 381 -519 413 -477 b 545 -559 514 -477 545 -519 b 503 -628 545 -587 532 -613 b 477 -635 495 -632 488 -634 l 475 -637 l 477 -638 b 581 -663 510 -655 545 -663 b 671 -637 616 -663 649 -653 b 729 -391 711 -603 729 -534 b 728 -317 729 -367 728 -344 b 623 -117 722 -173 698 -124 b 611 -116 619 -116 615 -116 b 449 -308 528 -116 457 -198 b 432 -328 447 -323 443 -328 b 413 -303 421 -328 419 -326 b 314 -80 392 -215 357 -138 b 274 -37 302 -65 284 -45 l 268 -31 l 268 -367 l 268 -705 l 246 -705 l 225 -705 l 225 0 "},vb1:{x_min:78.9375,x_max:485.921875,ha:417,o:"m 362 378 b 378 380 367 380 372 380 b 472 348 415 380 453 367 b 485 315 481 338 485 327 b 462 273 485 298 477 281 b 439 267 454 269 446 267 b 398 290 424 267 409 274 b 344 319 385 309 364 319 b 281 269 315 319 289 301 b 279 262 280 266 279 262 b 276 256 279 260 277 258 b 274 249 276 254 274 251 b 238 127 273 248 257 192 b 201 4 217 61 201 5 b 166 -1 198 -1 200 -1 b 153 -1 163 -1 157 -1 b 141 -1 148 -1 144 -1 b 104 4 106 -1 107 -1 b 104 6 104 5 104 5 b 142 144 104 13 110 34 b 182 278 164 219 181 276 b 183 288 182 281 182 285 b 185 302 185 292 185 298 b 164 330 185 317 176 328 b 159 330 163 330 161 330 b 102 302 140 330 119 320 b 91 294 95 295 93 294 b 88 294 91 294 89 294 b 78 303 83 294 78 298 b 81 312 78 306 78 309 b 200 373 106 347 160 373 b 215 371 205 373 209 371 b 266 335 235 367 254 353 b 269 331 268 333 269 331 b 269 331 269 331 269 331 b 273 335 269 331 270 334 b 362 378 298 359 330 376 "},vb3:{x_min:0,x_max:227.3125,ha:232,o:"m 91 213 b 100 215 93 215 96 215 b 227 58 167 215 224 144 b 227 52 227 56 227 54 b 61 -201 227 -43 164 -138 b 29 -216 44 -212 36 -216 b 23 -210 27 -216 24 -213 b 21 -205 21 -208 21 -206 b 34 -192 21 -201 25 -197 b 122 -55 89 -161 122 -106 b 104 6 122 -33 117 -12 l 103 9 l 96 9 b 4 79 57 9 17 38 b 0 112 1 90 0 101 b 91 213 0 163 36 209 "},vb4:{x_min:-597.53125,x_max:596.171875,ha:608,o:"m -533 324 b -525 327 -530 326 -528 327 b -504 305 -514 327 -504 317 b -504 305 -504 305 -504 305 b -513 284 -504 299 -504 299 b -556 112 -541 226 -556 167 b -545 33 -556 84 -552 58 b -524 -20 -541 15 -532 -9 l -522 -23 l -491 15 l -413 111 b -355 174 -367 169 -363 174 b -351 174 -353 174 -352 174 b -254 86 -343 174 -348 179 b -168 -1 -208 37 -168 -1 b -100 84 -168 -1 -137 37 b -23 173 -28 173 -29 172 b -19 174 -21 174 -20 174 b -8 173 -14 174 -10 173 b 80 86 -5 172 13 151 b 166 -1 127 37 166 -1 b 235 84 166 -1 197 37 b 311 173 306 173 304 172 b 317 174 313 174 314 174 b 326 173 319 174 323 173 b 490 11 329 172 366 134 l 502 -1 l 530 34 b 568 76 560 72 563 74 b 575 77 570 77 573 77 b 596 56 586 77 596 68 b 594 48 596 54 596 51 b 417 -172 592 41 424 -166 b 405 -176 415 -174 409 -176 b 396 -174 401 -176 398 -176 b 307 -87 393 -173 372 -152 b 221 -1 259 -38 221 -1 b 152 -86 221 -1 190 -38 b 76 -176 81 -174 83 -173 b 70 -176 74 -176 73 -176 b 61 -174 66 -176 62 -174 b -27 -87 58 -173 38 -152 b -114 -1 -74 -38 -112 -1 b -182 -86 -114 -1 -145 -38 b -258 -176 -253 -174 -253 -173 b -264 -176 -259 -176 -262 -176 b -274 -174 -268 -176 -272 -174 b -438 -11 -277 -173 -348 -102 l -449 0 l -479 -37 b -524 -80 -513 -80 -514 -80 l -524 -80 b -553 -52 -534 -80 -540 -74 b -597 109 -583 -8 -597 48 b -560 280 -597 165 -585 224 b -533 324 -548 310 -540 322 "},vb6:{x_min:0,x_max:556.6875,ha:568,o:"m 289 545 b 298 546 292 545 295 546 b 318 533 306 546 315 541 b 319 428 319 530 319 528 l 319 327 l 334 327 b 526 223 412 326 485 285 b 543 172 537 206 543 190 b 447 76 543 122 503 76 b 445 76 446 76 446 76 b 359 165 394 77 359 119 b 368 205 359 179 362 192 b 441 251 382 233 412 251 b 455 249 446 251 451 251 b 460 248 458 249 460 248 b 460 248 460 248 460 248 b 454 254 460 249 458 251 b 334 295 419 280 378 294 l 319 295 l 319 4 l 319 -287 l 321 -285 b 328 -285 322 -285 325 -285 b 524 -99 424 -277 507 -198 b 541 -79 526 -84 530 -79 b 556 -97 551 -79 556 -84 b 548 -133 556 -105 553 -117 b 334 -317 521 -233 434 -306 b 322 -319 329 -317 323 -317 l 319 -319 l 319 -424 b 319 -471 319 -444 319 -459 b 313 -541 319 -544 318 -535 b 298 -548 308 -545 303 -548 b 279 -534 289 -548 281 -542 b 277 -424 277 -531 277 -530 l 277 -317 l 273 -317 b 13 -95 153 -305 51 -217 b 0 2 4 -62 0 -29 b 182 295 0 126 66 238 b 274 324 210 309 249 320 l 277 324 l 277 427 b 279 533 277 528 277 530 b 289 545 281 538 285 542 m 277 2 b 277 291 277 161 277 291 b 268 288 277 291 273 290 b 144 1 179 265 144 184 b 276 -284 144 -199 175 -267 l 277 -285 l 277 2 "},vb7:{x_min:-176.9375,x_max:251.8125,ha:257,o:"m -8 631 b -1 632 -6 632 -4 632 b 19 620 8 632 16 628 b 20 503 20 616 20 614 b 20 391 20 442 20 391 b 84 424 20 391 49 406 l 147 456 l 152 456 b 153 456 153 456 153 456 b 175 435 166 456 175 446 b 172 427 175 433 174 430 b 92 380 170 420 172 421 l 20 342 l 20 245 l 20 148 l 21 151 b 137 199 59 183 99 199 b 182 191 152 199 167 197 b 251 84 227 176 251 134 b 228 0 251 58 243 29 b 100 -142 206 -40 178 -72 l 23 -215 b 0 -229 9 -229 6 -229 b -20 -216 -9 -229 -17 -224 b -21 54 -21 -212 -21 -212 b -21 322 -21 201 -21 322 b -85 290 -21 322 -50 308 l -148 256 l -153 256 b -155 256 -155 256 -155 256 b -176 277 -167 256 -176 266 b -174 285 -176 280 -175 283 b -93 333 -171 294 -174 292 l -21 370 l -21 494 b -20 620 -21 616 -21 616 b -8 631 -17 624 -13 630 m 110 131 b 96 133 106 133 100 133 b 89 133 93 133 91 133 b 24 87 63 129 40 113 l 20 80 l 20 -37 l 20 -156 l 23 -152 b 144 81 96 -72 144 20 l 144 83 b 110 131 144 113 134 126 "},vb9:{x_min:-122.5,x_max:121.140625,ha:124,o:"m -16 145 b 0 147 -10 147 -5 147 b 121 -1 66 147 121 77 b 114 -49 121 -16 118 -33 b -1 -148 95 -112 47 -148 b -85 -106 -31 -148 -61 -134 b -122 -1 -110 -76 -122 -38 b -16 145 -122 68 -81 134 m 12 111 b 0 113 8 113 4 113 b -68 22 -29 113 -61 73 b -70 0 -69 15 -70 6 b -13 -113 -70 -49 -47 -98 b -1 -115 -9 -115 -5 -115 b 63 -40 24 -115 53 -83 b 68 -1 66 -27 68 -15 b 12 111 68 48 46 97 "},vba:{x_min:-118.421875,x_max:597.53125,ha:381,o:"m 460 574 b 464 574 461 574 462 574 b 488 574 470 574 481 574 b 500 573 491 574 498 574 b 594 503 543 570 588 538 b 597 488 596 498 597 494 b 528 417 597 449 564 417 b 502 423 519 417 510 419 b 465 481 477 434 465 458 b 488 528 465 499 472 516 b 490 530 490 530 490 530 b 490 530 490 530 490 530 b 468 517 488 530 475 523 b 349 340 419 485 377 420 b 347 330 348 334 347 330 b 383 328 347 328 363 328 b 428 326 423 328 424 328 b 442 302 438 320 442 312 b 430 281 442 294 438 285 b 385 276 424 277 426 276 l 377 276 l 332 276 l 330 269 b 178 -117 303 126 250 -9 b 1 -249 129 -194 69 -237 b -20 -251 -6 -251 -13 -251 b -114 -187 -65 -251 -100 -227 b -118 -156 -117 -177 -118 -166 b -51 -84 -118 -116 -91 -84 b -31 -87 -46 -84 -39 -86 b 16 -152 0 -95 16 -124 b -12 -205 16 -173 8 -194 b -16 -208 -14 -206 -16 -208 b -14 -208 -16 -208 -14 -208 b -9 -206 -14 -208 -12 -208 b 74 -124 23 -197 54 -166 b 172 224 98 -79 125 22 b 185 276 178 252 183 274 b 185 276 185 276 185 276 b 141 276 185 276 181 276 b 91 280 96 276 96 276 b 77 302 83 285 77 294 b 91 326 77 312 83 320 b 148 328 95 328 96 328 l 198 330 l 202 341 b 460 574 249 473 351 566 "},vbf:{x_min:-53.078125,x_max:513.140625,ha:485,o:"m 185 383 b 196 384 187 383 191 384 b 277 334 230 384 259 365 b 288 301 281 324 288 306 b 288 297 288 298 288 297 b 294 302 289 297 291 299 b 394 370 323 338 367 367 b 404 371 398 370 401 371 b 510 272 453 371 498 328 b 513 237 513 262 513 251 b 507 172 513 217 511 192 b 326 -34 487 59 412 -26 b 314 -36 322 -36 318 -36 b 274 -24 298 -36 283 -31 l 265 -16 b 224 44 246 -1 232 20 b 223 49 224 47 223 49 b 223 49 223 49 223 49 b 149 -197 221 48 149 -194 b 149 -198 149 -197 149 -198 b 170 -210 149 -202 155 -205 b 187 -215 174 -210 175 -212 b 204 -231 201 -219 204 -222 b 197 -245 204 -240 202 -242 l 194 -248 l 76 -248 l -42 -248 l -46 -245 b -53 -231 -51 -242 -53 -240 b -35 -215 -53 -222 -49 -217 b -13 -210 -21 -212 -20 -212 b -6 -208 -10 -209 -8 -208 b 0 -206 -6 -208 -2 -206 b 25 -188 13 -201 21 -195 b 163 280 28 -183 163 276 b 166 291 163 283 164 287 b 167 302 167 295 167 299 b 155 324 167 315 161 324 b 155 324 155 324 155 324 b 65 230 125 322 85 280 b 53 215 61 217 58 215 b 51 215 53 215 51 215 b 42 224 46 215 42 217 b 57 263 42 231 47 244 b 140 360 77 305 104 337 b 152 370 144 365 149 369 b 185 383 157 376 172 381 m 374 306 b 366 308 371 308 368 308 b 300 273 348 308 321 294 b 284 254 288 262 287 259 b 280 242 283 249 281 245 b 257 169 279 240 270 213 l 236 98 l 236 93 b 251 48 238 77 243 61 b 279 27 258 37 272 27 b 281 27 279 27 280 27 b 291 31 281 27 287 30 b 396 170 334 52 378 109 b 406 247 402 197 406 224 b 401 277 406 259 405 270 b 374 306 397 290 383 303 "},vc3:{x_min:-10.890625,x_max:299.4375,ha:294,o:"m 136 460 b 142 462 137 462 140 462 b 166 449 152 462 161 456 b 171 428 168 446 168 445 b 288 131 194 322 238 209 b 298 115 295 120 296 117 b 299 106 298 112 299 109 b 273 81 299 91 287 81 b 255 86 268 81 261 83 b 155 116 225 104 183 116 l 152 116 l 149 108 b 141 83 148 102 144 91 b 134 48 137 69 134 58 b 149 9 134 34 140 24 b 153 -1 152 5 153 1 b 149 -9 153 -5 152 -6 b 144 -11 148 -11 147 -11 b 122 2 138 -11 133 -6 b 95 61 104 20 95 38 b 107 108 95 74 99 90 b 108 113 107 111 108 112 b 107 113 108 113 108 113 b 102 113 106 113 104 113 b 31 86 76 108 53 98 b 14 80 24 81 20 80 b -10 106 0 80 -10 91 b 0 131 -10 115 -9 116 b 115 430 49 209 91 317 b 136 460 119 451 123 456 "},vd0:{x_min:-10.890625,x_max:299.4375,ha:294,o:"m 44 174 b 51 174 47 174 49 174 b 68 173 55 174 61 174 l 287 112 l 551 40 b 615 20 617 22 609 23 b 626 0 622 16 626 8 b 615 -22 626 -9 622 -18 b 613 -23 613 -23 613 -23 b 613 -23 613 -23 613 -23 b 287 -113 613 -24 597 -29 l 68 -174 b 53 -176 61 -176 57 -176 b 39 -172 47 -176 43 -174 b 27 -151 31 -167 27 -159 b 39 -129 27 -141 31 -133 b 230 -74 43 -124 20 -131 l 370 -36 l 468 -9 b 498 0 484 -4 498 -1 b 468 8 498 0 484 2 l 370 34 l 230 73 b 40 126 28 129 43 124 b 27 149 31 131 27 140 b 44 174 27 161 34 170 m 205 110 l 205 300 b 205 330 245 330 245 300 l 245 300 l 245 -300 b 245 -330 205 -330 205 -300 l 205 -300 l 205 110 l 345 90 m 345 90 l 345 330 b 345 360 385 360 385 330 l 385 330 l 385 -270 b 385 -300 345 -300 345 -270 l 345 -270 l 345 90 "},vd1:{x_min:-20,x_max:320,ha:257,o:"m -8 200 b -8 210 8 200 16 200 l 20 148 -199 l 23 -615 b 0 -629 9 -629 6 -629 l -21 -612 l -21 -201 l -21 216 l -20 200 m 16 200 l 310 0 l 240 0 l 16 140 l 16 -120 l 240 0 l 310 0 l 16 -200 "},vd2:{x_min:0,x_max:430.75,ha:386,o:"m 0 200 l 0 -200 l 430 -200 l 430 200 l 0 200 "},vd3:{x_min:0,x_max:430.75,ha:386,o:"m 0 200 l 0 -200 l 430 -200 l 430 200 l 0 200 l 50 150 l 380 150 l 380 -150 l 50 -150 l 50 150 "},vd4:{x_min:0,x_max:430.75,ha:360,o:"m 0 150 l 0 -150 l 430 -150 l 430 150 l 0 150 "},vd5:{x_min:0,x_max:430.75,ha:360,o:"m 0 150 l 0 -150 l 430 -150 l 430 150 l 0 150 l 50 100 l 380 100 l 380 -100 l 50 -100 l 50 100"},vd6:{x_min:0,x_max:430.75,ha:360,o:"m -146 537 b -138 538 -143 538 -141 538 b -118 525 -129 538 -121 533 b -117 390 -117 522 -117 521 b -115 259 -117 268 -117 259 b -115 259 -115 259 -115 259 b -59 272 -104 263 -62 272 b -39 259 -50 272 -42 267 b -37 209 -38 257 -37 233 b -39 159 -37 185 -38 162 b -85 138 -43 149 -44 149 l -117 131 l -117 21 b -115 -88 -117 -80 -117 -88 b -115 -88 -115 -88 -115 -88 b -59 -75 -104 -84 -62 -75 b -44 -81 -52 -75 -48 -77 b -38 -124 -38 -87 -38 -85 b -38 -138 -38 -124 -38 -138 b -38 -152 -38 -138 -38 -152 b -44 -195 -38 -191 -38 -190 b -85 -209 -48 -200 -48 -200 l -117 -217 l -117 -349 b -118 -486 -117 -481 -117 -482 b -138 -499 -121 -494 -129 -499 b -153 -493 -143 -499 -149 -497 b -159 -415 -158 -487 -159 -496 b -159 -355 -159 -398 -159 -379 b -159 -227 -159 -284 -159 -227 b -205 -238 -159 -227 -180 -232 b -250 -249 -230 -244 -250 -249 b -251 -386 -251 -249 -251 -311 b -252 -525 -251 -521 -251 -522 b -272 -538 -255 -534 -264 -538 b -287 -532 -277 -538 -283 -536 b -293 -452 -292 -527 -293 -536 b -293 -391 -293 -436 -293 -415 b -294 -260 -293 -269 -293 -260 b -294 -260 -294 -260 -294 -260 b -348 -272 -306 -264 -345 -272 b -368 -259 -357 -272 -365 -267 b -369 -209 -369 -257 -369 -233 b -368 -159 -369 -185 -369 -162 b -323 -139 -364 -149 -362 -148 l -293 -131 l -293 -22 b -294 87 -293 80 -293 87 b -294 87 -294 87 -294 87 b -348 75 -306 84 -345 75 b -368 88 -357 75 -365 80 b -369 138 -369 91 -369 114 b -368 188 -369 162 -369 186 b -323 209 -364 198 -362 199 l -293 216 l -293 349 b -292 486 -293 481 -293 482 b -272 499 -288 494 -280 499 b -257 493 -266 499 -261 497 b -251 414 -251 487 -251 496 b -251 354 -251 398 -251 378 b -251 226 -251 284 -251 226 b -205 238 -250 226 -230 231 b -159 249 -180 244 -159 249 b -159 385 -159 249 -159 310 b -157 525 -159 521 -159 522 b -146 537 -156 530 -151 535 z m -159 11 b -159 120 -159 98 -159 120 l -159 120 b -175 116 -160 120 -167 119 b -221 105 -184 114 -204 109 l -251 98 l -251 -12 b -251 -121 -251 -72 -251 -121 b -205 -110 -250 -121 -230 -116 b -159 -99 -180 -104 -159 -99 b -159 11 -159 -99 -159 -49 z m 89 517 b 97 519 92 518 94 519 b 117 505 106 519 114 513 b 119 376 119 502 119 501 l 119 249 l 145 258 b 176 267 169 266 172 267 b 177 267 176 267 177 267 b 196 255 186 267 192 263 l 197 252 l 197 205 b 197 181 197 195 197 187 b 193 149 197 153 197 153 b 152 131 190 144 187 143 l 119 120 l 119 10 b 119 -100 119 -62 119 -100 b 145 -91 120 -100 131 -96 b 173 -82 159 -86 171 -82 b 176 -81 174 -81 175 -81 b 196 -94 185 -81 193 -87 b 198 -151 197 -97 198 -125 b 197 -194 198 -172 197 -192 b 153 -218 193 -203 192 -204 l 119 -230 l 119 -367 l 118 -504 l 117 -507 b 97 -519 113 -514 105 -519 b 82 -512 92 -519 87 -517 b 76 -434 77 -507 76 -516 b 76 -374 76 -418 76 -398 b 76 -245 76 -303 76 -245 b 52 -254 76 -245 65 -249 b 19 -263 34 -260 25 -263 b 6 -257 13 -263 10 -261 b 0 -214 0 -251 0 -253 b 0 -200 0 -210 0 -205 b 0 -188 0 -196 0 -192 b 6 -143 0 -147 0 -149 b 46 -126 10 -139 10 -139 l 76 -115 l 76 -5 b 76 106 76 56 76 106 b 51 98 76 106 64 102 b 18 89 34 92 25 89 b 6 95 13 89 10 91 b 0 139 0 101 0 99 b 0 153 0 143 0 148 b 0 179 0 163 0 172 b 44 225 0 215 3 211 l 76 236 l 76 369 b 78 505 76 501 76 502 b 89 517 80 510 85 515 z "},vd7:{x_min:0,x_max:430.75,ha:360,o:"m 283 633 b 291 634 286 634 289 634 b 311 621 300 634 308 629 b 313 505 313 618 313 617 b 313 393 313 443 313 393 b 378 425 313 393 343 407 l 443 458 l 448 458 b 449 458 449 458 449 458 b 471 437 462 458 471 448 b 469 429 471 434 470 432 b 387 382 466 421 469 423 l 313 344 l 313 247 l 313 150 l 315 152 b 433 201 353 184 394 201 b 479 193 448 201 464 198 b 549 86 524 177 549 135 b 526 1 549 59 541 29 b 395 -143 504 -39 475 -71 b 316 -214 351 -182 341 -191 b 292 -229 302 -228 300 -229 b 272 -216 283 -229 275 -224 b 271 55 271 -212 271 -212 b 270 323 271 203 270 323 b 205 291 270 323 241 308 l 140 258 l 135 258 b 134 258 135 258 134 258 b 112 279 121 258 112 267 b 114 287 112 281 113 284 b 196 334 117 295 114 293 l 271 371 l 271 495 b 272 621 271 617 271 618 b 283 633 274 626 279 631 z m 404 133 b 391 134 400 134 395 134 b 384 134 388 134 386 134 b 318 88 358 130 335 114 l 313 81 l 313 -37 l 313 -156 l 316 -152 b 439 83 391 -71 439 22 l 439 84 b 404 133 439 115 430 128 z m -8 633 l -8 633 b 0 634 -6 634 -3 634 b 20 621 8 634 17 629 b 21 384 21 618 21 617 l 21 150 l 24 152 b 141 201 62 184 102 201 b 187 193 157 201 172 198 b 257 86 232 177 257 135 b 234 1 257 59 250 29 b 103 -143 212 -39 183 -71 b 24 -214 60 -182 49 -191 b 0 -229 10 -228 8 -229 b -20 -216 -9 -229 -17 -224 l -21 -212 l -21 203 l -21 618 l -20 621 b -8 633 -18 626 -13 631 z m 113 133 l 113 133 b 99 134 109 134 103 134 b 93 134 97 134 94 134 b 26 88 66 130 43 114 l 21 81 l 21 -37 l 21 -156 l 25 -152 b 148 83 99 -71 148 22 l 148 84 b 113 133 148 115 138 128 z "},rwl:{x_min:0,x_max:737.71875,ha:753,o:"m 9 13 b 208 15 10 15 51 15 b 368 15 251 15 304 15 l 726 15 l 729 12 b 737 -1 735 9 737 4 b 729 -15 737 -6 735 -11 l 726 -16 l 660 -16 l 592 -16 l 592 -95 l 592 -174 l 368 -174 l 144 -174 l 144 -95 l 144 -16 l 77 -16 l 9 -16 l 6 -15 b 0 -1 1 -11 0 -6 b 9 13 0 5 2 11 "},rhl:{x_min:0,x_max:737.71875,ha:753,o:"m 144 94 l 144 173 l 368 173 l 592 173 l 592 94 l 592 15 l 660 15 l 726 15 l 729 12 b 737 -1 735 9 737 4 b 729 -15 737 -6 735 -11 l 726 -16 l 368 -16 l 9 -16 l 6 -15 b 0 -1 1 -11 0 -6 b 6 12 0 4 1 9 l 9 15 l 77 15 l 144 15 l 144 94 "}},cssFontWeight:"normal",ascender:1903,underlinePosition:-125,cssFontStyle:"normal",boundingBox:{yMin:-2065.375,xMin:-695.53125,yMax:1901.578125,xMax:1159.671875},resolution:1e3,descender:-2066,familyName:"VexFlow-18",lineHeight:4093,underlineThickness:50}},9515:(t,e,i)=>{"use strict";i.d(e,{i:()=>n});var s=i(4552);class n{static GCD(t,e){if("number"!=typeof t||"number"!=typeof e)throw new s.s.RERR("BadArgument",`Invalid numbers: ${t}, ${e}`);let i;for(;0!==e;)i=e,e=t%e,t=i;return t}static LCM(t,e){return t*e/n.GCD(t,e)}static LCMM(t){if(0===t.length)return 0;if(1===t.length)return t[0];if(2===t.length)return n.LCM(t[0],t[1]);{const e=t[0];return t.shift(),n.LCM(e,n.LCMM(t))}}constructor(t,e){this.set(t,e)}set(t,e){return this.numerator=void 0===t?1:t,this.denominator=void 0===e?1:e,this}value(){return this.numerator/this.denominator}simplify(){let t=this.numerator,e=this.denominator;const i=n.GCD(t,e);return t/=i,e/=i,e<0&&(e=-e,t=-t),this.set(t,e)}add(t,e){let i,s;t instanceof n?(i=t.numerator,s=t.denominator):(i=void 0!==t?t:0,s=void 0!==e?e:1);const r=n.LCM(this.denominator,s),o=r/this.denominator,a=r/s,l=this.numerator*o+i*a;return this.set(l,r)}subtract(t,e){let i,s;t instanceof n?(i=t.numerator,s=t.denominator):(i=void 0!==t?t:0,s=void 0!==e?e:1);const r=n.LCM(this.denominator,s),o=r/this.denominator,a=r/s,l=this.numerator*o-i*a;return this.set(l,r)}multiply(t,e){let i,s;return t instanceof n?(i=t.numerator,s=t.denominator):(i=void 0!==t?t:1,s=void 0!==e?e:1),this.set(this.numerator*i,this.denominator*s)}divide(t,e){let i,s;return t instanceof n?(i=t.numerator,s=t.denominator):(i=void 0!==t?t:1,s=void 0!==e?e:1),this.set(this.numerator*s,this.denominator*i)}equals(t){const e=n.__compareA.copy(t).simplify(),i=n.__compareB.copy(this).simplify();return e.numerator===i.numerator&&e.denominator===i.denominator}greaterThan(t){const e=n.__compareB.copy(this);return e.subtract(t),e.numerator>0}greaterThanEquals(t){const e=n.__compareB.copy(this);return e.subtract(t),e.numerator>=0}lessThan(t){return!this.greaterThanEquals(t)}lessThanEquals(t){return!this.greaterThan(t)}clone(){return new n(this.numerator,this.denominator)}copy(t){return"number"==typeof t?this.set(t||0,1):this.set(t.numerator,t.denominator)}quotient(){return Math.floor(this.numerator/this.denominator)}fraction(){return this.numerator%this.denominator}abs(){return this.denominator=Math.abs(this.denominator),this.numerator=Math.abs(this.numerator),this}toString(){return this.numerator+"/"+this.denominator}toSimplifiedString(){return n.__tmp.copy(this).simplify().toString()}toMixedString(){let t="";const e=this.quotient(),i=n.__tmp.copy(this);return e<0?i.abs().fraction():i.fraction(),0!==e?(t+=e,0!==i.numerator&&(t+=" "+i.toSimplifiedString())):t=0===i.numerator?"0":i.toSimplifiedString(),t}parse(t){const e=t.split("/"),i=parseInt(e[0],10),s=e[1]?parseInt(e[1],10):1;return this.set(i,s)}}n.__compareA=new n,n.__compareB=new n,n.__tmp=new n},2306:(t,e,i)=>{"use strict";i.d(e,{r:()=>h});var s=i(4552),n=i(2088);class r{constructor(t,e,i,s){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.addPoint(t,e),this.addPoint(i,s)}width(){return this.x2-this.x1}height(){return this.y2-this.y1}addPoint(t,e){null!=t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),tthis.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.y2&&(this.y2=e))}addX(t){this.addPoint(t,null)}addY(t){this.addPoint(null,t)}addQuadraticCurve(t,e,i,s,n,r){const o=t+2/3*(i-t),a=e+2/3*(s-e),l=o+1/3*(n-t),h=a+1/3*(r-e);this.addBezierCurve(t,e,o,a,l,h,n,r)}addBezierCurve(t,e,i,s,n,r,o,a){const l=[t,e],h=[i,s],u=[n,r],c=[o,a];let d;this.addPoint(l[0],l[1]),this.addPoint(c[0],c[1]);const p=(t,e)=>Math.pow(1-t,3)*l[e]+3*Math.pow(1-t,2)*t*h[e]+3*(1-t)*Math.pow(t,2)*u[e]+Math.pow(t,3)*c[e];for(d=0;d<=1;d++){const t=6*l[d]-12*h[d]+6*u[d],e=-3*l[d]+9*h[d]-9*u[d]+3*c[d],i=3*h[d]-3*l[d];if(0===e){if(0===t)continue;const e=-i/t;0{"use strict";i.r(e),i.d(e,{default:()=>pe});var s=i(4552),n=i(8179),r=i(2088),o=i(9515);class a{static get WIDTH(){return 600}static get HEIGHT(){return 400}static get CANVAS_BROWSER_SIZE_LIMIT(){return 32767}static SanitizeCanvasDims(t,e){return Math.max(t,e)>this.CANVAS_BROWSER_SIZE_LIMIT&&(s.s.W("Canvas dimensions exceed browser limit. Cropping to "+this.CANVAS_BROWSER_SIZE_LIMIT),t>this.CANVAS_BROWSER_SIZE_LIMIT&&(t=this.CANVAS_BROWSER_SIZE_LIMIT),e>this.CANVAS_BROWSER_SIZE_LIMIT&&(e=this.CANVAS_BROWSER_SIZE_LIMIT)),[t,e]}constructor(t){this.vexFlowCanvasContext=t,t.canvas?this.canvas=t.canvas:this.canvas={width:a.WIDTH,height:a.HEIGHT}}clear(){this.vexFlowCanvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}openGroup(){}closeGroup(){}add(){}setFont(t,e,i){return this.vexFlowCanvasContext.font=(i||"")+" "+e+"pt "+t,this}setRawFont(t){return this.vexFlowCanvasContext.font=t,this}setFillStyle(t){return this.vexFlowCanvasContext.fillStyle=t,this}setBackgroundFillStyle(t){return this.background_fillStyle=t,this}setStrokeStyle(t){return this.vexFlowCanvasContext.strokeStyle=t,this}setShadowColor(t){return this.vexFlowCanvasContext.shadowColor=t,this}setShadowBlur(t){return this.vexFlowCanvasContext.shadowBlur=t,this}setLineWidth(t){return this.vexFlowCanvasContext.lineWidth=t,this}setLineCap(t){return this.vexFlowCanvasContext.lineCap=t,this}setLineDash(t){return this.vexFlowCanvasContext.lineDash=t,this}scale(t,e){return this.vexFlowCanvasContext.scale(parseFloat(t),parseFloat(e))}resize(t,e){return[t,e]=this.SanitizeCanvasDims(parseInt(t,10),parseInt(e,10)),this.vexFlowCanvasContext.resize(t,e)}rect(t,e,i,s){return this.vexFlowCanvasContext.rect(t,e,i,s)}fillRect(t,e,i,s){return this.vexFlowCanvasContext.fillRect(t,e,i,s)}clearRect(t,e,i,s){return this.vexFlowCanvasContext.clearRect(t,e,i,s)}beginPath(){return this.vexFlowCanvasContext.beginPath()}moveTo(t,e){return this.vexFlowCanvasContext.moveTo(t,e)}lineTo(t,e){return this.vexFlowCanvasContext.lineTo(t,e)}bezierCurveTo(t,e,i,s,n,r){return this.vexFlowCanvasContext.bezierCurveTo(t,e,i,s,n,r)}quadraticCurveTo(t,e,i,s){return this.vexFlowCanvasContext.quadraticCurveTo(t,e,i,s)}arc(t,e,i,s,n,r){return this.vexFlowCanvasContext.arc(t,e,i,s,n,r)}glow(){return this.vexFlowCanvasContext.glow()}fill(){return this.vexFlowCanvasContext.fill()}stroke(){return this.vexFlowCanvasContext.stroke()}closePath(){return this.vexFlowCanvasContext.closePath()}measureText(t){return this.vexFlowCanvasContext.measureText(t)}fillText(t,e,i){return this.vexFlowCanvasContext.fillText(t,e,i)}save(){return this.vexFlowCanvasContext.save()}restore(){return this.vexFlowCanvasContext.restore()}}class l{constructor(t){this.element=t,this.paper=Raphael(t),this.path="",this.pen={x:0,y:0},this.lineWidth=1,this.state={scale:{x:1,y:1},font_family:"Arial",font_size:8,font_weight:800},this.attributes={"stroke-width":.3,fill:"black",stroke:"black",font:"10pt Arial"},this.background_attributes={"stroke-width":0,fill:"white",stroke:"white",font:"10pt Arial"},this.shadow_attributes={width:0,color:"black"},this.state_stack=[]}openGroup(){}closeGroup(){}add(){}setFont(t,e,i){return this.state.font_family=t,this.state.font_size=e,this.state.font_weight=i,this.attributes.font=(this.state.font_weight||"")+" "+this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this}setRawFont(t){return this.attributes.font=t,this}setFillStyle(t){return this.attributes.fill=t,this}setBackgroundFillStyle(t){return this.background_attributes.fill=t,this.background_attributes.stroke=t,this}setStrokeStyle(t){return this.attributes.stroke=t,this}setShadowColor(t){return this.shadow_attributes.color=t,this}setShadowBlur(t){return this.shadow_attributes.width=t,this}setLineWidth(t){this.attributes["stroke-width"]=t,this.lineWidth=t}setLineDash(){return this}setLineCap(){return this}scale(t,e){return this.state.scale={x:t,y:e},this.attributes.transform="S"+t+","+e+",0,0",this.attributes.scale=t+","+e+",0,0",this.attributes.font=this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this.background_attributes.transform="S"+t+","+e+",0,0",this.background_attributes.font=this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this}clear(){this.paper.clear()}resize(t,e){return this.element.style.width=t,this.paper.setSize(t,e),this}setViewBox(t){this.paper.canvas.setAttribute("viewBox",t)}rect(t,e,i,s){return s<0&&(e+=s,s=-s),this.paper.rect(t,e,i-.5,s-.5).attr(this.attributes).attr("fill","none").attr("stroke-width",this.lineWidth),this}fillRect(t,e,i,s){return s<0&&(e+=s,s=-s),this.paper.rect(t,e,i-.5,s-.5).attr(this.attributes),this}clearRect(t,e,i,s){return s<0&&(e+=s,s=-s),this.paper.rect(t,e,i-.5,s-.5).attr(this.background_attributes),this}beginPath(){return this.path="",this.pen.x=0,this.pen.y=0,this}moveTo(t,e){return this.path+="M"+t+","+e,this.pen.x=t,this.pen.y=e,this}lineTo(t,e){return this.path+="L"+t+","+e,this.pen.x=t,this.pen.y=e,this}bezierCurveTo(t,e,i,s,n,r){return this.path+="C"+t+","+e+","+i+","+s+","+n+","+r,this.pen.x=n,this.pen.y=r,this}quadraticCurveTo(t,e,i,s){return this.path+="Q"+t+","+e+","+i+","+s,this.pen.x=i,this.pen.y=s,this}arc(t,e,i,s,n,r){function o(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t}if((s=o(s))>(n=o(n))){const t=s;s=n,n=t,r=!r}const a=n-s;return a>Math.PI?(this.arcHelper(t,e,i,s,s+a/2,r),this.arcHelper(t,e,i,s+a/2,n,r)):this.arcHelper(t,e,i,s,n,r),this}arcHelper(t,e,i,s,n,r){const o=t+i*Math.cos(s),a=e+i*Math.sin(s),l=t+i*Math.cos(n),h=e+i*Math.sin(n);let u=0,c=0;r?(c=1,n-sMath.PI&&(u=1),this.path+="M"+o+","+a+",A"+i+","+i+",0,"+u+","+c+","+l+","+h+"M"+this.pen.x+","+this.pen.y}glow(){const t=this.paper.set();if(this.shadow_attributes.width>0){const e=this.shadow_attributes,i=e.width/2;for(let s=1;s<=i;s++)t.push(this.paper.path(this.path).attr({stroke:e.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/i*s).toFixed(3),opacity:+((e.opacity||.3)/i).toFixed(3),transform:this.attributes.transform,scale:this.attributes.scale}))}return t}fill(){const t=this.paper.path(this.path).attr(this.attributes).attr("stroke-width",0);return this.glow(t),this}stroke(){const t=this.lineWidth*(this.state.scale.x+this.state.scale.y)/2,e=this.paper.path(this.path).attr(this.attributes).attr("fill","none").attr("stroke-width",t);return this.glow(e),this}closePath(){return this.path+="Z",this}measureText(t){const e=this.paper.text(0,0,t).attr(this.attributes).attr("fill","none").attr("stroke","none"),i=e.getBBox();return e.remove(),{width:i.width,height:i.height}}fillText(t,e,i){return this.paper.text(e+this.measureText(t).width/2,i-this.state.font_size/(2.25*this.state.scale.y),t).attr(this.attributes),this}save(){return this.state_stack.push({state:{font_family:this.state.font_family},attributes:{font:this.attributes.font,fill:this.attributes.fill,stroke:this.attributes.stroke,"stroke-width":this.attributes["stroke-width"]},shadow_attributes:{width:this.shadow_attributes.width,color:this.shadow_attributes.color}}),this}restore(){const t=this.state_stack.pop();return this.state.font_family=t.state.font_family,this.attributes.font=t.attributes.font,this.attributes.fill=t.attributes.fill,this.attributes.stroke=t.attributes.stroke,this.attributes["stroke-width"]=t.attributes["stroke-width"],this.shadow_attributes.width=t.shadow_attributes.width,this.shadow_attributes.color=t.shadow_attributes.color,this}}const h={path:{x:!0,y:!0,width:!0,height:!0},rect:{},text:{width:!0,height:!0}};{const t={"font-family":!0,"font-weight":!0,"font-style":!0,"font-size":!0};s.s.Merge(h.rect,t),s.s.Merge(h.path,t)}class u{constructor(t){this.element=t,this.svgNS="http://www.w3.org/2000/svg";const e=this.create("svg");this.element.appendChild(e),this.svg=e,this.groups=[this.svg],this.parent=this.svg,this.path="",this.pen={x:NaN,y:NaN},this.lineWidth=1,this.state={scale:{x:1,y:1},"font-family":"Arial","font-size":"8pt","font-weight":"normal"},this.attributes={"stroke-width":.3,fill:"black",stroke:"black","stroke-dasharray":"none","font-family":"Arial","font-size":"10pt","font-weight":"normal","font-style":"normal"},this.background_attributes={"stroke-width":0,fill:"white",stroke:"white","stroke-dasharray":"none","font-family":"Arial","font-size":"10pt","font-weight":"normal","font-style":"normal"},this.shadow_attributes={width:0,color:"black"},this.state_stack=[],this.iePolyfill()}create(t){return document.createElementNS(this.svgNS,t)}openGroup(t,e,i,n){const r=this.create("g");return this.groups.push(r),this.parent.appendChild(r),this.parent=r,t&&r.setAttribute("class",s.s.Prefix(t)),e&&r.setAttribute("id",s.s.Prefix(e)),i&&i.pointerBBox&&r.setAttribute("pointer-events","bounding-box"),n&&"isX"===n&&(r.style.transformOrigin="center",r.style.transformBox="content-box",r.style.transform="scale(1.5) translateY(-5px)"),r}closeGroup(t){if(t&&"transform"===t){const t=this.groups.pop();let e=t.getAttribute("class");e+=" vf-stopDot",t.setAttribute("class",e)}else this.groups.pop();this.parent=this.groups[this.groups.length-1]}add(t){this.parent.appendChild(t)}iePolyfill(){"undefined"!=typeof navigator&&(this.ie=/MSIE 9/i.test(navigator.userAgent)||/MSIE 10/i.test(navigator.userAgent)||/rv:11\.0/i.test(navigator.userAgent)||/Trident/i.test(navigator.userAgent))}setFont(t,e,i){let n=!1,r=!1,o="normal";"string"==typeof i&&(-1!==i.indexOf("italic")&&(i=i.replace(/italic/g,""),r=!0),-1!==i.indexOf("bold")&&(i=i.replace(/bold/g,""),n=!0),i=i.replace(/ /g,"")),o=r?"italic":o;const a={"font-family":t,"font-size":e+"pt","font-weight":i=void 0===(i=n?"bold":i)||""===i?"normal":i,"font-style":o};return this.fontSize=Number(e),s.s.Merge(this.attributes,a),s.s.Merge(this.state,a),this}setRawFont(t){const e=(t=t.trim()).split(" ");return this.attributes["font-family"]=e[1],this.state["font-family"]=e[1],this.attributes["font-size"]=e[0],this.state["font-size"]=e[0],this.fontSize=Number(e[0].match(/\d+/)),this}setFillStyle(t){return this.attributes.fill=t,this}setBackgroundFillStyle(t){return this.background_attributes.fill=t,this.background_attributes.stroke=t,this}setStrokeStyle(t){return this.attributes.stroke=t,this}setShadowColor(t){return this.shadow_attributes.color=t,this}setShadowBlur(t){return this.shadow_attributes.width=t,this}setLineWidth(t){this.attributes["stroke-width"]=t,this.lineWidth=t}setLineDash(t){if("[object Array]"===Object.prototype.toString.call(t))return t=t.join(", "),this.attributes["stroke-dasharray"]=t,this;throw new s.s.RERR("ArgumentError","lineDash must be an array of integers.")}setLineCap(t){return this.attributes["stroke-linecap"]=t,this}resize(t,e){this.width=t,this.height=e,this.element.style.width=t;const i={width:t,height:e};return this.applyAttributes(this.svg,i),this.scale(this.state.scale.x,this.state.scale.y),this}scale(t,e){this.state.scale={x:t,y:e};const i=this.width/t,s=this.height/e;return this.setViewBox(0,0,i,s),this}setViewBox(...t){if(1===t.length){const[e]=t;this.svg.setAttribute("viewBox",e)}else{const[e,i,s,n]=t,r=e+" "+i+" "+s+" "+n;this.svg.setAttribute("viewBox",r)}}applyAttributes(t,e){const i=h[t.nodeName];return Object.keys(e).forEach((s=>{i&&i[s]||!s||!e[s]||"d"===s&&e[s]?.indexOf("NaN")>-1||t.setAttributeNS(null,s,e[s])})),t}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild);this.scale(this.state.scale.x,this.state.scale.y)}rect(t,e,i,n,r){n<0&&(e+=n,n*=-1);const o=this.create("rect");return void 0===r&&(r={fill:"none","stroke-width":this.lineWidth,stroke:this.attributes.stroke}),s.s.Merge(r,{x:t,y:e,width:i,height:n}),this.applyAttributes(o,r),this.add(o),this}fillRect(t,e,i,s){return s<0&&(e+=s,s*=-1),this.rect(t,e,i,s,this.attributes),this}clearRect(t,e,i,s){return this.rect(t,e,i,s,this.background_attributes),this}beginPath(){return this.path="",this.pen.x=NaN,this.pen.y=NaN,this}moveTo(t,e){return this.path+="M"+t+" "+e,this.pen.x=t,this.pen.y=e,this}lineTo(t,e){return this.path+="L"+t+" "+e,this.pen.x=t,this.pen.y=e,this}bezierCurveTo(t,e,i,s,n,r){return this.path+="C"+t+" "+e+","+i+" "+s+","+n+" "+r,this.pen.x=n,this.pen.y=r,this}quadraticCurveTo(t,e,i,s){return this.path+="Q"+t+" "+e+","+i+" "+s,this.pen.x=i,this.pen.y=s,this}arc(t,e,i,s,n,r){function o(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t}if((s=o(s))>(n=o(n))){const t=s;s=n,n=t,r=!r}const a=n-s;return a>Math.PI?(this.arcHelper(t,e,i,s,s+a/2,r),this.arcHelper(t,e,i,s+a/2,n,r)):this.arcHelper(t,e,i,s,n,r),this}arcHelper(t,e,i,s,n,r){const o=t+i*Math.cos(s),a=e+i*Math.sin(s),l=t+i*Math.cos(n),h=e+i*Math.sin(n);let u=0,c=0;r?(c=1,n-sMath.PI&&(u=1),this.path+="M"+o+" "+a+" A"+i+" "+i+" 0 "+u+" "+c+" "+l+" "+h,isNaN(this.pen.x)||isNaN(this.pen.y)||(this.peth+="M"+this.pen.x+" "+this.pen.y)}closePath(){return this.path+="Z",this}glow(){if(this.shadow_attributes.width>0){const t=this.shadow_attributes,e=t.width/2;for(let i=1;i<=e;i++){const s={stroke:t.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(.4*t.width/e*i).toFixed(3),opacity:+((t.opacity||.3)/e).toFixed(3)},n=this.create("path");s.d=this.path,this.applyAttributes(n,s),this.add(n)}}return this}fill(t){this.glow();const e=this.create("path");let i=t;return void 0===t?(t={},s.s.Merge(t,this.attributes),t.stroke="none",i=t):(i=t,s.s.Merge(i,this.attributes),t.class&&(i.class=t.class),t.id&&(i.id=t.id)),t.d=this.path,this.applyAttributes(e,t),this.add(e),this}stroke(t=void 0){this.glow();const e=this.create("path"),i={};return s.s.Merge(i,this.attributes),t&&s.s.Merge(i,t),i.fill="none",i["stroke-width"]=this.lineWidth,i.d=this.path,this.applyAttributes(e,i),this.add(e),this}measureText(t){const e=this.create("text");if("function"!=typeof e.getBBox)return{x:0,y:0,width:0,height:0};e.textContent=t,this.applyAttributes(e,this.attributes),this.svg.appendChild(e);let i=e.getBBox();return this.ie&&""!==t&&"italic"===this.attributes["font-style"]&&(i=this.ieMeasureTextFix(i,t)),this.svg.removeChild(e),i}ieMeasureTextFix(t){const e=1.196*Number(this.fontSize)+1.9598,i=t.width-e,s=t.height-1.5;return{x:t.x,y:t.y,width:i,height:s}}fillText(t,e,i){if(!t||t.length<=0)return;const n={};s.s.Merge(n,this.attributes),n.stroke="none",n.x=e,n.y=i;const r=this.create("text");r.textContent=t,this.applyAttributes(r,n),this.add(r)}save(){return this.state_stack.push({state:{"font-family":this.state["font-family"],"font-weight":this.state["font-weight"],"font-style":this.state["font-style"],"font-size":this.state["font-size"],scale:this.state.scale},attributes:{"font-family":this.attributes["font-family"],"font-weight":this.attributes["font-weight"],"font-style":this.attributes["font-style"],"font-size":this.attributes["font-size"],fill:this.attributes.fill,stroke:this.attributes.stroke,"stroke-width":this.attributes["stroke-width"],"stroke-dasharray":this.attributes["stroke-dasharray"]},shadow_attributes:{width:this.shadow_attributes.width,color:this.shadow_attributes.color},lineWidth:this.lineWidth}),this}restore(){const t=this.state_stack.pop();return this.state["font-family"]=t.state["font-family"],this.state["font-weight"]=t.state["font-weight"],this.state["font-style"]=t.state["font-style"],this.state["font-size"]=t.state["font-size"],this.state.scale=t.state.scale,this.attributes["font-family"]=t.attributes["font-family"],this.attributes["font-weight"]=t.attributes["font-weight"],this.attributes["font-style"]=t.attributes["font-style"],this.attributes["font-size"]=t.attributes["font-size"],this.attributes.fill=t.attributes.fill,this.attributes.stroke=t.attributes.stroke,this.attributes["stroke-width"]=t.attributes["stroke-width"],this.attributes["stroke-dasharray"]=t.attributes["stroke-dasharray"],this.shadow_attributes.width=t.shadow_attributes.width,this.shadow_attributes.color=t.shadow_attributes.color,this.lineWidth=t.lineWidth,this}}let c=null;class d{static get Backends(){return{CANVAS:1,RAPHAEL:2,SVG:3,VML:4}}static get LineEndType(){return{NONE:1,UP:2,DOWN:3}}static get USE_CANVAS_PROXY(){return!1}static get lastContext(){return c}static set lastContext(t){c=t}static buildContext(t,e,i,s,n){const r=new d(t,e);i&&s&&r.resize(i,s),n||(n="#FFF");const o=r.getContext();return o.setBackgroundFillStyle(n),d.lastContext=o,o}static getCanvasContext(t,e,i,s){return d.buildContext(t,d.Backends.CANVAS,e,i,s)}static getRaphaelContext(t,e,i,s){return d.buildContext(t,d.Backends.RAPHAEL,e,i,s)}static getSVGContext(t,e,i,s){return d.buildContext(t,d.Backends.SVG,e,i,s)}static bolsterCanvasContext(t){return d.USE_CANVAS_PROXY?new a(t):(t.vexFlowCanvasContext=t,["clear","setFont","setRawFont","setFillStyle","setBackgroundFillStyle","setStrokeStyle","setShadowColor","setShadowBlur","setLineWidth","setLineCap","setLineDash","openGroup","closeGroup","getGroup"].forEach((e=>{t[e]=t[e]||a.prototype[e]})),t)}static drawDashedLine(t,e,i,s,n,r){t.beginPath();const o=s-e,a=n-i,l=Math.atan2(a,o);let h=e,u=i;t.moveTo(e,i);let c=0,d=!0;for(;!(o<0?h<=s:h>=s)||!(a<0?u<=n:u>=n);){const e=r[c++%r.length],i=h+Math.cos(l)*e;h=o<0?Math.max(s,i):Math.min(s,i);const p=u+Math.sin(l)*e;u=a<0?Math.max(n,p):Math.min(n,p),d?t.lineTo(h,u):t.moveTo(h,u),d=!d}t.closePath(),t.stroke()}constructor(t,e){if(this.elementId=t,!this.elementId)throw new s.s.RERR("BadArgument","Invalid id for renderer.");if(this.element=document.getElementById(t),this.element||(this.element=t),this.ctx=null,this.paper=null,this.backend=e,this.backend===d.Backends.CANVAS){if(!this.element.getContext)throw new s.s.RERR("BadElement",`Can't get canvas context from element: ${t}`);this.ctx=d.bolsterCanvasContext(this.element.getContext("2d",{willReadFrequently:!0}))}else if(this.backend===d.Backends.RAPHAEL)this.ctx=new l(this.element);else{if(this.backend!==d.Backends.SVG)throw new s.s.RERR("InvalidBackend",`No support for backend: ${this.backend}`);this.ctx=new u(this.element)}}resize(t,e){if(this.backend===d.Backends.CANVAS){if(!this.element.getContext)throw new s.s.RERR("BadElement",`Can't get canvas context from element: ${this.elementId}`);[t,e]=a.SanitizeCanvasDims(t,e);const i=window.devicePixelRatio||1;this.element.width=t*i,this.element.height=e*i,this.element.style.width=t+"px",this.element.style.height=e+"px",this.ctx=d.bolsterCanvasContext(this.element.getContext("2d",{willReadFrequently:!0})),this.ctx.scale(i,i)}else this.ctx.resize(t,e);return this}getContext(){return this.ctx}}var p=i(2306),f=i(1140);class m extends r.W{static get LOCATION_TOP(){return 1}static get LOCATION_BOTTOM(){return-1}static get NESTING_OFFSET(){return 15}constructor(t,e){if(super(),this.setAttribute("type","Tuplet"),!t||!t.length)throw new s.s.RuntimeError("BadArguments","No notes provided for tuplet.");this.options=s.s.Merge({},e),this.notes=t,this.num_notes="num_notes"in this.options?this.options.num_notes:t.length,this.options.beats_occupied&&this.beatsOccupiedDeprecationWarning(),this.notes_occupied=this.options.notes_occupied||this.options.beats_occupied||2,"bracketed"in this.options?this.bracketed=this.options.bracketed:this.bracketed=t.some((t=>null===t.beam)),this.ratioed="ratioed"in this.options?this.options.ratioed:Math.abs(this.notes_occupied-this.num_notes)>1,this.point=28,this.y_pos=16,this.x_pos=100,this.width=200,this.location=this.options.location||m.LOCATION_TOP,st.AlignRestsToNotes(t,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let t=0;t=1;)this.numerator_glyphs.unshift(new p.r("v"+t%10,this.point)),t=parseInt(t/10,10);for(this.denom_glyphs=[],t=this.notes_occupied;t>=1;)this.denom_glyphs.unshift(new p.r("v"+t%10,this.point)),t=parseInt(t/10,10)}getNestedTupletCount(){const t=this.location,e=this.notes[0];let i=n(e,t),s=n(e,t);function n(t,e){return t.tupletStack.filter((t=>t.location===e)).length}return this.notes.forEach((e=>{const r=n(e,t);i=r>i?r:i,s=rs&&(s=e)}}return s+t+e}draw(){this.checkContext(),this.setRendered();const t=this.notes[0],e=this.notes[this.notes.length-1];this.bracketed?(this.x_pos=t.getTieLeftX()-5,this.width=e.getTieRightX()-this.x_pos+5):(this.x_pos=t.getStemX(),this.width=e.getStemX()-this.x_pos),this.y_pos=this.getYPosition();const i=(t,e)=>t+e.getMetrics().width;let s=this.numerator_glyphs.reduce(i,0);this.ratioed&&(s=this.denom_glyphs.reduce(i,s),s+=.32*this.point);const n=this.x_pos+this.width/2-s/2;if(this.bracketed){const t=this.width/2-s/2-5;t>0&&(this.context.fillRect(this.x_pos,this.y_pos,t,1),this.context.fillRect(this.x_pos+this.width/2+s/2+5,this.y_pos,t,1),this.context.fillRect(this.x_pos,this.y_pos+(this.location===m.LOCATION_BOTTOM),1,10*this.location),this.context.fillRect(this.x_pos+this.width,this.y_pos+(this.location===m.LOCATION_BOTTOM),1,10*this.location))}if(!1!==this.RenderTupletNumber){let t=0;this.numerator_glyphs.forEach((e=>{e.render(this.context,n+t,this.y_pos+this.point/3-2),t+=e.getMetrics().width}))}if(this.ratioed){const t=n+x_offset+.16*this.point,e=.06*this.point;this.context.beginPath(),this.context.arc(t,this.y_pos-.08*this.point,e,0,2*Math.PI,!0),this.context.closePath(),this.context.fill(),this.context.beginPath(),this.context.arc(t,this.y_pos+.12*this.point,e,0,2*Math.PI,!0),this.context.closePath(),this.context.fill(),x_offset+=.32*this.point,this.denom_glyphs.forEach((t=>{t.render(this.context,n+x_offset,this.y_pos+this.point/3-2),x_offset+=t.getMetrics().width}))}}}function g(t){let e=0;return t.forEach((t=>{t.keyProps&&t.keyProps.forEach((t=>{e+=t.line-3}))})),e>=0?f.r.DOWN:f.r.UP}const b="L",S="B";class y extends r.W{static getDefaultBeamGroups(t){t&&"c"!==t||(t="4/4");const e={"1/2":["1/2"],"2/2":["1/2"],"3/2":["1/2"],"4/2":["1/2"],"1/4":["1/4"],"2/4":["1/4"],"3/4":["1/4"],"4/4":["1/4"],"1/8":["1/8"],"2/8":["2/8"],"3/8":["3/8"],"4/8":["2/8"],"1/16":["1/16"],"2/16":["2/16"],"3/16":["3/16"],"4/16":["2/16"]}[t];if(void 0!==e)return e.map((t=>(new o.i).parse(t)));{const e=parseInt(t.split("/")[0],10),i=parseInt(t.split("/")[1],10);if(e%3==0)return[new o.i(3,i)];if(i>4)return[new o.i(2,i)];if(i<=4)return[new o.i(1,i)]}return[new o.i(1,4)]}static applyAndGetBeams(t,e,i){return y.generateBeams(t.getTickables(),{groups:i,stem_direction:e})}static generateBeams(t,e){e||(e={}),e.groups&&e.groups.length||(e.groups=[new o.i(2,8)]);const i=e.groups.map((t=>{if(!t.multiply)throw new s.s.RuntimeError("InvalidBeamGroups","The beam groups must be an array of Vex.Flow.Fractions");return t.clone().multiply(n.Z.RESOLUTION,1)})),r=t;let a=0,l=[],h=[];function u(){i.length-1>a?a+=1:a=0}!function(){let t=[];r.forEach((e=>{if(t=[],e.shouldIgnoreTicks())return l.push(h),void(h=t);h.push(e);const s=i[a].clone(),r=h.reduce(((t,e)=>e.getTicks().clone().add(t)),new o.i(0,1)),c=n.Z.durationToNumber(e.duration)<8;c&&e.tuplet&&(s.numerator*=2),r.greaterThan(s)?(c||t.push(h.pop()),l.push(h),h=t,u()):r.equals(s)&&(l.push(h),h=t,u())})),h.length>0&&l.push(h)}(),function(){const t=[];l.forEach((i=>{let s=[];i.forEach(((i,n,r)=>{const o=0===n||n===r.length-1,a=r[n-1],l=!e.beam_rests&&i.isRest(),h=e.beam_rests&&e.beam_middle_only&&i.isRest()&&o;let u=!1;if(e.maintain_stem_directions&&a&&!i.isRest()&&!a.isRest()){const t=a.getStemDirection();u=i.getStemDirection()!==t}const c=parseInt(i.duration,10)<8;l||h||u||c?(s.length>0&&t.push(s),s=u?[i]:[]):s.push(i)})),s.length>0&&t.push(s)})),l=t}(),l.forEach((t=>{let i;if(e.maintain_stem_directions){const e=function(t){for(let e=0;e{t.setStemDirection(e)}))}(t,i)}));const c=l.filter((t=>{if(t.length>1){let e=!0;return t.forEach((t=>{t.getIntrinsicTicks()>=n.Z.durationToTicks("4")&&(e=!1)})),e}return!1})),d=function(){const t=[];return l.forEach((e=>{let i=null;e.forEach((e=>{e.tuplet&&i!==e.tuplet&&(i=e.tuplet,t.push(i))}))})),t}(),p=[];return c.forEach((t=>{const i=new y(t);e.show_stemlets&&(i.render_options.show_stemlets=!0),e.secondary_breaks&&(i.render_options.secondary_break_ticks=n.Z.durationToTicks(e.secondary_breaks)),!0===e.flat_beams&&(i.render_options.flat_beams=!0,i.render_options.flat_beam_offset=e.flat_beam_offset),p.push(i)})),d.forEach((t=>{const e=t.notes[0].stem_direction===f.r.DOWN?m.LOCATION_BOTTOM:m.LOCATION_TOP;t.setTupletLocation(e);let i=!1;for(let e=0;e=n.Z.durationToTicks("4"))throw new s.s.RuntimeError("BadArguments","Beams can only be applied to notes shorter than a quarter note.");let i,r;for(this.stem_direction=f.r.UP,i=0;it+e.stem_direction),0);o=e>-1?f.r.UP:f.r.DOWN}for(i=0;it.getGlyph().beam_count)).reduce(((t,e)=>e>t?e:t))}breakSecondaryAt(t){return this.break_on_indices=t,this}getSlopeY(t,e,i,s){return i+(t-e)*s}calculateSlope(){const{notes:t,stem_direction:e,render_options:{max_slope:i,min_slope:s,slope_iterations:n,slope_cost:r}}=this,o=t[0],a=((t,e)=>{const i=t.getStemExtents().topY,s=t.getStemX();return(e.getStemExtents().topY-i)/(e.getStemX()-s)})(o,t[t.length-1]),l=(i-s)/n;let h=Number.MAX_VALUE,u=0,c=0;for(let n=s;n<=i;n+=l){let i=0,s=0;for(let r=1;rn)&&(l=n,o=Math.min(...s.getYs()),a=s.getBeamCount())}let h=r/t.length;const u=s+a*(1.5*i),c=o+u*-e;e===f.r.DOWN&&hc&&(h=o-u),n+this.render_options.flat_beam_offset_per_beam>0?(e===f.r.DOWN&&h>n&&!this.render_options.flat_beams||e===f.r.UP&&h0){let e=this.render_options.flat_beam_offset;this.render_options.flat_beam_offset_per_beam&&(e+=this.render_options.flat_beam_offset_per_beam*this.getBeamCount());let i=this.notes[0].note_heads[0].y;const s=this.stem_direction>0?Math.min:Math.max;for(const t of this.notes)for(const e of t.note_heads)i=s(i,e.y);t=i+e*-this.stem_direction}return t}applyStemExtensions(){const{notes:t,slope:e,y_shift:i,stem_direction:s,beam_count:n,render_options:{show_stemlets:r,stemlet_extension:o,beam_width:a}}=this,l=t[0],h=this.getBeamYToDraw(),u=l.getStemX();for(let l=0;l=8&&(u=-1!==this.break_on_indices.indexOf(n),this.render_options.secondary_break_ticks&&l>=this.render_options.secondary_break_ticks&&(l=0,u=!0));const c=h.getIntrinsicTicks(){t.getStem()&&(this.context.openGroup("stem",t.getAttribute("id")+"-stem"),t.getStem().setContext(this.context).draw(),this.context.closeGroup())}),this)}drawBeamLines(){this.checkContext();const t=["4","8","16","32","64"],e=this.notes[0];let i=this.getBeamYToDraw();const s=e.getStemX(),n=this.render_options.beam_width*this.stem_direction,r={};for(const t of this.notes)r[t.getAttribute("id")]=0;for(let e=0;e{t.getStave()||t.setStave(this.stave)})),this.preFormatted=!0),this}draw(t=this.context,e=this.stave){this.setRendered();let i=null;for(let n=0;n0&&i){const t=r.getBoundingBox();t&&i.mergeWith(t)}r.setContext(t),r.drawWithStyle()}this.boundingBox=i}}function E(t,e,i,n,r){if(e!==_.type.BOLD_DOUBLE_LEFT&&e!==_.type.BOLD_DOUBLE_RIGHT)throw new s.s.RERR("InvalidConnector","A REPEAT_BEGIN or REPEAT_END type must be provided.");let o=3,a=3.5;e===_.type.BOLD_DOUBLE_RIGHT&&(o=-5,a=3),t.fillRect(i+o,n,1,r-n),t.fillRect(i-2,n,a,r-n)}class _ extends r.W{static get type(){return{SINGLE_RIGHT:0,SINGLE_LEFT:1,SINGLE:1,DOUBLE:2,BRACE:3,BRACKET:4,BOLD_DOUBLE_LEFT:5,BOLD_DOUBLE_RIGHT:6,THIN_DOUBLE:7,NONE:8}}static get typeString(){return{singleRight:_.type.SINGLE_RIGHT,singleLeft:_.type.SINGLE_LEFT,single:_.type.SINGLE,double:_.type.DOUBLE,brace:_.type.BRACE,bracket:_.type.BRACKET,boldDoubleLeft:_.type.BOLD_DOUBLE_LEFT,boldDoubleRight:_.type.BOLD_DOUBLE_RIGHT,thinDouble:_.type.THIN_DOUBLE,none:_.type.NONE}}constructor(t,e){super(),this.setAttribute("type","StaveConnector"),this.thickness=n.Z.STAVE_LINE_THICKNESS,this.width=3,this.top_stave=t,this.bottom_stave=e,this.type=_.type.DOUBLE,this.font={family:"times",size:16,weight:"normal"},this.x_shift=0,this.texts=[]}setType(t){return(t="string"==typeof t?_.typeString[t]:t)>=_.type.SINGLE_RIGHT&&t<=_.type.NONE&&(this.type=t),this}setText(t,e){return this.texts.push({content:t,options:s.s.Merge({shift_x:0,shift_y:0},e)}),this}setFont(t){s.s.Merge(this.font,t)}setXShift(t){if("number"!=typeof t)throw s.s.RERR("InvalidType","x_shift must be a Number");return this.x_shift=t,this}draw(){const t=this.checkContext();this.setRendered();let e=this.top_stave.getYForLine(0),i=this.bottom_stave.getYForLine(this.bottom_stave.getNumLines()-1)+this.thickness,n=this.width,r=this.top_stave.getX();(this.type===_.type.SINGLE_RIGHT||this.type===_.type.BOLD_DOUBLE_RIGHT||this.type===_.type.THIN_DOUBLE)&&(r=this.top_stave.getX()+this.top_stave.width);let o=i-e;switch(this.type){case _.type.SINGLE:case _.type.SINGLE_LEFT:case _.type.SINGLE_RIGHT:n=1;break;case _.type.DOUBLE:r-=this.width+2;break;case _.type.BRACE:{n=12;const s=this.top_stave.getX()-2+this.x_shift,r=e,a=s,l=i,h=s-n,u=r+o/2,c=h-.9*n,d=r+.2*o,p=s+1.1*n,f=u-.135*o,m=p,g=u+.135*o,b=c,S=l-.2*o,y=h-n,v=S,E=s+.4*n,_=u+.135*o,x=E,M=u-.135*o,P=y,w=d;t.beginPath(),t.moveTo(s,r),t.bezierCurveTo(c,d,p,f,h,u),t.bezierCurveTo(m,g,b,S,a,l),t.bezierCurveTo(y,v,E,_,h,u),t.bezierCurveTo(x,M,P,w,s,r),t.fill(),t.stroke();break}case _.type.BRACKET:e-=4,i+=4,o=i-e,p.r.renderGlyph(t,r-5,e-3,40,"v1b",!0),p.r.renderGlyph(t,r-5,i+3,40,"v10",!0),r-=this.width+2;break;case _.type.BOLD_DOUBLE_LEFT:E(t,this.type,r+this.x_shift,e,i);break;case _.type.BOLD_DOUBLE_RIGHT:E(t,this.type,r,e,i);break;case _.type.THIN_DOUBLE:n=1;break;case _.type.NONE:break;default:throw new s.s.RERR("InvalidType",`The provided StaveConnector.type (${this.type}) is invalid`)}this.type!==_.type.BRACE&&this.type!==_.type.BOLD_DOUBLE_LEFT&&this.type!==_.type.BOLD_DOUBLE_RIGHT&&this.type!==_.type.NONE&&t.fillRect(r,e,n,o),this.type===_.type.THIN_DOUBLE&&t.fillRect(r-3,e,n,o),t.save(),t.lineWidth=2,t.setFont(this.font.family,this.font.size,this.font.weight);for(let e=0;ee.line-t.line));let l=0,h=0,u=0,c=0,d=null,p=null;for(let t=0;tu?e:u):o===w.Modifier.Position.RIGHT&&(f.setXShift(h),e=a+S,c=e>c?e:c),d=m,p=r}return e.left_shift+=u,e.right_shift+=c,!0}constructor(t){super(),this.setAttribute("type","FretHandFinger"),this.note=null,this.index=null,this.finger=t,this.width=7,this.position=w.Modifier.Position.LEFT,this.x_shift=0,this.y_shift=0,this.x_offset=0,this.y_offset=0,this.font={family:"sans-serif",size:9,weight:"bold"}}getCategory(){return T.CATEGORY}setFretHandFinger(t){return this.finger=t,this}setOffsetX(t){return this.x_offset=t,this}setOffsetY(t){return this.y_offset=t,this}draw(){if(this.checkContext(),!this.note||null==this.index)throw new s.s.RERR("NoAttachedNote","Can't draw string number without a note and index.");this.setRendered();const t=this.context,e=this.note.getModifierStartXY(this.position,this.index);let i=e.x+this.x_shift+this.x_offset,n=e.y+this.y_shift+this.y_offset+5;switch(this.position){case w.Modifier.Position.ABOVE:i-=4,n-=12;break;case w.Modifier.Position.BELOW:i-=2,n+=10;break;case w.Modifier.Position.LEFT:i-=this.width;break;case w.Modifier.Position.RIGHT:i+=1;break;default:throw new s.s.RERR("InvalidPostion",`The position ${this.position} does not exist`)}t.save(),t.setFont(this.font.family,this.font.size,this.font.weight),t.fillText(""+this.finger,i,n),t.restore()}}class I{static get NUM_TONES(){return 12}static get roots(){return["c","d","e","f","g","a","b"]}static get root_values(){return[0,2,4,5,7,9,11]}static get root_indices(){return{c:0,d:1,e:2,f:3,g:4,a:5,b:6}}static get canonical_notes(){return["c","c#","d","d#","e","f","f#","g","g#","a","a#","b"]}static get diatonic_intervals(){return["unison","m2","M2","m3","M3","p4","dim5","p5","m6","M6","b7","M7","octave"]}static get diatonic_accidentals(){return{unison:{note:0,accidental:0},m2:{note:1,accidental:-1},M2:{note:1,accidental:0},m3:{note:2,accidental:-1},M3:{note:2,accidental:0},p4:{note:3,accidental:0},dim5:{note:4,accidental:-1},p5:{note:4,accidental:0},m6:{note:5,accidental:-1},M6:{note:5,accidental:0},b7:{note:6,accidental:-1},M7:{note:6,accidental:0},octave:{note:7,accidental:0}}}static get intervals(){return{u:0,unison:0,m2:1,b2:1,min2:1,S:1,H:1,2:2,M2:2,maj2:2,T:2,W:2,m3:3,b3:3,min3:3,M3:4,3:4,maj3:4,4:5,p4:5,"#4":6,b5:6,aug4:6,dim5:6,5:7,p5:7,"#5":8,b6:8,aug5:8,6:9,M6:9,maj6:9,b7:10,m7:10,min7:10,dom7:10,M7:11,maj7:11,8:12,octave:12}}static get scales(){return{major:[2,2,1,2,2,2,1],dorian:[2,1,2,2,2,1,2],mixolydian:[2,2,1,2,2,1,2],minor:[2,1,2,2,1,2,2]}}static get scaleTypes(){return{M:I.scales.major,m:I.scales.minor}}static get accidentals(){return["bb","b","n","#","##"]}static get noteValues(){return{c:{root_index:0,int_val:0},cn:{root_index:0,int_val:0},"c#":{root_index:0,int_val:1},"c##":{root_index:0,int_val:2},cb:{root_index:0,int_val:11},cbb:{root_index:0,int_val:10},d:{root_index:1,int_val:2},dn:{root_index:1,int_val:2},"d#":{root_index:1,int_val:3},"d##":{root_index:1,int_val:4},db:{root_index:1,int_val:1},dbb:{root_index:1,int_val:0},e:{root_index:2,int_val:4},en:{root_index:2,int_val:4},"e#":{root_index:2,int_val:5},"e##":{root_index:2,int_val:6},eb:{root_index:2,int_val:3},ebb:{root_index:2,int_val:2},f:{root_index:3,int_val:5},fn:{root_index:3,int_val:5},"f#":{root_index:3,int_val:6},"f##":{root_index:3,int_val:7},fb:{root_index:3,int_val:4},fbb:{root_index:3,int_val:3},g:{root_index:4,int_val:7},gn:{root_index:4,int_val:7},"g#":{root_index:4,int_val:8},"g##":{root_index:4,int_val:9},gb:{root_index:4,int_val:6},gbb:{root_index:4,int_val:5},a:{root_index:5,int_val:9},an:{root_index:5,int_val:9},"a#":{root_index:5,int_val:10},"a##":{root_index:5,int_val:11},ab:{root_index:5,int_val:8},abb:{root_index:5,int_val:7},b:{root_index:6,int_val:11},bn:{root_index:6,int_val:11},"b#":{root_index:6,int_val:0},"b##":{root_index:6,int_val:1},bb:{root_index:6,int_val:10},bbb:{root_index:6,int_val:9}}}isValidNoteValue(t){return!(null==t||t<0||t>=I.NUM_TONES)}isValidIntervalValue(t){return this.isValidNoteValue(t)}getNoteParts(t){if(!t||t.length<1)throw new s.s.RERR("BadArguments","Invalid note name: "+t);if(t.length>3)throw new s.s.RERR("BadArguments","Invalid note name: "+t);const e=t.toLowerCase(),i=/^([cdefgab])(b|bb|n|#|##)?$/.exec(e);if(null!=i)return{root:i[1],accidental:i[2]};throw new s.s.RERR("BadArguments","Invalid note name: "+t)}getKeyParts(t){if(!t||t.length<1)throw new s.s.RERR("BadArguments","Invalid key: "+t);const e=t.toLowerCase(),i=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(e);if(null!=i){const t=i[1],e=i[2];let s=i[3];return s||(s="M"),{root:t,accidental:e,type:s}}throw new s.s.RERR("BadArguments",`Invalid key: ${t}`)}getNoteValue(t){const e=I.noteValues[t];if(null==e)throw new s.s.RERR("BadArguments",`Invalid note name: ${t}`);return e.int_val}getIntervalValue(t){const e=I.intervals[t];if(null==e)throw new s.s.RERR("BadArguments",`Invalid interval name: ${t}`);return e}getCanonicalNoteName(t){if(!this.isValidNoteValue(t))throw new s.s.RERR("BadArguments",`Invalid note value: ${t}`);return I.canonical_notes[t]}getCanonicalIntervalName(t){if(!this.isValidIntervalValue(t))throw new s.s.RERR("BadArguments",`Invalid interval value: ${t}`);return I.diatonic_intervals[t]}getRelativeNoteValue(t,e,i){if(null==i&&(i=1),1!==i&&-1!==i)throw new s.s.RERR("BadArguments",`Invalid direction: ${i}`);let n=(t+i*e)%I.NUM_TONES;return n<0&&(n+=I.NUM_TONES),n}getRelativeNoteName(t,e){const i=this.getNoteParts(t),n=this.getNoteValue(i.root);let r=e-n;if(Math.abs(r)>I.NUM_TONES-3){let i=1;r>0&&(i=-1);const o=(e+1+(n+1))%I.NUM_TONES*i;if(Math.abs(o)>2)throw new s.s.RERR("BadArguments",`Notes not related: ${t}, ${e})`);r=o}if(Math.abs(r)>2)throw new s.s.RERR("BadArguments",`Notes not related: ${t}, ${e})`);let o=i.root;if(r>0)for(let t=1;t<=r;++t)o+="#";else if(r<0)for(let t=-1;t>=r;--t)o+="b";return o}getScaleTones(t,e){const i=[t];let s=t;for(let n=0;nt.getMetrics().width;class C extends w.Modifier{static get CATEGORY(){return"accidentals"}static format(t,e){const i=e.left_shift+1;if(!t||0===t.length)return;const s=[];let r,o=null,a=0;for(let e=0;ee.line-t.line));const l=[];let h=0,u=null;for(let t=0;th?e.shift:h,u=e.line}let c=0;for(let t=0;tl[i+t],o=t=>t.map(r),a=(t,e)=>{const[i,s]=o([t,e]).map((t=>t.line));return i-s},h=(...t)=>t.map(o).every((t=>!this.checkCollision(...t))),u=s-i+1;let d,p,f=this.checkCollision(l[i],l[s])?"a":"b";switch(u){case 3:"a"===f&&.5===a(1,2)&&.5!==a(0,1)&&(f="second_on_bottom");break;case 4:h([0,2],[1,3])&&(f="spaced_out_tetrachord");break;case 5:"b"===f&&h([1,3])&&(f="spaced_out_pentachord",h([0,2],[2,4])&&(f="very_spaced_out_pentachord"));break;case 6:h([0,3],[1,4],[2,5])&&(f="spaced_out_hexachord"),h([0,2],[2,4],[1,3],[3,5])&&(f="very_spaced_out_hexachord")}if(u>=7){let e=2,i=!0;for(;!0===i;){i=!1;for(let t=0;t+ep?c:p}else for(d=t;d<=s;d++)p=n.Z.accidentalColumnsTable[u][f][d-t],l[d].column=p,c=c>p?c:p;t=s}const d=[],p=[];for(let t=0;t<=c;t++)d[t]=0,p[t]=0;d[0]=h+i,p[0]=h+i,l.forEach((t=>{t.width>d[t.column]&&(d[t.column]=t.width)}));for(let t=1;t{let e=0;const i=m+t.numAcc;for(;m0?(s=e.flatLine||e.dblSharpLine?2.5:3,t.dblSharpLine&&(i-=.5)):(s=t.flatLine||t.dblSharpLine?2.5:3,e.dblSharpLine&&(i-=.5));const n=Math.abs(i){const e=new o.i(0,1);t.getTickables().forEach((t=>{if(t.shouldIgnoreTicks())return;const n=s[e.value()];n?n.push(t):(i.push(e.value()),s[e.value()]=[t]),e.add(t.getTicks())}))}));const n=new I;e||(e="C");const r=n.createScaleMap(e);i.forEach((t=>{const e=s[t],i=[],o=t=>{t.isRest()||t.shouldIgnoreTicks()||(t.keys.forEach(((e,s)=>{const o=n.getNoteParts(e.split("/")[0]),a=o.accidental||"n",l=o.root+a,h=r[o.root]===l,u=i.indexOf(l)>-1;if(!h||h&&u){r[o.root]=l;const e=new C(a);t.addAccidental(s,e),i.push(l)}})),t.getModifiers().forEach((t=>{"gracenotegroups"===t.getCategory()&&t.getGraceNotes().forEach(o)})))};e.forEach(o)}))}constructor(t=null){if(super(),this.setAttribute("type","Accidental"),L("New accidental: ",t),this.note=null,this.index=null,this.type=t,this.position=w.Modifier.Position.LEFT,this.render_options={font_scale:38,stroke_px:3,parenLeftPadding:2,parenRightPadding:2},this.accidental=n.Z.accidentalCodes(this.type),!this.accidental)throw new s.s.RERR("ArgumentError",`Unknown accidental type: ${t}`);this.cautionary=!1,this.parenLeft=null,this.parenRight=null,this.reset()}reset(){const t=this.render_options.font_scale;this.glyph=new p.r(this.accidental.code,t),this.glyph.setOriginX(1),this.cautionary&&(this.parenLeft=new p.r(n.Z.accidentalCodes("{").code,t),this.parenRight=new p.r(n.Z.accidentalCodes("}").code,t),this.parenLeft.setOriginX(1),this.parenRight.setOriginX(1))}getCategory(){return C.CATEGORY}getWidth(){const t=this.cautionary?A(this.parenLeft)+A(this.parenRight)+this.render_options.parenLeftPadding+this.render_options.parenRightPadding:0;return A(this.glyph)+t}setNote(t){if(!t)throw new s.s.RERR("ArgumentError",`Bad note value: ${t}`);this.note=t,"gracenotes"===this.note.getCategory()&&(this.render_options.font_scale=25,this.reset())}setAsCautionary(){return this.cautionary=!0,this.render_options.font_scale=28,this.reset(),this}draw(){const{context:t,type:e,position:i,note:n,index:r,cautionary:o,x_shift:a,y_shift:l,glyph:h,parenLeft:u,parenRight:c,render_options:{parenLeftPadding:d,parenRightPadding:p}}=this;if(this.checkContext(),!n||null==r)throw new s.s.RERR("NoAttachedNote","Can't draw accidental without a note and index.");const f=n.getModifierStartXY(i,r);let m=f.x+a;const g=f.y+l;L("Rendering: ",e,m,g),o?(c.render(t,m,g),m-=A(c),m-=p,m-=this.accidental.parenRightPaddingAdjustment,h.render(t,m,g),m-=A(h),m-=d,u.render(t,m,g)):h.render(t,m,g),this.setRendered()}}class R extends w.Modifier{static get CATEGORY(){return"notesubgroup"}static format(t,e){if(!t||0===t.length)return!1;let i=0;for(let e=0;e{t.ignore_ticks=!1})),this.width=0,this.preFormatted=!1,this.formatter=new st,this.voice=new v({num_beats:4,beat_value:4,resolution:n.Z.RESOLUTION}).setStrict(!1),this.voice.addTickables(this.subNotes),this}getCategory(){return R.CATEGORY}preFormat(){this.preFormatted||(this.formatter.joinVoices([this.voice]).format([this.voice],0),this.setWidth(this.formatter.getMinTotalWidth()),this.preFormatted=!0)}setNote(t){this.note=t}setWidth(t){this.width=t}getWidth(){return this.width}draw(){this.checkContext();const t=this.getNote();if(!t||null===this.index)throw new s.s.RuntimeError("NoAttachedNote","Can't draw notes without a parent note and parent note index.");this.setRendered(),this.alignSubNotesWithNote(this.subNotes,t),this.subNotes.forEach((t=>t.setContext(this.context).drawWithStyle()))}}class N extends r.W{constructor(t,e){super(),this.setAttribute("type","StaveTie"),this.notes=t,this.context=null,this.text=e,this.direction=null,this.render_options={cp1:8,cp2:12,text_shift_x:0,first_x_shift:0,last_x_shift:0,y_shift:7,tie_spacing:0,font:{family:"Arial",size:15,style:""}},this.font=this.render_options.font,this.setNotes(t)}setFont(t){return this.font=t,this}setDirection(t){return this.direction=t,this}setNotes(t){if(!t.first_note&&!t.last_note)throw new s.s.RuntimeError("BadArguments","Tie needs to have either first_note or last_note set.");if(t.first_indices||(t.first_indices=[0]),t.last_indices||(t.last_indices=[0]),t.first_indices.length!==t.last_indices.length)throw new s.s.RuntimeError("BadArguments","Tied notes must have similar index sizes");return this.first_note=t.first_note,this.first_indices=t.first_indices,this.last_note=t.last_note,this.last_indices=t.last_indices,this}isPartial(){return!this.first_note||!this.last_note}renderTie(t){if(0===t.first_ys.length||0===t.last_ys.length)throw new s.s.RERR("BadArguments","No Y-values to render");const e=this.context;let i=this.render_options.cp1,n=this.render_options.cp2;Math.abs(t.last_x_px-t.first_x_px)<10&&(i=2,n=8);const r=this.render_options.first_x_shift,o=this.render_options.last_x_shift,a=this.render_options.y_shift*t.direction;for(let l=0;ld&&Math.abs(u-d)<10?-6:0;if(this.first_note&&"jianpu"===this.first_note.DYMusicScoreType){if("TabTie"===this.getAttribute("type"))continue;u1){const e=new y(t);e.render_options.beam_width=3,e.render_options.partial_beam_length=4,this.beams.push(e)}return this}setNote(t){this.note=t}setWidth(t){this.width=t}getWidth(){return this.width}getGraceNotes(){return this.grace_notes}draw(){this.checkContext();const t=this.getNote();if(function(...t){B.DEBUG&&s.s.L("Vex.Flow.GraceNoteGroup",t)}("Drawing grace note group for:",t),!t||null===this.index)throw new s.s.RuntimeError("NoAttachedNote","Can't draw grace note without a parent note and parent note index.");if(this.setRendered(),this.alignSubNotesWithNote(this.getGraceNotes(),t),this.grace_notes.forEach((t=>{t.setContext(this.context).draw()})),this.beams.forEach((t=>{t.setContext(this.context).draw()})),this.show_slur){const e=this.getNote().getCategory()===x.$.CATEGORY,i=e?N:k;this.slur=new i({last_note:this.grace_notes[0],first_note:t,first_indices:[0],last_indices:[0]}),this.slur.render_options.cp2=12,this.slur.render_options.y_shift=(e?7:5)+this.render_options.slur_y_shift,this.slur.setContext(this.context).draw()}}}class D extends w.Modifier{static get CATEGORY(){return"strokes"}static get Type(){return{BRUSH_DOWN:1,BRUSH_UP:2,ROLL_DOWN:3,ROLL_UP:4,RASQUEDO_DOWN:5,RASQUEDO_UP:6,ARPEGGIO_DIRECTIONLESS:7}}static format(t,e){const i=e.left_shift;if(!t||0===t.length)return this;const s=t.map((t=>{const e=t.getNote();if(e instanceof x.$){const{line:i,displaced:s}=e.getKeyProps()[t.getIndex()];return{line:i,shift:s?e.getExtraLeftPx():0,stroke:t}}{const{str:i}=e.getPositions()[t.getIndex()];return{line:i,shift:0,stroke:t}}})),n=i,r=s.reduce(((t,{stroke:e,shift:i})=>(e.setXShift(n+i),Math.max(e.getWidth()+0,t))),0);return e.left_shift+=r,!0}constructor(t,e){super(),this.setAttribute("type","Stroke"),this.note=null,this.options=s.s.Merge({},e),this.all_voices=!("all_voices"in this.options)||this.options.all_voices,this.note_end=null,this.index=null,this.type=t,this.position=w.Modifier.Position.LEFT,this.render_options={font_scale:38,stroke_px:3,stroke_spacing:10},this.font={family:"serif",size:10,weight:"bold italic"},this.setXShift(0),this.setWidth(10)}getCategory(){return D.CATEGORY}getPosition(){return this.position}addEndNote(t){return this.note_end=t,this}draw(){if(this.checkContext(),this.setRendered(),!this.note||null==this.index)throw new s.s.RERR("NoAttachedNote","Can't draw stroke without a note and index.");const t=this.note.getModifierStartXY(this.position,this.index);let e=this.note.getYs(),i=t.y,n=t.y;const r=t.x-5,o=this.note.stave.options.spacing_between_lines_px,a=this.getModifierContext().getModifiers(this.note.getCategory());for(let t=0;te.line-t.line));let p=0,f=0,m=0,g=0,b=null,S=null;for(r=0;rm?t:m):l===w.Modifier.Position.RIGHT&&(o.setXShift(f),t+=d,g=t>g?t:g),b=e,S=a}return e.left_shift+=m,e.right_shift+=g,!0}constructor(t){super(),this.setAttribute("type","StringNumber"),this.note=null,this.last_note=null,this.index=null,this.string_number=t,this.setWidth(20),this.position=w.Modifier.Position.ABOVE,this.x_shift=0,this.y_shift=0,this.x_offset=0,this.y_offset=0,this.dashed=!0,this.leg=d.LineEndType.NONE,this.radius=8,this.font={family:"sans-serif",size:10,weight:"bold"}}getCategory(){return O.CATEGORY}getNote(){return this.note}setNote(t){return this.note=t,this}getIndex(){return this.index}setIndex(t){return this.index=t,this}setLineEndType(t){return t>=d.LineEndType.NONE&&t<=d.LineEndType.DOWN&&(this.leg=t),this}setStringNumber(t){return this.string_number=t,this}setOffsetX(t){return this.x_offset=t,this}setOffsetY(t){return this.y_offset=t,this}setLastNote(t){return this.last_note=t,this}setDashed(t){return this.dashed=t,this}draw(){const t=this.checkContext();if(!this.note||null==this.index)throw new s.s.RERR("NoAttachedNote","Can't draw string number without a note and index.");this.setRendered();const e=this.note.stave.options.spacing_between_lines_px,i=this.note.getModifierStartXY(this.position,this.index);let n=i.x+this.x_shift+this.x_offset,r=i.y+this.y_shift+this.y_offset;switch(this.position){case w.Modifier.Position.ABOVE:case w.Modifier.Position.BELOW:{const t=this.note.getStemExtents();let s=t.topY,n=t.baseY+2;this.note.stem_direction===x.$.STEM_DOWN&&(s=t.baseY,n=t.topY-2),r=this.position===w.Modifier.Position.ABOVE?this.note.hasStem()?s-1.75*e:i.y-1.75*e:this.note.hasStem()?n+1.5*e:i.y+1.75*e,r+=this.y_shift+this.y_offset;break}case w.Modifier.Position.LEFT:n-=this.radius/2+5;break;case w.Modifier.Position.RIGHT:n+=this.radius/2+6;break;default:throw new s.s.RERR("InvalidPosition",`The position ${this.position} is invalid`)}t.save(),t.beginPath(),t.arc(n,r,this.radius,0,2*Math.PI,!1),t.lineWidth=1.5,t.stroke(),t.setFont(this.font.family,this.font.size,this.font.weight);const o=n-t.measureText(this.string_number).width/2;if(t.fillText(""+this.string_number,o,r+4.5),null!=this.last_note){const e=this.last_note.getStemX()-this.note.getX()+5;let i,s;switch(t.strokeStyle="#000000",t.lineCap="round",t.lineWidth=.6,this.dashed?d.drawDashedLine(t,n+10,r,n+e,r,[3,3]):d.drawDashedLine(t,n+10,r,n+e,r,[3,0]),this.leg){case d.LineEndType.UP:i=-10,s=this.dashed?[3,3]:[3,0],d.drawDashedLine(t,n+e,r,n+e,r+i,s);break;case d.LineEndType.DOWN:i=10,s=this.dashed?[3,3]:[3,0],d.drawDashedLine(t,n+e,r,n+e,r+i,s)}}t.restore()}}var F=i(6619);class V extends F.W{static getNextContext(t){const e=t.tContexts,i=e.indexOf(t);return e[i+1]}constructor(){super(),this.setAttribute("type","TickContext"),this.currentTick=new o.i(0,1),this.maxTicks=new o.i(0,1),this.minTicks=null,this.padding=3,this.x=0,this.xBase=0,this.xOffset=0,this.tickables=[],this.notePx=0,this.extraLeftPx=0,this.extraRightPx=0,this.tContexts=[]}getX(){return this.x}setX(t){return this.x=t,this.xBase=t,this.xOffset=0,this}getXBase(){return this.xBase}setXBase(t){this.xBase=t,this.x=t+this.xOffset}getXOffset(){return this.xOffset}setXOffset(t){this.xOffset=t,this.x=this.xBase+t}getWidth(){return this.width+2*this.padding}setPadding(t){return this.padding=t,this}getMaxTicks(){return this.maxTicks}getMinTicks(){return this.minTicks}getTickables(){return this.tickables}getCenterAlignedTickables(){return this.tickables.filter((t=>t.isCenterAligned()))}getMetrics(){const{width:t,notePx:e,extraLeftPx:i,extraRightPx:s}=this;return{width:t,notePx:e,extraLeftPx:i,extraRightPx:s}}getCurrentTick(){return this.currentTick}setCurrentTick(t){this.currentTick=t,this.preFormatted=!1}getExtraPx(){let t=0,e=0,i=0,s=0;for(let n=0;n.5*t(e/.5),H=(t,e)=>e===G?t<=5:t>=1,z=(t,e)=>H(t,e)?e===G?Math.ceil:Math.floor:Math.round,j=t=>{const e=t.getCategory();return"stavenotes"===e||"gracenotes"===e},X=t=>{const e=t.getCategory();return"tabnotes"===e||"numberednotes"===e};class Y extends w.Modifier{static get CATEGORY(){return"articulations"}static get INITIAL_OFFSET(){return-.5}static format(t,e){if(!t||0===t.length)return!1;const i=(t,e,i)=>U(z(e,i),t.glyph.getMetrics().height/10+.5);t.filter((t=>t.getPosition()===G)).forEach((t=>{t.setTextLine(e.top_text_line),e.top_text_line+=i(t,e.top_text_line,G)})),t.filter((t=>t.getPosition()===W)).forEach((t=>{t.setTextLine(e.text_line),e.text_line+=i(t,e.text_line,W)}));const s=t.map((t=>t.getWidth())).reduce(((t,e)=>Math.max(e,t)));return e.left_shift+=s/2,e.right_shift+=s/2,!0}static easyScoreHook({articulations:t},e,i){if(!t)return;const s={staccato:"a.",tenuto:"a-"};t.split(",").map((t=>t.trim().split("."))).map((([t,e])=>{const n={type:s[t]};return e&&(n.position=w.Modifier.PositionString[e]),i.getFactory().Articulation(n)})).map((t=>e.addModifier(0,t)))}constructor(t){if(super(),this.setAttribute("type","Articulation"),this.note=null,this.index=null,this.type=t,this.position=W,this.render_options={font_scale:38},this.breathMarkDistance=.8,this.articulation=n.Z.articulationCodes(this.type),"abr"===this.type&&(this.articulation={code:"v6c",between_lines:!1}),!this.articulation)throw new s.s.RERR("ArgumentError",`Articulation not found: ${this.type}`);this.glyph=new p.r(this.articulation.code,this.render_options.font_scale),this.setWidth(this.glyph.getMetrics().width)}getCategory(){return Y.CATEGORY}draw(){const{note:t,index:e,position:i,glyph:n,articulation:{between_lines:r},text_line:o,context:a}=this;if(this.checkContext(),!t||null==e)throw new s.s.RERR("NoAttachedNote","Can't draw Articulation without a note and index.");this.setRendered();const l=t.getStave(),h=l.getSpacingBetweenLines(),u="tabnotes"===t.getCategory();let{x:c}=t.getModifierStartXY(i,e);if("abr"===this.type){let e=0;const i=t.getTickContext(),s=V.getNextContext(i),n=t.getTickContext().getX();if(s)e=(s.getX()-n)*this.breathMarkDistance;else{const i=t.getStave();e=(i.getX()+i.getWidth()-n)*this.breathMarkDistance}c+=e}const d=this.getXShift();d&&(c+=d);const p=!r||u,m=((t,e)=>{const i=e===G&&t.getStemDirection()===f.r.UP||e===W&&t.getStemDirection()===f.r.DOWN;return j(t)?t.hasStem()&&i?.5:1:t.hasStem()&&i?1:0})(t,i);let g={[G]:()=>{n.setOrigin(.5,1);const e=((t,e)=>{const i=t.getStave(),n=t.getStemDirection(),{topY:r,baseY:o}=t.getStemExtents();if(j(t))return t.hasStem()?n===f.r.UP?r:o:Math.min(...t.getYs());if(X(t))return t.hasStem()&&n===f.r.UP?r:i.getYForTopText(e);throw new s.s.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")})(t,o)-(o+m)*h+(this.y_shift||0);return p?Math.min(l.getYForTopText(Y.INITIAL_OFFSET),e):e},[W]:()=>{n.setOrigin(.5,0);const e=((t,e)=>{const i=t.getStave(),n=t.getStemDirection(),{topY:r,baseY:o}=t.getStemExtents();if(j(t))return t.hasStem()?n===f.r.UP?o:r:Math.max(...t.getYs());if(X(t))return t.hasStem()?n===f.r.UP?i.getYForBottomText(e):r:i.getYForBottomText(e);throw new s.s.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")})(t,o)+(o+m)*h;return p?Math.max(l.getYForBottomText(Y.INITIAL_OFFSET),e):e}}[i]();if(!u){const s=i===G?-1:1,o=u?t.positions[e].str:t.getKeyProps()[e].line,a=(t.getYs()[e]-g)/h+o,l=((t,e,i,s)=>{const n=U(z(e,i),e);return t&&H(n,i)&&n%1==0?n+.5*-s:n})(r,a,i,s);H(l,i)&&n.setOrigin(.5,.5),g+=Math.abs(l-a)*h*s}!function(...t){Y.DEBUG&&s.s.L("Vex.Flow.Articulation",t)}(`Rendering articulation at (x: ${c}, y: ${g})`),n.render(a,c,g)}}class K extends w.Modifier{static get CATEGORY(){return"ornaments"}static format(t,e){if(!t||0===t.length)return!1;let i=0;for(let s=0;s0&&s--;for(let e=0;e{J("Preformatting ModifierContext: ",t.CATEGORY),t.format(this.getModifiers(t.CATEGORY),this.state,this)})),this.width=this.state.left_shift+this.state.right_shift,this.preFormatted=!0)}postFormat(){this.postFormatted||this.POSTFORMAT.forEach((t=>{J("Postformatting ModifierContext: ",t.CATEGORY),t.postFormat(this.getModifiers(t.CATEGORY),this)}))}}function tt(t,e){const i=t[e+1];return i&&i?.keys?.includes("b/4")||i?.keys?.includes("r/4")?tt(t,e+1):i}function et(t,e,i,n){let r=e;for(i+=1;i{if(e.getMode()===v.Mode.STRICT&&!e.isComplete())throw new s.s.RERR("IncompleteVoice","Voice does not have enough notes.");return Math.max(t,o.i.LCM(t,e.getResolutionMultiplier()))}),1),r={},a=[],l=[];return t.forEach((t=>{const s=new o.i(0,n);t.getTickables().forEach((t=>{const n=s.numerator;if(!r[n]){const t=new e;l.push(t),r[n]=t}i(t,r[n]),a.push(n),s.add(t.getTicks())}))})),{map:r,array:l,list:s.s.SortAndUnique(a,((t,e)=>t-e),((t,e)=>t===e)),resolutionMultiplier:n}}class st{static SimpleFormat(t,e=0,{paddingBetween:i=10}={}){t.reduce(((t,e)=>{e.addToModifierContext(new Q);const s=(new V).addTickable(e).preFormat(),n=s.getExtraPx();return s.setX(t+n.left),t+s.getWidth()+n.right+i}),e)}static plotDebugging(t,e,i,s,n){const r=i+M.j.STAVEPADDING,o=e.contextGaps;t.save(),t.setFont("Arial",8,""),o.gaps.forEach((e=>{var i,o,a;i=r+e.x1,o=r+e.x2,a="#aaa",t.beginPath(),t.setStrokeStyle(a),t.setFillStyle(a),t.setLineWidth(1),t.fillRect(i,s,o-i,n-s),t.fillText(Math.round(e.x2-e.x1),r+e.x1,n+12)})),t.fillText(Math.round(o.total)+"px",r-20,n+12),t.setFillStyle("red"),t.fillText("Loss: "+e.lossHistory.map((t=>Math.round(t))),r-20,n+22),t.restore()}static FormatAndDraw(t,e,i,r){const o={auto_beam:!1,align_rests:!1};"object"==typeof r?s.s.Merge(o,r):"boolean"==typeof r&&(o.auto_beam=r);const a=new v(n.Z.TIME4_4).setMode(v.Mode.SOFT).addTickables(i),l=o.auto_beam?y.applyAndGetBeams(a):[];return(new st).joinVoices([a],{align_rests:o.align_rests}).formatToStave([a],e,{align_rests:o.align_rests,stave:e}),a.setStave(e).draw(t,e),l.forEach((e=>e.setContext(t).draw())),a.getBoundingBox()}static FormatAndDrawTab(t,e,i,r,o,a,l){const h={auto_beam:a,align_rests:!1};"object"==typeof l?s.s.Merge(h,l):"boolean"==typeof l&&(h.auto_beam=l);const u=new v(n.Z.TIME4_4).setMode(v.Mode.SOFT).addTickables(o),c=new v(n.Z.TIME4_4).setMode(v.Mode.SOFT).addTickables(r),d=h.auto_beam?y.applyAndGetBeams(u):[];(new st).joinVoices([u],{align_rests:h.align_rests}).joinVoices([c]).formatToStave([u,c],i,{align_rests:h.align_rests}),u.draw(t,i),c.draw(t,e),d.forEach((e=>e.setContext(t).draw())),new _(i,e).setContext(t).draw()}static AlignRestsToNotes(t,e,i){return t.forEach(((s,n)=>{if(s instanceof x.$&&s.isRest()){if(s.tuplet&&!i)return;const r=s.getGlyph().position.toUpperCase();if("R/4"!==r&&"B/4"!==r)return;if(e||null!=s.beam){const e=s.getKeyProps()[0];if(0===n)e.line=et(t,e.line,n,!1),s.setKeyLine(0,e.line);else if(n>0&&n0){const t=s<1.5?Math.abs(s-1.5)*e:0;n.setResetHeight(t)}else{const t=s>4.5?Math.abs(s-4.5)*e:0;n.setResetHeight(t)}}}}}})),this}constructor(){this.minTotalWidth=0,this.hasMinTotalWidth=!1,this.totalTicks=new o.i(0,1),this.tickContexts=null,this.modiferContexts=null,this.contextGaps={total:0,gaps:[]},this.voices=[]}alignRests(t,e){if(!t||!t.length)throw new s.s.RERR("BadArgument","No voices to format rests");t.forEach((t=>st.AlignRestsToNotes(t.getTickables(),e)))}preCalculateMinTotalWidth(t){if(this.hasMinTotalWidth)return this.minTotalWidth;if(!this.tickContexts){if(!t)throw new s.s.RERR("BadArgument","'voices' required to run preCalculateMinTotalWidth");this.createTickContexts(t)}const{list:e,map:i}=this.tickContexts;return this.minTotalWidth=e.map((t=>{const e=i[t];return e.preFormat(),e.getWidth()})).reduce(((t,e)=>t+e),0),this.hasMinTotalWidth=!0,this.minTotalWidth}getMinTotalWidth(){if(!this.hasMinTotalWidth)throw new s.s.RERR("NoMinTotalWidth","Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'");return this.minTotalWidth}createModifierContexts(t){const e=it(t,Q,((t,e)=>t.addToModifierContext(e)));return this.modiferContexts=e,e}createTickContexts(t){const e=it(t,V,((t,e)=>e.addTickable(t)));return e.array.forEach((t=>{t.tContexts=e.array})),this.totalTicks=t[0].getTicksUsed().clone(),this.tickContexts=e,e}preFormat(t=0,e,i,s){const n=this.tickContexts,{list:r,map:o,resolutionMultiplier:a}=n;i&&s&&i.forEach((t=>t.setStave(s).preFormat()));let l=0,h=0;const u=t/2;if(this.minTotalWidth=0,r.forEach((t=>{const i=o[t];e&&i.setContext(e),i.preFormat();const s=i.getWidth();this.minTotalWidth+=s;const n=i.getMetrics();l=l+h+n.extraLeftPx,i.setX(l),h=s-n.extraLeftPx})),this.minTotalWidth=l+h,this.hasMinTotalWidth=!0,t<=0)return;const c=t-this.minTotalWidth;let d=this.totalTicks.value();0===d&&(d=1);const p=c/(d*a);let f=0;r.forEach(((t,e)=>{const i=r[e-1]||0,s=o[t];f+=(t-i)*p,s.setX(s.getX()+f),s.getCenterAlignedTickables().forEach((t=>{t.center_x_shift=u-s.getX()}))})),1!==r.length&&(this.justifyWidth=t,this.lossHistory=[],this.evaluate())}evaluate(){const t=this.justifyWidth;this.contextGaps={total:0,gaps:[]},this.tickContexts.list.forEach(((t,e)=>{if(0===e)return;const i=this.tickContexts.list[e-1],s=this.tickContexts.map[i],n=this.tickContexts.map[t],r=s.getMetrics(),o=s.getX()+r.width,a=n.getX(),l=a-o;this.contextGaps.total+=l,this.contextGaps.gaps.push({x1:o,x2:a}),n.getFormatterMetrics().freedom.left=l,s.getFormatterMetrics().freedom.right=l}));const e=this.durationStats={};this.voices.forEach((i=>{i.getTickables().forEach(((i,s,n)=>{const r=i.getTicks().clone().simplify().toString(),o=i.getMetrics(),a=i.getFormatterMetrics(),l=i.getX()+o.noteWidth+o.modRightPx+o.extraRightPx;let h=0;if(s{t.getTickables().forEach((t=>{const s=t.getTicks().clone().simplify().toString(),n=t.getFormatterMetrics();n.iterations+=1,n.space.deviation=n.space.used-e[s].mean,n.duration=s,n.space.mean=e[s].mean,i+=Math.pow(e[s].mean,2)}))})),this.totalCost=Math.sqrt(i),this.lossHistory.push(this.totalCost),this}tune(){let t=0;return this.tickContexts.list.forEach(((e,i,s)=>{const n=this.tickContexts.map[e],r=i>0?this.tickContexts.map[s[i-1]]:null,o=it.getFormatterMetrics().space.deviation)).reduce(((t,e)=>t+e));a>0?t=-Math.min(n.getFormatterMetrics().freedom.right,Math.abs(a)):a<0&&(t=o?Math.min(o.getFormatterMetrics().freedom.right,Math.abs(a)):0);const l=Math.min(5,Math.abs(t));t=t>0?l:-l})),this.evaluate()}postFormat(){const t=t=>t.list.forEach((e=>t.map[e].postFormat()));return t(this.modiferContexts),t(this.tickContexts),this}joinVoices(t){return this.createModifierContexts(t),this.hasMinTotalWidth=!1,this}format(t,e,i){const n={align_rests:!1,context:null,stave:null};return s.s.Merge(n,i),this.voices=t,this.alignRests(t,n.align_rests),this.createTickContexts(t),this.preFormat(e,n.context,t,n.stave),n.stave&&this.postFormat(),this}formatToStave(t,e,i){const n=e.getNoteEndX()-e.getNoteStartX()-10;!function(...t){st.DEBUG&&s.s.L("Vex.Flow.Formatter",t)}("Formatting voices to width: ",n);const r={context:e.getContext()};return s.s.Merge(r,i),this.format(t,n,r)}}class nt extends r.W{static get Position(){return{LEFT:1,RIGHT:2,ABOVE:3,BELOW:4,BEGIN:5,END:6}}constructor(){super(),this.setAttribute("type","StaveModifier"),this.padding=10,this.position=nt.Position.ABOVE,this.layoutMetrics=null}getPosition(){return this.position}setPosition(t){return this.position=t,this}getStave(){return this.stave}setStave(t){return this.stave=t,this}getWidth(){return this.width}setWidth(t){return this.width=t,this}getX(){return this.x}setX(t){return this.x=t,this}getCategory(){return""}makeSpacer(t){return{getContext:()=>!0,setStave(){},renderToStave(){},getMetrics:()=>({width:t})}}placeGlyphOnLine(t,e,i){t.setYShift(e.getYForLine(i)-e.getYForGlyphs())}getPadding(t){return void 0!==t&&t<2?0:this.padding}setPadding(t){return this.padding=t,this}setLayoutMetrics(t){return this.layoutMetrics=t,this}getLayoutMetrics(){return this.layoutMetrics}}class rt extends nt{static get CATEGORY(){return"barlines"}static get type(){return{SINGLE:1,DOUBLE:2,END:3,REPEAT_BEGIN:4,REPEAT_END:5,REPEAT_BOTH:6,NONE:7}}static get typeString(){return{single:rt.type.SINGLE,double:rt.type.DOUBLE,end:rt.type.END,repeatBegin:rt.type.REPEAT_BEGIN,repeatEnd:rt.type.REPEAT_END,repeatBoth:rt.type.REPEAT_BOTH,none:rt.type.NONE}}constructor(t){super(),this.setAttribute("type","Barline"),this.thickness=n.Z.STAVE_LINE_THICKNESS;const e=rt.type;this.widths={},this.widths[e.SINGLE]=5,this.widths[e.DOUBLE]=5,this.widths[e.END]=5,this.widths[e.REPEAT_BEGIN]=5,this.widths[e.REPEAT_END]=5,this.widths[e.REPEAT_BOTH]=5,this.widths[e.NONE]=5,this.paddings={},this.paddings[e.SINGLE]=0,this.paddings[e.DOUBLE]=0,this.paddings[e.END]=0,this.paddings[e.REPEAT_BEGIN]=15,this.paddings[e.REPEAT_END]=15,this.paddings[e.REPEAT_BOTH]=15,this.paddings[e.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[e.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[e.NONE]={xMin:0,xMax:0,paddingLeft:5,paddingRight:5},this.setPosition(nt.Position.BEGIN),this.setType(t)}getCategory(){return rt.CATEGORY}getType(){return this.type}setType(t){return this.type="string"==typeof t?rt.typeString[t]:t,this.setWidth(this.widths[this.type]),this.setPadding(this.paddings[this.type]),this.setLayoutMetrics(this.layoutMetricsMap[this.type]),this}draw(t){switch(t.checkContext(),this.setRendered(),this.type){case rt.type.SINGLE:this.drawVerticalBar(t,this.x,!1);break;case rt.type.DOUBLE:this.drawVerticalBar(t,this.x,!0);break;case rt.type.END:this.drawVerticalEndBar(t,this.x);break;case rt.type.REPEAT_BEGIN:this.drawRepeatBar(t,this.x,!0),t.getX()!==this.x&&this.drawVerticalBar(t,t.getX());break;case rt.type.REPEAT_END:this.drawRepeatBar(t,this.x,!1);break;case rt.type.REPEAT_BOTH:this.drawRepeatBar(t,this.x,!1),this.drawRepeatBar(t,this.x,!0)}}drawVerticalBar(t,e,i){t.checkContext();const s=t.getTopLineTopY(),n=t.getBottomLineBottomY();i&&t.context.fillRect(e-3,s,1,n-s),t.context.fillRect(e,s,1,n-s)}drawVerticalEndBar(t,e){t.checkContext();const i=t.getTopLineTopY(),s=t.getBottomLineBottomY();t.context.fillRect(e-5,i,1,s-i),t.context.fillRect(e-2,i,3,s-i)}drawRepeatBar(t,e,i){t.checkContext();const s=t.getTopLineTopY(),n=t.getBottomLineBottomY();let r=3;i||(r=-5),t.context.fillRect(e+r,s,1,n-s),t.context.fillRect(e-2,s,3,n-s),i?r+=4:r-=4;const o=e+r+1;let a=(t.getNumLines()-1)*t.getSpacingBetweenLines();a=a/2-t.getSpacingBetweenLines()/2;let l=s+a+1;t.context.beginPath(),t.context.arc(o,l,2,0,2*Math.PI,!1),t.context.fill(),l+=t.getSpacingBetweenLines(),t.context.beginPath(),t.context.arc(o,l,2,0,2*Math.PI,!1),t.context.fill()}}class ot extends nt{static get CATEGORY(){return"repetitions"}static get type(){return{NONE:1,CODA_LEFT:2,CODA_RIGHT:3,SEGNO_LEFT:4,SEGNO_RIGHT:5,DC:6,DC_AL_CODA:7,DC_AL_FINE:8,DS:9,DS_AL_CODA:10,DS_AL_FINE:11,FINE:12,TO_CODA:13}}constructor(t,e,i){super(),this.setAttribute("type","Repetition"),this.symbol_type=t,this.x=e,this.x_shift=0,this.y_shift=i,this.font={family:"times",size:12,weight:"bold italic"}}getCategory(){return ot.CATEGORY}setShiftX(t){return this.x_shift=t,this}setShiftY(t){return this.y_shift=t,this}setX(t){return this.x=t,this}draw(t,e){switch(this.setRendered(),this.symbol_type){case ot.type.CODA_RIGHT:this.drawCodaFixed(t,e+t.width);break;case ot.type.CODA_LEFT:this.drawSymbolText(t,e,"Coda",!0);break;case ot.type.SEGNO_LEFT:this.drawSignoFixed(t,e);break;case ot.type.SEGNO_RIGHT:this.drawSignoFixed(t,e+t.width);break;case ot.type.DC:this.drawSymbolText(t,e,"D.C.",!1);break;case ot.type.DC_AL_CODA:this.drawSymbolText(t,e,"D.C. al",!0);break;case ot.type.DC_AL_FINE:this.drawSymbolText(t,e,"D.C. al Fine",!1);break;case ot.type.DS:this.drawSymbolText(t,e,"D.S.",!1);break;case ot.type.DS_AL_CODA:this.drawSymbolText(t,e,"D.S. al",!0);break;case ot.type.DS_AL_FINE:this.drawSymbolText(t,e,"D.S. al Fine",!1);break;case ot.type.FINE:this.drawSymbolText(t,e,"Fine",!1);break;case ot.type.TO_CODA:this.drawSymbolText(t,e,"To",!0)}return this}drawCodaFixed(t,e){const i=t.getYForTopText(t.options.num_lines)+this.y_shift;return p.r.renderGlyph(t.context,this.x+e+this.x_shift,i+25,40,"v4d",!0),this}drawSignoFixed(t,e){const i=t.getYForTopText(t.options.num_lines)+this.y_shift;return p.r.renderGlyph(t.context,this.x+e+this.x_shift,i+25,30,"v8c",!0),this}drawSymbolText(t,e,i,s){const n=t.checkContext();n.save(),n.setFont(this.font.family,this.font.size,this.font.weight);let r=0+this.x_shift,o=e+this.x_shift;if(this.symbol_type===ot.type.CODA_LEFT?(r=this.x+this.x_shift,o=r+n.measureText(i).width+12):(this.x_shift=-(r+n.measureText(i).width+12+t.options.vertical_bar_width+12),r=this.x+this.x_shift+t.options.vertical_bar_width,o=r+n.measureText(i).width+12),this.xShiftAsPercentOfStaveWidth){const e=t.width*this.xShiftAsPercentOfStaveWidth;this.symbol_type!==ot.type.DC_AL_FINE&&this.symbol_type!==ot.type.FINE&&this.symbol_type!==ot.type.DC&&this.symbol_type!==ot.type.DS_AL_FINE&&this.symbol_type!==ot.type.DS&&this.symbol_type!==ot.type.FINE||(r+=e)}const a=t.getYForTopText(t.options.num_lines)+this.y_shift+25;return s&&p.r.renderGlyph(n,o,a,40,"v4d",!0),n.fillText(i,r,a+5),n.restore(),this}}class at extends nt{static get CATEGORY(){return"stavesection"}constructor(t,e,i){super(),this.setAttribute("type","StaveSection"),this.setWidth(16),this.section=t,this.x=e,this.shift_x=0,this.shift_y=i,this.font={family:"sans-serif",size:12,weight:"bold"}}getCategory(){return at.CATEGORY}setStaveSection(t){return this.section=t,this}setShiftX(t){return this.shift_x=t,this}setShiftY(t){return this.shift_y=t,this}draw(t,e){const i=t.checkContext();this.setRendered(),i.save(),i.lineWidth=2,i.setFont(this.font.family,this.font.size,this.font.weight);const s=i.measureText(""+this.section),n=s.width;let r=s.height;!r&&s.emHeightAscent>=0&&(r=s.emHeightAscent+2),r||(r=s.fontBoundingBoxAscent+3);let o=n+6;o<18&&(o=18);const a=r+this.font.size/10,l=t.getYForTopText(3)+19-1.15*a+this.shift_y;let h=this.x+e;return i.beginPath(),i.lineWidth=2,i.rect(h,l+r/4,o,a),i.stroke(),h+=(o-n)/2,i.fillText(""+this.section,h,l+a),i.restore(),this}}class lt extends nt{static get CATEGORY(){return"stavetempo"}constructor(t,e,i){super(),this.setAttribute("type","StaveTempo"),this.tempo=t,this.position=w.Modifier.Position.ABOVE,this.x=e,this.shift_x=10,this.shift_y=i,this.font={family:"times",size:14,weight:"bold"},this.render_options={glyph_font_scale:30}}getCategory(){return lt.CATEGORY}setTempo(t){return this.tempo=t,this}setShiftX(t){return this.shift_x=t,this}setShiftY(t){return this.shift_y=t,this}draw(t,e){const i=t.checkContext();this.setRendered();const s=this.render_options,r=s.glyph_font_scale/38,o=this.tempo.name,a=this.tempo.duration,l=this.tempo.dots,h=this.tempo.bpm,u=this.font;let c=this.x+this.shift_x+e;const d=t.getYForTopText(1)+this.shift_y;if(i.save(),i.openGroup("stavetempo",null,{}),o&&(i.setFont(u.family,u.size,u.weight),i.fillText(o,c,d),c+=i.measureText(o).width),a&&h){i.setFont(u.family,u.size,"normal"),o&&(c+=i.measureText(" ").width,i.fillText("(",c,d),c+=i.measureText("(").width);const t=n.Z.getGlyphProps(a);if(c+=3*r,p.r.renderGlyph(i,c,d,s.glyph_font_scale,t.code_head),c+=t.getWidth()*r,t.stem){let e=30;t.beam_count&&(e+=3*(t.beam_count-1)),e*=r;const n=d-e;i.fillRect(c-r,n,r,e),t.flag&&(p.r.renderGlyph(i,c,n,s.glyph_font_scale,t.code_flag_upstem),l||(c+=6*r))}for(let t=0;t=t.line?i.above:i.below)}this.placeGlyphOnLine(s,this.stave,t.line),this.glyphs.push(s);const o=this.xPositions[this.xPositions.length-1],a=s.getMetrics().width+r;this.xPositions.push(o+a),this.width+=a}cancelKey(t){return this.formatted=!1,this.cancelKeySpec=t,this}convertToCancelAccList(t){const e=n.Z.keySignature(t),i=this.accList.length>0&&e.length>0&&e[0].type!==this.accList[0].type,s=i?e.length:e.length-this.accList.length;if(s<1)return;const r=[];for(let t=0;t0?t[0].type:null;let i;if(this.cancelKeySpec&&(i=this.convertToCancelAccList(this.cancelKeySpec)),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0){const s=(this.position===nt.Position.END?this.stave.endClef:this.stave.clef)||this.stave.clef;i&&this.convertAccLines(s,i.type,i.accList),this.convertAccLines(s,e,t);for(let t=0;t0){const t=this.stave.context.openGroup("keysignature");for(let t=0;t{const e=t.split("/").filter((t=>""!==t));if(2!==e.length)throw new s.s.RERR("BadTimeSignature",`Invalid time spec: ${t}. Must be in the form "/"`);e.forEach((e=>{if(isNaN(Number(e)))throw new s.s.RERR("BadTimeSignature",`Invalid time spec: ${t}. Must contain two valid numbers.`)}))})(t);const[e,i]=t.split("/").map((t=>t.split("")));return{num:!0,glyph:this.makeTimeSignatureGlyph(e,i)}}makeTimeSignatureGlyph(t,e){const i=new p.r("v0",this.point);i.topGlyphs=[],i.botGlyphs=[];let s=0;for(let e=0;en?s:n,o=i.getMetrics().x_min;i.getMetrics=()=>({x_min:o,x_max:o+r,width:r});const a=(r-s)/2,l=(r-n)/2,h=this;return i.renderToStave=function(t){let e=t+a;for(let t=0;tt.visible)).filter(Boolean).length}formatBegModifiers(t){let e=0;t.forEach((t=>{t.getNoteStartX()>e&&(e=t.getNoteStartX())})),t.forEach((t=>{t.setNoteStartX(e)})),e=0,t.forEach((t=>{t.getModifiers(nt.Position.BEGIN,rt.CATEGORY).forEach((t=>{t.getType()==rt.type.REPEAT_BEGIN&&t.getX()>e&&(e=t.getX())}))})),t.forEach((t=>{t.getModifiers(nt.Position.BEGIN,rt.CATEGORY).forEach((t=>{t.getType()==rt.type.REPEAT_BEGIN&&t.setX(e)}))})),e=0,t.forEach((t=>{t.getModifiers(nt.Position.BEGIN,ft.CATEGORY).forEach((t=>{t.getX()>e&&(e=t.getX())}))})),t.forEach((t=>{t.getModifiers(nt.Position.BEGIN,ft.CATEGORY).forEach((t=>{t.setX(e)}))}))}getOptions(){return this.options}setNoteStartX(t){return this.formatted||this.format(),this.setStartX(t),this}setStartX(t){this.start_x=t}getNoteStartX(){return this.formatted||this.format(),this.start_x}getNoteEndX(){return this.formatted||this.format(),this.end_x}getTieStartX(){return this.start_x}getTieEndX(){return this.x+this.width}getX(){return this.x}getNumLines(){return this.options.num_lines}setNumLines(t){return this.options.num_lines=parseInt(t,10),this.resetLines(),this}setY(t){return this.y=t,this}getTopLineTopY(){return this.getYForLine(0)-n.Z.STAVE_LINE_THICKNESS/2}getBottomLineBottomY(){return 2===this.getLines()?this.getYForLine(6)+n.Z.STAVE_LINE_THICKNESS/2:this.getYForLine(this.getNumLines()-1)+n.Z.STAVE_LINE_THICKNESS/2}setX(t){const e=t-this.x;this.formatted=!1,this.x=t,this.start_x+=e,this.end_x+=e;for(let t=0;ti.getWidth()&&(e-=i.getWidth()),e}setRepetitionTypeLeft(t,e){return this.modifiers.push(new ot(t,this.x,e)),this}setRepetitionTypeRight(t,e){return this.modifiers.push(new ot(t,this.x,e)),this}setVoltaType(t,e,i){if(2===t)2===bt.type&&bt.stave.modifiers.push(new mt(bt.type,bt.number_t,bt.x,bt.y)),bt={stave:this,type:t,number_t:e,MeasureNumber:this.MeasureNumber,y:i,x:this.x};else if(4===t){let t=this.MeasureNumber-bt.MeasureNumber,s=Math.max(bt.y,i);for(let i=0;i<=t;i++)St[bt.MeasureNumber+i]={type:0===i?2:i===t?4:0,number_t:e,y:s};bt={}}else this.modifiers.push(new mt(t,e,this.x,i));return this}drawVolta(){let t=St[this.MeasureNumber];t&&(this.modifiers.push(new mt(t.type,t.number_t,this.x,t.y)),delete St[this.MeasureNumber]),bt.type&&bt.MeasureNumber==this.MeasureNumber&&(this.modifiers.push(new mt(bt.type,bt.number_t,this.x,bt.y)),bt={})}setSection(t,e,i=0,s=12){const n=new at(t,this.x+i,e);return n.font.size=s,this.modifiers.push(n),this}setTempo(t,e){return this.modifiers.push(new lt(t,this.x,e)),this}setText(t,e,i){let s=new ut(t,e,i);return s.setFont({family:"Arial",size:14,weight:"normal"}),this.modifiers.push(s),this}getHeight(){return this.height}getSpacingBetweenLines(){return this.options.spacing_between_lines_px}getBoundingBox(){return new ct.k(this.x,this.y,this.width,this.getBottomY()-this.y)}getBottomY(){const t=this.options,e=t.spacing_between_lines_px;return this.getYForLine(t.num_lines)+t.space_below_staff_ln*e}getBottomLineY(){return this.getYForLine(this.options.num_lines)}getYForLine(t){const e=this.options,i=e.spacing_between_lines_px,s=e.space_above_staff_ln;return this.y+t*i+s*i}getLineForY(t){const e=this.options,i=e.spacing_between_lines_px,s=e.space_above_staff_ln;return(t-this.y)/i-s}getYForTopText(t){const e=t||0;return this.getYForLine(-e-this.options.top_text_position)}getYForBottomText(t){const e=t||0;return this.getYForLine(this.options.bottom_text_position+e)}getYForNote(t){const e=this.options,i=e.spacing_between_lines_px,s=e.space_above_staff_ln;return this.y+s*i+5*i-t*i}getYForGlyphs(){return this.getYForLine(3)}addModifier(t,e,i){return void 0!==e&&t.setPosition(e),i&&(this.timeSignature.numerator=i.numerator,this.timeSignature.denominator=i.denominator),t.setStave(this),this.formatted=!1,this.modifiers.push(t),this}addEndModifier(t){return this.addModifier(t,nt.Position.END),this}setBegBarType(t){const{SINGLE:e,REPEAT_BEGIN:i,NONE:s}=rt.type;return t!==e&&t!==i&&t!==s||(this.modifiers[0].setType(t),this.formatted=!1),this}setEndBarType(t){return t!==rt.type.REPEAT_BEGIN&&(this.modifiers[1].setType(t),this.formatted=!1),this}setClef(t,e,i,s){void 0===s&&(s=nt.Position.BEGIN),s===nt.Position.END?this.endClef=t:this.clef=t;const n=this.getModifiers(s,dt.CATEGORY);return 0===n.length?this.addClef(t,e,i,s):n[0].setType(t,e,i),this}setEndClef(t,e,i){return this.setClef(t,e,i,nt.Position.END),this}setKeySignature(t,e,i){this.options.keySignature=t,void 0===i&&(i=nt.Position.BEGIN);const s=this.getModifiers(i,pt.CATEGORY);return 0===s.length?"jianpu"!==this.options.DYMusicScoreType&&this.addKeySignature(t,e,i):s[0].setKeySig(t,e),this}setEndKeySignature(t,e){return this.setKeySignature(t,e,nt.Position.END),this}setTimeSignature(t,e,i){void 0===i&&(i=nt.Position.BEGIN);const s=this.getModifiers(i,ft.CATEGORY);return 0===s.length?this.addTimeSignature(t,e,i):s[0].setTimeSig(t),this}setEndTimeSignature(t,e){return this.setTimeSignature(t,e,nt.Position.END),this}addKeySignature(t,e,i){return void 0===i&&(i=nt.Position.BEGIN),this.addModifier(new pt(t,e).setPosition(i),i),this}addClef(t,e,i,s){return void 0===s||s===nt.Position.BEGIN?this.clef=t:s===nt.Position.END&&(this.endClef=t),this.addModifier(new dt(t,e,i),s),this}addEndClef(t,e,i){return this.addClef(t,e,i,nt.Position.END),this}addTimeSignature(t,e,i){return this.addModifier(new ft(t,e),i),this}addEndTimeSignature(t,e){return this.addTimeSignature(t,e,nt.Position.END),this}addTrebleGlyph(){return this.addClef("treble"),this}getModifiers(t,e){return void 0===t&&void 0===e?this.modifiers:this.modifiers.filter((i=>!(void 0!==t&&t!==i.getPosition()||void 0!==e&&e!==i.getCategory())))}sortByCategory(t,e){for(let i=t.length-1;i>=0;i--)for(let s=0;se[t[s+1].getCategory()]){const e=t[s];t[s]=t[s+1],t[s+1]=e}}format(){const t=this.modifiers[0],e=this.modifiers[1],i=this.getModifiers(nt.Position.BEGIN),s=this.getModifiers(nt.Position.END);let n,r,o;this.sortByCategory(i,{barlines:0,clefs:1,keysignatures:2,timesignatures:3}),this.sortByCategory(s,{timesignatures:0,keysignatures:1,barlines:2,clefs:3}),i.length>1&&t.getType()===rt.type.REPEAT_BEGIN&&(i.push(i.splice(0,1)[0]),i.splice(0,0,new rt(rt.type.SINGLE))),s.indexOf(e)>0&&s.splice(0,0,new rt(rt.type.NONE));let a=0,l=this.x;for(let t=0;tl?l=e:o.setX(l),l+=n,r+n===0&&a--}l>this.start_x&&this.setStartX(l),l=this.x+this.width;const h={left:0,right:0,paddingRight:0,paddingLeft:0};let u=0;for(let t=0;t{t.includes(i)?e.visible=!0:e.visible=!1}))}for(let n=0;nthis.drawStaveTempo())),this.measure>0){this.context.save(),this.context.setFont(this.font.family,this.font.size,this.font.weight);const t=this.context.measureText(""+this.measure).width;s=this.getYForTopText(0)+3,this.context.fillText(""+this.measure,this.x-t/2,s),this.context.restore()}return this}drawStaveTempo(){if(!this.staveTempos.length)return;const t=document.querySelector(`#${this.attrs.id}`);if(!t)return;const e=t.parentElement.getBBox(),i=this.getYForLine(0),s=t.parentElement.parentElement.querySelectorAll(".vf-curve");if(s.length){const t=this.x+this.staveTempos[0].shift_x+this.getModifierXShift(0),n=this.getYForTopText(1)+e.y-i+5;s.forEach((i=>{const s=i.getBBox();s.x-10t&&s.y-10n&&(e.y=s.y+5)}))}for(let t=0;t1&&(yt=!0)}}else this.options.keySignature!=gt&&this.setText(`1=${t}`,1,{justification:1,shift_x:50,shift_y:-50});gt=this.options.keySignature}if(this.MeasureNumber>=0&&this.timeSignature.numerator){let t=40,e=0;this.MeasureNumber<2&&(t=70,e=-72),this.setText(`${this.timeSignature.numerator}`,1,{justification:1,shift_x:t,shift_y:e-13}),this.setText("ᅳ",1,{justification:1,shift_x:t+3,shift_y:e-2}),this.setText(`${this.timeSignature.denominator}`,1,{justification:1,shift_x:t,shift_y:e+8})}}drawVertical(t,e){this.drawVerticalFixed(this.x+t,e)}drawVerticalFixed(t,e){this.checkContext();const i=this.getYForLine(0),s=this.getYForLine(this.options.num_lines-1);e&&this.context.fillRect(t-3,i,1,s-i+1),this.context.fillRect(t,i,1,s-i+1)}drawVerticalBar(t){this.drawVerticalBarFixed(this.x+t,!1)}drawVerticalBarFixed(t){this.checkContext();const e=this.getYForLine(0),i=this.getYForLine(this.options.num_lines-1);this.context.fillRect(t,e,1,i-e+1)}getConfigForLines(){return this.options.line_config}setConfigForLine(t,e){if(t>=this.options.num_lines||t<0)throw new s.s.RERR("StaveConfigError","The line number must be within the range of the number of lines in the Stave.");if(void 0===e.visible)throw new s.s.RERR("StaveConfigError","The line configuration object is missing the 'visible' property.");if("boolean"!=typeof e.visible)throw new s.s.RERR("StaveConfigError","The line configuration objects 'visible' property must be true or false.");return this.options.line_config[t]=e,this}setConfigForLines(t){if(t.length!==this.options.num_lines)throw new s.s.RERR("StaveConfigError","The length of the lines configuration array must match the number of lines in the Stave");for(const e in t)t[e]||(t[e]=this.options.line_config[e]),s.s.Merge(this.options.line_config[e],t[e]);return this.options.line_config=t,this}}class Et extends vt{constructor(t,e,i,n){const r={spacing_between_lines_px:13,num_lines:6,top_text_position:1};s.s.Merge(r,n),super(t,e,i,r),this.setAttribute("type","TabStave")}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef("tab"),this}}var _t=i(2945);class xt extends _t.Y{static get CATEGORY(){return"tabnotes"}constructor(t,e){if(super(t),this.setAttribute("type","TabNote"),this.ghost=!1,this.positions=t.positions,s.s.Merge(this.render_options,{glyph_font_scale:n.Z.DEFAULT_TABLATURE_FONT_SCALE,draw_stem:e,draw_dots:e,draw_stem_through_stave:!1,y_shift:0,scale:1,font:"10pt Arial"}),this.glyph=n.Z.getGlyphProps(this.duration,this.noteType),!this.glyph)throw new s.s.RuntimeError("BadArguments",`Invalid note initialization data (No glyph found): ${JSON.stringify(t)}`);this.buildStem(),t.stem_direction?this.setStemDirection(t.stem_direction):this.setStemDirection(f.r.UP),this.ghost=!1,this.updateWidth()}reset(){this.stave&&this.setStave(this.stave)}getCategory(){return xt.CATEGORY}setGhost(t){return this.ghost=t,this.updateWidth(),this}hasStem(){return this.render_options.draw_stem}getStemExtension(){const t=this.getGlyph();return null!=this.stem_extension_override?this.stem_extension_override:t?1===this.getStemDirection()?t.tabnote_stem_up_extension:t.tabnote_stem_down_extension:0}addDot(){const t=new P.o;return this.dots+=1,this.addModifier(t,0)}updateWidth(){this.glyphs=[],this.width=0;for(let t=0;tthis.width}setStave(t){let e;if(super.setStave(t),this.context=t.context,this.context){const t=this.context;for(this.width=0,e=0;ei.width),this.width=Math.max(i.getWidth(),this.width)}this.glyph.getWidth=()=>this.width}const i=this.positions.map((({str:e})=>t.getYForLine(e-1)));return this.setYs(i),this.stem&&this.stem.setYBounds(this.getStemY(),this.getStemY()),this}getPositions(){return this.positions}addToModifierContext(t){this.setModifierContext(t);for(let t=0;t{("dots"!==t.getCategory()||this.render_options.draw_dots)&&(t.setContext(this.context),t.drawWithStyle())}))}drawStemThrough(){const t=this.getStemX(),e=this.getStemY(),i=this.context,s=this.render_options.draw_stem_through_stave;if(this.render_options.draw_stem&&s){const s=function(t,e){const i=[];let s=[];for(let n=1;n<=t;n++)e.indexOf(n)>-1?(i.push(s),s=[]):s.push(n);return s.length>0&&i.push(s),i}(this.stave.getNumLines(),this.positions.map((t=>t.str))),n=function(t,e,i,s){const n=1!==s,r=-1!==s,o=i.getSpacingBetweenLines(),a=i.getNumLines(),l=[];return e.forEach((e=>{const h=e.indexOf(a)>-1,u=e.indexOf(1)>-1;if(n&&u||r&&h)return;1===e.length&&e.push(e[0]);const c=[];e.forEach(((e,n,r)=>{const l=1===e,h=e===a;let u=i.getYForLine(e-1);0!==n||l?n!==r.length-1||h||(u+=o/2-1):u-=o/2-1,c.push(u),1===s&&l?c.push(t-2):-1===s&&h&&c.push(t+2)})),l.push(c.sort(((t,e)=>t-e)))})),l}(e,s,this.getStave(),this.getStemDirection());i.save(),i.setLineWidth(f.r.WIDTH),n.forEach((e=>{0!==e.length&&(i.beginPath(),i.moveTo(t,e[0]),i.lineTo(t,e[e.length-1]),i.stroke(),i.closePath())})),i.restore()}}drawPositions(){const t=this.context,e=this.getAbsoluteX(),i=this.ys;for(let s=0;sparseInt(s,10)?Rt.SLIDE_DOWN:Rt.SLIDE_UP}this.slide_direction=e,this.render_options.cp1=11,this.render_options.cp2=14,this.render_options.y_shift=.5,this.setFont({font:"Times",size:10,style:"bold italic"}),this.setNotes(t)}renderTie(t){if(0===t.first_ys.length||0===t.last_ys.length)throw new s.s.RERR("BadArguments","No Y-values to render");const e=this.context,i=t.first_x_px,n=t.first_ys,r=t.last_x_px,o=this.slide_direction;if(o!==Rt.SLIDE_UP&&o!==Rt.SLIDE_DOWN)throw new s.s.RERR("BadSlide","Invalid slide direction");for(let t=0;tthis.numStrings)throw new s.s.RERR("BadArguments",`String number must be between 1 and ${this.numStrings}:${t}`);return this.tuningValues[e-1]}getValueForFret(t,e){const i=this.getValueForString(e),n=parseInt(t,10);if(n<0)throw new s.s.RERR("BadArguments","Fret number must be 0 or higher: "+t);return i+n}getNoteForFret(t,e){const i=this.getValueForFret(t,e),s=Math.floor(i/12),r=i%12;return n.Z.integerToNote(r)+"/"+s}}class Dt extends r.W{static get type(){return{CRESC:1,DECRESC:2}}static FormatByTicksAndDraw(t,e,i,n,r,o){const a=e.pixelsPerTick;if(null==a)throw new s.s.RuntimeError("BadArguments","A valid Formatter must be provide to draw offsets by ticks.");const l=a*o.left_shift_ticks,h=a*o.right_shift_ticks,u={height:o.height,y_shift:o.y_shift,left_shift_px:l,right_shift_px:h};new Dt({first_note:i.first_note,last_note:i.last_note},n).setContext(t).setRenderOptions(u).setPosition(r).draw()}constructor(t,e){super(),this.setAttribute("type","StaveHairpin"),this.notes=t,this.hairpin=e,this.position=w.Modifier.Position.BELOW,this.render_options={height:10,y_shift:0,left_shift_px:0,right_shift_px:0},this.setNotes(t)}setPosition(t){return t!==w.Modifier.Position.ABOVE&&t!==w.Modifier.Position.BELOW||(this.position=t),this}setRenderOptions(t){return null!=t.height&&null!=t.y_shift&&null!=t.left_shift_px&&null!=t.right_shift_px&&(this.render_options=t),this}setNotes(t){if(!t.first_note&&!t.last_note)throw new s.s.RuntimeError("BadArguments","Hairpin needs to have either first_note or last_note set.");return this.first_note=t.first_note,this.last_note=t.last_note,this}renderHairpin(t){const e=this.checkContext();let i=this.render_options.y_shift+20,s=t.first_y;this.position===w.Modifier.Position.ABOVE&&(i=30-i,s=t.first_y-t.staff_height);const n=this.render_options.left_shift_px,r=this.render_options.right_shift_px;switch(e.beginPath(),this.hairpin){case Dt.type.CRESC:e.moveTo(t.last_x+r,s+i),e.lineTo(t.first_x+n,s+this.render_options.height/2+i),e.lineTo(t.last_x+r,s+this.render_options.height+i);break;case Dt.type.DECRESC:e.moveTo(t.first_x+n,s+i),e.lineTo(t.last_x+r,s+this.render_options.height/2+i),e.lineTo(t.first_x+n,s+this.render_options.height+i)}e.stroke(),e.closePath()}draw(){this.checkContext(),this.setRendered();const t=this.first_note,e=this.last_note,i=t.getModifierStartXY(this.position,0),s=e.getModifierStartXY(this.position,0);return this.renderHairpin({first_x:i.x,last_x:s.x,first_y:t.getStave().y+t.getStave().height,last_y:e.getStave().y+e.getStave().height,staff_height:t.getStave().height}),!0}}class Ot extends r.W{static get Position(){return{NEAR_HEAD:1,NEAR_TOP:2}}static get PositionString(){return{nearHead:Ot.Position.NEAR_HEAD,nearTop:Ot.Position.NEAR_TOP}}constructor(t,e,i){super(),this.setAttribute("type","Curve"),this.render_options={spacing:2,thickness:2,x_shift:0,y_shift:10,position:Ot.Position.NEAR_HEAD,position_end:Ot.Position.NEAR_HEAD,invert:!1,cps:[{x:0,y:10},{x:0,y:10}]},s.s.Merge(this.render_options,i),this.setNotes(t,e)}setNotes(t,e){if(!t&&!e)throw new s.s.RuntimeError("BadArguments","Curve needs to have either first_note or last_note set.");return this.from=t,this.to=e,this}isPartial(){return!this.from||!this.to}renderCurve(t){const e=this.context,i=this.render_options.cps,s=this.render_options.x_shift,n=this.render_options.y_shift*t.direction,r=t.first_x+s,o=t.first_y+n,a=t.last_x-s,l=t.last_y+n,h=this.render_options.thickness,u=(a-r)/(i.length+2);e.beginPath(),e.moveTo(r,o),e.bezierCurveTo(r+u+i[0].x,o+i[0].y*t.direction,a-u+i[1].x,l+i[1].y*t.direction,a,l),e.bezierCurveTo(a-u+i[1].x,l+(i[1].y+h)*t.direction,r+u+i[0].x,o+(i[0].y+h)*t.direction,r,o),e.stroke(),e.closePath(),e.fill()}draw(){this.checkContext(),this.setRendered();const t=this.from,e=this.to;let i,s,n,r,o,a="baseY",l="baseY";function h(t){return"string"==typeof t?Ot.PositionString[t]:t}const u=h(this.render_options.position),c=h(this.render_options.position_end);return u===Ot.Position.NEAR_TOP&&(a="topY",l="topY"),c===Ot.Position.NEAR_HEAD?l="baseY":c===Ot.Position.NEAR_TOP&&(l="topY"),t?(i=t.getTieRightX(),o=t.getStemDirection(),n=t.getStemExtents()[a]):(i=e.getStave().getTieStartX(),n=e.getStemExtents()[a]),e?(s=e.getTieLeftX(),o=e.getStemDirection(),r=e.getStemExtents()[l]):(s=t.getStave().getTieEndX(),r=t.getStemExtents()[l]),this.renderCurve({first_x:i,last_x:s,first_y:n,last_y:r,direction:o*(!0===this.render_options.invert?-1:1)}),!0}}function Ft(...t){Vt.DEBUG&&s.s.L("Vex.Flow.TextDynamics",t)}class Vt extends M.j{static get GLYPHS(){return{f:{code:"vba",width:12},p:{code:"vbf",width:14},m:{code:"v62",width:17},s:{code:"v4a",width:10},z:{code:"v80",width:12},r:{code:"vb1",width:12}}}constructor(t){super(t),this.setAttribute("type","TextDynamics"),this.sequence=t.text.toLowerCase(),this.line=t.line||0,this.glyphs=[],s.s.Merge(this.render_options,{glyph_font_size:40}),Ft("New Dynamics Text: ",this.sequence)}setLine(t){return this.line=t,this}preFormat(){let t=0;return this.sequence.split("").forEach((e=>{const i=Vt.GLYPHS[e];if(!i)throw new s.s.RERR("Invalid dynamics character: "+e);const n=this.render_options.glyph_font_size,r=new p.r(i.code,n);this.glyphs.push(r),t+=i.width})),this.setWidth(t),this.preFormatted=!0,this}draw(){this.setRendered();const t=this.getAbsoluteX(),e=this.stave.getYForLine(this.line+-3);Ft("Rendering Dynamics: ",this.sequence);let i=t;this.glyphs.forEach(((t,s)=>{const n=this.sequence[s];t.render(this.context,i,e),i+=Vt.GLYPHS[n].width}))}}function Gt(t,e,i,s,n,r,o){t.beginPath(),t.moveTo(e,i),t.lineTo(s,n),t.lineTo(r,o),t.lineTo(e,i),t.closePath(),t.fill()}class Wt extends r.W{static get TextVerticalPosition(){return{TOP:1,BOTTOM:2}}static get TextJustification(){return{LEFT:1,CENTER:2,RIGHT:3}}constructor(t){super(),this.setAttribute("type","StaveLine"),this.notes=t,this.text="",this.font={family:"Arial",size:10,weight:""},this.render_options={padding_left:4,padding_right:3,line_width:1,line_dash:null,rounded_end:!0,color:null,draw_start_arrow:!1,draw_end_arrow:!1,arrowhead_length:10,arrowhead_angle:Math.PI/8,text_position_vertical:Wt.TextVerticalPosition.TOP,text_justification:Wt.TextJustification.CENTER},this.setNotes(t)}setFont(t){return this.font=t,this}setText(t){return this.text=t,this}setNotes(t){if(!t.first_note&&!t.last_note)throw new s.s.RuntimeError("BadArguments","Notes needs to have either first_note or last_note set.");if(t.first_indices||(t.first_indices=[0]),t.last_indices||(t.last_indices=[0]),t.first_indices.length!==t.last_indices.length)throw new s.s.RuntimeError("BadArguments","Connected notes must have similar index sizes");return this.first_note=t.first_note,this.first_indices=t.first_indices,this.last_note=t.last_note,this.last_indices=t.last_indices,this}applyLineStyle(){const t=this.checkContext(),e=this.render_options;e.line_dash&&t.setLineDash(e.line_dash),e.line_width&&t.setLineWidth(e.line_width),e.rounded_end?t.setLineCap("round"):t.setLineCap("square")}applyFontStyle(){const t=this.checkContext();this.font&&t.setFont(this.font.family,this.font.size,this.font.weight),this.render_options.color&&(t.setStrokeStyle(this.render_options.color),t.setFillStyle(this.render_options.color))}draw(){const t=this.checkContext();this.setRendered();const e=this.first_note,i=this.last_note,s=this.render_options;let r,o;t.save(),this.applyLineStyle(),this.first_indices.forEach(((n,a)=>{const l=this.last_indices[a];r=e.getModifierStartXY(2,n),o=i.getModifierStartXY(1,l);const h=r.y>o.y;r.x+=e.getMetrics().modRightPx+s.padding_left,o.x-=i.getMetrics().modLeftPx+s.padding_right;const u=e.getGlyph().getWidth();e.getKeyProps()[n].displaced&&1===e.getStemDirection()&&(r.x+=u+s.padding_left),i.getKeyProps()[l].displaced&&-1===i.getStemDirection()&&(o.x-=u+s.padding_right),r.y+=h?-3:1,o.y+=h?2:0,function(t,e,i,s){const n=s.draw_start_arrow&&s.draw_end_arrow,r=e.x,o=e.y,a=i.x,l=i.y,h=Math.sqrt((a-r)*(a-r)+(l-o)*(l-o)),u=(h-s.arrowhead_length/3)/h;let c,d,p,f;s.draw_end_arrow||n?(c=Math.round(r+(a-r)*u),d=Math.round(o+(l-o)*u)):(c=a,d=l),s.draw_start_arrow||n?(p=r+(a-r)*(1-u),f=o+(l-o)*(1-u)):(p=r,f=o),s.color&&(t.setStrokeStyle(s.color),t.setFillStyle(s.color)),t.beginPath(),t.moveTo(p,f),t.lineTo(c,d),t.stroke(),t.closePath();const m=Math.atan2(l-o,a-r),g=Math.abs(s.arrowhead_length/Math.cos(s.arrowhead_angle));let b,S,y,v,E,_;(s.draw_end_arrow||n)&&(b=m+Math.PI+s.arrowhead_angle,y=a+Math.cos(b)*g,v=l+Math.sin(b)*g,S=m+Math.PI-s.arrowhead_angle,E=a+Math.cos(S)*g,_=l+Math.sin(S)*g,Gt(t,y,v,a,l,E,_)),(s.draw_start_arrow||n)&&(b=m+s.arrowhead_angle,y=r+Math.cos(b)*g,v=o+Math.sin(b)*g,S=m-s.arrowhead_angle,E=r+Math.cos(S)*g,_=o+Math.sin(S)*g,Gt(t,y,v,r,o,E,_))}(t,r,o,this.render_options)})),t.restore();const a=t.measureText(this.text).width,l=s.text_justification;let h,u=0;l===Wt.TextJustification.LEFT?u=r.x:l===Wt.TextJustification.CENTER?u=(o.x-r.x)/2+r.x-a/2:l===Wt.TextJustification.RIGHT&&(u=o.x-a);const c=s.text_position_vertical;return c===Wt.TextVerticalPosition.TOP?h=e.getStave().getYForTopText():c===Wt.TextVerticalPosition.BOTTOM&&(h=e.getStave().getYForBottomText(n.Z.TEXT_HEIGHT_OFFSET_HACK)),t.save(),this.applyFontStyle(),t.fillText(this.text,u,h),t.restore(),this}}function Ut(t,e,i,s,n){const r=Ht.GLYPHS[t];new p.r(r.code,n).render(e,i+r.x_shift,s+r.y_shift)}class Ht extends r.W{static get GLYPHS(){return{pedal_depress:{code:"v36",x_shift:-10,y_shift:0},pedal_release:{code:"v5d",x_shift:-2,y_shift:3}}}static get Styles(){return{TEXT:1,BRACKET:2,MIXED:3,MIXED_OPEN_END:4,BRACKET_OPEN_BEGIN:5,BRACKET_OPEN_END:6,BRACKET_OPEN_BOTH:7}}static get StylesString(){return{text:Ht.Styles.TEXT,bracket:Ht.Styles.BRACKET,mixed:Ht.Styles.MIXED,mixed_open_end:Ht.Styles.MIXED_OPEN_END,bracket_open_begin:Ht.Styles.BRACKET_OPEN_BEGIN,bracket_open_end:Ht.Styles.BRACKET_OPEN_END,bracket_open_both:Ht.Styles.BRACKET_OPEN_BOTH}}static createSustain(t){return new Ht(t)}static createSostenuto(t){const e=new Ht(t);return e.setStyle(Ht.Styles.MIXED),e.setCustomText("Sost. Ped."),e}static createUnaCorda(t){const e=new Ht(t);return e.setStyle(Ht.Styles.TEXT),e.setCustomText("una corda","tre corda"),e}constructor(t){super(),this.setAttribute("type","PedalMarking"),this.EndsStave=!1,this.ChangeBegin=!1,this.ChangeEnd=!1,this.notes=t,this.style=Ht.TEXT,this.line=0,this.custom_depress_text="",this.custom_release_text="",this.font={family:"Times New Roman",size:12,weight:"italic bold"},this.render_options={bracket_height:10,text_margin_right:6,bracket_line_width:1,glyph_point_size:40,color:"black"}}setEndStave(t){if(this.endStave=t,this.endStaveAddedWidth=0,this.startMargin=0,this.endMargin=0,Array.isArray(this.endStave.modifiers))for(let t=0;t3)throw new s.s.RERR("InvalidParameter","The style must be one found in PedalMarking.Styles");return this.style=t,this}setLine(t){return this.line=t,this}drawBracketed(){const t=this.context;let e,i,s=!1;const n=this;this.notes.forEach(((r,o,a)=>{s=!s;let l=0;if(r?(l=r.getNoteHeadBeginX(),this.BeginsStave&&(l=r.getStave().getNoteStartX())):l=this.endStave.end_x+this.endStaveAddedWidth,this.EndsStave)s?this.ChangeBegin&&(l=r.getAbsoluteX()):(l=r?this.ChangeEnd?r.getAbsoluteX():r.getStave().end_x+this.endStaveAddedWidth-n.render_options.text_margin_right:this.endStave.end_x+this.endStaveAddedWidth-n.render_options.text_margin_right,this.endMargin=-n.render_options.text_margin_right);else if(r)if(s)this.ChangeBegin&&(l=r.getAbsoluteX());else switch(n.style){case Ht.Styles.BRACKET_OPEN_END:case Ht.Styles.BRACKET_OPEN_BOTH:case Ht.Styles.MIXED_OPEN_END:l=r.getNoteHeadEndX();break;default:this.ChangeEnd?l=r.getAbsoluteX():(l=r.getNoteHeadBeginX()-n.render_options.text_margin_right,this.startMargin=-n.render_options.text_margin_right)}let h=this.endStave;r&&(h=r.getStave());let u=h.getYForBottomText(n.line+3);i&&i>u&&(u=i);const c=a[o+1]===r,d=a[o-1]===r;let p=0;if(s)if(p=d?5:0,n.style!==Ht.Styles.MIXED&&n.style!==Ht.Styles.MIXED_OPEN_END||d)t.beginPath(),n.style===Ht.Styles.BRACKET_OPEN_BEGIN||n.style===Ht.Styles.BRACKET_OPEN_BOTH?t.moveTo(l+p,u):(this.ChangeBegin&&(l+=5),t.moveTo(l,u-n.render_options.bracket_height),this.ChangeBegin&&(l+=5),t.lineTo(l+p,u)),t.stroke(),t.closePath();else if(n.custom_depress_text){const e=t.measureText(n.custom_depress_text).width;t.fillText(n.custom_depress_text,l-e/2,u),p=e/2+n.render_options.text_margin_right}else Ut("pedal_depress",t,l,u,n.render_options.glyph_point_size),p=20+n.render_options.text_margin_right;else p=c&&!this.EndsStave?-5:0,t.beginPath(),t.moveTo(e,i),t.lineTo(l+p,u),n.style!==Ht.Styles.BRACKET_OPEN_END&&n.style!==Ht.Styles.MIXED_OPEN_END&&n.style!==Ht.Styles.BRACKET_OPEN_BOTH&&(this.ChangeEnd&&(l+=5),t.lineTo(l,u-n.render_options.bracket_height)),t.stroke(),t.closePath();e=l+p,i=u}))}drawText(){const t=this.context;let e=!1;const i=this,s=i.render_options.glyph_point_size;this.notes.forEach((n=>{if(!n)return;e=!e;const r=n.getStave(),o=n.getAbsoluteX(),a=r.getYForBottomText(i.line+3);let l=0;e?i.custom_depress_text?(l=t.measureText(i.custom_depress_text).width,t.fillText(i.custom_depress_text,o-l/2,a)):Ut("pedal_depress",t,o,a,s):i.custom_release_text?(l=t.measureText(i.custom_release_text).width,t.fillText(i.custom_release_text,o-l/2,a)):Ut("pedal_release",t,o,a,s)}))}draw(){const t=this.checkContext();this.setRendered(),t.save(),t.setStrokeStyle(this.render_options.color),t.setFillStyle(this.render_options.color),t.setFont(this.font.family,this.font.size,this.font.weight),function(...t){Ht.DEBUG&&s.s.L("Vex.Flow.PedalMarking",t)}("Rendering Pedal Marking"),this.style===Ht.Styles.BRACKET||this.style===Ht.Styles.MIXED||this.style===Ht.Styles.MIXED_OPEN_END||this.style===Ht.Styles.BRACKET_OPEN_BEGIN||this.style===Ht.Styles.BRACKET_OPEN_END||this.style===Ht.Styles.BRACKET_OPEN_BOTH?(t.setLineWidth(this.render_options.bracket_line_width),this.drawBracketed()):this.style===Ht.Styles.TEXT&&this.drawText(),t.restore()}}class zt extends r.W{static get Positions(){return{TOP:1,BOTTOM:-1}}static get PositionString(){return{top:zt.Positions.TOP,bottom:zt.Positions.BOTTOM}}constructor({start:t,stop:e,text:i="",superscript:s="",position:n=zt.Positions.TOP}){super(),this.setAttribute("type","TextBracket"),this.start=t,this.stop=e,this.text=i,this.superscript=s,this.position="string"==typeof n?zt.PositionString[n]:n,this.line=1,this.font={family:"Serif",size:15,weight:"italic"},this.render_options={dashed:!0,dash:[5],color:"black",line_width:1,show_bracket:!0,bracket_height:8,underline_superscript:!0}}applyStyle(t){return t.setFont(this.font.family,this.font.size,this.font.weight),t.setStrokeStyle(this.render_options.color),t.setFillStyle(this.render_options.color),t.setLineWidth(this.render_options.line_width),this}setDashed(t,e){return this.render_options.dashed=t,e&&(this.render_options.dash=e),this}setFont(t){return this.font={...this.font,...t},this}setLine(t){return this.line=t,this}draw(){const t=this.context;this.setRendered();let e=0;switch(this.position){case zt.Positions.TOP:e=this.start.getStave().getYForTopText(this.line);break;case zt.Positions.BOTTOM:e=this.start.getStave().getYForBottomText(this.line+n.Z.TEXT_HEIGHT_OFFSET_HACK);break;default:throw new s.s.RERR("InvalidPosition",`The position ${this.position} is invalid`)}const i={x:this.start.getAbsoluteX(),y:e},r={x:this.stop.getAbsoluteX(),y:e};!function(...t){zt.DEBUG&&s.s.L("Vex.Flow.TextBracket",t)}("Rendering TextBracket: start:",i,"stop:",r,"y:",e);const o=this.render_options.bracket_height*this.position;t.save(),this.applyStyle(t),t.fillText(this.text,i.x,i.y);let a=t.measureText(this.text).width;a>0||(a=10*this.text.length);let l=t.measureText("M").width;l>0||(l=20);const h=i.y-l/2.5;t.setFont(this.font.family,this.font.size/1.4,this.font.weight),t.fillText(this.superscript,i.x+a+1,h);let u=t.measureText(this.superscript).width;u>0||(u=12,this.superscript.includes("m")&&(u+=5));let c=t.measureText("M").width;c>0||(c=10);let p=i.x,f=h,m=r.x+this.stop.getGlyph().getWidth();this.position===zt.Positions.TOP?(p+=a+u+5,f-=c/2.7):this.position===zt.Positions.BOTTOM&&(f+=c/2.7,p+=a+2,this.render_options.underline_superscript||(p+=u)),this.render_options.dashed?(m0||!0===e;return!e||n>0||(this.pos=s),o?this.matchSuccess():this.matchFail(s),{success:o,results:i,numMatches:n}}expectZeroOrMore(t){return this.expectOneOrMore(t,!0)}expect(t){let e;if(function(...t){Jt.DEBUG&&s.s.L("Vex.Flow.Parser",t)}("Evaluating rules:",t),!t)throw new $t("Invalid Rule: "+t,t);const i=t.bind(this.grammar)();if(i.token)e=this.matchToken(i.token,!0===i.noSpace),e.success&&(this.pos+=e.incrementPos);else{if(!i.expect)throw new $t("Bad grammar! No `token` or `expect` property",i);e=i.oneOrMore?this.expectOneOrMore(i):i.zeroOrMore?this.expectZeroOrMore(i):this.expectOne(i)}return e.matches=[],e.results&&e.results.forEach((t=>e.matches.push(Zt(t)))),i.run&&e.success&&i.run(e),e}}function Qt(...t){re.DEBUG&&s.s.L("Vex.Flow.EasyScore",t)}const te=s.s.MakeException("EasyScoreError");class ee{constructor(t){this.builder=t}begin(){return this.LINE}LINE(){return{expect:[this.PIECE,this.PIECES,this.EOL]}}PIECE(){return{expect:[this.CHORDORNOTE,this.PARAMS],run:()=>this.builder.commitPiece()}}PIECES(){return{expect:[this.COMMA,this.PIECE],zeroOrMore:!0}}PARAMS(){return{expect:[this.DURATION,this.TYPE,this.DOTS,this.OPTS]}}CHORDORNOTE(){return{expect:[this.CHORD,this.SINGLENOTE],or:!0}}CHORD(){return{expect:[this.LPAREN,this.NOTES,this.RPAREN],run:t=>this.builder.addChord(t.matches[1])}}NOTES(){return{expect:[this.NOTE],oneOrMore:!0}}NOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE]}}SINGLENOTE(){return{expect:[this.NOTENAME,this.ACCIDENTAL,this.OCTAVE],run:t=>this.builder.addSingleNote(t.matches[0],t.matches[1],t.matches[2])}}ACCIDENTAL(){return{expect:[this.ACCIDENTALS],maybe:!0}}DOTS(){return{expect:[this.DOT],zeroOrMore:!0,run:t=>this.builder.setNoteDots(t.matches[0])}}TYPE(){return{expect:[this.SLASH,this.MAYBESLASH,this.TYPES],maybe:!0,run:t=>this.builder.setNoteType(t.matches[2])}}DURATION(){return{expect:[this.SLASH,this.DURATIONS],maybe:!0,run:t=>this.builder.setNoteDuration(t.matches[1])}}OPTS(){return{expect:[this.LBRACKET,this.KEYVAL,this.KEYVALS,this.RBRACKET],maybe:!0}}KEYVALS(){return{expect:[this.COMMA,this.KEYVAL],zeroOrMore:!0}}KEYVAL(){return{expect:[this.KEY,this.EQUALS,this.VAL],run:t=>this.builder.addNoteOption(t.matches[0],t.matches[2].slice(1,-1))}}VAL(){return{expect:[this.SVAL,this.DVAL],or:!0}}KEY(){return{token:"[a-zA-Z][a-zA-Z0-9]*"}}DVAL(){return{token:'["][^"]*["]'}}SVAL(){return{token:"['][^']*[']"}}NOTENAME(){return{token:"[a-gA-G]"}}OCTAVE(){return{token:"[0-9]+"}}ACCIDENTALS(){return{token:"bbs|bb|bss|bs|b|db|d|##|#|n|\\+\\+-|\\+-|\\+\\+|\\+|k|o"}}DURATIONS(){return{token:"[0-9whq]+"}}TYPES(){return{token:"[rRsSxX]"}}LPAREN(){return{token:"[(]"}}RPAREN(){return{token:"[)]"}}COMMA(){return{token:"[,]"}}DOT(){return{token:"[.]"}}SLASH(){return{token:"[/]"}}MAYBESLASH(){return{token:"[/]?"}}EQUALS(){return{token:"[=]"}}LBRACKET(){return{token:"\\["}}RBRACKET(){return{token:"\\]"}}EOL(){return{token:"$"}}}class ie{constructor(t){this.factory=t,this.commitHooks=[],this.reset()}reset(t={}){this.options={stem:"auto",clef:"treble"},this.elements={notes:[],accidentals:[]},this.rollingDuration="8",this.resetPiece(),Object.assign(this.options,t)}getFactory(){return this.factory}getElements(){return this.elements}addCommitHook(t){this.commitHooks.push(t)}resetPiece(){Qt("resetPiece"),this.piece={chord:[],duration:this.rollingDuration,dots:0,type:void 0,options:{}}}setNoteDots(t){Qt("setNoteDots:",t),t&&(this.piece.dots=t.length)}setNoteDuration(t){Qt("setNoteDuration:",t),this.rollingDuration=this.piece.duration=t||this.rollingDuration}setNoteType(t){Qt("setNoteType:",t),t&&(this.piece.type=t)}addNoteOption(t,e){Qt("addNoteOption: key:",t,"value:",e),this.piece.options[t]=e}addNote(t,e,i){Qt("addNote:",t,e,i),this.piece.chord.push({key:t,accid:e,octave:i})}addSingleNote(t,e,i){Qt("addSingleNote:",t,e,i),this.addNote(t,e,i)}addChord(t){Qt("startChord"),"object"!=typeof t[0]?this.addSingleNote(t[0]):t.forEach((t=>{t&&this.addNote(...t)})),Qt("endChord")}commitPiece(){Qt("commitPiece");const{factory:t}=this;if(!t)return;const e={...this.options,...this.piece.options},{stem:i,clef:s}=e,n="auto"===i.toLowerCase(),r=n||"up"!==i.toLowerCase()?x.$.STEM_DOWN:x.$.STEM_UP,{chord:o,duration:a,dots:l,type:h}=this.piece,u=o.map((t=>t.key+"/"+t.octave)),c=t.StaveNote({keys:u,duration:a,dots:l,type:h,clef:s,auto_stem:n});n||c.setStemDirection(r);const d=o.map((t=>t.accid||null));d.forEach(((e,i)=>{e&&c.addAccidental(i,t.Accidental({type:e}))}));for(let t=0;tt(e,c,this))),this.elements.notes.push(c),this.elements.accidentals.concat(d),this.resetPiece()}}function se({id:t},e){void 0!==t&&e.setAttribute("id",t)}function ne(t,e){t.class&&t.class.split(/\s*,\s*/).forEach((t=>e.addClass(t)))}class re{constructor(t={}){this.setOptions(t),this.defaults={clef:"treble",time:"4/4",stem:"auto"}}set(t){return Object.assign(this.defaults,t),this}setOptions(t){return this.options={factory:null,builder:null,commitHooks:[se,ne,Y.easyScoreHook],throwOnError:!1,...t},this.factory=this.options.factory,this.builder=this.options.builder||new ie(this.factory),this.grammar=new ee(this.builder),this.parser=new Jt(this.grammar),this.options.commitHooks.forEach((t=>this.addCommitHook(t))),this}setContext(t){return this.factory&&this.factory.setContext(t),this}parse(t,e={}){this.builder.reset(e);const i=this.parser.parse(t);if(!i.success&&this.options.throwOnError)throw new te("Error parsing line: "+t,i);return i}beam(t,e={}){return this.factory.Beam({notes:t,options:e}),t}tuplet(t,e={}){return this.factory.Tuplet({notes:t,options:e}),t}notes(t,e={}){return e={clef:this.defaults.clef,stem:this.defaults.stem,...e},this.parse(t,e),this.builder.getElements().notes}voice(t,e){return e={time:this.defaults.time,...e},this.factory.Voice(e).addTickables(t)}addCommitHook(t){return this.builder.addCommitHook(t)}}var oe=i(3544);const ae=s.s.MakeException("FactoryError");function le(t={},e){const i=e.options;return(t=Object.assign(e,t)).options=Object.assign(i,t.options),t}class he{constructor(t){!function(...t){he.DEBUG&&s.s.L("Vex.Flow.Factory",t)}("New factory: ",t);const e={stave:{space:10},renderer:{context:null,elementId:"",backend:d.Backends.SVG,width:500,height:200,background:"#FFF"},font:{face:"Arial",point:10,style:""}};this.options=e,this.setOptions(t)}static newFromElementId(t,e=500,i=200){return new he({renderer:{elementId:t,width:e,height:i}})}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=null}getOptions(){return this.options}setOptions(t){for(const e of["stave","renderer","font"])Object.assign(this.options[e],t[e]);(null!==this.options.renderer.elementId||this.options.renderer.context)&&this.initRenderer(),this.reset()}initRenderer(){const{elementId:t,backend:e,width:i,height:s,background:n}=this.options.renderer;if(""===t)throw new ae("HTML DOM element not set in Factory");this.context=d.buildContext(t,e,i,s,n)}getContext(){return this.context}setContext(t){return this.context=t,this}getStave(){return this.stave}getVoices(){return this.voices}space(t){return this.options.stave.space*t}Stave(t){t=le(t,{x:0,y:0,width:this.options.renderer.width-this.space(1),options:{spacing_between_lines_px:this.options.stave.space}});const e=new vt(t.x,t.y,t.width,t.options);return this.staves.push(e),e.setContext(this.context),this.stave=e,e}TabStave(t){t=le(t,{x:0,y:0,width:this.options.renderer.width-this.space(1),options:{spacing_between_lines_px:1.3*this.options.stave.space}});const e=new Et(t.x,t.y,t.width,t.options);return this.staves.push(e),e.setContext(this.context),this.stave=e,e}StaveNote(t){const e=new x.$(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}GhostNote(t){const e=new Xt(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}TextNote(t){const e=new ht(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}NumberedNote(t){const e=new oe.NumberedNote(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}BarNote(t){t=le(t,{type:"single",options:{}});const e=new jt(t.type);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}ClefNote(t){t=le(t,{type:"treble",options:{size:"default"}});const e=new Lt(t.type,t.options.size,t.options.annotation);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}TimeSigNote(t){t=le(t,{time:"4/4",options:{}});const e=new Ct(t.time);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}KeySigNote(t){const e=new At(t.key,t.cancelKey,t.alterKey);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}TabNote(t){const e=new xt(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}GraceNote(t){const e=new Nt(t);return this.stave&&e.setStave(this.stave),e.setContext(this.context),e}GraceNoteGroup(t){const e=new B(t.notes,t.slur);return e.setContext(this.context),e}Accidental(t){t=le(t,{type:null,options:{}});const e=new C(t.type);return e.setContext(this.context),e}Annotation(t){t=le(t,{text:"p",vJustify:"below",hJustify:"center",fontFamily:"Times",fontSize:14,fontWeight:"bold italic",options:{}});const e=new q(t.text);return e.setJustification(t.hJustify),e.setVerticalJustification(t.vJustify),e.setFont(t.fontFamily,t.fontSize,t.fontWeight),e.setContext(this.context),e}Articulation(t){t=le(t,{type:"a.",position:"above",options:{}});const e=new Y(t.type);return e.setPosition(t.position),e.setContext(this.context),e}TextDynamics(t){t=le(t,{text:"p",duration:"q",dots:0,line:0,options:{}});const e=new Vt({text:t.text,line:t.line,duration:t.duration,dots:t.dots});return this.stave&&e.setStave(this.stave),e.setContext(this.context),this.renderQ.push(e),e}Fingering(t){t=le(t,{number:"0",position:"left",options:{}});const e=new T(t.number);return e.setPosition(t.position),e.setContext(this.context),e}StringNumber(t){t=le(t,{number:"0",position:"left",options:{}});const e=new O(t.number);return e.setPosition(t.position),e.setContext(this.context),e}TickContext(){return(new V).setContext(this.context)}ModifierContext(){return new Q}MultiMeasureRest(t){const e=new It(t.number_of_measures,t);return e.setContext(this.context),this.renderQ.push(e),e}Voice(t){t=le(t,{time:"4/4",options:{}});const e=new v(t.time);return this.voices.push(e),e}StaveConnector(t){t=le(t,{top_stave:null,bottom_stave:null,type:"double",options:{}});const e=new _(t.top_stave,t.bottom_stave);return e.setType(t.type).setContext(this.context),this.renderQ.push(e),e}Formatter(){return new st}Tuplet(t){t=le(t,{notes:[],options:{}});const e=new m(t.notes,t.options).setContext(this.context);return this.renderQ.push(e),e}Beam(t){t=le(t,{notes:[],options:{autoStem:!1,secondaryBeamBreaks:[]}});const e=new y(t.notes,t.options.autoStem).setContext(this.context);return e.breakSecondaryAt(t.options.secondaryBeamBreaks),this.renderQ.push(e),e}Curve(t){t=le(t,{from:null,to:null,options:{}});const e=new Ot(t.from,t.to,t.options).setContext(this.context);return this.renderQ.push(e),e}StaveTie(t){t=le(t,{from:null,to:null,first_indices:[0],last_indices:[0],text:null,options:{direction:void 0}});const e=new N({first_note:t.from,last_note:t.to,first_indices:t.first_indices,last_indices:t.last_indices},t.text);return t.options.direction&&e.setDirection(t.options.direction),e.setContext(this.context),this.renderQ.push(e),e}StaveLine(t){t=le(t,{from:null,to:null,first_indices:[0],last_indices:[0],options:{}});const e=new Wt({first_note:t.from,last_note:t.to,first_indices:t.first_indices,last_indices:t.last_indices});return t.options.text&&e.setText(t.options.text),t.options.font&&e.setFont(t.options.font),e.setContext(this.context),this.renderQ.push(e),e}VibratoBracket(t){t=le(t,{from:null,to:null,options:{harsh:!1}});const e=new Mt({start:t.from,stop:t.to});return t.options.line&&e.setLine(t.options.line),t.options.harsh&&e.setHarsh(t.options.harsh),e.setContext(this.context),this.renderQ.push(e),e}TextBracket(t){t=le(t,{from:null,to:null,text:"",options:{superscript:"",position:1}});const e=new zt({start:t.from,stop:t.to,text:t.text,superscript:t.options.superscript,position:t.options.position});return t.options.line&&e.setLine(t.options.line),t.options.font&&e.setFont(t.options.font),e.setContext(this.context),this.renderQ.push(e),e}System(t={}){t.factory=this;const e=new ce(t).setContext(this.context);return this.systems.push(e),e}EasyScore(t={}){return t.factory=this,new re(t)}PedalMarking(t={}){t=le(t,{notes:[],options:{style:"mixed"}});const e=new Ht(t.notes);return e.setStyle(Ht.StylesString[t.options.style]),e.setContext(this.context),this.renderQ.push(e),e}NoteSubGroup(t={}){t=le(t,{notes:[],options:{}});const e=new R(t.notes);return e.setContext(this.context),e}draw(){this.systems.forEach((t=>t.setContext(this.context).format())),this.staves.forEach((t=>t.setContext(this.context).draw())),this.voices.forEach((t=>t.setContext(this.context).draw())),this.renderQ.forEach((t=>{t.isRendered()||t.setContext(this.context).draw()})),this.systems.forEach((t=>t.setContext(this.context).draw())),this.reset()}}function ue(t,e){const i=e.options;return(t=Object.assign(e,t)).options=Object.assign(i,t.options),t}class ce extends r.W{constructor(t={}){super(),this.setAttribute("type","System"),this.setOptions(t),this.parts=[]}setOptions(t={}){this.options=ue(t,{x:10,y:10,width:500,connector:null,spaceBetweenStaves:12,factory:null,debugFormatter:!1,formatIterations:0,options:{}}),this.factory=this.options.factory||new he({renderer:{el:null}})}setContext(t){return super.setContext(t),this.factory.setContext(t),this}addConnector(t="double"){return this.connector=this.factory.StaveConnector({top_stave:this.parts[0].stave,bottom_stave:this.parts[this.parts.length-1].stave,type:t}),this.connector}addStave(t){return(t=ue(t,{stave:null,voices:[],spaceAbove:0,spaceBelow:0,debugNoteMetrics:!1,options:{left_bar:!1}})).stave||(t.stave=this.factory.Stave({x:this.options.x,y:this.options.y,width:this.options.width,options:t.options})),t.voices.forEach((e=>e.setContext(this.context).setStave(t.stave).getTickables().forEach((e=>e.setStave(t.stave))))),this.parts.push(t),t.stave}format(){const t=new st;this.formatter=t;let e=this.options.y,i=0,s=[];const n=[];this.parts.forEach((r=>{e+=r.stave.space(r.spaceAbove),r.stave.setY(e),t.joinVoices(r.voices),e+=r.stave.space(r.spaceBelow),e+=r.stave.space(this.options.spaceBetweenStaves),r.debugNoteMetrics&&(n.push({y:e,voice:r.voices[0]}),e+=15),s=s.concat(r.voices),i=Math.max(i,r.stave.getNoteStartX())})),this.parts.forEach((t=>t.stave.setNoteStartX(i)));const r=this.options.width-(i-this.options.x)-M.j.STAVEPADDING;t.format(s,r);for(let e=0;e{e.voice.getTickables().forEach((i=>M.j.plotMetrics(t,i,e.y)))}))}}var de=i(8194);s.s.Flow=n.Z,s.s.Flow.Element=r.W,s.s.Flow.Fraction=o.i,s.s.Flow.Renderer=d,s.s.Flow.Formatter=st,s.s.Flow.Music=I,s.s.Flow.Glyph=p.r,s.s.Flow.Stave=vt,s.s.Flow.StaveNote=x.$,s.s.Flow.StaveModifier=nt,s.s.Flow.StaveTempo=lt,s.s.Flow.Voice=v,s.s.Flow.Accidental=C,s.s.Flow.Beam=y,s.s.Flow.StaveTie=N,s.s.Flow.TabStave=Et,s.s.Flow.TabNote=xt,s.s.Flow.Bend=$,s.s.Flow.Vibrato=Z,s.s.Flow.VibratoBracket=Mt,s.s.Flow.Note=M.j,s.s.Flow.ModifierContext=Q,s.s.Flow.MultiMeasureRest=It,s.s.Flow.TickContext=V,s.s.Flow.Articulation=Y,s.s.Flow.Annotation=q,s.s.Flow.Barline=rt,s.s.Flow.NoteHead=Pt.i,s.s.Flow.StaveConnector=_,s.s.Flow.ClefNote=Lt,s.s.Flow.KeySignature=pt,s.s.Flow.KeySigNote=At,s.s.Flow.TimeSignature=ft,s.s.Flow.TimeSigNote=Ct,s.s.Flow.Stem=f.r,s.s.Flow.TabTie=k,s.s.Flow.Clef=dt,s.s.Flow.Dot=P.o,s.s.Flow.Modifier=w.Modifier,s.s.Flow.TabSlide=Rt,s.s.Flow.Tuplet=m,s.s.Flow.GraceNote=Nt,s.s.Flow.GraceTabNote=kt,s.s.Flow.Tuning=Bt,s.s.Flow.KeyManager=class{constructor(t){this.music=new I,this.setKey(t)}setKey(t){return this.key=t,this.reset(),this}getKey(){return this.key}reset(){if(this.keyParts=this.music.getKeyParts(this.key),this.keyString=this.keyParts.root,this.keyParts.accidental&&(this.keyString+=this.keyParts.accidental),!I.scaleTypes[this.keyParts.type])throw new s.s.RERR("BadArguments",`Unsupported key type: ${this.key}`);this.scale=this.music.getScaleTones(this.music.getNoteValue(this.keyString),I.scaleTypes[this.keyParts.type]),this.scaleMap={},this.scaleMapByValue={},this.originalScaleMapByValue={};const t=I.root_indices[this.keyParts.root];for(let e=0;e{"use strict";i.d(e,{Modifier:()=>r});var s=i(4552),n=i(2088);class r extends n.W{static get CATEGORY(){return"none"}static get Position(){return{LEFT:1,RIGHT:2,ABOVE:3,BELOW:4}}static get PositionString(){return{above:r.Position.ABOVE,below:r.Position.BELOW,left:r.Position.LEFT,right:r.Position.RIGHT}}constructor(){super(),this.setAttribute("type","Modifier"),this.width=0,this.note=null,this.index=null,this.text_line=0,this.position=r.Position.LEFT,this.modifier_context=null,this.x_shift=0,this.y_shift=0,this.spacingFromNextModifier=0}getCategory(){return r.CATEGORY}getWidth(){return this.width}setWidth(t){return this.width=t,this}getNote(){return this.note}setNote(t){return this.note=t,this}getIndex(){return this.index}setIndex(t){return this.index=t,this}getModifierContext(){return this.modifier_context}setModifierContext(t){return this.modifier_context=t,this}getPosition(){return this.position}setPosition(t){return this.position="string"==typeof t?r.PositionString[t]:t,this}setTextLine(t){return this.text_line=t,this}setYShift(t){return this.y_shift=t,this}setSpacingFromNextModifier(t){this.spacingFromNextModifier=t}getSpacingFromNextModifier(){return this.spacingFromNextModifier}setXShift(t){this.x_shift=0,this.position===r.Position.LEFT?this.x_shift-=t:this.x_shift+=t}getXShift(){return this.x_shift}draw(){throw this.checkContext(),new s.s.RERR("MethodNotImplemented","draw() not implemented for this modifier.")}alignSubNotesWithNote(t,e){const i=e.getTickContext(),s=i.getExtraPx(),n=i.getX()-s.left-s.extraLeft+this.getSpacingFromNextModifier();t.forEach((t=>{const i=t.getTickContext();t.setStave(e.stave),i.setXOffset(n)}))}}},4699:(t,e,i)=>{"use strict";i.d(e,{j:()=>o});var s=i(4552),n=i(8179),r=i(6619);class o extends r.W{static get CATEGORY(){return"note"}static get STAVEPADDING(){return 12}static plotMetrics(t,e,i){const n=e.getMetrics(),r=e.getAbsoluteX()-n.modLeftPx-n.extraLeftPx,o=e.getAbsoluteX()-n.extraLeftPx,a=e.getAbsoluteX(),l=e.getAbsoluteX()+n.noteWidth,h=e.getAbsoluteX()+n.noteWidth+n.extraRightPx,u=e.getAbsoluteX()+n.noteWidth+n.extraRightPx+n.modRightPx,c=u+e.getFormatterMetrics().freedom.right,d=u-r;t.save(),t.setFont("Arial",8,""),t.fillText(Math.round(d)+"px",r+e.getXShift(),i);const p=i+7;function f(i,s,n,r=p){t.beginPath(),t.setStrokeStyle(n),t.setFillStyle(n),t.setLineWidth(3),t.moveTo(i+e.getXShift(),r),t.lineTo(s+e.getXShift(),r),t.stroke()}f(r,o,"red"),f(o,a,"#999"),f(a,l,"green"),f(l,h,"#999"),f(h,u,"red"),f(u,c,"#DD0"),f(r-e.getXShift(),r,"#BBB"),s.s.drawDot(t,a+e.getXShift(),p,"blue");const m=e.getFormatterMetrics();if(m.iterations>0){const s=m.space.deviation,n=s>=0?"+":"";t.setFillStyle("red"),t.fillText(n+Math.round(s),a+e.getXShift(),i-10)}t.restore()}constructor(t){if(super(),this.setAttribute("type","Note"),!t)throw new s.s.RuntimeError("BadArguments","Note must have valid initialization data to identify duration and type.");const e=n.Z.parseNoteStruct(t);if(!e)throw new s.s.RuntimeError("BadArguments",`Invalid note initialization object: ${JSON.stringify(t)}`);if(this.duration=e.duration,this.dots=e.dots,this.noteType=e.type,this.customTypes=e.customTypes,this.DYMusicScoreType=t.DYMusicScoreType,t.duration_override?this.setDuration(t.duration_override):this.setIntrinsicTicks(e.ticks),this.modifiers=[],this.glyph=n.Z.getGlyphProps(this.duration,this.noteType),this.customGlyphs=this.customTypes.map((t=>n.Z.getGlyphProps(this.duration,t))),this.positions&&("object"!=typeof this.positions||!this.positions.length))throw new s.s.RuntimeError("BadArguments","Note keys must be array type.");this.playNote=null,this.tickContext=null,this.modifierContext=null,this.ignore_ticks=!1,this.width=0,this.extraLeftPx=0,this.extraRightPx=0,this.x_shift=0,this.left_modPx=0,this.right_modPx=0,this.voice=null,this.preFormatted=!1,this.ys=[],t.align_center&&this.setCenterAlignment(t.align_center),this.stave=null,this.render_options={annotation_spacing:5,stave_padding:o.STAVEPADDING}}getPlayNote(){return this.playNote}setPlayNote(t){return this.playNote=t,this}isRest(){return!1}addStroke(t,e){return e.setNote(this),e.setIndex(t),this.modifiers.push(e),this.setPreFormatted(!1),this}getStave(){return this.stave}setStave(t){return this.stave=t,this.setYs([t.getYForLine(0)]),this.context=this.stave.context,this}getCategory(){return o.CATEGORY}setContext(t){return this.context=t,this}getExtraLeftPx(){return this.extraLeftPx}getExtraRightPx(){return this.extraRightPx}setExtraLeftPx(t){return this.extraLeftPx=t,this}setExtraRightPx(t){return this.extraRightPx=t,this}shouldIgnoreTicks(){return this.ignore_ticks}getLineNumber(){return 0}getLineForRest(){return 0}getGlyph(){return this.glyph}getGlyphWidth(){return this.glyph.getWidth?this.glyph.getWidth(this.render_options.glyph_font_scale):15}setYs(t){return this.ys=t,this}getYs(){if(0===this.ys.length)throw new s.s.RERR("NoYValues","No Y-values calculated for this note.");return this.ys}getYForTopText(t){if(!this.stave)throw new s.s.RERR("NoStave","No stave attached to this note.");return this.stave.getYForTopText(t)}getBoundingBox(){return null}getVoice(){if(!this.voice)throw new s.s.RERR("NoVoice","Note has no voice.");return this.voice}setVoice(t){return this.voice=t,this.preFormatted=!1,this}getTickContext(){return this.tickContext}setTickContext(t){return this.tickContext=t,this.preFormatted=!1,this}getDuration(){return this.duration}isDotted(){return this.dots>0}hasStem(){return!1}getDots(){return this.dots}getNoteType(){return this.noteType}setBeam(){return this}setModifierContext(t){return this.modifierContext=t,this}addModifier(t,e=0){return t.setNote(this),t.setIndex(e),this.modifiers.push(t),this.setPreFormatted(!1),this}getModifierStartXY(){if(!this.preFormatted)throw new s.s.RERR("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");return{x:this.getAbsoluteX(),y:this.ys[0]}}getMetrics(){if(!this.preFormatted)throw new s.s.RERR("UnformattedNote","Can't call getMetrics on an unformatted note.");let t=0,e=0;null!=this.modifierContext&&(t=this.modifierContext.state.left_shift,e=this.modifierContext.state.right_shift);const i=this.getWidth();return{width:i,noteWidth:i-t-e-this.extraLeftPx-this.extraRightPx,left_shift:this.x_shift,modLeftPx:t,modRightPx:e,extraLeftPx:this.extraLeftPx,extraRightPx:this.extraRightPx}}setWidth(t){this.width=t}getWidth(){if(!this.preFormatted)throw new s.s.RERR("UnformattedNote","Can't call GetWidth on an unformatted note.");return this.width+(this.modifierContext?this.modifierContext.getWidth():0)}setXShift(t){return this.x_shift=t,this}getXShift(){return this.x_shift}getX(){if(!this.tickContext)throw new s.s.RERR("NoTickContext","Note needs a TickContext assigned for an X-Value");return this.tickContext.getX()+this.x_shift}getAbsoluteX(){if(!this.tickContext)throw new s.s.RERR("NoTickContext","Note needs a TickContext assigned for an X-Value");let t=this.tickContext.getX();return this.stave&&(t+=this.stave.getNoteStartX()+this.render_options.stave_padding),this.isCenterAligned()&&("jianpu"===this.DYMusicScoreType||(t+=this.getCenterXShift())),t}setPreFormatted(t){if(this.preFormatted=t,this.preFormatted){const t=this.tickContext.getExtraPx();this.left_modPx=Math.max(this.left_modPx,t.left),this.right_modPx=Math.max(this.right_modPx,t.right)}}}},9723:(t,e,i)=>{"use strict";i.d(e,{i:()=>h});var s=i(4552),n=i(8179),r=i(4699),o=i(1140),a=i(8391),l=i(2306);class h extends r.j{static get CATEGORY(){return"notehead"}constructor(t){if(super(t),this.setAttribute("type","NoteHead"),this.index=t.index,this.x_shift=t.x_shift||0,this.x=(t.x||0)+this.x_shift,this.y=t.y||0,this.note_type=t.note_type,this.duration=t.duration,this.displaced=t.displaced||!1,this.stem_direction=t.stem_direction||a.$.STEM_UP,this.line=t.line,this.glyph=n.Z.getGlyphProps(this.duration,this.note_type),!this.glyph)throw new s.s.RuntimeError("BadArguments",`No glyph found for duration '${this.duration}' and type '${this.note_type}'`);this.glyph_code=this.glyph.code_head,this.x_shift_ledger_rest=0,this.y_shift_ledger_rest=0,this.x_shift=t.x_shift||0,this.glyph.rest&&(this.line>5||this.line<0)&&(this.isLedgerLinedRest=!0,"h"===this.duration?(t.custom_glyph_code="rhl",this.x_shift_ledger_rest-=4):"w"===this.duration&&(t.custom_glyph_code="rwl",this.x_shift_ledger_rest-=4,this.y_shift_ledger_rest=-5)),t.custom_glyph_code&&(this.custom_glyph=!0,this.glyph_code=t.custom_glyph_code,this.stem_up_x_offset=t.stem_up_x_offset||0,this.stem_down_x_offset=t.stem_down_x_offset||0,this.stem_up_y_shift=t.stem_up_y_shift||0,this.stem_down_y_shift=t.stem_down_y_shift||0),this.style=t.style,this.slashed=t.slashed,s.s.Merge(this.render_options,{glyph_font_scale:t.glyph_font_scale||n.Z.DEFAULT_NOTATION_FONT_SCALE,stroke_px:3}),this.setWidth(this.glyph.getWidth(this.render_options.glyph_font_scale))}getCategory(){return h.CATEGORY}getWidth(){return this.width}isDisplaced(){return!0===this.displaced}getGlyph(){return this.glyph}setX(t){return this.x=t,this}getY(){return this.y}setY(t){return this.y=t,this}getLine(){return this.line}setLine(t){return this.line=t,this}getAbsoluteX(){const t=this.preFormatted?super.getAbsoluteX():this.x,e=o.r.WIDTH/2;return t+(this.displaced?(this.width-e)*this.stem_direction:0)}getBoundingBox(){if(!this.preFormatted)throw new s.s.RERR("UnformattedNote","Can't call getBoundingBox on an unformatted note.");const t=this.stave.getSpacingBetweenLines(),e=t/2,i=this.y-e;return new n.Z.BoundingBox(this.getAbsoluteX(),i,this.width,t)}setStave(t){const e=this.getLine();return this.stave=t,this.setY(t.getYForNote(e)),this.context=this.stave.context,this}preFormat(){if(this.preFormatted)return this;const t=this.getWidth()+this.extraLeftPx+this.extraRightPx;return this.setWidth(t),this.setPreFormatted(!0),this}draw(){this.checkContext(),this.setRendered();const t=this.context;let e=this.getAbsoluteX(),i=this.y;this.custom_glyph&&(e+=this.x_shift_ledger_rest,this.stem_direction===o.r.UP?(e+=this.stem_up_x_offset,i+=this.stem_up_y_shift||0):this.stem_direction===o.r.DOWN&&(e+=this.stem_down_x_offset,i+=this.stem_down_y_shift||0),i+=this.y_shift_ledger_rest),function(...t){h.DEBUG&&s.s.L("Vex.Flow.NoteHead",t)}("Drawing note head '",this.note_type,this.duration,"' at",e,i);const r=this.stem_direction,a=this.render_options.glyph_font_scale;if(this.style&&this.applyStyle(t),"s"===this.note_type){const s=this.stave.getSpacingBetweenLines();!function(t,e,i,s,r,o){const a=n.Z.SLASH_NOTEHEAD_WIDTH;t.save(),t.setLineWidth(n.Z.STEM_WIDTH);let l=!1;if(n.Z.durationToNumber(e)>2&&(l=!0),l||(i-=n.Z.STEM_WIDTH/2*r),t.beginPath(),t.moveTo(i,s+o),t.lineTo(i,s+1),t.lineTo(i+a,s-o),t.lineTo(i+a,s),t.lineTo(i,s+o),t.closePath(),l?t.fill():t.stroke(),n.Z.durationToFraction(e).equals(.5)){const e=[-3,-1,a+1,a+3];for(let n=0;n{"use strict";i.r(e),i.d(e,{NumberedNote:()=>f});var s=i(4552),n=i(8391),r=i(8179),o=i(4184),a=i(2306);let l=null,h="C",u={notes:[],finish:!1,total:0,staveId:""},c="",d="",p="";class f extends n.${static get CATEGORY(){return"numberednotes"}static accidentalAndKey(t){switch(t){case"G":return{4:"#"};case"D":return{1:"#",4:"#"};case"A":return{1:"#",4:"#",5:"#"};case"E":return{1:"#",2:"#",4:"#",5:"#"};case"B":return{1:"#",2:"#",4:"#",5:"#",6:"#"};case"F#":return{1:"#",2:"#",3:"#",4:"#",5:"#",6:"#"};case"C#":return{1:"#",2:"#",3:"#",4:"#",5:"#",6:"#",7:"#"};case"F":return{7:"b"};case"Bb":return{7:"b",3:"b"};case"Eb":return{7:"b",3:"b",6:"b"};case"Ab":return{7:"b",2:"b",3:"b",6:"b"};case"Db":return{7:"b",2:"b",3:"b",5:"b",6:"b"};case"Gb":return{7:"b",1:"b",2:"b",3:"b",5:"b",6:"b"};case"Cb":return{7:"b",1:"b",2:"b",3:"b",4:"b",5:"b",6:"b"};default:return{}}}static accidentalMap(t){switch(t){case"C":return"";case"F":case"Bb":case"Eb":case"Ab":case"Db":case"Gb":case"Cb":return{bb:"b",b:"",n:"#","#":"##"};default:return{b:"bb",n:"b","#":"","##":"#"}}}static get noteLift(){switch(h){case"G":return["7"];case"D":return["7","3"];case"A":return["7","3","6"];case"E":return["2","6","3","7"];case"B":return["5","2","6","3","7"];case"F#":return["1","5","2","6","3","7"];case"C#":return["4","1","5","2","6","3","7"];case"F":return["4"];case"Bb":return["1","4"];case"Eb":return["5","1","4"];case"Ab":return["2","5","1","4"];case"Db":return["6","2","5","1","4"];case"Gb":return["3","6","2","5","1","4"];case"Cb":return["7","3","6","2","5","1","4"]}}static get longDurationLine(){return{1:3,2:1,6:2}}static get numberedDurationLine(){return{8:1,16:2,32:3,64:4,128:5}}static get durationTime(){return{8:6144,4:4096}}constructor(t){super(t),this.setAttribute("type","NumberedNote"),h=t.keyString,this.ornament=!!t.ornament,this.line=0,this.keys=t.keys||[],this.fontSize=20,this.offset_x=0,this.offset_y=0,this.note_tones=[],this.duration_lines=0,this.long_duration_lines=0,this.note_size=t.note_size||16;const e=r.Z.sanitizeDuration(this.duration);var i=f.numberedDurationLine[e.toString()];if(i&&(this.duration_lines=i),(i=f.longDurationLine[e.toString()])&&(this.long_duration_lines=i),!l){var s="__$text_wraper$$__";let t=document.createElement("canvas");t.id=s,document.body.append(t);const e=document.getElementById(s),i=e.getContext("2d");i.font="Arial 22px";var n=i.measureText("5");l=n.width+2,document.body.removeChild(e)}}getCategory(){return f.CATEGORY}setKeySignature(t){this.keySignature=t}preFormat(){this.preFormatted||(this.modifierContext&&this.modifierContext.preFormat(),this.setWidth(this.full_width),this.setPreFormatted(!0))}filterNote(){if(window&&window.sett&&window.sett.keySignature)return;if(!this.keys||!this.keys.length)return;const t=f.accidentalMap(h);if(!t)return;const e=f.noteLift;if(!e)return;var i=this.keys[0].split("/")[0];"b"===i&&(i="R"),(i=(i=i.replace(new RegExp("#","g"),"")).replace(new RegExp("n","g"),"")).length>1&&(i=i.replace(new RegExp("b","g"),""));const s=g.numberedNotationMapping[i.toUpperCase()];if(e.includes(s))for(let e=0;e{let n=!1;switch(i.getAttribute("type")){case"Accidental":i.render_options.font_scale=1.4*this.note_width,i.x_shift=2,i.y_shift=this.unit_height/2,n=!0,this.ornament&&(i.render_options.font_scale=this.note_width,i.x_shift=14,i.y_shift=-10);break;case"Stroke":i.x_shift=-1*t,i.y_shift=1*this.unit_height,n=!0;break;case"Dot":i.x_shift=e*this.duration_dot_width+7,i.y_shift=1*this.unit_height,e++;break;case"Ornament":i.y_shift=-3;break;default:i.y_shift=1*this.unit_height}i.reset&&i.reset(),t+=i.getWidth()/2}))}handleDeleteDot(){for(let t=0;tt)),i=e.length?e[0]/e[1]:0;if(this.ornament)return;if(0===i)return this.long_duration_lines=this.intrinsicTicks/t-1,this.long_duration_lines>=d&&(this.long_duration_lines=d-1),8==c&&(this.long_duration_lines=0,3==d&&this.draw_dot(this.context,this.bottom_x+25,this.bottom_y-30,this.dot_width),6==d)&&(this.draw_dot(this.context,this.bottom_x+25,this.bottom_y-30,this.dot_width),new a.r("v0",40).render(this.context,this.bottom_x+40,this.top_y),this.draw_dot(this.context,this.bottom_x+65,this.bottom_y-30,this.dot_width)),u={notes:[],finish:!1,total:0,staveId:""};let s={lines:this.duration_lines,duration:i,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,y:this.y,width:this.full_width};i>2*t&&(this.long_duration_lines=parseInt(i/t)-1,this.handleDeleteDot()),p&&(s.x+=this.note_width),u.notes.push(s);let n=u.notes.reduce(((t,e)=>t+e.duration),0);if(n=parseInt(n),n>t&&(n-=t),n>t-10&&n0===t.lines));t.length&&(this.drawDurationLoneLine(),u={notes:[],finish:!1,total:0,staveId:""})}}draw(){if(this.checkContext(),!this.stave)throw new s.s.RERR("NoStave","Can't draw without a stave.");let t=this.context;t.save(),t.setFont("Arial",this.note_height,"normal"),this.setAttribute("el",t.openGroup("stavenote",this.getAttribute("id"))),t.openGroup("note",null,{pointerBBox:!0});let e=this.getAbsoluteX()+2.5;this.x=e;let i=this.stave.getYForLine(2)+this.note_height/2;this.y=i,this.buildToneHeads(),this.preFormatModifier(),this.applyStyle(),this.note_tones.forEach((e=>{e?.key.includes("X2")?e.draw(t,"isX"):e.draw(t)})),t.openGroup("modifier",null,{pointerBBox:!0}),this.drawModifiers(),t.closeGroup(),t.closeGroup(),t.closeGroup(),this.calcGroup(),u.staveId=this.stave.attrs.id,this.drawDurationLine(t,{}),this.drawLongDurationLines(t),this.restoreStyle(),this.setRendered(),p=this.ornament?p?Object.assign(p,{lines:this.duration_lines,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,width:this.full_width}):{lines:this.duration_lines,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,width:this.full_width}:""}drawDurationLoneLine(t,e){t=t||this.context;let i=e||this.y+this.duration_line_space;for(let e=0;e<5;e++){let s=[],n=0;for(let r=0;re)s.push(o),n++;else{if(s.length>1){let n=s.length-1;i=s[0].y+this.duration_line_space,t.rect(s[0].x,i+3*e,s[n].x-s[0].x+s[n].width,.5)}s=[],n=r+1}}if(s.length>1){let n=s.length-1;i=s[0].y+this.duration_line_space,t.rect(s[0].x,i+3*e,s[n].x-s[0].x+s[n].width,.5)}}}draw_dot(t,e,i,s){t.openGroup("numbered-note-dot"),t.beginPath(),t.arc(e,i,s,0,2*Math.PI),t.closePath(),t.fill(),t.closeGroup()}drawDurationLine(t,e){var i,s,n=this.attrs.id+"-lines";if(t.openGroup("numbered_note_lines",n),this.duration_lines>0){const n=this.duration_line_space;var r=this.full_width;if(e&&e.width&&(r=e.width),r<0&&(r=this.note_width),i=e&&void 0!==e.startX?e.startX:this.x-n/2-this.left_width,s=e&&void 0!==e.startY?e.startY:this.y+this.duration_line_space,u.finish&&(this.drawDurationLoneLine(t,s),u={notes:[],finish:!1,total:0,staveId:""}),this.ornament?(i+=12,s-=22,r=15,p&&(i-=10,r+=10)):p&&(i+=this.note_width,r-=this.note_width),r>0){for(var o=0;o"Dot"===t.getAttribute("type"))),s=this.modifiers.findIndex((t=>"Accidental"===t.getAttribute("type"))),n=this.modifiers.findIndex((t=>"GraceNoteGroup"===t.getAttribute("type")));t&&s>-1?this.modifiers[s].accidental.code="#"===t?"v18":"v44":e>=0||n>=0?e>=0&&this.modifiers.splice(e+1,1):this.modifiers.splice(s,1)}}catch(t){console.log("🚀 ~ error",t)}}this.setYs(t)}getFullWidth(){return this.full_width}getFullHeight(){return this.full_height}getLine(){return this.keyProps[0].line}get full_width(){return this.note_width+this.left_width+this.right_width+this.long_duration_line_width}get long_duration_line_width(){return(this.long_duration_width+this.long_duration_space)*this.long_duration_lines}get full_height(){return this.bottom_y-this.top_y}get note_width(){return this.note_size||0}get note_dot_width(){return 6}get note_height(){return this.unit_height}get unit_height(){return this.note_size||0}get note_x(){return this.x||0}get top_x(){return this.x||0}get top_y(){var t=this;return(this.y||0)-(t.note_tones.map((e=>(e.td+e.bd)*(t.dot_space+t.dot_width))).reduce(((t,e)=>t+e),0)+this.note_height*this.note_tones.length-this.unit_height-this.note_tones[0].bd*(t.dot_space+t.dot_width)+(this.note_tones.length-1)*this.head_space)}get bottom_x(){return this.x||0}get bottom_y(){return(this.y||0)+this.unit_height+this.duration_lines*(this.duration_line_height+this.duration_line_space)+this.note_tones[0].meta.bd*(this.dot_width+this.dot_space)}get left_width(){return this.modifiers_width}get right_width(){return this.full_duration_dot_width}get duration_dot_width(){return 6}get full_duration_dot_width(){return this.duration_dot_width*this.getModifiersByCategory(o.o.CATEGORY).length}getModifiersByCategory(t){var e=[];return this.modifiers.forEach((i=>{i.getCategory()===t&&e.push(i)})),e}get head_space(){return 6}get duration_line_height(){return 2}get duration_line_space(){return 4}get dot_width(){return 2}get dot_space(){return 2}get long_duration_space(){return 10}get long_duration_width(){return 20}getWidth(){return this.full_width}get modifiers_width(){let t=0;return this.modifiers.forEach((e=>{t+=e.getWidth()})),t}}let m=0;class g{static get numberedNotationMapping(){let t=h;switch(window&&window.sett&&window.sett.keySignature&&(t="C"),t){case"A":return{C:"3",D:"4",E:"5",F:"6",G:"7",A:"1",B:"2",R:"0",X:"x",min:2.5,max:5.5};case"B":case"Bb":case"A#":return{C:"2",D:"3",E:"4",F:"5",G:"6",A:"7",B:"1",R:"0",X:"x",min:-.5,max:2.5};case"D":case"D#":case"Db":return{C:"7",D:"1",E:"2",F:"3",G:"4",A:"5",B:"6",R:"0",X:"x",min:.5,max:3.5};case"E":case"Eb":return{C:"6",D:"7",E:"1",F:"2",G:"3",A:"4",B:"5",R:"0",X:"x",min:1,max:4};case"F":case"F#":return{C:"5",D:"6",E:"7",F:"1",G:"2",A:"3",B:"4",R:"0",X:"x",min:1.5,max:4.5};case"G":case"Gb":return{C:"4",D:"5",E:"6",F:"7",G:"1",A:"2",B:"3",R:"0",X:"x",min:2,max:5};case"Ab":case"G#":return{C:"3",D:"4",E:"5",F:"6",G:"7",A:"1",B:"2",R:"0",X:"x",min:-1,max:2};default:return{C:"1",D:"2",E:"3",F:"4",G:"5",A:"6",B:"7",R:"0",X:"x",min:0,max:3}}}tone_to_numbered_key(){var t=this.key.split("/"),e=t[0];"b"===e&&(e="R"),(e=(e=e.replace(new RegExp("#","g"),"")).replace(new RegExp("n","g"),"")).length>1&&(e=e.replace(new RegExp("b","g"),"")),t.includes("X2")&&(e="X");let i=0,s=0;this.note.stave&&this.note.stave.options&&this.note.stave.options.keySignature&&(h=this.note.stave.options.keySignature);const n=this.note.getLine();return ng.numberedNotationMapping.max&&(s=Math.ceil((n-g.numberedNotationMapping.max)/3.5)),"R"===e.toUpperCase()&&(i=0,s=0),m+=1,{key:g.numberedNotationMapping[e.toUpperCase()],td:s,bd:i}}constructor(t){this.key=t.key,this.x=t.x||0,this.y=t.y||0,this.idx=t.idx||0,this.note=t.note||0,this.meta=this.tone_to_numbered_key(),this.noteSize=t.noteSize||16,this.td=this.meta.td,this.bd=this.meta.bd}draw(t,e){let i=this.y;e&&"isX"===e?t.openGroup("numbered-note-head","","","isX"):t.openGroup("numbered-note-head");var s=this.x+(this.note.ornament?-2:0);let n=i-this.note.unit_height-this.note.dot_space-(this.note.ornament?-4:2);for(let e=0;e1&&(t-=this.note.duration_line_space),i+=t}this.draw_dot(t,s+l,i,this.note.dot_width),i+=this.note.dot_width+this.note.dot_space}t.closeGroup()}get height(){return this.note.note_height+(this.meta.bd+this.meta.td)*(this.note.dot_width+this.note.dot_space)}draw_dot(t,e,i,s){t.openGroup("numbered-note-dot"),t.beginPath(),t.arc(e,i,s,0,2*Math.PI),t.closePath(),t.fill(),t.closeGroup()}}},8194:(t,e,i)=>{"use strict";i.d(e,{B:()=>r});const s=i(4552).s.MakeException("RegistryError");function n(t,e,i,s,n){t[e][i]||(t[e][i]={}),t[e][i][s]=n}class r{static get INDEXES(){return["type"]}constructor(){this.clear()}static enableDefaultRegistry(t){r.defaultRegistry=t}static getDefaultRegistry(){return r.defaultRegistry}static disableDefaultRegistry(){r.defaultRegistry=null}clear(){return this.index={id:{},type:{},class:{}},this}updateIndex({id:t,name:e,value:i,oldValue:s}){const r=this.getElementById(t);null!==s&&this.index[e][s]&&delete this.index[e][s][t],null!==i&&n(this.index,e,i,r.getAttribute("id"),r)}register(t,e){if(!(e=e||t.getAttribute("id")))throw new s("Can't add element without `id` attribute to registry",t);return t.setAttribute("id",e),n(this.index,"id",e,e,t),r.INDEXES.forEach((i=>{this.updateIndex({id:e,name:i,value:t.getAttribute(i),oldValue:null})})),t.onRegister(this),this}getElementById(t){return this.index.id[t]?this.index.id[t][t]:null}getElementsByAttribute(t,e){const i=this.index[t];return i&&i[e]?Object.keys(i[e]).map((t=>i[e][t])):[]}getElementsByType(t){return this.getElementsByAttribute("type",t)}getElementsByClass(t){return this.getElementsByAttribute("class",t)}onUpdate({id:t,name:e,value:i,oldValue:s}){return function(t,e){return t.filter((t=>t===e)).length>0}(r.INDEXES.concat(["id","class"]),e)?(this.updateIndex({id:t,name:e,value:i,oldValue:s}),this):this}}r.defaultRegistry=null},8391:(t,e,i)=>{"use strict";i.d(e,{$:()=>d});var s=i(4552),n=i(8179),r=i(4658),o=i(1140),a=i(9723),l=i(2945),h=i(3493),u=i(4184);function c(t,e,i){if(t.note.shiftRestVerticalDisabled)return;const s=(e.isrest?0:1)*i;t.line+=s,t.maxLine+=s,t.minLine+=s,t.note.setKeyLine(0,t.note.getKeyLine(0)+s)}class d extends l.Y{static get CATEGORY(){return"stavenotes"}static get STEM_UP(){return o.r.UP}static get STEM_DOWN(){return o.r.DOWN}static get DEFAULT_LEDGER_LINE_OFFSET(){return 3}static renderVibrato(t,e,i,s){let{width:n,height:r,wave_width:o,wave_girth:a,wave_height:l,stem_direction:h}=s;const u=Math.floor(n/o);let c=r/(u/2)*h;0==c&&(h=1,c=.3),t.beginPath(),t.moveTo(e,i+a);for(let s=0;s2?i[1]:null;let l=r>2?i[2]:i[1];2!==r||-1!==o.stemDirection||1!==l.stemDirection||o.isrest||l.isRest||(o=i[1],l=i[0]);const h=Math.max(o.voice_shift,l.voice_shift);let d,p=0;if(2===r){const t=o.stemDirection===l.stemDirection?0:.5;if(o.stemDirection===l.stemDirection&&o.minLine<=l.maxLine&&(o.isrest||(d=Math.abs(o.line-(l.maxLine+.5)),d=Math.max(d,o.stemMin),o.minLine=o.line-d,o.note.setStemLength(10*d))),o.minLine<=l.maxLine+t)if(o.isrest)c(o,l,1),o.note.hasLedgerLinedRest&&(o.note.shiftRestVerticalDisabled=!0);else if(l.isrest)c(l,o,-1),l.note.hasLedgerLinedRest&&(l.note.shiftRestVerticalDisabled=!0);else{p=h;const t=Math.abs(o.line-l.line);let e=0,i=0;"h"===o.note.duration?e++:"w"===o.note.duration&&i++,"h"===l.note.duration?e++:"w"===l.note.duration&&i++;let s=1===e||1===i||o.note.dots!==l.note.dots;if(n&&(s=s||2===i),0===t&&s){if(l.note.setXShift(p),o.note.dots>0){let t=0;for(const e of o.note.modifiers)if(e instanceof u.o&&(t++,e.setYShift(-10*(l.maxLine-o.line+1)),t===o.note.dots))break}}else t<1&&t>0?l.note.setXShift(p):o.note.voice!==l.note.voice&&o.stemDirection===l.stemDirection&&(o.line>l.line?1===o.stemDirection?l.note.renderFlag=!1:o.note.renderFlag=!1:l.line>o.line?1===l.stemDirection?o.note.renderFlag=!1:l.note.renderFlag=!1:1===l.stemDirection&&(l.stemDirection=-1,l.note.setStemDirection(-1)))}return!0}return null!==a&&a.minLinet.postFormat())),!0)}constructor(t){if(super(t),this.setAttribute("type","StaveNote"),this.keys=t.keys,this.clef=t.clef,this.octave_shift=t.octave_shift,this.beam=null,this.vibrato=null,this.slideNote=null,this.glyph=n.Z.getGlyphProps(this.duration,this.noteType),!this.glyph)throw new s.s.RuntimeError("BadArguments",`Invalid note initialization data (No glyph found): ${JSON.stringify(t)}`);this.displaced=!1,this.dot_shiftY=0,this.addDotsCount=0,this.keyProps=[],this.use_default_head_x=!1,this.paddingRight=0,this.note_heads=[],this.modifiers=[],s.s.Merge(this.render_options,{glyph_font_scale:t.glyph_font_scale||n.Z.DEFAULT_NOTATION_FONT_SCALE,stroke_px:t.stroke_px||d.DEFAULT_LEDGER_LINE_OFFSET}),this.calculateKeyProps(),this.buildStem(),t.auto_stem?this.autoStem():this.setStemDirection(t.stem_direction),this.reset(),this.buildFlag()}reset(){super.reset();const t=this.note_heads.map((t=>t.getStyle())),e=[];this.note_heads.forEach((t=>e.push(t.note_type))),this.buildNoteHeads(),this.note_heads.forEach(((i,s)=>{i.setStyle(t[s]),e[s]&&(i.note_type=e[s])})),this.stave&&this.note_heads.forEach((t=>t.setStave(this.stave))),this.calcExtraPx()}setBeam(t){return this.beam=t,this.calcExtraPx(),this}setVibrato(t){this.vibrato=t}setSlideNote(t){this.slideNote=t}getCategory(){return d.CATEGORY}buildStem(){this.setStem(new o.r({hide:!!this.isRest()})),this.stem.id=s.s.Prefix(`${this.getAttribute("id")}-stem`)}buildNoteHeads(){this.note_heads=[];const t=this.getStemDirection(),e=this.getKeys();let i,s,n,r=null,l=null,h=!1;t===o.r.UP?(i=0,s=e.length,n=1):t===o.r.DOWN&&(i=e.length-1,s=-1,n=-1);for(let e=i;e!==s;e+=n){const i=this.keyProps[e],s=i.line;null===r?r=s:(l=Math.abs(r-s),0===l||.5===l?h=!h:(h=!1,this.use_default_head_x=!0)),r=s;const n=new a.i({duration:this.duration,note_type:this.noteType,displaced:h,stem_direction:t,custom_glyph_code:i.code,glyph_font_scale:this.render_options.glyph_font_scale,x_shift:i.shift_right,stem_up_x_offset:i.stem_up_x_offset,stem_down_x_offset:i.stem_down_x_offset,stem_up_y_shift:i.stem_up_y_shift,stem_down_y_shift:i.stem_down_y_shift,line:i.line});n.isLedgerLinedRest&&(this.hasLedgerLinedRest=!0),this.note_heads[e]=n}}autoStem(){this.minLine=this.keyProps[0].line,this.maxLine=this.keyProps[this.keyProps.length-1].line;const t=(this.minLine+this.maxLine)/2<3?o.r.UP:o.r.DOWN;this.setStemDirection(t)}calculateKeyProps(){let t=null;for(let e=0;e0&&(this.keyProps[e-1].displaced=!0)),t=a,this.keyProps.push(o)}t=-1/0,this.keyProps.forEach((e=>{e.linet.line-e.line))}getBoundingBox(){if(!this.preFormatted)throw new s.s.RERR("UnformattedNote","Can't call getBoundingBox on an unformatted note.");const{width:t,modLeftPx:e,extraLeftPx:i}=this.getMetrics(),o=this.getAbsoluteX()-e-i-this.paddingRight;let a=0,l=0;const h=this.getStave().getSpacingBetweenLines()/2,u=2*h;if(this.isRest()){const t=this.ys[0],e=n.Z.durationToFraction(this.duration);e.equals(1)||e.equals(2)?(a=t-h,l=t+h):(a=t-this.glyph.line_above*u,l=t+this.glyph.line_below*u)}else if(this.glyph.stem){const t=this.getStemExtents();t.baseY+=h*this.stem_direction,a=Math.min(t.topY,t.baseY),l=Math.max(t.topY,t.baseY)}else{a=null,l=null;for(let t=0;te&&(e=s):s1}hasStem(){return this.glyph.stem}hasFlag(){return super.hasFlag()&&!this.isRest()&&this.renderFlag}getStemX(){return"r"===this.noteType?this.getCenterGlyphX():super.getStemX()+(this,o.r.WIDTH/(2*-this.getStemDirection()))}getYForTopText(t){const e=this.getStemExtents();return Math.min(this.stave.getYForTopText(t),e.topY-this.render_options.annotation_spacing*(t+1))}getYForBottomText(t){const e=this.getStemExtents();return Math.max(this.stave.getYForTopText(t),e.baseY+this.render_options.annotation_spacing*t)}setStave(t){super.setStave(t);const e=this.note_heads.map((e=>(e.setStave(t),e.getY())));if(this.setYs(e),this.stem){const{y_top:t,y_bottom:e}=this.getNoteHeadBounds();this.stem.setYBounds(t,e)}return this}getKeys(){return this.keys}getKeyProps(){return this.keyProps}isDisplaced(){return this.displaced}setNoteDisplaced(t){return this.displaced=t,this}getTieRightX(){let t=this.getAbsoluteX();return t+=this.getGlyphWidth()+this.x_shift+this.extraRightPx,this.modifierContext&&(t+=this.modifierContext.getExtraRightPx()),t}getTieLeftX(){let t=this.getAbsoluteX();return t+=this.x_shift-this.extraLeftPx,t}getLineForRest(){let t=this.keyProps[0].line;if(this.keyProps.length>1){const e=this.keyProps[this.keyProps.length-1].line,i=Math.max(t,e),n=Math.min(t,e);t=s.s.MidLine(i,n)}return t}getModifierStartXY(t,e,i){if(i=i||{},!this.preFormatted)throw new s.s.RERR("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(0===this.ys.length)throw new s.s.RERR("NoYValues","No Y-Values calculated for this note.");const{ABOVE:n,BELOW:r,LEFT:a,RIGHT:l}=h.Modifier.Position;let u=0;return t===a?u=-2:t===l?(u=this.getGlyphWidth()+this.x_shift+2,this.stem_direction===o.r.UP&&this.hasFlag()&&(i.forceFlagRight||((t,e)=>e===(t.getStemDirection()===o.r.UP?t.keyProps.length-1:0))(this,e))&&(u+=this.flag.getMetrics().width)):t!==r&&t!==n||(u=this.getGlyphWidth()/2),{x:this.getAbsoluteX()+u,y:this.ys[e]}}setStyle(t){super.setStyle(t),this.note_heads.forEach((e=>e.setStyle(t))),this.stem&&this.stem.setStyle(t)}setStemStyle(t){this.stem&&this.getStem().setStyle(t)}getStemStyle(){return this.stem.getStyle()}setLedgerLineStyle(t){this.ledgerLineStyle=t}getLedgerLineStyle(){return this.ledgerLineStyle}setFlagStyle(t){this.flagStyle=t}getFlagStyle(){return this.flagStyle}setKeyStyle(t,e){return this.note_heads[t].setStyle(e),this}setKeyLine(t,e){return this.keyProps[t].line=e,this.reset(),this}getKeyLine(t){return this.keyProps[t].line}addToModifierContext(t){this.setModifierContext(t);for(let t=0;t{const c=u.getLine(),d=u.getY();(null===t||de)&&(e=d),null===s&&u.isDisplaced()&&(s=u.getAbsoluteX()),null!==i||u.isDisplaced()||(i=u.getAbsoluteX()),n=c>n?c:n,r=c{let o;o=s&&e?g-i:e?m-i:f-i;const l=e&&s?a:r;n.beginPath(),n.moveTo(o,t),n.lineTo(o+l,t),n.stroke()},S={...t.getStyle()||{},...this.getLedgerLineStyle()||{}};this.applyStyle(n,S);for(let e=6;e<=l;++e){const i=null!==m&&e<=c,s=null!==f&&e<=u;b(t.getYForNote(e),i,s)}for(let e=0;e>=h;--e){const i=null!==m&&e>=p,s=null!==f&&e>=d;b(t.getYForNote(e),i,s)}this.restoreStyle(n,S)}drawVibrato(){if(this.vibrato){const t=this.context,e=this.vibrato.getNoteHeadEndX()+2;let{y_bottom:i}=this.vibrato.getNoteHeadBounds(),{y_top:s}=this.getNoteHeadBounds();const n=i1&&"Accidental"===s.getAttribute("type")&&this.modifiers.findIndex((t=>"GraceNoteGroup"===t.getAttribute("type")))>=0)continue;if(!s.note||"jianpu"!=s.note.DYMusicScoreType||"Dot"!==s.getAttribute("type")||s.note.formatterMetrics.duration){if(s.note&&"jianpu"==s.note.DYMusicScoreType&&"Dot"===s.getAttribute("type"))try{s.note.getModifierStartXY(s.position,0,{forceFlagRight:!0}).x-s.note.x<9&&(s.x_shift+=7)}catch(t){console.log("🚀 ~ error:",t)}s.note&&"jianpu"==s.note.DYMusicScoreType&&("v28"!==s?.articulation?.code&&"v42"!==s?.articulation?.code||(e="transform")),n.applyStyle(t,r),s.setContext(t),s.drawWithStyle(),n.restoreStyle(t,r)}}}t.closeGroup(e),this.drawVibrato(),this.drawSlide()}drawFlag(){const{stem:t,beam:e,context:i}=this;if(!i)throw new s.s.RERR("NoCanvasContext","Can't draw without a canvas context.");const n=null===e&&this.renderFlag;if(this.getGlyph().flag&&n){const{y_top:s,y_bottom:n}=this.getNoteHeadBounds(),r=t.getHeight(),a=this.getStemX();let l=this.getStemDirection()===o.r.DOWN?s-r+2:n-r-2;if(t&&!e){const t=this.keyProps[0].line;(t>6.5||t<-.5)&&(l+=t>6.5?10*(t-6.5):10*(t+.5))}i.openGroup("flag",null,{pointerBBox:!0}),this.applyStyle(i,this.getFlagStyle()||!1),this.flag.render(i,a,l),this.restoreStyle(i,this.getFlagStyle()||!1),i.closeGroup()}}drawNoteHeads(){this.note_heads.forEach((t=>{this.context.openGroup("notehead",null,{pointerBBox:!0});try{if(this.isRest()&&"w"===this.duration){const e=this.stave.options.line_config.filter((t=>t.visible)).length;4===this.keyProps[0].line&&e<5&&t.setY(t.getY()+10),1===e&&t.setLine(3)}}catch(t){}t.setContext(this.context).draw(),this.context.closeGroup()}))}drawStem(t){if(!this.context)throw new s.s.RERR("NoCanvasContext","Can't draw without a canvas context.");t&&this.setStem(new o.r(t)),this.stem.id=s.s.Prefix(`${this.getAttribute("id")}-stem`),this.stem&&(this.context.openGroup("stem",null,{pointerBBox:!0}),this.stem.setContext(this.context).draw(),this.context.closeGroup())}draw(){if(!this.context)throw new s.s.RERR("NoCanvasContext","Can't draw without a canvas context.");if(!this.stave)throw new s.s.RERR("NoStave","Can't draw without a stave.");if(0===this.ys.length)throw new s.s.RERR("NoYValues","Can't draw note without Y values.");const t=this.stave.getLines();if(2===t||3===t||4===t)for(let e=0;et.setX(e))),this.stem){let t=this.getStemX();const e=this.keyProps[0].line;(e>6.5||e<-.5)&&(this.beam||(this.stem.renderHeightAdjustment=e>6.5?10*(e-6.5):10*Math.abs(e+.5))),this.stem.setNoteHeadXBounds(t,t)}!function(...t){d.DEBUG&&s.s.L("Vex.Flow.StaveNote",t)}("Rendering ",this.isChord()?"chord :":"note :",this.keys),this.drawLedgerLines(),this.applyStyle(),this.setAttribute("el",this.context.openGroup("stavenote",this.getAttribute("id"))),this.context.openGroup("note",null,{pointerBBox:!0}),i&&this.drawStem(),this.drawNoteHeads(),this.drawFlag(),this.context.closeGroup(),this.drawModifiers(),this.context.closeGroup(),this.restoreStyle(),this.setRendered()}}},1140:(t,e,i)=>{"use strict";i.d(e,{r:()=>o});var s=i(4552),n=i(2088),r=i(8179);class o extends n.W{static get CATEGORY(){return"stem"}static get UP(){return 1}static get DOWN(){return-1}static get WIDTH(){return r.Z.STEM_WIDTH}static get HEIGHT(){return r.Z.STEM_HEIGHT}constructor(t={}){super(),this.setAttribute("type","Stem"),this.x_begin=t.x_begin||0,this.x_end=t.x_end||0,this.y_top=t.y_top||0,this.y_bottom=t.y_bottom||0,this.stem_extension=t.stem_extension||0,this.stem_direction=t.stem_direction||0,this.hide=t.hide||!1,this.isStemlet=t.isStemlet||!1,this.stemletHeight=t.stemletHeight||0,this.renderHeightAdjustment=0,this.setOptions(t)}setResetHeight(t){this.resetHeight=t}setOptions(t){this.stem_up_y_offset=t.stem_up_y_offset||0,this.stem_down_y_offset=t.stem_down_y_offset||0}setNoteHeadXBounds(t,e){return this.x_begin=t,this.x_end=e,this}setDirection(t){this.stem_direction=t}setExtension(t){this.stem_extension=t}getExtension(){return this.stem_extension}setYBounds(t,e){this.y_top=t,this.y_bottom=e}getCategory(){return o.CATEGORY}getHeight(){const t=this.stem_direction===o.UP?this.stem_up_y_offset:this.stem_down_y_offset;return(this.y_bottom-this.y_top)*this.stem_direction+(o.HEIGHT-t+this.stem_extension)*this.stem_direction}getBoundingBox(){throw new s.s.RERR("NotImplemented","getBoundingBox() not implemented.")}getExtents(){const t=this.stem_direction===o.UP,e=[this.y_top,this.y_bottom],i=o.HEIGHT+this.stem_extension,s=(t?Math.min:Math.max)(...e),n=(t?Math.max:Math.min)(...e);return{topY:s+i*-this.stem_direction,baseY:n}}setVisibility(t){return this.hide=!t,this}setStemlet(t,e){return this.isStemlet=t,this.stemletHeight=e,this}draw(){if(this.setRendered(),this.hide)return;const t=this.checkContext();let e,i;const n=this.stem_direction;n===o.DOWN?(e=this.x_begin,i=this.y_top+this.stem_down_y_offset):(e=this.x_end,i=this.y_bottom-this.stem_up_y_offset);const r=this.getHeight();!function(...t){o.DEBUG&&s.s.L("Vex.Flow.Stem",t)}("Rendering stem - ","Top Y: ",this.y_top,"Bottom Y: ",this.y_bottom);const a=this.isStemlet?r-this.stemletHeight*this.stem_direction:0;if(t.save(),this.applyStyle(t),t.beginPath(),t.setLineWidth(o.WIDTH),t.moveTo(e,i-a),t.lineTo(e,i-r-this.renderHeightAdjustment*n),t.svg){const e={class:s.s.Prefix("stem")};this.id&&(e.id=this.id),t.stroke(e)}else t.stroke();this.restoreStyle(t),t.restore()}}},2945:(t,e,i)=>{"use strict";i.d(e,{Y:()=>l});var s=i(4552),n=i(8179),r=i(1140),o=i(2306),a=i(4699);class l extends a.j{constructor(t){super(t),this.setAttribute("type","StemmableNote"),this.stem=null,this.stemExtensionOverride=null,this.beam=null,this.renderFlag=!0}getStem(){return this.stem}setStem(t){return this.stem=t,this}buildStem(){const t=new r.r;return this.setStem(t),this}buildFlag(){const{glyph:t,beam:e}=this,i=null===e&&this.renderFlag;if(t&&t.flag&&i){const e=this.getStemDirection()===r.r.DOWN?t.code_flag_downstem:t.code_flag_upstem;this.flag=new o.r(e,this.render_options.glyph_font_scale)}}getTopGlyph(){return this.getStemDirection()===r.r.DOWN?this.customGlyphs[this.customGlyphs.length-1]:this.customGlyphs[0]}getStemLength(){return r.r.HEIGHT+this.getStemExtension()}getBeamCount(){const t=this.getGlyph();return t?t.beam_count:0}getStemMinumumLength(){let t=n.Z.durationToFraction(this.duration).value()<=1?0:20;switch(this.duration){case"8":null==this.beam&&(t=35);break;case"16":t=null==this.beam?35:25;break;case"32":t=null==this.beam?45:35;break;case"64":t=null==this.beam?50:40;break;case"128":t=null==this.beam?55:45}return t}getStemDirection(){return this.stem_direction}setStemDirection(t){if(t||(t=r.r.UP),t!==r.r.UP&&t!==r.r.DOWN)throw new s.s.RERR("BadArgument",`Invalid stem direction: ${t}`);if(this.stem_direction=t,this.stem){this.stem.setDirection(t),this.stem.setExtension(this.getStemExtension());const e=this.getTopGlyph()||this.getGlyph();this.stem.setOptions({stem_up_y_offset:e.stem_up_y_offset,stem_down_y_offset:e.stem_down_y_offset})}return this.reset(),this.flag&&this.renderFlag&&this.buildFlag(),this.beam=null,this.preFormatted&&this.preFormat(),this}getStemX(){const t=this.getAbsoluteX()+this.x_shift,e=this.getAbsoluteX()+this.x_shift+this.getGlyphWidth();return this.stem_direction===r.r.DOWN?t:e}getCenterGlyphX(){return this.getAbsoluteX()+this.x_shift+this.getGlyphWidth()/2}getStemExtension(){const t=this.getGlyph();return null!=this.stemExtensionOverride?this.stemExtensionOverride:t?1===this.getStemDirection()?t.stem_up_extension:t.stem_down_extension:0}setStemLength(t){return this.stemExtensionOverride=t-r.r.HEIGHT,this}getStemExtents(){return this.stem.getExtents()}setBeam(t){return this.beam=t,this}getYForTopText(t){const e=this.getStemExtents();return this.hasStem()?Math.min(this.stave.getYForTopText(t),e.topY-this.render_options.annotation_spacing*(t+1)):this.stave.getYForTopText(t)}getYForBottomText(t){const e=this.getStemExtents();return this.hasStem()?Math.max(this.stave.getYForTopText(t),e.baseY+this.render_options.annotation_spacing*t):this.stave.getYForBottomText(t)}hasFlag(){return this.renderFlag&&n.Z.getGlyphProps(this.duration).flag&&!this.beam}postFormat(){return this.beam&&this.beam.postFormat(),this.postFormatted=!0,this}drawStem(t){this.checkContext(),this.setRendered(),this.setStem(new r.r(t)),this.stem.setContext(this.context).draw()}}},8179:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var s=i(4552),n=i(9515),r=i(2306);const o={STEM_WIDTH:1.5,STEM_HEIGHT:35,STAVE_LINE_THICKNESS:1,RESOLUTION:16384,DEFAULT_NOTATION_FONT_SCALE:39,DEFAULT_TABLATURE_FONT_SCALE:39,SLASH_NOTEHEAD_WIDTH:15,TEXT_HEIGHT_OFFSET_HACK:1,IsKerned:!0,clefProperties:t=>{if(!t)throw new s.s.RERR("BadArgument","Invalid clef: "+t);const e=o.clefProperties.values[t];if(!e)throw new s.s.RERR("BadArgument","Invalid clef: "+t);return e}};o.clefProperties.values={treble:{line_shift:0},bass:{line_shift:6},tenor:{line_shift:4},alto:{line_shift:3},soprano:{line_shift:1},percussion:{line_shift:0},"mezzo-soprano":{line_shift:2},"baritone-c":{line_shift:5},"baritone-f":{line_shift:5},subbass:{line_shift:7},french:{line_shift:-1}},o.keyProperties=(t,e,i)=>{void 0===e&&(e="treble");const n={octave_shift:0};"object"==typeof i&&s.s.Merge(n,i);const r=t.split("/");if(r.length<2)throw new s.s.RERR("BadArguments",`Key must have note + octave and an optional glyph: ${t}`);const a=r[0].toUpperCase(),l=o.keyProperties.note_values[a];if(!l)throw new s.s.RERR("BadArguments","Invalid key name: "+a);l.octave&&(r[1]=l.octave);let h=parseInt(r[1],10);h-=n.octave_shift;let u=(7*h-28+l.index)/2;u+=o.clefProperties(e).line_shift;let c=0;u<=0&&2*u%2==0&&(c=1),u>=6&&2*u%2==0&&(c=-1);const d=void 0!==l.int_val?12*h+l.int_val:null,p=l.code,f=l.shift_right;let m={};if(r.length>2&&r[2]){const t=r[2].toUpperCase();m=o.keyProperties.customNoteHeads[t]||{}}return{key:a,octave:h,line:u,int_value:d,accidental:l.accidental,code:p,stroke:c,shift_right:f,displaced:!1,...m}},o.keyProperties.note_values={C:{index:0,int_val:0,accidental:null},CN:{index:0,int_val:0,accidental:"n"},"C#":{index:0,int_val:1,accidental:"#"},"C##":{index:0,int_val:2,accidental:"##"},CB:{index:0,int_val:-1,accidental:"b"},CBB:{index:0,int_val:-2,accidental:"bb"},D:{index:1,int_val:2,accidental:null},DN:{index:1,int_val:2,accidental:"n"},"D#":{index:1,int_val:3,accidental:"#"},"D##":{index:1,int_val:4,accidental:"##"},DB:{index:1,int_val:1,accidental:"b"},DBB:{index:1,int_val:0,accidental:"bb"},E:{index:2,int_val:4,accidental:null},EN:{index:2,int_val:4,accidental:"n"},"E#":{index:2,int_val:5,accidental:"#"},"E##":{index:2,int_val:6,accidental:"##"},EB:{index:2,int_val:3,accidental:"b"},EBB:{index:2,int_val:2,accidental:"bb"},F:{index:3,int_val:5,accidental:null},FN:{index:3,int_val:5,accidental:"n"},"F#":{index:3,int_val:6,accidental:"#"},"F##":{index:3,int_val:7,accidental:"##"},FB:{index:3,int_val:4,accidental:"b"},FBB:{index:3,int_val:3,accidental:"bb"},G:{index:4,int_val:7,accidental:null},GN:{index:4,int_val:7,accidental:"n"},"G#":{index:4,int_val:8,accidental:"#"},"G##":{index:4,int_val:9,accidental:"##"},GB:{index:4,int_val:6,accidental:"b"},GBB:{index:4,int_val:5,accidental:"bb"},A:{index:5,int_val:9,accidental:null},AN:{index:5,int_val:9,accidental:"n"},"A#":{index:5,int_val:10,accidental:"#"},"A##":{index:5,int_val:11,accidental:"##"},AB:{index:5,int_val:8,accidental:"b"},ABB:{index:5,int_val:7,accidental:"bb"},B:{index:6,int_val:11,accidental:null},BN:{index:6,int_val:11,accidental:"n"},"B#":{index:6,int_val:12,accidental:"#"},"B##":{index:6,int_val:13,accidental:"##"},BB:{index:6,int_val:10,accidental:"b"},BBB:{index:6,int_val:9,accidental:"bb"},R:{index:6,int_val:9,rest:!0},X:{index:6,accidental:"",octave:4,code:"v3e",shift_right:5.5}},o.keyProperties.customNoteHeads={D0:{code:"v27",shift_right:0,stem_up_x_offset:0,stem_down_x_offset:0,stem_up_y_offset:-1,stem_down_y_offset:0},D1:{code:"v2d",shift_right:-.5},D2:{code:"v22",shift_right:-.5},D3:{code:"v70",shift_right:-.5},T0:{code:"v49",shift_right:-2,stem_up_y_offset:-4,stem_down_y_offset:4},T1:{code:"v93",shift_right:.5,stem_up_y_offset:-4,stem_down_y_offset:4},T2:{code:"v40",shift_right:.5,stem_up_y_offset:-4,stem_down_y_offset:4},T3:{code:"v7d",shift_right:.5,stem_up_y_offset:-4,stem_down_y_offset:4},TI:{code:"v11",shift_right:0,stem_up_y_shift:5,stem_down_y_shift:5,stem_up_x_offset:6,stem_down_x_offset:4},X0:{code:"v92",stem_up_x_offset:-2,stem_down_x_offset:0,stem_up_y_offset:4,stem_down_y_offset:4},X1:{code:"v95",shift_right:-.5,stem_up_y_offset:4,stem_down_y_offset:4},X2:{code:"v3e",shift_right:.5,stem_up_y_offset:4,stem_down_y_offset:4},X3:{code:"v3b",shift_right:0,stem_up_x_offset:-1.2,stem_down_x_offset:0,stem_up_y_offset:-1,stem_down_y_offset:2},S1:{code:"vd3",shift_right:0},S2:{code:"vd2",shift_right:0},R1:{code:"vd5",shift_right:0},R2:{code:"vd4",shift_right:0},rwl:{code:"rwl",shift_right:0},rhl:{code:"rhl",shift_right:0}},o.integerToNote=t=>{if(void 0===t)throw new s.s.RERR("BadArguments","Undefined integer for integerToNote");if(t<-2)throw new s.s.RERR("BadArguments",`integerToNote requires integer > -2: ${t}`);const e=o.integerToNote.table[t];if(!e)throw new s.s.RERR("BadArguments",`Unknown note value for integer: ${t}`);return e},o.integerToNote.table={0:"C",1:"C#",2:"D",3:"D#",4:"E",5:"F",6:"F#",7:"G",8:"G#",9:"A",10:"A#",11:"B"},o.tabToGlyph=(t,e=1)=>{let i=null,s=0,n=0;if("X"===t.toString().toUpperCase()){const t=new r.r("v7f",o.DEFAULT_TABLATURE_FONT_SCALE).getMetrics();i="v7f",s=t.width,n=-t.height/2}else s=o.textWidth(t.toString());return{text:t,code:i,getWidth:()=>s*e,shift_y:n}},o.textWidth=t=>7*t.toString().length,o.articulationCodes=t=>o.articulationCodes.articulations[t],o.articulationCodes.articulations={"a.":{code:"v23",between_lines:!0},av:{code:"v28",between_lines:!0},"a>":{code:"v42",between_lines:!0},"a-":{code:"v25",between_lines:!0},"a^":{code:"va",between_lines:!1},"a+":{code:"v8b",between_lines:!1},ao:{code:"v94",between_lines:!1},ah:{code:"vb9",between_lines:!1},"a@a":{code:"v43",between_lines:!1},"a@u":{code:"v5b",between_lines:!1},"a|":{code:"v75",between_lines:!1},am:{code:"v97",between_lines:!1},"a,":{code:"vb3",between_lines:!1}},o.accidentalCodes=t=>o.accidentalCodes.accidentals[t],o.accidentalCodes.accidentals={"#":{code:"v18",parenRightPaddingAdjustment:-1},"##":{code:"v7f",parenRightPaddingAdjustment:-1},b:{code:"v44",parenRightPaddingAdjustment:-2},bb:{code:"v26",parenRightPaddingAdjustment:-2},n:{code:"v4e",parenRightPaddingAdjustment:-1},"{":{code:"v9c",parenRightPaddingAdjustment:-1},"}":{code:"v84",parenRightPaddingAdjustment:-1},db:{code:"v9e",parenRightPaddingAdjustment:-1},d:{code:"vab",parenRightPaddingAdjustment:0},bbs:{code:"v90",parenRightPaddingAdjustment:-1},"++":{code:"v51",parenRightPaddingAdjustment:-1},"+":{code:"v78",parenRightPaddingAdjustment:-1},"+-":{code:"v8d",parenRightPaddingAdjustment:-1},"++-":{code:"v7a",parenRightPaddingAdjustment:-1},bs:{code:"vb7",parenRightPaddingAdjustment:-1},bss:{code:"v39",parenRightPaddingAdjustment:-1},o:{code:"vd0",parenRightPaddingAdjustment:-1},k:{code:"vd1",parenRightPaddingAdjustment:-1},ashs:{code:"vd6",parenRightPaddingAdjustment:-1},afhf:{code:"vd7",parenRightPaddingAdjustment:-1}},o.accidentalColumnsTable={1:{a:[1],b:[1]},2:{a:[1,2]},3:{a:[1,3,2],b:[1,2,1],second_on_bottom:[1,2,3]},4:{a:[1,3,4,2],b:[1,2,3,1],spaced_out_tetrachord:[1,2,1,2]},5:{a:[1,3,5,4,2],b:[1,2,4,3,1],spaced_out_pentachord:[1,2,3,2,1],very_spaced_out_pentachord:[1,2,1,2,1]},6:{a:[1,3,5,6,4,2],b:[1,2,4,5,3,1],spaced_out_hexachord:[1,3,2,1,3,2],very_spaced_out_hexachord:[1,2,1,2,1,2]}},o.ornamentCodes=t=>o.ornamentCodes.ornaments[t],o.ornamentCodes.ornaments={mordent:{code:"v1e"},mordent_inverted:{code:"v45"},turn:{code:"v72"},turn_inverted:{code:"v33"},tr:{code:"v1f"},upprall:{code:"v60"},downprall:{code:"vb4"},prallup:{code:"v6d"},pralldown:{code:"v2c"},upmordent:{code:"v29"},downmordent:{code:"v68"},lineprall:{code:"v20"},prallprall:{code:"v86"}},o.keySignature=t=>{const e=o.keySignature.keySpecs[t];if(!e)throw new s.s.RERR("BadKeySignature",`Bad key signature spec: '${t}'`);if(!e.acc)return[];const i=o.keySignature.accidentalList(e.acc),n=[];for(let t=0;t({b:[2,.5,2.5,1,3,1.5,3.5],"#":[0,1.5,-.5,1,2.5,.5,2]}[t]),o.parseNoteDurationString=t=>{if("string"!=typeof t)return null;const e=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(t);if(!e)return null;const i=e[1],s=e[2].length;let n=e[3];return 0===n.length&&(n="n"),{duration:i,dots:s,type:n}},o.parseNoteStruct=t=>{const e=t.duration,i=o.parseNoteDurationString(e);if(!i)return null;let s=o.durationToTicks(i.duration);if(null==s)return null;let n=t.type;const r=[];if(n){if(!o.getGlyphProps.validTypes[n])return null}else n=i.type||"n",void 0!==t.keys&&t.keys.forEach(((t,e)=>{const i=t.split("/");i&&3===i.length&&(r[e]=i[2])}));const a=t.dots?t.dots:i.dots;if("number"!=typeof a)return null;let l=s;for(let t=0;t{const e=o.durationAliases[t];if(void 0!==e&&(t=e),void 0===o.durationToTicks.durations[t])throw new s.s.RERR("BadArguments",`The provided duration is not valid: ${t}`);return t},o.durationToFraction=t=>(new n.i).parse(o.sanitizeDuration(t)),o.durationToNumber=t=>o.durationToFraction(t).value(),o.durationToTicks=t=>{t=o.sanitizeDuration(t);const e=o.durationToTicks.durations[t];return void 0===e?null:e},o.durationToTicks.durations={"1/2":2*o.RESOLUTION,1:o.RESOLUTION/1,2:o.RESOLUTION/2,4:o.RESOLUTION/4,8:o.RESOLUTION/8,16:o.RESOLUTION/16,32:o.RESOLUTION/32,64:o.RESOLUTION/64,128:o.RESOLUTION/128,256:o.RESOLUTION/256},o.durationAliases={w:"1",h:"2",q:"4",b:"256"},o.getGlyphProps=(t,e)=>{t=o.sanitizeDuration(t);const i=o.getGlyphProps.duration_codes[t];if(void 0===i)return null;e||(e="n");let s=i.type[e];if(void 0===s){const t=o.keyProperties.customNoteHeads[e.toUpperCase()];if(void 0===t)return null;s={code_head:t.code,...t}}return{...i.common,...s}},o.getGlyphProps.validTypes={n:{name:"note"},r:{name:"rest"},h:{name:"harmonic"},m:{name:"muted"},s:{name:"slash"}},o.getGlyphProps.duration_codes={"1/2":{common:{getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"v53",t).getMetrics().width},stem:!1,stem_offset:0,flag:!1,stem_up_extension:-o.STEM_HEIGHT,stem_down_extension:-o.STEM_HEIGHT,tabnote_stem_up_extension:-o.STEM_HEIGHT,tabnote_stem_down_extension:-o.STEM_HEIGHT,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"v53"},h:{code_head:"v59"},m:{code_head:"vf",stem_offset:0},r:{code_head:"v31",rest:!0,position:"B/5",dot_shiftY:.5},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},1:{common:{getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"v1d",t).getMetrics().width},stem:!1,stem_offset:0,flag:!1,stem_up_extension:-o.STEM_HEIGHT,stem_down_extension:-o.STEM_HEIGHT,tabnote_stem_up_extension:-o.STEM_HEIGHT,tabnote_stem_down_extension:-o.STEM_HEIGHT,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"v1d"},h:{code_head:"v46"},m:{code_head:"v92",stem_offset:-3},r:{code_head:"v5c",rest:!0,position:"D/5",dot_shiftY:.5},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},2:{common:{getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"v81",t).getMetrics().width},stem:!0,stem_offset:0,flag:!1,stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"v81"},h:{code_head:"v2d"},m:{code_head:"v95",stem_offset:-3},r:{code_head:"vc",stem:!1,rest:!0,position:"B/4",dot_shiftY:-.5},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},4:{common:{getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"vb",t).getMetrics().width},stem:!0,stem_offset:0,flag:!1,stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e",stem_offset:-3},r:{code_head:"v7c",stem:!1,rest:!0,position:"B/4",dot_shiftY:-.5,line_above:1.5,line_below:1.5},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},8:{common:{getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"vb",t).getMetrics().width},stem:!0,stem_offset:0,flag:!0,beam_count:1,code_flag_upstem:"v54",code_flag_downstem:"v9a",stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"va5",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-.5,line_above:1,line_below:1},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},16:{common:{beam_count:2,getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"vb",t).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"v3f",code_flag_downstem:"v8f",stem_up_extension:0,stem_down_extension:0,tabnote_stem_up_extension:0,tabnote_stem_down_extension:0,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"v3c",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-.5,line_above:1,line_below:2},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},32:{common:{beam_count:3,getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"vb",t).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"v47",code_flag_downstem:"v2a",stem_up_extension:9,stem_down_extension:9,tabnote_stem_up_extension:8,tabnote_stem_down_extension:5,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"v55",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-1.5,line_above:2,line_below:2},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},64:{common:{beam_count:4,getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"vb",t).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"va9",code_flag_downstem:"v58",stem_up_extension:13,stem_down_extension:13,tabnote_stem_up_extension:12,tabnote_stem_down_extension:9,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"v38",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:-1.5,line_above:2,line_below:3},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},128:{common:{beam_count:5,getWidth(t=o.DEFAULT_NOTATION_FONT_SCALE){return new r.r(this.code_head||"vb",t).getMetrics().width},stem:!0,stem_offset:0,flag:!0,code_flag_upstem:"v9b",code_flag_downstem:"v30",stem_up_extension:22,stem_down_extension:22,tabnote_stem_up_extension:21,tabnote_stem_down_extension:18,dot_shiftY:0,line_above:0,line_below:0},type:{n:{code_head:"vb"},h:{code_head:"v22"},m:{code_head:"v3e"},r:{code_head:"vaa",stem:!1,flag:!1,rest:!0,position:"B/4",dot_shiftY:1.5,line_above:3,line_below:3},s:{getWidth:()=>o.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}}},o.smufl={},o.smufl.to_code_points={bracketTop:"v1b",bracketBottom:"v10",barlineTick:"v6f",segno:"v8c",coda:"v4d",gClef:"v83",cClef:"vad",fClef:"v79",unpitchedPercussionClef1:"v59","6stringTabClef":"v2f",timeSig0:"v0",timeSig1:"v1",timeSig2:"v2",timeSig3:"v3",timeSig4:"v4",timeSig5:"v5",timeSig6:"v6",timeSig7:"v7",timeSig8:"v8",timeSig9:"v9",timeSigCommon:"v41",timeSigCutCommon:"vb6",noteheadDoubleWhole:"v53",noteheadWhole:"v1d",noteheadHalf:"v81",noteheadBlack:"vb",noteheadXWhole:"v92",noteheadXHalf:"v95",noteheadXBlack:"v3e",noteheadCircleX:"v3b",noteheadTriangleUpWhole:"v49",noteheadTriangleUpHalf:"v93",noteheadTriangleUpBlack:"v40",noteheadDiamondWhole:"v46",noteheadDiamondHalf:"v2d",noteheadDiamondBlack:"v22",augmentationDot:"v23",tremolo1:"v74",flag8thUp:"v54",flag8thDown:"v9a",flag16thUp:"v3f",flag16thDown:"v8f",flag32ndUp:"v47",flag32ndDown:"v2a",flag64thUp:"va9",flag64thDown:"v58",flag128thUp:"v9b",flag128thDown:"v30",accidentalFlat:"v44",accidentalNatural:"v4e",accidentalSharp:"v18",accidentalDoubleSharp:"v7f",accidentalDoubleFlat:"v26",accidentalParensLeft:"v9c",accidentalParensRight:"v84",accidentalQuarterToneFlatStein:"vab",accidentalThreeQuarterTonesFlatZimmermann:"v9e",accidentalQuarterToneSharpStein:"v78",accidentalThreeQuarterTonesSharpStein:"v51",accidentalBuyukMucennebFlat:"v39",accidentalBakiyeFlat:"vb7",accidentalKomaSharp:"v51",accidentalKucukMucennebSharp:"v8d",accidentalKoron:"vd1",accidentalSori:"vd0",articAccentAbove:"v42",articAccentBelow:"v42",articTenutoAbove:"v25",articTenutoBelow:"v25",articStaccatoAbove:"v23",articStaccatoBelow:"v23",articStaccatissimoAbove:"v28",articMarcatoAbove:"va",fermataAbove:"v43",fermataBelow:"v5b",breathMarkComma:"v6c",breathMarkUpbow:"v8a",caesura:"v34",caesuraCurved:"v4b",restMaxima:"v59",restDoubleWhole:"v31",restWhole:"v5c",restHalf:"vc",restQuarter:"v7c",rest8th:"va5",rest16th:"v3c",rest32nd:"v55",rest64th:"v38",rest128th:"vaa",dynamicPiano:"vbf",dynamicMezzo:"v62",dynamicForte:"vba",dynamicRinforzando:"vba",dynamicSforzando:"v4a",dynamicZ:"v80",ornamentTrill:"v1f",ornamentTurn:"v72",ornamentTurnSlash:"v33",ornamentMordent:"v45",ornamentMordentInverted:"v1e",ornamentTremblement:"v86",ornamentPrecompAppoggTrill:"v20",ornamentPrecompSlideTrillDAnglebert:"v60",ornamentPrecompSlideTrillBach:"v29",ornamentPrecompTrillSuffixDandrieu:"v6d",ornamentPrecompDoubleCadenceUpperPrefix:"vb4",ornamentPrecompDoubleCadenceUpperPrefixTurn:"v68",ornamentPrecompTrillLowerSuffix:"v2c",stringsDownBow:"v94",stringsUpBow:"v75",stringsHarmonic:"vb9",pluckedSnapPizzicatoAbove:"v94",pluckedLeftHandPizzicato:"v8b",keyboardPedalPed:"v36",keyboardPedalUp:"v5d",pictChokeCymbal:"vb3",wiggleArpeggiatoUp:"va3",arrowheadBlackUp:"vc3",arrowheadBlackDown:"v52"},o.TIME4_4={num_beats:4,beat_value:4,resolution:o.RESOLUTION}},6619:(t,e,i)=>{"use strict";i.d(e,{W:()=>a});var s=i(4552),n=i(2088),r=i(8179),o=i(9515);class a extends n.W{constructor(){super(),this.setAttribute("type","Tickable"),this.ticks=new o.i(0,1),this.intrinsicTicks=0,this.tickMultiplier=new o.i(1,1),this.width=0,this.x_shift=0,this.voice=null,this.tickContext=null,this.modifierContext=null,this.modifiers=[],this.preFormatted=!1,this.postFormatted=!1,this.tuplet=null,this.tupletStack=[],this.align_center=!1,this.center_x_shift=0,this.ignore_ticks=!1,this.formatterMetrics={freedom:{left:0,right:0},duration:"",iterations:0,space:{used:0,mean:0,deviation:0}}}reset(){return this}getTicks(){return this.ticks}shouldIgnoreTicks(){return this.ignore_ticks}getWidth(){return this.width}getFormatterMetrics(){return this.formatterMetrics}setXShift(t){this.x_shift=t}getCenterXShift(){return this.isCenterAligned()?this.center_x_shift:0}isCenterAligned(){return this.align_center}setCenterAlignment(t){return this.align_center=t,this}getVoice(){if(!this.voice)throw new s.s.RERR("NoVoice","Tickable has no voice.");return this.voice}setVoice(t){this.voice=t}getTuplet(){return this.tuplet}resetTuplet(t){let e,i;if(t){const s=this.tupletStack.indexOf(t);return-1!==s&&(this.tupletStack.splice(s,1),e=t.getNoteCount(),i=t.getNotesOccupied(),this.applyTickMultiplier(e,i)),this}for(;this.tupletStack.length;)e=(t=this.tupletStack.pop()).getNoteCount(),i=t.getNotesOccupied(),this.applyTickMultiplier(e,i);return this}setTuplet(t){if(t){this.tupletStack.push(t);const e=t.getNoteCount(),i=t.getNotesOccupied();this.applyTickMultiplier(i,e)}return this.tuplet=t,this}addToModifierContext(t){this.modifierContext=t,this.preFormatted=!1}addModifier(t){return this.modifiers.push(t),this.preFormatted=!1,this}getModifiers(){return this.modifiers}setTickContext(t){this.tickContext=t,this.preFormatted=!1}preFormat(){this.preFormatted||(this.width=0,this.modifierContext&&(this.modifierContext.preFormat(),this.width+=this.modifierContext.getWidth()))}postFormat(){return this.postFormatted||(this.postFormatted=!0),this}getIntrinsicTicks(){return this.intrinsicTicks}setIntrinsicTicks(t){this.intrinsicTicks=t,this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}getTickMultiplier(){return this.tickMultiplier}applyTickMultiplier(t,e){this.tickMultiplier.multiply(t,e),this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}setDuration(t){const e=t.numerator*(r.Z.RESOLUTION/t.denominator);this.ticks=this.tickMultiplier.clone().multiply(e),this.intrinsicTicks=this.ticks.value()}}},4552:(t,e,i)=>{"use strict";i.d(e,{s:()=>s});const s=()=>{};s.L=(t,e)=>{if(!e)return;const i=Array.prototype.slice.call(e).join(" ");window.console.log(t+": "+i)},s.MakeException=t=>class extends Error{constructor(e,i){super(e),this.name=t,this.message=e,this.data=i}},s.RuntimeError=class{constructor(t,e){this.code=t,this.message=e}toString(){return"[RuntimeError] "+this.code+":"+this.message}},s.RERR=s.RuntimeError,s.Merge=(t,e)=>{for(const i in e)t[i]=e[i];return t},s.Min=Math.min,s.Max=Math.max,s.forEach=(t,e)=>{for(let i=0;it%e>=e/2?parseInt(t/e,10)*e+e:parseInt(t/e,10)*e,s.MidLine=(t,e)=>{let i=e+(t-e)/2;return i%2>0&&(i=s.RoundN(10*i,5)/10),i},s.SortAndUnique=(t,e,i)=>{if(t.length>1){const s=[];let n;t.sort(e);for(let e=0;e{let i=t.length;for(;i--;)if(t[i]===e)return!0;return!1},s.getCanvasContext=t=>{if(!t)throw new s.RERR("BadArgument","Invalid canvas selector: "+t);const e=document.getElementById(t);if(!e||!e.getContext)throw new s.RERR("UnsupportedBrowserError","This browser does not support HTML5 Canvas");return e.getContext("2d")},s.drawDot=(t,e,i,s="#55")=>{t.save(),t.setFillStyle(s),t.beginPath(),t.arc(e,i,3,0,2*Math.PI,!0),t.closePath(),t.fill(),t.restore()},s.BM=(t,e)=>{const i=(new Date).getTime();e();const n=(new Date).getTime()-i;s.L(t+n+"ms")},s.StackTrace=()=>(new Error).stack,s.W=(...t)=>{const e=t.join(" ");window.console.log("Warning: ",e,s.StackTrace())},s.Prefix=t=>s.Prefix.prefix+t,s.Prefix.prefix="vf-"}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s].call(r.exports,r,r.exports,i),r.exports}return i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(3607)})()));