12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- var an=Object.defineProperty;var ln=(i,e,t)=>e in i?an(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ct=(i,e,t)=>(ln(i,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function t(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=t(r);fetch(r.href,o)}})();const index="",common="",popup$1="",SnackbarSfc="",elevation="",loading="",button="",icon="",snackbar="",coreSfc="",cell="",CellSfc="",ripple="",formDetails="",hoverOverlay="",_switch="",SwitchSfc="",style="";function makeMap(i,e){const t=Object.create(null),s=i.split(",");for(let r=0;r<s.length;r++)t[s[r]]=!0;return e?r=>!!t[r.toLowerCase()]:r=>!!t[r]}function normalizeStyle(i){if(isArray$8(i)){const e={};for(let t=0;t<i.length;t++){const s=i[t],r=isString$2(s)?parseStringStyle(s):normalizeStyle(s);if(r)for(const o in r)e[o]=r[o]}return e}else{if(isString$2(i))return i;if(isObject$4(i))return i}}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=new RegExp("\\/\\*.*?\\*\\/","gs");function parseStringStyle(i){const e={};return i.replace(styleCommentRE,"").split(listDelimiterRE).forEach(t=>{if(t){const s=t.split(propertyDelimiterRE);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function normalizeClass(i){let e="";if(isString$2(i))e=i;else if(isArray$8(i))for(let t=0;t<i.length;t++){const s=normalizeClass(i[t]);s&&(e+=s+" ")}else if(isObject$4(i))for(const t in i)i[t]&&(e+=t+" ");return e.trim()}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(i){return!!i||i===""}const toDisplayString=i=>isString$2(i)?i:i==null?"":isArray$8(i)||isObject$4(i)&&(i.toString===objectToString$2||!isFunction$4(i.toString))?JSON.stringify(i,replacer,2):String(i),replacer=(i,e)=>e&&e.__v_isRef?replacer(i,e.value):isMap$1(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[s,r])=>(t[`${s} =>`]=r,t),{})}:isSet$1(e)?{[`Set(${e.size})`]:[...e.values()]}:isObject$4(e)&&!isArray$8(e)&&!isPlainObject$3(e)?String(e):e,EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=i=>onRE.test(i),isModelListener=i=>i.startsWith("onUpdate:"),extend$3=Object.assign,remove$7=(i,e)=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)},hasOwnProperty$3=Object.prototype.hasOwnProperty,hasOwn$2=(i,e)=>hasOwnProperty$3.call(i,e),isArray$8=Array.isArray,isMap$1=i=>toTypeString(i)==="[object Map]",isSet$1=i=>toTypeString(i)==="[object Set]",isFunction$4=i=>typeof i=="function",isString$2=i=>typeof i=="string",isSymbol$1=i=>typeof i=="symbol",isObject$4=i=>i!==null&&typeof i=="object",isPromise$1=i=>isObject$4(i)&&isFunction$4(i.then)&&isFunction$4(i.catch),objectToString$2=Object.prototype.toString,toTypeString=i=>objectToString$2.call(i),toRawType=i=>toTypeString(i).slice(8,-1),isPlainObject$3=i=>toTypeString(i)==="[object Object]",isIntegerKey=i=>isString$2(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=i=>{const e=Object.create(null);return t=>e[t]||(e[t]=i(t))},camelizeRE$1=/-(\w)/g,camelize$1=cacheStringFunction(i=>i.replace(camelizeRE$1,(e,t)=>t?t.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(i=>i.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(i=>i.charAt(0).toUpperCase()+i.slice(1)),toHandlerKey=cacheStringFunction(i=>i?`on${capitalize(i)}`:""),hasChanged=(i,e)=>!Object.is(i,e),invokeArrayFns=(i,e)=>{for(let t=0;t<i.length;t++)i[t](e)},def=(i,e,t)=>{Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value:t})},looseToNumber=i=>{const e=parseFloat(i);return isNaN(e)?i:e},toNumber$1=i=>{const e=isString$2(i)?Number(i):NaN;return isNaN(e)?i:e};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=t}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let t,s;for(t=0,s=this.effects.length;t<s;t++)this.effects[t].stop();for(t=0,s=this.cleanups.length;t<s;t++)this.cleanups[t]();if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function recordEffectScope(i,e=activeEffectScope){e&&e.active&&e.effects.push(i)}function getCurrentScope(){return activeEffectScope}const createDep=i=>{const e=new Set(i);return e.w=0,e.n=0,e},wasTracked=i=>(i.w&trackOpBit)>0,newTracked=i=>(i.n&trackOpBit)>0,initDepMarkers=({deps:i})=>{if(i.length)for(let e=0;e<i.length;e++)i[e].w|=trackOpBit},finalizeDepMarkers=i=>{const{deps:e}=i;if(e.length){let t=0;for(let s=0;s<e.length;s++){const r=e[s];wasTracked(r)&&!newTracked(r)?r.delete(i):e[t++]=r,r.w&=~trackOpBit,r.n&=~trackOpBit}e.length=t}},targetMap=new WeakMap;let effectTrackDepth=0,trackOpBit=1;const maxMarkerBits=30;let activeEffect;const ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol("");class ReactiveEffect{constructor(e,t=null,s){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,recordEffectScope(this,s)}run(){if(!this.active)return this.fn();let e=activeEffect,t=shouldTrack;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=activeEffect,activeEffect=this,shouldTrack=!0,trackOpBit=1<<++effectTrackDepth,effectTrackDepth<=maxMarkerBits?initDepMarkers(this):cleanupEffect(this),this.fn()}finally{effectTrackDepth<=maxMarkerBits&&finalizeDepMarkers(this),trackOpBit=1<<--effectTrackDepth,activeEffect=this.parent,shouldTrack=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){activeEffect===this?this.deferStop=!0:this.active&&(cleanupEffect(this),this.onStop&&this.onStop(),this.active=!1)}}function cleanupEffect(i){const{deps:e}=i;if(e.length){for(let t=0;t<e.length;t++)e[t].delete(i);e.length=0}}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const i=trackStack.pop();shouldTrack=i===void 0?!0:i}function track(i,e,t){if(shouldTrack&&activeEffect){let s=targetMap.get(i);s||targetMap.set(i,s=new Map);let r=s.get(t);r||s.set(t,r=createDep()),trackEffects(r)}}function trackEffects(i,e){let t=!1;effectTrackDepth<=maxMarkerBits?newTracked(i)||(i.n|=trackOpBit,t=!wasTracked(i)):t=!i.has(activeEffect),t&&(i.add(activeEffect),activeEffect.deps.push(i))}function trigger(i,e,t,s,r,o){const a=targetMap.get(i);if(!a)return;let l=[];if(e==="clear")l=[...a.values()];else if(t==="length"&&isArray$8(i)){const c=Number(s);a.forEach((d,m)=>{(m==="length"||m>=c)&&l.push(d)})}else switch(t!==void 0&&l.push(a.get(t)),e){case"add":isArray$8(i)?isIntegerKey(t)&&l.push(a.get("length")):(l.push(a.get(ITERATE_KEY)),isMap$1(i)&&l.push(a.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$8(i)||(l.push(a.get(ITERATE_KEY)),isMap$1(i)&&l.push(a.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$1(i)&&l.push(a.get(ITERATE_KEY));break}if(l.length===1)l[0]&&triggerEffects(l[0]);else{const c=[];for(const d of l)d&&c.push(...d);triggerEffects(createDep(c))}}function triggerEffects(i,e){const t=isArray$8(i)?i:[...i];for(const s of t)s.computed&&triggerEffect(s);for(const s of t)s.computed||triggerEffect(s)}function triggerEffect(i,e){(i!==activeEffect||i.allowRecurse)&&(i.scheduler?i.scheduler():i.run())}function getDepFromReactive(i,e){var t;return(t=targetMap.get(i))===null||t===void 0?void 0:t.get(e)}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(isSymbol$1)),get$1=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const i={};return["includes","indexOf","lastIndexOf"].forEach(e=>{i[e]=function(...t){const s=toRaw(this);for(let o=0,a=this.length;o<a;o++)track(s,"get",o+"");const r=s[e](...t);return r===-1||r===!1?s[e](...t.map(toRaw)):r}}),["push","pop","shift","unshift","splice"].forEach(e=>{i[e]=function(...t){pauseTracking();const s=toRaw(this)[e].apply(this,t);return resetTracking(),s}}),i}function hasOwnProperty$2(i){const e=toRaw(this);return track(e,"has",i),e.hasOwnProperty(i)}function createGetter(i=!1,e=!1){return function(s,r,o){if(r==="__v_isReactive")return!i;if(r==="__v_isReadonly")return i;if(r==="__v_isShallow")return e;if(r==="__v_raw"&&o===(i?e?shallowReadonlyMap:readonlyMap:e?shallowReactiveMap:reactiveMap).get(s))return s;const a=isArray$8(s);if(!i){if(a&&hasOwn$2(arrayInstrumentations,r))return Reflect.get(arrayInstrumentations,r,o);if(r==="hasOwnProperty")return hasOwnProperty$2}const l=Reflect.get(s,r,o);return(isSymbol$1(r)?builtInSymbols.has(r):isNonTrackableKeys(r))||(i||track(s,"get",r),e)?l:isRef(l)?a&&isIntegerKey(r)?l:l.value:isObject$4(l)?i?readonly(l):reactive(l):l}}const set$1=createSetter(),shallowSet=createSetter(!0);function createSetter(i=!1){return function(t,s,r,o){let a=t[s];if(isReadonly(a)&&isRef(a)&&!isRef(r))return!1;if(!i&&(!isShallow(r)&&!isReadonly(r)&&(a=toRaw(a),r=toRaw(r)),!isArray$8(t)&&isRef(a)&&!isRef(r)))return a.value=r,!0;const l=isArray$8(t)&&isIntegerKey(s)?Number(s)<t.length:hasOwn$2(t,s),c=Reflect.set(t,s,r,o);return t===toRaw(o)&&(l?hasChanged(r,a)&&trigger(t,"set",s,r):trigger(t,"add",s,r)),c}}function deleteProperty(i,e){const t=hasOwn$2(i,e);i[e];const s=Reflect.deleteProperty(i,e);return s&&t&&trigger(i,"delete",e,void 0),s}function has$1$1(i,e){const t=Reflect.has(i,e);return(!isSymbol$1(e)||!builtInSymbols.has(e))&&track(i,"has",e),t}function ownKeys$1(i){return track(i,"iterate",isArray$8(i)?"length":ITERATE_KEY),Reflect.ownKeys(i)}const mutableHandlers={get:get$1,set:set$1,deleteProperty,has:has$1$1,ownKeys:ownKeys$1},readonlyHandlers={get:readonlyGet,set(i,e){return!0},deleteProperty(i,e){return!0}},shallowReactiveHandlers=extend$3({},mutableHandlers,{get:shallowGet,set:shallowSet}),toShallow=i=>i,getProto$1=i=>Reflect.getPrototypeOf(i);function get$2(i,e,t=!1,s=!1){i=i.__v_raw;const r=toRaw(i),o=toRaw(e);t||(e!==o&&track(r,"get",e),track(r,"get",o));const{has:a}=getProto$1(r),l=s?toShallow:t?toReadonly:toReactive;if(a.call(r,e))return l(i.get(e));if(a.call(r,o))return l(i.get(o));i!==r&&i.get(e)}function has$4(i,e=!1){const t=this.__v_raw,s=toRaw(t),r=toRaw(i);return e||(i!==r&&track(s,"has",i),track(s,"has",r)),i===r?t.has(i):t.has(i)||t.has(r)}function size(i,e=!1){return i=i.__v_raw,!e&&track(toRaw(i),"iterate",ITERATE_KEY),Reflect.get(i,"size",i)}function add(i){i=toRaw(i);const e=toRaw(this);return getProto$1(e).has.call(e,i)||(e.add(i),trigger(e,"add",i,i)),this}function set(i,e){e=toRaw(e);const t=toRaw(this),{has:s,get:r}=getProto$1(t);let o=s.call(t,i);o||(i=toRaw(i),o=s.call(t,i));const a=r.call(t,i);return t.set(i,e),o?hasChanged(e,a)&&trigger(t,"set",i,e):trigger(t,"add",i,e),this}function deleteEntry(i){const e=toRaw(this),{has:t,get:s}=getProto$1(e);let r=t.call(e,i);r||(i=toRaw(i),r=t.call(e,i)),s&&s.call(e,i);const o=e.delete(i);return r&&trigger(e,"delete",i,void 0),o}function clear(){const i=toRaw(this),e=i.size!==0,t=i.clear();return e&&trigger(i,"clear",void 0,void 0),t}function createForEach(i,e){return function(s,r){const o=this,a=o.__v_raw,l=toRaw(a),c=e?toShallow:i?toReadonly:toReactive;return!i&&track(l,"iterate",ITERATE_KEY),a.forEach((d,m)=>s.call(r,c(d),c(m),o))}}function createIterableMethod(i,e,t){return function(...s){const r=this.__v_raw,o=toRaw(r),a=isMap$1(o),l=i==="entries"||i===Symbol.iterator&&a,c=i==="keys"&&a,d=r[i](...s),m=t?toShallow:e?toReadonly:toReactive;return!e&&track(o,"iterate",c?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:u,done:g}=d.next();return g?{value:u,done:g}:{value:l?[m(u[0]),m(u[1])]:m(u),done:g}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(i){return function(...e){return i==="delete"?!1:this}}function createInstrumentations(){const i={get(o){return get$2(this,o)},get size(){return size(this)},has:has$4,add,set,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(o){return get$2(this,o,!1,!0)},get size(){return size(this)},has:has$4,add,set,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},t={get(o){return get$2(this,o,!0)},get size(){return size(this,!0)},has(o){return has$4.call(this,o,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},s={get(o){return get$2(this,o,!0,!0)},get size(){return size(this,!0)},has(o){return has$4.call(this,o,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{i[o]=createIterableMethod(o,!1,!1),t[o]=createIterableMethod(o,!0,!1),e[o]=createIterableMethod(o,!1,!0),s[o]=createIterableMethod(o,!0,!0)}),[i,t,e,s]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(i,e){const t=e?i?shallowReadonlyInstrumentations:shallowInstrumentations:i?readonlyInstrumentations:mutableInstrumentations;return(s,r,o)=>r==="__v_isReactive"?!i:r==="__v_isReadonly"?i:r==="__v_raw"?s:Reflect.get(hasOwn$2(t,r)&&r in s?t:s,r,o)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(i){return i.__v_skip||!Object.isExtensible(i)?0:targetTypeMap(toRawType(i))}function reactive(i){return isReadonly(i)?i:createReactiveObject(i,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(i){return createReactiveObject(i,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(i){return createReactiveObject(i,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(i,e,t,s,r){if(!isObject$4(i)||i.__v_raw&&!(e&&i.__v_isReactive))return i;const o=r.get(i);if(o)return o;const a=getTargetType(i);if(a===0)return i;const l=new Proxy(i,a===2?s:t);return r.set(i,l),l}function isReactive(i){return isReadonly(i)?isReactive(i.__v_raw):!!(i&&i.__v_isReactive)}function isReadonly(i){return!!(i&&i.__v_isReadonly)}function isShallow(i){return!!(i&&i.__v_isShallow)}function isProxy(i){return isReactive(i)||isReadonly(i)}function toRaw(i){const e=i&&i.__v_raw;return e?toRaw(e):i}function markRaw(i){return def(i,"__v_skip",!0),i}const toReactive=i=>isObject$4(i)?reactive(i):i,toReadonly=i=>isObject$4(i)?readonly(i):i;function trackRefValue(i){shouldTrack&&activeEffect&&(i=toRaw(i),trackEffects(i.dep||(i.dep=createDep())))}function triggerRefValue(i,e){i=toRaw(i);const t=i.dep;t&&triggerEffects(t)}function isRef(i){return!!(i&&i.__v_isRef===!0)}function ref(i){return createRef(i,!1)}function shallowRef(i){return createRef(i,!0)}function createRef(i,e){return isRef(i)?i:new RefImpl(i,e)}class RefImpl{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:toRaw(e),this._value=t?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const t=this.__v_isShallow||isShallow(e)||isReadonly(e);e=t?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:toReactive(e),triggerRefValue(this))}}function unref(i){return isRef(i)?i.value:i}const shallowUnwrapHandlers={get:(i,e,t)=>unref(Reflect.get(i,e,t)),set:(i,e,t,s)=>{const r=i[e];return isRef(r)&&!isRef(t)?(r.value=t,!0):Reflect.set(i,e,t,s)}};function proxyRefs(i){return isReactive(i)?i:new Proxy(i,shallowUnwrapHandlers)}function toRefs(i){const e=isArray$8(i)?new Array(i.length):{};for(const t in i)e[t]=toRef(i,t);return e}class ObjectRefImpl{constructor(e,t,s){this._object=e,this._key=t,this._defaultValue=s,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}function toRef(i,e,t){const s=i[e];return isRef(s)?s:new ObjectRefImpl(i,e,t)}var _a$1;class ComputedRefImpl{constructor(e,t,s,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[_a$1]=!1,this._dirty=!0,this.effect=new ReactiveEffect(e,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const e=toRaw(this);return trackRefValue(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}_a$1="__v_isReadonly";function computed$1(i,e,t=!1){let s,r;const o=isFunction$4(i);return o?(s=i,r=NOOP):(s=i.get,r=i.set),new ComputedRefImpl(s,r,o||!r,t)}function warn(i,...e){}function callWithErrorHandling(i,e,t,s){let r;try{r=s?i(...s):i()}catch(o){handleError(o,e,t)}return r}function callWithAsyncErrorHandling(i,e,t,s){if(isFunction$4(i)){const o=callWithErrorHandling(i,e,t,s);return o&&isPromise$1(o)&&o.catch(a=>{handleError(a,e,t)}),o}const r=[];for(let o=0;o<i.length;o++)r.push(callWithAsyncErrorHandling(i[o],e,t,s));return r}function handleError(i,e,t,s=!0){const r=e?e.vnode:null;if(e){let o=e.parent;const a=e.proxy,l=t;for(;o;){const d=o.ec;if(d){for(let m=0;m<d.length;m++)if(d[m](i,a,l)===!1)return}o=o.parent}const c=e.appContext.config.errorHandler;if(c){callWithErrorHandling(c,null,10,[i,a,l]);return}}logError(i,t,r,s)}function logError(i,e,t,s=!0){console.error(i)}let isFlushing=!1,isFlushPending=!1;const queue$1=[];let flushIndex=0;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(i){const e=currentFlushPromise||resolvedPromise;return i?e.then(this?i.bind(this):i):e}function findInsertionIndex(i){let e=flushIndex+1,t=queue$1.length;for(;e<t;){const s=e+t>>>1;getId(queue$1[s])<i?e=s+1:t=s}return e}function queueJob(i){(!queue$1.length||!queue$1.includes(i,isFlushing&&i.allowRecurse?flushIndex+1:flushIndex))&&(i.id==null?queue$1.push(i):queue$1.splice(findInsertionIndex(i.id),0,i),queueFlush())}function queueFlush(){!isFlushing&&!isFlushPending&&(isFlushPending=!0,currentFlushPromise=resolvedPromise.then(flushJobs))}function invalidateJob(i){const e=queue$1.indexOf(i);e>flushIndex&&queue$1.splice(e,1)}function queuePostFlushCb(i){isArray$8(i)?pendingPostFlushCbs.push(...i):(!activePostFlushCbs||!activePostFlushCbs.includes(i,i.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(i),queueFlush()}function flushPreFlushCbs(i,e=isFlushing?flushIndex+1:0){for(;e<queue$1.length;e++){const t=queue$1[e];t&&t.pre&&(queue$1.splice(e,1),e--,t())}}function flushPostFlushCbs(i){if(pendingPostFlushCbs.length){const e=[...new Set(pendingPostFlushCbs)];if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...e);return}for(activePostFlushCbs=e,activePostFlushCbs.sort((t,s)=>getId(t)-getId(s)),postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++)activePostFlushCbs[postFlushIndex]();activePostFlushCbs=null,postFlushIndex=0}}const getId=i=>i.id==null?1/0:i.id,comparator=(i,e)=>{const t=getId(i)-getId(e);if(t===0){if(i.pre&&!e.pre)return-1;if(e.pre&&!i.pre)return 1}return t};function flushJobs(i){isFlushPending=!1,isFlushing=!0,queue$1.sort(comparator);const e=NOOP;try{for(flushIndex=0;flushIndex<queue$1.length;flushIndex++){const t=queue$1[flushIndex];t&&t.active!==!1&&callWithErrorHandling(t,null,14)}}finally{flushIndex=0,queue$1.length=0,flushPostFlushCbs(),isFlushing=!1,currentFlushPromise=null,(queue$1.length||pendingPostFlushCbs.length)&&flushJobs()}}function emit(i,e,...t){if(i.isUnmounted)return;const s=i.vnode.props||EMPTY_OBJ;let r=t;const o=e.startsWith("update:"),a=o&&e.slice(7);if(a&&a in s){const m=`${a==="modelValue"?"model":a}Modifiers`,{number:u,trim:g}=s[m]||EMPTY_OBJ;g&&(r=t.map(b=>isString$2(b)?b.trim():b)),u&&(r=t.map(looseToNumber))}let l,c=s[l=toHandlerKey(e)]||s[l=toHandlerKey(camelize$1(e))];!c&&o&&(c=s[l=toHandlerKey(hyphenate(e))]),c&&callWithAsyncErrorHandling(c,i,6,r);const d=s[l+"Once"];if(d){if(!i.emitted)i.emitted={};else if(i.emitted[l])return;i.emitted[l]=!0,callWithAsyncErrorHandling(d,i,6,r)}}function normalizeEmitsOptions(i,e,t=!1){const s=e.emitsCache,r=s.get(i);if(r!==void 0)return r;const o=i.emits;let a={},l=!1;if(!isFunction$4(i)){const c=d=>{const m=normalizeEmitsOptions(d,e,!0);m&&(l=!0,extend$3(a,m))};!t&&e.mixins.length&&e.mixins.forEach(c),i.extends&&c(i.extends),i.mixins&&i.mixins.forEach(c)}return!o&&!l?(isObject$4(i)&&s.set(i,null),null):(isArray$8(o)?o.forEach(c=>a[c]=null):extend$3(a,o),isObject$4(i)&&s.set(i,a),a)}function isEmitListener(i,e){return!i||!isOn(e)?!1:(e=e.slice(2).replace(/Once$/,""),hasOwn$2(i,e[0].toLowerCase()+e.slice(1))||hasOwn$2(i,hyphenate(e))||hasOwn$2(i,e))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(i){const e=currentRenderingInstance;return currentRenderingInstance=i,currentScopeId=i&&i.type.__scopeId||null,e}function pushScopeId(i){currentScopeId=i}function popScopeId(){currentScopeId=null}function withCtx(i,e=currentRenderingInstance,t){if(!e||i._n)return i;const s=(...r)=>{s._d&&setBlockTracking(-1);const o=setCurrentRenderingInstance(e);let a;try{a=i(...r)}finally{setCurrentRenderingInstance(o),s._d&&setBlockTracking(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function markAttrsAccessed(){}function renderComponentRoot(i){const{type:e,vnode:t,proxy:s,withProxy:r,props:o,propsOptions:[a],slots:l,attrs:c,emit:d,render:m,renderCache:u,data:g,setupState:b,ctx:y,inheritAttrs:S}=i;let v,x;const A=setCurrentRenderingInstance(i);try{if(t.shapeFlag&4){const w=r||s;v=normalizeVNode(m.call(w,w,u,o,b,g,y)),x=c}else{const w=e;v=normalizeVNode(w.length>1?w(o,{attrs:c,slots:l,emit:d}):w(o,null)),x=e.props?c:getFunctionalFallthrough(c)}}catch(w){blockStack.length=0,handleError(w,i,1),v=createVNode(Comment)}let E=v;if(x&&S!==!1){const w=Object.keys(x),{shapeFlag:_}=E;w.length&&_&7&&(a&&w.some(isModelListener)&&(x=filterModelListeners(x,a)),E=cloneVNode(E,x))}return t.dirs&&(E=cloneVNode(E),E.dirs=E.dirs?E.dirs.concat(t.dirs):t.dirs),t.transition&&(E.transition=t.transition),v=E,setCurrentRenderingInstance(A),v}const getFunctionalFallthrough=i=>{let e;for(const t in i)(t==="class"||t==="style"||isOn(t))&&((e||(e={}))[t]=i[t]);return e},filterModelListeners=(i,e)=>{const t={};for(const s in i)(!isModelListener(s)||!(s.slice(9)in e))&&(t[s]=i[s]);return t};function shouldUpdateComponent(i,e,t){const{props:s,children:r,component:o}=i,{props:a,children:l,patchFlag:c}=e,d=o.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&c>=0){if(c&1024)return!0;if(c&16)return s?hasPropsChanged(s,a,d):!!a;if(c&8){const m=e.dynamicProps;for(let u=0;u<m.length;u++){const g=m[u];if(a[g]!==s[g]&&!isEmitListener(d,g))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===a?!1:s?a?hasPropsChanged(s,a,d):!0:!!a;return!1}function hasPropsChanged(i,e,t){const s=Object.keys(e);if(s.length!==Object.keys(i).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(e[o]!==i[o]&&!isEmitListener(t,o))return!0}return!1}function updateHOCHostEl({vnode:i,parent:e},t){for(;e&&e.subTree===i;)(i=e.vnode).el=t,e=e.parent}const isSuspense=i=>i.__isSuspense;function queueEffectWithSuspense(i,e){e&&e.pendingBranch?isArray$8(i)?e.effects.push(...i):e.effects.push(i):queuePostFlushCb(i)}function provide(i,e){if(currentInstance){let t=currentInstance.provides;const s=currentInstance.parent&¤tInstance.parent.provides;s===t&&(t=currentInstance.provides=Object.create(s)),t[i]=e}}function inject(i,e,t=!1){const s=currentInstance||currentRenderingInstance;if(s){const r=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(r&&i in r)return r[i];if(arguments.length>1)return t&&isFunction$4(e)?e.call(s.proxy):e}}function watchEffect(i,e){return doWatch(i,null,e)}const INITIAL_WATCHER_VALUE={};function watch(i,e,t){return doWatch(i,e,t)}function doWatch(i,e,{immediate:t,deep:s,flush:r,onTrack:o,onTrigger:a}=EMPTY_OBJ){const l=getCurrentScope()===(currentInstance==null?void 0:currentInstance.scope)?currentInstance:null;let c,d=!1,m=!1;if(isRef(i)?(c=()=>i.value,d=isShallow(i)):isReactive(i)?(c=()=>i,s=!0):isArray$8(i)?(m=!0,d=i.some(E=>isReactive(E)||isShallow(E)),c=()=>i.map(E=>{if(isRef(E))return E.value;if(isReactive(E))return traverse(E);if(isFunction$4(E))return callWithErrorHandling(E,l,2)})):isFunction$4(i)?e?c=()=>callWithErrorHandling(i,l,2):c=()=>{if(!(l&&l.isUnmounted))return u&&u(),callWithAsyncErrorHandling(i,l,3,[g])}:c=NOOP,e&&s){const E=c;c=()=>traverse(E())}let u,g=E=>{u=x.onStop=()=>{callWithErrorHandling(E,l,4)}},b;if(isInSSRComponentSetup)if(g=NOOP,e?t&&callWithAsyncErrorHandling(e,l,3,[c(),m?[]:void 0,g]):c(),r==="sync"){const E=useSSRContext();b=E.__watcherHandles||(E.__watcherHandles=[])}else return NOOP;let y=m?new Array(i.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const S=()=>{if(x.active)if(e){const E=x.run();(s||d||(m?E.some((w,_)=>hasChanged(w,y[_])):hasChanged(E,y)))&&(u&&u(),callWithAsyncErrorHandling(e,l,3,[E,y===INITIAL_WATCHER_VALUE?void 0:m&&y[0]===INITIAL_WATCHER_VALUE?[]:y,g]),y=E)}else x.run()};S.allowRecurse=!!e;let v;r==="sync"?v=S:r==="post"?v=()=>queuePostRenderEffect(S,l&&l.suspense):(S.pre=!0,l&&(S.id=l.uid),v=()=>queueJob(S));const x=new ReactiveEffect(c,v);e?t?S():y=x.run():r==="post"?queuePostRenderEffect(x.run.bind(x),l&&l.suspense):x.run();const A=()=>{x.stop(),l&&l.scope&&remove$7(l.scope.effects,x)};return b&&b.push(A),A}function instanceWatch(i,e,t){const s=this.proxy,r=isString$2(i)?i.includes(".")?createPathGetter(s,i):()=>s[i]:i.bind(s,s);let o;isFunction$4(e)?o=e:(o=e.handler,t=e);const a=currentInstance;setCurrentInstance(this);const l=doWatch(r,o.bind(s),t);return a?setCurrentInstance(a):unsetCurrentInstance(),l}function createPathGetter(i,e){const t=e.split(".");return()=>{let s=i;for(let r=0;r<t.length&&s;r++)s=s[t[r]];return s}}function traverse(i,e){if(!isObject$4(i)||i.__v_skip||(e=e||new Set,e.has(i)))return i;if(e.add(i),isRef(i))traverse(i.value,e);else if(isArray$8(i))for(let t=0;t<i.length;t++)traverse(i[t],e);else if(isSet$1(i)||isMap$1(i))i.forEach(t=>{traverse(t,e)});else if(isPlainObject$3(i))for(const t in i)traverse(i[t],e);return i}function useTransitionState(){const i={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return onMounted(()=>{i.isMounted=!0}),onBeforeUnmount(()=>{i.isUnmounting=!0}),i}const TransitionHookValidator=[Function,Array],BaseTransitionImpl={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},setup(i,{slots:e}){const t=getCurrentInstance(),s=useTransitionState();let r;return()=>{const o=e.default&&getTransitionRawChildren(e.default(),!0);if(!o||!o.length)return;let a=o[0];if(o.length>1){for(const S of o)if(S.type!==Comment){a=S;break}}const l=toRaw(i),{mode:c}=l;if(s.isLeaving)return emptyPlaceholder(a);const d=getKeepAliveChild(a);if(!d)return emptyPlaceholder(a);const m=resolveTransitionHooks(d,l,s,t);setTransitionHooks(d,m);const u=t.subTree,g=u&&getKeepAliveChild(u);let b=!1;const{getTransitionKey:y}=d.type;if(y){const S=y();r===void 0?r=S:S!==r&&(r=S,b=!0)}if(g&&g.type!==Comment&&(!isSameVNodeType(d,g)||b)){const S=resolveTransitionHooks(g,l,s,t);if(setTransitionHooks(g,S),c==="out-in")return s.isLeaving=!0,S.afterLeave=()=>{s.isLeaving=!1,t.update.active!==!1&&t.update()},emptyPlaceholder(a);c==="in-out"&&d.type!==Comment&&(S.delayLeave=(v,x,A)=>{const E=getLeavingNodesForType(s,g);E[String(g.key)]=g,v._leaveCb=()=>{x(),v._leaveCb=void 0,delete m.delayedLeave},m.delayedLeave=A})}return a}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(i,e){const{leavingVNodes:t}=i;let s=t.get(e.type);return s||(s=Object.create(null),t.set(e.type,s)),s}function resolveTransitionHooks(i,e,t,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:d,onEnterCancelled:m,onBeforeLeave:u,onLeave:g,onAfterLeave:b,onLeaveCancelled:y,onBeforeAppear:S,onAppear:v,onAfterAppear:x,onAppearCancelled:A}=e,E=String(i.key),w=getLeavingNodesForType(t,i),_=(I,R)=>{I&&callWithAsyncErrorHandling(I,s,9,R)},C=(I,R)=>{const N=R[1];_(I,R),isArray$8(I)?I.every(G=>G.length<=1)&&N():I.length<=1&&N()},P={mode:o,persisted:a,beforeEnter(I){let R=l;if(!t.isMounted)if(r)R=S||l;else return;I._leaveCb&&I._leaveCb(!0);const N=w[E];N&&isSameVNodeType(i,N)&&N.el._leaveCb&&N.el._leaveCb(),_(R,[I])},enter(I){let R=c,N=d,G=m;if(!t.isMounted)if(r)R=v||c,N=x||d,G=A||m;else return;let B=!1;const k=I._enterCb=T=>{B||(B=!0,T?_(G,[I]):_(N,[I]),P.delayedLeave&&P.delayedLeave(),I._enterCb=void 0)};R?C(R,[I,k]):k()},leave(I,R){const N=String(i.key);if(I._enterCb&&I._enterCb(!0),t.isUnmounting)return R();_(u,[I]);let G=!1;const B=I._leaveCb=k=>{G||(G=!0,R(),k?_(y,[I]):_(b,[I]),I._leaveCb=void 0,w[N]===i&&delete w[N])};w[N]=i,g?C(g,[I,B]):B()},clone(I){return resolveTransitionHooks(I,e,t,s)}};return P}function emptyPlaceholder(i){if(isKeepAlive(i))return i=cloneVNode(i),i.children=null,i}function getKeepAliveChild(i){return isKeepAlive(i)?i.children?i.children[0]:void 0:i}function setTransitionHooks(i,e){i.shapeFlag&6&&i.component?setTransitionHooks(i.component.subTree,e):i.shapeFlag&128?(i.ssContent.transition=e.clone(i.ssContent),i.ssFallback.transition=e.clone(i.ssFallback)):i.transition=e}function getTransitionRawChildren(i,e=!1,t){let s=[],r=0;for(let o=0;o<i.length;o++){let a=i[o];const l=t==null?a.key:String(t)+String(a.key!=null?a.key:o);a.type===Fragment?(a.patchFlag&128&&r++,s=s.concat(getTransitionRawChildren(a.children,e,l))):(e||a.type!==Comment)&&s.push(l!=null?cloneVNode(a,{key:l}):a)}if(r>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function defineComponent(i){return isFunction$4(i)?{setup:i,name:i.name}:i}const isAsyncWrapper=i=>!!i.type.__asyncLoader,isKeepAlive=i=>i.type.__isKeepAlive;function onActivated(i,e){registerKeepAliveHook(i,"a",e)}function onDeactivated(i,e){registerKeepAliveHook(i,"da",e)}function registerKeepAliveHook(i,e,t=currentInstance){const s=i.__wdc||(i.__wdc=()=>{let r=t;for(;r;){if(r.isDeactivated)return;r=r.parent}return i()});if(injectHook(e,s,t),t){let r=t.parent;for(;r&&r.parent;)isKeepAlive(r.parent.vnode)&&injectToKeepAliveRoot(s,e,t,r),r=r.parent}}function injectToKeepAliveRoot(i,e,t,s){const r=injectHook(e,i,s,!0);onUnmounted(()=>{remove$7(s[e],r)},t)}function injectHook(i,e,t=currentInstance,s=!1){if(t){const r=t[i]||(t[i]=[]),o=e.__weh||(e.__weh=(...a)=>{if(t.isUnmounted)return;pauseTracking(),setCurrentInstance(t);const l=callWithAsyncErrorHandling(e,t,i,a);return unsetCurrentInstance(),resetTracking(),l});return s?r.unshift(o):r.push(o),o}}const createHook=i=>(e,t=currentInstance)=>(!isInSSRComponentSetup||i==="sp")&&injectHook(i,(...s)=>e(...s),t),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(i,e=currentInstance){injectHook("ec",i,e)}function withDirectives(i,e){const t=currentRenderingInstance;if(t===null)return i;const s=getExposeProxy(t)||t.proxy,r=i.dirs||(i.dirs=[]);for(let o=0;o<e.length;o++){let[a,l,c,d=EMPTY_OBJ]=e[o];a&&(isFunction$4(a)&&(a={mounted:a,updated:a}),a.deep&&traverse(l),r.push({dir:a,instance:s,value:l,oldValue:void 0,arg:c,modifiers:d}))}return i}function invokeDirectiveHook(i,e,t,s){const r=i.dirs,o=e&&e.dirs;for(let a=0;a<r.length;a++){const l=r[a];o&&(l.oldValue=o[a].value);let c=l.dir[s];c&&(pauseTracking(),callWithAsyncErrorHandling(c,t,8,[i.el,l,i,e]),resetTracking())}}const COMPONENTS="components";function resolveComponent(i,e){return resolveAsset(COMPONENTS,i,!0,e)||i}const NULL_DYNAMIC_COMPONENT=Symbol();function resolveDynamicComponent(i){return isString$2(i)?resolveAsset(COMPONENTS,i,!1)||i:i||NULL_DYNAMIC_COMPONENT}function resolveAsset(i,e,t=!0,s=!1){const r=currentRenderingInstance||currentInstance;if(r){const o=r.type;if(i===COMPONENTS){const l=getComponentName(o,!1);if(l&&(l===e||l===camelize$1(e)||l===capitalize(camelize$1(e))))return o}const a=resolve(r[i]||o[i],e)||resolve(r.appContext[i],e);return!a&&s?o:a}}function resolve(i,e){return i&&(i[e]||i[camelize$1(e)]||i[capitalize(camelize$1(e))])}function renderList(i,e,t,s){let r;const o=t&&t[s];if(isArray$8(i)||isString$2(i)){r=new Array(i.length);for(let a=0,l=i.length;a<l;a++)r[a]=e(i[a],a,void 0,o&&o[a])}else if(typeof i=="number"){r=new Array(i);for(let a=0;a<i;a++)r[a]=e(a+1,a,void 0,o&&o[a])}else if(isObject$4(i))if(i[Symbol.iterator])r=Array.from(i,(a,l)=>e(a,l,void 0,o&&o[l]));else{const a=Object.keys(i);r=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const d=a[l];r[l]=e(i[d],d,l,o&&o[l])}}else r=[];return t&&(t[s]=r),r}function renderSlot(i,e,t={},s,r){if(currentRenderingInstance.isCE||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.isCE)return e!=="default"&&(t.name=e),createVNode("slot",t,s&&s());let o=i[e];o&&o._c&&(o._d=!1),openBlock();const a=o&&ensureValidVNode(o(t)),l=createBlock(Fragment,{key:t.key||a&&a.key||`_${e}`},a||(s?s():[]),a&&i._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function ensureValidVNode(i){return i.some(e=>isVNode(e)?!(e.type===Comment||e.type===Fragment&&!ensureValidVNode(e.children)):!0)?i:null}const getPublicInstance=i=>i?isStatefulComponent(i)?getExposeProxy(i)||i.proxy:getPublicInstance(i.parent):null,publicPropertiesMap=extend$3(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>getPublicInstance(i.parent),$root:i=>getPublicInstance(i.root),$emit:i=>i.emit,$options:i=>resolveMergedOptions(i),$forceUpdate:i=>i.f||(i.f=()=>queueJob(i.update)),$nextTick:i=>i.n||(i.n=nextTick.bind(i.proxy)),$watch:i=>instanceWatch.bind(i)}),hasSetupBinding=(i,e)=>i!==EMPTY_OBJ&&!i.__isScriptSetup&&hasOwn$2(i,e),PublicInstanceProxyHandlers={get({_:i},e){const{ctx:t,setupState:s,data:r,props:o,accessCache:a,type:l,appContext:c}=i;let d;if(e[0]!=="$"){const b=a[e];if(b!==void 0)switch(b){case 1:return s[e];case 2:return r[e];case 4:return t[e];case 3:return o[e]}else{if(hasSetupBinding(s,e))return a[e]=1,s[e];if(r!==EMPTY_OBJ&&hasOwn$2(r,e))return a[e]=2,r[e];if((d=i.propsOptions[0])&&hasOwn$2(d,e))return a[e]=3,o[e];if(t!==EMPTY_OBJ&&hasOwn$2(t,e))return a[e]=4,t[e];shouldCacheAccess&&(a[e]=0)}}const m=publicPropertiesMap[e];let u,g;if(m)return e==="$attrs"&&track(i,"get",e),m(i);if((u=l.__cssModules)&&(u=u[e]))return u;if(t!==EMPTY_OBJ&&hasOwn$2(t,e))return a[e]=4,t[e];if(g=c.config.globalProperties,hasOwn$2(g,e))return g[e]},set({_:i},e,t){const{data:s,setupState:r,ctx:o}=i;return hasSetupBinding(r,e)?(r[e]=t,!0):s!==EMPTY_OBJ&&hasOwn$2(s,e)?(s[e]=t,!0):hasOwn$2(i.props,e)||e[0]==="$"&&e.slice(1)in i?!1:(o[e]=t,!0)},has({_:{data:i,setupState:e,accessCache:t,ctx:s,appContext:r,propsOptions:o}},a){let l;return!!t[a]||i!==EMPTY_OBJ&&hasOwn$2(i,a)||hasSetupBinding(e,a)||(l=o[0])&&hasOwn$2(l,a)||hasOwn$2(s,a)||hasOwn$2(publicPropertiesMap,a)||hasOwn$2(r.config.globalProperties,a)},defineProperty(i,e,t){return t.get!=null?i._.accessCache[e]=0:hasOwn$2(t,"value")&&this.set(i,e,t.value,null),Reflect.defineProperty(i,e,t)}};let shouldCacheAccess=!0;function applyOptions(i){const e=resolveMergedOptions(i),t=i.proxy,s=i.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook$1(e.beforeCreate,i,"bc");const{data:r,computed:o,methods:a,watch:l,provide:c,inject:d,created:m,beforeMount:u,mounted:g,beforeUpdate:b,updated:y,activated:S,deactivated:v,beforeDestroy:x,beforeUnmount:A,destroyed:E,unmounted:w,render:_,renderTracked:C,renderTriggered:P,errorCaptured:I,serverPrefetch:R,expose:N,inheritAttrs:G,components:B,directives:k,filters:T}=e;if(d&&resolveInjections(d,s,null,i.appContext.config.unwrapInjectedRef),a)for(const W in a){const se=a[W];isFunction$4(se)&&(s[W]=se.bind(t))}if(r){const W=r.call(t,t);isObject$4(W)&&(i.data=reactive(W))}if(shouldCacheAccess=!0,o)for(const W in o){const se=o[W],ie=isFunction$4(se)?se.bind(t,t):isFunction$4(se.get)?se.get.bind(t,t):NOOP,fe=!isFunction$4(se)&&isFunction$4(se.set)?se.set.bind(t):NOOP,J=computed({get:ie,set:fe});Object.defineProperty(s,W,{enumerable:!0,configurable:!0,get:()=>J.value,set:K=>J.value=K})}if(l)for(const W in l)createWatcher(l[W],s,t,W);if(c){const W=isFunction$4(c)?c.call(t):c;Reflect.ownKeys(W).forEach(se=>{provide(se,W[se])})}m&&callHook$1(m,i,"c");function Z(W,se){isArray$8(se)?se.forEach(ie=>W(ie.bind(t))):se&&W(se.bind(t))}if(Z(onBeforeMount,u),Z(onMounted,g),Z(onBeforeUpdate,b),Z(onUpdated,y),Z(onActivated,S),Z(onDeactivated,v),Z(onErrorCaptured,I),Z(onRenderTracked,C),Z(onRenderTriggered,P),Z(onBeforeUnmount,A),Z(onUnmounted,w),Z(onServerPrefetch,R),isArray$8(N))if(N.length){const W=i.exposed||(i.exposed={});N.forEach(se=>{Object.defineProperty(W,se,{get:()=>t[se],set:ie=>t[se]=ie})})}else i.exposed||(i.exposed={});_&&i.render===NOOP&&(i.render=_),G!=null&&(i.inheritAttrs=G),B&&(i.components=B),k&&(i.directives=k)}function resolveInjections(i,e,t=NOOP,s=!1){isArray$8(i)&&(i=normalizeInject(i));for(const r in i){const o=i[r];let a;isObject$4(o)?"default"in o?a=inject(o.from||r,o.default,!0):a=inject(o.from||r):a=inject(o),isRef(a)&&s?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>a.value,set:l=>a.value=l}):e[r]=a}}function callHook$1(i,e,t){callWithAsyncErrorHandling(isArray$8(i)?i.map(s=>s.bind(e.proxy)):i.bind(e.proxy),e,t)}function createWatcher(i,e,t,s){const r=s.includes(".")?createPathGetter(t,s):()=>t[s];if(isString$2(i)){const o=e[i];isFunction$4(o)&&watch(r,o)}else if(isFunction$4(i))watch(r,i.bind(t));else if(isObject$4(i))if(isArray$8(i))i.forEach(o=>createWatcher(o,e,t,s));else{const o=isFunction$4(i.handler)?i.handler.bind(t):e[i.handler];isFunction$4(o)&&watch(r,o,i)}}function resolveMergedOptions(i){const e=i.type,{mixins:t,extends:s}=e,{mixins:r,optionsCache:o,config:{optionMergeStrategies:a}}=i.appContext,l=o.get(e);let c;return l?c=l:!r.length&&!t&&!s?c=e:(c={},r.length&&r.forEach(d=>mergeOptions$1(c,d,a,!0)),mergeOptions$1(c,e,a)),isObject$4(e)&&o.set(e,c),c}function mergeOptions$1(i,e,t,s=!1){const{mixins:r,extends:o}=e;o&&mergeOptions$1(i,o,t,!0),r&&r.forEach(a=>mergeOptions$1(i,a,t,!0));for(const a in e)if(!(s&&a==="expose")){const l=internalOptionMergeStrats[a]||t&&t[a];i[a]=l?l(i[a],e[a]):e[a]}return i}const internalOptionMergeStrats={data:mergeDataFn,props:mergeObjectOptions,emits:mergeObjectOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(i,e){return e?i?function(){return extend$3(isFunction$4(i)?i.call(this,this):i,isFunction$4(e)?e.call(this,this):e)}:e:i}function mergeInject(i,e){return mergeObjectOptions(normalizeInject(i),normalizeInject(e))}function normalizeInject(i){if(isArray$8(i)){const e={};for(let t=0;t<i.length;t++)e[i[t]]=i[t];return e}return i}function mergeAsArray(i,e){return i?[...new Set([].concat(i,e))]:e}function mergeObjectOptions(i,e){return i?extend$3(extend$3(Object.create(null),i),e):e}function mergeWatchOptions(i,e){if(!i)return e;if(!e)return i;const t=extend$3(Object.create(null),i);for(const s in e)t[s]=mergeAsArray(i[s],e[s]);return t}function initProps(i,e,t,s=!1){const r={},o={};def(o,InternalObjectKey,1),i.propsDefaults=Object.create(null),setFullProps(i,e,r,o);for(const a in i.propsOptions[0])a in r||(r[a]=void 0);t?i.props=s?r:shallowReactive(r):i.type.props?i.props=r:i.props=o,i.attrs=o}function updateProps(i,e,t,s){const{props:r,attrs:o,vnode:{patchFlag:a}}=i,l=toRaw(r),[c]=i.propsOptions;let d=!1;if((s||a>0)&&!(a&16)){if(a&8){const m=i.vnode.dynamicProps;for(let u=0;u<m.length;u++){let g=m[u];if(isEmitListener(i.emitsOptions,g))continue;const b=e[g];if(c)if(hasOwn$2(o,g))b!==o[g]&&(o[g]=b,d=!0);else{const y=camelize$1(g);r[y]=resolvePropValue(c,l,y,b,i,!1)}else b!==o[g]&&(o[g]=b,d=!0)}}}else{setFullProps(i,e,r,o)&&(d=!0);let m;for(const u in l)(!e||!hasOwn$2(e,u)&&((m=hyphenate(u))===u||!hasOwn$2(e,m)))&&(c?t&&(t[u]!==void 0||t[m]!==void 0)&&(r[u]=resolvePropValue(c,l,u,void 0,i,!0)):delete r[u]);if(o!==l)for(const u in o)(!e||!hasOwn$2(e,u))&&(delete o[u],d=!0)}d&&trigger(i,"set","$attrs")}function setFullProps(i,e,t,s){const[r,o]=i.propsOptions;let a=!1,l;if(e)for(let c in e){if(isReservedProp(c))continue;const d=e[c];let m;r&&hasOwn$2(r,m=camelize$1(c))?!o||!o.includes(m)?t[m]=d:(l||(l={}))[m]=d:isEmitListener(i.emitsOptions,c)||(!(c in s)||d!==s[c])&&(s[c]=d,a=!0)}if(o){const c=toRaw(t),d=l||EMPTY_OBJ;for(let m=0;m<o.length;m++){const u=o[m];t[u]=resolvePropValue(r,c,u,d[u],i,!hasOwn$2(d,u))}}return a}function resolvePropValue(i,e,t,s,r,o){const a=i[t];if(a!=null){const l=hasOwn$2(a,"default");if(l&&s===void 0){const c=a.default;if(a.type!==Function&&isFunction$4(c)){const{propsDefaults:d}=r;t in d?s=d[t]:(setCurrentInstance(r),s=d[t]=c.call(null,e),unsetCurrentInstance())}else s=c}a[0]&&(o&&!l?s=!1:a[1]&&(s===""||s===hyphenate(t))&&(s=!0))}return s}function normalizePropsOptions(i,e,t=!1){const s=e.propsCache,r=s.get(i);if(r)return r;const o=i.props,a={},l=[];let c=!1;if(!isFunction$4(i)){const m=u=>{c=!0;const[g,b]=normalizePropsOptions(u,e,!0);extend$3(a,g),b&&l.push(...b)};!t&&e.mixins.length&&e.mixins.forEach(m),i.extends&&m(i.extends),i.mixins&&i.mixins.forEach(m)}if(!o&&!c)return isObject$4(i)&&s.set(i,EMPTY_ARR),EMPTY_ARR;if(isArray$8(o))for(let m=0;m<o.length;m++){const u=camelize$1(o[m]);validatePropName(u)&&(a[u]=EMPTY_OBJ)}else if(o)for(const m in o){const u=camelize$1(m);if(validatePropName(u)){const g=o[m],b=a[u]=isArray$8(g)||isFunction$4(g)?{type:g}:Object.assign({},g);if(b){const y=getTypeIndex(Boolean,b.type),S=getTypeIndex(String,b.type);b[0]=y>-1,b[1]=S<0||y<S,(y>-1||hasOwn$2(b,"default"))&&l.push(u)}}}const d=[a,l];return isObject$4(i)&&s.set(i,d),d}function validatePropName(i){return i[0]!=="$"}function getType(i){const e=i&&i.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:i===null?"null":""}function isSameType(i,e){return getType(i)===getType(e)}function getTypeIndex(i,e){return isArray$8(e)?e.findIndex(t=>isSameType(t,i)):isFunction$4(e)&&isSameType(e,i)?0:-1}const isInternalKey=i=>i[0]==="_"||i==="$stable",normalizeSlotValue=i=>isArray$8(i)?i.map(normalizeVNode):[normalizeVNode(i)],normalizeSlot$1=(i,e,t)=>{if(e._n)return e;const s=withCtx((...r)=>normalizeSlotValue(e(...r)),t);return s._c=!1,s},normalizeObjectSlots=(i,e,t)=>{const s=i._ctx;for(const r in i){if(isInternalKey(r))continue;const o=i[r];if(isFunction$4(o))e[r]=normalizeSlot$1(r,o,s);else if(o!=null){const a=normalizeSlotValue(o);e[r]=()=>a}}},normalizeVNodeSlots=(i,e)=>{const t=normalizeSlotValue(e);i.slots.default=()=>t},initSlots=(i,e)=>{if(i.vnode.shapeFlag&32){const t=e._;t?(i.slots=toRaw(e),def(e,"_",t)):normalizeObjectSlots(e,i.slots={})}else i.slots={},e&&normalizeVNodeSlots(i,e);def(i.slots,InternalObjectKey,1)},updateSlots=(i,e,t)=>{const{vnode:s,slots:r}=i;let o=!0,a=EMPTY_OBJ;if(s.shapeFlag&32){const l=e._;l?t&&l===1?o=!1:(extend$3(r,e),!t&&l===1&&delete r._):(o=!e.$stable,normalizeObjectSlots(e,r)),a=e}else e&&(normalizeVNodeSlots(i,e),a={default:1});if(o)for(const l in r)!isInternalKey(l)&&!(l in a)&&delete r[l]};function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(i,e){return function(s,r=null){isFunction$4(s)||(s=Object.assign({},s)),r!=null&&!isObject$4(r)&&(r=null);const o=createAppContext(),a=new Set;let l=!1;const c=o.app={_uid:uid$1++,_component:s,_props:r,_container:null,_context:o,_instance:null,version,get config(){return o.config},set config(d){},use(d,...m){return a.has(d)||(d&&isFunction$4(d.install)?(a.add(d),d.install(c,...m)):isFunction$4(d)&&(a.add(d),d(c,...m))),c},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),c},component(d,m){return m?(o.components[d]=m,c):o.components[d]},directive(d,m){return m?(o.directives[d]=m,c):o.directives[d]},mount(d,m,u){if(!l){const g=createVNode(s,r);return g.appContext=o,m&&e?e(g,d):i(g,d,u),l=!0,c._container=d,d.__vue_app__=c,getExposeProxy(g.component)||g.component.proxy}},unmount(){l&&(i(null,c._container),delete c._container.__vue_app__)},provide(d,m){return o.provides[d]=m,c}};return c}}function setRef(i,e,t,s,r=!1){if(isArray$8(i)){i.forEach((g,b)=>setRef(g,e&&(isArray$8(e)?e[b]:e),t,s,r));return}if(isAsyncWrapper(s)&&!r)return;const o=s.shapeFlag&4?getExposeProxy(s.component)||s.component.proxy:s.el,a=r?null:o,{i:l,r:c}=i,d=e&&e.r,m=l.refs===EMPTY_OBJ?l.refs={}:l.refs,u=l.setupState;if(d!=null&&d!==c&&(isString$2(d)?(m[d]=null,hasOwn$2(u,d)&&(u[d]=null)):isRef(d)&&(d.value=null)),isFunction$4(c))callWithErrorHandling(c,l,12,[a,m]);else{const g=isString$2(c),b=isRef(c);if(g||b){const y=()=>{if(i.f){const S=g?hasOwn$2(u,c)?u[c]:m[c]:c.value;r?isArray$8(S)&&remove$7(S,o):isArray$8(S)?S.includes(o)||S.push(o):g?(m[c]=[o],hasOwn$2(u,c)&&(u[c]=m[c])):(c.value=[o],i.k&&(m[i.k]=c.value))}else g?(m[c]=a,hasOwn$2(u,c)&&(u[c]=a)):b&&(c.value=a,i.k&&(m[i.k]=a))};a?(y.id=-1,queuePostRenderEffect(y,t)):y()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(i){return baseCreateRenderer(i)}function baseCreateRenderer(i,e){const t=getGlobalThis();t.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:a,createText:l,createComment:c,setText:d,setElementText:m,parentNode:u,nextSibling:g,setScopeId:b=NOOP,insertStaticContent:y}=i,S=(U,$,M,Q=null,z=null,F=null,O=!1,H=null,ne=!!$.dynamicChildren)=>{if(U===$)return;U&&!isSameVNodeType(U,$)&&(Q=de(U),K(U,z,F,!0),U=null),$.patchFlag===-2&&(ne=!1,$.dynamicChildren=null);const{type:ee,ref:te,shapeFlag:ce}=$;switch(ee){case Text:v(U,$,M,Q);break;case Comment:x(U,$,M,Q);break;case Static:U==null&&A($,M,Q,O);break;case Fragment:B(U,$,M,Q,z,F,O,H,ne);break;default:ce&1?_(U,$,M,Q,z,F,O,H,ne):ce&6?k(U,$,M,Q,z,F,O,H,ne):(ce&64||ce&128)&&ee.process(U,$,M,Q,z,F,O,H,ne,me)}te!=null&&z&&setRef(te,U&&U.ref,F,$||U,!$)},v=(U,$,M,Q)=>{if(U==null)s($.el=l($.children),M,Q);else{const z=$.el=U.el;$.children!==U.children&&d(z,$.children)}},x=(U,$,M,Q)=>{U==null?s($.el=c($.children||""),M,Q):$.el=U.el},A=(U,$,M,Q)=>{[U.el,U.anchor]=y(U.children,$,M,Q,U.el,U.anchor)},E=({el:U,anchor:$},M,Q)=>{let z;for(;U&&U!==$;)z=g(U),s(U,M,Q),U=z;s($,M,Q)},w=({el:U,anchor:$})=>{let M;for(;U&&U!==$;)M=g(U),r(U),U=M;r($)},_=(U,$,M,Q,z,F,O,H,ne)=>{O=O||$.type==="svg",U==null?C($,M,Q,z,F,O,H,ne):R(U,$,z,F,O,H,ne)},C=(U,$,M,Q,z,F,O,H)=>{let ne,ee;const{type:te,props:ce,shapeFlag:he,transition:re,dirs:ge}=U;if(ne=U.el=a(U.type,F,ce&&ce.is,ce),he&8?m(ne,U.children):he&16&&I(U.children,ne,null,Q,z,F&&te!=="foreignObject",O,H),ge&&invokeDirectiveHook(U,null,Q,"created"),P(ne,U,U.scopeId,O,Q),ce){for(const ue in ce)ue!=="value"&&!isReservedProp(ue)&&o(ne,ue,null,ce[ue],F,U.children,Q,z,ae);"value"in ce&&o(ne,"value",null,ce.value),(ee=ce.onVnodeBeforeMount)&&invokeVNodeHook(ee,Q,U)}ge&&invokeDirectiveHook(U,null,Q,"beforeMount");const xe=(!z||z&&!z.pendingBranch)&&re&&!re.persisted;xe&&re.beforeEnter(ne),s(ne,$,M),((ee=ce&&ce.onVnodeMounted)||xe||ge)&&queuePostRenderEffect(()=>{ee&&invokeVNodeHook(ee,Q,U),xe&&re.enter(ne),ge&&invokeDirectiveHook(U,null,Q,"mounted")},z)},P=(U,$,M,Q,z)=>{if(M&&b(U,M),Q)for(let F=0;F<Q.length;F++)b(U,Q[F]);if(z){let F=z.subTree;if($===F){const O=z.vnode;P(U,O,O.scopeId,O.slotScopeIds,z.parent)}}},I=(U,$,M,Q,z,F,O,H,ne=0)=>{for(let ee=ne;ee<U.length;ee++){const te=U[ee]=H?cloneIfMounted(U[ee]):normalizeVNode(U[ee]);S(null,te,$,M,Q,z,F,O,H)}},R=(U,$,M,Q,z,F,O)=>{const H=$.el=U.el;let{patchFlag:ne,dynamicChildren:ee,dirs:te}=$;ne|=U.patchFlag&16;const ce=U.props||EMPTY_OBJ,he=$.props||EMPTY_OBJ;let re;M&&toggleRecurse(M,!1),(re=he.onVnodeBeforeUpdate)&&invokeVNodeHook(re,M,$,U),te&&invokeDirectiveHook($,U,M,"beforeUpdate"),M&&toggleRecurse(M,!0);const ge=z&&$.type!=="foreignObject";if(ee?N(U.dynamicChildren,ee,H,M,Q,ge,F):O||se(U,$,H,null,M,Q,ge,F,!1),ne>0){if(ne&16)G(H,$,ce,he,M,Q,z);else if(ne&2&&ce.class!==he.class&&o(H,"class",null,he.class,z),ne&4&&o(H,"style",ce.style,he.style,z),ne&8){const xe=$.dynamicProps;for(let ue=0;ue<xe.length;ue++){const Ae=xe[ue],Ee=ce[Ae],_e=he[Ae];(_e!==Ee||Ae==="value")&&o(H,Ae,Ee,_e,z,U.children,M,Q,ae)}}ne&1&&U.children!==$.children&&m(H,$.children)}else!O&&ee==null&&G(H,$,ce,he,M,Q,z);((re=he.onVnodeUpdated)||te)&&queuePostRenderEffect(()=>{re&&invokeVNodeHook(re,M,$,U),te&&invokeDirectiveHook($,U,M,"updated")},Q)},N=(U,$,M,Q,z,F,O)=>{for(let H=0;H<$.length;H++){const ne=U[H],ee=$[H],te=ne.el&&(ne.type===Fragment||!isSameVNodeType(ne,ee)||ne.shapeFlag&70)?u(ne.el):M;S(ne,ee,te,null,Q,z,F,O,!0)}},G=(U,$,M,Q,z,F,O)=>{if(M!==Q){if(M!==EMPTY_OBJ)for(const H in M)!isReservedProp(H)&&!(H in Q)&&o(U,H,M[H],null,O,$.children,z,F,ae);for(const H in Q){if(isReservedProp(H))continue;const ne=Q[H],ee=M[H];ne!==ee&&H!=="value"&&o(U,H,ee,ne,O,$.children,z,F,ae)}"value"in Q&&o(U,"value",M.value,Q.value)}},B=(U,$,M,Q,z,F,O,H,ne)=>{const ee=$.el=U?U.el:l(""),te=$.anchor=U?U.anchor:l("");let{patchFlag:ce,dynamicChildren:he,slotScopeIds:re}=$;re&&(H=H?H.concat(re):re),U==null?(s(ee,M,Q),s(te,M,Q),I($.children,M,te,z,F,O,H,ne)):ce>0&&ce&64&&he&&U.dynamicChildren?(N(U.dynamicChildren,he,M,z,F,O,H),($.key!=null||z&&$===z.subTree)&&traverseStaticChildren(U,$,!0)):se(U,$,M,te,z,F,O,H,ne)},k=(U,$,M,Q,z,F,O,H,ne)=>{$.slotScopeIds=H,U==null?$.shapeFlag&512?z.ctx.activate($,M,Q,O,ne):T($,M,Q,z,F,O,ne):V(U,$,ne)},T=(U,$,M,Q,z,F,O)=>{const H=U.component=createComponentInstance(U,Q,z);if(isKeepAlive(U)&&(H.ctx.renderer=me),setupComponent(H),H.asyncDep){if(z&&z.registerDep(H,Z),!U.el){const ne=H.subTree=createVNode(Comment);x(null,ne,$,M)}return}Z(H,U,$,M,z,F,O)},V=(U,$,M)=>{const Q=$.component=U.component;if(shouldUpdateComponent(U,$,M))if(Q.asyncDep&&!Q.asyncResolved){W(Q,$,M);return}else Q.next=$,invalidateJob(Q.update),Q.update();else $.el=U.el,Q.vnode=$},Z=(U,$,M,Q,z,F,O)=>{const H=()=>{if(U.isMounted){let{next:te,bu:ce,u:he,parent:re,vnode:ge}=U,xe=te,ue;toggleRecurse(U,!1),te?(te.el=ge.el,W(U,te,O)):te=ge,ce&&invokeArrayFns(ce),(ue=te.props&&te.props.onVnodeBeforeUpdate)&&invokeVNodeHook(ue,re,te,ge),toggleRecurse(U,!0);const Ae=renderComponentRoot(U),Ee=U.subTree;U.subTree=Ae,S(Ee,Ae,u(Ee.el),de(Ee),U,z,F),te.el=Ae.el,xe===null&&updateHOCHostEl(U,Ae.el),he&&queuePostRenderEffect(he,z),(ue=te.props&&te.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(ue,re,te,ge),z)}else{let te;const{el:ce,props:he}=$,{bm:re,m:ge,parent:xe}=U,ue=isAsyncWrapper($);if(toggleRecurse(U,!1),re&&invokeArrayFns(re),!ue&&(te=he&&he.onVnodeBeforeMount)&&invokeVNodeHook(te,xe,$),toggleRecurse(U,!0),ce&&ye){const Ae=()=>{U.subTree=renderComponentRoot(U),ye(ce,U.subTree,U,z,null)};ue?$.type.__asyncLoader().then(()=>!U.isUnmounted&&Ae()):Ae()}else{const Ae=U.subTree=renderComponentRoot(U);S(null,Ae,M,Q,U,z,F),$.el=Ae.el}if(ge&&queuePostRenderEffect(ge,z),!ue&&(te=he&&he.onVnodeMounted)){const Ae=$;queuePostRenderEffect(()=>invokeVNodeHook(te,xe,Ae),z)}($.shapeFlag&256||xe&&isAsyncWrapper(xe.vnode)&&xe.vnode.shapeFlag&256)&&U.a&&queuePostRenderEffect(U.a,z),U.isMounted=!0,$=M=Q=null}},ne=U.effect=new ReactiveEffect(H,()=>queueJob(ee),U.scope),ee=U.update=()=>ne.run();ee.id=U.uid,toggleRecurse(U,!0),ee()},W=(U,$,M)=>{$.component=U;const Q=U.vnode.props;U.vnode=$,U.next=null,updateProps(U,$.props,Q,M),updateSlots(U,$.children,M),pauseTracking(),flushPreFlushCbs(),resetTracking()},se=(U,$,M,Q,z,F,O,H,ne=!1)=>{const ee=U&&U.children,te=U?U.shapeFlag:0,ce=$.children,{patchFlag:he,shapeFlag:re}=$;if(he>0){if(he&128){fe(ee,ce,M,Q,z,F,O,H,ne);return}else if(he&256){ie(ee,ce,M,Q,z,F,O,H,ne);return}}re&8?(te&16&&ae(ee,z,F),ce!==ee&&m(M,ce)):te&16?re&16?fe(ee,ce,M,Q,z,F,O,H,ne):ae(ee,z,F,!0):(te&8&&m(M,""),re&16&&I(ce,M,Q,z,F,O,H,ne))},ie=(U,$,M,Q,z,F,O,H,ne)=>{U=U||EMPTY_ARR,$=$||EMPTY_ARR;const ee=U.length,te=$.length,ce=Math.min(ee,te);let he;for(he=0;he<ce;he++){const re=$[he]=ne?cloneIfMounted($[he]):normalizeVNode($[he]);S(U[he],re,M,null,z,F,O,H,ne)}ee>te?ae(U,z,F,!0,!1,ce):I($,M,Q,z,F,O,H,ne,ce)},fe=(U,$,M,Q,z,F,O,H,ne)=>{let ee=0;const te=$.length;let ce=U.length-1,he=te-1;for(;ee<=ce&&ee<=he;){const re=U[ee],ge=$[ee]=ne?cloneIfMounted($[ee]):normalizeVNode($[ee]);if(isSameVNodeType(re,ge))S(re,ge,M,null,z,F,O,H,ne);else break;ee++}for(;ee<=ce&&ee<=he;){const re=U[ce],ge=$[he]=ne?cloneIfMounted($[he]):normalizeVNode($[he]);if(isSameVNodeType(re,ge))S(re,ge,M,null,z,F,O,H,ne);else break;ce--,he--}if(ee>ce){if(ee<=he){const re=he+1,ge=re<te?$[re].el:Q;for(;ee<=he;)S(null,$[ee]=ne?cloneIfMounted($[ee]):normalizeVNode($[ee]),M,ge,z,F,O,H,ne),ee++}}else if(ee>he)for(;ee<=ce;)K(U[ee],z,F,!0),ee++;else{const re=ee,ge=ee,xe=new Map;for(ee=ge;ee<=he;ee++){const Ie=$[ee]=ne?cloneIfMounted($[ee]):normalizeVNode($[ee]);Ie.key!=null&&xe.set(Ie.key,ee)}let ue,Ae=0;const Ee=he-ge+1;let _e=!1,Te=0;const Pe=new Array(Ee);for(ee=0;ee<Ee;ee++)Pe[ee]=0;for(ee=re;ee<=ce;ee++){const Ie=U[ee];if(Ae>=Ee){K(Ie,z,F,!0);continue}let Re;if(Ie.key!=null)Re=xe.get(Ie.key);else for(ue=ge;ue<=he;ue++)if(Pe[ue-ge]===0&&isSameVNodeType(Ie,$[ue])){Re=ue;break}Re===void 0?K(Ie,z,F,!0):(Pe[Re-ge]=ee+1,Re>=Te?Te=Re:_e=!0,S(Ie,$[Re],M,null,z,F,O,H,ne),Ae++)}const Ce=_e?getSequence(Pe):EMPTY_ARR;for(ue=Ce.length-1,ee=Ee-1;ee>=0;ee--){const Ie=ge+ee,Re=$[Ie],qe=Ie+1<te?$[Ie+1].el:Q;Pe[ee]===0?S(null,Re,M,qe,z,F,O,H,ne):_e&&(ue<0||ee!==Ce[ue]?J(Re,M,qe,2):ue--)}}},J=(U,$,M,Q,z=null)=>{const{el:F,type:O,transition:H,children:ne,shapeFlag:ee}=U;if(ee&6){J(U.component.subTree,$,M,Q);return}if(ee&128){U.suspense.move($,M,Q);return}if(ee&64){O.move(U,$,M,me);return}if(O===Fragment){s(F,$,M);for(let ce=0;ce<ne.length;ce++)J(ne[ce],$,M,Q);s(U.anchor,$,M);return}if(O===Static){E(U,$,M);return}if(Q!==2&&ee&1&&H)if(Q===0)H.beforeEnter(F),s(F,$,M),queuePostRenderEffect(()=>H.enter(F),z);else{const{leave:ce,delayLeave:he,afterLeave:re}=H,ge=()=>s(F,$,M),xe=()=>{ce(F,()=>{ge(),re&&re()})};he?he(F,ge,xe):xe()}else s(F,$,M)},K=(U,$,M,Q=!1,z=!1)=>{const{type:F,props:O,ref:H,children:ne,dynamicChildren:ee,shapeFlag:te,patchFlag:ce,dirs:he}=U;if(H!=null&&setRef(H,null,M,U,!0),te&256){$.ctx.deactivate(U);return}const re=te&1&&he,ge=!isAsyncWrapper(U);let xe;if(ge&&(xe=O&&O.onVnodeBeforeUnmount)&&invokeVNodeHook(xe,$,U),te&6)Y(U.component,M,Q);else{if(te&128){U.suspense.unmount(M,Q);return}re&&invokeDirectiveHook(U,null,$,"beforeUnmount"),te&64?U.type.remove(U,$,M,z,me,Q):ee&&(F!==Fragment||ce>0&&ce&64)?ae(ee,$,M,!1,!0):(F===Fragment&&ce&384||!z&&te&16)&&ae(ne,$,M),Q&&be(U)}(ge&&(xe=O&&O.onVnodeUnmounted)||re)&&queuePostRenderEffect(()=>{xe&&invokeVNodeHook(xe,$,U),re&&invokeDirectiveHook(U,null,$,"unmounted")},M)},be=U=>{const{type:$,el:M,anchor:Q,transition:z}=U;if($===Fragment){oe(M,Q);return}if($===Static){w(U);return}const F=()=>{r(M),z&&!z.persisted&&z.afterLeave&&z.afterLeave()};if(U.shapeFlag&1&&z&&!z.persisted){const{leave:O,delayLeave:H}=z,ne=()=>O(M,F);H?H(U.el,F,ne):ne()}else F()},oe=(U,$)=>{let M;for(;U!==$;)M=g(U),r(U),U=M;r($)},Y=(U,$,M)=>{const{bum:Q,scope:z,update:F,subTree:O,um:H}=U;Q&&invokeArrayFns(Q),z.stop(),F&&(F.active=!1,K(O,U,$,M)),H&&queuePostRenderEffect(H,$),queuePostRenderEffect(()=>{U.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&U.asyncDep&&!U.asyncResolved&&U.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},ae=(U,$,M,Q=!1,z=!1,F=0)=>{for(let O=F;O<U.length;O++)K(U[O],$,M,Q,z)},de=U=>U.shapeFlag&6?de(U.component.subTree):U.shapeFlag&128?U.suspense.next():g(U.anchor||U.el),le=(U,$,M)=>{U==null?$._vnode&&K($._vnode,null,null,!0):S($._vnode||null,U,$,null,null,null,M),flushPreFlushCbs(),flushPostFlushCbs(),$._vnode=U},me={p:S,um:K,m:J,r:be,mt:T,mc:I,pc:se,pbc:N,n:de,o:i};let ve,ye;return e&&([ve,ye]=e(me)),{render:le,hydrate:ve,createApp:createAppAPI(le,ve)}}function toggleRecurse({effect:i,update:e},t){i.allowRecurse=e.allowRecurse=t}function traverseStaticChildren(i,e,t=!1){const s=i.children,r=e.children;if(isArray$8(s)&&isArray$8(r))for(let o=0;o<s.length;o++){const a=s[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=cloneIfMounted(r[o]),l.el=a.el),t||traverseStaticChildren(a,l)),l.type===Text&&(l.el=a.el)}}function getSequence(i){const e=i.slice(),t=[0];let s,r,o,a,l;const c=i.length;for(s=0;s<c;s++){const d=i[s];if(d!==0){if(r=t[t.length-1],i[r]<d){e[s]=r,t.push(s);continue}for(o=0,a=t.length-1;o<a;)l=o+a>>1,i[t[l]]<d?o=l+1:a=l;d<i[t[o]]&&(o>0&&(e[s]=t[o-1]),t[o]=s)}}for(o=t.length,a=t[o-1];o-- >0;)t[o]=a,a=e[a];return t}const isTeleport=i=>i.__isTeleport,isTeleportDisabled=i=>i&&(i.disabled||i.disabled===""),isTargetSVG=i=>typeof SVGElement<"u"&&i instanceof SVGElement,resolveTarget=(i,e)=>{const t=i&&i.to;return isString$2(t)?e?e(t):null:t},TeleportImpl={__isTeleport:!0,process(i,e,t,s,r,o,a,l,c,d){const{mc:m,pc:u,pbc:g,o:{insert:b,querySelector:y,createText:S,createComment:v}}=d,x=isTeleportDisabled(e.props);let{shapeFlag:A,children:E,dynamicChildren:w}=e;if(i==null){const _=e.el=S(""),C=e.anchor=S("");b(_,t,s),b(C,t,s);const P=e.target=resolveTarget(e.props,y),I=e.targetAnchor=S("");P&&(b(I,P),a=a||isTargetSVG(P));const R=(N,G)=>{A&16&&m(E,N,G,r,o,a,l,c)};x?R(t,C):P&&R(P,I)}else{e.el=i.el;const _=e.anchor=i.anchor,C=e.target=i.target,P=e.targetAnchor=i.targetAnchor,I=isTeleportDisabled(i.props),R=I?t:C,N=I?_:P;if(a=a||isTargetSVG(C),w?(g(i.dynamicChildren,w,R,r,o,a,l),traverseStaticChildren(i,e,!0)):c||u(i,e,R,N,r,o,a,l,!1),x)I||moveTeleport(e,t,_,d,1);else if((e.props&&e.props.to)!==(i.props&&i.props.to)){const G=e.target=resolveTarget(e.props,y);G&&moveTeleport(e,G,null,d,0)}else I&&moveTeleport(e,C,P,d,1)}updateCssVars(e)},remove(i,e,t,s,{um:r,o:{remove:o}},a){const{shapeFlag:l,children:c,anchor:d,targetAnchor:m,target:u,props:g}=i;if(u&&o(m),(a||!isTeleportDisabled(g))&&(o(d),l&16))for(let b=0;b<c.length;b++){const y=c[b];r(y,e,t,!0,!!y.dynamicChildren)}},move:moveTeleport,hydrate:hydrateTeleport};function moveTeleport(i,e,t,{o:{insert:s},m:r},o=2){o===0&&s(i.targetAnchor,e,t);const{el:a,anchor:l,shapeFlag:c,children:d,props:m}=i,u=o===2;if(u&&s(a,e,t),(!u||isTeleportDisabled(m))&&c&16)for(let g=0;g<d.length;g++)r(d[g],e,t,2);u&&s(l,e,t)}function hydrateTeleport(i,e,t,s,r,o,{o:{nextSibling:a,parentNode:l,querySelector:c}},d){const m=e.target=resolveTarget(e.props,c);if(m){const u=m._lpa||m.firstChild;if(e.shapeFlag&16)if(isTeleportDisabled(e.props))e.anchor=d(a(i),e,l(i),t,s,r,o),e.targetAnchor=u;else{e.anchor=a(i);let g=u;for(;g;)if(g=a(g),g&&g.nodeType===8&&g.data==="teleport anchor"){e.targetAnchor=g,m._lpa=e.targetAnchor&&a(e.targetAnchor);break}d(u,e,m,t,s,r,o)}updateCssVars(e)}return e.anchor&&a(e.anchor)}const Teleport=TeleportImpl;function updateCssVars(i){const e=i.ctx;if(e&&e.ut){let t=i.children[0].el;for(;t!==i.targetAnchor;)t.nodeType===1&&t.setAttribute("data-v-owner",e.uid),t=t.nextSibling;e.ut()}}const Fragment=Symbol(void 0),Text=Symbol(void 0),Comment=Symbol(void 0),Static=Symbol(void 0),blockStack=[];let currentBlock=null;function openBlock(i=!1){blockStack.push(currentBlock=i?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(i){isBlockTreeEnabled+=i}function setupBlock(i){return i.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(i),i}function createElementBlock(i,e,t,s,r,o){return setupBlock(createBaseVNode(i,e,t,s,r,o,!0))}function createBlock(i,e,t,s,r){return setupBlock(createVNode(i,e,t,s,r,!0))}function isVNode(i){return i?i.__v_isVNode===!0:!1}function isSameVNodeType(i,e){return i.type===e.type&&i.key===e.key}const InternalObjectKey="__vInternal",normalizeKey=({key:i})=>i!=null?i:null,normalizeRef=({ref:i,ref_key:e,ref_for:t})=>i!=null?isString$2(i)||isRef(i)||isFunction$4(i)?{i:currentRenderingInstance,r:i,k:e,f:!!t}:i:null;function createBaseVNode(i,e=null,t=null,s=0,r=null,o=i===Fragment?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:i,props:e,key:e&&normalizeKey(e),ref:e&&normalizeRef(e),scopeId:currentScopeId,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return l?(normalizeChildren(c,t),o&128&&i.normalize(c)):t&&(c.shapeFlag|=isString$2(t)?8:16),isBlockTreeEnabled>0&&!a&¤tBlock&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&¤tBlock.push(c),c}const createVNode=_createVNode;function _createVNode(i,e=null,t=null,s=0,r=null,o=!1){if((!i||i===NULL_DYNAMIC_COMPONENT)&&(i=Comment),isVNode(i)){const l=cloneVNode(i,e,!0);return t&&normalizeChildren(l,t),isBlockTreeEnabled>0&&!o&¤tBlock&&(l.shapeFlag&6?currentBlock[currentBlock.indexOf(i)]=l:currentBlock.push(l)),l.patchFlag|=-2,l}if(isClassComponent(i)&&(i=i.__vccOpts),e){e=guardReactiveProps(e);let{class:l,style:c}=e;l&&!isString$2(l)&&(e.class=normalizeClass(l)),isObject$4(c)&&(isProxy(c)&&!isArray$8(c)&&(c=extend$3({},c)),e.style=normalizeStyle(c))}const a=isString$2(i)?1:isSuspense(i)?128:isTeleport(i)?64:isObject$4(i)?4:isFunction$4(i)?2:0;return createBaseVNode(i,e,t,s,r,a,o,!0)}function guardReactiveProps(i){return i?isProxy(i)||InternalObjectKey in i?extend$3({},i):i:null}function cloneVNode(i,e,t=!1){const{props:s,ref:r,patchFlag:o,children:a}=i,l=e?mergeProps(s||{},e):s;return{__v_isVNode:!0,__v_skip:!0,type:i.type,props:l,key:l&&normalizeKey(l),ref:e&&e.ref?t&&r?isArray$8(r)?r.concat(normalizeRef(e)):[r,normalizeRef(e)]:normalizeRef(e):r,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:a,target:i.target,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:e&&i.type!==Fragment?o===-1?16:o|16:o,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:i.transition,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&cloneVNode(i.ssContent),ssFallback:i.ssFallback&&cloneVNode(i.ssFallback),el:i.el,anchor:i.anchor,ctx:i.ctx,ce:i.ce}}function createTextVNode(i=" ",e=0){return createVNode(Text,null,i,e)}function createCommentVNode(i="",e=!1){return e?(openBlock(),createBlock(Comment,null,i)):createVNode(Comment,null,i)}function normalizeVNode(i){return i==null||typeof i=="boolean"?createVNode(Comment):isArray$8(i)?createVNode(Fragment,null,i.slice()):typeof i=="object"?cloneIfMounted(i):createVNode(Text,null,String(i))}function cloneIfMounted(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:cloneVNode(i)}function normalizeChildren(i,e){let t=0;const{shapeFlag:s}=i;if(e==null)e=null;else if(isArray$8(e))t=16;else if(typeof e=="object")if(s&65){const r=e.default;r&&(r._c&&(r._d=!1),normalizeChildren(i,r()),r._c&&(r._d=!0));return}else{t=32;const r=e._;!r&&!(InternalObjectKey in e)?e._ctx=currentRenderingInstance:r===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,i.patchFlag|=1024))}else isFunction$4(e)?(e={default:e,_ctx:currentRenderingInstance},t=32):(e=String(e),s&64?(t=16,e=[createTextVNode(e)]):t=8);i.children=e,i.shapeFlag|=t}function mergeProps(...i){const e={};for(let t=0;t<i.length;t++){const s=i[t];for(const r in s)if(r==="class")e.class!==s.class&&(e.class=normalizeClass([e.class,s.class]));else if(r==="style")e.style=normalizeStyle([e.style,s.style]);else if(isOn(r)){const o=e[r],a=s[r];a&&o!==a&&!(isArray$8(o)&&o.includes(a))&&(e[r]=o?[].concat(o,a):a)}else r!==""&&(e[r]=s[r])}return e}function invokeVNodeHook(i,e,t,s=null){callWithAsyncErrorHandling(i,e,7,[t,s])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(i,e,t){const s=i.type,r=(e?e.appContext:i.appContext)||emptyAppContext,o={uid:uid++,vnode:i,type:s,parent:e,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(s,r),emitsOptions:normalizeEmitsOptions(s,r),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:s.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=emit.bind(null,o),i.ce&&i.ce(o),o}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance,setCurrentInstance=i=>{currentInstance=i,i.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),currentInstance=null};function isStatefulComponent(i){return i.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(i,e=!1){isInSSRComponentSetup=e;const{props:t,children:s}=i.vnode,r=isStatefulComponent(i);initProps(i,t,r,e),initSlots(i,s);const o=r?setupStatefulComponent(i,e):void 0;return isInSSRComponentSetup=!1,o}function setupStatefulComponent(i,e){const t=i.type;i.accessCache=Object.create(null),i.proxy=markRaw(new Proxy(i.ctx,PublicInstanceProxyHandlers));const{setup:s}=t;if(s){const r=i.setupContext=s.length>1?createSetupContext(i):null;setCurrentInstance(i),pauseTracking();const o=callWithErrorHandling(s,i,0,[i.props,r]);if(resetTracking(),unsetCurrentInstance(),isPromise$1(o)){if(o.then(unsetCurrentInstance,unsetCurrentInstance),e)return o.then(a=>{handleSetupResult(i,a,e)}).catch(a=>{handleError(a,i,0)});i.asyncDep=o}else handleSetupResult(i,o,e)}else finishComponentSetup(i,e)}function handleSetupResult(i,e,t){isFunction$4(e)?i.type.__ssrInlineRender?i.ssrRender=e:i.render=e:isObject$4(e)&&(i.setupState=proxyRefs(e)),finishComponentSetup(i,t)}let compile$1;function finishComponentSetup(i,e,t){const s=i.type;if(!i.render){if(!e&&compile$1&&!s.render){const r=s.template||resolveMergedOptions(i).template;if(r){const{isCustomElement:o,compilerOptions:a}=i.appContext.config,{delimiters:l,compilerOptions:c}=s,d=extend$3(extend$3({isCustomElement:o,delimiters:l},a),c);s.render=compile$1(r,d)}}i.render=s.render||NOOP}setCurrentInstance(i),pauseTracking(),applyOptions(i),resetTracking(),unsetCurrentInstance()}function createAttrsProxy(i){return new Proxy(i.attrs,{get(e,t){return track(i,"get","$attrs"),e[t]}})}function createSetupContext(i){const e=s=>{i.exposed=s||{}};let t;return{get attrs(){return t||(t=createAttrsProxy(i))},slots:i.slots,emit:i.emit,expose:e}}function getExposeProxy(i){if(i.exposed)return i.exposeProxy||(i.exposeProxy=new Proxy(proxyRefs(markRaw(i.exposed)),{get(e,t){if(t in e)return e[t];if(t in publicPropertiesMap)return publicPropertiesMap[t](i)},has(e,t){return t in e||t in publicPropertiesMap}}))}function getComponentName(i,e=!0){return isFunction$4(i)?i.displayName||i.name:i.name||e&&i.__name}function isClassComponent(i){return isFunction$4(i)&&"__vccOpts"in i}const computed=(i,e)=>computed$1(i,e,isInSSRComponentSetup);function h(i,e,t){const s=arguments.length;return s===2?isObject$4(e)&&!isArray$8(e)?isVNode(e)?createVNode(i,null,[e]):createVNode(i,e):createVNode(i,null,e):(s>3?t=Array.prototype.slice.call(arguments,2):s===3&&isVNode(t)&&(t=[t]),createVNode(i,e,t))}const ssrContextKey=Symbol(""),useSSRContext=()=>inject(ssrContextKey),version="3.2.47",svgNS="http://www.w3.org/2000/svg",doc$2=typeof document<"u"?document:null,templateContainer=doc$2&&doc$2.createElement("template"),nodeOps={insert:(i,e,t)=>{e.insertBefore(i,t||null)},remove:i=>{const e=i.parentNode;e&&e.removeChild(i)},createElement:(i,e,t,s)=>{const r=e?doc$2.createElementNS(svgNS,i):doc$2.createElement(i,t?{is:t}:void 0);return i==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:i=>doc$2.createTextNode(i),createComment:i=>doc$2.createComment(i),setText:(i,e)=>{i.nodeValue=e},setElementText:(i,e)=>{i.textContent=e},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>doc$2.querySelector(i),setScopeId(i,e){i.setAttribute(e,"")},insertStaticContent(i,e,t,s,r,o){const a=t?t.previousSibling:e.lastChild;if(r&&(r===o||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),t),!(r===o||!(r=r.nextSibling)););else{templateContainer.innerHTML=s?`<svg>${i}</svg>`:i;const l=templateContainer.content;if(s){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}e.insertBefore(l,t)}return[a?a.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}};function patchClass(i,e,t){const s=i._vtc;s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?i.removeAttribute("class"):t?i.setAttribute("class",e):i.className=e}function patchStyle(i,e,t){const s=i.style,r=isString$2(t);if(t&&!r){if(e&&!isString$2(e))for(const o in e)t[o]==null&&setStyle(s,o,"");for(const o in t)setStyle(s,o,t[o])}else{const o=s.display;r?e!==t&&(s.cssText=t):e&&i.removeAttribute("style"),"_vod"in i&&(s.display=o)}}const importantRE=/\s*!important$/;function setStyle(i,e,t){if(isArray$8(t))t.forEach(s=>setStyle(i,e,s));else if(t==null&&(t=""),e.startsWith("--"))i.setProperty(e,t);else{const s=autoPrefix(i,e);importantRE.test(t)?i.setProperty(hyphenate(s),t.replace(importantRE,""),"important"):i[s]=t}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(i,e){const t=prefixCache[e];if(t)return t;let s=camelize$1(e);if(s!=="filter"&&s in i)return prefixCache[e]=s;s=capitalize(s);for(let r=0;r<prefixes.length;r++){const o=prefixes[r]+s;if(o in i)return prefixCache[e]=o}return e}const xlinkNS="http://www.w3.org/1999/xlink";function patchAttr(i,e,t,s,r){if(s&&e.startsWith("xlink:"))t==null?i.removeAttributeNS(xlinkNS,e.slice(6,e.length)):i.setAttributeNS(xlinkNS,e,t);else{const o=isSpecialBooleanAttr(e);t==null||o&&!includeBooleanAttr(t)?i.removeAttribute(e):i.setAttribute(e,o?"":t)}}function patchDOMProp(i,e,t,s,r,o,a){if(e==="innerHTML"||e==="textContent"){s&&a(s,r,o),i[e]=t==null?"":t;return}if(e==="value"&&i.tagName!=="PROGRESS"&&!i.tagName.includes("-")){i._value=t;const c=t==null?"":t;(i.value!==c||i.tagName==="OPTION")&&(i.value=c),t==null&&i.removeAttribute(e);return}let l=!1;if(t===""||t==null){const c=typeof i[e];c==="boolean"?t=includeBooleanAttr(t):t==null&&c==="string"?(t="",l=!0):c==="number"&&(t=0,l=!0)}try{i[e]=t}catch(c){}l&&i.removeAttribute(e)}function addEventListener(i,e,t,s){i.addEventListener(e,t,s)}function removeEventListener(i,e,t,s){i.removeEventListener(e,t,s)}function patchEvent(i,e,t,s,r=null){const o=i._vei||(i._vei={}),a=o[e];if(s&&a)a.value=s;else{const[l,c]=parseName(e);if(s){const d=o[e]=createInvoker(s,r);addEventListener(i,l,d,c)}else a&&(removeEventListener(i,l,a,c),o[e]=void 0)}}const optionsModifierRE=/(?:Once|Passive|Capture)$/;function parseName(i){let e;if(optionsModifierRE.test(i)){e={};let s;for(;s=i.match(optionsModifierRE);)i=i.slice(0,i.length-s[0].length),e[s[0].toLowerCase()]=!0}return[i[2]===":"?i.slice(3):hyphenate(i.slice(2)),e]}let cachedNow=0;const p=Promise.resolve(),getNow=()=>cachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(i,e){const t=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=t.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(s,t.value),e,5,[s])};return t.value=i,t.attached=getNow(),t}function patchStopImmediatePropagation(i,e){if(isArray$8(e)){const t=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{t.call(i),i._stopped=!0},e.map(s=>r=>!r._stopped&&s&&s(r))}else return e}const nativeOnRE=/^on[a-z]/,patchProp=(i,e,t,s,r=!1,o,a,l,c)=>{e==="class"?patchClass(i,s,r):e==="style"?patchStyle(i,t,s):isOn(e)?isModelListener(e)||patchEvent(i,e,t,s,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(i,e,s,r))?patchDOMProp(i,e,s,o,a,l,c):(e==="true-value"?i._trueValue=s:e==="false-value"&&(i._falseValue=s),patchAttr(i,e,s,r))};function shouldSetAsProp(i,e,t,s){return s?!!(e==="innerHTML"||e==="textContent"||e in i&&nativeOnRE.test(e)&&isFunction$4(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&i.tagName==="INPUT"||e==="type"&&i.tagName==="TEXTAREA"||nativeOnRE.test(e)&&isString$2(t)?!1:e in i}const TRANSITION="transition",ANIMATION="animation",Transition=(i,{slots:e})=>h(BaseTransition,resolveTransitionProps(i),e);Transition.displayName="Transition";const DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=Transition.props=extend$3({},BaseTransition.props,DOMTransitionPropsValidators),callHook=(i,e=[])=>{isArray$8(i)?i.forEach(t=>t(...e)):i&&i(...e)},hasExplicitCallback=i=>i?isArray$8(i)?i.some(e=>e.length>1):i.length>1:!1;function resolveTransitionProps(i){const e={};for(const B in i)B in DOMTransitionPropsValidators||(e[B]=i[B]);if(i.css===!1)return e;const{name:t="v",type:s,duration:r,enterFromClass:o=`${t}-enter-from`,enterActiveClass:a=`${t}-enter-active`,enterToClass:l=`${t}-enter-to`,appearFromClass:c=o,appearActiveClass:d=a,appearToClass:m=l,leaveFromClass:u=`${t}-leave-from`,leaveActiveClass:g=`${t}-leave-active`,leaveToClass:b=`${t}-leave-to`}=i,y=normalizeDuration(r),S=y&&y[0],v=y&&y[1],{onBeforeEnter:x,onEnter:A,onEnterCancelled:E,onLeave:w,onLeaveCancelled:_,onBeforeAppear:C=x,onAppear:P=A,onAppearCancelled:I=E}=e,R=(B,k,T)=>{removeTransitionClass(B,k?m:l),removeTransitionClass(B,k?d:a),T&&T()},N=(B,k)=>{B._isLeaving=!1,removeTransitionClass(B,u),removeTransitionClass(B,b),removeTransitionClass(B,g),k&&k()},G=B=>(k,T)=>{const V=B?P:A,Z=()=>R(k,B,T);callHook(V,[k,Z]),nextFrame(()=>{removeTransitionClass(k,B?c:o),addTransitionClass(k,B?m:l),hasExplicitCallback(V)||whenTransitionEnds(k,s,S,Z)})};return extend$3(e,{onBeforeEnter(B){callHook(x,[B]),addTransitionClass(B,o),addTransitionClass(B,a)},onBeforeAppear(B){callHook(C,[B]),addTransitionClass(B,c),addTransitionClass(B,d)},onEnter:G(!1),onAppear:G(!0),onLeave(B,k){B._isLeaving=!0;const T=()=>N(B,k);addTransitionClass(B,u),forceReflow(),addTransitionClass(B,g),nextFrame(()=>{B._isLeaving&&(removeTransitionClass(B,u),addTransitionClass(B,b),hasExplicitCallback(w)||whenTransitionEnds(B,s,v,T))}),callHook(w,[B,T])},onEnterCancelled(B){R(B,!1),callHook(E,[B])},onAppearCancelled(B){R(B,!0),callHook(I,[B])},onLeaveCancelled(B){N(B),callHook(_,[B])}})}function normalizeDuration(i){if(i==null)return null;if(isObject$4(i))return[NumberOf(i.enter),NumberOf(i.leave)];{const e=NumberOf(i);return[e,e]}}function NumberOf(i){return toNumber$1(i)}function addTransitionClass(i,e){e.split(/\s+/).forEach(t=>t&&i.classList.add(t)),(i._vtc||(i._vtc=new Set)).add(e)}function removeTransitionClass(i,e){e.split(/\s+/).forEach(s=>s&&i.classList.remove(s));const{_vtc:t}=i;t&&(t.delete(e),t.size||(i._vtc=void 0))}function nextFrame(i){requestAnimationFrame(()=>{requestAnimationFrame(i)})}let endId=0;function whenTransitionEnds(i,e,t,s){const r=i._endId=++endId,o=()=>{r===i._endId&&s()};if(t)return setTimeout(o,t);const{type:a,timeout:l,propCount:c}=getTransitionInfo(i,e);if(!a)return s();const d=a+"end";let m=0;const u=()=>{i.removeEventListener(d,g),o()},g=b=>{b.target===i&&++m>=c&&u()};setTimeout(()=>{m<c&&u()},l+1),i.addEventListener(d,g)}function getTransitionInfo(i,e){const t=window.getComputedStyle(i),s=y=>(t[y]||"").split(", "),r=s(`${TRANSITION}Delay`),o=s(`${TRANSITION}Duration`),a=getTimeout(r,o),l=s(`${ANIMATION}Delay`),c=s(`${ANIMATION}Duration`),d=getTimeout(l,c);let m=null,u=0,g=0;e===TRANSITION?a>0&&(m=TRANSITION,u=a,g=o.length):e===ANIMATION?d>0&&(m=ANIMATION,u=d,g=c.length):(u=Math.max(a,d),m=u>0?a>d?TRANSITION:ANIMATION:null,g=m?m===TRANSITION?o.length:c.length:0);const b=m===TRANSITION&&/\b(transform|all)(,|$)/.test(s(`${TRANSITION}Property`).toString());return{type:m,timeout:u,propCount:g,hasTransform:b}}function getTimeout(i,e){for(;i.length<e.length;)i=i.concat(i);return Math.max(...e.map((t,s)=>toMs(t)+toMs(i[s])))}function toMs(i){return Number(i.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}const positionMap=new WeakMap,newPositionMap=new WeakMap,TransitionGroupImpl={name:"TransitionGroup",props:extend$3({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(i,{slots:e}){const t=getCurrentInstance(),s=useTransitionState();let r,o;return onUpdated(()=>{if(!r.length)return;const a=i.moveClass||`${i.name||"v"}-move`;if(!hasCSSTransform(r[0].el,t.vnode.el,a))return;r.forEach(callPendingCbs),r.forEach(recordPosition);const l=r.filter(applyTranslation);forceReflow(),l.forEach(c=>{const d=c.el,m=d.style;addTransitionClass(d,a),m.transform=m.webkitTransform=m.transitionDuration="";const u=d._moveCb=g=>{g&&g.target!==d||(!g||/transform$/.test(g.propertyName))&&(d.removeEventListener("transitionend",u),d._moveCb=null,removeTransitionClass(d,a))};d.addEventListener("transitionend",u)})}),()=>{const a=toRaw(i),l=resolveTransitionProps(a);let c=a.tag||Fragment;r=o,o=e.default?getTransitionRawChildren(e.default()):[];for(let d=0;d<o.length;d++){const m=o[d];m.key!=null&&setTransitionHooks(m,resolveTransitionHooks(m,l,s,t))}if(r)for(let d=0;d<r.length;d++){const m=r[d];setTransitionHooks(m,resolveTransitionHooks(m,l,s,t)),positionMap.set(m,m.el.getBoundingClientRect())}return createVNode(c,null,o)}}},removeMode=i=>delete i.mode;TransitionGroupImpl.props;const TransitionGroup=TransitionGroupImpl;function callPendingCbs(i){const e=i.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function recordPosition(i){newPositionMap.set(i,i.el.getBoundingClientRect())}function applyTranslation(i){const e=positionMap.get(i),t=newPositionMap.get(i),s=e.left-t.left,r=e.top-t.top;if(s||r){const o=i.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${r}px)`,o.transitionDuration="0s",i}}function hasCSSTransform(i,e,t){const s=i.cloneNode();i._vtc&&i._vtc.forEach(a=>{a.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),t.split(/\s+/).forEach(a=>a&&s.classList.add(a)),s.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(s);const{hasTransform:o}=getTransitionInfo(s);return r.removeChild(s),o}const keyNames={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},withKeys=(i,e)=>t=>{if(!("key"in t))return;const s=hyphenate(t.key);if(e.some(r=>r===s||keyNames[r]===s))return i(t)},vShow={beforeMount(i,{value:e},{transition:t}){i._vod=i.style.display==="none"?"":i.style.display,t&&e?t.beforeEnter(i):setDisplay(i,e)},mounted(i,{value:e},{transition:t}){t&&e&&t.enter(i)},updated(i,{value:e,oldValue:t},{transition:s}){!e!=!t&&(s?e?(s.beforeEnter(i),setDisplay(i,!0),s.enter(i)):s.leave(i,()=>{setDisplay(i,!1)}):setDisplay(i,e))},beforeUnmount(i,{value:e}){setDisplay(i,e)}};function setDisplay(i,e){i.style.display=e?i._vod:"none"}const rendererOptions=extend$3({patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=(...i)=>{const e=ensureRenderer().createApp(...i),{mount:t}=e;return e.mount=s=>{const r=normalizeContainer(s);if(!r)return;const o=e._component;!isFunction$4(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const a=t(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},e};function normalizeContainer(i){return isString$2(i)?document.querySelector(i):i}/*!
- * vue-router v4.1.6
- * (c) 2022 Eduardo San Martin Morote
- * @license MIT
- */const isBrowser=typeof window<"u";function isESModule(i){return i.__esModule||i[Symbol.toStringTag]==="Module"}const assign$2=Object.assign;function applyToParams(i,e){const t={};for(const s in e){const r=e[s];t[s]=isArray$7(r)?r.map(i):i(r)}return t}const noop$2=()=>{},isArray$7=Array.isArray,TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=i=>i.replace(TRAILING_SLASH_RE,"");function parseURL(i,e,t="/"){let s,r={},o="",a="";const l=e.indexOf("#");let c=e.indexOf("?");return l<c&&l>=0&&(c=-1),c>-1&&(s=e.slice(0,c),o=e.slice(c+1,l>-1?l:e.length),r=i(o)),l>-1&&(s=s||e.slice(0,l),a=e.slice(l,e.length)),s=resolveRelativePath(s!=null?s:e,t),{fullPath:s+(o&&"?")+o+a,path:s,query:r,hash:a}}function stringifyURL(i,e){const t=e.query?i(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function stripBase(i,e){return!e||!i.toLowerCase().startsWith(e.toLowerCase())?i:i.slice(e.length)||"/"}function isSameRouteLocation(i,e,t){const s=e.matched.length-1,r=t.matched.length-1;return s>-1&&s===r&&isSameRouteRecord(e.matched[s],t.matched[r])&&isSameRouteLocationParams(e.params,t.params)&&i(e.query)===i(t.query)&&e.hash===t.hash}function isSameRouteRecord(i,e){return(i.aliasOf||i)===(e.aliasOf||e)}function isSameRouteLocationParams(i,e){if(Object.keys(i).length!==Object.keys(e).length)return!1;for(const t in i)if(!isSameRouteLocationParamsValue(i[t],e[t]))return!1;return!0}function isSameRouteLocationParamsValue(i,e){return isArray$7(i)?isEquivalentArray(i,e):isArray$7(e)?isEquivalentArray(e,i):i===e}function isEquivalentArray(i,e){return isArray$7(e)?i.length===e.length&&i.every((t,s)=>t===e[s]):i.length===1&&i[0]===e}function resolveRelativePath(i,e){if(i.startsWith("/"))return i;if(!i)return e;const t=e.split("/"),s=i.split("/");let r=t.length-1,o,a;for(o=0;o<s.length;o++)if(a=s[o],a!==".")if(a==="..")r>1&&r--;else break;return t.slice(0,r).join("/")+"/"+s.slice(o-(o===s.length?1:0)).join("/")}var NavigationType;(function(i){i.pop="pop",i.push="push"})(NavigationType||(NavigationType={}));var NavigationDirection;(function(i){i.back="back",i.forward="forward",i.unknown=""})(NavigationDirection||(NavigationDirection={}));function normalizeBase(i){if(!i)if(isBrowser){const e=document.querySelector("base");i=e&&e.getAttribute("href")||"/",i=i.replace(/^\w+:\/\/[^\/]+/,"")}else i="/";return i[0]!=="/"&&i[0]!=="#"&&(i="/"+i),removeTrailingSlash(i)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(i,e){return i.replace(BEFORE_HASH_RE,"#")+e}function getElementPosition(i,e){const t=document.documentElement.getBoundingClientRect(),s=i.getBoundingClientRect();return{behavior:e.behavior,left:s.left-t.left-(e.left||0),top:s.top-t.top-(e.top||0)}}const computeScrollPosition=()=>({left:window.pageXOffset,top:window.pageYOffset});function scrollToPosition(i){let e;if("el"in i){const t=i.el,s=typeof t=="string"&&t.startsWith("#"),r=typeof t=="string"?s?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!r)return;e=getElementPosition(r,i)}else e=i;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function getScrollKey(i,e){return(history.state?history.state.position-e:-1)+i}const scrollPositions=new Map;function saveScrollPosition(i,e){scrollPositions.set(i,e)}function getSavedScrollPosition(i){const e=scrollPositions.get(i);return scrollPositions.delete(i),e}let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(i,e){const{pathname:t,search:s,hash:r}=e,o=i.indexOf("#");if(o>-1){let l=r.includes(i.slice(o))?i.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),stripBase(c,"")}return stripBase(t,i)+s+r}function useHistoryListeners(i,e,t,s){let r=[],o=[],a=null;const l=({state:g})=>{const b=createCurrentLocation(i,location),y=t.value,S=e.value;let v=0;if(g){if(t.value=b,e.value=g,a&&a===y){a=null;return}v=S?g.position-S.position:0}else s(b);r.forEach(x=>{x(t.value,y,{delta:v,type:NavigationType.pop,direction:v?v>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function c(){a=t.value}function d(g){r.push(g);const b=()=>{const y=r.indexOf(g);y>-1&&r.splice(y,1)};return o.push(b),b}function m(){const{history:g}=window;g.state&&g.replaceState(assign$2({},g.state,{scroll:computeScrollPosition()}),"")}function u(){for(const g of o)g();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",m)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",m),{pauseListeners:c,listen:d,destroy:u}}function buildState(i,e,t,s=!1,r=!1){return{back:i,current:e,forward:t,replaced:s,position:window.history.length,scroll:r?computeScrollPosition():null}}function useHistoryStateNavigation(i){const{history:e,location:t}=window,s={value:createCurrentLocation(i,t)},r={value:e.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(c,d,m){const u=i.indexOf("#"),g=u>-1?(t.host&&document.querySelector("base")?i:i.slice(u))+c:createBaseLocation()+i+c;try{e[m?"replaceState":"pushState"](d,"",g),r.value=d}catch(b){console.error(b),t[m?"replace":"assign"](g)}}function a(c,d){const m=assign$2({},e.state,buildState(r.value.back,c,r.value.forward,!0),d,{position:r.value.position});o(c,m,!0),s.value=c}function l(c,d){const m=assign$2({},r.value,e.state,{forward:c,scroll:computeScrollPosition()});o(m.current,m,!0);const u=assign$2({},buildState(s.value,c,null),{position:m.position+1},d);o(c,u,!1),s.value=c}return{location:s,state:r,push:l,replace:a}}function createWebHistory(i){i=normalizeBase(i);const e=useHistoryStateNavigation(i),t=useHistoryListeners(i,e.state,e.location,e.replace);function s(o,a=!0){a||t.pauseListeners(),history.go(o)}const r=assign$2({location:"",base:i,go:s,createHref:createHref.bind(null,i)},e,t);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function createWebHashHistory(i){return i=location.host?i||location.pathname+location.search:"",i.includes("#")||(i+="#"),createWebHistory(i)}function isRouteLocation(i){return typeof i=="string"||i&&typeof i=="object"}function isRouteName(i){return typeof i=="string"||typeof i=="symbol"}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},NavigationFailureSymbol=Symbol("");var NavigationFailureType;(function(i){i[i.aborted=4]="aborted",i[i.cancelled=8]="cancelled",i[i.duplicated=16]="duplicated"})(NavigationFailureType||(NavigationFailureType={}));function createRouterError(i,e){return assign$2(new Error,{type:i,[NavigationFailureSymbol]:!0},e)}function isNavigationFailure(i,e){return i instanceof Error&&NavigationFailureSymbol in i&&(e==null||!!(i.type&e))}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0},REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(i,e){const t=assign$2({},BASE_PATH_PARSER_OPTIONS,e),s=[];let r=t.start?"^":"";const o=[];for(const d of i){const m=d.length?[]:[90];t.strict&&!d.length&&(r+="/");for(let u=0;u<d.length;u++){const g=d[u];let b=40+(t.sensitive?.25:0);if(g.type===0)u||(r+="/"),r+=g.value.replace(REGEX_CHARS_RE,"\\$&"),b+=40;else if(g.type===1){const{value:y,repeatable:S,optional:v,regexp:x}=g;o.push({name:y,repeatable:S,optional:v});const A=x||BASE_PARAM_PATTERN;if(A!==BASE_PARAM_PATTERN){b+=10;try{new RegExp(`(${A})`)}catch(w){throw new Error(`Invalid custom RegExp for param "${y}" (${A}): `+w.message)}}let E=S?`((?:${A})(?:/(?:${A}))*)`:`(${A})`;u||(E=v&&d.length<2?`(?:/${E})`:"/"+E),v&&(E+="?"),r+=E,b+=20,v&&(b+=-8),S&&(b+=-20),A===".*"&&(b+=-50)}m.push(b)}s.push(m)}if(t.strict&&t.end){const d=s.length-1;s[d][s[d].length-1]+=.7000000000000001}t.strict||(r+="/?"),t.end?r+="$":t.strict&&(r+="(?:/|$)");const a=new RegExp(r,t.sensitive?"":"i");function l(d){const m=d.match(a),u={};if(!m)return null;for(let g=1;g<m.length;g++){const b=m[g]||"",y=o[g-1];u[y.name]=b&&y.repeatable?b.split("/"):b}return u}function c(d){let m="",u=!1;for(const g of i){(!u||!m.endsWith("/"))&&(m+="/"),u=!1;for(const b of g)if(b.type===0)m+=b.value;else if(b.type===1){const{value:y,repeatable:S,optional:v}=b,x=y in d?d[y]:"";if(isArray$7(x)&&!S)throw new Error(`Provided param "${y}" is an array but it is not repeatable (* or + modifiers)`);const A=isArray$7(x)?x.join("/"):x;if(!A)if(v)g.length<2&&(m.endsWith("/")?m=m.slice(0,-1):u=!0);else throw new Error(`Missing required param "${y}"`);m+=A}}return m||"/"}return{re:a,score:s,keys:o,parse:l,stringify:c}}function compareScoreArray(i,e){let t=0;for(;t<i.length&&t<e.length;){const s=e[t]-i[t];if(s)return s;t++}return i.length<e.length?i.length===1&&i[0]===40+40?-1:1:i.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function comparePathParserScore(i,e){let t=0;const s=i.score,r=e.score;for(;t<s.length&&t<r.length;){const o=compareScoreArray(s[t],r[t]);if(o)return o;t++}if(Math.abs(r.length-s.length)===1){if(isLastScoreNegative(s))return 1;if(isLastScoreNegative(r))return-1}return r.length-s.length}function isLastScoreNegative(i){const e=i[i.length-1];return i.length>0&&e[e.length-1]<0}const ROOT_TOKEN={type:0,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(i){if(!i)return[[]];if(i==="/")return[[ROOT_TOKEN]];if(!i.startsWith("/"))throw new Error(`Invalid path "${i}"`);function e(b){throw new Error(`ERR (${t})/"${d}": ${b}`)}let t=0,s=t;const r=[];let o;function a(){o&&r.push(o),o=[]}let l=0,c,d="",m="";function u(){d&&(t===0?o.push({type:0,value:d}):t===1||t===2||t===3?(o.length>1&&(c==="*"||c==="+")&&e(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:d,regexp:m,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):e("Invalid state to consume buffer"),d="")}function g(){d+=c}for(;l<i.length;){if(c=i[l++],c==="\\"&&t!==2){s=t,t=4;continue}switch(t){case 0:c==="/"?(d&&u(),a()):c===":"?(u(),t=1):g();break;case 4:g(),t=s;break;case 1:c==="("?t=2:VALID_PARAM_RE.test(c)?g():(u(),t=0,c!=="*"&&c!=="?"&&c!=="+"&&l--);break;case 2:c===")"?m[m.length-1]=="\\"?m=m.slice(0,-1)+c:t=3:m+=c;break;case 3:u(),t=0,c!=="*"&&c!=="?"&&c!=="+"&&l--,m="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${d}"`),u(),a(),r}function createRouteRecordMatcher(i,e,t){const s=tokensToParser(tokenizePath(i.path),t),r=assign$2(s,{record:i,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function createRouterMatcher(i,e){const t=[],s=new Map;e=mergeOptions({strict:!1,end:!0,sensitive:!1},e);function r(m){return s.get(m)}function o(m,u,g){const b=!g,y=normalizeRouteRecord(m);y.aliasOf=g&&g.record;const S=mergeOptions(e,m),v=[y];if("alias"in m){const E=typeof m.alias=="string"?[m.alias]:m.alias;for(const w of E)v.push(assign$2({},y,{components:g?g.record.components:y.components,path:w,aliasOf:g?g.record:y}))}let x,A;for(const E of v){const{path:w}=E;if(u&&w[0]!=="/"){const _=u.record.path,C=_[_.length-1]==="/"?"":"/";E.path=u.record.path+(w&&C+w)}if(x=createRouteRecordMatcher(E,u,S),g?g.alias.push(x):(A=A||x,A!==x&&A.alias.push(x),b&&m.name&&!isAliasRecord(x)&&a(m.name)),y.children){const _=y.children;for(let C=0;C<_.length;C++)o(_[C],x,g&&g.children[C])}g=g||x,(x.record.components&&Object.keys(x.record.components).length||x.record.name||x.record.redirect)&&c(x)}return A?()=>{a(A)}:noop$2}function a(m){if(isRouteName(m)){const u=s.get(m);u&&(s.delete(m),t.splice(t.indexOf(u),1),u.children.forEach(a),u.alias.forEach(a))}else{const u=t.indexOf(m);u>-1&&(t.splice(u,1),m.record.name&&s.delete(m.record.name),m.children.forEach(a),m.alias.forEach(a))}}function l(){return t}function c(m){let u=0;for(;u<t.length&&comparePathParserScore(m,t[u])>=0&&(m.record.path!==t[u].record.path||!isRecordChildOf(m,t[u]));)u++;t.splice(u,0,m),m.record.name&&!isAliasRecord(m)&&s.set(m.record.name,m)}function d(m,u){let g,b={},y,S;if("name"in m&&m.name){if(g=s.get(m.name),!g)throw createRouterError(1,{location:m});S=g.record.name,b=assign$2(paramsFromLocation(u.params,g.keys.filter(A=>!A.optional).map(A=>A.name)),m.params&¶msFromLocation(m.params,g.keys.map(A=>A.name))),y=g.stringify(b)}else if("path"in m)y=m.path,g=t.find(A=>A.re.test(y)),g&&(b=g.parse(y),S=g.record.name);else{if(g=u.name?s.get(u.name):t.find(A=>A.re.test(u.path)),!g)throw createRouterError(1,{location:m,currentLocation:u});S=g.record.name,b=assign$2({},u.params,m.params),y=g.stringify(b)}const v=[];let x=g;for(;x;)v.unshift(x.record),x=x.parent;return{name:S,path:y,params:b,matched:v,meta:mergeMetaFields(v)}}return i.forEach(m=>o(m)),{addRoute:o,resolve:d,removeRoute:a,getRoutes:l,getRecordMatcher:r}}function paramsFromLocation(i,e){const t={};for(const s of e)s in i&&(t[s]=i[s]);return t}function normalizeRouteRecord(i){return{path:i.path,redirect:i.redirect,name:i.name,meta:i.meta||{},aliasOf:void 0,beforeEnter:i.beforeEnter,props:normalizeRecordProps(i),children:i.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in i?i.components||null:i.component&&{default:i.component}}}function normalizeRecordProps(i){const e={},t=i.props||!1;if("component"in i)e.default=t;else for(const s in i.components)e[s]=typeof t=="boolean"?t:t[s];return e}function isAliasRecord(i){for(;i;){if(i.record.aliasOf)return!0;i=i.parent}return!1}function mergeMetaFields(i){return i.reduce((e,t)=>assign$2(e,t.meta),{})}function mergeOptions(i,e){const t={};for(const s in i)t[s]=s in e?e[s]:i[s];return t}function isRecordChildOf(i,e){return e.children.some(t=>t===i||isRecordChildOf(i,t))}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(i){return encodeURI(""+i).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(i){return commonEncode(i).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(i){return commonEncode(i).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(i){return encodeQueryValue(i).replace(EQUAL_RE,"%3D")}function encodePath(i){return commonEncode(i).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(i){return i==null?"":encodePath(i).replace(SLASH_RE,"%2F")}function decode$5(i){try{return decodeURIComponent(""+i)}catch(e){}return""+i}function parseQuery(i){const e={};if(i===""||i==="?")return e;const s=(i[0]==="?"?i.slice(1):i).split("&");for(let r=0;r<s.length;++r){const o=s[r].replace(PLUS_RE," "),a=o.indexOf("="),l=decode$5(a<0?o:o.slice(0,a)),c=a<0?null:decode$5(o.slice(a+1));if(l in e){let d=e[l];isArray$7(d)||(d=e[l]=[d]),d.push(c)}else e[l]=c}return e}function stringifyQuery(i){let e="";for(let t in i){const s=i[t];if(t=encodeQueryKey(t),s==null){s!==void 0&&(e+=(e.length?"&":"")+t);continue}(isArray$7(s)?s.map(o=>o&&encodeQueryValue(o)):[s&&encodeQueryValue(s)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+t,o!=null&&(e+="="+o))})}return e}function normalizeQuery(i){const e={};for(const t in i){const s=i[t];s!==void 0&&(e[t]=isArray$7(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return e}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let i=[];function e(s){return i.push(s),()=>{const r=i.indexOf(s);r>-1&&i.splice(r,1)}}function t(){i=[]}return{add:e,list:()=>i,reset:t}}function guardToPromiseFn(i,e,t,s,r){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=u=>{u===!1?l(createRouterError(4,{from:t,to:e})):u instanceof Error?l(u):isRouteLocation(u)?l(createRouterError(2,{from:e,to:u})):(o&&s.enterCallbacks[r]===o&&typeof u=="function"&&o.push(u),a())},d=i.call(s&&s.instances[r],e,t,c);let m=Promise.resolve(d);i.length<3&&(m=m.then(c)),m.catch(u=>l(u))})}function extractComponentsGuards(i,e,t,s){const r=[];for(const o of i)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(isRouteComponent(l)){const d=(l.__vccOpts||l)[e];d&&r.push(guardToPromiseFn(d,t,s,o,a))}else{let c=l();r.push(()=>c.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const m=isESModule(d)?d.default:d;o.components[a]=m;const g=(m.__vccOpts||m)[e];return g&&guardToPromiseFn(g,t,s,o,a)()}))}}return r}function isRouteComponent(i){return typeof i=="object"||"displayName"in i||"props"in i||"__vccOpts"in i}function useLink(i){const e=inject(routerKey),t=inject(routeLocationKey),s=computed(()=>e.resolve(unref(i.to))),r=computed(()=>{const{matched:c}=s.value,{length:d}=c,m=c[d-1],u=t.matched;if(!m||!u.length)return-1;const g=u.findIndex(isSameRouteRecord.bind(null,m));if(g>-1)return g;const b=getOriginalPath(c[d-2]);return d>1&&getOriginalPath(m)===b&&u[u.length-1].path!==b?u.findIndex(isSameRouteRecord.bind(null,c[d-2])):g}),o=computed(()=>r.value>-1&&includesParams(t.params,s.value.params)),a=computed(()=>r.value>-1&&r.value===t.matched.length-1&&isSameRouteLocationParams(t.params,s.value.params));function l(c={}){return guardEvent(c)?e[unref(i.replace)?"replace":"push"](unref(i.to)).catch(noop$2):Promise.resolve()}return{route:s,href:computed(()=>s.value.href),isActive:o,isExactActive:a,navigate:l}}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink,setup(i,{slots:e}){const t=reactive(useLink(i)),{options:s}=inject(routerKey),r=computed(()=>({[getLinkClass(i.activeClass,s.linkActiveClass,"router-link-active")]:t.isActive,[getLinkClass(i.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const o=e.default&&e.default(t);return i.custom?o:h("a",{"aria-current":t.isExactActive?i.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:r.value},o)}}}),RouterLink=RouterLinkImpl;function guardEvent(i){if(!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)&&!i.defaultPrevented&&!(i.button!==void 0&&i.button!==0)){if(i.currentTarget&&i.currentTarget.getAttribute){const e=i.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return i.preventDefault&&i.preventDefault(),!0}}function includesParams(i,e){for(const t in e){const s=e[t],r=i[t];if(typeof s=="string"){if(s!==r)return!1}else if(!isArray$7(r)||r.length!==s.length||s.some((o,a)=>o!==r[a]))return!1}return!0}function getOriginalPath(i){return i?i.aliasOf?i.aliasOf.path:i.path:""}const getLinkClass=(i,e,t)=>i!=null?i:e!=null?e:t,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(i,{attrs:e,slots:t}){const s=inject(routerViewLocationKey),r=computed(()=>i.route||s.value),o=inject(viewDepthKey,0),a=computed(()=>{let d=unref(o);const{matched:m}=r.value;let u;for(;(u=m[d])&&!u.components;)d++;return d}),l=computed(()=>r.value.matched[a.value]);provide(viewDepthKey,computed(()=>a.value+1)),provide(matchedRouteKey,l),provide(routerViewLocationKey,r);const c=ref();return watch(()=>[c.value,l.value,i.name],([d,m,u],[g,b,y])=>{m&&(m.instances[u]=d,b&&b!==m&&d&&d===g&&(m.leaveGuards.size||(m.leaveGuards=b.leaveGuards),m.updateGuards.size||(m.updateGuards=b.updateGuards))),d&&m&&(!b||!isSameRouteRecord(m,b)||!g)&&(m.enterCallbacks[u]||[]).forEach(S=>S(d))},{flush:"post"}),()=>{const d=r.value,m=i.name,u=l.value,g=u&&u.components[m];if(!g)return normalizeSlot(t.default,{Component:g,route:d});const b=u.props[m],y=b?b===!0?d.params:typeof b=="function"?b(d):b:null,v=h(g,assign$2({},y,e,{onVnodeUnmounted:x=>{x.component.isUnmounted&&(u.instances[m]=null)},ref:c}));return normalizeSlot(t.default,{Component:v,route:d})||v}}});function normalizeSlot(i,e){if(!i)return null;const t=i(e);return t.length===1?t[0]:t}const RouterView=RouterViewImpl;function createRouter(i){const e=createRouterMatcher(i.routes,i),t=i.parseQuery||parseQuery,s=i.stringifyQuery||stringifyQuery,r=i.history,o=useCallbacks(),a=useCallbacks(),l=useCallbacks(),c=shallowRef(START_LOCATION_NORMALIZED);let d=START_LOCATION_NORMALIZED;isBrowser&&i.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const m=applyToParams.bind(null,Y=>""+Y),u=applyToParams.bind(null,encodeParam),g=applyToParams.bind(null,decode$5);function b(Y,ae){let de,le;return isRouteName(Y)?(de=e.getRecordMatcher(Y),le=ae):le=Y,e.addRoute(le,de)}function y(Y){const ae=e.getRecordMatcher(Y);ae&&e.removeRoute(ae)}function S(){return e.getRoutes().map(Y=>Y.record)}function v(Y){return!!e.getRecordMatcher(Y)}function x(Y,ae){if(ae=assign$2({},ae||c.value),typeof Y=="string"){const U=parseURL(t,Y,ae.path),$=e.resolve({path:U.path},ae),M=r.createHref(U.fullPath);return assign$2(U,$,{params:g($.params),hash:decode$5(U.hash),redirectedFrom:void 0,href:M})}let de;if("path"in Y)de=assign$2({},Y,{path:parseURL(t,Y.path,ae.path).path});else{const U=assign$2({},Y.params);for(const $ in U)U[$]==null&&delete U[$];de=assign$2({},Y,{params:u(Y.params)}),ae.params=u(ae.params)}const le=e.resolve(de,ae),me=Y.hash||"";le.params=m(g(le.params));const ve=stringifyURL(s,assign$2({},Y,{hash:encodeHash(me),path:le.path})),ye=r.createHref(ve);return assign$2({fullPath:ve,hash:me,query:s===stringifyQuery?normalizeQuery(Y.query):Y.query||{}},le,{redirectedFrom:void 0,href:ye})}function A(Y){return typeof Y=="string"?parseURL(t,Y,c.value.path):assign$2({},Y)}function E(Y,ae){if(d!==Y)return createRouterError(8,{from:ae,to:Y})}function w(Y){return P(Y)}function _(Y){return w(assign$2(A(Y),{replace:!0}))}function C(Y){const ae=Y.matched[Y.matched.length-1];if(ae&&ae.redirect){const{redirect:de}=ae;let le=typeof de=="function"?de(Y):de;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=A(le):{path:le},le.params={}),assign$2({query:Y.query,hash:Y.hash,params:"path"in le?{}:Y.params},le)}}function P(Y,ae){const de=d=x(Y),le=c.value,me=Y.state,ve=Y.force,ye=Y.replace===!0,U=C(de);if(U)return P(assign$2(A(U),{state:typeof U=="object"?assign$2({},me,U.state):me,force:ve,replace:ye}),ae||de);const $=de;$.redirectedFrom=ae;let M;return!ve&&isSameRouteLocation(s,le,de)&&(M=createRouterError(16,{to:$,from:le}),fe(le,le,!0,!1)),(M?Promise.resolve(M):R($,le)).catch(Q=>isNavigationFailure(Q)?isNavigationFailure(Q,2)?Q:ie(Q):W(Q,$,le)).then(Q=>{if(Q){if(isNavigationFailure(Q,2))return P(assign$2({replace:ye},A(Q.to),{state:typeof Q.to=="object"?assign$2({},me,Q.to.state):me,force:ve}),ae||$)}else Q=G($,le,!0,ye,me);return N($,le,Q),Q})}function I(Y,ae){const de=E(Y,ae);return de?Promise.reject(de):Promise.resolve()}function R(Y,ae){let de;const[le,me,ve]=extractChangingRecords(Y,ae);de=extractComponentsGuards(le.reverse(),"beforeRouteLeave",Y,ae);for(const U of le)U.leaveGuards.forEach($=>{de.push(guardToPromiseFn($,Y,ae))});const ye=I.bind(null,Y,ae);return de.push(ye),runGuardQueue(de).then(()=>{de=[];for(const U of o.list())de.push(guardToPromiseFn(U,Y,ae));return de.push(ye),runGuardQueue(de)}).then(()=>{de=extractComponentsGuards(me,"beforeRouteUpdate",Y,ae);for(const U of me)U.updateGuards.forEach($=>{de.push(guardToPromiseFn($,Y,ae))});return de.push(ye),runGuardQueue(de)}).then(()=>{de=[];for(const U of Y.matched)if(U.beforeEnter&&!ae.matched.includes(U))if(isArray$7(U.beforeEnter))for(const $ of U.beforeEnter)de.push(guardToPromiseFn($,Y,ae));else de.push(guardToPromiseFn(U.beforeEnter,Y,ae));return de.push(ye),runGuardQueue(de)}).then(()=>(Y.matched.forEach(U=>U.enterCallbacks={}),de=extractComponentsGuards(ve,"beforeRouteEnter",Y,ae),de.push(ye),runGuardQueue(de))).then(()=>{de=[];for(const U of a.list())de.push(guardToPromiseFn(U,Y,ae));return de.push(ye),runGuardQueue(de)}).catch(U=>isNavigationFailure(U,8)?U:Promise.reject(U))}function N(Y,ae,de){for(const le of l.list())le(Y,ae,de)}function G(Y,ae,de,le,me){const ve=E(Y,ae);if(ve)return ve;const ye=ae===START_LOCATION_NORMALIZED,U=isBrowser?history.state:{};de&&(le||ye?r.replace(Y.fullPath,assign$2({scroll:ye&&U&&U.scroll},me)):r.push(Y.fullPath,me)),c.value=Y,fe(Y,ae,de,ye),ie()}let B;function k(){B||(B=r.listen((Y,ae,de)=>{if(!oe.listening)return;const le=x(Y),me=C(le);if(me){P(assign$2(me,{replace:!0}),le).catch(noop$2);return}d=le;const ve=c.value;isBrowser&&saveScrollPosition(getScrollKey(ve.fullPath,de.delta),computeScrollPosition()),R(le,ve).catch(ye=>isNavigationFailure(ye,12)?ye:isNavigationFailure(ye,2)?(P(ye.to,le).then(U=>{isNavigationFailure(U,20)&&!de.delta&&de.type===NavigationType.pop&&r.go(-1,!1)}).catch(noop$2),Promise.reject()):(de.delta&&r.go(-de.delta,!1),W(ye,le,ve))).then(ye=>{ye=ye||G(le,ve,!1),ye&&(de.delta&&!isNavigationFailure(ye,8)?r.go(-de.delta,!1):de.type===NavigationType.pop&&isNavigationFailure(ye,20)&&r.go(-1,!1)),N(le,ve,ye)}).catch(noop$2)}))}let T=useCallbacks(),V=useCallbacks(),Z;function W(Y,ae,de){ie(Y);const le=V.list();return le.length?le.forEach(me=>me(Y,ae,de)):console.error(Y),Promise.reject(Y)}function se(){return Z&&c.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((Y,ae)=>{T.add([Y,ae])})}function ie(Y){return Z||(Z=!Y,k(),T.list().forEach(([ae,de])=>Y?de(Y):ae()),T.reset()),Y}function fe(Y,ae,de,le){const{scrollBehavior:me}=i;if(!isBrowser||!me)return Promise.resolve();const ve=!de&&getSavedScrollPosition(getScrollKey(Y.fullPath,0))||(le||!de)&&history.state&&history.state.scroll||null;return nextTick().then(()=>me(Y,ae,ve)).then(ye=>ye&&scrollToPosition(ye)).catch(ye=>W(ye,Y,ae))}const J=Y=>r.go(Y);let K;const be=new Set,oe={currentRoute:c,listening:!0,addRoute:b,removeRoute:y,hasRoute:v,getRoutes:S,resolve:x,options:i,push:w,replace:_,go:J,back:()=>J(-1),forward:()=>J(1),beforeEach:o.add,beforeResolve:a.add,afterEach:l.add,onError:V.add,isReady:se,install(Y){const ae=this;Y.component("RouterLink",RouterLink),Y.component("RouterView",RouterView),Y.config.globalProperties.$router=ae,Object.defineProperty(Y.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(c)}),isBrowser&&!K&&c.value===START_LOCATION_NORMALIZED&&(K=!0,w(r.location).catch(me=>{}));const de={};for(const me in START_LOCATION_NORMALIZED)de[me]=computed(()=>c.value[me]);Y.provide(routerKey,ae),Y.provide(routeLocationKey,reactive(de)),Y.provide(routerViewLocationKey,c);const le=Y.unmount;be.add(Y),Y.unmount=function(){be.delete(Y),be.size<1&&(d=START_LOCATION_NORMALIZED,B&&B(),B=null,c.value=START_LOCATION_NORMALIZED,K=!1,Z=!1),le()}}};return oe}function runGuardQueue(i){return i.reduce((e,t)=>e.then(()=>t()),Promise.resolve())}function extractChangingRecords(i,e){const t=[],s=[],r=[],o=Math.max(e.matched.length,i.matched.length);for(let a=0;a<o;a++){const l=e.matched[a];l&&(i.matched.find(d=>isSameRouteRecord(d,l))?s.push(l):t.push(l));const c=i.matched[a];c&&(e.matched.find(d=>isSameRouteRecord(d,c))||r.push(c))}return[t,s,r]}function useRouter(){return inject(routerKey)}function useRoute$1(){return inject(routeLocationKey)}const isDef$1=i=>i!=null,isFunction$3=i=>typeof i=="function",isObject$3=i=>i!==null&&typeof i=="object",isPromise=i=>isObject$3(i)&&isFunction$3(i.then)&&isFunction$3(i.catch),isNumeric=i=>typeof i=="number"||/^\d+(\.\d+)?$/.test(i),isIOS$1=()=>inBrowser$2?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function noop$1(){}const extend$2=Object.assign,inBrowser$2=typeof window<"u";function get(i,e){const t=e.split(".");let s=i;return t.forEach(r=>{var o;s=isObject$3(s)&&(o=s[r])!=null?o:""}),s}function pick$1(i,e,t){return e.reduce((s,r)=>((!t||i[r]!==void 0)&&(s[r]=i[r]),s),{})}const isSameValue=(i,e)=>JSON.stringify(i)===JSON.stringify(e),toArray=i=>Array.isArray(i)?i:[i],unknownProp=null,numericProp=[Number,String],truthProp={type:Boolean,default:!0},makeRequiredProp=i=>({type:i,required:!0}),makeArrayProp=()=>({type:Array,default:()=>[]}),makeNumberProp=i=>({type:Number,default:i}),makeNumericProp=i=>({type:numericProp,default:i}),makeStringProp=i=>({type:String,default:i});var inBrowser$1=typeof window<"u";function raf(i){return inBrowser$1?requestAnimationFrame(i):-1}function cancelRaf(i){inBrowser$1&&cancelAnimationFrame(i)}function doubleRaf(i){raf(()=>raf(i))}var isWindow=i=>i===window,makeDOMRect=(i,e)=>({top:0,left:0,right:i,bottom:e,width:i,height:e}),useRect=i=>{const e=unref(i);if(isWindow(e)){const t=e.innerWidth,s=e.innerHeight;return makeDOMRect(t,s)}return e!=null&&e.getBoundingClientRect?e.getBoundingClientRect():makeDOMRect(0,0)};function useParent(i){const e=inject(i,null);if(e){const t=getCurrentInstance(),{link:s,unlink:r,internalChildren:o}=e;s(t),onUnmounted(()=>r(t));const a=computed(()=>o.indexOf(t));return{parent:e,index:a}}return{parent:null,index:ref(-1)}}function flattenVNodes(i){const e=[],t=s=>{Array.isArray(s)&&s.forEach(r=>{var o;isVNode(r)&&(e.push(r),(o=r.component)!=null&&o.subTree&&(e.push(r.component.subTree),t(r.component.subTree.children)),r.children&&t(r.children))})};return t(i),e}var findVNodeIndex=(i,e)=>{const t=i.indexOf(e);return t===-1?i.findIndex(s=>e.key!==void 0&&e.key!==null&&s.type===e.type&&s.key===e.key):t};function sortChildren(i,e,t){const s=flattenVNodes(i.subTree.children);t.sort((o,a)=>findVNodeIndex(s,o.vnode)-findVNodeIndex(s,a.vnode));const r=t.map(o=>o.proxy);e.sort((o,a)=>{const l=r.indexOf(o),c=r.indexOf(a);return l-c})}function useChildren(i){const e=reactive([]),t=reactive([]),s=getCurrentInstance();return{children:e,linkChildren:o=>{provide(i,Object.assign({link:c=>{c.proxy&&(t.push(c),e.push(c.proxy),sortChildren(s,e,t))},unlink:c=>{const d=t.indexOf(c);e.splice(d,1),t.splice(d,1)},children:e,internalChildren:t},o))}}}function onMountedOrActivated(i){let e;onMounted(()=>{i(),nextTick(()=>{e=!0})}),onActivated(()=>{e&&i()})}function useEventListener$1(i,e,t={}){if(!inBrowser$1)return;const{target:s=window,passive:r=!1,capture:o=!1}=t;let a=!1,l;const c=u=>{if(a)return;const g=unref(u);g&&!l&&(g.addEventListener(i,e,{capture:o,passive:r}),l=!0)},d=u=>{if(a)return;const g=unref(u);g&&l&&(g.removeEventListener(i,e,o),l=!1)};onUnmounted(()=>d(s)),onDeactivated(()=>d(s)),onMountedOrActivated(()=>c(s));let m;return isRef(s)&&(m=watch(s,(u,g)=>{d(g),c(u)})),()=>{m==null||m(),d(s),a=!0}}function useClickAway(i,e,t={}){if(!inBrowser$1)return;const{eventName:s="click"}=t;useEventListener$1(s,o=>{(Array.isArray(i)?i:[i]).every(c=>{const d=unref(c);return d&&!d.contains(o.target)})&&e(o)},{target:document})}var width,height;function useWindowSize(){if(!width&&(width=ref(0),height=ref(0),inBrowser$1)){const i=()=>{width.value=window.innerWidth,height.value=window.innerHeight};i(),window.addEventListener("resize",i,{passive:!0}),window.addEventListener("orientationchange",i,{passive:!0})}return{width,height}}var overflowScrollReg=/scroll|auto|overlay/i,defaultRoot=inBrowser$1?window:void 0;function isElement$1(i){return i.tagName!=="HTML"&&i.tagName!=="BODY"&&i.nodeType===1}function getScrollParent(i,e=defaultRoot){let t=i;for(;t&&t!==e&&isElement$1(t);){const{overflowY:s}=window.getComputedStyle(t);if(overflowScrollReg.test(s))return t;t=t.parentNode}return e}function useScrollParent(i,e=defaultRoot){const t=ref();return onMounted(()=>{i.value&&(t.value=getScrollParent(i.value,e))}),t}var visibility;function usePageVisibility(){if(!visibility&&(visibility=ref("visible"),inBrowser$1)){const i=()=>{visibility.value=document.hidden?"hidden":"visible"};i(),window.addEventListener("visibilitychange",i)}return visibility}var CUSTOM_FIELD_INJECTION_KEY=Symbol("van-field");function useCustomFieldValue(i){const e=inject(CUSTOM_FIELD_INJECTION_KEY,null);e&&!e.customValue.value&&(e.customValue.value=i,watch(i,()=>{e.resetValidation(),e.validateWithTrigger("onChange")}))}function getScrollTop(i){const e="scrollTop"in i?i.scrollTop:i.pageYOffset;return Math.max(e,0)}function setScrollTop(i,e){"scrollTop"in i?i.scrollTop=e:i.scrollTo(i.scrollX,e)}function getRootScrollTop(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function setRootScrollTop(i){setScrollTop(window,i),setScrollTop(document.body,i)}function getElementTop(i,e){if(i===window)return 0;const t=e?getScrollTop(e):getRootScrollTop();return useRect(i).top+t}const isIOS=isIOS$1();function resetScroll(){isIOS&&setRootScrollTop(getRootScrollTop())}const stopPropagation=i=>i.stopPropagation();function preventDefault(i,e){(typeof i.cancelable!="boolean"||i.cancelable)&&i.preventDefault(),e&&stopPropagation(i)}function isHidden(i){const e=unref(i);if(!e)return!1;const t=window.getComputedStyle(e),s=t.display==="none",r=e.offsetParent===null&&t.position!=="fixed";return s||r}const{width:windowWidth,height:windowHeight}=useWindowSize();function addUnit(i){if(isDef$1(i))return isNumeric(i)?`${i}px`:String(i)}function getSizeStyle(i){if(isDef$1(i)){if(Array.isArray(i))return{width:addUnit(i[0]),height:addUnit(i[1])};const e=addUnit(i);return{width:e,height:e}}}function getZIndexStyle(i){const e={};return i!==void 0&&(e.zIndex=+i),e}let rootFontSize;function getRootFontSize(){if(!rootFontSize){const i=document.documentElement,e=i.style.fontSize||window.getComputedStyle(i).fontSize;rootFontSize=parseFloat(e)}return rootFontSize}function convertRem(i){return i=i.replace(/rem/g,""),+i*getRootFontSize()}function convertVw(i){return i=i.replace(/vw/g,""),+i*windowWidth.value/100}function convertVh(i){return i=i.replace(/vh/g,""),+i*windowHeight.value/100}function unitToPx(i){if(typeof i=="number")return i;if(inBrowser$2){if(i.includes("rem"))return convertRem(i);if(i.includes("vw"))return convertVw(i);if(i.includes("vh"))return convertVh(i)}return parseFloat(i)}const camelizeRE=/-(\w)/g,camelize=i=>i.replace(camelizeRE,(e,t)=>t.toUpperCase()),kebabCase=i=>i.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,""),clamp=(i,e,t)=>Math.min(Math.max(i,e),t);function trimExtraChar(i,e,t){const s=i.indexOf(e);return s===-1?i:e==="-"&&s!==0?i.slice(0,s):i.slice(0,s+1)+i.slice(s).replace(t,"")}function formatNumber(i,e=!0,t=!0){e?i=trimExtraChar(i,".",/\./g):i=i.split(".")[0],t?i=trimExtraChar(i,"-",/-/g):i=i.replace(/-/,"");const s=e?/[^-0-9.]/g:/[^-0-9]/g;return i.replace(s,"")}function addNumber(i,e){return Math.round((i+e)*1e10)/1e10}const{hasOwnProperty:hasOwnProperty$1}=Object.prototype;function assignKey(i,e,t){const s=e[t];isDef$1(s)&&(!hasOwnProperty$1.call(i,t)||!isObject$3(s)?i[t]=s:i[t]=deepAssign(Object(i[t]),s))}function deepAssign(i,e){return Object.keys(e).forEach(t=>{assignKey(i,e,t)}),i}var stdin_default$i={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(i,e)=>`${i}年${e}月`,rangePrompt:i=>`最多选择 ${i} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:i=>`${i}折`,condition:i=>`满${i}元可用`},vanCouponCell:{title:"优惠券",count:i=>`${i}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const lang=ref("zh-CN"),messages=reactive({"zh-CN":stdin_default$i}),Locale={messages(){return messages[lang.value]},use(i,e){lang.value=i,this.add({[i]:e})},add(i={}){deepAssign(messages,i)}};var stdin_default$h=Locale;function createTranslate(i){const e=camelize(i)+".";return(t,...s)=>{const r=stdin_default$h.messages(),o=get(r,e+t)||get(r,t);return isFunction$3(o)?o(...s):o}}function genBem(i,e){return e?typeof e=="string"?` ${i}--${e}`:Array.isArray(e)?e.reduce((t,s)=>t+genBem(i,s),""):Object.keys(e).reduce((t,s)=>t+(e[s]?genBem(i,s):""),""):""}function createBEM(i){return(e,t)=>(e&&typeof e!="string"&&(t=e,e=""),e=e?`${i}__${e}`:i,`${e}${genBem(e,t)}`)}function createNamespace$1(i){const e=`van-${i}`;return[e,createBEM(e),createTranslate(e)]}const BORDER="van-hairline",BORDER_TOP=`${BORDER}--top`,BORDER_LEFT=`${BORDER}--left`,BORDER_BOTTOM=`${BORDER}--bottom`,BORDER_SURROUND=`${BORDER}--surround`,BORDER_TOP_BOTTOM=`${BORDER}--top-bottom`,BORDER_UNSET_TOP_BOTTOM=`${BORDER}-unset--top-bottom`,HAPTICS_FEEDBACK="van-haptics-feedback",FORM_KEY=Symbol("van-form");function callInterceptor(i,{args:e=[],done:t,canceled:s}){if(i){const r=i.apply(null,e);isPromise(r)?r.then(o=>{o?t():s&&s()}).catch(noop$1):r?t():s&&s()}else t()}function withInstall(i){return i.install=e=>{const{name:t}=i;t&&(e.component(t,i),e.component(camelize(`-${t}`),i))},i}const POPUP_TOGGLE_KEY=Symbol();function onPopupReopen(i){const e=inject(POPUP_TOGGLE_KEY,null);e&&watch(e,t=>{t&&i()})}const useHeight=(i,e)=>{const t=ref(),s=()=>{t.value=useRect(i).height};return onMounted(()=>{if(nextTick(s),e)for(let r=1;r<=3;r++)setTimeout(s,100*r)}),onPopupReopen(()=>nextTick(s)),watch([windowWidth,windowHeight],s),t};function usePlaceholder(i,e){const t=useHeight(i,!0);return s=>createVNode("div",{class:e("placeholder"),style:{height:t.value?`${t.value}px`:void 0}},[s()])}function useExpose(i){const e=getCurrentInstance();e&&extend$2(e.proxy,i)}const routeProps={to:[String,Object],url:String,replace:Boolean};function route({to:i,url:e,replace:t,$router:s}){i&&s?s[t?"replace":"push"](i):e&&(t?location.replace(e):location.href=e)}function useRoute(){const i=getCurrentInstance().proxy;return()=>route(i)}const[name$e,bem$e]=createNamespace$1("badge"),badgeProps={dot:Boolean,max:numericProp,tag:makeStringProp("div"),color:String,offset:Array,content:numericProp,showZero:truthProp,position:makeStringProp("top-right")};var stdin_default$g=defineComponent({name:name$e,props:badgeProps,setup(i,{slots:e}){const t=()=>{if(e.content)return!0;const{content:l,showZero:c}=i;return isDef$1(l)&&l!==""&&(c||l!==0&&l!=="0")},s=()=>{const{dot:l,max:c,content:d}=i;if(!l&&t())return e.content?e.content():isDef$1(c)&&isNumeric(d)&&+d>+c?`${c}+`:d},r=l=>l.startsWith("-")?l.replace("-",""):`-${l}`,o=computed(()=>{const l={background:i.color};if(i.offset){const[c,d]=i.offset,{position:m}=i,[u,g]=m.split("-");e.default?(typeof d=="number"?l[u]=addUnit(u==="top"?d:-d):l[u]=u==="top"?addUnit(d):r(d),typeof c=="number"?l[g]=addUnit(g==="left"?c:-c):l[g]=g==="left"?addUnit(c):r(c)):(l.marginTop=addUnit(d),l.marginLeft=addUnit(c))}return l}),a=()=>{if(t()||i.dot)return createVNode("div",{class:bem$e([i.position,{dot:i.dot,fixed:!!e.default}]),style:o.value},[s()])};return()=>{if(e.default){const{tag:l}=i;return createVNode(l,{class:bem$e("wrapper")},{default:()=>[e.default(),a()]})}return a()}}});const Badge=withInstall(stdin_default$g);let globalZIndex=2e3;const useGlobalZIndex=()=>++globalZIndex,setGlobalZIndex=i=>{globalZIndex=i},[name$d,bem$d]=createNamespace$1("config-provider"),CONFIG_PROVIDER_KEY=Symbol(name$d),configProviderProps={tag:makeStringProp("div"),theme:makeStringProp("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,iconPrefix:String};function mapThemeVarsToCSSVars(i){const e={};return Object.keys(i).forEach(t=>{e[`--van-${kebabCase(t)}`]=i[t]}),e}defineComponent({name:name$d,props:configProviderProps,setup(i,{slots:e}){const t=computed(()=>mapThemeVarsToCSSVars(extend$2({},i.themeVars,i.theme==="dark"?i.themeVarsDark:i.themeVarsLight)));if(inBrowser$2){const s=()=>{document.documentElement.classList.add(`van-theme-${i.theme}`)},r=(o=i.theme)=>{document.documentElement.classList.remove(`van-theme-${o}`)};watch(()=>i.theme,(o,a)=>{a&&r(a),s()},{immediate:!0}),onActivated(s),onDeactivated(r),onBeforeUnmount(r)}return provide(CONFIG_PROVIDER_KEY,i),watchEffect(()=>{i.zIndex!==void 0&&setGlobalZIndex(i.zIndex)}),()=>createVNode(i.tag,{class:bem$d(),style:t.value},{default:()=>{var s;return[(s=e.default)==null?void 0:s.call(e)]}})}});const[name$c,bem$c]=createNamespace$1("icon"),isImage=i=>i==null?void 0:i.includes("/"),iconProps={dot:Boolean,tag:makeStringProp("i"),name:String,size:numericProp,badge:numericProp,color:String,badgeProps:Object,classPrefix:String};var stdin_default$f=defineComponent({name:name$c,props:iconProps,setup(i,{slots:e}){const t=inject(CONFIG_PROVIDER_KEY,null),s=computed(()=>i.classPrefix||(t==null?void 0:t.iconPrefix)||bem$c());return()=>{const{tag:r,dot:o,name:a,size:l,badge:c,color:d}=i,m=isImage(a);return createVNode(Badge,mergeProps({dot:o,tag:r,class:[s.value,m?"":`${s.value}-${a}`],style:{color:d,fontSize:addUnit(l)},content:c},i.badgeProps),{default:()=>{var u;return[(u=e.default)==null?void 0:u.call(e),m&&createVNode("img",{class:bem$c("image"),src:a},null)]}})}}});const Icon$1=withInstall(stdin_default$f),[name$b,bem$b]=createNamespace$1("loading"),SpinIcon=Array(12).fill(null).map((i,e)=>createVNode("i",{class:bem$b("line",String(e+1))},null)),CircularIcon=createVNode("svg",{class:bem$b("circular"),viewBox:"25 25 50 50"},[createVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),loadingProps={size:numericProp,type:makeStringProp("circular"),color:String,vertical:Boolean,textSize:numericProp,textColor:String};var stdin_default$e=defineComponent({name:name$b,props:loadingProps,setup(i,{slots:e}){const t=computed(()=>extend$2({color:i.color},getSizeStyle(i.size))),s=()=>{const o=i.type==="spinner"?SpinIcon:CircularIcon;return createVNode("span",{class:bem$b("spinner",i.type),style:t.value},[e.icon?e.icon():o])},r=()=>{var o;if(e.default)return createVNode("span",{class:bem$b("text"),style:{fontSize:addUnit(i.textSize),color:(o=i.textColor)!=null?o:i.color}},[e.default()])};return()=>{const{type:o,vertical:a}=i;return createVNode("div",{class:bem$b([o,{vertical:a}]),"aria-live":"polite","aria-busy":!0},[s(),r()])}}});const Loading$1=withInstall(stdin_default$e),[name$a,bem$a]=createNamespace$1("button"),buttonProps=extend$2({},routeProps,{tag:makeStringProp("button"),text:String,icon:String,type:makeStringProp("default"),size:makeStringProp("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:makeStringProp("button"),loadingSize:numericProp,loadingText:String,loadingType:String,iconPosition:makeStringProp("left")});var stdin_default$d=defineComponent({name:name$a,props:buttonProps,emits:["click"],setup(i,{emit:e,slots:t}){const s=useRoute(),r=()=>t.loading?t.loading():createVNode(Loading$1,{size:i.loadingSize,type:i.loadingType,class:bem$a("loading")},null),o=()=>{if(i.loading)return r();if(t.icon)return createVNode("div",{class:bem$a("icon")},[t.icon()]);if(i.icon)return createVNode(Icon$1,{name:i.icon,class:bem$a("icon"),classPrefix:i.iconPrefix},null)},a=()=>{let d;if(i.loading?d=i.loadingText:d=t.default?t.default():i.text,d)return createVNode("span",{class:bem$a("text")},[d])},l=()=>{const{color:d,plain:m}=i;if(d){const u={color:m?d:"white"};return m||(u.background=d),d.includes("gradient")?u.border=0:u.borderColor=d,u}},c=d=>{i.loading?preventDefault(d):i.disabled||(e("click",d),s())};return()=>{const{tag:d,type:m,size:u,block:g,round:b,plain:y,square:S,loading:v,disabled:x,hairline:A,nativeType:E,iconPosition:w}=i,_=[bem$a([m,u,{plain:y,block:g,round:b,square:S,loading:v,disabled:x,hairline:A}]),{[BORDER_SURROUND]:A}];return createVNode(d,{type:E,class:_,style:l(),disabled:x,onClick:c},{default:()=>[createVNode("div",{class:bem$a("content")},[w==="left"&&o(),a(),w==="right"&&o()])]})}}});const Button=withInstall(stdin_default$d),popupSharedProps={show:Boolean,zIndex:numericProp,overlay:truthProp,duration:numericProp,teleport:[String,Object],lockScroll:truthProp,lazyRender:truthProp,beforeClose:Function,overlayStyle:Object,overlayClass:unknownProp,transitionAppear:Boolean,closeOnClickOverlay:truthProp},popupSharedPropKeys=Object.keys(popupSharedProps);function getDirection(i,e){return i>e?"horizontal":e>i?"vertical":""}function useTouch(){const i=ref(0),e=ref(0),t=ref(0),s=ref(0),r=ref(0),o=ref(0),a=ref(""),l=()=>a.value==="vertical",c=()=>a.value==="horizontal",d=()=>{t.value=0,s.value=0,r.value=0,o.value=0,a.value=""};return{move:g=>{const b=g.touches[0];t.value=(b.clientX<0?0:b.clientX)-i.value,s.value=b.clientY-e.value,r.value=Math.abs(t.value),o.value=Math.abs(s.value);const y=10;(!a.value||r.value<y&&o.value<y)&&(a.value=getDirection(r.value,o.value))},start:g=>{d(),i.value=g.touches[0].clientX,e.value=g.touches[0].clientY},reset:d,startX:i,startY:e,deltaX:t,deltaY:s,offsetX:r,offsetY:o,direction:a,isVertical:l,isHorizontal:c}}let totalLockCount=0;const BODY_LOCK_CLASS="van-overflow-hidden";function useLockScroll(i,e){const t=useTouch(),s="01",r="10",o=m=>{t.move(m);const u=t.deltaY.value>0?r:s,g=getScrollParent(m.target,i.value),{scrollHeight:b,offsetHeight:y,scrollTop:S}=g;let v="11";S===0?v=y>=b?"00":"01":S+y>=b&&(v="10"),v!=="11"&&t.isVertical()&&!(parseInt(v,2)&parseInt(u,2))&&preventDefault(m,!0)},a=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",o,{passive:!1}),totalLockCount||document.body.classList.add(BODY_LOCK_CLASS),totalLockCount++},l=()=>{totalLockCount&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",o),totalLockCount--,totalLockCount||document.body.classList.remove(BODY_LOCK_CLASS))},c=()=>e()&&a(),d=()=>e()&&l();onMountedOrActivated(c),onDeactivated(d),onBeforeUnmount(d),watch(e,m=>{m?a():l()})}function useLazyRender(i){const e=ref(!1);return watch(i,t=>{t&&(e.value=t)},{immediate:!0}),t=>()=>e.value?t():null}const[name$9,bem$9]=createNamespace$1("overlay"),overlayProps={show:Boolean,zIndex:numericProp,duration:numericProp,className:unknownProp,lockScroll:truthProp,lazyRender:truthProp,customStyle:Object};var stdin_default$c=defineComponent({name:name$9,props:overlayProps,setup(i,{slots:e}){const t=ref(),s=useLazyRender(()=>i.show||!i.lazyRender),r=a=>{i.lockScroll&&preventDefault(a,!0)},o=s(()=>{var a;const l=extend$2(getZIndexStyle(i.zIndex),i.customStyle);return isDef$1(i.duration)&&(l.animationDuration=`${i.duration}s`),withDirectives(createVNode("div",{ref:t,style:l,class:[bem$9(),i.className]},[(a=e.default)==null?void 0:a.call(e)]),[[vShow,i.show]])});return useEventListener$1("touchmove",r,{target:t}),()=>createVNode(Transition,{name:"van-fade",appear:!0},{default:o})}});const Overlay=withInstall(stdin_default$c),popupProps=extend$2({},popupSharedProps,{round:Boolean,position:makeStringProp("center"),closeIcon:makeStringProp("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:makeStringProp("top-right"),safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[name$8,bem$8]=createNamespace$1("popup");var stdin_default$b=defineComponent({name:name$8,inheritAttrs:!1,props:popupProps,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(i,{emit:e,attrs:t,slots:s}){let r,o;const a=ref(),l=ref(),c=useLazyRender(()=>i.show||!i.lazyRender),d=computed(()=>{const _={zIndex:a.value};if(isDef$1(i.duration)){const C=i.position==="center"?"animationDuration":"transitionDuration";_[C]=`${i.duration}s`}return _}),m=()=>{r||(r=!0,a.value=i.zIndex!==void 0?+i.zIndex:useGlobalZIndex(),e("open"))},u=()=>{r&&callInterceptor(i.beforeClose,{done(){r=!1,e("close"),e("update:show",!1)}})},g=_=>{e("clickOverlay",_),i.closeOnClickOverlay&&u()},b=()=>{if(i.overlay)return createVNode(Overlay,{show:i.show,class:i.overlayClass,zIndex:a.value,duration:i.duration,customStyle:i.overlayStyle,role:i.closeOnClickOverlay?"button":void 0,tabindex:i.closeOnClickOverlay?0:void 0,onClick:g},{default:s["overlay-content"]})},y=_=>{e("clickCloseIcon",_),u()},S=()=>{if(i.closeable)return createVNode(Icon$1,{role:"button",tabindex:0,name:i.closeIcon,class:[bem$8("close-icon",i.closeIconPosition),HAPTICS_FEEDBACK],classPrefix:i.iconPrefix,onClick:y},null)},v=()=>e("opened"),x=()=>e("closed"),A=_=>e("keydown",_),E=c(()=>{var _;const{round:C,position:P,safeAreaInsetTop:I,safeAreaInsetBottom:R}=i;return withDirectives(createVNode("div",mergeProps({ref:l,style:d.value,role:"dialog",tabindex:0,class:[bem$8({round:C,[P]:P}),{"van-safe-area-top":I,"van-safe-area-bottom":R}],onKeydown:A},t),[(_=s.default)==null?void 0:_.call(s),S()]),[[vShow,i.show]])}),w=()=>{const{position:_,transition:C,transitionAppear:P}=i,I=_==="center"?"van-fade":`van-popup-slide-${_}`;return createVNode(Transition,{name:C||I,appear:P,onAfterEnter:v,onAfterLeave:x},{default:E})};return watch(()=>i.show,_=>{_&&!r&&(m(),t.tabindex===0&&nextTick(()=>{var C;(C=l.value)==null||C.focus()})),!_&&r&&(r=!1,e("close"))}),useExpose({popupRef:l}),useLockScroll(l,()=>i.show&&i.lockScroll),useEventListener$1("popstate",()=>{i.closeOnPopstate&&(u(),o=!1)}),onMounted(()=>{i.show&&m()}),onActivated(()=>{o&&(e("update:show",!0),o=!1)}),onDeactivated(()=>{i.show&&i.teleport&&(u(),o=!0)}),provide(POPUP_TOGGLE_KEY,()=>i.show),()=>i.teleport?createVNode(Teleport,{to:i.teleport},{default:()=>[b(),w()]}):createVNode(Fragment,null,[b(),w()])}});const Popup=withInstall(stdin_default$b);let current=0;function useId(){const i=getCurrentInstance(),{name:e="unknown"}=(i==null?void 0:i.type)||{};return`${e}-${++current}`}let lockCount=0;function lockClick(i){i?(lockCount||document.body.classList.add("van-toast--unclickable"),lockCount++):lockCount&&(lockCount--,lockCount||document.body.classList.remove("van-toast--unclickable"))}const[name$7,bem$7]=createNamespace$1("toast"),popupInheritProps=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay"],toastProps={icon:String,show:Boolean,type:makeStringProp("text"),overlay:Boolean,message:numericProp,iconSize:numericProp,duration:makeNumberProp(2e3),position:makeStringProp("middle"),teleport:[String,Object],wordBreak:String,className:unknownProp,iconPrefix:String,transition:makeStringProp("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:unknownProp,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean};var stdin_default$a=defineComponent({name:name$7,props:toastProps,emits:["update:show"],setup(i,{emit:e,slots:t}){let s,r=!1;const o=()=>{const u=i.show&&i.forbidClick;r!==u&&(r=u,lockClick(r))},a=u=>e("update:show",u),l=()=>{i.closeOnClick&&a(!1)},c=()=>clearTimeout(s),d=()=>{const{icon:u,type:g,iconSize:b,iconPrefix:y,loadingType:S}=i;if(u||g==="success"||g==="fail")return createVNode(Icon$1,{name:u||g,size:b,class:bem$7("icon"),classPrefix:y},null);if(g==="loading")return createVNode(Loading$1,{class:bem$7("loading"),size:b,type:S},null)},m=()=>{const{type:u,message:g}=i;if(t.message)return createVNode("div",{class:bem$7("text")},[t.message()]);if(isDef$1(g)&&g!=="")return u==="html"?createVNode("div",{key:0,class:bem$7("text"),innerHTML:String(g)},null):createVNode("div",{class:bem$7("text")},[g])};return watch(()=>[i.show,i.forbidClick],o),watch(()=>[i.show,i.type,i.message,i.duration],()=>{c(),i.show&&i.duration>0&&(s=setTimeout(()=>{a(!1)},i.duration))}),onMounted(o),onUnmounted(o),()=>createVNode(Popup,mergeProps({class:[bem$7([i.position,i.wordBreak==="normal"?"break-normal":i.wordBreak,{[i.type]:!i.icon}]),i.className],lockScroll:!1,onClick:l,onClosed:c,"onUpdate:show":a},pick$1(i,popupInheritProps)),{default:()=>[d(),m()]})}});function usePopupState(){const i=reactive({show:!1}),e=r=>{i.show=r},t=r=>{extend$2(i,r,{transitionAppear:!0}),e(!0)},s=()=>e(!1);return useExpose({open:t,close:s,toggle:e}),{open:t,close:s,state:i,toggle:e}}function mountComponent(i){const e=createApp(i),t=document.createElement("div");return document.body.appendChild(t),{instance:e.mount(t),unmount(){e.unmount(),document.body.removeChild(t)}}}const defaultOptions$1={icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1};let queue=[],allowMultiple=!1,currentOptions=extend$2({},defaultOptions$1);const defaultOptionsMap=new Map;function parseOptions(i){return isObject$3(i)?i:{message:i}}function createInstance(){const{instance:i,unmount:e}=mountComponent({setup(){const t=ref(""),{open:s,state:r,close:o,toggle:a}=usePopupState(),l=()=>{},c=()=>createVNode(stdin_default$a,mergeProps(r,{onClosed:l,"onUpdate:show":a}),null);return watch(t,d=>{r.message=d}),getCurrentInstance().render=c,{open:s,close:o,message:t}}});return i}function getInstance(){if(!queue.length||allowMultiple){const i=createInstance();queue.push(i)}return queue[queue.length-1]}function showToast(i={}){if(!inBrowser$2)return{};const e=getInstance(),t=parseOptions(i);return e.open(extend$2({},currentOptions,defaultOptionsMap.get(t.type||currentOptions.type),t)),e}const createMethod=i=>e=>showToast(extend$2({type:i},parseOptions(e))),showLoadingToast=createMethod("loading"),closeToast=i=>{queue.length&&(i?(queue.forEach(e=>{e.close()}),queue=[]):queue[0].close())};withInstall(stdin_default$a);const[name$6,bem$6]=createNamespace$1("empty"),emptyProps={image:makeStringProp("default"),imageSize:[Number,String,Array],description:String};var stdin_default$9=defineComponent({name:name$6,props:emptyProps,setup(i,{slots:e}){const t=()=>{const x=e.description?e.description():i.description;if(x)return createVNode("p",{class:bem$6("description")},[x])},s=()=>{if(e.default)return createVNode("div",{class:bem$6("bottom")},[e.default()])},r=useId(),o=x=>`${r}-${x}`,a=x=>`url(#${o(x)})`,l=(x,A,E)=>createVNode("stop",{"stop-color":x,offset:`${A}%`,"stop-opacity":E},null),c=(x,A)=>[l(x,0),l(A,100)],d=x=>[createVNode("defs",null,[createVNode("radialGradient",{id:o(x),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)"},[l("#EBEDF0",0),l("#F2F3F5",100,.3)])]),createVNode("ellipse",{fill:a(x),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],m=()=>[createVNode("defs",null,[createVNode("linearGradient",{id:o("a"),x1:"64%",y1:"100%",x2:"64%"},[l("#FFF",0,.5),l("#F2F3F5",100)])]),createVNode("g",{opacity:".8"},[createVNode("path",{d:"M36 131V53H16v20H2v58h34z",fill:a("a")},null),createVNode("path",{d:"M123 15h22v14h9v77h-31V15z",fill:a("a")},null)])],u=()=>[createVNode("defs",null,[createVNode("linearGradient",{id:o("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%"},[l("#F2F3F5",0,.3),l("#F2F3F5",100)])]),createVNode("g",{opacity:".8"},[createVNode("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:a("b")},null),createVNode("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:a("b")},null)])],g=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{id:o(1),x1:"64%",y1:"100%",x2:"64%"},[l("#FFF",0,.5),l("#F2F3F5",100)]),createVNode("linearGradient",{id:o(2),x1:"50%",x2:"50%",y2:"84%"},[l("#EBEDF0",0),l("#DCDEE0",100,0)]),createVNode("linearGradient",{id:o(3),x1:"100%",x2:"100%",y2:"100%"},[c("#EAEDF0","#DCDEE0")]),createVNode("radialGradient",{id:o(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[l("#EBEDF0",0),l("#FFF",100,0)])]),createVNode("g",{fill:"none"},[m(),createVNode("path",{fill:a(4),d:"M0 139h160v21H0z"},null),createVNode("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:a(2)},null),createVNode("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7"},[createVNode("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:a(3)},null),createVNode("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:a(3)},null),createVNode("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:a(3)},null),createVNode("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:a(3)},null)]),createVNode("g",{transform:"translate(31 105)"},[createVNode("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),createVNode("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),createVNode("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),b=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(5)},[c("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:o(6)},[c("#EAEDF1","#DCDEE0")]),createVNode("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:o(7)},[c("#EAEDF1","#DCDEE0")])]),m(),u(),createVNode("g",{transform:"translate(36 50)",fill:"none"},[createVNode("g",{transform:"translate(8)"},[createVNode("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),createVNode("rect",{fill:a(5),width:"64",height:"66",rx:"2"},null),createVNode("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),createVNode("g",{transform:"translate(15 17)",fill:a(6)},[createVNode("rect",{width:"34",height:"6",rx:"1"},null),createVNode("path",{d:"M0 14h34v6H0z"},null),createVNode("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),createVNode("rect",{fill:a(7),y:"61",width:"88",height:"28",rx:"1"},null),createVNode("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),y=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(8)},[c("#EAEDF1","#DCDEE0")])]),m(),u(),d("c"),createVNode("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:a(8)},null)]),S=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:o(9)},[c("#EEE","#D8D8D8")]),createVNode("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:o(10)},[c("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(11)},[c("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:o(12)},[c("#FFF","#F7F8FA")])]),m(),u(),d("d"),createVNode("g",{transform:"rotate(-45 113 -4)",fill:"none"},[createVNode("rect",{fill:a(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),createVNode("rect",{fill:a(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),createVNode("circle",{stroke:a(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),createVNode("circle",{fill:a(12),cx:"27",cy:"27",r:"16"},null),createVNode("path",{d:"M37 7c-8 0-15 5-16 12",stroke:a(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),v=()=>{var x;if(e.image)return e.image();const A={error:y,search:S,network:g,default:b};return((x=A[i.image])==null?void 0:x.call(A))||createVNode("img",{src:i.image},null)};return()=>createVNode("div",{class:bem$6()},[createVNode("div",{class:bem$6("image"),style:getSizeStyle(i.imageSize)},[v()]),t(),s()])}});const Empty=withInstall(stdin_default$9),[name$5,bem$5]=createNamespace$1("nav-bar"),navBarProps={title:String,fixed:Boolean,zIndex:numericProp,border:truthProp,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:truthProp};var stdin_default$8=defineComponent({name:name$5,props:navBarProps,emits:["clickLeft","clickRight"],setup(i,{emit:e,slots:t}){const s=ref(),r=usePlaceholder(s,bem$5),o=m=>e("clickLeft",m),a=m=>e("clickRight",m),l=()=>t.left?t.left():[i.leftArrow&&createVNode(Icon$1,{class:bem$5("arrow"),name:"arrow-left"},null),i.leftText&&createVNode("span",{class:bem$5("text")},[i.leftText])],c=()=>t.right?t.right():createVNode("span",{class:bem$5("text")},[i.rightText]),d=()=>{const{title:m,fixed:u,border:g,zIndex:b}=i,y=getZIndexStyle(b),S=i.leftArrow||i.leftText||t.left,v=i.rightText||t.right;return createVNode("div",{ref:s,style:y,class:[bem$5({fixed:u}),{[BORDER_BOTTOM]:g,"van-safe-area-top":i.safeAreaInsetTop}]},[createVNode("div",{class:bem$5("content")},[S&&createVNode("div",{class:[bem$5("left"),i.clickable?HAPTICS_FEEDBACK:""],onClick:o},[l()]),createVNode("div",{class:[bem$5("title"),"van-ellipsis"]},[t.title?t.title():m]),v&&createVNode("div",{class:[bem$5("right"),i.clickable?HAPTICS_FEEDBACK:""],onClick:a},[c()])])])};return()=>i.fixed&&i.placeholder?r(d):d()}});const NavBar=withInstall(stdin_default$8),[name$4,bem$4]=createNamespace$1("notice-bar"),noticeBarProps={text:String,mode:String,color:String,delay:makeNumericProp(1),speed:makeNumericProp(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var stdin_default$7=defineComponent({name:name$4,props:noticeBarProps,emits:["close","replay"],setup(i,{emit:e,slots:t}){let s=0,r=0,o;const a=ref(),l=ref(),c=reactive({show:!0,offset:0,duration:0}),d=()=>{if(t["left-icon"])return t["left-icon"]();if(i.leftIcon)return createVNode(Icon$1,{class:bem$4("left-icon"),name:i.leftIcon},null)},m=()=>{if(i.mode==="closeable")return"cross";if(i.mode==="link")return"arrow"},u=v=>{i.mode==="closeable"&&(c.show=!1,e("close",v))},g=()=>{if(t["right-icon"])return t["right-icon"]();const v=m();if(v)return createVNode(Icon$1,{name:v,class:bem$4("right-icon"),onClick:u},null)},b=()=>{c.offset=s,c.duration=0,raf(()=>{doubleRaf(()=>{c.offset=-r,c.duration=(r+s)/+i.speed,e("replay")})})},y=()=>{const v=i.scrollable===!1&&!i.wrapable,x={transform:c.offset?`translateX(${c.offset}px)`:"",transitionDuration:`${c.duration}s`};return createVNode("div",{ref:a,role:"marquee",class:bem$4("wrap")},[createVNode("div",{ref:l,style:x,class:[bem$4("content"),{"van-ellipsis":v}],onTransitionend:b},[t.default?t.default():i.text])])},S=()=>{const{delay:v,speed:x,scrollable:A}=i,E=isDef$1(v)?+v*1e3:0;s=0,r=0,c.offset=0,c.duration=0,clearTimeout(o),o=setTimeout(()=>{if(!a.value||!l.value||A===!1)return;const w=useRect(a).width,_=useRect(l).width;(A||_>w)&&doubleRaf(()=>{s=w,r=_,c.offset=-r,c.duration=r/+x})},E)};return onPopupReopen(S),onMountedOrActivated(S),useEventListener$1("pageshow",S),useExpose({reset:S}),watch(()=>[i.text,i.scrollable],S),()=>{const{color:v,wrapable:x,background:A}=i;return withDirectives(createVNode("div",{role:"alert",class:bem$4({wrapable:x}),style:{color:v,background:A}},[d(),y(),g()]),[[vShow,c.show]])}}});const NoticeBar=withInstall(stdin_default$7),[name$3,bem$3]=createNamespace$1("skeleton-title"),skeletonTitleProps={round:Boolean,titleWidth:numericProp};var stdin_default$6=defineComponent({name:name$3,props:skeletonTitleProps,setup(i){return()=>createVNode("h3",{class:bem$3([{round:i.round}]),style:{width:addUnit(i.titleWidth)}},null)}});const SkeletonTitle=withInstall(stdin_default$6);var stdin_default$5=SkeletonTitle;const[name$2,bem$2]=createNamespace$1("skeleton-avatar"),skeletonAvatarProps={avatarSize:numericProp,avatarShape:makeStringProp("round")};var stdin_default$4=defineComponent({name:name$2,props:skeletonAvatarProps,setup(i){return()=>createVNode("div",{class:bem$2([i.avatarShape]),style:getSizeStyle(i.avatarSize)},null)}});const SkeletonAvatar=withInstall(stdin_default$4);var stdin_default$3=SkeletonAvatar;const DEFAULT_ROW_WIDTH="100%",skeletonParagraphProps={round:Boolean,rowWidth:{type:numericProp,default:DEFAULT_ROW_WIDTH}},[name$1,bem$1]=createNamespace$1("skeleton-paragraph");var stdin_default$2=defineComponent({name:name$1,props:skeletonParagraphProps,setup(i){return()=>createVNode("div",{class:bem$1([{round:i.round}]),style:{width:i.rowWidth}},null)}});const SkeletonParagraph=withInstall(stdin_default$2);var stdin_default$1=SkeletonParagraph;const[name,bem]=createNamespace$1("skeleton"),DEFAULT_LAST_ROW_WIDTH="60%",skeletonProps={row:makeNumericProp(0),round:Boolean,title:Boolean,titleWidth:numericProp,avatar:Boolean,avatarSize:numericProp,avatarShape:makeStringProp("round"),loading:truthProp,animate:truthProp,rowWidth:{type:[Number,String,Array],default:DEFAULT_ROW_WIDTH}};var stdin_default=defineComponent({name,inheritAttrs:!1,props:skeletonProps,setup(i,{slots:e,attrs:t}){const s=()=>{if(i.avatar)return createVNode(stdin_default$3,{avatarShape:i.avatarShape,avatarSize:i.avatarSize},null)},r=()=>{if(i.title)return createVNode(stdin_default$5,{round:i.round,titleWidth:i.titleWidth},null)},o=c=>{const{rowWidth:d}=i;return d===DEFAULT_ROW_WIDTH&&c===+i.row-1?DEFAULT_LAST_ROW_WIDTH:Array.isArray(d)?d[c]:d},a=()=>Array(+i.row).fill("").map((c,d)=>createVNode(stdin_default$1,{key:d,round:i.round,rowWidth:addUnit(o(d))},null)),l=()=>e.template?e.template():createVNode(Fragment,null,[s(),createVNode("div",{class:bem("content")},[r(),a()])]);return()=>{var c;return i.loading?createVNode("div",mergeProps({class:bem({animate:i.animate,round:i.round})},t),[l()]):(c=e.default)==null?void 0:c.call(e)}}});const Skeleton=withInstall(stdin_default),storeData=reactive({status:"init",user:{},platformType:"STUDENT",platformApi:"/api-student",proxy:"",isApp:!1}),setStoreData=i=>{Object.assign(storeData,i)},setUserInfo=i=>{storeData.status="login",storeData.user=i||{}};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getAugmentedNamespace(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){if(this instanceof s){var r=[null];r.push.apply(r,arguments);var o=Function.bind.apply(e,r);return new o}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var assign$1=make_assign(),create$1=make_create(),trim$1=make_trim(),Global$5=typeof window<"u"?window:commonjsGlobal,util$i={assign:assign$1,create:create$1,trim:trim$1,bind:bind$3,slice:slice$3,each:each$8,map,pluck:pluck$1,isList:isList$1,isFunction:isFunction$2,isObject:isObject$2,Global:Global$5};function make_assign(){return Object.assign?Object.assign:function(e,t,s,r){for(var o=1;o<arguments.length;o++)each$8(Object(arguments[o]),function(a,l){e[l]=a});return e}}function make_create(){if(Object.create)return function(e,t,s,r){var o=slice$3(arguments,1);return assign$1.apply(this,[Object.create(e)].concat(o))};{let i=function(){};return function(t,s,r,o){var a=slice$3(arguments,1);return i.prototype=t,assign$1.apply(this,[new i].concat(a))}}}function make_trim(){return String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function bind$3(i,e){return function(){return e.apply(i,Array.prototype.slice.call(arguments,0))}}function slice$3(i,e){return Array.prototype.slice.call(i,e||0)}function each$8(i,e){pluck$1(i,function(t,s){return e(t,s),!1})}function map(i,e){var t=isList$1(i)?[]:{};return pluck$1(i,function(s,r){return t[r]=e(s,r),!1}),t}function pluck$1(i,e){if(isList$1(i)){for(var t=0;t<i.length;t++)if(e(i[t],t))return i[t]}else for(var s in i)if(i.hasOwnProperty(s)&&e(i[s],s))return i[s]}function isList$1(i){return i!=null&&typeof i!="function"&&typeof i.length=="number"}function isFunction$2(i){return i&&{}.toString.call(i)==="[object Function]"}function isObject$2(i){return i&&{}.toString.call(i)==="[object Object]"}var util$h=util$i,slice$2=util$h.slice,pluck=util$h.pluck,each$7=util$h.each,bind$2=util$h.bind,create=util$h.create,isList=util$h.isList,isFunction$1=util$h.isFunction,isObject$1=util$h.isObject,storeEngine={createStore},storeAPI={version:"2.0.12",enabled:!1,get:function(i,e){var t=this.storage.read(this._namespacePrefix+i);return this._deserialize(t,e)},set:function(i,e){return e===void 0?this.remove(i):(this.storage.write(this._namespacePrefix+i,this._serialize(e)),e)},remove:function(i){this.storage.remove(this._namespacePrefix+i)},each:function(i){var e=this;this.storage.each(function(t,s){i.call(e,e._deserialize(t),(s||"").replace(e._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(i){return this._namespacePrefix=="__storejs_"+i+"_"},createStore:function(){return createStore.apply(this,arguments)},addPlugin:function(i){this._addPlugin(i)},namespace:function(i){return createStore(this.storage,this.plugins,i)}};function _warn(){var i=typeof console>"u"?null:console;if(i){var e=i.warn?i.warn:i.log;e.apply(i,arguments)}}function createStore(i,e,t){t||(t=""),i&&!isList(i)&&(i=[i]),e&&!isList(e)&&(e=[e]);var s=t?"__storejs_"+t+"_":"",r=t?new RegExp("^"+s):null,o=/^[a-zA-Z0-9_\-]*$/;if(!o.test(t))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var a={_namespacePrefix:s,_namespaceRegexp:r,_testStorage:function(c){try{var d="__storejs__test__";c.write(d,d);var m=c.read(d)===d;return c.remove(d),m}catch(u){return!1}},_assignPluginFnProp:function(c,d){var m=this[d];this[d]=function(){var g=slice$2(arguments,0),b=this;function y(){if(m)return each$7(arguments,function(v,x){g[x]=v}),m.apply(b,g)}var S=[y].concat(g);return c.apply(b,S)}},_serialize:function(c){return JSON.stringify(c)},_deserialize:function(c,d){if(!c)return d;var m="";try{m=JSON.parse(c)}catch(u){m=c}return m!==void 0?m:d},_addStorage:function(c){this.enabled||this._testStorage(c)&&(this.storage=c,this.enabled=!0)},_addPlugin:function(c){var d=this;if(isList(c)){each$7(c,function(g){d._addPlugin(g)});return}var m=pluck(this.plugins,function(g){return c===g});if(!m){if(this.plugins.push(c),!isFunction$1(c))throw new Error("Plugins must be function values that return objects");var u=c.call(this);if(!isObject$1(u))throw new Error("Plugins must return an object of function properties");each$7(u,function(g,b){if(!isFunction$1(g))throw new Error("Bad plugin property: "+b+" from plugin "+c.name+". Plugins should only return functions.");d._assignPluginFnProp(g,b)})}},addStorage:function(c){_warn("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(c)}},l=create(a,storeAPI,{plugins:[]});return l.raw={},each$7(l,function(c,d){isFunction$1(c)&&(l.raw[d]=bind$2(l,c))}),each$7(i,function(c){l._addStorage(c)}),each$7(e,function(c){l._addPlugin(c)}),l}var util$g=util$i,Global$4=util$g.Global,localStorage_1={name:"localStorage",read:read$5,write:write$5,each:each$6,remove:remove$6,clearAll:clearAll$5};function localStorage$1(){return Global$4.localStorage}function read$5(i){return localStorage$1().getItem(i)}function write$5(i,e){return localStorage$1().setItem(i,e)}function each$6(i){for(var e=localStorage$1().length-1;e>=0;e--){var t=localStorage$1().key(e);i(read$5(t),t)}}function remove$6(i){return localStorage$1().removeItem(i)}function clearAll$5(){return localStorage$1().clear()}var util$f=util$i,Global$3=util$f.Global,oldFFGlobalStorage={name:"oldFF-globalStorage",read:read$4,write:write$4,each:each$5,remove:remove$5,clearAll:clearAll$4},globalStorage=Global$3.globalStorage;function read$4(i){return globalStorage[i]}function write$4(i,e){globalStorage[i]=e}function each$5(i){for(var e=globalStorage.length-1;e>=0;e--){var t=globalStorage.key(e);i(globalStorage[t],t)}}function remove$5(i){return globalStorage.removeItem(i)}function clearAll$4(){each$5(function(i,e){delete globalStorage[i]})}var util$e=util$i,Global$2=util$e.Global,oldIEUserDataStorage={name:"oldIE-userDataStorage",write:write$3,read:read$3,each:each$4,remove:remove$4,clearAll:clearAll$3},storageName="storejs",doc$1=Global$2.document,_withStorageEl=_makeIEStorageElFunction(),disable$1=(Global$2.navigator?Global$2.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function write$3(i,e){if(!disable$1){var t=fixKey(i);_withStorageEl(function(s){s.setAttribute(t,e),s.save(storageName)})}}function read$3(i){if(!disable$1){var e=fixKey(i),t=null;return _withStorageEl(function(s){t=s.getAttribute(e)}),t}}function each$4(i){_withStorageEl(function(e){for(var t=e.XMLDocument.documentElement.attributes,s=t.length-1;s>=0;s--){var r=t[s];i(e.getAttribute(r.name),r.name)}})}function remove$4(i){var e=fixKey(i);_withStorageEl(function(t){t.removeAttribute(e),t.save(storageName)})}function clearAll$3(){_withStorageEl(function(i){var e=i.XMLDocument.documentElement.attributes;i.load(storageName);for(var t=e.length-1;t>=0;t--)i.removeAttribute(e[t].name);i.save(storageName)})}var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fixKey(i){return i.replace(/^\d/,"___$&").replace(forbiddenCharsRegex,"___")}function _makeIEStorageElFunction(){if(!doc$1||!doc$1.documentElement||!doc$1.documentElement.addBehavior)return null;var i="script",e,t,s;try{t=new ActiveXObject("htmlfile"),t.open(),t.write("<"+i+">document.w=window</"+i+'><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,s=e.createElement("div")}catch(r){s=doc$1.createElement("div"),e=doc$1.body}return function(r){var o=[].slice.call(arguments,0);o.unshift(s),e.appendChild(s),s.addBehavior("#default#userData"),s.load(storageName),r.apply(this,o),e.removeChild(s)}}var util$d=util$i,Global$1=util$d.Global,trim=util$d.trim,cookieStorage={name:"cookieStorage",read:read$2,write:write$2,each:each$3,remove:remove$3,clearAll:clearAll$2},doc=Global$1.document;function read$2(i){if(!i||!_has(i))return null;var e="(?:^|.*;\\s*)"+escape(i).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(doc.cookie.replace(new RegExp(e),"$1"))}function each$3(i){for(var e=doc.cookie.split(/; ?/g),t=e.length-1;t>=0;t--)if(trim(e[t])){var s=e[t].split("="),r=unescape(s[0]),o=unescape(s[1]);i(o,r)}}function write$2(i,e){i&&(doc.cookie=escape(i)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function remove$3(i){!i||!_has(i)||(doc.cookie=escape(i)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function clearAll$2(){each$3(function(i,e){remove$3(e)})}function _has(i){return new RegExp("(?:^|;\\s*)"+escape(i).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(doc.cookie)}var util$c=util$i,Global=util$c.Global,sessionStorage_1={name:"sessionStorage",read:read$1,write:write$1,each:each$2,remove:remove$2,clearAll:clearAll$1};function sessionStorage$1(){return Global.sessionStorage}function read$1(i){return sessionStorage$1().getItem(i)}function write$1(i,e){return sessionStorage$1().setItem(i,e)}function each$2(i){for(var e=sessionStorage$1().length-1;e>=0;e--){var t=sessionStorage$1().key(e);i(read$1(t),t)}}function remove$2(i){return sessionStorage$1().removeItem(i)}function clearAll$1(){return sessionStorage$1().clear()}var memoryStorage_1={name:"memoryStorage",read,write,each:each$1,remove:remove$1,clearAll},memoryStorage={};function read(i){return memoryStorage[i]}function write(i,e){memoryStorage[i]=e}function each$1(i){for(var e in memoryStorage)memoryStorage.hasOwnProperty(e)&&i(memoryStorage[e],e)}function remove$1(i){delete memoryStorage[i]}function clearAll(i){memoryStorage={}}var all=[localStorage_1,oldFFGlobalStorage,oldIEUserDataStorage,cookieStorage,sessionStorage_1,memoryStorage_1],json2$1={},hasRequiredJson2;function requireJson2(){return hasRequiredJson2||(hasRequiredJson2=1,typeof JSON!="object"&&(JSON={}),function(){var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(i){return i<10?"0"+i:i}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(i){return rx_escapable.lastIndex=0,rx_escapable.test(i)?'"'+i.replace(rx_escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'}function str(i,e){var t,s,r,o,a=gap,l,c=e[i];switch(c&&typeof c=="object"&&typeof c.toJSON=="function"&&(c=c.toJSON(i)),typeof rep=="function"&&(c=rep.call(e,i,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,l=[],Object.prototype.toString.apply(c)==="[object Array]"){for(o=c.length,t=0;t<o;t+=1)l[t]=str(t,c)||"null";return r=l.length===0?"[]":gap?`[
- `+gap+l.join(`,
- `+gap)+`
- `+a+"]":"["+l.join(",")+"]",gap=a,r}if(rep&&typeof rep=="object")for(o=rep.length,t=0;t<o;t+=1)typeof rep[t]=="string"&&(s=rep[t],r=str(s,c),r&&l.push(quote(s)+(gap?": ":":")+r));else for(s in c)Object.prototype.hasOwnProperty.call(c,s)&&(r=str(s,c),r&&l.push(quote(s)+(gap?": ":":")+r));return r=l.length===0?"{}":gap?`{
- `+gap+l.join(`,
- `+gap)+`
- `+a+"}":"{"+l.join(",")+"}",gap=a,r}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(i,e,t){var s;if(gap="",indent="",typeof t=="number")for(s=0;s<t;s+=1)indent+=" ";else typeof t=="string"&&(indent=t);if(rep=e,e&&typeof e!="function"&&(typeof e!="object"||typeof e.length!="number"))throw new Error("JSON.stringify");return str("",{"":i})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(i,e){var t,s,r=i[e];if(r&&typeof r=="object")for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&(s=walk(r,t),s!==void 0?r[t]=s:delete r[t]);return reviver.call(i,e,r)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(i){return"\\u"+("0000"+i.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),json2$1}var json2=json2Plugin;function json2Plugin(){return requireJson2(),{}}var engine=storeEngine,storages=all,plugins=[json2],store_legacy=engine.createStore(storages,plugins);const browser=()=>{const i=navigator.userAgent;return{trident:i.indexOf("Trident")>-1,presto:i.indexOf("Presto")>-1,webKit:i.indexOf("AppleWebKit")>-1,gecko:i.indexOf("Gecko")>-1&&i.indexOf("KHTML")==-1,mobile:!!i.match(/AppleWebKit.*Mobile.*/),ios:!!i.match(/Mac OS X/)||/(iPhone|iPad|iPod|iOS)/i.test(i),android:i.indexOf("Android")>-1||i.indexOf("Adr")>-1,iPhone:i.indexOf("ORCHESTRAAPPI")>-1,isApp:i.includes("DAYAAPPA")||i.includes("DAYAAPPI")||i.includes("COLEXIUAPPA")||i.includes("COLEXIUAPPI")||i.includes("ORCHESTRAAPPI")||i.includes("ORCHESTRAAPPA"),isTeacher:i.indexOf("ORCHESTRATEACHER")>-1||i.includes("COLEXIUTEACHER"),isStudent:i.indexOf("ORCHESTRASTUDENT")>-1||i.includes("COLEXIUSTUDENT"),isSchool:i.indexOf("ORCHESTRASCHOOL")>-1,iPad:i.indexOf("iPad")>-1,webApp:i.indexOf("Safari")==-1,weixin:i.indexOf("MicroMessenger")>-1,alipay:i.indexOf("AlipayClient")>-1,huawei:!!i.match(/huawei/i)||!!i.match(/honor/i),xiaomi:!!i.match(/mi\s/i)||!!i.match(/redmi/i)||!!i.match(/mix/i)}},getRandomKey=()=>""+Date.now()+Math.floor(Math.random()*1e6),AuthorizationKey="AUTHORIZATION",setToken=i=>{sessionStorage.setItem(AuthorizationKey,i)},getToken=()=>sessionStorage.getItem(AuthorizationKey)||"",setGlobalData=(i,e)=>{if(!i||!e)return;const t=window.GYM||{};t[i]=e,window.GYM=t},BEHAVIORIDKEY="BEHAVIORID",setBehaviorId=i=>{localStorage.setItem(BEHAVIORIDKEY,i)},getBehaviorId=()=>localStorage.getItem(BEHAVIORIDKEY),campIdKey="CAMPID",setCampId=i=>{sessionStorage.setItem(campIdKey,i)},getCampId=()=>sessionStorage.getItem(campIdKey)||"",getSecondRPM=(i,e)=>{if(isNaN(i))return"00:00";let t=Math.floor(i/60/60%24),s=Math.floor(i/60%60),r=Math.floor(i%60);return e==="cn"?`${t>0?t.toString().padStart(2,"0")+"时":""}${s.toString().padStart(2,"0")}分${r.toString().padStart(2,"0")}秒`:`${t>0?t.toString().padStart(2,"0")+":":""}${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`},SPEEDKEY="speeds",setStorageSpeed=(i,e)=>{const t=store_legacy.get(SPEEDKEY)||{};t[i]=e,store_legacy.set(SPEEDKEY,t)},getStorageSpeed=i=>(store_legacy.get(SPEEDKEY)||{})[i]||0,originalPostMessage=window.postMessage;window.postMessage=i=>{originalPostMessage(i,"*")};const loop=()=>{},calls={};var ni,si,ri,oi,ai,li;const instance=window.DAYA||((si=(ni=window.webkit)==null?void 0:ni.messageHandlers)==null?void 0:si.DAYA)||window.COLEXIU||((oi=(ri=window.webkit)==null?void 0:ri.messageHandlers)==null?void 0:oi.COLEXIU)||window.ORCHESTRA||((li=(ai=window.webkit)==null?void 0:ai.messageHandlers)==null?void 0:li.ORCHESTRA);instance&&window.addEventListener("message",i=>{var e,t;try{const s=i.data?typeof i.data=="object"?i.data:JSON.parse(i.data):{},r=((e=s.content)==null?void 0:e.uuid)||s.uuid;try{s.content&&(s.content=JSON.parse(s.content))}catch(l){}if(!r){const l=Object.keys(calls).filter(c=>c.indexOf(s.api)===0);for(const c of l){const d=calls[c]||loop;typeof d=="function"&&d(s),Array.isArray(d)&&d.forEach(m=>{typeof m=="function"&&m(s)})}return}const o=((t=s.content)==null?void 0:t.uuid)||s.uuid||s.api+s.uuid,a=calls[o]||loop;typeof a=="function"&&a(s)}catch(s){console.error("通信消息解析错误",s)}});const postMessage=(i,e)=>{if(instance){const t=getRandomKey();calls[t]=e||loop,i.content=i.content?{...i.content,uuid:t}:{uuid:t},instance.postMessage(JSON.stringify(i)),console.log("h5_请求_api:",i)}},listenerMessage=(i,e)=>{const t=i;calls[t]||(calls[t]=[]),calls[t].push(e||loop)},removeListenerMessage=(i,e)=>{const t=i;if(Array.isArray(calls[t])){const s=calls[t].indexOf(e);calls[t].splice(s,1)}},promisefiyPostMessage=i=>new Promise(e=>{postMessage(i,t=>e(t))}),api_getToken=()=>storeData.isApp?promisefiyPostMessage({api:"getToken"}):Promise.resolve({}),getEarphone=()=>storeData.isApp?promisefiyPostMessage({api:"isWiredHeadsetOn"}):Promise.resolve({}),isSpecialShapedScreen=()=>storeData.isApp?promisefiyPostMessage({api:"isSpecialShapedScreen"}):Promise.resolve({}),sendResult=i=>{listenerMessage("sendResult",i)},removeResult=i=>{removeListenerMessage("sendResult",i)},endSoundCheck=()=>{postMessage({api:"endSoundCheck"})},startEvaluating=i=>storeData.isApp?promisefiyPostMessage({api:"startEvaluating",content:i}):Promise.resolve({}),endEvaluating=i=>storeData.isApp?promisefiyPostMessage({api:"endEvaluating",content:i}):Promise.resolve({}),cancelEvaluating=()=>{postMessage({api:"cancelEvaluating"})},api_startRecording=i=>storeData.isApp?promisefiyPostMessage({api:"startRecording",content:i}):Promise.resolve({}),api_stopRecording=()=>storeData.isApp?promisefiyPostMessage({api:"stopRecording"}):Promise.resolve({}),api_proxyServiceMessage=i=>storeData.isApp?promisefiyPostMessage({api:"proxyServiceMessage",content:i}):Promise.resolve({}),api_recordStartTime=i=>{listenerMessage("recordStartTime",i)},api_remove_recordStartTime=i=>{removeListenerMessage("recordStartTime",i)},api_videoUpdate=i=>{postMessage({api:"videoUpdate"},i)},api_shareAchievements=i=>storeData.isApp?promisefiyPostMessage({api:"shareAchievements",content:i}):Promise.resolve({}),api_openWebView=i=>storeData.isApp?promisefiyPostMessage({api:"openWebView",content:i}):Promise.resolve({}),api_openCamera=()=>storeData.isApp?promisefiyPostMessage({api:"openCamera"}):Promise.resolve({}),api_closeCamera=()=>storeData.isApp?promisefiyPostMessage({api:"closeCamera"}):Promise.resolve({}),api_setStatusBarVisibility=()=>{postMessage({api:"setStatusBarVisibility",content:{isVisibility:0}})},api_cloudToggleFollow=i=>storeData.isApp?promisefiyPostMessage({api:"cloudToggleFollow",content:{state:i}}):Promise.resolve({}),api_cloudFollowTime=(i,e=!0)=>{e?listenerMessage("cloudFollowTime",i):removeListenerMessage("cloudFollowTime",i)},api_goback=()=>{postMessage({api:"goBack"})},api_back=()=>{postMessage({api:"back"})},api_cloudLoading=(i=!1)=>{postMessage({api:"cloudLoading",content:{show:i,type:"fullscreen"}})},api_cloudDestroy=()=>{postMessage({api:"cloudDestroy"})},api_setEventTracking=()=>{postMessage({api:"setEventTracking",content:{type:"klx_xiaokuAI"}})},api_savePicture=i=>storeData.isApp?promisefiyPostMessage({api:"savePicture",content:i}):Promise.resolve({}),api_setCache=i=>{postMessage({api:"setCache",content:i})},api_suspendPlay=i=>{listenerMessage("suspendPlay",i)},api_startCapture=()=>{postMessage({api:"startCapture"})},api_endCapture=()=>{postMessage({api:"endCapture"})},api_getDeviceDelay=()=>storeData.isApp?promisefiyPostMessage({api:"getDeviceDelay"}):Promise.resolve({}),api_toggleTune=(i,e)=>{if(!storeData.isApp)return Promise.resolve({});if(i==="start")return promisefiyPostMessage({api:"startTune",content:{count:e+""}});if(i==="stop")return promisefiyPostMessage({api:"endTune"});if(i==="finishTune")return promisefiyPostMessage({api:"finishTune"})},api_createMusicPlayer=i=>storeData.isApp?promisefiyPostMessage({api:"createMusicPlayer",content:i}):Promise.resolve({}),api_keepScreenLongLight=()=>{postMessage({api:"keepScreenLongLight",content:{isOpenLight:!0}})},api_setRequestedOrientation=i=>{postMessage({api:"setRequestedOrientation",content:{orientation:i}})},api_playProgress=i=>{listenerMessage("playProgress",i)},api_cloudAccompanyMessage=i=>{postMessage({api:"cloudAccompanyMessage",content:{accompanyUrl:i}})},api_openAdjustRecording=i=>{postMessage({api:"openAdjustRecording",content:i})},hideComplexButton=(i,e)=>{e?listenerMessage("hideComplexButton",i):removeListenerMessage("hideComplexButton",i)},TheError=defineComponent({name:"The-error",setup(i,e){return()=>createVNode("div",null,[createVNode(NavBar,{leftArrow:!0,onClickLeft:()=>{api_back()}},null),createVNode(Empty,{image:"error",description:"网络开小差,请稍后重试"},{default:()=>[createVNode(Button,{type:"primary",size:"small",onClick:()=>history.go(0)},{default:()=>[createTextVNode("重新加载")]})]})])}}),token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(i,e){try{return[decodeURIComponent(i.join(""))]}catch(r){}if(i.length===1)return i;e=e||1;const t=i.slice(0,e),s=i.slice(e);return Array.prototype.concat.call([],decodeComponents(t),decodeComponents(s))}function decode$4(i){try{return decodeURIComponent(i)}catch(e){let t=i.match(singleMatcher)||[];for(let s=1;s<t.length;s++)i=decodeComponents(t,s).join(""),t=i.match(singleMatcher)||[];return i}}function customDecodeURIComponent(i){const e={"%FE%FF":"��","%FF%FE":"��"};let t=multiMatcher.exec(i);for(;t;){try{e[t[0]]=decodeURIComponent(t[0])}catch(r){const o=decode$4(t[0]);o!==t[0]&&(e[t[0]]=o)}t=multiMatcher.exec(i)}e["%C2"]="�";const s=Object.keys(e);for(const r of s)i=i.replace(new RegExp(r,"g"),e[r]);return i}function decodeUriComponent(i){if(typeof i!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof i+"`");try{return decodeURIComponent(i)}catch(e){return customDecodeURIComponent(i)}}function splitOnFirst(i,e){if(!(typeof i=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(i===""||e==="")return[];const t=i.indexOf(e);return t===-1?[]:[i.slice(0,t),i.slice(t+e.length)]}function includeKeys(i,e){const t={};if(Array.isArray(e))for(const s of e){const r=Object.getOwnPropertyDescriptor(i,s);r!=null&&r.enumerable&&Object.defineProperty(t,s,r)}else for(const s of Reflect.ownKeys(i)){const r=Object.getOwnPropertyDescriptor(i,s);if(r.enumerable){const o=i[s];e(s,o,i)&&Object.defineProperty(t,s,r)}}return t}const isNullOrUndefined=i=>i==null,strictUriEncode=i=>encodeURIComponent(i).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),encodeFragmentIdentifier=Symbol("encodeFragmentIdentifier");function encoderForArrayFormat(i){switch(i.arrayFormat){case"index":return e=>(t,s)=>{const r=t.length;return s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?t:s===null?[...t,[encode$1(e,i),"[",r,"]"].join("")]:[...t,[encode$1(e,i),"[",encode$1(r,i),"]=",encode$1(s,i)].join("")]};case"bracket":return e=>(t,s)=>s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?t:s===null?[...t,[encode$1(e,i),"[]"].join("")]:[...t,[encode$1(e,i),"[]=",encode$1(s,i)].join("")];case"colon-list-separator":return e=>(t,s)=>s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?t:s===null?[...t,[encode$1(e,i),":list="].join("")]:[...t,[encode$1(e,i),":list=",encode$1(s,i)].join("")];case"comma":case"separator":case"bracket-separator":{const e=i.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(s,r)=>r===void 0||i.skipNull&&r===null||i.skipEmptyString&&r===""?s:(r=r===null?"":r,s.length===0?[[encode$1(t,i),e,encode$1(r,i)].join("")]:[[s,encode$1(r,i)].join(i.arrayFormatSeparator)])}default:return e=>(t,s)=>s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?t:s===null?[...t,encode$1(e,i)]:[...t,[encode$1(e,i),"=",encode$1(s,i)].join("")]}}function parserForArrayFormat(i){let e;switch(i.arrayFormat){case"index":return(t,s,r)=>{if(e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!e){r[t]=s;return}r[t]===void 0&&(r[t]={}),r[t][e[1]]=s};case"bracket":return(t,s,r)=>{if(e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!e){r[t]=s;return}if(r[t]===void 0){r[t]=[s];return}r[t]=[...r[t],s]};case"colon-list-separator":return(t,s,r)=>{if(e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!e){r[t]=s;return}if(r[t]===void 0){r[t]=[s];return}r[t]=[...r[t],s]};case"comma":case"separator":return(t,s,r)=>{const o=typeof s=="string"&&s.includes(i.arrayFormatSeparator),a=typeof s=="string"&&!o&&decode$3(s,i).includes(i.arrayFormatSeparator);s=a?decode$3(s,i):s;const l=o||a?s.split(i.arrayFormatSeparator).map(c=>decode$3(c,i)):s===null?s:decode$3(s,i);r[t]=l};case"bracket-separator":return(t,s,r)=>{const o=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!o){r[t]=s&&decode$3(s,i);return}const a=s===null?[]:s.split(i.arrayFormatSeparator).map(l=>decode$3(l,i));if(r[t]===void 0){r[t]=a;return}r[t]=[...r[t],...a]};default:return(t,s,r)=>{if(r[t]===void 0){r[t]=s;return}r[t]=[...[r[t]].flat(),s]}}}function validateArrayFormatSeparator(i){if(typeof i!="string"||i.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function encode$1(i,e){return e.encode?e.strict?strictUriEncode(i):encodeURIComponent(i):i}function decode$3(i,e){return e.decode?decodeUriComponent(i):i}function keysSorter(i){return Array.isArray(i)?i.sort():typeof i=="object"?keysSorter(Object.keys(i)).sort((e,t)=>Number(e)-Number(t)).map(e=>i[e]):i}function removeHash(i){const e=i.indexOf("#");return e!==-1&&(i=i.slice(0,e)),i}function getHash(i){let e="";const t=i.indexOf("#");return t!==-1&&(e=i.slice(t)),e}function parseValue(i,e){return e.parseNumbers&&!Number.isNaN(Number(i))&&typeof i=="string"&&i.trim()!==""?i=Number(i):e.parseBooleans&&i!==null&&(i.toLowerCase()==="true"||i.toLowerCase()==="false")&&(i=i.toLowerCase()==="true"),i}function extract(i){i=removeHash(i);const e=i.indexOf("?");return e===-1?"":i.slice(e+1)}function parse$5(i,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},validateArrayFormatSeparator(e.arrayFormatSeparator);const t=parserForArrayFormat(e),s=Object.create(null);if(typeof i!="string"||(i=i.trim().replace(/^[?#&]/,""),!i))return s;for(const r of i.split("&")){if(r==="")continue;const o=e.decode?r.replace(/\+/g," "):r;let[a,l]=splitOnFirst(o,"=");a===void 0&&(a=o),l=l===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?l:decode$3(l,e),t(decode$3(a,e),l,s)}for(const[r,o]of Object.entries(s))if(typeof o=="object"&&o!==null)for(const[a,l]of Object.entries(o))o[a]=parseValue(l,e);else s[r]=parseValue(o,e);return e.sort===!1?s:(e.sort===!0?Object.keys(s).sort():Object.keys(s).sort(e.sort)).reduce((r,o)=>{const a=s[o];return a&&typeof a=="object"&&!Array.isArray(a)?r[o]=keysSorter(a):r[o]=a,r},Object.create(null))}function stringify$2(i,e){if(!i)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},validateArrayFormatSeparator(e.arrayFormatSeparator);const t=a=>e.skipNull&&isNullOrUndefined(i[a])||e.skipEmptyString&&i[a]==="",s=encoderForArrayFormat(e),r={};for(const[a,l]of Object.entries(i))t(a)||(r[a]=l);const o=Object.keys(r);return e.sort!==!1&&o.sort(e.sort),o.map(a=>{const l=i[a];return l===void 0?"":l===null?encode$1(a,e):Array.isArray(l)?l.length===0&&e.arrayFormat==="bracket-separator"?encode$1(a,e)+"[]":l.reduce(s(a),[]).join("&"):encode$1(a,e)+"="+encode$1(l,e)}).filter(a=>a.length>0).join("&")}function parseUrl(i,e){var r,o;e={decode:!0,...e};let[t,s]=splitOnFirst(i,"#");return t===void 0&&(t=i),{url:(o=(r=t==null?void 0:t.split("?"))==null?void 0:r[0])!=null?o:"",query:parse$5(extract(i),e),...e&&e.parseFragmentIdentifier&&s?{fragmentIdentifier:decode$3(s,e)}:{}}}function stringifyUrl(i,e){e={encode:!0,strict:!0,[encodeFragmentIdentifier]:!0,...e};const t=removeHash(i.url).split("?")[0]||"",s=extract(i.url),r={...parse$5(s,{sort:!1}),...i.query};let o=stringify$2(r,e);o&&(o=`?${o}`);let a=getHash(i.url);if(i.fragmentIdentifier){const l=new URL(t);l.hash=i.fragmentIdentifier,a=e[encodeFragmentIdentifier]?l.hash:`#${i.fragmentIdentifier}`}return`${t}${o}${a}`}function pick(i,e,t){t={parseFragmentIdentifier:!0,[encodeFragmentIdentifier]:!1,...t};const{url:s,query:r,fragmentIdentifier:o}=parseUrl(i,t);return stringifyUrl({url:s,query:includeKeys(r,e),fragmentIdentifier:o},t)}function exclude(i,e,t){const s=Array.isArray(e)?r=>!e.includes(r):(r,o)=>!e(r,o);return pick(i,s,t)}const queryString=Object.freeze(Object.defineProperty({__proto__:null,exclude,extract,parse:parse$5,parseUrl,pick,stringify:stringify$2,stringifyUrl},Symbol.toStringTag,{value:"Module"})),getQuery=()=>{let i={};try{i={...queryString.parse(location.search),...queryString.parse(location.hash.split("?")[1])}}catch(e){}return{...i}};var shams=function i(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),s=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==r||a.enumerable!==!0)return!1}return!0},origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=shams,hasSymbols$1=function i(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice$1=Array.prototype.slice,toStr$1=Object.prototype.toString,funcType="[object Function]",implementation$1=function i(e){var t=this;if(typeof t!="function"||toStr$1.call(t)!==funcType)throw new TypeError(ERROR_MESSAGE+t);for(var s=slice$1.call(arguments,1),r,o=function(){if(this instanceof r){var m=t.apply(this,s.concat(slice$1.call(arguments)));return Object(m)===m?m:this}else return t.apply(e,s.concat(slice$1.call(arguments)))},a=Math.max(0,t.length-s.length),l=[],c=0;c<a;c++)l.push("$"+c);if(r=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var d=function(){};d.prototype=t.prototype,r.prototype=new d,d.prototype=null}return r},implementation=implementation$1,functionBind=Function.prototype.bind||implementation,bind$1=functionBind,src$1=bind$1.call(Function.call,Object.prototype.hasOwnProperty),undefined$1,$SyntaxError=SyntaxError,$Function=Function,$TypeError$1=TypeError,getEvalledConstructor=function(i){try{return $Function('"use strict"; return ('+i+").constructor;")()}catch(e){}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch(i){$gOPD=null}var throwTypeError=function(){throw new $TypeError$1},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch(i){try{return $gOPD(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,hasSymbols=hasSymbols$1(),getProto=Object.getPrototypeOf||function(i){return i.__proto__},needsEval={},TypedArray=typeof Uint8Array>"u"?undefined$1:getProto(Uint8Array),INTRINSICS={"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols?undefined$1:getProto(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols?undefined$1:getProto(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$1,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet};try{null.error}catch(i){var errorProto=getProto(getProto(i));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function i(e){var t;if(e==="%AsyncFunction%")t=getEvalledConstructor("async function () {}");else if(e==="%GeneratorFunction%")t=getEvalledConstructor("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=getEvalledConstructor("async function* () {}");else if(e==="%AsyncGenerator%"){var s=i("%AsyncGeneratorFunction%");s&&(t=s.prototype)}else if(e==="%AsyncIteratorPrototype%"){var r=i("%AsyncGenerator%");r&&(t=getProto(r.prototype))}return INTRINSICS[e]=t,t},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=functionBind,hasOwn$1=src$1,$concat$1=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace$1=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),$exec=bind.call(Function.call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function i(e){var t=$strSlice(e,0,1),s=$strSlice(e,-1);if(t==="%"&&s!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(s==="%"&&t!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var r=[];return $replace$1(e,rePropName,function(o,a,l,c){r[r.length]=l?$replace$1(c,reEscapeChar,"$1"):a||o}),r},getBaseIntrinsic=function i(e,t){var s=e,r;if(hasOwn$1(LEGACY_ALIASES,s)&&(r=LEGACY_ALIASES[s],s="%"+r[0]+"%"),hasOwn$1(INTRINSICS,s)){var o=INTRINSICS[s];if(o===needsEval&&(o=doEval(s)),typeof o>"u"&&!t)throw new $TypeError$1("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:s,value:o}}throw new $SyntaxError("intrinsic "+e+" does not exist!")},getIntrinsic=function i(e,t){if(typeof e!="string"||e.length===0)throw new $TypeError$1("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new $TypeError$1('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,e)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=stringToPath(e),r=s.length>0?s[0]:"",o=getBaseIntrinsic("%"+r+"%",t),a=o.name,l=o.value,c=!1,d=o.alias;d&&(r=d[0],$spliceApply(s,$concat$1([0,1],d)));for(var m=1,u=!0;m<s.length;m+=1){var g=s[m],b=$strSlice(g,0,1),y=$strSlice(g,-1);if((b==='"'||b==="'"||b==="`"||y==='"'||y==="'"||y==="`")&&b!==y)throw new $SyntaxError("property names with quotes must have matching quotes");if((g==="constructor"||!u)&&(c=!0),r+="."+g,a="%"+r+"%",hasOwn$1(INTRINSICS,a))l=INTRINSICS[a];else if(l!=null){if(!(g in l)){if(!t)throw new $TypeError$1("base intrinsic for "+e+" exists, but the property is not available.");return}if($gOPD&&m+1>=s.length){var S=$gOPD(l,g);u=!!S,u&&"get"in S&&!("originalValue"in S.get)?l=S.get:l=l[g]}else u=hasOwn$1(l,g),l=l[g];u&&!c&&(INTRINSICS[a]=l)}}return l},callBindExports={},callBind$1={get exports(){return callBindExports},set exports(i){callBindExports=i}};(function(i){var e=functionBind,t=getIntrinsic,s=t("%Function.prototype.apply%"),r=t("%Function.prototype.call%"),o=t("%Reflect.apply%",!0)||e.call(r,s),a=t("%Object.getOwnPropertyDescriptor%",!0),l=t("%Object.defineProperty%",!0),c=t("%Math.max%");if(l)try{l({},"a",{value:1})}catch(m){l=null}i.exports=function(u){var g=o(e,r,arguments);if(a&&l){var b=a(g,"length");b.configurable&&l(g,"length",{value:1+c(0,u.length-(arguments.length-1))})}return g};var d=function(){return o(e,s,arguments)};l?l(i.exports,"apply",{value:d}):i.exports.apply=d})(callBind$1);var GetIntrinsic$1=getIntrinsic,callBind=callBindExports,$indexOf=callBind(GetIntrinsic$1("String.prototype.indexOf")),callBound$1=function i(e,t){var s=GetIntrinsic$1(e,!!t);return typeof s=="function"&&$indexOf(e,".prototype.")>-1?callBind(s):s};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(__viteBrowserExternal$1);var hasMap=typeof Map=="function"&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get=="function"?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet=typeof Set=="function"&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get=="function"?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap=typeof WeakMap=="function"&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet=typeof WeakSet=="function"&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef=typeof WeakRef=="function"&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString$1=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hasShammedSymbols=typeof Symbol=="function"&&typeof Symbol.iterator=="object",toStringTag=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function addNumericSeparator(i,e){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||$test.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var s=i<0?-$floor(-i):$floor(i);if(s!==i){var r=String(s),o=$slice.call(e,r.length+1);return $replace.call(r,t,"$&_")+"."+$replace.call($replace.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,t,"$&_")}var utilInspect=require$$0$1,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,objectInspect=function i(e,t,s,r){var o=t||{};if(has$3(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=has$3(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=o.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return inspectString(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return l?addNumericSeparator(e,c):c}if(typeof e=="bigint"){var d=String(e)+"n";return l?addNumericSeparator(e,d):d}var m=typeof o.depth>"u"?5:o.depth;if(typeof s>"u"&&(s=0),s>=m&&m>0&&typeof e=="object")return isArray$6(e)?"[Array]":"[Object]";var u=getIndent(o,s);if(typeof r>"u")r=[];else if(indexOf$2(r,e)>=0)return"[Circular]";function g(k,T,V){if(T&&(r=$arrSlice.call(r),r.push(T)),V){var Z={depth:o.depth};return has$3(o,"quoteStyle")&&(Z.quoteStyle=o.quoteStyle),i(k,Z,s+1,r)}return i(k,o,s+1,r)}if(typeof e=="function"&&!isRegExp$1(e)){var b=nameOf(e),y=arrObjKeys(e,g);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(y.length>0?" { "+$join.call(y,", ")+" }":"")}if(isSymbol(e)){var S=hasShammedSymbols?$replace.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(e);return typeof e=="object"&&!hasShammedSymbols?markBoxed(S):S}if(isElement(e)){for(var v="<"+$toLowerCase.call(String(e.nodeName)),x=e.attributes||[],A=0;A<x.length;A++)v+=" "+x[A].name+"="+wrapQuotes(quote(x[A].value),"double",o);return v+=">",e.childNodes&&e.childNodes.length&&(v+="..."),v+="</"+$toLowerCase.call(String(e.nodeName))+">",v}if(isArray$6(e)){if(e.length===0)return"[]";var E=arrObjKeys(e,g);return u&&!singleLineValues(E)?"["+indentedJoin(E,u)+"]":"[ "+$join.call(E,", ")+" ]"}if(isError(e)){var w=arrObjKeys(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!isEnumerable.call(e,"cause")?"{ ["+String(e)+"] "+$join.call($concat.call("[cause]: "+g(e.cause),w),", ")+" }":w.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+$join.call(w,", ")+" }"}if(typeof e=="object"&&a){if(inspectSymbol&&typeof e[inspectSymbol]=="function"&&utilInspect)return utilInspect(e,{depth:m-s});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(isMap(e)){var _=[];return mapForEach&&mapForEach.call(e,function(k,T){_.push(g(T,e,!0)+" => "+g(k,e))}),collectionOf("Map",mapSize.call(e),_,u)}if(isSet(e)){var C=[];return setForEach&&setForEach.call(e,function(k){C.push(g(k,e))}),collectionOf("Set",setSize.call(e),C,u)}if(isWeakMap(e))return weakCollectionOf("WeakMap");if(isWeakSet(e))return weakCollectionOf("WeakSet");if(isWeakRef(e))return weakCollectionOf("WeakRef");if(isNumber$1(e))return markBoxed(g(Number(e)));if(isBigInt(e))return markBoxed(g(bigIntValueOf.call(e)));if(isBoolean$1(e))return markBoxed(booleanValueOf.call(e));if(isString$1(e))return markBoxed(g(String(e)));if(!isDate$1(e)&&!isRegExp$1(e)){var P=arrObjKeys(e,g),I=gPO?gPO(e)===Object.prototype:e instanceof Object||e.constructor===Object,R=e instanceof Object?"":"null prototype",N=!I&&toStringTag&&Object(e)===e&&toStringTag in e?$slice.call(toStr(e),8,-1):R?"Object":"",G=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",B=G+(N||R?"["+$join.call($concat.call([],N||[],R||[]),": ")+"] ":"");return P.length===0?B+"{}":u?B+"{"+indentedJoin(P,u)+"}":B+"{ "+$join.call(P,", ")+" }"}return String(e)};function wrapQuotes(i,e,t){var s=(t.quoteStyle||e)==="double"?'"':"'";return s+i+s}function quote(i){return $replace.call(String(i),/"/g,""")}function isArray$6(i){return toStr(i)==="[object Array]"&&(!toStringTag||!(typeof i=="object"&&toStringTag in i))}function isDate$1(i){return toStr(i)==="[object Date]"&&(!toStringTag||!(typeof i=="object"&&toStringTag in i))}function isRegExp$1(i){return toStr(i)==="[object RegExp]"&&(!toStringTag||!(typeof i=="object"&&toStringTag in i))}function isError(i){return toStr(i)==="[object Error]"&&(!toStringTag||!(typeof i=="object"&&toStringTag in i))}function isString$1(i){return toStr(i)==="[object String]"&&(!toStringTag||!(typeof i=="object"&&toStringTag in i))}function isNumber$1(i){return toStr(i)==="[object Number]"&&(!toStringTag||!(typeof i=="object"&&toStringTag in i))}function isBoolean$1(i){return toStr(i)==="[object Boolean]"&&(!toStringTag||!(typeof i=="object"&&toStringTag in i))}function isSymbol(i){if(hasShammedSymbols)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return!0;if(!i||typeof i!="object"||!symToString)return!1;try{return symToString.call(i),!0}catch(e){}return!1}function isBigInt(i){if(!i||typeof i!="object"||!bigIntValueOf)return!1;try{return bigIntValueOf.call(i),!0}catch(e){}return!1}var hasOwn=Object.prototype.hasOwnProperty||function(i){return i in this};function has$3(i,e){return hasOwn.call(i,e)}function toStr(i){return objectToString$1.call(i)}function nameOf(i){if(i.name)return i.name;var e=$match.call(functionToString.call(i),/^function\s*([\w$]+)/);return e?e[1]:null}function indexOf$2(i,e){if(i.indexOf)return i.indexOf(e);for(var t=0,s=i.length;t<s;t++)if(i[t]===e)return t;return-1}function isMap(i){if(!mapSize||!i||typeof i!="object")return!1;try{mapSize.call(i);try{setSize.call(i)}catch(e){return!0}return i instanceof Map}catch(e){}return!1}function isWeakMap(i){if(!weakMapHas||!i||typeof i!="object")return!1;try{weakMapHas.call(i,weakMapHas);try{weakSetHas.call(i,weakSetHas)}catch(e){return!0}return i instanceof WeakMap}catch(e){}return!1}function isWeakRef(i){if(!weakRefDeref||!i||typeof i!="object")return!1;try{return weakRefDeref.call(i),!0}catch(e){}return!1}function isSet(i){if(!setSize||!i||typeof i!="object")return!1;try{setSize.call(i);try{mapSize.call(i)}catch(e){return!0}return i instanceof Set}catch(e){}return!1}function isWeakSet(i){if(!weakSetHas||!i||typeof i!="object")return!1;try{weakSetHas.call(i,weakSetHas);try{weakMapHas.call(i,weakMapHas)}catch(e){return!0}return i instanceof WeakSet}catch(e){}return!1}function isElement(i){return!i||typeof i!="object"?!1:typeof HTMLElement<"u"&&i instanceof HTMLElement?!0:typeof i.nodeName=="string"&&typeof i.getAttribute=="function"}function inspectString(i,e){if(i.length>e.maxStringLength){var t=i.length-e.maxStringLength,s="... "+t+" more character"+(t>1?"s":"");return inspectString($slice.call(i,0,e.maxStringLength),e)+s}var r=$replace.call($replace.call(i,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(r,"single",e)}function lowbyte(i){var e=i.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(i){return"Object("+i+")"}function weakCollectionOf(i){return i+" { ? }"}function collectionOf(i,e,t,s){var r=s?indentedJoin(t,s):$join.call(t,", ");return i+" ("+e+") {"+r+"}"}function singleLineValues(i){for(var e=0;e<i.length;e++)if(indexOf$2(i[e],`
- `)>=0)return!1;return!0}function getIndent(i,e){var t;if(i.indent===" ")t=" ";else if(typeof i.indent=="number"&&i.indent>0)t=$join.call(Array(i.indent+1)," ");else return null;return{base:t,prev:$join.call(Array(e+1),t)}}function indentedJoin(i,e){if(i.length===0)return"";var t=`
- `+e.prev+e.base;return t+$join.call(i,","+t)+`
- `+e.prev}function arrObjKeys(i,e){var t=isArray$6(i),s=[];if(t){s.length=i.length;for(var r=0;r<i.length;r++)s[r]=has$3(i,r)?e(i[r],i):""}var o=typeof gOPS=="function"?gOPS(i):[],a;if(hasShammedSymbols){a={};for(var l=0;l<o.length;l++)a["$"+o[l]]=o[l]}for(var c in i)has$3(i,c)&&(t&&String(Number(c))===c&&c<i.length||hasShammedSymbols&&a["$"+c]instanceof Symbol||($test.call(/[^\w$]/,c)?s.push(e(c,i)+": "+e(i[c],i)):s.push(c+": "+e(i[c],i))));if(typeof gOPS=="function")for(var d=0;d<o.length;d++)isEnumerable.call(i,o[d])&&s.push("["+e(o[d])+"]: "+e(i[o[d]],i));return s}var GetIntrinsic=getIntrinsic,callBound=callBound$1,inspect=objectInspect,$TypeError=GetIntrinsic("%TypeError%"),$WeakMap=GetIntrinsic("%WeakMap%",!0),$Map=GetIntrinsic("%Map%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),listGetNode=function(i,e){for(var t=i,s;(s=t.next)!==null;t=s)if(s.key===e)return t.next=s.next,s.next=i.next,i.next=s,s},listGet=function(i,e){var t=listGetNode(i,e);return t&&t.value},listSet=function(i,e,t){var s=listGetNode(i,e);s?s.value=t:i.next={key:e,next:i.next,value:t}},listHas=function(i,e){return!!listGetNode(i,e)},sideChannel=function i(){var e,t,s,r={assert:function(o){if(!r.has(o))throw new $TypeError("Side channel does not contain "+inspect(o))},get:function(o){if($WeakMap&&o&&(typeof o=="object"||typeof o=="function")){if(e)return $weakMapGet(e,o)}else if($Map){if(t)return $mapGet(t,o)}else if(s)return listGet(s,o)},has:function(o){if($WeakMap&&o&&(typeof o=="object"||typeof o=="function")){if(e)return $weakMapHas(e,o)}else if($Map){if(t)return $mapHas(t,o)}else if(s)return listHas(s,o);return!1},set:function(o,a){$WeakMap&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new $WeakMap),$weakMapSet(e,o,a)):$Map?(t||(t=new $Map),$mapSet(t,o,a)):(s||(s={key:{},next:null}),listSet(s,o,a))}};return r},replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"},formats$3={default:Format.RFC3986,formatters:{RFC1738:function(i){return replace.call(i,percentTwenties,"+")},RFC3986:function(i){return String(i)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986},formats$2=formats$3,has$2=Object.prototype.hasOwnProperty,isArray$5=Array.isArray,hexTable=function(){for(var i=[],e=0;e<256;++e)i.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return i}(),compactQueue=function i(e){for(;e.length>1;){var t=e.pop(),s=t.obj[t.prop];if(isArray$5(s)){for(var r=[],o=0;o<s.length;++o)typeof s[o]<"u"&&r.push(s[o]);t.obj[t.prop]=r}}},arrayToObject=function i(e,t){for(var s=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)typeof e[r]<"u"&&(s[r]=e[r]);return s},merge=function i(e,t,s){if(!t)return e;if(typeof t!="object"){if(isArray$5(e))e.push(t);else if(e&&typeof e=="object")(s&&(s.plainObjects||s.allowPrototypes)||!has$2.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var r=e;return isArray$5(e)&&!isArray$5(t)&&(r=arrayToObject(e,s)),isArray$5(e)&&isArray$5(t)?(t.forEach(function(o,a){if(has$2.call(e,a)){var l=e[a];l&&typeof l=="object"&&o&&typeof o=="object"?e[a]=i(l,o,s):e.push(o)}else e[a]=o}),e):Object.keys(t).reduce(function(o,a){var l=t[a];return has$2.call(o,a)?o[a]=i(o[a],l,s):o[a]=l,o},r)},assign=function i(e,t){return Object.keys(t).reduce(function(s,r){return s[r]=t[r],s},e)},decode$2=function(i,e,t){var s=i.replace(/\+/g," ");if(t==="iso-8859-1")return s.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(s)}catch(r){return s}},encode=function i(e,t,s,r,o){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),s==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(m){return"%26%23"+parseInt(m.slice(2),16)+"%3B"});for(var l="",c=0;c<a.length;++c){var d=a.charCodeAt(c);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===formats$2.RFC1738&&(d===40||d===41)){l+=a.charAt(c);continue}if(d<128){l=l+hexTable[d];continue}if(d<2048){l=l+(hexTable[192|d>>6]+hexTable[128|d&63]);continue}if(d<55296||d>=57344){l=l+(hexTable[224|d>>12]+hexTable[128|d>>6&63]+hexTable[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|a.charCodeAt(c)&1023),l+=hexTable[240|d>>18]+hexTable[128|d>>12&63]+hexTable[128|d>>6&63]+hexTable[128|d&63]}return l},compact=function i(e){for(var t=[{obj:{o:e},prop:"o"}],s=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],l=Object.keys(a),c=0;c<l.length;++c){var d=l[c],m=a[d];typeof m=="object"&&m!==null&&s.indexOf(m)===-1&&(t.push({obj:a,prop:d}),s.push(m))}return compactQueue(t),e},isRegExp=function i(e){return Object.prototype.toString.call(e)==="[object RegExp]"},isBuffer=function i(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},combine=function i(e,t){return[].concat(e,t)},maybeMap=function i(e,t){if(isArray$5(e)){for(var s=[],r=0;r<e.length;r+=1)s.push(t(e[r]));return s}return t(e)},utils$3={arrayToObject,assign,combine,compact,decode:decode$2,encode,isBuffer,isRegExp,maybeMap,merge},getSideChannel=sideChannel,utils$2=utils$3,formats$1=formats$3,has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function i(e){return e+"[]"},comma:"comma",indices:function i(e,t){return e+"["+t+"]"},repeat:function i(e){return e}},isArray$4=Array.isArray,push=Array.prototype.push,pushToArray=function(i,e){push.apply(i,isArray$4(e)?e:[e])},toISO=Date.prototype.toISOString,defaultFormat=formats$1.default,defaults$1={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils$2.encode,encodeValuesOnly:!1,format:defaultFormat,formatter:formats$1.formatters[defaultFormat],indices:!1,serializeDate:function i(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function i(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},sentinel={},stringify$1=function i(e,t,s,r,o,a,l,c,d,m,u,g,b,y,S,v){for(var x=e,A=v,E=0,w=!1;(A=A.get(sentinel))!==void 0&&!w;){var _=A.get(e);if(E+=1,typeof _<"u"){if(_===E)throw new RangeError("Cyclic object value");w=!0}typeof A.get(sentinel)>"u"&&(E=0)}if(typeof c=="function"?x=c(t,x):x instanceof Date?x=u(x):s==="comma"&&isArray$4(x)&&(x=utils$2.maybeMap(x,function(Z){return Z instanceof Date?u(Z):Z})),x===null){if(o)return l&&!y?l(t,defaults$1.encoder,S,"key",g):t;x=""}if(isNonNullishPrimitive(x)||utils$2.isBuffer(x)){if(l){var C=y?t:l(t,defaults$1.encoder,S,"key",g);return[b(C)+"="+b(l(x,defaults$1.encoder,S,"value",g))]}return[b(t)+"="+b(String(x))]}var P=[];if(typeof x>"u")return P;var I;if(s==="comma"&&isArray$4(x))y&&l&&(x=utils$2.maybeMap(x,l)),I=[{value:x.length>0?x.join(",")||null:void 0}];else if(isArray$4(c))I=c;else{var R=Object.keys(x);I=d?R.sort(d):R}for(var N=r&&isArray$4(x)&&x.length===1?t+"[]":t,G=0;G<I.length;++G){var B=I[G],k=typeof B=="object"&&typeof B.value<"u"?B.value:x[B];if(!(a&&k===null)){var T=isArray$4(x)?typeof s=="function"?s(N,B):N:N+(m?"."+B:"["+B+"]");v.set(e,E);var V=getSideChannel();V.set(sentinel,v),pushToArray(P,i(k,T,s,r,o,a,s==="comma"&&y&&isArray$4(x)?null:l,c,d,m,u,g,b,y,S,V))}}return P},normalizeStringifyOptions=function i(e){if(!e)return defaults$1;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||defaults$1.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var s=formats$1.default;if(typeof e.format<"u"){if(!has$1.call(formats$1.formatters,e.format))throw new TypeError("Unknown format option provided.");s=e.format}var r=formats$1.formatters[s],o=defaults$1.filter;return(typeof e.filter=="function"||isArray$4(e.filter))&&(o=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:typeof e.allowDots>"u"?defaults$1.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:defaults$1.charsetSentinel,delimiter:typeof e.delimiter>"u"?defaults$1.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:defaults$1.encode,encoder:typeof e.encoder=="function"?e.encoder:defaults$1.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:o,format:s,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:defaults$1.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:defaults$1.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:defaults$1.strictNullHandling}},stringify_1=function(i,e){var t=i,s=normalizeStringifyOptions(e),r,o;typeof s.filter=="function"?(o=s.filter,t=o("",t)):isArray$4(s.filter)&&(o=s.filter,r=o);var a=[];if(typeof t!="object"||t===null)return"";var l;e&&e.arrayFormat in arrayPrefixGenerators?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var c=arrayPrefixGenerators[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=c==="comma"&&e&&e.commaRoundTrip;r||(r=Object.keys(t)),s.sort&&r.sort(s.sort);for(var m=getSideChannel(),u=0;u<r.length;++u){var g=r[u];s.skipNulls&&t[g]===null||pushToArray(a,stringify$1(t[g],g,c,d,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,m))}var b=a.join(s.delimiter),y=s.addQueryPrefix===!0?"?":"";return s.charsetSentinel&&(s.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),b.length>0?y+b:""},utils$1=utils$3,has=Object.prototype.hasOwnProperty,isArray$3=Array.isArray,defaults={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:utils$1.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(i){return i.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(i,e){return i&&typeof i=="string"&&e.comma&&i.indexOf(",")>-1?i.split(","):i},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function i(e,t){var s={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=r.split(t.delimiter,o),l=-1,c,d=t.charset;if(t.charsetSentinel)for(c=0;c<a.length;++c)a[c].indexOf("utf8=")===0&&(a[c]===charsetSentinel?d="utf-8":a[c]===isoSentinel&&(d="iso-8859-1"),l=c,c=a.length);for(c=0;c<a.length;++c)if(c!==l){var m=a[c],u=m.indexOf("]="),g=u===-1?m.indexOf("="):u+1,b,y;g===-1?(b=t.decoder(m,defaults.decoder,d,"key"),y=t.strictNullHandling?null:""):(b=t.decoder(m.slice(0,g),defaults.decoder,d,"key"),y=utils$1.maybeMap(parseArrayValue(m.slice(g+1),t),function(S){return t.decoder(S,defaults.decoder,d,"value")})),y&&t.interpretNumericEntities&&d==="iso-8859-1"&&(y=interpretNumericEntities(y)),m.indexOf("[]=")>-1&&(y=isArray$3(y)?[y]:y),has.call(s,b)?s[b]=utils$1.combine(s[b],y):s[b]=y}return s},parseObject=function(i,e,t,s){for(var r=s?e:parseArrayValue(e,t),o=i.length-1;o>=0;--o){var a,l=i[o];if(l==="[]"&&t.parseArrays)a=[].concat(r);else{a=t.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(c,10);!t.parseArrays&&c===""?a={0:r}:!isNaN(d)&&l!==c&&String(d)===c&&d>=0&&t.parseArrays&&d<=t.arrayLimit?(a=[],a[d]=r):c!=="__proto__"&&(a[c]=r)}r=a}return r},parseKeys=function i(e,t,s,r){if(e){var o=s.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=s.depth>0&&a.exec(o),d=c?o.slice(0,c.index):o,m=[];if(d){if(!s.plainObjects&&has.call(Object.prototype,d)&&!s.allowPrototypes)return;m.push(d)}for(var u=0;s.depth>0&&(c=l.exec(o))!==null&&u<s.depth;){if(u+=1,!s.plainObjects&&has.call(Object.prototype,c[1].slice(1,-1))&&!s.allowPrototypes)return;m.push(c[1])}return c&&m.push("["+o.slice(c.index)+"]"),parseObject(m,t,s,r)}},normalizeParseOptions=function i(e){if(!e)return defaults;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?defaults.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?defaults.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:defaults.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:defaults.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:defaults.comma,decoder:typeof e.decoder=="function"?e.decoder:defaults.decoder,delimiter:typeof e.delimiter=="string"||utils$1.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:defaults.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:defaults.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:defaults.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:defaults.strictNullHandling}},parse$4=function(i,e){var t=normalizeParseOptions(e);if(i===""||i===null||typeof i>"u")return t.plainObjects?Object.create(null):{};for(var s=typeof i=="string"?parseValues(i,t):i,r=t.plainObjects?Object.create(null):{},o=Object.keys(s),a=0;a<o.length;++a){var l=o[a],c=parseKeys(l,s[l],t,typeof i=="string");r=utils$1.merge(r,c,t)}return t.allowSparse===!0?r:utils$1.compact(r)},stringify=stringify_1,parse$3=parse$4,formats=formats$3,lib$4={formats,parse:parse$3,stringify},global$1=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global$1<"u"&&global$1,support={searchParams:"URLSearchParams"in global$1,iterable:"Symbol"in global$1&&"iterator"in Symbol,blob:"FileReader"in global$1&&"Blob"in global$1&&function(){try{return new Blob,!0}catch(i){return!1}}(),formData:"FormData"in global$1,arrayBuffer:"ArrayBuffer"in global$1};function isDataView(i){return i&&DataView.prototype.isPrototypeOf(i)}if(support.arrayBuffer)var viewClasses=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],isArrayBufferView=ArrayBuffer.isView||function(i){return i&&viewClasses.indexOf(Object.prototype.toString.call(i))>-1};function normalizeName(i){if(typeof i!="string"&&(i=String(i)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(i)||i==="")throw new TypeError('Invalid character in header field name: "'+i+'"');return i.toLowerCase()}function normalizeValue(i){return typeof i!="string"&&(i=String(i)),i}function iteratorFor(i){var e={next:function(){var t=i.shift();return{done:t===void 0,value:t}}};return support.iterable&&(e[Symbol.iterator]=function(){return e}),e}function Headers(i){this.map={},i instanceof Headers?i.forEach(function(e,t){this.append(t,e)},this):Array.isArray(i)?i.forEach(function(e){this.append(e[0],e[1])},this):i&&Object.getOwnPropertyNames(i).forEach(function(e){this.append(e,i[e])},this)}Headers.prototype.append=function(i,e){i=normalizeName(i),e=normalizeValue(e);var t=this.map[i];this.map[i]=t?t+", "+e:e};Headers.prototype.delete=function(i){delete this.map[normalizeName(i)]};Headers.prototype.get=function(i){return i=normalizeName(i),this.has(i)?this.map[i]:null};Headers.prototype.has=function(i){return this.map.hasOwnProperty(normalizeName(i))};Headers.prototype.set=function(i,e){this.map[normalizeName(i)]=normalizeValue(e)};Headers.prototype.forEach=function(i,e){for(var t in this.map)this.map.hasOwnProperty(t)&&i.call(e,this.map[t],t,this)};Headers.prototype.keys=function(){var i=[];return this.forEach(function(e,t){i.push(t)}),iteratorFor(i)};Headers.prototype.values=function(){var i=[];return this.forEach(function(e){i.push(e)}),iteratorFor(i)};Headers.prototype.entries=function(){var i=[];return this.forEach(function(e,t){i.push([t,e])}),iteratorFor(i)};support.iterable&&(Headers.prototype[Symbol.iterator]=Headers.prototype.entries);function consumed(i){if(i.bodyUsed)return Promise.reject(new TypeError("Already read"));i.bodyUsed=!0}function fileReaderReady(i){return new Promise(function(e,t){i.onload=function(){e(i.result)},i.onerror=function(){t(i.error)}})}function readBlobAsArrayBuffer(i){var e=new FileReader,t=fileReaderReady(e);return e.readAsArrayBuffer(i),t}function readBlobAsText(i){var e=new FileReader,t=fileReaderReady(e);return e.readAsText(i),t}function readArrayBufferAsText(i){for(var e=new Uint8Array(i),t=new Array(e.length),s=0;s<e.length;s++)t[s]=String.fromCharCode(e[s]);return t.join("")}function bufferClone(i){if(i.slice)return i.slice(0);var e=new Uint8Array(i.byteLength);return e.set(new Uint8Array(i)),e.buffer}function Body(){return this.bodyUsed=!1,this._initBody=function(i){this.bodyUsed=this.bodyUsed,this._bodyInit=i,i?typeof i=="string"?this._bodyText=i:support.blob&&Blob.prototype.isPrototypeOf(i)?this._bodyBlob=i:support.formData&&FormData.prototype.isPrototypeOf(i)?this._bodyFormData=i:support.searchParams&&URLSearchParams.prototype.isPrototypeOf(i)?this._bodyText=i.toString():support.arrayBuffer&&support.blob&&isDataView(i)?(this._bodyArrayBuffer=bufferClone(i.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):support.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(i)||isArrayBufferView(i))?this._bodyArrayBuffer=bufferClone(i):this._bodyText=i=Object.prototype.toString.call(i):this._bodyText="",this.headers.get("content-type")||(typeof i=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):support.searchParams&&URLSearchParams.prototype.isPrototypeOf(i)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},support.blob&&(this.blob=function(){var i=consumed(this);if(i)return i;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var i=consumed(this);return i||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(readBlobAsArrayBuffer)}),this.text=function(){var i=consumed(this);if(i)return i;if(this._bodyBlob)return readBlobAsText(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},support.formData&&(this.formData=function(){return this.text().then(decode$1)}),this.json=function(){return this.text().then(JSON.parse)},this}var methods=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function normalizeMethod(i){var e=i.toUpperCase();return methods.indexOf(e)>-1?e:i}function Request(i,e){if(!(this instanceof Request))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(i instanceof Request){if(i.bodyUsed)throw new TypeError("Already read");this.url=i.url,this.credentials=i.credentials,e.headers||(this.headers=new Headers(i.headers)),this.method=i.method,this.mode=i.mode,this.signal=i.signal,!t&&i._bodyInit!=null&&(t=i._bodyInit,i.bodyUsed=!0)}else this.url=String(i);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new Headers(e.headers)),this.method=normalizeMethod(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var s=/([?&])_=[^&]*/;if(s.test(this.url))this.url=this.url.replace(s,"$1_="+new Date().getTime());else{var r=/\?/;this.url+=(r.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit})};function decode$1(i){var e=new FormData;return i.trim().split("&").forEach(function(t){if(t){var s=t.split("="),r=s.shift().replace(/\+/g," "),o=s.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function parseHeaders(i){var e=new Headers,t=i.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(s){return s.indexOf(`
- `)===0?s.substr(1,s.length):s}).forEach(function(s){var r=s.split(":"),o=r.shift().trim();if(o){var a=r.join(":").trim();e.append(o,a)}}),e}Body.call(Request.prototype);function Response(i,e){if(!(this instanceof Response))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new Headers(e.headers),this.url=e.url||"",this._initBody(i)}Body.call(Response.prototype);Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url})};Response.error=function(){var i=new Response(null,{status:0,statusText:""});return i.type="error",i};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(i,e){if(redirectStatuses.indexOf(e)===-1)throw new RangeError("Invalid status code");return new Response(null,{status:e,headers:{location:i}})};var DOMException=global$1.DOMException;try{new DOMException}catch(i){DOMException=function(e,t){this.message=e,this.name=t;var s=Error(e);this.stack=s.stack},DOMException.prototype=Object.create(Error.prototype),DOMException.prototype.constructor=DOMException}function fetch$2(i,e){return new Promise(function(t,s){var r=new Request(i,e);if(r.signal&&r.signal.aborted)return s(new DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var c={status:o.status,statusText:o.statusText,headers:parseHeaders(o.getAllResponseHeaders()||"")};c.url="responseURL"in o?o.responseURL:c.headers.get("X-Request-URL");var d="response"in o?o.response:o.responseText;setTimeout(function(){t(new Response(d,c))},0)},o.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},o.onabort=function(){setTimeout(function(){s(new DOMException("Aborted","AbortError"))},0)};function l(c){try{return c===""&&global$1.location.href?global$1.location.href:c}catch(d){return c}}o.open(r.method,l(r.url),!0),r.credentials==="include"?o.withCredentials=!0:r.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(support.blob?o.responseType="blob":support.arrayBuffer&&r.headers.get("Content-Type")&&r.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(o.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof Headers)?Object.getOwnPropertyNames(e.headers).forEach(function(c){o.setRequestHeader(c,normalizeValue(e.headers[c]))}):r.headers.forEach(function(c,d){o.setRequestHeader(d,c)}),r.signal&&(r.signal.addEventListener("abort",a),o.onreadystatechange=function(){o.readyState===4&&r.signal.removeEventListener("abort",a)}),o.send(typeof r._bodyInit>"u"?null:r._bodyInit)})}fetch$2.polyfill=!0;global$1.fetch||(global$1.fetch=fetch$2,global$1.Headers=Headers,global$1.Request=Request,global$1.Response=Response);self.fetch.bind(self);function ownKeys(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);e&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,s)}return t}function _objectSpread2(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ownKeys(Object(t),!0).forEach(function(s){_defineProperty(i,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(t,s))})}return i}function _typeof(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(e){return typeof e}:_typeof=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(i)}function _classCallCheck(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(i,e){for(var t=0;t<e.length;t++){var s=e[t];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(i,s.key,s)}}function _createClass(i,e,t){return e&&_defineProperties(i.prototype,e),t&&_defineProperties(i,t),i}function _defineProperty(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function _inherits(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&_setPrototypeOf(i,e)}function _getPrototypeOf(i){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(i)}function _setPrototypeOf(i,e){return _setPrototypeOf=Object.setPrototypeOf||function(s,r){return s.__proto__=r,s},_setPrototypeOf(i,e)}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function _construct(i,e,t){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(r,o,a){var l=[null];l.push.apply(l,o);var c=Function.bind.apply(r,l),d=new c;return a&&_setPrototypeOf(d,a.prototype),d},_construct.apply(null,arguments)}function _isNativeFunction(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function _wrapNativeSuper(i){var e=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(s){if(s===null||!_isNativeFunction(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(s))return e.get(s);e.set(s,r)}function r(){return _construct(s,arguments,_getPrototypeOf(this).constructor)}return r.prototype=Object.create(s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,s)},_wrapNativeSuper(i)}function _assertThisInitialized(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function _possibleConstructorReturn(i,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(i)}function _createSuper(i){var e=_isNativeReflectConstruct();return function(){var s=_getPrototypeOf(i),r;if(e){var o=_getPrototypeOf(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _toConsumableArray(i){return _arrayWithoutHoles(i)||_iterableToArray(i)||_unsupportedIterableToArray(i)||_nonIterableSpread()}function _arrayWithoutHoles(i){if(Array.isArray(i))return _arrayLikeToArray(i)}function _iterableToArray(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function _unsupportedIterableToArray(i,e){if(i){if(typeof i=="string")return _arrayLikeToArray(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _arrayLikeToArray(i,e)}}function _arrayLikeToArray(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=i[t];return s}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function compose(i){if(!Array.isArray(i))throw new TypeError("Middlewares must be an array!");for(var e=i.length,t=0;t<e;t++)if(typeof i[t]!="function")throw new TypeError("Middleware must be componsed of function");return function(r,o){var a=-1;function l(c){if(c<=a)return Promise.reject(new Error("next() should not be called multiple times in one middleware!"));a=c;var d=i[c]||o;if(!d)return Promise.resolve();try{return Promise.resolve(d(r,function(){return l(c+1)}))}catch(m){return Promise.reject(m)}}return l(0)}}var Onion=function(){function i(e){if(_classCallCheck(this,i),!Array.isArray(e))throw new TypeError("Default middlewares must be an array!");this.defaultMiddlewares=_toConsumableArray(e),this.middlewares=[]}return _createClass(i,[{key:"use",value:function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!1,core:!1,defaultInstance:!1},r=!1,o=!1,a=!1;if(typeof s=="number"?(process&&process.env,r=!0,o=!1):_typeof(s)==="object"&&s&&(o=s.global||!1,r=s.core||!1,a=s.defaultInstance||!1),o){i.globalMiddlewares.splice(i.globalMiddlewares.length-i.defaultGlobalMiddlewaresLength,0,t);return}if(r){i.coreMiddlewares.splice(i.coreMiddlewares.length-i.defaultCoreMiddlewaresLength,0,t);return}if(a){this.defaultMiddlewares.push(t);return}this.middlewares.push(t)}},{key:"execute",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=compose([].concat(_toConsumableArray(this.middlewares),_toConsumableArray(this.defaultMiddlewares),_toConsumableArray(i.globalMiddlewares),_toConsumableArray(i.coreMiddlewares)));return s(t)}}]),i}();Onion.globalMiddlewares=[];Onion.defaultGlobalMiddlewaresLength=0;Onion.coreMiddlewares=[];Onion.defaultCoreMiddlewaresLength=0;var MapCache=function(){function i(e){_classCallCheck(this,i),this.cache=new Map,this.timer={},this.extendOptions(e)}return _createClass(i,[{key:"extendOptions",value:function(t){this.maxCache=t.maxCache||0}},{key:"get",value:function(t){return this.cache.get(JSON.stringify(t))}},{key:"set",value:function(t,s){var r=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:6e4;if(this.maxCache>0&&this.cache.size>=this.maxCache){var a=_toConsumableArray(this.cache.keys())[0];this.cache.delete(a),this.timer[a]&&clearTimeout(this.timer[a])}var l=JSON.stringify(t);this.cache.set(l,s),o>0&&(this.timer[l]=setTimeout(function(){r.cache.delete(l),delete r.timer[l]},o))}},{key:"delete",value:function(t){var s=JSON.stringify(t);return delete this.timer[s],this.cache.delete(s)}},{key:"clear",value:function(){return this.timer={},this.cache.clear()}}]),i}(),RequestError=function(i){_inherits(t,i);var e=_createSuper(t);function t(s,r){var o,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"RequestError";return _classCallCheck(this,t),o=e.call(this,s),o.name="RequestError",o.request=r,o.type=a,o}return t}(_wrapNativeSuper(Error)),ResponseError=function(i){_inherits(t,i);var e=_createSuper(t);function t(s,r,o,a){var l,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"ResponseError";return _classCallCheck(this,t),l=e.call(this,r||s.statusText),l.name="ResponseError",l.data=o,l.response=s,l.request=a,l.type=c,l}return t}(_wrapNativeSuper(Error));function readerGBK(i){return new Promise(function(e,t){var s=new FileReader;s.onload=function(){e(s.result)},s.onerror=t,s.readAsText(i,"GBK")})}function safeJsonParse(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;try{return JSON.parse(i)}catch(r){if(e)throw new ResponseError(t,"JSON.parse fail",i,s,"ParseError")}return i}function timeout2Throw(i,e,t){return new Promise(function(s,r){setTimeout(function(){r(new RequestError(e||"timeout of ".concat(i,"ms exceeded"),t,"Timeout"))},i)})}function cancel2Throw(i){return new Promise(function(e,t){i.cancelToken&&i.cancelToken.promise.then(function(s){t(s)})})}var toString$2=Object.prototype.toString;function getEnv(){var i;return typeof process<"u"&&toString$2.call(process)==="[object process]"&&(i="NODE"),typeof XMLHttpRequest<"u"&&(i="BROWSER"),i}function isArray$2(i){return _typeof(i)==="object"&&Object.prototype.toString.call(i)==="[object Array]"}function isURLSearchParams(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}function isDate(i){return _typeof(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function isObject(i){return i!==null&&_typeof(i)==="object"}function forEach2ObjArr(i,e){if(i)if(_typeof(i)!=="object"&&(i=[i]),isArray$2(i))for(var t=0;t<i.length;t++)e.call(null,i[t],t,i);else for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&e.call(null,i[s],s,i)}function getParamObject(i){return isURLSearchParams(i)?lib$4.parse(i.toString(),{strictNullHandling:!0}):typeof i=="string"?[i]:i}function reqStringify(i){return lib$4.stringify(i,{arrayFormat:"repeat",strictNullHandling:!0})}function mergeRequestOptions(i,e){return _objectSpread2(_objectSpread2(_objectSpread2({},i),e),{},{headers:_objectSpread2(_objectSpread2({},i.headers),e.headers),params:_objectSpread2(_objectSpread2({},getParamObject(i.params)),getParamObject(e.params)),method:(e.method||i.method||"get").toLowerCase()})}var addfix=function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=t.prefix,r=t.suffix;return s&&(e="".concat(s).concat(e)),r&&(e="".concat(e).concat(r)),{url:e,options:t}},warnedCoreType=!1;function __defaultValidateCache(i,e){var t=e.method,s=t===void 0?"get":t;return s.toLowerCase()==="get"}function fetchMiddleware(i,e){if(!i)return e();var t=i.req;t=t===void 0?{}:t;var s=t.options,r=s===void 0?{}:s,o=t.url,a=o===void 0?"":o,l=i.cache,c=i.responseInterceptors,d=r.timeout,m=d===void 0?0:d,u=r.timeoutMessage,g=r.__umiRequestCoreType__,b=g===void 0?"normal":g,y=r.useCache,S=y===void 0?!1:y,v=r.method,x=v===void 0?"get":v,A=r.params,E=r.ttl,w=r.validateCache,_=w===void 0?__defaultValidateCache:w;if(b!=="normal")return process&&process.env,e();var C=fetch;if(!C)throw new Error("Global fetch not exist!");var P=getEnv()==="BROWSER",I=_(a,r)&&S&&P;if(I){var R=l.get({url:a,params:A,method:x});if(R)return R=R.clone(),R.useCache=!0,i.res=R,e()}var N;return m>0?N=Promise.race([cancel2Throw(r),C(a,r),timeout2Throw(m,u,i.req)]):N=Promise.race([cancel2Throw(r),C(a,r)]),c.forEach(function(G){N=N.then(function(B){var k=typeof B.clone=="function"?B.clone():B;return G(k,r)})}),N.then(function(G){if(I&&G.status===200){var B=G.clone();B.useCache=!0,l.set({url:a,params:A,method:x},B,E)}return i.res=G,e()})}function parseResponseMiddleware(i,e){var t;return e().then(function(){if(i){var s=i.res,r=s===void 0?{}:s,o=i.req,a=o===void 0?{}:o,l=a||{},c=l.options;c=c===void 0?{}:c;var d=c.responseType,m=d===void 0?"json":d,u=c.charset,g=u===void 0?"utf8":u;c.getResponse;var b=c.throwErrIfParseFail,y=b===void 0?!1:b,S=c.parseResponse,v=S===void 0?!0:S;if(v&&!(!r||!r.clone)){if(t=getEnv()==="BROWSER"?r.clone():r,t.useCache=r.useCache||!1,g==="gbk")try{return r.blob().then(readerGBK).then(function(x){return safeJsonParse(x,!1,t,a)})}catch(x){throw new ResponseError(t,x.message,null,a,"ParseError")}else if(m==="json")return r.text().then(function(x){return safeJsonParse(x,y,t,a)});try{return r[m]()}catch(x){throw new ResponseError(t,"responseType not support",null,a,"ParseError")}}}}).then(function(s){if(i){i.res;var r=i.req,o=r===void 0?{}:r,a=o||{},l=a.options;l=l===void 0?{}:l;var c=l.getResponse,d=c===void 0?!1:c;if(t){if(t.status>=200&&t.status<300){if(d){i.res={data:s,response:t};return}i.res=s;return}throw new ResponseError(t,"http error",s,o,"HttpError")}}}).catch(function(s){if(s instanceof RequestError||s instanceof ResponseError)throw s;var r=i.req,o=i.res;throw s.request=s.request||r,s.response=s.response||o,s.type=s.type||s.name,s.data=s.data||void 0,s})}function simplePostMiddleware(i,e){if(!i)return e();var t=i.req;t=t===void 0?{}:t;var s=t.options,r=s===void 0?{}:s,o=r.method,a=o===void 0?"get":o;if(["post","put","patch","delete"].indexOf(a.toLowerCase())===-1)return e();var l=r.requestType,c=l===void 0?"json":l,d=r.data;if(d){var m=Object.prototype.toString.call(d);m==="[object Object]"||m==="[object Array]"?c==="json"?(r.headers=_objectSpread2({Accept:"application/json","Content-Type":"application/json;charset=UTF-8"},r.headers),r.body=JSON.stringify(d)):c==="form"&&(r.headers=_objectSpread2({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},r.headers),r.body=reqStringify(d)):(r.headers=_objectSpread2({Accept:"application/json"},r.headers),r.body=d)}return i.req.options=r,e()}function paramsSerialize(i,e){var t,s;if(i)if(e)t=e(i);else if(isURLSearchParams(i))t=i.toString();else if(isArray$2(i))s=[],forEach2ObjArr(i,function(o){o===null||typeof o>"u"?s.push(o):s.push(isObject(o)?JSON.stringify(o):o)}),t=reqStringify(s);else{s={},forEach2ObjArr(i,function(o,a){var l=o;o===null||typeof o>"u"?s[a]=o:isDate(o)?l=o.toISOString():isArray$2(o)?l=o:isObject(o)&&(l=JSON.stringify(o)),s[a]=l});var r=reqStringify(s);t=r}return t}function simpleGetMiddleware(i,e){if(!i)return e();var t=i.req;t=t===void 0?{}:t;var s=t.options,r=s===void 0?{}:s,o=r.paramsSerializer,a=r.params,l=i.req;l=l===void 0?{}:l;var c=l.url,d=c===void 0?"":c;r.method=r.method?r.method.toUpperCase():"GET",r.credentials=r.credentials||"same-origin";var m=paramsSerialize(a,o);if(i.req.originUrl=d,m){var u=d.indexOf("?")!==-1?"&":"?";i.req.url="".concat(d).concat(u).concat(m)}return i.req.options=r,e()}var globalMiddlewares=[simplePostMiddleware,simpleGetMiddleware,parseResponseMiddleware],coreMiddlewares=[fetchMiddleware];Onion.globalMiddlewares=globalMiddlewares;Onion.defaultGlobalMiddlewaresLength=globalMiddlewares.length;Onion.coreMiddlewares=coreMiddlewares;Onion.defaultCoreMiddlewaresLength=coreMiddlewares.length;var Core=function(){function i(e){_classCallCheck(this,i),this.onion=new Onion([]),this.fetchIndex=0,this.mapCache=new MapCache(e),this.initOptions=e,this.instanceRequestInterceptors=[],this.instanceResponseInterceptors=[]}return _createClass(i,[{key:"use",value:function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!1,core:!1};return this.onion.use(t,s),this}},{key:"extendOptions",value:function(t){this.initOptions=mergeRequestOptions(this.initOptions,t),this.mapCache.extendOptions(t)}},{key:"dealRequestInterceptors",value:function(t){var s=function(a,l){return a.then(function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.req.url=c.url||t.req.url,t.req.options=c.options||t.req.options,l(t.req.url,t.req.options)})},r=[].concat(_toConsumableArray(i.requestInterceptors),_toConsumableArray(this.instanceRequestInterceptors));return r.reduce(s,Promise.resolve()).then(function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.req.url=o.url||t.req.url,t.req.options=o.options||t.req.options,Promise.resolve()})}},{key:"request",value:function(t,s){var r=this,o=this.onion,a={req:{url:t,options:_objectSpread2(_objectSpread2({},s),{},{url:t})},res:null,cache:this.mapCache,responseInterceptors:[].concat(_toConsumableArray(i.responseInterceptors),_toConsumableArray(this.instanceResponseInterceptors))};if(typeof t!="string")throw new Error("url MUST be a string");return new Promise(function(l,c){r.dealRequestInterceptors(a).then(function(){return o.execute(a)}).then(function(){l(a.res)}).catch(function(d){var m=a.req.options.errorHandler;if(m)try{var u=m(d);l(u)}catch(g){c(g)}else c(d)})})}}],[{key:"requestUse",value:function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!0};if(typeof t!="function")throw new TypeError("Interceptor must be function!");s.global?i.requestInterceptors.push(t):this.instanceRequestInterceptors.push(t)}},{key:"responseUse",value:function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!0};if(typeof t!="function")throw new TypeError("Interceptor must be function!");s.global?i.responseInterceptors.push(t):this.instanceResponseInterceptors.push(t)}}]),i}();Core.requestInterceptors=[addfix];Core.responseInterceptors=[];function Cancel(i){this.message=i}Cancel.prototype.toString=function i(){return this.message?"Cancel: ".concat(this.message):"Cancel"};Cancel.prototype.__CANCEL__=!0;function CancelToken(i){if(typeof i!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(r){e=r});var t=this;i(function(r){t.reason||(t.reason=new Cancel(r),e(t.reason))})}CancelToken.prototype.throwIfRequested=function i(){if(this.reason)throw this.reason};CancelToken.source=function i(){var e,t=new CancelToken(function(r){e=r});return{token:t,cancel:e}};function isCancel(i){return!!(i&&i.__CANCEL__)}var request$1=function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=new Core(e),s=function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=mergeRequestOptions(t.initOptions,l);return t.request(a,c)};s.use=t.use.bind(t),s.fetchIndex=t.fetchIndex,s.interceptors={request:{use:Core.requestUse.bind(t)},response:{use:Core.responseUse.bind(t)}};var r=["get","post","delete","put","patch","head","options","rpc"];return r.forEach(function(o){s[o]=function(a,l){return s(a,_objectSpread2(_objectSpread2({},l),{},{method:o}))}}),s.Cancel=Cancel,s.CancelToken=CancelToken,s.isCancel=isCancel,s.extendOptions=t.extendOptions.bind(t),s.middlewares={instance:t.onion.middlewares,defaultInstance:t.onion.defaultMiddlewares,global:Onion.globalMiddlewares,core:Onion.coreMiddlewares},s},extend$1=function i(e){return request$1(e)};request$1({parseResponse:!1});var request$1$1=request$1({}),lodash_isemptyExports={},lodash_isempty={get exports(){return lodash_isemptyExports},set exports(i){lodash_isemptyExports=i}};(function(i,e){var t=9007199254740991,s="[object Arguments]",r="[object Function]",o="[object GeneratorFunction]",a="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",m="[object WeakMap]",u="[object DataView]",g=/[\\^$.*+?()[\]{}|]/g,b=/^\[object .+?Constructor\]$/,y=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,S=typeof self=="object"&&self&&self.Object===Object&&self,v=y||S||Function("return this")(),x=e&&!e.nodeType&&e,A=x&&!0&&i&&!i.nodeType&&i,E=A&&A.exports===x;function w(ue,Ae){return ue==null?void 0:ue[Ae]}function _(ue){var Ae=!1;if(ue!=null&&typeof ue.toString!="function")try{Ae=!!(ue+"")}catch(Ee){}return Ae}function C(ue,Ae){return function(Ee){return ue(Ae(Ee))}}var P=Function.prototype,I=Object.prototype,R=v["__core-js_shared__"],N=function(){var ue=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return ue?"Symbol(src)_1."+ue:""}(),G=P.toString,B=I.hasOwnProperty,k=I.toString,T=RegExp("^"+G.call(B).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=E?v.Buffer:void 0,Z=I.propertyIsEnumerable,W=V?V.isBuffer:void 0,se=C(Object.keys,Object),ie=U(v,"DataView"),fe=U(v,"Map"),J=U(v,"Promise"),K=U(v,"Set"),be=U(v,"WeakMap"),oe=!Z.call({valueOf:1},"valueOf"),Y=z(ie),ae=z(fe),de=z(J),le=z(K),me=z(be);function ve(ue){return k.call(ue)}function ye(ue){if(!re(ue)||M(ue))return!1;var Ae=ce(ue)||_(ue)?T:b;return Ae.test(z(ue))}function U(ue,Ae){var Ee=w(ue,Ae);return ye(Ee)?Ee:void 0}var $=ve;(ie&&$(new ie(new ArrayBuffer(1)))!=u||fe&&$(new fe)!=a||J&&$(J.resolve())!=c||K&&$(new K)!=d||be&&$(new be)!=m)&&($=function(ue){var Ae=k.call(ue),Ee=Ae==l?ue.constructor:void 0,_e=Ee?z(Ee):void 0;if(_e)switch(_e){case Y:return u;case ae:return a;case de:return c;case le:return d;case me:return m}return Ae});function M(ue){return!!N&&N in ue}function Q(ue){var Ae=ue&&ue.constructor,Ee=typeof Ae=="function"&&Ae.prototype||I;return ue===Ee}function z(ue){if(ue!=null){try{return G.call(ue)}catch(Ae){}try{return ue+""}catch(Ae){}}return""}function F(ue){return ne(ue)&&B.call(ue,"callee")&&(!Z.call(ue,"callee")||k.call(ue)==s)}var O=Array.isArray;function H(ue){return ue!=null&&he(ue.length)&&!ce(ue)}function ne(ue){return ge(ue)&&H(ue)}var ee=W||xe;function te(ue){if(H(ue)&&(O(ue)||typeof ue=="string"||typeof ue.splice=="function"||ee(ue)||F(ue)))return!ue.length;var Ae=$(ue);if(Ae==a||Ae==d)return!ue.size;if(oe||Q(ue))return!se(ue).length;for(var Ee in ue)if(B.call(ue,Ee))return!1;return!0}function ce(ue){var Ae=re(ue)?k.call(ue):"";return Ae==r||Ae==o}function he(ue){return typeof ue=="number"&&ue>-1&&ue%1==0&&ue<=t}function re(ue){var Ae=typeof ue;return!!ue&&(Ae=="object"||Ae=="function")}function ge(ue){return!!ue&&typeof ue=="object"}function xe(){return!1}i.exports=te})(lodash_isempty,lodash_isemptyExports);var objectTag="[object Object]";function isHostObject(i){var e=!1;if(i!=null&&typeof i.toString!="function")try{e=!!(i+"")}catch(t){}return e}function overArg(i,e){return function(t){return i(e(t))}}var funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object),objectToString=objectProto.toString,getPrototype=overArg(Object.getPrototypeOf,Object);function isObjectLike(i){return!!i&&typeof i=="object"}function isPlainObject$2(i){if(!isObjectLike(i)||objectToString.call(i)!=objectTag||isHostObject(i))return!1;var e=getPrototype(i);if(e===null)return!0;var t=hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&funcToString.call(t)==objectCtorString}var lodash_isplainobject=isPlainObject$2,lodash_transformExports={},lodash_transform={get exports(){return lodash_transformExports},set exports(i){lodash_transformExports=i}};(function(i,e){var t=200,s="Expected a function",r="__lodash_hash_undefined__",o=1,a=2,l=1/0,c=9007199254740991,d="[object Arguments]",m="[object Array]",u="[object Boolean]",g="[object Date]",b="[object Error]",y="[object Function]",S="[object GeneratorFunction]",v="[object Map]",x="[object Number]",A="[object Object]",E="[object Promise]",w="[object RegExp]",_="[object Set]",C="[object String]",P="[object Symbol]",I="[object WeakMap]",R="[object ArrayBuffer]",N="[object DataView]",G="[object Float32Array]",B="[object Float64Array]",k="[object Int8Array]",T="[object Int16Array]",V="[object Int32Array]",Z="[object Uint8Array]",W="[object Uint8ClampedArray]",se="[object Uint16Array]",ie="[object Uint32Array]",fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,K=/^\./,be=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,Y=/\\(\\)?/g,ae=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,le={};le[G]=le[B]=le[k]=le[T]=le[V]=le[Z]=le[W]=le[se]=le[ie]=!0,le[d]=le[m]=le[R]=le[u]=le[N]=le[g]=le[b]=le[y]=le[v]=le[x]=le[A]=le[w]=le[_]=le[C]=le[I]=!1;var me=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,ve=typeof self=="object"&&self&&self.Object===Object&&self,ye=me||ve||Function("return this")(),U=e&&!e.nodeType&&e,$=U&&!0&&i&&!i.nodeType&&i,M=$&&$.exports===U,Q=M&&me.process,z=function(){try{return Q&&Q.binding("util")}catch(D){}}(),F=z&&z.isTypedArray;function O(D,q){for(var pe=-1,Se=D?D.length:0;++pe<Se&&q(D[pe],pe,D)!==!1;);return D}function H(D,q){for(var pe=-1,Se=D?D.length:0;++pe<Se;)if(q(D[pe],pe,D))return!0;return!1}function ne(D){return function(q){return q==null?void 0:q[D]}}function ee(D,q){for(var pe=-1,Se=Array(D);++pe<D;)Se[pe]=q(pe);return Se}function te(D){return function(q){return D(q)}}function ce(D,q){return D==null?void 0:D[q]}function he(D){var q=!1;if(D!=null&&typeof D.toString!="function")try{q=!!(D+"")}catch(pe){}return q}function re(D){var q=-1,pe=Array(D.size);return D.forEach(function(Se,Me){pe[++q]=[Me,Se]}),pe}function ge(D,q){return function(pe){return D(q(pe))}}function xe(D){var q=-1,pe=Array(D.size);return D.forEach(function(Se){pe[++q]=Se}),pe}var ue=Array.prototype,Ae=Function.prototype,Ee=Object.prototype,_e=ye["__core-js_shared__"],Te=function(){var D=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return D?"Symbol(src)_1."+D:""}(),Pe=Ae.toString,Ce=Ee.hasOwnProperty,Ie=Ee.toString,Re=RegExp("^"+Pe.call(Ce).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=ye.Symbol,bt=ye.Uint8Array,Ue=ge(Object.getPrototypeOf,Object),ht=Object.create,nt=Ee.propertyIsEnumerable,Qe=ue.splice,ze=ge(Object.keys,Object),Je=wt(ye,"DataView"),yt=wt(ye,"Map"),ft=wt(ye,"Promise"),xt=wt(ye,"Set"),At=wt(ye,"WeakMap"),dt=wt(Object,"create"),Et=St(Je),Ot=St(yt),Ze=St(ft),Pt=St(xt),je=St(At),Ve=qe?qe.prototype:void 0,De=Ve?Ve.valueOf:void 0,We=Ve?Ve.toString:void 0;function ke(D){var q=-1,pe=D?D.length:0;for(this.clear();++q<pe;){var Se=D[q];this.set(Se[0],Se[1])}}function $e(){this.__data__=dt?dt(null):{}}function et(D){return this.has(D)&&delete this.__data__[D]}function tt(D){var q=this.__data__;if(dt){var pe=q[D];return pe===r?void 0:pe}return Ce.call(q,D)?q[D]:void 0}function st(D){var q=this.__data__;return dt?q[D]!==void 0:Ce.call(q,D)}function Mt(D,q){var pe=this.__data__;return pe[D]=dt&&q===void 0?r:q,this}ke.prototype.clear=$e,ke.prototype.delete=et,ke.prototype.get=tt,ke.prototype.has=st,ke.prototype.set=Mt;function it(D){var q=-1,pe=D?D.length:0;for(this.clear();++q<pe;){var Se=D[q];this.set(Se[0],Se[1])}}function hi(){this.__data__=[]}function fi(D){var q=this.__data__,pe=Ct(q,D);if(pe<0)return!1;var Se=q.length-1;return pe==Se?q.pop():Qe.call(q,pe,1),!0}function di(D){var q=this.__data__,pe=Ct(q,D);return pe<0?void 0:q[pe][1]}function pi(D){return Ct(this.__data__,D)>-1}function mi(D,q){var pe=this.__data__,Se=Ct(pe,D);return Se<0?pe.push([D,q]):pe[Se][1]=q,this}it.prototype.clear=hi,it.prototype.delete=fi,it.prototype.get=di,it.prototype.has=pi,it.prototype.set=mi;function rt(D){var q=-1,pe=D?D.length:0;for(this.clear();++q<pe;){var Se=D[q];this.set(Se[0],Se[1])}}function gi(){this.__data__={hash:new ke,map:new(yt||it),string:new ke}}function bi(D){return It(this,D).delete(D)}function yi(D){return It(this,D).get(D)}function Si(D){return It(this,D).has(D)}function vi(D,q){return It(this,D).set(D,q),this}rt.prototype.clear=gi,rt.prototype.delete=bi,rt.prototype.get=yi,rt.prototype.has=Si,rt.prototype.set=vi;function Tt(D){var q=-1,pe=D?D.length:0;for(this.__data__=new rt;++q<pe;)this.add(D[q])}function xi(D){return this.__data__.set(D,r),this}function Ai(D){return this.__data__.has(D)}Tt.prototype.add=Tt.prototype.push=xi,Tt.prototype.has=Ai;function ot(D){this.__data__=new it(D)}function Ei(){this.__data__=new it}function wi(D){return this.__data__.delete(D)}function _i(D){return this.__data__.get(D)}function Pi(D){return this.__data__.has(D)}function Mi(D,q){var pe=this.__data__;if(pe instanceof it){var Se=pe.__data__;if(!yt||Se.length<t-1)return Se.push([D,q]),this;pe=this.__data__=new rt(Se)}return pe.set(D,q),this}ot.prototype.clear=Ei,ot.prototype.delete=wi,ot.prototype.get=_i,ot.prototype.has=Pi,ot.prototype.set=Mi;function Ti(D,q){var pe=at(D)||Zt(D)?ee(D.length,String):[],Se=pe.length,Me=!!Se;for(var we in D)(q||Ce.call(D,we))&&!(Me&&(we=="length"||Xt(we,Se)))&&pe.push(we);return pe}function Ct(D,q){for(var pe=D.length;pe--;)if(Jt(D[pe][0],q))return pe;return-1}function Ci(D){return _t(D)?ht(D):{}}var Ii=Wi();function Li(D,q){return D&&Ii(D,q,Nt)}function jt(D,q){q=Lt(q,D)?[q]:$t(q);for(var pe=0,Se=q.length;D!=null&&pe<Se;)D=D[Rt(q[pe++])];return pe&&pe==Se?D:void 0}function Ri(D){return Ie.call(D)}function Bi(D,q){return D!=null&&q in Object(D)}function Vt(D,q,pe,Se,Me){return D===q?!0:D==null||q==null||!_t(D)&&!Bt(q)?D!==D&&q!==q:Ni(D,q,Vt,pe,Se,Me)}function Ni(D,q,pe,Se,Me,we){var Le=at(D),Be=at(q),Ne=m,Fe=m;Le||(Ne=pt(D),Ne=Ne==d?A:Ne),Be||(Fe=pt(q),Fe=Fe==d?A:Fe);var Ge=Ne==A&&!he(D),Ye=Fe==A&&!he(q),Oe=Ne==Fe;if(Oe&&!Ge)return we||(we=new ot),Le||ti(D)?Qt(D,q,pe,Se,Me,we):Yi(D,q,Ne,pe,Se,Me,we);if(!(Me&a)){var Xe=Ge&&Ce.call(D,"__wrapped__"),Ke=Ye&&Ce.call(q,"__wrapped__");if(Xe||Ke){var mt=Xe?D.value():D,lt=Ke?q.value():q;return we||(we=new ot),pe(mt,lt,Se,Me,we)}}return Oe?(we||(we=new ot),ji(D,q,pe,Se,Me,we)):!1}function ki(D,q,pe,Se){var Me=pe.length,we=Me,Le=!Se;if(D==null)return!we;for(D=Object(D);Me--;){var Be=pe[Me];if(Le&&Be[2]?Be[1]!==D[Be[0]]:!(Be[0]in D))return!1}for(;++Me<we;){Be=pe[Me];var Ne=Be[0],Fe=D[Ne],Ge=Be[1];if(Le&&Be[2]){if(Fe===void 0&&!(Ne in D))return!1}else{var Ye=new ot;if(Se)var Oe=Se(Fe,Ge,Ne,D,q,Ye);if(!(Oe===void 0?Vt(Ge,Fe,Se,o|a,Ye):Oe))return!1}}return!0}function Di(D){if(!_t(D)||Ki(D))return!1;var q=Ht(D)||he(D)?Re:ae;return q.test(St(D))}function Fi(D){return Bt(D)&&Ut(D.length)&&!!le[Ie.call(D)]}function Oi(D){return typeof D=="function"?D:D==null?rn:typeof D=="object"?at(D)?Hi(D[0],D[1]):Gi(D):on(D)}function Vi(D){if(!qi(D))return ze(D);var q=[];for(var pe in Object(D))Ce.call(D,pe)&&pe!="constructor"&&q.push(pe);return q}function Gi(D){var q=$i(D);return q.length==1&&q[0][2]?qt(q[0][0],q[0][1]):function(pe){return pe===D||ki(pe,D,q)}}function Hi(D,q){return Lt(D)&&Kt(q)?qt(Rt(D),q):function(pe){var Se=tn(pe,D);return Se===void 0&&Se===q?nn(pe,D):Vt(q,Se,void 0,o|a)}}function Ui(D){return function(q){return jt(q,D)}}function zi(D){if(typeof D=="string")return D;if(zt(D))return We?We.call(D):"";var q=D+"";return q=="0"&&1/D==-l?"-0":q}function $t(D){return at(D)?D:Ji(D)}function Wi(D){return function(q,pe,Se){for(var Me=-1,we=Object(q),Le=Se(q),Be=Le.length;Be--;){var Ne=Le[D?Be:++Me];if(pe(we[Ne],Ne,we)===!1)break}return q}}function Qt(D,q,pe,Se,Me,we){var Le=Me&a,Be=D.length,Ne=q.length;if(Be!=Ne&&!(Le&&Ne>Be))return!1;var Fe=we.get(D);if(Fe&&we.get(q))return Fe==q;var Ge=-1,Ye=!0,Oe=Me&o?new Tt:void 0;for(we.set(D,q),we.set(q,D);++Ge<Be;){var Xe=D[Ge],Ke=q[Ge];if(Se)var mt=Le?Se(Ke,Xe,Ge,q,D,we):Se(Xe,Ke,Ge,D,q,we);if(mt!==void 0){if(mt)continue;Ye=!1;break}if(Oe){if(!H(q,function(lt,vt){if(!Oe.has(vt)&&(Xe===lt||pe(Xe,lt,Se,Me,we)))return Oe.add(vt)})){Ye=!1;break}}else if(!(Xe===Ke||pe(Xe,Ke,Se,Me,we))){Ye=!1;break}}return we.delete(D),we.delete(q),Ye}function Yi(D,q,pe,Se,Me,we,Le){switch(pe){case N:if(D.byteLength!=q.byteLength||D.byteOffset!=q.byteOffset)return!1;D=D.buffer,q=q.buffer;case R:return!(D.byteLength!=q.byteLength||!Se(new bt(D),new bt(q)));case u:case g:case x:return Jt(+D,+q);case b:return D.name==q.name&&D.message==q.message;case w:case C:return D==q+"";case v:var Be=re;case _:var Ne=we&a;if(Be||(Be=xe),D.size!=q.size&&!Ne)return!1;var Fe=Le.get(D);if(Fe)return Fe==q;we|=o,Le.set(D,q);var Ge=Qt(Be(D),Be(q),Se,Me,we,Le);return Le.delete(D),Ge;case P:if(De)return De.call(D)==De.call(q)}return!1}function ji(D,q,pe,Se,Me,we){var Le=Me&a,Be=Nt(D),Ne=Be.length,Fe=Nt(q),Ge=Fe.length;if(Ne!=Ge&&!Le)return!1;for(var Ye=Ne;Ye--;){var Oe=Be[Ye];if(!(Le?Oe in q:Ce.call(q,Oe)))return!1}var Xe=we.get(D);if(Xe&&we.get(q))return Xe==q;var Ke=!0;we.set(D,q),we.set(q,D);for(var mt=Le;++Ye<Ne;){Oe=Be[Ye];var lt=D[Oe],vt=q[Oe];if(Se)var ii=Le?Se(vt,lt,Oe,q,D,we):Se(lt,vt,Oe,D,q,we);if(!(ii===void 0?lt===vt||pe(lt,vt,Se,Me,we):ii)){Ke=!1;break}mt||(mt=Oe=="constructor")}if(Ke&&!mt){var kt=D.constructor,Dt=q.constructor;kt!=Dt&&"constructor"in D&&"constructor"in q&&!(typeof kt=="function"&&kt instanceof kt&&typeof Dt=="function"&&Dt instanceof Dt)&&(Ke=!1)}return we.delete(D),we.delete(q),Ke}function It(D,q){var pe=D.__data__;return Xi(q)?pe[typeof q=="string"?"string":"hash"]:pe.map}function $i(D){for(var q=Nt(D),pe=q.length;pe--;){var Se=q[pe],Me=D[Se];q[pe]=[Se,Me,Kt(Me)]}return q}function wt(D,q){var pe=ce(D,q);return Di(pe)?pe:void 0}var pt=Ri;(Je&&pt(new Je(new ArrayBuffer(1)))!=N||yt&&pt(new yt)!=v||ft&&pt(ft.resolve())!=E||xt&&pt(new xt)!=_||At&&pt(new At)!=I)&&(pt=function(D){var q=Ie.call(D),pe=q==A?D.constructor:void 0,Se=pe?St(pe):void 0;if(Se)switch(Se){case Et:return N;case Ot:return v;case Ze:return E;case Pt:return _;case je:return I}return q});function Qi(D,q,pe){q=Lt(q,D)?[q]:$t(q);for(var Se,Me=-1,Le=q.length;++Me<Le;){var we=Rt(q[Me]);if(!(Se=D!=null&&pe(D,we)))break;D=D[we]}if(Se)return Se;var Le=D?D.length:0;return!!Le&&Ut(Le)&&Xt(we,Le)&&(at(D)||Zt(D))}function Xt(D,q){return q=q==null?c:q,!!q&&(typeof D=="number"||de.test(D))&&D>-1&&D%1==0&&D<q}function Lt(D,q){if(at(D))return!1;var pe=typeof D;return pe=="number"||pe=="symbol"||pe=="boolean"||D==null||zt(D)?!0:J.test(D)||!fe.test(D)||q!=null&&D in Object(q)}function Xi(D){var q=typeof D;return q=="string"||q=="number"||q=="symbol"||q=="boolean"?D!=="__proto__":D===null}function Ki(D){return!!Te&&Te in D}function qi(D){var q=D&&D.constructor,pe=typeof q=="function"&&q.prototype||Ee;return D===pe}function Kt(D){return D===D&&!_t(D)}function qt(D,q){return function(pe){return pe==null?!1:pe[D]===q&&(q!==void 0||D in Object(pe))}}var Ji=Gt(function(D){D=en(D);var q=[];return K.test(D)&&q.push(""),D.replace(be,function(pe,Se,Me,we){q.push(Me?we.replace(Y,"$1"):Se||pe)}),q});function Rt(D){if(typeof D=="string"||zt(D))return D;var q=D+"";return q=="0"&&1/D==-l?"-0":q}function St(D){if(D!=null){try{return Pe.call(D)}catch(q){}try{return D+""}catch(q){}}return""}function Gt(D,q){if(typeof D!="function"||q&&typeof q!="function")throw new TypeError(s);var pe=function(){var Se=arguments,Me=q?q.apply(this,Se):Se[0],we=pe.cache;if(we.has(Me))return we.get(Me);var Le=D.apply(this,Se);return pe.cache=we.set(Me,Le),Le};return pe.cache=new(Gt.Cache||rt),pe}Gt.Cache=rt;function Jt(D,q){return D===q||D!==D&&q!==q}function Zt(D){return Zi(D)&&Ce.call(D,"callee")&&(!nt.call(D,"callee")||Ie.call(D)==d)}var at=Array.isArray;function ei(D){return D!=null&&Ut(D.length)&&!Ht(D)}function Zi(D){return Bt(D)&&ei(D)}function Ht(D){var q=_t(D)?Ie.call(D):"";return q==y||q==S}function Ut(D){return typeof D=="number"&&D>-1&&D%1==0&&D<=c}function _t(D){var q=typeof D;return!!D&&(q=="object"||q=="function")}function Bt(D){return!!D&&typeof D=="object"}function zt(D){return typeof D=="symbol"||Bt(D)&&Ie.call(D)==P}var ti=F?te(F):Fi;function en(D){return D==null?"":zi(D)}function tn(D,q,pe){var Se=D==null?void 0:jt(D,q);return Se===void 0?pe:Se}function nn(D,q){return D!=null&&Qi(D,q,Bi)}function Nt(D){return ei(D)?Ti(D):Vi(D)}function sn(D,q,pe){var Se=at(D)||ti(D);if(q=Oi(q),pe==null)if(Se||_t(D)){var Me=D.constructor;Se?pe=at(D)?new Me:[]:pe=Ht(Me)?Ci(Ue(D)):{}}else pe={};return(Se?O:Li)(D,function(we,Le,Be){return q(pe,we,Le,Be)}),pe}function rn(D){return D}function on(D){return Lt(D)?ne(Rt(D)):Ui(D)}i.exports=sn})(lodash_transform,lodash_transformExports);const isEmpty$1=lodash_isemptyExports,isPlainObject$1=lodash_isplainobject,transform=lodash_transformExports;var src=function i(e,{cleanKeys:t=[],cleanValues:s=[],emptyArrays:r=!0,emptyObjects:o=!0,emptyStrings:a=!0,NaNValues:l=!1,nullValues:c=!0,undefinedValues:d=!0}={}){return transform(e,(m,u,g)=>{if(!t.includes(g)&&((Array.isArray(u)||isPlainObject$1(u))&&(u=i(u,{NaNValues:l,cleanKeys:t,cleanValues:s,emptyArrays:r,emptyObjects:o,emptyStrings:a,nullValues:c,undefinedValues:d})),!s.includes(u)&&!(o&&isPlainObject$1(u)&&isEmpty$1(u))&&!(r&&Array.isArray(u)&&!u.length)&&!(a&&u==="")&&!(l&&Number.isNaN(u))&&!(c&&u===null)&&!(d&&u===void 0))){if(Array.isArray(m))return m.push(u);m[g]=u}})};const whiteUrl=()=>({"/sysMusicScoreCategories/queryTree":"/eduMusicScore/queryTree","/sysMusicScoreAccompaniment/queryPage":queryString.parse(location.search).platform?"/sysMusicScoreAccompaniment/queryPage":"/eduMusicScore/queryPage","/sysMusicScoreAccompaniment/queryPageLimit":"/eduMusicScore/queryPageLimit","/sysMusicScoreAccompaniment/querySubjectIds":"/eduMusicScore/querySubjectIds"}),apiRouter=whiteUrl();browser();const request=extend$1({requestType:"form",timeout:1e4});request.interceptors.request.use((i,e)=>{const t=storeData.proxy+storeData.platformApi;storeData.platformType==="WEB"&&apiRouter[i]&&(i=apiRouter[i]);const s=getToken(),r={};return s&&(r.Authorization=s),{url:t+i,options:{...e,params:src(e.params),data:src(e.data),headers:{...e.headers,...r}}}},{global:!1});request.interceptors.response.use(async(i,e)=>{if(i.status>299||i.status<200){const s=i.statusText+", 状态码"+i.status;showToast(s)}const t=await i.clone().json();if(t.code===5e3)return t;if(t.code!==200&&t.errCode!==0){const s=t.msg||t.message||"处理失败,请重试";throw t.code===403||t.code,new Error(s)}return t},{global:!1});var dayjs_minExports={},dayjs_min={get exports(){return dayjs_minExports},set exports(i){dayjs_minExports=i}};(function(i,e){(function(t,s){i.exports=s()})(commonjsGlobal,function(){var t=1e3,s=6e4,r=36e5,o="millisecond",a="second",l="minute",c="hour",d="day",m="week",u="month",g="quarter",b="year",y="date",S="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var T=["th","st","nd","rd"],V=k%100;return"["+k+(T[(V-20)%10]||T[V]||T[0])+"]"}},E=function(k,T,V){var Z=String(k);return!Z||Z.length>=T?k:""+Array(T+1-Z.length).join(V)+k},w={s:E,z:function(k){var T=-k.utcOffset(),V=Math.abs(T),Z=Math.floor(V/60),W=V%60;return(T<=0?"+":"-")+E(Z,2,"0")+":"+E(W,2,"0")},m:function k(T,V){if(T.date()<V.date())return-k(V,T);var Z=12*(V.year()-T.year())+(V.month()-T.month()),W=T.clone().add(Z,u),se=V-W<0,ie=T.clone().add(Z+(se?-1:1),u);return+(-(Z+(V-W)/(se?W-ie:ie-W))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:u,y:b,w:m,d,D:y,h:c,m:l,s:a,ms:o,Q:g}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},_="en",C={};C[_]=A;var P=function(k){return k instanceof G},I=function k(T,V,Z){var W;if(!T)return _;if(typeof T=="string"){var se=T.toLowerCase();C[se]&&(W=se),V&&(C[se]=V,W=se);var ie=T.split("-");if(!W&&ie.length>1)return k(ie[0])}else{var fe=T.name;C[fe]=T,W=fe}return!Z&&W&&(_=W),W||!Z&&_},R=function(k,T){if(P(k))return k.clone();var V=typeof T=="object"?T:{};return V.date=k,V.args=arguments,new G(V)},N=w;N.l=I,N.i=P,N.w=function(k,T){return R(k,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var G=function(){function k(V){this.$L=I(V.locale,null,!0),this.parse(V)}var T=k.prototype;return T.parse=function(V){this.$d=function(Z){var W=Z.date,se=Z.utc;if(W===null)return new Date(NaN);if(N.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var ie=W.match(v);if(ie){var fe=ie[2]-1||0,J=(ie[7]||"0").substring(0,3);return se?new Date(Date.UTC(ie[1],fe,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,J)):new Date(ie[1],fe,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,J)}}return new Date(W)}(V),this.$x=V.x||{},this.init()},T.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},T.$utils=function(){return N},T.isValid=function(){return this.$d.toString()!==S},T.isSame=function(V,Z){var W=R(V);return this.startOf(Z)<=W&&W<=this.endOf(Z)},T.isAfter=function(V,Z){return R(V)<this.startOf(Z)},T.isBefore=function(V,Z){return this.endOf(Z)<R(V)},T.$g=function(V,Z,W){return N.u(V)?this[Z]:this.set(W,V)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(V,Z){var W=this,se=!!N.u(Z)||Z,ie=N.p(V),fe=function(le,me){var ve=N.w(W.$u?Date.UTC(W.$y,me,le):new Date(W.$y,me,le),W);return se?ve:ve.endOf(d)},J=function(le,me){return N.w(W.toDate()[le].apply(W.toDate("s"),(se?[0,0,0,0]:[23,59,59,999]).slice(me)),W)},K=this.$W,be=this.$M,oe=this.$D,Y="set"+(this.$u?"UTC":"");switch(ie){case b:return se?fe(1,0):fe(31,11);case u:return se?fe(1,be):fe(0,be+1);case m:var ae=this.$locale().weekStart||0,de=(K<ae?K+7:K)-ae;return fe(se?oe-de:oe+(6-de),be);case d:case y:return J(Y+"Hours",0);case c:return J(Y+"Minutes",1);case l:return J(Y+"Seconds",2);case a:return J(Y+"Milliseconds",3);default:return this.clone()}},T.endOf=function(V){return this.startOf(V,!1)},T.$set=function(V,Z){var W,se=N.p(V),ie="set"+(this.$u?"UTC":""),fe=(W={},W[d]=ie+"Date",W[y]=ie+"Date",W[u]=ie+"Month",W[b]=ie+"FullYear",W[c]=ie+"Hours",W[l]=ie+"Minutes",W[a]=ie+"Seconds",W[o]=ie+"Milliseconds",W)[se],J=se===d?this.$D+(Z-this.$W):Z;if(se===u||se===b){var K=this.clone().set(y,1);K.$d[fe](J),K.init(),this.$d=K.set(y,Math.min(this.$D,K.daysInMonth())).$d}else fe&&this.$d[fe](J);return this.init(),this},T.set=function(V,Z){return this.clone().$set(V,Z)},T.get=function(V){return this[N.p(V)]()},T.add=function(V,Z){var W,se=this;V=Number(V);var ie=N.p(Z),fe=function(be){var oe=R(se);return N.w(oe.date(oe.date()+Math.round(be*V)),se)};if(ie===u)return this.set(u,this.$M+V);if(ie===b)return this.set(b,this.$y+V);if(ie===d)return fe(1);if(ie===m)return fe(7);var J=(W={},W[l]=s,W[c]=r,W[a]=t,W)[ie]||1,K=this.$d.getTime()+V*J;return N.w(K,this)},T.subtract=function(V,Z){return this.add(-1*V,Z)},T.format=function(V){var Z=this,W=this.$locale();if(!this.isValid())return W.invalidDate||S;var se=V||"YYYY-MM-DDTHH:mm:ssZ",ie=N.z(this),fe=this.$H,J=this.$m,K=this.$M,be=W.weekdays,oe=W.months,Y=function(me,ve,ye,U){return me&&(me[ve]||me(Z,se))||ye[ve].slice(0,U)},ae=function(me){return N.s(fe%12||12,me,"0")},de=W.meridiem||function(me,ve,ye){var U=me<12?"AM":"PM";return ye?U.toLowerCase():U},le={YY:String(this.$y).slice(-2),YYYY:this.$y,M:K+1,MM:N.s(K+1,2,"0"),MMM:Y(W.monthsShort,K,oe,3),MMMM:Y(oe,K),D:this.$D,DD:N.s(this.$D,2,"0"),d:String(this.$W),dd:Y(W.weekdaysMin,this.$W,be,2),ddd:Y(W.weekdaysShort,this.$W,be,3),dddd:be[this.$W],H:String(fe),HH:N.s(fe,2,"0"),h:ae(1),hh:ae(2),a:de(fe,J,!0),A:de(fe,J,!1),m:String(J),mm:N.s(J,2,"0"),s:String(this.$s),ss:N.s(this.$s,2,"0"),SSS:N.s(this.$ms,3,"0"),Z:ie};return se.replace(x,function(me,ve){return ve||le[me]||ie.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(V,Z,W){var se,ie=N.p(Z),fe=R(V),J=(fe.utcOffset()-this.utcOffset())*s,K=this-fe,be=N.m(this,fe);return be=(se={},se[b]=be/12,se[u]=be,se[g]=be/3,se[m]=(K-J)/6048e5,se[d]=(K-J)/864e5,se[c]=K/r,se[l]=K/s,se[a]=K/t,se)[ie]||K,W?be:N.a(be)},T.daysInMonth=function(){return this.endOf(u).$D},T.$locale=function(){return C[this.$L]},T.locale=function(V,Z){if(!V)return this.$L;var W=this.clone(),se=I(V,Z,!0);return se&&(W.$L=se),W},T.clone=function(){return N.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},k}(),B=G.prototype;return R.prototype=B,[["$ms",o],["$s",a],["$m",l],["$H",c],["$W",d],["$M",u],["$y",b],["$D",y]].forEach(function(k){B[k[1]]=function(T){return this.$g(T,k[0],k[1])}}),R.extend=function(k,T){return k.$i||(k(T,G,R),k.$i=!0),R},R.locale=I,R.isDayjs=P,R.unix=function(k){return R(1e3*k)},R.en=C[_],R.Ls=C,R.p={},R})})(dayjs_min);const dayjs=dayjs_minExports;var durationExports={},duration$1={get exports(){return durationExports},set exports(i){durationExports=i}};(function(i,e){(function(t,s){i.exports=s()})(commonjsGlobal,function(){var t,s,r=1e3,o=6e4,a=36e5,l=864e5,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=31536e6,m=2592e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,g={years:d,months:m,days:l,hours:a,minutes:o,seconds:r,milliseconds:1,weeks:6048e5},b=function(_){return _ instanceof w},y=function(_,C,P){return new w(_,P,C.$l)},S=function(_){return s.p(_)+"s"},v=function(_){return _<0},x=function(_){return v(_)?Math.ceil(_):Math.floor(_)},A=function(_){return Math.abs(_)},E=function(_,C){return _?v(_)?{negative:!0,format:""+A(_)+C}:{negative:!1,format:""+_+C}:{negative:!1,format:""}},w=function(){function _(P,I,R){var N=this;if(this.$d={},this.$l=R,P===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return y(P*g[S(I)],this);if(typeof P=="number")return this.$ms=P,this.parseFromMilliseconds(),this;if(typeof P=="object")return Object.keys(P).forEach(function(k){N.$d[S(k)]=P[k]}),this.calMilliseconds(),this;if(typeof P=="string"){var G=P.match(u);if(G){var B=G.slice(2).map(function(k){return k!=null?Number(k):0});return this.$d.years=B[0],this.$d.months=B[1],this.$d.weeks=B[2],this.$d.days=B[3],this.$d.hours=B[4],this.$d.minutes=B[5],this.$d.seconds=B[6],this.calMilliseconds(),this}}return this}var C=_.prototype;return C.calMilliseconds=function(){var P=this;this.$ms=Object.keys(this.$d).reduce(function(I,R){return I+(P.$d[R]||0)*g[R]},0)},C.parseFromMilliseconds=function(){var P=this.$ms;this.$d.years=x(P/d),P%=d,this.$d.months=x(P/m),P%=m,this.$d.days=x(P/l),P%=l,this.$d.hours=x(P/a),P%=a,this.$d.minutes=x(P/o),P%=o,this.$d.seconds=x(P/r),P%=r,this.$d.milliseconds=P},C.toISOString=function(){var P=E(this.$d.years,"Y"),I=E(this.$d.months,"M"),R=+this.$d.days||0;this.$d.weeks&&(R+=7*this.$d.weeks);var N=E(R,"D"),G=E(this.$d.hours,"H"),B=E(this.$d.minutes,"M"),k=this.$d.seconds||0;this.$d.milliseconds&&(k+=this.$d.milliseconds/1e3);var T=E(k,"S"),V=P.negative||I.negative||N.negative||G.negative||B.negative||T.negative,Z=G.format||B.format||T.format?"T":"",W=(V?"-":"")+"P"+P.format+I.format+N.format+Z+G.format+B.format+T.format;return W==="P"||W==="-P"?"P0D":W},C.toJSON=function(){return this.toISOString()},C.format=function(P){var I=P||"YYYY-MM-DDTHH:mm:ss",R={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return I.replace(c,function(N,G){return G||String(R[N])})},C.as=function(P){return this.$ms/g[S(P)]},C.get=function(P){var I=this.$ms,R=S(P);return R==="milliseconds"?I%=1e3:I=R==="weeks"?x(I/g[R]):this.$d[R],I===0?0:I},C.add=function(P,I,R){var N;return N=I?P*g[S(I)]:b(P)?P.$ms:y(P,this).$ms,y(this.$ms+N*(R?-1:1),this)},C.subtract=function(P,I){return this.add(P,I,!0)},C.locale=function(P){var I=this.clone();return I.$l=P,I},C.clone=function(){return y(this.$ms,this)},C.humanize=function(P){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!P)},C.milliseconds=function(){return this.get("milliseconds")},C.asMilliseconds=function(){return this.as("milliseconds")},C.seconds=function(){return this.get("seconds")},C.asSeconds=function(){return this.as("seconds")},C.minutes=function(){return this.get("minutes")},C.asMinutes=function(){return this.as("minutes")},C.hours=function(){return this.get("hours")},C.asHours=function(){return this.as("hours")},C.days=function(){return this.get("days")},C.asDays=function(){return this.as("days")},C.weeks=function(){return this.get("weeks")},C.asWeeks=function(){return this.as("weeks")},C.months=function(){return this.get("months")},C.asMonths=function(){return this.as("months")},C.years=function(){return this.get("years")},C.asYears=function(){return this.as("years")},_}();return function(_,C,P){t=P,s=P().$utils(),P.duration=function(N,G){var B=P.locale();return y(N,{$l:B},G)},P.isDuration=b;var I=C.prototype.add,R=C.prototype.subtract;C.prototype.add=function(N,G){return b(N)&&(N=N.asMilliseconds()),I.bind(this)(N,G)},C.prototype.subtract=function(N,G){return b(N)&&(N=N.asMilliseconds()),R.bind(this)(N,G)}}})})(duration$1);const duration=durationExports;var howler={};/*!
- * howler.js v2.2.3
- * howlerjs.com
- *
- * (c) 2013-2020, James Simpson of GoldFire Studios
- * goldfirestudios.com
- *
- * MIT License
- */(function(i){(function(){var e=function(){this.init()};e.prototype={init:function(){var u=this||t;return u._counter=1e3,u._html5AudioPool=[],u.html5PoolSize=10,u._codecs={},u._howls=[],u._muted=!1,u._volume=1,u._canPlayEvent="canplaythrough",u._navigator=typeof window<"u"&&window.navigator?window.navigator:null,u.masterGain=null,u.noAudio=!1,u.usingWebAudio=!0,u.autoSuspend=!0,u.ctx=null,u.autoUnlock=!0,u._setup(),u},volume:function(u){var g=this||t;if(u=parseFloat(u),g.ctx||m(),typeof u<"u"&&u>=0&&u<=1){if(g._volume=u,g._muted)return g;g.usingWebAudio&&g.masterGain.gain.setValueAtTime(u,t.ctx.currentTime);for(var b=0;b<g._howls.length;b++)if(!g._howls[b]._webAudio)for(var y=g._howls[b]._getSoundIds(),S=0;S<y.length;S++){var v=g._howls[b]._soundById(y[S]);v&&v._node&&(v._node.volume=v._volume*u)}return g}return g._volume},mute:function(u){var g=this||t;g.ctx||m(),g._muted=u,g.usingWebAudio&&g.masterGain.gain.setValueAtTime(u?0:g._volume,t.ctx.currentTime);for(var b=0;b<g._howls.length;b++)if(!g._howls[b]._webAudio)for(var y=g._howls[b]._getSoundIds(),S=0;S<y.length;S++){var v=g._howls[b]._soundById(y[S]);v&&v._node&&(v._node.muted=u?!0:v._muted)}return g},stop:function(){for(var u=this||t,g=0;g<u._howls.length;g++)u._howls[g].stop();return u},unload:function(){for(var u=this||t,g=u._howls.length-1;g>=0;g--)u._howls[g].unload();return u.usingWebAudio&&u.ctx&&typeof u.ctx.close<"u"&&(u.ctx.close(),u.ctx=null,m()),u},codecs:function(u){return(this||t)._codecs[u.replace(/^x-/,"")]},_setup:function(){var u=this||t;if(u.state=u.ctx&&u.ctx.state||"suspended",u._autoSuspend(),!u.usingWebAudio)if(typeof Audio<"u")try{var g=new Audio;typeof g.oncanplaythrough>"u"&&(u._canPlayEvent="canplay")}catch(b){u.noAudio=!0}else u.noAudio=!0;try{var g=new Audio;g.muted&&(u.noAudio=!0)}catch(b){}return u.noAudio||u._setupCodecs(),u},_setupCodecs:function(){var u=this||t,g=null;try{g=typeof Audio<"u"?new Audio:null}catch(w){return u}if(!g||typeof g.canPlayType!="function")return u;var b=g.canPlayType("audio/mpeg;").replace(/^no$/,""),y=u._navigator?u._navigator.userAgent:"",S=y.match(/OPR\/([0-6].)/g),v=S&&parseInt(S[0].split("/")[1],10)<33,x=y.indexOf("Safari")!==-1&&y.indexOf("Chrome")===-1,A=y.match(/Version\/(.*?) /),E=x&&A&&parseInt(A[1],10)<15;return u._codecs={mp3:!!(!v&&(b||g.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!b,opus:!!g.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!g.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!g.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(g.canPlayType('audio/wav; codecs="1"')||g.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!g.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!g.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(g.canPlayType("audio/x-m4a;")||g.canPlayType("audio/m4a;")||g.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(g.canPlayType("audio/x-m4b;")||g.canPlayType("audio/m4b;")||g.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(g.canPlayType("audio/x-mp4;")||g.canPlayType("audio/mp4;")||g.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!E&&g.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!E&&g.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!g.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(g.canPlayType("audio/x-flac;")||g.canPlayType("audio/flac;")).replace(/^no$/,"")},u},_unlockAudio:function(){var u=this||t;if(!(u._audioUnlocked||!u.ctx)){u._audioUnlocked=!1,u.autoUnlock=!1,!u._mobileUnloaded&&u.ctx.sampleRate!==44100&&(u._mobileUnloaded=!0,u.unload()),u._scratchBuffer=u.ctx.createBuffer(1,1,22050);var g=function(b){for(;u._html5AudioPool.length<u.html5PoolSize;)try{var y=new Audio;y._unlocked=!0,u._releaseHtml5Audio(y)}catch(w){u.noAudio=!0;break}for(var S=0;S<u._howls.length;S++)if(!u._howls[S]._webAudio)for(var v=u._howls[S]._getSoundIds(),x=0;x<v.length;x++){var A=u._howls[S]._soundById(v[x]);A&&A._node&&!A._node._unlocked&&(A._node._unlocked=!0,A._node.load())}u._autoResume();var E=u.ctx.createBufferSource();E.buffer=u._scratchBuffer,E.connect(u.ctx.destination),typeof E.start>"u"?E.noteOn(0):E.start(0),typeof u.ctx.resume=="function"&&u.ctx.resume(),E.onended=function(){E.disconnect(0),u._audioUnlocked=!0,document.removeEventListener("touchstart",g,!0),document.removeEventListener("touchend",g,!0),document.removeEventListener("click",g,!0),document.removeEventListener("keydown",g,!0);for(var w=0;w<u._howls.length;w++)u._howls[w]._emit("unlock")}};return document.addEventListener("touchstart",g,!0),document.addEventListener("touchend",g,!0),document.addEventListener("click",g,!0),document.addEventListener("keydown",g,!0),u}},_obtainHtml5Audio:function(){var u=this||t;if(u._html5AudioPool.length)return u._html5AudioPool.pop();var g=new Audio().play();return g&&typeof Promise<"u"&&(g instanceof Promise||typeof g.then=="function")&&g.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(u){var g=this||t;return u._unlocked&&g._html5AudioPool.push(u),g},_autoSuspend:function(){var u=this;if(!(!u.autoSuspend||!u.ctx||typeof u.ctx.suspend>"u"||!t.usingWebAudio)){for(var g=0;g<u._howls.length;g++)if(u._howls[g]._webAudio){for(var b=0;b<u._howls[g]._sounds.length;b++)if(!u._howls[g]._sounds[b]._paused)return u}return u._suspendTimer&&clearTimeout(u._suspendTimer),u._suspendTimer=setTimeout(function(){if(u.autoSuspend){u._suspendTimer=null,u.state="suspending";var y=function(){u.state="suspended",u._resumeAfterSuspend&&(delete u._resumeAfterSuspend,u._autoResume())};u.ctx.suspend().then(y,y)}},3e4),u}},_autoResume:function(){var u=this;if(!(!u.ctx||typeof u.ctx.resume>"u"||!t.usingWebAudio))return u.state==="running"&&u.ctx.state!=="interrupted"&&u._suspendTimer?(clearTimeout(u._suspendTimer),u._suspendTimer=null):u.state==="suspended"||u.state==="running"&&u.ctx.state==="interrupted"?(u.ctx.resume().then(function(){u.state="running";for(var g=0;g<u._howls.length;g++)u._howls[g]._emit("resume")}),u._suspendTimer&&(clearTimeout(u._suspendTimer),u._suspendTimer=null)):u.state==="suspending"&&(u._resumeAfterSuspend=!0),u}};var t=new e,s=function(u){var g=this;if(!u.src||u.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}g.init(u)};s.prototype={init:function(u){var g=this;return t.ctx||m(),g._autoplay=u.autoplay||!1,g._format=typeof u.format!="string"?u.format:[u.format],g._html5=u.html5||!1,g._muted=u.mute||!1,g._loop=u.loop||!1,g._pool=u.pool||5,g._preload=typeof u.preload=="boolean"||u.preload==="metadata"?u.preload:!0,g._rate=u.rate||1,g._sprite=u.sprite||{},g._src=typeof u.src!="string"?u.src:[u.src],g._volume=u.volume!==void 0?u.volume:1,g._xhr={method:u.xhr&&u.xhr.method?u.xhr.method:"GET",headers:u.xhr&&u.xhr.headers?u.xhr.headers:null,withCredentials:u.xhr&&u.xhr.withCredentials?u.xhr.withCredentials:!1},g._duration=0,g._state="unloaded",g._sounds=[],g._endTimers={},g._queue=[],g._playLock=!1,g._onend=u.onend?[{fn:u.onend}]:[],g._onfade=u.onfade?[{fn:u.onfade}]:[],g._onload=u.onload?[{fn:u.onload}]:[],g._onloaderror=u.onloaderror?[{fn:u.onloaderror}]:[],g._onplayerror=u.onplayerror?[{fn:u.onplayerror}]:[],g._onpause=u.onpause?[{fn:u.onpause}]:[],g._onplay=u.onplay?[{fn:u.onplay}]:[],g._onstop=u.onstop?[{fn:u.onstop}]:[],g._onmute=u.onmute?[{fn:u.onmute}]:[],g._onvolume=u.onvolume?[{fn:u.onvolume}]:[],g._onrate=u.onrate?[{fn:u.onrate}]:[],g._onseek=u.onseek?[{fn:u.onseek}]:[],g._onunlock=u.onunlock?[{fn:u.onunlock}]:[],g._onresume=[],g._webAudio=t.usingWebAudio&&!g._html5,typeof t.ctx<"u"&&t.ctx&&t.autoUnlock&&t._unlockAudio(),t._howls.push(g),g._autoplay&&g._queue.push({event:"play",action:function(){g.play()}}),g._preload&&g._preload!=="none"&&g.load(),g},load:function(){var u=this,g=null;if(t.noAudio){u._emit("loaderror",null,"No audio support.");return}typeof u._src=="string"&&(u._src=[u._src]);for(var b=0;b<u._src.length;b++){var y,S;if(u._format&&u._format[b])y=u._format[b];else{if(S=u._src[b],typeof S!="string"){u._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}y=/^data:audio\/([^;,]+);/i.exec(S),y||(y=/\.([^.]+)$/.exec(S.split("?",1)[0])),y&&(y=y[1].toLowerCase())}if(y||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),y&&t.codecs(y)){g=u._src[b];break}}if(!g){u._emit("loaderror",null,"No codec support for selected audio sources.");return}return u._src=g,u._state="loading",window.location.protocol==="https:"&&g.slice(0,5)==="http:"&&(u._html5=!0,u._webAudio=!1),new r(u),u._webAudio&&a(u),u},play:function(u,g){var b=this,y=null;if(typeof u=="number")y=u,u=null;else{if(typeof u=="string"&&b._state==="loaded"&&!b._sprite[u])return null;if(typeof u>"u"&&(u="__default",!b._playLock)){for(var S=0,v=0;v<b._sounds.length;v++)b._sounds[v]._paused&&!b._sounds[v]._ended&&(S++,y=b._sounds[v]._id);S===1?u=null:y=null}}var x=y?b._soundById(y):b._inactiveSound();if(!x)return null;if(y&&!u&&(u=x._sprite||"__default"),b._state!=="loaded"){x._sprite=u,x._ended=!1;var A=x._id;return b._queue.push({event:"play",action:function(){b.play(A)}}),A}if(y&&!x._paused)return g||b._loadQueue("play"),x._id;b._webAudio&&t._autoResume();var E=Math.max(0,x._seek>0?x._seek:b._sprite[u][0]/1e3),w=Math.max(0,(b._sprite[u][0]+b._sprite[u][1])/1e3-E),_=w*1e3/Math.abs(x._rate),C=b._sprite[u][0]/1e3,P=(b._sprite[u][0]+b._sprite[u][1])/1e3;x._sprite=u,x._ended=!1;var I=function(){x._paused=!1,x._seek=E,x._start=C,x._stop=P,x._loop=!!(x._loop||b._sprite[u][2])};if(E>=P){b._ended(x);return}var R=x._node;if(b._webAudio){var N=function(){b._playLock=!1,I(),b._refreshBuffer(x);var T=x._muted||b._muted?0:x._volume;R.gain.setValueAtTime(T,t.ctx.currentTime),x._playStart=t.ctx.currentTime,typeof R.bufferSource.start>"u"?x._loop?R.bufferSource.noteGrainOn(0,E,86400):R.bufferSource.noteGrainOn(0,E,w):x._loop?R.bufferSource.start(0,E,86400):R.bufferSource.start(0,E,w),_!==1/0&&(b._endTimers[x._id]=setTimeout(b._ended.bind(b,x),_)),g||setTimeout(function(){b._emit("play",x._id),b._loadQueue()},0)};t.state==="running"&&t.ctx.state!=="interrupted"?N():(b._playLock=!0,b.once("resume",N),b._clearTimer(x._id))}else{var G=function(){R.currentTime=E,R.muted=x._muted||b._muted||t._muted||R.muted,R.volume=x._volume*t.volume(),R.playbackRate=x._rate;try{var T=R.play();if(T&&typeof Promise<"u"&&(T instanceof Promise||typeof T.then=="function")?(b._playLock=!0,I(),T.then(function(){b._playLock=!1,R._unlocked=!0,g?b._loadQueue():b._emit("play",x._id)}).catch(function(){b._playLock=!1,b._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),x._ended=!0,x._paused=!0})):g||(b._playLock=!1,I(),b._emit("play",x._id)),R.playbackRate=x._rate,R.paused){b._emit("playerror",x._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}u!=="__default"||x._loop?b._endTimers[x._id]=setTimeout(b._ended.bind(b,x),_):(b._endTimers[x._id]=function(){b._ended(x),R.removeEventListener("ended",b._endTimers[x._id],!1)},R.addEventListener("ended",b._endTimers[x._id],!1))}catch(V){b._emit("playerror",x._id,V)}};R.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(R.src=b._src,R.load());var B=window&&window.ejecta||!R.readyState&&t._navigator.isCocoonJS;if(R.readyState>=3||B)G();else{b._playLock=!0,b._state="loading";var k=function(){b._state="loaded",G(),R.removeEventListener(t._canPlayEvent,k,!1)};R.addEventListener(t._canPlayEvent,k,!1),b._clearTimer(x._id)}}return x._id},pause:function(u){var g=this;if(g._state!=="loaded"||g._playLock)return g._queue.push({event:"pause",action:function(){g.pause(u)}}),g;for(var b=g._getSoundIds(u),y=0;y<b.length;y++){g._clearTimer(b[y]);var S=g._soundById(b[y]);if(S&&!S._paused&&(S._seek=g.seek(b[y]),S._rateSeek=0,S._paused=!0,g._stopFade(b[y]),S._node))if(g._webAudio){if(!S._node.bufferSource)continue;typeof S._node.bufferSource.stop>"u"?S._node.bufferSource.noteOff(0):S._node.bufferSource.stop(0),g._cleanBuffer(S._node)}else(!isNaN(S._node.duration)||S._node.duration===1/0)&&S._node.pause();arguments[1]||g._emit("pause",S?S._id:null)}return g},stop:function(u,g){var b=this;if(b._state!=="loaded"||b._playLock)return b._queue.push({event:"stop",action:function(){b.stop(u)}}),b;for(var y=b._getSoundIds(u),S=0;S<y.length;S++){b._clearTimer(y[S]);var v=b._soundById(y[S]);v&&(v._seek=v._start||0,v._rateSeek=0,v._paused=!0,v._ended=!0,b._stopFade(y[S]),v._node&&(b._webAudio?v._node.bufferSource&&(typeof v._node.bufferSource.stop>"u"?v._node.bufferSource.noteOff(0):v._node.bufferSource.stop(0),b._cleanBuffer(v._node)):(!isNaN(v._node.duration)||v._node.duration===1/0)&&(v._node.currentTime=v._start||0,v._node.pause(),v._node.duration===1/0&&b._clearSound(v._node))),g||b._emit("stop",v._id))}return b},mute:function(u,g){var b=this;if(b._state!=="loaded"||b._playLock)return b._queue.push({event:"mute",action:function(){b.mute(u,g)}}),b;if(typeof g>"u")if(typeof u=="boolean")b._muted=u;else return b._muted;for(var y=b._getSoundIds(g),S=0;S<y.length;S++){var v=b._soundById(y[S]);v&&(v._muted=u,v._interval&&b._stopFade(v._id),b._webAudio&&v._node?v._node.gain.setValueAtTime(u?0:v._volume,t.ctx.currentTime):v._node&&(v._node.muted=t._muted?!0:u),b._emit("mute",v._id))}return b},volume:function(){var u=this,g=arguments,b,y;if(g.length===0)return u._volume;if(g.length===1||g.length===2&&typeof g[1]>"u"){var S=u._getSoundIds(),v=S.indexOf(g[0]);v>=0?y=parseInt(g[0],10):b=parseFloat(g[0])}else g.length>=2&&(b=parseFloat(g[0]),y=parseInt(g[1],10));var x;if(typeof b<"u"&&b>=0&&b<=1){if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"volume",action:function(){u.volume.apply(u,g)}}),u;typeof y>"u"&&(u._volume=b),y=u._getSoundIds(y);for(var A=0;A<y.length;A++)x=u._soundById(y[A]),x&&(x._volume=b,g[2]||u._stopFade(y[A]),u._webAudio&&x._node&&!x._muted?x._node.gain.setValueAtTime(b,t.ctx.currentTime):x._node&&!x._muted&&(x._node.volume=b*t.volume()),u._emit("volume",x._id))}else return x=y?u._soundById(y):u._sounds[0],x?x._volume:0;return u},fade:function(u,g,b,y){var S=this;if(S._state!=="loaded"||S._playLock)return S._queue.push({event:"fade",action:function(){S.fade(u,g,b,y)}}),S;u=Math.min(Math.max(0,parseFloat(u)),1),g=Math.min(Math.max(0,parseFloat(g)),1),b=parseFloat(b),S.volume(u,y);for(var v=S._getSoundIds(y),x=0;x<v.length;x++){var A=S._soundById(v[x]);if(A){if(y||S._stopFade(v[x]),S._webAudio&&!A._muted){var E=t.ctx.currentTime,w=E+b/1e3;A._volume=u,A._node.gain.setValueAtTime(u,E),A._node.gain.linearRampToValueAtTime(g,w)}S._startFadeInterval(A,u,g,b,v[x],typeof y>"u")}}return S},_startFadeInterval:function(u,g,b,y,S,v){var x=this,A=g,E=b-g,w=Math.abs(E/.01),_=Math.max(4,w>0?y/w:y),C=Date.now();u._fadeTo=b,u._interval=setInterval(function(){var P=(Date.now()-C)/y;C=Date.now(),A+=E*P,A=Math.round(A*100)/100,E<0?A=Math.max(b,A):A=Math.min(b,A),x._webAudio?u._volume=A:x.volume(A,u._id,!0),v&&(x._volume=A),(b<g&&A<=b||b>g&&A>=b)&&(clearInterval(u._interval),u._interval=null,u._fadeTo=null,x.volume(b,u._id),x._emit("fade",u._id))},_)},_stopFade:function(u){var g=this,b=g._soundById(u);return b&&b._interval&&(g._webAudio&&b._node.gain.cancelScheduledValues(t.ctx.currentTime),clearInterval(b._interval),b._interval=null,g.volume(b._fadeTo,u),b._fadeTo=null,g._emit("fade",u)),g},loop:function(){var u=this,g=arguments,b,y,S;if(g.length===0)return u._loop;if(g.length===1)if(typeof g[0]=="boolean")b=g[0],u._loop=b;else return S=u._soundById(parseInt(g[0],10)),S?S._loop:!1;else g.length===2&&(b=g[0],y=parseInt(g[1],10));for(var v=u._getSoundIds(y),x=0;x<v.length;x++)S=u._soundById(v[x]),S&&(S._loop=b,u._webAudio&&S._node&&S._node.bufferSource&&(S._node.bufferSource.loop=b,b&&(S._node.bufferSource.loopStart=S._start||0,S._node.bufferSource.loopEnd=S._stop,u.playing(v[x])&&(u.pause(v[x],!0),u.play(v[x],!0)))));return u},rate:function(){var u=this,g=arguments,b,y;if(g.length===0)y=u._sounds[0]._id;else if(g.length===1){var S=u._getSoundIds(),v=S.indexOf(g[0]);v>=0?y=parseInt(g[0],10):b=parseFloat(g[0])}else g.length===2&&(b=parseFloat(g[0]),y=parseInt(g[1],10));var x;if(typeof b=="number"){if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"rate",action:function(){u.rate.apply(u,g)}}),u;typeof y>"u"&&(u._rate=b),y=u._getSoundIds(y);for(var A=0;A<y.length;A++)if(x=u._soundById(y[A]),x){u.playing(y[A])&&(x._rateSeek=u.seek(y[A]),x._playStart=u._webAudio?t.ctx.currentTime:x._playStart),x._rate=b,u._webAudio&&x._node&&x._node.bufferSource?x._node.bufferSource.playbackRate.setValueAtTime(b,t.ctx.currentTime):x._node&&(x._node.playbackRate=b);var E=u.seek(y[A]),w=(u._sprite[x._sprite][0]+u._sprite[x._sprite][1])/1e3-E,_=w*1e3/Math.abs(x._rate);(u._endTimers[y[A]]||!x._paused)&&(u._clearTimer(y[A]),u._endTimers[y[A]]=setTimeout(u._ended.bind(u,x),_)),u._emit("rate",x._id)}}else return x=u._soundById(y),x?x._rate:u._rate;return u},seek:function(){var u=this,g=arguments,b,y;if(g.length===0)u._sounds.length&&(y=u._sounds[0]._id);else if(g.length===1){var S=u._getSoundIds(),v=S.indexOf(g[0]);v>=0?y=parseInt(g[0],10):u._sounds.length&&(y=u._sounds[0]._id,b=parseFloat(g[0]))}else g.length===2&&(b=parseFloat(g[0]),y=parseInt(g[1],10));if(typeof y>"u")return 0;if(typeof b=="number"&&(u._state!=="loaded"||u._playLock))return u._queue.push({event:"seek",action:function(){u.seek.apply(u,g)}}),u;var x=u._soundById(y);if(x)if(typeof b=="number"&&b>=0){var A=u.playing(y);A&&u.pause(y,!0),x._seek=b,x._ended=!1,u._clearTimer(y),!u._webAudio&&x._node&&!isNaN(x._node.duration)&&(x._node.currentTime=b);var E=function(){A&&u.play(y,!0),u._emit("seek",y)};if(A&&!u._webAudio){var w=function(){u._playLock?setTimeout(w,0):E()};setTimeout(w,0)}else E()}else if(u._webAudio){var _=u.playing(y)?t.ctx.currentTime-x._playStart:0,C=x._rateSeek?x._rateSeek-x._seek:0;return x._seek+(C+_*Math.abs(x._rate))}else return x._node.currentTime;return u},playing:function(u){var g=this;if(typeof u=="number"){var b=g._soundById(u);return b?!b._paused:!1}for(var y=0;y<g._sounds.length;y++)if(!g._sounds[y]._paused)return!0;return!1},duration:function(u){var g=this,b=g._duration,y=g._soundById(u);return y&&(b=g._sprite[y._sprite][1]/1e3),b},state:function(){return this._state},unload:function(){for(var u=this,g=u._sounds,b=0;b<g.length;b++)g[b]._paused||u.stop(g[b]._id),u._webAudio||(u._clearSound(g[b]._node),g[b]._node.removeEventListener("error",g[b]._errorFn,!1),g[b]._node.removeEventListener(t._canPlayEvent,g[b]._loadFn,!1),g[b]._node.removeEventListener("ended",g[b]._endFn,!1),t._releaseHtml5Audio(g[b]._node)),delete g[b]._node,u._clearTimer(g[b]._id);var y=t._howls.indexOf(u);y>=0&&t._howls.splice(y,1);var S=!0;for(b=0;b<t._howls.length;b++)if(t._howls[b]._src===u._src||u._src.indexOf(t._howls[b]._src)>=0){S=!1;break}return o&&S&&delete o[u._src],t.noAudio=!1,u._state="unloaded",u._sounds=[],u=null,null},on:function(u,g,b,y){var S=this,v=S["_on"+u];return typeof g=="function"&&v.push(y?{id:b,fn:g,once:y}:{id:b,fn:g}),S},off:function(u,g,b){var y=this,S=y["_on"+u],v=0;if(typeof g=="number"&&(b=g,g=null),g||b)for(v=0;v<S.length;v++){var x=b===S[v].id;if(g===S[v].fn&&x||!g&&x){S.splice(v,1);break}}else if(u)y["_on"+u]=[];else{var A=Object.keys(y);for(v=0;v<A.length;v++)A[v].indexOf("_on")===0&&Array.isArray(y[A[v]])&&(y[A[v]]=[])}return y},once:function(u,g,b){var y=this;return y.on(u,g,b,1),y},_emit:function(u,g,b){for(var y=this,S=y["_on"+u],v=S.length-1;v>=0;v--)(!S[v].id||S[v].id===g||u==="load")&&(setTimeout(function(x){x.call(this,g,b)}.bind(y,S[v].fn),0),S[v].once&&y.off(u,S[v].fn,S[v].id));return y._loadQueue(u),y},_loadQueue:function(u){var g=this;if(g._queue.length>0){var b=g._queue[0];b.event===u&&(g._queue.shift(),g._loadQueue()),u||b.action()}return g},_ended:function(u){var g=this,b=u._sprite;if(!g._webAudio&&u._node&&!u._node.paused&&!u._node.ended&&u._node.currentTime<u._stop)return setTimeout(g._ended.bind(g,u),100),g;var y=!!(u._loop||g._sprite[b][2]);if(g._emit("end",u._id),!g._webAudio&&y&&g.stop(u._id,!0).play(u._id),g._webAudio&&y){g._emit("play",u._id),u._seek=u._start||0,u._rateSeek=0,u._playStart=t.ctx.currentTime;var S=(u._stop-u._start)*1e3/Math.abs(u._rate);g._endTimers[u._id]=setTimeout(g._ended.bind(g,u),S)}return g._webAudio&&!y&&(u._paused=!0,u._ended=!0,u._seek=u._start||0,u._rateSeek=0,g._clearTimer(u._id),g._cleanBuffer(u._node),t._autoSuspend()),!g._webAudio&&!y&&g.stop(u._id,!0),g},_clearTimer:function(u){var g=this;if(g._endTimers[u]){if(typeof g._endTimers[u]!="function")clearTimeout(g._endTimers[u]);else{var b=g._soundById(u);b&&b._node&&b._node.removeEventListener("ended",g._endTimers[u],!1)}delete g._endTimers[u]}return g},_soundById:function(u){for(var g=this,b=0;b<g._sounds.length;b++)if(u===g._sounds[b]._id)return g._sounds[b];return null},_inactiveSound:function(){var u=this;u._drain();for(var g=0;g<u._sounds.length;g++)if(u._sounds[g]._ended)return u._sounds[g].reset();return new r(u)},_drain:function(){var u=this,g=u._pool,b=0,y=0;if(!(u._sounds.length<g)){for(y=0;y<u._sounds.length;y++)u._sounds[y]._ended&&b++;for(y=u._sounds.length-1;y>=0;y--){if(b<=g)return;u._sounds[y]._ended&&(u._webAudio&&u._sounds[y]._node&&u._sounds[y]._node.disconnect(0),u._sounds.splice(y,1),b--)}}},_getSoundIds:function(u){var g=this;if(typeof u>"u"){for(var b=[],y=0;y<g._sounds.length;y++)b.push(g._sounds[y]._id);return b}else return[u]},_refreshBuffer:function(u){var g=this;return u._node.bufferSource=t.ctx.createBufferSource(),u._node.bufferSource.buffer=o[g._src],u._panner?u._node.bufferSource.connect(u._panner):u._node.bufferSource.connect(u._node),u._node.bufferSource.loop=u._loop,u._loop&&(u._node.bufferSource.loopStart=u._start||0,u._node.bufferSource.loopEnd=u._stop||0),u._node.bufferSource.playbackRate.setValueAtTime(u._rate,t.ctx.currentTime),g},_cleanBuffer:function(u){var g=this,b=t._navigator&&t._navigator.vendor.indexOf("Apple")>=0;if(t._scratchBuffer&&u.bufferSource&&(u.bufferSource.onended=null,u.bufferSource.disconnect(0),b))try{u.bufferSource.buffer=t._scratchBuffer}catch(y){}return u.bufferSource=null,g},_clearSound:function(u){var g=/MSIE |Trident\//.test(t._navigator&&t._navigator.userAgent);g||(u.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var r=function(u){this._parent=u,this.init()};r.prototype={init:function(){var u=this,g=u._parent;return u._muted=g._muted,u._loop=g._loop,u._volume=g._volume,u._rate=g._rate,u._seek=0,u._paused=!0,u._ended=!0,u._sprite="__default",u._id=++t._counter,g._sounds.push(u),u.create(),u},create:function(){var u=this,g=u._parent,b=t._muted||u._muted||u._parent._muted?0:u._volume;return g._webAudio?(u._node=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),u._node.gain.setValueAtTime(b,t.ctx.currentTime),u._node.paused=!0,u._node.connect(t.masterGain)):t.noAudio||(u._node=t._obtainHtml5Audio(),u._errorFn=u._errorListener.bind(u),u._node.addEventListener("error",u._errorFn,!1),u._loadFn=u._loadListener.bind(u),u._node.addEventListener(t._canPlayEvent,u._loadFn,!1),u._endFn=u._endListener.bind(u),u._node.addEventListener("ended",u._endFn,!1),u._node.src=g._src,u._node.preload=g._preload===!0?"auto":g._preload,u._node.volume=b*t.volume(),u._node.load()),u},reset:function(){var u=this,g=u._parent;return u._muted=g._muted,u._loop=g._loop,u._volume=g._volume,u._rate=g._rate,u._seek=0,u._rateSeek=0,u._paused=!0,u._ended=!0,u._sprite="__default",u._id=++t._counter,u},_errorListener:function(){var u=this;u._parent._emit("loaderror",u._id,u._node.error?u._node.error.code:0),u._node.removeEventListener("error",u._errorFn,!1)},_loadListener:function(){var u=this,g=u._parent;g._duration=Math.ceil(u._node.duration*10)/10,Object.keys(g._sprite).length===0&&(g._sprite={__default:[0,g._duration*1e3]}),g._state!=="loaded"&&(g._state="loaded",g._emit("load"),g._loadQueue()),u._node.removeEventListener(t._canPlayEvent,u._loadFn,!1)},_endListener:function(){var u=this,g=u._parent;g._duration===1/0&&(g._duration=Math.ceil(u._node.duration*10)/10,g._sprite.__default[1]===1/0&&(g._sprite.__default[1]=g._duration*1e3),g._ended(u)),u._node.removeEventListener("ended",u._endFn,!1)}};var o={},a=function(u){var g=u._src;if(o[g]){u._duration=o[g].duration,d(u);return}if(/^data:[^;]+;base64,/.test(g)){for(var b=atob(g.split(",")[1]),y=new Uint8Array(b.length),S=0;S<b.length;++S)y[S]=b.charCodeAt(S);c(y.buffer,u)}else{var v=new XMLHttpRequest;v.open(u._xhr.method,g,!0),v.withCredentials=u._xhr.withCredentials,v.responseType="arraybuffer",u._xhr.headers&&Object.keys(u._xhr.headers).forEach(function(x){v.setRequestHeader(x,u._xhr.headers[x])}),v.onload=function(){var x=(v.status+"")[0];if(x!=="0"&&x!=="2"&&x!=="3"){u._emit("loaderror",null,"Failed loading audio file with status: "+v.status+".");return}c(v.response,u)},v.onerror=function(){u._webAudio&&(u._html5=!0,u._webAudio=!1,u._sounds=[],delete o[g],u.load())},l(v)}},l=function(u){try{u.send()}catch(g){u.onerror()}},c=function(u,g){var b=function(){g._emit("loaderror",null,"Decoding audio data failed.")},y=function(S){S&&g._sounds.length>0?(o[g._src]=S,d(g,S)):b()};typeof Promise<"u"&&t.ctx.decodeAudioData.length===1?t.ctx.decodeAudioData(u).then(y).catch(b):t.ctx.decodeAudioData(u,y,b)},d=function(u,g){g&&!u._duration&&(u._duration=g.duration),Object.keys(u._sprite).length===0&&(u._sprite={__default:[0,u._duration*1e3]}),u._state!=="loaded"&&(u._state="loaded",u._emit("load"),u._loadQueue())},m=function(){if(t.usingWebAudio){try{typeof AudioContext<"u"?t.ctx=new AudioContext:typeof webkitAudioContext<"u"?t.ctx=new webkitAudioContext:t.usingWebAudio=!1}catch(S){t.usingWebAudio=!1}t.ctx||(t.usingWebAudio=!1);var u=/iP(hone|od|ad)/.test(t._navigator&&t._navigator.platform),g=t._navigator&&t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),b=g?parseInt(g[1],10):null;if(u&&b&&b<9){var y=/safari/.test(t._navigator&&t._navigator.userAgent.toLowerCase());t._navigator&&!y&&(t.usingWebAudio=!1)}t.usingWebAudio&&(t.masterGain=typeof t.ctx.createGain>"u"?t.ctx.createGainNode():t.ctx.createGain(),t.masterGain.gain.setValueAtTime(t._muted?0:t._volume,t.ctx.currentTime),t.masterGain.connect(t.ctx.destination)),t._setup()}};i.Howler=t,i.Howl=s,typeof commonjsGlobal<"u"?(commonjsGlobal.HowlerGlobal=e,commonjsGlobal.Howler=t,commonjsGlobal.Howl=s,commonjsGlobal.Sound=r):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=t,window.Howl=s,window.Sound=r)})();/*!
- * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
- *
- * howler.js v2.2.3
- * howlerjs.com
- *
- * (c) 2013-2020, James Simpson of GoldFire Studios
- * goldfirestudios.com
- *
- * MIT License
- */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){var s=this;if(!s.ctx||!s.ctx.listener)return s;for(var r=s._howls.length-1;r>=0;r--)s._howls[r].stereo(t);return s},HowlerGlobal.prototype.pos=function(t,s,r){var o=this;if(!o.ctx||!o.ctx.listener)return o;if(s=typeof s!="number"?o._pos[1]:s,r=typeof r!="number"?o._pos[2]:r,typeof t=="number")o._pos=[t,s,r],typeof o.ctx.listener.positionX<"u"?(o.ctx.listener.positionX.setTargetAtTime(o._pos[0],Howler.ctx.currentTime,.1),o.ctx.listener.positionY.setTargetAtTime(o._pos[1],Howler.ctx.currentTime,.1),o.ctx.listener.positionZ.setTargetAtTime(o._pos[2],Howler.ctx.currentTime,.1)):o.ctx.listener.setPosition(o._pos[0],o._pos[1],o._pos[2]);else return o._pos;return o},HowlerGlobal.prototype.orientation=function(t,s,r,o,a,l){var c=this;if(!c.ctx||!c.ctx.listener)return c;var d=c._orientation;if(s=typeof s!="number"?d[1]:s,r=typeof r!="number"?d[2]:r,o=typeof o!="number"?d[3]:o,a=typeof a!="number"?d[4]:a,l=typeof l!="number"?d[5]:l,typeof t=="number")c._orientation=[t,s,r,o,a,l],typeof c.ctx.listener.forwardX<"u"?(c.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),c.ctx.listener.forwardY.setTargetAtTime(s,Howler.ctx.currentTime,.1),c.ctx.listener.forwardZ.setTargetAtTime(r,Howler.ctx.currentTime,.1),c.ctx.listener.upX.setTargetAtTime(o,Howler.ctx.currentTime,.1),c.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),c.ctx.listener.upZ.setTargetAtTime(l,Howler.ctx.currentTime,.1)):c.ctx.listener.setOrientation(t,s,r,o,a,l);else return d;return c},Howl.prototype.init=function(t){return function(s){var r=this;return r._orientation=s.orientation||[1,0,0],r._stereo=s.stereo||null,r._pos=s.pos||null,r._pannerAttr={coneInnerAngle:typeof s.coneInnerAngle<"u"?s.coneInnerAngle:360,coneOuterAngle:typeof s.coneOuterAngle<"u"?s.coneOuterAngle:360,coneOuterGain:typeof s.coneOuterGain<"u"?s.coneOuterGain:0,distanceModel:typeof s.distanceModel<"u"?s.distanceModel:"inverse",maxDistance:typeof s.maxDistance<"u"?s.maxDistance:1e4,panningModel:typeof s.panningModel<"u"?s.panningModel:"HRTF",refDistance:typeof s.refDistance<"u"?s.refDistance:1,rolloffFactor:typeof s.rolloffFactor<"u"?s.rolloffFactor:1},r._onstereo=s.onstereo?[{fn:s.onstereo}]:[],r._onpos=s.onpos?[{fn:s.onpos}]:[],r._onorientation=s.onorientation?[{fn:s.onorientation}]:[],t.call(this,s)}}(Howl.prototype.init),Howl.prototype.stereo=function(t,s){var r=this;if(!r._webAudio)return r;if(r._state!=="loaded")return r._queue.push({event:"stereo",action:function(){r.stereo(t,s)}}),r;var o=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof s>"u")if(typeof t=="number")r._stereo=t,r._pos=[t,0,0];else return r._stereo;for(var a=r._getSoundIds(s),l=0;l<a.length;l++){var c=r._soundById(a[l]);if(c)if(typeof t=="number")c._stereo=t,c._pos=[t,0,0],c._node&&(c._pannerAttr.panningModel="equalpower",(!c._panner||!c._panner.pan)&&e(c,o),o==="spatial"?typeof c._panner.positionX<"u"?(c._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),c._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),c._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):c._panner.setPosition(t,0,0):c._panner.pan.setValueAtTime(t,Howler.ctx.currentTime)),r._emit("stereo",c._id);else return c._stereo}return r},Howl.prototype.pos=function(t,s,r,o){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"pos",action:function(){a.pos(t,s,r,o)}}),a;if(s=typeof s!="number"?0:s,r=typeof r!="number"?-.5:r,typeof o>"u")if(typeof t=="number")a._pos=[t,s,r];else return a._pos;for(var l=a._getSoundIds(o),c=0;c<l.length;c++){var d=a._soundById(l[c]);if(d)if(typeof t=="number")d._pos=[t,s,r],d._node&&((!d._panner||d._panner.pan)&&e(d,"spatial"),typeof d._panner.positionX<"u"?(d._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),d._panner.positionY.setValueAtTime(s,Howler.ctx.currentTime),d._panner.positionZ.setValueAtTime(r,Howler.ctx.currentTime)):d._panner.setPosition(t,s,r)),a._emit("pos",d._id);else return d._pos}return a},Howl.prototype.orientation=function(t,s,r,o){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"orientation",action:function(){a.orientation(t,s,r,o)}}),a;if(s=typeof s!="number"?a._orientation[1]:s,r=typeof r!="number"?a._orientation[2]:r,typeof o>"u")if(typeof t=="number")a._orientation=[t,s,r];else return a._orientation;for(var l=a._getSoundIds(o),c=0;c<l.length;c++){var d=a._soundById(l[c]);if(d)if(typeof t=="number")d._orientation=[t,s,r],d._node&&(d._panner||(d._pos||(d._pos=a._pos||[0,0,-.5]),e(d,"spatial")),typeof d._panner.orientationX<"u"?(d._panner.orientationX.setValueAtTime(t,Howler.ctx.currentTime),d._panner.orientationY.setValueAtTime(s,Howler.ctx.currentTime),d._panner.orientationZ.setValueAtTime(r,Howler.ctx.currentTime)):d._panner.setOrientation(t,s,r)),a._emit("orientation",d._id);else return d._orientation}return a},Howl.prototype.pannerAttr=function(){var t=this,s=arguments,r,o,a;if(!t._webAudio)return t;if(s.length===0)return t._pannerAttr;if(s.length===1)if(typeof s[0]=="object")r=s[0],typeof o>"u"&&(r.pannerAttr||(r.pannerAttr={coneInnerAngle:r.coneInnerAngle,coneOuterAngle:r.coneOuterAngle,coneOuterGain:r.coneOuterGain,distanceModel:r.distanceModel,maxDistance:r.maxDistance,refDistance:r.refDistance,rolloffFactor:r.rolloffFactor,panningModel:r.panningModel}),t._pannerAttr={coneInnerAngle:typeof r.pannerAttr.coneInnerAngle<"u"?r.pannerAttr.coneInnerAngle:t._coneInnerAngle,coneOuterAngle:typeof r.pannerAttr.coneOuterAngle<"u"?r.pannerAttr.coneOuterAngle:t._coneOuterAngle,coneOuterGain:typeof r.pannerAttr.coneOuterGain<"u"?r.pannerAttr.coneOuterGain:t._coneOuterGain,distanceModel:typeof r.pannerAttr.distanceModel<"u"?r.pannerAttr.distanceModel:t._distanceModel,maxDistance:typeof r.pannerAttr.maxDistance<"u"?r.pannerAttr.maxDistance:t._maxDistance,refDistance:typeof r.pannerAttr.refDistance<"u"?r.pannerAttr.refDistance:t._refDistance,rolloffFactor:typeof r.pannerAttr.rolloffFactor<"u"?r.pannerAttr.rolloffFactor:t._rolloffFactor,panningModel:typeof r.pannerAttr.panningModel<"u"?r.pannerAttr.panningModel:t._panningModel});else return a=t._soundById(parseInt(s[0],10)),a?a._pannerAttr:t._pannerAttr;else s.length===2&&(r=s[0],o=parseInt(s[1],10));for(var l=t._getSoundIds(o),c=0;c<l.length;c++)if(a=t._soundById(l[c]),a){var d=a._pannerAttr;d={coneInnerAngle:typeof r.coneInnerAngle<"u"?r.coneInnerAngle:d.coneInnerAngle,coneOuterAngle:typeof r.coneOuterAngle<"u"?r.coneOuterAngle:d.coneOuterAngle,coneOuterGain:typeof r.coneOuterGain<"u"?r.coneOuterGain:d.coneOuterGain,distanceModel:typeof r.distanceModel<"u"?r.distanceModel:d.distanceModel,maxDistance:typeof r.maxDistance<"u"?r.maxDistance:d.maxDistance,refDistance:typeof r.refDistance<"u"?r.refDistance:d.refDistance,rolloffFactor:typeof r.rolloffFactor<"u"?r.rolloffFactor:d.rolloffFactor,panningModel:typeof r.panningModel<"u"?r.panningModel:d.panningModel};var m=a._panner;m?(m.coneInnerAngle=d.coneInnerAngle,m.coneOuterAngle=d.coneOuterAngle,m.coneOuterGain=d.coneOuterGain,m.distanceModel=d.distanceModel,m.maxDistance=d.maxDistance,m.refDistance=d.refDistance,m.rolloffFactor=d.rolloffFactor,m.panningModel=d.panningModel):(a._pos||(a._pos=t._pos||[0,0,-.5]),e(a,"spatial"))}return t},Sound.prototype.init=function(t){return function(){var s=this,r=s._parent;s._orientation=r._orientation,s._stereo=r._stereo,s._pos=r._pos,s._pannerAttr=r._pannerAttr,t.call(this),s._stereo?r.stereo(s._stereo):s._pos&&r.pos(s._pos[0],s._pos[1],s._pos[2],s._id)}}(Sound.prototype.init),Sound.prototype.reset=function(t){return function(){var s=this,r=s._parent;return s._orientation=r._orientation,s._stereo=r._stereo,s._pos=r._pos,s._pannerAttr=r._pannerAttr,s._stereo?r.stereo(s._stereo):s._pos?r.pos(s._pos[0],s._pos[1],s._pos[2],s._id):s._panner&&(s._panner.disconnect(0),s._panner=void 0,r._refreshBuffer(s)),t.call(this)}}(Sound.prototype.reset);var e=function(t,s){s=s||"spatial",s==="spatial"?(t._panner=Howler.ctx.createPanner(),t._panner.coneInnerAngle=t._pannerAttr.coneInnerAngle,t._panner.coneOuterAngle=t._pannerAttr.coneOuterAngle,t._panner.coneOuterGain=t._pannerAttr.coneOuterGain,t._panner.distanceModel=t._pannerAttr.distanceModel,t._panner.maxDistance=t._pannerAttr.maxDistance,t._panner.refDistance=t._pannerAttr.refDistance,t._panner.rolloffFactor=t._pannerAttr.rolloffFactor,t._panner.panningModel=t._pannerAttr.panningModel,typeof t._panner.positionX<"u"?(t._panner.positionX.setValueAtTime(t._pos[0],Howler.ctx.currentTime),t._panner.positionY.setValueAtTime(t._pos[1],Howler.ctx.currentTime),t._panner.positionZ.setValueAtTime(t._pos[2],Howler.ctx.currentTime)):t._panner.setPosition(t._pos[0],t._pos[1],t._pos[2]),typeof t._panner.orientationX<"u"?(t._panner.orientationX.setValueAtTime(t._orientation[0],Howler.ctx.currentTime),t._panner.orientationY.setValueAtTime(t._orientation[1],Howler.ctx.currentTime),t._panner.orientationZ.setValueAtTime(t._orientation[2],Howler.ctx.currentTime)):t._panner.setOrientation(t._orientation[0],t._orientation[1],t._orientation[2])):(t._panner=Howler.ctx.createStereoPanner(),t._panner.pan.setValueAtTime(t._stereo,Howler.ctx.currentTime)),t._panner.connect(t._node),t._paused||t._parent.pause(t._id,!0).play(t._id,!0)}})()})(howler);const tick="data:audio/mpeg;base64,UklGRtRSAABXQVZFZm10IBAAAAABAAIARKwAABCxAgAEABAAZGF0YbBSAAAZABkADAAMAAUABgAXABUANgA3AN3/3v/n/+T/AwAIACIAHQAhACQAHwAdABMAEwBZAF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IKAtcB2AGXAZcBTQFNAfwA/QCpAKYASgBNAPX/8/+W/5f/P/8//+z+6/6b/pz+W/5b/hn+GP7s/e79xP3C/az9rf2h/aD9ov2j/bH9sf3P/c/99f31/S7+LP5m/mn+tP6x/vz+AP9X/1P/qv+s/wcABgBdAF0AtwC6AAkBBQFWAVkBnAGaAdcB1wEJAgsCMQIuAkYCSQJXAlUCVAJWAkYCQwIuAjACAgICAtYB0wGRAZcBVQFOAf8ABAG0ALIAVwBXAAUABgCn/6b/V/9X///+//62/rj+cP5t/jX+N/4C/gD+3P3e/cL9wf2z/bT9tv20/b/9v/3a/d39//37/TD+M/5q/mj+r/6x/vn+9v5L/1D/n/+Y//f//f9KAEcApQCmAPAA8ABBAUEBgwGCAb8BwAHyAfEBGAIYAjMCNAJCAkECQgJDAjoCOAIdAiACAAL8AcsBzwGVAZMBUwFSAQcBCgG7ALgAZgBoABIAEQC7/7v/aP9n/xf/Gv/N/sn+hv6K/k/+S/4X/hr+9P3z/dj92P3F/cb9yf3H/c39zv3m/eX9B/4I/jX+Nv5s/mv+rv6u/vP+8/5D/0L/k/+V/+f/5f88AD4AjQCLAOAA4gAnASUBbgFvAaYBpgHdAdsB/wECAiACHQIsAjACNAIvAigCLAIVAhIC8wH2AccBxQGVAZUBUQFRAQ4BDwHCAMIAcgBwAB8AIgDN/8r/ef98/yz/K//k/uL+nP6f/mb+Yv4u/jP+Cv4H/u397f3a/dr91/3X/d793v3w/fL9E/4P/jn+Pf5w/m3+q/6s/vD+8f46/zj/if+L/9r/2f8rACoAfQB+AMgAyQAVARMBVQFXAZEBkAHEAcQB7AHtAQkCCAIbAhwCIgIgAhgCGwIKAgcC6gHsAcEBwQGSAZABUgFUARMBEgHJAMgAegB+ADAAKwDY/9z/kP+N/z3/P//5/vj+sv60/n3+ef5C/kj+I/4d/v/9A/7t/ez96f3o/ev97f3",tockAndTick={tick,tock},browserInfo$3=browser();let tipsTimer=null;const metronomeData=reactive({disable:!0,initPlayerState:!1,lineShow:!1,isClick:!1,metro:null,metroList:[],activeList:[],metroMeasure:[],activeIndex:null,activeMetro:{},cursorMode:1,cursorTips:""});watch(()=>metronomeData.cursorMode,()=>{const i=document.querySelector("#cursorImg-0");if(i){switch(metronomeData.cursorMode){case 1:i.classList.remove("lineHide"),i.style.opacity="inherit",metronomeData.cursorTips="您已切换到指针跟随音符播放",i.style.opacity="inherit";break;case 2:i.classList.add("lineHide"),i.style.opacity="inherit",metronomeData.cursorTips="您已切换到指针跟随节拍播放";break;case 3:i.style.opacity="0",metronomeData.cursorTips="您已关闭指针显示";break}hideCursorTip()}});const toggleLine=()=>{if(!metronomeData.lineShow)return;const i=document.querySelector("#cursorImg-0");i&&(state$1.times[state$1.activeNoteIndex].multipleRestMeasures?i.classList.remove("lineHide"):i.classList.add("lineHide"))};watch(()=>metronomeData.lineShow,()=>{const i=document.querySelector("#cursorImg-0");i&&(metronomeData.lineShow?i.classList.add("lineHide"):i.classList.remove("lineHide"))});class Metronome{constructor(e){ct(this,"playType","tick");ct(this,"source",null);ct(this,"source1",null);ct(this,"source2",null);ct(this,"sound",e=>{state$1.sectionStatus||(e=setCurrentTime(e));let t=-1,s=-1;for(let r=0;r<metronomeData.metroList.length;r++){const o=metronomeData.metroList[r];if(e>=o)t=r,s=o;else break}if(t>-1&&metronomeData.activeIndex!==t){metronomeData.activeIndex=t,metronomeData.activeMetro=this.getStep(s),this.playAudio(),metronomeData.isClick=!1;return}toggleLine(),metronomeData.isClick=!1});ct(this,"playAudio",()=>{var e;metronomeData.initPlayerState&&(this.source=((e=metronomeData.activeMetro)==null?void 0:e.index)===0?this.source1:this.source2,this.source.volume(metronomeData.disable||state$1.playState==="paused"?0:.4),this.source.play())});ct(this,"loadAudio1",()=>new howler.Howl({src:tockAndTick.tick}));ct(this,"loadAudio2",()=>new howler.Howl({src:tockAndTick.tock}))}init(e){this.calculation(e),metronomeData.activeList=[]}initPlayer(){this.source1||(this.source1=this.loadAudio1()),this.source2||(this.source2=this.loadAudio2()),metronomeData.initPlayerState=!0}selectPlay(){}getStep(e){for(let t=0;t<metronomeData.metroMeasure.length;t++){const r=metronomeData.metroMeasure[t].find(o=>o.time===e);if(r)return r}return{}}calculation(e){var a,l,c,d,m,u,g,b,y,S,v,x,A,E;const t=[];let s=-1;for(let w=0;w<e.length;w++){const _=e[w],C=((l=(a=_==null?void 0:_.noteElement)==null?void 0:a.sourceMeasure)==null?void 0:l.MeasureNumberXML)||-1,P=(d=(c=_==null?void 0:_.noteElement)==null?void 0:c.sourceMeasure)==null?void 0:d.measureListIndex;if(C>-1&&C!=s){const I={measureNumberXML:C,measureNumberIndex:P,numerator:((g=(u=(m=_==null?void 0:_.noteElement)==null?void 0:m.sourceMeasure)==null?void 0:u.ActiveTimeSignature)==null?void 0:g.numerator)||0,start:_.measures[0].time,end:_.measures[_.measures.length-1].endtime,time:_.measures[_.measures.length-1].endtime-_.measures[0].time,stave_x:((x=(v=(S=(y=(b=_==null?void 0:_.noteElement)==null?void 0:b.sourceMeasure)==null?void 0:y.verticalMeasureList)==null?void 0:S[0])==null?void 0:v.stave)==null?void 0:x.x)||0,end_x:((A=_==null?void 0:_.stave)==null?void 0:A.end_x)||0||0,stepList:[],svgs:[],isRestFlag:_.isRestFlag};if([121].includes(state$1.subjectId)){const R=e.filter(N=>{var G,B;return((B=(G=N==null?void 0:N.noteElement)==null?void 0:G.sourceMeasure)==null?void 0:B.measureListIndex)==P});_.measures=R,I.start=_.measures[0].time,I.end=_.measures[_.measures.length-1].endtime,I.time=_.measures[_.measures.length-1].endtime-_.measures[0].time;try{const N=_.noteElement.sourceMeasure.verticalMeasureList.reduce((B,k)=>(B.push(...k.vfVoices[1].tickables),B),[]),G=[];I.svgs=N.map(B=>{const k=B.getBoundingBox().x;if(!G.includes(k)&&B.duration!=="w")return G.push(k),B._start_x=k,B}).filter(Boolean).sort((B,k)=>B._start_x-k._start_x)}catch(N){console.log(N)}I.stepList=calculateMutilpleMetroStep(_.measures,I)}else I.stepList=calculateMetroStep(_.measures,I);t.push(I),s=C}}let r=[];const o=[];try{for(let w=0;w<t.length;w++){const _=t[w],C=_.time/_.numerator,I=([121].includes(state$1.subjectId)?95:100)/(_.numerator+1);o[w]=[];for(let R=0;R<_.numerator;R++){const N=C*R+_.start;r.push(N);let G="";if(_.stepList[R])G=_.stepList[R]+"px";else{const B=_.stepList[R-1];G=B?B.toString().indexOf("%")>-1?`${B} + ${I}%`:`${B}px + ${I}%`:`${I}%`,_.stepList[R]=G}o[w].push({index:R,time:N,left:(G==null?void 0:G.indexOf("%"))>-1?`calc(${G})`:G,measureNumberXML:_.measureNumberXML,isRestFlag:_.isRestFlag})}}}catch(w){console.log(w)}metronomeData.metroList=r,metronomeData.metroMeasure=o,metronomeData.activeMetro=((E=o[0])==null?void 0:E[0])||{}}}function calculateMetroStep(i,e){var l,c,d,m,u,g,b,y,S,v,x,A,E,w,_,C,P,I,R,N,G,B,k,T,V,Z,W,se,ie,fe,J,K,be,oe,Y,ae,de,le,me,ve,ye,U,$,M,Q;const s=i.reduce((z,F)=>(z+=F._noteLength,z),0)/e.numerator;if(i.length===1){const z=i[0].svgElement;if(z&&!z.isRest()){const F=((u=(m=(d=(c=(l=z==null?void 0:z.attrs)==null?void 0:l.el)==null?void 0:c.parentElement)==null?void 0:d.parentElement)==null?void 0:m.getBoundingClientRect)==null?void 0:u.call(m))||{x:0,right:0};let O=((y=(b=(g=z==null?void 0:z.attrs)==null?void 0:g.el)==null?void 0:b.getBoundingClientRect)==null?void 0:y.call(b))||{x:0},H=Math.abs(F.right-O.x)/e.numerator,ne=[];for(let ee=0;ee<e.numerator;ee++)ne.push(O.x-F.x+ee*H);return ne}try{if(e.measureNumberXML===1&&z&&z.isRest()){const F=((E=(A=(x=(v=(S=z==null?void 0:z.attrs)==null?void 0:S.el)==null?void 0:v.parentElement)==null?void 0:x.parentElement)==null?void 0:A.getBoundingClientRect)==null?void 0:E.call(A))||{x:0,right:0};let O=((C=(_=(w=z==null?void 0:z.attrs)==null?void 0:w.el)==null?void 0:_.getBoundingClientRect)==null?void 0:C.call(_))||{x:0},H=Math.abs(F.right-O.x)/e.numerator,ne=[];for(let ee=-1;ee<e.numerator-1;ee++)ne.push(O.x-F.x+ee*H);return ne}}catch(F){console.log("🚀 ~ error:",F)}return[]}let r=0,o=[],a=[];for(let z=0;z<i.length;z++){const F=i[z];F.index=z;const O=F._noteLength;r+=O;const H=Math.floor(r/s);if(H>=1){r-=s;const ne=((B=(G=(N=(R=(I=(P=F==null?void 0:F.svgElement)==null?void 0:P.attrs)==null?void 0:I.el)==null?void 0:R.parentElement)==null?void 0:N.parentElement)==null?void 0:G.getBoundingClientRect)==null?void 0:B.call(G))||{x:0};if(o.length>0){let he=((W=(Z=(V=(T=(k=o[0])==null?void 0:k.svgElement)==null?void 0:T.attrs)==null?void 0:V.el)==null?void 0:Z.getBoundingClientRect)==null?void 0:W.call(Z))||{x:0},re=he.x-ne.x;if(o[0]._noteLength/s>=1){const ge=((K=(J=(fe=(ie=(se=i[o[0].index+1])==null?void 0:se.svgElement)==null?void 0:ie.attrs)==null?void 0:fe.el)==null?void 0:J.getBoundingClientRect)==null?void 0:K.call(J))||{x:ne.right},xe=Math.abs(he.x-ge.x)/2;re=he.x-ne.x+xe}a.push(re)}else{let re=(((ae=(Y=(oe=(be=F==null?void 0:F.svgElement)==null?void 0:be.attrs)==null?void 0:oe.el)==null?void 0:Y.getBoundingClientRect)==null?void 0:ae.call(Y))||{x:0}).x-ne.x;a.push(re)}o=[];let ee=((ve=(me=(le=(de=F==null?void 0:F.svgElement)==null?void 0:de.attrs)==null?void 0:le.el)==null?void 0:me.getBoundingClientRect)==null?void 0:ve.call(me))||{x:0},te=ee.x-ne.x,ce=0;if(H>1){const he=((Q=(M=($=(U=(ye=i[z+1])==null?void 0:ye.svgElement)==null?void 0:U.attrs)==null?void 0:$.el)==null?void 0:M.getBoundingClientRect)==null?void 0:Q.call(M))||{x:ne.right};ce=Math.abs(ee.x-he.x)/H}for(let he=1;he<H;he++)r-=s,a.push(te+ce*he)}r>Number.EPSILON&&r>0&&o.push(F)}return a=a.reduce((z,F)=>(z.includes(F)?z.push(void 0):z.push(F),z),[]),a}function calculateMutilpleMetroStep(i,e){var l,c,d,m,u,g,b,y,S,v,x,A,E,w,_,C,P,I,R;const t=e.time/e.numerator,s=((b=(g=(u=(m=(d=(c=(l=i[0])==null?void 0:l.svgElement)==null?void 0:c.attrs)==null?void 0:d.el)==null?void 0:m.parentElement)==null?void 0:u.parentElement)==null?void 0:g.getBoundingClientRect)==null?void 0:b.call(g))||{x:0};if(i.length===1){const N=e.svgs[0];let G=((v=(S=(y=N==null?void 0:N.attrs)==null?void 0:y.el)==null?void 0:S.getBoundingClientRect)==null?void 0:v.call(S))||{x:0};return N&&!N.isRest()?[G.x-s.x]:[]}let r=0,o=[],a=[];for(let N=0;N<i.length;N++){const G=i[N];G._index=N;const B=G.endtime-G.time;r+=B;let k=(A=(x=e.svgs[N])==null?void 0:x.attrs)==null?void 0:A.el,T=((E=k==null?void 0:k.getBoundingClientRect)==null?void 0:E.call(k))||{x:0};if(B>t){r-=t;let V=T.x-s.x;o.length>0&&(k=(_=(w=e.svgs[o[0]._index])==null?void 0:w.attrs)==null?void 0:_.el,T=((C=k==null?void 0:k.getBoundingClientRect)==null?void 0:C.call(k))||{x:0},V=T.x-s.x),a.push(V),o=[]}else o.push(G);if(Math.abs(r-t)<.001){let V=T.x-s.x;o.length>0&&(k=(I=(P=e.svgs[o[0]._index])==null?void 0:P.attrs)==null?void 0:I.el,T=((R=k==null?void 0:k.getBoundingClientRect)==null?void 0:R.call(k))||{x:0},V=T.x-s.x),a.push(V),r=0,o=[]}}return a=a.reduce((N,G)=>(N.includes(G)?N.push(void 0):N.push(G),N),[]),a}function setCurrentTime(i){return browserInfo$3.huawei||browserInfo$3.xiaomi?i+=.125:browserInfo$3.android?i+=.11:browserInfo$3.ios&&(i+=.01),i}function hideCursorTip(){tipsTimer?(clearTimeout(tipsTimer),tipsTimer=setTimeout(()=>{metronomeData.cursorTips="",clearTimeout(tipsTimer),tipsTimer=null},2e3)):tipsTimer=setTimeout(()=>{metronomeData.cursorTips="",clearTimeout(tipsTimer),tipsTimer=null},2e3)}var GradualVersion=(i=>(i[i.BASE=0]="BASE",i[i.ENSEMBLE=1]="ENSEMBLE",i))(GradualVersion||{});const scoreMode="_scoreMode_11hmk_1",styles$4={scoreMode};var context={locks:{},zIndex:2e3,enableRipple:!0};reactive(context);const Context=reactive(context),isString=i=>typeof i=="string",isBoolean=i=>typeof i=="boolean",isNumber=i=>typeof i=="number",isPlainObject=i=>Object.prototype.toString.call(i)==="[object Object]",isArray$1=i=>Array.isArray(i),isURL=i=>i?/^(http)|(\.*\/)/.test(i):!1,toNumber=i=>i==null?0:isString(i)?(i=parseFloat(i),i=Number.isNaN(i)?0:i,i):isBoolean(i)?Number(i):i,inBrowser=()=>typeof window<"u";function getViewportSize(){var{innerWidth:i,innerHeight:e}=window;return i>e?{vMin:e,vMax:i}:{vMin:i,vMax:e}}var isRem=i=>isString(i)&&i.endsWith("rem"),isPx=i=>isString(i)&&i.endsWith("px")||isNumber(i),isPercent=i=>isString(i)&&i.endsWith("%"),isVw=i=>isString(i)&&i.endsWith("vw"),isVh=i=>isString(i)&&i.endsWith("vh"),isVMin=i=>isString(i)&&i.endsWith("vmin"),isVMax=i=>isString(i)&&i.endsWith("vmax"),isCalc=i=>isString(i)&&i.startsWith("calc("),isVar=i=>isString(i)&&i.startsWith("var("),toPxNum=i=>{if(isNumber(i))return i;if(isPx(i))return+i.replace("px","");if(isVw(i))return+i.replace("vw","")*window.innerWidth/100;if(isVh(i))return+i.replace("vh","")*window.innerHeight/100;if(isRem(i)){var e=+i.replace("rem",""),t=window.getComputedStyle(document.documentElement).fontSize;return e*parseFloat(t)}return isVMin(i)?getViewportSize().vMin:isVMax(i)?getViewportSize().vMax:isString(i)?toNumber(i):0},toSizeUnit=i=>{if(i!=null)return isPercent(i)||isVw(i)||isVh(i)||isRem(i)||isCalc(i)||isVar(i)||isVMin(i)||isVMax(i)?i:toPxNum(i)+"px"},multiplySizeUnit=function(i,e){if(e===void 0&&(e=1),i!=null){var t=toSizeUnit(i),s=t.match(/(vh|%|rem|px|vw)$/)[0];return""+parseFloat(t)*e+s}};function useMounted(i){let e=!1;onMounted(()=>{i(),nextTick(()=>{e=!0})}),onActivated(()=>{e&&i()})}function useEventListener(i,e,t,s={}){if(!inBrowser())return;const{passive:r=!1,capture:o=!1}=s;let a=!1,l=!1;const c=g=>{if(a||l)return;const b=unref(g);b&&(b.addEventListener(e,t,{passive:r,capture:o}),a=!0)},d=g=>{if(!a||l)return;const b=unref(g);b&&(b.removeEventListener(e,t,{capture:o}),a=!1)};let m;isRef(i)&&(m=watch(()=>i.value,(g,b)=>{d(b),c(g)}));const u=()=>{m==null||m(),d(i),l=!0};return useMounted(()=>{c(i)}),onBeforeUnmount(()=>{d(i)}),onDeactivated(()=>{d(i)}),u}globalThis&&globalThis.__rest;function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=t[s])}return i},_extends$2.apply(this,arguments)}function pickProps(i,e){return Array.isArray(e)?e.reduce((t,s)=>(t[s]=i[s],t),{}):i[e]}function mount(i){var e=createApp(i),t=document.createElement("div");return document.body.appendChild(t),{instance:e.mount(t),unmount(){e.unmount(),document.body.removeChild(t)}}}function mountInstance(i,e,t){e===void 0&&(e={}),t===void 0&&(t={});var s={setup(){return()=>h(i,_extends$2({},e,t))}},{unmount:r}=mount(s);return{unmountInstance:r}}function useRouteListener(i){inBrowser()&&(useEventListener(window,"hashchange",i),useEventListener(window,"popstate",i))}function useTeleport(){var i=ref(!1);return onActivated(()=>{i.value=!1}),onDeactivated(()=>{i.value=!0}),{disabled:i}}function createNamespace(i){var e="var",t=e+"-"+i,s=o=>o?o[0]==="$"?o.replace("$",e):o.startsWith("--")?""+t+o:t+"__"+o:t,r=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return a.map(c=>{if(isArray$1(c)){var[d,m,u=null]=c;return d?m:u}return c})};return{n:s,classes:r}}function call(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),s=1;s<e;s++)t[s-1]=arguments[s];if(isArray$1(i))return i.map(r=>r(...t));if(i)return i(...t)}function defineListenerProp(i){return{type:[Function,Array],default:i}}function resolveLock(){var i=Object.keys(Context.locks).length;i<=0?document.body.classList.remove("var--lock"):document.body.classList.add("var--lock")}function addLock(i){Context.locks[i]=1,resolveLock()}function releaseLock(i){delete Context.locks[i],resolveLock()}function useLock(i,e){var{uid:t}=getCurrentInstance();e&&watch(e,s=>{s===!1?releaseLock(t):s===!0&&i()===!0&&addLock(t)}),watch(i,s=>{e&&e()===!1||(s===!0?addLock(t):releaseLock(t))}),onBeforeMount(()=>{e&&e()===!1||i()===!0&&addLock(t)}),onUnmounted(()=>{e&&e()===!1||i()===!0&&releaseLock(t)}),onActivated(()=>{e&&e()===!1||i()===!0&&addLock(t)}),onDeactivated(()=>{e&&e()===!1||i()===!0&&releaseLock(t)})}function useZIndex(i,e){var t=ref(Context.zIndex);return watch(i,s=>{s&&(Context.zIndex+=e,t.value=Context.zIndex)},{immediate:!0}),{zIndex:t}}var props$3={name:{type:String},size:{type:[Number,String]},color:{type:String},namespace:{type:String,default:"var-icon"},transition:{type:[Number,String],default:0},animationClass:{type:String},onClick:defineListenerProp()};function asyncGeneratorStep(i,e,t,s,r,o,a){try{var l=i[o](a),c=l.value}catch(d){t(d);return}l.done?e(c):Promise.resolve(c).then(s,r)}function _asyncToGenerator(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var o=i.apply(e,t);function a(c){asyncGeneratorStep(o,s,r,a,l,"next",c)}function l(c){asyncGeneratorStep(o,s,r,a,l,"throw",c)}a(void 0)})}}var{n:n$3,classes:classes$2}=createNamespace("icon");function __render__$3(i,e){return openBlock(),createBlock(resolveDynamicComponent(i.isURL(i.name)?"img":"i"),{class:normalizeClass(i.classes(i.n(),[i.namespace!==i.n(),i.namespace],i.namespace+"--set",[i.isURL(i.name),i.n("image"),i.namespace+"-"+i.nextName],[i.animateInProgress,i.animationClass==null?i.n("--shrinking"):i.animationClass])),style:normalizeStyle({color:i.color,"transition-duration":i.toNumber(i.transition)+"ms",width:i.isURL(i.name)?i.toSizeUnit(i.size):null,height:i.isURL(i.name)?i.toSizeUnit(i.size):null,fontSize:i.toSizeUnit(i.size)}),src:i.isURL(i.name)?i.nextName:null,onClick:i.onClick},null,8,["class","style","src","onClick"])}var __sfc__$3=defineComponent({name:"VarIcon",props:props$3,setup(i){var e=ref(""),t=ref(!1),s=function(){var r=_asyncToGenerator(function*(o,a){var{transition:l}=i;if(a==null||toNumber(l)===0){e.value=o;return}t.value=!0,yield nextTick(),setTimeout(()=>{a!=null&&(e.value=o),t.value=!1},toNumber(l))});return function(a,l){return r.apply(this,arguments)}}();return watch(()=>i.name,s,{immediate:!0}),{n:n$3,classes:classes$2,nextName:e,animateInProgress:t,isURL,toNumber,toSizeUnit}}});__sfc__$3.render=__render__$3;const Icon=__sfc__$3;Icon.install=function(i){i.component(Icon.name,Icon)};function typeValidator$1(i){return["circle","wave","cube","rect","disappear"].includes(i)}function sizeValidator(i){return["normal","mini","small","large"].includes(i)}var props$2={type:{type:String,default:"circle",validator:typeValidator$1},radius:{type:[String,Number]},size:{type:String,default:"normal",validator:sizeValidator},color:{type:String},description:{type:String},loading:{type:Boolean,default:!1}},{n:n$2,classes:classes$1}=createNamespace("loading"),_withScopeId=i=>(pushScopeId(""),i=i(),popScopeId(),i),_hoisted_1=_withScopeId(()=>createBaseVNode("svg",{viewBox:"25 25 50 50"},[createBaseVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none"})],-1)),_hoisted_2=[_hoisted_1];function __render__$2(i,e){return openBlock(),createElementBlock("div",{class:normalizeClass(i.n())},[i.$slots.default?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(i.classes(i.n("content"),[i.loading,i.n("content--active")]))},[renderSlot(i.$slots,"default"),i.loading?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(i.n("content-mask"))},null,2)):createCommentVNode("v-if",!0)],2)):createCommentVNode("v-if",!0),i.isShow?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(i.classes(i.n("$--box"),i.n("body"),[i.$slots.default,i.n("inside")]))},[i.type==="circle"?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(i.n("circle"))},[createBaseVNode("span",{class:normalizeClass(i.classes(i.n("circle-block"),i.n("circle-block--"+i.size))),style:normalizeStyle({width:i.multiplySizeUnit(i.radius,2),height:i.multiplySizeUnit(i.radius,2),color:i.color})},_hoisted_2,6)],2)):createCommentVNode("v-if",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(i.loadingTypeDict,(t,s)=>(openBlock(),createElementBlock(Fragment,{key:s},[i.type===s?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(i.classes(i.n(s),i.n(s+"--"+i.size)))},[(openBlock(!0),createElementBlock(Fragment,null,renderList(t,r=>(openBlock(),createElementBlock("div",{key:r+s,style:normalizeStyle({backgroundColor:i.color}),class:normalizeClass(i.classes(i.n(s+"-item"),i.n(s+"-item--"+i.size)))},null,6))),128))],2)):createCommentVNode("v-if",!0)],64))),128)),i.$slots.description||i.description?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(i.classes(i.n("description"),i.n("description--"+i.size))),style:normalizeStyle({color:i.color})},[renderSlot(i.$slots,"description",{},()=>[createTextVNode(toDisplayString(i.description),1)])],6)):createCommentVNode("v-if",!0)],2)):createCommentVNode("v-if",!0)],2)}var __sfc__$2=defineComponent({name:"VarLoading",props:props$2,setup(i,e){var{slots:t}=e,s={wave:5,cube:4,rect:8,disappear:3},r=computed(()=>call(t.default)?i.loading:!0);return{n:n$2,classes:classes$1,multiplySizeUnit,loadingTypeDict:s,isShow:r}}});__sfc__$2.render=__render__$2;const Loading=__sfc__$2;Loading.install=function(i){i.component(Loading.name,Loading)};function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=t[s])}return i},_extends$1.apply(this,arguments)}function positionValidator(i){var e=["top","center","bottom"];return e.includes(i)}function typeValidator(i){return SNACKBAR_TYPE.includes(i)}var props$1={type:{type:String,validator:typeValidator},position:{type:String,default:"top",validator:positionValidator},content:{type:String},contentClass:{type:String},duration:{type:Number,default:3e3},vertical:{type:Boolean,default:!1},loadingType:pickProps(props$2,"type"),loadingSize:pickProps(props$2,"size"),loadingRadius:pickProps(props$2,"radius"),loadingColor:_extends$1({},pickProps(props$2,"color"),{default:"currentColor"}),lockScroll:{type:Boolean,default:!1},show:{type:Boolean,default:!1},teleport:{type:String,default:"body"},forbidClick:{type:Boolean,default:!1},onOpen:defineListenerProp(),onOpened:defineListenerProp(),onClose:defineListenerProp(),onClosed:defineListenerProp(),"onUpdate:show":defineListenerProp(),_update:{type:String}},{n:n$1,classes}=createNamespace("snackbar"),ICON_TYPE_DICT={success:"checkbox-marked-circle",warning:"warning",info:"information",error:"error",loading:""};function __render__$1(i,e){var t=resolveComponent("var-icon"),s=resolveComponent("var-loading");return withDirectives((openBlock(),createElementBlock("div",{class:normalizeClass(i.n()),style:normalizeStyle({pointerEvents:i.isForbidClick?"auto":"none",zIndex:i.zIndex})},[createBaseVNode("div",{class:normalizeClass(i.classes(i.n("wrapper"),i.n("wrapper-"+i.position),i.n("$-elevation--4"),[i.vertical,i.n("vertical")],[i.type&&i.SNACKBAR_TYPE.includes(i.type),i.n("wrapper-"+i.type)])),style:normalizeStyle({zIndex:i.zIndex})},[createBaseVNode("div",{class:normalizeClass([i.n("content"),i.contentClass])},[renderSlot(i.$slots,"default",{},()=>[createTextVNode(toDisplayString(i.content),1)])],2),createBaseVNode("div",{class:normalizeClass(i.n("action"))},[i.iconName?(openBlock(),createBlock(t,{key:0,name:i.iconName},null,8,["name"])):createCommentVNode("v-if",!0),i.type==="loading"?(openBlock(),createBlock(s,{key:1,type:i.loadingType,size:i.loadingSize,color:i.loadingColor,radius:i.loadingRadius},null,8,["type","size","color","radius"])):createCommentVNode("v-if",!0),renderSlot(i.$slots,"action")],2)],6)],6)),[[vShow,i.show]])}var __sfc__$1=defineComponent({name:"VarSnackbarCore",components:{VarLoading:Loading,VarIcon:Icon},props:props$1,setup(i){var e=ref(null),{zIndex:t}=useZIndex(()=>i.show,1);useLock(()=>i.show,()=>i.lockScroll);var s=computed(()=>i.type==="loading"||i.forbidClick),r=computed(()=>i.type?ICON_TYPE_DICT[i.type]:""),o=()=>{e.value=setTimeout(()=>{i.type!=="loading"&&call(i["onUpdate:show"],!1)},i.duration)};return watch(()=>i.show,a=>{a?(call(i.onOpen),o()):a===!1&&(clearTimeout(e.value),call(i.onClose))}),watch(()=>i._update,()=>{clearTimeout(e.value),o()}),useMounted(()=>{i.show&&(call(i.onOpen),o())}),{SNACKBAR_TYPE,n:n$1,classes,zIndex:t,iconName:r,isForbidClick:s}}});__sfc__$1.render=__render__$1;const VarSnackbarCore=__sfc__$1;var{n}=createNamespace("snackbar");function __render__(i,e){var t=resolveComponent("var-snackbar-core");return openBlock(),createBlock(Teleport,{to:i.teleport,disabled:i.disabled},[createVNode(Transition,{name:i.n()+"-fade",onAfterEnter:i.onOpened,onAfterLeave:i.onClosed},{default:withCtx(()=>[createVNode(t,mergeProps(i.$props,{class:i.n("transition")}),{action:withCtx(()=>[renderSlot(i.$slots,"action")]),default:withCtx(()=>[renderSlot(i.$slots,"default",{},()=>[createTextVNode(toDisplayString(i.content),1)])]),_:3},16,["class"])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}var __sfc__=defineComponent({name:"VarSnackbar",components:{VarSnackbarCore},props:props$1,setup(){var{disabled:i}=useTeleport();return{n,disabled:i}}});__sfc__.render=__render__;const VarSnackbar=__sfc__;function _extends(){return _extends=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=t[s])}return i},_extends.apply(this,arguments)}function _isSlot(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!isVNode(i)}var SNACKBAR_TYPE=["loading","success","warning","info","error"],sid=0,isMount=!1,unmount,isAllowMultiple=!1,defaultOptionsValue={type:void 0,content:"",position:"top",duration:3e3,vertical:!1,contentClass:void 0,loadingType:"circle",loadingSize:"normal",lockScroll:!1,teleport:"body",forbidClick:!1,onOpen:()=>{},onOpened:()=>{},onClose:()=>{},onClosed:()=>{}},uniqSnackbarOptions=reactive([]),defaultOptions=defaultOptionsValue,transitionGroupProps={name:"var-snackbar-fade",tag:"div",class:"var-transition-group"},TransitionGroupHost={setup(){return()=>{var i=uniqSnackbarOptions.map(e=>{var{id:t,reactiveSnackOptions:s,_update:r}=e,o=document.querySelector(".var-transition-group");s.forbidClick||s.type==="loading"?o.classList.add("var-pointer-auto"):o.classList.remove("var-pointer-auto"),isAllowMultiple&&(s.position="top");var a=isAllowMultiple?"relative":"absolute",l=_extends({position:a},getTop(s.position));return createVNode(VarSnackbarCore,mergeProps(s,{key:t,style:l,"data-id":t,_update:r,show:s.show,"onUpdate:show":c=>s.show=c}),null)});return createVNode(TransitionGroup,mergeProps(transitionGroupProps,{style:{zIndex:Context.zIndex},onAfterEnter:opened,onAfterLeave:removeUniqOption}),_isSlot(i)?i:{default:()=>[i]})}}},Snackbar=function(i){var e=normalizeOptions(i),t=reactive(_extends({},defaultOptions,e));t.show=!0,isMount||(isMount=!0,unmount=mountInstance(TransitionGroupHost).unmountInstance);var{length:s}=uniqSnackbarOptions,r={id:sid++,reactiveSnackOptions:t};if(s===0||isAllowMultiple)addUniqOption(r);else{var o="update-"+sid;updateUniqOption(t,o)}return{clear(){!isAllowMultiple&&uniqSnackbarOptions.length?uniqSnackbarOptions[0].reactiveSnackOptions.show=!1:t.show=!1}}};SNACKBAR_TYPE.forEach(i=>{Snackbar[i]=e=>(isPlainObject(e)?e.type=i:e={content:e,type:i},Snackbar(e))});Snackbar.install=function(i){i.component(VarSnackbar.name,VarSnackbar)};Snackbar.allowMultiple=function(i){i===void 0&&(i=!1),i!==isAllowMultiple&&(uniqSnackbarOptions.forEach(e=>{e.reactiveSnackOptions.show=!1}),isAllowMultiple=i)};Snackbar.clear=function(){uniqSnackbarOptions.forEach(i=>{i.reactiveSnackOptions.show=!1})};Snackbar.setDefaultOptions=function(i){defaultOptions=i};Snackbar.resetDefaultOptions=function(){defaultOptions=defaultOptionsValue};Snackbar.Component=VarSnackbar;function opened(i){var e=i.getAttribute("data-id"),t=uniqSnackbarOptions.find(s=>s.id===toNumber(e));t&&call(t.reactiveSnackOptions.onOpened)}function removeUniqOption(i){i.parentElement&&i.parentElement.classList.remove("var-pointer-auto");var e=i.getAttribute("data-id"),t=uniqSnackbarOptions.find(r=>r.id===toNumber(e));t&&(t.animationEnd=!0,call(t.reactiveSnackOptions.onClosed));var s=uniqSnackbarOptions.every(r=>r.animationEnd);s&&(call(unmount),uniqSnackbarOptions=reactive([]),isMount=!1)}function addUniqOption(i){uniqSnackbarOptions.push(i)}function normalizeOptions(i){return i===void 0&&(i={}),isString(i)?{content:i}:i}function updateUniqOption(i,e){var[t]=uniqSnackbarOptions;t.reactiveSnackOptions=_extends({},t.reactiveSnackOptions,i),t._update=e}function getTop(i){return i===void 0&&(i="top"),i==="bottom"?{[i]:"5%"}:{top:i==="top"?"5%":"45%"}}VarSnackbar.install=function(i){i.component(VarSnackbar.name,VarSnackbar)};const Snackbar$1=Snackbar,Image1=""+new URL("5-d8bfbf51.png",import.meta.url).href,Image2=""+new URL("4-cfa387c7.png",import.meta.url).href,Image3=""+new URL("3-d02c685a.png",import.meta.url).href,Image4=""+new URL("2-5c4c2ef5.png",import.meta.url).href,Image5=""+new URL("1-a0d5037d.png",import.meta.url).href,clx1=""+new URL("clx5-b3331931.svg",import.meta.url).href,clx2=""+new URL("clx4-7a8a1657.svg",import.meta.url).href,clx3=""+new URL("clx3-82262a8a.svg",import.meta.url).href,clx4=""+new URL("clx2-99f2ced3.svg",import.meta.url).href,clx5=""+new URL("clx1-3d063166.svg",import.meta.url).href,good="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAACQCAMAAABOB0IDAAADAFBMVEUAAAADBBoCBhMBChQACBYABhUABhUACBYACBYDDhgABxUCCRcABxYACBYACBYABxUACBYACBYACBcABxbc4ODk5uUABxYACBbT2drKzc4ABxYACBXm6Ofo6ejR1tbP0tTn6OiiqKvN09SIkpcjOUW6wsWLmp/j5eUVIjDQ1dZ9h424vLzj5eUHHCm/x8lodn5NW2Q7TVctQEtTZm9FWGJjbnY7TVeaqqyJkJZugIYAGino6ej/nHUAGiUABxD/mXT/08b/WXMADhcAEx0AR2wBdJX/lnIBHir/jG4BFyEAAgb/oHf/zsUDT3EBsx3/iWsBJDABLj4AKTcBP13/kG8Ed5j/k3EtkqsBrBn/pXoBNEP/fmj/Z2ALe5v/q3wAAjshiqUABkX/jXz/cHD/hWgojqgBbZECoxT/eHP/gmwBFGoBaIv/tor/gHUAFQAYhaQXjbD/bWIyla7/sYMADlwBY4cBXYQARGb/pIH/hnn/cmQTgJ4BOlYACk8BmA8begD/eGb/qIX/nX3/aG4bZHsCWX3/xbb/uJH/lXgAAC8oRkwGPUv/rosBUXqi2KsMtSkAGXcIb40PKTMHjQZbaXPFy8wRggEJf6EUTlv/vaT/k4P/emqssbIAAiMSaoQlvj8+mK82TVkTdJOxzdRNWGMdfpsyboRIZnQKyi6WpKffaXQVWmxHT1YbPEKh0KcBME4wRDcYujNQoLS3v8H/nY4qYG//i3YCGjxnqbuYTmgaKiadankVmANtTz2GtsMvgpouWGQ6vUvnWXECJIp3SGkkNDJse4C0eGF+jJAGKXQBDzIBvyKmfYSVwMsCKGCxUmuFl5wodovMWmz83dRKd4ueq65nxW5xXk5KRTdTw16hbFUNVyO7ZHvp5+Y0jaT/qaNuhpTOfmqFX05cTkKU1J/1poXxf24UYwF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7KhNRgmV5oJBlEVHb0Q4VMAkPHwQ0wi8xZDkW8zl4pmL7Ysz1b7oVvRudNtk26Ywa2wI33zcXjG0DEGJ6VemoRswGCr4gM6hF7EbPk8y5RPl518wvXewscCFEx1Q7aqU8oRY/RiueYc4FlhQH3ixWZU6XeeY/jl+YKMR6wVhOEtUtKE2iQDk33w1Gq+h2oX3dlASkExmKOnwIRO/Cu75nWOJJE850C2++A2Oq7LgBuCO96wZFTwrK0LyGm+9Rz2kxSHsSKO0RmPMuMKr5Zc+xnKQJZ9JWXmn0sUE8ysIZUcHd950YeGNQUuMt9QLV9xgr1rdSwbi7IwNvFBJKnIBd7S8aryEFbHcH3ri0BxaP/gKdEB7KYrDIcgAAAABJRU5ErkJggg==",scoreIcon={good,bad,perfect,great},leveByScoreMeasureIcons=[{icon:scoreIcon.bad,text:"bad",color:"#EE4C6A"},{icon:scoreIcon.good,text:"good",color:"#FF958B"},{icon:scoreIcon.great,text:"great",color:"#FF8E5A"},{icon:scoreIcon.perfect,text:"perfect",color:"#516AFF"}],icons=[{img:Image1,tips:"你的演奏不太好,再练一练吧~",mome:"敢于尝试",clxImg:clx1,clxtip:"你的演奏不太好,音准和完整性还需加强,再练一练吧~",clxmome:"敢于尝试"},{img:Image2,tips:"你的演奏还不熟练,加紧训练才能有好成绩哦~",mome:"还要加油哦~",clxImg:clx2,clxtip:"你的演奏还不熟练,音准和完整性还需加强,加紧训练才能有好成绩哦~",clxmome:"还要加油哦~"},{img:Image3,tips:"你的演奏还不流畅,科学的练习才能更完美哦~",mome:"突破自我",clxImg:clx3,clxtip:"你的演奏还不流畅,音准和节奏还需加强,科学的练习才能更完美哦~",clxmome:"突破自我"},{img:Image4,tips:"你的演奏还不错,继续加油吧,离完美就差一步啦~",mome:"崭露头角",clxImg:clx4,clxtip:"你的演奏还不错,继续加油吧,加强音准,离完美就差一步啦~",clxmome:"崭露头角"},{img:Image5,tips:"你的演奏完美无缺,继续努力吧~",mome:"你很棒",clxImg:clx5,clxtip:"你的演奏非常不错,音准的把握和节奏稍有瑕疵,完整性把握的很好~",clxmome:"你很棒"}],getLeveByScore=i=>{if(!i&&typeof i!="number")return{};let e=0;return i>20&&i<=40?e=1:i>40&&i<=60?e=2:i>60&&i<=80?e=3:i>80&&(e=4),{...icons[e],leve:e}},getLeveByScoreMeasure=i=>{if(!i&&typeof i!="number")return{};let e=0;return i>=40&&i<70?e=1:i>=70&&i<90?e=2:i>=90&&(e=3),e},audioList="_audioList_1j0z3_1",styles$3={audioList};let timer=null;const midiData=reactive({iframeRef:null,playing:!1,index:0,rate:1}),playNote=()=>{var t,s;if(!midiData.playing)return;const i=state$1.times[midiData.index];if(!i){onEnded();return}midiData.index++;const e=i.endtime-i.time;(s=(t=midiData.iframeRef)==null?void 0:t.contentWindow)==null||s.playNote(i.realKey,e),timer=setTimeout(()=>{playNote()},e/midiData.rate*1e3)},stopPlay=()=>{midiData.playing=!1},hanldeInitMidiData=i=>{midiData.iframeRef=i},handleTogglePlayMidi=i=>{i==="play"?(midiData.playing=!0,playNote(),onPlay()):stopPlay()},hanldeSetMidiPlaybackRate=i=>{midiData.rate=i},getMidiCurrentTime=()=>{let i=midiData.index-1;return i=i<0?0:i,state$1.times[i].time},getMidiDuration=()=>state$1.times[state$1.times.length-1].endtime,setMidiCurrentTime=i=>{clearTimeout(timer),midiData.index=i,playNote()},audioData=reactive({songEle:null,backgroundEle:null,midiRender:!1,progress:0,duration:0}),midiRef=ref(),audioListStart=i=>{var e,t,s,r;if(i==="play"&&state$1.originSpeed!==0&&setAudioPlaybackRate(state$1.speed/state$1.originSpeed),audioData.midiRender){handleTogglePlayMidi(i);return}i==="play"?((e=audioData.songEle)==null||e.play(),(t=audioData.backgroundEle)==null||t.play()):i==="paused"&&((s=audioData.songEle)==null||s.pause(),(r=audioData.backgroundEle)==null||r.pause())},setAudioPlaybackRate=i=>{if(audioData.midiRender){hanldeSetMidiPlaybackRate(i);return}audioData.songEle&&(audioData.songEle.playbackRate=i),audioData.backgroundEle&&(audioData.backgroundEle.playbackRate=i)},getAudioCurrentTime=()=>{var i,e,t;return audioData.midiRender?getMidiCurrentTime():state$1.playSource==="music"?((i=audioData.songEle)==null?void 0:i.currentTime)||audioData.progress:state$1.playSource==="background"?((e=audioData.backgroundEle)==null?void 0:e.currentTime)||audioData.progress:((t=audioData.songEle)==null?void 0:t.currentTime)||audioData.progress},getAudioDuration=()=>{var i,e;return audioData.midiRender?getMidiDuration():((i=audioData.songEle)==null?void 0:i.duration)||((e=audioData.backgroundEle)==null?void 0:e.duration)||audioData.duration},setAudioCurrentTime=(i,e=0)=>{if(audioData.midiRender){setMidiCurrentTime(e);return}audioData.songEle&&(audioData.songEle.currentTime=i),audioData.backgroundEle&&(audioData.backgroundEle.currentTime=i),audioData.progress=i},toggleMutePlayAudio=(i,e)=>{i==="music"?audioData.songEle&&(audioData.songEle.muted=e):i==="background"&&audioData.backgroundEle&&(audioData.backgroundEle.muted=e)},AudioList=defineComponent({name:"audio-list",setup(){const i=()=>{midiRef.value.contentWindow.handleRendered=()=>{audioData.midiRender=!0},hanldeInitMidiData(midiRef.value)};watch(()=>state$1.playSource,()=>{if(state$1.modeType==="evaluating"&&!state$1.setting.enableAccompaniment){console.log("评测模式设置了关闭伴奏,不切换原音伴奏");return}state$1.playSource==="music"?(audioData.songEle&&(audioData.songEle.muted=!1),audioData.backgroundEle&&(audioData.backgroundEle.muted=!0)):(audioData.songEle&&(audioData.songEle.muted=!0),audioData.backgroundEle&&(audioData.backgroundEle.muted=!1))});const e=s=>new Promise(r=>{const o=new Audio(s+"?v="+Date.now());o.load(),o.onloadedmetadata=()=>{r(o)},o.onerror=()=>{r(null)}}),t=s=>{var l,c,d;const r=(s==null?void 0:s.currentTime)||((l=s==null?void 0:s.content)==null?void 0:l.currentTime),o=(s==null?void 0:s.totalDuration)||((c=s==null?void 0:s.content)==null?void 0:c.totalDuration),a=r/1e3;audioData.progress=a,audioData.songEle&&(audioData.songEle.currentTime=a),audioData.backgroundEle&&(audioData.backgroundEle.currentTime=a),audioData.duration=o/1e3,((d=s==null?void 0:s.content)==null?void 0:d.totalDuration)>1e3&&r>=o&&onEnded()};return onMounted(()=>{state$1.playMode!=="MIDI"&&(Promise.all([e(state$1.music),e(state$1.accompany)]).then(([s,r])=>{s&&(audioData.songEle=s),r&&(audioData.backgroundEle=r),audioData.songEle?(audioData.songEle.addEventListener("play",onPlay),audioData.songEle.addEventListener("ended",onEnded),r&&(r.muted=!0)):audioData.backgroundEle&&(audioData.backgroundEle.addEventListener("play",onPlay),audioData.backgroundEle.addEventListener("ended",onEnded))}),api_playProgress(t))}),()=>createVNode("div",{class:styles$3.audioList},[state$1.playMode==="MIDI"&&state$1.speed!=0&&createVNode("iframe",{style:{display:"none"},ref:midiRef,src:"/midi/index.html",onLoad:i},null)])}}),popup="_popup_1838h_1",dots="_dots_1838h_6",dot="_dot_1838h_6",active="_active_1838h_20",one="_one_1838h_23",styles$2={popup,dots,dot,active,one},tickData=reactive({list:[],len:0,tickEnd:!1,beatLengthInMilliseconds:0,state:"",source1:"",source2:"",index:0,show:!1}),handlePlay=(i,e)=>new Promise(t=>{setTimeout(()=>{if(tickData.tickEnd){t(i);return}tickData.index++,e&&e.play(),t(i)},tickData.beatLengthInMilliseconds)}),handleInitTick=(i,e)=>{tickData.state="",tickData.beatLengthInMilliseconds=i,tickData.len=e},handleStartTick=async()=>{tickData.show=!0,tickData.tickEnd=!1,tickData.state!=="ok"&&(tickData.source1=new howler.Howl({src:tockAndTick.tick}),tickData.source2=new howler.Howl({src:tockAndTick.tock}),tickData.state="ok"),tickData.index=0,tickData.beatLengthInMilliseconds=60/state$1.speed*1e3;for(let i=0;i<=tickData.len;i++){if(tickData.tickEnd)return!1;const e=i===0?tickData.source1:i===tickData.len?null:tickData.source2;await handlePlay(i,e)}return tickData.show=!1,!0},Tick=defineComponent({name:"metronome",setup(){const i=()=>{tickData.tickEnd=!0};return()=>createVNode(Popup,{class:styles$2.popup,show:tickData.show,"onUpdate:show":e=>tickData.show=e,closeable:!0,onClickCloseIcon:i},{default:()=>[createVNode("div",{class:styles$2.dots},[Array(tickData.len).fill(0).map((e,t)=>createVNode("div",{class:[styles$2.dot,tickData.index>t&&styles$2.active,tickData.index>t&&t===0&&styles$2.one]},null))])]})}}),browserInfo$2=browser(),evaluatingData=reactive({contentData:{},rendered:!1,earphone:!1,soundEffect:!1,soundEffectFrequency:0,checkStep:0,checkEnd:!1,earphoneMode:!1,soundEffectMode:!1,websocketState:!1,startBegin:!1,backtime:0,evaluatings:{},resultData:{},resulstMode:!1,isComplete:!1,isDisabledPlayMusic:!1}),handleStartEvaluat=()=>{state$1.modeType==="evaluating"?handleCancelEvaluat():handleStopPlay(),state$1.modeType=state$1.modeType==="evaluating"?"practise":"evaluating",state$1.modeType!=="evaluating"&&(evaluatingData.rendered=!1)},check_currentTime=()=>{let i=0;if(state$1.isSelectMeasureMode&&(i=state$1.section[0].time*1e3),getAudioCurrentTime()*1e3-i>=500){sendEvaluatingOffsetTime(500);return}setTimeout(()=>{check_currentTime()},10)},sendEvaluatingOffsetTime=async i=>{if(!evaluatingData.backtime)return;const t=Date.now()-evaluatingData.backtime-i;console.error("真正播放延迟",t,"currentTime:",i),await api_proxyServiceMessage({header:{commond:"audioPlayStart",type:"SOUND_COMPARE"},body:{offsetTime:t<0?0:t,micDelay:0}})},checkUseEarphone=async()=>{var e;const i=await getEarphone();return((e=i==null?void 0:i.content)==null?void 0:e.checkIsWired)||!1},handleEndSoundCheck=()=>{endSoundCheck()},connectWebsocket=async i=>{evaluatingData.contentData=i,evaluatingData.websocketState=!0},handlePerformDetection=async()=>{if(!evaluatingData.checkEnd){if(evaluatingData.checkStep===0){if(evaluatingData.checkStep=5,state$1.setting.soundEffect){evaluatingData.soundEffectMode=!0;return}const i=await api_getDeviceDelay();if(console.log("🚀 ~ delayTime:",i),!i){evaluatingData.soundEffectMode=!0;return}handlePerformDetection();return}if(evaluatingData.checkStep=5){if(evaluatingData.checkStep=10,!await checkUseEarphone()){evaluatingData.earphoneMode=!0;return}handlePerformDetection();return}evaluatingData.checkStep===10&&(evaluatingData.checkEnd=!0)}},addMeasureScore=(i,e=!0)=>{for(let t in evaluatingData.evaluatings)evaluatingData.evaluatings[t].show=!1;evaluatingData.evaluatings[i.measureRenderIndex]={...i,leve:getLeveByScoreMeasure(i.score),show:e}},handleScoreResult=i=>{if(console.log("返回",i),i!=null&&i.content){const{header:e,body:t}=i.content;e.commond==="checking"&&(evaluatingData.soundEffectFrequency=t.frequency);const s=()=>Math.floor(Math.random()*20)+80;(e==null?void 0:e.commond)==="measureScore"&&(console.log("🚀 ~ 评测返回:",i),t.score=s(),addMeasureScore(t)),(e==null?void 0:e.commond)==="overall"&&(console.log("🚀 ~ 评测返回:",i),t.score=s(),t.intonation=s(),t.cadence=s(),t.integrity=s(),state$1.isHideEvaluatReportSaveBtn=!1,evaluatingData.resulstMode=!0,evaluatingData.resultData={...t,...getLeveByScore(t.score)},closeToast())}},handleStartBegin=async i=>{var t;evaluatingData.isComplete=!1,evaluatingData.evaluatings={},evaluatingData.resultData={},evaluatingData.backtime=0,resetPlaybackToStart();const e=await startEvaluating(evaluatingData.contentData);if((e==null?void 0:e.api)!=="startEvaluating"){Snackbar$1.error("请在APP端进行评测"),evaluatingData.startBegin=!1;return}if((t=e==null?void 0:e.content)!=null&&t.reson){showToast(e.content.reson),evaluatingData.startBegin=!1;return}if(evaluatingData.startBegin=!0,evaluatingData.isDisabledPlayMusic){if(state$1.playState=state$1.playState==="paused"?"play":"paused",state$1.playState==="play"&&state$1.needTick&&!await handleStartTick()){state$1.playState="paused",evaluatingData.startBegin=!1;return}onPlay()}await api_startRecording({accompanimentState:state$1.setting.enableAccompaniment?1:0,firstNoteTime:i||0}),state$1.setting.camera&&(console.log("开始录制视频"),api_startCapture())},playMusic=async()=>{if(!await togglePlay("play")){evaluatingData.startBegin=!1,handleCancelEvaluat();return}check_currentTime(),state$1.setting.camera&&(console.log("开始录制视频"),api_startCapture())},recordStartTimePoint=async i=>{var t;if(console.error("开始录音"),!evaluatingData.startBegin)return;let e=((t=i==null?void 0:i.content)==null?void 0:t.inteveral)||0;browserInfo$2.ios&&(e*=1e3),evaluatingData.backtime=e||Date.now(),console.log("🚀 ~ 开始时间点:",evaluatingData.backtime,"已经录的时间:",Date.now()-e,"记录时间点:",Date.now()),!evaluatingData.isDisabledPlayMusic&&playMusic()},handleEndEvaluat=(i=!1)=>{!evaluatingData.startBegin||state$1.modeType!=="evaluating"||(evaluatingData.startBegin=!1,api_stopRecording(),setTimeout(()=>{endEvaluating({musicScoreId:state$1.examSongId})},500),showLoadingToast({message:"评分中",duration:0,overlay:!0,overlayClass:styles$4.scoreMode}),evaluatingData.isComplete=i,state$1.setting.camera&&(console.log("结束录制视频"),api_endCapture()))},handleEndBegin=()=>{handleEndEvaluat(),handleStopPlay()},handleCancelEvaluat=()=>{evaluatingData.evaluatings={},evaluatingData.startBegin=!1,closeToast(),api_proxyServiceMessage({header:{commond:"recordCancel",type:"SOUND_COMPARE",status:200}}),cancelEvaluating(),handleStopPlay()},handleViewReport=(i,e)=>{var r;const t=((r=evaluatingData.resultData)==null?void 0:r[i])||"";let s="";switch(e){case"gym":s=location.origin+location.pathname+"#/report/"+t;break;case"orchestra":s=location.origin+location.pathname+"report-share.html?id="+t;break;case"instrument":s=location.origin+location.pathname+"#/evaluat-report?id="+t;break;default:s=location.origin+location.pathname+"report-share.html?id="+t;break}api_openWebView({url:s,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0,c_orientation:0})},handleComplexButton=i=>{console.log("监听是否隐藏保存按钮",i),i!=null&&i.content&&(i.content,state$1.isHideEvaluatReportSaveBtn=!0)},Evaluating=defineComponent({name:"evaluating",setup(){const i=usePageVisibility(),e=reactive({finger:!1,play_mode:"",enableAccompaniment:!0}),t=()=>{e.finger=state$1.setting.displayFingering,state$1.setting.displayFingering=!1,e.play_mode=state$1.playSource,e.enableAccompaniment=state$1.setting.enableAccompaniment,e.enableAccompaniment||(console.log("关闭伴奏"),toggleMutePlayAudio(e.play_mode==="music"?"music":"background",!0))},s=()=>{state$1.setting.displayFingering=e.finger,state$1.playSource=e.play_mode,e.enableAccompaniment||toggleMutePlayAudio(e.play_mode==="music"?"music":"background",!1)};return watch(i,r=>{r=="hidden"&&evaluatingData.startBegin&&handleEndBegin()}),onMounted(()=>{resetPlaybackToStart(),t(),evaluatingData.resultData={},evaluatingData.evaluatings={},evaluatingData.soundEffectFrequency=0,evaluatingData.checkStep=0,evaluatingData.rendered=!0,sendResult(handleScoreResult),hideComplexButton(handleComplexButton,!0),api_recordStartTime(recordStartTimePoint),state$1.isSelectMeasureMode||clearSelection(),console.log("加载评测模块成功")}),onUnmounted(()=>{evaluatingData.checkEnd=!1,evaluatingData.rendered=!1,resetPlaybackToStart(),removeResult(handleScoreResult),hideComplexButton(()=>{},!1),api_remove_recordStartTime(recordStartTimePoint),s(),console.log("卸载评测模块成功")}),()=>createVNode("div",null,null)}});function autoCorrelate(i,e){for(var t=i.length,s=0,r=0;r<t;r++){var o=i[r];s+=o*o}if(s=Math.sqrt(s/t),s<.01)return-1;for(var a=0,l=t-1,c=.2,r=0;r<t/2;r++)if(Math.abs(i[r])<c){a=r;break}for(var r=1;r<t/2;r++)if(Math.abs(i[t-r])<c){l=t-r;break}i=i.slice(a,l),t=i.length;for(var d=new Array(t).fill(0),r=0;r<t;r++)for(var m=0;m<t-r;m++)d[r]=d[r]+i[m]*i[m+r];for(var u=0;d[u]>d[u+1];)u++;for(var g=-1,b=-1,r=u;r<t;r++)d[r]>g&&(g=d[r],b=r);var y=b,S=d[y-1],v=d[y],x=d[y+1];let A=(S+x-2*v)/2,E=(x-S)/2;return A&&(y=y-E/(2*A)),e/y}const audioRecorder={audioContext:null,mediaRecorder:null,recordeState:!1,progress:i=>{},init(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)},toggleRecord(i){return new Promise((e,t)=>{i?navigator.mediaDevices.getUserMedia({audio:!0}).then(s=>{audioRecorder.mediaRecorder=s.getAudioTracks()[0],audioRecorder.recordeState=!0;const r=this.audioContext.createMediaStreamSource(s),o=this.audioContext.createAnalyser();o.fftSize=2048,r.connect(o);var a=new Float32Array(o.fftSize);const l=this.audioContext.sampleRate;function c(){if(!audioRecorder.recordeState)return;o.getFloatTimeDomainData(a);const d=autoCorrelate(a,l);audioRecorder.progress(d),setTimeout(()=>{c()},10)}c(),e(!0)}).catch(s=>{e(!1),console.error("Error accessing media devices:",s)}):audioRecorder.mediaRecorder.stop()})},checkSupport(){return new Promise((i,e)=>{if(navigator.mediaDevices.getUserMedia){const t={audio:!0};navigator.mediaDevices.getUserMedia(t).then(s=>{i(!0),console.log("授权成功!")},()=>{i(!1),console.error("授权失败!")})}else i(!1),console.error("浏览器不支持 getUserMedia")})}},followData=reactive({list:[],index:0,start:!1,rendered:!1,earphone:!1}),toggleFollow=(i=!0)=>{state$1.modeType=state$1.modeType==="follow"?"practise":"follow",i||(followData.start=!1,openToggleRecord(!1))},noteFrequency=ref(0),audioFrequency=ref(0),followTime=ref(0),openToggleRecord=async(i=!0)=>{if(api_cloudToggleFollow(i?"start":"end"),i)followTime.value=Date.now();else{const e=Date.now()-followTime.value;followTime.value!==0&&e>0&&(followTime.value=0)}storeData.isApp||!await(audioRecorder==null?void 0:audioRecorder.toggleRecord(i))&&followData.start&&(followData.earphone=!0,followData.start=!1)},onClear=()=>{state$1.times.forEach(i=>{const e=document.querySelector(`div[data-vf=vf${i.id}]`);e&&e.classList.remove("follow-up","follow-down","follow-error","follow-success");const t=document.getElementById(`vf-${i.id}`);t&&t.classList.remove("follow-up","follow-down")})},handleFollowStart=()=>{onClear(),followData.start=!0,followData.index=0,followData.list=[],resetPlaybackToStart(),openToggleRecord(!0),getNoteIndex()},handleFollowEnd=()=>{followData.start=!1,openToggleRecord(!1),followData.index=0,console.log("结束")},next=()=>{gotoNext(state$1.times[followData.index])},getNoteIndex=()=>{const i=state$1.times[followData.index];return i.frequency<=0?(followData.index=followData.index+1,next(),getNoteIndex()):(noteFrequency.value=i.frequency,{id:i.id,min:i.frequency-(i.frequency-i.prevFrequency)*.5,max:i.frequency+(i.nextFrequency-i.frequency)*.5,duration:i.duration,baseFrequency:i.frequency})};let checking=!1;const onFollowTime=i=>{var t;const e=(t=i==null?void 0:i.content)==null?void 0:t.frequency;followData.start&&e>0&&(audioFrequency.value=e,checked())};let startTime=0;const checked=()=>{if(checking)return;checking=!0;const i=getNoteIndex();if(audioFrequency.value<i.baseFrequency*.5){checking=!1;return}if(audioFrequency.value>=i.min&&audioFrequency.value<=i.max){if(startTime===0)startTime=Date.now();else if((Date.now()-startTime)/1e3>=i.duration*.6){startTime=0,followData.index=followData.index+1,setColor(i,"",!0),next(),checking=!1;return}}setColor(i,audioFrequency.value>i.baseFrequency?"follow-up":"follow-down"),checking=!1},setColor=(i,e,t=!1)=>{const s=document.querySelector(`div[data-vf=vf${i.id}]`);s&&(s.classList.remove("follow-up","follow-down","follow-error","follow-success"),t?s.classList.add("follow-success"):s.classList.add("follow-error",e));const r=document.getElementById(`vf-${i.id}`);r&&(r.classList.remove("follow-up","follow-down"),e&&r.classList.add(e))},FollowPractice=defineComponent({name:"follow",setup(){return onMounted(async()=>{storeData.isApp?api_cloudFollowTime(onFollowTime):await audioRecorder.checkSupport()?(audioRecorder.init(),audioRecorder.progress=e=>{onFollowTime({api:"",content:{frequency:e}})}):followData.earphone=!0,console.log("进入跟练模式")}),onUnmounted(()=>{api_cloudFollowTime(onFollowTime,!1),resetPlaybackToStart(),onClear(),openToggleRecord(!1),console.log("退出跟练模式")}),()=>createVNode("div",null,null)}});var EnumMusicRenderType=(i=>(i.staff="staff",i.firstTone="firstTone",i.fixedTone="fixedTone",i))(EnumMusicRenderType||{});const musicscoresettingKey="musicscoresetting";var IPlatform=(i=>(i.APP="APP",i.PC="PC",i))(IPlatform||{});const state=reactive({platform:"",appName:"",musicRenderType:"staff",musicRendered:!1,detailId:"",xmlUrl:"",subjectId:0,trackId:0,categoriesId:0,categoriesName:"",enableEvaluation:!0,enableNotation:!1,examSongId:"",examSongName:"",coverImg:"",extConfigJson:{},extStyleConfigJson:{},isOpenMetronome:!1,isShowFingering:!1,music:"",accompany:"",midiUrl:"",parentCategoriesId:0,musicSheetCategoriesId:0,playMode:"MP3",speed:0,originSpeed:0,track:"",partIndex:0,needTick:!1,osmd:null,isSpecialBookCategory:!1,playState:"paused",playEnd:!1,playSource:"music",playProgress:0,activeNoteIndex:0,activeMeasureIndex:0,sectionStatus:!1,section:[],sectionBoundingBoxs:[],isOpenPrepare:!1,sectionFirst:null,times:[],modeType:"practise",setting:{soundEffect:!0,eyeProtection:!1,camera:!1,cameraOpacity:70,repeatAutoPlay:!0,displayFingering:!0,displayCursor:!0,frequency:442,evaluationDifficulty:"ADVANCED",saveToAlbum:!0,enableAccompaniment:!0,reactionTimeMs:0},fixtime:0,fingeringInfo:{},scrollContainer:"musicAndSelection",isPercussion:!1,repeatedBeats:0,partListNames:[],gradual:[],gradualVersion:GradualVersion.BASE,gradualTimes:null,multitrack:0,zoom:.8,musicZoom:1,isSelectMeasureMode:!1,isReport:!1,isHideEvaluatReportSaveBtn:!1,isConcert:!1,userChooseEndIndex:0,repeatInfo:[]}),browserInfo$1=browser();let offset_duration=0;const customData=reactive({customNoteRealValue:[],customNoteCurrentTime:!1}),setStep=()=>{if(state.playState!=="play"){console.log("暂停播放");return}let i=Date.now();requestAnimationFrame(()=>{Date.now()-i<16.7?(handlePlaying(),setStep()):setTimeout(()=>{handlePlaying(),setStep()},16.7)})},onPlay=()=>{console.log("开始播放"),state.playEnd=!1,offset_duration=browserInfo$1.xiaomi?.2:.08,setStep()},autoResetPlay=()=>{state.modeType==="practise"&&(skipNotePlay(0,!0),state.setting.repeatAutoPlay&&(scrollViewNote(),setTimeout(()=>{togglePlay("play")},1e3)))},onEnded=()=>{console.log("音频播放结束"),state.playEnd=!0,state.playState="paused",audioListStart(state.playState),handleEndEvaluat(!0),autoResetPlay()},handlePlaying=()=>{var s;const i=getAudioCurrentTime(),e=getAudioDuration();state.playProgress=i/e*100;let t=getNote(i);if(t){if(state.sectionStatus&&state.section.length===2){const r=state.sectionFirst?state.sectionFirst:state.section[0],o=state.section[1];if(Math.abs(o.endtime-i)<offset_duration){if(console.log("选段播放结束"),state.modeType==="evaluating"&&state.isSelectMeasureMode){onEnded();return}if(state.modeType==="practise"&&state.sectionStatus&&!state.setting.repeatAutoPlay){onEnded(),resetPlaybackToStart();return}t=r,setAudioCurrentTime(r.time,r.i)}}gotoNext(t)}(s=metronomeData.metro)==null||s.sound(i)},skipNotePlay=(i,e=!1)=>{var r;const t=state.times[i];let s=t.time;e&&(s=0),t&&(setAudioCurrentTime(s,i),gotoNext(t),(r=metronomeData.metro)==null||r.sound(s))},togglePlay=async i=>(state.playState=i||(state.playState==="paused"?"play":"paused"),state.playState==="play"&&state.sectionStatus&&state.section.length==2&&state.playProgress===0&&resetPlaybackToStart(),state.playState==="play"&&state.needTick&&!await handleStartTick()?(state.playState="paused",!1):(state.playState=="play"&&state.sectionStatus&&state.section.length<2&&clearSelection(),audioListStart(state.playState),!0)),handleStopPlay=()=>{state.playState="paused",audioListStart(state.playState)},resetPlaybackToStart=()=>{if(state.sectionStatus&&state.section.length===2){state.section=formateSelectMearure(state.section);return}skipNotePlay(0,!0)},gotoCustomNote=i=>{try{state.osmd.cursor.reset()}catch(e){}for(let e=0;e<i;e++)state.osmd.cursor.next()},setCursorPosition=(i,e)=>{(state.musicRenderType==="firstTone"||state.musicRenderType==="fixedTone")&&nextTick(()=>{var o,a,l,c;let t=i.bbox;if(!t){const m=(((o=document.getElementById("musicAndSelection"))==null?void 0:o.getBoundingClientRect())||{x:0,y:0}).x||0,u=document.querySelector(`#vf-${(l=(a=i.svgElement)==null?void 0:a.attrs)==null?void 0:l.id}`);if(u){const g=u.querySelector(".vf-numbered-note-head"),b=(c=g==null?void 0:g.getBoundingClientRect)==null?void 0:c.call(g);b&&(i.bbox={left:b.x-m-b.width/4,width:b.width*1.5},t=i.bbox)}}if(!t)return;const s=state.platform==="PC"?29:18,r=(t.width-s)/3;e.cursorElement.style.left=t.left+"px",e.cursorElement.style.transform=`translateX(${r}px)`})},gotoNext=i=>{const e=i.i;if(state.activeNoteIndex===i.i){try{setCursorPosition(i,state.osmd.cursor)}catch(r){console.log(r)}return}const t=state.osmd;let s=state.activeNoteIndex;if(state.activeNoteIndex=e,state.activeMeasureIndex=i.MeasureNumberXML,s&&e-s===1)t.cursor.next();else if(s&&e-s>0)for(;e-s>0;)s++,t.cursor.next();else gotoCustomNote(e);try{setCursorPosition(i,state.osmd.cursor)}catch(r){console.log(r)}scrollViewNote()},getNote=i=>{const e=state.times,t=state.times.length;if(i>e[t-1].endtime+2){onEnded();return}let s=null;for(let r=state.activeNoteIndex;r<t;r++){const o=e[r],a=e[r-1];if(i>=o.time)(!a||o.time!=a.time)&&(s=o);else break}return s},handleResetPlay=()=>{resetPlaybackToStart(),togglePlay("play")},handleSetSpeed=i=>{setStorageSpeed(state.examSongId,i),state.speed=i},clearSelection=()=>{state.sectionStatus=!1,state.section=[],closeToast()},handleChangeSection=()=>{if(state.sectionStatus){togglePlay("paused"),skipNotePlay(0,!0),clearSelection();return}state.sectionStatus=!0,state.sectionStatus&&togglePlay("paused"),showToast({message:"请选择开始小节",duration:0,position:"top",className:"selectionToast"})},formateSelectMearure=i=>{var l,c;if(!i.length)return[];const e=i.sort((d,m)=>d.time-m.time),t=(l=e[0])==null?void 0:l.measureOpenIndex,s=(c=e.last())==null?void 0:c.measureOpenIndex,r=state.times.filter(d=>t===d.measureOpenIndex)||[],o=state.times.filter(d=>s===d.measureOpenIndex)||[];if(!r.length||!o.length)return clearSelection(),[];e[0]=r[0],e[1]=o.last();let a=e[0].i;if(state.isOpenPrepare){const d=e[0].MeasureNumberXML;state.sectionFirst=state.times.find(m=>d-m.MeasureNumberXML===1),a=state.sectionFirst?state.sectionFirst.i:a}return skipNotePlay(a,a===0),e},handleSelection=i=>{!state.sectionStatus||state.section.length>1||(state.section.length!==2&&i&&(state.section.push(i),state.section.length===2&&(state.section=formateSelectMearure(state.section),closeToast())),state.section.length===1&&showToast({message:"请选择结束小节",duration:0,position:"top",className:"selectionToast"}))},setSection=(i,e,t)=>{var y;const s=state.times.filter(S=>S.noteElement.sourceMeasure.MeasureNumberXML==i),r=state.times.filter(S=>S.noteElement.sourceMeasure.MeasureNumberXML==e),o=r[r.length-1].noteId;let a=r.filter(S=>S.noteId===o);const l=verifyCanRepeat(i,e),c=l.canRepeat;let d=e;const m=((y=state.repeatInfo[l.repeatIdx])==null?void 0:y.end)||0;for(;c&&a.length===1&&a[0].MeasureNumberXML<=m;){d=d-1;const S=state.times.filter(x=>x.noteElement.sourceMeasure.MeasureNumberXML==d),v=S[S.length-1].noteId;a=S.filter(x=>x.noteId===v)}const u=c&&l.repeatIdx==state.repeatInfo.length-1?a.length-1:0,g=s[0],b=a[u];g&&b&&(state.isSelectMeasureMode=!0,hanldeDirectSelection([g,b]),t&&handleSetSpeed(t))},hanldeDirectSelection=i=>{!Array.isArray(i)||i.length!==2||(state.sectionStatus=!0,setTimeout(()=>{state.section=formateSelectMearure(i),console.log(333333333,state.section)},500))};let offsetTop=0;const scrollViewNote=()=>{const i=document.getElementById("cursorImg-0"),e=document.getElementById(state.scrollContainer);!i||!e||offsetTop===i.offsetTop||(offsetTop=i.offsetTop,offsetTop>50?e.scrollTo({top:(offsetTop-50)*state.musicZoom,behavior:"smooth"}):e.scrollTo({top:0,behavior:"smooth"}))},isRhythmicExercises=()=>state.examSongName.indexOf("节奏练习")>-1,handleRessetState=()=>{state.modeType==="evaluating"?handleStartEvaluat():state.modeType==="practise"?togglePlay("paused"):state.modeType==="follow"&&toggleFollow(!1)},state$1=state,evaluatCreateMusicPlayer=()=>api_createMusicPlayer({musicSrc:state.accompany||state.music,tuneSrc:"https://oss.dayaedu.com/cloud-coach/1686725501654check_music1_(1).mp3"});class AJAX{static ajax(e,t=9e3){let s;const r=e.indexOf(".mxl")>-1?"text/plain; charset=x-user-defined":"application/xml";if(XMLHttpRequest)s=new XMLHttpRequest;else if(ActiveXObject)s=new ActiveXObject("Microsoft.XMLHTTP");else return Promise.reject(new Error("XMLHttp not supported."));return s.timeout=t,new Promise((o,a)=>{s.onreadystatechange=()=>{s.readyState===XMLHttpRequest.DONE&&(s.status===200||s.status===0&&s.responseText?o(s.responseText):a(new Error("Could not retrieve requested URL "+s.status)))},s.ontimeout=l=>{a(new Error("Server request Timeout"))},s.overrideMimeType(r),s.open("GET",e,!0),s.send()})}}const _Fraction=class{constructor(i=0,e=1,t=0,s=!0){this.numerator=0,this.denominator=1,this.wholeValue=0,this.numerator=i,this.denominator=e,this.wholeValue=t,s&&this.simplify(),this.setRealValue()}static max(i,e){return i.RealValue>e.RealValue?i:e}static Equal(i,e){return i.wholeValue===e.wholeValue&&i.Denominator===e.Denominator&&i.Numerator===e.Numerator}static createFromFraction(i){return new _Fraction(i.numerator,i.denominator,i.wholeValue,!1)}static plus(i,e){const t=i.clone();return t.Add(e),t}static minus(i,e){const t=i.clone();return t.Sub(e),t}static multiply(i,e){return new _Fraction((i.wholeValue*i.denominator+i.numerator)*(e.wholeValue*e.denominator+e.numerator),i.denominator*e.denominator)}static greatestCommonDenominator(i,e){if(i===0)return e;if(e===1)return 1;for(;Math.abs(e)>1e-8;)i>e?i-=e:e-=i;return Math.round(i)}toString(){let i=this.numerator+"/"+this.denominator;return this.wholeValue!==0&&(i=this.wholeValue+" "+i),i}clone(){return new _Fraction(this.numerator,this.denominator,this.wholeValue,!1)}get Numerator(){return this.numerator}set Numerator(i){this.numerator!==i&&(this.numerator=i,this.simplify(),this.setRealValue())}get Denominator(){return this.denominator}set Denominator(i){this.denominator!==i&&(this.denominator=i,this.numerator!==0&&this.simplify(),this.setRealValue())}get WholeValue(){return this.wholeValue}set WholeValue(i){this.wholeValue!==i&&(this.wholeValue=i,this.setRealValue())}GetExpandedNumerator(){return this.wholeValue*this.denominator+this.numerator}calculateNumberOfNeededDots(){let i=1,e=2;const t=this.GetExpandedNumerator();for(;e<t;)i++,e=Math.pow(2,i);return Math.min(3,i-1)}IsNegative(){return this.realValue<0}get RealValue(){return this.realValue}expand(i){this.numerator*=i,this.denominator*=i,this.wholeValue!==0&&(this.numerator+=this.wholeValue*this.denominator,this.wholeValue=0)}Add(i){return this.numerator=(this.wholeValue*this.denominator+this.numerator)*i.denominator+(i.wholeValue*i.denominator+i.numerator)*this.denominator,this.denominator=this.denominator*i.denominator,this.wholeValue=0,this.simplify(),this.setRealValue(),this}Sub(i){return this.numerator=(this.wholeValue*this.denominator+this.numerator)*i.denominator-(i.wholeValue*i.denominator+i.numerator)*this.denominator,this.denominator=this.denominator*i.denominator,this.wholeValue=0,this.simplify(),this.setRealValue(),this}getHalfLength(){return new _Fraction(this.WholeValue,2).Add(new _Fraction(this.Numerator,this.Denominator*2))}Quantize(i){if(this.denominator<=i)return this;const e=new _Fraction(this.numerator+1,this.denominator,this.wholeValue);for(;e.Denominator>i;)e.Numerator++;if(this.numerator>this.denominator){const t=new _Fraction(this.numerator-1,this.denominator,this.wholeValue);for(;t.Denominator>i;)t.Numerator--;if(t.Denominator<e.Denominator)return t}return e}Equals(i){return this.realValue===(i==null?void 0:i.realValue)}CompareTo(i){const e=this.realValue-i.realValue;return e?e<0?-1:1:0}lt(i){return this.realValue<i.realValue}lte(i){return this.realValue<=i.realValue}gt(i){return!this.lte(i)}gte(i){return!this.lt(i)}setRealValue(){this.realValue=this.wholeValue+this.numerator/this.denominator}simplify(){if(this.numerator===0){this.denominator=1;return}const i=_Fraction.greatestCommonDenominator(Math.abs(this.numerator),Math.abs(this.denominator));this.numerator/=i,this.denominator/=i;const e=Math.floor(this.numerator/this.denominator);if(e!==0&&(this.wholeValue+=e,this.numerator-=e*this.denominator,this.numerator===0&&(this.denominator=1)),this.denominator>_Fraction.maximumAllowedNumber){const t=this.denominator/_Fraction.maximumAllowedNumber;this.numerator=Math.round(this.numerator/t),this.denominator=Math.round(this.denominator/t)}if(this.numerator>_Fraction.maximumAllowedNumber){const t=this.numerator/_Fraction.maximumAllowedNumber;this.numerator=Math.round(this.numerator/t),this.denominator=Math.round(this.denominator/t)}}isOnBeat(i){const e=this.distanceFromBeat(i);return Math.abs(e)<_Fraction.FloatInaccuracyTolerance}distanceFromBeat(i){const e=new _Fraction(1,i.Denominator);return this.RealValue%e.RealValue}};let Fraction$1=_Fraction;Fraction$1.maximumAllowedNumber=46340;Fraction$1.FloatInaccuracyTolerance=1e-4;class AbstractExpression{constructor(e){this.placement=e}static isStringInStringList(e,t){for(let s=0,r=e.length;s<r;++s){const o=e[s];if(t===o.toLowerCase().trim())return!0}return!1}get Placement(){return this.placement}static PlacementEnumFromString(e){switch(e.toLowerCase()){case"above":return 0;case"below":return 1;case"aboveorbelow":case"abovebelow":return 5;case"left":return 2;case"right":return 3;case"auto":default:return 4}}}var PlacementEnum=(i=>(i[i.Above=0]="Above",i[i.Below=1]="Below",i[i.Left=2]="Left",i[i.Right=3]="Right",i[i.NotYetDefined=4]="NotYetDefined",i[i.AboveOrBelow=5]="AboveOrBelow",i))(PlacementEnum||{});const _ContinuousDynamicExpression=class extends AbstractExpression{constructor(i,e,t,s,r,o,a=""){super(e),super.parentMeasure=s,this.NumberXml=o,this.dynamicType=i,this.label=a,this.staffNumber=t,this.activeInstantaneousDynamic=r,this.startVolume=1,this.endVolume=1,this.setStartAndEndVolume(),a!==""&&this.setType()}setStartAndEndVolume(){this.activeInstantaneousDynamic&&(this.dynamicType===0&&(this.startVolume=this.activeInstantaneousDynamic.Volume,this.endVolume=this.activeInstantaneousDynamic.Volume*1.2),this.dynamicType===1&&(this.startVolume=this.activeInstantaneousDynamic.Volume,this.endVolume=this.activeInstantaneousDynamic.Volume*.8))}get DynamicType(){return this.dynamicType}set DynamicType(i){this.dynamicType=i}get StartMultiExpression(){return this.startMultiExpression}set StartMultiExpression(i){this.startMultiExpression=i}get EndMultiExpression(){return this.endMultiExpression}set EndMultiExpression(i){this.endMultiExpression=i}get Placement(){return this.placement}set Placement(i){this.placement=i}get StartVolume(){return this.startVolume}set StartVolume(i){this.startVolume=i}get EndVolume(){return this.endVolume}set EndVolume(i){this.endVolume=i}get StaffNumber(){return this.staffNumber}set StaffNumber(i){this.staffNumber=i}get Label(){return this.label}set Label(i){this.label=i,this.setType()}static isInputStringContinuousDynamic(i){return i?_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicIncreasing,i)||_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicDecreasing,i):!1}getInterpolatedDynamic(i){const e=this.StartMultiExpression.AbsoluteTimestamp;let t;if(this.EndMultiExpression?t=this.EndMultiExpression.AbsoluteTimestamp:t=Fraction$1.plus(this.startMultiExpression.SourceMeasureParent.AbsoluteTimestamp,this.startMultiExpression.SourceMeasureParent.Duration),i.lt(e))return-1;if(t.lt(i))return-2;const s=Fraction$1.minus(i,e).RealValue/Fraction$1.minus(t,e).RealValue;return Math.max(0,Math.min(99.9,this.startVolume+(this.endVolume-this.startVolume)*s))}isWedge(){return!this.label}setType(){_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicIncreasing,this.label)?this.dynamicType=0:_ContinuousDynamicExpression.isStringInStringList(_ContinuousDynamicExpression.listContinuousDynamicDecreasing,this.label)&&(this.dynamicType=1)}};let ContinuousDynamicExpression=_ContinuousDynamicExpression;ContinuousDynamicExpression.listContinuousDynamicIncreasing=["crescendo","cresc","cresc.","cres."];ContinuousDynamicExpression.listContinuousDynamicDecreasing=["decrescendo","decresc","decr.","diminuendo","dim.","dim"];var ContDynamicEnum=(i=>(i[i.crescendo=0]="crescendo",i[i.diminuendo=1]="diminuendo",i))(ContDynamicEnum||{}),DynamicExpressionSymbolEnum=(i=>(i[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",i))(DynamicExpressionSymbolEnum||{});class MusicSheetReadingException{constructor(e,t){this.message=e,t&&(this.message+=" "+t.toString())}}class ArgumentOutOfRangeException{constructor(e){this.message=e}}class InvalidEnumArgumentException{constructor(e){this.message=e}}var loglevelExports={},loglevel={get exports(){return loglevelExports},set exports(i){loglevelExports=i}};(function(i){(function(e,t){i.exports?i.exports=t():e.log=t()})(commonjsGlobal,function(){var e=function(){},t="undefined",s=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(S,v){var x=S[v];if(typeof x.bind=="function")return x.bind(S);try{return Function.prototype.bind.call(x,S)}catch(A){return function(){return Function.prototype.apply.apply(x,[S,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(S){return S==="debug"&&(S="log"),typeof console===t?!1:S==="trace"&&s?a:console[S]!==void 0?o(console,S):console.log!==void 0?o(console,"log"):e}function c(S,v){for(var x=0;x<r.length;x++){var A=r[x];this[A]=x<S?e:this.methodFactory(A,S,v)}this.log=this.debug}function d(S,v,x){return function(){typeof console!==t&&(c.call(this,v,x),this[S].apply(this,arguments))}}function m(S,v,x){return l(S)||d.apply(this,arguments)}function u(S,v,x){var A=this,E;v=v==null?"WARN":v;var w="loglevel";typeof S=="string"?w+=":"+S:typeof S=="symbol"&&(w=void 0);function _(R){var N=(r[R]||"silent").toUpperCase();if(!(typeof window===t||!w)){try{window.localStorage[w]=N;return}catch(G){}try{window.document.cookie=encodeURIComponent(w)+"="+N+";"}catch(G){}}}function C(){var R;if(!(typeof window===t||!w)){try{R=window.localStorage[w]}catch(B){}if(typeof R===t)try{var N=window.document.cookie,G=N.indexOf(encodeURIComponent(w)+"=");G!==-1&&(R=/^([^;]+)/.exec(N.slice(G))[1])}catch(B){}return A.levels[R]===void 0&&(R=void 0),R}}function P(){if(!(typeof window===t||!w)){try{window.localStorage.removeItem(w);return}catch(R){}try{window.document.cookie=encodeURIComponent(w)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(R){}}}A.name=S,A.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},A.methodFactory=x||m,A.getLevel=function(){return E},A.setLevel=function(R,N){if(typeof R=="string"&&A.levels[R.toUpperCase()]!==void 0&&(R=A.levels[R.toUpperCase()]),typeof R=="number"&&R>=0&&R<=A.levels.SILENT){if(E=R,N!==!1&&_(R),c.call(A,R,S),typeof console===t&&R<A.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+R},A.setDefaultLevel=function(R){v=R,C()||A.setLevel(R,!1)},A.resetLevel=function(){A.setLevel(v,!1),P()},A.enableAll=function(R){A.setLevel(A.levels.TRACE,R)},A.disableAll=function(R){A.setLevel(A.levels.SILENT,R)};var I=C();I==null&&(I=v),A.setLevel(I,!1)}var g=new u,b={};g.getLogger=function(v){if(typeof v!="symbol"&&typeof v!="string"||v==="")throw new TypeError("You must supply a name when creating a logger.");var x=b[v];return x||(x=b[v]=new u(v,g.getLevel(),g.methodFactory)),x};var y=typeof window!==t?window.log:void 0;return g.noConflict=function(){return typeof window!==t&&window.log===g&&(window.log=y),g},g.getLoggers=function(){return b},g.default=g,g})})(loglevel);var lib$3={},arrays$4={},util$b={};(function(i){Object.defineProperty(i,"__esModule",{value:!0});var e=Object.prototype.hasOwnProperty;i.has=function(u,g){return e.call(u,g)};function t(u,g){return u<g?-1:u===g?0:1}i.defaultCompare=t;function s(u,g){return u===g}i.defaultEquals=s;function r(u){return u===null?"COLLECTION_NULL":l(u)?"COLLECTION_UNDEFINED":c(u)?"$s"+u:"$o"+u.toString()}i.defaultToString=r;function o(u,g){if(g===void 0&&(g=","),u===null)return"COLLECTION_NULL";if(l(u))return"COLLECTION_UNDEFINED";if(c(u))return u.toString();var b="{",y=!0;for(var S in u)i.has(u,S)&&(y?y=!1:b=b+g,b=b+S+":"+u[S]);return b+"}"}i.makeString=o;function a(u){return typeof u=="function"}i.isFunction=a;function l(u){return typeof u>"u"}i.isUndefined=l;function c(u){return Object.prototype.toString.call(u)==="[object String]"}i.isString=c;function d(u){return l(u)||!a(u)?function(g,b){return g<b?1:g===b?0:-1}:function(g,b){return u(g,b)*-1}}i.reverseCompareFunction=d;function m(u){return function(g,b){return u(g,b)===0}}i.compareToEquals=m})(util$b);Object.defineProperty(arrays$4,"__esModule",{value:!0});var util$a=util$b;function indexOf$1(i,e,t){for(var s=t||util$a.defaultEquals,r=i.length,o=0;o<r;o++)if(s(i[o],e))return o;return-1}arrays$4.indexOf=indexOf$1;function lastIndexOf(i,e,t){for(var s=t||util$a.defaultEquals,r=i.length,o=r-1;o>=0;o--)if(s(i[o],e))return o;return-1}arrays$4.lastIndexOf=lastIndexOf;function contains(i,e,t){return indexOf$1(i,e,t)>=0}arrays$4.contains=contains;function remove(i,e,t){var s=indexOf$1(i,e,t);return s<0?!1:(i.splice(s,1),!0)}arrays$4.remove=remove;function frequency(i,e,t){for(var s=t||util$a.defaultEquals,r=i.length,o=0,a=0;a<r;a++)s(i[a],e)&&o++;return o}arrays$4.frequency=frequency;function equals(i,e,t){var s=t||util$a.defaultEquals;if(i.length!==e.length)return!1;for(var r=i.length,o=0;o<r;o++)if(!s(i[o],e[o]))return!1;return!0}arrays$4.equals=equals;function copy(i){return i.concat()}arrays$4.copy=copy;function swap(i,e,t){if(e<0||e>=i.length||t<0||t>=i.length)return!1;var s=i[e];return i[e]=i[t],i[t]=s,!0}arrays$4.swap=swap;function toString$1(i){return"["+i.toString()+"]"}arrays$4.toString=toString$1;function forEach(i,e){for(var t=0,s=i;t<s.length;t++){var r=s[t];if(e(r)===!1)return}}arrays$4.forEach=forEach;var Bag$1={},Dictionary$2={};Object.defineProperty(Dictionary$2,"__esModule",{value:!0});var util$9=util$b,Dictionary$1=function(){function i(e){this.table={},this.nElements=0,this.toStr=e||util$9.defaultToString}return i.prototype.getValue=function(e){var t=this.table["$"+this.toStr(e)];if(!util$9.isUndefined(t))return t.value},i.prototype.setValue=function(e,t){if(!(util$9.isUndefined(e)||util$9.isUndefined(t))){var s,r="$"+this.toStr(e),o=this.table[r];return util$9.isUndefined(o)?(this.nElements++,s=void 0):s=o.value,this.table[r]={key:e,value:t},s}},i.prototype.remove=function(e){var t="$"+this.toStr(e),s=this.table[t];if(!util$9.isUndefined(s))return delete this.table[t],this.nElements--,s.value},i.prototype.keys=function(){var e=[];for(var t in this.table)if(util$9.has(this.table,t)){var s=this.table[t];e.push(s.key)}return e},i.prototype.values=function(){var e=[];for(var t in this.table)if(util$9.has(this.table,t)){var s=this.table[t];e.push(s.value)}return e},i.prototype.forEach=function(e){for(var t in this.table)if(util$9.has(this.table,t)){var s=this.table[t],r=e(s.key,s.value);if(r===!1)return}},i.prototype.containsKey=function(e){return!util$9.isUndefined(this.getValue(e))},i.prototype.clear=function(){this.table={},this.nElements=0},i.prototype.size=function(){return this.nElements},i.prototype.isEmpty=function(){return this.nElements<=0},i.prototype.toString=function(){var e="{";return this.forEach(function(t,s){e+=`
- `+t+" : "+s}),e+`
- }`},i}(),_default=Dictionary$2.default=Dictionary$1,_Set={};Object.defineProperty(_Set,"__esModule",{value:!0});var util$8=util$b,arrays$3=arrays$4,Dictionary_1$5=Dictionary$2,Set$1=function(){function i(e){this.dictionary=new Dictionary_1$5.default(e)}return i.prototype.contains=function(e){return this.dictionary.containsKey(e)},i.prototype.add=function(e){return this.contains(e)||util$8.isUndefined(e)?!1:(this.dictionary.setValue(e,e),!0)},i.prototype.intersection=function(e){var t=this;this.forEach(function(s){return e.contains(s)||t.remove(s),!0})},i.prototype.union=function(e){var t=this;e.forEach(function(s){return t.add(s),!0})},i.prototype.difference=function(e){var t=this;e.forEach(function(s){return t.remove(s),!0})},i.prototype.isSubsetOf=function(e){if(this.size()>e.size())return!1;var t=!0;return this.forEach(function(s){return e.contains(s)?!0:(t=!1,!1)}),t},i.prototype.remove=function(e){return this.contains(e)?(this.dictionary.remove(e),!0):!1},i.prototype.forEach=function(e){this.dictionary.forEach(function(t,s){return e(s)})},i.prototype.toArray=function(){return this.dictionary.values()},i.prototype.isEmpty=function(){return this.dictionary.isEmpty()},i.prototype.size=function(){return this.dictionary.size()},i.prototype.clear=function(){this.dictionary.clear()},i.prototype.toString=function(){return arrays$3.toString(this.toArray())},i}();_Set.default=Set$1;Object.defineProperty(Bag$1,"__esModule",{value:!0});var util$7=util$b,Dictionary_1$4=Dictionary$2,Set_1$1=_Set,Bag=function(){function i(e){this.toStrF=e||util$7.defaultToString,this.dictionary=new Dictionary_1$4.default(this.toStrF),this.nElements=0}return i.prototype.add=function(e,t){if(t===void 0&&(t=1),util$7.isUndefined(e)||t<=0)return!1;if(this.contains(e))this.dictionary.getValue(e).copies+=t;else{var s={value:e,copies:t};this.dictionary.setValue(e,s)}return this.nElements+=t,!0},i.prototype.count=function(e){return this.contains(e)?this.dictionary.getValue(e).copies:0},i.prototype.contains=function(e){return this.dictionary.containsKey(e)},i.prototype.remove=function(e,t){if(t===void 0&&(t=1),util$7.isUndefined(e)||t<=0)return!1;if(this.contains(e)){var s=this.dictionary.getValue(e);return t>s.copies?this.nElements-=s.copies:this.nElements-=t,s.copies-=t,s.copies<=0&&this.dictionary.remove(e),!0}else return!1},i.prototype.toArray=function(){for(var e=[],t=this.dictionary.values(),s=0,r=t;s<r.length;s++)for(var o=r[s],a=o.value,l=o.copies,c=0;c<l;c++)e.push(a);return e},i.prototype.toSet=function(){for(var e=new Set_1$1.default(this.toStrF),t=this.dictionary.values(),s=0,r=t;s<r.length;s++){var o=r[s],a=o.value;e.add(a)}return e},i.prototype.forEach=function(e){this.dictionary.forEach(function(t,s){for(var r=s.value,o=s.copies,a=0;a<o;a++)if(e(r)===!1)return!1;return!0})},i.prototype.size=function(){return this.nElements},i.prototype.isEmpty=function(){return this.nElements===0},i.prototype.clear=function(){this.nElements=0,this.dictionary.clear()},i}();Bag$1.default=Bag;var BSTree$1={},BSTreeKV$1={},Queue$1={},LinkedList$1={};Object.defineProperty(LinkedList$1,"__esModule",{value:!0});var util$6=util$b,arrays$2=arrays$4,LinkedList=function(){function i(){this.firstNode=null,this.lastNode=null,this.nElements=0}return i.prototype.add=function(e,t){if(util$6.isUndefined(t)&&(t=this.nElements),t<0||t>this.nElements||util$6.isUndefined(e))return!1;var s=this.createNode(e);if(this.nElements===0||this.lastNode===null)this.firstNode=s,this.lastNode=s;else if(t===this.nElements)this.lastNode.next=s,this.lastNode=s;else if(t===0)s.next=this.firstNode,this.firstNode=s;else{var r=this.nodeAtIndex(t-1);if(r===null)return!1;s.next=r.next,r.next=s}return this.nElements++,!0},i.prototype.first=function(){if(this.firstNode!==null)return this.firstNode.element},i.prototype.last=function(){if(this.lastNode!==null)return this.lastNode.element},i.prototype.elementAtIndex=function(e){var t=this.nodeAtIndex(e);if(t!==null)return t.element},i.prototype.indexOf=function(e,t){var s=t||util$6.defaultEquals;if(util$6.isUndefined(e))return-1;for(var r=this.firstNode,o=0;r!==null;){if(s(r.element,e))return o;o++,r=r.next}return-1},i.prototype.contains=function(e,t){return this.indexOf(e,t)>=0},i.prototype.remove=function(e,t){var s=t||util$6.defaultEquals;if(this.nElements<1||util$6.isUndefined(e))return!1;for(var r=null,o=this.firstNode;o!==null;){if(s(o.element,e))return r===null?(this.firstNode=o.next,o===this.lastNode&&(this.lastNode=null)):o===this.lastNode?(this.lastNode=r,r.next=o.next,o.next=null):(r.next=o.next,o.next=null),this.nElements--,!0;r=o,o=o.next}return!1},i.prototype.clear=function(){this.firstNode=null,this.lastNode=null,this.nElements=0},i.prototype.equals=function(e,t){var s=t||util$6.defaultEquals;return!(e instanceof i)||this.size()!==e.size()?!1:this.equalsAux(this.firstNode,e.firstNode,s)},i.prototype.equalsAux=function(e,t,s){for(;e!==null&&t!==null;){if(!s(e.element,t.element))return!1;e=e.next,t=t.next}return!0},i.prototype.removeElementAtIndex=function(e){if(!(e<0||e>=this.nElements||this.firstNode===null||this.lastNode===null)){var t;if(this.nElements===1)t=this.firstNode.element,this.firstNode=null,this.lastNode=null;else{var s=this.nodeAtIndex(e-1);s===null?(t=this.firstNode.element,this.firstNode=this.firstNode.next):s.next===this.lastNode&&(t=this.lastNode.element,this.lastNode=s),s!==null&&s.next!==null&&(t=s.next.element,s.next=s.next.next)}return this.nElements--,t}},i.prototype.forEach=function(e){for(var t=this.firstNode;t!==null&&e(t.element)!==!1;)t=t.next},i.prototype.reverse=function(){for(var e=null,t=this.firstNode,s=null;t!==null;)s=t.next,t.next=e,e=t,t=s;s=this.firstNode,this.firstNode=this.lastNode,this.lastNode=s},i.prototype.toArray=function(){for(var e=[],t=this.firstNode;t!==null;)e.push(t.element),t=t.next;return e},i.prototype.size=function(){return this.nElements},i.prototype.isEmpty=function(){return this.nElements<=0},i.prototype.toString=function(){return arrays$2.toString(this.toArray())},i.prototype.nodeAtIndex=function(e){if(e<0||e>=this.nElements)return null;if(e===this.nElements-1)return this.lastNode;for(var t=this.firstNode,s=0;s<e&&t!==null;s++)t=t.next;return t},i.prototype.createNode=function(e){return{element:e,next:null}},i}();LinkedList$1.default=LinkedList;Object.defineProperty(Queue$1,"__esModule",{value:!0});var LinkedList_1$2=LinkedList$1,Queue=function(){function i(){this.list=new LinkedList_1$2.default}return i.prototype.enqueue=function(e){return this.list.add(e)},i.prototype.add=function(e){return this.list.add(e)},i.prototype.dequeue=function(){if(this.list.size()!==0){var e=this.list.first();return this.list.removeElementAtIndex(0),e}},i.prototype.peek=function(){if(this.list.size()!==0)return this.list.first()},i.prototype.size=function(){return this.list.size()},i.prototype.contains=function(e,t){return this.list.contains(e,t)},i.prototype.isEmpty=function(){return this.list.size()<=0},i.prototype.clear=function(){this.list.clear()},i.prototype.forEach=function(e){this.list.forEach(e)},i}();Queue$1.default=Queue;Object.defineProperty(BSTreeKV$1,"__esModule",{value:!0});var util$5=util$b,Queue_1$1=Queue$1,BSTreeKV=function(){function i(e){this.root=null,this.compare=e||util$5.defaultCompare,this.nElements=0}return i.prototype.add=function(e){return util$5.isUndefined(e)?!1:this.insertNode(this.createNode(e))!==null?(this.nElements++,!0):!1},i.prototype.clear=function(){this.root=null,this.nElements=0},i.prototype.isEmpty=function(){return this.nElements===0},i.prototype.size=function(){return this.nElements},i.prototype.contains=function(e){return util$5.isUndefined(e)?!1:this.searchNode(this.root,e)!==null},i.prototype.search=function(e){var t=this.searchNode(this.root,e);if(t!==null)return t.element},i.prototype.remove=function(e){var t=this.searchNode(this.root,e);return t===null?!1:(this.removeNode(t),this.nElements--,!0)},i.prototype.inorderTraversal=function(e){this.inorderTraversalAux(this.root,e,{stop:!1})},i.prototype.preorderTraversal=function(e){this.preorderTraversalAux(this.root,e,{stop:!1})},i.prototype.postorderTraversal=function(e){this.postorderTraversalAux(this.root,e,{stop:!1})},i.prototype.levelTraversal=function(e){this.levelTraversalAux(this.root,e)},i.prototype.minimum=function(){if(!(this.isEmpty()||this.root===null))return this.minimumAux(this.root).element},i.prototype.maximum=function(){if(!(this.isEmpty()||this.root===null))return this.maximumAux(this.root).element},i.prototype.forEach=function(e){this.inorderTraversal(e)},i.prototype.toArray=function(){var e=[];return this.inorderTraversal(function(t){return e.push(t),!0}),e},i.prototype.height=function(){return this.heightAux(this.root)},i.prototype.searchNode=function(e,t){for(var s=1;e!==null&&s!==0;)s=this.compare(t,e.element),s<0?e=e.leftCh:s>0&&(e=e.rightCh);return e},i.prototype.transplant=function(e,t){e.parent===null?this.root=t:e===e.parent.leftCh?e.parent.leftCh=t:e.parent.rightCh=t,t!==null&&(t.parent=e.parent)},i.prototype.removeNode=function(e){if(e.leftCh===null)this.transplant(e,e.rightCh);else if(e.rightCh===null)this.transplant(e,e.leftCh);else{var t=this.minimumAux(e.rightCh);t.parent!==e&&(this.transplant(t,t.rightCh),t.rightCh=e.rightCh,t.rightCh.parent=t),this.transplant(e,t),t.leftCh=e.leftCh,t.leftCh.parent=t}},i.prototype.inorderTraversalAux=function(e,t,s){e===null||s.stop||(this.inorderTraversalAux(e.leftCh,t,s),!s.stop&&(s.stop=t(e.element)===!1,!s.stop&&this.inorderTraversalAux(e.rightCh,t,s)))},i.prototype.levelTraversalAux=function(e,t){var s=new Queue_1$1.default;for(e!==null&&s.enqueue(e),e=s.dequeue()||null;e!=null;){if(t(e.element)===!1)return;e.leftCh!==null&&s.enqueue(e.leftCh),e.rightCh!==null&&s.enqueue(e.rightCh),e=s.dequeue()||null}},i.prototype.preorderTraversalAux=function(e,t,s){e===null||s.stop||(s.stop=t(e.element)===!1,!s.stop&&(this.preorderTraversalAux(e.leftCh,t,s),!s.stop&&this.preorderTraversalAux(e.rightCh,t,s)))},i.prototype.postorderTraversalAux=function(e,t,s){e===null||s.stop||(this.postorderTraversalAux(e.leftCh,t,s),!s.stop&&(this.postorderTraversalAux(e.rightCh,t,s),!s.stop&&(s.stop=t(e.element)===!1)))},i.prototype.minimumAux=function(e){for(;e!=null&&e.leftCh!==null;)e=e.leftCh;return e},i.prototype.maximumAux=function(e){for(;e!=null&&e.rightCh!==null;)e=e.rightCh;return e},i.prototype.heightAux=function(e){return e===null?-1:Math.max(this.heightAux(e.leftCh),this.heightAux(e.rightCh))+1},i.prototype.insertNode=function(e){for(var t=null,s=this.root;s!==null;){var r=this.compare(e.element,s.element);if(r===0)return null;r<0?(t=s,s=s.leftCh):(t=s,s=s.rightCh)}return e.parent=t,t===null?this.root=e:this.compare(e.element,t.element)<0?t.leftCh=e:t.rightCh=e,e},i.prototype.createNode=function(e){return{element:e,leftCh:null,rightCh:null,parent:null}},i}();BSTreeKV$1.default=BSTreeKV;var __extends$2=commonjsGlobal&&commonjsGlobal.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(e,t){i(e,t);function s(){this.constructor=e}e.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}}();Object.defineProperty(BSTree$1,"__esModule",{value:!0});var BSTreeKV_1$1=BSTreeKV$1,BSTree=function(i){__extends$2(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e}(BSTreeKV_1$1.default);BSTree$1.default=BSTree;var Heap$1={};Object.defineProperty(Heap$1,"__esModule",{value:!0});var collections=util$b,arrays$1=arrays$4,Heap=function(){function i(e){this.data=[],this.compare=e||collections.defaultCompare}return i.prototype.leftChildIndex=function(e){return 2*e+1},i.prototype.rightChildIndex=function(e){return 2*e+2},i.prototype.parentIndex=function(e){return Math.floor((e-1)/2)},i.prototype.minIndex=function(e,t){return t>=this.data.length?e>=this.data.length?-1:e:this.compare(this.data[e],this.data[t])<=0?e:t},i.prototype.siftUp=function(e){for(var t=this.parentIndex(e);e>0&&this.compare(this.data[t],this.data[e])>0;)arrays$1.swap(this.data,t,e),e=t,t=this.parentIndex(e)},i.prototype.siftDown=function(e){for(var t=this.minIndex(this.leftChildIndex(e),this.rightChildIndex(e));t>=0&&this.compare(this.data[e],this.data[t])>0;)arrays$1.swap(this.data,t,e),e=t,t=this.minIndex(this.leftChildIndex(e),this.rightChildIndex(e))},i.prototype.peek=function(){if(this.data.length>0)return this.data[0]},i.prototype.add=function(e){return collections.isUndefined(e)?!1:(this.data.push(e),this.siftUp(this.data.length-1),!0)},i.prototype.removeRoot=function(){if(this.data.length>0){var e=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),e}},i.prototype.contains=function(e){var t=collections.compareToEquals(this.compare);return arrays$1.contains(this.data,e,t)},i.prototype.size=function(){return this.data.length},i.prototype.isEmpty=function(){return this.data.length<=0},i.prototype.clear=function(){this.data.length=0},i.prototype.forEach=function(e){arrays$1.forEach(this.data,e)},i}();Heap$1.default=Heap;var LinkedDictionary$1={},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(e,t){i(e,t);function s(){this.constructor=e}e.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}}();Object.defineProperty(LinkedDictionary$1,"__esModule",{value:!0});var Dictionary_1$3=Dictionary$2,util$4=util$b,LinkedDictionaryPair=function(){function i(e,t){this.key=e,this.value=t}return i.prototype.unlink=function(){this.prev.next=this.next,this.next.prev=this.prev},i}(),HeadOrTailLinkedDictionaryPair=function(){function i(){this.key=null,this.value=null}return i.prototype.unlink=function(){this.prev.next=this.next,this.next.prev=this.prev},i}();function isHeadOrTailLinkedDictionaryPair(i){return!i.next}var LinkedDictionary=function(i){__extends$1(e,i);function e(t){var s=i.call(this,t)||this;return s.head=new HeadOrTailLinkedDictionaryPair,s.tail=new HeadOrTailLinkedDictionaryPair,s.head.next=s.tail,s.tail.prev=s.head,s}return e.prototype.appendToTail=function(t){var s=this.tail.prev;s.next=t,t.prev=s,t.next=this.tail,this.tail.prev=t},e.prototype.getLinkedDictionaryPair=function(t){if(!util$4.isUndefined(t)){var s="$"+this.toStr(t),r=this.table[s];return r}},e.prototype.getValue=function(t){var s=this.getLinkedDictionaryPair(t);if(!util$4.isUndefined(s))return s.value},e.prototype.remove=function(t){var s=this.getLinkedDictionaryPair(t);if(!util$4.isUndefined(s))return i.prototype.remove.call(this,t),s.unlink(),s.value},e.prototype.clear=function(){i.prototype.clear.call(this),this.head.next=this.tail,this.tail.prev=this.head},e.prototype.replace=function(t,s){var r="$"+this.toStr(s.key);s.next=t.next,s.prev=t.prev,this.remove(t.key),s.prev.next=s,s.next.prev=s,this.table[r]=s,++this.nElements},e.prototype.setValue=function(t,s){if(!(util$4.isUndefined(t)||util$4.isUndefined(s))){var r=this.getLinkedDictionaryPair(t),o=new LinkedDictionaryPair(t,s),a="$"+this.toStr(t);if(util$4.isUndefined(r)){this.appendToTail(o),this.table[a]=o,++this.nElements;return}else return this.replace(r,o),r.value}},e.prototype.keys=function(){var t=[];return this.forEach(function(s,r){t.push(s)}),t},e.prototype.values=function(){var t=[];return this.forEach(function(s,r){t.push(r)}),t},e.prototype.forEach=function(t){for(var s=this.head.next;!isHeadOrTailLinkedDictionaryPair(s);){var r=t(s.key,s.value);if(r===!1)return;s=s.next}},e}(Dictionary_1$3.default);LinkedDictionary$1.default=LinkedDictionary;var MultiDictionary$1={};Object.defineProperty(MultiDictionary$1,"__esModule",{value:!0});var util$3=util$b,Dictionary_1$2=Dictionary$2,arrays=arrays$4,MultiDictionary=function(){function i(e,t,s){s===void 0&&(s=!1),this.dict=new Dictionary_1$2.default(e),this.equalsF=t||util$3.defaultEquals,this.allowDuplicate=s}return i.prototype.getValue=function(e){var t=this.dict.getValue(e);return util$3.isUndefined(t)?[]:arrays.copy(t)},i.prototype.setValue=function(e,t){if(util$3.isUndefined(e)||util$3.isUndefined(t))return!1;var s=this.dict.getValue(e);return util$3.isUndefined(s)?(this.dict.setValue(e,[t]),!0):!this.allowDuplicate&&arrays.contains(s,t,this.equalsF)?!1:(s.push(t),!0)},i.prototype.remove=function(e,t){if(util$3.isUndefined(t)){var s=this.dict.remove(e);return!util$3.isUndefined(s)}var r=this.dict.getValue(e);return!util$3.isUndefined(r)&&arrays.remove(r,t,this.equalsF)?(r.length===0&&this.dict.remove(e),!0):!1},i.prototype.keys=function(){return this.dict.keys()},i.prototype.values=function(){for(var e=this.dict.values(),t=[],s=0,r=e;s<r.length;s++)for(var o=r[s],a=0,l=o;a<l.length;a++){var c=l[a];t.push(c)}return t},i.prototype.containsKey=function(e){return this.dict.containsKey(e)},i.prototype.clear=function(){this.dict.clear()},i.prototype.size=function(){return this.dict.size()},i.prototype.isEmpty=function(){return this.dict.isEmpty()},i}();MultiDictionary$1.default=MultiDictionary;var FactoryDictionary$1={},__extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(e,t){i(e,t);function s(){this.constructor=e}e.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}}();Object.defineProperty(FactoryDictionary$1,"__esModule",{value:!0});var Dictionary_1$1=Dictionary$2,util$2=util$b,FactoryDictionary=function(i){__extends(e,i);function e(t,s){var r=i.call(this,s)||this;return r.defaultFactoryFunction=t,r}return e.prototype.setDefault=function(t,s){var r=i.prototype.getValue.call(this,t);return util$2.isUndefined(r)?(this.setValue(t,s),s):r},e.prototype.getValue=function(t){return this.setDefault(t,this.defaultFactoryFunction())},e}(Dictionary_1$1.default);FactoryDictionary$1.default=FactoryDictionary;var PriorityQueue$1={};Object.defineProperty(PriorityQueue$1,"__esModule",{value:!0});var util$1=util$b,Heap_1$1=Heap$1,PriorityQueue=function(){function i(e){this.heap=new Heap_1$1.default(util$1.reverseCompareFunction(e))}return i.prototype.enqueue=function(e){return this.heap.add(e)},i.prototype.add=function(e){return this.heap.add(e)},i.prototype.dequeue=function(){if(this.heap.size()!==0){var e=this.heap.peek();return this.heap.removeRoot(),e}},i.prototype.peek=function(){return this.heap.peek()},i.prototype.contains=function(e){return this.heap.contains(e)},i.prototype.isEmpty=function(){return this.heap.isEmpty()},i.prototype.size=function(){return this.heap.size()},i.prototype.clear=function(){this.heap.clear()},i.prototype.forEach=function(e){this.heap.forEach(e)},i}();PriorityQueue$1.default=PriorityQueue;var Stack$1={};Object.defineProperty(Stack$1,"__esModule",{value:!0});var LinkedList_1$1=LinkedList$1,Stack=function(){function i(){this.list=new LinkedList_1$1.default}return i.prototype.push=function(e){return this.list.add(e,0)},i.prototype.add=function(e){return this.list.add(e,0)},i.prototype.pop=function(){return this.list.removeElementAtIndex(0)},i.prototype.peek=function(){return this.list.first()},i.prototype.size=function(){return this.list.size()},i.prototype.contains=function(e,t){return this.list.contains(e,t)},i.prototype.isEmpty=function(){return this.list.isEmpty()},i.prototype.clear=function(){this.list.clear()},i.prototype.forEach=function(e){this.list.forEach(e)},i}();Stack$1.default=Stack;var MultiRootTree$1={};Object.defineProperty(MultiRootTree$1,"__esModule",{value:!0});var Direction;(function(i){i[i.BEFORE=0]="BEFORE",i[i.AFTER=1]="AFTER",i[i.INSIDE_AT_END=2]="INSIDE_AT_END",i[i.INSIDE_AT_START=3]="INSIDE_AT_START"})(Direction||(Direction={}));var MultiRootTree=function(){function i(e,t){e===void 0&&(e=[]),t===void 0&&(t={}),this.rootIds=e,this.nodes=t,this.initRootIds(),this.initNodes()}return i.prototype.initRootIds=function(){for(var e=0,t=this.rootIds;e<t.length;e++){var s=t[e];this.createEmptyNodeIfNotExist(s)}},i.prototype.initNodes=function(){for(var e in this.nodes)if(this.nodes.hasOwnProperty(e))for(var t=0,s=this.nodes[e];t<s.length;t++){var r=s[t];this.createEmptyNodeIfNotExist(r)}},i.prototype.createEmptyNodeIfNotExist=function(e){this.nodes[e]||(this.nodes[e]=[])},i.prototype.getRootIds=function(){var e=this.rootIds.slice();return e},i.prototype.getNodes=function(){var e={};for(var t in this.nodes)this.nodes.hasOwnProperty(t)&&(e[t]=this.nodes[t].slice());return e},i.prototype.getObject=function(){return{rootIds:this.getRootIds(),nodes:this.getNodes()}},i.prototype.toObject=function(){return this.getObject()},i.prototype.flatten=function(){for(var e=this,t=[],s=0;s<this.rootIds.length;s++){var r=this.rootIds[s];t.push({id:r,level:0,hasParent:!1,childrenCount:0}),d(r,this.nodes,t,0)}for(var o=0,a=t;o<a.length;o++){var l=a[o];l.childrenCount=c(l.id)}return t;function c(m){if(e.nodes[m]){var u=e.nodes[m].length;return u}else return 0}function d(m,u,g,b){if(b===void 0&&(b=0),!(!m||!u||!g||!u[m])){b++;for(var y=u[m],S=0;S<y.length;S++){var v=y[S];g.push({id:v,level:b,hasParent:!0}),d(v,u,g,b)}b--}}},i.prototype.moveIdBeforeId=function(e,t){return this.moveId(e,t,Direction.BEFORE)},i.prototype.moveIdAfterId=function(e,t){return this.moveId(e,t,Direction.AFTER)},i.prototype.moveIdIntoId=function(e,t,s){return s===void 0&&(s=!0),s?this.moveId(e,t,Direction.INSIDE_AT_START):this.moveId(e,t,Direction.INSIDE_AT_END)},i.prototype.swapRootIdWithRootId=function(e,t){var s=this.findRootId(e),r=this.findRootId(t);this.swapRootPositionWithRootPosition(s,r)},i.prototype.swapRootPositionWithRootPosition=function(e,t){var s=this.rootIds[t];this.rootIds[t]=this.rootIds[e],this.rootIds[e]=s},i.prototype.deleteId=function(e){this.rootDeleteId(e),this.nodeAndSubNodesDelete(e),this.nodeRefrencesDelete(e)},i.prototype.insertIdBeforeId=function(e,t){var s=this.findRootId(e);s>-1&&this.insertIdIntoRoot(t,s);for(var r in this.nodes)if(this.nodes.hasOwnProperty(r)){var o=this.findNodeId(r,e);o>-1&&this.insertIdIntoNode(r,t,o)}},i.prototype.insertIdAfterId=function(e,t){var s=this.findRootId(e);s>-1&&this.insertIdIntoRoot(t,s+1);for(var r in this.nodes)if(this.nodes.hasOwnProperty(r)){var o=this.findNodeId(r,e);o>-1&&this.insertIdIntoNode(r,t,o+1)}},i.prototype.insertIdIntoId=function(e,t){this.nodeInsertAtEnd(e,t),this.nodes[t]=[]},i.prototype.insertIdIntoRoot=function(e,t){if(t===void 0)this.rootInsertAtEnd(e);else if(t<0){var s=this.rootIds.length;this.rootIds.splice(t+s+1,0,e)}else this.rootIds.splice(t,0,e);this.nodes[e]=this.nodes[e]||[]},i.prototype.insertIdIntoNode=function(e,t,s){if(this.nodes[e]=this.nodes[e]||[],this.nodes[t]=this.nodes[t]||[],s===void 0)this.nodeInsertAtEnd(e,t);else if(s<0){var r=this.nodes[e].length;this.nodes[e].splice(s+r+1,0,t)}else this.nodes[e].splice(s,0,t)},i.prototype.moveId=function(e,t,s){var r=e,o=this.findRootId(r);this.nodes[t];for(var a in this.nodes)if(this.nodes.hasOwnProperty(a)){this.findNodeId(a,t);break}var l=t,c=this.findRootId(l);this.nodes[t];for(var a in this.nodes)if(this.nodes.hasOwnProperty(a)){this.findNodeId(a,t);break}if(o>-1)if(c>-1)switch(this.rootDelete(o),c>o&&c--,s){case Direction.BEFORE:this.insertIdIntoRoot(r,c);break;case Direction.AFTER:this.insertIdIntoRoot(r,c+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(l,r);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(l,r);break}else{this.rootDelete(o);for(var a in this.nodes)if(this.nodes.hasOwnProperty(a)){var d=this.findNodeId(a,l);if(d>-1){switch(s){case Direction.BEFORE:this.insertIdIntoNode(a,r,d);break;case Direction.AFTER:this.insertIdIntoNode(a,r,d+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(l,r);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(l,r);break}break}}}else if(c>-1){for(var a in this.nodes)if(this.nodes.hasOwnProperty(a)){var d=this.findNodeId(a,r);if(d>-1){this.nodeDeleteAtIndex(a,d);break}}switch(s){case Direction.BEFORE:this.insertIdIntoRoot(r,c);break;case Direction.AFTER:this.insertIdIntoRoot(r,c+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(l,r);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(l,r);break}}else{for(var a in this.nodes)if(this.nodes.hasOwnProperty(a)){var d=this.findNodeId(a,r);if(d>-1){this.nodeDeleteAtIndex(a,d);break}}for(var a in this.nodes)if(this.nodes.hasOwnProperty(a)){var d=this.findNodeId(a,l);if(d>-1){switch(s){case Direction.BEFORE:this.insertIdIntoNode(a,r,d);break;case Direction.AFTER:this.insertIdIntoNode(a,r,d+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(l,r);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(l,r);break}break}}}},i.prototype.swapArrayElements=function(e,t,s){var r=e[t];return e[t]=e[s],e[s]=r,e},i.prototype.rootDeleteId=function(e){var t=this.findRootId(e);t>-1&&this.rootDelete(t)},i.prototype.nodeAndSubNodesDelete=function(e){for(var t=[],s=0;s<this.nodes[e].length;s++){var r=this.nodes[e][s];this.nodeAndSubNodesDelete(r),t.push(e)}this.nodeDelete(e);for(var s=0;s<t.length;s++)this.nodeDelete(t[s])},i.prototype.nodeRefrencesDelete=function(e){for(var t in this.nodes)if(this.nodes.hasOwnProperty(t))for(var s=0;s<this.nodes[t].length;s++){var r=this.nodes[t][s];r===e&&this.nodeDeleteAtIndex(t,s)}},i.prototype.nodeDelete=function(e){delete this.nodes[e]},i.prototype.findRootId=function(e){return this.rootIds.indexOf(e)},i.prototype.findNodeId=function(e,t){return this.nodes[e].indexOf(t)},i.prototype.findNode=function(e){return this.nodes[e]},i.prototype.nodeInsertAtStart=function(e,t){this.nodes[e].unshift(t)},i.prototype.nodeInsertAtEnd=function(e,t){this.nodes[e].push(t)},i.prototype.rootDelete=function(e){this.rootIds.splice(e,1)},i.prototype.nodeDeleteAtIndex=function(e,t){this.nodes[e].splice(t,1)},i.prototype.rootInsertAtStart=function(e){this.rootIds.unshift(e)},i.prototype.rootInsertAtEnd=function(e){this.rootIds.push(e)},i}();MultiRootTree$1.default=MultiRootTree;Object.defineProperty(lib$3,"__esModule",{value:!0});var _arrays=arrays$4;lib$3.arrays=_arrays;var Bag_1=Bag$1;lib$3.Bag=Bag_1.default;var BSTree_1=BSTree$1;lib$3.BSTree=BSTree_1.default;var BSTreeKV_1=BSTreeKV$1;lib$3.BSTreeKV=BSTreeKV_1.default;var Dictionary_1=Dictionary$2,Dictionary=lib$3.Dictionary=Dictionary_1.default,Heap_1=Heap$1;lib$3.Heap=Heap_1.default;var LinkedDictionary_1=LinkedDictionary$1;lib$3.LinkedDictionary=LinkedDictionary_1.default;var LinkedList_1=LinkedList$1;lib$3.LinkedList=LinkedList_1.default;var MultiDictionary_1=MultiDictionary$1;lib$3.MultiDictionary=MultiDictionary_1.default;var FactoryDictionary_1=FactoryDictionary$1;lib$3.FactoryDictionary=FactoryDictionary_1.default;var FactoryDictionary_2=FactoryDictionary$1;lib$3.DefaultDictionary=FactoryDictionary_2.default;var Queue_1=Queue$1;lib$3.Queue=Queue_1.default;var PriorityQueue_1=PriorityQueue$1;lib$3.PriorityQueue=PriorityQueue_1.default;var Set_1=_Set;lib$3.Set=Set_1.default;var Stack_1=Stack$1;lib$3.Stack=Stack_1.default;var MultiRootTree_1=MultiRootTree$1;lib$3.MultiRootTree=MultiRootTree_1.default;var _util=util$b;lib$3.util=_util;const _InstantaneousDynamicExpression=class extends AbstractExpression{constructor(i,e,t,s,r){super(t),super.parentMeasure=r,this.dynamicEnum=DynamicEnum[i.toLowerCase()],this.soundDynamic=e,this.staffNumber=s}static staticConstructor(){_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(13,127/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(12,126/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(11,125/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(10,124/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(9,122/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(8,108/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(7,76/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(14,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(16,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(17,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(18,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(19,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(20,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(21,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(22,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(23,.5),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(6,60/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(5,28/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(4,12/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(3,10/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(2,7/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(1,5/127),_InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.setValue(0,4/127)}get ParentMultiExpression(){return this.multiExpression}set ParentMultiExpression(i){this.multiExpression=i}get DynEnum(){return this.dynamicEnum}set DynEnum(i){this.dynamicEnum=i}get SoundDynamic(){return this.soundDynamic}set SoundDynamic(i){this.soundDynamic=i}get Placement(){return this.placement}set Placement(i){this.placement=i}get StaffNumber(){return this.staffNumber}set StaffNumber(i){this.staffNumber=i}get Length(){return Math.abs(this.length)<1e-4&&(this.length=this.calculateLength()),this.length}get MidiVolume(){return this.Volume*127}get Volume(){return _InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.getValue(this.dynamicEnum)}static isInputStringInstantaneousDynamic(i){return i?_InstantaneousDynamicExpression.isStringInStringList(_InstantaneousDynamicExpression.listInstantaneousDynamics,i):!1}getDynamicExpressionSymbol(i){switch(i){case"p":return DynamicExpressionSymbolEnum.p;case"f":return DynamicExpressionSymbolEnum.f;case"s":return DynamicExpressionSymbolEnum.s;case"z":return DynamicExpressionSymbolEnum.z;case"m":return DynamicExpressionSymbolEnum.m;case"r":return DynamicExpressionSymbolEnum.r;default:throw new InvalidEnumArgumentException("unknown DynamicExpressionSymbolEnum: "+i)}}calculateLength(){return loglevelExports.debug("[Andrea] instantaneousDynamicExpression: not implemented: calculateLength!"),0}};let InstantaneousDynamicExpression=_InstantaneousDynamicExpression;InstantaneousDynamicExpression.dynamicToRelativeVolumeDict=new Dictionary;InstantaneousDynamicExpression.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"];var DynamicEnum=(i=>(i[i.pppppp=0]="pppppp",i[i.ppppp=1]="ppppp",i[i.pppp=2]="pppp",i[i.ppp=3]="ppp",i[i.pp=4]="pp",i[i.p=5]="p",i[i.mp=6]="mp",i[i.mf=7]="mf",i[i.f=8]="f",i[i.ff=9]="ff",i[i.fff=10]="fff",i[i.ffff=11]="ffff",i[i.fffff=12]="fffff",i[i.ffffff=13]="ffffff",i[i.sf=14]="sf",i[i.sff=15]="sff",i[i.sfp=16]="sfp",i[i.sfpp=17]="sfpp",i[i.fp=18]="fp",i[i.rf=19]="rf",i[i.rfz=20]="rfz",i[i.sfz=21]="sfz",i[i.sffz=22]="sffz",i[i.fz=23]="fz",i[i.other=24]="other",i))(DynamicEnum||{});InstantaneousDynamicExpression.staticConstructor();class DynamicsContainer{constructor(e,t){e instanceof ContinuousDynamicExpression?this.continuousDynamicExpression=e:e instanceof InstantaneousDynamicExpression&&(this.instantaneousDynamicExpression=e),this.staffNumber=t}static Compare(e,t){return e.parMultiExpression().AbsoluteTimestamp.CompareTo(t.parMultiExpression().AbsoluteTimestamp)}parMultiExpression(){if(this.continuousDynamicExpression)return this.continuousDynamicExpression.StartMultiExpression;if(this.instantaneousDynamicExpression)return this.instantaneousDynamicExpression.ParentMultiExpression}}class AbstractNotationInstruction{constructor(e){this.printObject=!0,this.parent=e}get Parent(){return this.parent}set Parent(e){this.parent=e}get PrintObject(){return this.printObject}set PrintObject(e){this.printObject=e}}class RhythmInstruction extends AbstractNotationInstruction{constructor(e,t){super(void 0),this.rhythm=e,this.numerator=e.Numerator,this.denominator=e.Denominator,this.symbolEnum=t}get Rhythm(){return this.rhythm}set Rhythm(e){this.rhythm=e}get SymbolEnum(){return this.symbolEnum}set SymbolEnum(e){this.symbolEnum=e}clone(){return new RhythmInstruction(this.rhythm.clone(),this.symbolEnum)}OperatorEquals(e){const t=this;return t===e?!0:!t||!e?!1:t.numerator===e.numerator&&t.denominator===e.denominator}OperatorNotEqual(e){return this!==e}ToString(){return"Rhythm: "+this.rhythm.toString()}}var RhythmSymbolEnum=(i=>(i[i.NONE=0]="NONE",i[i.COMMON=1]="COMMON",i[i.CUT=2]="CUT",i))(RhythmSymbolEnum||{});class MusicPartManagerIterator{constructor(e,t,s){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 Fraction$1(0,1),this.currentEnrolledMeasureTimestamp=new Fraction$1(0,1),this.currentRelativeInMeasureTimestamp=new Fraction$1(0,1),this.currentVerticalContainerInMeasureTimestamp=new Fraction$1(0,1),this.jumpResponsibleRepetition=void 0,this.activeDynamicExpressions=[];try{this.frontReached=!0,this.musicSheet=e,this.currentBpm=e.userStartTempoInBPM,this.currentVoiceEntries=void 0,this.frontReached=!1;for(const r of this.musicSheet.Repetitions)this.setRepetitionIterationCount(r,1);for(let r=0;r<e.getCompleteNumberOfStaves();r++)this.ActiveDynamicExpressions.push(void 0);this.currentMeasure=this.musicSheet.SourceMeasures[0],t||(t=new Fraction$1);do this.moveToNext();while((!this.currentVoiceEntries||this.currentTimeStamp.lt(t))&&!this.endReached);for(let r=0;r<this.activeDynamicExpressions.length;r++)if(this.activeDynamicExpressions[r])if(this.activeDynamicExpressions[r]instanceof ContinuousDynamicExpression){const o=this.activeDynamicExpressions[r];this.currentDynamicChangingExpressions.push(new DynamicsContainer(o,r))}else{const o=this.activeDynamicExpressions[r];this.currentDynamicChangingExpressions.push(new DynamicsContainer(o,r))}this.currentTempoChangingExpression=this.activeTempoExpression}catch(r){loglevelExports.info("MusicPartManagerIterator: "+r)}}get EndReached(){return this.endReached}get FrontReached(){return this.frontReached}get CurrentMeasure(){return this.currentMeasure}get CurrentRepetition(){return this.currentRepetition}get CurrentRepetitionIteration(){return this.CurrentRepetition?this.getRepetitionIterationCount(this.CurrentRepetition):0}get CurrentJumpResponsibleRepetitionIterationBeforeJump(){return this.jumpResponsibleRepetition?this.getRepetitionIterationCount(this.jumpResponsibleRepetition)-1:0}get CurrentBpm(){return this.currentBpm}get CurrentVoiceEntries(){return this.currentVoiceEntries}get CurrentMeasureIndex(){return this.currentMeasureIndex}get CurrentEnrolledTimestamp(){return Fraction$1.plus(this.currentEnrolledMeasureTimestamp,this.currentVerticalContainerInMeasureTimestamp)}get CurrentSourceTimestamp(){return this.currentTimeStamp}get CurrentRelativeInMeasureTimestamp(){return this.currentRelativeInMeasureTimestamp}get JumpOccurred(){return this.backJumpOccurred||this.forwardJumpOccurred}get ActiveTempoExpression(){return this.activeTempoExpression}get ActiveDynamicExpressions(){return this.activeDynamicExpressions}get CurrentTempoChangingExpression(){return this.currentTempoChangingExpression}get JumpResponsibleRepetition(){return this.jumpResponsibleRepetition}clone(e=void 0,t=void 0){const s=new MusicPartManagerIterator(this.musicSheet,e!=null?e:this.currentTimeStamp,t);return s.currentVoiceEntryIndex=this.currentVoiceEntryIndex,s.currentMappingPart=this.currentMappingPart,s.currentPartIndex=this.currentPartIndex,s.currentVoiceEntries=this.currentVoiceEntries,s.endReached=this.endReached,s.frontReached=this.frontReached,s}CurrentVisibleVoiceEntries(e){const t=[];if(!this.currentVoiceEntries)return t;if(e){for(const s of this.currentVoiceEntries)if(s.ParentVoice.Parent.IdString===e.IdString)return this.getVisibleEntries(s,t),t}else for(const s of this.currentVoiceEntries)this.getVisibleEntries(s,t);return t}CurrentAudibleVoiceEntries(e){const t=[];if(this.currentVoiceEntries)if(e){for(const s of this.currentVoiceEntries)if(s.ParentVoice.Parent.IdString===e.IdString)return this.getAudibleEntries(s,t),t}else for(const s of this.currentVoiceEntries)this.getAudibleEntries(s,t);return t}getCurrentDynamicChangingExpressions(){return this.currentDynamicChangingExpressions}CurrentScoreFollowingVoiceEntries(e){const t=[];if(!this.currentVoiceEntries)return t;if(e){for(const s of this.currentVoiceEntries)if(s.ParentVoice.Parent.IdString===e.IdString)return this.getScoreFollowingEntries(s,t),t}else for(const s of this.currentVoiceEntries)this.getScoreFollowingEntries(s,t);return t}currentPlaybackSettings(){return this.musicSheet.SheetPlaybackSetting}moveToNext(){this.forwardJumpOccurred=this.backJumpOccurred=!1,!this.endReached&&(this.currentVoiceEntries&&(this.currentVoiceEntries.length=0),this.recursiveMove(),this.currentMeasure||(this.currentTimeStamp=new Fraction$1(99999,1)),this.CurrentTempoChangingExpression!==void 0&&(this.CurrentTempoChangingExpression.ContinuousTempo!==void 0?this.currentBpm=this.CurrentTempoChangingExpression.ContinuousTempo.getInterpolatedTempo(this.CurrentSourceTimestamp):this.currentBpm=this.CurrentTempoChangingExpression.InstantaneousTempo.TempoInBpm))}moveToNextVisibleVoiceEntry(e){for(;!this.endReached;)if(this.moveToNext(),this.checkEntries(e))return}resetRepetitionIterationCount(e){return 1}incrementRepetitionIterationCount(e){return this.repetitionIterationCountDictKeys.indexOf(e)===-1?this.setRepetitionIterationCount(e,1):this.setRepetitionIterationCount(e,this.getRepetitionIterationCount(e)+1)}setRepetitionIterationCount(e,t){const s=this.repetitionIterationCountDictKeys.indexOf(e);return s===-1?(this.repetitionIterationCountDictKeys.push(e),this.repetitionIterationCountDictValues.push(t)):this.repetitionIterationCountDictValues[s]=t,t}getRepetitionIterationCount(e){const t=this.repetitionIterationCountDictKeys.indexOf(e);if(t!==-1)return this.repetitionIterationCountDictValues[t]}handleRepetitionsAtMeasureBegin(){for(let e=0,t=this.currentMeasure.FirstRepetitionInstructions.length;e<t;++e){const s=this.currentMeasure.FirstRepetitionInstructions[e];if(!s.parentRepetition)continue;const r=s.parentRepetition;this.currentRepetition=r,r.StartIndex===this.currentMeasureIndex&&this.JumpResponsibleRepetition!==void 0&&r!==this.JumpResponsibleRepetition&&r.StartIndex>=this.JumpResponsibleRepetition.StartIndex&&r.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(r)}}handleRepetitionsAtMeasureEnd(){for(let e=0,t=this.currentMeasure.LastRepetitionInstructions.length;e<t;++e){const s=this.currentMeasure.LastRepetitionInstructions[e],r=s.parentRepetition;if(r){if(r.BackwardJumpInstructions.indexOf(s)>-1&&this.getRepetitionIterationCount(r)<r.UserNumberOfRepetitions){this.doBackJump(r);return}if(s===r.forwardJumpInstruction&&(this.JumpResponsibleRepetition!==void 0&&r!==this.JumpResponsibleRepetition&&r.StartIndex>=this.JumpResponsibleRepetition.StartIndex&&r.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(r),this.repetitionIterationCountDictKeys.contains(r))){const o=r.getForwardJumpTargetForIteration(this.getRepetitionIterationCount(r));if(o>=0){this.currentMeasureIndex=o,this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentVoiceEntryIndex=-1,this.jumpResponsibleRepetition=r,this.forwardJumpOccurred=!0;return}o===-2&&(this.endReached=!0)}}}this.currentMeasureIndex++,this.JumpResponsibleRepetition!==void 0&&this.currentMeasureIndex>this.JumpResponsibleRepetition.EndIndex&&(this.jumpResponsibleRepetition=void 0)}doBackJump(e){this.currentMeasureIndex=e.getBackwardJumpTarget(),this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentVoiceEntryIndex=-1,this.incrementRepetitionIterationCount(e),this.jumpResponsibleRepetition=e,this.backJumpOccurred=!0}activateCurrentRhythmInstructions(){if(this.currentMeasure!==void 0&&this.currentMeasure.FirstInstructionsStaffEntries.length>0&&this.currentMeasure.FirstInstructionsStaffEntries[0]!==void 0){const e=this.currentMeasure.FirstInstructionsStaffEntries[0].Instructions;for(let t=0,s=e.length;t<s;++t){const r=e[t];r instanceof RhythmInstruction&&(this.musicSheet.SheetPlaybackSetting.rhythm=r.Rhythm)}}}activateCurrentDynamicOrTempoInstructions(){const e=this.musicSheet.TimestampSortedDynamicExpressionsList;for(;this.currentDynamicEntryIndex>0&&(this.currentDynamicEntryIndex>=e.length||e[this.currentDynamicEntryIndex].parMultiExpression().AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentDynamicEntryIndex--;for(;this.currentDynamicEntryIndex<e.length&&e[this.currentDynamicEntryIndex].parMultiExpression().AbsoluteTimestamp.lt(this.CurrentSourceTimestamp);)this.currentDynamicEntryIndex++;for(;this.currentDynamicEntryIndex<e.length&&e[this.currentDynamicEntryIndex].parMultiExpression().AbsoluteTimestamp.Equals(this.CurrentSourceTimestamp);){const s=e[this.currentDynamicEntryIndex],r=s.staffNumber;this.CurrentSourceTimestamp.Equals(s.parMultiExpression().AbsoluteTimestamp)&&(s.continuousDynamicExpression?this.activeDynamicExpressions[r]=s.continuousDynamicExpression:s.instantaneousDynamicExpression&&(this.activeDynamicExpressions[r]=s.instantaneousDynamicExpression)),this.currentDynamicEntryIndex++}this.currentDynamicChangingExpressions.length=0;for(let s=0;s<this.activeDynamicExpressions.length;s++)if(this.activeDynamicExpressions[s]){let r,o;if(this.activeDynamicExpressions[s]instanceof ContinuousDynamicExpression){const a=this.activeDynamicExpressions[s];r=a.StartMultiExpression.AbsoluteTimestamp,o=a.EndMultiExpression.AbsoluteTimestamp,this.CurrentSourceTimestamp.gte(r)&&this.CurrentSourceTimestamp.lte(o)&&this.currentDynamicChangingExpressions.push(new DynamicsContainer(a,s))}else{const a=this.activeDynamicExpressions[s];this.CurrentSourceTimestamp.Equals(a.ParentMultiExpression.AbsoluteTimestamp)&&this.currentDynamicChangingExpressions.push(new DynamicsContainer(a,s))}}const t=this.musicSheet.TimestampSortedTempoExpressionsList;for(;this.currentTempoEntryIndex>0&&(this.currentTempoEntryIndex>=t.length||t[this.currentTempoEntryIndex].AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentTempoEntryIndex--;for(;this.currentTempoEntryIndex<t.length&&t[this.currentTempoEntryIndex].AbsoluteTimestamp.lt(this.CurrentSourceTimestamp);)this.currentTempoEntryIndex++;for(;this.currentTempoEntryIndex<t.length&&t[this.currentTempoEntryIndex].AbsoluteTimestamp.Equals(this.CurrentSourceTimestamp);)this.activeTempoExpression=t[this.currentTempoEntryIndex],this.currentTempoEntryIndex++;if(this.currentTempoChangingExpression=void 0,this.activeTempoExpression){let s=this.activeTempoExpression.AbsoluteTimestamp;this.activeTempoExpression.ContinuousTempo&&(s=this.activeTempoExpression.ContinuousTempo.AbsoluteEndTimestamp),(this.CurrentSourceTimestamp.gte(this.activeTempoExpression.AbsoluteTimestamp)||this.CurrentSourceTimestamp.lte(s))&&(this.currentTempoChangingExpression=this.activeTempoExpression)}}recursiveMove(){if(this.currentVoiceEntryIndex++,this.currentVoiceEntryIndex===0&&(this.handleRepetitionsAtMeasureBegin(),this.activateCurrentRhythmInstructions()),this.currentVoiceEntryIndex>=0&&this.currentVoiceEntryIndex<this.currentMeasure.VerticalSourceStaffEntryContainers.length){const e=this.currentMeasure.VerticalSourceStaffEntryContainers[this.currentVoiceEntryIndex];this.currentVoiceEntries=this.getVoiceEntries(e),this.currentVerticalContainerInMeasureTimestamp=e.Timestamp,this.currentTimeStamp=Fraction$1.plus(this.currentMeasure.AbsoluteTimestamp,this.currentVerticalContainerInMeasureTimestamp);const t=this.musicSheet.SelectionEnd;t&&this.currentTimeStamp.gte(t)&&(this.endReached=!0),this.activateCurrentDynamicOrTempoInstructions();return}if(this.currentEnrolledMeasureTimestamp.Add(this.currentMeasure.Duration),this.handleRepetitionsAtMeasureEnd(),this.currentMeasureIndex>=0&&this.currentMeasureIndex<this.musicSheet.SourceMeasures.length){this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentTimeStamp=Fraction$1.plus(this.currentMeasure.AbsoluteTimestamp,this.currentVerticalContainerInMeasureTimestamp),this.currentVoiceEntryIndex=-1,this.recursiveMove();return}this.currentVerticalContainerInMeasureTimestamp=new Fraction$1,this.currentMeasure=void 0,this.currentVoiceEntries=void 0,this.endReached=!0}checkEntries(e){const t=this.CurrentVisibleVoiceEntries();if(t.length>0){if(!e)return!0;for(let s=0,r=t.length;s<r;++s)if(t[s].Notes[0].Pitch)return!0}return!1}getVisibleEntries(e,t){e.ParentVoice.Visible&&t.push(e)}getAudibleEntries(e,t){if(e.hasTie()){const s=e.Notes[0];if(s.NoteTie!==void 0&&s.NoteTie.StartNote!==s)return}e.ParentVoice.Audible&&t.push(e)}getScoreFollowingEntries(e,t){e.ParentVoice.Following&&e.ParentVoice.Parent.Following&&t.push(e)}getVoiceEntries(e){var s,r;const t=[];for(const o of e.StaffEntries)(r=(s=o==null?void 0:o.ParentStaff)==null?void 0:s.ParentInstrument)!=null&&r.Visible&&o.VoiceEntries[0]&&t.push(...o.VoiceEntries);return t}}class Cursor{constructor(e,t,s){this.hidden=!1,this.currentPageNumber=1,this.container=e,this.openSheetMusicDisplay=t,this.rules=this.openSheetMusicDisplay.EngravingRules,this.cursorOptions=s;let r=0;for(this.cursorElementId="cursorImg-0";document.getElementById(this.cursorElementId);)r++,this.cursorElementId=`cursorImg-${r}`;const o=document.createElement("img");o.id=this.cursorElementId,o.style.position="absolute",this.cursorOptions.follow===!0?(this.wantedZIndex="-1",o.style.zIndex=this.wantedZIndex):(this.wantedZIndex="-2",o.style.zIndex=this.wantedZIndex),this.cursorElement=o,this.container.appendChild(o)}cursorPositionChanged(e,t){for(;this.iterator.CurrentEnrolledTimestamp.lt(e);)this.iterator.moveToNext();this.iterator.CurrentEnrolledTimestamp.gt(e)&&(this.iterator=new MusicPartManagerIterator(this.manager.MusicSheet,e)),this.updateWithTimestamp(t.PredictedPosition)}pauseOccurred(e){}setSound(){}selectionEndReached(e){}resetOccurred(e){this.reset()}notesPlaybackEventOccurred(e){}adjustToBackgroundColor(){let e;this.rules.PageBackgroundColor?e="1":e=this.wantedZIndex,this.cursorElement.style.zIndex=e}init(e,t){this.manager=e,this.graphic=t,this.reset(),this.hidden=!1}show(){this.hidden=!1,this.update(),this.adjustToBackgroundColor()}resetIterator(){if(!this.openSheetMusicDisplay.Sheet||!this.openSheetMusicDisplay.Sheet.SourceMeasures){console.log("OSMD.Cursor.resetIterator(): sheet or measures were null/undefined.");return}const e=this.openSheetMusicDisplay.Sheet.SourceMeasures.length-1;let t=this.rules.MinMeasureToDrawIndex;t=Math.min(t,e);let s=this.rules.MaxMeasureToDrawIndex;if(s=Math.min(s,e),this.openSheetMusicDisplay.Sheet&&(!this.openSheetMusicDisplay.Sheet.SelectionStart||this.openSheetMusicDisplay.Sheet.SelectionStart.WholeValue<t)&&this.openSheetMusicDisplay.Sheet.SourceMeasures.length>t&&(this.openSheetMusicDisplay.Sheet.SelectionStart=this.openSheetMusicDisplay.Sheet.SourceMeasures[t].AbsoluteTimestamp),this.openSheetMusicDisplay.Sheet&&this.openSheetMusicDisplay.Sheet.SourceMeasures.length>s){const o=this.openSheetMusicDisplay.Sheet.SourceMeasures[s];this.openSheetMusicDisplay.Sheet.SelectionEnd=Fraction$1.plus(o.AbsoluteTimestamp,o.Duration)}this.iterator=this.manager.getIterator()}getStaffEntryFromVoiceEntry(e){const t=e.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure.measureListIndex,s=e.ParentSourceStaffEntry.ParentStaff.idInMusicSheet;return this.graphic.findGraphicalStaffEntryFromMeasureList(s,t,e.ParentSourceStaffEntry)}updateWithTimestamp(e){const t=this.manager.absoluteEnrolledToSheetTimestamp(e),s=this.graphic.calculateXPositionFromTimestamp(t),r=s[0],o=s[1];this.updateCurrentPageFromSystem(o);const a=s[2];if(!a)return;const l=Math.max(a.parentMeasure.MeasureNumber,1);let c;for(const g of this.graphic.MeasureList[l-1])if(g){c=g;break}const d=this.graphic.calculateCursorPoints(r,o),m=d[0].y,u=d[1].y-m;if(c){if(this.updateWidthAndStyle(c.PositionAndShape,r,m,u),this.openSheetMusicDisplay.FollowCursor){const g=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:g<1e3?"smooth":"auto",block:"center"})}this.cursorElement.style.display=""}}update(){if(this.hidden||this.hidden===void 0||this.hidden===null)return;this.updateCurrentPage();const e=this.Iterator,t=e.CurrentVisibleVoiceEntries();if(e.EndReached||!e.CurrentVoiceEntries||t.length===0)return;let s=0,r=0,o=0,a;if(e.CurrentMeasure.isReducedToMultiRest){const m=this.graphic.findGraphicalMeasure(e.CurrentMeasureIndex,0),u=m.parentSourceMeasure.multipleRestMeasures,b=e.CurrentMeasure.multipleRestMeasureNumber/(u+1),y=m.PositionAndShape.Size.width-m.beginInstructionsWidth;s=m.PositionAndShape.AbsolutePosition.x+m.beginInstructionsWidth+b*y,a=m.ParentMusicSystem}else{const u=t.map(g=>this.getStaffEntryFromVoiceEntry(g)).sort((g,b)=>{var y,S,v,x;return((S=(y=g==null?void 0:g.PositionAndShape)==null?void 0:y.AbsolutePosition)==null?void 0:S.x)<=((x=(v=b==null?void 0:b.PositionAndShape)==null?void 0:v.AbsolutePosition)==null?void 0:x.x)?-1:1})[0];u&&(s=u.PositionAndShape.AbsolutePosition.x,a=u.parentMeasure.ParentMusicSystem)}if(!a)return;r=a.PositionAndShape.AbsolutePosition.y+a.StaffLines[0].PositionAndShape.RelativePosition.y;const l=a.StaffLines[a.StaffLines.length-1];o=a.PositionAndShape.AbsolutePosition.y+l.PositionAndShape.RelativePosition.y+l.StaffHeight-r;const d=this.graphic.findGraphicalMeasure(e.CurrentMeasureIndex,0).PositionAndShape;if(this.updateWidthAndStyle(d,s,r,o),this.openSheetMusicDisplay.FollowCursor&&this.cursorOptions.follow)if(this.openSheetMusicDisplay.EngravingRules.RenderSingleHorizontalStaffline)this.cursorElement.scrollIntoView({behavior:"smooth",inline:"center"});else{const m=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:m<1e3?"smooth":"auto",block:"center"})}this.cursorElement.style.display=""}updateWidthAndStyle(e,t,s,r){var c;const o=this.cursorElement;let a=0,l=r;switch(this.cursorOptions.type){case 1:o.style.top=s*10*this.openSheetMusicDisplay.zoom+"px",o.style.left=(t-1.5)*10*this.openSheetMusicDisplay.zoom+"px",l=r*10*this.openSheetMusicDisplay.zoom,o.height=l,o.style.height=l+"px",a=5*this.openSheetMusicDisplay.zoom;break;case 2:o.style.top=(s-2.5)*10*this.openSheetMusicDisplay.zoom+"px",o.style.left=t*10*this.openSheetMusicDisplay.zoom+"px",l=1.5*10*this.openSheetMusicDisplay.zoom,o.height=l,o.style.height=l+"px",a=5*this.openSheetMusicDisplay.zoom;break;case 3:o.style.top=e.AbsolutePosition.y*10*this.openSheetMusicDisplay.zoom+"px",o.style.left=e.AbsolutePosition.x*10*this.openSheetMusicDisplay.zoom+"px",l=r*10*this.openSheetMusicDisplay.zoom,o.height=l,o.style.height=l+"px",a=e.Size.width*10*this.openSheetMusicDisplay.zoom;break;case 4:o.style.top=e.AbsolutePosition.y*10*this.openSheetMusicDisplay.zoom+"px",o.style.left=e.AbsolutePosition.x*10*this.openSheetMusicDisplay.zoom+"px",l=r*10*this.openSheetMusicDisplay.zoom,o.height=l,o.style.height=l+"px",a=(t-e.AbsolutePosition.x)*10*this.openSheetMusicDisplay.zoom;break;default:o.style.top=s*10*this.openSheetMusicDisplay.zoom+"px",o.style.left=(t-1.5)*10*this.openSheetMusicDisplay.zoom+"px",l=r*10*this.openSheetMusicDisplay.zoom,o.height=l,o.style.height=l+"px",a=3*10*this.openSheetMusicDisplay.zoom;break}(c=window.GYM)!=null&&c.multitrack&&(o.height=l+24,o.style.height=l+24+"px"),a!==o.width&&(o.width=a,this.updateStyle(a,this.cursorOptions))}hide(){this.cursorElement.style.display="none",this.hidden=!0}next(){this.Iterator.moveToNextVisibleVoiceEntry(!1),this.update()}reset(){this.resetIterator();const e=this.manager.getIterator(this.graphic.ParentMusicSheet.SelectionStart);this.updateWithTimestamp(e.CurrentEnrolledTimestamp)}updateStyle(e,t=void 0){t!==void 0&&(this.cursorOptions=t);const s=document.createElement("canvas");s.width=this.cursorElement.width,s.height=1;const r=s.getContext("2d");r.globalAlpha=this.cursorOptions.alpha;const o=r.createLinearGradient(0,0,this.cursorElement.width,0);switch(this.cursorOptions.type){case 1:case 2:case 3:case 4:o.addColorStop(1,this.cursorOptions.color);break;default:o.addColorStop(0,"white"),o.addColorStop(.2,this.cursorOptions.color),o.addColorStop(.8,this.cursorOptions.color),o.addColorStop(1,"white");break}r.fillStyle=o,r.fillRect(0,0,e,1),this.cursorElement.src=s.toDataURL("image/png")}get Iterator(){return this.iterator}get Hidden(){return this.hidden}VoicesUnderCursor(e){return this.Iterator.CurrentVisibleVoiceEntries(e)}NotesUnderCursor(e){const t=this.VoicesUnderCursor(e),s=[];return t.forEach(r=>{s.push.apply(s,r.Notes)}),s}GNotesUnderCursor(e){const t=this.VoicesUnderCursor(e),s=[];return t.forEach(r=>{s.push(...r.Notes.map(o=>this.rules.GNote(o)))}),s}updateCurrentPage(){const e=this.Iterator.currentTimeStamp;for(const t of this.graphic.MusicPages)if(t.MusicSystems.last().GetSystemsLastTimeStamp().gt(e)){const r=t.PageNumber;return r!==this.currentPageNumber&&(this.container.removeChild(this.cursorElement),this.container=document.getElementById(this.rules.DYContainerId+r),this.container.appendChild(this.cursorElement)),this.currentPageNumber=r}return 1}updateCurrentPageFromSystem(e){if(e!=null&&e.Parent){const t=e.Parent.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}}class PointF2D{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}static get Empty(){return new PointF2D}static pointsAreEqual(e,t){return e.x===t.x&&e.y===t.y}ToString(){return"["+this.x+", "+this.y+"]"}}class SizeF2D{constructor(e=0,t=0){this.width=e,this.height=t}}class RectangleF2D{constructor(e,t,s,r){this.x=0,this.y=0,this.width=0,this.height=0,this.x=e,this.y=t,this.width=s,this.height=r}static createFromLocationAndSize(e,t){return new RectangleF2D(e.x,e.y,t.width,t.height)}get Location(){return new PointF2D(this.x,this.y)}get Size(){return new SizeF2D(this.width,this.height)}}class AClassHierarchyTrackable{isInstanceOfClass(e){let t=this.constructor.prototype;for(;t;){if(e===t.constructor.name)return!0;t=t.__proto__}return!1}}class GraphicalObject extends AClassHierarchyTrackable{get PositionAndShape(){return this.boundingBox}set PositionAndShape(e){this.boundingBox=e}}class StaffLineActivitySymbol extends GraphicalObject{constructor(e){super(),this.parentStaffLine=e;const t=e.PositionAndShape;this.boundingBox=new BoundingBox$1(this,t),this.boundingBox.BorderRight=6,this.boundingBox.BorderBottom=4.5,this.boundingBox.BorderLeft=-1.5,this.boundingBox.BorderTop=-1.5}}class Clickable extends GraphicalObject{}let BoundingBox$1=class{constructor(e=void 0,t=void 0,s=!1){this.isSymbol=!1,this.relativePositionHasBeenSet=!1,this.xBordersHaveBeenSet=!1,this.yBordersHaveBeenSet=!1,this.absolutePosition=new PointF2D,this.relativePosition=new PointF2D,this.size=new SizeF2D,this.marginSize=new SizeF2D,this.upperLeftCorner=new PointF2D,this.upperLeftMarginCorner=new PointF2D,this.borderLeft=0,this.borderRight=0,this.borderTop=0,this.borderBottom=0,this.borderMarginLeft=0,this.borderMarginRight=0,this.borderMarginTop=0,this.borderMarginBottom=0,this.childElements=[],this.parent=t,this.dataObject=e,this.isSymbol=s,this.xBordersHaveBeenSet=!1,this.yBordersHaveBeenSet=!1,t&&(this.Parent=t)}get RelativePositionHasBeenSet(){return this.relativePositionHasBeenSet}get XBordersHaveBeenSet(){return this.xBordersHaveBeenSet}set XBordersHaveBeenSet(e){this.xBordersHaveBeenSet=e}get YBordersHaveBeenSet(){return this.yBordersHaveBeenSet}set YBordersHaveBeenSet(e){this.yBordersHaveBeenSet=e}get AbsolutePosition(){return this.absolutePosition}set AbsolutePosition(e){this.absolutePosition=e}get RelativePosition(){return this.relativePosition}set RelativePosition(e){this.relativePosition=e,this.relativePositionHasBeenSet=!0}get Size(){return this.size}set Size(e){this.size=e}get MarginSize(){return this.marginSize}get UpperLeftCorner(){return this.upperLeftCorner}get UpperLeftMarginCorner(){return this.upperLeftMarginCorner}get BorderLeft(){return this.borderLeft}set BorderLeft(e){this.borderLeft=e,this.calculateRectangle()}get BorderRight(){return this.borderRight}set BorderRight(e){this.borderRight=e,this.calculateRectangle()}get BorderTop(){return this.borderTop}set BorderTop(e){this.borderTop=e,this.calculateRectangle()}get BorderBottom(){return this.borderBottom}set BorderBottom(e){this.borderBottom=e,this.calculateRectangle()}get BorderMarginLeft(){return this.borderMarginLeft>this.borderLeft?this.borderLeft:this.borderMarginLeft}set BorderMarginLeft(e){this.borderMarginLeft=e,this.calculateMarginRectangle()}get BorderMarginRight(){return this.borderMarginRight<this.borderRight?this.borderRight:this.borderMarginRight}set BorderMarginRight(e){this.borderMarginRight=e,this.calculateMarginRectangle()}get BorderMarginTop(){return this.borderMarginTop>this.borderTop?this.borderTop:this.borderMarginTop}set BorderMarginTop(e){this.borderMarginTop=e,this.calculateMarginRectangle()}get BorderMarginBottom(){return this.borderMarginBottom<this.borderBottom?this.borderBottom:this.borderMarginBottom}set BorderMarginBottom(e){this.borderMarginBottom=e,this.calculateMarginRectangle()}get BoundingRectangle(){return this.boundingRectangle}get BoundingMarginRectangle(){return this.boundingMarginRectangle}get ChildElements(){return this.childElements}set ChildElements(e){this.childElements=e}get Parent(){return this.parent}set Parent(e){var t,s,r,o;if(this.parent){const a=this.parent.ChildElements.indexOf(this,0);a>-1&&this.parent.ChildElements.splice(a,1)}this.parent=e,((s=(t=this.parent)==null?void 0:t.ChildElements)==null?void 0:s.indexOf(this))>-1?loglevelExports.error("BoundingBox of "+this.dataObject.constructor.name+" already in children list of "+this.parent.dataObject.constructor.name+"'s BoundingBox"):(o=(r=this.parent)==null?void 0:r.ChildElements)==null||o.push(this)}get DataObject(){return this.dataObject}get Center(){return new 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 e=this.parent;for(;e;)this.absolutePosition.x+=e.relativePosition.x,this.absolutePosition.y+=e.relativePosition.y,e=e.parent}calculateAbsolutePositionsRecursiveWithoutTopelement(){this.absolutePosition.x=0,this.absolutePosition.y=0;for(let e=0,t=this.ChildElements.length;e<t;++e)this.ChildElements[e].calculateAbsolutePositionsRecursive(this.absolutePosition.x,this.absolutePosition.y)}calculateAbsolutePositionsRecursive(e,t){this.absolutePosition.x=this.relativePosition.x+e,this.absolutePosition.y=this.relativePosition.y+t;for(let s=0,r=this.ChildElements.length;s<r;++s)this.ChildElements[s].calculateAbsolutePositionsRecursive(this.absolutePosition.x,this.absolutePosition.y)}calculateAbsolutePositionsOfChildren(){for(let e=0,t=this.ChildElements.length;e<t;++e)this.ChildElements[e].calculateAbsolutePositionsRecursive(this.absolutePosition.x,this.absolutePosition.y)}calculateBoundingBox(){if(this.childElements.length===0)return;for(let d=0,m=this.ChildElements.length;d<m;++d)this.ChildElements[d].calculateBoundingBox();let e=Number.MAX_VALUE,t=Number.MIN_VALUE,s=Number.MAX_VALUE,r=Number.MIN_VALUE,o=Number.MAX_VALUE,a=Number.MIN_VALUE,l=Number.MAX_VALUE,c=Number.MIN_VALUE;this.isSymbol&&(e=this.borderLeft,t=this.borderRight,s=this.borderTop,r=this.borderBottom,o=this.borderMarginLeft,a=this.borderMarginRight,l=this.borderMarginTop,c=this.borderMarginBottom);for(let d=0,m=this.ChildElements.length;d<m;++d){const u=this.ChildElements[d];e=Math.min(e,u.relativePosition.x+u.borderLeft),t=Math.max(t,u.relativePosition.x+u.borderRight),s=Math.min(s,u.relativePosition.y+u.borderTop),r=Math.max(r,u.relativePosition.y+u.borderBottom),o=Math.min(o,u.relativePosition.x+u.borderMarginLeft),a=Math.max(a,u.relativePosition.x+u.borderMarginRight),l=Math.min(l,u.relativePosition.y+u.borderMarginTop),c=Math.max(c,u.relativePosition.y+u.borderMarginBottom)}this.borderLeft=e,this.borderRight=t,this.borderTop=s,this.borderBottom=r,this.borderMarginLeft=o,this.borderMarginRight=a,this.borderMarginTop=l,this.borderMarginBottom=c,this.calculateRectangle(),this.calculateMarginRectangle(),this.xBordersHaveBeenSet=!0,this.yBordersHaveBeenSet=!0}calculateTopBottomBorders(){if(this.childElements.length===0)return;for(let o=0,a=this.ChildElements.length;o<a;++o)this.ChildElements[o].calculateTopBottomBorders();let e=Number.MAX_VALUE,t=Number.MIN_VALUE,s=Number.MAX_VALUE,r=Number.MIN_VALUE;this.yBordersHaveBeenSet&&(e=this.borderTop,t=this.borderBottom,s=this.borderMarginTop,r=this.borderMarginBottom);for(let o=0,a=this.ChildElements.length;o<a;++o){const l=this.ChildElements[o];e=Math.min(e,l.relativePosition.y+l.borderTop),(!EngravingRules.FixStafflineBoundingBox||!(l.dataObject instanceof StaffLineActivitySymbol))&&(t=Math.max(t,l.relativePosition.y+l.borderBottom)),s=Math.min(s,l.relativePosition.y+l.borderMarginTop),r=Math.max(r,l.relativePosition.y+l.borderMarginBottom)}this.borderTop=e,this.borderBottom=t,this.borderMarginTop=s,this.borderMarginBottom=r,this.calculateRectangle(),this.calculateMarginRectangle()}computeNonOverlappingPositionWithMargin(e,t,s){this.RelativePosition=new PointF2D(s.x,s.y),this.setAbsolutePositionFromParent();let r=0,o=!1;do switch(t){case 0:case 1:r=this.relativePosition.x,e.calculateMarginPositionAlongDirection(this,t),o=Math.abs(r-this.relativePosition.x)>.001;break;case 2:case 3:r=this.relativePosition.y,e.calculateMarginPositionAlongDirection(this,t),o=Math.abs(r-this.relativePosition.y)>.001;break;default:throw new ArgumentOutOfRangeException("direction")}while(o)}collisionDetection(e){const t=Math.min(this.AbsolutePosition.x+this.borderRight,e.absolutePosition.x+e.borderRight)-Math.max(this.AbsolutePosition.x+this.borderLeft,e.absolutePosition.x+e.borderLeft),s=Math.min(this.AbsolutePosition.y+this.borderBottom,e.absolutePosition.y+e.borderBottom)-Math.max(this.AbsolutePosition.y+this.borderTop,e.absolutePosition.y+e.borderTop);return t>0&&s>0}liesInsideBorders(e){const t=this.AbsolutePosition.x+this.borderLeft<=e.absolutePosition.x+e.borderLeft&&e.absolutePosition.x+e.borderLeft<=this.AbsolutePosition.x+this.borderRight,s=this.AbsolutePosition.x+this.borderLeft<=e.absolutePosition.x+e.borderRight&&e.absolutePosition.x+e.borderRight<=this.AbsolutePosition.x+this.borderRight;if(t&&s){const r=this.AbsolutePosition.y+this.borderTop<=e.absolutePosition.y+e.borderTop&&e.absolutePosition.y+e.borderTop<=this.AbsolutePosition.y+this.borderBottom,o=this.AbsolutePosition.y+this.borderTop<=e.absolutePosition.y+e.borderBottom&&e.absolutePosition.y+e.borderBottom<=this.AbsolutePosition.y+this.borderBottom;if(r&&o)return!0}return!1}pointLiesInsideBorders(e){return this.AbsolutePosition.x+this.borderLeft<=e.x&&e.x<=this.AbsolutePosition.x+this.borderRight&&this.AbsolutePosition.y+this.borderTop<=e.y&&e.y<=this.AbsolutePosition.y+this.borderBottom}marginCollisionDetection(e){const t=Math.min(this.AbsolutePosition.x+this.borderMarginRight,e.absolutePosition.x+e.borderMarginRight)-Math.max(this.AbsolutePosition.x+this.borderMarginLeft,e.absolutePosition.x+e.borderMarginLeft),s=Math.min(this.AbsolutePosition.y+this.borderMarginBottom,e.absolutePosition.y+e.borderMarginBottom)-Math.max(this.AbsolutePosition.y+this.borderMarginTop,e.absolutePosition.y+e.borderMarginTop);return t>0&&s>0}liesInsideMargins(e){const t=this.AbsolutePosition.x+this.borderMarginLeft<=e.absolutePosition.x+e.borderMarginLeft&&e.absolutePosition.x+e.borderMarginLeft<=this.AbsolutePosition.x+this.borderMarginRight,s=this.AbsolutePosition.x+this.borderMarginLeft<=e.absolutePosition.x+e.borderMarginRight&&e.absolutePosition.x+e.borderMarginRight<=this.AbsolutePosition.x+this.borderMarginRight;if(t&&s){const r=this.AbsolutePosition.y+this.borderMarginTop<=e.absolutePosition.y+e.borderMarginTop&&e.absolutePosition.y+e.borderMarginTop<=this.AbsolutePosition.y+this.borderMarginBottom,o=this.AbsolutePosition.y+this.borderMarginTop<=e.absolutePosition.y+e.borderMarginBottom&&e.absolutePosition.y+e.borderMarginBottom<=this.AbsolutePosition.y+this.borderMarginBottom;if(r&&o)return!0}return!1}pointLiesInsideMargins(e){return this.AbsolutePosition.x+this.borderMarginLeft<=e.x&&e.x<=this.AbsolutePosition.x+this.borderMarginRight&&this.AbsolutePosition.y+this.borderMarginTop<=e.y&&e.y<=this.AbsolutePosition.y+this.borderMarginBottom}computeNonOverlappingPosition(e,t,s){this.RelativePosition=new PointF2D(s.x,s.y),this.setAbsolutePositionFromParent();let r=0,o=!1;do switch(t){case 0:case 1:r=this.relativePosition.x,e.calculatePositionAlongDirection(this,t),o=Math.abs(r-this.relativePosition.x)>1e-4;break;case 2:case 3:r=this.relativePosition.y,e.calculatePositionAlongDirection(this,t),o=Math.abs(r-this.relativePosition.y)>1e-4;break;default:throw new ArgumentOutOfRangeException("direction")}while(o)}getClickedObjectOfType(e){const t=this.dataObject;if(this.pointLiesInsideBorders(e)&&t)return t;for(let s=0,r=this.childElements.length;s<r;++s){const a=this.childElements[s].getClickedObjectOfType(e);if(a)return a}}getClickedClickable(e){const t=this.dataObject;if(this.pointLiesInsideBorders(e)&&t&&t instanceof Clickable)return t;for(let s=0,r=this.childElements.length;s<r;++s){const a=this.childElements[s].getClickedClickable(e);if(a&&a instanceof Clickable)return a}}getObjectsInRegion(e,t=!0,s=GraphicalObject.name){let r=[];for(const o of this.childElements)r=r.concat(o.getObjectsInRegion(e,t,s));return this.dataObject&&this.dataObject.isInstanceOfClass(s)&&(t?e.liesInsideBorders(this)&&r.push(this.dataObject):e.collisionDetection(this)&&r.push(this.dataObject)),r}calculateRectangle(){this.upperLeftCorner=new PointF2D(this.BorderLeft,this.BorderTop),this.size=new SizeF2D(this.BorderRight-this.BorderLeft,this.BorderBottom-this.BorderTop),this.boundingRectangle=RectangleF2D.createFromLocationAndSize(this.upperLeftCorner,this.size)}calculateMarginRectangle(){this.upperLeftMarginCorner=new PointF2D(this.BorderMarginLeft,this.BorderMarginTop),this.marginSize=new SizeF2D(this.BorderMarginRight-this.BorderMarginLeft,this.BorderMarginBottom-this.BorderMarginTop),this.boundingMarginRectangle=RectangleF2D.createFromLocationAndSize(this.upperLeftMarginCorner,this.marginSize)}calculateMarginPositionAlongDirection(e,t){if(this!==e){if(this.isSymbol&&this.marginCollisionDetection(e)){let s=0;switch(t){case 0:s=this.absolutePosition.x+this.borderMarginLeft-(e.absolutePosition.x+e.borderMarginRight),e.relativePosition.x+=s,e.absolutePosition.x+=s;return;case 1:s=this.absolutePosition.x+this.borderMarginRight-(e.absolutePosition.x+e.borderMarginLeft),e.relativePosition.x+=s,e.absolutePosition.x+=s;return;case 2:s=this.absolutePosition.y+this.borderMarginTop-(e.absolutePosition.y+e.borderMarginBottom),e.relativePosition.y+=s,e.absolutePosition.y+=s;return;case 3:s=this.absolutePosition.y+this.borderMarginBottom-(e.absolutePosition.y+e.borderMarginTop),e.relativePosition.y+=s,e.absolutePosition.y+=s;return;default:throw new ArgumentOutOfRangeException("direction")}}for(let s=0,r=this.ChildElements.length;s<r;++s)this.ChildElements[s].calculateMarginPositionAlongDirection(e,t)}}calculatePositionAlongDirection(e,t){if(this!==e){if(this.isSymbol&&this.collisionDetection(e)){let s;switch(t){case 0:s=this.absolutePosition.x+this.borderLeft-(e.absolutePosition.x+e.borderRight),e.relativePosition.x+=s,e.absolutePosition.x+=s;return;case 1:s=this.absolutePosition.x+this.borderRight-(e.absolutePosition.x+e.borderLeft),e.relativePosition.x+=s,e.absolutePosition.x+=s;return;case 2:s=this.absolutePosition.y+this.borderTop-(e.absolutePosition.y+e.borderBottom),e.relativePosition.y+=s,e.absolutePosition.y+=s;return;case 3:s=this.absolutePosition.y+this.borderBottom-(e.absolutePosition.y+e.borderTop),e.relativePosition.y+=s,e.absolutePosition.y+=s;return;default:throw new ArgumentOutOfRangeException("direction")}}for(let s=0,r=this.ChildElements.length;s<r;++s)this.ChildElements[s].calculatePositionAlongDirection(e,t)}}};var ColDirEnum=(i=>(i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.Up=2]="Up",i[i.Down=3]="Down",i))(ColDirEnum||{});class GraphicalMusicPage extends GraphicalObject{constructor(e){super(),this.musicSystems=[],this.labels=[],this.parent=e,this.boundingBox=new BoundingBox$1(this,void 0)}get MusicSystems(){return this.musicSystems}set MusicSystems(e){this.musicSystems=e}get Labels(){return this.labels}set Labels(e){this.labels=e}get Parent(){return this.parent}set Parent(e){this.parent=e}get PageNumber(){return this.pageNumber}set PageNumber(e){this.pageNumber=e}setMusicPageAbsolutePosition(e,t){return new PointF2D(0,0)}}var PagePlacementEnum=(i=>(i[i.Down=0]="Down",i[i.Right=1]="Right",i[i.RightDown=2]="RightDown",i))(PagePlacementEnum||{}),TextAlignmentEnum=(i=>(i[i.LeftTop=0]="LeftTop",i[i.LeftCenter=1]="LeftCenter",i[i.LeftBottom=2]="LeftBottom",i[i.CenterTop=3]="CenterTop",i[i.CenterCenter=4]="CenterCenter",i[i.CenterBottom=5]="CenterBottom",i[i.RightTop=6]="RightTop",i[i.RightCenter=7]="RightCenter",i[i.RightBottom=8]="RightBottom",i))(TextAlignmentEnum||{});class TextAlignment{static IsLeft(e){return e===0||e===1||e===2}static IsCenterAligned(e){return e===3||e===4||e===5}static IsRight(e){return e===6||e===7||e===8}}var FontStyles=(i=>(i[i.Regular=0]="Regular",i[i.Bold=1]="Bold",i[i.Italic=2]="Italic",i[i.BoldItalic=3]="BoldItalic",i[i.Underlined=4]="Underlined",i))(FontStyles||{}),Fonts=(i=>(i[i.TimesNewRoman=0]="TimesNewRoman",i[i.Kokila=1]="Kokila",i[i.Gonville=2]="Gonville",i))(Fonts||{});const FontStringNames={0:"Times New Roman",1:"Kokila",2:"Gonville"};var TieTypes=(i=>(i.SIMPLE="",i.HAMMERON="H",i.PULLOFF="P",i.SLIDE="S",i.TAPPING="T",i))(TieTypes||{});const Additional={"-2":[4,12,23],"-7":[13],"-9":[6]};var NoteEnum=(i=>(i[i.C=0]="C",i[i.D=2]="D",i[i.E=4]="E",i[i.F=5]="F",i[i.G=7]="G",i[i.A=9]="A",i[i.B=11]="B",i))(NoteEnum||{}),AccidentalEnum=(i=>(i[i.SHARP=0]="SHARP",i[i.FLAT=1]="FLAT",i[i.NONE=2]="NONE",i[i.NATURAL=3]="NATURAL",i[i.DOUBLESHARP=4]="DOUBLESHARP",i[i.DOUBLEFLAT=5]="DOUBLEFLAT",i[i.TRIPLESHARP=6]="TRIPLESHARP",i[i.TRIPLEFLAT=7]="TRIPLEFLAT",i[i.QUARTERTONESHARP=8]="QUARTERTONESHARP",i[i.QUARTERTONEFLAT=9]="QUARTERTONEFLAT",i[i.SLASHFLAT=10]="SLASHFLAT",i[i.THREEQUARTERSSHARP=11]="THREEQUARTERSSHARP",i[i.THREEQUARTERSFLAT=12]="THREEQUARTERSFLAT",i[i.SLASHQUARTERSHARP=13]="SLASHQUARTERSHARP",i[i.SLASHSHARP=14]="SLASHSHARP",i[i.DOUBLESLASHFLAT=15]="DOUBLESLASHFLAT",i[i.SORI=16]="SORI",i[i.KORON=17]="KORON",i))(AccidentalEnum||{});const _Pitch=class{constructor(i,e,t,s=void 0){this.accidental=2,this.fundamentalNote=i,this.octave=e,this.accidental=t,this.accidentalXml=s,this.halfTone=i+(e+_Pitch.octXmlDiff)*12+_Pitch.HalfTonesFromAccidental(t),this.frequency=_Pitch.calcFrequency(this),this.nextFrequency=_Pitch.calcFrequency(this,"next"),this.prevFrequency=_Pitch.calcFrequency(this,"prev")}static getNoteEnumString(i){switch(i){case 0:return"C";case 2:return"D";case 4:return"E";case 5:return"F";case 7:return"G";case 9:return"A";case 11:return"B";default:return""}}static lineShiftFromNoteEnum(i,e){if(e===0)return[i,0];const t=_Pitch.pitchEnumValues,s=t.indexOf(i);let r=0,o=(s+e)%t.length;return s+e>t.length-1&&(r=1),o<0&&(o=t.length+o,r=-1),[t[o],r]}static CalculateTransposedHalfTone(i,e){const t=i.fundamentalNote+i.AccidentalHalfTones+e;return _Pitch.WrapAroundCheck(t,12)}static WrapAroundCheck(i,e){let t=0;for(;i<0;)i+=e,t--;for(;i>=e;)i-=e,t++;return{overflow:t,halftone:i}}static calcFrequency(i,e){let t=0,s;if(i instanceof _Pitch){const l=i;t=l.octave-1,s=l.fundamentalNote-9+l.AccidentalHalfTones}else typeof i=="number"&&(s=i-57);const r=window.DYSubjectId;let o=0;window.DYEnvironment==="COLEXIU"&&(Additional[12]=[120]);for(const l in Additional)if(Object.prototype.hasOwnProperty.call(Additional,l)&&Additional[l].includes(r)){o=parseFloat(l);break}let a=s+o;return e==="next"&&a++,e==="prev"&&a--,442*Math.pow(2,t)*Math.pow(2,a/12)}static calcFractionalKey(i){return Math.log(i/440)/Math.LN10*_Pitch.halftoneFactor+57}static fromFrequency(i){const e=_Pitch.calcFractionalKey(i)+.5,t=Math.floor(e/12)-_Pitch.octXmlDiff,s=Math.floor(e)%12;let r=s,o=2;return this.pitchEnumValues.indexOf(r)===-1&&(r=s-1,o=0),new _Pitch(r,t,o)}static fromHalftone(i){const e=Math.floor(i/12)-_Pitch.octXmlDiff,t=i%12;let s=t,r=2;return this.pitchEnumValues.indexOf(s)===-1&&(s=t-1,r=0),new _Pitch(s,e,r)}static ceiling(i){i=i%12;let e=i;return this.pitchEnumValues.indexOf(e)===-1&&(e=i+1),e}static floor(i){i=i%12;let e=i;return this.pitchEnumValues.indexOf(e)===-1&&(e=i-1),e}static HalfTonesFromAccidental(i){switch(i){case 2:return 0;case 0:return 1;case 1:return-1;case 3:return 0;case 4:return 2;case 5:return-2;case 6:return 3;case 7:return-3;case 8:return .5;case 9:return-.5;case 10:return-.51;case 11:return 1.5;case 12:return-1.5;case 13:return .0013;case 14:return .0014;case 15:return-.0015;case 16:return .0016;case 17:return .0017;default:throw new Error("Unhandled AccidentalEnum value")}}static AccidentalFromHalfTones(i){switch(i){case 0:return 2;case 1:return 0;case-1:return 1;case 2:return 4;case-2:return 5;case 3:return 6;case-3:return 7;case .5:return 8;case-.5:return 9;case 1.5:return 11;case-1.5:return 12;default:return i>0&&i<1?8:i<0&&i>-1?9:8}}static accidentalVexflow(i){let e;switch(i){case 3:e="n";break;case 1:e="b";break;case 0:e="#";break;case 4:e="##";break;case 6:e="###";break;case 5:e="bb";break;case 7:e="bbs";break;case 8:e="+";break;case 9:e="d";break;case 10:e="bs";break;case 11:e="++";break;case 12:e="db";break;case 13:e="+-";break;case 14:e="++-";break;case 15:e="bss";break;case 16:e="o";break;case 17:e="k";break}return e}get AccidentalHalfTones(){return _Pitch.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 _Pitch.octXmlDiff}getHalfTone(){return this.halfTone}getTransposedPitch(i){if(i>12)throw new Error("rewrite this method to handle bigger octave changes or don't use is with bigger octave changes!");return i>0?this.getHigherPitchByTransposeFactor(i):i<0?this.getLowerPitchByTransposeFactor(-i):this}DoEnharmonicChange(){switch(this.accidental){case 1:case 5:this.fundamentalNote=this.getPreviousFundamentalNote(this.fundamentalNote),this.accidental=_Pitch.AccidentalFromHalfTones(this.halfTone-(this.fundamentalNote+(this.octave+_Pitch.octXmlDiff)*12));break;case 0:case 4:this.fundamentalNote=this.getNextFundamentalNote(this.fundamentalNote),this.accidental=_Pitch.AccidentalFromHalfTones(this.halfTone-(this.fundamentalNote+(this.octave+_Pitch.octXmlDiff)*12));break;default:return}}ToString(){let i=_Pitch.accidentalVexflow(this.accidental);return i||(i=""),"Key: "+_Pitch.getNoteEnumString(this.fundamentalNote)+i+", Note: "+this.fundamentalNote+", octave: "+this.octave.toString()}OperatorEquals(i){const e=this;return!e||!i?!1:e.FundamentalNote===i.FundamentalNote&&e.Octave===i.Octave&&e.Accidental===i.Accidental}OperatorNotEqual(i){return this!==i}OperatorFundamentalGreaterThan(i){const e=this;return e.Octave===i.Octave?e.FundamentalNote>i.FundamentalNote:e.Octave>i.Octave}OperatorFundamentalLessThan(i){const e=this;return e.Octave===i.Octave?e.FundamentalNote<i.FundamentalNote:e.Octave<i.Octave}getHigherPitchByTransposeFactor(i){const e=_Pitch.pitchEnumValues.indexOf(this.fundamentalNote);let t=this.octave,s;return e+i>_Pitch.pitchEnumValues.length-1?(s=_Pitch.pitchEnumValues[e+i-_Pitch.pitchEnumValues.length],t++):s=_Pitch.pitchEnumValues[e+i],new _Pitch(s,t,2)}getLowerPitchByTransposeFactor(i){const e=_Pitch.pitchEnumValues.indexOf(this.fundamentalNote);let t=this.octave,s;return e-i<0?(s=_Pitch.pitchEnumValues[_Pitch.pitchEnumValues.length+e-i],t--):s=_Pitch.pitchEnumValues[e-i],new _Pitch(s,t,2)}getNextFundamentalNote(i){let e=_Pitch.pitchEnumValues.indexOf(i);return e=(e+1)%_Pitch.pitchEnumValues.length,_Pitch.pitchEnumValues[e]}getPreviousFundamentalNote(i){const e=_Pitch.pitchEnumValues.indexOf(i);return e>0?_Pitch.pitchEnumValues[e-1]:_Pitch.pitchEnumValues[_Pitch.pitchEnumValues.length-1]}};let Pitch=_Pitch;Pitch.pitchEnumValues=[0,2,4,5,7,9,11];Pitch.halftoneFactor=12/(Math.LN2/Math.LN10);Pitch.octXmlDiff=3;class VerticalGraphicalStaffEntryContainer{constructor(e,t){this.staffEntries=[],this.absoluteTimestamp=t,this.staffEntries=new Array(e)}get Index(){return this.index}set Index(e){this.index=e}get AbsoluteTimestamp(){return this.absoluteTimestamp}get StaffEntries(){return this.staffEntries}set StaffEntries(e){this.staffEntries=e}static compareByTimestamp(e,t){const s=e.absoluteTimestamp.RealValue,r=t.absoluteTimestamp.RealValue;return s<r?-1:s>r?1:0}getFirstNonNullStaffEntry(){for(let e=0,t=this.staffEntries.length;e<t;++e){const s=this.staffEntries[e];if(s)return s}}}var OutlineAndFillStyleEnum=(i=>(i[i.BaseWritingColor=0]="BaseWritingColor",i[i.FollowingCursor=1]="FollowingCursor",i[i.AlternativeFollowingCursor=2]="AlternativeFollowingCursor",i[i.PlaybackCursor=3]="PlaybackCursor",i[i.Highlighted=4]="Highlighted",i[i.ErrorUnderlay=5]="ErrorUnderlay",i[i.Selected=6]="Selected",i[i.SelectionSymbol=7]="SelectionSymbol",i[i.DebugColor1=8]="DebugColor1",i[i.DebugColor2=9]="DebugColor2",i[i.DebugColor3=10]="DebugColor3",i[i.SplitScreenDivision=11]="SplitScreenDivision",i[i.GreyTransparentOverlay=12]="GreyTransparentOverlay",i[i.MarkedArea1=13]="MarkedArea1",i[i.MarkedArea2=14]="MarkedArea2",i[i.MarkedArea3=15]="MarkedArea3",i[i.MarkedArea4=16]="MarkedArea4",i[i.MarkedArea5=17]="MarkedArea5",i[i.MarkedArea6=18]="MarkedArea6",i[i.MarkedArea7=19]="MarkedArea7",i[i.MarkedArea8=20]="MarkedArea8",i[i.MarkedArea9=21]="MarkedArea9",i[i.MarkedArea10=22]="MarkedArea10",i[i.Comment1=23]="Comment1",i[i.Comment2=24]="Comment2",i[i.Comment3=25]="Comment3",i[i.Comment4=26]="Comment4",i[i.Comment5=27]="Comment5",i[i.Comment6=28]="Comment6",i[i.Comment7=29]="Comment7",i[i.Comment8=30]="Comment8",i[i.Comment9=31]="Comment9",i[i.Comment10=32]="Comment10",i))(OutlineAndFillStyleEnum||{});const OUTLINE_AND_FILL_STYLE_DICT=new Dictionary;OUTLINE_AND_FILL_STYLE_DICT.setValue(0,"Thistle");OUTLINE_AND_FILL_STYLE_DICT.setValue(1,"Aqua");OUTLINE_AND_FILL_STYLE_DICT.setValue(2,"Azure");OUTLINE_AND_FILL_STYLE_DICT.setValue(3,"Bisque");OUTLINE_AND_FILL_STYLE_DICT.setValue(4,"CadetBlue");OUTLINE_AND_FILL_STYLE_DICT.setValue(5,"DarkBlue");OUTLINE_AND_FILL_STYLE_DICT.setValue(6,"DarkGoldenRod");OUTLINE_AND_FILL_STYLE_DICT.setValue(7,"BlanchedAlmond");OUTLINE_AND_FILL_STYLE_DICT.setValue(8,"Chartreuse");OUTLINE_AND_FILL_STYLE_DICT.setValue(9,"DarkGreen");OUTLINE_AND_FILL_STYLE_DICT.setValue(10,"DarkOrange");OUTLINE_AND_FILL_STYLE_DICT.setValue(11,"FireBrick");OUTLINE_AND_FILL_STYLE_DICT.setValue(12,"DarkSalmon");OUTLINE_AND_FILL_STYLE_DICT.setValue(13,"DarkSeaGreen");OUTLINE_AND_FILL_STYLE_DICT.setValue(14,"DarkOrchid");OUTLINE_AND_FILL_STYLE_DICT.setValue(15,"Aquamarine");OUTLINE_AND_FILL_STYLE_DICT.setValue(16,"DarkKhaki");OUTLINE_AND_FILL_STYLE_DICT.setValue(17,"ForestGreen");OUTLINE_AND_FILL_STYLE_DICT.setValue(18,"AliceBlue");OUTLINE_AND_FILL_STYLE_DICT.setValue(19,"DeepPink");OUTLINE_AND_FILL_STYLE_DICT.setValue(20,"Coral");OUTLINE_AND_FILL_STYLE_DICT.setValue(21,"DarkOliveGreen");OUTLINE_AND_FILL_STYLE_DICT.setValue(22,"Chocolate");OUTLINE_AND_FILL_STYLE_DICT.setValue(23,"DodgerBlue");OUTLINE_AND_FILL_STYLE_DICT.setValue(24,"Blue");OUTLINE_AND_FILL_STYLE_DICT.setValue(25,"Beige");OUTLINE_AND_FILL_STYLE_DICT.setValue(26,"Crimson");OUTLINE_AND_FILL_STYLE_DICT.setValue(27,"Fuchsia");OUTLINE_AND_FILL_STYLE_DICT.setValue(28,"Brown");OUTLINE_AND_FILL_STYLE_DICT.setValue(29,"BlanchedAlmond");OUTLINE_AND_FILL_STYLE_DICT.setValue(30,"CornflowerBlue");OUTLINE_AND_FILL_STYLE_DICT.setValue(31,"Cornsilk");OUTLINE_AND_FILL_STYLE_DICT.setValue(32,"DarkGrey");var GraphicalLayers=(i=>(i[i.Background=0]="Background",i[i.Highlight=1]="Highlight",i[i.MeasureError=2]="MeasureError",i[i.SelectionSymbol=3]="SelectionSymbol",i[i.Cursor=4]="Cursor",i[i.PSI_Debug=5]="PSI_Debug",i[i.Notes=6]="Notes",i[i.Comment=7]="Comment",i[i.Debug_above=8]="Debug_above",i))(GraphicalLayers||{}),NoteState=(i=>(i[i.Normal=0]="Normal",i[i.Selected=1]="Selected",i[i.Follow_Confirmed=2]="Follow_Confirmed",i[i.QFeedback_NotFound=3]="QFeedback_NotFound",i[i.QFeedback_OK=4]="QFeedback_OK",i[i.QFeedback_Perfect=5]="QFeedback_Perfect",i[i.Debug1=6]="Debug1",i[i.Debug2=7]="Debug2",i[i.Debug3=8]="Debug3",i))(NoteState||{}),AutoColorSet=(i=>(i.C="#d82c6b",i.D="#F89D15",i.E="#FFE21A",i.F="#4dbd5c",i.G="#009D96",i.A="#43469d",i.B="#76429c",i.Rest="#000000",i))(AutoColorSet||{});class GraphicalLine{constructor(e,t,s=0,r=OutlineAndFillStyleEnum.BaseWritingColor,o=void 0){this.start=e,this.end=t,this.width=s,this.styleId=r,this.colorHex=o}get Start(){return this.start}set Start(e){this.start=e}get End(){return this.end}set End(e){this.end=e}get Width(){return this.width}set Width(e){this.width=e}}class ClefInstruction extends AbstractNotationInstruction{constructor(e=0,t=0,s=2){super(void 0),this.clefType=0,this.line=2,this.octaveOffset=0,this.line=s,this.clefType=e,this.octaveOffset=t,this.calcParameters()}static getDefaultClefFromMidiInstrument(e){switch(e){case 0:return new ClefInstruction(1,0,4);case 33:return new ClefInstruction(1,0,4);case 34:return new ClefInstruction(1,0,4);case 35:return new ClefInstruction(1,0,4);case 36:return new ClefInstruction(1,0,4);case 37:return new ClefInstruction(1,0,4);case 38:return new ClefInstruction(1,0,4);case 39:return new ClefInstruction(1,0,4);case 43:return new ClefInstruction(1,0,4);default:return new ClefInstruction(0,0,2)}}static getAllPossibleClefs(){const e=[];for(let t=0;t<=2;t++){const s=new ClefInstruction(0,t,2);e.push(s)}for(let t=-2;t<=0;t++){const s=new ClefInstruction(1,t,4);e.push(s)}return e}static isSupportedClef(e){switch(e){case 0:case 1:case 2:case 3:case 4:return!0;default:return!1}}get ClefType(){return this.clefType}set ClefType(e){this.clefType=e}get Line(){return this.line}set Line(e){this.line=e}get OctaveOffset(){return this.octaveOffset}set OctaveOffset(e){this.octaveOffset=e}get ClefPitch(){return this.clefPitch}set ClefPitch(e){this.clefPitch=e}get ReferenceCyPosition(){return this.referenceCyPosition}set ReferenceCyPosition(e){this.referenceCyPosition=e}Equals(e){return this===e?!0:!this||!e?!1:this.clefPitch===e.clefPitch&&this.Line===e.Line}NotEqual(e){return!this.Equals(e)}ToString(){return"ClefType: "+this.clefType}calcParameters(){switch(this.clefType){case 0:this.clefPitch=new Pitch(NoteEnum.G,1+this.octaveOffset,AccidentalEnum.NONE),this.referenceCyPosition=5-this.line+2;break;case 1:this.clefPitch=new Pitch(NoteEnum.F,0+this.octaveOffset,AccidentalEnum.NONE),this.referenceCyPosition=5-this.line+1.5;break;case 2:this.clefPitch=new Pitch(NoteEnum.C,1+this.octaveOffset,AccidentalEnum.NONE),this.referenceCyPosition=5-this.line;break;case 3:this.clefPitch=new Pitch(NoteEnum.C,2,AccidentalEnum.NONE),this.referenceCyPosition=2;break;case 4:this.clefPitch=new Pitch(NoteEnum.G,0,AccidentalEnum.NONE),this.referenceCyPosition=0;break;default:throw new ArgumentOutOfRangeException("clefType")}}}var ClefEnum=(i=>(i[i.G=0]="G",i[i.F=1]="F",i[i.C=2]="C",i[i.percussion=3]="percussion",i[i.TAB=4]="TAB",i))(ClefEnum||{}),MidiInstrument=(i=>(i[i.None=-1]="None",i[i.Acoustic_Grand_Piano=0]="Acoustic_Grand_Piano",i[i.Bright_Acoustic_Piano=1]="Bright_Acoustic_Piano",i[i.Electric_Grand_Piano=2]="Electric_Grand_Piano",i[i.Honky_tonk_Piano=3]="Honky_tonk_Piano",i[i.Electric_Piano_1=4]="Electric_Piano_1",i[i.Electric_Piano_2=5]="Electric_Piano_2",i[i.Harpsichord=6]="Harpsichord",i[i.Clavinet=7]="Clavinet",i[i.Celesta=8]="Celesta",i[i.Glockenspiel=9]="Glockenspiel",i[i.Music_Box=10]="Music_Box",i[i.Vibraphone=11]="Vibraphone",i[i.Marimba=12]="Marimba",i[i.Xylophone=13]="Xylophone",i[i.Tubular_Bells=14]="Tubular_Bells",i[i.Dulcimer=15]="Dulcimer",i[i.Drawbar_Organ=16]="Drawbar_Organ",i[i.Percussive_Organ=17]="Percussive_Organ",i[i.Rock_Organ=18]="Rock_Organ",i[i.Church_Organ=19]="Church_Organ",i[i.Reed_Organ=20]="Reed_Organ",i[i.Accordion=21]="Accordion",i[i.Harmonica=22]="Harmonica",i[i.Tango_Accordion=23]="Tango_Accordion",i[i.Acoustic_Guitar_nylon=24]="Acoustic_Guitar_nylon",i[i.Acoustic_Guitar_steel=25]="Acoustic_Guitar_steel",i[i.Electric_Guitar_jazz=26]="Electric_Guitar_jazz",i[i.Electric_Guitar_clean=27]="Electric_Guitar_clean",i[i.Electric_Guitar_muted=28]="Electric_Guitar_muted",i[i.Overdriven_Guitar=29]="Overdriven_Guitar",i[i.Distortion_Guitar=30]="Distortion_Guitar",i[i.Guitar_harmonics=31]="Guitar_harmonics",i[i.Acoustic_Bass=32]="Acoustic_Bass",i[i.Electric_Bass_finger=33]="Electric_Bass_finger",i[i.Electric_Bass_pick=34]="Electric_Bass_pick",i[i.Fretless_Bass=35]="Fretless_Bass",i[i.Slap_Bass_1=36]="Slap_Bass_1",i[i.Slap_Bass_2=37]="Slap_Bass_2",i[i.Synth_Bass_1=38]="Synth_Bass_1",i[i.Synth_Bass_2=39]="Synth_Bass_2",i[i.Violin=40]="Violin",i[i.Viola=41]="Viola",i[i.Cello=42]="Cello",i[i.Contrabass=43]="Contrabass",i[i.Tremolo_Strings=44]="Tremolo_Strings",i[i.Pizzicato_Strings=45]="Pizzicato_Strings",i[i.Orchestral_Harp=46]="Orchestral_Harp",i[i.Timpani=47]="Timpani",i[i.String_Ensemble_1=48]="String_Ensemble_1",i[i.String_Ensemble_2=49]="String_Ensemble_2",i[i.Synth_Strings_1=50]="Synth_Strings_1",i[i.Synth_Strings_2=51]="Synth_Strings_2",i[i.Choir_Aahs=52]="Choir_Aahs",i[i.Voice_Oohs=53]="Voice_Oohs",i[i.Synth_Voice=54]="Synth_Voice",i[i.Orchestra_Hit=55]="Orchestra_Hit",i[i.Trumpet=56]="Trumpet",i[i.Trombone=57]="Trombone",i[i.Tuba=58]="Tuba",i[i.Muted_Trumpet=59]="Muted_Trumpet",i[i.French_Horn=60]="French_Horn",i[i.Brass_Section=61]="Brass_Section",i[i.Synth_Brass_1=62]="Synth_Brass_1",i[i.Synth_Brass_2=63]="Synth_Brass_2",i[i.Soprano_Sax=64]="Soprano_Sax",i[i.Alto_Sax=65]="Alto_Sax",i[i.Tenor_Sax=66]="Tenor_Sax",i[i.Baritone_Sax=67]="Baritone_Sax",i[i.Oboe=68]="Oboe",i[i.English_Horn=69]="English_Horn",i[i.Bassoon=70]="Bassoon",i[i.Clarinet=71]="Clarinet",i[i.Piccolo=72]="Piccolo",i[i.Flute=73]="Flute",i[i.Recorder=74]="Recorder",i[i.Pan_Flute=75]="Pan_Flute",i[i.Blown_Bottle=76]="Blown_Bottle",i[i.Shakuhachi=77]="Shakuhachi",i[i.Whistle=78]="Whistle",i[i.Ocarina=79]="Ocarina",i[i.Lead_1_square=80]="Lead_1_square",i[i.Lead_2_sawtooth=81]="Lead_2_sawtooth",i[i.Lead_3_calliope=82]="Lead_3_calliope",i[i.Lead_4_chiff=83]="Lead_4_chiff",i[i.Lead_5_charang=84]="Lead_5_charang",i[i.Lead_6_voice=85]="Lead_6_voice",i[i.Lead_7_fifths=86]="Lead_7_fifths",i[i.Lead_8_bass_lead=87]="Lead_8_bass_lead",i[i.Pad_1_new_age=88]="Pad_1_new_age",i[i.Pad_2_warm=89]="Pad_2_warm",i[i.Pad_3_polysynth=90]="Pad_3_polysynth",i[i.Pad_4_choir=91]="Pad_4_choir",i[i.Pad_5_bowed=92]="Pad_5_bowed",i[i.Pad_6_metallic=93]="Pad_6_metallic",i[i.Pad_7_halo=94]="Pad_7_halo",i[i.Pad_8_sweep=95]="Pad_8_sweep",i[i.FX_1_rain=96]="FX_1_rain",i[i.FX_2_soundtrack=97]="FX_2_soundtrack",i[i.FX_3_crystal=98]="FX_3_crystal",i[i.FX_4_atmosphere=99]="FX_4_atmosphere",i[i.FX_5_brightness=100]="FX_5_brightness",i[i.FX_6_goblins=101]="FX_6_goblins",i[i.FX_7_echoes=102]="FX_7_echoes",i[i.FX_8_scifi=103]="FX_8_scifi",i[i.Sitar=104]="Sitar",i[i.Banjo=105]="Banjo",i[i.Shamisen=106]="Shamisen",i[i.Koto=107]="Koto",i[i.Kalimba=108]="Kalimba",i[i.Bag_pipe=109]="Bag_pipe",i[i.Fiddle=110]="Fiddle",i[i.Shanai=111]="Shanai",i[i.Tinkle_Bell=112]="Tinkle_Bell",i[i.Agogo=113]="Agogo",i[i.Steel_Drums=114]="Steel_Drums",i[i.Woodblock=115]="Woodblock",i[i.Taiko_Drum=116]="Taiko_Drum",i[i.Melodic_Tom=117]="Melodic_Tom",i[i.Synth_Drum=118]="Synth_Drum",i[i.Reverse_Cymbal=119]="Reverse_Cymbal",i[i.Guitar_Fret_Noise=120]="Guitar_Fret_Noise",i[i.Breath_Noise=121]="Breath_Noise",i[i.Seashore=122]="Seashore",i[i.Bird_Tweet=123]="Bird_Tweet",i[i.Telephone_Ring=124]="Telephone_Ring",i[i.Helicopter=125]="Helicopter",i[i.Applause=126]="Applause",i[i.Gunshot=127]="Gunshot",i[i.euphonium=128]="euphonium",i[i.AltoClarinetInEb=200]="AltoClarinetInEb",i[i.TrumpetInBb=201]="TrumpetInBb",i[i.BaritoneSaxophone=202]="BaritoneSaxophone",i[i.TenorSaxophone=203]="TenorSaxophone",i[i.ClarinetInEb=204]="ClarinetInEb",i[i.Euphonium=205]="Euphonium",i[i.Alto_Clarinet=206]="Alto_Clarinet",i[i.Bass_Clarinet=207]="Bass_Clarinet",i[i.Bass_Trombone=208]="Bass_Trombone",i[i.clarinet_in_bb=209]="clarinet_in_bb",i[i.clarinet_in_eb=210]="clarinet_in_eb",i[i.Percussion=135]="Percussion",i))(MidiInstrument||{});const _KeyInstruction=class extends AbstractNotationInstruction{constructor(i=void 0,e=0,t=0){super(i),this.isTransposedBy=0,this.Key=e,this.keyTypeOriginal=e,this.mode=t,this.alteratedNotes=this.calcAlteratedNotes()}static copy(i){const e=new _KeyInstruction(i.parent,i.Key,i.Mode);return e.keyTypeOriginal=i.keyTypeOriginal,e}static getAllPossibleMajorKeyInstructions(){const i=[];for(let e=-7;e<7;e++){const t=new _KeyInstruction(void 0,e,0);i.push(t)}return i}get Key(){return this.keyType}set Key(i){this.keyType=i,this.alteratedNotes=this.calcAlteratedNotes()}get Mode(){return this.mode}set Mode(i){this.mode=i}get AlteratedNotes(){return this.alteratedNotes}calcAlteratedNotes(){const i=[];if(this.keyType>0)for(let e=0;e<this.keyType;e++)i.push(_KeyInstruction.sharpPositionList[e]);else if(this.keyType<0)for(let e=0;e<-this.keyType;e++)i.push(_KeyInstruction.flatPositionList[e]);return i}willAlterateNote(i){return this.alteratedNotes.indexOf(i)>=0}getAlterationForPitch(i){return this.keyType>0&&this.alteratedNotes.indexOf(i.FundamentalNote)<=this.keyType?AccidentalEnum.SHARP:this.keyType<0&&this.alteratedNotes.indexOf(i.FundamentalNote)<=Math.abs(this.keyType)?AccidentalEnum.FLAT:AccidentalEnum.NONE}ToString(){return"Key: "+this.keyType+this.mode}OperatorEquals(i){const e=this;return e===i?!0:!e||!i?!1:e.Key===i.Key&&e.Mode===i.Mode}OperatorNotEqual(i){return!this.OperatorEquals(i)}};let KeyInstruction=_KeyInstruction;KeyInstruction.sharpPositionList=[NoteEnum.F,NoteEnum.C,NoteEnum.G,NoteEnum.D,NoteEnum.A,NoteEnum.E,NoteEnum.B];KeyInstruction.flatPositionList=[NoteEnum.B,NoteEnum.E,NoteEnum.A,NoteEnum.D,NoteEnum.G,NoteEnum.C,NoteEnum.F];var KeyEnum=(i=>(i[i.major=0]="major",i[i.minor=1]="minor",i[i.none=2]="none",i[i.dorian=3]="dorian",i[i.phrygian=4]="phrygian",i[i.lydian=5]="lydian",i[i.mixolydian=6]="mixolydian",i[i.aeolian=7]="aeolian",i[i.ionian=8]="ionian",i[i.locrian=9]="locrian",i))(KeyEnum||{});Array.prototype.last||Object.defineProperty(Array.prototype,"last",{enumerable:!1,value:function(){return this[this.length-1]}});Array.prototype.clear||Object.defineProperty(Array.prototype,"clear",{enumerable:!1,value:function(){this.length=0}});Array.prototype.contains||Object.defineProperty(Array.prototype,"contains",{enumerable:!1,value:function(i){return this.indexOf(i)!==-1}});class CollectionUtil{static contains2(e,t){for(let s=0;s<e.length;s++)if(e[s]===t)return!0;return!1}static last(e){return e[e.length-1]}static removeDictElementIfTrue(e,t,s){const r=[];t.forEach(function(o,a){s(e,o,a)&&r.push(o)});for(let o=0;o<r.length;o++)t.remove(r[o])}static getLastElement(e){return e[e.length-1]}static binarySearch(e,t,s,r=0,o=e.length-1){let a=1;for(;r<=o;){a=Math.floor((r+o)/2);const l=s(e[a],t);if(l===0)return a;l<0&&(r=a+1),0<l&&(o=a)}return-a}}class GraphicalVoiceEntry extends GraphicalObject{constructor(e,t){super(),this.parentVoiceEntry=e,this.parentStaffEntry=t,this.PositionAndShape=new BoundingBox$1(this,t?t.PositionAndShape:void 0,!0),this.notes=[],this.rules=t?t.parentMeasure.parentSourceMeasure.Rules:new EngravingRules}sort(){return this.notes.sort((e,t)=>{var s,r,o,a;return((r=(s=t.sourceNote.Pitch)==null?void 0:s.getHalfTone())!=null?r:0)-((a=(o=e.sourceNote.Pitch)==null?void 0:o.getHalfTone())!=null?a:0)}),this.notes}sortForVexflow(){return this.notes.sort((e,t)=>{var s,r,o;return((r=(s=e.sourceNote.Pitch)==null?void 0:s.getHalfTone())!=null?r:0)-((o=t.sourceNote.Pitch.getHalfTone())!=null?o:0)}),this.notes}color(){}}class GraphicalMusicSheet{constructor(e,t){this.musicPages=[],this.measureList=[],this.verticalGraphicalStaffEntryContainers=[],this.cursors=[],this.leadSheet=!1,this.musicSheet=e,this.numberOfStaves=this.musicSheet.Staves.length,this.calculator=t,this.calculator.initialize(this)}get ParentMusicSheet(){return this.musicSheet}get GetCalculator(){return this.calculator}get JianpuKeySignature(){return this.jianpuKeySignature}set JianpuKeySignature(e){this.jianpuKeySignature=e}get MusicPages(){return this.musicPages}set MusicPages(e){this.musicPages=e}get MeasureList(){return this.measureList}set MeasureList(e){this.measureList=e}get VerticalGraphicalStaffEntryContainers(){return this.verticalGraphicalStaffEntryContainers}set VerticalGraphicalStaffEntryContainers(e){this.verticalGraphicalStaffEntryContainers=e}get Title(){return this.title}set Title(e){this.title=e}get Subtitle(){return this.subtitle}set Subtitle(e){this.subtitle=e}get Composer(){return this.composer}set Composer(e){this.composer=e}get Lyricist(){return this.lyricist}set Lyricist(e){this.lyricist=e}get Cursors(){return this.cursors}get SelectionStartSymbol(){return this.selectionStartSymbol}get SelectionEndSymbol(){return this.selectionEndSymbol}get MinAllowedSystemWidth(){return this.minAllowedSystemWidth}set MinAllowedSystemWidth(e){this.minAllowedSystemWidth=e}get NumberOfStaves(){return this.numberOfStaves}get LeadSheet(){return this.leadSheet}set LeadSheet(e){this.leadSheet=e}static transformRelativeToAbsolutePosition(e){for(let t=0;t<e.MusicPages.length;t++){const s=e.MusicPages[t].setMusicPageAbsolutePosition(t,e.ParentMusicSheet.Rules);e.MusicPages[t].PositionAndShape.calculateAbsolutePositionsRecursive(s.x,s.y)}}Initialize(){this.verticalGraphicalStaffEntryContainers=[],this.musicPages=[],this.measureList=[]}reCalculate(){this.calculator.calculate()}EnforceRedrawOfMusicSystems(){for(let e=0,t=this.musicPages.length;e<t;++e){const s=this.musicPages[e];for(let r=0,o=s.MusicSystems.length;r<o;++r){const a=s.MusicSystems[r];a.needsToBeRedrawn=!0}}}getClickedObject(e){for(let t=0,s=this.MusicPages.length;t<s;++t)return this.MusicPages[t].PositionAndShape.getClickedObjectOfType(e)}findGraphicalMeasure(e,t){for(let s=e;s>=0;s--){const r=this.measureList[s][t];if(r)return r}}findGraphicalStaffEntryFromMeasureList(e,t,s){for(let r=t;r<this.measureList.length;r++){const o=this.measureList[r][e];if(o)for(let a=0,l=o.staffEntries.length;a<l;++a){const c=o.staffEntries[a];if(c.sourceStaffEntry===s)return c}}}findNextGraphicalStaffEntry(e,t,s){const r=s.parentMeasure,o=r.staffEntries.indexOf(s);if(o<r.staffEntries.length-1)return r.staffEntries[o+1];if(t<this.measureList.length-1){const a=this.measureList[t+1][e];if(a.staffEntries.length>0)return a.staffEntries[0]}}getFirstVisibleMeasuresListFromIndices(e,t){const s=[],r=this.measureList[0].length;for(let o=e;o<=t;o++)for(let a=0;a<r;a++)if(this.measureList[o][a].isVisible()){s.push(this.measureList[o][a]);break}return s}orderMeasuresByStaffLine(e){const t=[];let s=[];t.push(s);for(let r=0;r<e.length;r++)r===0?s.push(e[0]):(e[r].ParentStaffLine===e[r-1].ParentStaffLine||(t.indexOf(s)===-1&&t.push(s),s=[],t.push(s)),s.push(e[r]));return t}initializeActiveClefs(){const e=[],t=this.musicSheet.getFirstSourceMeasure();if(t)for(let s=0;s<t.CompleteNumberOfStaves;s++){let r=new ClefInstruction;if(t.FirstInstructionsStaffEntries[s])for(let o=0,a=t.FirstInstructionsStaffEntries[s].Instructions.length;o<a;++o){const l=t.FirstInstructionsStaffEntries[s].Instructions[o];l instanceof ClefInstruction&&(r=l)}e.push(r)}return e}GetMainKey(){const e=this.musicSheet.getFirstSourceMeasure();if(e)for(let t=0;t<e.CompleteNumberOfStaves;t++)for(let s=0,r=e.FirstInstructionsStaffEntries[t].Instructions.length;s<r;++s){const o=e.FirstInstructionsStaffEntries[t].Instructions[s];if(o instanceof KeyInstruction)return o}}getOrCreateVerticalContainer(e){if(this.verticalGraphicalStaffEntryContainers.length===0||CollectionUtil.getLastElement(this.verticalGraphicalStaffEntryContainers).AbsoluteTimestamp.lt(e)){const t=new VerticalGraphicalStaffEntryContainer(this.numberOfStaves,e);return this.verticalGraphicalStaffEntryContainers.push(t),t}for(let t=this.verticalGraphicalStaffEntryContainers.length-1;t>=0;t--){if(this.verticalGraphicalStaffEntryContainers[t].AbsoluteTimestamp.lt(e)){const s=new VerticalGraphicalStaffEntryContainer(this.numberOfStaves,e);return this.verticalGraphicalStaffEntryContainers.splice(t+1,0,s),s}if(this.verticalGraphicalStaffEntryContainers[t].AbsoluteTimestamp.Equals(e))return this.verticalGraphicalStaffEntryContainers[t]}}GetVerticalContainerFromTimestamp(e,t=0){const s=CollectionUtil.binarySearch(this.verticalGraphicalStaffEntryContainers,new VerticalGraphicalStaffEntryContainer(0,e),VerticalGraphicalStaffEntryContainer.compareByTimestamp,t);if(s>=0)return this.verticalGraphicalStaffEntryContainers[s]}GetInterpolatedIndexInVerticalContainers(e){const t=this.verticalGraphicalStaffEntryContainers;let s=0,r=t.length-1,o,a;if(e.lte(t[t.length-1].AbsoluteTimestamp)){for(;r-s>1;){const m=Math.floor((r+s)/2);if(t[s].AbsoluteTimestamp.Equals(e)){r=s;break}else if(t[r].AbsoluteTimestamp.Equals(e)){s=r;break}else{if(t[m].AbsoluteTimestamp.Equals(e))return this.verticalGraphicalStaffEntryContainers.indexOf(t[m]);e.lt(t[m].AbsoluteTimestamp)?r=m:s=m}}if(s===r)return this.verticalGraphicalStaffEntryContainers.indexOf(t[s]);o=t[s].AbsoluteTimestamp,a=t[r].AbsoluteTimestamp}else o=t[t.length-1].AbsoluteTimestamp,a=Fraction$1.plus(this.getLongestStaffEntryDuration(t.length-1),o),r=t.length;const l=a.RealValue-o.RealValue,c=a.RealValue-e.RealValue,d=r-c/l;return Math.min(d,this.verticalGraphicalStaffEntryContainers.length)}getVisibleStavesIndicesFromSourceMeasure(e){const t=[],s=[];for(let r=0,o=e.length;r<o;++r){const l=e[r].ParentStaff.ParentInstrument;t.indexOf(l)===-1&&t.push(l)}for(let r=0,o=t.length;r<o;++r){const a=t[r],l=this.musicSheet.getGlobalStaffIndexOfFirstStaff(a);for(let c=0;c<a.Staves.length;c++)s.push(l+c)}return s}getGraphicalMeasureFromSourceMeasureAndIndex(e,t){var s;for(let r=0;r<this.measureList.length;r++)if(((s=this.measureList[r][0])==null?void 0:s.parentSourceMeasure)===e)return this.measureList[r][t]}getLastGraphicalMeasureFromIndex(e,t=!0){let s=this.measureList.length-1;return t&&(s=Math.min(s,this.musicSheet.Rules.MaxMeasureToDrawIndex)),this.measureList[s][e]}getMeasureIndex(e,t,s){for(t=0;t<this.measureList.length;t++)for(let r=0,o=this.measureList[t].length;r<o;++r)if(this.measureList[t][r]===e)return!0;return!1}GetNearestGraphicalObject(e,t=GraphicalObject.name,s=5,r=20,o=5,a=void 0){const l=[];for(;l.length===0&&s<=r;){const d=new BoundingBox$1(void 0);d.BorderLeft=e.x-s,d.BorderTop=e.y-s,d.BorderRight=e.x+s,d.BorderBottom=e.y+s,d.AbsolutePosition=new PointF2D(e.x,e.y),d.calculateAbsolutePosition();for(let m=0,u=this.MusicPages.length;m<u;++m){const b=this.MusicPages[m].PositionAndShape.getObjectsInRegion(d,!1,t);if(!(!b||b.length===0))for(let y=0,S=b.length;y<S;++y)a?a(b[y])&&l.push(b[y]):l.push(b[y])}s+=o}let c;for(let d=0,m=l.length;d<m;++d){const u=l[d];if(c===void 0)c=u;else{const g=this.CalculateDistance(u.PositionAndShape.AbsolutePosition,e),b=this.CalculateDistance(c.PositionAndShape.AbsolutePosition,e);g<b&&(c=u)}}if(c)return c}GetNearestVoiceEntry(e){return this.GetNearestGraphicalObject(e,GraphicalVoiceEntry.name,5,20,5,t=>{var s;return((s=t.parentStaffEntry)==null?void 0:s.relInMeasureTimestamp)!==void 0})}GetNearestNote(e,t){const s=this.GetNearestVoiceEntry(e);if(!s)return;let r,o=Number.MAX_SAFE_INTEGER;for(const a of s.notes){const l=a.PositionAndShape.AbsolutePosition.y,c=Math.abs(a.PositionAndShape.AbsolutePosition.x-e.x),d=Math.abs(l-e.y);c+d<o&&(r=a,o=c+d)}return r}domToSvg(e){return this.domToSvgTransform(e,!0)}svgToDom(e){return this.domToSvgTransform(e,!1)}svgToOsmd(e){const t=new PointF2D(e.x,e.y);return t.x/=10,t.y/=10,t}domToSvgTransform(e,t){const r=this.drawer.Backends[0].getSvgElement(),o=r.createSVGPoint();o.x=e.x,o.y=e.y;let a=r.getScreenCTM();t&&(a=a.inverse());const l=o.matrixTransform(a);return new PointF2D(l.x,l.y)}GetClickableLabel(e){const r=new BoundingBox$1;r.BorderLeft=e.x-4,r.BorderTop=e.y-4,r.BorderRight=e.x+4,r.BorderBottom=e.y+4,r.AbsolutePosition=new PointF2D(0,0);for(let o=0,a=this.MusicPages.length;o<a;++o){const c=this.MusicPages[o].PositionAndShape.getObjectsInRegion(r);if(c.length===1)for(let d=0,m=c.length;d<m;++d)return c[d]}}GetPossibleCommentAnchor(e){const t=this.GetNearestVoiceEntry(e);if(t)return t.parentStaffEntry.sourceStaffEntry}GetClickedObjectOfType(e){for(let t=0,s=this.musicPages.length;t<s;++t){const o=this.musicPages[t].PositionAndShape.getClickedObjectOfType(e);if(o)return o}}GetClickedClickable(e){for(let t=0,s=this.musicPages.length;t<s;++t){const o=this.musicPages[t].PositionAndShape.getClickedClickable(e);if(o&&o instanceof Clickable)return o}}tryGetTimestampFromPosition(e){const t=this.GetClickedObjectOfType(e);if(t)return t.getAbsoluteTimestamp()}tryGetClickableLabel(e){try{return this.GetClickableLabel(e)}catch(t){loglevelExports.info("GraphicalMusicSheet.tryGetClickableObject","positionOnMusicSheet: "+e,t)}}tryGetTimeStampFromPosition(e){try{const t=this.GetNearestVoiceEntry(e);return t?t.parentStaffEntry.getAbsoluteTimestamp():void 0}catch(t){loglevelExports.info("GraphicalMusicSheet.tryGetTimeStampFromPosition","positionOnMusicSheet: "+e,t)}}getStaffEntry(e){const t=this.VerticalGraphicalStaffEntryContainers[e];let s;try{for(let r=0,o=t.StaffEntries.length;r<o;++r){const a=t.StaffEntries[r];!a||!a.sourceStaffEntry.ParentStaff.ParentInstrument.Visible||(s?a.PositionAndShape&&s.PositionAndShape&&s.PositionAndShape.RelativePosition.x>a.PositionAndShape.RelativePosition.x&&(s=a):s=a)}}catch(r){loglevelExports.info("GraphicalMusicSheet.getStaffEntry",r)}return s}GetPreviousVisibleContainerIndex(e){for(let t=e-1;t>=0;t--){const s=this.verticalGraphicalStaffEntryContainers[t].StaffEntries;for(let r=0,o=s.length;r<o;++r){const a=s[r];if(a&&a.sourceStaffEntry.ParentStaff.ParentInstrument.Visible)return t}}return-1}GetNextVisibleContainerIndex(e){for(let t=e+1;t<this.verticalGraphicalStaffEntryContainers.length;++t){const s=this.verticalGraphicalStaffEntryContainers[t].StaffEntries;for(let r=0,o=s.length;r<o;++r){const a=s[r];if(a&&a.sourceStaffEntry.ParentStaff.ParentInstrument.Visible)return t}}return-1}findClosestLeftStaffEntry(e,t){let s,r=Math.floor(e);r=Math.min(this.VerticalGraphicalStaffEntryContainers.length-1,r);for(let o=r;o>=0;o--)if(s=this.getStaffEntry(o),s)if(t){if(s.sourceStaffEntry.ParentStaff.ParentInstrument.Visible)return s}else return s}findClosestRightStaffEntry(e,t){let s;const r=Math.max(0,Math.ceil(e));for(let o=r;o<this.VerticalGraphicalStaffEntryContainers.length;o++)if(s=this.getStaffEntry(o),s)if(t){if(s.sourceStaffEntry.ParentStaff.ParentInstrument.Visible)return s}else return s}calculateCursorLineAtTimestamp(e,t){const s=this.calculateXPositionFromTimestamp(e),r=s[0],o=s[1];if(!o||o.StaffLines.length===0)return;const a=o.PositionAndShape.AbsolutePosition.y,l=CollectionUtil.last(o.StaffLines).PositionAndShape.RelativePosition.y+4;return new GraphicalLine(new PointF2D(r,a),new PointF2D(r,a+l),3,t)}calculateXPositionFromTimestamp(e){var d,m,u,g;let t;const s=this.GetInterpolatedIndexInVerticalContainers(e),r=this.findClosestLeftStaffEntry(s,!0),o=this.findClosestRightStaffEntry(s,!0),a=e.RealValue;if(!r&&!o)return[0,void 0,void 0];let l;r?l=(d=r.parentMeasure.ParentStaffLine)==null?void 0:d.ParentMusicSystem:l=(m=o.parentMeasure.ParentStaffLine)==null?void 0:m.ParentMusicSystem;let c;if(o?c=(u=o.parentMeasure.ParentStaffLine)==null?void 0:u.ParentMusicSystem:c=(g=r.parentMeasure.ParentStaffLine)==null?void 0:g.ParentMusicSystem,l===c){t=l;let b,y,S,v=0;if(!r)y=S=o.PositionAndShape.AbsolutePosition.x,b=0;else if(o){y=r.PositionAndShape.AbsolutePosition.x,S=o.PositionAndShape.AbsolutePosition.x,r===o?b=0:b=(a-r.getAbsoluteTimestamp().RealValue)/(o.getAbsoluteTimestamp().RealValue-r.getAbsoluteTimestamp().RealValue);const A=r.parentMeasure,E=r.parentMeasure.parentSourceMeasure.multipleRestMeasures,_=A.MeasureNumber/(E+1),C=A.PositionAndShape.Size.width-A.beginInstructionsWidth;v=A.PositionAndShape.AbsolutePosition.x+A.beginInstructionsWidth+_*C}else{y=r.PositionAndShape.AbsolutePosition.x,S=t.GetRightBorderAbsoluteXPosition();const A=r.parentMeasure.parentSourceMeasure;b=(a-r.getAbsoluteTimestamp().RealValue)/(Fraction$1.plus(A.AbsoluteTimestamp,A.Duration).RealValue-r.getAbsoluteTimestamp().RealValue)}return b=Math.min(1,Math.max(0,b)),v&&r.parentMeasure.MeasureNumber===1?[v,t,r]:[y+b*(S-y),t,r]}else{const b=o.parentMeasure.parentSourceMeasure.AbsoluteTimestamp.RealValue;let y,S;if(a<b){t=l;const v=r.PositionAndShape.AbsolutePosition.x,x=t.GetRightBorderAbsoluteXPosition();y=(a-r.getAbsoluteTimestamp().RealValue)/(b-r.getAbsoluteTimestamp().RealValue),y=Math.min(1,Math.max(0,y)),S=v+y*(x-v)}else{t=c;const v=o.PositionAndShape.AbsolutePosition.x,x=t.GetLeftBorderAbsoluteXPosition();y=(a-b)/(o.getAbsoluteTimestamp().RealValue-b),y=Math.min(1,Math.max(0,y)),S=x+y*(v-x)}return[S,t,r]}}calculateCursorPoints(e,t){if(t===void 0||t.StaffLines.length===0)return[new PointF2D,new PointF2D];const s=t.PositionAndShape.AbsolutePosition.y,r=t.StaffLines.last(),o=r.PositionAndShape.RelativePosition.y+r.StaffHeight;return[new PointF2D(e,s),new PointF2D(e,s+o)]}GetNumberOfVisibleInstruments(){let e=0;for(let t=0,s=this.musicSheet.Instruments.length;t<s;++t)this.musicSheet.Instruments[t].Visible===!0&&e++;return e}GetNumberOfFollowedInstruments(){let e=0;for(let t=0,s=this.musicSheet.Instruments.length;t<s;++t)this.musicSheet.Instruments[t].Following===!0&&e++;return e}GetGraphicalFromSourceStaffEntry(e){var s;return(s=e.VerticalContainerParent.ParentMeasure)!=null&&s.VerticalMeasureList?e.VerticalContainerParent.ParentMeasure.VerticalMeasureList[e.ParentStaff.idInMusicSheet].findGraphicalStaffEntryFromTimestamp(e.Timestamp):void 0}CalculateDistance(e,t){const s=e.x-t.x,r=e.y-t.y;return s*s+r*r}getLongestStaffEntryDuration(e){let t=new Fraction$1(0,1);for(const s of this.verticalGraphicalStaffEntryContainers[e].StaffEntries){if(!s)continue;const r=s.findStaffEntryMaxNoteLength();t.lt(r)&&(t=r)}return t}}let Note$1=class{constructor(e,t,s,r,o,a){this.slurs=[],this.playbackInstrumentId=void 0,this.notehead=void 0,this.printObject=!0,this.voiceEntry=e,this.parentStaffEntry=t,this.length=s,this.pitch=r,this.sourceMeasure=o,this.isRestFlag=a!=null?a:!1,this.noteTremoloType="",this.glissandoType="",this.slideType="",r?this.halfTone=r.getHalfTone():this.halfTone=0}get NoteAsString(){return this.pitch.toString()}get TremoloType(){return this.noteTremoloType}set TremoloType(e){this.noteTremoloType=e}get ParentVoiceEntry(){return this.voiceEntry}set ParentVoiceEntry(e){this.voiceEntry=e}get ParentStaffEntry(){return this.parentStaffEntry}get ParentStaff(){return this.parentStaffEntry.ParentStaff}get Length(){return this.length}set PlaybackNote(e){this.playbackNote=e}get PlaybackNote(){return this.playbackNote}set Length(e){this.length=e}get SourceMeasure(){return this.sourceMeasure}get TypeLength(){return this.typeLength}set TypeLength(e){this.typeLength=e}get NoteTypeXml(){return this.noteTypeXml}set NoteTypeXml(e){this.noteTypeXml=e}get NormalNotes(){return this.normalNotes}set NormalNotes(e){this.normalNotes=e}get Pitch(){return this.pitch}get NoteBeam(){return this.beam}set NoteBeam(e){this.beam=e}set Notehead(e){this.notehead=e}get Notehead(){return this.notehead}get NoteTuplet(){return this.tuplet}set NoteTuplet(e){this.tuplet=e}get NoteTie(){return this.tie}set NoteTie(e){this.tie=e}get NoteSlurs(){return this.slurs}set NoteSlurs(e){this.slurs=e}get PlaybackInstrumentId(){return this.playbackInstrumentId}set PlaybackInstrumentId(e){this.playbackInstrumentId=e}get PrintObject(){return this.printObject}set PrintObject(e){this.printObject=e}get Arpeggio(){return this.arpeggio}set Arpeggio(e){this.arpeggio=e}get IsCueNote(){return this.isCueNote}set IsCueNote(e){this.isCueNote=e}get StemDirectionXml(){return this.stemDirectionXml}set StemDirectionXml(e){this.stemDirectionXml=e}get TremoloStrokes(){return this.tremoloStrokes}set TremoloStrokes(e){this.tremoloStrokes=e}get StemColorXml(){return this.stemColorXml}set StemColorXml(e){this.stemColorXml=e}get NoteheadColorXml(){return this.noteheadColorXml}set NoteheadColorXml(e){this.noteheadColorXml=e}get NoteheadColor(){return this.noteheadColor}set NoteheadColor(e){this.noteheadColor=e}get NoteheadColorCurrentlyRendered(){return this.noteheadColorCurrentlyRendered}set NoteheadColorCurrentlyRendered(e){this.noteheadColorCurrentlyRendered=e}isRest(){return this.isRestFlag}isWholeRest(){return this.isRest()&&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 Fraction$1.plus(this.voiceEntry.Timestamp,this.sourceMeasure.AbsoluteTimestamp)}checkForDoubleSlur(e){for(let t=0,s=this.slurs.length;t<s;++t){const r=this.slurs[t];if(r.StartNote!==void 0&&r.EndNote!==void 0&&e.StartNote!==void 0&&e.StartNote===r.StartNote&&r.EndNote===this)return!0}return!1}};const Vex=()=>{};Vex.L=(i,e)=>{if(!e)return;const t=Array.prototype.slice.call(e).join(" ");window.console.log(i+": "+t)};Vex.MakeException=i=>class extends Error{constructor(t,s){super(t),this.name=i,this.message=t,this.data=s}};class RuntimeError{constructor(e,t){this.code=e,this.message=t}toString(){return"[RuntimeError] "+this.code+":"+this.message}}Vex.RuntimeError=RuntimeError;Vex.RERR=Vex.RuntimeError;Vex.Merge=(i,e)=>{for(const t in e)i[t]=e[t];return i};Vex.Min=Math.min;Vex.Max=Math.max;Vex.forEach=(i,e)=>{for(let t=0;t<i.length;t++)e(i[t],t)};Vex.RoundN=(i,e)=>i%e>=e/2?parseInt(i/e,10)*e+e:parseInt(i/e,10)*e;Vex.MidLine=(i,e)=>{let t=e+(i-e)/2;return t%2>0&&(t=Vex.RoundN(t*10,5)/10),t};Vex.SortAndUnique=(i,e,t)=>{if(i.length>1){const s=[];let r;i.sort(e);for(let o=0;o<i.length;++o)(o===0||!t(i[o],r))&&s.push(i[o]),r=i[o];return s}else return i};Vex.Contains=(i,e)=>{let t=i.length;for(;t--;)if(i[t]===e)return!0;return!1};Vex.getCanvasContext=i=>{if(!i)throw new Vex.RERR("BadArgument","Invalid canvas selector: "+i);const e=document.getElementById(i);if(!(e&&e.getContext))throw new Vex.RERR("UnsupportedBrowserError","This browser does not support HTML5 Canvas");return e.getContext("2d")};Vex.drawDot=(i,e,t,s="#55")=>{i.save(),i.setFillStyle(s),i.beginPath(),i.arc(e,t,3,0,Math.PI*2,!0),i.closePath(),i.fill(),i.restore()};Vex.BM=(i,e)=>{const t=new Date().getTime();e();const s=new Date().getTime()-t;Vex.L(i+s+"ms")};Vex.StackTrace=()=>new Error().stack;Vex.W=(...i)=>{const e=i.join(" ");window.console.log("Warning: ",e,Vex.StackTrace())};Vex.Prefix=i=>Vex.Prefix.prefix+i;Vex.Prefix.prefix="vf-";class Fraction{static GCD(e,t){if(typeof e!="number"||typeof t!="number")throw new Vex.RERR("BadArgument",`Invalid numbers: ${e}, ${t}`);let s;for(;t!==0;)s=t,t=e%t,e=s;return e}static LCM(e,t){return e*t/Fraction.GCD(e,t)}static LCMM(e){if(e.length===0)return 0;if(e.length===1)return e[0];if(e.length===2)return Fraction.LCM(e[0],e[1]);{const t=e[0];return e.shift(),Fraction.LCM(t,Fraction.LCMM(e))}}constructor(e,t){this.set(e,t)}set(e,t){return this.numerator=e===void 0?1:e,this.denominator=t===void 0?1:t,this}value(){return this.numerator/this.denominator}simplify(){let e=this.numerator,t=this.denominator;const s=Fraction.GCD(e,t);return e/=s,t/=s,t<0&&(t=-t,e=-e),this.set(e,t)}add(e,t){let s,r;e instanceof Fraction?(s=e.numerator,r=e.denominator):(e!==void 0?s=e:s=0,t!==void 0?r=t:r=1);const o=Fraction.LCM(this.denominator,r),a=o/this.denominator,l=o/r,c=this.numerator*a+s*l;return this.set(c,o)}subtract(e,t){let s,r;e instanceof Fraction?(s=e.numerator,r=e.denominator):(e!==void 0?s=e:s=0,t!==void 0?r=t:r=1);const o=Fraction.LCM(this.denominator,r),a=o/this.denominator,l=o/r,c=this.numerator*a-s*l;return this.set(c,o)}multiply(e,t){let s,r;return e instanceof Fraction?(s=e.numerator,r=e.denominator):(e!==void 0?s=e:s=1,t!==void 0?r=t:r=1),this.set(this.numerator*s,this.denominator*r)}divide(e,t){let s,r;return e instanceof Fraction?(s=e.numerator,r=e.denominator):(e!==void 0?s=e:s=1,t!==void 0?r=t:r=1),this.set(this.numerator*r,this.denominator*s)}equals(e){const t=Fraction.__compareA.copy(e).simplify(),s=Fraction.__compareB.copy(this).simplify();return t.numerator===s.numerator&&t.denominator===s.denominator}greaterThan(e){const t=Fraction.__compareB.copy(this);return t.subtract(e),t.numerator>0}greaterThanEquals(e){const t=Fraction.__compareB.copy(this);return t.subtract(e),t.numerator>=0}lessThan(e){return!this.greaterThanEquals(e)}lessThanEquals(e){return!this.greaterThan(e)}clone(){return new Fraction(this.numerator,this.denominator)}copy(e){return typeof e=="number"?this.set(e||0,1):this.set(e.numerator,e.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 Fraction.__tmp.copy(this).simplify().toString()}toMixedString(){let e="";const t=this.quotient(),s=Fraction.__tmp.copy(this);return t<0?s.abs().fraction():s.fraction(),t!==0?(e+=t,s.numerator!==0&&(e+=" "+s.toSimplifiedString())):s.numerator===0?e="0":e=s.toSimplifiedString(),e}parse(e){const t=e.split("/"),s=parseInt(t[0],10),r=t[1]?parseInt(t[1],10):1;return this.set(s,r)}}Fraction.__compareA=new Fraction;Fraction.__compareB=new Fraction;Fraction.__tmp=new Fraction;const X$3=Vex.MakeException("RegistryError");function setIndexValue(i,e,t,s,r){i[e][t]||(i[e][t]={}),i[e][t][s]=r}class Registry{static get INDEXES(){return["type"]}constructor(){this.clear()}static enableDefaultRegistry(e){Registry.defaultRegistry=e}static getDefaultRegistry(){return Registry.defaultRegistry}static disableDefaultRegistry(){Registry.defaultRegistry=null}clear(){return this.index={id:{},type:{},class:{}},this}updateIndex({id:e,name:t,value:s,oldValue:r}){const o=this.getElementById(e);r!==null&&this.index[t][r]&&delete this.index[t][r][e],s!==null&&setIndexValue(this.index,t,s,o.getAttribute("id"),o)}register(e,t){if(t=t||e.getAttribute("id"),!t)throw new X$3("Can't add element without `id` attribute to registry",e);return e.setAttribute("id",t),setIndexValue(this.index,"id",t,t,e),Registry.INDEXES.forEach(s=>{this.updateIndex({id:t,name:s,value:e.getAttribute(s),oldValue:null})}),e.onRegister(this),this}getElementById(e){return this.index.id[e]?this.index.id[e][e]:null}getElementsByAttribute(e,t){const s=this.index[e];return s&&s[t]?Object.keys(s[t]).map(r=>s[t][r]):[]}getElementsByType(e){return this.getElementsByAttribute("type",e)}getElementsByClass(e){return this.getElementsByAttribute("class",e)}onUpdate({id:e,name:t,value:s,oldValue:r}){function o(a,l){return a.filter(c=>c===l).length>0}return o(Registry.INDEXES.concat(["id","class"]),t)?(this.updateIndex({id:e,name:t,value:s,oldValue:r}),this):this}}Registry.defaultRegistry=null;let Element$1=class Wt{static newID(){return"auto"+Wt.ID++}constructor({type:e}={}){this.attrs={id:Wt.newID(),el:null,type:e||"Base",classes:{}},this.boundingBox=null,this.context=null,this.rendered=!1,Registry.getDefaultRegistry()&&Registry.getDefaultRegistry().register(this)}setStyle(e){return this.style=e,this}getStyle(){return this.style}applyStyle(e=this.context,t=this.getStyle()){return t?(e.save(),t.shadowColor&&e.setShadowColor(t.shadowColor),t.shadowBlur&&e.setShadowBlur(t.shadowBlur),t.fillStyle&&e.setFillStyle(t.fillStyle),t.strokeStyle&&e.setStrokeStyle(t.strokeStyle),t.lineWidth&&e.setLineWidth(t.lineWidth),this):this}restoreStyle(e=this.context,t=this.getStyle()){return t?(e.restore(),this):this}drawWithStyle(){this.checkContext(),this.applyStyle(),this.draw(),this.restoreStyle()}hasClass(e){return this.attrs.classes[e]===!0}addClass(e){return this.attrs.classes[e]=!0,this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:e,oldValue:null}),this}removeClass(e){return delete this.attrs.classes[e],this.registry&&this.registry.onUpdate({id:this.getAttribute("id"),name:"class",value:null,oldValue:e}),this}onRegister(e){return this.registry=e,this}isRendered(){return this.rendered}setRendered(e=!0){return this.rendered=e,this}getAttributes(){return this.attrs}getAttribute(e){return this.attrs[e]}setAttribute(e,t){const s=this.attrs.id,r=this.attrs[e];return this.attrs[e]=t,this.registry&&this.registry.onUpdate({id:s,name:e,value:t,oldValue:r}),this}getContext(){return this.context}setContext(e){return this.context=e,this}getBoundingBox(){return this.boundingBox}checkContext(){if(!this.context)throw new Vex.RERR("NoContext","No rendering context attached to instance");return this.context}};Element$1.ID=1e3;class BoundingBoxComputation{constructor(e,t,s,r){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.addPoint(e,t),this.addPoint(s,r)}width(){return this.x2-this.x1}height(){return this.y2-this.y1}addPoint(e,t){e!=null&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),t!=null&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addQuadraticCurve(e,t,s,r,o,a){const l=e+.6666666666666666*(s-e),c=t+2/3*(r-t),d=l+1/3*(o-e),m=c+1/3*(a-t);this.addBezierCurve(e,t,l,c,d,m,o,a)}addBezierCurve(e,t,s,r,o,a,l,c){const d=[e,t],m=[s,r],u=[o,a],g=[l,c];let b;this.addPoint(d[0],d[1]),this.addPoint(g[0],g[1]);const y=(S,v)=>Math.pow(1-S,3)*d[v]+3*Math.pow(1-S,2)*S*m[v]+3*(1-S)*Math.pow(S,2)*u[v]+Math.pow(S,3)*g[v];for(b=0;b<=1;b++){const S=6*d[b]-12*m[b]+6*u[b],v=-3*d[b]+9*m[b]-9*u[b]+3*g[b],x=3*m[b]-3*d[b];if(v===0){if(S===0)continue;const _=-x/S;0<_&&_<1&&(b===0&&this.addX(y(_,b)),b===1&&this.addY(y(_,b)));continue}const A=Math.pow(S,2)-4*x*v;if(A<0)continue;const E=(-S+Math.sqrt(A))/(2*v);0<E&&E<1&&(b===0&&this.addX(y(E,b)),b===1&&this.addY(y(E,b)));const w=(-S-Math.sqrt(A))/(2*v);0<w&&w<1&&(b===0&&this.addX(y(w,b)),b===1&&this.addY(y(w,b)))}}}class BoundingBox{static copy(e){return new BoundingBox(e.x,e.y,e.w,e.h)}constructor(e,t,s,r){this.x=e,this.y=t,this.w=s,this.h=r}getX(){return this.x}getY(){return this.y}getW(){return this.w}getH(){return this.h}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setW(e){return this.w=e,this}setH(e){return this.h=e,this}move(e,t){this.x+=e,this.y+=t}clone(){return BoundingBox.copy(this)}mergeWith(e,t){const s=e,r=this.x<s.x?this.x:s.x,o=this.y<s.y?this.y:s.y,a=Math.max(this.x+this.w,s.x+s.w)-r,l=Math.max(this.y+this.h,s.y+s.h)-o;return this.x=r,this.y=o,this.w=a,this.h=l,t&&this.draw(t),this}draw(e,t,s){t||(t=0),s||(s=0),e.rect(this.x+t,this.y+s,this.w,this.h),e.stroke()}}const Font={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 "},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 "}},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};function processOutline(i,e,t,s,r,o){let a,l,c,d=0;function m(){return e+i[d++]*s}function u(){return t+i[d++]*r}for(;d<i.length;)switch(a=i[d++],a){case"m":case"l":o[a](m(),u());break;case"q":l=m(),c=u(),o.q(m(),u(),l,c);break;case"b":l=m(),c=u(),o.b(m(),u(),m(),u(),l,c);break}}class Glyph extends Element$1{static loadMetrics(e,t,s){const r=e.glyphs[t];if(!r)throw new Vex.RERR("BadGlyph",`Glyph ${t} does not exist in font.`);const o=r.x_min,a=r.x_max,l=r.ha;let c;if(r.o)return s?r.cached_outline?c=r.cached_outline:(c=r.o.split(" "),r.cached_outline=c):(r.cached_outline&&delete r.cached_outline,c=r.o.split(" ")),{x_min:o,x_max:a,ha:l,outline:c};throw new Vex.RERR("BadGlyph",`Glyph ${t} has no outline defined.`)}static renderGlyph(e,t,s,r,o,a){const l=r*72/(Font.resolution*100),c=Glyph.loadMetrics(Font,o,!a);Glyph.renderOutline(e,c.outline,l,t,s)}static renderOutline(e,t,s,r,o){e.beginPath(),e.moveTo(r,o),processOutline(t,r,o,s,-s,{m:e.moveTo.bind(e),l:e.lineTo.bind(e),q:e.quadraticCurveTo.bind(e),b:e.bezierCurveTo.bind(e)}),e.fill()}static getOutlineBoundingBox(e,t,s,r){const o=new BoundingBoxComputation;return processOutline(e,s,r,t,-t,{m:o.addPoint.bind(o),l:o.addPoint.bind(o),q:o.addQuadraticCurve.bind(o),b:o.addBezierCurve.bind(o)}),new BoundingBox(o.x1,o.y1,o.width(),o.height())}constructor(e,t,s){super(),this.setAttribute("type","Glyph"),this.code=e,this.point=t,this.options={cache:!0,font:Font},this.metrics=null,this.x_shift=0,this.y_shift=0,this.originShift={x:0,y:0},s?this.setOptions(s):this.reset()}setOptions(e){Vex.Merge(this.options,e),this.reset()}setPoint(e){return this.point=e,this}setStave(e){return this.stave=e,this}setXShift(e){return this.x_shift=e,this}setYShift(e){return this.y_shift=e,this}reset(){this.scale=this.point*72/(this.options.font.resolution*100),this.metrics=Glyph.loadMetrics(this.options.font,this.code,this.options.cache),this.bbox=Glyph.getOutlineBoundingBox(this.metrics.outline,this.scale,0,0)}getMetrics(){if(!this.metrics)throw new Vex.RuntimeError("BadGlyph",`Glyph ${this.code} is not initialized.`);return{x_min:this.metrics.x_min*this.scale,x_max:this.metrics.x_max*this.scale,width:this.bbox.getW(),height:this.bbox.getH()}}setOriginX(e){const{bbox:t}=this,s=Math.abs(t.getX()/t.getW()),r=(e-s)*t.getW();this.originShift.x=-r}setOriginY(e){const{bbox:t}=this,s=Math.abs(t.getY()/t.getH()),r=(e-s)*t.getH();this.originShift.y=-r}setOrigin(e,t){this.setOriginX(e),this.setOriginY(t)}render(e,t,s){if(!this.metrics)throw new Vex.RuntimeError("BadGlyph",`Glyph ${this.code} is not initialized.`);const r=this.metrics.outline,o=this.scale;this.setRendered(),this.applyStyle(e),Glyph.renderOutline(e,r,o,t+this.originShift.x,s+this.originShift.y),this.restoreStyle(e)}renderToStave(e){if(this.checkContext(),!this.metrics)throw new Vex.RuntimeError("BadGlyph",`Glyph ${this.code} is not initialized.`);if(!this.stave)throw new Vex.RuntimeError("GlyphError","No valid stave");const t=this.metrics.outline,s=this.scale;this.setRendered(),this.applyStyle(),Glyph.renderOutline(this.context,t,s,e+this.x_shift,this.stave.getYForGlyphs()+this.y_shift),this.restoreStyle()}}const Flow={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};Flow.clefProperties=i=>{if(!i)throw new Vex.RERR("BadArgument","Invalid clef: "+i);const e=Flow.clefProperties.values[i];if(!e)throw new Vex.RERR("BadArgument","Invalid clef: "+i);return e};Flow.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}};Flow.keyProperties=(i,e,t)=>{e===void 0&&(e="treble");const s={octave_shift:0};typeof t=="object"&&Vex.Merge(s,t);const r=i.split("/");if(r.length<2)throw new Vex.RERR("BadArguments",`Key must have note + octave and an optional glyph: ${i}`);const o=r[0].toUpperCase(),a=Flow.keyProperties.note_values[o];if(!a)throw new Vex.RERR("BadArguments","Invalid key name: "+o);a.octave&&(r[1]=a.octave);let l=parseInt(r[1],10);l+=-1*s.octave_shift;let d=(l*7-4*7+a.index)/2;d+=Flow.clefProperties(e).line_shift;let m=0;d<=0&&d*2%2===0&&(m=1),d>=6&&d*2%2===0&&(m=-1);const u=typeof a.int_val<"u"?l*12+a.int_val:null,g=a.code,b=a.shift_right;let y={};if(r.length>2&&r[2]){const S=r[2].toUpperCase();y=Flow.keyProperties.customNoteHeads[S]||{}}return{key:o,octave:l,line:d,int_value:u,accidental:a.accidental,code:g,stroke:m,shift_right:b,displaced:!1,...y}};Flow.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}};Flow.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},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}};Flow.integerToNote=i=>{if(typeof i>"u")throw new Vex.RERR("BadArguments","Undefined integer for integerToNote");if(i<-2)throw new Vex.RERR("BadArguments",`integerToNote requires integer > -2: ${i}`);const e=Flow.integerToNote.table[i];if(!e)throw new Vex.RERR("BadArguments",`Unknown note value for integer: ${i}`);return e};Flow.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"};Flow.tabToGlyph=(i,e=1)=>{let t=null,s=0,r=0;if(i.toString().toUpperCase()==="X"){const o=new Glyph("v7f",Flow.DEFAULT_TABLATURE_FONT_SCALE).getMetrics();t="v7f",s=o.width,r=-o.height/2}else s=Flow.textWidth(i.toString());return{text:i,code:t,getWidth:()=>s*e,shift_y:r}};Flow.textWidth=i=>7*i.toString().length;Flow.articulationCodes=i=>Flow.articulationCodes.articulations[i];Flow.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}};Flow.accidentalCodes=i=>Flow.accidentalCodes.accidentals[i];Flow.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}};Flow.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]}};Flow.ornamentCodes=i=>Flow.ornamentCodes.ornaments[i];Flow.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"}};Flow.keySignature=i=>{const e=Flow.keySignature.keySpecs[i];if(!e)throw new Vex.RERR("BadKeySignature",`Bad key signature spec: '${i}'`);if(!e.acc)return[];const t=Flow.keySignature.accidentalList(e.acc),s=[];for(let r=0;r<e.num;++r){const o=t[r];s.push({type:e.acc,line:o})}return s};Flow.keySignature.keySpecs={C:{acc:null,num:0},Am:{acc:null,num:0},F:{acc:"b",num:1},Dm:{acc:"b",num:1},Bb:{acc:"b",num:2},Gm:{acc:"b",num:2},Eb:{acc:"b",num:3},Cm:{acc:"b",num:3},Ab:{acc:"b",num:4},Fm:{acc:"b",num:4},Db:{acc:"b",num:5},Bbm:{acc:"b",num:5},Gb:{acc:"b",num:6},Ebm:{acc:"b",num:6},Cb:{acc:"b",num:7},Abm:{acc:"b",num:7},G:{acc:"#",num:1},Em:{acc:"#",num:1},D:{acc:"#",num:2},Bm:{acc:"#",num:2},A:{acc:"#",num:3},"F#m":{acc:"#",num:3},E:{acc:"#",num:4},"C#m":{acc:"#",num:4},B:{acc:"#",num:5},"G#m":{acc:"#",num:5},"F#":{acc:"#",num:6},"D#m":{acc:"#",num:6},"C#":{acc:"#",num:7},"A#m":{acc:"#",num:7}};Flow.unicode={sharp:String.fromCharCode(parseInt("266F",16)),flat:String.fromCharCode(parseInt("266D",16)),natural:String.fromCharCode(parseInt("266E",16)),triangle:String.fromCharCode(parseInt("25B3",16)),"o-with-slash":String.fromCharCode(parseInt("00F8",16)),degrees:String.fromCharCode(parseInt("00B0",16)),circle:String.fromCharCode(parseInt("25CB",16))};Flow.keySignature.accidentalList=i=>({b:[2,.5,2.5,1,3,1.5,3.5],"#":[0,1.5,-.5,1,2.5,.5,2]})[i];Flow.parseNoteDurationString=i=>{if(typeof i!="string")return null;const t=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(i);if(!t)return null;const s=t[1],r=t[2].length;let o=t[3];return o.length===0&&(o="n"),{duration:s,dots:r,type:o}};Flow.parseNoteStruct=i=>{const e=i.duration,t=Flow.parseNoteDurationString(e);if(!t)return null;let s=Flow.durationToTicks(t.duration);if(s==null)return null;let r=i.type;const o=[];if(r){if(!Flow.getGlyphProps.validTypes[r])return null}else r=t.type||"n",i.keys!==void 0&&i.keys.forEach((c,d)=>{const m=c.split("/");m&&m.length===3&&(o[d]=m[2])});const a=i.dots?i.dots:t.dots;if(typeof a!="number")return null;let l=s;for(let c=0;c<a;c++){if(l<=1)return null;l=l/2,s+=l}return{duration:t.duration,type:r,customTypes:o,dots:a,ticks:s}};Flow.sanitizeDuration=i=>{const e=Flow.durationAliases[i];if(e!==void 0&&(i=e),Flow.durationToTicks.durations[i]===void 0)throw new Vex.RERR("BadArguments",`The provided duration is not valid: ${i}`);return i};Flow.durationToFraction=i=>new Fraction().parse(Flow.sanitizeDuration(i));Flow.durationToNumber=i=>Flow.durationToFraction(i).value();Flow.durationToTicks=i=>{i=Flow.sanitizeDuration(i);const e=Flow.durationToTicks.durations[i];return e===void 0?null:e};Flow.durationToTicks.durations={"1/2":Flow.RESOLUTION*2,1:Flow.RESOLUTION/1,2:Flow.RESOLUTION/2,4:Flow.RESOLUTION/4,8:Flow.RESOLUTION/8,16:Flow.RESOLUTION/16,32:Flow.RESOLUTION/32,64:Flow.RESOLUTION/64,128:Flow.RESOLUTION/128,256:Flow.RESOLUTION/256};Flow.durationAliases={w:"1",h:"2",q:"4",b:"256"};Flow.getGlyphProps=(i,e)=>{i=Flow.sanitizeDuration(i);const t=Flow.getGlyphProps.duration_codes[i];if(t===void 0)return null;e||(e="n");let s=t.type[e];if(s===void 0){const r=Flow.keyProperties.customNoteHeads[e.toUpperCase()];if(r===void 0)return null;s={code_head:r.code,...r}}return{...t.common,...s}};Flow.getGlyphProps.validTypes={n:{name:"note"},r:{name:"rest"},h:{name:"harmonic"},m:{name:"muted"},s:{name:"slash"}};Flow.getGlyphProps.duration_codes={"1/2":{common:{getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"v53",i).getMetrics().width},stem:!1,stem_offset:0,flag:!1,stem_up_extension:-Flow.STEM_HEIGHT,stem_down_extension:-Flow.STEM_HEIGHT,tabnote_stem_up_extension:-Flow.STEM_HEIGHT,tabnote_stem_down_extension:-Flow.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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},1:{common:{getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"v1d",i).getMetrics().width},stem:!1,stem_offset:0,flag:!1,stem_up_extension:-Flow.STEM_HEIGHT,stem_down_extension:-Flow.STEM_HEIGHT,tabnote_stem_up_extension:-Flow.STEM_HEIGHT,tabnote_stem_down_extension:-Flow.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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},2:{common:{getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"v81",i).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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},4:{common:{getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",i).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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},8:{common:{getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",i).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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},16:{common:{beam_count:2,getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",i).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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},32:{common:{beam_count:3,getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",i).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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},64:{common:{beam_count:4,getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",i).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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}},128:{common:{beam_count:5,getWidth(i=Flow.DEFAULT_NOTATION_FONT_SCALE){return new Glyph(this.code_head||"vb",i).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:()=>Flow.SLASH_NOTEHEAD_WIDTH,position:"B/4"}}}};Flow.smufl={};Flow.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"};Flow.TIME4_4={num_beats:4,beat_value:4,resolution:Flow.RESOLUTION};class CanvasContext{static get WIDTH(){return 600}static get HEIGHT(){return 400}static get CANVAS_BROWSER_SIZE_LIMIT(){return 32767}static SanitizeCanvasDims(e,t){return Math.max(e,t)>this.CANVAS_BROWSER_SIZE_LIMIT&&(Vex.W("Canvas dimensions exceed browser limit. Cropping to "+this.CANVAS_BROWSER_SIZE_LIMIT),e>this.CANVAS_BROWSER_SIZE_LIMIT&&(e=this.CANVAS_BROWSER_SIZE_LIMIT),t>this.CANVAS_BROWSER_SIZE_LIMIT&&(t=this.CANVAS_BROWSER_SIZE_LIMIT)),[e,t]}constructor(e){this.vexFlowCanvasContext=e,e.canvas?this.canvas=e.canvas:this.canvas={width:CanvasContext.WIDTH,height:CanvasContext.HEIGHT}}clear(){this.vexFlowCanvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}openGroup(){}closeGroup(){}add(){}setFont(e,t,s){return this.vexFlowCanvasContext.font=(s||"")+" "+t+"pt "+e,this}setRawFont(e){return this.vexFlowCanvasContext.font=e,this}setFillStyle(e){return this.vexFlowCanvasContext.fillStyle=e,this}setBackgroundFillStyle(e){return this.background_fillStyle=e,this}setStrokeStyle(e){return this.vexFlowCanvasContext.strokeStyle=e,this}setShadowColor(e){return this.vexFlowCanvasContext.shadowColor=e,this}setShadowBlur(e){return this.vexFlowCanvasContext.shadowBlur=e,this}setLineWidth(e){return this.vexFlowCanvasContext.lineWidth=e,this}setLineCap(e){return this.vexFlowCanvasContext.lineCap=e,this}setLineDash(e){return this.vexFlowCanvasContext.lineDash=e,this}scale(e,t){return this.vexFlowCanvasContext.scale(parseFloat(e),parseFloat(t))}resize(e,t){return[e,t]=this.SanitizeCanvasDims(parseInt(e,10),parseInt(t,10)),this.vexFlowCanvasContext.resize(e,t)}rect(e,t,s,r){return this.vexFlowCanvasContext.rect(e,t,s,r)}fillRect(e,t,s,r){return this.vexFlowCanvasContext.fillRect(e,t,s,r)}clearRect(e,t,s,r){return this.vexFlowCanvasContext.clearRect(e,t,s,r)}beginPath(){return this.vexFlowCanvasContext.beginPath()}moveTo(e,t){return this.vexFlowCanvasContext.moveTo(e,t)}lineTo(e,t){return this.vexFlowCanvasContext.lineTo(e,t)}bezierCurveTo(e,t,s,r,o,a){return this.vexFlowCanvasContext.bezierCurveTo(e,t,s,r,o,a)}quadraticCurveTo(e,t,s,r){return this.vexFlowCanvasContext.quadraticCurveTo(e,t,s,r)}arc(e,t,s,r,o,a){return this.vexFlowCanvasContext.arc(e,t,s,r,o,a)}glow(){return this.vexFlowCanvasContext.glow()}fill(){return this.vexFlowCanvasContext.fill()}stroke(){return this.vexFlowCanvasContext.stroke()}closePath(){return this.vexFlowCanvasContext.closePath()}measureText(e){return this.vexFlowCanvasContext.measureText(e)}fillText(e,t,s){return this.vexFlowCanvasContext.fillText(e,t,s)}save(){return this.vexFlowCanvasContext.save()}restore(){return this.vexFlowCanvasContext.restore()}}class RaphaelContext{constructor(e){this.element=e,this.paper=Raphael(e),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(e,t,s){return this.state.font_family=e,this.state.font_size=t,this.state.font_weight=s,this.attributes.font=(this.state.font_weight||"")+" "+this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this}setRawFont(e){return this.attributes.font=e,this}setFillStyle(e){return this.attributes.fill=e,this}setBackgroundFillStyle(e){return this.background_attributes.fill=e,this.background_attributes.stroke=e,this}setStrokeStyle(e){return this.attributes.stroke=e,this}setShadowColor(e){return this.shadow_attributes.color=e,this}setShadowBlur(e){return this.shadow_attributes.width=e,this}setLineWidth(e){this.attributes["stroke-width"]=e,this.lineWidth=e}setLineDash(){return this}setLineCap(){return this}scale(e,t){return this.state.scale={x:e,y:t},this.attributes.transform="S"+e+","+t+",0,0",this.attributes.scale=e+","+t+",0,0",this.attributes.font=this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this.background_attributes.transform="S"+e+","+t+",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(e,t){return this.element.style.width=e,this.paper.setSize(e,t),this}setViewBox(e){this.paper.canvas.setAttribute("viewBox",e)}rect(e,t,s,r){return r<0&&(t+=r,r=-r),this.paper.rect(e,t,s-.5,r-.5).attr(this.attributes).attr("fill","none").attr("stroke-width",this.lineWidth),this}fillRect(e,t,s,r){return r<0&&(t+=r,r=-r),this.paper.rect(e,t,s-.5,r-.5).attr(this.attributes),this}clearRect(e,t,s,r){return r<0&&(t+=r,r=-r),this.paper.rect(e,t,s-.5,r-.5).attr(this.background_attributes),this}beginPath(){return this.path="",this.pen.x=0,this.pen.y=0,this}moveTo(e,t){return this.path+="M"+e+","+t,this.pen.x=e,this.pen.y=t,this}lineTo(e,t){return this.path+="L"+e+","+t,this.pen.x=e,this.pen.y=t,this}bezierCurveTo(e,t,s,r,o,a){return this.path+="C"+e+","+t+","+s+","+r+","+o+","+a,this.pen.x=o,this.pen.y=a,this}quadraticCurveTo(e,t,s,r){return this.path+="Q"+e+","+t+","+s+","+r,this.pen.x=s,this.pen.y=r,this}arc(e,t,s,r,o,a){function l(d){for(;d<0;)d+=Math.PI*2;for(;d>Math.PI*2;)d-=Math.PI*2;return d}if(r=l(r),o=l(o),r>o){const d=r;r=o,o=d,a=!a}const c=o-r;return c>Math.PI?(this.arcHelper(e,t,s,r,r+c/2,a),this.arcHelper(e,t,s,r+c/2,o,a)):this.arcHelper(e,t,s,r,o,a),this}arcHelper(e,t,s,r,o,a){const l=e+s*Math.cos(r),c=t+s*Math.sin(r),d=e+s*Math.cos(o),m=t+s*Math.sin(o);let u=0,g=0;a?(g=1,o-r<Math.PI&&(u=1)):o-r>Math.PI&&(u=1),this.path+="M"+l+","+c+",A"+s+","+s+",0,"+u+","+g+","+d+","+m+"M"+this.pen.x+","+this.pen.y}glow(){const e=this.paper.set();if(this.shadow_attributes.width>0){const t=this.shadow_attributes,s=t.width/2;for(let r=1;r<=s;r++)e.push(this.paper.path(this.path).attr({stroke:t.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(t.width/s*r).toFixed(3),opacity:+((t.opacity||.3)/s).toFixed(3),transform:this.attributes.transform,scale:this.attributes.scale}))}return e}fill(){const e=this.paper.path(this.path).attr(this.attributes).attr("stroke-width",0);return this.glow(e),this}stroke(){const e=this.lineWidth*(this.state.scale.x+this.state.scale.y)/2,t=this.paper.path(this.path).attr(this.attributes).attr("fill","none").attr("stroke-width",e);return this.glow(t),this}closePath(){return this.path+="Z",this}measureText(e){const t=this.paper.text(0,0,e).attr(this.attributes).attr("fill","none").attr("stroke","none"),s=t.getBBox();return t.remove(),{width:s.width,height:s.height}}fillText(e,t,s){return this.paper.text(t+this.measureText(e).width/2,s-this.state.font_size/(2.25*this.state.scale.y),e).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 e=this.state_stack.pop();return this.state.font_family=e.state.font_family,this.attributes.font=e.attributes.font,this.attributes.fill=e.attributes.fill,this.attributes.stroke=e.attributes.stroke,this.attributes["stroke-width"]=e.attributes["stroke-width"],this.shadow_attributes.width=e.shadow_attributes.width,this.shadow_attributes.color=e.shadow_attributes.color,this}}const attrNamesToIgnoreMap={path:{x:!0,y:!0,width:!0,height:!0},rect:{},text:{width:!0,height:!0}};{const i={"font-family":!0,"font-weight":!0,"font-style":!0,"font-size":!0};Vex.Merge(attrNamesToIgnoreMap.rect,i),Vex.Merge(attrNamesToIgnoreMap.path,i)}class SVGContext{constructor(e){this.element=e,this.svgNS="http://www.w3.org/2000/svg";const t=this.create("svg");this.element.appendChild(t),this.svg=t,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(e){return document.createElementNS(this.svgNS,e)}openGroup(e,t,s){const r=this.create("g");return this.groups.push(r),this.parent.appendChild(r),this.parent=r,e&&r.setAttribute("class",Vex.Prefix(e)),t&&r.setAttribute("id",Vex.Prefix(t)),s&&s.pointerBBox&&r.setAttribute("pointer-events","bounding-box"),r}closeGroup(){this.groups.pop(),this.parent=this.groups[this.groups.length-1]}add(e){this.parent.appendChild(e)}iePolyfill(){typeof navigator<"u"&&(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(e,t,s){let r=!1,o=!1,a="normal";typeof s=="string"&&(s.indexOf("italic")!==-1&&(s=s.replace(/italic/g,""),o=!0),s.indexOf("bold")!==-1&&(s=s.replace(/bold/g,""),r=!0),s=s.replace(/ /g,"")),s=r?"bold":s,s=typeof s>"u"||s===""?"normal":s,a=o?"italic":a;const l={"font-family":e,"font-size":t+"pt","font-weight":s,"font-style":a};return this.fontSize=Number(t),Vex.Merge(this.attributes,l),Vex.Merge(this.state,l),this}setRawFont(e){e=e.trim();const t=e.split(" ");return this.attributes["font-family"]=t[1],this.state["font-family"]=t[1],this.attributes["font-size"]=t[0],this.state["font-size"]=t[0],this.fontSize=Number(t[0].match(/\d+/)),this}setFillStyle(e){return this.attributes.fill=e,this}setBackgroundFillStyle(e){return this.background_attributes.fill=e,this.background_attributes.stroke=e,this}setStrokeStyle(e){return this.attributes.stroke=e,this}setShadowColor(e){return this.shadow_attributes.color=e,this}setShadowBlur(e){return this.shadow_attributes.width=e,this}setLineWidth(e){this.attributes["stroke-width"]=e,this.lineWidth=e}setLineDash(e){if(Object.prototype.toString.call(e)==="[object Array]")return e=e.join(", "),this.attributes["stroke-dasharray"]=e,this;throw new Vex.RERR("ArgumentError","lineDash must be an array of integers.")}setLineCap(e){return this.attributes["stroke-linecap"]=e,this}resize(e,t){this.width=e,this.height=t,this.element.style.width=e;const s={width:e,height:t};return this.applyAttributes(this.svg,s),this.scale(this.state.scale.x,this.state.scale.y),this}scale(e,t){this.state.scale={x:e,y:t};const s=this.width/e,r=this.height/t;return this.setViewBox(0,0,s,r),this}setViewBox(...e){if(e.length===1){const[t]=e;this.svg.setAttribute("viewBox",t)}else{const[t,s,r,o]=e,a=t+" "+s+" "+r+" "+o;this.svg.setAttribute("viewBox",a)}}applyAttributes(e,t){const s=attrNamesToIgnoreMap[e.nodeName];return Object.keys(t).forEach(r=>{var o;s&&s[r]||!r||!t[r]||r==="d"&&((o=t[r])==null?void 0:o.indexOf("NaN"))>-1||e.setAttributeNS(null,r,t[r])}),e}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild);this.scale(this.state.scale.x,this.state.scale.y)}rect(e,t,s,r,o){r<0&&(t+=r,r*=-1);const a=this.create("rect");return typeof o>"u"&&(o={fill:"none","stroke-width":this.lineWidth,stroke:"black"}),Vex.Merge(o,{x:e,y:t,width:s,height:r}),this.applyAttributes(a,o),this.add(a),this}fillRect(e,t,s,r){return r<0&&(t+=r,r*=-1),this.rect(e,t,s,r,this.attributes),this}clearRect(e,t,s,r){return this.rect(e,t,s,r,this.background_attributes),this}beginPath(){return this.path="",this.pen.x=NaN,this.pen.y=NaN,this}moveTo(e,t){return this.path+="M"+e+" "+t,this.pen.x=e,this.pen.y=t,this}lineTo(e,t){return this.path+="L"+e+" "+t,this.pen.x=e,this.pen.y=t,this}bezierCurveTo(e,t,s,r,o,a){return this.path+="C"+e+" "+t+","+s+" "+r+","+o+" "+a,this.pen.x=o,this.pen.y=a,this}quadraticCurveTo(e,t,s,r){return this.path+="Q"+e+" "+t+","+s+" "+r,this.pen.x=s,this.pen.y=r,this}arc(e,t,s,r,o,a){function l(d){for(;d<0;)d+=Math.PI*2;for(;d>Math.PI*2;)d-=Math.PI*2;return d}if(r=l(r),o=l(o),r>o){const d=r;r=o,o=d,a=!a}const c=o-r;return c>Math.PI?(this.arcHelper(e,t,s,r,r+c/2,a),this.arcHelper(e,t,s,r+c/2,o,a)):this.arcHelper(e,t,s,r,o,a),this}arcHelper(e,t,s,r,o,a){const l=e+s*Math.cos(r),c=t+s*Math.sin(r),d=e+s*Math.cos(o),m=t+s*Math.sin(o);let u=0,g=0;a?(g=1,o-r<Math.PI&&(u=1)):o-r>Math.PI&&(u=1),this.path+="M"+l+" "+c+" A"+s+" "+s+" 0 "+u+" "+g+" "+d+" "+m,!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 e=this.shadow_attributes,t=e.width/2;for(let s=1;s<=t;s++){const r={stroke:e.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width*.4/t*s).toFixed(3),opacity:+((e.opacity||.3)/t).toFixed(3)},o=this.create("path");r.d=this.path,this.applyAttributes(o,r),this.add(o)}}return this}fill(e){this.glow();const t=this.create("path");let s=e;return typeof e>"u"?(e={},Vex.Merge(e,this.attributes),e.stroke="none",s=e):(s=e,Vex.Merge(s,this.attributes),e.class&&(s.class=e.class),e.id&&(s.id=e.id)),e.d=this.path,this.applyAttributes(t,e),this.add(t),this}stroke(e=void 0){this.glow();const t=this.create("path"),s={};return Vex.Merge(s,this.attributes),e&&Vex.Merge(s,e),s.fill="none",s["stroke-width"]=this.lineWidth,s.d=this.path,this.applyAttributes(t,s),this.add(t),this}measureText(e){const t=this.create("text");if(typeof t.getBBox!="function")return{x:0,y:0,width:0,height:0};t.textContent=e,this.applyAttributes(t,this.attributes),this.svg.appendChild(t);let s=t.getBBox();return this.ie&&e!==""&&this.attributes["font-style"]==="italic"&&(s=this.ieMeasureTextFix(s,e)),this.svg.removeChild(t),s}ieMeasureTextFix(e){const t=Number(this.fontSize),s=1.196,r=1.9598,o=s*t+r,a=e.width-o,l=e.height-1.5;return{x:e.x,y:e.y,width:a,height:l}}fillText(e,t,s){if(!e||e.length<=0)return;const r={};Vex.Merge(r,this.attributes),r.stroke="none",r.x=t,r.y=s;const o=this.create("text");o.textContent=e,this.applyAttributes(o,r),this.add(o)}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 e=this.state_stack.pop();return this.state["font-family"]=e.state["font-family"],this.state["font-weight"]=e.state["font-weight"],this.state["font-style"]=e.state["font-style"],this.state["font-size"]=e.state["font-size"],this.state.scale=e.state.scale,this.attributes["font-family"]=e.attributes["font-family"],this.attributes["font-weight"]=e.attributes["font-weight"],this.attributes["font-style"]=e.attributes["font-style"],this.attributes["font-size"]=e.attributes["font-size"],this.attributes.fill=e.attributes.fill,this.attributes.stroke=e.attributes.stroke,this.attributes["stroke-width"]=e.attributes["stroke-width"],this.attributes["stroke-dasharray"]=e.attributes["stroke-dasharray"],this.shadow_attributes.width=e.shadow_attributes.width,this.shadow_attributes.color=e.shadow_attributes.color,this.lineWidth=e.lineWidth,this}}let lastContext=null;class Renderer{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 lastContext}static set lastContext(e){lastContext=e}static buildContext(e,t,s,r,o){const a=new Renderer(e,t);s&&r&&a.resize(s,r),o||(o="#FFF");const l=a.getContext();return l.setBackgroundFillStyle(o),Renderer.lastContext=l,l}static getCanvasContext(e,t,s,r){return Renderer.buildContext(e,Renderer.Backends.CANVAS,t,s,r)}static getRaphaelContext(e,t,s,r){return Renderer.buildContext(e,Renderer.Backends.RAPHAEL,t,s,r)}static getSVGContext(e,t,s,r){return Renderer.buildContext(e,Renderer.Backends.SVG,t,s,r)}static bolsterCanvasContext(e){if(Renderer.USE_CANVAS_PROXY)return new CanvasContext(e);const t=["clear","setFont","setRawFont","setFillStyle","setBackgroundFillStyle","setStrokeStyle","setShadowColor","setShadowBlur","setLineWidth","setLineCap","setLineDash","openGroup","closeGroup","getGroup"];return e.vexFlowCanvasContext=e,t.forEach(s=>{e[s]=e[s]||CanvasContext.prototype[s]}),e}static drawDashedLine(e,t,s,r,o,a){e.beginPath();const l=r-t,c=o-s,d=Math.atan2(c,l);let m=t,u=s;e.moveTo(t,s);let g=0,b=!0;for(;!((l<0?m<=r:m>=r)&&(c<0?u<=o:u>=o));){const y=a[g++%a.length],S=m+Math.cos(d)*y;m=l<0?Math.max(r,S):Math.min(r,S);const v=u+Math.sin(d)*y;u=c<0?Math.max(o,v):Math.min(o,v),b?e.lineTo(m,u):e.moveTo(m,u),b=!b}e.closePath(),e.stroke()}constructor(e,t){if(this.elementId=e,!this.elementId)throw new Vex.RERR("BadArgument","Invalid id for renderer.");if(this.element=document.getElementById(e),this.element||(this.element=e),this.ctx=null,this.paper=null,this.backend=t,this.backend===Renderer.Backends.CANVAS){if(!this.element.getContext)throw new Vex.RERR("BadElement",`Can't get canvas context from element: ${e}`);this.ctx=Renderer.bolsterCanvasContext(this.element.getContext("2d"))}else if(this.backend===Renderer.Backends.RAPHAEL)this.ctx=new RaphaelContext(this.element);else if(this.backend===Renderer.Backends.SVG)this.ctx=new SVGContext(this.element);else throw new Vex.RERR("InvalidBackend",`No support for backend: ${this.backend}`)}resize(e,t){if(this.backend===Renderer.Backends.CANVAS){if(!this.element.getContext)throw new Vex.RERR("BadElement",`Can't get canvas context from element: ${this.elementId}`);[e,t]=CanvasContext.SanitizeCanvasDims(e,t);const s=window.devicePixelRatio||1;this.element.width=e*s,this.element.height=t*s,this.element.style.width=e+"px",this.element.style.height=t+"px",this.ctx=Renderer.bolsterCanvasContext(this.element.getContext("2d")),this.ctx.scale(s,s)}else this.ctx.resize(e,t);return this}getContext(){return this.ctx}}function L$j(...i){Stem.DEBUG&&Vex.L("Vex.Flow.Stem",i)}class Stem extends Element$1{static get CATEGORY(){return"stem"}static get UP(){return 1}static get DOWN(){return-1}static get WIDTH(){return Flow.STEM_WIDTH}static get HEIGHT(){return Flow.STEM_HEIGHT}constructor(e={}){super(),this.setAttribute("type","Stem"),this.x_begin=e.x_begin||0,this.x_end=e.x_end||0,this.y_top=e.y_top||0,this.y_bottom=e.y_bottom||0,this.stem_extension=e.stem_extension||0,this.stem_direction=e.stem_direction||0,this.hide=e.hide||!1,this.isStemlet=e.isStemlet||!1,this.stemletHeight=e.stemletHeight||0,this.resetHeight=0,this.renderHeightAdjustment=0,this.setOptions(e)}setResetHeight(e){this.resetHeight=e}setOptions(e){this.stem_up_y_offset=e.stem_up_y_offset||0,this.stem_down_y_offset=e.stem_down_y_offset||0}setNoteHeadXBounds(e,t){return this.x_begin=e,this.x_end=t,this}setDirection(e){this.stem_direction=e}setExtension(e){this.stem_extension=e}getExtension(){return this.stem_extension}setYBounds(e,t){this.y_top=e,this.y_bottom=t}getCategory(){return Stem.CATEGORY}getHeight(){const e=this.stem_direction===Stem.UP?this.stem_up_y_offset:this.stem_down_y_offset;return(this.y_bottom-this.y_top)*this.stem_direction+(Stem.HEIGHT-e+this.stem_extension)*this.stem_direction}getBoundingBox(){throw new Vex.RERR("NotImplemented","getBoundingBox() not implemented.")}getExtents(){const e=this.stem_direction===Stem.UP,t=[this.y_top,this.y_bottom],s=Stem.HEIGHT+this.stem_extension,r=(e?Math.min:Math.max)(...t),o=(e?Math.max:Math.min)(...t);return{topY:r+s*-this.stem_direction+this.resetHeight*-this.stem_direction,baseY:o}}setVisibility(e){return this.hide=!e,this}setStemlet(e,t){return this.isStemlet=e,this.stemletHeight=t,this}draw(){if(this.setRendered(),this.hide)return;const e=this.checkContext();let t,s;const r=this.stem_direction;r===Stem.DOWN?(t=this.x_begin,s=this.y_top+this.stem_down_y_offset):(t=this.x_end,s=this.y_bottom-this.stem_up_y_offset);const o=this.getHeight();L$j("Rendering stem - ","Top Y: ",this.y_top,"Bottom Y: ",this.y_bottom);const a=this.isStemlet?o-this.stemletHeight*this.stem_direction:0;if(e.save(),this.applyStyle(e),e.beginPath(),e.setLineWidth(Stem.WIDTH),e.moveTo(t,s-a),e.lineTo(t,s-o-this.renderHeightAdjustment*r-this.resetHeight*r),e.svg){const l={class:Vex.Prefix("stem")};this.id&&(l.id=this.id),e.stroke(l)}else e.stroke();this.restoreStyle(e),e.restore()}}let Tuplet$1=class ut extends Element$1{static get LOCATION_TOP(){return 1}static get LOCATION_BOTTOM(){return-1}static get NESTING_OFFSET(){return 15}constructor(e,t){if(super(),this.setAttribute("type","Tuplet"),!e||!e.length)throw new Vex.RuntimeError("BadArguments","No notes provided for tuplet.");this.options=Vex.Merge({},t),this.notes=e,this.num_notes="num_notes"in this.options?this.options.num_notes:e.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=e.some(s=>s.beam===null),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||ut.LOCATION_TOP,Formatter.AlignRestsToNotes(e,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let e=0;e<this.notes.length;e++)this.notes[e].setTuplet(this)}detach(){for(let e=0;e<this.notes.length;e++)this.notes[e].resetTuplet(this)}setBracketed(e){return this.bracketed=!!e,this}setRatioed(e){return this.ratioed=!!e,this}setTupletLocation(e){if(!e)e=ut.LOCATION_TOP;else if(e!==ut.LOCATION_TOP&&e!==ut.LOCATION_BOTTOM)throw new Vex.RERR("BadArgument","Invalid tuplet location: "+e);return this.location=e,this}getNotes(){return this.notes}getNoteCount(){return this.num_notes}beatsOccupiedDeprecationWarning(){const e=["beats_occupied has been deprecated as an ","option for tuplets. Please use notes_occupied ","instead. Calls to getBeatsOccupied and ","setBeatsOccupied should now be routed to ","getNotesOccupied and setNotesOccupied instead"].join("");console&&console.warn?console.warn(e):console&&console.log(e)}getBeatsOccupied(){return this.beatsOccupiedDeprecationWarning(),this.getNotesOccupied()}setBeatsOccupied(e){return this.beatsOccupiedDeprecationWarning(),this.setNotesOccupied(e)}getNotesOccupied(){return this.notes_occupied}setNotesOccupied(e){this.detach(),this.notes_occupied=e,this.resolveGlyphs(),this.attach()}resolveGlyphs(){this.numerator_glyphs=[];let e=this.num_notes;for(;e>=1;)this.numerator_glyphs.unshift(new Glyph("v"+e%10,this.point)),e=parseInt(e/10,10);for(this.denom_glyphs=[],e=this.notes_occupied;e>=1;)this.denom_glyphs.unshift(new Glyph("v"+e%10,this.point)),e=parseInt(e/10,10)}getNestedTupletCount(){const e=this.location,t=this.notes[0];let s=o(t,e),r=o(t,e);function o(a,l){return a.tupletStack.filter(c=>c.location===l).length}return this.notes.forEach(a=>{const l=o(a,e);s=l>s?l:s,r=l<r?l:r}),s-r}getYPosition(){const e=this.getNestedTupletCount()*ut.NESTING_OFFSET*-this.location,t=this.options.y_offset||0,s=this.notes[0];let r;if(this.location===ut.LOCATION_TOP){r=s.getStave().getYForLine(0)-15;for(let o=0;o<this.notes.length;++o){const a=this.notes[o].getStemDirection()===Stem.UP?this.notes[o].getStemExtents().topY-10:this.notes[o].getStemExtents().baseY-20;a<r&&(r=a)}}else{r=s.getStave().getYForLine(4)+20;for(let o=0;o<this.notes.length;++o){const a=this.notes[o].getStemDirection()===Stem.UP?this.notes[o].getStemExtents().baseY+20:this.notes[o].getStemExtents().topY+10;a>r&&(r=a)}}return r+e+t}draw(){this.checkContext(),this.setRendered();const e=this.notes[0],t=this.notes[this.notes.length-1];this.bracketed?(this.x_pos=e.getTieLeftX()-5,this.width=t.getTieRightX()-this.x_pos+5):(this.x_pos=e.getStemX(),this.width=t.getStemX()-this.x_pos),this.y_pos=this.getYPosition();const s=(c,d)=>c+d.getMetrics().width;let r=this.numerator_glyphs.reduce(s,0);this.ratioed&&(r=this.denom_glyphs.reduce(s,r),r+=this.point*.32);const a=this.x_pos+this.width/2-r/2;if(this.bracketed){const c=this.width/2-r/2-5;c>0&&(this.context.fillRect(this.x_pos,this.y_pos,c,1),this.context.fillRect(this.x_pos+this.width/2+r/2+5,this.y_pos,c,1),this.context.fillRect(this.x_pos,this.y_pos+(this.location===ut.LOCATION_BOTTOM),1,this.location*10),this.context.fillRect(this.x_pos+this.width,this.y_pos+(this.location===ut.LOCATION_BOTTOM),1,this.location*10))}let l=0;if(this.numerator_glyphs.forEach(c=>{c.render(this.context,a+l,this.y_pos+this.point/3-2),l+=c.getMetrics().width}),this.ratioed){const c=a+l+this.point*.16,d=this.point*.06;this.context.beginPath(),this.context.arc(c,this.y_pos-this.point*.08,d,0,Math.PI*2,!0),this.context.closePath(),this.context.fill(),this.context.beginPath(),this.context.arc(c,this.y_pos+this.point*.12,d,0,Math.PI*2,!0),this.context.closePath(),this.context.fill(),l+=this.point*.32,this.denom_glyphs.forEach(m=>{m.render(this.context,a+l,this.y_pos+this.point/3-2),l+=m.getMetrics().width})}}};function calculateStemDirection(i){let e=0;return i.forEach(t=>{t.keyProps&&t.keyProps.forEach(s=>{e+=s.line-3})}),e>=0?Stem.DOWN:Stem.UP}const getStemSlope=(i,e)=>{const t=i.getStemExtents().topY,s=i.getStemX(),r=e.getStemExtents().topY,o=e.getStemX();return(r-t)/(o-s)},BEAM_LEFT="L",BEAM_RIGHT="R",BEAM_BOTH="B";let Beam$1=class Yt extends Element$1{static getDefaultBeamGroups(e){(!e||e==="c")&&(e="4/4");const s={"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"]}[e];if(s===void 0){const r=parseInt(e.split("/")[0],10),o=parseInt(e.split("/")[1],10);if(r%3===0)return[new Fraction(3,o)];if(o>4)return[new Fraction(2,o)];if(o<=4)return[new Fraction(1,o)]}else return s.map(r=>new Fraction().parse(r));return[new Fraction(1,4)]}static applyAndGetBeams(e,t,s){return Yt.generateBeams(e.getTickables(),{groups:s,stem_direction:t})}static generateBeams(e,t){t||(t={}),(!t.groups||!t.groups.length)&&(t.groups=[new Fraction(2,8)]);const s=t.groups.map(w=>{if(!w.multiply)throw new Vex.RuntimeError("InvalidBeamGroups","The beam groups must be an array of Vex.Flow.Fractions");return w.clone().multiply(Flow.RESOLUTION,1)}),r=e;let o=0,a=[],l=[];function c(w){return w.reduce((_,C)=>C.getTicks().clone().add(_),new Fraction(0,1))}function d(){s.length-1>o?o+=1:o=0}function m(){let w=[];r.forEach(_=>{if(w=[],_.shouldIgnoreTicks()){a.push(l),l=w;return}l.push(_);const C=s[o].clone(),P=c(l),I=Flow.durationToNumber(_.duration)<8;I&&_.tuplet&&(C.numerator*=2),P.greaterThan(C)?(I||w.push(l.pop()),a.push(l),l=w,d()):P.equals(C)&&(a.push(l),l=w,d())}),l.length>0&&a.push(l)}function u(){return a.filter(w=>{if(w.length>1){let _=!0;return w.forEach(C=>{C.getIntrinsicTicks()>=Flow.durationToTicks("4")&&(_=!1)}),_}return!1})}function g(){const w=[];a.forEach(_=>{let C=[];_.forEach((P,I,R)=>{const N=I===0||I===R.length-1,G=R[I-1],B=!t.beam_rests&&P.isRest(),k=t.beam_rests&&t.beam_middle_only&&P.isRest()&&N;let T=!1;if(t.maintain_stem_directions&&G&&!P.isRest()&&!G.isRest()){const W=G.getStemDirection();T=P.getStemDirection()!==W}const V=parseInt(P.duration,10)<8;B||k||T||V?(C.length>0&&w.push(C),C=T?[P]:[]):C.push(P)}),C.length>0&&w.push(C)}),a=w}function b(){a.forEach(w=>{let _;if(t.maintain_stem_directions){const C=y(w);_=C?C.getStemDirection():Stem.UP}else t.stem_direction?_=t.stem_direction:_=calculateStemDirection(w);S(w,_)})}function y(w){for(let _=0;_<w.length;_++){const C=w[_];if(!C.isRest())return C}return!1}function S(w,_){w.forEach(C=>{C.setStemDirection(_)})}function v(){const w=[];return a.forEach(_=>{let C=null;_.forEach(P=>{P.tuplet&&C!==P.tuplet&&(C=P.tuplet,w.push(C))})}),w}m(),g(),b();const x=u(),A=v(),E=[];return x.forEach(w=>{const _=new Yt(w);t.show_stemlets&&(_.render_options.show_stemlets=!0),t.secondary_breaks&&(_.render_options.secondary_break_ticks=Flow.durationToTicks(t.secondary_breaks)),t.flat_beams===!0&&(_.render_options.flat_beams=!0,_.render_options.flat_beam_offset=t.flat_beam_offset),E.push(_)}),A.forEach(w=>{const _=w.notes[0].stem_direction===Stem.DOWN?Tuplet$1.LOCATION_BOTTOM:Tuplet$1.LOCATION_TOP;w.setTupletLocation(_);let C=!1;for(let P=0;P<w.notes.length;P++)if(w.notes[P].beam===null){C=!0;break}w.setBracketed(C)}),E}constructor(e,t){if(super(),this.setAttribute("type","Beam"),!e||e===[])throw new Vex.RuntimeError("BadArguments","No notes provided for beam.");if(e.length===1)throw new Vex.RuntimeError("BadArguments","Too few notes for beam.");if(this.ticks=e[0].getIntrinsicTicks(),this.ticks>=Flow.durationToTicks("4"))throw new Vex.RuntimeError("BadArguments","Beams can only be applied to notes shorter than a quarter note.");let s,r;for(this.stem_direction=Stem.UP,s=0;s<e.length;++s)if(r=e[s],r.hasStem()){this.stem_direction=r.getStemDirection();break}let o=this.stem_direction;for(t&&e[0].getCategory()==="stavenotes"?o=calculateStemDirection(e):t&&e[0].getCategory()==="tabnotes"&&(o=e.reduce((l,c)=>l+c.stem_direction,0)>-1?Stem.UP:Stem.DOWN),s=0;s<e.length;++s)r=e[s],t&&(r.setStemDirection(o),this.stem_direction=o),r.setBeam(this);this.postFormatted=!1,this.notes=e,this.beam_count=this.getBeamCount(),this.break_on_indices=[],this.render_options={beam_width:5,max_slope:.25,min_slope:-.25,slope_iterations:20,slope_cost:100,show_stemlets:!1,stemlet_extension:7,partial_beam_length:10,flat_beams:!1,min_flat_beam_offset:15}}getNotes(){return this.notes}getBeamCount(){return this.notes.map(s=>s.getGlyph().beam_count).reduce((s,r)=>r>s?r:s)}breakSecondaryAt(e){return this.break_on_indices=e,this}getSlopeY(e,t,s,r){return s+(e-t)*r}calculateSlope(){const{notes:e,stem_direction:t,render_options:{max_slope:s,min_slope:r,slope_iterations:o,slope_cost:a}}=this,l=e[0],c=getStemSlope(l,e[e.length-1]),d=(s-r)/o;let m=Number.MAX_VALUE,u=0,g=0;for(let b=r;b<=s;b+=d){let y=0,S=0;for(let E=1;E<e.length;++E){const w=e[E],_=this.getSlopeY(w.getStemX(),l.getStemX(),l.getStemExtents().topY,b)+S,C=w.getStemExtents().topY;if(C*t<_*t){const P=Math.abs(C-_);S+=P*-t,y+=P*E}else y+=(C-_)*t}const v=c/2,x=Math.abs(v-b),A=a*x+Math.abs(y);A<m&&(m=A,u=b,g=S)}this.slope=u,this.y_shift=g}calculateFlatSlope(){const{notes:e,stem_direction:t,render_options:{beam_width:s,min_flat_beam_offset:r,flat_beam_offset:o}}=this;let a=0,l=0,c=0,d=0;for(let y=0;y<e.length;y++){const S=e[y],v=S.getStemExtents().topY;a+=v,t===Stem.DOWN&&d<v?(d=v,l=Math.max(...S.getYs()),c=S.getBeamCount()):t===Stem.UP&&(d===0||d>v)&&(d=v,l=Math.min(...S.getYs()),c=S.getBeamCount())}let m=a/e.length;const u=s*1.5,g=r+c*u,b=l+g*-t;t===Stem.DOWN&&m<b?m=l+g:t===Stem.UP&&m>b&&(m=l-g),o+this.render_options.flat_beam_offset_per_beam>0?t===Stem.DOWN&&m>o&&!this.render_options.flat_beams?this.render_options.flat_beam_offset=m:t===Stem.UP&&m<o&&!this.render_options.flat_beams&&(this.render_options.flat_beam_offset=m):this.render_options.flat_beam_offset=m,this.slope=0,this.y_shift=0}getBeamYToDraw(){let s=this.notes[0].getStemExtents().topY;if(this.render_options.flat_beams&&this.render_options.flat_beam_offset+this.render_options.flat_beam_offset_per_beam>0){let r=this.render_options.flat_beam_offset;this.render_options.flat_beam_offset_per_beam&&(r+=this.render_options.flat_beam_offset_per_beam*this.getBeamCount());let o=this.notes[0].note_heads[0].y;const a=this.stem_direction>0?Math.min:Math.max;for(const l of this.notes)for(const c of l.note_heads)o=a(o,c.y);s=o+r*-this.stem_direction}return s}applyStemExtensions(){const{notes:e,slope:t,y_shift:s,stem_direction:r,beam_count:o,render_options:{show_stemlets:a,stemlet_extension:l,beam_width:c}}=this,d=e[0],m=this.getBeamYToDraw(),u=d.getStemX();for(let g=0;g<e.length;++g){const b=e[g],y=b.getStemX(),{topY:S}=b.getStemExtents(),v=this.getSlopeY(y,u,m,t)+s,x=b.getStem().getExtension(),A=r===Stem.UP?S-v:v-S;if(b.stem.setExtension(x+A),b.stem.renderHeightAdjustment=-Stem.WIDTH/2,b.isRest()&&a){const E=c,w=(o-1)*E*1.5+E;b.stem.setVisibility(!0).setStemlet(!0,w+l)}}}lookupBeamDirection(e,t,s,r){if(e==="4")return BEAM_LEFT;const o=`${Flow.durationToNumber(e)/2}`,a=t<Flow.durationToTicks(o),l=r<Flow.durationToTicks(o),c=s<Flow.durationToTicks(o);return a&&l&&c?BEAM_BOTH:a&&!l&&c?BEAM_LEFT:!a&&l&&c?BEAM_RIGHT:this.lookupBeamDirection(o,t,s,r)}getBeamLines(e){const t=Flow.durationToTicks(e),s=[];let r=!1,o=null;const a=this.render_options.partial_beam_length;let l=!1,c=0;for(let m=0;m<this.notes.length;++m){const u=this.notes[m],g=u.ticks.value();c+=g;let b=!1;parseInt(e,10)>=8&&(b=this.break_on_indices.indexOf(m)!==-1,this.render_options.secondary_break_ticks&&c>=this.render_options.secondary_break_ticks&&(c=0,b=!0));const y=u.getIntrinsicTicks()<t,S=u.getStemX()-Stem.WIDTH/2,v=this.notes[m-1],x=this.notes[m+1],A=x&&x.getIntrinsicTicks()<t,E=v&&v.getIntrinsicTicks()<t,w=v&&x&&y&&!E&&!A;if(y)if(r)o=s[s.length-1],o.end=S,b&&(r=!1,x&&!A&&o.end===null&&(o.end=o.start-a));else{if(o={start:S,end:null,start_note:u},r=!0,w){const _=v.getIntrinsicTicks(),C=x.getIntrinsicTicks(),P=u.getIntrinsicTicks(),I=this.lookupBeamDirection(e,_,P,C);[BEAM_LEFT,BEAM_BOTH].includes(I)?o.end=o.start-a:o.end=o.start+a}else A?b&&(o.end=o.start-a,r=!1):(l||m===0)&&x?o.end=o.start+a:o.end=o.start-a;s.push(o)}else r=!1;l=b}const d=s[s.length-1];return d&&d.end===null&&(d.end=d.start-a),s}drawStems(){this.notes.forEach(e=>{e.getStem()&&(this.context.openGroup("stem",e.getAttribute("id")+"-stem"),e.getStem().setContext(this.context).draw(),this.context.closeGroup())},this)}drawBeamLines(){this.checkContext();const e=["4","8","16","32","64"],t=this.notes[0];let s=this.getBeamYToDraw();const r=t.getStemX(),o=this.render_options.beam_width*this.stem_direction,a={};for(const l of this.notes)a[l.getAttribute("id")]=0;for(let l=0;l<e.length;++l){const c=e[l],d=this.getBeamLines(c);for(let m=0;m<d.length;++m){const u=d[m],g=u.start,b=u.start_note.getAttribute("id"),y=a[b];a[b]++;const S=this.getSlopeY(g,r,s,this.slope),v=u.end,x=this.getSlopeY(v,r,s,this.slope),A=b;this.context.openGroup("beam",`${A}-beam${y}`),this.context.beginPath(),this.context.moveTo(g,S),this.context.lineTo(g,S+o),this.context.lineTo(v+1,x+o),this.context.lineTo(v+1,x),this.context.closePath(),this.context.fill(),this.context.closeGroup()}s+=o*1.5}}preFormat(){return this}postFormat(){this.postFormatted||(this.notes[0].getCategory()==="tabnotes"||this.render_options.flat_beams?this.calculateFlatSlope():this.calculateSlope(),this.applyStemExtensions(),this.postFormatted=!0)}draw(){this.checkContext(),this.setRendered(),!this.unbeamable&&(this.postFormatted||this.postFormat(),this.drawStems(),this.applyStyle(),this.drawBeamLines(),this.restoreStyle())}},Voice$1=class gt extends Element$1{static get Mode(){return{STRICT:1,SOFT:2,FULL:3}}constructor(e){if(super(),this.setAttribute("type","Voice"),typeof e=="string"){const t=e.match(/(\d+)\/(\d+)/);t&&(e={num_beats:t[1],beat_value:t[2],resolution:Flow.RESOLUTION})}this.time=Vex.Merge({num_beats:4,beat_value:4,resolution:Flow.RESOLUTION},e),this.totalTicks=new Fraction(this.time.num_beats*(this.time.resolution/this.time.beat_value),1),this.resolutionMultiplier=1,this.tickables=[],this.ticksUsed=new Fraction(0,1),this.smallestTickCount=this.totalTicks.clone(),this.largestTickWidth=0,this.stave=null,this.mode=gt.Mode.STRICT,this.voiceGroup=null}getTotalTicks(){return this.totalTicks}getTicksUsed(){return this.ticksUsed}getLargestTickWidth(){return this.largestTickWidth}getSmallestTickCount(){return this.smallestTickCount}getTickables(){return this.tickables}getMode(){return this.mode}setMode(e){return this.mode=e,this}getResolutionMultiplier(){return this.resolutionMultiplier}getActualResolution(){return this.resolutionMultiplier*this.time.resolution}setStave(e){return this.stave=e,this.boundingBox=null,this}getBoundingBox(){let e,t,s,r;if(!this.boundingBox){if(!this.stave)throw new Vex.RERR("NoStave","Can't get bounding box without stave.");for(e=this.stave,t=null,r=0;r<this.tickables.length;++r)this.tickables[r].setStave(e),s=this.tickables[r].getBoundingBox(),s&&(t=t?t.mergeWith(s):s);this.boundingBox=t}return this.boundingBox}getVoiceGroup(){if(!this.voiceGroup)throw new Vex.RERR("NoVoiceGroup","No voice group for voice.");return this.voiceGroup}setVoiceGroup(e){return this.voiceGroup=e,this}setStrict(e){return this.mode=e?gt.Mode.STRICT:gt.Mode.SOFT,this}isComplete(){return this.mode===gt.Mode.STRICT||this.mode===gt.Mode.FULL?this.ticksUsed.equals(this.totalTicks):!0}addTickable(e){if(!e.shouldIgnoreTicks()){const t=e.getTicks();if(this.ticksUsed.add(t),(this.mode===gt.Mode.STRICT||this.mode===gt.Mode.FULL)&&this.ticksUsed.greaterThan(this.totalTicks))throw this.ticksUsed.subtract(t),new Vex.RERR("BadArgument","Too many ticks.");t.lessThan(this.smallestTickCount)&&(this.smallestTickCount=t.clone()),this.resolutionMultiplier=this.ticksUsed.denominator,this.totalTicks.add(0,this.ticksUsed.denominator)}return this.tickables.push(e),e.setVoice(this),this}addTickables(e){for(let t=0;t<e.length;++t)this.addTickable(e[t]);return this}preFormat(){return this.preFormatted?this:(this.tickables.forEach(e=>{e.getStave()||e.setStave(this.stave)}),this.preFormatted=!0,this)}draw(e=this.context,t=this.stave){this.setRendered();let s=null;for(let r=0;r<this.tickables.length;++r){const o=this.tickables[r];if(t&&o.setStave(t),!o.getStave())throw new Vex.RuntimeError("MissingStave","The voice cannot draw tickables without staves.");if(r===0&&(s=o.getBoundingBox()),r>0&&s){const a=o.getBoundingBox();a&&s.mergeWith(a)}o.setContext(e),o.drawWithStyle()}this.boundingBox=s}};function drawBoldDoubleLine(i,e,t,s,r){if(e!==StaveConnector.type.BOLD_DOUBLE_LEFT&&e!==StaveConnector.type.BOLD_DOUBLE_RIGHT)throw new Vex.RERR("InvalidConnector","A REPEAT_BEGIN or REPEAT_END type must be provided.");let o=3,a=3.5;const l=2;e===StaveConnector.type.BOLD_DOUBLE_RIGHT&&(o=-5,a=3),i.fillRect(t+o,s,1,r-s),i.fillRect(t-l,s,a,r-s)}class StaveConnector extends Element$1{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:StaveConnector.type.SINGLE_RIGHT,singleLeft:StaveConnector.type.SINGLE_LEFT,single:StaveConnector.type.SINGLE,double:StaveConnector.type.DOUBLE,brace:StaveConnector.type.BRACE,bracket:StaveConnector.type.BRACKET,boldDoubleLeft:StaveConnector.type.BOLD_DOUBLE_LEFT,boldDoubleRight:StaveConnector.type.BOLD_DOUBLE_RIGHT,thinDouble:StaveConnector.type.THIN_DOUBLE,none:StaveConnector.type.NONE}}constructor(e,t){super(),this.setAttribute("type","StaveConnector"),this.thickness=Flow.STAVE_LINE_THICKNESS,this.width=3,this.top_stave=e,this.bottom_stave=t,this.type=StaveConnector.type.DOUBLE,this.font={family:"times",size:16,weight:"normal"},this.x_shift=0,this.texts=[]}setType(e){return e=typeof e=="string"?StaveConnector.typeString[e]:e,e>=StaveConnector.type.SINGLE_RIGHT&&e<=StaveConnector.type.NONE&&(this.type=e),this}setText(e,t){return this.texts.push({content:e,options:Vex.Merge({shift_x:0,shift_y:0},t)}),this}setFont(e){Vex.Merge(this.font,e)}setXShift(e){if(typeof e!="number")throw Vex.RERR("InvalidType","x_shift must be a Number");return this.x_shift=e,this}draw(){const e=this.checkContext();this.setRendered();let t=this.top_stave.getYForLine(0),s=this.bottom_stave.getYForLine(this.bottom_stave.getNumLines()-1)+this.thickness,r=this.width,o=this.top_stave.getX();(this.type===StaveConnector.type.SINGLE_RIGHT||this.type===StaveConnector.type.BOLD_DOUBLE_RIGHT||this.type===StaveConnector.type.THIN_DOUBLE)&&(o=this.top_stave.getX()+this.top_stave.width);let l=s-t;switch(this.type){case StaveConnector.type.SINGLE:r=1;break;case StaveConnector.type.SINGLE_LEFT:r=1;break;case StaveConnector.type.SINGLE_RIGHT:r=1;break;case StaveConnector.type.DOUBLE:o-=this.width+2;break;case StaveConnector.type.BRACE:{r=12;const c=this.top_stave.getX()-2+this.x_shift,d=t,m=c,u=s,g=c-r,b=d+l/2,y=g-.9*r,S=d+.2*l,v=c+1.1*r,x=b-.135*l,A=v,E=b+.135*l,w=y,_=u-.2*l,C=g-r,P=_,I=c+.4*r,R=b+.135*l,N=I,G=b-.135*l,B=C,k=S;e.beginPath(),e.moveTo(c,d),e.bezierCurveTo(y,S,v,x,g,b),e.bezierCurveTo(A,E,w,_,m,u),e.bezierCurveTo(C,P,I,R,g,b),e.bezierCurveTo(N,G,B,k,c,d),e.fill(),e.stroke();break}case StaveConnector.type.BRACKET:t-=4,s+=4,l=s-t,Glyph.renderGlyph(e,o-5,t-3,40,"v1b",!0),Glyph.renderGlyph(e,o-5,s+3,40,"v10",!0),o-=this.width+2;break;case StaveConnector.type.BOLD_DOUBLE_LEFT:drawBoldDoubleLine(e,this.type,o+this.x_shift,t,s);break;case StaveConnector.type.BOLD_DOUBLE_RIGHT:drawBoldDoubleLine(e,this.type,o,t,s);break;case StaveConnector.type.THIN_DOUBLE:r=1;break;case StaveConnector.type.NONE:break;default:throw new Vex.RERR("InvalidType",`The provided StaveConnector.type (${this.type}) is invalid`)}this.type!==StaveConnector.type.BRACE&&this.type!==StaveConnector.type.BOLD_DOUBLE_LEFT&&this.type!==StaveConnector.type.BOLD_DOUBLE_RIGHT&&this.type!==StaveConnector.type.NONE&&e.fillRect(o,t,r,l),this.type===StaveConnector.type.THIN_DOUBLE&&e.fillRect(o-3,t,r,l),e.save(),e.lineWidth=2,e.setFont(this.font.family,this.font.size,this.font.weight);for(let c=0;c<this.texts.length;c++){const d=this.texts[c],m=e.measureText(""+d.content).width,u=this.top_stave.getX()-m-24+d.options.shift_x,g=(this.top_stave.getYForLine(0)+this.bottom_stave.getBottomLineY())/2+d.options.shift_y;e.fillText(""+d.content,u,g+4)}e.restore()}}class Tickable extends Element$1{constructor(){super(),this.setAttribute("type","Tickable"),this.ticks=new Fraction(0,1),this.intrinsicTicks=0,this.tickMultiplier=new Fraction(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(e){this.x_shift=e}getCenterXShift(){return this.isCenterAligned()?this.center_x_shift:0}isCenterAligned(){return this.align_center}setCenterAlignment(e){return this.align_center=e,this}getVoice(){if(!this.voice)throw new Vex.RERR("NoVoice","Tickable has no voice.");return this.voice}setVoice(e){this.voice=e}getTuplet(){return this.tuplet}resetTuplet(e){let t,s;if(e){const r=this.tupletStack.indexOf(e);return r!==-1&&(this.tupletStack.splice(r,1),t=e.getNoteCount(),s=e.getNotesOccupied(),this.applyTickMultiplier(t,s)),this}for(;this.tupletStack.length;)e=this.tupletStack.pop(),t=e.getNoteCount(),s=e.getNotesOccupied(),this.applyTickMultiplier(t,s);return this}setTuplet(e){if(e){this.tupletStack.push(e);const t=e.getNoteCount(),s=e.getNotesOccupied();this.applyTickMultiplier(s,t)}return this.tuplet=e,this}addToModifierContext(e){this.modifierContext=e,this.preFormatted=!1}addModifier(e){return this.modifiers.push(e),this.preFormatted=!1,this}getModifiers(){return this.modifiers}setTickContext(e){this.tickContext=e,this.preFormatted=!1}preFormat(){this.preFormatted||(this.width=0,this.modifierContext&&(this.modifierContext.preFormat(),this.width+=this.modifierContext.getWidth()))}postFormat(){return this.postFormatted?this:(this.postFormatted=!0,this)}getIntrinsicTicks(){return this.intrinsicTicks}setIntrinsicTicks(e){this.intrinsicTicks=e,this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}getTickMultiplier(){return this.tickMultiplier}applyTickMultiplier(e,t){this.tickMultiplier.multiply(e,t),this.ticks=this.tickMultiplier.clone().multiply(this.intrinsicTicks)}setDuration(e){const t=e.numerator*(Flow.RESOLUTION/e.denominator);this.ticks=this.tickMultiplier.clone().multiply(t),this.intrinsicTicks=this.ticks.value()}}class Note extends Tickable{static get CATEGORY(){return"note"}static get STAVEPADDING(){return 12}static plotMetrics(e,t,s){const r=t.getMetrics(),o=t.getAbsoluteX()-r.modLeftPx-r.extraLeftPx,a=t.getAbsoluteX()-r.extraLeftPx,l=t.getAbsoluteX(),c=t.getAbsoluteX()+r.noteWidth,d=t.getAbsoluteX()+r.noteWidth+r.extraRightPx,m=t.getAbsoluteX()+r.noteWidth+r.extraRightPx+r.modRightPx,u=m+t.getFormatterMetrics().freedom.right,g=m-o;e.save(),e.setFont("Arial",8,""),e.fillText(Math.round(g)+"px",o+t.getXShift(),s);const b=s+7;function y(v,x,A,E=b){e.beginPath(),e.setStrokeStyle(A),e.setFillStyle(A),e.setLineWidth(3),e.moveTo(v+t.getXShift(),E),e.lineTo(x+t.getXShift(),E),e.stroke()}y(o,a,"red"),y(a,l,"#999"),y(l,c,"green"),y(c,d,"#999"),y(d,m,"red"),y(m,u,"#DD0"),y(o-t.getXShift(),o,"#BBB"),Vex.drawDot(e,l+t.getXShift(),b,"blue");const S=t.getFormatterMetrics();if(S.iterations>0){const v=S.space.deviation,x=v>=0?"+":"";e.setFillStyle("red"),e.fillText(x+Math.round(v),l+t.getXShift(),s-10)}e.restore()}constructor(e){if(super(),this.setAttribute("type","Note"),!e)throw new Vex.RuntimeError("BadArguments","Note must have valid initialization data to identify duration and type.");const t=Flow.parseNoteStruct(e);if(!t)throw new Vex.RuntimeError("BadArguments",`Invalid note initialization object: ${JSON.stringify(e)}`);if(this.duration=t.duration,this.dots=t.dots,this.noteType=t.type,this.customTypes=t.customTypes,this.DYMusicScoreType=e.DYMusicScoreType,e.duration_override?this.setDuration(e.duration_override):this.setIntrinsicTicks(t.ticks),this.modifiers=[],this.glyph=Flow.getGlyphProps(this.duration,this.noteType),this.customGlyphs=this.customTypes.map(s=>Flow.getGlyphProps(this.duration,s)),this.positions&&(typeof this.positions!="object"||!this.positions.length))throw new Vex.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=[],e.align_center&&this.setCenterAlignment(e.align_center),this.stave=null,this.render_options={annotation_spacing:5,stave_padding:Note.STAVEPADDING}}getPlayNote(){return this.playNote}setPlayNote(e){return this.playNote=e,this}isRest(){return!1}addStroke(e,t){return t.setNote(this),t.setIndex(e),this.modifiers.push(t),this.setPreFormatted(!1),this}getStave(){return this.stave}setStave(e){return this.stave=e,this.setYs([e.getYForLine(0)]),this.context=this.stave.context,this}getCategory(){return Note.CATEGORY}setContext(e){return this.context=e,this}getExtraLeftPx(){return this.extraLeftPx}getExtraRightPx(){return this.extraRightPx}setExtraLeftPx(e){return this.extraLeftPx=e,this}setExtraRightPx(e){return this.extraRightPx=e,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(e){return this.ys=e,this}getYs(){if(this.ys.length===0)throw new Vex.RERR("NoYValues","No Y-values calculated for this note.");return this.ys}getYForTopText(e){if(!this.stave)throw new Vex.RERR("NoStave","No stave attached to this note.");return this.stave.getYForTopText(e)}getBoundingBox(){return null}getVoice(){if(!this.voice)throw new Vex.RERR("NoVoice","Note has no voice.");return this.voice}setVoice(e){return this.voice=e,this.preFormatted=!1,this}getTickContext(){return this.tickContext}setTickContext(e){return this.tickContext=e,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(e){return this.modifierContext=e,this}addModifier(e,t=0){return e.setNote(this),e.setIndex(t),this.modifiers.push(e),this.setPreFormatted(!1),this}getModifierStartXY(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");return{x:this.getAbsoluteX(),y:this.ys[0]}}getMetrics(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call getMetrics on an unformatted note.");let e=0,t=0;this.modifierContext!=null&&(e=this.modifierContext.state.left_shift,t=this.modifierContext.state.right_shift);const s=this.getWidth();return{width:s,noteWidth:s-e-t-this.extraLeftPx-this.extraRightPx,left_shift:this.x_shift,modLeftPx:e,modRightPx:t,extraLeftPx:this.extraLeftPx,extraRightPx:this.extraRightPx}}setWidth(e){this.width=e}getWidth(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call GetWidth on an unformatted note.");return this.width+(this.modifierContext?this.modifierContext.getWidth():0)}setXShift(e){return this.x_shift=e,this}getXShift(){return this.x_shift}getX(){if(!this.tickContext)throw new Vex.RERR("NoTickContext","Note needs a TickContext assigned for an X-Value");return this.tickContext.getX()+this.x_shift}getAbsoluteX(){if(!this.tickContext)throw new Vex.RERR("NoTickContext","Note needs a TickContext assigned for an X-Value");let e=this.tickContext.getX();return this.stave&&(e+=this.stave.getNoteStartX()+this.render_options.stave_padding),this.isCenterAligned()&&(this.DYMusicScoreType==="jianpu"||(e+=this.getCenterXShift())),e}setPreFormatted(e){if(this.preFormatted=e,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)}}}function L$i(...i){NoteHead.DEBUG&&Vex.L("Vex.Flow.NoteHead",i)}function drawSlashNoteHead(i,e,t,s,r,o){const a=Flow.SLASH_NOTEHEAD_WIDTH;i.save(),i.setLineWidth(Flow.STEM_WIDTH);let l=!1;if(Flow.durationToNumber(e)>2&&(l=!0),l||(t-=Flow.STEM_WIDTH/2*r),i.beginPath(),i.moveTo(t,s+o),i.lineTo(t,s+1),i.lineTo(t+a,s-o),i.lineTo(t+a,s),i.lineTo(t,s+o),i.closePath(),l?i.fill():i.stroke(),Flow.durationToFraction(e).equals(.5)){const c=[-3,-1,a+1,a+3];for(let d=0;d<c.length;d++)i.beginPath(),i.moveTo(t+c[d],s-10),i.lineTo(t+c[d],s+11),i.stroke()}i.restore()}class NoteHead extends Note{static get CATEGORY(){return"notehead"}constructor(e){if(super(e),this.setAttribute("type","NoteHead"),this.index=e.index,this.x=e.x||0,this.y=e.y||0,this.note_type=e.note_type,this.duration=e.duration,this.displaced=e.displaced||!1,this.stem_direction=e.stem_direction||StaveNote.STEM_UP,this.line=e.line,this.glyph=Flow.getGlyphProps(this.duration,this.note_type),!this.glyph)throw new Vex.RuntimeError("BadArguments",`No glyph found for duration '${this.duration}' and type '${this.note_type}'`);this.glyph_code=this.glyph.code_head,this.x_shift=e.x_shift||0,e.custom_glyph_code&&(this.custom_glyph=!0,this.glyph_code=e.custom_glyph_code,this.stem_up_x_offset=e.stem_up_x_offset||0,this.stem_down_x_offset=e.stem_down_x_offset||0),this.style=e.style,this.slashed=e.slashed,Vex.Merge(this.render_options,{glyph_font_scale:e.glyph_font_scale||Flow.DEFAULT_NOTATION_FONT_SCALE,stroke_px:3}),this.setWidth(this.glyph.getWidth(this.render_options.glyph_font_scale))}getCategory(){return NoteHead.CATEGORY}getWidth(){return this.width}isDisplaced(){return this.displaced===!0}getGlyph(){return this.glyph}setX(e){return this.x=e,this}getY(){return this.y}setY(e){return this.y=e,this}getLine(){return this.line}setLine(e){return this.line=e,this}getAbsoluteX(){const e=this.preFormatted?super.getAbsoluteX():this.x,t=Stem.WIDTH/2;return e+(this.displaced?(this.width-t)*this.stem_direction:0)}getBoundingBox(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call getBoundingBox on an unformatted note.");const e=this.stave.getSpacingBetweenLines(),t=e/2,s=this.y-t;return new Flow.BoundingBox(this.getAbsoluteX(),s,this.width,e)}setStave(e){const t=this.getLine();return this.stave=e,this.setY(e.getYForNote(t)),this.context=this.stave.context,this}preFormat(){if(this.preFormatted)return this;const e=this.getWidth()+this.extraLeftPx+this.extraRightPx;return this.setWidth(e),this.setPreFormatted(!0),this}draw(){this.checkContext(),this.setRendered();const e=this.context;let t=this.getAbsoluteX();this.custom_glyph&&(t+=this.stem_direction===Stem.UP?this.stem_up_x_offset:this.stem_down_x_offset);const s=this.y;L$i("Drawing note head '",this.note_type,this.duration,"' at",t,s);const r=this.stem_direction,o=this.render_options.glyph_font_scale;if(this.style&&this.applyStyle(e),this.note_type==="s"){const a=this.stave.getSpacingBetweenLines();drawSlashNoteHead(e,this.duration,t,s,r,a)}else Glyph.renderGlyph(e,t,s,o,this.glyph_code);this.style&&this.restoreStyle(e)}}class StemmableNote extends Note{constructor(e){super(e),this.setAttribute("type","StemmableNote"),this.stem=null,this.stemExtensionOverride=null,this.beam=null,this.renderFlag=!0}getStem(){return this.stem}setStem(e){return this.stem=e,this}buildStem(){const e=new Stem;return this.setStem(e),this}buildFlag(){const{glyph:e,beam:t}=this,s=t===null&&this.renderFlag;if(e&&e.flag&&s){const r=this.getStemDirection()===Stem.DOWN?e.code_flag_downstem:e.code_flag_upstem;this.flag=new Glyph(r,this.render_options.glyph_font_scale)}}getTopGlyph(){return this.getStemDirection()===Stem.DOWN?this.customGlyphs[this.customGlyphs.length-1]:this.customGlyphs[0]}getStemLength(){return Stem.HEIGHT+this.getStemExtension()}getBeamCount(){const e=this.getGlyph();return e?e.beam_count:0}getStemMinumumLength(){let t=Flow.durationToFraction(this.duration).value()<=1?0:20;switch(this.duration){case"8":this.beam==null&&(t=35);break;case"16":t=this.beam==null?35:25;break;case"32":t=this.beam==null?45:35;break;case"64":t=this.beam==null?50:40;break;case"128":t=this.beam==null?55:45;break}return t}getStemDirection(){return this.stem_direction}setStemDirection(e){if(e||(e=Stem.UP),e!==Stem.UP&&e!==Stem.DOWN)throw new Vex.RERR("BadArgument",`Invalid stem direction: ${e}`);if(this.stem_direction=e,this.stem){this.stem.setDirection(e),this.stem.setExtension(this.getStemExtension());const t=this.getTopGlyph()||this.getGlyph();this.stem.setOptions({stem_up_y_offset:t.stem_up_y_offset,stem_down_y_offset:t.stem_down_y_offset})}return this.reset(),this.flag&&this.renderFlag&&this.buildFlag(),this.beam=null,this.preFormatted&&this.preFormat(),this}getStemX(){const e=this.getAbsoluteX()+this.x_shift,t=this.getAbsoluteX()+this.x_shift+this.getGlyphWidth();return this.stem_direction===Stem.DOWN?e:t}getCenterGlyphX(){return this.getAbsoluteX()+this.x_shift+this.getGlyphWidth()/2}getStemExtension(){const e=this.getGlyph();return this.stemExtensionOverride!=null?this.stemExtensionOverride:e?this.getStemDirection()===1?e.stem_up_extension:e.stem_down_extension:0}setStemLength(e){return this.stemExtensionOverride=e-Stem.HEIGHT,this}getStemExtents(){return this.stem.getExtents()}setBeam(e){return this.beam=e,this}getYForTopText(e){const t=this.getStemExtents();return this.hasStem()?Math.min(this.stave.getYForTopText(e),t.topY-this.render_options.annotation_spacing*(e+1)):this.stave.getYForTopText(e)}getYForBottomText(e){const t=this.getStemExtents();return this.hasStem()?Math.max(this.stave.getYForTopText(e),t.baseY+this.render_options.annotation_spacing*e):this.stave.getYForBottomText(e)}hasFlag(){return this.renderFlag&&Flow.getGlyphProps(this.duration).flag&&!this.beam}postFormat(){return this.beam&&this.beam.postFormat(),this.postFormatted=!0,this}drawStem(e){this.checkContext(),this.setRendered(),this.setStem(new Stem(e)),this.stem.setContext(this.context).draw()}}class Modifier extends Element$1{static get CATEGORY(){return"none"}static get Position(){return{LEFT:1,RIGHT:2,ABOVE:3,BELOW:4}}static get PositionString(){return{above:Modifier.Position.ABOVE,below:Modifier.Position.BELOW,left:Modifier.Position.LEFT,right:Modifier.Position.RIGHT}}constructor(){super(),this.setAttribute("type","Modifier"),this.width=0,this.note=null,this.index=null,this.text_line=0,this.position=Modifier.Position.LEFT,this.modifier_context=null,this.x_shift=0,this.y_shift=0,this.spacingFromNextModifier=0}getCategory(){return Modifier.CATEGORY}getWidth(){return this.width}setWidth(e){return this.width=e,this}getNote(){return this.note}setNote(e){return this.note=e,this}getIndex(){return this.index}setIndex(e){return this.index=e,this}getModifierContext(){return this.modifier_context}setModifierContext(e){return this.modifier_context=e,this}getPosition(){return this.position}setPosition(e){return this.position=typeof e=="string"?Modifier.PositionString[e]:e,this}setTextLine(e){return this.text_line=e,this}setYShift(e){return this.y_shift=e,this}setSpacingFromNextModifier(e){this.spacingFromNextModifier=e}getSpacingFromNextModifier(){return this.spacingFromNextModifier}setXShift(e){this.x_shift=0,this.position===Modifier.Position.LEFT?this.x_shift-=e:this.x_shift+=e}getXShift(){return this.x_shift}draw(){throw this.checkContext(),new Vex.RERR("MethodNotImplemented","draw() not implemented for this modifier.")}alignSubNotesWithNote(e,t){const s=t.getTickContext(),r=s.getExtraPx(),o=s.getX()-r.left-r.extraLeft+this.getSpacingFromNextModifier();e.forEach(a=>{const l=a.getTickContext();a.setStave(t.stave),l.setXOffset(o)})}}class Dot extends Modifier{static get CATEGORY(){return"dots"}static format(e,t){const s=t.right_shift,r=1;if(!e||e.length===0)return!1;const o=[],a={};for(let b=0;b<e.length;++b){const y=e[b],S=y.getNote();let v,x;typeof S.getKeyProps=="function"?(v=S.getKeyProps()[y.getIndex()],x=v.displaced?S.getExtraRightPx():0):(v={line:.5},x=0);const A=S.getAttribute("id");o.push({line:v.line,note:S,note_id:A,dot:y}),a[A]=Math.max(a[A]||x,x)}o.sort((b,y)=>y.line-b.line);let l=s,c=0,d=null,m=null,u=null,g=0;for(let b=0;b<o.length;++b){const{dot:y,note:S,note_id:v,line:x}=o[b];(x!==d||S!==m)&&(l=a[v]),!S.isRest()&&x!==d&&(Math.abs(x%1)===.5?g=0:(g=.5,(m!=null&&!m.isRest()&&d-x===.5||x+g===u)&&(g=-.5))),S.isRest()?y.dot_shiftY+=-g:y.dot_shiftY=-g,u=x+g,y.setXShift(l),l+=y.getWidth()+r,c=l>c?l:c,d=x,m=S}return t.right_shift+=c,!0}constructor(){super(),this.setAttribute("type","Dot"),this.note=null,this.index=null,this.position=Modifier.Position.RIGHT,this.radius=2,this.setWidth(5),this.dot_shiftY=0}getCategory(){return Dot.CATEGORY}setNote(e){this.note=e,this.note.getCategory()==="gracenotes"&&(this.radius*=.5,this.setWidth(3))}setDotShiftY(e){return this.dot_shiftY=e,this}draw(){if(this.checkContext(),this.setRendered(),!this.note||this.index===null)throw new Vex.RERR("NoAttachedNote","Can't draw dot without a note and index.");const e=this.note.stave.options.spacing_between_lines_px,t=this.note.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});this.note.getCategory()==="tabnotes"&&(t.y=this.note.getStemExtents().baseY+1);const s=t.x+this.x_shift+this.width-this.radius;let r=this.dot_shiftY*e;this.note&&this.note.DYMusicScoreType=="jianpu"&&(r=-5);const o=t.y+this.y_shift+r,a=this.context;a.beginPath(),a.arc(s,o,this.radius,0,Math.PI*2,!1),a.fill()}}function L$h(...i){StaveNote.DEBUG&&Vex.L("Vex.Flow.StaveNote",i)}const getStemAdjustment=i=>Stem.WIDTH/(2*-i.getStemDirection()),isInnerNoteIndex=(i,e)=>e===(i.getStemDirection()===Stem.UP?i.keyProps.length-1:0);function shiftRestVertical(i,e,t){const s=(e.isrest?0:1)*t;i.line+=s,i.maxLine+=s,i.minLine+=s,i.note.setKeyLine(0,i.note.getKeyLine(0)+s)}function centerRest(i,e,t){const s=i.line-Vex.MidLine(e.minLine,t.maxLine);i.note.setKeyLine(0,i.note.getKeyLine(0)-s),i.line-=s,i.maxLine-=s,i.minLine-=s}class StaveNote extends StemmableNote{static get CATEGORY(){return"stavenotes"}static get STEM_UP(){return Stem.UP}static get STEM_DOWN(){return Stem.DOWN}static get DEFAULT_LEDGER_LINE_OFFSET(){return 3}static renderVibrato(e,t,s,r){let{width:o,height:a,wave_width:l,wave_girth:c,wave_height:d,stem_direction:m}=r;const u=Math.floor(o/l);let g=a/(u/2)*m;g==0&&(m=1,g=.3),e.beginPath(),e.moveTo(t,s+c);for(let b=0;b<u/2;++b)e.quadraticCurveTo(t+l/2,s-d/2,t+l,s),t+=l,s+=g,e.quadraticCurveTo(t+l/2,s+d/2,t+l,s),t+=l;for(let b=0;b<u/2;++b)e.quadraticCurveTo(t-l/2,s+d/2+c,t-l,s+c),t-=l,s-=g,e.quadraticCurveTo(t-l/2,s-d/2+c,t-l,s+c),t-=l;m<0&&e.stroke(),e.fill()}static renderSlideNote(e,t,s,r,o){e.beginPath(),e.moveTo(t,s),e.lineTo(r,o),e.lineWidth=2,e.stroke()}static format(e,t){if(!e||e.length<2)return!1;const s=[],r=e[0].stagger_same_whole_notes;for(let g=0;g<e.length;g++){const b=e[g].getKeyProps(),y=b[0].line;let S=b[b.length-1].line;const v=e[g].getStemDirection(),x=e[g].getStemLength()/10,A=e[g].getStemMinumumLength()/10;let E;e[g].isRest()?(E=y+e[g].glyph.line_above,S=y-e[g].glyph.line_below):(E=v===1?b[b.length-1].line+x:b[b.length-1].line,S=v===1?b[0].line:b[0].line-x),s.push({line:b[0].line,maxLine:E,minLine:S,isrest:e[g].isRest(),stemDirection:v,stemMax:x,stemMin:A,voice_shift:e[g].getVoiceShiftWidth(),is_displaced:e[g].isDisplaced(),note:e[g]})}const o=s.length;let a=s[0];const l=o>2?s[1]:null;let c=o>2?s[2]:s[1];o===2&&a.stemDirection===-1&&c.stemDirection===1&&(a=s[1],c=s[0]);const d=Math.max(a.voice_shift,c.voice_shift);let m=0,u;if(o===2){const g=a.stemDirection===c.stemDirection?0:.5;if(a.stemDirection===c.stemDirection&&a.minLine<=c.maxLine&&(a.isrest||(u=Math.abs(a.line-(c.maxLine+.5)),u=Math.max(u,a.stemMin),a.minLine=a.line-u,a.note.setStemLength(u*10))),a.minLine<=c.maxLine+g)if(a.isrest)shiftRestVertical(a,c,1);else if(c.isrest)shiftRestVertical(c,a,-1);else{m=d;const b=Math.abs(a.line-c.line);let y=0,S=0;a.note.duration==="h"?y++:a.note.duration==="w"&&S++,c.note.duration==="h"?y++:c.note.duration==="w"&&S++;let v=y===1||S===1||a.note.dots!==c.note.dots;if(r&&(v=v||S===2),b===0&&v){if(c.note.setXShift(m),a.note.dots>0){let x=0;for(const A of a.note.modifiers)if(A instanceof Dot&&(x++,A.setYShift(-10*(c.maxLine-a.line+1)),x===a.note.dots))break}}else b<1&&b>0?c.note.setXShift(m):a.note.voice!==c.note.voice&&a.stemDirection===c.stemDirection&&(a.line>c.line?a.stemDirection===1?c.note.renderFlag=!1:a.note.renderFlag=!1:c.line>a.line?c.stemDirection===1?a.note.renderFlag=!1:c.note.renderFlag=!1:c.stemDirection===1&&(c.stemDirection=-1,c.note.setStemDirection(-1)))}return!0}if(l!==null&&l.minLine<c.maxLine+.5&&(l.isrest||(u=Math.abs(l.line-(c.maxLine+.5)),u=Math.max(u,l.stemMin),l.minLine=l.line-u,l.note.setStemLength(u*10))),l.isrest&&!a.isrest&&!c.isrest&&(a.minLine<=l.maxLine||l.minLine<=c.maxLine)){const g=l.maxLine-l.minLine,b=a.minLine-c.maxLine;return g<b?centerRest(l,a,c):(m=d+3,l.note.setXShift(m)),!0}return a.isrest&&l.isrest&&c.isrest?(shiftRestVertical(a,l,1),shiftRestVertical(c,l,-1),!0):(l.isrest&&a.isrest&&l.minLine<=c.maxLine&&shiftRestVertical(l,c,1),l.isrest&&c.isrest&&a.minLine<=l.maxLine&&shiftRestVertical(l,a,-1),a.isrest&&a.minLine<=l.maxLine&&shiftRestVertical(a,l,1),c.isrest&&l.minLine<=c.maxLine&&shiftRestVertical(c,l,-1),(!a.isrest&&!l.isrest&&a.minLine<=l.maxLine+.5||!l.isrest&&!c.isrest&&l.minLine<=c.maxLine)&&(m=d+3,l.note.setXShift(m)),!0)}static formatByY(e,t){let s=!0;for(let o=0;o<e.length;o++)s=s&&e[o].getStave()!=null;if(!s)throw new Vex.RERR("Stave Missing","All notes must have a stave - Vex.Flow.ModifierContext.formatMultiVoice!");let r=0;for(let o=0;o<e.length-1;o++){let a=e[o],l=e[o+1];a.maxLine<l.maxLine&&(a=e[o+1],l=e[o]);const c=a.getKeyProps(),d=l.getKeyProps(),m=.5,u=a.getStave().getYForLine(5-c[0].line+m);l.getStave().getYForLine(5-d[d.length-1].line-m)-u<0&&a.voice===l.voice&&(r=a.getVoiceShiftWidth()+2,l.setXShift(r))}t.right_shift+=r}static postFormat(e){return e?(e.forEach(t=>t.postFormat()),!0):!1}constructor(e){if(super(e),this.setAttribute("type","StaveNote"),this.keys=e.keys,this.clef=e.clef,this.octave_shift=e.octave_shift,this.beam=null,this.vibrato=null,this.slideNote=null,this.glyph=Flow.getGlyphProps(this.duration,this.noteType),!this.glyph)throw new Vex.RuntimeError("BadArguments",`Invalid note initialization data (No glyph found): ${JSON.stringify(e)}`);this.displaced=!1,this.dot_shiftY=0,this.addDotsCount=0,this.keyProps=[],this.use_default_head_x=!1,this.note_heads=[],this.modifiers=[],Vex.Merge(this.render_options,{glyph_font_scale:e.glyph_font_scale||Flow.DEFAULT_NOTATION_FONT_SCALE,stroke_px:e.stroke_px||StaveNote.DEFAULT_LEDGER_LINE_OFFSET}),this.calculateKeyProps(),this.buildStem(),e.auto_stem?this.autoStem():this.setStemDirection(e.stem_direction),this.reset(),this.buildFlag()}reset(){super.reset();const e=this.note_heads.map(t=>t.getStyle());this.buildNoteHeads(),this.note_heads.forEach((t,s)=>t.setStyle(e[s])),this.stave&&this.note_heads.forEach(t=>t.setStave(this.stave)),this.calcExtraPx()}setBeam(e){return this.beam=e,this.calcExtraPx(),this}setVibrato(e){this.vibrato=e}setSlideNote(e){this.slideNote=e}getCategory(){return StaveNote.CATEGORY}buildStem(){this.setStem(new Stem({hide:!!this.isRest()})),this.stem.id=Vex.Prefix(`${this.getAttribute("id")}-stem`)}buildNoteHeads(){this.note_heads=[];const e=this.getStemDirection(),t=this.getKeys();let s=null,r=null,o=!1,a,l,c;e===Stem.UP?(a=0,l=t.length,c=1):e===Stem.DOWN&&(a=t.length-1,l=-1,c=-1);for(let d=a;d!==l;d+=c){const m=this.keyProps[d],u=m.line;s===null?s=u:(r=Math.abs(s-u),r===0||r===.5?o=!o:(o=!1,this.use_default_head_x=!0)),s=u;const g=new NoteHead({duration:this.duration,note_type:this.noteType,displaced:o,stem_direction:e,custom_glyph_code:m.code,glyph_font_scale:this.render_options.glyph_font_scale,x_shift:m.shift_right,stem_up_x_offset:m.stem_up_x_offset,stem_down_x_offset:m.stem_down_x_offset,line:m.line});this.note_heads[d]=g}}autoStem(){this.minLine=this.keyProps[0].line,this.maxLine=this.keyProps[this.keyProps.length-1].line;const e=3,s=(this.minLine+this.maxLine)/2<e?Stem.UP:Stem.DOWN;this.setStemDirection(s)}calculateKeyProps(){let e=null;for(let t=0;t<this.keys.length;++t){const s=this.keys[t];this.glyph.rest&&(this.glyph.position=s);const r={octave_shift:this.octave_shift||0},o=Flow.keyProperties(s,this.clef,r);if(!o)throw new Vex.RuntimeError("BadArguments",`Invalid key for note properties: ${s}`);o.key==="R"&&(this.duration==="1"||this.duration==="w"?o.line=4:o.line=3);const a=o.line;e===null?e=a:Math.abs(e-a)===.5&&(this.displaced=!0,o.displaced=!0,this.keyProps.length>0&&(this.keyProps[t-1].displaced=!0)),e=a,this.keyProps.push(o)}e=-1/0,this.keyProps.forEach(t=>{t.line<e&&Vex.W("Unsorted keys in note will be sorted. See https://github.com/0xfe/vexflow/issues/104 for details."),e=t.line}),this.keyProps.sort((t,s)=>t.line-s.line)}getBoundingBox(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call getBoundingBox on an unformatted note.");const{width:e,modLeftPx:t,extraLeftPx:s}=this.getMetrics(),r=this.getAbsoluteX()-t-s;let o=0,a=0;const l=this.getStave().getSpacingBetweenLines()/2,c=l*2;if(this.isRest()){const d=this.ys[0],m=Flow.durationToFraction(this.duration);m.equals(1)||m.equals(2)?(o=d-l,a=d+l):(o=d-this.glyph.line_above*c,a=d+this.glyph.line_below*c)}else if(this.glyph.stem){const d=this.getStemExtents();d.baseY+=l*this.stem_direction,o=Math.min(d.topY,d.baseY),a=Math.max(d.topY,d.baseY)}else{o=null,a=null;for(let d=0;d<this.ys.length;++d){const m=this.ys[d];d===0?(o=m,a=m):(o=Math.min(m,o),a=Math.max(m,a))}o-=l,a+=l}return new BoundingBox(r,o,e,a-o)}getLineNumber(e){if(!this.keyProps.length)throw new Vex.RERR("NoKeyProps","Can't get bottom note line, because note is not initialized properly.");let t=this.keyProps[0].line;for(let s=0;s<this.keyProps.length;s++){const r=this.keyProps[s].line;e?r>t&&(t=r):r<t&&(t=r)}return t}isRest(){return this.glyph.rest}isChord(){return!this.isRest()&&this.keys.length>1}hasStem(){return this.glyph.stem}hasFlag(){return super.hasFlag()&&!this.isRest()&&this.renderFlag}getStemX(){return this.noteType==="r"?this.getCenterGlyphX():super.getStemX()+getStemAdjustment(this)}getYForTopText(e){const t=this.getStemExtents();return Math.min(this.stave.getYForTopText(e),t.topY-this.render_options.annotation_spacing*(e+1))}getYForBottomText(e){const t=this.getStemExtents();return Math.max(this.stave.getYForTopText(e),t.baseY+this.render_options.annotation_spacing*e)}setStave(e){super.setStave(e);const t=this.note_heads.map(s=>(s.setStave(e),s.getY()));if(this.setYs(t),this.stem){const{y_top:s,y_bottom:r}=this.getNoteHeadBounds();this.stem.setYBounds(s,r)}return this}getKeys(){return this.keys}getKeyProps(){return this.keyProps}isDisplaced(){return this.displaced}setNoteDisplaced(e){return this.displaced=e,this}getTieRightX(){let e=this.getAbsoluteX();return e+=this.getGlyphWidth()+this.x_shift+this.extraRightPx,this.modifierContext&&(e+=this.modifierContext.getExtraRightPx()),e}getTieLeftX(){let e=this.getAbsoluteX();return e+=this.x_shift-this.extraLeftPx,e}getLineForRest(){let e=this.keyProps[0].line;if(this.keyProps.length>1){const t=this.keyProps[this.keyProps.length-1].line,s=Math.max(e,t),r=Math.min(e,t);e=Vex.MidLine(s,r)}return e}getModifierStartXY(e,t,s){if(s=s||{},!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(this.ys.length===0)throw new Vex.RERR("NoYValues","No Y-Values calculated for this note.");const{ABOVE:r,BELOW:o,LEFT:a,RIGHT:l}=Modifier.Position;let c=0;return e===a?c=-1*2:e===l?(c=this.getGlyphWidth()+this.x_shift+2,this.stem_direction===Stem.UP&&this.hasFlag()&&(s.forceFlagRight||isInnerNoteIndex(this,t))&&(c+=this.flag.getMetrics().width)):(e===o||e===r)&&(c=this.getGlyphWidth()/2),{x:this.getAbsoluteX()+c,y:this.ys[t]}}setStyle(e){super.setStyle(e),this.note_heads.forEach(t=>t.setStyle(e)),this.stem&&this.stem.setStyle(e)}setStemStyle(e){this.stem&&this.getStem().setStyle(e)}getStemStyle(){return this.stem.getStyle()}setLedgerLineStyle(e){this.ledgerLineStyle=e}getLedgerLineStyle(){return this.ledgerLineStyle}setFlagStyle(e){this.flagStyle=e}getFlagStyle(){return this.flagStyle}setKeyStyle(e,t){return this.note_heads[e].setStyle(t),this}setKeyLine(e,t){return this.keyProps[e].line=t,this.reset(),this}getKeyLine(e){return this.keyProps[e].line}addToModifierContext(e){this.setModifierContext(e);for(let t=0;t<this.modifiers.length;++t)this.modifierContext.addModifier(this.modifiers[t]);return this.modifierContext.addModifier(this),this.setPreFormatted(!1),this}addModifier(e,t){return t.setNote(this),t.setIndex(e),this.modifiers.push(t),this.setPreFormatted(!1),this}addAccidental(e,t){return this.addModifier(e,t)}addArticulation(e,t){return this.addModifier(e,t)}addAnnotation(e,t){return this.addModifier(e,t)}addDot(e){const t=new Dot;return t.setDotShiftY(this.glyph.dot_shiftY),this.addDotsCount++,this.addModifier(e,t)}addDotToAll(){for(let e=0;e<this.keys.length;++e)this.addDot(e);return this}getAccidentals(){return this.modifierContext.getModifiers("accidentals")}getDots(){return this.modifierContext.getModifiers("dots")}getVoiceShiftWidth(){return this.getGlyphWidth()*(this.displaced?2:1)}calcExtraPx(){this.setExtraLeftPx(this.displaced&&this.stem_direction===Stem.DOWN?this.getGlyphWidth():0),this.setExtraRightPx(!this.hasFlag()&&this.displaced&&this.stem_direction===Stem.UP?this.getGlyphWidth():0)}preFormat(){if(this.preFormatted)return;this.modifierContext&&this.modifierContext.preFormat();let e=this.getGlyphWidth()+this.extraLeftPx+this.extraRightPx;this.renderFlag&&this.glyph.flag&&this.beam===null&&this.stem_direction===Stem.UP&&(e+=this.getGlyphWidth()),this.setWidth(e),this.setPreFormatted(!0)}getNoteHeadBounds(){let e=null,t=null,s=null,r=null,o=this.stave.getNumLines(),a=1,l=!1,c=!1,d=o,m=a;return this.note_heads.forEach(u=>{const g=u.getLine(),b=u.getY();(e===null||b<e)&&(e=b),(t===null||b>t)&&(t=b),r===null&&u.isDisplaced()&&(r=u.getAbsoluteX()),s===null&&!u.isDisplaced()&&(s=u.getAbsoluteX()),o=g>o?g:o,a=g<a?g:a,u.isDisplaced()?(l=l===!1?g:Math.max(g,l),c=c===!1?g:Math.min(g,c)):(d=Math.max(g,d),m=Math.min(g,m))},this),{y_top:e,y_bottom:t,displaced_x:r,non_displaced_x:s,highest_line:o,lowest_line:a,highest_displaced_line:l,lowest_displaced_line:c,highest_non_displaced_line:d,lowest_non_displaced_line:m}}getNoteHeadBeginX(){return this.getAbsoluteX()+this.x_shift}getNoteHeadEndX(){return this.getNoteHeadBeginX()+this.getGlyphWidth()}drawLedgerLines(){const{stave:e,glyph:t,render_options:{stroke_px:s},context:r}=this,o=t.getWidth()+s*2,a=2*(t.getWidth()+s)-Stem.WIDTH/2;if(this.isRest())return;if(!r)throw new Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");const{highest_line:l,lowest_line:c,highest_displaced_line:d,highest_non_displaced_line:m,lowest_displaced_line:u,lowest_non_displaced_line:g,displaced_x:b,non_displaced_x:y}=this.getNoteHeadBounds(),S=Math.min(b,y),v=(A,E,w)=>{let _;w&&E?_=S-s:E?_=y-s:_=b-s;const C=E&&w?a:o;r.beginPath(),r.moveTo(_,A),r.lineTo(_+C,A),r.stroke()},x={...e.getStyle()||{},...this.getLedgerLineStyle()||{}};this.applyStyle(r,x);for(let A=6;A<=l;++A){const E=y!==null&&A<=m,w=b!==null&&A<=d;v(e.getYForNote(A),E,w)}for(let A=0;A>=c;--A){const E=y!==null&&A>=g,w=b!==null&&A>=u;v(e.getYForNote(A),E,w)}this.restoreStyle(r,x)}drawVibrato(){if(this.vibrato){const e=this.context,t=this.vibrato.getNoteHeadEndX()+2;let{y_bottom:s}=this.vibrato.getNoteHeadBounds(),{y_top:r}=this.getNoteHeadBounds();const o=s<r?1:-1;let a=Math.abs(this.getNoteHeadBeginX()-5-t),l=Math.abs(r-s);(this.duration==="w"||this.vibrato.stave.y!==this.stave.y)&&(a=this.vibrato.stave.getNoteEndX()-5-t),this.vibrato.stave.y!==this.stave.y&&(l=0),e.openGroup("vibrato"),StaveNote.renderVibrato(this.context,t,s,{harsh:!0,width:a,height:l,wave_height:6,wave_width:4,wave_girth:4,stem_direction:o}),e.closeGroup()}}drawSlide(){if(this.slideNote){const e=this.context,t=this.slideNote.getNoteHeadEndX()+2;let{y_bottom:s}=this.slideNote.getNoteHeadBounds(),r=this.getNoteHeadBeginX()-4,{y_top:o}=this.getNoteHeadBounds();(this.duration==="w"||this.slideNote.stave.y!==this.stave.y)&&(r=this.slideNote.stave.getNoteEndX()-2),e.openGroup("slide"),StaveNote.renderSlideNote(e,t,s,r,o),e.closeGroup()}}drawModifiers(){if(!this.context)throw new Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");const e=this.context;e.openGroup("modifiers");for(let t=0;t<this.modifiers.length;t++){const s=this.modifiers[t],r=this.note_heads[s.getIndex()],o=r.getStyle();if(!(this.isRest()&&s.getCategory()==="articulations")&&!(s.note&&s.note.DYMusicScoreType=="jianpu"&&s.getAttribute("type")==="Dot"&&!s.note.formatterMetrics.duration)){if(s.note&&s.note.DYMusicScoreType=="jianpu"&&s.getAttribute("type")==="Dot")try{s.note.getModifierStartXY(s.position,0,{forceFlagRight:!0}).x-s.note.x<9&&(s.x_shift+=7)}catch(a){console.log("🚀 ~ error:",a)}r.applyStyle(e,o),s.setContext(e),s.drawWithStyle(),r.restoreStyle(e,o)}}e.closeGroup(),this.drawVibrato(),this.drawSlide()}drawFlag(){const{stem:e,beam:t,context:s}=this;if(!s)throw new Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");const r=t===null&&this.renderFlag;if(this.getGlyph().flag&&r){const{y_top:a,y_bottom:l}=this.getNoteHeadBounds(),c=e.getHeight(),d=this.getStemX();let m=this.getStemDirection()===Stem.DOWN?a-c+2:l-c-2;if(e&&!t){const u=this.keyProps[0].line;(u>6.5||u<-.5)&&(m=m+(u>6.5?(u-6.5)*10:(u+.5)*10))}s.openGroup("flag",null,{pointerBBox:!0}),this.applyStyle(s,this.getFlagStyle()||!1),this.flag.render(s,d,m),this.restoreStyle(s,this.getFlagStyle()||!1),s.closeGroup()}}drawNoteHeads(){this.note_heads.forEach(e=>{this.context.openGroup("notehead",null,{pointerBBox:!0});try{if(this.isRest()&&this.duration==="w"){const t=this.stave.options.line_config.filter(r=>r.visible).length;this.keyProps[0].line===4&&t<5&&e.setY(e.getY()+10),t===1&&e.setLine(3)}}catch(t){}e.setContext(this.context).draw(),this.context.closeGroup()})}drawStem(e){if(!this.context)throw new Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");e&&this.setStem(new Stem(e)),this.stem.id=Vex.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 Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");if(!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");if(this.ys.length===0)throw new Vex.RERR("NoYValues","Can't draw note without Y values.");const e=this.stave.getLines();if(e===2||e===3||e===4)for(let r=0;r<this.note_heads.length;r++)if(this.isRest())e===2&&(this.duration==="q"?this.note_heads[r].setLine(2):this.duration==="w"?this.note_heads[r].setLine(4):this.duration==="h"?this.note_heads[r].setLine(2.5):this.note_heads[r].setLine(2));else{let o=e===2?2:e===3?.65:.3,a=this.note_heads[r].line;this.note_heads[r].setLine(a+o)}const t=this.getNoteHeadBeginX(),s=this.hasStem()&&!this.beam;if(this.note_heads.forEach(r=>r.setX(t)),this.stem){let r=this.getStemX();const o=this.keyProps[0].line;(o>6.5||o<-.5)&&(this.beam||(this.stem.renderHeightAdjustment=o>6.5?(o-6.5)*10:Math.abs(o+.5)*10)),this.stem.setNoteHeadXBounds(r,r)}L$h("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}),s&&this.drawStem(),this.drawNoteHeads(),this.drawFlag(),this.context.closeGroup(),this.drawModifiers(),this.context.closeGroup(),this.restoreStyle(),this.setRendered()}}class FretHandFinger extends Modifier{static get CATEGORY(){return"frethandfinger"}static format(e,t){const{left_shift:s,right_shift:r}=t,o=1;if(!e||e.length===0)return!1;const a=[];let l=null,c=0,d=0;for(let v=0;v<e.length;++v){const x=e[v],A=x.getNote(),E=x.getPosition(),w=A.getKeyProps()[x.getIndex()];if(A!==l){for(let _=0;_<A.keys.length;++_){const C=A.getKeyProps()[_];s===0&&(c=C.displaced?A.getExtraLeftPx():c),r===0&&(d=C.displaced?A.getExtraRightPx():d)}l=A}a.push({note:A,num:x,pos:E,line:w.line,shiftL:c,shiftR:d})}a.sort((v,x)=>x.line-v.line);let m=0,u=0,g=0,b=0,y=null,S=null;for(let v=0;v<a.length;++v){let x=0;const{note:A,pos:E,num:w,line:_,shiftL:C,shiftR:P}=a[v];(_!==y||A!==S)&&(m=s+C,u=r+P);const I=w.getWidth()+o;E===Modifier.Position.LEFT?(w.setXShift(s+m),x=s+I,g=x>g?x:g):E===Modifier.Position.RIGHT&&(w.setXShift(u),x=d+I,b=x>b?x:b),y=_,S=A}return t.left_shift+=g,t.right_shift+=b,!0}constructor(e){super(),this.setAttribute("type","FretHandFinger"),this.note=null,this.index=null,this.finger=e,this.width=7,this.position=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 FretHandFinger.CATEGORY}setFretHandFinger(e){return this.finger=e,this}setOffsetX(e){return this.x_offset=e,this}setOffsetY(e){return this.y_offset=e,this}draw(){if(this.checkContext(),!this.note||this.index==null)throw new Vex.RERR("NoAttachedNote","Can't draw string number without a note and index.");this.setRendered();const e=this.context,t=this.note.getModifierStartXY(this.position,this.index);let s=t.x+this.x_shift+this.x_offset,r=t.y+this.y_shift+this.y_offset+5;switch(this.position){case Modifier.Position.ABOVE:s-=4,r-=12;break;case Modifier.Position.BELOW:s-=2,r+=10;break;case Modifier.Position.LEFT:s-=this.width;break;case Modifier.Position.RIGHT:s+=1;break;default:throw new Vex.RERR("InvalidPostion",`The position ${this.position} does not exist`)}e.save(),e.setFont(this.font.family,this.font.size,this.font.weight),e.fillText(""+this.finger,s,r),e.restore()}}class Music{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:Music.scales.major,m:Music.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(e){return!(e==null||e<0||e>=Music.NUM_TONES)}isValidIntervalValue(e){return this.isValidNoteValue(e)}getNoteParts(e){if(!e||e.length<1)throw new Vex.RERR("BadArguments","Invalid note name: "+e);if(e.length>3)throw new Vex.RERR("BadArguments","Invalid note name: "+e);const t=e.toLowerCase(),r=/^([cdefgab])(b|bb|n|#|##)?$/.exec(t);if(r!=null){const o=r[1],a=r[2];return{root:o,accidental:a}}else throw new Vex.RERR("BadArguments","Invalid note name: "+e)}getKeyParts(e){if(!e||e.length<1)throw new Vex.RERR("BadArguments","Invalid key: "+e);const t=e.toLowerCase(),r=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(t);if(r!=null){const o=r[1],a=r[2];let l=r[3];return l||(l="M"),{root:o,accidental:a,type:l}}else throw new Vex.RERR("BadArguments",`Invalid key: ${e}`)}getNoteValue(e){const t=Music.noteValues[e];if(t==null)throw new Vex.RERR("BadArguments",`Invalid note name: ${e}`);return t.int_val}getIntervalValue(e){const t=Music.intervals[e];if(t==null)throw new Vex.RERR("BadArguments",`Invalid interval name: ${e}`);return t}getCanonicalNoteName(e){if(!this.isValidNoteValue(e))throw new Vex.RERR("BadArguments",`Invalid note value: ${e}`);return Music.canonical_notes[e]}getCanonicalIntervalName(e){if(!this.isValidIntervalValue(e))throw new Vex.RERR("BadArguments",`Invalid interval value: ${e}`);return Music.diatonic_intervals[e]}getRelativeNoteValue(e,t,s){if(s==null&&(s=1),s!==1&&s!==-1)throw new Vex.RERR("BadArguments",`Invalid direction: ${s}`);let r=(e+s*t)%Music.NUM_TONES;return r<0&&(r+=Music.NUM_TONES),r}getRelativeNoteName(e,t){const s=this.getNoteParts(e),r=this.getNoteValue(s.root);let o=t-r;if(Math.abs(o)>Music.NUM_TONES-3){let l=1;o>0&&(l=-1);const c=(t+1+(r+1))%Music.NUM_TONES*l;if(Math.abs(c)>2)throw new Vex.RERR("BadArguments",`Notes not related: ${e}, ${t})`);o=c}if(Math.abs(o)>2)throw new Vex.RERR("BadArguments",`Notes not related: ${e}, ${t})`);let a=s.root;if(o>0)for(let l=1;l<=o;++l)a+="#";else if(o<0)for(let l=-1;l>=o;--l)a+="b";return a}getScaleTones(e,t){const s=[e];let r=e;for(let o=0;o<t.length;o+=1)r=this.getRelativeNoteValue(r,t[o]),r!==e&&s.push(r);return s}getIntervalBetween(e,t,s){if(s==null&&(s=1),s!==1&&s!==-1)throw new Vex.RERR("BadArguments",`Invalid direction: ${s}`);if(!this.isValidNoteValue(e)||!this.isValidNoteValue(t))throw new Vex.RERR("BadArguments",`Invalid notes: ${e}, ${t}`);let r=s===1?t-e:e-t;return r<0&&(r+=Music.NUM_TONES),r}createScaleMap(e){const t=this.getKeyParts(e),s=Music.scaleTypes[t.type];let r=t.root;if(t.accidental&&(r+=t.accidental),!s)throw new Vex.RERR("BadArguments","Unsupported key type: "+e);const o=this.getScaleTones(this.getNoteValue(r),s),a=Music.root_indices[t.root],l={};for(let c=0;c<Music.roots.length;++c){const d=(a+c)%Music.roots.length,m=Music.roots[d];let u=this.getRelativeNoteName(m,o[c]);u.length===1&&(u+="n"),l[m]=u}return l}}function L$g(...i){Accidental.DEBUG&&Vex.L("Vex.Flow.Accidental",i)}const getGlyphWidth=i=>i.getMetrics().width;class Accidental extends Modifier{static get CATEGORY(){return"accidentals"}static format(e,t){const r=t.left_shift+1,o=3;if(!e||e.length===0)return;const a=[];let l=null,c=0,d;for(let A=0;A<e.length;++A){const E=e[A],w=E.getNote(),_=w.getStave(),C=w.getKeyProps()[E.getIndex()];if(w!==l){for(let P=0;P<w.keys.length;++P)d=w.getKeyProps()[P],c=d.displaced?w.getExtraLeftPx():c;l=w}if(_!==null){const P=_.options.spacing_between_lines_px,I=_.getYForLine(C.line),R=Math.round(I/P*2)/2;a.push({y:I,line:R,shift:c,acc:E,lineSpace:P})}else a.push({line:C.line,shift:c,acc:E})}a.sort((A,E)=>E.line-A.line);const m=[];let u=0,g=null;for(let A=0;A<a.length;A++){const E=a[A];(g===null||g!==E.line)&&m.push({line:E.line,flatLine:!0,dblSharpLine:!0,numAcc:0,width:0}),E.acc.type!=="b"&&E.acc.type!=="bb"&&(m[m.length-1].flatLine=!1),E.acc.type!=="##"&&(m[m.length-1].dblSharpLine=!1),m[m.length-1].numAcc++,m[m.length-1].width+=E.acc.getWidth()+o,u=E.shift>u?E.shift:u,g=E.line}let b=0;for(let A=0;A<m.length;A++){let E=!1;const w=A;let _=A;for(;_+1<m.length&&!E;)this.checkCollision(m[_],m[_+1])?_++:E=!0;const C=T=>m[w+T],P=T=>T.map(C),I=(T,V)=>{const[Z,W]=P([T,V]).map(se=>se.line);return Z-W},R=(...T)=>T.map(P).every(V=>!this.checkCollision(...V)),N=_-w+1;let G=this.checkCollision(m[w],m[_])?"a":"b";switch(N){case 3:G==="a"&&I(1,2)===.5&&I(0,1)!==.5&&(G="second_on_bottom");break;case 4:R([0,2],[1,3])&&(G="spaced_out_tetrachord");break;case 5:G==="b"&&R([1,3])&&(G="spaced_out_pentachord",R([0,2],[2,4])&&(G="very_spaced_out_pentachord"));break;case 6:R([0,3],[1,4],[2,5])&&(G="spaced_out_hexachord"),R([0,2],[2,4],[1,3],[3,5])&&(G="very_spaced_out_hexachord");break}let B,k;if(N>=7){let T=2,V=!0;for(;V===!0;){V=!1;for(let Z=0;Z+T<m.length;Z++)if(this.checkCollision(m[Z],m[Z+T])){V=!0,T++;break}}for(B=A;B<=_;B++)k=(B-A)%T+1,m[B].column=k,b=b>k?b:k}else for(B=A;B<=_;B++)k=Flow.accidentalColumnsTable[N][G][B-A],m[B].column=k,b=b>k?b:k;A=_}const y=[],S=[];for(let A=0;A<=b;A++)y[A]=0,S[A]=0;y[0]=u+r,S[0]=u+r,m.forEach(A=>{A.width>y[A.column]&&(y[A.column]=A.width)});for(let A=1;A<y.length;A++)S[A]=y[A]+S[A-1];const v=S[S.length-1];let x=0;m.forEach(A=>{let E=0;const w=x+A.numAcc;for(x;x<w;x++){const _=S[A.column-1]+E;a[x].acc.setXShift(_),E+=a[x].acc.getWidth()+o,L$g("Line, accCount, shift: ",A.line,x,_)}}),t.left_shift+=v}static checkCollision(e,t){let s=t.line-e.line,r=3;s>0?(r=t.flatLine||t.dblSharpLine?2.5:3,e.dblSharpLine&&(s-=.5)):(r=e.flatLine||e.dblSharpLine?2.5:3,t.dblSharpLine&&(s-=.5));const o=Math.abs(s)<r;return L$g("Line_1, Line_2, Collision: ",e.line,t.line,o),o}static applyAccidentals(e,t){const s=[],r={};e.forEach(l=>{const c=new Fraction(0,1);l.getTickables().forEach(m=>{if(m.shouldIgnoreTicks())return;const u=r[c.value()];u?u.push(m):(s.push(c.value()),r[c.value()]=[m]),c.add(m.getTicks())})});const o=new Music;t||(t="C");const a=o.createScaleMap(t);s.forEach(l=>{const c=r[l],d=[],m=u=>{u.isRest()||u.shouldIgnoreTicks()||(u.keys.forEach((g,b)=>{const y=o.getNoteParts(g.split("/")[0]),S=y.accidental||"n",v=y.root+S,x=a[y.root]===v,A=d.indexOf(v)>-1;if(!x||x&&A){a[y.root]=v;const E=new Accidental(S);u.addAccidental(b,E),d.push(v)}}),u.getModifiers().forEach(g=>{g.getCategory()==="gracenotegroups"&&g.getGraceNotes().forEach(m)}))};c.forEach(m)})}constructor(e=null){if(super(),this.setAttribute("type","Accidental"),L$g("New accidental: ",e),this.note=null,this.index=null,this.type=e,this.position=Modifier.Position.LEFT,this.render_options={font_scale:38,stroke_px:3,parenLeftPadding:2,parenRightPadding:2},this.accidental=Flow.accidentalCodes(this.type),!this.accidental)throw new Vex.RERR("ArgumentError",`Unknown accidental type: ${e}`);this.cautionary=!1,this.parenLeft=null,this.parenRight=null,this.reset()}reset(){const e=this.render_options.font_scale;this.glyph=new Glyph(this.accidental.code,e),this.glyph.setOriginX(1),this.cautionary&&(this.parenLeft=new Glyph(Flow.accidentalCodes("{").code,e),this.parenRight=new Glyph(Flow.accidentalCodes("}").code,e),this.parenLeft.setOriginX(1),this.parenRight.setOriginX(1))}getCategory(){return Accidental.CATEGORY}getWidth(){const e=this.cautionary?getGlyphWidth(this.parenLeft)+getGlyphWidth(this.parenRight)+this.render_options.parenLeftPadding+this.render_options.parenRightPadding:0;return getGlyphWidth(this.glyph)+e}setNote(e){if(!e)throw new Vex.RERR("ArgumentError",`Bad note value: ${e}`);this.note=e,this.note.getCategory()==="gracenotes"&&(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:e,type:t,position:s,note:r,index:o,cautionary:a,x_shift:l,y_shift:c,glyph:d,parenLeft:m,parenRight:u,render_options:{parenLeftPadding:g,parenRightPadding:b}}=this;if(this.checkContext(),!(r&&o!=null))throw new Vex.RERR("NoAttachedNote","Can't draw accidental without a note and index.");const y=r.getModifierStartXY(s,o);let S=y.x+l;const v=y.y+c;L$g("Rendering: ",t,S,v),a?(u.render(e,S,v),S-=getGlyphWidth(u),S-=b,S-=this.accidental.parenRightPaddingAdjustment,d.render(e,S,v),S-=getGlyphWidth(d),S-=g,m.render(e,S,v)):d.render(e,S,v),this.setRendered()}}let NoteSubGroup$1=class ci extends Modifier{static get CATEGORY(){return"notesubgroup"}static format(e,t){if(!e||e.length===0)return!1;let s=0;for(let r=0;r<e.length;++r){const o=e[r];o.preFormat(),s+=o.getWidth()}return t.left_shift+=s,!0}constructor(e){return super(),this.setAttribute("type","NoteSubGroup"),this.note=null,this.index=null,this.position=Modifier.Position.LEFT,this.subNotes=e,this.subNotes.forEach(t=>{t.ignore_ticks=!1}),this.width=0,this.preFormatted=!1,this.formatter=new Formatter,this.voice=new Voice$1({num_beats:4,beat_value:4,resolution:Flow.RESOLUTION}).setStrict(!1),this.voice.addTickables(this.subNotes),this}getCategory(){return ci.CATEGORY}preFormat(){this.preFormatted||(this.formatter.joinVoices([this.voice]).format([this.voice],0),this.setWidth(this.formatter.getMinTotalWidth()),this.preFormatted=!0)}setNote(e){this.note=e}setWidth(e){this.width=e}getWidth(){return this.width}draw(){this.checkContext();const e=this.getNote();if(!(e&&this.index!==null))throw new Vex.RuntimeError("NoAttachedNote","Can't draw notes without a parent note and parent note index.");this.setRendered(),this.alignSubNotesWithNote(this.subNotes,e),this.subNotes.forEach(t=>t.setContext(this.context).drawWithStyle())}};class StaveTie extends Element$1{constructor(e,t){super(),this.setAttribute("type","StaveTie"),this.notes=e,this.context=null,this.text=t,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(e)}setFont(e){return this.font=e,this}setDirection(e){return this.direction=e,this}setNotes(e){if(!e.first_note&&!e.last_note)throw new Vex.RuntimeError("BadArguments","Tie needs to have either first_note or last_note set.");if(e.first_indices||(e.first_indices=[0]),e.last_indices||(e.last_indices=[0]),e.first_indices.length!==e.last_indices.length)throw new Vex.RuntimeError("BadArguments","Tied notes must have similar index sizes");return this.first_note=e.first_note,this.first_indices=e.first_indices,this.last_note=e.last_note,this.last_indices=e.last_indices,this}isPartial(){return!this.first_note||!this.last_note}renderTie(e){if(e.first_ys.length===0||e.last_ys.length===0)throw new Vex.RERR("BadArguments","No Y-values to render");const t=this.context;let s=this.render_options.cp1,r=this.render_options.cp2;Math.abs(e.last_x_px-e.first_x_px)<10&&(s=2,r=8);const o=this.render_options.first_x_shift,a=this.render_options.last_x_shift,l=this.render_options.y_shift*e.direction;for(let c=0;c<this.first_indices.length;++c){const d=(e.last_x_px+a+(e.first_x_px+o))/2;let m=e.first_ys[this.first_indices[c]]+l,u=e.last_ys[this.last_indices[c]]+l;if(isNaN(m)||isNaN(u))throw new Vex.RERR("BadArguments","Bad indices for tie rendering.");const g=(m+u)/2+s*e.direction,b=(m+u)/2+r*e.direction;let y=m>g&&Math.abs(m-g)<10?-6:0;if(this.first_note&&this.first_note.DYMusicScoreType==="jianpu"){if(this.getAttribute("type")==="TabTie")continue;m<g&&(y=-15),m!=u&&(m=u=Math.max(m,u))}let S;this.first_note&&(S=this.first_note.getAttribute("id")+"-tie"),this.setAttribute("el",t.openGroup("stavetie",S)),t.beginPath(),t.moveTo(e.first_x_px+o,m+y),t.quadraticCurveTo(d,g+y*2.3,e.last_x_px+a,u+y),t.quadraticCurveTo(d,b+y*2.3,e.first_x_px+o,m+y),t.closePath(),t.fill(),t.closeGroup()}}renderText(e,t){if(!this.text)return;let s=(e+t)/2;s-=this.context.measureText(this.text).width/2;let r=0;this.first_note&&this.first_note.DYMusicScoreType==="jianpu"&&(r=2),this.context.save(),this.context.setFont(this.font.family,this.font.size,this.font.style),this.context.fillText(this.text,s+this.render_options.text_shift_x,(this.first_note||this.last_note).getStave().getYForTopText()-1+r),this.context.restore()}draw(){this.checkContext(),this.setRendered();const e=this.first_note,t=this.last_note;let s,r,o,a,l;return e?(s=e.getTieRightX()+this.render_options.tie_spacing,l=e.getStemDirection(),o=e.getYs()):(s=t.getStave().getTieStartX(),o=t.getYs(),this.first_indices=this.last_indices),t?(r=t.getTieLeftX()+this.render_options.tie_spacing,l=t.getStemDirection(),a=t.getYs(),t.attrs.type==="GraceNote"&&(r+=5,s-=15)):(r=e.getStave().getTieEndX(),a=e.getYs(),this.last_indices=this.first_indices),this.direction&&(l=this.direction),this.renderTie({first_x_px:s,last_x_px:r,first_ys:o,last_ys:a,direction:l}),this.renderText(s,r),!0}}class TabTie extends StaveTie{static createHammeron(e){return new TabTie(e,"H")}static createPulloff(e){return new TabTie(e,"P")}constructor(e,t){super(e,t),this.setAttribute("type","TabTie"),this.render_options.cp1=9,this.render_options.cp2=11,this.render_options.y_shift=3,this.setNotes(e)}draw(){this.checkContext(),this.setRendered();const e=this.first_note,t=this.last_note;let s,r,o,a;return e?(s=e.getTieRightX()+this.render_options.tie_spacing,o=e.getYs()):(s=t.getStave().getTieStartX(),o=t.getYs(),this.first_indices=this.last_indices),t?(r=t.getTieLeftX()+this.render_options.tie_spacing,a=t.getYs()):(r=e.getStave().getTieEndX(),a=e.getYs(),this.last_indices=this.first_indices),this.renderTie({first_x_px:s,last_x_px:r,first_ys:o,last_ys:a,direction:-1}),this.renderText(s,r),!0}}function L$f(...i){GraceNoteGroup.DEBUG&&Vex.L("Vex.Flow.GraceNoteGroup",i)}class GraceNoteGroup extends Modifier{static get CATEGORY(){return"gracenotegroups"}static format(e,t){if(!e||e.length===0)return!1;const o=[];let a=null,l=0;for(let m=0;m<e.length;++m){const u=e[m],g=u.getNote(),b=g.getCategory()===StaveNote.CATEGORY,y=b?4:0;if(b&&g!==a){for(let S=0;S<g.keys.length;++S)l=g.getKeyProps()[S].displaced?g.getExtraLeftPx():l;a=g}o.push({shift:l,gracenote_group:u,spacing:y})}let c=o[0].shift,d;for(let m=0;m<o.length;++m){const u=o[m].gracenote_group;u.preFormat(),d=u.getWidth()+o[m].spacing,c=Math.max(d,c)}for(let m=0;m<o.length;++m){const u=o[m].gracenote_group;d=u.getWidth()+o[m].spacing,u.setSpacingFromNextModifier(c-Math.min(d,c))}return t.left_shift+=c,!0}constructor(e,t){return super(),this.setAttribute("type","GraceNoteGroup"),this.note=null,this.index=null,this.position=Modifier.Position.LEFT,this.grace_notes=e,this.width=0,this.preFormatted=!1,this.show_slur=t,this.slur=null,this.formatter=new Formatter,this.voice=new Voice$1({num_beats:4,beat_value:4,resolution:Flow.RESOLUTION}).setStrict(!1),this.render_options={slur_y_shift:0},this.beams=[],this.voice.addTickables(this.grace_notes),this}getCategory(){return GraceNoteGroup.CATEGORY}preFormat(){this.preFormatted||(this.formatter.joinVoices([this.voice]).format([this.voice],0),this.setWidth(this.formatter.getMinTotalWidth()),this.preFormatted=!0)}beamNotes(e){if(e=e||this.grace_notes,e.length>1){const t=new Beam$1(e);t.render_options.beam_width=3,t.render_options.partial_beam_length=4,this.beams.push(t)}return this}setNote(e){this.note=e}setWidth(e){this.width=e}getWidth(){return this.width}getGraceNotes(){return this.grace_notes}draw(){this.checkContext();const e=this.getNote();if(L$f("Drawing grace note group for:",e),!(e&&this.index!==null))throw new Vex.RuntimeError("NoAttachedNote","Can't draw grace note without a parent note and parent note index.");if(this.setRendered(),this.alignSubNotesWithNote(this.getGraceNotes(),e),this.grace_notes.forEach(t=>{t.setContext(this.context).draw()}),this.beams.forEach(t=>{t.setContext(this.context).draw()}),this.show_slur){const t=this.getNote().getCategory()===StaveNote.CATEGORY,s=t?StaveTie:TabTie;this.slur=new s({last_note:this.grace_notes[0],first_note:e,first_indices:[0],last_indices:[0]}),this.slur.render_options.cp2=12,this.slur.render_options.y_shift=(t?7:5)+this.render_options.slur_y_shift,this.slur.setContext(this.context).draw()}}}class Stroke extends 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(e,t){const s=t.left_shift,r=0;if(!e||e.length===0)return this;const o=e.map(c=>{const d=c.getNote();if(d instanceof StaveNote){const{line:m,displaced:u}=d.getKeyProps()[c.getIndex()],g=u?d.getExtraLeftPx():0;return{line:m,shift:g,stroke:c}}else{const{str:m}=d.getPositions()[c.getIndex()];return{line:m,shift:0,stroke:c}}}),a=s,l=o.reduce((c,{stroke:d,shift:m})=>(d.setXShift(a+m),Math.max(d.getWidth()+r,c)),0);return t.left_shift+=l,!0}constructor(e,t){super(),this.setAttribute("type","Stroke"),this.note=null,this.options=Vex.Merge({},t),this.all_voices="all_voices"in this.options?this.options.all_voices:!0,this.note_end=null,this.index=null,this.type=e,this.position=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 Stroke.CATEGORY}getPosition(){return this.position}addEndNote(e){return this.note_end=e,this}draw(){if(this.checkContext(),this.setRendered(),!(this.note&&this.index!=null))throw new Vex.RERR("NoAttachedNote","Can't draw stroke without a note and index.");const e=this.note.getModifierStartXY(this.position,this.index);let t=this.note.getYs(),s=e.y,r=e.y;const o=e.x-5,a=this.note.stave.options.spacing_between_lines_px,l=this.getModifierContext().getModifiers(this.note.getCategory());for(let b=0;b<l.length;b++){t=l[b].getYs();for(let y=0;y<t.length;y++)(this.note===l[b]||this.all_voices)&&(s=Vex.Min(s,t[y]),r=Vex.Max(r,t[y]))}let c,d,m,u,g;switch(this.type){case Stroke.Type.BRUSH_DOWN:c="vc3",d=-3,m=s-a/2+10,r+=a/2;break;case Stroke.Type.BRUSH_UP:c="v11",d=.5,m=r+a/2,s-=a/2;break;case Stroke.Type.ROLL_DOWN:case Stroke.Type.RASQUEDO_DOWN:c="vc3",d=-3,u=this.x_shift+d-2,this.note instanceof StaveNote?(s+=1.5*a,(r-s)%2!==0?r+=.5*a:r+=a,m=s-a,g=r+a+2):(s+=1.5*a,r+=a,m=s-.75*a,g=r+.25*a);break;case Stroke.Type.ROLL_UP:case Stroke.Type.RASQUEDO_UP:c="v52",d=-4,u=this.x_shift+d-1,this.note instanceof StaveNote?(m=a/2,s+=.5*a,(r-s)%2===0&&(r+=a/2),m=r+.5*a,g=s-1.25*a):(s+=.25*a,r+=.5*a,m=r+.25*a,g=s-a);break;case Stroke.Type.ARPEGGIO_DIRECTIONLESS:s+=.5*a,r+=a;break;default:throw new Vex.RERR("InvalidType",`The stroke type ${this.type} does not exist`)}if(this.type===Stroke.Type.BRUSH_DOWN||this.type===Stroke.Type.BRUSH_UP)this.context.fillRect(o+this.x_shift,s,1,r-s);else if(this.note instanceof StaveNote)for(let b=s;b<=r;b+=a)Glyph.renderGlyph(this.context,o+this.x_shift-4,b,this.render_options.font_scale,"va3");else{let b;for(b=s;b<=r;b+=10)Glyph.renderGlyph(this.context,o+this.x_shift-4,b,this.render_options.font_scale,"va3");this.type===Stroke.Type.RASQUEDO_DOWN&&(g=b+.25*a)}this.type!==Stroke.Type.ARPEGGIO_DIRECTIONLESS&&(Glyph.renderGlyph(this.context,o+this.x_shift+d,m,this.render_options.font_scale,c),(this.type===Stroke.Type.RASQUEDO_DOWN||this.type===Stroke.Type.RASQUEDO_UP)&&(this.context.save(),this.context.setFont(this.font.family,this.font.size,this.font.weight),this.context.fillText("R",o+u,g),this.context.restore()))}}class StringNumber extends Modifier{static get CATEGORY(){return"stringnumber"}static format(e,t){const s=t.left_shift,r=t.right_shift,o=1;if(!e||e.length===0)return this;const a=[];let l=null,c=0,d=0,m,u,g,b,y;for(m=0;m<e.length;++m)for(u=e[m],g=u.getNote(),m=0;m<e.length;++m){u=e[m],g=u.getNote(),b=u.getPosition();const w=g.getKeyProps()[u.getIndex()];if(g!==l){for(let _=0;_<g.keys.length;++_)y=g.getKeyProps()[_],s===0&&(c=y.displaced?g.getExtraLeftPx():c),r===0&&(d=y.displaced?g.getExtraRightPx():d);l=g}a.push({pos:b,note:g,num:u,line:w.line,shiftL:c,shiftR:d})}a.sort((w,_)=>_.line-w.line);let S=0,v=0,x=0,A=null,E=null;for(m=0;m<a.length;++m){let w=0;g=a[m].note,b=a[m].pos,u=a[m].num;const _=a[m].line;a[m].shiftL;const C=a[m].shiftR;(_!==A||g!==E)&&(S=r+C);const P=u.getWidth()+o;b===Modifier.Position.LEFT?(u.setXShift(s),w=c+P,v=w>v?w:v):b===Modifier.Position.RIGHT&&(u.setXShift(S),w+=P,x=w>x?w:x),A=_,E=g}return t.left_shift+=v,t.right_shift+=x,!0}constructor(e){super(),this.setAttribute("type","StringNumber"),this.note=null,this.last_note=null,this.index=null,this.string_number=e,this.setWidth(20),this.position=Modifier.Position.ABOVE,this.x_shift=0,this.y_shift=0,this.x_offset=0,this.y_offset=0,this.dashed=!0,this.leg=Renderer.LineEndType.NONE,this.radius=8,this.font={family:"sans-serif",size:10,weight:"bold"}}getCategory(){return StringNumber.CATEGORY}getNote(){return this.note}setNote(e){return this.note=e,this}getIndex(){return this.index}setIndex(e){return this.index=e,this}setLineEndType(e){return e>=Renderer.LineEndType.NONE&&e<=Renderer.LineEndType.DOWN&&(this.leg=e),this}setStringNumber(e){return this.string_number=e,this}setOffsetX(e){return this.x_offset=e,this}setOffsetY(e){return this.y_offset=e,this}setLastNote(e){return this.last_note=e,this}setDashed(e){return this.dashed=e,this}draw(){const e=this.checkContext();if(!(this.note&&this.index!=null))throw new Vex.RERR("NoAttachedNote","Can't draw string number without a note and index.");this.setRendered();const t=this.note.stave.options.spacing_between_lines_px,s=this.note.getModifierStartXY(this.position,this.index);let r=s.x+this.x_shift+this.x_offset,o=s.y+this.y_shift+this.y_offset;switch(this.position){case Modifier.Position.ABOVE:case Modifier.Position.BELOW:{const l=this.note.getStemExtents();let c=l.topY,d=l.baseY+2;this.note.stem_direction===StaveNote.STEM_DOWN&&(c=l.baseY,d=l.topY-2),this.position===Modifier.Position.ABOVE?o=this.note.hasStem()?c-t*1.75:s.y-t*1.75:o=this.note.hasStem()?d+t*1.5:s.y+t*1.75,o+=this.y_shift+this.y_offset;break}case Modifier.Position.LEFT:r-=this.radius/2+5;break;case Modifier.Position.RIGHT:r+=this.radius/2+6;break;default:throw new Vex.RERR("InvalidPosition",`The position ${this.position} is invalid`)}e.save(),e.beginPath(),e.arc(r,o,this.radius,0,Math.PI*2,!1),e.lineWidth=1.5,e.stroke(),e.setFont(this.font.family,this.font.size,this.font.weight);const a=r-e.measureText(this.string_number).width/2;if(e.fillText(""+this.string_number,a,o+4.5),this.last_note!=null){const l=this.last_note.getStemX()-this.note.getX()+5;e.strokeStyle="#000000",e.lineCap="round",e.lineWidth=.6,this.dashed?Renderer.drawDashedLine(e,r+10,o,r+l,o,[3,3]):Renderer.drawDashedLine(e,r+10,o,r+l,o,[3,0]);let c,d;switch(this.leg){case Renderer.LineEndType.UP:c=-10,d=this.dashed?[3,3]:[3,0],Renderer.drawDashedLine(e,r+l,o,r+l,o+c,d);break;case Renderer.LineEndType.DOWN:c=10,d=this.dashed?[3,3]:[3,0],Renderer.drawDashedLine(e,r+l,o,r+l,o+c,d);break}}e.restore()}}function L$e(...i){Articulation$1.DEBUG&&Vex.L("Vex.Flow.Articulation",i)}const{ABOVE,BELOW}=Modifier.Position,roundToNearestHalf=(i,e)=>i(e/.5)*.5,isWithinLines=(i,e)=>e===ABOVE?i<=5:i>=1,getRoundingFunction=(i,e)=>isWithinLines(i,e)?e===ABOVE?Math.ceil:Math.floor:Math.round,snapLineToStaff=(i,e,t,s)=>{const r=roundToNearestHalf(getRoundingFunction(e,t),e),o=i&&isWithinLines(r,t),a=r%1===0;return o&&a?r+.5*-s:r},isStaveNote=i=>{const e=i.getCategory();return e==="stavenotes"||e==="gracenotes"},isTabNote=i=>{const e=i.getCategory();return e==="tabnotes"||e==="numberednotes"},getTopY=(i,e)=>{const t=i.getStave(),s=i.getStemDirection(),{topY:r,baseY:o}=i.getStemExtents();if(isStaveNote(i))return i.hasStem()?s===Stem.UP?r:o:Math.min(...i.getYs());if(isTabNote(i))return i.hasStem()&&s===Stem.UP?r:t.getYForTopText(e);throw new Vex.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")},getBottomY=(i,e)=>{const t=i.getStave(),s=i.getStemDirection(),{topY:r,baseY:o}=i.getStemExtents();if(isStaveNote(i))return i.hasStem()?s===Stem.UP?o:r:Math.max(...i.getYs());if(isTabNote(i))return i.hasStem()?s===Stem.UP?t.getYForBottomText(e):r:t.getYForBottomText(e);throw new Vex.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")},getInitialOffset=(i,e)=>{const t=e===ABOVE&&i.getStemDirection()===Stem.UP||e===BELOW&&i.getStemDirection()===Stem.DOWN;return isStaveNote(i)?i.hasStem()&&t?.5:1:i.hasStem()&&t?1:0};let Articulation$1=class Ft extends Modifier{static get CATEGORY(){return"articulations"}static get INITIAL_OFFSET(){return-.5}static format(e,t){if(!e||e.length===0)return!1;const s=c=>c.getPosition()===ABOVE,r=c=>c.getPosition()===BELOW,o=.5,a=(c,d,m)=>roundToNearestHalf(getRoundingFunction(d,m),c.glyph.getMetrics().height/10+o);e.filter(s).forEach(c=>{c.setTextLine(t.top_text_line),t.top_text_line+=a(c,t.top_text_line,ABOVE)}),e.filter(r).forEach(c=>{c.setTextLine(t.text_line),t.text_line+=a(c,t.text_line,BELOW)});const l=e.map(c=>c.getWidth()).reduce((c,d)=>Math.max(d,c));return t.left_shift+=l/2,t.right_shift+=l/2,!0}static easyScoreHook({articulations:e},t,s){if(!e)return;const r={staccato:"a.",tenuto:"a-"};e.split(",").map(o=>o.trim().split(".")).map(([o,a])=>{const l={type:r[o]};return a&&(l.position=Modifier.PositionString[a]),s.getFactory().Articulation(l)}).map(o=>t.addModifier(0,o))}constructor(e){if(super(),this.setAttribute("type","Articulation"),this.note=null,this.index=null,this.type=e,this.position=BELOW,this.render_options={font_scale:38},this.articulation=Flow.articulationCodes(this.type),!this.articulation)throw new Vex.RERR("ArgumentError",`Articulation not found: ${this.type}`);this.glyph=new Glyph(this.articulation.code,this.render_options.font_scale),this.setWidth(this.glyph.getMetrics().width)}getCategory(){return Ft.CATEGORY}draw(){const{note:e,index:t,position:s,glyph:r,articulation:{between_lines:o},text_line:a,context:l}=this;if(this.checkContext(),!e||t==null)throw new Vex.RERR("NoAttachedNote","Can't draw Articulation without a note and index.");this.setRendered();const c=e.getStave(),d=c.getSpacingBetweenLines(),m=e.getCategory()==="tabnotes",{x:u}=e.getModifierStartXY(s,t),g=!o||m,b=getInitialOffset(e,s);let y={[ABOVE]:()=>{r.setOrigin(.5,1);const S=getTopY(e,a)-(a+b)*d+(this.y_shift||0);return g?Math.min(c.getYForTopText(Ft.INITIAL_OFFSET),S):S},[BELOW]:()=>{r.setOrigin(.5,0);const S=getBottomY(e,a)+(a+b)*d;return g?Math.max(c.getYForBottomText(Ft.INITIAL_OFFSET),S):S}}[s]();if(!m){const S=s===ABOVE?-1:1,v=m?e.positions[t].str:e.getKeyProps()[t].line,A=(e.getYs()[t]-y)/d+v,E=snapLineToStaff(o,A,s,S);isWithinLines(E,s)&&r.setOrigin(.5,.5),y+=Math.abs(E-A)*d*S}L$e(`Rendering articulation at (x: ${u}, y: ${y})`),r.render(l,u,y)}};class TickContext extends Tickable{static getNextContext(e){const t=e.tContexts,s=t.indexOf(e);return t[s+1]}constructor(){super(),this.setAttribute("type","TickContext"),this.currentTick=new Fraction(0,1),this.maxTicks=new Fraction(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(e){return this.x=e,this.xBase=e,this.xOffset=0,this}getXBase(){return this.xBase}setXBase(e){this.xBase=e,this.x=e+this.xOffset}getXOffset(){return this.xOffset}setXOffset(e){this.xOffset=e,this.x=this.xBase+e}getWidth(){return this.width+this.padding*2}setPadding(e){return this.padding=e,this}getMaxTicks(){return this.maxTicks}getMinTicks(){return this.minTicks}getTickables(){return this.tickables}getCenterAlignedTickables(){return this.tickables.filter(e=>e.isCenterAligned())}getMetrics(){const{width:e,notePx:t,extraLeftPx:s,extraRightPx:r}=this;return{width:e,notePx:t,extraLeftPx:s,extraRightPx:r}}getCurrentTick(){return this.currentTick}setCurrentTick(e){this.currentTick=e,this.preFormatted=!1}getExtraPx(){let e=0,t=0,s=0,r=0;for(let o=0;o<this.tickables.length;o++){s=Math.max(this.tickables[o].extraLeftPx||0,s),r=Math.max(this.tickables[o].extraRightPx||0,r);const a=this.tickables[o].modifierContext;a&&a!=null&&(e=Math.max(e,a.state.left_shift),t=Math.max(t,a.state.right_shift))}return{left:e,right:t,extraLeft:s,extraRight:r}}addTickable(e){if(!e)throw new Vex.RERR("BadArgument","Invalid tickable added.");if(!e.shouldIgnoreTicks()){this.ignore_ticks=!1;const t=e.getTicks();t.greaterThan(this.maxTicks)&&(this.maxTicks=t.clone()),this.minTicks==null?this.minTicks=t.clone():t.lessThan(this.minTicks)&&(this.minTicks=t.clone())}return e.setTickContext(this),this.tickables.push(e),this.preFormatted=!1,this}preFormat(){if(this.preFormatted)return this;for(let e=0;e<this.tickables.length;++e){const t=this.tickables[e];t.preFormat();const s=t.getMetrics();this.extraLeftPx=Math.max(this.extraLeftPx,s.extraLeftPx+s.modLeftPx),this.extraRightPx=Math.max(this.extraRightPx,s.extraRightPx+s.modRightPx),this.notePx=Math.max(this.notePx,s.noteWidth),this.width=this.notePx+this.extraLeftPx+this.extraRightPx}return this}postFormat(){return this.postFormatted?this:(this.postFormatted=!0,this)}}function L$d(...i){Ornament.DEBUG&&Vex.L("Vex.Flow.Ornament",i)}class Ornament extends Modifier{static get CATEGORY(){return"ornaments"}static format(e,t){if(!e||e.length===0)return!1;let s=0;for(let r=0;r<e.length;++r){const o=e[r],a=2;s=Math.max(o.getWidth(),s),o.getPosition()===Modifier.Position.ABOVE?(o.setTextLine(t.top_text_line),t.top_text_line+=a):(o.setTextLine(t.text_line),t.text_line+=a)}return t.left_shift+=s/2,t.right_shift+=s/2,!0}constructor(e){if(super(),this.setAttribute("type","Ornament"),this.note=null,this.index=null,this.type=e,this.position=Modifier.Position.ABOVE,this.delayed=!1,this.accidentalUpper=null,this.accidentalLower=null,this.render_options={font_scale:38,accidentalLowerPadding:3,accidentalUpperPadding:3},this.ornament=Flow.ornamentCodes(this.type),!this.ornament)throw new Vex.RERR("ArgumentError",`Ornament not found: '${this.type}'`);this.glyph=new Glyph(this.ornament.code,this.render_options.font_scale),this.glyph.setOrigin(.5,1)}getCategory(){return Ornament.CATEGORY}setDelayed(e){return this.delayed=e,this}setUpperAccidental(e){const t=this.render_options.font_scale/1.3;return this.accidentalUpper=new Glyph(Flow.accidentalCodes(e).code,t),this.accidentalUpper.setOrigin(.5,1),this}setLowerAccidental(e){const t=this.render_options.font_scale/1.3;return this.accidentalLower=new Glyph(Flow.accidentalCodes(e).code,t),this.accidentalLower.setOrigin(.5,1),this}draw(){if(this.checkContext(),!this.note||this.index==null)throw new Vex.RERR("NoAttachedNote","Can't draw Ornament without a note and index.");this.setRendered();const e=this.context,t=this.note.getStemDirection(),s=this.note.getStave(),r=this.note.getStem().getExtents();let o=t===StaveNote.STEM_DOWN?r.baseY:r.topY;this.note.getCategory()==="tabnotes"&&(this.note.hasStem()?t===StaveNote.STEM_DOWN&&(o=s.getYForTopText(this.text_line)):o=s.getYForTopText(this.text_line));const a=t===StaveNote.STEM_DOWN,l=s.getSpacingBetweenLines();let c=1;!a&&this.note.beam&&(c+=.5);const d=l*(this.text_line+c),m=o-d;let g=this.note.getModifierStartXY(this.position,this.index).x,b=Math.min(s.getYForTopText(this.text_line),m);if(b+=this.y_shift,this.delayed){let y=0;if(this.delayXShift!==void 0)y=this.delayXShift;else{y+=this.glyph.getMetrics().width/2;const S=TickContext.getNextContext(this.note.getTickContext());S?y+=(S.getX()-g)*.5:y+=(s.x+s.width-g)*.5,this.delayXShift=y}g+=y}L$d("Rendering ornament: ",this.ornament,g,b),this.accidentalLower&&(this.accidentalLower.render(e,g,b),b-=this.accidentalLower.getMetrics().height,b-=this.render_options.accidentalLowerPadding),this.glyph.render(e,g,b),b-=this.glyph.getMetrics().height,this.accidentalUpper&&(b-=this.render_options.accidentalUpperPadding,this.accidentalUpper.render(e,g,b))}}function L$c(...i){Annotation.DEBUG&&Vex.L("Vex.Flow.Annotation",i)}class Annotation extends Modifier{static get CATEGORY(){return"annotations"}static get Justify(){return{LEFT:1,CENTER:2,RIGHT:3,CENTER_STEM:4}}static get JustifyString(){return{left:Annotation.Justify.LEFT,right:Annotation.Justify.RIGHT,center:Annotation.Justify.CENTER,centerStem:Annotation.Justify.CENTER_STEM}}static get VerticalJustify(){return{TOP:1,CENTER:2,BOTTOM:3,CENTER_STEM:4}}static get VerticalJustifyString(){return{above:Annotation.VerticalJustify.TOP,top:Annotation.VerticalJustify.TOP,below:Annotation.VerticalJustify.BOTTOM,bottom:Annotation.VerticalJustify.BOTTOM,center:Annotation.VerticalJustify.CENTER,centerStem:Annotation.VerticalJustify.CENTER_STEM}}static format(e,t){if(!e||e.length===0)return!1;let s=0;for(let r=0;r<e.length;++r){const o=e[r];s=Math.max(o.getWidth(),s),o.getPosition()===Modifier.Position.ABOVE?(o.setTextLine(t.top_text_line),t.top_text_line++):(o.setTextLine(t.text_line),t.text_line++)}return t.left_shift+=s/2,t.right_shift+=s/2,!0}constructor(e){super(),this.setAttribute("type","Annotation"),this.note=null,this.index=null,this.text=e,this.justification=Annotation.Justify.CENTER,this.vert_justification=Annotation.VerticalJustify.TOP,this.font={family:"Arial",size:10,weight:""},this.setWidth(Flow.textWidth(e))}getCategory(){return Annotation.CATEGORY}setFont(e,t,s){return this.font={family:e,size:t,weight:s},this}setVerticalJustification(e){return this.vert_justification=typeof e=="string"?Annotation.VerticalJustifyString[e]:e,this}getJustification(){return this.justification}setJustification(e){return this.justification=typeof e=="string"?Annotation.JustifyString[e]:e,this}draw(){if(this.checkContext(),!this.note)throw new Vex.RERR("NoNoteForAnnotation","Can't draw text annotation without an attached note.");this.setRendered();const e=this.note.getModifierStartXY(Modifier.Position.ABOVE,this.index);this.context.save(),this.context.setFont(this.font.family,this.font.size,this.font.weight);const t=this.context.measureText(this.text).width,s=this.context.measureText("m").width;let r,o;this.justification===Annotation.Justify.LEFT?r=e.x:this.justification===Annotation.Justify.RIGHT?r=e.x-t:this.justification===Annotation.Justify.CENTER?r=e.x-t/2:r=this.note.getStemX()-t/2;let a,l;const c=this.note.hasStem(),d=this.note.getStave();if(c&&(a=this.note.getStem().getExtents(),l=d.getSpacingBetweenLines()),this.vert_justification===Annotation.VerticalJustify.BOTTOM){if(o=d.getYForBottomText(this.text_line+Flow.TEXT_HEIGHT_OFFSET_HACK),c){const u=this.note.getStemDirection()===1?a.baseY:a.topY;o=Math.max(o,u+l*(this.text_line+2))}}else if(this.vert_justification===Annotation.VerticalJustify.CENTER){const u=this.note.getYForTopText(this.text_line)-1,g=d.getYForBottomText(this.text_line);o=u+(g-u)/2+s/2}else if(this.vert_justification===Annotation.VerticalJustify.TOP)o=Math.min(d.getYForTopText(this.text_line),this.note.getYs()[0]-10),c&&(o=Math.min(o,a.topY-5-l*this.text_line));else{const u=this.note.getStemExtents();o=u.topY+(u.baseY-u.topY)/2+s/2}L$c("Rendering annotation: ",this.text,r,o),["b","bb","#","##","n"].includes(this.text)?(new Glyph(Flow.accidentalCodes(this.text).code,38).render(this.context,r+2,o-27),this.setRendered()):(this.context.fillText(this.text,r,o),this.context.restore())}}class Bend extends Modifier{static get CATEGORY(){return"bends"}static get UP(){return 0}static get DOWN(){return 1}static format(e,t){if(!e||e.length===0)return!1;let s=0;const r=t.top_text_line;for(let o=0;o<e.length;++o){const a=e[o];a.setXShift(s),s=a.getWidth(),a.setTextLine(r)}return t.right_shift+=s,t.top_text_line+=1,!0}constructor(e,t,s){super(),this.setAttribute("type","Bend"),this.text=e,this.x_shift=0,this.release=t||!1,this.font="10pt Arial",this.render_options={line_width:1.5,line_style:"#777777",bend_width:8,release_width:8},s?this.phrase=s:(this.phrase=[{type:Bend.UP,text:this.text}],this.release&&this.phrase.push({type:Bend.DOWN,text:""})),this.updateWidth()}getCategory(){return Bend.CATEGORY}setXShift(e){this.x_shift=e,this.updateWidth()}setFont(e){return this.font=e,this}getText(){return this.text}updateWidth(){const e=this;function t(r){let o;return e.context?o=e.context.measureText(r).width:o=Flow.textWidth(r),o}let s=0;for(let r=0;r<this.phrase.length;++r){const o=this.phrase[r];if("width"in o)s+=o.width;else{const a=o.type===Bend.UP?this.render_options.bend_width:this.render_options.release_width;o.width=Vex.Max(a,t(o.text))+3,o.draw_width=o.width/2,s+=o.width}}return this.setWidth(s+this.x_shift),this}draw(){if(this.checkContext(),!(this.note&&this.index!=null))throw new Vex.RERR("NoNoteForBend","Can't draw bend without a note or index.");this.setRendered();const e=this.note.getModifierStartXY(Modifier.Position.RIGHT,this.index);e.x+=3,e.y+=.5;const t=this.x_shift,s=this.context,r=this.note.getStave().getYForTopText(this.text_line)+3,o=this.note.getStave().getYForTopText(this.text_line)-1,a=this;function l(b,y,S,v){const x=b+S,A=y;s.save(),s.beginPath(),s.setLineWidth(a.render_options.line_width),s.setStrokeStyle(a.render_options.line_style),s.setFillStyle(a.render_options.line_style),s.moveTo(b,y),s.quadraticCurveTo(x,A,b+S,v),s.stroke(),s.restore()}function c(b,y,S,v){s.save(),s.beginPath(),s.setLineWidth(a.render_options.line_width),s.setStrokeStyle(a.render_options.line_style),s.setFillStyle(a.render_options.line_style),s.moveTo(b,v),s.quadraticCurveTo(b+S,v,b+S,y),s.stroke(),s.restore()}function d(b,y,S){const x=S||1;s.beginPath(),s.moveTo(b,y),s.lineTo(b-4,y+4*x),s.lineTo(b+4,y+4*x),s.closePath(),s.fill()}function m(b,y){s.save(),s.setRawFont(a.font);const S=b-s.measureText(y).width/2;s.fillText(y,S,o),s.restore()}let u=null,g=0;for(let b=0;b<this.phrase.length;++b){const y=this.phrase[b];b===0&&(y.draw_width+=t),g=y.draw_width+(u?u.draw_width:0)-(b===1?t:0),y.type===Bend.UP&&(u&&u.type===Bend.UP&&d(e.x,r),l(e.x,e.y,g,r)),y.type===Bend.DOWN&&(u&&u.type===Bend.UP&&c(e.x,e.y,g,r),u&&u.type===Bend.DOWN&&(d(e.x,e.y,-1),c(e.x,e.y,g,r)),u===null&&(g=y.draw_width,c(e.x,e.y,g,r))),m(e.x+g,y.text),u=y,u.x=e.x,e.x+=g}u.type===Bend.UP?d(u.x+g,r):u.type===Bend.DOWN&&d(u.x+g,e.y,-1)}}class Vibrato extends Modifier{static get CATEGORY(){return"vibratos"}static format(e,t,s){if(!e||e.length===0)return!1;let r=t.top_text_line,o=0,a=t.right_shift-7;const l=s.getModifiers(Bend.CATEGORY);l&&l.length>0&&r--;for(let c=0;c<e.length;++c){const d=e[c];d.setXShift(a),d.setTextLine(r),o+=d.getWidth(),a+=o}return t.right_shift+=o,t.top_text_line+=1,!0}constructor(){super(),this.setAttribute("type","Vibrato"),this.position=Modifier.Position.RIGHT,this.render_options={harsh:!1,vibrato_width:20,wave_height:6,wave_width:4,wave_girth:2},this.setVibratoWidth(this.render_options.vibrato_width)}getCategory(){return Vibrato.CATEGORY}setHarsh(e){return this.render_options.harsh=e,this}setVibratoWidth(e){return this.render_options.vibrato_width=e,this.setWidth(e),this}draw(){const e=this.checkContext();if(!this.note)throw new Vex.RERR("NoNoteForVibrato","Can't draw vibrato without an attached note.");this.setRendered();const s=this.note.getModifierStartXY(Modifier.Position.RIGHT,this.index).x+this.x_shift,r=this.note.getYForTopText(this.text_line)+2;Vibrato.renderVibrato(e,s,r,this.render_options)}static renderVibrato(e,t,s,r){const{harsh:o,vibrato_width:a,wave_width:l,wave_girth:c,wave_height:d}=r,m=a/l;e.beginPath();let u;if(o){for(e.moveTo(t,s+c+1),u=0;u<m/2;++u)e.lineTo(t+l,s-d/2),t+=l,e.lineTo(t+l,s+d/2),t+=l;for(u=0;u<m/2;++u)e.lineTo(t-l,s-d/2+c+1),t-=l,e.lineTo(t-l,s+d/2+c+1),t-=l;e.fill()}else{for(e.moveTo(t,s+c),u=0;u<m/2;++u)e.quadraticCurveTo(t+l/2,s-d/2,t+l,s),t+=l,e.quadraticCurveTo(t+l/2,s+d/2,t+l,s),t+=l;for(u=0;u<m/2;++u)e.quadraticCurveTo(t-l/2,s+d/2+c,t-l,s+c),t-=l,e.quadraticCurveTo(t-l/2,s-d/2+c,t-l,s+c),t-=l;e.fill()}}}function L$b(...i){ModifierContext.DEBUG&&Vex.L("Vex.Flow.ModifierContext",i)}class ModifierContext{constructor(){this.modifiers={},this.preFormatted=!1,this.postFormatted=!1,this.width=0,this.spacing=0,this.state={left_shift:0,right_shift:0,text_line:0,top_text_line:0},this.PREFORMAT=[StaveNote,Dot,FretHandFinger,Accidental,Stroke,GraceNoteGroup,NoteSubGroup$1,StringNumber,Articulation$1,Ornament,Annotation,Bend,Vibrato],this.POSTFORMAT=[StaveNote]}addModifier(e){const t=e.getCategory();return this.modifiers[t]||(this.modifiers[t]=[]),this.modifiers[t].push(e),e.setModifierContext(this),this.preFormatted=!1,this}getModifiers(e){return this.modifiers[e]}getWidth(){return this.width}getExtraLeftPx(){return this.state.left_shift}getExtraRightPx(){return this.state.right_shift}getState(){return this.state}getMetrics(){if(!this.formatted)throw new Vex.RERR("UnformattedModifier","Unformatted modifier has no metrics.");return{width:this.state.left_shift+this.state.right_shift+this.spacing,spacing:this.spacing,extra_left_px:this.state.left_shift,extra_right_px:this.state.right_shift}}preFormat(){this.preFormatted||(this.PREFORMAT.forEach(e=>{L$b("Preformatting ModifierContext: ",e.CATEGORY),e.format(this.getModifiers(e.CATEGORY),this.state,this)}),this.width=this.state.left_shift+this.state.right_shift,this.preFormatted=!0)}postFormat(){this.postFormatted||this.POSTFORMAT.forEach(e=>{L$b("Postformatting ModifierContext: ",e.CATEGORY),e.postFormat(this.getModifiers(e.CATEGORY),this)})}}function L$a(...i){Formatter.DEBUG&&Vex.L("Vex.Flow.Formatter",i)}function getNext(i,e){var s,r;const t=i[e+1];return t&&((s=t==null?void 0:t.keys)!=null&&s.includes("b/4"))||(r=t==null?void 0:t.keys)!=null&&r.includes("r/4")?getNext(i,e+1):t}function createContexts(i,e,t){if(!i||!i.length)throw new Vex.RERR("BadArgument","No voices to format");const s=i[0].getTotalTicks(),r=i.reduce((c,d)=>{if(!d.getTotalTicks().equals(s))throw new Vex.RERR("TickMismatch","Voices should have same total note duration in ticks.");if(d.getMode()===Voice$1.Mode.STRICT&&!d.isComplete())throw new Vex.RERR("IncompleteVoice","Voice does not have enough notes.");return Math.max(c,Fraction.LCM(c,d.getResolutionMultiplier()))},1),o={},a=[],l=[];return i.forEach(c=>{const d=new Fraction(0,r);c.getTickables().forEach(m=>{const u=d.numerator;if(!o[u]){const g=new e;l.push(g),o[u]=g}t(m,o[u]),a.push(u),d.add(m.getTicks())})}),{map:o,array:l,list:Vex.SortAndUnique(a,(c,d)=>c-d,(c,d)=>c===d),resolutionMultiplier:r}}class Formatter{static SimpleFormat(e,t=0,{paddingBetween:s=10}={}){e.reduce((r,o)=>{o.addToModifierContext(new ModifierContext);const a=new TickContext().addTickable(o).preFormat(),l=a.getExtraPx();return a.setX(r+l.left),r+a.getWidth()+l.right+s},t)}static plotDebugging(e,t,s,r,o){const a=s+Note.STAVEPADDING,l=t.contextGaps;function c(d,m,u){e.beginPath(),e.setStrokeStyle(u),e.setFillStyle(u),e.setLineWidth(1),e.fillRect(d,r,m-d,o-r)}e.save(),e.setFont("Arial",8,""),l.gaps.forEach(d=>{c(a+d.x1,a+d.x2,"#aaa"),e.fillText(Math.round(d.x2-d.x1),a+d.x1,o+12)}),e.fillText(Math.round(l.total)+"px",a-20,o+12),e.setFillStyle("red"),e.fillText("Loss: "+t.lossHistory.map(d=>Math.round(d)),a-20,o+22),e.restore()}static FormatAndDraw(e,t,s,r){const o={auto_beam:!1,align_rests:!1};typeof r=="object"?Vex.Merge(o,r):typeof r=="boolean"&&(o.auto_beam=r);const a=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(s),l=o.auto_beam?Beam$1.applyAndGetBeams(a):[];return new Formatter().joinVoices([a],{align_rests:o.align_rests}).formatToStave([a],t,{align_rests:o.align_rests,stave:t}),a.setStave(t).draw(e,t),l.forEach(c=>c.setContext(e).draw()),a.getBoundingBox()}static FormatAndDrawTab(e,t,s,r,o,a,l){const c={auto_beam:a,align_rests:!1};typeof l=="object"?Vex.Merge(c,l):typeof l=="boolean"&&(c.auto_beam=l);const d=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(o),m=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(r),u=c.auto_beam?Beam$1.applyAndGetBeams(d):[];new Formatter().joinVoices([d],{align_rests:c.align_rests}).joinVoices([m]).formatToStave([d,m],s,{align_rests:c.align_rests}),d.draw(e,s),m.draw(e,t),u.forEach(g=>g.setContext(e).draw()),new StaveConnector(s,t).setContext(e).draw()}static AlignRestsToNotes(e,t,s){return e.forEach((r,o)=>{if(r instanceof StaveNote&&r.isRest()){if(r.tuplet&&!s)return;if(["va5","v3c"].includes(r.glyph.code_head)){const a=r.glyph.code_head==="va5"?10:14,l=e[o-1],c=getNext(e,o);let d=!1;if(l&&c&&l.beam&&c.beam&&(d=l.beam.notes.includes(c)),d){r.setKeyLine(0,3);let m=[...l.beam.notes,...c.beam.notes];r.beam&&r.beam.notes&&m.push(...r.beam.notes),m=Array.from(new Set(m));for(let u=0;u<m.length;u+=1){const g=m[u].getKeyProps()[0].line,b=m[u].stem;if(b)if(b.stem_direction>0){const y=g<1.5?Math.abs(g-1.5)*a:0;b.setResetHeight(y)}else{const y=g>4.5?Math.abs(g-4.5)*a:0;b.setResetHeight(y)}}}}}}),this}constructor(){this.minTotalWidth=0,this.hasMinTotalWidth=!1,this.totalTicks=new Fraction(0,1),this.tickContexts=null,this.modiferContexts=null,this.contextGaps={total:0,gaps:[]},this.voices=[]}alignRests(e,t){if(!e||!e.length)throw new Vex.RERR("BadArgument","No voices to format rests");e.forEach(s=>Formatter.AlignRestsToNotes(s.getTickables(),t))}preCalculateMinTotalWidth(e){if(this.hasMinTotalWidth)return this.minTotalWidth;if(!this.tickContexts){if(!e)throw new Vex.RERR("BadArgument","'voices' required to run preCalculateMinTotalWidth");this.createTickContexts(e)}const{list:t,map:s}=this.tickContexts;return this.minTotalWidth=t.map(r=>{const o=s[r];return o.preFormat(),o.getWidth()}).reduce((r,o)=>r+o,0),this.hasMinTotalWidth=!0,this.minTotalWidth}getMinTotalWidth(){if(!this.hasMinTotalWidth)throw new Vex.RERR("NoMinTotalWidth","Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'");return this.minTotalWidth}createModifierContexts(e){const t=createContexts(e,ModifierContext,(s,r)=>s.addToModifierContext(r));return this.modiferContexts=t,t}createTickContexts(e){const t=createContexts(e,TickContext,(s,r)=>r.addTickable(s));return t.array.forEach(s=>{s.tContexts=t.array}),this.totalTicks=e[0].getTicksUsed().clone(),this.tickContexts=t,t}preFormat(e=0,t,s,r){const o=this.tickContexts,{list:a,map:l,resolutionMultiplier:c}=o;s&&r&&s.forEach(S=>S.setStave(r).preFormat());let d=0,m=0;const u=e/2;if(this.minTotalWidth=0,a.forEach(S=>{const v=l[S];t&&v.setContext(t),v.preFormat();const x=v.getWidth();this.minTotalWidth+=x;const A=v.getMetrics();d=d+m+A.extraLeftPx,v.setX(d),m=x-A.extraLeftPx}),this.minTotalWidth=d+m,this.hasMinTotalWidth=!0,e<=0)return;const b=(e-this.minTotalWidth)/(this.totalTicks.value()*c);let y=0;a.forEach((S,v)=>{const x=a[v-1]||0,A=l[S],E=(S-x)*b;y+=E,A.setX(A.getX()+y),A.getCenterAlignedTickables().forEach(w=>{w.center_x_shift=u-A.getX()})}),a.length!==1&&(this.justifyWidth=e,this.lossHistory=[],this.evaluate())}evaluate(){const e=this.justifyWidth;this.contextGaps={total:0,gaps:[]},this.tickContexts.list.forEach((o,a)=>{if(a===0)return;const l=this.tickContexts.list[a-1],c=this.tickContexts.map[l],d=this.tickContexts.map[o],m=c.getMetrics(),u=c.getX()+m.width,g=d.getX(),b=g-u;this.contextGaps.total+=b,this.contextGaps.gaps.push({x1:u,x2:g}),d.getFormatterMetrics().freedom.left=b,c.getFormatterMetrics().freedom.right=b});const t=this.durationStats={};function s(o,a){const l=t[o];l===void 0?t[o]={mean:a,count:1}:(l.count+=1,l.mean=(l.mean+a)/2)}this.voices.forEach(o=>{o.getTickables().forEach((a,l,c)=>{const d=a.getTicks().clone().simplify().toString(),m=a.getMetrics(),u=a.getFormatterMetrics(),g=a.getX()+m.noteWidth+m.modRightPx+m.extraRightPx;let b=0;if(l<c.length-1){const y=c[l+1],S=y.getMetrics();b=y.getX()-S.modLeftPx-S.extraLeftPx-g,u.space.used=y.getX()-a.getX(),y.getFormatterMetrics().freedom.left=b}else b=e-g,u.space.used=e-a.getX();u.freedom.right=b,s(d,u.space.used)})});let r=0;return this.voices.forEach(o=>{o.getTickables().forEach(a=>{const l=a.getTicks().clone().simplify().toString(),c=a.getFormatterMetrics();c.iterations+=1,c.space.deviation=c.space.used-t[l].mean,c.duration=l,c.space.mean=t[l].mean,r+=Math.pow(t[l].mean,2)})}),this.totalCost=Math.sqrt(r),this.lossHistory.push(this.totalCost),this}tune(){const e=r=>r.reduce((o,a)=>o+a);function t(r,o,a,l){r.setX(r.getX()+l),r.getFormatterMetrics().freedom.left+=l,r.getFormatterMetrics().freedom.right-=l,o&&(o.getFormatterMetrics().freedom.right+=l),a&&(a.getFormatterMetrics().freedom.left-=l)}let s=0;return this.tickContexts.list.forEach((r,o,a)=>{const l=this.tickContexts.map[r],c=o>0?this.tickContexts.map[a[o-1]]:null,d=o<a.length-1?this.tickContexts.map[a[o+1]]:null;t(l,c,d,s);const m=-e(l.getTickables().map(g=>g.getFormatterMetrics().space.deviation));m>0?s=-Math.min(l.getFormatterMetrics().freedom.right,Math.abs(m)):m<0&&(d?s=Math.min(d.getFormatterMetrics().freedom.right,Math.abs(m)):s=0);const u=Math.min(5,Math.abs(s));s=s>0?u:-u}),this.evaluate()}postFormat(){const e=t=>t.list.forEach(s=>t.map[s].postFormat());return e(this.modiferContexts),e(this.tickContexts),this}joinVoices(e){return this.createModifierContexts(e),this.hasMinTotalWidth=!1,this}format(e,t,s){const r={align_rests:!1,context:null,stave:null};return Vex.Merge(r,s),this.voices=e,this.alignRests(e,r.align_rests),this.createTickContexts(e),this.preFormat(t,r.context,e,r.stave),this}formatToStave(e,t,s){const r=t.getNoteEndX()-t.getNoteStartX()-10;L$a("Formatting voices to width: ",r);const o={context:t.getContext()};return Vex.Merge(o,s),this.format(e,r,o)}}class StaveModifier extends Element$1{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=StaveModifier.Position.ABOVE,this.layoutMetrics=null}getPosition(){return this.position}setPosition(e){return this.position=e,this}getStave(){return this.stave}setStave(e){return this.stave=e,this}getWidth(){return this.width}setWidth(e){return this.width=e,this}getX(){return this.x}setX(e){return this.x=e,this}getCategory(){return""}makeSpacer(e){return{getContext(){return!0},setStave(){},renderToStave(){},getMetrics(){return{width:e}}}}placeGlyphOnLine(e,t,s){e.setYShift(t.getYForLine(s)-t.getYForGlyphs())}getPadding(e){return e!==void 0&&e<2?0:this.padding}setPadding(e){return this.padding=e,this}setLayoutMetrics(e){return this.layoutMetrics=e,this}getLayoutMetrics(){return this.layoutMetrics}}class Barline extends StaveModifier{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:Barline.type.SINGLE,double:Barline.type.DOUBLE,end:Barline.type.END,repeatBegin:Barline.type.REPEAT_BEGIN,repeatEnd:Barline.type.REPEAT_END,repeatBoth:Barline.type.REPEAT_BOTH,none:Barline.type.NONE}}constructor(e){super(),this.setAttribute("type","Barline"),this.thickness=Flow.STAVE_LINE_THICKNESS;const t=Barline.type;this.widths={},this.widths[t.SINGLE]=5,this.widths[t.DOUBLE]=5,this.widths[t.END]=5,this.widths[t.REPEAT_BEGIN]=5,this.widths[t.REPEAT_END]=5,this.widths[t.REPEAT_BOTH]=5,this.widths[t.NONE]=5,this.paddings={},this.paddings[t.SINGLE]=0,this.paddings[t.DOUBLE]=0,this.paddings[t.END]=0,this.paddings[t.REPEAT_BEGIN]=15,this.paddings[t.REPEAT_END]=15,this.paddings[t.REPEAT_BOTH]=15,this.paddings[t.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[t.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[t.NONE]={xMin:0,xMax:0,paddingLeft:5,paddingRight:5},this.setPosition(StaveModifier.Position.BEGIN),this.setType(e)}getCategory(){return Barline.CATEGORY}getType(){return this.type}setType(e){return this.type=typeof e=="string"?Barline.typeString[e]:e,this.setWidth(this.widths[this.type]),this.setPadding(this.paddings[this.type]),this.setLayoutMetrics(this.layoutMetricsMap[this.type]),this}draw(e){switch(e.checkContext(),this.setRendered(),this.type){case Barline.type.SINGLE:this.drawVerticalBar(e,this.x,!1);break;case Barline.type.DOUBLE:this.drawVerticalBar(e,this.x,!0);break;case Barline.type.END:this.drawVerticalEndBar(e,this.x);break;case Barline.type.REPEAT_BEGIN:this.drawRepeatBar(e,this.x,!0),e.getX()!==this.x&&this.drawVerticalBar(e,e.getX());break;case Barline.type.REPEAT_END:this.drawRepeatBar(e,this.x,!1);break;case Barline.type.REPEAT_BOTH:this.drawRepeatBar(e,this.x,!1),this.drawRepeatBar(e,this.x,!0);break}}drawVerticalBar(e,t,s){e.checkContext();const r=e.getTopLineTopY(),o=e.getBottomLineBottomY();s&&e.context.fillRect(t-3,r,1,o-r),e.context.fillRect(t,r,1,o-r)}drawVerticalEndBar(e,t){e.checkContext();const s=e.getTopLineTopY(),r=e.getBottomLineBottomY();e.context.fillRect(t-5,s,1,r-s),e.context.fillRect(t-2,s,3,r-s)}drawRepeatBar(e,t,s){e.checkContext();const r=e.getTopLineTopY(),o=e.getBottomLineBottomY();let a=3;s||(a=-5),e.context.fillRect(t+a,r,1,o-r),e.context.fillRect(t-2,r,3,o-r);const l=2;s?a+=4:a-=4;const c=t+a+l/2;let d=(e.getNumLines()-1)*e.getSpacingBetweenLines();d=d/2-e.getSpacingBetweenLines()/2;let m=r+d+l/2;e.context.beginPath(),e.context.arc(c,m,l,0,Math.PI*2,!1),e.context.fill(),m+=e.getSpacingBetweenLines(),e.context.beginPath(),e.context.arc(c,m,l,0,Math.PI*2,!1),e.context.fill()}}let Repetition$1=class He extends StaveModifier{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(e,t,s){super(),this.setAttribute("type","Repetition"),this.symbol_type=e,this.x=t,this.x_shift=0,this.y_shift=s,this.font={family:"times",size:12,weight:"bold italic"}}getCategory(){return He.CATEGORY}setShiftX(e){return this.x_shift=e,this}setShiftY(e){return this.y_shift=e,this}setX(e){return this.x=e,this}draw(e,t){switch(this.setRendered(),this.symbol_type){case He.type.CODA_RIGHT:this.drawCodaFixed(e,t+e.width);break;case He.type.CODA_LEFT:this.drawSymbolText(e,t,"Coda",!1);break;case He.type.SEGNO_LEFT:this.drawSignoFixed(e,t);break;case He.type.SEGNO_RIGHT:this.drawSignoFixed(e,t+e.width);break;case He.type.DC:this.drawSymbolText(e,t,"D.C.",!1);break;case He.type.DC_AL_CODA:this.drawSymbolText(e,t,"D.C. al Coda",!0);break;case He.type.DC_AL_FINE:this.drawSymbolText(e,t,"D.C. al Fine",!1);break;case He.type.DS:this.drawSymbolText(e,t,"D.S.",!1);break;case He.type.DS_AL_CODA:this.drawSymbolText(e,t,"D.S. al Coda",!0);break;case He.type.DS_AL_FINE:this.drawSymbolText(e,t,"D.S. al Fine",!1);break;case He.type.FINE:this.drawSymbolText(e,t,"Fine",!1);break;case He.type.TO_CODA:this.drawSymbolText(e,t,"To Coda",!0);break}return this}drawCodaFixed(e,t){const s=e.getYForTopText(e.options.num_lines)+this.y_shift;return Glyph.renderGlyph(e.context,this.x+t+this.x_shift,s+25,40,"v4d",!0),this}drawSignoFixed(e,t){const s=e.getYForTopText(e.options.num_lines)+this.y_shift;return Glyph.renderGlyph(e.context,this.x+t+this.x_shift,s+25,30,"v8c",!0),this}drawSymbolText(e,t,s,r){const o=e.checkContext();o.save(),o.setFont(this.font.family,this.font.size,this.font.weight);let a=0+this.x_shift,l=t+this.x_shift;this.symbol_type===He.type.CODA_LEFT?(a=this.x+e.options.vertical_bar_width,l=a+o.measureText(s).width+12):(this.x_shift=-(a+o.measureText(s).width+12+e.options.vertical_bar_width+12),a=this.x+this.x_shift+e.options.vertical_bar_width,l=a+o.measureText(s).width+12);const c=e.getYForTopText(e.options.num_lines)+this.y_shift+25;return r&&Glyph.renderGlyph(o,l,c,40,"v4d",!0),o.fillText(s,a,c+5),o.restore(),this}};class StaveSection extends StaveModifier{static get CATEGORY(){return"stavesection"}constructor(e,t,s){super(),this.setAttribute("type","StaveSection"),this.setWidth(16),this.section=e,this.x=t,this.shift_x=0,this.shift_y=s,this.font={family:"sans-serif",size:12,weight:"bold"}}getCategory(){return StaveSection.CATEGORY}setStaveSection(e){return this.section=e,this}setShiftX(e){return this.shift_x=e,this}setShiftY(e){return this.shift_y=e,this}draw(e,t){const s=e.checkContext();this.setRendered(),s.save(),s.lineWidth=2,s.setFont(this.font.family,this.font.size,this.font.weight);const r=s.measureText(""+this.section),o=r.width,a=r.height;let l=o+6;l<18&&(l=18);const c=a,d=e.getYForTopText(3)+this.shift_y;let m=this.x+t;return s.beginPath(),s.lineWidth=2,s.rect(m,d+a/4,l,c),s.stroke(),m+=(l-o)/2,s.fillText(""+this.section,m,d+16),s.restore(),this}}class StaveTempo extends StaveModifier{static get CATEGORY(){return"stavetempo"}constructor(e,t,s){super(),this.setAttribute("type","StaveTempo"),this.tempo=e,this.position=Modifier.Position.ABOVE,this.x=t,this.shift_x=10,this.shift_y=s,this.font={family:"times",size:14,weight:"bold"},this.render_options={glyph_font_scale:30}}getCategory(){return StaveTempo.CATEGORY}setTempo(e){return this.tempo=e,this}setShiftX(e){return this.shift_x=e,this}setShiftY(e){return this.shift_y=e,this}draw(e,t){const s=e.checkContext();this.setRendered();const r=this.render_options,o=r.glyph_font_scale/38,a=this.tempo.name,l=this.tempo.duration,c=this.tempo.dots,d=this.tempo.bpm,m=this.font;let u=this.x+this.shift_x+t;const g=e.getYForTopText(1)+this.shift_y;if(s.save(),s.openGroup("stavetempo",null,{}),a&&(s.setFont(m.family,m.size,m.weight),s.fillText(a,u,g),u+=s.measureText(a).width),l&&d){s.setFont(m.family,m.size,"normal"),a&&(u+=s.measureText(" ").width,s.fillText("(",u,g),u+=s.measureText("(").width);const b=Flow.getGlyphProps(l);if(u+=3*o,Glyph.renderGlyph(s,u,g,r.glyph_font_scale,b.code_head),u+=b.getWidth()*o,b.stem){let y=30;b.beam_count&&(y+=3*(b.beam_count-1)),y*=o;const S=g-y;s.fillRect(u-o,S,o,y),b.flag&&(Glyph.renderGlyph(s,u,S,r.glyph_font_scale,b.code_flag_upstem),c||(u+=6*o))}for(let y=0;y<c;y++)u+=6*o,s.beginPath(),s.arc(u,g+2*o,2*o,0,Math.PI*2,!1),s.fill();s.fillText(" = "+d+(a?")":""),u+3*o,g)}return s.closeGroup(),s.restore(),this}}class TextNote extends Note{static get Justification(){return{LEFT:1,CENTER:2,RIGHT:3}}static get GLYPHS(){return{segno:{code:"v8c",point:40,x_shift:0,y_shift:-10},tr:{code:"v1f",point:40,x_shift:0,y_shift:0},mordent_upper:{code:"v1e",point:40,x_shift:0,y_shift:0},mordent_lower:{code:"v45",point:40,x_shift:0,y_shift:0},f:{code:"vba",point:40,x_shift:0,y_shift:0},p:{code:"vbf",point:40,x_shift:0,y_shift:0},m:{code:"v62",point:40,x_shift:0,y_shift:0},s:{code:"v4a",point:40,x_shift:0,y_shift:0},z:{code:"v80",point:40,x_shift:0,y_shift:0},coda:{code:"v4d",point:40,x_shift:0,y_shift:-8},pedal_open:{code:"v36",point:40,x_shift:0,y_shift:0},pedal_close:{code:"v5d",point:40,x_shift:0,y_shift:3},caesura_straight:{code:"v34",point:40,x_shift:0,y_shift:2},caesura_curved:{code:"v4b",point:40,x_shift:0,y_shift:2},breath:{code:"v6c",point:40,x_shift:0,y_shift:0},tick:{code:"v6f",point:50,x_shift:0,y_shift:0},turn:{code:"v72",point:40,x_shift:0,y_shift:0},turn_inverted:{code:"v33",point:40,x_shift:0,y_shift:0},mordent:{code:"v1e",point:40,x_shift:0,y_shift:0}}}constructor(e){if(super(e),this.setAttribute("type","TextNote"),this.text=e.text,this.superscript=e.superscript,this.subscript=e.subscript,this.glyph_type=e.glyph,this.glyph=null,this.font={family:"Arial",size:12,weight:""},e.font&&(this.font=e.font),this.glyph_type){const t=TextNote.GLYPHS[this.glyph_type];if(!t)throw new Vex.RERR("Invalid glyph type: "+this.glyph_type);this.glyph=new Glyph(t.code,t.point,{cache:!1}),t.width?this.setWidth(t.width):this.setWidth(this.glyph.getMetrics().width),this.glyph_struct=t}else this.setWidth(Flow.textWidth(this.text));this.line=e.line||0,this.smooth=e.smooth||!1,this.ignore_ticks=e.ignore_ticks||!1,this.justification=TextNote.Justification.LEFT}setJustification(e){return this.justification=e,this}setLine(e){return this.line=e,this}preFormat(){this.checkContext(),!this.preFormatted&&(this.smooth?this.setWidth(0):this.glyph||this.setWidth(this.context.measureText(this.text).width),this.justification===TextNote.Justification.CENTER?this.extraLeftPx=this.width/2:this.justification===TextNote.Justification.RIGHT&&(this.extraLeftPx=this.width),this.setPreFormatted(!0))}draw(){if(this.checkContext(),!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");this.setRendered();const e=this.context;let t=this.getAbsoluteX();this.justification===TextNote.Justification.CENTER?t-=this.getWidth()/2:this.justification===TextNote.Justification.RIGHT&&(t-=this.getWidth());let s;if(this.glyph)s=this.stave.getYForLine(this.line+-3),this.glyph.render(this.context,t+this.glyph_struct.x_shift,s+this.glyph_struct.y_shift);else{s=this.stave.getYForLine(this.line+-3),this.applyStyle(e),e.setFont(this.font.family,this.font.size,this.font.weight),e.fillText(this.text,t,s);const r=e.measureText("M").width,o=e.measureText(this.text).width;this.superscript&&(e.setFont(this.font.family,this.font.size/1.3,this.font.weight),e.fillText(this.superscript,t+o+2,s-r/2.2)),this.subscript&&(e.setFont(this.font.family,this.font.size/1.3,this.font.weight),e.fillText(this.subscript,t+o+2,s+r/2.2-1)),this.restoreStyle(e)}}}class StaveText extends StaveModifier{static get CATEGORY(){return"stavetext"}constructor(e,t,s){super(),this.setAttribute("type","StaveText"),this.setWidth(16),this.text=e,this.position=t,this.options={shift_x:0,shift_y:0,justification:TextNote.Justification.CENTER},Vex.Merge(this.options,s),this.font={family:"times",size:16,weight:"normal"}}getCategory(){return StaveText.CATEGORY}setStaveText(e){return this.text=e,this}setShiftX(e){return this.shift_x=e,this}setShiftY(e){return this.shift_y=e,this}setFont(e){Vex.Merge(this.font,e)}setText(e){this.text=e}draw(e){const t=e.checkContext();this.setRendered(),t.save(),t.lineWidth=2,t.setFont(this.font.family,this.font.size,this.font.weight);const s=t.measureText(""+this.text).width;let r,o;const a=StaveModifier.Position,l=TextNote.Justification;switch(this.position){case a.LEFT:case a.RIGHT:o=(e.getYForLine(0)+e.getBottomLineY())/2+this.options.shift_y,this.position===a.LEFT?r=e.getX()-s-24+this.options.shift_x:r=e.getX()+e.getWidth()+24+this.options.shift_x;break;case a.ABOVE:case a.BELOW:r=e.getX()+this.options.shift_x,this.options.justification===l.CENTER?r+=e.getWidth()/2-s/2:this.options.justification===l.RIGHT&&(r+=e.getWidth()-s),this.position===a.ABOVE?o=e.getYForTopText(2)+this.options.shift_y:o=e.getYForBottomText(2)+this.options.shift_y;break;default:throw new Vex.RERR("InvalidPosition","Value Must be in Modifier.Position.")}return t.fillText(""+this.text,r,o+4),t.restore(),this}}function L$9(...i){Clef.DEBUG&&Vex.L("Vex.Flow.Clef",i)}class Clef extends StaveModifier{static get CATEGORY(){return"clefs"}static get types(){return{treble:{code:"v83",line:3},bass:{code:"v79",line:1},alto:{code:"vad",line:2},tenor:{code:"vad",line:1},percussion:{code:"v59",line:2},soprano:{code:"vad",line:4},"mezzo-soprano":{code:"vad",line:3},"baritone-c":{code:"vad",line:0},"baritone-f":{code:"v79",line:2},subbass:{code:"v79",line:0},french:{code:"v83",line:4},tab:{code:"v2f"}}}static get sizes(){return{default:{point:40,width:26},small:{point:32,width:20}}}static get annotations(){return{"8va":{code:"v8",sizes:{default:{point:20,attachments:{treble:{line:-1.2,x_shift:11}}},small:{point:18,attachments:{treble:{line:-.4,x_shift:8}}}}},"8vb":{code:"v8",sizes:{default:{point:20,attachments:{treble:{line:6.3,x_shift:10},bass:{line:4,x_shift:1}}},small:{point:18,attachments:{treble:{line:5.8,x_shift:6},bass:{line:3.5,x_shift:.5}}}}}}}constructor(e,t,s){super(),this.setAttribute("type","Clef"),this.setPosition(StaveModifier.Position.BEGIN),this.setType(e,t,s),this.setWidth(Clef.sizes[this.size].width),L$9("Creating clef:",e)}getCategory(){return Clef.CATEGORY}setType(e,t,s){if(this.type=e,this.clef=Clef.types[e],t===void 0?this.size="default":this.size=t,this.clef.point=Clef.sizes[this.size].point,this.glyph=new Glyph(this.clef.code,this.clef.point),s!==void 0){const r=Clef.annotations[s];this.annotation={code:r.code,point:r.sizes[this.size].point,line:r.sizes[this.size].attachments[this.type].line,x_shift:r.sizes[this.size].attachments[this.type].x_shift},this.attachment=new Glyph(this.annotation.code,this.annotation.point),this.attachment.metrics.x_max=0,this.attachment.setXShift(this.annotation.x_shift)}else this.annotation=void 0;return this}getWidth(){if(this.type==="tab"&&!this.stave)throw new Vex.RERR("ClefError","Can't get width without stave.");return this.width}setStave(e){if(this.stave=e,this.type!=="tab")return this;let t,s;const r=this.stave.getOptions().num_lines;switch(r){case 8:t=55,s=14;break;case 7:t=47,s=8;break;case 6:t=40,s=1;break;case 5:t=30,s=-6;break;case 4:t=23,s=-12;break;default:throw new Vex.RERR("ClefError",`Invalid number of lines: ${r}`)}return this.glyph.setPoint(t),this.glyph.setYShift(s),this}draw(){if(!this.x)throw new Vex.RERR("ClefError","Can't draw clef without x.");if(!this.stave)throw new Vex.RERR("ClefError","Can't draw clef without stave.");this.setRendered(),this.glyph.setStave(this.stave),this.glyph.setContext(this.stave.context),this.clef.line!==void 0&&this.placeGlyphOnLine(this.glyph,this.stave,this.clef.line),this.stave.context.openGroup("clef"),this.glyph.renderToStave(this.x),this.annotation!==void 0&&(this.placeGlyphOnLine(this.attachment,this.stave,this.annotation.line),this.attachment.setStave(this.stave),this.attachment.setContext(this.stave.context),this.attachment.renderToStave(this.x)),this.stave.context.closeGroup()}}class KeySignature extends StaveModifier{static get CATEGORY(){return"keysignatures"}static get accidentalSpacing(){return{"#":{above:6,below:4},b:{above:4,below:7},n:{above:4,below:1},"##":{above:6,below:4},bb:{above:4,below:7},db:{above:4,below:7},d:{above:4,below:7},bbs:{above:4,below:7},"++":{above:6,below:4},"+":{above:6,below:4},"+-":{above:6,below:4},"++-":{above:6,below:4},bs:{above:4,below:10},bss:{above:4,below:10}}}constructor(e,t,s){super(),this.setAttribute("type","KeySignature"),this.setKeySig(e,t,s),this.setPosition(StaveModifier.Position.BEGIN),this.glyphFontScale=38,this.glyphs=[],this.xPositions=[],this.paddingForced=!1,this.isDraw=!0}getCategory(){return KeySignature.CATEGORY}setDrawState(e){this.isDraw=e}convertToGlyph(e,t){const s=Flow.accidentalCodes(e.type),r=new Glyph(s.code,this.glyphFontScale);let o=1;if(e.type==="n"&&t){const c=KeySignature.accidentalSpacing[t.type];c&&(o=t.line>=e.line?c.above:c.below)}this.placeGlyphOnLine(r,this.stave,e.line),this.glyphs.push(r);const a=this.xPositions[this.xPositions.length-1],l=r.getMetrics().width+o;this.xPositions.push(a+l),this.width+=l}cancelKey(e){return this.formatted=!1,this.cancelKeySpec=e,this}convertToCancelAccList(e){const t=Flow.keySignature(e),s=this.accList.length>0&&t.length>0&&t[0].type!==this.accList[0].type,r=s?t.length:t.length-this.accList.length;if(r<1)return;const o=[];for(let a=0;a<r;a++){let l=a;s||(l=t.length-r+a);const c=t[l];o.push({type:"n",line:c.line})}return this.accList=o.concat(this.accList),{accList:o,type:t[0].type}}addToStave(e){return this.paddingForced=!0,e.addModifier(this),this}convertAccLines(e,t,s=this.accList){let r=0,o;switch(e){case"soprano":t==="#"?o=[2.5,.5,2,0,1.5,-.5,1]:r=-1;break;case"mezzo-soprano":t==="b"?o=[0,2,.5,2.5,1,3,1.5]:r=1.5;break;case"alto":r=.5;break;case"tenor":t==="#"?o=[3,1,2.5,.5,2,0,1.5]:r=-.5;break;case"baritone-f":case"baritone-c":t==="b"?o=[.5,2.5,1,3,1.5,3.5,2]:r=2;break;case"bass":case"french":r=1;break}let a;if(typeof o<"u")for(a=0;a<s.length;++a)s[a].line=o[a];else if(r!==0)for(a=0;a<s.length;++a)s[a].line+=r}getPadding(e){return this.formatted||this.format(),this.glyphs.length===0||!this.paddingForced&&e<2?0:this.padding}getWidth(){return this.formatted||this.format(),this.width}setKeySig(e,t,s){return this.formatted=!1,this.keySpec=e,this.cancelKeySpec=t,this.alterKeySpec=s,this}alterKey(e){return this.formatted=!1,this.alterKeySpec=e,this}convertToAlterAccList(e){const t=Math.min(e.length,this.accList.length);for(let s=0;s<t;++s)e[s]&&(this.accList[s].type=e[s])}format(){if(!this.stave)throw new Vex.RERR("KeySignatureError","Can't draw key signature without stave.");this.width=0,this.glyphs=[],this.xPositions=[0],this.accList=Flow.keySignature(this.keySpec);const e=this.accList,t=e.length>0?e[0].type:null;let s;if(this.cancelKeySpec&&(s=this.convertToCancelAccList(this.cancelKeySpec)),this.alterKeySpec&&this.convertToAlterAccList(this.alterKeySpec),this.accList.length>0){const r=(this.position===StaveModifier.Position.END?this.stave.endClef:this.stave.clef)||this.stave.clef;s&&this.convertAccLines(r,s.type,s.accList),this.convertAccLines(r,t,e);for(let o=0;o<this.accList.length;++o)this.convertToGlyph(this.accList[o],this.accList[o+1])}this.formatted=!0}draw(){if(!this.x)throw new Vex.RERR("KeySignatureError","Can't draw key signature without x.");if(!this.stave)throw new Vex.RERR("KeySignatureError","Can't draw key signature without stave.");if(this.formatted||this.format(),this.setRendered(),!!this.isDraw&&this.glyphs.length>0){this.stave.context.openGroup("keysignature");for(let e=0;e<this.glyphs.length;e++){const t=this.glyphs[e],s=this.x+this.xPositions[e];t.setStave(this.stave),t.setContext(this.stave.context),t.renderToStave(s)}this.stave.context.closeGroup()}}}const assertIsValidFraction=i=>{const e=i.split("/").filter(t=>t!=="");if(e.length!==2)throw new Vex.RERR("BadTimeSignature",`Invalid time spec: ${i}. Must be in the form "<numerator>/<denominator>"`);e.forEach(t=>{if(isNaN(Number(t)))throw new Vex.RERR("BadTimeSignature",`Invalid time spec: ${i}. Must contain two valid numbers.`)})};class TimeSignature extends StaveModifier{static get CATEGORY(){return"timesignatures"}static get glyphs(){return{C:{code:"v41",point:40,line:2},"C|":{code:"vb6",point:40,line:2}}}constructor(e=null,t=15,s=!0){if(super(),this.setAttribute("type","TimeSignature"),this.validate_args=s,e===null)return;const r=t;this.point=40,this.topLine=2,this.bottomLine=4,this.setPosition(StaveModifier.Position.BEGIN),this.setTimeSig(e),this.setWidth(this.timeSig.glyph.getMetrics().width),this.setPadding(r)}getCategory(){return TimeSignature.CATEGORY}parseTimeSpec(e){if(e==="C"||e==="C|"){const{line:r,code:o,point:a}=TimeSignature.glyphs[e];return{line:r,num:!1,glyph:new Glyph(o,a)}}this.validate_args&&assertIsValidFraction(e);const[t,s]=e.split("/").map(r=>r.split(""));return{num:!0,glyph:this.makeTimeSignatureGlyph(t,s)}}makeTimeSignatureGlyph(e,t){const s=new Glyph("v0",this.point);s.topGlyphs=[],s.botGlyphs=[];let r=0;for(let u=0;u<e.length;++u){const g=e[u],b=new Glyph("v"+g,this.point);s.topGlyphs.push(b),r+=b.getMetrics().width}let o=0;for(let u=0;u<t.length;++u){const g=t[u],b=new Glyph("v"+g,this.point);s.botGlyphs.push(b),o+=b.getMetrics().width}const a=r>o?r:o,l=s.getMetrics().x_min;s.getMetrics=()=>({x_min:l,x_max:l+a,width:a});const c=(a-r)/2,d=(a-o)/2,m=this;return s.renderToStave=function(g){let b=g+c;for(let y=0;y<this.topGlyphs.length;++y){const S=this.topGlyphs[y];Glyph.renderOutline(this.context,S.metrics.outline,S.scale,b+S.x_shift,this.stave.getYForLine(m.topLine)),b+=S.getMetrics().width}b=g+d;for(let y=0;y<this.botGlyphs.length;++y){const S=this.botGlyphs[y];m.placeGlyphOnLine(S,this.stave,S.line),Glyph.renderOutline(this.context,S.metrics.outline,S.scale,b+S.x_shift,this.stave.getYForLine(m.bottomLine)),b+=S.getMetrics().width}},s}getTimeSig(){return this.timeSig}setTimeSig(e){return this.timeSig=this.parseTimeSpec(e),this}draw(){if(!this.x)throw new Vex.RERR("TimeSignatureError","Can't draw time signature without x.");if(!this.stave)throw new Vex.RERR("TimeSignatureError","Can't draw time signature without stave.");this.setRendered(),this.timeSig.glyph.setStave(this.stave),this.timeSig.glyph.setContext(this.stave.context),this.placeGlyphOnLine(this.timeSig.glyph,this.stave,this.timeSig.line),this.timeSig.glyph.renderToStave(this.x)}}class Volta extends StaveModifier{static get CATEGORY(){return"voltas"}static get type(){return{NONE:1,BEGIN:2,MID:3,END:4,BEGIN_END:5}}constructor(e,t,s,r){super(),this.setAttribute("type","Volta"),this.volta=e,this.x=s,this.y_shift=r,this.number=t,this.font={family:"sans-serif",size:9,weight:"bold"}}getCategory(){return Volta.CATEGORY}setShiftY(e){return this.y_shift=e,this}draw(e,t){const s=e.checkContext();this.setRendered();let r=e.width-t;const o=e.getYForTopText(e.options.num_lines)+this.y_shift,a=1.5*e.options.spacing_between_lines_px;switch(this.volta){case Volta.type.BEGIN:s.fillRect(this.x+t,o,1,a);break;case Volta.type.END:r-=5,s.fillRect(this.x+t+r,o,1,a);break;case Volta.type.BEGIN_END:r-=3,s.fillRect(this.x+t,o,1,a),s.fillRect(this.x+t+r,o,1,a);break}return(this.volta===Volta.type.BEGIN||this.volta===Volta.type.BEGIN_END)&&(s.save(),s.setFont(this.font.family,this.font.size,this.font.weight),s.fillText(this.number,this.x+t+5,o+15),s.restore()),s.fillRect(this.x+t,o,r,1),this}}let _keySignature="",volta={};const voltaMeasureNumber={};class Stave extends Element$1{static saxophoneMap(e){const t={C:"bE","#C":"E","C#":"E",Db:"E",D:"F",Eb:"bG",E:"G",F:"bA","#F":"A","F#":"A",Gb:"A",G:"bB",Ab:"B",A:"C",Bb:"bD",B:"D"};return t[e]?t[e]:e}constructor(e,t,s,r){super(),this.setAttribute("type","Stave"),this.x=e,this.y=t,this.width=s,this.formatted=!1,this.setStartX(e+5),this.end_x=e+s,this.staveTempos=[],this.modifiers=[],this.measure=0,this.clef="treble",this.endClef=void 0,this.font={family:"sans-serif",size:8,weight:""},this.timeSignature={numerator:"",denominator:""},this.options={vertical_bar_width:10,glyph_spacing_px:10,num_lines:5,fill_style:"#999999",left_bar:!1,right_bar:!0,spacing_between_lines_px:10,space_above_staff_ln:4,space_below_staff_ln:4,top_text_position:1,DYMusicScoreType:"",keySignature:""},this.bounds={x:this.x,y:this.y,w:this.width,h:0},Vex.Merge(this.options,r),this.resetLines();const o=Barline.type;this.addModifier(new Barline(this.options.left_bar?o.SINGLE:o.NONE)),this.addEndModifier(new Barline(this.options.right_bar?o.SINGLE:o.NONE))}space(e){return this.options.spacing_between_lines_px*e}resetLines(){this.options.line_config=[];for(let e=0;e<this.options.num_lines;e++)this.options.line_config.push({visible:!0});this.height=(this.options.num_lines+this.options.space_above_staff_ln)*this.options.spacing_between_lines_px,this.options.bottom_text_position=this.options.num_lines}getLines(){return this.options.line_config.map(t=>t.visible).filter(Boolean).length}getOptions(){return this.options}setNoteStartX(e){this.formatted||this.format(),this.setStartX(e);const t=this.modifiers[0];return t.setX(this.start_x-t.getWidth()),this}setStartX(e){this.start_x=e}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(e){return this.options.num_lines=parseInt(e,10),this.resetLines(),this}setY(e){return this.y=e,this}getTopLineTopY(){return this.getYForLine(0)-Flow.STAVE_LINE_THICKNESS/2}getBottomLineBottomY(){return this.getLines()===2?this.getYForLine(6)+Flow.STAVE_LINE_THICKNESS/2:this.getYForLine(this.getNumLines()-1)+Flow.STAVE_LINE_THICKNESS/2}setX(e){const t=e-this.x;this.formatted=!1,this.x=e,this.start_x+=t,this.end_x+=t;for(let s=0;s<this.modifiers.length;s++){const r=this.modifiers[s];r.x!==void 0&&(r.x+=t)}return this}setWidth(e){return this.formatted=!1,this.width=e,this.end_x=this.x+e,this}getWidth(){return this.width}getStyle(){return{fillStyle:this.options.fill_style,strokeStyle:this.options.fill_style,lineWidth:Flow.STAVE_LINE_THICKNESS,...this.style||{}}}setMeasure(e){return this.measure=e,this}getModifierXShift(e=0){if(typeof e!="number")throw new Vex.RERR("InvalidIndex","Must be of number type");if(this.formatted||this.format(),this.getModifiers(StaveModifier.Position.BEGIN).length===1)return 0;let t=this.start_x-this.x;const s=this.modifiers[0];return s.getType()===Barline.type.REPEAT_BEGIN&&t>s.getWidth()&&(t-=s.getWidth()),t}setRepetitionTypeLeft(e,t){return this.modifiers.push(new Repetition$1(e,this.x,t)),this}setRepetitionTypeRight(e,t){return this.modifiers.push(new Repetition$1(e,this.x,t)),this}setVoltaType(e,t,s){if(e===2)volta.type===2&&volta.stave.modifiers.push(new Volta(volta.type,volta.number_t,volta.x,volta.y)),volta={stave:this,type:e,number_t:t,MeasureNumber:this.MeasureNumber,y:s,x:this.x};else if(e===4){let r=this.MeasureNumber-volta.MeasureNumber,o=Math.max(volta.y,s);for(let a=0;a<=r;a++)voltaMeasureNumber[volta.MeasureNumber+a]={type:a===0?2:a===r?4:0,number_t:t,y:o};volta={}}else this.modifiers.push(new Volta(e,t,this.x,s));return this}drawVolta(){let e=voltaMeasureNumber[this.MeasureNumber];e&&(this.modifiers.push(new Volta(e.type,e.number_t,this.x,e.y)),delete voltaMeasureNumber[this.MeasureNumber]),volta.type&&volta.MeasureNumber==this.MeasureNumber&&(this.modifiers.push(new Volta(volta.type,volta.number_t,this.x,volta.y)),volta={})}setSection(e,t,s=0,r=12){const o=new StaveSection(e,this.x+s,t);return o.font.size=r,this.modifiers.push(o),this}setTempo(e,t){return this.modifiers.push(new StaveTempo(e,this.x,t)),this}setText(e,t,s){let r=new StaveText(e,t,s);return r.setFont({family:"Arial",size:14,weight:"normal"}),this.modifiers.push(r),this}getHeight(){return this.height}getSpacingBetweenLines(){return this.options.spacing_between_lines_px}getBoundingBox(){return new BoundingBox(this.x,this.y,this.width,this.getBottomY()-this.y)}getBottomY(){const e=this.options,t=e.spacing_between_lines_px;return this.getYForLine(e.num_lines)+e.space_below_staff_ln*t}getBottomLineY(){return this.getYForLine(this.options.num_lines)}getYForLine(e){const t=this.options,s=t.spacing_between_lines_px,r=t.space_above_staff_ln;return this.y+e*s+r*s}getLineForY(e){const t=this.options,s=t.spacing_between_lines_px,r=t.space_above_staff_ln;return(e-this.y)/s-r}getYForTopText(e){const t=e||0;return this.getYForLine(-t-this.options.top_text_position)}getYForBottomText(e){const t=e||0;return this.getYForLine(this.options.bottom_text_position+t)}getYForNote(e){const t=this.options,s=t.spacing_between_lines_px,r=t.space_above_staff_ln;return this.y+r*s+5*s-e*s}getYForGlyphs(){return this.getYForLine(3)}addModifier(e,t,s){return t!==void 0&&e.setPosition(t),s&&(this.timeSignature.numerator=s.numerator,this.timeSignature.denominator=s.denominator),e.setStave(this),this.formatted=!1,this.modifiers.push(e),this}addEndModifier(e){return this.addModifier(e,StaveModifier.Position.END),this}setBegBarType(e){const{SINGLE:t,REPEAT_BEGIN:s,NONE:r}=Barline.type;return(e===t||e===s||e===r)&&(this.modifiers[0].setType(e),this.formatted=!1),this}setEndBarType(e){return e!==Barline.type.REPEAT_BEGIN&&(this.modifiers[1].setType(e),this.formatted=!1),this}setClef(e,t,s,r){r===void 0&&(r=StaveModifier.Position.BEGIN),r===StaveModifier.Position.END?this.endClef=e:this.clef=e;const o=this.getModifiers(r,Clef.CATEGORY);return o.length===0?this.addClef(e,t,s,r):o[0].setType(e,t,s),this}setEndClef(e,t,s){return this.setClef(e,t,s,StaveModifier.Position.END),this}setKeySignature(e,t,s){this.options.keySignature=e,s===void 0&&(s=StaveModifier.Position.BEGIN);const r=this.getModifiers(s,KeySignature.CATEGORY);return r.length===0?this.options.DYMusicScoreType!=="jianpu"&&this.addKeySignature(e,t,s):r[0].setKeySig(e,t),this}setEndKeySignature(e,t){return this.setKeySignature(e,t,StaveModifier.Position.END),this}setTimeSignature(e,t,s){s===void 0&&(s=StaveModifier.Position.BEGIN);const r=this.getModifiers(s,TimeSignature.CATEGORY);return r.length===0?this.addTimeSignature(e,t,s):r[0].setTimeSig(e),this}setEndTimeSignature(e,t){return this.setTimeSignature(e,t,StaveModifier.Position.END),this}addKeySignature(e,t,s){return s===void 0&&(s=StaveModifier.Position.BEGIN),this.addModifier(new KeySignature(e,t).setPosition(s),s),this}addClef(e,t,s,r){return r===void 0||r===StaveModifier.Position.BEGIN?this.clef=e:r===StaveModifier.Position.END&&(this.endClef=e),this.addModifier(new Clef(e,t,s),r),this}addEndClef(e,t,s){return this.addClef(e,t,s,StaveModifier.Position.END),this}addTimeSignature(e,t,s){return this.addModifier(new TimeSignature(e,t),s),this}addEndTimeSignature(e,t){return this.addTimeSignature(e,t,StaveModifier.Position.END),this}addTrebleGlyph(){return this.addClef("treble"),this}getModifiers(e,t){return e===void 0&&t===void 0?this.modifiers:this.modifiers.filter(s=>(e===void 0||e===s.getPosition())&&(t===void 0||t===s.getCategory()))}sortByCategory(e,t){for(let s=e.length-1;s>=0;s--)for(let r=0;r<s;r++)if(t[e[r].getCategory()]>t[e[r+1].getCategory()]){const o=e[r];e[r]=e[r+1],e[r+1]=o}}format(){const e=this.modifiers[0],t=this.modifiers[1],s=this.getModifiers(StaveModifier.Position.BEGIN),r=this.getModifiers(StaveModifier.Position.END);this.sortByCategory(s,{barlines:0,clefs:1,keysignatures:2,timesignatures:3}),this.sortByCategory(r,{timesignatures:0,keysignatures:1,barlines:2,clefs:3}),s.length>1&&e.getType()===Barline.type.REPEAT_BEGIN&&(s.push(s.splice(0,1)[0]),s.splice(0,0,new Barline(Barline.type.SINGLE))),r.indexOf(t)>0&&r.splice(0,0,new Barline(Barline.type.NONE));let o,a,l,c=0,d=this.x;for(let g=0;g<s.length;g++)l=s[g],a=l.getPadding(g+c),o=l.getWidth(),isNaN(o)&&(l.setWidth(10),o=10),d+=a,l.setX(d),d+=o,a+o===0&&c--;this.setStartX(d),d=this.x+this.width;const m={left:0,right:0,paddingRight:0,paddingLeft:0};let u=0;for(let g=0;g<r.length;g++){l=r[g],u=l.getCategory()==="barlines"?g:u,m.right=0,m.left=0,m.paddingRight=0,m.paddingLeft=0;const b=l.getLayoutMetrics();b?(g!==0&&(m.right=b.xMax||0,m.paddingRight=b.paddingRight||0),m.left=-b.xMin||0,m.paddingLeft=b.paddingLeft||0,g===r.length-1&&(m.paddingLeft=0)):(m.paddingRight=l.getPadding(g-u)||0,g!==0&&(m.right=l.getWidth()||0),g===0&&(m.left=l.getWidth()||0)),d-=m.paddingRight,d-=m.right,l.setX(d),d-=m.left,d-=m.paddingLeft}this.end_x=r.length===1?this.x+this.width:d,this.formatted=!0}draw(){this.checkContext(),this.setRendered(),this.formatted||this.format();const e=this.options.num_lines,t=this.width,s=this.x;let r;const o=this.getLines();if(o===2||o===3){const a=o===2?[2,4]:[0,2,4];this.options.line_config.forEach((l,c)=>{a.includes(c)?l.visible=!0:l.visible=!1})}for(let a=0;a<e;a++)r=this.getYForLine(a),this.options.DYMusicScoreType==="jianpu"?this.applyStyle(this.context,{strokeStyle:"transparent"}):this.applyStyle(),this.options.line_config[a].visible&&(this.context.beginPath(),this.context.moveTo(s,r),this.context.lineTo(s+t,r),this.context.stroke()),this.restoreStyle();this.drawVolta(),this.options.DYMusicScoreType==="jianpu"&&this.drawJianpuKey();for(let a=0;a<this.modifiers.length;a++){if(this.options.DYMusicScoreType==="jianpu"){let c=this.modifiers[a].attrs.type;if(["StaveTempo","TimeSignature"].includes(c))continue}if(this.modifiers[a].attrs.type==="StaveTempo"){this.staveTempos.push(this.modifiers[a]);continue}o===2&&(this.modifiers[a].attrs.type==="Clef"&&(this.modifiers[a].clef.line=3),this.modifiers[a].attrs.type==="TimeSignature"&&(this.modifiers[a].bottomLine=5,this.modifiers[a].topLine=3)),o===4&&this.modifiers[a].attrs.type==="Clef"&&(this.modifiers[a].clef.line=1.5);let l=!1;["StaveSection","Repetition","Volta"].includes(this.modifiers[a].attrs.type)&&(l=!0,this.context.openGroup(this.modifiers[a].attrs.type)),typeof this.modifiers[a].draw=="function"&&(this.modifiers[a].applyStyle(this.context),this.modifiers[a].draw(this,this.getModifierXShift(a)),this.modifiers[a].restoreStyle(this.context)),l&&this.context.closeGroup()}if(setTimeout(()=>this.drawStaveTempo()),this.measure>0){this.context.save(),this.context.setFont(this.font.family,this.font.size,this.font.weight);const a=this.context.measureText(""+this.measure).width;r=this.getYForTopText(0)+3,this.context.fillText(""+this.measure,this.x-a/2,r),this.context.restore()}return this}drawStaveTempo(){if(!this.staveTempos.length)return;const e=document.querySelector(`#${this.attrs.id}`);if(!e)return;const t=e.parentElement.getBBox(),s=this.getYForLine(0),r=e.parentElement.parentElement.querySelectorAll(".vf-curve");if(r.length){const o=this.x+this.staveTempos[0].shift_x+this.getModifierXShift(0),a=this.getYForTopText(1)+t.y-s+5;r.forEach(l=>{const c=l.getBBox();c.x-10<o&&c.x+c.width>o&&c.y-10<a&&c.y+c.height>a&&(t.y=c.y+5)})}for(let o=0;o<this.staveTempos.length;o++)this.staveTempos[o].shift_y=t.y-s+5,this.staveTempos[o].applyStyle(this.context),this.staveTempos[o].draw(this,this.getModifierXShift(o)),this.staveTempos[o].restoreStyle(this.context);this.staveTempos=[]}drawJianpuKey(){if(this.options.keySignature){let e=this.options.keySignature;window.DYSubjectId===6&&(e=Stave.saxophoneMap(e)),window&&window.sett&&window.sett.keySignature&&(e="C"),this.MeasureNumber<2?this.setText(`1=${e}`,1,{justification:1,shift_x:50,shift_y:-75}):this.options.keySignature!=_keySignature&&this.setText(`1=${e}`,1,{justification:1,shift_x:50,shift_y:-50}),_keySignature=this.options.keySignature}if(this.MeasureNumber>=0&&this.timeSignature.numerator){let e=40,t=0;this.MeasureNumber<2&&(e=70,t=-72),this.setText(`${this.timeSignature.numerator}`,1,{justification:1,shift_x:e,shift_y:t-13}),this.setText("ᅳ",1,{justification:1,shift_x:e+3,shift_y:t-2}),this.setText(`${this.timeSignature.denominator}`,1,{justification:1,shift_x:e,shift_y:t+8})}}drawVertical(e,t){this.drawVerticalFixed(this.x+e,t)}drawVerticalFixed(e,t){this.checkContext();const s=this.getYForLine(0),r=this.getYForLine(this.options.num_lines-1);t&&this.context.fillRect(e-3,s,1,r-s+1),this.context.fillRect(e,s,1,r-s+1)}drawVerticalBar(e){this.drawVerticalBarFixed(this.x+e,!1)}drawVerticalBarFixed(e){this.checkContext();const t=this.getYForLine(0),s=this.getYForLine(this.options.num_lines-1);this.context.fillRect(e,t,1,s-t+1)}getConfigForLines(){return this.options.line_config}setConfigForLine(e,t){if(e>=this.options.num_lines||e<0)throw new Vex.RERR("StaveConfigError","The line number must be within the range of the number of lines in the Stave.");if(t.visible===void 0)throw new Vex.RERR("StaveConfigError","The line configuration object is missing the 'visible' property.");if(typeof t.visible!="boolean")throw new Vex.RERR("StaveConfigError","The line configuration objects 'visible' property must be true or false.");return this.options.line_config[e]=t,this}setConfigForLines(e){if(e.length!==this.options.num_lines)throw new Vex.RERR("StaveConfigError","The length of the lines configuration array must match the number of lines in the Stave");for(const t in e)e[t]||(e[t]=this.options.line_config[t]),Vex.Merge(this.options.line_config[t],e[t]);return this.options.line_config=e,this}}class TabStave extends Stave{constructor(e,t,s,r){const o={spacing_between_lines_px:13,num_lines:6,top_text_position:1};Vex.Merge(o,r),super(e,t,s,o),this.setAttribute("type","TabStave")}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef("tab"),this}}function getUnusedStringGroups(i,e){const t=[];let s=[];for(let r=1;r<=i;r++)e.indexOf(r)>-1?(t.push(s),s=[]):s.push(r);return s.length>0&&t.push(s),t}function getPartialStemLines(i,e,t,s){const r=s!==1,o=s!==-1,a=t.getSpacingBetweenLines(),l=t.getNumLines(),c=[];return e.forEach(d=>{const m=d.indexOf(l)>-1,u=d.indexOf(1)>-1;if(r&&u||o&&m)return;d.length===1&&d.push(d[0]);const g=[];d.forEach((b,y,S)=>{const v=b===1,x=b===l;let A=t.getYForLine(b-1);y===0&&!v?A-=a/2-1:y===S.length-1&&!x&&(A+=a/2-1),g.push(A),s===1&&v?g.push(i-2):s===-1&&x&&g.push(i+2)}),c.push(g.sort((b,y)=>b-y))}),c}let TabNote$1=class ui extends StemmableNote{static get CATEGORY(){return"tabnotes"}constructor(e,t){if(super(e),this.setAttribute("type","TabNote"),this.ghost=!1,this.positions=e.positions,Vex.Merge(this.render_options,{glyph_font_scale:Flow.DEFAULT_TABLATURE_FONT_SCALE,draw_stem:t,draw_dots:t,draw_stem_through_stave:!1,y_shift:0,scale:1,font:"10pt Arial"}),this.glyph=Flow.getGlyphProps(this.duration,this.noteType),!this.glyph)throw new Vex.RuntimeError("BadArguments",`Invalid note initialization data (No glyph found): ${JSON.stringify(e)}`);this.buildStem(),e.stem_direction?this.setStemDirection(e.stem_direction):this.setStemDirection(Stem.UP),this.ghost=!1,this.updateWidth()}reset(){this.stave&&this.setStave(this.stave)}getCategory(){return ui.CATEGORY}setGhost(e){return this.ghost=e,this.updateWidth(),this}hasStem(){return this.render_options.draw_stem}getStemExtension(){const e=this.getGlyph();return this.stem_extension_override!=null?this.stem_extension_override:e?this.getStemDirection()===1?e.tabnote_stem_up_extension:e.tabnote_stem_down_extension:0}addDot(){const e=new Dot;return this.dots+=1,this.addModifier(e,0)}updateWidth(){this.glyphs=[],this.width=0;for(let e=0;e<this.positions.length;++e){let t=this.positions[e].fret;this.ghost&&(t="("+t+")");const s=Flow.tabToGlyph(t,this.render_options.scale);this.glyphs.push(s),this.width=Math.max(s.getWidth(),this.width)}this.glyph.getWidth=()=>this.width}setStave(e){super.setStave(e),this.context=e.context;let t;if(this.context){const r=this.context;for(this.width=0,t=0;t<this.glyphs.length;++t){const o=this.glyphs[t],a=""+o.text;a.toUpperCase()!=="X"&&(r.save(),r.setRawFont(this.render_options.font),o.width=r.measureText(a).width,r.restore(),o.getWidth=()=>o.width),this.width=Math.max(o.getWidth(),this.width)}this.glyph.getWidth=()=>this.width}const s=this.positions.map(({str:r})=>e.getYForLine(r-1));return this.setYs(s),this.stem&&this.stem.setYBounds(this.getStemY(),this.getStemY()),this}getPositions(){return this.positions}addToModifierContext(e){this.setModifierContext(e);for(let t=0;t<this.modifiers.length;++t)this.modifierContext.addModifier(this.modifiers[t]);return this.modifierContext.addModifier(this),this.preFormatted=!1,this}getTieRightX(){let e=this.getAbsoluteX();const t=this.glyph.getWidth();return e+=t/2,e+=-this.width/2+this.width+2,e}getTieLeftX(){let e=this.getAbsoluteX();const t=this.glyph.getWidth();return e+=t/2,e-=this.width/2+2,e}getModifierStartXY(e,t){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call GetModifierStartXY on an unformatted note");if(this.ys.length===0)throw new Vex.RERR("NoYValues","No Y-Values calculated for this note.");let s=0;return e===Modifier.Position.LEFT?s=-1*2:e===Modifier.Position.RIGHT?s=this.width+2:(e===Modifier.Position.BELOW||e===Modifier.Position.ABOVE)&&(s=this.glyph.getWidth()/2),{x:this.getAbsoluteX()+s,y:this.ys[t]}}getLineForRest(){return this.positions[0].str}preFormat(){this.preFormatted||(this.modifierContext&&this.modifierContext.preFormat(),this.setPreFormatted(!0))}getStemX(){return this.getCenterGlyphX()}getStemY(){const e=this.stave.getNumLines(),t=-.5,s=e-.5,r=Stem.UP===this.stem_direction?t:s;return this.stave.getYForLine(r)}getStemExtents(){return this.stem.getExtents()}drawFlag(){const{beam:e,glyph:t,context:s,stem:r,stem_direction:o,render_options:{draw_stem:a,glyph_font_scale:l}}=this,c=e==null&&a;if(t.flag&&c){const d=this.getStemX()+1,m=this.getStemY()-r.getHeight(),u=o===Stem.DOWN?t.code_flag_downstem:t.code_flag_upstem;Glyph.renderGlyph(s,d,m,l,u)}}drawModifiers(){this.modifiers.forEach(e=>{e.getCategory()==="dots"&&!this.render_options.draw_dots||(e.setContext(this.context),e.drawWithStyle())})}drawStemThrough(){const e=this.getStemX(),t=this.getStemY(),s=this.context,r=this.render_options.draw_stem_through_stave;if(this.render_options.draw_stem&&r){const a=this.stave.getNumLines(),l=this.positions.map(m=>m.str),c=getUnusedStringGroups(a,l),d=getPartialStemLines(t,c,this.getStave(),this.getStemDirection());s.save(),s.setLineWidth(Stem.WIDTH),d.forEach(m=>{m.length!==0&&(s.beginPath(),s.moveTo(e,m[0]),s.lineTo(e,m[m.length-1]),s.stroke(),s.closePath())}),s.restore()}}drawPositions(){const e=this.context,t=this.getAbsoluteX(),s=this.ys;for(let r=0;r<this.positions.length;++r){const o=s[r]+this.render_options.y_shift,a=this.glyphs[r],l=this.glyph.getWidth(),c=t+l/2-a.getWidth()/2;if(e.clearRect(c-2,o-3,a.getWidth()+4,6),a.code)Glyph.renderGlyph(e,c,o,this.render_options.glyph_font_scale*this.render_options.scale,a.code);else{e.save(),e.setRawFont(this.render_options.font);const d=a.text.toString();e.fillText(d,c,o+5*this.render_options.scale),e.restore()}}}draw(){if(this.checkContext(),!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");if(this.ys.length===0)throw new Vex.RERR("NoYValues","Can't draw note without Y values.");this.setRendered();const e=this.beam==null&&this.render_options.draw_stem;this.setAttribute("el",this.context.openGroup("tabnote",this.getAttribute("id"),{pointerBBox:!0})),this.drawPositions(),this.drawStemThrough();const t=this.getStemX();this.stem.setNoteHeadXBounds(t,t),e&&(this.context.openGroup("stem",null,{pointerBBox:!0}),this.stem.setContext(this.context).draw(),this.context.closeGroup()),this.drawFlag(),this.drawModifiers(),this.context.closeGroup()}};function L$8(...i){VibratoBracket.DEBUG&&Vex.L("Vex.Flow.VibratoBracket",i)}class VibratoBracket extends Element$1{constructor(e){super(),this.setAttribute("type","VibratoBracket"),this.start=e.start,this.stop=e.stop,this.toEndOfStopStave=e.toEndOfStopStave,this.line=1,this.render_options={harsh:!1,wave_height:6,wave_width:4,wave_girth:2}}setLine(e){return this.line=e,this}setHarsh(e){return this.render_options.harsh=e,this}draw(){const e=this.context;this.setRendered();const t=this.start?this.start.getStave().getYForTopText(this.line):this.stop.getStave().getYForTopText(this.line);let s=0;if(this.start){let o=0;for(const a of this.start.modifiers)if(a&&a.type==="tr"){o=a.glyph.bbox.w;break}s=this.start.getNoteHeadBeginX?this.start.getNoteHeadBeginX():this.start.getAbsoluteX(),s+=o}else s=this.stop.getStave().getTieStartX();let r=0;this.stop?r=this.toEndOfStopStave?this.stop.getStave().getTieEndX()-10:this.stop.getAbsoluteX()+this.stop.getWidth():r=this.start.getStave().getTieEndX()-10,this.render_options.vibrato_width=r-s,L$8("Rendering VibratoBracket: start_x:",s,"stop_x:",r,"y:",t),Vibrato.renderVibrato(e,s,t,this.render_options)}}let semibrave_rest;function get_semibrave_rest(){if(!semibrave_rest){const i=new NoteHead({duration:"w",note_type:"r"});semibrave_rest={glyph_font_scale:i.render_options.glyph_font_scale,glyph_code:i.glyph_code,width:i.getWidth()}}return semibrave_rest}class MultiMeasureRest extends Element$1{constructor(e,t){super(),this.setAttribute("type","MultiMeasureRest"),this.render_options={show_number:!0,number_line:-.5,number_glyph_point:40,padding_left:void 0,padding_right:void 0,line:2,spacing_between_lines_px:10,line_thickness:void 0,serif_thickness:2,use_symbols:!1,symbol_spacing:void 0,semibrave_rest_glyph_scale:Flow.DEFAULT_NOTATION_FONT_SCALE},Vex.Merge(this.render_options,t),this.number_of_measures=e,this.xs={left:NaN,right:NaN}}getXs(){return this.xs}setStave(e){return this.stave=e,this}getStave(){return this.stave}drawLine(e,t,s,r){const o=this.stave.getYForLine(this.render_options.line),a=(s-t)*.1;t+=a,s-=a;const l={thickness:this.render_options.serif_thickness,height:r};let c=r*.25;isNaN(this.render_options.line_thickness)||(c=this.render_options.line_thickness*.5),e.save(),e.beginPath(),e.moveTo(t,o-r),e.lineTo(t+l.thickness,o-r),e.lineTo(t+l.thickness,o-c),e.lineTo(s-l.thickness,o-c),e.lineTo(s-l.thickness,o-r),e.lineTo(s,o-r),e.lineTo(s,o+r),e.lineTo(s-l.thickness,o+r),e.lineTo(s-l.thickness,o+c),e.lineTo(t+l.thickness,o+c),e.lineTo(t+l.thickness,o+r),e.lineTo(t,o+r),e.closePath(),e.fill()}drawSymbols(e,t,s,r){const o=Math.floor(this.number_of_measures/4),a=this.number_of_measures%4,l=Math.floor(a/2),c=a%2,d=get_semibrave_rest(),m=d.width*(this.render_options.semibrave_rest_glyph_scale/d.glyph_font_scale),u={2:{width:m*.5,height:r},1:{width:m}};let g=m*1.35;isNaN(this.render_options.symbol_spacing)||(g=this.render_options.symbol_spacing);const b=o*u[2].width+l*u[2].width+c*u[1].width+(o+l+c-1)*g;let y=t+(s-t)*.5-b*.5;const S=this.stave.getYForLine(this.render_options.line-1),v=this.stave.getYForLine(this.render_options.line),x=this.stave.getYForLine(this.render_options.line+1);e.save(),e.setStrokeStyle("none"),e.setLineWidth(0);for(let A=0;A<o;++A)e.fillRect(y,v-u[2].height,u[2].width,u[2].height),e.fillRect(y,x-u[2].height,u[2].width,u[2].height),y+=u[2].width+g;for(let A=0;A<l;++A)e.fillRect(y,v-u[2].height,u[2].width,u[2].height),y+=u[2].width+g;for(let A=0;A<c;++A)Glyph.renderGlyph(e,y,S,this.render_options.semibrave_rest_glyph_scale,d.glyph_code),y+=u[1].width+g;e.restore()}draw(){this.checkContext(),this.setRendered();const e=this.context,t=this.stave,s=this.render_options.spacing_between_lines_px;let r=t.getNoteStartX(),o=t.getNoteEndX();const a=t.getModifiers(StaveModifier.Position.BEGIN);if(a.length===1&&a[0].getCategory()==="barlines"&&(r-=a[0].getWidth()),isNaN(this.render_options.padding_left)||(r=t.getX()+this.render_options.padding_left),isNaN(this.render_options.padding_right)||(o=t.getX()+t.getWidth()-this.render_options.padding_right),this.xs.left=r,this.xs.right=o,this.render_options.use_symbols?this.drawSymbols(e,r,o,s):this.drawLine(e,r,o,s),this.render_options.show_number){const l="/"+this.number_of_measures,c=new TimeSignature(null,void 0,!1);c.point=this.render_options.number_glyph_point,c.setTimeSig(l),c.setStave(t),c.x=r+(o-r)*.5-c.timeSig.glyph.getMetrics().width*.5,c.bottomLine=this.render_options.number_line,c.setContext(e).draw()}}}class ClefNote extends Note{static get CATEGORY(){return"clefnote"}constructor(e,t,s){super({duration:"b"}),this.setAttribute("type","ClefNote"),this.setType(e,t,s),this.ignore_ticks=!0}setType(e,t,s){return this.type=e,this.clef_obj=new Clef(e,t,s),this.clef=this.clef_obj.clef,this.glyph=new Glyph(this.clef.code,this.clef.point),this.setWidth(this.glyph.getMetrics().width),this}getClef(){return this.clef}setContext(e){return this.context=e,this.glyph.setContext(this.context),this}getBoundingBox(){return super.getBoundingBox()}addToModifierContext(){return this}getCategory(){return ClefNote.CATEGORY}preFormat(){return this.setPreFormatted(!0),this}draw(){if(!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");this.glyph.getContext()||this.glyph.setContext(this.context),this.setRendered();const e=this.getAbsoluteX();if(this.glyph.setStave(this.stave),this.glyph.setYShift(this.stave.getYForLine(this.clef.line)-this.stave.getYForGlyphs()),this.glyph.renderToStave(e),this.clef_obj.annotation!==void 0){const t=new Glyph(this.clef_obj.annotation.code,this.clef_obj.annotation.point);t.getContext()||t.setContext(this.context),t.setStave(this.stave),t.setYShift(this.stave.getYForLine(this.clef_obj.annotation.line)-this.stave.getYForGlyphs()),t.setXShift(this.clef_obj.annotation.x_shift),t.renderToStave(e)}}}class KeySigNote extends Note{constructor(e,t,s){super({duration:"b"}),this.setAttribute("type","KeySigNote"),this.keySignature=new KeySignature(e,t,s),this.ignore_ticks=!0}getBoundingBox(){return super.getBoundingBox()}addToModifierContext(){return this}preFormat(){return this.setPreFormatted(!0),this.keySignature.setStave(this.stave),this.keySignature.format(),this.setWidth(this.keySignature.width),this}draw(){this.stave.checkContext(),this.setRendered(),this.keySignature.x=this.getAbsoluteX(),this.keySignature.setContext(this.context),this.keySignature.draw()}}class TimeSigNote extends Note{constructor(e,t){super({duration:"b"}),this.setAttribute("type","TimeSigNote");const s=new TimeSignature(e,t);this.timeSig=s.getTimeSig(),this.setWidth(this.timeSig.glyph.getMetrics().width),this.ignore_ticks=!0}getBoundingBox(){return super.getBoundingBox()}addToModifierContext(){return this}preFormat(){return this.setPreFormatted(!0),this}draw(){this.stave.checkContext(),this.setRendered(),this.timeSig.glyph.getContext()||this.timeSig.glyph.setContext(this.context),this.timeSig.glyph.setStave(this.stave),this.timeSig.glyph.setYShift(this.stave.getYForLine(this.timeSig.line)-this.stave.getYForGlyphs()),this.timeSig.glyph.renderToStave(this.getAbsoluteX())}}class TabSlide extends TabTie{static get SLIDE_UP(){return 1}static get SLIDE_DOWN(){return-1}static createSlideUp(e){return new TabSlide(e,TabSlide.SLIDE_UP)}static createSlideDown(e){return new TabSlide(e,TabSlide.SLIDE_DOWN)}constructor(e,t){if(super(e,"sl."),this.setAttribute("type","TabSlide"),!t){const s=e.first_note.getPositions()[0].fret,r=e.last_note.getPositions()[0].fret;t=parseInt(s,10)>parseInt(r,10)?TabSlide.SLIDE_DOWN:TabSlide.SLIDE_UP}this.slide_direction=t,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(e)}renderTie(e){if(e.first_ys.length===0||e.last_ys.length===0)throw new Vex.RERR("BadArguments","No Y-values to render");const t=this.context,s=e.first_x_px,r=e.first_ys,o=e.last_x_px,a=this.slide_direction;if(a!==TabSlide.SLIDE_UP&&a!==TabSlide.SLIDE_DOWN)throw new Vex.RERR("BadSlide","Invalid slide direction");for(let l=0;l<this.first_indices.length;++l){const c=r[this.first_indices[l]]+this.render_options.y_shift;if(isNaN(c))throw new Vex.RERR("BadArguments","Bad indices for slide rendering.");t.beginPath(),t.moveTo(s,c+3*a),t.lineTo(o,c-3*a),t.closePath(),t.stroke()}this.setRendered()}}class GraceNote extends StaveNote{static get CATEGORY(){return"gracenotes"}static get LEDGER_LINE_OFFSET(){return 2}static get SCALE(){return .66}constructor(e){super(Object.assign(e,{glyph_font_scale:Flow.DEFAULT_NOTATION_FONT_SCALE*GraceNote.SCALE,stroke_px:GraceNote.LEDGER_LINE_OFFSET})),this.setAttribute("type","GraceNote"),this.slash=e.slash,this.slur=!0,this.buildNoteHeads(),this.width=3}getStemExtension(){if(this.stem_extension_override!=null)return this.stem_extension_override;const e=this.getGlyph();if(e){let t=super.getStemExtension();if(e.stem){const s=this.getStaveNoteScale();t=(Stem.HEIGHT+t)*s-Stem.HEIGHT}return t}return 0}getCategory(){return GraceNote.CATEGORY}getStaveNoteScale(){return this.render_options.glyph_font_scale/Flow.DEFAULT_NOTATION_FONT_SCALE}draw(){super.draw(),this.setRendered();const e=this.stem;if(this.slash&&e){const t=this.getStaveNoteScale(),s=t/.66;let r;const o=this.beam;if(o)o.postFormatted||o.postFormat(),r=this.calcBeamedNotesSlashBBox(8*s,8*s,{stem:6*s,beam:5*s});else{const l=this.getStemDirection(),c=this.getNoteHeadBounds(),d=e.getHeight();let m=this.getAbsoluteX(),u=l===Flow.Stem.DOWN?c.y_top-d:c.y_bottom-d;const g=l===Flow.Stem.DOWN?this.glyph.stem_down_extension:this.glyph.stem_up_extension;let b=Flow.STEM_HEIGHT;b-=b/2.8,b+=g,u+=b*t*l;const y=l===Flow.Stem.UP?{x1:1,y1:0,x2:13,y2:-9}:{x1:-4,y1:1,x2:13,y2:9};m+=y.x1*s,u+=y.y1*s,r={x1:m,y1:u,x2:m+y.x2*s,y2:u+y.y2*s}}const a=this.context;a.save(),a.setLineWidth(1*s),a.beginPath(),a.moveTo(r.x1,r.y1),a.lineTo(r.x2,r.y2),a.closePath(),a.stroke(),a.restore()}}calcBeamedNotesSlashBBox(e,t,s){const r=this.beam,o=r.slope,l=r.notes[r.notes.length-1]===this?-1:1,c=Math.atan(o*l),d={dx:Math.cos(c)*t,dy:Math.sin(c)*t};e*=this.getStemDirection();const m=Math.atan((d.dy-e)/d.dx),u=Math.cos(m)*s.stem*l,g=Math.sin(m)*s.stem,b=Math.cos(m)*s.beam*l,y=Math.sin(m)*s.beam,S=this.getStemX(),v=r.notes[0].getStemX(),x=this.beam.getBeamYToDraw()+(S-v)*o;return{x1:S-u,y1:x+e-g,x2:S+d.dx*l+b,y2:x+d.dy+y}}}class GraceTabNote extends TabNote$1{static get CATEGORY(){return"gracetabnotes"}constructor(e){super(e,!1),this.setAttribute("type","GraceTabNote"),Vex.Merge(this.render_options,{y_shift:.3,scale:.6,font:"7.5pt Arial"}),this.updateWidth()}getCategory(){return GraceTabNote.CATEGORY}draw(){super.draw(),this.setRendered()}}class Tuning{static get names(){return{standard:"E/5,B/4,G/4,D/4,A/3,E/3",dagdad:"D/5,A/4,G/4,D/4,A/3,D/3",dropd:"E/5,B/4,G/4,D/4,A/3,D/3",eb:"Eb/5,Bb/4,Gb/4,Db/4,Ab/3,Db/3",standardBanjo:"D/5,B/4,G/4,D/4,G/5"}}constructor(e="E/5,B/4,G/4,D/4,A/3,E/3,B/2,E/2"){this.setTuning(e)}noteToInteger(e){return Flow.keyProperties(e).int_value}setTuning(e){Tuning.names[e]&&(e=Tuning.names[e]),this.tuningString=e,this.tuningValues=[],this.numStrings=0;const t=e.split(/\s*,\s*/);if(t.length===0)throw new Vex.RERR("BadArguments","Invalid tuning string: "+e);this.numStrings=t.length;for(let s=0;s<this.numStrings;++s)this.tuningValues[s]=this.noteToInteger(t[s])}getValueForString(e){const t=parseInt(e,10);if(t<1||t>this.numStrings)throw new Vex.RERR("BadArguments",`String number must be between 1 and ${this.numStrings}:${e}`);return this.tuningValues[t-1]}getValueForFret(e,t){const s=this.getValueForString(t),r=parseInt(e,10);if(r<0)throw new Vex.RERR("BadArguments","Fret number must be 0 or higher: "+e);return s+r}getNoteForFret(e,t){const s=this.getValueForFret(e,t),r=Math.floor(s/12),o=s%12;return Flow.integerToNote(o)+"/"+r}}class KeyManager{constructor(e){this.music=new Music,this.setKey(e)}setKey(e){return this.key=e,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),!Music.scaleTypes[this.keyParts.type])throw new Vex.RERR("BadArguments",`Unsupported key type: ${this.key}`);this.scale=this.music.getScaleTones(this.music.getNoteValue(this.keyString),Music.scaleTypes[this.keyParts.type]),this.scaleMap={},this.scaleMapByValue={},this.originalScaleMapByValue={};const t=Music.root_indices[this.keyParts.root];for(let s=0;s<Music.roots.length;++s){const r=(t+s)%Music.roots.length,o=Music.roots[r],a=this.music.getRelativeNoteName(o,this.scale[s]);this.scaleMap[o]=a,this.scaleMapByValue[this.scale[s]]=a,this.originalScaleMapByValue[this.scale[s]]=a}return this}getAccidental(e){const t=this.music.getKeyParts(e).root,s=this.music.getNoteParts(this.scaleMap[t]);return{note:this.scaleMap[t],accidental:s.accidental}}selectNote(e){e=e.toLowerCase();const t=this.music.getNoteParts(e),s=this.scaleMap[t.root],r=this.music.getNoteParts(s);if(s===e)return{note:s,accidental:t.accidental,change:!1};const o=this.scaleMapByValue[this.music.getNoteValue(e)];if(o!=null)return{note:o,accidental:this.music.getNoteParts(o).accidental,change:!1};const a=this.originalScaleMapByValue[this.music.getNoteValue(e)];return a!=null?(this.scaleMap[r.root]=a,delete this.scaleMapByValue[this.music.getNoteValue(s)],this.scaleMapByValue[this.music.getNoteValue(e)]=a,{note:a,accidental:this.music.getNoteParts(a).accidental,change:!0}):r.root===e?(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[t.root])],this.scaleMapByValue[this.music.getNoteValue(r.root)]=r.root,this.scaleMap[r.root]=r.root,{note:r.root,accidental:null,change:!0}):(delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[t.root])],this.scaleMapByValue[this.music.getNoteValue(e)]=e,delete this.scaleMap[r.root],this.scaleMap[r.root]=e,{note:e,accidental:t.accidental,change:!0})}}class StaveHairpin extends Element$1{static get type(){return{CRESC:1,DECRESC:2}}static FormatByTicksAndDraw(e,t,s,r,o,a){const l=t.pixelsPerTick;if(l==null)throw new Vex.RuntimeError("BadArguments","A valid Formatter must be provide to draw offsets by ticks.");const c=l*a.left_shift_ticks,d=l*a.right_shift_ticks,m={height:a.height,y_shift:a.y_shift,left_shift_px:c,right_shift_px:d};new StaveHairpin({first_note:s.first_note,last_note:s.last_note},r).setContext(e).setRenderOptions(m).setPosition(o).draw()}constructor(e,t){super(),this.setAttribute("type","StaveHairpin"),this.notes=e,this.hairpin=t,this.position=Modifier.Position.BELOW,this.render_options={height:10,y_shift:0,left_shift_px:0,right_shift_px:0},this.setNotes(e)}setPosition(e){return(e===Modifier.Position.ABOVE||e===Modifier.Position.BELOW)&&(this.position=e),this}setRenderOptions(e){return e.height!=null&&e.y_shift!=null&&e.left_shift_px!=null&&e.right_shift_px!=null&&(this.render_options=e),this}setNotes(e){if(!e.first_note&&!e.last_note)throw new Vex.RuntimeError("BadArguments","Hairpin needs to have either first_note or last_note set.");return this.first_note=e.first_note,this.last_note=e.last_note,this}renderHairpin(e){const t=this.checkContext();let s=this.render_options.y_shift+20,r=e.first_y;this.position===Modifier.Position.ABOVE&&(s=-s+30,r=e.first_y-e.staff_height);const o=this.render_options.left_shift_px,a=this.render_options.right_shift_px;switch(t.beginPath(),this.hairpin){case StaveHairpin.type.CRESC:t.moveTo(e.last_x+a,r+s),t.lineTo(e.first_x+o,r+this.render_options.height/2+s),t.lineTo(e.last_x+a,r+this.render_options.height+s);break;case StaveHairpin.type.DECRESC:t.moveTo(e.first_x+o,r+s),t.lineTo(e.last_x+a,r+this.render_options.height/2+s),t.lineTo(e.first_x+o,r+this.render_options.height+s);break}t.stroke(),t.closePath()}draw(){this.checkContext(),this.setRendered();const e=this.first_note,t=this.last_note,s=e.getModifierStartXY(this.position,0),r=t.getModifierStartXY(this.position,0);return this.renderHairpin({first_x:s.x,last_x:r.x,first_y:e.getStave().y+e.getStave().height,last_y:t.getStave().y+t.getStave().height,staff_height:e.getStave().height}),!0}}class Curve extends Element$1{static get Position(){return{NEAR_HEAD:1,NEAR_TOP:2}}static get PositionString(){return{nearHead:Curve.Position.NEAR_HEAD,nearTop:Curve.Position.NEAR_TOP}}constructor(e,t,s){super(),this.setAttribute("type","Curve"),this.render_options={spacing:2,thickness:2,x_shift:0,y_shift:10,position:Curve.Position.NEAR_HEAD,position_end:Curve.Position.NEAR_HEAD,invert:!1,cps:[{x:0,y:10},{x:0,y:10}]},Vex.Merge(this.render_options,s),this.setNotes(e,t)}setNotes(e,t){if(!e&&!t)throw new Vex.RuntimeError("BadArguments","Curve needs to have either first_note or last_note set.");return this.from=e,this.to=t,this}isPartial(){return!this.from||!this.to}renderCurve(e){const t=this.context,s=this.render_options.cps,r=this.render_options.x_shift,o=this.render_options.y_shift*e.direction,a=e.first_x+r,l=e.first_y+o,c=e.last_x-r,d=e.last_y+o,m=this.render_options.thickness,u=(c-a)/(s.length+2);t.beginPath(),t.moveTo(a,l),t.bezierCurveTo(a+u+s[0].x,l+s[0].y*e.direction,c-u+s[1].x,d+s[1].y*e.direction,c,d),t.bezierCurveTo(c-u+s[1].x,d+(s[1].y+m)*e.direction,a+u+s[0].x,l+(s[0].y+m)*e.direction,a,l),t.stroke(),t.closePath(),t.fill()}draw(){this.checkContext(),this.setRendered();const e=this.from,t=this.to;let s,r,o,a,l,c="baseY",d="baseY";function m(b){return typeof b=="string"?Curve.PositionString[b]:b}const u=m(this.render_options.position),g=m(this.render_options.position_end);return u===Curve.Position.NEAR_TOP&&(c="topY",d="topY"),g===Curve.Position.NEAR_HEAD?d="baseY":g===Curve.Position.NEAR_TOP&&(d="topY"),e?(s=e.getTieRightX(),l=e.getStemDirection(),o=e.getStemExtents()[c]):(s=t.getStave().getTieStartX(),o=t.getStemExtents()[c]),t?(r=t.getTieLeftX(),l=t.getStemDirection(),a=t.getStemExtents()[d]):(r=e.getStave().getTieEndX(),a=e.getStemExtents()[d]),this.renderCurve({first_x:s,last_x:r,first_y:o,last_y:a,direction:l*(this.render_options.invert===!0?-1:1)}),!0}}function L$7(...i){TextDynamics.DEBUG&&Vex.L("Vex.Flow.TextDynamics",i)}class TextDynamics extends Note{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(e){super(e),this.setAttribute("type","TextDynamics"),this.sequence=e.text.toLowerCase(),this.line=e.line||0,this.glyphs=[],Vex.Merge(this.render_options,{glyph_font_size:40}),L$7("New Dynamics Text: ",this.sequence)}setLine(e){return this.line=e,this}preFormat(){let e=0;return this.sequence.split("").forEach(t=>{const s=TextDynamics.GLYPHS[t];if(!s)throw new Vex.RERR("Invalid dynamics character: "+t);const r=this.render_options.glyph_font_size,o=new Glyph(s.code,r);this.glyphs.push(o),e+=s.width}),this.setWidth(e),this.preFormatted=!0,this}draw(){this.setRendered();const e=this.getAbsoluteX(),t=this.stave.getYForLine(this.line+-3);L$7("Rendering Dynamics: ",this.sequence);let s=e;this.glyphs.forEach((r,o)=>{const a=this.sequence[o];r.render(this.context,s,t),s+=TextDynamics.GLYPHS[a].width})}}function drawArrowHead(i,e,t,s,r,o,a){i.beginPath(),i.moveTo(e,t),i.lineTo(s,r),i.lineTo(o,a),i.lineTo(e,t),i.closePath(),i.fill()}function drawArrowLine(i,e,t,s){const r=s.draw_start_arrow&&s.draw_end_arrow,o=e.x,a=e.y,l=t.x,c=t.y,d=Math.sqrt((l-o)*(l-o)+(c-a)*(c-a)),m=(d-s.arrowhead_length/3)/d;let u,g,b,y;s.draw_end_arrow||r?(u=Math.round(o+(l-o)*m),g=Math.round(a+(c-a)*m)):(u=l,g=c),s.draw_start_arrow||r?(b=o+(l-o)*(1-m),y=a+(c-a)*(1-m)):(b=o,y=a),s.color&&(i.setStrokeStyle(s.color),i.setFillStyle(s.color)),i.beginPath(),i.moveTo(b,y),i.lineTo(u,g),i.stroke(),i.closePath();const S=Math.atan2(c-a,l-o),v=Math.abs(s.arrowhead_length/Math.cos(s.arrowhead_angle));let x,A,E,w,_,C;(s.draw_end_arrow||r)&&(x=S+Math.PI+s.arrowhead_angle,E=l+Math.cos(x)*v,w=c+Math.sin(x)*v,A=S+Math.PI-s.arrowhead_angle,_=l+Math.cos(A)*v,C=c+Math.sin(A)*v,drawArrowHead(i,E,w,l,c,_,C)),(s.draw_start_arrow||r)&&(x=S+s.arrowhead_angle,E=o+Math.cos(x)*v,w=a+Math.sin(x)*v,A=S-s.arrowhead_angle,_=o+Math.cos(A)*v,C=a+Math.sin(A)*v,drawArrowHead(i,E,w,o,a,_,C))}class StaveLine extends Element$1{static get TextVerticalPosition(){return{TOP:1,BOTTOM:2}}static get TextJustification(){return{LEFT:1,CENTER:2,RIGHT:3}}constructor(e){super(),this.setAttribute("type","StaveLine"),this.notes=e,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:StaveLine.TextVerticalPosition.TOP,text_justification:StaveLine.TextJustification.CENTER},this.setNotes(e)}setFont(e){return this.font=e,this}setText(e){return this.text=e,this}setNotes(e){if(!e.first_note&&!e.last_note)throw new Vex.RuntimeError("BadArguments","Notes needs to have either first_note or last_note set.");if(e.first_indices||(e.first_indices=[0]),e.last_indices||(e.last_indices=[0]),e.first_indices.length!==e.last_indices.length)throw new Vex.RuntimeError("BadArguments","Connected notes must have similar index sizes");return this.first_note=e.first_note,this.first_indices=e.first_indices,this.last_note=e.last_note,this.last_indices=e.last_indices,this}applyLineStyle(){const e=this.checkContext(),t=this.render_options;t.line_dash&&e.setLineDash(t.line_dash),t.line_width&&e.setLineWidth(t.line_width),t.rounded_end?e.setLineCap("round"):e.setLineCap("square")}applyFontStyle(){const e=this.checkContext();this.font&&e.setFont(this.font.family,this.font.size,this.font.weight),this.render_options.color&&(e.setStrokeStyle(this.render_options.color),e.setFillStyle(this.render_options.color))}draw(){const e=this.checkContext();this.setRendered();const t=this.first_note,s=this.last_note,r=this.render_options;e.save(),this.applyLineStyle();let o,a;this.first_indices.forEach((g,b)=>{const y=this.last_indices[b];o=t.getModifierStartXY(2,g),a=s.getModifierStartXY(1,y);const S=o.y>a.y;o.x+=t.getMetrics().modRightPx+r.padding_left,a.x-=s.getMetrics().modLeftPx+r.padding_right;const v=t.getGlyph().getWidth();t.getKeyProps()[g].displaced&&t.getStemDirection()===1&&(o.x+=v+r.padding_left),s.getKeyProps()[y].displaced&&s.getStemDirection()===-1&&(a.x-=v+r.padding_right),o.y+=S?-3:1,a.y+=S?2:0,drawArrowLine(e,o,a,this.render_options)}),e.restore();const l=e.measureText(this.text).width,c=r.text_justification;let d=0;c===StaveLine.TextJustification.LEFT?d=o.x:c===StaveLine.TextJustification.CENTER?d=(a.x-o.x)/2+o.x-l/2:c===StaveLine.TextJustification.RIGHT&&(d=a.x-l);let m;const u=r.text_position_vertical;return u===StaveLine.TextVerticalPosition.TOP?m=t.getStave().getYForTopText():u===StaveLine.TextVerticalPosition.BOTTOM&&(m=t.getStave().getYForBottomText(Flow.TEXT_HEIGHT_OFFSET_HACK)),e.save(),this.applyFontStyle(),e.fillText(this.text,d,m),e.restore(),this}}function L$6(...i){PedalMarking.DEBUG&&Vex.L("Vex.Flow.PedalMarking",i)}function drawPedalGlyph(i,e,t,s,r){const o=PedalMarking.GLYPHS[i];new Glyph(o.code,r).render(e,t+o.x_shift,s+o.y_shift)}class PedalMarking extends Element$1{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:PedalMarking.Styles.TEXT,bracket:PedalMarking.Styles.BRACKET,mixed:PedalMarking.Styles.MIXED,mixed_open_end:PedalMarking.Styles.MIXED_OPEN_END,bracket_open_begin:PedalMarking.Styles.BRACKET_OPEN_BEGIN,bracket_open_end:PedalMarking.Styles.BRACKET_OPEN_END,bracket_open_both:PedalMarking.Styles.BRACKET_OPEN_BOTH}}static createSustain(e){return new PedalMarking(e)}static createSostenuto(e){const t=new PedalMarking(e);return t.setStyle(PedalMarking.Styles.MIXED),t.setCustomText("Sost. Ped."),t}static createUnaCorda(e){const t=new PedalMarking(e);return t.setStyle(PedalMarking.Styles.TEXT),t.setCustomText("una corda","tre corda"),t}constructor(e){super(),this.setAttribute("type","PedalMarking"),this.EndsStave=!1,this.ChangeBegin=!1,this.ChangeEnd=!1,this.notes=e,this.style=PedalMarking.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(e){if(this.endStave=e,this.endStaveAddedWidth=0,this.startMargin=0,this.endMargin=0,Array.isArray(this.endStave.modifiers))for(let t=0;t<this.endStave.modifiers.length;t++){let s=this.endStave.modifiers[t];s&&s.position===StaveModifier.Position.END&&s.width&&(this.endStaveAddedWidth+=s.width)}}setCustomText(e,t){return this.custom_depress_text=e||"",this.custom_release_text=t||"",this}setStyle(e){if(e<1&&e>3)throw new Vex.RERR("InvalidParameter","The style must be one found in PedalMarking.Styles");return this.style=e,this}setLine(e){return this.line=e,this}drawBracketed(){const e=this.context;let t=!1,s,r;const o=this;this.notes.forEach((a,l,c)=>{t=!t;let d=0;if(a?d=a.getNoteHeadBeginX():d=this.endStave.end_x+this.endStaveAddedWidth,this.EndsStave)t?this.ChangeBegin&&(d=a.getAbsoluteX()):(a?this.ChangeEnd?d=a.getAbsoluteX():d=a.getStave().end_x+this.endStaveAddedWidth-o.render_options.text_margin_right:d=this.endStave.end_x+this.endStaveAddedWidth-o.render_options.text_margin_right,this.endMargin=-o.render_options.text_margin_right);else if(a)if(t)this.ChangeBegin&&(d=a.getAbsoluteX());else switch(o.style){case PedalMarking.Styles.BRACKET_OPEN_END:case PedalMarking.Styles.BRACKET_OPEN_BOTH:case PedalMarking.Styles.MIXED_OPEN_END:d=a.getNoteHeadEndX();break;default:this.ChangeEnd?d=a.getAbsoluteX():(d=a.getNoteHeadBeginX()-o.render_options.text_margin_right,this.startMargin=-o.render_options.text_margin_right);break}let m=this.endStave;a&&(m=a.getStave());let u=m.getYForBottomText(o.line+3);r&&r>u&&(u=r);const g=c[l+1]===a,b=c[l-1]===a;let y=0;if(t)if(y=b?5:0,(o.style===PedalMarking.Styles.MIXED||o.style===PedalMarking.Styles.MIXED_OPEN_END)&&!b)if(o.custom_depress_text){const S=e.measureText(o.custom_depress_text).width;e.fillText(o.custom_depress_text,d-S/2,u),y=S/2+o.render_options.text_margin_right}else drawPedalGlyph("pedal_depress",e,d,u,o.render_options.glyph_point_size),y=20+o.render_options.text_margin_right;else e.beginPath(),o.style===PedalMarking.Styles.BRACKET_OPEN_BEGIN||o.style===PedalMarking.Styles.BRACKET_OPEN_BOTH?e.moveTo(d+y,u):(this.ChangeBegin&&(d+=5),e.moveTo(d,u-o.render_options.bracket_height),this.ChangeBegin&&(d+=5),e.lineTo(d+y,u)),e.stroke(),e.closePath();else y=g&&!this.EndsStave?-5:0,e.beginPath(),e.moveTo(s,r),e.lineTo(d+y,u),o.style!==PedalMarking.Styles.BRACKET_OPEN_END&&o.style!==PedalMarking.Styles.MIXED_OPEN_END&&o.style!==PedalMarking.Styles.BRACKET_OPEN_BOTH&&(this.ChangeEnd&&(d+=5),e.lineTo(d,u-o.render_options.bracket_height)),e.stroke(),e.closePath();s=d+y,r=u})}drawText(){const e=this.context;let t=!1;const s=this,r=s.render_options.glyph_point_size;this.notes.forEach(o=>{t=!t;const a=o.getStave(),l=o.getAbsoluteX(),c=a.getYForBottomText(s.line+3);let d=0;t?s.custom_depress_text?(d=e.measureText(s.custom_depress_text).width,e.fillText(s.custom_depress_text,l-d/2,c)):drawPedalGlyph("pedal_depress",e,l,c,r):s.custom_release_text?(d=e.measureText(s.custom_release_text).width,e.fillText(s.custom_release_text,l-d/2,c)):drawPedalGlyph("pedal_release",e,l,c,r)})}draw(){const e=this.checkContext();this.setRendered(),e.save(),e.setStrokeStyle(this.render_options.color),e.setFillStyle(this.render_options.color),e.setFont(this.font.family,this.font.size,this.font.weight),L$6("Rendering Pedal Marking"),this.style===PedalMarking.Styles.BRACKET||this.style===PedalMarking.Styles.MIXED||this.style===PedalMarking.Styles.MIXED_OPEN_END||this.style===PedalMarking.Styles.BRACKET_OPEN_BEGIN||this.style===PedalMarking.Styles.BRACKET_OPEN_END||this.style===PedalMarking.Styles.BRACKET_OPEN_BOTH?(e.setLineWidth(this.render_options.bracket_line_width),this.drawBracketed()):this.style===PedalMarking.Styles.TEXT&&this.drawText(),e.restore()}}function L$5(...i){TextBracket.DEBUG&&Vex.L("Vex.Flow.TextBracket",i)}class TextBracket extends Element$1{static get Positions(){return{TOP:1,BOTTOM:-1}}static get PositionString(){return{top:TextBracket.Positions.TOP,bottom:TextBracket.Positions.BOTTOM}}constructor({start:e,stop:t,text:s="",superscript:r="",position:o=TextBracket.Positions.TOP}){super(),this.setAttribute("type","TextBracket"),this.start=e,this.stop=t,this.text=s,this.superscript=r,this.position=typeof o=="string"?TextBracket.PositionString[o]:o,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(e){return e.setFont(this.font.family,this.font.size,this.font.weight),e.setStrokeStyle(this.render_options.color),e.setFillStyle(this.render_options.color),e.setLineWidth(this.render_options.line_width),this}setDashed(e,t){return this.render_options.dashed=e,t&&(this.render_options.dash=t),this}setFont(e){return this.font={...this.font,...e},this}setLine(e){return this.line=e,this}draw(){const e=this.context;this.setRendered();let t=0;switch(this.position){case TextBracket.Positions.TOP:t=this.start.getStave().getYForTopText(this.line);break;case TextBracket.Positions.BOTTOM:t=this.start.getStave().getYForBottomText(this.line+Flow.TEXT_HEIGHT_OFFSET_HACK);break;default:throw new Vex.RERR("InvalidPosition",`The position ${this.position} is invalid`)}const s={x:this.start.getAbsoluteX(),y:t},r={x:this.stop.getAbsoluteX(),y:t};L$5("Rendering TextBracket: start:",s,"stop:",r,"y:",t);const o=this.render_options.bracket_height*this.position;e.save(),this.applyStyle(e),e.fillText(this.text,s.x,s.y);const a=e.measureText(this.text).width,l=e.measureText("M").width,c=s.y-l/2.5;e.setFont(this.font.family,this.font.size/1.4,this.font.weight),e.fillText(this.superscript,s.x+a+1,c);const d=e.measureText(this.superscript).width,m=e.measureText("M").width;let u=s.x,g=c;const b=r.x+this.stop.getGlyph().getWidth();this.position===TextBracket.Positions.TOP?(u+=a+d+5,g-=m/2.7):this.position===TextBracket.Positions.BOTTOM&&(g+=m/2.7,u+=a+2,this.render_options.underline_superscript||(u+=d)),this.render_options.dashed?(Renderer.drawDashedLine(e,u,g,b,g,this.render_options.dash),this.render_options.show_bracket&&Renderer.drawDashedLine(e,b,g+1*this.position,b,g+o,this.render_options.dash)):(e.beginPath(),e.moveTo(u,g),e.lineTo(b,g),this.render_options.show_bracket&&e.lineTo(b,g+o),e.stroke(),e.closePath()),e.restore()}}function L$4(...i){BarNote.DEBUG&&Vex.L("Vex.Flow.BarNote",i)}class BarNote extends Note{constructor(e=Barline.type.SINGLE){super({duration:"b"}),this.setAttribute("type","BarNote"),this.metrics={widths:{}};const t=Barline.type;this.metrics.widths={[t.SINGLE]:8,[t.DOUBLE]:12,[t.END]:15,[t.REPEAT_BEGIN]:14,[t.REPEAT_END]:14,[t.REPEAT_BOTH]:18,[t.NONE]:0},this.ignore_ticks=!0,this.setType(e)}getType(){return this.type}setType(e){return this.type=typeof e=="string"?Barline.typeString[e]:e,this.setWidth(this.metrics.widths[this.type]),this}getBoundingBox(){return super.getBoundingBox()}addToModifierContext(){return this}preFormat(){return this.setPreFormatted(!0),this}draw(){if(this.checkContext(),!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");L$4("Rendering bar line at: ",this.getAbsoluteX());const e=new Barline(this.type);e.setX(this.getAbsoluteX()),e.draw(this.stave),this.setRendered()}}class GhostNote extends StemmableNote{constructor(e){if(!e)throw new Vex.RuntimeError("BadArguments","Ghost note must have valid initialization data to identify duration.");let t;if(typeof e=="string")t={duration:e};else if(typeof e=="object")t=e;else throw new Vex.RuntimeError("BadArguments","Ghost note must have valid initialization data to identify duration.");super(t),this.setAttribute("type","GhostNote"),this.setWidth(0)}isRest(){return!0}setStave(e){super.setStave(e)}addToModifierContext(){return this}preFormat(){return this.setPreFormatted(!0),this}draw(){if(!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");this.setRendered();for(let e=0;e<this.modifiers.length;++e){const t=this.modifiers[e];t.setContext(this.context),t.drawWithStyle()}}}class Tremolo extends Modifier{static get CATEGORY(){return"tremolo"}static get YOFFSETSTEMUP(){return-9}static get YOFFSETSTEMDOWN(){return-21}static get XOFFSETSTEMUP(){return 6}static get XOFFSETSTEMDOWN(){return-2}constructor(e,t){super(),this.setAttribute("type","Tremolo"),this.num=e,this.note=null,this.index=null,this.position=Modifier.Position.CENTER,this.code="v74",this.y_spacing_scale=1,this.extra_stroke_scale=1,this.noteTremoloList=[],t&&Array.isArray(t)&&(this.noteTremoloList=t)}getCategory(){return Tremolo.CATEGORY}getShift_x(){let e=0;if(this.noteTremoloList.length===2)try{e=this.noteTremoloList[0].formatterMetrics.freedom.right/1.5,e=isNaN(e)?0:-e}catch(t){}return e}draw(){if(this.checkContext(),!(this.note&&this.index!=null))throw new Vex.RERR("NoAttachedNote","Can't draw Tremolo without a note and index.");this.setRendered();const e=this.note.getStemDirection();this.y_spacing=4*e*this.y_spacing_scale;let s=this.note.getModifierStartXY(this.position,this.index).x,r=this.note.stem.getExtents().topY,o=this.note.getCategory()==="gracenotes"?GraceNote.SCALE:1;o*=this.extra_stroke_scale,e<0?r+=Tremolo.YOFFSETSTEMDOWN*o:r+=Tremolo.YOFFSETSTEMUP*o,this.font={family:"Arial",size:16*o,weight:""},this.render_options={font_scale:35*o,stroke_px:3,stroke_spacing:10*o},s+=e<0?Tremolo.XOFFSETSTEMDOWN:Tremolo.XOFFSETSTEMUP;const a=this.getShift_x();s+=a;for(let l=0;l<this.num;++l)Glyph.renderGlyph(this.context,s,r,this.render_options.font_scale,this.code),r+=this.y_spacing}}function L$3(...i){Crescendo.DEBUG&&Vex.L("Vex.Flow.Crescendo",i)}function renderHairpin(i,e){const t=e.begin_x,s=e.end_x,r=e.y,o=e.height/2;i.beginPath(),e.reverse?(i.moveTo(t,r-o),i.lineTo(s,r),i.lineTo(t,r+o)):(i.moveTo(s,r-o),i.lineTo(t,r),i.lineTo(s,r+o)),i.stroke(),i.closePath()}class Crescendo extends Note{constructor(e){super(e),this.setAttribute("type","Crescendo"),this.decrescendo=!1,this.line=e.line||0,this.height=15,Vex.Merge(this.render_options,{extend_left:0,extend_right:0,y_shift:0})}setLine(e){return this.line=e,this}setHeight(e){return this.height=e,this}setDecrescendo(e){return this.decrescendo=e,this}preFormat(){return this.preFormatted=!0,this}draw(){this.checkContext(),this.setRendered();const e=this.getTickContext(),t=TickContext.getNextContext(e),s=this.getAbsoluteX(),r=t?t.getX():this.stave.x+this.stave.width,o=this.stave.getYForLine(this.line+-3)+1;L$3("Drawing ",this.decrescendo?"decrescendo ":"crescendo ",this.height,"x",s-r),renderHairpin(this.context,{begin_x:s-this.render_options.extend_left,end_x:r+this.render_options.extend_right,y:o+this.render_options.y_shift,height:this.height,reverse:this.decrescendo})}}function L$2(...i){Parser.DEBUG&&Vex.L("Vex.Flow.Parser",i)}const X$2=Vex.MakeException("ParserError");function flattenMatches(i){return i.matchedString!==void 0?i.matchedString:i.results?flattenMatches(i.results):i.length===1?flattenMatches(i[0]):i.length===0?null:i.map(flattenMatches)}class Parser{constructor(e){this.grammar=e}parse(e){this.line=e,this.pos=0,this.errorPos=-1;const t=this.expect(this.grammar.begin());return t.errorPos=this.errorPos,t}matchFail(e){this.errorPos===-1&&(this.errorPos=this.pos),this.pos=e}matchSuccess(){this.errorPos=-1}matchToken(e,t=!1){const s=t?new RegExp("^(("+e+"))"):new RegExp("^(("+e+")\\s*)"),o=this.line.slice(this.pos).match(s);return o!==null?{success:!0,matchedString:o[2],incrementPos:o[1].length,pos:this.pos}:{success:!1,pos:this.pos}}expectOne(e,t=!1){const s=[],r=this.pos;let o=!0,a=!1;t=t===!0||e.maybe===!0;for(let d=0;d<e.expect.length;d++){const m=e.expect[d],u=this.pos,g=this.expect(m);if(g.success){if(s.push(g),a=!0,e.or)break}else if(o=!1,!e.or){this.pos=u;break}}const l=e.or&&a||o,c=l||t===!0;return t&&!l&&(this.pos=r),c?this.matchSuccess():this.matchFail(r),{success:c,results:s,numMatches:l?1:0}}expectOneOrMore(e,t=!1){const s=[],r=this.pos;let o=0,a=!0;do{const c=this.expectOne(e);c.success?(o++,s.push(c.results)):a=!1}while(a);const l=o>0||t===!0;return t&&!(o>0)&&(this.pos=r),l?this.matchSuccess():this.matchFail(r),{success:l,results:s,numMatches:o}}expectZeroOrMore(e){return this.expectOneOrMore(e,!0)}expect(e){L$2("Evaluating rules:",e);let t;if(!e)throw new X$2("Invalid Rule: "+e,e);const s=e.bind(this.grammar)();if(s.token)t=this.matchToken(s.token,s.noSpace===!0),t.success&&(this.pos+=t.incrementPos);else if(s.expect)s.oneOrMore?t=this.expectOneOrMore(s):s.zeroOrMore?t=this.expectZeroOrMore(s):t=this.expectOne(s);else throw new X$2("Bad grammar! No `token` or `expect` property",s);return t.matches=[],t.results&&t.results.forEach(r=>t.matches.push(flattenMatches(r))),s.run&&t.success&&s.run(t),t}}function L$1(...i){EasyScore.DEBUG&&Vex.L("Vex.Flow.EasyScore",i)}const X$1=Vex.MakeException("EasyScoreError");class Grammar{constructor(e){this.builder=e}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:e=>this.builder.addChord(e.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:e=>this.builder.addSingleNote(e.matches[0],e.matches[1],e.matches[2])}}ACCIDENTAL(){return{expect:[this.ACCIDENTALS],maybe:!0}}DOTS(){return{expect:[this.DOT],zeroOrMore:!0,run:e=>this.builder.setNoteDots(e.matches[0])}}TYPE(){return{expect:[this.SLASH,this.MAYBESLASH,this.TYPES],maybe:!0,run:e=>this.builder.setNoteType(e.matches[2])}}DURATION(){return{expect:[this.SLASH,this.DURATIONS],maybe:!0,run:e=>this.builder.setNoteDuration(e.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(){const e=t=>t.slice(1,-1);return{expect:[this.KEY,this.EQUALS,this.VAL],run:t=>this.builder.addNoteOption(t.matches[0],e(t.matches[2]))}}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 Builder{constructor(e){this.factory=e,this.commitHooks=[],this.reset()}reset(e={}){this.options={stem:"auto",clef:"treble"},this.elements={notes:[],accidentals:[]},this.rollingDuration="8",this.resetPiece(),Object.assign(this.options,e)}getFactory(){return this.factory}getElements(){return this.elements}addCommitHook(e){this.commitHooks.push(e)}resetPiece(){L$1("resetPiece"),this.piece={chord:[],duration:this.rollingDuration,dots:0,type:void 0,options:{}}}setNoteDots(e){L$1("setNoteDots:",e),e&&(this.piece.dots=e.length)}setNoteDuration(e){L$1("setNoteDuration:",e),this.rollingDuration=this.piece.duration=e||this.rollingDuration}setNoteType(e){L$1("setNoteType:",e),e&&(this.piece.type=e)}addNoteOption(e,t){L$1("addNoteOption: key:",e,"value:",t),this.piece.options[e]=t}addNote(e,t,s){L$1("addNote:",e,t,s),this.piece.chord.push({key:e,accid:t,octave:s})}addSingleNote(e,t,s){L$1("addSingleNote:",e,t,s),this.addNote(e,t,s)}addChord(e){L$1("startChord"),typeof e[0]!="object"?this.addSingleNote(e[0]):e.forEach(t=>{t&&this.addNote(...t)}),L$1("endChord")}commitPiece(){L$1("commitPiece");const{factory:e}=this;if(!e)return;const t={...this.options,...this.piece.options},{stem:s,clef:r}=t,o=s.toLowerCase()==="auto",a=!o&&s.toLowerCase()==="up"?StaveNote.STEM_UP:StaveNote.STEM_DOWN,{chord:l,duration:c,dots:d,type:m}=this.piece,u=l.map(y=>y.key+"/"+y.octave),g=e.StaveNote({keys:u,duration:c,dots:d,type:m,clef:r,auto_stem:o});o||g.setStemDirection(a);const b=l.map(y=>y.accid||null);b.forEach((y,S)=>{y&&g.addAccidental(S,e.Accidental({type:y}))});for(let y=0;y<d;y++)g.addDotToAll();this.commitHooks.forEach(y=>y(t,g,this)),this.elements.notes.push(g),this.elements.accidentals.concat(b),this.resetPiece()}}function setId({id:i},e){i!==void 0&&e.setAttribute("id",i)}function setClass(i,e){if(!i.class)return;const t=/\s*,\s*/;i.class.split(t).forEach(s=>e.addClass(s))}class EasyScore{constructor(e={}){this.setOptions(e),this.defaults={clef:"treble",time:"4/4",stem:"auto"}}set(e){return Object.assign(this.defaults,e),this}setOptions(e){return this.options={factory:null,builder:null,commitHooks:[setId,setClass,Articulation$1.easyScoreHook],throwOnError:!1,...e},this.factory=this.options.factory,this.builder=this.options.builder||new Builder(this.factory),this.grammar=new Grammar(this.builder),this.parser=new Parser(this.grammar),this.options.commitHooks.forEach(t=>this.addCommitHook(t)),this}setContext(e){return this.factory&&this.factory.setContext(e),this}parse(e,t={}){this.builder.reset(t);const s=this.parser.parse(e);if(!s.success&&this.options.throwOnError)throw new X$1("Error parsing line: "+e,s);return s}beam(e,t={}){return this.factory.Beam({notes:e,options:t}),e}tuplet(e,t={}){return this.factory.Tuplet({notes:e,options:t}),e}notes(e,t={}){return t={clef:this.defaults.clef,stem:this.defaults.stem,...t},this.parse(e,t),this.builder.getElements().notes}voice(e,t){return t={time:this.defaults.time,...t},this.factory.Voice(t).addTickables(e)}addCommitHook(e){return this.builder.addCommitHook(e)}}function initGroup(){return{notes:[],finish:!1,total:0,staveId:""}}let _text_width=null,tone="C",group=initGroup(),_denominator="",_numerator="",ornamentGroup="";class NumberedNote extends StaveNote{static get CATEGORY(){return"numberednotes"}static accidentalAndKey(e){switch(e){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(e){switch(e){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(tone){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(e){super(e),this.setAttribute("type","NumberedNote"),tone=e.keyString,this.ornament=!!e.ornament,this.line=0,this.keys=e.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=e.note_size||16;const t=Flow.sanitizeDuration(this.duration);var s=NumberedNote.numberedDurationLine[t.toString()];if(s&&(this.duration_lines=s),s=NumberedNote.longDurationLine[t.toString()],s&&(this.long_duration_lines=s),!_text_width){var r="__$text_wraper$$__";let a=document.createElement("canvas");a.id=r,document.body.append(a);const l=document.getElementById(r),c=l.getContext("2d");c.font="Arial 22px";var o=c.measureText("5");_text_width=o.width+2,document.body.removeChild(l)}}getCategory(){return NumberedNote.CATEGORY}setKeySignature(e){this.keySignature=e}preFormat(){this.preFormatted||(this.modifierContext&&this.modifierContext.preFormat(),this.setWidth(this.full_width),this.setPreFormatted(!0))}filterNote(){if(window&&window.sett&&window.sett.keySignature||!this.keys||!this.keys.length)return;const e=NumberedNote.accidentalMap(tone);if(!e)return;const t=NumberedNote.noteLift;if(!t)return;var s=this.keys[0].split("/"),r=s[0];r==="b"&&(r="R"),r=r.replace(new RegExp("#","g"),""),r=r.replace(new RegExp("n","g"),""),r.length>1&&(r=r.replace(new RegExp("b","g"),""));const o=NumberedNoteHead.numberedNotationMapping[r.toUpperCase()];if(t.includes(o))for(let a=0;a<this.modifiers.length;a++){const l=this.modifiers[a];if(l.getAttribute("type")==="Accidental"&&l.accidental){const c=e[l.type];c?l.accidental=Flow.accidentalCodes(c):this.modifiers.splice(a,1)}}}preFormatModifier(){let e=0,t=0;this.filterNote(),this.modifiers.forEach((s,r)=>{switch(s.getAttribute("type")){case"Accidental":s.render_options.font_scale=this.note_width*1.4,s.x_shift=2,s.y_shift=this.unit_height/2,this.ornament&&(s.render_options.font_scale=this.note_width,s.x_shift=14,s.y_shift=-10);break;case"Stroke":s.x_shift=-1*e,s.y_shift=1*this.unit_height;break;case"Dot":s.x_shift=t*this.duration_dot_width+7,s.y_shift=1*this.unit_height,t++;break;case"Ornament":s.y_shift=-3;break;default:s.y_shift=1*this.unit_height}s.reset&&s.reset(),e+=s.getWidth()/2})}handleDeleteDot(){for(let e=0;e<this.modifiers.length;e++)this.modifiers[e].attrs.type=="Dot"&&this.modifiers.splice(e,1)}calcGroup(){if(group.staveId!=this.stave.attrs.id&&(this.drawDurationLoneLine(),group=initGroup()),this.stave.timeSignature.denominator&&(_denominator=this.stave.timeSignature.denominator,_numerator=this.stave.timeSignature.numerator),!_denominator||!_numerator)return;let e=NumberedNote.durationTime[_denominator],t=this.formatterMetrics.duration.split("/").filter(a=>a),s=t.length?t[0]/t[1]:0;if(this.ornament)return;if(s===0)return this.long_duration_lines=this.intrinsicTicks/e-1,this.long_duration_lines>=_numerator&&(this.long_duration_lines=_numerator-1),_denominator==8&&(this.long_duration_lines=0,_numerator==3&&this.draw_dot(this.context,this.bottom_x+25,this.bottom_y-30,this.dot_width),_numerator==6&&(this.draw_dot(this.context,this.bottom_x+25,this.bottom_y-30,this.dot_width),new Glyph("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))),group=initGroup();let r={lines:this.duration_lines,duration:s,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,y:this.y,width:this.full_width};s>e*2&&(this.long_duration_lines=parseInt(s/e)-1,this.handleDeleteDot()),ornamentGroup&&(r.x+=this.note_width),group.notes.push(r);let o=group.notes.reduce((a,l)=>a+l.duration,0);o=parseInt(o),o>e&&(o-=e),o>e-10&&o<e+10&&(group.finish=!0,group.notes.length===1&&(group=initGroup()),group.notes.filter(l=>l.lines===0).length&&(this.drawDurationLoneLine(),group=initGroup()))}draw(){if(this.checkContext(),!this.stave)throw new Vex.RERR("NoStave","Can't draw without a stave.");let e=this.context;e.save(),e.setFont("Arial",this.note_height,"normal"),this.setAttribute("el",e.openGroup("stavenote",this.getAttribute("id"))),e.openGroup("note",null,{pointerBBox:!0});let t=this.getAbsoluteX()+2.5;this.x=t;let s=this.stave.getYForLine(2)+this.note_height/2;this.y=s,this.buildToneHeads(),this.preFormatModifier(),this.applyStyle(),this.note_tones.forEach(r=>{r.draw(e)}),e.openGroup("modifier",null,{pointerBBox:!0}),this.drawModifiers(),e.closeGroup(),e.closeGroup(),e.closeGroup(),this.calcGroup(),group.staveId=this.stave.attrs.id,this.drawDurationLine(e,{}),this.drawLongDurationLines(e),this.restoreStyle(),this.setRendered(),this.ornament?ornamentGroup?ornamentGroup=Object.assign(ornamentGroup,{lines:this.duration_lines,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,width:this.full_width}):ornamentGroup={lines:this.duration_lines,id:this.attrs.id,x:this.x-this.duration_line_space/2-this.left_width,width:this.full_width}:ornamentGroup=""}drawDurationLoneLine(e,t){e=e||this.context;let s=t||this.y+this.duration_line_space;for(let r=0;r<5;r++){let o=[],a=0;for(let l=0;l<group.notes.length;l++){let c=group.notes[l];if(a==l&&c.lines>r)o.push(c),a++;else{if(o.length>1){let d=o.length-1;s=o[0].y+this.duration_line_space,e.rect(o[0].x,s+r*3,o[d].x-o[0].x+o[d].width,.5)}o=[],a=l+1}}if(o.length>1){let l=o.length-1;s=o[0].y+this.duration_line_space,e.rect(o[0].x,s+r*3,o[l].x-o[0].x+o[l].width,.5)}}}draw_dot(e,t,s,r){e.openGroup("numbered-note-dot"),e.beginPath(),e.arc(t,s,r,0,2*Math.PI),e.closePath(),e.fill(),e.closeGroup()}drawDurationLine(e,t){var s=this.attrs.id+"-lines";e.openGroup("numbered_note_lines",s);var r,o;if(this.duration_lines>0){const c=this.duration_line_space;var a=this.full_width;if(t&&t.width&&(a=t.width),a<0&&(a=this.note_width),!t||typeof t.startX>"u"?r=this.x-c/2-this.left_width:r=t.startX,!t||typeof t.startY>"u"?o=this.y+this.duration_line_space:o=t.startY,group.finish&&(this.drawDurationLoneLine(e,o),group=initGroup()),this.ornament?(r+=12,o-=22,a=15,ornamentGroup&&(r-=10,a+=10)):ornamentGroup&&(r+=this.note_width,a-=this.note_width),a>0){for(var l=0;l<this.duration_lines;l++)e.rect(r,o,a,.5),o+=3;this.ornament&&(ornamentGroup?(ornamentGroup.startX=r,ornamentGroup.startY=o):ornamentGroup={startX:r,startY:o})}}!this.ornament&&ornamentGroup&&(r=ornamentGroup.startX,o=ornamentGroup.startY,r+=5,o-=3,e.beginPath(),e.moveTo(r,o),e.lineTo(r,o+5),e.lineTo(r+5,o+5),e.stroke()),e.closeGroup()}removeDurationLines(){var e="vf-"+this.attrs.id+"-lines",t=document.getElementById(e);t&&t.remove()}drawLongDurationLines(e){let t=this.x+this.note_width+this.right_width+10;for(let s=1;s<=this.long_duration_lines;s++)e.fillRect(t+2,this.y-this.full_height/2,this.long_duration_width,2),t+=this.long_duration_space+this.long_duration_width}setStave(e){return super.setStave(e),this}buildToneHeads(){this.offset_x=this.x,this.offset_y=this.y;let e=[];this.note_tones=[];for(let t=0;t<this.keys.length;t++){const s=new NumberedNoteHead({key:this.keys[t],x:this.ornament?this.note_x+12:this.note_x,y:this.ornament?this.offset_y-this.note_height:this.offset_y,idx:t,note:this});this.offset_y-=s.height+this.head_space,this.note_tones.push(s),e.push(this.offset_y);try{if(t===0&&window&&window.sett&&window.sett.keySignature){const r=NumberedNote.accidentalAndKey(tone)[s.meta.key],o=this.modifiers.find(l=>l.getAttribute("type")==="Accidental"),a=this.modifiers.findIndex(l=>l.getAttribute("type")==="Accidental");r&&a>-1?this.modifiers[a].accidental.code=r==="#"?"v18":"v44":this.modifiers.splice(a,1)}}catch(r){console.log("🚀 ~ error",r)}}this.setYs(e)}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 e=this;return(this.y||0)-(e.note_tones.map(s=>(s.td+s.bd)*(e.dot_space+e.dot_width)).reduce((s,r)=>s+r,0)+this.note_height*this.note_tones.length-this.unit_height-this.note_tones[0].bd*(e.dot_space+e.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(Dot.CATEGORY).length}getModifiersByCategory(e){var t=[];return this.modifiers.forEach(s=>{s.getCategory()===e&&t.push(s)}),t}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 e=0;return this.modifiers.forEach(t=>{e+=t.getWidth()}),e}}class NumberedNoteHead{static get numberedNotationMapping(){let e=tone;switch(window&&window.sett&&window.sett.keySignature&&(e="C"),e){case"A":return{C:"3",D:"4",E:"5",F:"6",G:"7",A:"1",B:"2",R:"0",min:2.5,max:5.5};case"B":return{C:"2",D:"3",E:"4",F:"5",G:"6",A:"7",B:"1",R:"0",min:-.5,max:2.5};case"D":return{C:"7",D:"1",E:"2",F:"3",G:"4",A:"5",B:"6",R:"0",min:.5,max:3.5};case"E":return{C:"6",D:"7",E:"1",F:"2",G:"3",A:"4",B:"5",R:"0",min:1,max:4};case"F":return{C:"5",D:"6",E:"7",F:"1",G:"2",A:"3",B:"4",R:"0",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",min:2,max:5};case"Eb":return{C:"6",D:"7",E:"1",F:"2",G:"3",A:"4",B:"5",R:"0",min:1,max:4};case"D#":case"Db":return{C:"7",D:"1",E:"2",F:"3",G:"4",A:"5",B:"6",R:"0",min:.5,max:3.5};case"F#":return{C:"5",D:"6",E:"7",F:"1",G:"2",A:"3",B:"4",R:"0",min:1.5,max:4.5};case"Ab":case"G#":return{C:"3",D:"4",E:"5",F:"6",G:"7",A:"1",B:"2",R:"0",min:-1,max:2};case"Bb":case"A#":return{C:"2",D:"3",E:"4",F:"5",G:"6",A:"7",B:"1",R:"0",min:-.5,max:2.5};case"C#":case"Cb":default:return{C:"1",D:"2",E:"3",F:"4",G:"5",A:"6",B:"7",R:"0",min:0,max:3}}}tone_to_numbered_key(){var e=this.key.split("/"),t=e[0];t==="b"&&(t="R"),t=t.replace(new RegExp("#","g"),""),t=t.replace(new RegExp("n","g"),""),t.length>1&&(t=t.replace(new RegExp("b","g"),""));let s=0,r=0;this.note.stave&&this.note.stave.options&&this.note.stave.options.keySignature&&(tone=this.note.stave.options.keySignature);const o=this.note.getLine();return o<NumberedNoteHead.numberedNotationMapping.min&&(s=Math.ceil(Math.abs((o-NumberedNoteHead.numberedNotationMapping.min)/3.5))),o>NumberedNoteHead.numberedNotationMapping.max&&(r=Math.ceil((o-NumberedNoteHead.numberedNotationMapping.max)/3.5)),t.toUpperCase()==="R"&&(s=0,r=0),{key:NumberedNoteHead.numberedNotationMapping[t.toUpperCase()],td:r,bd:s}}constructor(e){this.key=e.key,this.x=e.x||0,this.y=e.y||0,this.idx=e.idx||0,this.note=e.note||0,this.meta=this.tone_to_numbered_key(),this.noteSize=e.noteSize||16,this.td=this.meta.td,this.bd=this.meta.bd}draw(e){let t=this.y;e.openGroup("numbered-note-head");var s=this.x+(this.note.ornament?-2:0);let r=t-this.note.unit_height-this.note.dot_space-(this.note.ornament?-4:2);for(let a=0;a<this.meta.td;a++)this.draw_dot(e,s+_text_width-1,r,this.note.dot_width),r-=this.note.dot_width+this.note.dot_space+4;new Glyph("v"+this.meta.key,this.note.ornament?30:40).render(e,s+1,t),t+=this.note.dot_space+this.note.dot_width-(this.note.ornament?2:0);for(let a=0;a<this.meta.bd;a++){if(this.idx===0){let l=this.note.duration_lines*(this.note.duration_line_height+this.note.duration_line_space);this.note.duration_lines>1&&(l-=this.note.duration_line_space),t+=l}this.draw_dot(e,s+_text_width,t,this.note.dot_width),t+=this.note.dot_width+this.note.dot_space}e.closeGroup()}get height(){return this.note.note_height+(this.meta.bd+this.meta.td)*(this.note.dot_width+this.note.dot_space)}draw_dot(e,t,s,r){e.openGroup("numbered-note-dot"),e.beginPath(),e.arc(t,s,r,0,2*Math.PI),e.closePath(),e.fill(),e.closeGroup()}}function L(...i){Factory.DEBUG&&Vex.L("Vex.Flow.Factory",i)}const X=Vex.MakeException("FactoryError");function setDefaults$1(i={},e){const t=e.options;return i=Object.assign(e,i),i.options=Object.assign(t,i.options),i}class Factory{constructor(e){L("New factory: ",e);const t={stave:{space:10},renderer:{context:null,elementId:"",backend:Renderer.Backends.SVG,width:500,height:200,background:"#FFF"},font:{face:"Arial",point:10,style:""}};this.options=t,this.setOptions(e)}static newFromElementId(e,t=500,s=200){return new Factory({renderer:{elementId:e,width:t,height:s}})}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=null}getOptions(){return this.options}setOptions(e){for(const t of["stave","renderer","font"])Object.assign(this.options[t],e[t]);(this.options.renderer.elementId!==null||this.options.renderer.context)&&this.initRenderer(),this.reset()}initRenderer(){const{elementId:e,backend:t,width:s,height:r,background:o}=this.options.renderer;if(e==="")throw new X("HTML DOM element not set in Factory");this.context=Renderer.buildContext(e,t,s,r,o)}getContext(){return this.context}setContext(e){return this.context=e,this}getStave(){return this.stave}getVoices(){return this.voices}space(e){return this.options.stave.space*e}Stave(e){e=setDefaults$1(e,{x:0,y:0,width:this.options.renderer.width-this.space(1),options:{spacing_between_lines_px:this.options.stave.space}});const t=new Stave(e.x,e.y,e.width,e.options);return this.staves.push(t),t.setContext(this.context),this.stave=t,t}TabStave(e){e=setDefaults$1(e,{x:0,y:0,width:this.options.renderer.width-this.space(1),options:{spacing_between_lines_px:this.options.stave.space*1.3}});const t=new TabStave(e.x,e.y,e.width,e.options);return this.staves.push(t),t.setContext(this.context),this.stave=t,t}StaveNote(e){const t=new StaveNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GhostNote(e){const t=new GhostNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TextNote(e){const t=new TextNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}NumberedNote(e){const t=new NumberedNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}BarNote(e){e=setDefaults$1(e,{type:"single",options:{}});const t=new BarNote(e.type);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}ClefNote(e){e=setDefaults$1(e,{type:"treble",options:{size:"default"}});const t=new ClefNote(e.type,e.options.size,e.options.annotation);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TimeSigNote(e){e=setDefaults$1(e,{time:"4/4",options:{}});const t=new TimeSigNote(e.time);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}KeySigNote(e){const t=new KeySigNote(e.key,e.cancelKey,e.alterKey);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}TabNote(e){const t=new TabNote$1(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}GraceNote(e){const t=new GraceNote(e);return this.stave&&t.setStave(this.stave),t.setContext(this.context),t}GraceNoteGroup(e){const t=new GraceNoteGroup(e.notes,e.slur);return t.setContext(this.context),t}Accidental(e){e=setDefaults$1(e,{type:null,options:{}});const t=new Accidental(e.type);return t.setContext(this.context),t}Annotation(e){e=setDefaults$1(e,{text:"p",vJustify:"below",hJustify:"center",fontFamily:"Times",fontSize:14,fontWeight:"bold italic",options:{}});const t=new Annotation(e.text);return t.setJustification(e.hJustify),t.setVerticalJustification(e.vJustify),t.setFont(e.fontFamily,e.fontSize,e.fontWeight),t.setContext(this.context),t}Articulation(e){e=setDefaults$1(e,{type:"a.",position:"above",options:{}});const t=new Articulation$1(e.type);return t.setPosition(e.position),t.setContext(this.context),t}TextDynamics(e){e=setDefaults$1(e,{text:"p",duration:"q",dots:0,line:0,options:{}});const t=new TextDynamics({text:e.text,line:e.line,duration:e.duration,dots:e.dots});return this.stave&&t.setStave(this.stave),t.setContext(this.context),this.renderQ.push(t),t}Fingering(e){e=setDefaults$1(e,{number:"0",position:"left",options:{}});const t=new FretHandFinger(e.number);return t.setPosition(e.position),t.setContext(this.context),t}StringNumber(e){e=setDefaults$1(e,{number:"0",position:"left",options:{}});const t=new StringNumber(e.number);return t.setPosition(e.position),t.setContext(this.context),t}TickContext(){return new TickContext().setContext(this.context)}ModifierContext(){return new ModifierContext}MultiMeasureRest(e){const t=new MultiMeasureRest(e.number_of_measures,e);return t.setContext(this.context),this.renderQ.push(t),t}Voice(e){e=setDefaults$1(e,{time:"4/4",options:{}});const t=new Voice$1(e.time);return this.voices.push(t),t}StaveConnector(e){e=setDefaults$1(e,{top_stave:null,bottom_stave:null,type:"double",options:{}});const t=new StaveConnector(e.top_stave,e.bottom_stave);return t.setType(e.type).setContext(this.context),this.renderQ.push(t),t}Formatter(){return new Formatter}Tuplet(e){e=setDefaults$1(e,{notes:[],options:{}});const t=new Tuplet$1(e.notes,e.options).setContext(this.context);return this.renderQ.push(t),t}Beam(e){e=setDefaults$1(e,{notes:[],options:{autoStem:!1,secondaryBeamBreaks:[]}});const t=new Beam$1(e.notes,e.options.autoStem).setContext(this.context);return t.breakSecondaryAt(e.options.secondaryBeamBreaks),this.renderQ.push(t),t}Curve(e){e=setDefaults$1(e,{from:null,to:null,options:{}});const t=new Curve(e.from,e.to,e.options).setContext(this.context);return this.renderQ.push(t),t}StaveTie(e){e=setDefaults$1(e,{from:null,to:null,first_indices:[0],last_indices:[0],text:null,options:{direction:void 0}});const t=new StaveTie({first_note:e.from,last_note:e.to,first_indices:e.first_indices,last_indices:e.last_indices},e.text);return e.options.direction&&t.setDirection(e.options.direction),t.setContext(this.context),this.renderQ.push(t),t}StaveLine(e){e=setDefaults$1(e,{from:null,to:null,first_indices:[0],last_indices:[0],options:{}});const t=new StaveLine({first_note:e.from,last_note:e.to,first_indices:e.first_indices,last_indices:e.last_indices});return e.options.text&&t.setText(e.options.text),e.options.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}VibratoBracket(e){e=setDefaults$1(e,{from:null,to:null,options:{harsh:!1}});const t=new VibratoBracket({start:e.from,stop:e.to});return e.options.line&&t.setLine(e.options.line),e.options.harsh&&t.setHarsh(e.options.harsh),t.setContext(this.context),this.renderQ.push(t),t}TextBracket(e){e=setDefaults$1(e,{from:null,to:null,text:"",options:{superscript:"",position:1}});const t=new TextBracket({start:e.from,stop:e.to,text:e.text,superscript:e.options.superscript,position:e.options.position});return e.options.line&&t.setLine(e.options.line),e.options.font&&t.setFont(e.options.font),t.setContext(this.context),this.renderQ.push(t),t}System(e={}){e.factory=this;const t=new System(e).setContext(this.context);return this.systems.push(t),t}EasyScore(e={}){return e.factory=this,new EasyScore(e)}PedalMarking(e={}){e=setDefaults$1(e,{notes:[],options:{style:"mixed"}});const t=new PedalMarking(e.notes);return t.setStyle(PedalMarking.StylesString[e.options.style]),t.setContext(this.context),this.renderQ.push(t),t}NoteSubGroup(e={}){e=setDefaults$1(e,{notes:[],options:{}});const t=new NoteSubGroup$1(e.notes);return t.setContext(this.context),t}draw(){this.systems.forEach(e=>e.setContext(this.context).format()),this.staves.forEach(e=>e.setContext(this.context).draw()),this.voices.forEach(e=>e.setContext(this.context).draw()),this.renderQ.forEach(e=>{e.isRendered()||e.setContext(this.context).draw()}),this.systems.forEach(e=>e.setContext(this.context).draw()),this.reset()}}function setDefaults(i,e){const t=e.options;return i=Object.assign(e,i),i.options=Object.assign(t,i.options),i}class System extends Element$1{constructor(e={}){super(),this.setAttribute("type","System"),this.setOptions(e),this.parts=[]}setOptions(e={}){this.options=setDefaults(e,{x:10,y:10,width:500,connector:null,spaceBetweenStaves:12,factory:null,debugFormatter:!1,formatIterations:0,options:{}}),this.factory=this.options.factory||new Factory({renderer:{el:null}})}setContext(e){return super.setContext(e),this.factory.setContext(e),this}addConnector(e="double"){return this.connector=this.factory.StaveConnector({top_stave:this.parts[0].stave,bottom_stave:this.parts[this.parts.length-1].stave,type:e}),this.connector}addStave(e){return e=setDefaults(e,{stave:null,voices:[],spaceAbove:0,spaceBelow:0,debugNoteMetrics:!1,options:{left_bar:!1}}),e.stave||(e.stave=this.factory.Stave({x:this.options.x,y:this.options.y,width:this.options.width,options:e.options})),e.voices.forEach(t=>t.setContext(this.context).setStave(e.stave).getTickables().forEach(s=>s.setStave(e.stave))),this.parts.push(e),e.stave}format(){const e=new Formatter;this.formatter=e;let t=this.options.y,s=0,r=[];const o=[];this.parts.forEach(l=>{t=t+l.stave.space(l.spaceAbove),l.stave.setY(t),e.joinVoices(l.voices),t=t+l.stave.space(l.spaceBelow),t=t+l.stave.space(this.options.spaceBetweenStaves),l.debugNoteMetrics&&(o.push({y:t,voice:l.voices[0]}),t+=15),r=r.concat(l.voices),s=Math.max(s,l.stave.getNoteStartX())}),this.parts.forEach(l=>l.stave.setNoteStartX(s));const a=this.options.width-(s-this.options.x)-Note.STAVEPADDING;e.format(r,a);for(let l=0;l<this.options.formatIterations;l++)e.tune();this.startX=s,this.debugNoteMetricsYs=o,this.lastY=t}draw(){const e=this.checkContext();this.setRendered(),this.options.debugFormatter&&Formatter.plotDebugging(e,this.formatter,this.startX,this.options.y,this.lastY),this.debugNoteMetricsYs.forEach(t=>{t.voice.getTickables().forEach(s=>Note.plotMetrics(e,s,t.y))})}}Vex.Flow=Flow;Vex.Flow.Element=Element$1;Vex.Flow.Fraction=Fraction;Vex.Flow.Renderer=Renderer;Vex.Flow.Formatter=Formatter;Vex.Flow.Music=Music;Vex.Flow.Glyph=Glyph;Vex.Flow.Stave=Stave;Vex.Flow.StaveNote=StaveNote;Vex.Flow.StaveModifier=StaveModifier;Vex.Flow.StaveTempo=StaveTempo;Vex.Flow.Voice=Voice$1;Vex.Flow.Accidental=Accidental;Vex.Flow.Beam=Beam$1;Vex.Flow.StaveTie=StaveTie;Vex.Flow.TabStave=TabStave;Vex.Flow.TabNote=TabNote$1;Vex.Flow.Bend=Bend;Vex.Flow.Vibrato=Vibrato;Vex.Flow.VibratoBracket=VibratoBracket;Vex.Flow.Note=Note;Vex.Flow.ModifierContext=ModifierContext;Vex.Flow.MultiMeasureRest=MultiMeasureRest;Vex.Flow.TickContext=TickContext;Vex.Flow.Articulation=Articulation$1;Vex.Flow.Annotation=Annotation;Vex.Flow.Barline=Barline;Vex.Flow.NoteHead=NoteHead;Vex.Flow.StaveConnector=StaveConnector;Vex.Flow.ClefNote=ClefNote;Vex.Flow.KeySignature=KeySignature;Vex.Flow.KeySigNote=KeySigNote;Vex.Flow.TimeSignature=TimeSignature;Vex.Flow.TimeSigNote=TimeSigNote;Vex.Flow.Stem=Stem;Vex.Flow.TabTie=TabTie;Vex.Flow.Clef=Clef;Vex.Flow.Dot=Dot;Vex.Flow.Modifier=Modifier;Vex.Flow.TabSlide=TabSlide;Vex.Flow.Tuplet=Tuplet$1;Vex.Flow.GraceNote=GraceNote;Vex.Flow.GraceTabNote=GraceTabNote;Vex.Flow.Tuning=Tuning;Vex.Flow.KeyManager=KeyManager;Vex.Flow.StaveHairpin=StaveHairpin;Vex.Flow.BoundingBox=BoundingBox;Vex.Flow.Stroke=Stroke;Vex.Flow.TextNote=TextNote;Vex.Flow.Curve=Curve;Vex.Flow.TextDynamics=TextDynamics;Vex.Flow.StaveLine=StaveLine;Vex.Flow.Ornament=Ornament;Vex.Flow.PedalMarking=PedalMarking;Vex.Flow.TextBracket=TextBracket;Vex.Flow.FretHandFinger=FretHandFinger;Vex.Flow.Repetition=Repetition$1;Vex.Flow.BarNote=BarNote;Vex.Flow.GhostNote=GhostNote;Vex.Flow.NoteSubGroup=NoteSubGroup$1;Vex.Flow.GraceNoteGroup=GraceNoteGroup;Vex.Flow.Tremolo=Tremolo;Vex.Flow.StringNumber=StringNumber;Vex.Flow.Crescendo=Crescendo;Vex.Flow.Volta=Volta;Vex.Flow.Font=Font;Vex.Flow.System=System;Vex.Flow.Factory=Factory;Vex.Flow.Parser=Parser;Vex.Flow.EasyScore=EasyScore;Vex.Flow.Registry=Registry;var SystemLinesEnum=(i=>(i[i.SingleThin=0]="SingleThin",i[i.DoubleThin=1]="DoubleThin",i[i.ThinBold=2]="ThinBold",i[i.BoldThinDots=3]="BoldThinDots",i[i.DotsThinBold=4]="DotsThinBold",i[i.DotsBoldBoldDots=5]="DotsBoldBoldDots",i[i.None=6]="None",i[i.Dotted=7]="Dotted",i[i.Dashed=8]="Dashed",i[i.Bold=9]="Bold",i[i.BoldThin=10]="BoldThin",i[i.DoubleBold=11]="DoubleBold",i[i.Tick=12]="Tick",i[i.Short=13]="Short",i))(SystemLinesEnum||{});class SystemLinesEnumHelper{static xmlBarlineStyleToSystemLinesEnum(e){return e==="regular"?0:e==="dotted"?7:e==="dashed"?8:e==="heavy"?9:e==="light-light"?1:e==="light-heavy"?2:e==="heavy-light"?10:e==="heavy-heavy"?11:e==="tick"?12:e==="short"?13:e==="none"?6:0}}class Matrix2D{constructor(){this.matrix=[];for(let e=0;e<2;e++){this.matrix[e]=[];for(let t=0;t<2;t++)this.matrix[e][t]=0}}static getRotationMatrix(e){const t=new Matrix2D,s=Math.cos(e),r=Math.sin(e);return t.matrix[0][0]=s,t.matrix[0][1]=-r,t.matrix[1][0]=r,t.matrix[1][1]=s,t}scalarMultiplication(e){for(let t=0;t<2;t++)for(let s=0;s<2;s++)this.matrix[t][s]*=e}getTransposeMatrix(){const e=new Matrix2D;for(let t=0;t<2;t++)for(let s=0;s<2;s++)e.matrix[t][s]=this.matrix[s][t];return e}vectorMultiplication(e){const t=new PointF2D;return t.x=e.x*this.matrix[0][0]+e.y*this.matrix[0][1],t.y=e.x*this.matrix[1][0]+e.y*this.matrix[1][1],t}}class MusicSheetErrors{constructor(){this.measureErrors={},this.errors=[],this.tempErrors=[]}finalizeMeasure(e){let t=this.measureErrors[e];t||(t=[]),this.measureErrors[e]=t.concat(this.tempErrors),this.tempErrors=[]}pushMeasureError(e){this.tempErrors.push(e)}push(e){this.errors.push(e)}}class Arpeggio{constructor(e,t=7){this.parentVoiceEntry=e,this.type=t,this.notes=[]}addNote(e){this.notes.push(e),e.Arpeggio=this}}var ArpeggioType=(i=>(i[i.BRUSH_DOWN=1]="BRUSH_DOWN",i[i.BRUSH_UP=2]="BRUSH_UP",i[i.ROLL_DOWN=3]="ROLL_DOWN",i[i.ROLL_UP=4]="ROLL_UP",i[i.RASQUEDO_DOWN=5]="RASQUEDO_DOWN",i[i.RASQUEDO_UP=6]="RASQUEDO_UP",i[i.ARPEGGIO_DIRECTIONLESS=7]="ARPEGGIO_DIRECTIONLESS",i))(ArpeggioType||{});class Beam{constructor(e=1,t=0){this.notes=[],this.extendedNoteList=[],this.BeamNumberOffsetToXML=0,this.BeamNumber=e,this.BeamNumberOffsetToXML=t}get Notes(){return this.notes}set Notes(e){this.notes=e}get ExtendedNoteList(){return this.extendedNoteList}set ExtendedNoteList(e){this.extendedNoteList=e}addNoteToBeam(e){e&&(e.NoteBeam=this,this.notes.push(e),this.extendedNoteList.push(e))}}class Voice{constructor(e,t){this.voiceEntries=[],this.volume=1,this.parent=e,this.visible=!0,this.audible=!0,this.following=!0,this.voiceId=t,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(e){this.visible=e}get Audible(){return this.audible}set Audible(e){this.audible=e}get Following(){return this.following}set Following(e){this.following=e}get Solo(){return this.solo}set Solo(e){this.solo=e}get VoiceId(){return this.voiceId}get Volume(){return this.volume}set Volume(e){this.volume=e}toString(){return this.uniqueVoiceId}}class LinkedVoice extends Voice{constructor(e,t,s){super(e,t),this.master=s}get Master(){return this.master}}class Notehead{constructor(e,t,s=void 0){this.sourceNote=e,this.setShapeFromXml(t,s)}setShapeFromXml(e,t=void 0){this.shape=Notehead.ShapeTypeXmlToShape(e);let s=t;s===void 0&&(this.sourceNote?s=this.sourceNote.Length.Denominator>2:(loglevelExports.warn("notehead: sourceNote and filledXmlAttribute undefined."),s=!0)),this.filled=s}get SourceNote(){return this.sourceNote}get Shape(){return this.shape}get Filled(){return this.filled}static ShapeTypeXmlToShape(e){switch(e.toLowerCase()){case"normal":return 2;case"x":return 7;case"slash":return 4;case"diamond":return 1;case"square":return 5;case"la":return 5;case"do":case"triangle":return 6;case"rectangle":return 3;case"circle-x":return 0;default:return loglevelExports.info("unsupported/unhandled xml notehead '"+e+"'. Using normal notehead."),2}}}var NoteHeadShape=(i=>(i[i.CIRCLEX=0]="CIRCLEX",i[i.DIAMOND=1]="DIAMOND",i[i.NORMAL=2]="NORMAL",i[i.RECTANGLE=3]="RECTANGLE",i[i.SLASH=4]="SLASH",i[i.SQUARE=5]="SQUARE",i[i.TRIANGLE=6]="TRIANGLE",i[i.X=7]="X",i))(NoteHeadShape||{});class ITextTranslation{static translateText(e,t){if(!this.defaultTextTranslation)return t}}var NoteType=(i=>(i[i.UNDEFINED=0]="UNDEFINED",i[i._1024th=1]="_1024th",i[i._512th=2]="_512th",i[i._256th=3]="_256th",i[i._128th=4]="_128th",i[i._64th=5]="_64th",i[i._32nd=6]="_32nd",i[i._16th=7]="_16th",i[i.EIGTH=8]="EIGTH",i[i.QUARTER=9]="QUARTER",i[i.HALF=10]="HALF",i[i.WHOLE=11]="WHOLE",i[i.BREVE=12]="BREVE",i[i.LONG=13]="LONG",i[i.MAXIMA=14]="MAXIMA",i))(NoteType||{});class NoteTypeHandler{static NoteTypeToString(e){return this.NoteTypeXmlValues[e]}static StringToNoteType(e){const t=this.NoteTypeXmlValues.indexOf(e);return t!==-1?t:0}static getNoteDurationFromType(e){switch(e){case"1024th":return new Fraction$1(1,1024);case"512th":return new Fraction$1(1,512);case"256th":return new Fraction$1(1,256);case"128th":return new Fraction$1(1,128);case"64th":return new Fraction$1(1,64);case"32th":case"32nd":return new Fraction$1(1,32);case"16th":return new Fraction$1(1,16);case"eighth":return new Fraction$1(1,8);case"quarter":return new Fraction$1(1,4);case"half":return new Fraction$1(1,2);case"whole":return new Fraction$1(1,1);case"breve":return new Fraction$1(2,1);case"long":return new Fraction$1(4,1);case"maxima":return new Fraction$1(8,1);default:{const t=ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid note duration.");throw new MusicSheetReadingException(t)}}}}NoteTypeHandler.NoteTypeXmlValues=["","1024th","512th","256th","128th","64th","32nd","16th","eigth","quarter","half","whole","breve","long","maxima"];class OrnamentContainer{constructor(e){this.placement=PlacementEnum.Above,this.accidentalAbove=AccidentalEnum.NONE,this.accidentalBelow=AccidentalEnum.NONE,this.ornament=e}get GetOrnament(){return this.ornament}get AccidentalAbove(){return this.accidentalAbove}set AccidentalAbove(e){this.accidentalAbove=e}get AccidentalBelow(){return this.accidentalBelow}set AccidentalBelow(e){this.accidentalBelow=e}}var OrnamentEnum=(i=>(i[i.Trill=0]="Trill",i[i.Turn=1]="Turn",i[i.InvertedTurn=2]="InvertedTurn",i[i.DelayedTurn=3]="DelayedTurn",i[i.DelayedInvertedTurn=4]="DelayedInvertedTurn",i[i.Mordent=5]="Mordent",i[i.InvertedMordent=6]="InvertedMordent",i))(OrnamentEnum||{});class VerticalSourceStaffEntryContainer{constructor(e,t,s){this.staffEntries=[],this.comments=[],this.timestamp=t,this.staffEntries=new Array(s),this.parentMeasure=e}$get$(e){return this.staffEntries[e]}$set$(e,t){this.staffEntries[e]=t}get Timestamp(){return this.timestamp}set Timestamp(e){this.timestamp=e}get StaffEntries(){return this.staffEntries}set StaffEntries(e){this.staffEntries=e}get Comments(){return this.comments}set Comments(e){this.comments=e}get ParentMeasure(){return this.parentMeasure}set ParentMeasure(e){this.parentMeasure=e}getAbsoluteTimestamp(){return Fraction$1.plus(this.timestamp,this.parentMeasure.AbsoluteTimestamp)}}class SourceStaffEntry{constructor(e,t){this.voiceEntries=[],this.instructions=[],this.chordSymbolContainers=[],this.verticalContainerParent=e,this.parentStaff=t}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 Fraction$1.plus(this.VerticalContainerParent.ParentMeasure.AbsoluteTimestamp,this.VerticalContainerParent.Timestamp)}get VoiceEntries(){return this.voiceEntries}set VoiceEntries(e){this.voiceEntries=e}get Link(){return this.staffEntryLink}set Link(e){this.staffEntryLink=e}get Instructions(){return this.instructions}set Instructions(e){this.instructions=e}get ChordContainers(){return this.chordSymbolContainers}set ChordContainers(e){this.chordSymbolContainers=e}removeAllInstructionsOfTypeClefInstruction(){let e=0,t=0;for(;e<this.instructions.length;)this.instructions[e]instanceof ClefInstruction?(this.instructions.splice(e,1),t++):e++;return t}removeFirstInstructionOfTypeClefInstruction(){for(let e=0;e<this.instructions.length;e++)if(this.instructions[e]instanceof ClefInstruction)return this.instructions.splice(e,1),!0;return!1}removeAllInstructionsOfTypeKeyInstruction(){let e=0,t=0;for(;e<this.instructions.length;)this.instructions[e]instanceof KeyInstruction?(this.instructions.splice(e,1),t++):e++;return t}removeFirstInstructionOfTypeKeyInstruction(){for(let e=0;e<this.instructions.length;e++)if(this.instructions[e]instanceof KeyInstruction)return this.instructions.splice(e,1),!0;return!1}removeAllInstructionsOfTypeRhythmInstruction(){let e=0,t=0;for(;e<this.instructions.length;)this.instructions[e]instanceof RhythmInstruction?(this.instructions.splice(e,1),t++):e++;return t}removeFirstInstructionOfTypeRhythmInstruction(){for(let e=0;e<this.instructions.length;e++)if(this.instructions[e]instanceof RhythmInstruction)return this.instructions.splice(e,1),!0;return!1}calculateMinNoteLength(){let e=new Fraction$1(Number.MAX_VALUE,1);for(let t=0,s=this.VoiceEntries.length;t<s;++t){const r=this.VoiceEntries[t];for(let o=0,a=r.Notes.length;o<a;++o){const l=r.Notes[o];l.Length.lt(e)&&(e=l.Length)}}return e}calculateMaxNoteLength(){let e=new Fraction$1(0,1);for(let t=0,s=this.VoiceEntries.length;t<s;++t){const r=this.VoiceEntries[t];for(let o=0,a=r.Notes.length;o<a;++o){const l=r.Notes[o];if(l.NoteTie){const c=Fraction$1.createFromFraction(l.Length);let d=!1;for(const m of l.NoteTie.Notes){if(m===l){d=!0;continue}d&&c.Add(m.Length)}e.lt(c)&&(e=c)}else e.lt(l.Length)&&(e=l.Length)}}return e}hasNotes(){for(let e=0,t=this.VoiceEntries.length;e<t;++e)if(this.VoiceEntries[e].Notes.length>0)return!0;return!1}hasTie(){for(let e=0,t=this.VoiceEntries.length;e<t;++e)if(this.VoiceEntries[e].hasTie())return!0;return!1}findLinkedNotes(e){for(let t=0,s=this.voiceEntries.length;t<s;++t){const r=this.voiceEntries[t];for(let o=0,a=r.Notes.length;o<a;++o){const l=r.Notes[o];l.ParentStaffEntry===this&&e.push(l)}}}get hasOnlyRests(){for(const e of this.voiceEntries)for(const t of e.Notes)if(!t.isRest)return!1;return!0}}class RepetitionInstructionComparer{static Compare(e,t){if(e.parentRepetition!==void 0&&t.parentRepetition){if(e.alignment===1&&t.alignment===1){if(e.parentRepetition.StartIndex<t.parentRepetition.StartIndex)return 1;if(e.parentRepetition.StartIndex>t.parentRepetition.StartIndex)return-1}if(e.alignment===0&&t.alignment===0){if(e.parentRepetition.EndIndex<t.parentRepetition.EndIndex)return 1;if(e.parentRepetition.EndIndex>t.parentRepetition.EndIndex)return-1}}return 0}}class RepetitionInstruction{constructor(e,t,s=1,r=void 0,o=void 0){this.endingIndices=void 0,this.measureIndex=e,o&&(this.endingIndices=o.slice()),this.type=t,this.alignment=s,this.parentRepetition=r}CompareTo(e){const t=e;if(this.measureIndex>t.measureIndex)return 1;if(this.measureIndex<t.measureIndex)return-1;if(this.alignment===0){if(t.alignment===1)return-1;switch(this.type){case 3:return 1;case 0:return t.type===3?-1:1;case 12:case 13:return t.type===12?1:-1}}else{if(t.alignment===0)return 1;switch(this.type){case 3:return-1;case 6:case 7:return t.type===3?1:-1;case 1:switch(t.type){case 3:case 6:case 7:return 1}return-1;case 8:case 9:case 10:case 11:case 4:case 5:case 2:return 1}}return 0}equals(e){if(this.measureIndex!==e.measureIndex||this.type!==e.type||this.alignment!==e.alignment)return!1;if(this.endingIndices===e.endingIndices)return!0;if(!this.endingIndices||!e.endingIndices||this.endingIndices.length!==e.endingIndices.length)return!1;for(let t=0;t<this.endingIndices.length;t++)if(this.endingIndices[t]!==e.endingIndices[t])return!1;return!0}}var RepetitionInstructionEnum=(i=>(i[i.StartLine=0]="StartLine",i[i.ForwardJump=1]="ForwardJump",i[i.BackJumpLine=2]="BackJumpLine",i[i.Ending=3]="Ending",i[i.DaCapo=4]="DaCapo",i[i.DalSegno=5]="DalSegno",i[i.Fine=6]="Fine",i[i.ToCoda=7]="ToCoda",i[i.DalSegnoAlFine=8]="DalSegnoAlFine",i[i.DaCapoAlFine=9]="DaCapoAlFine",i[i.DalSegnoAlCoda=10]="DalSegnoAlCoda",i[i.DaCapoAlCoda=11]="DaCapoAlCoda",i[i.Coda=12]="Coda",i[i.Segno=13]="Segno",i[i.None=14]="None",i))(RepetitionInstructionEnum||{}),AlignmentType=(i=>(i[i.Begin=0]="Begin",i[i.End=1]="End",i))(AlignmentType||{});let prevSourceMeasure=null;class SourceMeasure{constructor(e,t){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.completeNumberOfStaves=e,this.implicitMeasure=!1,this.hasEndLine=!1,this.endingBarStyleXml="",this.endingBarStyleEnum=SystemLinesEnum.SingleThin,this.firstInstructionsStaffEntries=new Array(e),this.lastInstructionsStaffEntries=new Array(e),this.rules=t,this.TempoInBPM=0;for(let s=0;s<e;s++)this.graphicalMeasureErrors.push(!1),this.staffLinkedExpressions.push([])}get MeasureNumber(){return this.measureNumber}set MeasureNumber(e){this.measureNumber=e}getPrintedMeasureNumber(){return this.rules.UseXMLMeasureNumbers&&Number.isInteger(this.MeasureNumberXML)?(this.MeasureNumberPrinted=this.MeasureNumberXML,this.MeasureNumberPrinted):(this.MeasureNumberPrinted=this.MeasureNumber,this.MeasureNumberPrinted)}get AbsoluteTimestamp(){return this.absoluteTimestamp}set AbsoluteTimestamp(e){this.absoluteTimestamp=e}get CompleteNumberOfStaves(){return this.completeNumberOfStaves}get Duration(){return this.duration}set Duration(e){this.duration=e}get ActiveTimeSignature(){return this.activeTimeSignature}set ActiveTimeSignature(e){this.activeTimeSignature=e}get ImplicitMeasure(){return this.implicitMeasure}set ImplicitMeasure(e){this.implicitMeasure=e}get HasEndLine(){return this.hasEndLine}set HasEndLine(e){this.hasEndLine=e}get StaffLinkedExpressions(){return this.staffLinkedExpressions}get TempoExpressions(){return this.tempoExpressions}get VerticalSourceStaffEntryContainers(){return this.verticalSourceStaffEntryContainers}get FirstInstructionsStaffEntries(){return this.firstInstructionsStaffEntries}get LastInstructionsStaffEntries(){return this.lastInstructionsStaffEntries}get FirstRepetitionInstructions(){return this.firstRepetitionInstructions}get LastRepetitionInstructions(){return this.lastRepetitionInstructions}getErrorInMeasure(e){return this.graphicalMeasureErrors[e]}setErrorInGraphicalMeasure(e,t){this.graphicalMeasureErrors[e]=t}getNextMeasure(e){return e[this.measureListIndex+1]}getPreviousMeasure(e){if(this.measureListIndex>1)return e[this.measureListIndex-1]}get Rules(){return this.rules}get VerticalMeasureList(){return this.verticalMeasureList}set VerticalMeasureList(e){this.verticalMeasureList=e}get TempoInBPM(){return this.tempoInBPM}set TempoInBPM(e){this.tempoInBPM=e}findOrCreateStaffEntry(e,t,s){let r,o;for(const l of this.verticalSourceStaffEntryContainers)if(l.Timestamp.Equals(e)){o=l;break}if(o)return o.StaffEntries[t]?r=o.StaffEntries[t]:(r=new SourceStaffEntry(o,s),o.StaffEntries[t]=r),{createdNewContainer:!1,staffEntry:r};const a=this.verticalSourceStaffEntryContainers[this.verticalSourceStaffEntryContainers.length-1];if(this.verticalSourceStaffEntryContainers.length===0||a.Timestamp.lt(e)){const l=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.push(l),r=new SourceStaffEntry(l,s),l.StaffEntries[t]=r}else for(let l=this.verticalSourceStaffEntryContainers.length-1;l>=0;l--){if(this.verticalSourceStaffEntryContainers[l].Timestamp.lt(e)){const c=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(l+1,0,c),r=new SourceStaffEntry(c,s),c.StaffEntries[t]=r;break}if(l===0){const c=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(l,0,c),r=new SourceStaffEntry(c,s),c.StaffEntries[t]=r;break}}return{createdNewContainer:!0,staffEntry:r}}findOrCreateVoiceEntry(e,t){let s,r=!1;for(const o of e.VoiceEntries)if(o.ParentVoice===t){s=o;break}return s||(s=new VoiceEntry(e.Timestamp,t,e),r=!0),{createdVoiceEntry:r,voiceEntry:s}}getPreviousSourceStaffEntryFromIndex(e,t){for(let s=t-1;s>=0;s--)if(this.verticalSourceStaffEntryContainers[s][e])return this.verticalSourceStaffEntryContainers[s][e]}getVerticalContainerIndexByTimestamp(e){for(let t=0,s=this.VerticalSourceStaffEntryContainers.length;t<s;++t)if(this.VerticalSourceStaffEntryContainers[t].Timestamp.Equals(e))return t;return-1}getVerticalContainerByTimestamp(e){for(let t=0,s=this.VerticalSourceStaffEntryContainers.length;t<s;++t){const r=this.VerticalSourceStaffEntryContainers[t];if(r.Timestamp.Equals(e))return r}}checkForEmptyVerticalContainer(e){let t=0;for(let s=0;s<this.completeNumberOfStaves;s++)this.verticalSourceStaffEntryContainers[e][s]||t++;t===this.completeNumberOfStaves&&this.verticalSourceStaffEntryContainers.splice(e,1)}reverseCheck(e,t){let s=new Fraction$1(0,1);const r=[];for(let o=0;o<e.Instruments.length;o++){let a=new Fraction$1(0,1);const l=e.getGlobalStaffIndexOfFirstStaff(e.Instruments[o]);for(let c=0;c<e.Instruments[o].Staves.length;c++){const d=this.getLastSourceStaffEntryForInstrument(l+c);if(d!==void 0&&!d.hasTie()){const m=this.verticalSourceStaffEntryContainers.indexOf(d.VerticalContainerParent);for(let u=m-1;u>=0;u--){const g=this.verticalSourceStaffEntryContainers[u][l+c];if(g!==void 0&&g.hasTie()&&a.lt(Fraction$1.plus(g.Timestamp,g.calculateMaxNoteLength()))){a=Fraction$1.plus(g.Timestamp,g.calculateMaxNoteLength());break}}}}r.push(a)}for(let o=0,a=r.length;o<a;++o){const l=r[o];s.lt(l)&&(s=l)}return Fraction$1.max(s,t)}calculateInstrumentsDuration(e,t){const s=[];for(let r=0;r<e.Instruments.length;r++){let o=new Fraction$1(0,1);const a=e.getGlobalStaffIndexOfFirstStaff(e.Instruments[r]);for(let l=0;l<e.Instruments[r].Staves.length;l++){const c=this.getLastSourceStaffEntryForInstrument(a+l);c!==void 0&&c.Timestamp&&o.lt(Fraction$1.plus(c.Timestamp,c.calculateMaxNoteLength()))&&(o=Fraction$1.plus(c.Timestamp,c.calculateMaxNoteLength()))}o.lt(t[r])&&(o=t[r]),s.push(o)}return s}getEntriesPerStaff(e){const t=[];for(const s of this.VerticalSourceStaffEntryContainers){const r=s.StaffEntries[e];r&&t.push(r)}return t}hasBeginInstructions(){for(let e=0,t=this.FirstInstructionsStaffEntries.length;e<t;e++){const s=this.FirstInstructionsStaffEntries[e];if(s!==void 0&&s.Instructions.length>0)return!0}return!1}beginsWithLineRepetition(){for(let e=0,t=this.FirstRepetitionInstructions.length;e<t;++e){const s=this.FirstRepetitionInstructions[e];if(s.type===RepetitionInstructionEnum.StartLine||s.parentRepetition!==void 0&&s===s.parentRepetition.startMarker&&!s.parentRepetition.FromWords)return!0}return!1}endsWithLineRepetition(){for(let e=0,t=this.LastRepetitionInstructions.length;e<t;++e){const s=this.LastRepetitionInstructions[e];if(s.type===RepetitionInstructionEnum.BackJumpLine)return!0;const r=s.parentRepetition;if(r&&!r.FromWords)for(let o=0,a=r.BackwardJumpInstructions.length;o<a;++o){const l=r.BackwardJumpInstructions[o];if(s===l)return!0}}return!1}beginsWithWordRepetition(){for(let e=0,t=this.FirstRepetitionInstructions.length;e<t;++e){const s=this.FirstRepetitionInstructions[e];if(s.parentRepetition!==void 0&&s===s.parentRepetition.startMarker&&s.parentRepetition.FromWords)return!0}return!1}endsWithWordRepetition(){for(let e=0,t=this.LastRepetitionInstructions.length;e<t;++e){const s=this.LastRepetitionInstructions[e],r=s.parentRepetition;if(r&&r.FromWords){for(let o=0,a=r.BackwardJumpInstructions.length;o<a;++o){const l=r.BackwardJumpInstructions[o];if(s===l)return!0}if(s===r.forwardJumpInstruction)return!0}}return!1}beginsRepetitionEnding(){for(const e of this.FirstRepetitionInstructions)if(e.type===RepetitionInstructionEnum.Ending&&e.alignment===AlignmentType.Begin)return!0;return!1}endsRepetitionEnding(){for(const e of this.LastRepetitionInstructions)if(e.type===RepetitionInstructionEnum.Ending&&e.alignment===AlignmentType.End)return!0;return!1}getKeyInstruction(e){if(this.FirstInstructionsStaffEntries[e]){const t=this.FirstInstructionsStaffEntries[e];for(let s=0,r=t.Instructions.length;s<r;++s){const o=t.Instructions[s];if(o instanceof KeyInstruction)return o}}}getLastSourceStaffEntryForInstrument(e){let t;for(let s=this.verticalSourceStaffEntryContainers.length-1;s>=0&&(t=this.verticalSourceStaffEntryContainers[s].StaffEntries[e],!t);s--);return t}canBeReducedToMultiRest(){var s,r,o,a,l,c;let e=!0,t=!1;for(const d of this.verticalSourceStaffEntryContainers)if(d){for(const m of d.StaffEntries)if(!(!m||!m.ParentStaff.ParentInstrument.Visible)){if(m.ChordContainers.length>0||(m.ParentStaff.hasLyrics&&(t=!0),this.firstRepetitionInstructions.length>0||this.lastRepetitionInstructions.length>0))return!1;for(const u of m.VoiceEntries){for(const g of u.Notes)if(!g.isRest()){e=!1;break}if(!e)break}}}if(!e||t||this.hasMoodExpressions||this.tempoExpressions.length>0)return!1;for(const d of this.staffLinkedExpressions)if(d.length>0)return!1;for(const d of this.lastInstructionsStaffEntries)for(let m=0,u=d==null?void 0:d.Instructions.length;m<u;++m)if(d.Instructions[m]instanceof ClefInstruction)return!1;return prevSourceMeasure&&(((s=prevSourceMeasure==null?void 0:prevSourceMeasure.ActiveTimeSignature)==null?void 0:s.Numerator)!==((r=this.ActiveTimeSignature)==null?void 0:r.Numerator)||((o=prevSourceMeasure==null?void 0:prevSourceMeasure.ActiveTimeSignature)==null?void 0:o.Denominator)!==((a=this.ActiveTimeSignature)==null?void 0:a.Denominator))?(prevSourceMeasure=this,!1):(prevSourceMeasure=this,((l=this.Duration)==null?void 0:l.RealValue)===((c=this.ActiveTimeSignature)==null?void 0:c.RealValue))}}class Staff{constructor(e,t){this.isTab=!1,this.voices=[],this.volume=1,this.stafflineCount=5,this.hasLyrics=!1,this.openTieDict={},this.parentInstrument=e,this.id=t,this.audible=!0,this.following=!0}get ParentInstrument(){return this.parentInstrument}set ParentInstrument(e){this.parentInstrument=e}get Voices(){return this.voices}get Solo(){return this.solo}set Solo(e){this.solo=e}get Id(){return this.id}get Volume(){return this.volume}set Volume(e){this.volume=e}get StafflineCount(){return this.stafflineCount}set StafflineCount(e){this.stafflineCount=e}toString(){return"Staff "+this.idInMusicSheet.toString()}}class StaffEntryLink{constructor(e){this.linkStaffEntries=[],this.voiceEntry=e}get GetVoiceEntry(){return this.voiceEntry}get LinkStaffEntries(){return this.linkStaffEntries}set LinkStaffEntries(e){this.linkStaffEntries=e}}class Tie{constructor(e,t){this.notes=[],this.TieNumber=1,this.TieDirection=PlacementEnum.NotYetDefined,this.NoteIndexToTieDirection={},this.AddNote(e),this.type=t}getTieDirection(e){if(!e)return this.TieDirection;for(let t=0;t<this.Notes.length;t++)if(this.Notes[t]===e){const r=this.NoteIndexToTieDirection[t];return r||this.TieDirection}return loglevelExports.debug("tie.getTieDuration note not in tie.Notes"),this.TieDirection}get Notes(){return this.notes}get Type(){return this.type}get StartNote(){return this.notes[0]}get Duration(){const e=new Fraction$1;for(const t of this.notes)e.Add(t.Length);return e}get Pitch(){return this.StartNote.Pitch}AddNote(e){this.notes.push(e),e.NoteTie=this}}class Tuplet{constructor(e,t=!1){this.PlacementFromXml=!1,this.notes=[],this.fractions=[],this.tupletLabelNumber=e,this.bracket=t}get TupletLabelNumber(){return this.tupletLabelNumber}set TupletLabelNumber(e){this.tupletLabelNumber=e}get Notes(){return this.notes}set Notes(e){this.notes=e}get Fractions(){return this.fractions}set Fractions(e){this.fractions=e}get Bracket(){return this.bracket}set Bracket(e){this.bracket=e}getNoteIndex(e){for(let t=this.notes.length-1;t>=0;t--)for(let s=0;s<this.notes[t].length;s++)if(e===this.notes[t][s])return t;return 0}}var TechnicalInstructionType=(i=>(i[i.Fingering=0]="Fingering",i[i.String=1]="String",i))(TechnicalInstructionType||{});class TechnicalInstruction{}class PlaybackNote{constructor(e,t){this.parentEntry=e,this.parentNote=t,this.ParentNote.PlaybackNote=this,this.Length=this.ParentNote.Length,t.Pitch!==void 0?this.ParentNote.ParentStaff.ParentInstrument.MidiInstrumentId===MidiInstrument.Percussion?this.MidiKey=PlaybackNote.noteToMidiDrumKey(t):this.MidiKey=t.Pitch.getHalfTone()+12:this.MidiKey=0}setLength(){this.ParentNote.NoteTie!==void 0&&this.ParentNote.NoteTie.StartNote===this.ParentNote&&(this.Length=this.ParentNote.NoteTie.Duration)}get ParentEntry(){return this.parentEntry}get ParentNote(){return this.parentNote}static noteToMidiDrumKey(e){var r;const t=e.Pitch.getHalfTone()-12,s=(r=e.Notehead)==null?void 0:r.Shape;switch(e.Pitch.Octave){case 1:switch(e.Pitch.FundamentalNote){case NoteEnum.D:switch(s){default:return 44}case NoteEnum.E:switch(s){default:return 35}case NoteEnum.F:switch(s){default:return 36}case NoteEnum.G:switch(s){default:return 41}case NoteEnum.A:switch(s){default:return 43}case NoteEnum.B:switch(s){case NoteHeadShape.TRIANGLE:return 54;default:return 47}default:return t}case 2:switch(e.Pitch.FundamentalNote){case NoteEnum.C:switch(s){case NoteHeadShape.X:return 37;default:return 38}case NoteEnum.D:switch(s){case NoteHeadShape.X:return 59;default:return 48}case NoteEnum.E:switch(s){case NoteHeadShape.X:return 42;case NoteHeadShape.CIRCLEX:return 46;case NoteHeadShape.TRIANGLE:return 56;default:return 50}case NoteEnum.F:switch(s){case NoteHeadShape.DIAMOND:return 53;default:return 51}case NoteEnum.G:switch(s){case NoteHeadShape.CIRCLEX:case NoteHeadShape.DIAMOND:return 46;default:return 42}case NoteEnum.A:switch(s){default:return 49}case NoteEnum.B:switch(s){default:return 57}default:return t}case 3:switch(e.Pitch.FundamentalNote){case NoteEnum.C:switch(s){case NoteHeadShape.CIRCLEX:return 52;default:return 55}default:return t}default:return t}}}class PlaybackEntry{constructor(e){this.notes=[],this.TimestampShift=new Fraction$1,this.parentVoiceEntry=e;for(const t of e.Notes)this.Notes.push(new PlaybackNote(this,t))}get ParentVoiceEntry(){return this.parentVoiceEntry}get Notes(){return this.notes}get Length(){if(this.Notes.length>0)return this.Notes[0].Length}set Length(e){for(const t of this.Notes)t.Length=e}get HasNotes(){return this.Notes.length>0}}class VoiceEntry{constructor(e,t,s,r=!0,o=!1,a=!1,l=!1){if(this.notes=[],this.graceVoiceEntriesBefore=[],this.graceVoiceEntriesAfter=[],this.articulations=[],this.playbackEntries=[],this.technicalInstructions=[],this.lyricsEntries=new Dictionary,this.wantedStemDirection=-1,this.stemDirectionXml=-1,this.stemDirection=-1,this.timestamp=e,this.parentVoice=t,this.parentSourceStaffEntry=s,this.isGrace=o,this.graceAfterMainNote=!1,this.graceNoteSlash=a,this.graceSlur=l,o||t.VoiceEntries.push(this),r&&s!==void 0){const c=s.VoiceEntries;c.indexOf(this)===-1&&c.push(this)}this.mainPlaybackEntry=new PlaybackEntry(this),this.PlaybackEntries.push(this.mainPlaybackEntry)}get ParentSourceStaffEntry(){return this.parentSourceStaffEntry}get ParentVoice(){return this.parentVoice}get Timestamp(){return this.timestamp}set Timestamp(e){this.timestamp=e}get Notes(){return this.notes}addNote(e){this.notes.push(e),!e.isRest()&&(e.NoteTie===void 0||e.NoteTie.StartNote===e)&&this.MainPlaybackEntry.Notes.push(new PlaybackNote(this.MainPlaybackEntry,e))}get GraceVoiceEntriesBefore(){return this.graceVoiceEntriesBefore}set GraceVoiceEntriesBefore(e){this.graceVoiceEntriesBefore=e;for(const t of this.graceVoiceEntriesBefore)t.parentSourceStaffEntry=this.ParentSourceStaffEntry}get GraceVoiceEntriesAfter(){return this.graceVoiceEntriesAfter}set GraceVoiceEntriesAfter(e){this.graceVoiceEntriesAfter=e;for(const t of this.graceVoiceEntriesAfter)t.parentSourceStaffEntry=this.ParentSourceStaffEntry}get IsGrace(){return this.isGrace}set IsGrace(e){this.isGrace=e}get GraceAfterMainNote(){return this.graceAfterMainNote}set GraceAfterMainNote(e){this.graceAfterMainNote=e}get GraceNoteSlash(){return this.graceNoteSlash}set GraceNoteSlash(e){this.graceNoteSlash=e}get GraceSlur(){return this.graceSlur}set GraceSlur(e){this.graceSlur=e}get Articulations(){return this.articulations}get PlaybackEntries(){return this.playbackEntries}get Fermata(){return this.fermata}get MainPlaybackEntry(){return this.mainPlaybackEntry}set MainPlaybackEntry(e){this.mainPlaybackEntry=e}removeMainPlaybackEntry(){this.mainPlaybackEntry!==void 0&&this.removePlaybackEntry(this.mainPlaybackEntry)}removePlaybackEntry(e){this.mainPlaybackEntry===e&&(this.mainPlaybackEntry=void 0);const t=this.playbackEntries.indexOf(e);t>-1&&this.playbackEntries.splice(t,1)}get TechnicalInstructions(){return this.technicalInstructions}get LyricsEntries(){return this.lyricsEntries}get Arpeggio(){return this.arpeggio}set Arpeggio(e){this.arpeggio=e}get OrnamentContainer(){return this.ornamentContainer}set OrnamentContainer(e){this.ornamentContainer=e}set WantedStemDirection(e){this.wantedStemDirection=e}get WantedStemDirection(){return this.wantedStemDirection}set StemDirectionXml(e){this.stemDirectionXml=e}get StemDirectionXml(){return this.stemDirectionXml}set StemDirection(e){this.stemDirection=e}get StemDirection(){return this.stemDirection}get StemColorXml(){return this.stemColorXml}set StemColorXml(e){this.stemColorXml=e}get StemColor(){return this.stemColor}set StemColor(e){this.stemColor=e}get VolumeModifier(){return this.volumeModifier}set VolumeModifier(e){this.volumeModifier=e}get DurationModifier(){return this.durationModifier}set DurationModifier(e){this.durationModifier=e}hasArticulation(e){for(const t of this.articulations)if(t.Equals(e))return!0;return!1}static isSupportedArticulation(e){switch(e){case 0:case 1:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 26:case 24:return!0;default:return!1}}hasTie(){for(let e=0,t=this.Notes.length;e<t;++e)if(this.Notes[e].NoteTie)return!0;return!1}hasSlur(){for(let e=0,t=this.Notes.length;e<t;++e)if(this.Notes[e].NoteSlurs.length>0)return!0;return!1}isStaccato(){for(const e of this.Articulations)if(e.articulationEnum===5)return!0;return!1}isAccent(){for(const e of this.Articulations)if(e.articulationEnum===0||e.articulationEnum===1)return!0;return!1}getVerseNumberForLyricEntry(e){let t=1;return this.lyricsEntries.forEach((s,r)=>{e===r&&(t=s)}),t}}var ArticulationEnum=(i=>(i[i.accent=0]="accent",i[i.strongaccent=1]="strongaccent",i[i.marcatoup=2]="marcatoup",i[i.marcatodown=3]="marcatodown",i[i.invertedstrongaccent=4]="invertedstrongaccent",i[i.staccato=5]="staccato",i[i.staccatissimo=6]="staccatissimo",i[i.spiccato=7]="spiccato",i[i.tenuto=8]="tenuto",i[i.fermata=9]="fermata",i[i.invertedfermata=10]="invertedfermata",i[i.breathmark=11]="breathmark",i[i.caesura=12]="caesura",i[i.lefthandpizzicato=13]="lefthandpizzicato",i[i.naturalharmonic=14]="naturalharmonic",i[i.snappizzicato=15]="snappizzicato",i[i.upbow=16]="upbow",i[i.downbow=17]="downbow",i[i.scoop=18]="scoop",i[i.plop=19]="plop",i[i.doit=20]="doit",i[i.falloff=21]="falloff",i[i.stress=22]="stress",i[i.unstress=23]="unstress",i[i.detachedlegato=24]="detachedlegato",i[i.otherarticulation=25]="otherarticulation",i[i.bend=26]="bend",i))(ArticulationEnum||{}),StemDirectionType=(i=>(i[i.Undefined=-1]="Undefined",i[i.Up=0]="Up",i[i.Down=1]="Down",i[i.None=2]="None",i[i.Double=3]="Double",i))(StemDirectionType||{}),SystemLinePosition=(i=>(i[i.MeasureBegin=0]="MeasureBegin",i[i.MeasureEnd=1]="MeasureEnd",i))(SystemLinePosition||{});class GraphicalLabel extends Clickable{constructor(e,t,s,r,o=void 0){super(),this.label=e,this.boundingBox=new BoundingBox$1(this,o),this.label.fontHeight=t,this.label.textAlignment=s,this.rules=r,this.rules.MpatMode&&this.label.text==="TRIO"&&(this.label.fontFamily="Arial")}get Label(){return this.label}toString(){return`${this.label.text} (${this.boundingBox.RelativePosition.x},${this.boundingBox.RelativePosition.y})`}setLabelPositionAndShapeBorders(){var l,c;if(this.Label.text.trim()==="")return;this.TextLines=[];const e=(c=(l=this.rules)==null?void 0:l.LabelMarginBorderFactor)!=null?c:.1,t=this.Label.text.split(/[\n\r]+/g),s=t.length;let r=0;for(let d=0;d<s;d++){const m=t[d].trim();if(!m||m==="")continue;const u=MusicSheetCalculator.TextMeasurer.computeTextWidthToHeightRatio(m,this.Label.font,this.Label.fontStyle,this.label.fontFamily),g=this.Label.fontHeight*u;r=Math.max(r,g),this.TextLines.push({text:m,xOffset:0,width:g})}for(const d of this.TextLines){let m=0;switch(this.Label.textAlignment){case TextAlignmentEnum.RightBottom:case TextAlignmentEnum.RightCenter:case TextAlignmentEnum.RightTop:m=r-d.width;break;case TextAlignmentEnum.CenterBottom:case TextAlignmentEnum.CenterCenter:case TextAlignmentEnum.CenterTop:m=(r-d.width)/2;break}d.xOffset=m}let o=this.Label.fontHeight*s;this.rules.SpacingBetweenTextLines>0&&this.TextLines.length>1&&(o+=this.rules.SpacingBetweenTextLines*s/10);const a=this.PositionAndShape;switch(this.Label.textAlignment){case TextAlignmentEnum.CenterBottom:a.BorderTop=-o,a.BorderLeft=-r/2,a.BorderBottom=0,a.BorderRight=r/2;break;case TextAlignmentEnum.CenterCenter:a.BorderTop=-o/2,a.BorderLeft=-r/2,a.BorderBottom=o/2,a.BorderRight=r/2;break;case TextAlignmentEnum.CenterTop:a.BorderTop=0,a.BorderLeft=-r/2,a.BorderBottom=o,a.BorderRight=r/2;break;case TextAlignmentEnum.LeftBottom:a.BorderTop=-o,a.BorderLeft=0,a.BorderBottom=0,a.BorderRight=r;break;case TextAlignmentEnum.LeftCenter:a.BorderTop=-o/2,a.BorderLeft=0,a.BorderBottom=o/2,a.BorderRight=r;break;case TextAlignmentEnum.LeftTop:a.BorderTop=0,a.BorderLeft=0,a.BorderBottom=o,a.BorderRight=r;break;case TextAlignmentEnum.RightBottom:a.BorderTop=-o,a.BorderLeft=-r,a.BorderBottom=0,a.BorderRight=0;break;case TextAlignmentEnum.RightCenter:a.BorderTop=-o/2,a.BorderLeft=-r,a.BorderBottom=o/2,a.BorderRight=0;break;case TextAlignmentEnum.RightTop:a.BorderTop=0,a.BorderLeft=-r,a.BorderBottom=o,a.BorderRight=0;break}a.BorderMarginTop=a.BorderTop-o*e,a.BorderMarginLeft=a.BorderLeft-o*e,a.BorderMarginBottom=a.BorderBottom+o*e,a.BorderMarginRight=a.BorderRight+o*e}}class Label{constructor(e="",t=TextAlignmentEnum.CenterBottom,s=void 0,r=!0){this.IsCreditLabel=!1,this.text=e,this.print=r,this.textAlignment=t,this.font=s,this.fontFamily=void 0}set font(e){this.fontEnumValue=e,this.fontFamily=FontStringNames[e]}get font(){return this.fontEnumValue}ToString(){return this.text}}const 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},SpecialMarks=["纯律","纯律结束"],HideWords=["跳过下一个","b","#","§","º","X"],GradientWords=["poco rit.","rall.","rit.","accel.","molto rit.","molto rall","lentando","poco accel.","calando"],GRADIENT_SPEED_CLOSE_TAG="结束范围速度",GRADIENT_SPEED_RESET_TAG="a tempo",SpecialWords=[GRADIENT_SPEED_CLOSE_TAG],SpeedKeyword="速度 ",SpeedHiddenKeyword="仅文本速度 ";function isSpeedKeyword(i){return i.indexOf(SpeedKeyword)===0}function isSpeedHiddenKeyword(i){return i.indexOf(SpeedHiddenKeyword)===0}function formatSpeedKeyword(i){return i.replace(SpeedHiddenKeyword,"").replace(SpeedKeyword,"")}function isGradientWords(i){return GradientWords.includes(i)}function isSpecialMark(i){return[...Object.keys(SpeedTag),...SpecialMarks,...SpecialWords,...HideWords].map(e=>e.trim().toLocaleUpperCase()).includes(i.toLocaleUpperCase().trim())}function isTopFont(i){return[TextAlignmentEnum.CenterTop,TextAlignmentEnum.RightTop].includes(i)}var MusicSymbol=(i=>(i[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",i))(MusicSymbol||{}),MusicSymbolDrawingStyle=(i=>(i[i.Normal=0]="Normal",i[i.Disabled=1]="Disabled",i[i.Selected=2]="Selected",i[i.Clickable=3]="Clickable",i[i.PlaybackSymbols=4]="PlaybackSymbols",i[i.FollowSymbols=5]="FollowSymbols",i[i.QFeedbackNotFound=6]="QFeedbackNotFound",i[i.QFeedbackOk=7]="QFeedbackOk",i[i.QFeedbackPerfect=8]="QFeedbackPerfect",i[i.Debug1=9]="Debug1",i[i.Debug2=10]="Debug2",i[i.Debug3=11]="Debug3",i))(MusicSymbolDrawingStyle||{}),PhonicScoreModes=(i=>(i[i.Following=0]="Following",i[i.Midi=1]="Midi",i[i.Manual=2]="Manual",i))(PhonicScoreModes||{});class LabelRenderSpecs{}class MusicSheetDrawer{constructor(e,t){this.drawableBoundingBoxElement="None",this.skyLineVisible=!1,this.bottomLineVisible=!1,this.phonicScoreMode=PhonicScoreModes.Manual,this.textMeasurer=e,this.splitScreenLineColor=-1,this.drawingParameters=t,this.rules=t.Rules}set Mode(e){this.phonicScoreMode=e}drawSheet(e){if(this.graphicalMusicSheet=e,this.rules=e.ParentMusicSheet.Rules,this.drawSplitScreenLine(),this.drawingParameters.drawCursors)for(const s of e.Cursors){if(!s)continue;const r=new BoundingBox$1(s);r.AbsolutePosition=s.Start,r.BorderBottom=s.End.y-s.Start.y,r.BorderRight=s.Width/2,r.BorderLeft=-s.Width/2,this.isVisible(r)&&this.drawLineAsVerticalRectangle(s,GraphicalLayers.Cursor)}this.drawingParameters.drawScrollIndicator&&this.drawScrollIndicator();const t=Math.min(this.graphicalMusicSheet.MusicPages.length,this.rules.MaxPageToDrawNumber);for(let s=0;s<t;s++){const r=this.graphicalMusicSheet.MusicPages[s];this.drawPage(r)}}drawLineAsHorizontalRectangle(e,t){let s=new RectangleF2D(e.Start.x,e.End.y-e.Width/2,e.End.x-e.Start.x,e.Width);s=this.applyScreenTransformationForRect(s),this.renderRectangle(s,t,e.styleId,e.colorHex)}drawLineAsVerticalRectangle(e,t){const s=e.Start,r=e.Width;let o=new RectangleF2D(s.x-r/2,s.y,r,e.End.y-s.y);o=this.applyScreenTransformationForRect(o),this.renderRectangle(o,t,e.styleId)}drawLineAsHorizontalRectangleWithOffset(e,t,s){const r=new PointF2D(e.Start.x+t.x,e.Start.y+t.y),o=new PointF2D(e.End.x+t.x,e.End.y+t.y),a=e.Width;let l=new RectangleF2D(r.x,o.y-a/2,o.x-r.x,a);l=this.applyScreenTransformationForRect(l),this.renderRectangle(l,s,e.styleId)}drawLineAsVerticalRectangleWithOffset(e,t,s){const r=new PointF2D(e.Start.x+t.x,e.Start.y+t.y),o=new PointF2D(e.End.x+t.x,e.End.y+t.y),a=e.Width;let l=new RectangleF2D(r.x,r.y,a,o.y-r.y);l=this.applyScreenTransformationForRect(l),this.renderRectangle(l,s,e.styleId)}drawRectangle(e,t){const s=e.PositionAndShape;let r=new RectangleF2D(s.AbsolutePosition.x,s.AbsolutePosition.y,s.BorderRight,s.BorderBottom);r=this.applyScreenTransformationForRect(r),this.renderRectangle(r,t,e.style)}drawLabel(e,t){var g,b,y,S,v,x,A,E,w,_,C,P,I,R,N;const s=this.graphicalMusicSheet.GetNearestNote(e.PositionAndShape.AbsolutePosition);if(!this.isVisible(e.PositionAndShape))return;const r=e.Label;if(r.text.trim()==="")return;const o=this.calculateLabel(e),a=this.applyScreenTransformation(e.PositionAndShape.AbsolutePosition),l=e.PositionAndShape.Parent.DataObject;if(this.rules.MetronomeMarksDrawn&&((b=(g=l==null?void 0:l.measures)==null?void 0:g[0])==null?void 0:b.MeasureNumber)===1&&((y=l==null?void 0:l.ParentMusicSystem)==null?void 0:y.Id)===0&&isTopFont(e.Label.textAlignment)&&(o.ScreenPosition.y-=1*10),r.text===","){let G=0;const B=((x=(v=(S=this.graphicalMusicSheet)==null?void 0:S.MusicPages)==null?void 0:v[0])==null?void 0:x.MusicSystems)||[];let k;try{for(let Z=0;Z<B.length;Z++){const W=B[Z];if(e.PositionAndShape.AbsolutePosition.x<10){console.log(e.PositionAndShape.AbsolutePosition.x);const se=this.graphicalMusicSheet.MeasureList[s.sourceNote.SourceMeasure.MeasureNumber-2];se&&se[0]&&(k=se[0],G=k.PositionAndShape.AbsolutePosition.y-k.PositionAndShape.Size.height/2);break}if(W.PositionAndShape.AbsolutePosition.y-10<e.PositionAndShape.AbsolutePosition.y&&e.PositionAndShape.AbsolutePosition.y<W.PositionAndShape.AbsolutePosition.y+10){const se=(W==null?void 0:W.GraphicalMeasures.map(J=>J[0]).filter(Boolean))||[],ie=[];let fe=!1;for(let J=0;J<se.length;J++){const K=se[J];if(((w=(E=(A=K.vfVoices)==null?void 0:A["1"])==null?void 0:E.tickables)==null?void 0:w.length)===1&&K.PositionAndShape.AbsolutePosition.x<e.PositionAndShape.AbsolutePosition.x&&e.PositionAndShape.AbsolutePosition.x<K.PositionAndShape.AbsolutePosition.x+K.PositionAndShape.Size.width){k=K,fe=!0;break}const be=K.PositionAndShape.AbsolutePosition.x+K.PositionAndShape.Size.width,oe=e.PositionAndShape.AbsolutePosition.x;be-15<oe&&oe<be+15&&ie.push({measure:K,x:Math.abs(oe-be)})}if(fe)break;k=(C=(_=ie.sort((J,K)=>J.x-K.x))==null?void 0:_[0])==null?void 0:C.measure;break}}}catch(Z){console.log("🚀 ~ error",Z)}let T=0;k?T=((P=k.stave)==null?void 0:P.end_x)||0:T=((I=s.sourceNote.SourceMeasure.VerticalMeasureList[0])==null?void 0:I.getVFStave()).end_x;const V=0;o.ScreenPosition.x=T,o.ScreenPosition.y=G===0?(e.PositionAndShape.Parent.AbsolutePosition.y-3-V)*10:G*10}const c=["C","G","D","A","E","B","F#","C#","G#","F","Bb","Eb","Ab","Db","Gb","Cb","Fb","D#","A#","E#"];c.includes(r.text)&&(o.ScreenPosition.y=(e.PositionAndShape.Parent.AbsolutePosition.y+e.PositionAndShape.Parent.BorderTop+e.PositionAndShape.Parent.BorderMarginTop)*10),["play","listen"].includes(r.text.toLocaleLowerCase())&&r.textAlignment===TextAlignmentEnum.LeftBottom&&(o.ScreenPosition.y=(e.PositionAndShape.Parent.AbsolutePosition.y-1+e.PositionAndShape.Parent.BorderBottom)*10);const d=["ffp","p-f","sfzp","szf","sffzp"];for(let G=0;G<d.length;G++){const B=d[G].replace(/ /g,""),k=r.text.replace(/ /g,"");if(k.toLocaleLowerCase()===B.toLocaleLowerCase()||k.includes(B)){r.fontStyle=3,r.text==="sfzp"&&(r.fontHeight=2.3);break}}(r.text=="R"||r.text=="L")&&(o.ScreenPosition.x+=5),(r.text==="r"||r.text==="l")&&(o.ScreenPosition.x+=6);const m=e.PositionAndShape.Size.width/2*10;if(a.x-m<e.PositionAndShape.RelativePosition.x&&(o.ScreenPosition.x=(e.PositionAndShape.RelativePosition.x+this.rules.PageLeftMargin)*10),isSpecialMark(e.Label.text||"")&&!c.includes(r.text)&&(e.Label.fontHeight=0),this.rules.MetronomeMarksDrawn&&e.Label.fontHeight>0&&(isTopFont(e.Label.textAlignment)||[TextAlignmentEnum.CenterBottom].includes(e.Label.textAlignment))){let G=-1,B=!1;for(const k of(l==null?void 0:l.AbstractExpressions)||[])if(k.Label===e?G=(R=k==null?void 0:k.parentMeasure)==null?void 0:R.measureListIndex:(N=k.expression)!=null&&N.TempoInBpm&&(B=k.expression.TempoInBpm>0),B&&G>-1){o.ScreenPosition.y-=4*10;break}}this.rules.DYMusicScoreType==="jianpu"?isNaN(parseInt(e.Label.text,10))&&this.renderLabel(e,t,o):this.renderLabel(e,t,o)}calculateLabel(e){const t=new LabelRenderSpecs,s=e.Label,r=new BoundingBox$1(this);r.AbsolutePosition.x=e.PositionAndShape.AbsolutePosition.x,r.AbsolutePosition.y=e.PositionAndShape.AbsolutePosition.y||e.PositionAndShape.Parent.AbsolutePosition.y,t.ScreenPosition=this.applyScreenTransformation(r.AbsolutePosition),t.FontHeightInPixel=this.calculatePixelDistance(s.fontHeight);const o=this.calculatePixelDistance(e.PositionAndShape.Size.width);switch(t.BitmapWidth=Math.ceil(o),t.BitmapHeight=e.TextLines?Math.ceil(t.FontHeightInPixel*(.2+e.TextLines.length)):10,s.textAlignment){case TextAlignmentEnum.LeftTop:t.ScreenPosition.x-=t.BitmapWidth/2,t.ScreenPosition.y+=t.BitmapHeight*1.5;break;case TextAlignmentEnum.LeftCenter:t.ScreenPosition.y-=t.BitmapHeight/2;break;case TextAlignmentEnum.LeftBottom:t.ScreenPosition.y-=t.BitmapHeight;break;case TextAlignmentEnum.CenterTop:t.ScreenPosition.x-=t.BitmapWidth/2;break;case TextAlignmentEnum.CenterCenter:t.ScreenPosition.x-=t.BitmapWidth/2,t.ScreenPosition.y-=t.BitmapHeight/2;break;case TextAlignmentEnum.CenterBottom:t.ScreenPosition.x-=t.BitmapWidth/2,t.ScreenPosition.y-=t.BitmapHeight;break;case TextAlignmentEnum.RightTop:t.ScreenPosition.x-=t.BitmapWidth;break;case TextAlignmentEnum.RightCenter:t.ScreenPosition.x-=t.BitmapWidth,t.ScreenPosition.y-=t.BitmapHeight/2;break;case TextAlignmentEnum.RightBottom:t.ScreenPosition.x-=t.BitmapWidth,t.ScreenPosition.y-=t.BitmapHeight;break;default:throw new ArgumentOutOfRangeException("")}return t}applyScreenTransformations(e){const t=[];for(const s of e)t.push(this.applyScreenTransformation(s));return t}drawSplitScreenLine(){}renderRectangle(e,t,s,r=void 0,o=1){throw new Error("not implemented")}drawScrollIndicator(){}drawSelectionStartSymbol(e){}drawSelectionEndSymbol(e){}renderLabel(e,t,s){throw new Error("not implemented")}renderSystemToScreen(e,t,s){}drawSkyLine(e){}drawBottomLine(e){}drawInstrumentBrace(e,t){}drawGroupBracket(e,t){}isVisible(e){return!0}drawMusicSystem(e){const t=this.getSystemAbsBoundingRect(e),s=this.getSytemBoundingBoxInPixels(t);this.drawMusicSystemComponents(e,s,t)}getSytemBoundingBoxInPixels(e){const t=this.applyScreenTransformationForRect(e);return t.x=Math.round(t.x),t.y=Math.round(t.y),t}getSystemAbsBoundingRect(e){const t=e.PositionAndShape.BoundingRectangle;return new RectangleF2D(e.PositionAndShape.AbsolutePosition.x+e.PositionAndShape.BorderLeft-1,e.PositionAndShape.AbsolutePosition.y+e.PositionAndShape.BorderTop-1,t.width+6,t.height+2)}drawMusicSystemComponents(e,t,s){const r=this.graphicalMusicSheet.SelectionStartSymbol,o=this.graphicalMusicSheet.SelectionEndSymbol;this.drawingParameters.drawSelectionStartSymbol&&r!==void 0&&this.isVisible(r.PositionAndShape)&&this.drawSelectionStartSymbol(r),this.drawingParameters.drawSelectionEndSymbol&&o!==void 0&&this.isVisible(o.PositionAndShape)&&this.drawSelectionEndSymbol(o);for(const c of e.StaffLines)this.drawStaffLine(c),this.rules.RenderLyrics&&(c.LyricsDashes.length>0&&this.drawDashes(c.LyricsDashes),c.LyricLines.length>0&&this.drawLyricLines(c.LyricLines,c));for(const c of e.SystemLines)this.drawSystemLineObject(c);if(e.Parent===e.Parent.Parent.MusicPages[0])for(const c of e.Labels)c.SVGNode=this.drawLabel(c,GraphicalLayers.Notes);const a=this.graphicalMusicSheet.ParentMusicSheet.Instruments,l=a.filter(c=>c.Visible).length;for(const c of e.InstrumentBrackets)this.drawInstrumentBrace(c,e);if(a.length>0)if(l>1)for(const c of e.GroupBrackets)this.drawGroupBracket(c,e);else for(const c of e.GroupBrackets)c.Visible=!1;if(!this.leadSheet)for(const c of e.MeasureNumberLabels)c.SVGNode=this.drawLabel(c,GraphicalLayers.Notes);for(const c of e.StaffLines)this.drawStaffLineSymbols(c);this.drawingParameters.drawMarkedAreas&&this.drawMarkedAreas(e)}activateSystemRendering(e,t,s,r){return!0}drawSystemLineObject(e){}drawStaffLine(e){for(const t of e.Measures)this.drawMeasure(t);this.rules.RenderLyrics&&e.LyricsDashes.length>0&&this.drawDashes(e.LyricsDashes),this.drawOctaveShifts(e),this.drawPedals(e),this.drawWavyLines(e),this.drawExpressions(e),this.skyLineVisible&&this.drawSkyLine(e),this.bottomLineVisible&&this.drawBottomLine(e)}drawLyricLines(e,t){t.LyricLines.forEach(s=>{s.Start.y+=t.PositionAndShape.AbsolutePosition.y,s.End.y+=t.PositionAndShape.AbsolutePosition.y,s.Start.x+=t.PositionAndShape.AbsolutePosition.x,s.End.x+=t.PositionAndShape.AbsolutePosition.x,this.drawGraphicalLine(s,this.rules.LyricUnderscoreLineWidth)})}drawExpressions(e){}drawGraphicalLine(e,t,s="black"){return this.drawLine(e.Start,e.End,s,t)}drawLine(e,t,s="#FF0000FF",r){}drawDashes(e){e.forEach(t=>t.SVGNode=this.drawLabel(t,GraphicalLayers.Notes))}drawOctaveShifts(e){}drawStaffLines(e){if(e.StaffLines){const t=e.PositionAndShape.AbsolutePosition;for(let s=0;s<5;s++)this.drawLineAsHorizontalRectangleWithOffset(e.StaffLines[s],t,GraphicalLayers.Notes)}}drawSymbol(e,t,s,r=1,o=GraphicalLayers.Notes){}get leadSheet(){return this.graphicalMusicSheet.LeadSheet}set leadSheet(e){this.graphicalMusicSheet.LeadSheet=e}drawPage(e){if(this.isVisible(e.PositionAndShape)){for(const t of e.MusicSystems)this.isVisible(t.PositionAndShape)&&this.drawMusicSystem(t);if(e===e.Parent.MusicPages[0])for(const t of e.Labels)t.SVGNode=this.drawLabel(t,GraphicalLayers.Notes);this.drawableBoundingBoxElement&&this.drawBoundingBoxes(e.PositionAndShape,0,this.drawableBoundingBoxElement)}}drawBoundingBoxes(e,t=0,s="all"){const r=e.DataObject.constructor.name;let o=!1;s==="all"&&(o=!0),(o||r===s)&&this.drawBoundingBox(e,void 0,!0,r,t),t++,e.ChildElements.forEach(a=>this.drawBoundingBoxes(a,t,s))}drawBoundingBox(e,t=void 0,s=!1,r=void 0,o=0){let a=new RectangleF2D(e.AbsolutePosition.x+e.BorderMarginLeft,e.AbsolutePosition.y+e.BorderMarginTop,e.BorderMarginRight-e.BorderMarginLeft,e.BorderMarginBottom-e.BorderMarginTop);s&&(this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(e.AbsolutePosition.x-1,e.AbsolutePosition.y),new PointF2D(e.AbsolutePosition.x+1,e.AbsolutePosition.y),.1,OutlineAndFillStyleEnum.BaseWritingColor,t),o-1),this.drawLineAsVerticalRectangle(new GraphicalLine(new PointF2D(e.AbsolutePosition.x,e.AbsolutePosition.y-1),new PointF2D(e.AbsolutePosition.x,e.AbsolutePosition.y+1),.1,OutlineAndFillStyleEnum.BaseWritingColor,t),o-1)),a=this.applyScreenTransformationForRect(a);const l=this.renderRectangle(a,GraphicalLayers.Background,o,t,.5);if(r){const c=new Label(r),d=new LabelRenderSpecs;d.BitmapWidth=a.width,d.BitmapHeight=a.height,d.FontHeightInPixel=a.height,d.ScreenPosition=new PointF2D(a.x,a.y+12),this.renderLabel(new GraphicalLabel(c,.8,TextAlignmentEnum.CenterCenter,this.rules),o,d)}return l}drawMarkedAreas(e){for(const t of e.GraphicalMarkedAreas)t&&(t.systemRectangle&&this.drawRectangle(t.systemRectangle,GraphicalLayers.Background),t.settings&&(t.settings.SVGNode=this.drawLabel(t.settings,GraphicalLayers.Comment)),t.labelRectangle&&this.drawRectangle(t.labelRectangle,GraphicalLayers.Background),t.label&&(t.label.SVGNode=this.drawLabel(t.label,GraphicalLayers.Comment)))}drawStaffLineSymbols(e){const t=e.ParentStaff.ParentInstrument,s=e.PositionAndShape.AbsolutePosition.x,r=e.PositionAndShape.AbsolutePosition.y+2,o=e.PositionAndShape.BorderRight;t.highlight&&this.drawingParameters.drawHighlights&&this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(s,r),new PointF2D(s+o,r),4,OutlineAndFillStyleEnum.Highlighted),GraphicalLayers.Highlight);let a=MusicSymbolDrawingStyle.Disabled,l=MusicSymbol.PLAY,c=this.drawingParameters.drawActivitySymbols;switch(this.phonicScoreMode){case PhonicScoreModes.Midi:l=MusicSymbol.PLAY,this.midiPlaybackAvailable&&e.ParentStaff.audible&&(a=MusicSymbolDrawingStyle.PlaybackSymbols);break;case PhonicScoreModes.Following:l=MusicSymbol.MIC,e.ParentStaff.following&&(a=MusicSymbolDrawingStyle.FollowSymbols);break;default:c=!1;break}if(c){const d=new PointF2D(s+o+2,r);this.drawSymbol(l,a,d)}if(this.drawingParameters.drawErrors)for(const d of e.Measures){const m=d.PositionAndShape,u=m.AbsolutePosition.x,g=m.AbsolutePosition.y+2;d.hasError&&this.graphicalMusicSheet.ParentMusicSheet.DrawErroneousMeasures&&this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(u,g),new PointF2D(u+m.BorderRight,g),4,OutlineAndFillStyleEnum.ErrorUnderlay),GraphicalLayers.MeasureError)}}}class VexFlowTextMeasurer{constructor(e){this.fontSize=20,this.fontSizeStandard=this.fontSize;const t=document.createElement("canvas");this.context=t.getContext("2d"),this.rules=e}computeTextWidthToHeightRatio(e,t,s,r=void 0,o=this.fontSize){return this.context.font=VexFlowConverter.font(o,s,t,this.rules,r),this.context.measureText(e).width/o}setFontSize(e=this.fontSizeStandard){return this.fontSize=e,e}}class AbstractGraphicalExpression extends GraphicalObject{constructor(e,t,s){super(),this.expression=t,this.parentMeasure=s,this.boundingBox=new BoundingBox$1(this,e.PositionAndShape),this.parentStaffLine=e,this.parentStaffLine.AbstractExpressions.push(this),this.rules=e.ParentMusicSystem.rules}get Label(){return this.label}get ParentStaffLine(){return this.parentStaffLine}get SourceExpression(){return this.expression}get Placement(){return this.expression.Placement}}class GraphicalInstantaneousTempoExpression extends AbstractGraphicalExpression{constructor(e,t){super(t.PositionAndShape.Parent.DataObject,e,e.parentMeasure),this.label=t}get GraphicalLabel(){return this.label}updateSkyBottomLine(){}}class GraphicalInstantaneousDynamicExpression extends AbstractGraphicalExpression{constructor(e,t,s){super(t,e,s.parentSourceMeasure),this.mInstantaneousDynamicExpression=e,this.mMeasure=s}updateSkyBottomLine(){const e=this.parentStaffLine.SkyBottomLineCalculator,t=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginLeft,s=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginRight;let r=0;switch(this.Placement){case PlacementEnum.Above:r=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginTop,e.updateSkyLineInRange(t,s,r);break;case PlacementEnum.Below:r=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginBottom,e.updateBottomLineInRange(t,s,r);break;default:loglevelExports.error("Placement for GraphicalInstantaneousDynamicExpression is unknown")}}}class GraphicalContinuousDynamicExpression extends AbstractGraphicalExpression{constructor(e,t,s){super(t,e,s),this.lines=[],this.isSplittedPart=!1,this.notToBeRemoved=!1}get StartMeasure(){return this.startMeasure}set StartMeasure(e){this.startMeasure=e}get EndMeasure(){return this.endMeasure}set EndMeasure(e){this.endMeasure=e}get EndStaffLine(){return this.endMeasure?this.endMeasure.ParentStaffLine:void 0}get IsSplittedPart(){return this.isSplittedPart}set IsSplittedPart(e){this.isSplittedPart=e}get IsVerbal(){return this.ContinuousDynamic.Label&&this.ContinuousDynamic.Label.length>0}get NotToBeRemoved(){return this.notToBeRemoved}set NotToBeRemoved(e){this.notToBeRemoved=e}get Lines(){return this.lines}get ContinuousDynamic(){return this.SourceExpression}updateSkyBottomLine(){var r;const e=this.parentStaffLine.SkyBottomLineCalculator,t=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.IsVerbal&&this.lines.length<2&&loglevelExports.warn("Not enough lines for SkyBottomLine calculation"),this.IsVerbal||this.ContinuousDynamic.DynamicType!==ContDynamicEnum.crescendo&&this.ContinuousDynamic.DynamicType!==ContDynamicEnum.diminuendo&&loglevelExports.warn("GraphicalContinuousDynamicExpression.updateSkyBottomLine(): unhandled continuous dynamic type. start measure: "+((r=this.startMeasure)==null?void 0:r.MeasureNumber)),this.Placement){case PlacementEnum.Above:if(!this.IsVerbal)this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?e.updateSkyLineWithWedge(this.lines[0].Start,this.lines[0].End):this.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&e.updateSkyLineWithWedge(this.lines[0].End,this.lines[0].Start);else{const o=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;e.updateSkyLineInRange(t,s,o)}break;case PlacementEnum.Below:if(!this.IsVerbal)this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?e.updateBottomLineWithWedge(this.lines[1].Start,this.lines[1].End):this.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&e.updateBottomLineWithWedge(this.lines[1].End,this.lines[1].Start);else{const o=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;e.updateBottomLineInRange(t,s,o)}break;default:loglevelExports.error("Placement for GraphicalContinuousDynamicExpression is unknown")}}createCrescendoLines(e,t,s,r=this.rules.WedgeOpeningLength,o=this.rules.WedgeLineWidth){const a=new PointF2D(e,s),l=new PointF2D(t,s-r/2),c=new PointF2D(t,s+r/2);this.addWedgeLines(a,l,c,o)}createFirstHalfCrescendoLines(e,t,s,r=this.rules.WedgeMeasureEndOpeningLength,o=this.rules.WedgeLineWidth){const a=new PointF2D(e,s),l=new PointF2D(t,s-r/2),c=new PointF2D(t,s+r/2);this.addWedgeLines(a,l,c,o)}createSecondHalfCrescendoLines(e,t,s,r=this.rules.WedgeMeasureBeginOpeningLength,o=this.rules.WedgeOpeningLength,a=this.rules.WedgeLineWidth){const l=new PointF2D(e,s-r/2),c=new PointF2D(e,s+r/2),d=new PointF2D(t,s-o/2),m=new PointF2D(t,s+o/2);this.addDoubleLines(l,d,c,m,a)}recalculateCrescendoLines(e,t,s){const r=Math.abs(this.lines[0].Start.y-this.lines[1].Start.y)>1e-4;this.lines.clear(),r?this.createSecondHalfCrescendoLines(e,t,s):this.isSplittedPart?this.createFirstHalfCrescendoLines(e,t,s):this.createCrescendoLines(e,t,s)}createDiminuendoLines(e,t,s,r=this.rules.WedgeOpeningLength,o=this.rules.WedgeLineWidth){const a=new PointF2D(e,s-r/2),l=new PointF2D(e,s+r/2),c=new PointF2D(t,s);this.addWedgeLines(c,a,l,o)}createFirstHalfDiminuendoLines(e,t,s,r=this.rules.WedgeOpeningLength,o=this.rules.WedgeMeasureEndOpeningLength,a=this.rules.WedgeLineWidth){const l=new PointF2D(e,s-r/2),c=new PointF2D(e,s+r/2),d=new PointF2D(t,s-o/2),m=new PointF2D(t,s+o/2);this.addDoubleLines(l,d,c,m,a)}createSecondHalfDiminuendoLines(e,t,s,r=this.rules.WedgeMeasureBeginOpeningLength,o=this.rules.WedgeLineWidth){const a=new PointF2D(e,s-r/2),l=new PointF2D(e,s+r/2),c=new PointF2D(t,s);this.addWedgeLines(c,a,l,o)}recalculateDiminuendoLines(e,t,s){const r=Math.abs(this.lines[0].End.y-this.lines[1].End.y)>1e-4;this.lines.clear(),r?this.createFirstHalfDiminuendoLines(e,t,s):this.isSplittedPart?this.createSecondHalfDiminuendoLines(e,t,s):this.createDiminuendoLines(e,t,s)}calcPsi(){if(this.IsVerbal){this.PositionAndShape.calculateBoundingBox();return}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.ContinuousDynamic.DynamicType===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(e){this.IsVerbal?(this.PositionAndShape.RelativePosition.y+=e,this.PositionAndShape.calculateBoundingBox()):(this.lines[0].Start.y+=e,this.lines[0].End.y+=e,this.lines[1].End.y+=e)}squeeze(e){this.IsVerbal||Math.abs(this.lines[0].End.x-this.lines[0].Start.x)<Math.abs(e)||(this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?e>0?this.lines[0].Start.x+=e:(this.lines[0].End.x+=e,this.lines[1].End.x+=e):e<0?this.lines[0].Start.x+=e:(this.lines[0].End.x+=e,this.lines[1].End.x+=e),this.calcPsi())}addWedgeLines(e,t,s,r){const o=new GraphicalLine(e,t,r),a=new GraphicalLine(e,s,r);this.lines.push(o),this.lines.push(a)}addDoubleLines(e,t,s,r,o){const a=new GraphicalLine(e,t,o),l=new GraphicalLine(s,r,o);this.lines.push(a),this.lines.push(l)}}class GraphicalUnknownExpression extends AbstractGraphicalExpression{constructor(e,t,s,r,o=void 0){super(e,new AbstractExpression(s),r),this.label=t,this.sourceMultiExpression=o}updateSkyBottomLine(){const e=this.parentStaffLine.SkyBottomLineCalculator,t=this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginLeft,s=this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginRight;switch(this.Placement){case PlacementEnum.Above:const r=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;e.updateSkyLineInRange(t,s,r);break;case PlacementEnum.Below:const o=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;e.updateBottomLineInRange(t,s,o);break;default:loglevelExports.error("Placement for GraphicalUnknownExpression is unknown")}}}const unitInPixels=10;class VexFlowMusicSheetDrawer extends MusicSheetDrawer{constructor(e=new DrawingParameters){super(new VexFlowTextMeasurer(e.Rules),e),this.backends=[],this.zoom=1,this.pageIdx=0,this.getDotId=(t,s)=>s?String(t.Label.PositionAndShape.RelativePosition[s]):String(t.Label.PositionAndShape.RelativePosition.x)+String(t.Label.PositionAndShape.RelativePosition.y),this.hasDot=(t,s,r,o)=>{const a=s||Object.values(o);for(const l of a){if(r)return t.x===l.x&&t.y===l.y;if(t.x===l.x)return!0}return!1}}get Zoom(){return this.zoom}get Backends(){return this.backends}initializeBackendForPage(e){this.backend=this.backends[e.PageNumber-1]}drawSheet(e){var t,s,r;this.rules.DefaultVexFlowNoteFont==="gonville"&&(Vex.Flow.DEFAULT_FONT_STACK=[(t=Vex.Flow.Fonts)==null?void 0:t.Gonville,(s=Vex.Flow.Fonts)==null?void 0:s.Bravura,(r=Vex.Flow.Fonts)==null?void 0:r.Custom]),Vex.Flow.STAVE_LINE_THICKNESS=this.rules.StaffLineWidth*unitInPixels,Vex.Flow.STEM_WIDTH=this.rules.StemWidth*unitInPixels,Vex.Flow.DEFAULT_NOTATION_FONT_SCALE=this.rules.VexFlowDefaultNotationFontScale,Vex.Flow.DEFAULT_TAB_FONT_SCALE=this.rules.VexFlowDefaultTabFontScale,this.pageIdx=0;for(const o of e.MusicPages){if(o.PageNumber>this.rules.MaxPageToDrawNumber)break;const a=this.backends[this.pageIdx];a.graphicalMusicPage=o,a.scale(this.zoom),this.pageIdx+=1}this.pageIdx=0,this.backend=this.backends[0],super.drawSheet(e)}drawPage(e){e&&(this.backend=this.backends[e.PageNumber-1],super.drawPage(e),this.pageIdx+=1)}clear(){for(const e of this.backends)e.clear()}setZoom(e){this.zoom=e}calculatePixelDistance(e){return e*unitInPixels}drawStaffLine(e){const t=this.backend.getContext().openGroup();t&&t.classList.add("staffline"),super.drawStaffLine(e);const s=e.PositionAndShape.AbsolutePosition;this.rules.RenderSlurs&&this.drawSlurs(e,s),this.backend.getContext().closeGroup()}drawSlurs(e,t){var r,o,a,l;const s=(r=window.GYM)==null?void 0:r.vfcurveItem;for(let c=0;c<e.GraphicalSlurs.length;c++){const d=e.GraphicalSlurs[c];if(!d.slur.isCrossed()){if(s&&s.length)try{const m=s.find((u,g)=>(u.index?u.index===c:!0)&&u.MeasureNumberXML==d.staffEntries[d.staffEntries.length-1].parentMeasure.MeasureNumber);m&&(d.bezierEndControlPt.y+=(o=m==null?void 0:m.bezierEndControlPt)!=null&&o.y?m.bezierEndControlPt.y:0,d.bezierEndPt.y+=(a=m==null?void 0:m.bezierEndPt)!=null&&a.y?m.bezierEndPt.y:0,d.bezierStartControlPt.y+=(l=m==null?void 0:m.bezierStartControlPt)!=null&&l.y?m.bezierStartControlPt.y:0)}catch(m){console.log(m)}this.drawSlur(d,t)}}}drawSlur(e,t){const s=[];let r,o,a,l;this.rules.DYMusicScoreType==="jianpu"?((e.placement>0||e.bezierStartPt.y>0)&&(e.bezierStartPt.y=-.8,e.bezierStartControlPt.y=-2.5),r=new PointF2D(e.bezierStartPt.x+t.x,e.bezierStartPt.y+t.y),o=new PointF2D(e.bezierStartControlPt.x+t.x,e.bezierStartControlPt.y+t.y),a=new PointF2D(e.bezierEndControlPt.x+t.x,e.bezierStartControlPt.y+t.y),l=new PointF2D(e.bezierEndPt.x+t.x,e.bezierStartPt.y+t.y)):(r=new PointF2D(e.bezierStartPt.x+t.x,e.bezierStartPt.y+t.y),o=new PointF2D(e.bezierStartControlPt.x+t.x,e.bezierStartControlPt.y+t.y),a=new PointF2D(e.bezierEndControlPt.x+t.x,e.bezierEndControlPt.y+t.y),l=new PointF2D(e.bezierEndPt.x+t.x,e.bezierEndPt.y+t.y)),s.push(this.applyScreenTransformation(r)),s.push(this.applyScreenTransformation(o)),s.push(this.applyScreenTransformation(a)),s.push(this.applyScreenTransformation(l)),e.placement===PlacementEnum.Above?(r.y-=.05,o.y-=.3,a.y-=.3,l.y-=.05):(r.y+=.05,o.y+=.3,a.y+=.3,l.y+=.05),s.push(this.applyScreenTransformation(r)),s.push(this.applyScreenTransformation(o)),s.push(this.applyScreenTransformation(a)),s.push(this.applyScreenTransformation(l)),e.SVGElement=this.backend.renderCurve(s)}drawMeasure(e){e.setAbsoluteCoordinates(e.PositionAndShape.AbsolutePosition.x*unitInPixels,e.PositionAndShape.AbsolutePosition.y*unitInPixels);const t=this.backend.getContext();try{e.draw(t)}catch(s){loglevelExports.warn("VexFlowMusicSheetDrawer.drawMeasure",s)}for(const s of e.staffEntries)this.drawStaffEntry(s)}drawLine(e,t,s="#FF0000FF",r=.2){return e=this.applyScreenTransformation(e),t=this.applyScreenTransformation(t),this.backend.renderLine(e,t,s,r*unitInPixels)}DrawOverlayLine(e,t,s,r="#FF0000FF",o=.2){if(!s.PageNumber||s.PageNumber>this.backends.length||s.PageNumber<1){console.log("VexFlowMusicSheetDrawer.drawOverlayLine: invalid page number / music page number doesn't correspond to an existing backend.");return}const a=s.PageNumber-1,l=this.backends[a];return e=this.applyScreenTransformation(e),t=this.applyScreenTransformation(t),l.renderLine(e,t,r,o*unitInPixels)}drawSkyLine(e){const t=e.PositionAndShape.AbsolutePosition,s=e.PositionAndShape.Size.width;this.drawSampledLine(e.SkyLine,t,s)}drawBottomLine(e){const t=new PointF2D(e.PositionAndShape.AbsolutePosition.x,e.PositionAndShape.AbsolutePosition.y),s=e.PositionAndShape.Size.width;this.drawSampledLine(e.BottomLine,t,s,"#0000FFFF")}drawSampledLine(e,t,s,r="#FF0000FF"){const o=[];let a=0;for(let c=0;c<e.length;c++)e[c]!==a&&(o.push(c),a=e[c]);const l=t;if(o.length>0){const c=this.rules.SamplingUnit;let d=new PointF2D(l.x,l.y),m=new PointF2D(o[0]/c+l.x,l.y);this.drawLine(d,m,r);let u,g;e[0]>=0&&(u=new PointF2D(o[0]/c+l.x,l.y),g=new PointF2D(o[0]/c+l.x,l.y+e[o[0]]),this.drawLine(u,g,r));for(let b=1;b<o.length;b++)d=new PointF2D(o[b-1]/c+l.x,l.y+e[o[b-1]]),m=new PointF2D(o[b]/c+l.x,l.y+e[o[b-1]]),this.drawLine(d,m,r),u=new PointF2D(o[b]/c+l.x,l.y+e[o[b-1]]),g=new PointF2D(o[b]/c+l.x,l.y+e[o[b]]),this.drawLine(u,g,r);o[o.length-1]<e.length?(d=new PointF2D(o[o.length-1]/c+l.x,l.y+e[o[o.length-1]]),m=new PointF2D(l.x+s,l.y+e[o[o.length-1]]),this.drawLine(d,m,r)):(d=new PointF2D(o[o.length-1]/c+l.x,l.y),m=new PointF2D(l.x+s,l.y),this.drawLine(d,m,r))}else{const c=new PointF2D(l.x,l.y),d=new PointF2D(l.x+s,l.y);this.drawLine(c,d,r)}}drawStaffEntry(e){if(e.FingeringEntries.length>0)for(const t of e.FingeringEntries)t.SVGNode=this.drawLabel(t,GraphicalLayers.Notes);if(e.graphicalChordContainers!==void 0&&e.graphicalChordContainers.length>0)for(const t of e.graphicalChordContainers){const s=t.GraphicalLabel;s.SVGNode=this.drawLabel(s,GraphicalLayers.Notes)}this.rules.RenderLyrics&&e.LyricsEntries.length>0&&this.drawLyrics(e.LyricsEntries,GraphicalLayers.Notes)}drawLyrics(e,t){e.forEach(s=>{const r=s.GraphicalLabel;r.SVGNode=this.drawLabel(r,t)})}drawInstrumentBrace(e,t){e.draw(this.backend.getContext())}drawGroupBracket(e,t){e.draw(this.backend.getContext())}drawOctaveShifts(e){for(const t of e.OctaveShifts)if(t){const s=t,r=this.backend.getContext(),o=s.getTextBracket();o.setContext(r);try{o.draw()}catch(a){loglevelExports.warn(a)}}}drawPedals(e){for(const t of e.Pedals)if(t){const s=t,r=this.backend.getContext(),o=s.getPedalMarking();o.setContext(r),o.draw()}}drawWavyLines(e){for(const t of e.WavyLines)if(t){const s=t,r=this.backend.getContext(),o=s.getVibratoBracket();o.setContext(r),o.draw()}}getMaxExpressionsYAndDots(e){var c,d;const t=[];let s=0;for(const m of e.measures)t.push(m.measureNumber);const r={},o={},a={};for(const m of e.AbstractExpressions)if(m instanceof GraphicalUnknownExpression&&t.includes(m.parentMeasure.MeasureNumber)){const u=this.getDotId(m),g=this.getDotId(m,"x");o[u]||(o[u]=[]),a[g]||(a[g]=[]),this.hasDot(m.Label.PositionAndShape.RelativePosition,o[u],!0)||(o[u].push(m.Label.PositionAndShape.RelativePosition),a[g].push(m.Label.PositionAndShape.RelativePosition)),r[u]=m.Label.PositionAndShape.RelativePosition}let l=0;for(const m of e.AbstractExpressions){const u=(c=m.parentMeasure)==null?void 0:c.MeasureNumber;if(m instanceof GraphicalUnknownExpression&&t.includes(u)){const g=(d=m.parentMeasure.verticalMeasureList[0])==null?void 0:d.stave,b=(g==null?void 0:g.end_x)-(g==null?void 0:g.x),y=this.getDotId(m,"x");if((a[y]||[]).length===1&&l!==u){const S=m.Label.PositionAndShape.AbsolutePosition.y;s=s===0?S:Math.min(s,S)}(a[y]||[]).length!==1&&b/10<m.Label.PositionAndShape.MarginSize.width&&(l=u+1)}}return{maxY:s,dots:r,dotsPoint:o,dotsPointByX:a}}drawExpressions(e){const t={},s=[],{maxY:r,dotsPointByX:o}=this.getMaxExpressionsYAndDots(e);for(const a of e.AbstractExpressions)if(a instanceof GraphicalInstantaneousDynamicExpression)this.drawInstantaneousDynamic(a);else if(a instanceof GraphicalInstantaneousTempoExpression){const l=a.GraphicalLabel;l.SVGNode=this.drawLabel(l,GraphicalLayers.Notes)}else if(a instanceof GraphicalContinuousDynamicExpression)this.drawContinuousDynamic(a);else if(a instanceof GraphicalUnknownExpression){const l=this.getDotId(a),c=this.getDotId(a,"x");if((o[c]||[]).length!==1){const m=a.Label.PositionAndShape.AbsolutePosition.y;t[c]?!s.includes(l)&&t[c]!==0&&(a.Label.PositionAndShape.AbsolutePosition.y=m-1):(t[c]=-Math.abs(r-m),a.Label.PositionAndShape.AbsolutePosition.y=m+t[c]),s.push(l)}const d=a.Label;d.SVGNode=this.drawLabel(d,GraphicalLayers.Notes)}else loglevelExports.warn("Unkown type of expression!")}drawInstantaneousDynamic(e){const t=e.Label;t.SVGNode=this.drawLabel(t,GraphicalLayers.Notes)}drawContinuousDynamic(e){if(e.IsVerbal){const t=e.Label;t.SVGNode=this.drawLabel(t,GraphicalLayers.Notes)}else{try{if(e.Lines.length===2&&Math.abs(e.Lines[0].Start.x-e.Lines[1].Start.x)>Number.EPSILON){let s=Math.min(...e.Lines.map(o=>o.Start.x)),r=Math.min(...e.Lines.map(o=>o.Start.y));e.Lines[0].Start.x=s,e.Lines[1].Start.x=s,e.Lines[0].Start.y=r+this.rules.WedgeOpeningLength/2,e.Lines[1].Start.y=r+this.rules.WedgeOpeningLength*2,e.Lines[0].End.y+=this.rules.WedgeOpeningLength/2,e.Lines[1].End.y+=this.rules.WedgeOpeningLength}}catch(s){}const t=this.backend.getContext();t.openGroup("lineGroup");for(const s of e.Lines){const r=new PointF2D(e.ParentStaffLine.PositionAndShape.AbsolutePosition.x+s.Start.x,e.ParentStaffLine.PositionAndShape.AbsolutePosition.y+s.Start.y),o=new PointF2D(e.ParentStaffLine.PositionAndShape.AbsolutePosition.x+s.End.x,e.ParentStaffLine.PositionAndShape.AbsolutePosition.y+s.End.y);this.drawLine(r,o,"black",s.Width)}t.closeGroup()}}renderLabel(e,t,s){return this._renderLabel(e,s)}_renderLabel(e,t){var d;if(!e.Label.print)return;const s=e.Label.fontHeight*unitInPixels,{font:r}=e.Label;let o;this.rules.ColoringEnabled&&(o=e.Label.colorDefault,e.Label.color&&(o=e.Label.color.toString()),o||(o=this.rules.DefaultColorLabel));let{fontStyle:a,fontFamily:l}=e.Label;a||(a=this.rules.DefaultFontStyle),l||(l=this.rules.DefaultFontFamily);let c;for(let m=0;m<((d=e.TextLines)==null?void 0:d.length);m++){const u=e.TextLines[m],g=this.calculatePixelDistance(u.xOffset),b=new PointF2D(t.ScreenPosition.x+g,t.ScreenPosition.y),y=this.backend.renderText(s,a,r,u.text,t.FontHeightInPixel,b,o,e.Label.fontFamily);c?c.appendChild(y):c=y,t.ScreenPosition.y=t.ScreenPosition.y+t.FontHeightInPixel,e.TextLines.length>1&&(t.ScreenPosition.y+=this.rules.SpacingBetweenTextLines)}return c}renderRectangle(e,t,s,r,o){return this.backend.renderRectangle(e,s,r,o)}applyScreenTransformation(e){return new PointF2D(e.x*unitInPixels,e.y*unitInPixels)}applyScreenTransformationForRect(e){return new RectangleF2D(e.x*unitInPixels,e.y*unitInPixels,e.width*unitInPixels,e.height*unitInPixels)}}const VF$c=Vex.Flow,_VexFlowConverter=class{static durations(i,e){const t=[],s=i.clone();for(;s.RealValue>0;){const r=s.RealValue;if(r>=2)t.push("1/2"),s.Sub(new Fraction$1(2,1));else if(r>=1)t.push("w"),s.Sub(new Fraction$1(1,1));else if(r<1&&r>=.5){if(e&&r>.5)return["w"];t.push("h"),s.Sub(new Fraction$1(1,2))}else if(r<.5&&r>=.25){if(e&&r>.25)return["h"];t.push("q"),s.Sub(new Fraction$1(1,4))}else if(r<.25&&r>=.125){if(e&&r>.125)return["q"];t.push("8"),s.Sub(new Fraction$1(1,8))}else if(r<.125&&r>=.0625){if(e&&r>.0625)return["8"];t.push("16"),s.Sub(new Fraction$1(1,16))}else if(r<.0625&&r>=.03125){if(e&&r>.03125)return["16"];t.push("32"),s.Sub(new Fraction$1(1,32))}else if(r<.03125&&r>=.015625){if(e&&r>.015625)return["32"];t.push("64"),s.Sub(new Fraction$1(1,64))}else{if(e)return["64"];t.push("128"),s.Sub(new Fraction$1(1,128))}}return t}static pitch(i,e,t,s=void 0,r=void 0){let o=r;r===void 0&&(o=3),e&&r===void 0&&(o=0,t.ClefType===ClefEnum.F&&(o=2),t.ClefType===ClefEnum.C&&(o=2));const a=NoteEnum[i.FundamentalNote].toLowerCase(),l=Pitch.accidentalVexflow(i.Accidental),c=i.Octave-t.OctaveOffset+o;let d="";return s&&(d=this.NoteHeadCode(s)),[a+"n/"+c+d,l,t]}static restToNotePitch(i,e){let t=i.Octave;switch(e){case ClefEnum.C:case ClefEnum.F:{t+=2;break}case ClefEnum.G:}return new Pitch(i.FundamentalNote,t,AccidentalEnum.NONE)}static NoteHeadCode(i){const e="/",t=i.Filled?"2":"1";switch(i.Shape){case NoteHeadShape.NORMAL:return"";case NoteHeadShape.DIAMOND:return e+"D"+t;case NoteHeadShape.TRIANGLE:return e+"T"+t;case NoteHeadShape.X:return e+"X"+t;case NoteHeadShape.CIRCLEX:return e+"X3";case NoteHeadShape.RECTANGLE:return e+"R"+t;case NoteHeadShape.SQUARE:return e+"S"+t;case NoteHeadShape.SLASH:return"";default:return""}}static GhostNotes(i){const e=[],t=_VexFlowConverter.durations(i,!1);for(const s of t)e.push(new VF$c.GhostNote({duration:s}));return e}static StaveNote(i){var P,I,R,N,G,B,k,T,V,Z,W,se,ie,fe,J,K,be;i.sortForVexflow();const e=i.notes,t=i.parentStaffEntry.parentMeasure.parentSourceMeasure.Rules,s=e[0];let r=[],o;const a=[],l=s.graphicalNoteLength,c=s.sourceNote.NoteTuplet!==void 0;let d=_VexFlowConverter.durations(l,c)[0];s.sourceNote.TypeLength!==void 0&&s.sourceNote.TypeLength!==l&&s.sourceNote.TypeLength.RealValue!==0&&(d=_VexFlowConverter.durations(s.sourceNote.TypeLength,c)[0],s.numberOfDots=s.sourceNote.DotsXml);let m,u=s.numberOfDots,g=!1,b=0,y=!1,S=!1,v;for(const oe of e){if(u<oe.numberOfDots&&(u=oe.numberOfDots),oe.sourceNote.isRest()){if(S=!0,oe.sourceNote.Pitch){r=[oe.vfpitch[0]];break}else{r=["b/4"];const le=(P=oe.parentVoiceEntry)==null?void 0:P.parentVoiceEntry;if(le){const me=(I=oe.parentVoiceEntry)==null?void 0:I.parentStaffEntry.parentMeasure.staffEntries;let ve,ye,U=-1;for(let $=0;$<me.length;$++)if(((R=me[$])==null?void 0:R.graphicalVoiceEntries[0].parentVoiceEntry)===le){U=$;break}if(U>=1&&me.length-1>=U+1&&(ve=(G=(N=me[U-1])==null?void 0:N.graphicalVoiceEntries[0])==null?void 0:G.parentVoiceEntry,ye=(k=(B=me[U+1])==null?void 0:B.graphicalVoiceEntries[0])==null?void 0:k.parentVoiceEntry,ve&&ye)){const $=ve.Notes[0],M=ye.Notes[0];if((T=$.NoteBeam)!=null&&T.Notes.includes(M)&&M.ParentStaffEntry.ParentStaff.StafflineCount!==1){const Q=ve.Notes.last().Pitch,z=oe.Clef(),F=_VexFlowConverter.pitch(_VexFlowConverter.restToNotePitch(Q.getTransposedPitch(-2),z.ClefType),!1,z);Q.FundamentalNote===4&&(r=[F[0]])}}}}if(l.RealValue===oe.sourceNote.SourceMeasure.ActiveTimeSignature.RealValue&&(r=t.DYMusicScoreType==="staff"?["d/5"]:["R/5"],d="w",u=0,g=!0,b=t.WholeRestXShiftVexflow*unitInPixels),[...oe.sourceNote.ParentStaff.Voices].filter(le=>(le==null?void 0:le.VoiceId)!=1).length){const le=oe.parentVoiceEntry.parentStaffEntry.graphicalVoiceEntries,me=oe.parentVoiceEntry.parentVoiceEntry.ParentVoice.VoiceId;let ve,ye;for(const U of le)for(const $ of U.notes){if($===oe||$.sourceNote.isRest()||!$.sourceNote.PrintObject){oe.lineShift=-2;continue}const M=$.parentVoiceEntry.parentVoiceEntry.WantedStemDirection,Q=me===1||me===5,z=Q?1:-1,O=$.sourceNote.Pitch.getHalfTone(),H=z===1&&O>ve,ne=z===-1&&O<ve;(!ve||H||ne)&&(ve=O,ye=0,Q&&M===StemDirectionType.Up||!Q&&M===StemDirectionType.Down?ye+=7:Q?ye+=1:ye+=2,d.includes("8")||M===StemDirectionType.Up&&z===-1&&(ye+=1),$.sourceNote.NoteBeam&&(ye+=1),d.includes("w")&&(ye=3.5),ye+=Math.ceil(t.RestCollisionYPadding)*.5,ye*=z,oe.lineShift=ye)}if(ve>0){let U=3;const $=oe.Clef();switch($.ClefType){case ClefEnum.F:U=5;break;case ClefEnum.C:U=4;break}v=Pitch.fromHalftone(ve),r=[_VexFlowConverter.pitch(v,!0,$,void 0,U)[0]]}}break}oe.sourceNote.Notehead&&oe.sourceNote.Notehead.Shape===NoteHeadShape.SLASH&&(y=!0);const Y=oe.vfpitch;if((Z=(V=Y[2])==null?void 0:V.Parent)!=null&&Z.Instructions)for(let ae=0,de=Y[2].Parent.Instructions.length;ae<de;++ae){const le=Y[2].Parent.Instructions[ae];le instanceof KeyInstruction&&(o=le)}r.push(Y[0]),a.push(Y[1]),m||(m=_VexFlowConverter.Clef(Y[2]).type),m==="percussion"&&oe.sourceNote.ParentStaff.StafflineCount===1&&(r=["b/4"])}if(!m)try{const oe=_VexFlowConverter.Clef(i.notes[0].clef);(oe==null?void 0:oe.type)==="percussion"&&i.notes[0].sourceNote.ParentStaff.StafflineCount===1&&(r=["b/4"])}catch(oe){}for(let oe=0,Y=u;oe<Y;++oe)d+="d";y&&(d+="s"),S&&(d+="r");let x;const A={align_center:g,auto_stem:!1,clef:m,duration:d,keys:r,stem_direction:1,slash:i.GraceSlash,note_size:20,DYMusicScoreType:t.DYMusicScoreType,keyString:_VexFlowConverter.keySignature(o)},E=i.notes[0].sourceNote;E.IsCueNote&&(A.glyph_font_scale=VF$c.DEFAULT_NOTATION_FONT_SCALE*VF$c.GraceNote.SCALE,A.stroke_px=VF$c.GraceNote.LEDGER_LINE_OFFSET),i.parentVoiceEntry.IsGrace||i.notes[0].sourceNote.IsCueNote?t.DYMusicScoreType==="jianpu"?(A.ornament=!0,x=new NumberedNote(A)):x=new VF$c.GraceNote(A):(t.DYMusicScoreType==="jianpu"?x=new NumberedNote(A):x=new VF$c.StaveNote(A),x.stagger_same_whole_notes=t.StaggerSameWholeNotes);const w=i.notes[0].lineShift;w!==0&&(x.getKeyProps()[0].line+=w),((W=window.GYM)==null?void 0:W.isDrumset)&&i.notes[0].sourceNote.isRest()&&((ie=(se=i.notes[0].sourceNote.ParentStaffEntry)==null?void 0:se.VoiceEntries)==null?void 0:ie.length)>1&&i.notes[0].sourceNote.ParentVoiceEntry.ParentVoice.VoiceId==1&&(x.getKeyProps()[0].line=4.5);const C=(fe=window.GYM)==null?void 0:fe.customBassDrum;if(C&&x.isRest()&&(x.getDuration()==="q"&&(x.getKeyProps()[0].line=C),x.getDuration()==="h"&&(x.getKeyProps()[0].line=C-1)),x.getKeyProps().forEach(({line:oe},Y)=>i.notes[Y].staffLine=oe),(t.LedgerLineWidth||t.LedgerLineStrokeStyle)&&(x.ledgerLineStyle||(x.ledgerLineStyle={}),t.LedgerLineWidth&&(x.ledgerLineStyle.lineWidth=t.LedgerLineWidth),t.LedgerLineStrokeStyle&&(x.ledgerLineStyle.strokeStyle=t.LedgerLineStrokeStyle)),t.ColoringEnabled){const oe=t.DefaultColorStem;let Y=i.parentVoiceEntry.StemColor;!Y&&oe&&(Y=oe);const ae={fillStyle:Y,strokeStyle:Y};Y&&(x.setStemStyle(ae),x.flag&&t.ColorFlags&&x.setFlagStyle(ae))}if(x.x_shift=b,i.parentVoiceEntry.IsGrace&&i.notes[0].sourceNote.NoteBeam&&(i.parentVoiceEntry.WantedStemDirection=i.notes[0].sourceNote.NoteBeam.Notes[0].ParentVoiceEntry.WantedStemDirection),i.parentVoiceEntry){let oe=i.parentVoiceEntry.WantedStemDirection;const Y=((J=window.GYM)==null?void 0:J.stemDirectionNote)||[],ae=Y==null?void 0:Y.find(de=>de.id===i.notes[0].sourceNote.NoteToGraphicalNoteObjectId);switch(ae&&typeof(ae==null?void 0:ae.direction)=="number"&&(oe=ae.direction),oe){case StemDirectionType.Up:x.setStemDirection(VF$c.Stem.UP),i.parentVoiceEntry.StemDirection=StemDirectionType.Up;break;case StemDirectionType.Down:x.setStemDirection(VF$c.Stem.DOWN),i.parentVoiceEntry.StemDirection=StemDirectionType.Down;break}}for(let oe=0,Y=e.length;oe<Y;oe+=1){if(e[oe].setIndex(x,oe),a[oe]){if(a[oe]==="###"){x.addAccidental(oe,new VF$c.Accidental("##")),x.addAccidental(oe,new VF$c.Accidental("#"));continue}else if(a[oe]==="bbs"){x.addAccidental(oe,new VF$c.Accidental("bb")),x.addAccidental(oe,new VF$c.Accidental("b"));continue}x.addAccidental(oe,new VF$c.Accidental(a[oe]))}const ae=e[oe].sourceNote.TremoloStrokes,de=e[oe].sourceNote.TremoloType;if(ae>0&&de==="single"){const le=new VF$c.Tremolo(ae);le.extra_stroke_scale=t.TremoloStrokeScale,le.y_spacing_scale=t.TremoloYSpacingScale,x&&x.duration==="w"&&x.stem.setExtension(-9),x.addModifier(oe,le)}if(ae>0&&de==="start"&&this.noteTremoloList.push(x),ae>0&&de==="stop"){if(this.noteTremoloList.push(x),this.noteTremoloList.filter(ve=>ve.duration==="w").length===this.noteTremoloList.length)try{this.noteTremoloList[0].keyProps&&this.noteTremoloList[1].keyProps&&((K=(this.noteTremoloList[0].keyProps[0].line>this.noteTremoloList[1].keyProps[0].line?this.noteTremoloList[1]:this.noteTremoloList[0]).stem)==null||K.setResetHeight(30))}catch(ve){console.error("设置都是全音符,stem的高度失败")}const me=new VF$c.Tremolo(ae,[...this.noteTremoloList]);me.extra_stroke_scale=1.2,me.y_spacing_scale=1.2,me.x_shift=-30,x.addModifier(oe,me),this.noteTremoloList=[]}this.glissandoList.length&&(x.setVibrato(this.glissandoList[0].vfnote[0]),this.glissandoList=[]),e[oe].sourceNote.glissandoType==="start"&&this.glissandoList.push(e[oe])}if(this.slideNote){try{x.setSlideNote(this.slideNote)}catch(oe){console.error(oe)}this.slideNote=null}if(i.notes[0].sourceNote.slideType==="start"&&(this.slideNote=x),E.Length.RealValue===.25&&E.Notehead&&E.Notehead.Filled===!1){const oe=x.getKeyProps();for(let Y=0;Y<oe.length;Y++)oe[Y].code="v81"}for(let oe=0,Y=u;oe<Y;++oe)x.addDotToAll();if(r.length>1){let oe=x.getKeyProps().filter(ae=>!ae.code&&ae.line>3);!((be=window.GYM)==null?void 0:be.stemDirectionNote)&&oe.length===r.length&&x.setStemDirection(-1)}t.DYMusicScoreType==="jianpu"&&window&&window.sett&&window.sett.keySignature&&x.addAccidental(0,new VF$c.Accidental("#"));try{const oe=["b","#","§","º","X"],Y={b:"b","#":"#","§":"n",º:"bb",X:"##"};for(const ae of e){const de=ae.sourceNote.voiceEntry.Timestamp;for(const le of ae.sourceNote.SourceMeasure.StaffLinkedExpressions)for(const me of le){const ve=Fraction$1.Equal(de,me.Timestamp),U=me.EntriesList.map($=>$.label).filter($=>oe.includes($)).map($=>Y[$]);if(ve){for(const $ of U)$&&x.addAnnotation(0,new VF$c.Annotation($));break}}}}catch(oe){}return x}static generateArticulations(i,e,t){var s,r,o,a,l,c;if(!(!i||i.getAttribute("type")==="GhostNote"))for(const d of e){let m=VF$c.Modifier.Position.ABOVE;i.getStemDirection()===VF$c.Stem.UP&&(m=VF$c.Modifier.Position.BELOW);let u;const g=d.articulationEnum;switch(t.ArticulationPlacementFromXML&&(d.placement===PlacementEnum.Above?m=VF$c.Modifier.Position.ABOVE:d.placement===PlacementEnum.Below&&(m=VF$c.Modifier.Position.BELOW)),g){case ArticulationEnum.accent:{u=new VF$c.Articulation("a>");break}case ArticulationEnum.downbow:{u=new VF$c.Articulation("am"),d.placement===void 0&&(m=VF$c.Modifier.Position.ABOVE);break}case ArticulationEnum.fermata:{u=new VF$c.Articulation("a@a"),m=VF$c.Modifier.Position.ABOVE;break}case ArticulationEnum.marcatodown:{u=new VF$c.Articulation("a|");break}case ArticulationEnum.marcatoup:{u=new VF$c.Articulation("a^");break}case ArticulationEnum.invertedfermata:{u=new VF$c.Articulation("a@u"),m=VF$c.Modifier.Position.BELOW;break}case ArticulationEnum.lefthandpizzicato:{u=new VF$c.Articulation("a+");break}case ArticulationEnum.naturalharmonic:{u=new VF$c.Articulation("ah");break}case ArticulationEnum.snappizzicato:{u=new VF$c.Articulation("ao");break}case ArticulationEnum.staccatissimo:{u=new VF$c.Articulation("av");break}case ArticulationEnum.staccato:{u=new VF$c.Articulation("a.");break}case ArticulationEnum.tenuto:{u=new VF$c.Articulation("a-");break}case ArticulationEnum.upbow:{u=new VF$c.Articulation("a|"),d.placement===void 0&&(m=VF$c.Modifier.Position.ABOVE);break}case ArticulationEnum.strongaccent:{u=new VF$c.Articulation("a^");break}}u&&(!i.hasStem()&&!i.isRest()&&g==ArticulationEnum.accent&&i.getLineNumber()>=3&&(m=VF$c.Modifier.Position.ABOVE,(r=(s=i==null?void 0:i.modifiers)==null?void 0:s.filter(S=>["TREMOLO"].includes(S.getCategory().toLocaleUpperCase())))!=null&&r.length&&u.setYShift(-16)),g===ArticulationEnum.strongaccent&&(m=VF$c.Modifier.Position.ABOVE,(o=window.GYM)!=null&&o.customArtPosition&&(i.getStemDirection()===1?m=VF$c.Modifier.Position.ABOVE:(m=VF$c.Modifier.Position.BELOW,u=new VF$c.Articulation("a|")))),(a=window.GYM)!=null&&a.customAccentItem&&g===ArticulationEnum.accent&&(m=VF$c.Modifier.Position.ABOVE),(l=window.GYM)!=null&&l.customLefthandpizzicatoItem&&(g===ArticulationEnum.lefthandpizzicato||g===ArticulationEnum.naturalharmonic)&&(m=VF$c.Modifier.Position.ABOVE),g===ArticulationEnum.tenuto&&i.getDuration()==="w"&&((c=window.GYM)!=null&&c.customTenutoItem)&&(m=VF$c.Modifier.Position.ABOVE),u.setPosition(m),i.addModifier(0,u))}}static generateOrnaments(i,e){let t=VF$c.Modifier.Position.ABOVE;e.placement===PlacementEnum.Below&&(t=VF$c.Modifier.Position.BELOW);let s;switch(e.GetOrnament){case OrnamentEnum.DelayedInvertedTurn:{s=new VF$c.Ornament("turn_inverted"),s.setDelayed(!0);break}case OrnamentEnum.DelayedTurn:{s=new VF$c.Ornament("turn"),s.setDelayed(!0);break}case OrnamentEnum.InvertedMordent:{s=new VF$c.Ornament("mordent"),s.setDelayed(!1);break}case OrnamentEnum.InvertedTurn:{s=new VF$c.Ornament("turn_inverted"),s.setDelayed(!1);break}case OrnamentEnum.Mordent:{s=new VF$c.Ornament("mordent_inverted"),s.setDelayed(!1);break}case OrnamentEnum.Trill:{s=new VF$c.Ornament("tr"),s.setDelayed(!1);break}case OrnamentEnum.Turn:{s=new VF$c.Ornament("turn"),s.setDelayed(!1);break}default:{loglevelExports.warn("unhandled OrnamentEnum type: "+e.GetOrnament);return}}s&&(e.AccidentalBelow!==AccidentalEnum.NONE&&s.setLowerAccidental(Pitch.accidentalVexflow(e.AccidentalBelow)),e.AccidentalAbove!==AccidentalEnum.NONE&&s.setUpperAccidental(Pitch.accidentalVexflow(e.AccidentalAbove)),s.setPosition(t),i.addModifier(0,s))}static StrokeTypeFromArpeggioType(i){switch(i){case ArpeggioType.ARPEGGIO_DIRECTIONLESS:return VF$c.Stroke.Type.ARPEGGIO_DIRECTIONLESS;case ArpeggioType.BRUSH_DOWN:return VF$c.Stroke.Type.BRUSH_UP;case ArpeggioType.BRUSH_UP:return VF$c.Stroke.Type.BRUSH_DOWN;case ArpeggioType.RASQUEDO_DOWN:return VF$c.Stroke.Type.RASQUEDO_UP;case ArpeggioType.RASQUEDO_UP:return VF$c.Stroke.Type.RASQUEDO_DOWN;case ArpeggioType.ROLL_DOWN:return VF$c.Stroke.Type.ROLL_UP;case ArpeggioType.ROLL_UP:return VF$c.Stroke.Type.ROLL_DOWN;default:return VF$c.Stroke.Type.ARPEGGIO_DIRECTIONLESS}}static CreateTabNote(i){const e=[],t=i.notes.reverse(),s=[],r=i.notes[0].graphicalNoteLength,o=i.notes[0].sourceNote.NoteTuplet!==void 0;let a=_VexFlowConverter.durations(r,o)[0],l=0;for(const d of i.notes){const m=d.sourceNote,u={str:m.StringNumberTab,fret:m.FretNumber};e.push(u),m.BendArray&&m.BendArray.forEach(function(g){let b;const y=g.bendalter-u.fret;y>1?b="Full":y===1?b="1/2":b="1/4",g.direction==="up"?s.push({type:VF$c.Bend.UP,text:b,width:10}):s.push({type:VF$c.Bend.DOWN,text:b,width:10})}),l<d.numberOfDots&&(l=d.numberOfDots)}for(let d=0,m=l;d<m;++d)a+="d";const c=new VF$c.TabNote({duration:a,positions:e});for(let d=0,m=t.length;d<m;d+=1)t[d].setIndex(c,d);return s.forEach(function(d){d.type===VF$c.Bend.UP?c.addModifier(new VF$c.Bend(d.text,!1)):c.addModifier(new VF$c.Bend(d.text,!0))}),c}static Clef(i,e="default"){let t,s;switch(e!=="default"&&e!=="small"&&(loglevelExports.warn(`Invalid VexFlow clef size "${e}" specified. Using "default".`),e="default"),i.ClefType){case ClefEnum.G:switch(i.Line){case 1:t="french";break;case 2:t="treble";break;default:t="treble",loglevelExports.error(`Clef ${ClefEnum[i.ClefType]} on line ${i.Line} not supported by VexFlow. Using default value "${t}".`)}break;case ClefEnum.F:switch(i.Line){case 4:t="bass";break;case 3:t="baritone-f";break;case 5:t="subbass";break;default:t="bass",loglevelExports.error(`Clef ${ClefEnum[i.ClefType]} on line ${i.Line} not supported by VexFlow. Using default value "${t}".`)}break;case ClefEnum.C:switch(i.Line){case 3:t="alto";break;case 4:t="tenor";break;case 1:t="soprano";break;case 2:t="mezzo-soprano";break;default:t="alto",loglevelExports.error(`Clef ${ClefEnum[i.ClefType]} on line ${i.Line} not supported by VexFlow. Using default value "${t}".`)}break;case ClefEnum.percussion:t="percussion";break;case ClefEnum.TAB:t="treble";break;default:loglevelExports.info("bad clef type: "+i.ClefType),t="treble"}return i.OctaveOffset===1&&t!=="bass"?s="8va":i.OctaveOffset===-1&&(s="8vb"),{type:t,size:e,annotation:s}}static TimeSignature(i){let e;switch(i.SymbolEnum){case RhythmSymbolEnum.NONE:e=i.Rhythm.Numerator+"/"+i.Rhythm.Denominator;break;case RhythmSymbolEnum.COMMON:e="C";break;case RhythmSymbolEnum.CUT:e="C|";break}return new VF$c.TimeSignature(e)}static keySignature(i){if(!i)return;let e;switch(i.Mode){case KeyEnum.minor:e=_VexFlowConverter.minorMap[i.Key]+"m";break;case KeyEnum.major:e=_VexFlowConverter.majorMap[i.Key];break;case KeyEnum.none:e=_VexFlowConverter.majorMap[i.Key];break;default:e="C"}return e}static line(i,e){switch(i){case SystemLinesEnum.SingleThin:return e===SystemLinePosition.MeasureBegin?VF$c.StaveConnector.type.SINGLE:VF$c.StaveConnector.type.SINGLE_RIGHT;case SystemLinesEnum.DoubleThin:return VF$c.StaveConnector.type.THIN_DOUBLE;case SystemLinesEnum.ThinBold:return VF$c.StaveConnector.type.BOLD_DOUBLE_RIGHT;case SystemLinesEnum.BoldThinDots:return VF$c.StaveConnector.type.BOLD_DOUBLE_LEFT;case SystemLinesEnum.DotsThinBold:return VF$c.StaveConnector.type.BOLD_DOUBLE_RIGHT;case SystemLinesEnum.DotsBoldBoldDots:return VF$c.StaveConnector.type.BOLD_DOUBLE_RIGHT;case SystemLinesEnum.None:return VF$c.StaveConnector.type.NONE}}static font(i,e=FontStyles.Regular,t=Fonts.TimesNewRoman,s,r=void 0){let o="normal",a="normal",l=`'${s.DefaultFontFamily}'`;switch(e){case FontStyles.Bold:a="bold";break;case FontStyles.Italic:o="italic";break;case FontStyles.BoldItalic:o="italic",a="bold";break;case FontStyles.Underlined:break}switch(t){case Fonts.Kokila:break}return r&&r!=="default"&&(l=`'${r}'`),o+" "+a+" "+Math.floor(i)+"px "+l}static fontStyle(i){switch(i){case FontStyles.Bold:return"bold";case FontStyles.Italic:return"italic";case FontStyles.BoldItalic:return"italic bold";default:return"normal"}}static style(i){return OUTLINE_AND_FILL_STYLE_DICT.getValue(i)}};let VexFlowConverter=_VexFlowConverter;VexFlowConverter.majorMap={"-1":"F","-2":"Bb","-3":"Eb","-4":"Ab","-5":"Db","-6":"Gb","-7":"Cb","-8":"Fb",0:"C",1:"G",2:"D",3:"A",4:"E",5:"B",6:"F#",7:"C#",8:"G#"};VexFlowConverter.minorMap={"-1":"D","-2":"G","-3":"C","-4":"F","-5":"Bb","-6":"Eb","-7":"Ab","-8":"Db",0:"A",1:"E",2:"B",3:"F#",4:"C#",5:"G#",6:"D#",7:"A#",8:"E#"};VexFlowConverter.noteTremoloList=[];VexFlowConverter.glissandoList=[];VexFlowConverter.slideNote=null;class OctaveShift{constructor(e,t){this.numberXml=1,this.setOctaveShiftValue(e,t)}get Type(){return this.octaveValue}set Type(e){this.octaveValue=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get ParentStartMultiExpression(){return this.startMultiExpression}set ParentStartMultiExpression(e){this.startMultiExpression=e}get ParentEndMultiExpression(){return this.endMultiExpression}set ParentEndMultiExpression(e){this.endMultiExpression=e}setOctaveShiftValue(e,t){t===1&&e==="down"?this.octaveValue=0:t===1&&e==="up"?this.octaveValue=1:t===2&&e==="down"?this.octaveValue=2:t===2&&e==="up"?this.octaveValue=3:this.octaveValue=4}static getPitchFromOctaveShift(e,t){if(!e)return;let s=e.Octave;switch(t){case 0:s-=1;break;case 1:s+=1;break;case 2:s-=2;break;case 3:s+=2;break;case 4:default:s+=0}return new Pitch(e.FundamentalNote,s,e.Accidental)}}var OctaveEnum=(i=>(i[i.VA8=0]="VA8",i[i.VB8=1]="VB8",i[i.MA15=2]="MA15",i[i.MB15=3]="MB15",i[i.NONE=4]="NONE",i))(OctaveEnum||{});class AbstractTempoExpression extends AbstractExpression{constructor(e,t,s,r){super(t),this.label=e,this.staffNumber=s,this.parentMultiTempoExpression=r}get Label(){return this.label}set Label(e){this.label=e}get Placement(){return this.placement}set Placement(e){this.placement=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get ParentMultiTempoExpression(){return this.parentMultiTempoExpression}static isStringInStringList(e,t){for(const s of e)if(AbstractTempoExpression.stringContainsSeparatedWord(t.toLowerCase().trim(),s.toLowerCase().trim()))return!0;return!1}static stringContainsSeparatedWord(e,t){return e===t||e.indexOf(" "+t)!==-1||e.indexOf(t+" ")!==-1}}const _InstantaneousTempoExpression=class extends AbstractTempoExpression{constructor(i,e,t,s,r,o=!1){super(i,e,t,r),this.setTempoAndTempoType(s)}static getDefaultValueForTempoType(i){switch(i){case 1:return 20;case 2:return 30;case 3:return 48;case 4:return 52;case 5:return 63;case 6:return 70;case 7:return 75;case 8:return 88;case 9:return 92;case 10:return 96;case 11:return 106;case 12:return 112;case 13:return 118;case 14:return 130;case 15:return 140;case 16:return 155;case 17:return 170;case 18:return 184;case 19:return 200;default:throw new ArgumentOutOfRangeException("tempoEnum")}}static isInputStringInstantaneousTempo(i){return i?_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghissimo,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoGrave,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLento,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLargo,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghetto,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagio,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagietto,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndanteModerato,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndante,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndantino,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoModerato,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegretto,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegroModerato,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegro,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivace,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivacissimo,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegrissimo,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPresto,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPrestissimo,i)||_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoChangesGeneral,i):!1}get Label(){return this.label}set Label(i){this.label=i}get Placement(){return this.placement}set Placement(i){this.placement=i}get StaffNumber(){return this.staffNumber}set StaffNumber(i){this.staffNumber=i}get Enum(){return this.tempoEnum}get TempoInBpm(){return this.tempoInBpm}set TempoInBpm(i){this.tempoInBpm=i}get ParentMultiTempoExpression(){return this.parentMultiTempoExpression}getAbsoluteTimestamp(){return Fraction$1.plus(this.ParentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.ParentMultiTempoExpression.Timestamp)}getAbsoluteFloatTimestamp(){return Fraction$1.plus(this.ParentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.ParentMultiTempoExpression.Timestamp).RealValue}setTempoAndTempoType(i){if(!this.label){this.tempoInBpm=i,this.tempoEnum=23;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghissimo,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(1)),this.tempoInBpm=i,this.tempoEnum=1;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoGrave,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(2)),this.tempoInBpm=i,this.tempoEnum=2;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLento,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(3)),this.tempoInBpm=i,this.tempoEnum=3;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLargo,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(4)),this.tempoInBpm=i,this.tempoEnum=4;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoLarghetto,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(5)),this.tempoInBpm=i,this.tempoEnum=5;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagio,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(6)),this.tempoInBpm=i,this.tempoEnum=6;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAdagietto,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(7)),this.tempoInBpm=i,this.tempoEnum=7;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndanteModerato,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(8)),this.tempoInBpm=i,this.tempoEnum=8;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndante,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(9)),this.tempoInBpm=i,this.tempoEnum=9;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAndantino,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(10)),this.tempoInBpm=i,this.tempoEnum=10;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoModerato,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(11)),this.tempoInBpm=i,this.tempoEnum=11;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegretto,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(12)),this.tempoInBpm=i,this.tempoEnum=12;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegroModerato,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(13)),this.tempoInBpm=i,this.tempoEnum=13;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegro,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(14)),this.tempoInBpm=i,this.tempoEnum=14;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivace,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(15)),this.tempoInBpm=i,this.tempoEnum=15;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoVivacissimo,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(16)),this.tempoInBpm=i,this.tempoEnum=16;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAllegrissimo,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(17)),this.tempoInBpm=i,this.tempoEnum=17;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPresto,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(18)),this.tempoInBpm=i,this.tempoEnum=18;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoPrestissimo,this.label)){i===0&&(i=_InstantaneousTempoExpression.getDefaultValueForTempoType(19)),this.tempoInBpm=i,this.tempoEnum=19;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoAddons,this.label)){this.tempoInBpm=0,this.tempoEnum=21;return}if(_InstantaneousTempoExpression.isStringInStringList(_InstantaneousTempoExpression.listInstantaneousTempoChangesGeneral,this.label)){this.tempoInBpm=0,this.tempoEnum=22;return}}};let InstantaneousTempoExpression=_InstantaneousTempoExpression;InstantaneousTempoExpression.listInstantaneousTempoLarghissimo=["Larghissimo","Sehr breit","very, very slow"];InstantaneousTempoExpression.listInstantaneousTempoGrave=["Grave","Schwer","slow and solemn"];InstantaneousTempoExpression.listInstantaneousTempoLento=["Lento","Lent","Langsam","slowly"];InstantaneousTempoExpression.listInstantaneousTempoLargo=["Largo","Breit","broadly"];InstantaneousTempoExpression.listInstantaneousTempoLarghetto=["Larghetto","Etwas breit","rather broadly"];InstantaneousTempoExpression.listInstantaneousTempoAdagio=["Adagio","Langsam","Ruhig","slow and stately"];InstantaneousTempoExpression.listInstantaneousTempoAdagietto=["Adagietto","Ziemlich ruhig","Ziemlich langsam","rather slow"];InstantaneousTempoExpression.listInstantaneousTempoAndanteModerato=["Andante moderato"];InstantaneousTempoExpression.listInstantaneousTempoAndante=["Andante","Gehend","Schreitend","at a walking pace"];InstantaneousTempoExpression.listInstantaneousTempoAndantino=["Andantino"];InstantaneousTempoExpression.listInstantaneousTempoModerato=["Moderato","Mäßig","Mod�r�","moderately"];InstantaneousTempoExpression.listInstantaneousTempoAllegretto=["Allegretto","fast"];InstantaneousTempoExpression.listInstantaneousTempoAllegroModerato=["Allegro moderato"];InstantaneousTempoExpression.listInstantaneousTempoAllegro=["Allegro","Rapide","Vite","Rasch","Schnell","Fr�hlich"];InstantaneousTempoExpression.listInstantaneousTempoVivace=["Vivace","Lebhaft","Lebendig","lively and fast"];InstantaneousTempoExpression.listInstantaneousTempoVivacissimo=["Vivacissimo","Sehr lebhaft","Sehr lebendig"];InstantaneousTempoExpression.listInstantaneousTempoAllegrissimo=["Allegrissimo","very fast"];InstantaneousTempoExpression.listInstantaneousTempoPresto=["Presto","Sehr schnell","Geschwind"];InstantaneousTempoExpression.listInstantaneousTempoPrestissimo=["Prestissimo","äußerst schnell"];InstantaneousTempoExpression.listInstantaneousTempoChangesGeneral=["tempo primo","a tempo","tempo i","rubato","doppio movimento"];InstantaneousTempoExpression.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"];var TempoEnum=(i=>(i[i.none=0]="none",i[i.larghissimo=1]="larghissimo",i[i.grave=2]="grave",i[i.lento=3]="lento",i[i.largo=4]="largo",i[i.larghetto=5]="larghetto",i[i.adagio=6]="adagio",i[i.adagietto=7]="adagietto",i[i.andanteModerato=8]="andanteModerato",i[i.andante=9]="andante",i[i.andantino=10]="andantino",i[i.moderato=11]="moderato",i[i.allegretto=12]="allegretto",i[i.allegroModerato=13]="allegroModerato",i[i.allegro=14]="allegro",i[i.vivace=15]="vivace",i[i.vivacissimo=16]="vivacissimo",i[i.allegrissimo=17]="allegrissimo",i[i.presto=18]="presto",i[i.prestissimo=19]="prestissimo",i[i.lastRealTempo=20]="lastRealTempo",i[i.addon=21]="addon",i[i.changes=22]="changes",i[i.metronomeMark=23]="metronomeMark",i))(TempoEnum||{});const _MoodExpression=class extends AbstractExpression{constructor(i,e,t){super(e),this.label=i,this.staffNumber=t,this.setMoodType()}static isInputStringMood(i){return i?_MoodExpression.isStringInStringList(_MoodExpression.listMoodAffettuoso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodAgitato,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodAnimato,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodAppassionato,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodBrillante,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodCantabile,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodDolce,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodEnergico,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodEroico,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodEspressivo,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodFurioso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGiocoso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGioioso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrandioso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrazioso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodLacrimoso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodLeggiero,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMaestoso,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMalinconico,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarcato,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarziale,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMesto,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodMorendo,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodNobilmente,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodPatetico,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodPesante,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSaltando,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSautille,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodScherzando,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSostenuto,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodSpiccato,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodTenerezza,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodTranquillamente,i)||_MoodExpression.isStringInStringList(_MoodExpression.listMoodTrionfante,i):!1}get Label(){return this.label}set Label(i){this.label=i}get Mood(){return this.moodType}set Mood(i){this.moodType=i}get StaffNumber(){return this.staffNumber}set StaffNumber(i){this.staffNumber=i}get Placement(){return this.placement}set Placement(i){this.placement=i}setMoodType(){_MoodExpression.isStringInStringList(_MoodExpression.listMoodAffettuoso,this.label)?this.moodType=0:_MoodExpression.isStringInStringList(_MoodExpression.listMoodAgitato,this.label)?this.moodType=1:_MoodExpression.isStringInStringList(_MoodExpression.listMoodAnimato,this.label)?this.moodType=3:_MoodExpression.isStringInStringList(_MoodExpression.listMoodAppassionato,this.label)?this.moodType=2:_MoodExpression.isStringInStringList(_MoodExpression.listMoodBrillante,this.label)?this.moodType=4:_MoodExpression.isStringInStringList(_MoodExpression.listMoodCantabile,this.label)?this.moodType=5:_MoodExpression.isStringInStringList(_MoodExpression.listMoodDolce,this.label)?this.moodType=6:_MoodExpression.isStringInStringList(_MoodExpression.listMoodEnergico,this.label)?this.moodType=7:_MoodExpression.isStringInStringList(_MoodExpression.listMoodEroico,this.label)?this.moodType=8:_MoodExpression.isStringInStringList(_MoodExpression.listMoodEspressivo,this.label)?this.moodType=9:_MoodExpression.isStringInStringList(_MoodExpression.listMoodFurioso,this.label)?this.moodType=10:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGiocoso,this.label)?this.moodType=11:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGioioso,this.label)?this.moodType=12:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrandioso,this.label)?this.moodType=14:_MoodExpression.isStringInStringList(_MoodExpression.listMoodGrazioso,this.label)?this.moodType=15:_MoodExpression.isStringInStringList(_MoodExpression.listMoodLacrimoso,this.label)?this.moodType=13:_MoodExpression.isStringInStringList(_MoodExpression.listMoodLeggiero,this.label)?this.moodType=16:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMaestoso,this.label)?this.moodType=17:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMalinconico,this.label)?this.moodType=18:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarcato,this.label)?this.moodType=19:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMarziale,this.label)?this.moodType=20:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMesto,this.label)?this.moodType=21:_MoodExpression.isStringInStringList(_MoodExpression.listMoodMorendo,this.label)?this.moodType=22:_MoodExpression.isStringInStringList(_MoodExpression.listMoodNobilmente,this.label)?this.moodType=23:_MoodExpression.isStringInStringList(_MoodExpression.listMoodPatetico,this.label)?this.moodType=24:_MoodExpression.isStringInStringList(_MoodExpression.listMoodPesante,this.label)?this.moodType=25:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSaltando,this.label)?this.moodType=27:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSautille,this.label)?this.moodType=26:_MoodExpression.isStringInStringList(_MoodExpression.listMoodScherzando,this.label)?this.moodType=28:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSostenuto,this.label)?this.moodType=29:_MoodExpression.isStringInStringList(_MoodExpression.listMoodSpiccato,this.label)?this.moodType=30:_MoodExpression.isStringInStringList(_MoodExpression.listMoodTenerezza,this.label)?this.moodType=31:_MoodExpression.isStringInStringList(_MoodExpression.listMoodTranquillamente,this.label)?this.moodType=32:_MoodExpression.isStringInStringList(_MoodExpression.listMoodTrionfante,this.label)&&(this.moodType=33)}};let MoodExpression=_MoodExpression;MoodExpression.listMoodAffettuoso=["affettuoso"];MoodExpression.listMoodAgitato=["agitato"];MoodExpression.listMoodAppassionato=["appassionato"];MoodExpression.listMoodAnimato=["animato","lively"];MoodExpression.listMoodBrillante=["brillante"];MoodExpression.listMoodCantabile=["cantabile"];MoodExpression.listMoodDolce=["dolce"];MoodExpression.listMoodEnergico=["energico"];MoodExpression.listMoodEroico=["eroico"];MoodExpression.listMoodEspressivo=["espressivo"];MoodExpression.listMoodFurioso=["furioso"];MoodExpression.listMoodGiocoso=["giocoso"];MoodExpression.listMoodGioioso=["gioioso"];MoodExpression.listMoodLacrimoso=["lacrimoso"];MoodExpression.listMoodGrandioso=["grandioso"];MoodExpression.listMoodGrazioso=["grazioso"];MoodExpression.listMoodLeggiero=["leggiero"];MoodExpression.listMoodMaestoso=["maestoso"];MoodExpression.listMoodMalinconico=["malinconico"];MoodExpression.listMoodMarcato=["marcato"];MoodExpression.listMoodMarziale=["marziale"];MoodExpression.listMoodMesto=["mesto"];MoodExpression.listMoodMorendo=["morendo"];MoodExpression.listMoodNobilmente=["nobilmente"];MoodExpression.listMoodPatetico=["patetico"];MoodExpression.listMoodPesante=["pesante"];MoodExpression.listMoodSautille=["sautille"];MoodExpression.listMoodSaltando=["saltando"];MoodExpression.listMoodScherzando=["scherzando"];MoodExpression.listMoodSostenuto=["sostenuto"];MoodExpression.listMoodSpiccato=["spiccato"];MoodExpression.listMoodTenerezza=["tenerezza"];MoodExpression.listMoodTranquillamente=["tranquillamente"];MoodExpression.listMoodTrionfante=["trionfante"];class UnknownExpression extends AbstractExpression{constructor(e,t,s,r){super(t),this.label=e,this.staffNumber=r,s===void 0&&(s=TextAlignmentEnum.LeftBottom),this.textAlignment=s}get Label(){return this.label}get Placement(){return this.placement}set Placement(e){this.placement=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get TextAlignment(){return this.textAlignment}}class MultiExpression{constructor(e,t){this.unknownList=[],this.moodList=[],this.expressions=[],this.sourceMeasure=e,this.timestamp=t}get SourceMeasureParent(){return this.sourceMeasure}set SourceMeasureParent(e){this.sourceMeasure=e}get StaffNumber(){return this.staffNumber}set StaffNumber(e){this.staffNumber=e}get Timestamp(){return this.timestamp}set Timestamp(e){this.timestamp=e}get AbsoluteTimestamp(){return Fraction$1.plus(this.timestamp,this.sourceMeasure.AbsoluteTimestamp)}get InstantaneousDynamic(){return this.instantaneousDynamic}set InstantaneousDynamic(e){this.instantaneousDynamic=e}get EndingContinuousDynamic(){return this.endingContinuousDynamic}set EndingContinuousDynamic(e){this.endingContinuousDynamic=e}get StartingContinuousDynamic(){return this.startingContinuousDynamic}set StartingContinuousDynamic(e){this.startingContinuousDynamic=e}get MoodList(){return this.moodList}get UnknownList(){return this.unknownList}get EntriesList(){return this.expressions}get OctaveShiftStart(){return this.octaveShiftStart}set OctaveShiftStart(e){this.octaveShiftStart=e}get OctaveShiftEnd(){return this.octaveShiftEnd}set OctaveShiftEnd(e){this.octaveShiftEnd=e}get CombinedExpressionsText(){return this.combinedExpressionsText}set CombinedExpressionsText(e){this.combinedExpressionsText=e}getPlacementOfFirstEntry(){let e=PlacementEnum.Above;return this.expressions.length>0&&(this.expressions[0].expression instanceof InstantaneousDynamicExpression?e=this.expressions[0].expression.Placement:this.expressions[0].expression instanceof ContinuousDynamicExpression?e=this.expressions[0].expression.Placement:this.expressions[0].expression instanceof MoodExpression?e=this.expressions[0].expression.Placement:this.expressions[0].expression instanceof UnknownExpression&&(e=this.expressions[0].expression.Placement)),e}getFontstyleOfFirstEntry(){var t;let e=FontStyles.Regular;return this.expressions.length>0&&(this.expressions[0].expression instanceof ContinuousDynamicExpression||this.expressions[0].expression instanceof MoodExpression?e=FontStyles.Italic:this.expressions[0].expression instanceof UnknownExpression&&(e=(t=this.expressions[0].expression.fontStyle)!=null?t:FontStyles.Regular)),e}addExpression(e,t){e instanceof InstantaneousDynamicExpression?(this.instantaneousDynamic&&this.removeExpressionFromEntryList(this.InstantaneousDynamic),this.instantaneousDynamic=e,this.instantaneousDynamic.ParentMultiExpression=this):e instanceof ContinuousDynamicExpression?this.startingContinuousDynamic=e:e instanceof MoodExpression?this.moodList.push(e):e instanceof UnknownExpression&&this.unknownList.push(e),this.addExpressionToEntryList(e,t)}CompareTo(e){return this.Timestamp.RealValue>e.Timestamp.RealValue?1:this.Timestamp.RealValue<e.Timestamp.RealValue?-1:0}addExpressionToEntryList(e,t){const s=new MultiExpressionEntry;s.prefix=t,s.expression=e,e instanceof ContinuousDynamicExpression||e instanceof MoodExpression||e instanceof UnknownExpression?s.label=e.Label:s.label="",this.expressions.push(s)}removeExpressionFromEntryList(e){for(let t=0,s=this.expressions.length;t<s;++t)if(this.expressions[t].expression===e){this.expressions.splice(t,1);break}}}class MultiExpressionEntry{}const _ContinuousTempoExpression=class extends AbstractTempoExpression{constructor(i,e,t,s){super(i,e,t,s),this.setTempoType()}static isInputStringContinuousTempo(i){return i?_ContinuousTempoExpression.isStringInStringList(_ContinuousTempoExpression.listContinuousTempoFaster,i)||_ContinuousTempoExpression.isStringInStringList(_ContinuousTempoExpression.listContinuousTempoSlower,i):!1}static isIncreasingTempo(i){return i<=4}static isDecreasingTempo(i){return i>=5&&i<=12}get TempoType(){return this.tempoType}set TempoType(i){this.tempoType=i}get StartTempo(){return this.startTempo}set StartTempo(i){this.startTempo=i}get EndTempo(){return this.endTempo}set EndTempo(i){this.endTempo=i}get AbsoluteEndTimestamp(){return this.absoluteEndTimestamp}set AbsoluteEndTimestamp(i){this.absoluteEndTimestamp=i}get AbsoluteTimestamp(){return this.ParentMultiTempoExpression.AbsoluteTimestamp}getAbsoluteFloatTimestamp(){return this.ParentMultiTempoExpression.AbsoluteTimestamp.RealValue}getInterpolatedTempo(i){const e=Fraction$1.plus(this.parentMultiTempoExpression.SourceMeasureParent.AbsoluteTimestamp,this.parentMultiTempoExpression.Timestamp);if(i.lt(e))return-1;if(this.absoluteEndTimestamp.lt(i))return-2;const t=Fraction$1.minus(i,e).RealValue/Fraction$1.minus(this.absoluteEndTimestamp,e).RealValue;return Math.max(0,Math.min(250,this.startTempo+(this.endTempo-this.startTempo)*t))}setTempoType(){_ContinuousTempoExpression.isStringInStringList(_ContinuousTempoExpression.listContinuousTempoFaster,this.label)?this.tempoType=0:_ContinuousTempoExpression.isStringInStringList(_ContinuousTempoExpression.listContinuousTempoSlower,this.label)&&(this.tempoType=9)}};let ContinuousTempoExpression=_ContinuousTempoExpression;ContinuousTempoExpression.listContinuousTempoFaster=["accelerando","piu mosso","poco piu","stretto"];ContinuousTempoExpression.listContinuousTempoSlower=["poco meno","meno mosso","piu lento","rallentando","ritardando","ritenuto","ritard.","ritard","riten.","riten"];class MultiTempoExpression{constructor(e,t){this.expressions=[],this.sourceMeasure=e,this.timestamp=t}get Timestamp(){return this.timestamp}get AbsoluteTimestamp(){return Fraction$1.plus(this.sourceMeasure.AbsoluteTimestamp,this.timestamp)}get SourceMeasureParent(){return this.sourceMeasure}set SourceMeasureParent(e){this.sourceMeasure=e}get InstantaneousTempo(){return this.instantaneousTempo}get ContinuousTempo(){return this.continuousTempo}get EntriesList(){return this.expressions}get CombinedExpressionsText(){return this.combinedExpressionsText}set CombinedExpressionsText(e){this.combinedExpressionsText=e}getPlacementOfFirstEntry(){let e=PlacementEnum.Above;return this.expressions.length>0&&(this.expressions[0].Expression instanceof InstantaneousTempoExpression?e=this.expressions[0].Expression.Placement:this.expressions[0].Expression instanceof ContinuousTempoExpression&&(e=this.expressions[0].Expression.Placement)),e}getFontstyleOfFirstEntry(){let e=FontStyles.Regular;return this.expressions[0].Expression instanceof InstantaneousTempoExpression?e=FontStyles.Bold:this.expressions[0].Expression instanceof ContinuousTempoExpression&&(e=FontStyles.Italic),e}addExpression(e,t){if(this.checkIfAlreadyExists(e))return;e instanceof InstantaneousTempoExpression?this.instantaneousTempo=e:e instanceof ContinuousTempoExpression&&(this.continuousTempo=e);const s=new TempoExpressionEntry;s.prefix=t,s.Expression=e,s.label=e.Label,this.expressions.push(s)}CompareTo(e){return this.Timestamp.RealValue>e.Timestamp.RealValue?1:this.Timestamp.RealValue<e.Timestamp.RealValue?-1:0}checkIfAlreadyExists(e){for(const t of this.expressions)if(t.label===e.Label)return!0;return!1}}class TempoExpressionEntry{get Expression(){return this.expression}set Expression(e){this.expression=e}}class RehearsalExpression extends AbstractExpression{constructor(e,t){super(t),this.label=e}}class MusicSystemBuilder{constructor(){this.musicSystems=[],this.globalSystemIndex=0,this.leadSheet=!1}initialize(e,t,s){this.leadSheet=e.LeadSheet,this.graphicalMusicSheet=e,this.rules=this.graphicalMusicSheet.ParentMusicSheet.Rules,this.measureList=t,this.numberOfVisibleStaffLines=s,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 o,a,l;const e=this.getFullPageSystemWidth();let t=!1;this.measureListIndex=0,this.currentSystemParams=new SystemBuildParameters,this.currentSystemParams.currentSystem=this.initMusicSystem();let s=0,r=0;for(;this.measureListIndex<this.measureList.length;){const c=this.measureList[this.measureListIndex];if(!c||!c[0]){this.measureListIndex++;continue}for(let R=0,N=c.length;R<N;++R)c[R].resetLayout();const d=c[0].parentSourceMeasure,m=d.HasEndLine,u=m&&this.rules.NewPartAndSystemAfterFinalBarline,g=this.currentSystemParams.IsSystemStartMeasure();d.IsSystemStartMeasure=g;const b=d===this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();let y=this.rules.MeasureLeftMargin,S=0;const v=this.getMeasureStartLine();if(y+=this.getLineWidth(c[0],v,g),!this.leadSheet){let R=!1;t&&this.rules.ShowRhythmAgainAfterPartEndOrFinalBarline&&(R=!0),y+=this.addBeginInstructions(c,g,b||R),S+=this.addEndInstructions(c)}let x=0;for(let R=0;R<this.numberOfVisibleStaffLines;R++)x=Math.max(x,c[R].minimumStaffEntriesWidth);const A=this.getMeasureEndLine();S+=this.getLineWidth(c[0],A,g);let E=this.rules.MeasureLeftMargin,w;if(this.measureListIndex+1<this.measureList.length){const R=this.measureList[this.measureListIndex+1];w=(o=R[0])==null?void 0:o.parentSourceMeasure,w!=null&&w.hasBeginInstructions()&&(E+=this.addBeginInstructions(R,!1,!1))}let _=y+S+x;(l=(a=c[0])==null?void 0:a.parentSourceMeasure)!=null&&l.multipleRestMeasures&&(_=this.rules.MultipleRestMeasureDefaultWidth);const C=this.currentSystemParams.currentWidth+_+E<e;s===0&&(s=Math.abs(Math.floor((e-y-S-E)/(_-y))),s=s%2===0?s:s-1,s<1&&(s=1));const P=this.rules.NewPageAtXMLNewPageAttribute&&d.printNewPageXml,I=P||this.rules.NewSystemAtXMLNewSystemAttribute&&d.printNewSystemXml;if((g||C&&!I)&&(this.rules.DYWorkSpecial||r<s)){if(this.addMeasureToSystem(c,v,A,_,y,x,S),this.updateActiveClefs(d,c),this.measureListIndex++,u){if(this.rules.MaxSystemToDrawNumber===this.musicSystems.length)return this.finalizeCurrentSystem(c,!this.rules.StretchLastSystemLine,!1),this.musicSystems;this.finalizeCurrentAndCreateNewSystem(c,!this.rules.StretchLastSystemLine,!1)}t=m}else{if(r=0,this.rules.MaxSystemToDrawNumber===this.musicSystems.length)return this.finalizeCurrentSystem(c,!1,!0,P),this.musicSystems;this.finalizeCurrentAndCreateNewSystem(c,!1,!0,P)}}if(this.currentSystemParams.systemMeasures.length>0){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 e of this.musicSystems)this.optimizeDistanceBetweenStaffLines(e);this.calculateMusicSystemsRelativePositions()}setMeasureWidth(e,t,s,r){for(let o=0,a=e.length;o<a;++o){const l=e[o];l.setWidth(t),s>0&&(l.beginInstructionsWidth=s),r>0&&(l.endInstructionsWidth=r)}}finalizeCurrentAndCreateNewSystem(e,t=!1,s=!0,r=!1){this.finalizeCurrentSystem(e,t,s,r),this.currentSystemParams=new SystemBuildParameters,e!==void 0&&this.measureListIndex<this.measureList.length&&(this.currentSystemParams.currentSystem=this.initMusicSystem())}finalizeCurrentSystem(e,t=!1,s=!0,r=!1){this.currentSystemParams.currentSystem.breaksPage=r,this.adaptRepetitionLineWithIfNeeded(),e!==void 0&&s&&this.checkAndCreateExtraInstructionMeasure(e),this.stretchMusicSystem(t)}adaptRepetitionLineWithIfNeeded(){const e=this.currentSystemParams.systemMeasures;if(e.length>=1){const t=this.currentSystemParams.currentSystem.GraphicalMeasures[this.currentSystemParams.currentSystem.GraphicalMeasures.length-1];let s=0;const r=e[e.length-1];r.endLine===SystemLinesEnum.DotsBoldBoldDots&&(r.endLine=SystemLinesEnum.DotsThinBold,s=t[0].getLineWidth(SystemLinesEnum.DotsBoldBoldDots)/2-t[0].getLineWidth(SystemLinesEnum.DotsThinBold)),this.currentSystemParams.currentSystemFixWidth-=s;for(let o=0,a=t.length;o<a;++o){const l=t[o];l.endInstructionsWidth-=s}}}addMeasureToSystem(e,t,s,r,o,a,l){this.currentSystemParams.systemMeasures.push({beginLine:t,endLine:s}),this.setMeasureWidth(e,r,o,l),this.addStaveMeasuresToSystem(e),this.currentSystemParams.currentWidth+=r,this.currentSystemParams.currentSystemFixWidth+=o+l,this.currentSystemParams.currentSystemVarWidth+=a,this.currentSystemParams.systemMeasureIndex++}initMusicSystem(){const e=MusicSheetCalculator.symbolFactory.createMusicSystem(this.globalSystemIndex++,this.rules);return this.musicSystems.push(e),this.layoutSystemStaves(e),e.createMusicSystemLabel(this.rules.InstrumentLabelTextHeight,this.rules.SystemLabelsRightMargin,this.rules.LabelMarginBorderFactor,this.musicSystems.length===1),e}getFullPageSystemWidth(){return this.graphicalMusicSheet.ParentMusicSheet.pageWidth-this.rules.PageLeftMargin-this.rules.PageRightMargin-this.rules.SystemLeftMargin-this.rules.SystemRightMargin}layoutSystemStaves(e){const t=this.getFullPageSystemWidth(),s=e.PositionAndShape;s.BorderLeft=0,s.BorderRight=t,s.BorderTop=0;const r=[],o=this.graphicalMusicSheet.ParentMusicSheet.Instruments;for(let c=0,d=o.length;c<d;++c){const m=o[c];if(!(!m.Visible||m.Voices.length===0))for(let u=0,g=m.Staves.length;u<g;++u){const b=m.Staves[u];r.push(b)}}let a=!1;if(this.leadSheet){for(let c=0,d=r.length;c<d;++c)if(r[c].ParentInstrument.LyricVersesNumbers.length>1){a=!0;break}}let l=0;for(let c=0;c<r.length;c++)if(this.addStaffLineToMusicSystem(e,l,r[c]),l+=this.rules.StaffHeight,c+1<r.length){let d=0;this.leadSheet&&!a?d=2.5:r[c].ParentInstrument===r[c+1].ParentInstrument?d=this.rules.BetweenStaffDistance:d=this.rules.StaffDistance,l+=d}s.BorderBottom=l}addStaffLineToMusicSystem(e,t,s){if(e){const r=MusicSheetCalculator.symbolFactory.createStaffLine(e,s);e.StaffLines.push(r);const o=r.PositionAndShape,a=new PointF2D;a.x=0,o.BorderRight=e.PositionAndShape.Size.width,a.y=t,o.RelativePosition=a,o.BorderLeft=0,o.BorderTop=0,o.BorderBottom=this.rules.StaffHeight;for(let l=0;l<5;l++){const c=new PointF2D;c.x=0,c.y=l*this.rules.StaffHeight/4;const d=new PointF2D;d.x=r.PositionAndShape.Size.width,d.y=l*this.rules.StaffHeight/4,this.leadSheet&&(c.y=d.y=0),r.StaffLines[l]=new GraphicalLine(c,d,this.rules.StaffLineWidth)}}}initializeActiveInstructions(e){const t=this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();if(t){this.visibleStaffIndices=this.graphicalMusicSheet.getVisibleStavesIndicesFromSourceMeasure(e);for(let s=0,r=this.visibleStaffIndices.length;s<r;s++){const o=this.visibleStaffIndices[s],a=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(t,o);this.activeClefs[s]=t.FirstInstructionsStaffEntries[o].Instructions[0];const l=t.FirstInstructionsStaffEntries[o].Instructions[1];if(l){let d=KeyInstruction.copy(l);d=this.transposeKeyInstruction(d,a),this.activeKeys[s]=d}const c=t.FirstInstructionsStaffEntries[o].Instructions[2];this.activeRhythm[s]=c}}}transposeKeyInstruction(e,t){const s=t.getTransposedHalftones();return s!==e.isTransposedBy&&t.ParentStaff.ParentInstrument.MidiInstrumentId!==MidiInstrument.Percussion&&MusicSheetCalculator.transposeCalculator!==void 0&&MusicSheetCalculator.transposeCalculator.transposeKey(e,s),e}addBeginInstructions(e,t,s){const r=e.length;if(r===0)return 0;let o=0;const a=e[0].parentSourceMeasure;for(let l=0;l<r;++l){const c=e[l],d=this.visibleStaffIndices[l],m=a.FirstInstructionsStaffEntries[d],u=this.AddInstructionsAtMeasureBegin(m,c,l,s,t);o=Math.max(o,u)}return o}addEndInstructions(e){const t=e.length;if(t===0)return 0;let s=.5;const r=e[0].parentSourceMeasure;for(let o=0;o<t;o++){const a=e[o],l=this.visibleStaffIndices[o],c=r.LastInstructionsStaffEntries[l],d=this.addInstructionsAtMeasureEnd(c,a,e);s=Math.max(s,d)}return s}AddInstructionsAtMeasureBegin(e,t,s,r,o){var y,S,v,x,A,E;let a=0,l,c,d;if(e)for(let w=0,_=e.Instructions.length;w<_;++w){const C=e.Instructions[w];C instanceof ClefInstruction?l=C:C instanceof KeyInstruction?c=C:C instanceof RhythmInstruction&&(d=C)}const m=(y=window.GYM)==null?void 0:y.multitrack;o&&(l||(l=this.activeClefs[s]),c||(c=KeyInstruction.copy(this.activeKeys[s])),m&&c&&!((S=c.AlteratedNotes)!=null&&S.length)&&(c=KeyInstruction.copy(this.activeKeys[0]),c.PrintObject=!1),r&&!d&&(d=this.activeRhythm[s]));let u=!1,g=!1,b=!1;if(l?(t.addClefAtBegin(l),u=!0):l=this.activeClefs[s],c){c=this.transposeKeyInstruction(c,t);const w=o?void 0:this.activeKeys[s];if(t.addKeyAtBegin(c,w,l),m&&!c.PrintObject)try{(A=(x=(v=t.stave)==null?void 0:v.getModifiers(void 0,"keysignatures"))==null?void 0:x[0])==null||A.setDrawState(!1)}catch(_){}g=!0}if(d!==void 0&&d.PrintObject&&this.rules.RenderTimeSignatures){let w=!0;const C=t.MeasureNumber-1-this.rules.MinMeasureToDrawIndex;if(t.MeasureNumber-1>=0&&this.measureList[C]){const I=(E=this.measureList[C][0])==null?void 0:E.parentSourceMeasure;I!=null&&I.ImplicitMeasure&&(I!=null&&I.RhythmPrinted)&&(w=!1)}w&&(t.addRhythmAtBegin(d),t.parentSourceMeasure.RhythmPrinted=d,b=!0)}return(u||g||b)&&(a+=t.beginInstructionsWidth,b&&(a+=this.rules.RhythmRightMargin)),a}addInstructionsAtMeasureEnd(e,t,s){if(!e||!e.Instructions||e.Instructions.length===0)return 0;for(let r=0,o=e.Instructions.length;r<o;++r){const a=e.Instructions[r];if(a instanceof ClefInstruction){const l=a;t.addClefAtEnd(l);for(const c of s)c!==t&&c.addClefAtEnd(l,!1)}}return this.rules.MeasureRightMargin+t.endInstructionsWidth}updateActiveClefs(e,t){for(let s=0,r=t.length;s<r;s++){const o=this.visibleStaffIndices[s],a=e.FirstInstructionsStaffEntries[o];if(a)for(let d=0,m=a.Instructions.length;d<m;++d){const u=a.Instructions[d];u instanceof ClefInstruction?this.activeClefs[s]=u:u instanceof KeyInstruction?this.activeKeys[s]=u:u instanceof RhythmInstruction&&(this.activeRhythm[s]=u)}const l=e.getEntriesPerStaff(o);for(let d=0,m=l.length;d<m;++d){const u=l[d];if(u.Instructions)for(let g=0,b=u.Instructions.length;g<b;++g){const y=u.Instructions[g];y instanceof ClefInstruction&&(this.activeClefs[s]=y)}}const c=e.LastInstructionsStaffEntries[o];if(c){const d=c.Instructions;for(let m=0,u=d.length;m<u;++m){const g=d[m];g instanceof ClefInstruction&&(this.activeClefs[s]=g)}}}}checkAndCreateExtraInstructionMeasure(e){const t=e[0].parentSourceMeasure.FirstInstructionsStaffEntries,s=[];for(let o=0,a=e.length;o<a;++o){const l=e[o];s.push(t[l.ParentStaff.idInMusicSheet])}let r=0;for(let o=0,a=s.length;o<a;++o){const l=s[o];if(!l)continue;const c=l.Instructions;let d,m;for(let u=0,g=c.length;u<g;++u){const b=c[u];b instanceof KeyInstruction&&b.Key!==this.activeKeys[o].Key&&(d=b),b instanceof RhythmInstruction&&b!==this.activeRhythm[o]&&(m=b)}if(d!==void 0||m){const u=this.addExtraInstructionMeasure(o,d,m);r=Math.max(r,u)}}r>0&&(this.currentSystemParams.systemMeasures.push({beginLine:SystemLinesEnum.None,endLine:SystemLinesEnum.None}),this.currentSystemParams.currentWidth+=r,this.currentSystemParams.currentSystemFixWidth+=r)}addExtraInstructionMeasure(e,t,s){const r=this.currentSystemParams.currentSystem,o=MusicSheetCalculator.symbolFactory.createExtraGraphicalMeasure(r.StaffLines[e]);t&&o.addKeyAtBegin(t,this.activeKeys[e],this.activeClefs[e]),s!==void 0&&s.PrintObject&&o.addRhythmAtBegin(s),o.PositionAndShape.BorderLeft=0,o.PositionAndShape.BorderTop=0,o.PositionAndShape.BorderBottom=this.rules.StaffHeight;const a=this.rules.MeasureLeftMargin+o.beginInstructionsWidth+this.rules.MeasureRightMargin;return o.PositionAndShape.BorderRight=a,r.StaffLines[e].Measures.push(o),a}addStaveMeasuresToSystem(e){if(e[0]){const t=[];for(let r=0;r<e.length;r++)t.push(e[r]);const s=this.currentSystemParams.currentSystem;for(let r=0;r<this.numberOfVisibleStaffLines;r++){const o=t[r];s.StaffLines[r].Measures.push(o),o.ParentStaffLine=s.StaffLines[r]}s.AddGraphicalMeasures(t)}}getMeasureStartLine(){if(this.thisMeasureBeginsLineRepetition()){const t=this.currentSystemParams.IsSystemStartMeasure(),s=this.measureListIndex===0;if(this.previousMeasureEndsLineRepetition()&&!t)return SystemLinesEnum.DotsBoldBoldDots;if(!s)return SystemLinesEnum.BoldThinDots}return SystemLinesEnum.None}getMeasureEndLine(){var o,a;let e;try{if(e=this.measureList[this.measureListIndex][0].parentSourceMeasure,this.rules.RenderMultipleRestMeasures&&e.multipleRestMeasures>1){const l=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,e.measureListIndex+e.multipleRestMeasures-1);e=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[l]}}finally{}const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures,s=t[this.measureListIndex];let r=!1;return s.allRests&&(r=(a=(o=t[this.measureListIndex+s.multipleRestMeasures-1])==null?void 0:o.endsWithLineRepetition)==null?void 0:a.call(o)),this.nextMeasureBeginsLineRepetition()&&this.thisMeasureEndsLineRepetition()?SystemLinesEnum.DotsBoldBoldDots:this.thisMeasureEndsLineRepetition()||r?SystemLinesEnum.DotsThinBold:this.nextMeasureHasKeyInstructionChange()||this.thisMeasureEndsWordRepetition()||this.nextMeasureBeginsWordRepetition()?SystemLinesEnum.DoubleThin:e&&e.endingBarStyleEnum!==void 0?e.endingBarStyleEnum:SystemLinesEnum.SingleThin}getLineWidth(e,t,s){let r=e.getLineWidth(t);return t===SystemLinesEnum.DotsBoldBoldDots&&(r/=2),s&&t===SystemLinesEnum.BoldThinDots&&(r+=this.rules.DistanceBetweenLastInstructionAndRepetitionBarline),r}previousMeasureEndsLineRepetition(){if(this.measureListIndex===0)return!1;for(let e=0,t=this.measureList[this.measureListIndex-1].length;e<t;++e)if(this.measureList[this.measureListIndex-1][e].endsWithLineRepetition())return!0;return!1}thisMeasureBeginsLineRepetition(){for(let e=0,t=this.measureList[this.measureListIndex].length;e<t;++e)if(this.measureList[this.measureListIndex][e].beginsWithLineRepetition())return!0;return!1}nextMeasureBeginsLineRepetition(){const e=this.measureListIndex+1;if(e>=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||!this.measureList[e])return!1;for(let t=0,s=this.measureList[e].length;t<s;++t)if(this.measureList[e][t].beginsWithLineRepetition())return!0;return!1}thisMeasureEndsLineRepetition(){for(let e=0,t=this.measureList[this.measureListIndex].length;e<t;++e)if(this.measureList[this.measureListIndex][e].endsWithLineRepetition())return!0;return!1}nextMeasureBeginsWordRepetition(){const e=this.measureListIndex+1;if(e>=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||e>this.measureList.length-1)return!1;for(let t=0,s=this.measureList[e].length;t<s;++t)if(this.measureList[e][t].beginsWithWordRepetition())return!0;return!1}thisMeasureEndsWordRepetition(){for(let e=0,t=this.measureList[this.measureListIndex].length;e<t;++e)if(this.measureList[this.measureListIndex][e].endsWithWordRepetition())return!0;return!1}nextMeasureHasKeyInstructionChange(){return this.getNextMeasureKeyInstruction()!==void 0}getNextMeasureKeyInstruction(){var e;if(this.measureListIndex<this.measureList.length-1)for(let t=0;t<this.measureList[this.measureListIndex].length;t++){const s=(e=this.measureList[this.measureListIndex+1][t])==null?void 0:e.parentSourceMeasure;return s?s.getKeyInstruction(this.visibleStaffIndices[t]):void 0}}calculateXScalingFactor(e,t){return Math.abs(t-0)<1e-5||Math.abs(e-0)<1e-5?1:(this.currentSystemParams.currentSystem.StaffLines[0].PositionAndShape.Size.width-e)/t}stretchMusicSystem(e){let t=this.calculateXScalingFactor(this.currentSystemParams.currentSystemFixWidth,this.currentSystemParams.currentSystemVarWidth);e&&(t=Math.min(t,this.rules.LastSystemMaxScalingFactor));const s=this.currentSystemParams.currentSystem;for(let r=0,o=s.StaffLines.length;r<o;++r){const a=s.StaffLines[r];let l=0;for(let c=0;c<a.Measures.length;c++){const d=a.Measures[c];d.setPositionInStaffline(l);const m=d.beginInstructionsWidth;if(d.setWidth(m+d.minimumStaffEntriesWidth*t+d.endInstructionsWidth),c<this.currentSystemParams.systemMeasures.length){const g=this.currentSystemParams.systemMeasures[c].beginLine,b=d.getLineWidth(SystemLinesEnum.BoldThinDots);switch(g){case SystemLinesEnum.BoldThinDots:let y=l;c===0&&(y=l+d.beginInstructionsWidth-b),s.createVerticalLineForMeasure(y,b,g,SystemLinePosition.MeasureBegin,c,d);break}}if(d.staffEntriesScaleFactor=t,d.layoutSymbols(),!(c+1<this.currentSystemParams.systemMeasures.length&&this.currentSystemParams.systemMeasures[c+1].beginLine===SystemLinesEnum.BoldThinDots)){let g=SystemLinesEnum.SingleThin;c<this.currentSystemParams.systemMeasures.length&&(g=this.currentSystemParams.systemMeasures[c].endLine);const b=d.getLineWidth(g);let y=d.PositionAndShape.RelativePosition.x+d.PositionAndShape.BorderRight-b;g===SystemLinesEnum.DotsBoldBoldDots&&(y-=b/2),s.createVerticalLineForMeasure(y,b,g,SystemLinePosition.MeasureEnd,c,d)}l=d.PositionAndShape.RelativePosition.x+d.PositionAndShape.BorderRight}}e&&this.decreaseMusicSystemBorders()}decreaseMusicSystemBorders(){const e=this.currentSystemParams.currentSystem,t=CollectionUtil.last(e.StaffLines[0].Measures).PositionAndShape,s=t.RelativePosition.x+t.Size.width;for(let r=0,o=e.StaffLines.length;r<o;++r){const a=e.StaffLines[r];a.PositionAndShape.BorderRight=s;for(let l=0,c=a.StaffLines.length;l<c;++l){const d=a.StaffLines[l];d.End=new PointF2D(s,d.End.y)}}e.PositionAndShape.BorderRight=s+this.currentSystemParams.maxLabelLength+this.rules.SystemLabelsRightMargin}updateStaffLinesRelativePosition(e,t,s){for(let r=t;r<e.StaffLines.length;r++)e.StaffLines[r].PositionAndShape.RelativePosition.y=s;e.PositionAndShape.BorderBottom+=s}createMusicPage(){const e=new GraphicalMusicPage(this.graphicalMusicSheet);return this.graphicalMusicSheet.MusicPages.push(e),e.PageNumber=this.graphicalMusicSheet.MusicPages.length,e.PositionAndShape.BorderLeft=0,e.PositionAndShape.BorderRight=this.graphicalMusicSheet.ParentMusicSheet.pageWidth,e.PositionAndShape.BorderTop=0,e.PositionAndShape.BorderBottom=this.rules.PageHeight,e.PositionAndShape.RelativePosition=new PointF2D(0,0),e}addSystemToPage(e,t){e.MusicSystems.push(t),t.Parent=e}optimizeDistanceBetweenStaffLines(e){if(!e.checkStaffEntriesForStaffEntryLink())for(let r=0;r<e.StaffLines.length-1;r++){const o=e.StaffLines[r].BottomLine,a=e.StaffLines[r+1].SkyLine;let l=0;for(let d=0;d<o.length;d++){const m=o[d],u=Math.max(0,d-6),g=Math.min(a.length-1,d+6);let b=0;for(let S=u;S<=g;S++)b=Math.min(b,a[S]);const y=m-b;l=Math.max(y,l)}l+=this.rules.MinSkyBottomDistBetweenStaves,l=Math.max(l,this.rules.StaffHeight+this.rules.MinimumStaffLineDistance);const c=l+e.StaffLines[r].PositionAndShape.RelativePosition.y;this.updateStaffLinesRelativePosition(e,r+1,c)}const t=e.StaffLines[0];e.PositionAndShape.BorderTop=t.PositionAndShape.RelativePosition.y+t.PositionAndShape.BorderTop;const s=e.StaffLines[e.StaffLines.length-1];e.PositionAndShape.BorderBottom=s.PositionAndShape.RelativePosition.y+s.PositionAndShape.BorderBottom}hasExpressionCounts(e){var r;let t=0,s=!1;for(const o of e.GraphicalMeasures)for(const a of o){for(const l of a.parentSourceMeasure.TempoExpressions)if(((r=l.InstantaneousTempo)==null?void 0:r.Enum)===TempoEnum.metronomeMark){s=!0;break}for(const l of a.parentSourceMeasure.StaffLinkedExpressions)t+=l.length}return{TempoCount:s?1:0,OtherCount:t}}calculateMusicSystemsRelativePositions(){var a;let e=this.createMusicPage(),t=0,s=this.musicSystems[0],r=0,o=0;if(this.musicSystems.length>1)for(let l=1;l<this.musicSystems.length;l++){const c=this.musicSystems[l-1],d=this.musicSystems[l];let m=this.findRequiredDistanceWithSkyBottomLine(c,d);m>o&&(o=m)}for(let l=0;l<this.musicSystems.length;l++)if(s=this.musicSystems[l],e.MusicSystems.length===0){this.addSystemToPage(e,s),this.rules.CompactMode?t=this.rules.PageTopMarginNarrow:t=this.rules.PageTopMargin,this.graphicalMusicSheet.MusicPages.length===1&&this.rules.RenderTitle&&(t+=this.rules.TitleTopDistance+this.rules.SheetTitleHeight+this.rules.TitleBottomDistance);const c=new PointF2D(this.rules.PageLeftMargin+this.rules.SystemLeftMargin,t);s.PositionAndShape.RelativePosition=c,t+s.PositionAndShape.BorderBottom>this.rules.PageHeight-this.rules.PageBottomMargin&&(r++,r<=4&&console.log(`warning: could not fit a single system on page ${e.PageNumber} and measure number ${s.GraphicalMeasures[0][0].MeasureNumber}.
- The PageFormat may be too small for this sheet."
- Will not give further warnings for all pages, only total.`))}else{const c=this.musicSystems[l-1],d=c.StaffLines[c.StaffLines.length-1],m=d.PositionAndShape;let u=this.findRequiredDistanceWithSkyBottomLine(c,s);u=Math.max(o,u),u+=this.rules.MinSkyBottomDistBetweenSystems,((a=window==null?void 0:window.appName)==null?void 0:a.toLocaleUpperCase())==="GYM"&&(u=u<16?16:u);const g=this.hasExpressionCounts(s);g.TempoCount>0&&this.rules.MetronomeMarksDrawn&&(u+=2),g.OtherCount>0&&this.rules.MetronomeMarksDrawn&&(u+=2),u=Math.max(u,this.rules.MinimumDistanceBetweenSystems+d.StaffHeight);const b=t+m.RelativePosition.y+u,y=b+s.PositionAndShape.BorderMarginBottom;if(!(this.rules.NewPageAtXMLNewPageAttribute&&c.breaksPage)&&y<this.rules.PageHeight-this.rules.PageBottomMargin){this.addSystemToPage(e,s),t=b;const v=new PointF2D(this.rules.PageLeftMargin+this.rules.SystemLeftMargin,t);s.PositionAndShape.RelativePosition=v}else{e=this.createMusicPage(),l-=1;continue}}r>0&&console.log(`total amount of pages that couldn't fit a single music system: ${r} of ${e.PageNumber}`)}findRequiredDistanceWithSkyBottomLine(e,t){const s=e.StaffLines[e.StaffLines.length-1],r=t.StaffLines[0],o=s.BottomLine,a=r.SkyLine,l=s.PositionAndShape,c=r.PositionAndShape,d=1/this.rules.SamplingUnit;let m=0;for(let u=0;u<o.length;u++){const g=o[u],b=u+Math.round((l.RelativePosition.x-c.RelativePosition.x)*d);if(b<0)continue;if(b>=a.length)break;const y=Math.max(0,b-6),S=Math.min(a.length-1,b+6);let v=0;for(let A=y;A<=S;A++)v=Math.min(v,a[A]);const x=g-v;m=Math.max(x,m)}return m===0&&(m=l.BorderBottom-c.BorderTop),m}}class SystemBuildParameters{constructor(){this.systemMeasures=[],this.systemMeasureIndex=0,this.currentWidth=0,this.currentSystemFixWidth=0,this.currentSystemVarWidth=0,this.maxLabelLength=0}IsSystemStartMeasure(){return this.systemMeasureIndex===0}}class OctaveShiftParams{constructor(e,t,s){this.getOpenOctaveShift=e,this.getAbsoluteStartTimestamp=t,this.getAbsoluteEndTimestamp=s}}class AccidentalCalculator{constructor(){this.keySignatureNoteAlterationsDict=new Dictionary,this.currentAlterationsComparedToKeyInstructionList=[],this.currentInMeasureNoteAlterationsDict=new Dictionary}get ActiveKeyInstruction(){return this.activeKeyInstruction}set ActiveKeyInstruction(e){this.activeKeyInstruction=e,this.reactOnKeyInstructionChange()}doCalculationsAtEndOfMeasure(){this.currentInMeasureNoteAlterationsDict.clear(),this.currentAlterationsComparedToKeyInstructionList.clear();for(const e of this.keySignatureNoteAlterationsDict.keys())this.currentInMeasureNoteAlterationsDict.setValue(e,this.keySignatureNoteAlterationsDict.getValue(e))}checkAccidental(e,t){if(!t)return;const s=t.FundamentalNote+t.Octave*12,r=this.currentAlterationsComparedToKeyInstructionList.indexOf(s)>=0;if(this.currentInMeasureNoteAlterationsDict.containsKey(s)){if(r&&this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(s),1),this.currentInMeasureNoteAlterationsDict.getValue(s)!==t.AccidentalHalfTones){this.keySignatureNoteAlterationsDict.containsKey(s)&&this.keySignatureNoteAlterationsDict.getValue(s)!==t.AccidentalHalfTones?(this.currentAlterationsComparedToKeyInstructionList.push(s),this.currentInMeasureNoteAlterationsDict.setValue(s,t.AccidentalHalfTones)):t.Accidental!==AccidentalEnum.NONE&&this.currentInMeasureNoteAlterationsDict.remove(s);const o=this.currentInMeasureNoteAlterationsDict.getValue(s);if(t.Accidental===AccidentalEnum.NONE&&(Math.abs(o)===.5?t=new Pitch(t.FundamentalNote,t.Octave,AccidentalEnum.NONE):t=new Pitch(t.FundamentalNote,t.Octave,AccidentalEnum.NATURAL)),this.isAlterAmbiguousAccidental(t.Accidental)&&!t.AccidentalXml)return;MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,t)}}else if(t.Accidental!==AccidentalEnum.NONE){if(r||this.currentAlterationsComparedToKeyInstructionList.push(s),this.currentInMeasureNoteAlterationsDict.setValue(s,t.AccidentalHalfTones),this.isAlterAmbiguousAccidental(t.Accidental)&&!t.AccidentalXml)return;MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,t)}else r&&(t=new Pitch(t.FundamentalNote,t.Octave,AccidentalEnum.NATURAL),this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(s),1),MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,t))}isAlterAmbiguousAccidental(e){return e===AccidentalEnum.SLASHFLAT||e===AccidentalEnum.QUARTERTONEFLAT}reactOnKeyInstructionChange(){const e=this.activeKeyInstruction.AlteratedNotes;let t;this.activeKeyInstruction.Key>0?t=AccidentalEnum.SHARP:t=AccidentalEnum.FLAT,this.keySignatureNoteAlterationsDict.clear(),this.currentAlterationsComparedToKeyInstructionList.length=0;for(let s=-9;s<9;s++)for(let r=0;r<e.length;r++)this.keySignatureNoteAlterationsDict.setValue(e[r]+s*12,Pitch.HalfTonesFromAccidental(t));this.doCalculationsAtEndOfMeasure()}}class JustifiedMusicSystemBuilder extends MusicSystemBuilder{buildMusicSystems(){var c,d;this.currentSystemParams=new SystemBuildParameters;const e=[];let t=0,s=-1;for(let m=0,u=this.measureList.length;m<u;++m){this.measureListIndex=m;const g=this.measureList[m];if(!g||!g[0])continue;for(let v=0,x=g.length;v<x;++v)g[v].resetLayout();const b=g[0].parentSourceMeasure,y=this.rules.NewPageAtXMLNewPageAttribute&&b.printNewPageXml;(this.rules.NewSystemAtXMLNewSystemAttribute&&b.printNewSystemXml||y)&&m>0?(s=m-1,e.push({startIndex:t,endIndex:s}),t=m):b.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(s=m,e.push({startIndex:t,endIndex:s}),t=m+1)}t<this.measureList.length&&s<t&&e.push({startIndex:t,endIndex:this.measureList.length-1});const r=[];let o=[];const a=[],l=[];for(const m of e){let u=0;for(let C=m.startIndex;C<=m.endIndex;++C){this.measureListIndex=C;const P=this.measureList[C];if(!P||!P[0]){a.push(0),l.push(0);continue}for(let Z=0,W=P.length;Z<W;++Z)P[Z].resetLayout();const R=P[0].parentSourceMeasure===this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();let N=this.rules.MeasureLeftMargin,G=0;const B=this.getMeasureStartLine();N+=this.getLineWidth(P[0],B,!1),this.leadSheet||(N+=this.addBeginInstructions(P,!1,R),G+=this.addEndInstructions(P));let k=0;for(let Z=0;Z<this.numberOfVisibleStaffLines;Z++){const W=(((c=P[Z].vfVoices[1])==null?void 0:c.tickables.length)||1)*this.rules.DYMinNoteWidth;k=Math.max(k,P[Z].minimumStaffEntriesWidth,W)}const T=this.getMeasureEndLine();G+=this.getLineWidth(P[0],T,!1);const V=N+G+k;a.push(V),l.push(u+V/2),u+=V}const g=u,S=this.getFullPageSystemWidth()-8,x=Math.ceil(g/S)*S/g;let A=1,E=0,w=0,_=0;for(let C=m.startIndex;C<=m.endIndex;++C){const P=l[C];if(P===0)continue;const I=a[C],R=a[C+1]||0;let N=P*x/S;w+=I;const G=(window==null?void 0:window.appName)||"";if((G==null?void 0:G.toLocaleUpperCase())==="GYM"){let B=(d=window.GYM)==null?void 0:d.wrapNum;B=Number(B)>0?Number(B):6,_===B||w+R>S&&_%2===0?(o.push(_),w=I,_=1):_++}else w>S?(o.push(_),w=I,_=1):_++;I>S?N=C+1:N=Math.ceil(N),A===N?E+=1:(r.push(E),A=N,E=1)}r.push(E),o.push(_),o=o.filter(Boolean)}return o.length>1&&o[o.length-1]===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(e){let t=!1;this.currentSystemParams=new SystemBuildParameters,this.currentSystemParams.currentSystem=this.initMusicSystem();for(let s=0,r=this.measureList.length;s<r;++s){this.measureListIndex=s;const o=this.measureList[s];if(!o||!o[0])continue;const a=this.rules.NewPageAtXMLNewPageAttribute&&o[0].parentSourceMeasure.printNewPageXml;this.currentSystemParams.currentSystem.GraphicalMeasures.length===e[this.musicSystems.length-1]&&this.finalizeCurrentAndCreateNewSystem(o,!1,!t,a);for(let x=0,A=o.length;x<A;++x)o[x].resetLayout();const l=o[0].parentSourceMeasure,c=l.HasEndLine,d=this.currentSystemParams.IsSystemStartMeasure(),m=l===this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();let u=this.rules.MeasureLeftMargin,g=0;const b=this.getMeasureStartLine();if(u+=this.getLineWidth(o[0],b,d),!this.leadSheet){let x=!1;t&&this.rules.ShowRhythmAgainAfterPartEndOrFinalBarline&&(x=!0),u+=this.addBeginInstructions(o,d,m||x),g+=this.addEndInstructions(o)}let y=0;for(let x=0;x<this.numberOfVisibleStaffLines;x++)y=Math.max(y,o[x].minimumStaffEntriesWidth);const S=this.getMeasureEndLine();g+=this.getLineWidth(o[0],S,d);const v=u+g+y;this.addMeasureToSystem(o,b,S,v,u,y,g),this.updateActiveClefs(l,o),t=c}return this.finalizeCurrentAndCreateNewSystem(void 0,!1,!1),this.musicSystems}}let metronomeMarks={};class MusicSheetCalculator{constructor(){this.staffEntriesWithGraphicalTies=[],this.staffEntriesWithOrnaments=[],this.staffEntriesWithChordSymbols=[],this.staffLinesWithLyricWords=[],this.graphicalLyricWords=[],this.abstractNotImplementedErrorMessage="abstract, not implemented",this.dynamicExpressionMap=new Map}static get TextMeasurer(){return MusicSheetCalculator.textMeasurer}static set TextMeasurer(e){MusicSheetCalculator.textMeasurer=e}get leadSheet(){return this.graphicalMusicSheet.LeadSheet}static setMeasuresMinStaffEntriesWidth(e,t){for(let s=0,r=e.length;s<r;++s){const o=e[s];o&&(o.minimumStaffEntriesWidth=t)}}initialize(e){this.graphicalMusicSheet=e,this.rules=e.ParentMusicSheet.Rules,this.rules.clearMusicSheetObjects(),this.prepareGraphicalMusicSheet()}prepareGraphicalMusicSheet(){const e=this.graphicalMusicSheet.ParentMusicSheet;this.staffEntriesWithGraphicalTies=[],this.staffEntriesWithOrnaments=[],this.staffEntriesWithChordSymbols=[],this.staffLinesWithLyricWords=[],this.graphicalMusicSheet.Initialize();const t=this.graphicalMusicSheet.MeasureList,s=this.createAccidentalCalculators(),r=this.graphicalMusicSheet.initializeActiveClefs(),o=[],a=e.getCompleteNumberOfStaves(),l=[];for(let d=0;d<a;d++)l.push(void 0);for(let d=0,m=e.SourceMeasures.length;d<m;++d){const u=e.SourceMeasures[d],g=this.createGraphicalMeasuresForSourceMeasure(u,s,o,l,r);if(t.push(g),u.multipleRestMeasures>0&&this.rules.RenderMultipleRestMeasures){u.isReducedToMultiRest=!0,u.multipleRestMeasureNumber=1;const b=u.multipleRestMeasures-1;d+=b;for(let y=1;y<=b;y++){const S=e.SourceMeasures[u.MeasureNumber-1+y];S.multipleRestMeasureNumber=y+1,S.isReducedToMultiRest=!0,t.push([void 0])}}}if(this.rules.AutoGenerateMutipleRestMeasuresFromRestMeasures&&this.rules.RenderMultipleRestMeasures){let d,m=0;for(let u=0,g=e.SourceMeasures.length;u<g;++u){const b=e.SourceMeasures[u];if(!b.isReducedToMultiRest&&b.canBeReducedToMultiRest())if(m>0){d.isReducedToMultiRest=!0,d.multipleRestMeasureNumber=1,m++,b.multipleRestMeasureNumber=m,b.isReducedToMultiRest=!0;for(let y=0;y<t[u].length;y++)t[u][y]=void 0}else d=b,m=1;else if(m>1){d.multipleRestMeasures=m;const y=this.createGraphicalMeasuresForSourceMeasure(d,s,o,l,r);t[d.measureListIndex]=y,m=0,d=void 0}else m=0,d=void 0}if(m>1){d.multipleRestMeasures=m,d.isReducedToMultiRest=!0;const u=this.createGraphicalMeasuresForSourceMeasure(d,s,o,l,r);t[d.measureListIndex]=u,m=0,d=void 0}}const c=r.map(d=>d.ClefType===ClefEnum.percussion);this.handleStaffEntries(c),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(),GraphicalMusicSheet.transformRelativeToAbsolutePosition(this.graphicalMusicSheet)}calculateXLayout(e,t){let s=0;const r=this.rules.MaxInstructionsConstValue;if(this.graphicalMusicSheet.MeasureList.length>0){let o=this.graphicalMusicSheet.MeasureList[0],a=this.calculateMeasureXLayout(o);a=this.calculateMeasureWidthFromStaffEntries(o,a),MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(o,a),s=a*1.2+t+r;for(let l=1;l<this.graphicalMusicSheet.MeasureList.length;l++)o=this.graphicalMusicSheet.MeasureList[l],a=this.calculateMeasureXLayout(o),a=this.calculateMeasureWidthFromStaffEntries(o,a),MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(o,a),s=Math.max(s,a*1.2+r)}this.graphicalMusicSheet.MinAllowedSystemWidth=s}calculateMeasureWidthFromStaffEntries(e,t){throw new Error(this.abstractNotImplementedErrorMessage)}formatMeasures(){throw new Error(this.abstractNotImplementedErrorMessage)}calculateMeasureXLayout(e){throw new Error(this.abstractNotImplementedErrorMessage)}initGraphicalMeasuresCreation(){throw new Error(this.abstractNotImplementedErrorMessage)}handleBeam(e,t,s){throw new Error(this.abstractNotImplementedErrorMessage)}handleTiedGraphicalNote(e,t,s,r,o,a,l,c){throw new Error(this.abstractNotImplementedErrorMessage)}handleVoiceEntryLyrics(e,t,s){throw new Error(this.abstractNotImplementedErrorMessage)}handleVoiceEntryOrnaments(e,t,s){throw new Error(this.abstractNotImplementedErrorMessage)}handleVoiceEntryArticulations(e,t,s){throw new Error(this.abstractNotImplementedErrorMessage)}handleVoiceEntryTechnicalInstructions(e,t,s){throw new Error(this.abstractNotImplementedErrorMessage)}handleTuplet(e,t,s){throw new Error(this.abstractNotImplementedErrorMessage)}layoutVoiceEntry(e,t,s,r){throw new Error(this.abstractNotImplementedErrorMessage)}layoutStaffEntry(e){throw new Error(this.abstractNotImplementedErrorMessage)}createGraphicalTie(e,t,s,r,o){throw new Error(this.abstractNotImplementedErrorMessage)}updateStaffLineBorders(e){throw new Error(this.abstractNotImplementedErrorMessage)}calculateMeasureNumberPlacement(e){const t=e.StaffLines[0];if(!t||!t.Measures[0]){loglevelExports.warn("calculateMeasureNumberPlacement: measure undefined for system.Id "+e.Id);return}let s=t.Measures[0].MeasureNumber,r=0;for(let o=0;o<t.Measures.length;o++){if(this.rules.RenderMeasureNumbersOnlyAtSystemStart&&o>0)return;const a=t.Measures[o];(a.MeasureNumber===0||a.MeasureNumber===1)&&(s=a.MeasureNumber),a!==t.Measures[0]&&this.rules.MeasureNumberLabelXOffset?r=this.rules.MeasureNumberLabelXOffset:r=0;const l=this.rules.UseXMLMeasureNumbers&&a.MeasureNumber===1&&a.parentSourceMeasure.getPrintedMeasureNumber()!==1;((a.MeasureNumber===s||a.MeasureNumber>=s+this.rules.MeasureNumberLabelOffset)&&!a.parentSourceMeasure.ImplicitMeasure||l)&&((a.MeasureNumber!==1||a.MeasureNumber===1&&a!==t.Measures[0]||l)&&this.calculateSingleMeasureNumberPlacement(a,t,e,r),s=a.MeasureNumber)}}calculateSingleMeasureNumberPlacement(e,t,s,r=0){const o=e.parentSourceMeasure.getPrintedMeasureNumber().toString(),a=new Label(o),l=new GraphicalLabel(a,this.rules.MeasureNumberLabelHeight,TextAlignmentEnum.LeftBottom,this.rules),c=t.SkyBottomLineCalculator;l.setLabelPositionAndShapeBorders(),l.PositionAndShape.Parent=s.PositionAndShape;const d=t.PositionAndShape.RelativePosition.x+e.PositionAndShape.RelativePosition.x-l.PositionAndShape.BorderMarginLeft+r;let m,u=d,g=d-l.PositionAndShape.BorderLeft+l.PositionAndShape.BorderRight;u-=t.PositionAndShape.RelativePosition.x,g-=t.PositionAndShape.RelativePosition.x;const b=u+.5,y=g-.5,S=c.getSkyLineMinInRange(b,y);if(e===t.Measures[0]){let v=0;if(s.GroupBrackets.length>0)for(const x of s.GroupBrackets)v=Math.min(v,x.PositionAndShape.BorderTop);m=Math.min(S,v)}else m=S;m=Math.min(0,m),l.PositionAndShape.RelativePosition=new PointF2D(d,m),s.MeasureNumberLabels.push(l)}calculateMeasureNumberSkyline(e){const t=e.StaffLines[0];for(const s of e.MeasureNumberLabels){let r=s.PositionAndShape.RelativePosition.x,o=r-s.PositionAndShape.BorderLeft+s.PositionAndShape.BorderRight;r-=t.PositionAndShape.RelativePosition.x,o-=t.PositionAndShape.RelativePosition.x,t.SkyBottomLineCalculator.updateSkyLineInRange(r,o,s.PositionAndShape.RelativePosition.y+s.PositionAndShape.BorderMarginTop)}}layoutGraphicalTie(e,t,s){throw new Error(this.abstractNotImplementedErrorMessage)}calculateSingleStaffLineLyricsPosition(e,t){let s=0,r=this.rules.StaffHeight;const o=[],a=e.SkyBottomLineCalculator;let l=e.Measures.length;for(let d=0;d<l;++d){const m=e.Measures[d],u=m.PositionAndShape.RelativePosition,g=m.staffEntries.length;for(let b=0;b<g;++b){const y=m.staffEntries[b];if(y.LyricsEntries.length>0){o.push(y),s=Math.max(s,y.LyricsEntries.length);const S=y.PositionAndShape.RelativePosition.x+u.x;let v=Number.MAX_VALUE,x=Number.MIN_VALUE;for(let E=0;E<y.LyricsEntries.length;E++){const w=y.LyricsEntries[E].GraphicalLabel;v=Math.min(v,S+w.PositionAndShape.BorderMarginLeft),x=Math.max(x,S+w.PositionAndShape.BorderMarginRight)}const A=a.getBottomLineMaxInRange(v,x);r=Math.max(r,A)}}}let c=0;l=o.length;for(const d of o)for(let m=0;m<d.LyricsEntries.length;m++){const u=d.LyricsEntries[m],g=u.GraphicalLabel,b=u.LyricsEntry.VerseNumber,y=t.indexOf(b);let v=r+this.rules.LyricsHeight+this.rules.VerticalBetweenLyricsDistance+this.rules.LyricsYOffsetToStaffHeight+(this.rules.VerticalBetweenLyricsDistance+this.rules.LyricsHeight)*y;this.leadSheet&&(v=3.4+(this.rules.VerticalBetweenLyricsDistance+this.rules.LyricsHeight)*y);const x=g.PositionAndShape.RelativePosition.x;g.PositionAndShape.RelativePosition=new PointF2D(x,v),c=Math.max(c,v)}if(o.length>0){const d=e.PositionAndShape.Size.width;let m=o[0].PositionAndShape.RelativePosition.x+o[0].PositionAndShape.BorderMarginLeft+o[0].parentMeasure.PositionAndShape.RelativePosition.x;m=m>d?d:m,a.updateBottomLineInRange(m,d,c)}return o}calculateLyricsExtendsAndDashes(e){for(let t=0,s=e.length;t<s;++t){const r=e[t];for(let o=0;o<r.LyricsEntries.length;o++){const a=r.LyricsEntries[o];a.ParentLyricWord&&a.ParentLyricWord.GraphicalLyricsEntries[a.ParentLyricWord.GraphicalLyricsEntries.length-1]!==a&&this.calculateSingleLyricWord(a),a.LyricsEntry.extend&&this.calculateLyricExtend(a)}}}calculateSingleOctaveShift(e,t,s,r){throw new Error(this.abstractNotImplementedErrorMessage)}calculateWordRepetitionInstruction(e,t){throw new Error(this.abstractNotImplementedErrorMessage)}calculateMoodAndUnknownExpression(e,t,s){var l;const r=e.AbsoluteTimestamp,o=this.graphicalMusicSheet.MeasureList[t];let a=new PointF2D;if(e.MoodList.length>0||e.UnknownList.length>0){let c="";for(let b=0,y=e.EntriesList.length;b<y;++b){const S=e.EntriesList[b];S.prefix!==""&&(c===""?c+=S.prefix:c+=" "+S.prefix),c===""?c+=S.label:c+=" "+S.label}const d=o[s].ParentStaffLine;if(!d){loglevelExports.debug("MusicSheetCalculator.calculateMoodAndUnknownExpression: staffLine undefined. Returning.");return}a=this.getRelativePositionInStaffLineFromTimestamp(r,s,d,d==null?void 0:d.isPartOfMultiStaffInstrument()),Math.abs(a.x-0)<1e-4&&(a.x=o[s].beginInstructionsWidth+this.rules.RhythmRightMargin);const m=this.rules.UnknownTextHeight,u=e.getPlacementOfFirstEntry(),g=this.calculateLabel(d,a,c,e.getFontstyleOfFirstEntry(),u,m);new GraphicalUnknownExpression(d,g,u,(l=o[s])==null?void 0:l.parentSourceMeasure,e)}}clearRecreatedObjects(){for(let e=0,t=this.staffEntriesWithGraphicalTies.length;e<t;++e){const s=this.staffEntriesWithGraphicalTies[e];s.GraphicalTies.length=0}this.staffEntriesWithGraphicalTies.length=0}handleStaffEntryLink(e,t){loglevelExports.debug("handleStaffEntryLink not implemented")}calculateMusicSystems(){if(!this.graphicalMusicSheet.MeasureList)return;const e=this.graphicalMusicSheet.MeasureList;if(!e)return;this.rules.MinMeasureToDrawIndex>e.length-1&&(loglevelExports.debug("minimum measure to draw index out of range. resetting min measure index to limit."),this.rules.MinMeasureToDrawIndex=e.length-1);const t=[];for(let a=this.rules.MinMeasureToDrawIndex,l=e.length;a<l&&a<=this.rules.MaxMeasureToDrawIndex;++a){const c=e[a],d=[];for(let m=0,u=c.length;m<u;++m){const g=e[a][m];if(g!=null&&g.isVisible()&&(d.push(g),this.rules.ColoringEnabled))for(const b of g.staffEntries)for(const y of b.graphicalVoiceEntries)y.color()}t.push(d)}let s=0;for(let a=0,l=t.length;a<l;++a){const c=t[a];s=Math.max(c.length,s);break}if(s===0)return;let r;if(e.length===1||this.rules.RenderSingleHorizontalStaffline?r=new MusicSystemBuilder:r=new JustifiedMusicSystemBuilder,r.initialize(this.graphicalMusicSheet,t,s),this.musicSystems=r.buildMusicSystems(),this.formatMeasures(),this.leadSheet||(this.optimizeRestPlacement(),this.calculateStaffEntryArticulationMarks(),this.rules.RenderSlurs&&this.calculateTieCurves()),this.calculateSkyBottomLines(),this.calculateTupletNumbers(),this.rules.RenderMeasureNumbers)for(let a=0,l=this.musicSystems.length;a<l;++a){const c=this.musicSystems[a];this.calculateMeasureNumberPlacement(c)}if(this.calculateFingerings(),!this.leadSheet&&this.rules.RenderSlurs&&this.calculateSlurs(),this.rules.RenderMeasureNumbers)for(let a=0,l=this.musicSystems.length;a<l;++a){const c=this.musicSystems[a];this.calculateMeasureNumberSkyline(c)}this.leadSheet||this.calculateOrnaments(),this.calculateChordSymbols(),this.leadSheet||(this.calculateDynamicExpressions(),this.calculateMoodAndUnknownExpressions(),this.calculateExpressionAlignements(),this.calculateOctaveShifts(),this.calculatePedals(),this.calculateWavyLines(),this.calculateWordRepetitionInstructions()),this.calculateRepetitionEndings(),this.leadSheet||this.calculateTempoExpressions(),this.calculateRehearsalMarks(),this.calculateLyricsPosition();for(let a=0,l=this.musicSystems.length;a<l;++a){const c=this.musicSystems[a];for(let d=0,m=c.StaffLines.length;d<m;++d){const u=c.StaffLines[d];this.updateStaffLineBorders(u)}}r.calculateSystemYLayout(),this.calculateMarkedAreas();for(let a=0,l=this.graphicalMusicSheet.MusicPages.length;a<l;++a){const c=this.graphicalMusicSheet.MusicPages[a];for(let m=0,u=c.MusicSystems.length;m<u;++m){const g=a===0&&m===0,b=c.MusicSystems[m];b.setMusicSystemLabelsYPosition(),this.leadSheet?b===b.Parent.MusicSystems[0]&&b.createSystemLeftLine(this.rules.SystemThinLineWidth,this.rules.SystemLabelsRightMargin,g):(b.setYPositionsToVerticalLineObjectsAndCreateLines(this.rules),b.createSystemLeftLine(this.rules.SystemThinLineWidth,this.rules.SystemLabelsRightMargin,g),b.createInstrumentBrackets(this.graphicalMusicSheet.ParentMusicSheet.Instruments,this.rules.StaffHeight),b.createGroupBrackets(this.graphicalMusicSheet.ParentMusicSheet.InstrumentalGroups,this.rules.StaffHeight,0),b.alignBeginInstructions()),b.calculateBorders(this.rules)}const d=c.MusicSystems[0].PositionAndShape.BorderTop;for(let m=0,u=c.MusicSystems.length;m<u;++m){const g=c.MusicSystems[m];g.PositionAndShape.RelativePosition=new PointF2D(g.PositionAndShape.RelativePosition.x,g.PositionAndShape.RelativePosition.y-d)}for(let m=0,u=c.MusicSystems.length;m<u;++m){const g=c.MusicSystems[m];for(let b=0,y=g.StaffLines.length;b<y;++b)g.StaffLines[b].addActivitySymbolClickArea()}c.PositionAndShape.calculateTopBottomBorders(),c===this.graphicalMusicSheet.MusicPages[0]&&this.calculatePageLabels(c),c.PositionAndShape.calculateTopBottomBorders()}}calculateMarkedAreas(){}calculateChordSymbols(){for(const e of this.musicSystems)for(const t of e.StaffLines){const s=t.SkyBottomLineCalculator;let r=Number.MAX_SAFE_INTEGER;if(this.rules.ChordSymbolYAlignment&&this.rules.ChordSymbolYAlignmentScope==="staffline"){const o=[];for(const a of t.Measures)o.push(...a.staffEntries);r=this.calculateAlignedChordSymbolsOffset(o,s)}for(const o of t.Measures){this.rules.ChordSymbolYAlignment&&this.rules.ChordSymbolYAlignmentScope==="measure"&&(r=this.calculateAlignedChordSymbolsOffset(o.staffEntries,s));for(const a of o.staffEntries)if(!(!a.graphicalChordContainers||a.graphicalChordContainers.length===0))for(let l=0;l<a.graphicalChordContainers.length;l++){const c=a.graphicalChordContainers[l],d=a.PositionAndShape,m=c.PositionAndShape,u=m.BorderMarginLeft+d.AbsolutePosition.x,g=m.BorderMarginRight+d.AbsolutePosition.x;(!this.rules.ChordSymbolYAlignment||r>0)&&(r=s.getSkyLineMinInRange(u,g));let b=0;l===0?(b+=this.rules.ChordSymbolYOffset,b+=.1):b+=this.rules.ChordSymbolYPadding,b*=-1;const y=c.GraphicalLabel;y.PositionAndShape.RelativePosition.y=r+b,y.setLabelPositionAndShapeBorders(),y.PositionAndShape.calculateBoundingBox(),s.updateSkyLineInRange(u,g,r+y.PositionAndShape.BorderMarginTop)}}}}calculateAlignedChordSymbolsOffset(e,t){let s=Number.MAX_SAFE_INTEGER;for(const r of e)for(const o of r.graphicalChordContainers){const a=r.PositionAndShape,l=o.PositionAndShape,c=l.BorderMarginLeft+a.AbsolutePosition.x,d=l.BorderMarginRight+a.AbsolutePosition.x;s=Math.min(s,t.getSkyLineMinInRange(c,d))}return s}layoutMeasureWithWholeRest(e,t,s){}layoutBeams(e){}layoutArticulationMarks(e,t,s){}layoutOrnament(e,t,s){}calculateRestNotePlacementWithinGraphicalBeam(e,t,s,r,o){}calculateTupletNumbers(){}calculateSlurs(){}calculateDynamicExpressionsForMultiExpression(e,t,s){}calculateGraphicalVerbalContinuousDynamic(e,t){const s=e.Label,r=t.x+s.PositionAndShape.BorderMarginLeft,o=t.x+s.PositionAndShape.BorderMarginRight,a=e.ContinuousDynamic.Placement,c=e.ParentStaffLine.SkyBottomLineCalculator;let d;a===PlacementEnum.Below?(d=c.getBottomLineMaxInRange(r,o),s.PositionAndShape.RelativePosition=new PointF2D(t.x,d-s.PositionAndShape.BorderMarginTop)):(d=c.getSkyLineMinInRange(r,o),s.PositionAndShape.RelativePosition=new PointF2D(t.x,d-s.PositionAndShape.BorderMarginBottom))}calculateGraphicalContinuousDynamic(e,t){var T,V,Z;const s=e.ParentStaffLine.ParentStaff.idInMusicSheet,r=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(e.ContinuousDynamic.EndMultiExpression.SourceMeasureParent,s);if(!r){loglevelExports.warn("MusicSheetCalculator.calculateGraphicalContinuousDynamic: No endMeasure found");return}e.EndMeasure=r;const o=e.ParentStaffLine,a=r.ParentStaffLine,l=a&&o===a;let c=!1;a?c=a==null?void 0:a.isPartOfMultiStaffInstrument():o&&(c=o==null?void 0:o.isPartOfMultiStaffInstrument());const d=Fraction$1.createFromFraction(e.ContinuousDynamic.EndMultiExpression.AbsoluteTimestamp),m=this.graphicalMusicSheet.GetVerticalContainerFromTimestamp(d),u=m.getFirstNonNullStaffEntry().parentMeasure,g=u.PositionAndShape.AbsolutePosition.x+u.PositionAndShape.BorderRight;let b=new Fraction$1(0,0,0);for(const W of m.StaffEntries){const se=(T=W==null?void 0:W.sourceStaffEntry)==null?void 0:T.calculateMaxNoteLength();se!=null&&se.gt(b)&&(b=se)}const y=this.getRelativePositionInStaffLineFromTimestamp(d,s,a,c,0),S=Fraction$1.plus(d,b),v=this.getRelativePositionInStaffLineFromTimestamp(S,s,a,c,0);v.x>y.x&&v.x<g?y.x+=(v.x-y.x)/this.rules.WedgeEndDistanceBetweenTimestampsFactor:y.x=g-this.rules.WedgeHorizontalMargin;const x=this.dynamicExpressionMap.get(e.ContinuousDynamic.StartMultiExpression.AbsoluteTimestamp.RealValue);x&&(t.x=x.RelativePosition.x+x.BorderMarginRight+this.rules.WedgeHorizontalMargin);const A=o.ParentMusicSystem,E=A.StaffLines.indexOf(o),w=o.SkyBottomLineCalculator;let _=e.ContinuousDynamic.Placement;const C=e.ContinuousDynamic.DynamicType;(C===0||C===1)&&(_=1);let P;l&&y.x-t.x<this.rules.WedgeMinLength&&(y.x=t.x+this.rules.WedgeMinLength);const I=t.x,R=a.Measures[0].beginInstructionsWidth-this.rules.WedgeHorizontalMargin-2;let N=0,G=0;l?N=y.x:(N=o.PositionAndShape.Size.width,G=y.x,P=new GraphicalContinuousDynamicExpression(e.ContinuousDynamic,a,r.parentSourceMeasure),P.IsSplittedPart=!0,e.IsSplittedPart=!0);let B=0,k=0;if(_===PlacementEnum.Below){let W=0;if(E<A.StaffLines.length-1&&(W=E+1),W>E){const fe=A.StaffLines[W].PositionAndShape.RelativePosition.y-o.PositionAndShape.RelativePosition.y-this.rules.StaffHeight;B=this.rules.StaffHeight+fe/2}else B=this.rules.WedgePlacementBelowY;B-=this.rules.WedgeOpeningLength/2,l||(k=B);let se=w.getBottomLineMaxInRange(I,N);if(se>B&&(B=se),E<A.StaffLines.length-1){const ie=o.findClosestStaffEntry(N),fe=o.findClosestStaffEntry(I);fe&&ie&&fe.parentVerticalContainer}l||(se=a.SkyBottomLineCalculator.getBottomLineMaxInRange(R,G),se>k&&(k=se),k+=this.rules.WedgeOpeningLength/2,k+=this.rules.WedgeVerticalMargin),B+=this.rules.WedgeOpeningLength/2,B+=this.rules.WedgeVerticalMargin}else if(_===PlacementEnum.Above){if(o.ParentStaff.ParentInstrument.Staves.length===1)B=this.rules.WedgePlacementAboveY;else{let se=0;E>0&&(se=E-1);const ie=A.StaffLines[se];B=-(o.PositionAndShape.RelativePosition.y-ie.PositionAndShape.RelativePosition.y-this.rules.StaffHeight)/2}B+=this.rules.WedgeOpeningLength/2,l||(k=B);let W=w.getSkyLineMinInRange(I,N);if(W<B&&(B=W),o.ParentStaff.ParentInstrument.Staves.length>1&&E>0){const se=o.findClosestStaffEntry(I),ie=o.findClosestStaffEntry(N);se&&ie&&se.parentVerticalContainer}l||(W=a.SkyBottomLineCalculator.getSkyLineMinInRange(R,G),W<k&&(k=W),k-=this.rules.WedgeOpeningLength/2),B-=this.rules.WedgeOpeningLength/2,B-=this.rules.WedgeVerticalMargin,l||(k-=this.rules.WedgeVerticalMargin)}e.Lines.clear(),((Z=(V=e==null?void 0:e.ParentStaffLine)==null?void 0:V.ParentStaff)==null?void 0:Z.StafflineCount)===2&&(B+=1,k+=3),e.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?l?(e.createCrescendoLines(I,N,B),e.calcPsi()):(e.createFirstHalfCrescendoLines(I,N,B),e.calcPsi(),P.createSecondHalfCrescendoLines(R,G,k),P.calcPsi()):e.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&(l?(e.createDiminuendoLines(I,N,B),e.calcPsi()):(e.createFirstHalfDiminuendoLines(I,N,B),e.calcPsi(),P.createSecondHalfDiminuendoLines(R,G,k),P.calcPsi())),this.dynamicExpressionMap.set(d.RealValue,e.PositionAndShape)}calculateGraphicalInstantaneousDynamicExpression(e,t,s){const r=e.ParentStaffLine;if(!r)return;const o=t.x+e.PositionAndShape.BorderMarginLeft,a=t.x+e.PositionAndShape.BorderMarginRight,l=r.SkyBottomLineCalculator;let c=0;if(e.Placement===PlacementEnum.Above){const d=l.getSkyLineMinInRange(o,a);if(r.isPartOfMultiStaffInstrument()&&r.ParentStaff!==r.ParentStaff.ParentInstrument.Staves[0]){const m=r.ParentMusicSystem.StaffLines[r.ParentMusicSystem.StaffLines.indexOf(r)-1],u=r.PositionAndShape.RelativePosition.y-m.PositionAndShape.RelativePosition.y-this.rules.StaffHeight;d>-u/2?c=-u/2:c=d-e.PositionAndShape.BorderMarginBottom}else c=d-e.PositionAndShape.BorderMarginBottom;e.PositionAndShape.RelativePosition=new PointF2D(t.x,c)}else if(e.Placement===PlacementEnum.Below){const d=l.getBottomLineMaxInRange(o,a),m=r.ParentStaff.ParentInstrument.Staves[r.ParentStaff.ParentInstrument.Staves.length-1];if(r.isPartOfMultiStaffInstrument()&&r.ParentStaff!==m){const g=r.ParentMusicSystem.StaffLines[r.ParentMusicSystem.StaffLines.indexOf(r)+1].PositionAndShape.RelativePosition.y-r.PositionAndShape.RelativePosition.y-this.rules.StaffHeight,b=e.PositionAndShape.BorderMarginBottom;d+b<this.rules.StaffHeight+g/2?c=this.rules.StaffHeight+g/2:c=d-e.PositionAndShape.BorderMarginTop}else c=d-e.PositionAndShape.BorderMarginTop;e.PositionAndShape.RelativePosition=new PointF2D(t.x,c)}e.updateSkyBottomLine()}calcGraphicalRepetitionEndingsRecursively(e){}layoutSingleRepetitionEnding(e,t,s,r,o,a){}calculateLabel(e,t,s,r,o,a,l=TextAlignmentEnum.CenterBottom){const c=new Label(s,l);c.fontStyle=r,c.fontHeight=a;const d=new GraphicalLabel(c,a,c.textAlignment,this.rules,e.PositionAndShape),m=1.1;o===PlacementEnum.Below&&(d.Label.textAlignment=TextAlignmentEnum.LeftTop),d.setLabelPositionAndShapeBorders(),d.PositionAndShape.BorderMarginBottom*=m,d.PositionAndShape.BorderMarginTop*=m,d.PositionAndShape.BorderMarginLeft*=m,d.PositionAndShape.BorderMarginRight*=m;let u=t.x+d.PositionAndShape.BorderMarginLeft,g=t.x+d.PositionAndShape.BorderMarginRight;g>e.PositionAndShape.Size.width&&(g=e.PositionAndShape.Size.width-this.rules.MeasureRightMargin,u=g-d.PositionAndShape.MarginSize.width,t.x=u-d.PositionAndShape.BorderMarginLeft);let b;const y=e.SkyBottomLineCalculator;return o===PlacementEnum.Below?b=y.getBottomLineMaxInRange(u,g):b=y.getSkyLineMinInRange(u,g),d.PositionAndShape.RelativePosition=new PointF2D(t.x,b),o===PlacementEnum.Below?y.updateBottomLineInRange(u,g,d.PositionAndShape.BorderMarginBottom+b):y.updateSkyLineInRange(u,g,d.PositionAndShape.BorderMarginTop+b),d}calculateTempoExpressionsForMultiTempoExpression(e,t,s,r){metronomeMarks={};const o=Fraction$1.plus(e.AbsoluteTimestamp,t.Timestamp),a=this.graphicalMusicSheet.MeasureList[s];let l=new PointF2D;if(t.ContinuousTempo||t.InstantaneousTempo){if(this.rules.MinMeasureToDrawIndex>0||!a[0])return;let c=a[0].ParentStaffLine,d=a[0].PositionAndShape.RelativePosition.x,m=0;for(let u=0;u<a.length;u++)if(!(!a[u].ParentStaffLine||a[u].ParentStaffLine.Measures.length===0)&&a[u].ParentStaffLine.Measures.length>0){c=a[u].ParentStaffLine,d=a[u].PositionAndShape.RelativePosition.x,m=u;break}if(l=this.getRelativePositionInStaffLineFromTimestamp(o,m,c,c.isPartOfMultiStaffInstrument(),d),t.EntriesList.length>0&&t.EntriesList[0].Expression instanceof InstantaneousTempoExpression){const u=t.EntriesList[0].Expression;if(u.Placement=PlacementEnum.Above,c.Measures[0].staffEntries.length>0&&Math.abs(l.x-c.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x)===0&&c.ParentMusicSystem===this.musicSystems[0]){const g=c.Measures[0].FirstInstructionStaffEntry;if(g){const b=g.GraphicalInstructions.last();l.x=b.PositionAndShape.RelativePosition.x}this.rules.CompactMode&&(l.x=c.PositionAndShape.RelativePosition.x+c.Measures[0].PositionAndShape.RelativePosition.x)}}for(const u of t.EntriesList){let g=TextAlignmentEnum.CenterBottom;this.rules.CompactMode&&(g=TextAlignmentEnum.LeftBottom);const b=this.calculateLabel(c,l,u.label,t.getFontstyleOfFirstEntry(),u.Expression.Placement,this.rules.UnknownTextHeight,g);if(u.Expression instanceof InstantaneousTempoExpression){for(const S of c.AbstractExpressions)S instanceof GraphicalInstantaneousTempoExpression&&(S.SourceExpression.Label,u.Expression.Label);new GraphicalInstantaneousTempoExpression(u.Expression,b).ParentStaffLine||loglevelExports.warn("Adding staffline didn't work"),u.Expression.Enum===TempoEnum.metronomeMark&&(metronomeMarks[s]=u.Expression)}else u.Expression instanceof ContinuousTempoExpression;if(r===e.TempoExpressions.length-1)for(const y of Object.values(metronomeMarks))this.createMetronomeMark(y,s)}}}createMetronomeMark(e,t){throw new Error(this.abstractNotImplementedErrorMessage)}graphicalMeasureCreatedCalculations(e){}clearSystemsAndMeasures(){for(let e=0,t=this.graphicalMusicSheet.MusicPages.length;e<t;++e){const s=this.graphicalMusicSheet.MusicPages[e];for(let r=0,o=s.MusicSystems.length;r<o;++r){const a=s.MusicSystems[r];for(let l=0,c=a.StaffLines.length;l<c;++l){const d=a.StaffLines[l];for(let m=0,u=d.Measures.length;m<u;++m){const g=d.Measures[m];if(g.FirstInstructionStaffEntry){const b=g.PositionAndShape.ChildElements.indexOf(g.FirstInstructionStaffEntry.PositionAndShape);b>-1&&g.PositionAndShape.ChildElements.splice(b,1),g.FirstInstructionStaffEntry=void 0,g.beginInstructionsWidth=0}if(g.LastInstructionStaffEntry){const b=g.PositionAndShape.ChildElements.indexOf(g.LastInstructionStaffEntry.PositionAndShape);b>-1&&g.PositionAndShape.ChildElements.splice(b,1),g.LastInstructionStaffEntry=void 0,g.endInstructionsWidth=0}}d.Measures=[],d.PositionAndShape.ChildElements=[]}a.StaffLines.length=0,a.PositionAndShape.ChildElements=[]}s.MusicSystems=[],s.PositionAndShape.ChildElements=[]}this.graphicalMusicSheet.MusicPages=[]}handleVoiceEntry(e,t,s,r,o,a,l,c,d,m=void 0,u=void 0){e.StemDirectionXml!==StemDirectionType.Undefined&&this.rules.SetWantedStemDirectionByXml&&e.StemDirectionXml!==void 0?e.WantedStemDirection=e.StemDirectionXml:this.calculateStemDirectionFromVoices(e);const g=t.findOrCreateGraphicalVoiceEntry(e);g.octaveShiftValue=c;const b=t.tabStaffEntry;let y;b&&(y=b.findOrCreateGraphicalVoiceEntry(e));for(let S=0,v=e.Notes.length;S<v;++S){const x=e.Notes[S];if(!x||u!==void 0&&u.Link!==void 0&&m!==void 0&&m.indexOf(x)>-1)continue;let A;if(e.IsGrace?A=MusicSheetCalculator.symbolFactory.createGraceNote(x,g,o,this.rules,c):(A=MusicSheetCalculator.symbolFactory.createNote(x,g,o,c,this.rules,void 0),MusicSheetCalculator.stafflineNoteCalculator.trackNote(A)),x.Pitch&&this.checkNoteForAccidental(A,s,o,c),this.resetYPositionForLeadSheet(A.PositionAndShape),t.addGraphicalNoteToListAtCorrectYPosition(g,A),A.PositionAndShape.calculateBoundingBox(),this.leadSheet||(x.NoteBeam!==void 0&&x.PrintObject&&this.handleBeam(A,x.NoteBeam,l),x.NoteTuplet!==void 0&&x.PrintObject&&this.handleTuplet(A,x.NoteTuplet,a)),y){const E=MusicSheetCalculator.symbolFactory.createNote(x,y,o,c,this.rules,void 0);b.addGraphicalNoteToListAtCorrectYPosition(y,E),E.PositionAndShape.calculateBoundingBox(),this.leadSheet||x.NoteTuplet&&this.handleTuplet(E,x.NoteTuplet,a)}}return e.Articulations.length>0&&this.handleVoiceEntryArticulations(e.Articulations,e,t),e.TechnicalInstructions.length>0&&this.handleVoiceEntryTechnicalInstructions(e.TechnicalInstructions,e,t),e.LyricsEntries.size()>0&&this.handleVoiceEntryLyrics(e,t,r),e.OrnamentContainer&&this.handleVoiceEntryOrnaments(e.OrnamentContainer,e,t),c}resetYPositionForLeadSheet(e){this.leadSheet&&(e.RelativePosition=new PointF2D(e.RelativePosition.x,0))}layoutVoiceEntries(e,t){if(e.PositionAndShape.RelativePosition=new PointF2D(0,0),!this.leadSheet)for(const s of e.graphicalVoiceEntries){const r=s.notes;if(r.length===0)continue;const o=r[0].sourceNote.ParentVoiceEntry,a=r[0].sourceNote.Pitch!==void 0;this.layoutVoiceEntry(o,r,e,a)}}maxInstrNameLabelLength(){var t;let e=0;for(const s of this.graphicalMusicSheet.ParentMusicSheet.Instruments)if((t=s.NameLabel)!=null&&t.print&&s.Voices.length>0&&s.Voices[0].Visible){let r=s.NameLabel;this.rules.RenderPartNames||(r=new Label("",r.textAlignment,r.font));const o=new GraphicalLabel(r,this.rules.InstrumentLabelTextHeight,TextAlignmentEnum.LeftCenter,this.rules);o.setLabelPositionAndShapeBorders(),e=Math.max(e,o.PositionAndShape.MarginSize.width)}return this.rules.RenderPartNames?e:0}calculateSheetLabelBoundingBoxes(){var r;const e=this.graphicalMusicSheet.ParentMusicSheet,t=this.rules.DefaultColorTitle;if(e.Title!==void 0&&this.rules.RenderTitle){const o=new GraphicalLabel(e.Title,this.rules.SheetTitleHeight,TextAlignmentEnum.CenterBottom,this.rules);o.Label.IsCreditLabel=!0,o.Label.colorDefault=t,this.graphicalMusicSheet.Title=o,o.setLabelPositionAndShapeBorders()}else this.rules.RenderTitle||(this.graphicalMusicSheet.Title=void 0);if(e.Subtitle!==void 0&&this.rules.RenderSubtitle){const o=new GraphicalLabel(e.Subtitle,this.rules.SheetSubtitleHeight,TextAlignmentEnum.CenterCenter,this.rules);o.Label.IsCreditLabel=!0,o.Label.colorDefault=t,this.graphicalMusicSheet.Subtitle=o,o.setLabelPositionAndShapeBorders()}else this.rules.RenderSubtitle||(this.graphicalMusicSheet.Subtitle=void 0);if(e.Composer!==void 0&&this.rules.RenderComposer){const o=new GraphicalLabel(e.Composer,this.rules.SheetComposerHeight,TextAlignmentEnum.RightCenter,this.rules);o.Label.IsCreditLabel=!0,o.Label.colorDefault=t,this.graphicalMusicSheet.Composer=o,o.setLabelPositionAndShapeBorders()}else this.rules.RenderComposer||(this.graphicalMusicSheet.Composer=void 0);if(e.Lyricist!==void 0&&this.rules.RenderLyricist){const o=new GraphicalLabel(e.Lyricist,this.rules.SheetAuthorHeight,TextAlignmentEnum.LeftCenter,this.rules);o.Label.IsCreditLabel=!0,o.Label.colorDefault=t,this.graphicalMusicSheet.Lyricist=o,o.setLabelPositionAndShapeBorders()}else this.rules.RenderLyricist||(this.graphicalMusicSheet.Lyricist=void 0);const s=(r=this.graphicalMusicSheet.musicSheet.sourceMeasures)==null?void 0:r[0];if(s&&s.FirstInstructionsStaffEntries.length>0){const o=s.FirstInstructionsStaffEntries[0];let a,l;for(let c=0,d=o.Instructions.length;c<d;++c){const m=o.Instructions[c];m instanceof ClefInstruction||(m instanceof KeyInstruction?a=m:m instanceof RhythmInstruction&&(l=m))}if(a){e.CurrentKeyInstruction=a;const c=VexFlowConverter.keySignature(a),d=new Label("1="+c),m=new Label(`${l.Rhythm.Numerator}
- ${l.Rhythm.Denominator}`),u=new GraphicalLabel(d,this.rules.SheetAuthorHeight,TextAlignmentEnum.LeftCenter,this.rules),g=new GraphicalLabel(m,this.rules.SheetAuthorHeight,TextAlignmentEnum.LeftCenter,this.rules),b=new Label("ᅳ"),y=new GraphicalLabel(b,this.rules.SheetAuthorHeight,TextAlignmentEnum.LeftCenter,this.rules);d.fontFamily="Arial",d.IsCreditLabel=!0,d.colorDefault=t,m.fontFamily="Arial",m.IsCreditLabel=!0,m.colorDefault=t,b.fontFamily="Arial",b.IsCreditLabel=!0,b.colorDefault=t,this.graphicalMusicSheet.JianpuKeySignature=u,this.graphicalMusicSheet.jianpuTimeSignature=g,this.graphicalMusicSheet.jianpuLine=y,u.setLabelPositionAndShapeBorders(),g.setLabelPositionAndShapeBorders(),y.setLabelPositionAndShapeBorders()}}}checkMeasuresForWholeRestNotes(){for(let e=0,t=this.musicSystems.length;e<t;++e){const s=this.musicSystems[e];for(let r=0,o=s.StaffLines.length;r<o;++r){const a=s.StaffLines[r];for(let l=0,c=a.Measures.length;l<c;++l){const d=a.Measures[l];if(d.staffEntries.length===1){const m=d.staffEntries[0];if(m.graphicalVoiceEntries.length>0&&m.graphicalVoiceEntries[0].notes.length===1){const u=m.graphicalVoiceEntries[0].notes[0];!u.sourceNote.Pitch&&new Fraction$1(1,2).lt(u.sourceNote.Length)&&this.layoutMeasureWithWholeRest(u,m,d)}}}}}}optimizeRestNotePlacement(e,t){if(e.graphicalVoiceEntries.length===0)return;const s=e.graphicalVoiceEntries[0].notes;if(s.length===0)return;const r=s[0],o=r.sourceNote.isRest();if(e.graphicalVoiceEntries.length===2){let a=!1;const l=e.graphicalVoiceEntries[1].notes;l.length>0&&(a=l[0].sourceNote.isRest()),o&&a?this.calculateTwoRestNotesPlacementWithCollisionDetection(e):(o||a)&&this.calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote(e)}else if(o&&e!==t.staffEntries[0]&&e!==t.staffEntries[t.staffEntries.length-1]){const a=t.staffEntries.indexOf(e),l=t.staffEntries[a-1],c=t.staffEntries[a+1];if(l.graphicalVoiceEntries.length===1){const d=l.graphicalVoiceEntries[0].notes[0];if(d.sourceNote.NoteBeam!==void 0&&c.graphicalVoiceEntries.length===1){const m=c.graphicalVoiceEntries[0].notes[0];m.sourceNote.NoteBeam!==void 0&&d.sourceNote.NoteBeam===m.sourceNote.NoteBeam&&(this.calculateRestNotePlacementWithinGraphicalBeam(e,r,d,c,m),e.PositionAndShape.calculateBoundingBox())}}}}getRelativePositionInStaffLineFromTimestamp(e,t,s,r,o=0){let a=new PointF2D,l,c;const d=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,m=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(e),u=Math.min(Math.floor(m),d-1),g=Math.min(Math.ceil(m),d-1);if(u<0||t<0)return a;if(l=this.getFirstLeftNotNullStaffEntryFromContainer(u,t,r),c=this.getFirstRightNotNullStaffEntryFromContainer(g,t,r),l&&c){let b=l.parentMeasure.PositionAndShape.RelativePosition.x;o>0&&(b=o);let y=l.PositionAndShape.RelativePosition.x+b,S=c.PositionAndShape.RelativePosition.x+c.parentMeasure.PositionAndShape.RelativePosition.x;o>0&&(S=c.PositionAndShape.RelativePosition.x+b);let v=0;if(l!==c){const x=l.getAbsoluteTimestamp(),A=c.getAbsoluteTimestamp();v=Fraction$1.minus(e,x).RealValue/Fraction$1.minus(A,x).RealValue}l.parentMeasure.ParentStaffLine!==c.parentMeasure.ParentStaffLine&&(l.parentMeasure.ParentStaffLine===s?S=s.PositionAndShape.Size.width:y=s.PositionAndShape.RelativePosition.x),a=new PointF2D(y+(S-y)*v,0)}return a}getRelativeXPositionFromTimestamp(e){const t=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,s=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(e),r=Math.max(0,Math.min(Math.round(s),t-1)),o=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[r].getFirstNonNullStaffEntry();return o.PositionAndShape.RelativePosition.x+o.parentMeasure.PositionAndShape.RelativePosition.x}calculatePageLabels(e){var a;this.rules.RenderSingleHorizontalStaffline&&(e.PositionAndShape.BorderRight=e.PositionAndShape.Size.width,e.PositionAndShape.calculateBoundingBox(),this.graphicalMusicSheet.ParentMusicSheet.pageWidth=e.PositionAndShape.Size.width);let t=10;if(e.MusicSystems.length>0){const l=e.MusicSystems[0];t=l.PositionAndShape.RelativePosition.y+l.PositionAndShape.BorderTop}if(this.graphicalMusicSheet.Title){const l=this.graphicalMusicSheet.Title;l.PositionAndShape.Parent=e.PositionAndShape;const c=new PointF2D;c.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,c.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight,l.PositionAndShape.RelativePosition=c,e.Labels.push(l)}if(this.graphicalMusicSheet.Subtitle){const l=this.graphicalMusicSheet.Subtitle;l.PositionAndShape.Parent=e.PositionAndShape;const c=new PointF2D;c.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,c.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight+this.rules.SheetMinimumDistanceBetweenTitleAndSubtitle,l.PositionAndShape.RelativePosition=c,e.Labels.push(l)}const s=this.graphicalMusicSheet.Composer;let r;if(s){s.PositionAndShape.Parent=e.PositionAndShape,s.setLabelPositionAndShapeBorders();const l=new PointF2D;l.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth-this.rules.PageRightMargin,l.y=t,l.y-=this.rules.SystemComposerDistance;const c=(a=s.TextLines)==null?void 0:a.length;c>1&&(l.y-=s.PositionAndShape.BorderBottom*(c-1)/c),r=l.y,s.PositionAndShape.RelativePosition=l,e.Labels.push(s)}const o=this.graphicalMusicSheet.Lyricist;if(o){o.PositionAndShape.Parent=e.PositionAndShape,o.setLabelPositionAndShapeBorders();const l=new PointF2D;l.x=this.rules.PageLeftMargin,l.y=t,l.y+=o.PositionAndShape.BorderBottom,l.y=Math.min(l.y,r!=null?r:Number.MAX_SAFE_INTEGER),o.PositionAndShape.RelativePosition=l,e.Labels.push(o)}}createGraphicalTies(){for(let e=0;e<this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length;e++){const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[e];for(let s=0;s<t.CompleteNumberOfStaves;s++)for(let r=0;r<t.VerticalSourceStaffEntryContainers.length;r++){const o=t.VerticalSourceStaffEntryContainers[r].StaffEntries[s];if(o){const a=this.graphicalMusicSheet.findGraphicalStaffEntryFromMeasureList(s,e,o);a&&(a.GraphicalTies.clear(),a.ties.clear());for(let l=0,c=o.VoiceEntries.length;l<c;++l){const d=o.VoiceEntries[l];for(let m=0,u=d.Notes.length;m<u;++m){const g=d.Notes[m];if(g.NoteTie){const b=g.NoteTie;if(g===g.NoteTie.Notes.last())continue;for(const y of a.GraphicalTies)y.Tie;this.handleTie(b,a,s,e)}}}this.setTieDirections(a)}}}}handleTie(e,t,s,r){if(!t)return;t.ties.push(e);let o=t,a,l,c;for(let d=1;d<e.Notes.length;d++)if(a=o.findTieGraphicalNoteFromNote(e.Notes[d-1]),l=this.graphicalMusicSheet.GetGraphicalFromSourceStaffEntry(e.Notes[d].ParentStaffEntry),!!l){if(c=l.findTieGraphicalNoteFromNote(e.Notes[d]),a!==void 0&&c!==void 0&&l){if(!a.sourceNote.PrintObject||!c.sourceNote.PrintObject)continue;const m=this.createGraphicalTie(e,o,l,a,c);o.GraphicalTies.push(m),this.staffEntriesWithGraphicalTies.indexOf(o)>=0&&this.staffEntriesWithGraphicalTies.push(o)}o=l}}setTieDirections(e){if(!e)return;const t=e.ties;if(t.length>1){let s;for(const r of t){const o=r.Notes[0];(!s||o.Pitch.getHalfTone()>s.Pitch.getHalfTone())&&(s=o)}for(const r of t)r.TieDirection===PlacementEnum.NotYetDefined&&(r.Notes[0]===s?r.TieDirection=PlacementEnum.Above:r.TieDirection=PlacementEnum.Below)}}createAccidentalCalculators(){const e=[],t=this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();if(t)for(let s=0;s<t.CompleteNumberOfStaves;s++){const r=new AccidentalCalculator;if(e.push(r),t.FirstInstructionsStaffEntries[s])for(let o=0,a=t.FirstInstructionsStaffEntries[s].Instructions.length;o<a;++o){const l=t.FirstInstructionsStaffEntries[s].Instructions[o];if(l instanceof KeyInstruction){const c=l;r.ActiveKeyInstruction=c}}}return e}calculateVerticalContainersList(){const e=this.graphicalMusicSheet.MeasureList[0].length;for(let t=0;t<this.graphicalMusicSheet.MeasureList.length;t++)for(let s=0;s<e;s++){const r=this.graphicalMusicSheet.MeasureList[t][s];if(r)for(let o=0,a=r.staffEntries.length;o<a;++o){const l=r.staffEntries[o],c=this.graphicalMusicSheet.getOrCreateVerticalContainer(l.getAbsoluteTimestamp());c&&(c.StaffEntries[s]=l,l.parentVerticalContainer=c)}}}setIndicesToVerticalGraphicalContainers(){for(let e=0;e<this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length;e++)this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e].Index=e}createGraphicalMeasuresForSourceMeasure(e,t,s,r,o){this.initGraphicalMeasuresCreation();const a=[],l=[],c=[],d=[];let m=!0;for(let u=0;u<e.CompleteNumberOfStaves;u++){const g=this.createGraphicalMeasure(e,c,l,t[u],o,r,s,u,d);m=m&&g.hasOnlyRests,a.push(g)}return e.allRests=m,e.VerticalMeasureList=a,a}createGraphicalMeasure(e,t,s,r,o,a,l,c,d){var b,y,S,v,x,A;const m=this.graphicalMusicSheet.ParentMusicSheet.getStaffFromIndex(c);let u;if(o[c].ClefType===ClefEnum.TAB)m.isTab=!0,u=MusicSheetCalculator.symbolFactory.createTabStaffMeasure(e,m);else if(e.multipleRestMeasures&&this.rules.RenderMultipleRestMeasures)u=MusicSheetCalculator.symbolFactory.createMultiRestMeasure(e,m);else{if(e.multipleRestMeasureNumber>1)return;u=MusicSheetCalculator.symbolFactory.createGraphicalMeasure(e,m)}if(u.hasError=e.getErrorInMeasure(c),e.FirstInstructionsStaffEntries[c])for(let E=0,w=e.FirstInstructionsStaffEntries[c].Instructions.length;E<w;++E){const _=e.FirstInstructionsStaffEntries[c].Instructions[E];if(_ instanceof KeyInstruction){const C=KeyInstruction.copy(_),P=u.getTransposedHalftones();P!==0&&u.ParentStaff.ParentInstrument.MidiInstrumentId!==MidiInstrument.Percussion&&MusicSheetCalculator.transposeCalculator&&MusicSheetCalculator.transposeCalculator.transposeKey(C,P),r.ActiveKeyInstruction=C}}const g=[];for(let E=0,w=e.StaffLinkedExpressions[c].length;E<w;++E){const _=e.StaffLinkedExpressions[c][E];if(_.OctaveShiftStart){g.push(_);const C=_.OctaveShiftStart;let P=(b=C==null?void 0:C.ParentEndMultiExpression)==null?void 0:b.AbsoluteTimestamp;C!=null&&C.ParentEndMultiExpression||(P=Fraction$1.plus(e.AbsoluteTimestamp,e.Duration)),a[c]=new OctaveShiftParams(C,_==null?void 0:_.AbsoluteTimestamp,P)}}for(let E=0;E<e.VerticalSourceStaffEntryContainers.length;E++){const w=e.VerticalSourceStaffEntryContainers[E].StaffEntries[c];if(w){for(let I=0,R=w.Instructions.length;I<R;++I){const N=w.Instructions[I];N instanceof ClefInstruction&&(o[c]=N)}const _=MusicSheetCalculator.symbolFactory.createStaffEntry(w,u);E<u.staffEntries.length?u.addGraphicalStaffEntryAtTimestamp(_):u.addGraphicalStaffEntry(_);const C=[];w.Link&&(w.findLinkedNotes(C),this.handleStaffEntryLink(_,d));let P=OctaveEnum.NONE;if(a[c]&&a[c].getAbsoluteStartTimestamp.lte(w.AbsoluteTimestamp)&&w.AbsoluteTimestamp.lte(a[c].getAbsoluteEndTimestamp)&&(P=a[c].getOpenOctaveShift.Type),P===OctaveEnum.NONE){for(const I of g)if((S=(y=I.OctaveShiftStart)==null?void 0:y.ParentStartMultiExpression)!=null&&S.AbsoluteTimestamp.lte(w.AbsoluteTimestamp)&&!((x=(v=I.OctaveShiftStart)==null?void 0:v.ParentEndMultiExpression)!=null&&x.AbsoluteTimestamp.lt(w.AbsoluteTimestamp))){P=I.OctaveShiftStart.Type;break}}for(let I=0,R=w.VoiceEntries.length;I<R;++I){const N=w.VoiceEntries[I];P=this.handleVoiceEntry(N,_,r,l,o[c],t,s,P,c,C,w)}if(w.Instructions.length>0){const I=w.Instructions[0];MusicSheetCalculator.symbolFactory.createInStaffClef(_,I)}this.rules.RenderChordSymbols&&((A=w.ChordContainers)==null?void 0:A.length)>0&&(w.ParentStaff.ParentInstrument.HasChordSymbols=!0,MusicSheetCalculator.symbolFactory.createChordSymbols(w,_,r.ActiveKeyInstruction,this.graphicalMusicSheet.ParentMusicSheet.Transpose))}}if(r.doCalculationsAtEndOfMeasure(),e.LastInstructionsStaffEntries[c]){const E=e.LastInstructionsStaffEntries[c];for(let w=0,_=E.Instructions.length;w<_;++w){const C=E.Instructions[w];C instanceof ClefInstruction&&(o[c]=C)}}for(let E=0,w=e.StaffLinkedExpressions[c].length;E<w;++E){const _=e.StaffLinkedExpressions[c][E];_.OctaveShiftEnd!==void 0&&a[c]!==void 0&&_.OctaveShiftEnd===a[c].getOpenOctaveShift&&(a[c]=void 0)}for(const E of u.staffEntries)for(const w of E.graphicalVoiceEntries)this.setBeamNotesWantedStemDirections(w.parentVoiceEntry);if(this.rules.FillEmptyMeasuresWithWholeRest>=1&&u.staffEntries.length===0){const E=new SourceStaffEntry(new VerticalSourceStaffEntryContainer(u.parentSourceMeasure,u.parentSourceMeasure.AbsoluteTimestamp,u.parentSourceMeasure.CompleteNumberOfStaves),m),w=new VoiceEntry(new Fraction$1(0,1),m.Voices[0],E),_=new Note$1(w,E,Fraction$1.createFromFraction(e.Duration),void 0,e);_.PrintObject=this.rules.FillEmptyMeasuresWithWholeRest===FillEmptyMeasuresWithWholeRests.YesVisible,w.addNote(_);const C=MusicSheetCalculator.symbolFactory.createStaffEntry(E,u);u.addGraphicalStaffEntry(C),C.relInMeasureTimestamp=w.Timestamp;const P=MusicSheetCalculator.symbolFactory.createVoiceEntry(w,C);C.graphicalVoiceEntries.push(P);const I=MusicSheetCalculator.symbolFactory.createNote(_,P,new ClefInstruction,OctaveEnum.NONE,void 0);MusicSheetCalculator.stafflineNoteCalculator.trackNote(I),P.notes.push(I)}u.hasOnlyRests=!0;for(const E of u.staffEntries)if(u.hasOnlyRests=E.hasOnlyRests(),!u.hasOnlyRests)break;return u}checkNoteForAccidental(e,t,s,r){let o=e.sourceNote.Pitch;const a=e.parentVoiceEntry.parentStaffEntry.parentMeasure.getTransposedHalftones();a!==0&&e.sourceNote.ParentStaffEntry.ParentStaff.ParentInstrument.MidiInstrumentId!==MidiInstrument.Percussion&&(o=e.Transpose(t.ActiveKeyInstruction,s,a,r),e.sourceNote.TransposedPitch=o),e.sourceNote.halfTone=o.getHalfTone(),t.checkAccidental(e,o)}handleStaffEntries(e){for(let t=0,s=this.graphicalMusicSheet.MeasureList.length;t<s;++t){const r=this.graphicalMusicSheet.MeasureList[t];for(let o=0,a=r.length;o<a;++o){const l=r[o];if(l){this.rules.PercussionOneLineCutoff!==void 0&&this.rules.PercussionOneLineCutoff!==0&&e[o]&&(this.rules.PercussionOneLineCutoff===-1||MusicSheetCalculator.stafflineNoteCalculator.getStafflineUniquePositionCount(o)<this.rules.PercussionOneLineCutoff);for(const c of l.staffEntries)c.parentMeasure!==void 0&&c.graphicalVoiceEntries.length>0&&c.graphicalVoiceEntries[0].notes.length>0&&(this.layoutVoiceEntries(c,o),this.layoutStaffEntry(c));this.graphicalMeasureCreatedCalculations(l)}}}}calculateSkyBottomLines(){for(const e of this.musicSystems)for(const t of e.StaffLines)t.SkyBottomLineCalculator.calculateLines()}calculateExpressionAlignements(){}calculateStaffEntryArticulationMarks(){for(let e=0,t=this.musicSystems.length;e<t;++e){const s=this.musicSystems[e];for(let r=0,o=s.StaffLines.length;r<o;++r){const a=s.StaffLines[r];for(let l=0,c=a.Measures.length;l<c;++l){const d=a.Measures[l];for(let m=0,u=d.staffEntries.length;m<u;++m){const g=d.staffEntries[m];for(let b=0,y=g.sourceStaffEntry.VoiceEntries.length;b<y;++b){const S=g.sourceStaffEntry.VoiceEntries[b];S.Articulations.length>0&&this.layoutArticulationMarks(S.Articulations,S,g)}}}}}}calculateOrnaments(){for(let e=0,t=this.musicSystems.length;e<t;++e){const s=this.musicSystems[e];for(let r=0,o=s.StaffLines.length;r<o;++r){const a=s.StaffLines[r];for(let l=0,c=a.Measures.length;l<c;++l){const d=a.Measures[l];for(let m=0,u=d.staffEntries.length;m<u;++m){const g=d.staffEntries[m];for(let b=0,y=g.sourceStaffEntry.VoiceEntries.length;b<y;++b){const S=g.sourceStaffEntry.VoiceEntries[b];if(S.OrnamentContainer){if(S.hasTie()&&!g.relInMeasureTimestamp.Equals(S.Timestamp))continue;this.layoutOrnament(S.OrnamentContainer,S,g),this.staffEntriesWithOrnaments.indexOf(g)===-1&&this.staffEntriesWithOrnaments.push(g)}}}}}}}calculateFingerings(){if(!(this.rules.FingeringPosition===PlacementEnum.Left||this.rules.FingeringPosition===PlacementEnum.Right))for(const e of this.musicSystems)for(const t of e.StaffLines)for(const s of t.Measures){const r=s.isUpperStaffOfInstrument()?PlacementEnum.Above:PlacementEnum.Below;for(const o of s.staffEntries){o.FingeringEntries=[];const a=t.SkyBottomLineCalculator,l=o.PositionAndShape.RelativePosition.x+s.PositionAndShape.RelativePosition.x,c=[];for(const d of o.graphicalVoiceEntries)for(const m of d.notes){const u=m.sourceNote;u.Fingering&&!u.IsGraceNote&&c.push(u.Fingering)}r===PlacementEnum.Below&&c.reverse();for(let d=0;d<c.length;d++){const m=c[d],u=r===PlacementEnum.Above?TextAlignmentEnum.CenterBottom:TextAlignmentEnum.CenterTop,g=new Label(m.value,u),b=new GraphicalLabel(g,this.rules.FingeringTextSize,g.textAlignment,this.rules,t.PositionAndShape),y=l+b.PositionAndShape.BorderMarginLeft,S=l+b.PositionAndShape.BorderMarginRight;let v;r===PlacementEnum.Above?v=a.getSkyLineMinInRange(y,S):v=a.getBottomLineMaxInRange(y,S);let x=0;d===0?(x+=this.rules.FingeringOffsetY,r===PlacementEnum.Above&&(x+=.1)):x+=this.rules.FingeringPaddingY,r===PlacementEnum.Above&&(x*=-1),b.PositionAndShape.RelativePosition.y+=v+x,b.PositionAndShape.RelativePosition.x=l,b.setLabelPositionAndShapeBorders(),b.PositionAndShape.calculateBoundingBox(),o.FingeringEntries.push(b);const A=b.PositionAndShape.RelativePosition.x+b.PositionAndShape.BorderLeft,E=A-b.PositionAndShape.BorderLeft+b.PositionAndShape.BorderRight;r===PlacementEnum.Above?a.updateSkyLineInRange(A,E,b.PositionAndShape.RelativePosition.y+b.PositionAndShape.BorderTop):r===PlacementEnum.Below&&a.updateBottomLineInRange(A,E,b.PositionAndShape.RelativePosition.y+b.PositionAndShape.BorderBottom)}}}}optimizeRestPlacement(){for(let e=0,t=this.musicSystems.length;e<t;++e){const s=this.musicSystems[e];for(let r=0,o=s.StaffLines.length;r<o;++r){const a=s.StaffLines[r];for(let l=0,c=a.Measures.length;l<c;++l){const d=a.Measures[l];for(let m=0,u=d.staffEntries.length;m<u;++m){const g=d.staffEntries[m];this.optimizeRestNotePlacement(g,d)}}}}}calculateTwoRestNotesPlacementWithCollisionDetection(e){const t=e.graphicalVoiceEntries[0].notes[0],s=e.graphicalVoiceEntries[1].notes[0];s.PositionAndShape.RelativePosition=new PointF2D(0,2.5),e.PositionAndShape.calculateAbsolutePositionsRecursiveWithoutTopelement(),t.PositionAndShape.computeNonOverlappingPositionWithMargin(e.PositionAndShape,ColDirEnum.Up,new PointF2D(0,s.PositionAndShape.RelativePosition.y));const r=t.PositionAndShape.RelativePosition;r.y-=1,t.PositionAndShape.RelativePosition=r,e.PositionAndShape.calculateBoundingBox()}calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote(e){let t,s;e.graphicalVoiceEntries[0].notes[0].sourceNote.isRest()?(t=e.graphicalVoiceEntries[0].notes[0],s=e.graphicalVoiceEntries[1].notes):(s=e.graphicalVoiceEntries[0].notes,t=e.graphicalVoiceEntries[1].notes[0]);let r=!1;e.PositionAndShape.calculateAbsolutePositionsRecursiveWithoutTopelement();for(let o=0,a=s.length;o<a;++o){const l=s[o];if(t.PositionAndShape.marginCollisionDetection(l.PositionAndShape)){r=!0;break}}if(r)if(t.sourceNote.ParentVoiceEntry.ParentVoice instanceof LinkedVoice){const o=s[0].PositionAndShape.BorderMarginBottom+s[0].PositionAndShape.RelativePosition.y;t.PositionAndShape.RelativePosition=new PointF2D(0,o-t.PositionAndShape.BorderMarginTop+.5)}else{const o=s[s.length-1],a=o.PositionAndShape.BorderMarginTop+o.PositionAndShape.RelativePosition.y;if(s[0].sourceNote.ParentVoiceEntry.ParentVoice instanceof LinkedVoice)t.PositionAndShape.RelativePosition=new PointF2D(0,a-t.PositionAndShape.BorderMarginBottom-.5);else{const l=s[0].PositionAndShape.BorderMarginBottom+s[0].PositionAndShape.RelativePosition.y;l<2?t.PositionAndShape.RelativePosition=new PointF2D(0,l-t.PositionAndShape.BorderMarginTop+.5):t.PositionAndShape.RelativePosition=new PointF2D(0,a-t.PositionAndShape.BorderMarginBottom-0)}}e.PositionAndShape.calculateBoundingBox()}calculateTieCurves(){for(const e of this.musicSystems)for(const t of e.StaffLines)for(const s of t.Measures)for(const r of s.staffEntries)for(const o of r.GraphicalTies)if(o.StartNote!==void 0&&o.StartNote.parentVoiceEntry.parentStaffEntry===r){const a=o.StartNote.parentVoiceEntry.parentStaffEntry.parentMeasure.ParentStaffLine!==o.EndNote.parentVoiceEntry.parentStaffEntry.parentMeasure.ParentStaffLine;this.layoutGraphicalTie(o,a,s.ParentStaff.isTab)}}calculateLyricsPosition(){const e=new Dictionary;for(let t=0,s=this.graphicalMusicSheet.ParentMusicSheet.Instruments.length;t<s;++t){const r=this.graphicalMusicSheet.ParentMusicSheet.Instruments[t];r.HasLyrics&&r.LyricVersesNumbers.length>0&&r.LyricVersesNumbers.sort()}for(let t=0,s=this.musicSystems.length;t<s;++t){const r=this.musicSystems[t];for(let o=0,a=r.StaffLines.length;o<a;++o){const l=r.StaffLines[o],c=this.calculateSingleStaffLineLyricsPosition(l,l.ParentStaff.ParentInstrument.LyricVersesNumbers);e.setValue(l,c),this.calculateLyricsExtendsAndDashes(e.getValue(l))}}for(let t=0,s=this.musicSystems.length;t<s;++t){const r=this.musicSystems[t];for(let o=0,a=r.StaffLines.length;o<a;++o){const l=r.StaffLines[o];this.calculateLyricsExtendsAndDashes(e.getValue(l))}}}calculateSingleLyricWord(e){const t=e.ParentLyricWord,s=t.GraphicalLyricsEntries.indexOf(e);let r;if(s>=0&&(r=t.GraphicalLyricsEntries[s+1]),!r)return;const o=e.StaffEntryParent.parentMeasure.ParentStaffLine,a=r.StaffEntryParent.parentMeasure.ParentStaffLine,l=e.StaffEntryParent,c=r.StaffEntryParent;if(e.StaffEntryParent.parentMeasure.ParentStaffLine===r.StaffEntryParent.parentMeasure.ParentStaffLine){const d=l.parentMeasure.PositionAndShape.RelativePosition.x+l.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,m=c.parentMeasure.PositionAndShape.RelativePosition.x+c.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.RelativePosition.x+r.GraphicalLabel.PositionAndShape.BorderMarginLeft,u=e.GraphicalLabel.PositionAndShape.RelativePosition.y;let g=1;m-d>this.rules.MinimumDistanceBetweenDashes*3&&(g=Math.floor((m-d)/this.rules.MinimumDistanceBetweenDashes)-1),g===1?this.calculateSingleDashForLyricWord(o,d,m,u):this.calculateDashes(o,d,m,u)}else{const d=l.parentMeasure.PositionAndShape.RelativePosition.x+l.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,m=o.Measures[o.Measures.length-1],u=m.PositionAndShape.RelativePosition.x+m.PositionAndShape.Size.width;let g=e.GraphicalLabel.PositionAndShape.RelativePosition.y;if(this.calculateDashes(o,d,u,g),a&&a.Measures[0]&&c.parentMeasure.ParentStaffLine&&!(c===c.parentMeasure.staffEntries[0]&&c.parentMeasure===c.parentMeasure.ParentStaffLine.Measures[0])){const b=a.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,y=c.parentMeasure.PositionAndShape.RelativePosition.x+c.PositionAndShape.RelativePosition.x+r.GraphicalLabel.PositionAndShape.BorderMarginLeft;g=r.GraphicalLabel.PositionAndShape.RelativePosition.y,this.calculateDashes(a,b,y,g)}}}calculateDashes(e,t,s,r){let o=s-t;if(o<this.rules.MinimumDistanceBetweenDashes*3)this.calculateSingleDashForLyricWord(e,t,s,r);else{const a=Math.floor(o/this.rules.MinimumDistanceBetweenDashes)-1,l=o/(a+1);let c=0;for(t+=l,s-=l;c<=Math.floor(a/2)&&s>t;)o=this.calculateRightAndLeftDashesForLyricWord(e,t,s,r),t+=l,s-=l,c++;o>l*2&&this.calculateSingleDashForLyricWord(e,t,s,r)}}calculateSingleDashForLyricWord(e,t,s,r){const o=new Label("-"),a=new GraphicalLabel(o,this.rules.LyricsHeight,TextAlignmentEnum.CenterBottom,this.rules);a.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(a),this.staffLinesWithLyricWords.indexOf(e)===-1&&this.staffLinesWithLyricWords.push(e),a.PositionAndShape.Parent=e.PositionAndShape;const l=new PointF2D(t+(s-t)/2,r);a.PositionAndShape.RelativePosition=l}calculateLyricExtend(e){let t=e.GraphicalLabel.PositionAndShape.RelativePosition.y;const s=e.StaffEntryParent,r=s.parentMeasure.ParentStaffLine;let o,a;const l=s.parentMeasure.ParentStaff.idInMusicSheet;for(let c=s.parentVerticalContainer.Index+1;c<this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length;++c){const d=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[c].StaffEntries[l];if(d){if(d.hasOnlyRests()||d.LyricsEntries.length>0)break;o=d,a=o.parentMeasure.ParentStaffLine,a||(a=s.parentMeasure.ParentStaffLine)}}if(!(!o||!a))if(r===a&&o.parentMeasure.ParentStaffLine){const c=s.parentMeasure.PositionAndShape.RelativePosition.x+s.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,d=o.parentMeasure.PositionAndShape.RelativePosition.x+o.PositionAndShape.RelativePosition.x+o.PositionAndShape.BorderMarginRight;t-=e.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(r,c,d,t)}else{const c=r.Measures[r.Measures.length-1].PositionAndShape,d=s.parentMeasure.PositionAndShape.RelativePosition.x+s.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,m=c.RelativePosition.x+c.Size.width;if(t-=e.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(r,d,m,t),!o)return;if(o.parentMeasure.ParentStaffLine&&o.parentMeasure.staffEntries&&!(o===o.parentMeasure.staffEntries[0]&&o.parentMeasure===o.parentMeasure.ParentStaffLine.Measures[0])){const u=a.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,g=o.parentMeasure.PositionAndShape.RelativePosition.x+o.PositionAndShape.RelativePosition.x+o.PositionAndShape.BorderMarginRight;this.calculateSingleLyricWordWithUnderscore(a,u,g,t)}}}calculateSingleLyricWordWithUnderscore(e,t,s,r){const o=new PointF2D(t,r),a=new PointF2D(s,r),l=new GraphicalLine(o,a,this.rules.LyricUnderscoreLineWidth);e.LyricLines.push(l),this.staffLinesWithLyricWords.indexOf(e)===-1&&this.staffLinesWithLyricWords.push(e)}calculateRightAndLeftDashesForLyricWord(e,t,s,r){const o=new Label("-"),a=new GraphicalLabel(o,this.rules.LyricsHeight,TextAlignmentEnum.CenterBottom,this.rules);a.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(a),this.staffLinesWithLyricWords.indexOf(e)===-1&&this.staffLinesWithLyricWords.push(e),a.PositionAndShape.Parent=e.PositionAndShape;const l=new PointF2D(t,r);a.PositionAndShape.RelativePosition=l;const c=new Label("-"),d=new GraphicalLabel(c,this.rules.LyricsHeight,TextAlignmentEnum.CenterBottom,this.rules);d.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(d),d.PositionAndShape.Parent=e.PositionAndShape;const m=new PointF2D(s,r);return d.PositionAndShape.RelativePosition=m,d.PositionAndShape.RelativePosition.x-a.PositionAndShape.RelativePosition.x}calculateDynamicExpressions(){const e=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,this.rules.MaxMeasureToDrawIndex),t=Math.min(this.rules.MinMeasureToDrawIndex,this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length);for(let s=t;s<=e;s++){const r=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[s];this.dynamicExpressionMap.clear();for(let o=0;o<r.StaffLinkedExpressions.length;o++)if(!(!this.graphicalMusicSheet.MeasureList[s]||!this.graphicalMusicSheet.MeasureList[s][o])&&this.graphicalMusicSheet.MeasureList[s][o].ParentStaff.ParentInstrument.Visible)for(let a=0;a<r.StaffLinkedExpressions[o].length;a++)(r.StaffLinkedExpressions[o][a].InstantaneousDynamic!==void 0||r.StaffLinkedExpressions[o][a].StartingContinuousDynamic!==void 0&&r.StaffLinkedExpressions[o][a].StartingContinuousDynamic.StartMultiExpression===r.StaffLinkedExpressions[o][a]&&r.StaffLinkedExpressions[o][a].UnknownList.length===0)&&this.calculateDynamicExpressionsForMultiExpression(r.StaffLinkedExpressions[o][a],s,o)}this.dynamicExpressionMap.clear()}calculateOctaveShifts(){for(let e=0;e<this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length;e++){const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[e];for(let s=0;s<t.StaffLinkedExpressions.length;s++)if(!(!this.graphicalMusicSheet.MeasureList[e]||!this.graphicalMusicSheet.MeasureList[e][s])&&this.graphicalMusicSheet.MeasureList[e][s].ParentStaff.ParentInstrument.Visible)for(let r=0;r<t.StaffLinkedExpressions[s].length;r++)t.StaffLinkedExpressions[s][r].OctaveShiftStart&&this.calculateSingleOctaveShift(t,t.StaffLinkedExpressions[s][r],e,s)}}calculatePedals(){for(let e=0;e<this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length;e++){const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[e];for(let s=0;s<t.StaffLinkedExpressions.length;s++)if(!(!this.graphicalMusicSheet.MeasureList[e]||!this.graphicalMusicSheet.MeasureList[e][s])&&this.graphicalMusicSheet.MeasureList[e][s].ParentStaff.ParentInstrument.Visible)for(let r=0;r<t.StaffLinkedExpressions[s].length;r++)t.StaffLinkedExpressions[s][r].PedalStart&&this.calculateSinglePedal(t,t.StaffLinkedExpressions[s][r],e,s)}}calculateWavyLines(){for(let e=0;e<this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length;e++){const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[e];for(let s=0;s<t.StaffLinkedExpressions.length;s++)if(!(!this.graphicalMusicSheet.MeasureList[e]||!this.graphicalMusicSheet.MeasureList[e][s])&&this.graphicalMusicSheet.MeasureList[e][s].ParentStaff.ParentInstrument.Visible)for(let r=0;r<t.StaffLinkedExpressions[s].length;r++)t.StaffLinkedExpressions[s][r].WavyLineStart&&this.calculateSingleWavyLine(t,t.StaffLinkedExpressions[s][r],e,s)}}getFirstLeftNotNullStaffEntryFromContainer(e,t,s){var r,o;if((r=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e])!=null&&r.StaffEntries[t])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e].StaffEntries[t];for(let a=e-1;a>=0;a--)if((o=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[a])!=null&&o.StaffEntries[t])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[a].StaffEntries[t]}getFirstRightNotNullStaffEntryFromContainer(e,t,s){var r,o;if((r=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e])!=null&&r.StaffEntries[t])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e].StaffEntries[t];for(let a=e+1;a<this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length;a++)if((o=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[a])!=null&&o.StaffEntries[t])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[a].StaffEntries[t]}calculateWordRepetitionInstructions(){for(let e=0;e<this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length;e++){const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[e];for(let s=0,r=t.FirstRepetitionInstructions.length;s<r;++s){const o=t.FirstRepetitionInstructions[s];this.calculateWordRepetitionInstruction(o,e)}for(let s=0,r=t.LastRepetitionInstructions.length;s<r;++s){const o=t.LastRepetitionInstructions[s];this.calculateWordRepetitionInstruction(o,e)}}}calculateRepetitionEndings(){const e=this.graphicalMusicSheet.ParentMusicSheet;for(let t=0,s=e.Repetitions.length;t<s;++t){const r=e.Repetitions[t];this.calcGraphicalRepetitionEndingsRecursively(r)}}calculateTempoExpressions(){const e=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,this.rules.MaxMeasureToDrawIndex),t=this.rules.MinMeasureToDrawIndex;for(let s=t;s<=e;s++){const r=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[s];for(let o=0;o<r.TempoExpressions.length;o++)this.calculateTempoExpressionsForMultiTempoExpression(r,r.TempoExpressions[o],s,o)}}calculateRehearsalMarks(){if(this.rules.RenderRehearsalMarks)for(const e of this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures)this.calculateRehearsalMark(e)}calculateRehearsalMark(e){throw new Error(this.abstractNotImplementedErrorMessage)}calculateMoodAndUnknownExpressions(){for(let e=0;e<this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length;e++){const t=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[e];for(let s=0;s<t.StaffLinkedExpressions.length;s++)if(!(!this.graphicalMusicSheet.MeasureList[e]||!this.graphicalMusicSheet.MeasureList[e][s])&&this.graphicalMusicSheet.MeasureList[e][s].ParentStaff.ParentInstrument.Visible)for(let r=0;r<t.StaffLinkedExpressions[s].length;r++)(t.StaffLinkedExpressions[s][r].MoodList.length>0||t.StaffLinkedExpressions[s][r].UnknownList.length>0)&&this.calculateMoodAndUnknownExpression(t.StaffLinkedExpressions[s][r],e,s)}}calculateStemDirectionFromVoices(e){if(e.ParentSourceStaffEntry.Link!==void 0)if(e===e.ParentSourceStaffEntry.VoiceEntries[0]){e.WantedStemDirection=StemDirectionType.Up;return}else{e.WantedStemDirection=StemDirectionType.Down;return}else e.ParentVoice instanceof LinkedVoice?e.WantedStemDirection=StemDirectionType.Down:e.ParentSourceStaffEntry.VoiceEntries.length>1&&(e.WantedStemDirection=StemDirectionType.Up)}setBeamNotesWantedStemDirections(e){if(!(e.Notes.length>0))return;const t=e.Notes[0].NoteBeam;if(t){for(const s of t.Notes)if(s.ParentVoiceEntry.WantedStemDirection!==StemDirectionType.Undefined&&s.ParentVoiceEntry.ParentSourceStaffEntry.ParentStaff.Id===e.ParentSourceStaffEntry.ParentStaff.Id){e.WantedStemDirection=s.ParentVoiceEntry.WantedStemDirection;break}}}}class ChordSymbolContainer{constructor(e,t,s,r,o){this.rootPitch=e,this.chordKind=t,this.bassPitch=s,this.degrees=r,this.rules=o}get RootPitch(){return this.rootPitch}get ChordKind(){return this.chordKind}get BassPitch(){return this.bassPitch}get ChordDegrees(){return this.degrees}static calculateChordText(e,t,s){let r=e.RootPitch;if(MusicSheetCalculator.transposeCalculator&&(r=MusicSheetCalculator.transposeCalculator.transposePitch(e.RootPitch,s,t)),e.ChordKind===31)return e.getTextFromChordKindEnum(e.ChordKind);let o=Pitch.getNoteEnumString(r.FundamentalNote);r.Accidental!==AccidentalEnum.NONE&&(o+=this.getTextForAccidental(r.Accidental));const a={adds:[],alts:[],subs:[]};for(const m of e.ChordDegrees)if(m){let u="";switch(m.alteration!==AccidentalEnum.NONE&&(u+=this.getTextForAccidental(m.alteration)),u+=m.value,m.text){case 0:a.adds.push(u);break;case 1:a.alts.push(u);break;case 2:a.subs.push(u);break}}let l=e.getTextFromChordKindEnum(e.ChordKind);const c=["adds","alts","subs"],d=e.rules.CustomChords;for(const m of d){if(m.chordKind!==e.chordKind)continue;let u=!0;for(const g of c){for(const b of m.degrees[g]||[])if(a[g].indexOf(b)<0){u=!1;break}if(!u)break}if(u){for(const g of c)for(const b of m.degrees[g]||[])a[g].splice(a[g].indexOf(b),1);l=m.alternateName}}if(o+=l,a.adds.length>0&&(o+="("+a.adds.join(",")+")"),a.alts.length>0&&(o+="(alt "+a.alts.join(",")+")"),a.subs.length>0&&(o+="(omit "+a.subs.join(",")+")"),e.BassPitch){let m=e.BassPitch;MusicSheetCalculator.transposeCalculator&&(m=MusicSheetCalculator.transposeCalculator.transposePitch(e.BassPitch,s,t)),o+="/",o+=Pitch.getNoteEnumString(m.FundamentalNote),o+=this.getTextForAccidental(m.Accidental)}return o}static getTextForAccidental(e){let t="";switch(e){case AccidentalEnum.DOUBLEFLAT:t+="bb";break;case AccidentalEnum.FLAT:t+="b";break;case AccidentalEnum.SHARP:t+="#";break;case AccidentalEnum.DOUBLESHARP:t+="x";break}return t}getTextFromChordKindEnum(e){var t;return(t=this.rules.ChordSymbolLabelTexts.getValue(e))!=null?t:""}}class Degree{constructor(e,t,s){this.value=e,this.alteration=t,this.text=s}}class CustomChord{constructor(e,t,s){this.alternateName=e,this.chordKind=t,this.degrees=s}static createCustomChord(e,t,s){return new CustomChord(e,t,s)}static renameCustomChord(e,t,s){for(const r of s)r.alternateName===e&&(r.alternateName=t)}}var ChordDegreeText=(i=>(i[i.add=0]="add",i[i.alter=1]="alter",i[i.subtract=2]="subtract",i))(ChordDegreeText||{}),ChordSymbolEnum=(i=>(i[i.major=0]="major",i[i.minor=1]="minor",i[i.augmented=2]="augmented",i[i.diminished=3]="diminished",i[i.dominant=4]="dominant",i[i.majorseventh=5]="majorseventh",i[i.minorseventh=6]="minorseventh",i[i.diminishedseventh=7]="diminishedseventh",i[i.augmentedseventh=8]="augmentedseventh",i[i.halfdiminished=9]="halfdiminished",i[i.majorminor=10]="majorminor",i[i.majorsixth=11]="majorsixth",i[i.minorsixth=12]="minorsixth",i[i.dominantninth=13]="dominantninth",i[i.majorninth=14]="majorninth",i[i.minorninth=15]="minorninth",i[i.dominant11th=16]="dominant11th",i[i.major11th=17]="major11th",i[i.minor11th=18]="minor11th",i[i.dominant13th=19]="dominant13th",i[i.major13th=20]="major13th",i[i.minor13th=21]="minor13th",i[i.suspendedsecond=22]="suspendedsecond",i[i.suspendedfourth=23]="suspendedfourth",i[i.Neapolitan=24]="Neapolitan",i[i.Italian=25]="Italian",i[i.French=26]="French",i[i.German=27]="German",i[i.pedal=28]="pedal",i[i.power=29]="power",i[i.Tristan=30]="Tristan",i[i.none=31]="none",i))(ChordSymbolEnum||{});class GraphicalNote extends GraphicalObject{constructor(e,t,s,r=void 0){super(),this.DrawnAccidental=AccidentalEnum.NONE,this.lineShift=0,this.sourceNote=e,this.parentVoiceEntry=t,this.PositionAndShape=new BoundingBox$1(this,t.PositionAndShape),r?this.graphicalNoteLength=r:this.graphicalNoteLength=e.Length,this.numberOfDots=this.calculateNumberOfNeededDots(this.graphicalNoteLength),this.rules=s,this.rules.addGraphicalNoteToNoteMap(e,this)}Transpose(e,t,s,r){let o=this.sourceNote.Pitch;return MusicSheetCalculator.transposeCalculator&&(o=MusicSheetCalculator.transposeCalculator.transposePitch(this.sourceNote.Pitch,e,s)),o}calculateNumberOfNeededDots(e){return!this.sourceNote||!this.sourceNote.NoteTuplet?e.calculateNumberOfNeededDots():0}get ParentMusicPage(){return this.parentVoiceEntry.parentStaffEntry.parentMeasure.ParentMusicSystem.Parent}static FromNote(e,t){return t.NoteToGraphicalNoteMap.getValue(e.NoteToGraphicalNoteObjectId)}}const _EngravingRules=class{constructor(){this.DYSlursStartingAtSameStaffEntryYOffset=0,this.DYMinNoteWidth=0,this.DYWorkId=0,this.DYWorkSpecial=!1,this.DYContainerId="osmdCanvasPage",this.DYSVGContainerId="osmdSvgPage",this.DYMusicScoreType="staff",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.PlayAlreadyStartedNotesFromCursorPosition=!1,this.PlaybackSkipNotesSafetyInterval=.02,this.UseDefaultVoiceInteractionListener=!0,this.loadDefaultValues()}loadDefaultValues(){this.SamplingUnit=_EngravingRules.unit*3,this.MpatMode=!0,this.SheetTitleHeight=4,this.SheetSubtitleHeight=2,this.SheetMinimumDistanceBetweenTitleAndSubtitle=1,this.SheetComposerHeight=2,this.SheetAuthorHeight=2,this.CompactMode=!1,this.PagePlacementEnum=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=_EngravingRules.unit,this.SystemLeftMargin=0,this.SystemRightMargin=0,this.SystemLabelsRightMargin=2,this.SystemComposerDistance=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=_EngravingRules.unit/2,this.BeamSpaceWidth=_EngravingRules.unit/3,this.BeamForwardLength=1.25*_EngravingRules.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.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.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.DistanceBetweenAdjacentDynamics=.75,this.TempoChangeMeasureValidity=4,this.TempoContinousFactor=.7,this.StaccatoScalingFactor=.8,this.BetweenDotsDistance=.8,this.OrnamentAccidentalScalingFactor=.65,this.ChordSymbolTextHeight=2,this.ChordSymbolTextAlignment=TextAlignmentEnum.LeftBottom,this.ChordSymbolRelativeXOffset=-1,this.ChordSymbolXSpacing=1,this.ChordOverlapAllowedIntoNextMeasure=0,this.ChordSymbolYOffset=.1,this.ChordSymbolYPadding=0,this.ChordSymbolYAlignment=!0,this.ChordSymbolYAlignmentScope="staffline",this.ChordSymbolLabelTexts=new Dictionary,this.resetChordSymbolLabelTexts(this.ChordSymbolLabelTexts),this.CustomChords=[],this.resetChordNames(),this.RepetitionSymbolsYOffset=0,this.RehearsalMarkXOffsetDefault=10,this.RehearsalMarkXOffset=0,this.RehearsalMarkXOffsetSystemStartMeasure=-20,this.RehearsalMarkYOffsetDefault=-15,this.RehearsalMarkYOffset=0,this.RehearsalMarkFontSize=10,this.MeasureNumberLabelHeight=1.5*_EngravingRules.unit,this.MeasureNumberLabelOffset=2,this.MeasureNumberLabelXOffset=-.5,this.TupletsRatioed=!1,this.TupletsBracketed=!1,this.TripletsBracketed=!1,this.TupletNumberLabelHeight=1.5*_EngravingRules.unit,this.TupletNumberYOffset=.5,this.LabelMarginBorderFactor=.1,this.TupletVerticalLineLength=.5,this.TupletNumbersInTabs=!1,this.SlurPlacementFromXML=!0,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.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.RepetitionEndingLabelHeight=2,this.RepetitionEndingLabelXOffset=.5,this.RepetitionEndingLabelYOffset=.3,this.RepetitionEndingLineYLowerOffset=.5,this.RepetitionEndingLineYUpperOffset=.3,this.VoltaOffset=2.5,this.LyricsAlignmentStandard=TextAlignmentEnum.LeftBottom,this.LyricsHeight=2,this.LyricsYOffsetToStaffHeight=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.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.VexFlowDefaultNotationFontScale=39,this.VexFlowDefaultTabFontScale=39,this.TremoloStrokeScale=1,this.TremoloYSpacingScale=1,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=_EngravingRules.unit/2,this.SystemRepetitionEndingLineWidth=.12,this.SystemDotWidth=_EngravingRules.unit/2,this.DistanceBetweenVerticalSystemLines=.35,this.DistanceBetweenDotAndLine=.7,this.RepeatEndStartPadding=2,this.OctaveShiftLineWidth=.12,this.OctaveShiftVerticalLineLength=_EngravingRules.unit,this.GraceLineWidth=this.StaffLineWidth*this.GraceNoteScalingFactor,this.MultipleRestMeasureDefaultWidth=4,this.MinimumCrossedBeamDifferenceMargin=1e-4,this.SheetMaximumWidth=32767,this.VoiceSpacingMultiplierVexflow=.85,this.VoiceSpacingAddendVexflow=3,this.PickupMeasureWidthMultiplier=1,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=-.5,this.SoftmaxFactorVexFlow=15,this.StaggerSameWholeNotes=!0,this.AlignRests=AlignRestOption.Never,this.RestCollisionYPadding=0,this.FillEmptyMeasuresWithWholeRest=FillEmptyMeasuresWithWholeRests.No,this.ArpeggiosGoAcrossVoices=!1,this.RenderArpeggios=!0,this.RenderSlurs=!0,this.ColoringMode=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=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.RenderPartNames=!0,this.RenderPartAbbreviations=!0,this.RenderFingerings=!0,this.RenderMeasureNumbers=!0,this.RenderMeasureNumbersOnlyAtSystemStart=!1,this.UseXMLMeasureNumbers=!0,this.RenderLyrics=!0,this.RenderChordSymbols=!0,this.RenderMultipleRestMeasures=!0,this.AutoGenerateMutipleRestMeasuresFromRestMeasures=!0,this.RenderRehearsalMarks=!0,this.RenderClefsAtBeginningOfStaffline=!0,this.RenderKeySignatures=!0,this.RenderTimeSignatures=!0,this.ArticulationPlacementFromXML=!0,this.FingeringPosition=PlacementEnum.AboveOrBelow,this.FingeringPositionFromXML=!0,this.FingeringPositionGrace=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.RestoreCursorAfterRerender=!0,this.StretchLastSystemLine=!1,_EngravingRules.FixStafflineBoundingBox=!1,this.PageFormat=PageFormat.UndefinedPageFormat,this.PageBackgroundColor=void 0,this.PerformanceMode=!1,this.RenderSingleHorizontalStaffline=!1,this.SpacingBetweenTextLines=0,this.NoteToGraphicalNoteMap=new Dictionary,this.NoteToGraphicalNoteMapObjectCount=0;try{this.MaxInstructionsConstValue=this.ClefLeftMargin+this.ClefRightMargin+this.KeyRightMargin+this.RhythmRightMargin+11}catch(i){loglevelExports.info("EngravingRules()",i)}this.MpatMode&&(this.NewPartAndSystemAfterFinalBarline=!0)}applyDefaultColorMusic(i){this.DefaultColorMusic=i,this.DefaultColorNotehead=this.DefaultColorMusic,this.DefaultColorRest=this.DefaultColorNotehead,this.DefaultColorStem=this.DefaultColorNotehead,this.DefaultColorLabel=this.DefaultColorNotehead,this.DefaultColorTitle=this.DefaultColorNotehead,this.LedgerLineColorDefault=this.DefaultColorNotehead}addGraphicalNoteToNoteMap(i,e){i.NoteToGraphicalNoteObjectId=this.NoteToGraphicalNoteMapObjectCount,this.NoteToGraphicalNoteMap.setValue(i.NoteToGraphicalNoteObjectId,e),this.NoteToGraphicalNoteMapObjectCount++}GNote(i){return GraphicalNote.FromNote(i,this)}clearMusicSheetObjects(){this.NoteToGraphicalNoteMap=new Dictionary,this.NoteToGraphicalNoteMapObjectCount=0}setChordSymbolLabelText(i,e){this.ChordSymbolLabelTexts.setValue(i,e)}resetChordSymbolLabelTexts(i){return i.setValue(ChordSymbolEnum.minor,"m"),i.setValue(ChordSymbolEnum.augmented,"aug"),i.setValue(ChordSymbolEnum.diminished,"dim"),i.setValue(ChordSymbolEnum.dominant,"7"),i.setValue(ChordSymbolEnum.majorseventh,"maj7"),i.setValue(ChordSymbolEnum.minorseventh,"m7"),i.setValue(ChordSymbolEnum.diminishedseventh,"dim7"),i.setValue(ChordSymbolEnum.augmentedseventh,"aug7"),i.setValue(ChordSymbolEnum.halfdiminished,"m7b5"),i.setValue(ChordSymbolEnum.majorminor,"m(maj7)"),i.setValue(ChordSymbolEnum.majorsixth,"maj6"),i.setValue(ChordSymbolEnum.minorsixth,"m6"),i.setValue(ChordSymbolEnum.dominantninth,"9"),i.setValue(ChordSymbolEnum.majorninth,"maj9"),i.setValue(ChordSymbolEnum.minorninth,"m9"),i.setValue(ChordSymbolEnum.dominant11th,"11"),i.setValue(ChordSymbolEnum.major11th,"maj11"),i.setValue(ChordSymbolEnum.minor11th,"m11"),i.setValue(ChordSymbolEnum.dominant13th,"13"),i.setValue(ChordSymbolEnum.major13th,"maj13"),i.setValue(ChordSymbolEnum.minor13th,"m13"),i.setValue(ChordSymbolEnum.suspendedsecond,"sus2"),i.setValue(ChordSymbolEnum.suspendedfourth,"sus4"),i.setValue(ChordSymbolEnum.power,"5"),i.setValue(ChordSymbolEnum.none,"N.C."),i}addChordName(i,e,t,s,r){if(ChordSymbolEnum[e]!==void 0){const o={adds:t,alts:s,subs:r};this.CustomChords.push(CustomChord.createCustomChord(i,ChordSymbolEnum[e],o))}}renameChord(i,e){CustomChord.renameCustomChord(i,e,this.CustomChords)}resetChordNames(){this.addChordName("alt","major",["#5","b9","#9"],["b5"],[]),this.addChordName("7alt","dominant",["#5","b9","#9"],["b5"],[]),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("m7b5","minorseventh",[],["b5"],[]),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 i=0;i<this.BezierCurveStepSize;i++){const e=i/this.BezierCurveStepSize;this.TPower3[i]=Math.pow(e,3),this.OneMinusTPower3[i]=Math.pow(1-e,3),this.FactorOne[i]=3*Math.pow(1-e,2)*e,this.FactorTwo[i]=3*(1-e)*Math.pow(e,2)}}};let EngravingRules=_EngravingRules;EngravingRules.unit=1;class PageFormat{constructor(e,t,s="noIdStringGiven"){this.width=e,this.height=t,this.idString=s}get aspectRatio(){return this.IsUndefined?0:this.width/this.height}get IsUndefined(){return this.width===void 0||this.height===void 0||this.height===0||this.width===0}static get UndefinedPageFormat(){return new PageFormat(0,0)}Equals(e){return e?e.width===this.width&&e.height===this.height:!1}}var ColoringModes=(i=>(i[i.XML=0]="XML",i[i.AutoColoring=1]="AutoColoring",i[i.CustomColorSet=2]="CustomColorSet",i))(ColoringModes||{}),DrawingParametersEnum=(i=>(i.allon="allon",i.compact="compact",i.compacttight="compacttight",i.default="default",i.leadsheet="leadsheet",i.preview="preview",i.thumbnail="thumbnail",i))(DrawingParametersEnum||{});class DrawingParameters{constructor(e="default"){this.rules=new EngravingRules,this.drawCursors=!0,this.drawTitle=!0,this.drawSubtitle=!0,this.drawLyricist=!0,this.drawComposer=!0,this.drawCredits=!0,this.drawPartNames=!0,this.fingeringPosition=PlacementEnum.Left,this.drawHiddenNotes=!1,this.DrawingParametersEnum=e}set DrawingParametersEnum(e){switch(this.drawingParametersEnum=e,e){case"allon":this.setForAllOn();break;case"thumbnail":this.setForThumbnail();break;case"leadsheet":this.setForLeadsheet();break;case"compact":this.setForCompactMode();break;case"compacttight":this.setForCompactTightMode();break;case"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(e){this.drawCredits=e,this.DrawComposer=e,this.DrawTitle=e,this.DrawSubtitle=e,this.DrawLyricist=e}get DrawTitle(){return this.drawTitle}set DrawTitle(e){this.drawTitle=e,this.rules.RenderTitle=e,e||(this.DrawSubtitle=!1)}get DrawSubtitle(){return this.drawSubtitle}set DrawSubtitle(e){this.drawSubtitle=e,this.rules.RenderSubtitle=e,e&&(this.DrawTitle=!0)}get DrawComposer(){return this.drawComposer}set DrawComposer(e){this.drawComposer=e,this.rules.RenderComposer=e}get DrawLyricist(){return this.drawLyricist}set DrawLyricist(e){this.drawLyricist=e,this.rules.RenderLyricist=e}get DrawPartNames(){return this.drawPartNames}set DrawPartNames(e){this.drawPartNames=e,this.rules.RenderPartNames=e,this.rules.RenderPartNames||(this.rules.RenderPartAbbreviations=!1)}get FingeringPosition(){return this.fingeringPosition}set FingeringPosition(e){this.fingeringPosition=e,this.rules.FingeringPosition=e}get Rules(){return this.rules}set Rules(e){this.rules=e}}var AlignRestOption=(i=>(i[i.Never=0]="Never",i[i.Always=1]="Always",i[i.Auto=2]="Auto",i))(AlignRestOption||{}),FillEmptyMeasuresWithWholeRests=(i=>(i[i.No=0]="No",i[i.YesVisible=1]="YesVisible",i[i.YesInvisible=2]="YesInvisible",i))(FillEmptyMeasuresWithWholeRests||{}),BackendType=(i=>(i[i.SVG=0]="SVG",i[i.Canvas=1]="Canvas",i))(BackendType||{});class OSMDOptions{static OSMDOptionsStandard(){return{autoResize:!0,backend:"svg",drawingParameters:DrawingParametersEnum.default}}static BackendTypeFromString(e){return e&&e.toLowerCase()==="canvas"?1:0}}class IXmlElement{constructor(e){if(this.hasAttributes=!1,!e)throw new Error("IXmlElement: expected Element, got undefined");this.elem=e,this.name=e.nodeName.toLowerCase(),e.hasAttributes()&&(this.hasAttributes=!0,this.firstAttribute=e.attributes[0]),this.hasElements=e.hasChildNodes(),e.childNodes.length===1&&e.childNodes[0].nodeType===Node.TEXT_NODE?this.value=e.childNodes[0].nodeValue:this.value=""}attribute(e){return this.elem.attributes.getNamedItem(e)}attributes(){if(!this.attrs){const e=this.elem.attributes,t=[];for(let s=0;s<e.length;s+=1)t.push(e[s]);this.attrs=t}return this.attrs}element(e){const t=this.elem.childNodes;for(let s=0,r=t.length;s<r;s+=1){const o=t[s];if(o.nodeType===Node.ELEMENT_NODE&&o.nodeName.toLowerCase()===e)return new IXmlElement(o)}}elements(e){const t=this.elem.childNodes,s=[],r=!e;r||(e=e.toLowerCase());for(let o=0;o<t.length;o+=1){const a=t[o];a.nodeType===Node.ELEMENT_NODE&&(r||a.nodeName.toLowerCase()===e)&&s.push(new IXmlElement(a))}return s}}class InstrumentalGroup{constructor(e,t,s){this.instrumentalGroups=[],this.name=e,this.musicSheet=t,this.parent=s}get InstrumentalGroups(){return this.instrumentalGroups}get Parent(){return this.parent}get Name(){return this.name}set Name(e){this.name=e}get GetMusicSheet(){return this.musicSheet}}class Instrument extends InstrumentalGroup{constructor(e,t,s,r){super(void 0,s,r),this.Transpose=0,this.voices=[],this.staves=[],this.hasLyrics=!1,this.hasChordSymbols=!1,this.playbackTranspose=0,this.lyricVersesNumbers=[],this.subInstruments=[],this.id=e,this.idString=t,this.nameLabel=new Label(t)}get Voices(){return this.voices}get Staves(){return this.staves}get NameLabel(){return this.nameLabel}get HasLyrics(){return this.hasLyrics}set HasLyrics(e){this.hasLyrics=e}get HasChordSymbols(){return this.hasChordSymbols}set HasChordSymbols(e){this.hasChordSymbols=e}get LyricVersesNumbers(){return this.lyricVersesNumbers}set LyricVersesNumbers(e){this.lyricVersesNumbers=e}get Name(){return this.nameLabel.text}set Name(e){this.nameLabel.text=e}get IdString(){return this.idString}get Id(){return this.id}get MidiInstrumentId(){return this.subInstruments[0].midiInstrumentID}set MidiInstrumentId(e){this.subInstruments[0].midiInstrumentID=e}get Volume(){return this.subInstruments[0].volume}set Volume(e){for(let t=0,s=this.subInstruments.length;t<s;++t){const r=this.subInstruments[t];r.volume=e}}get PlaybackTranspose(){return this.playbackTranspose}set PlaybackTranspose(e){this.playbackTranspose=e}get SubInstruments(){return this.subInstruments}getSubInstrument(e){for(let t=0,s=this.subInstruments.length;t<s;++t){const r=this.subInstruments[t];if(r.idString===e)return r}}get PartAbbreviation(){return this.partAbbreviation}set PartAbbreviation(e){this.partAbbreviation=e}get Visible(){return this.voices.length>0?this.Voices[0].Visible:!1}set Visible(e){for(let t=0,s=this.Voices.length;t<s;++t){const r=this.Voices[t];r.Visible=e}}get Audible(){let e=!1;for(let t=0,s=this.Voices.length;t<s;++t){const r=this.Voices[t];e=e||r.Audible}return e}set Audible(e){for(let t=0,s=this.Voices.length;t<s;++t){const r=this.Voices[t];r.Audible=e}for(let t=0,s=this.staves.length;t<s;++t){const r=this.staves[t];r.audible=e}}get Solo(){let e=!1;for(let t=0,s=this.Voices.length;t<s;++t){const r=this.Voices[t];e=e||r.Solo}return e}set Solo(e){for(let t=0,s=this.Voices.length;t<s;++t){const r=this.Voices[t];r.Solo=e}for(let t=0,s=this.Staves.length;t<s;++t){const r=this.Staves[t];r.Solo=e}}get Following(){let e=!1;for(let t=0,s=this.Voices.length;t<s;++t){const r=this.Voices[t];e=e||r.Following}return e}set Following(e){for(let t=0,s=this.Voices.length;t<s;++t){const r=this.Voices[t];r.Following=e}for(let t=0,s=this.staves.length;t<s;++t){const r=this.staves[t];r.following=e}}SetVoiceAudible(e,t){for(let s=0,r=this.Voices.length;s<r;++s){const o=this.Voices[s];if(o.VoiceId===e){o.Audible=t;break}}}SetVoiceFollowing(e,t){for(let s=0,r=this.Voices.length;s<r;++s){const o=this.Voices[s];if(o.VoiceId===e){o.Following=t;break}}}SetStaffAudible(e,t){const s=this.staves[e-1];if(s.audible=t,t)for(let r=0,o=s.Voices.length;r<o;++r){const a=s.Voices[r];a.Audible=!0}else for(let r=0,o=s.Voices.length;r<o;++r){const a=s.Voices[r];let l=!1;for(let c=0,d=this.Staves.length;c<d;++c){const m=this.Staves[c];if(!(m.Id===e||!m.audible))for(let u=0,g=m.Voices.length;u<g;++u)m.Voices[u]===a&&(l=!0)}l||(a.Audible=!1)}}SetStaffFollow(e,t){const s=this.staves[e-1];if(s.following=t,t)for(let r=0,o=s.Voices.length;r<o;++r){const a=s.Voices[r];a.Following=!0}else for(let r=0,o=s.Voices.length;r<o;++r){const a=s.Voices[r];let l=!1;for(let c=0,d=this.Staves.length;c<d;++c){const m=this.Staves[c];if(!(m.Id===e||!m.following))for(let u=0,g=m.Voices.length;u<g;++u)m.Voices[u]===a&&(l=!0)}l||(a.Following=!1)}}areAllVoiceVisible(){for(const e of this.Voices)if(!e.Visible)return!1;return!0}createStaves(e){for(let t=0;t<e;t++)this.staves.push(new Staff(this,t+1))}toString(){return`${this.Name} , id: ${this.id}, idstring: ${this.idString}`}}class MusicSystem extends GraphicalObject{constructor(e){super(),this.needsToBeRedrawn=!0,this.staffLines=[],this.graphicalMeasures=[],this.labels=new _default,this.measureNumberLabels=[],this.objectsToRedraw=[],this.instrumentBrackets=[],this.groupBrackets=[],this.graphicalMarkedAreas=[],this.systemLines=[],this.breaksPage=!1,this.id=e,this.boundingBox=new BoundingBox$1(this),this.maxLabelLength=0}get Parent(){return this.parent}set Parent(e){if(this.parent){const t=this.parent.MusicSystems.indexOf(this,0);t>-1&&this.parent.MusicSystems.splice(t,1)}this.parent=e,this.boundingBox.Parent=e.PositionAndShape}get NextSystem(){const e=this.Parent.MusicSystems.indexOf(this);return e!==this.Parent.MusicSystems.length?this.Parent.MusicSystems[e+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(e,t,s){let r=-e/2;s&&(r=this.maxLabelLength+t-e/2);const o=this.staffLines[0].Measures[0];let a;this.staffLines.length>1&&(a=this.staffLines[this.staffLines.length-1].Measures[0]);const l=this.createSystemLine(r,e,SystemLinesEnum.SingleThin,SystemLinePosition.MeasureBegin,this,o,a);this.SystemLines.push(l),l.PositionAndShape.RelativePosition=new PointF2D(r,0),l.PositionAndShape.BorderLeft=0,l.PositionAndShape.BorderRight=e,l.PositionAndShape.BorderTop=0,l.PositionAndShape.BorderBottom=this.boundingBox.Size.height,this.createLinesForSystemLine(l)}createVerticalLineForMeasure(e,t,s,r,o,a){const l=a.ParentStaffLine,c=new PointF2D(l.PositionAndShape.RelativePosition.x,l.PositionAndShape.RelativePosition.y),d=l.ParentStaff.ParentInstrument.Staves;if(l.ParentStaff===d[0]){let m;d.length>1&&(m=this.getBottomStaffLine(l).Measures[o]);const u=this.createSystemLine(e,t,s,r,this,a,m),g=c.x+e;u.PositionAndShape.RelativePosition=new PointF2D(g,0),u.PositionAndShape.BorderLeft=0,u.PositionAndShape.BorderRight=t,this.SystemLines.push(u)}}setYPositionsToVerticalLineObjectsAndCreateLines(e){}calculateBorders(e){}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(e){for(let t=0,s=e.length;t<s;++t){const r=e[t];r.ParentMusicSystem=this}this.graphicalMeasures.push(e)}GetSystemsFirstTimeStamp(){return this.graphicalMeasures[0][0].parentSourceMeasure.AbsoluteTimestamp}GetSystemsLastTimeStamp(){const e=this.graphicalMeasures[this.graphicalMeasures.length-1][0].parentSourceMeasure;return Fraction$1.plus(e.AbsoluteTimestamp,e.Duration)}createInstrumentBrackets(e,t){for(let s=0,r=e.length;s<r;++s){const o=e[s];if(o.Staves.length>1){let a,l;for(let c=0,d=this.staffLines.length;c<d;++c){const m=this.staffLines[c];m.ParentStaff===o.Staves[0]&&(a=m),m.ParentStaff===o.Staves[o.Staves.length-1]&&(l=m)}a&&l&&this.createInstrumentBracket(a,l)}}}createGroupBrackets(e,t,s){for(let r=0,o=e.length;r<o;++r){const a=e[r];if(a.InstrumentalGroups.length<1)continue;const l=this.findFirstVisibleInstrumentInInstrumentalGroup(a),c=this.findLastVisibleInstrumentInInstrumentalGroup(a);if(!l||!c)continue;let d,m;for(let u=0,g=this.staffLines.length;u<g;++u){const b=this.staffLines[u];b.ParentStaff===l.Staves[0]&&(d=b),b.ParentStaff===c.Staves[0]&&(m=b)}d&&m&&this.createGroupBracket(d,m,s),!(a.InstrumentalGroups.length<1)&&this.createGroupBrackets(a.InstrumentalGroups,t,s+1)}}createMusicSystemLabel(e,t,s,r=!1){var l;const o=t;for(let c=0,d=this.staffLines.length;c<d;++c){const m=this.staffLines[c].ParentStaff.ParentInstrument;let u;if(r)u=m.NameLabel,(!this.rules.RenderPartNames||!(u!=null&&u.print))&&(u=new Label("",m.NameLabel.textAlignment,m.NameLabel.font),t=0);else{if(!this.rules.RenderPartAbbreviations||!this.rules.RenderPartNames||this.staffLines.length===1||!m.PartAbbreviation||m.PartAbbreviation==="")return;const g=m.PartAbbreviation;u=new Label(g,m.NameLabel.textAlignment,m.NameLabel.font)}if((l=m==null?void 0:m.NameLabel)!=null&&l.print){const g=new GraphicalLabel(u,e,TextAlignmentEnum.LeftCenter,this.rules,this.boundingBox);g.setLabelPositionAndShapeBorders(),this.labels.setValue(m,g)}else t=0}this.maxLabelLength=0;const a=this.labels.values();for(let c=0,d=a.length;c<d;++c){const m=a[c];m.Label.print&&m.PositionAndShape.Size.width>this.maxLabelLength&&(this.maxLabelLength=m.PositionAndShape.Size.width,t=o)}this.updateMusicSystemStaffLineXPosition(t)}setMusicSystemLabelsYPosition(){this.labels.forEach((e,t)=>{let s=0,r=0;for(let o=0;o<this.staffLines.length;o++)if(this.staffLines[o].ParentStaff.ParentInstrument===e){for(let a=o;a<this.staffLines.length;a++){const l=this.staffLines[a];if(l.ParentStaff.ParentInstrument!==e)break;s+=l.PositionAndShape.RelativePosition.y,r++}break}r>0&&(t.PositionAndShape.RelativePosition=new PointF2D(0,s/r+2))})}checkStaffEntriesForStaffEntryLink(){let e=!1,t=!1;for(let s=0;s<this.staffLines.length-1;s++){for(let r=0,o=this.staffLines[s].Measures.length;r<o;++r){const a=this.staffLines[s].Measures[r];for(let l=0,c=a.staffEntries.length;l<c;++l)a.staffEntries[l].sourceStaffEntry.Link&&(e=!0)}for(let r=0,o=this.staffLines[s+1].Measures.length;r<o;++r){const a=this.staffLines[s+1].Measures[r];for(let l=0,c=a.staffEntries.length;l<c;++l)a.staffEntries[l].sourceStaffEntry.Link&&(t=!0)}}return!!(e&&t)}getBottomStaffLine(e){const t=e.ParentStaff.ParentInstrument.Staves,s=t[t.length-1];for(const r of e.ParentMusicSystem.staffLines)if(r.ParentStaff===s)return r}createSystemLine(e,t,s,r,o,a,l=void 0){throw new Error("not implemented")}createLinesForSystemLine(e){}calcBracketsWidth(){let e=0;for(let t=0,s=this.GroupBrackets.length;t<s;++t){const r=this.GroupBrackets[t];e=Math.max(e,r.PositionAndShape.Size.width)}for(let t=0,s=this.InstrumentBrackets.length;t<s;++t){const r=this.InstrumentBrackets[t];e=Math.max(e,r.PositionAndShape.Size.width)}return e}createInstrumentBracket(e,t){}createGroupBracket(e,t,s){}findFirstVisibleInstrumentInInstrumentalGroup(e){for(let t=0,s=e.InstrumentalGroups.length;t<s;++t){const r=e.InstrumentalGroups[t];if(r instanceof Instrument){if(r.Visible===!0)return r;continue}return this.findFirstVisibleInstrumentInInstrumentalGroup(r)}}findLastVisibleInstrumentInInstrumentalGroup(e){let t;for(let s=e.InstrumentalGroups.length-1;s>=0;s--){if(t=e.InstrumentalGroups[s],t instanceof Instrument){if(t.Visible===!0)return t;continue}return this.findLastVisibleInstrumentInInstrumentalGroup(t)}}updateMusicSystemStaffLineXPosition(e){for(let t=0,s=this.StaffLines.length;t<s;++t){const r=this.StaffLines[t],o=r.PositionAndShape.RelativePosition;o.x=this.maxLabelLength+e,r.PositionAndShape.RelativePosition=o,r.PositionAndShape.BorderRight=this.boundingBox.Size.width-this.maxLabelLength-e;for(let a=0;a<r.StaffLines.length;a++){const l=new PointF2D(r.PositionAndShape.Size.width,r.StaffLines[a].End.y);r.StaffLines[a].End=l}}}}class SystemLine extends GraphicalObject{constructor(e,t,s,r,o=void 0){super(),this.lineType=e,this.linePosition=t,this.parentMusicSystem=s,this.topMeasure=r,this.bottomMeasure=o,this.parentTopStaffLine=r==null?void 0:r.ParentStaffLine,this.boundingBox=new BoundingBox$1(this,s.PositionAndShape)}static getObjectWidthForLineType(e,t){switch(t){case SystemLinesEnum.SingleThin:return e.SystemThinLineWidth;case SystemLinesEnum.DoubleThin:return e.SystemThinLineWidth*2+e.DistanceBetweenVerticalSystemLines;case SystemLinesEnum.ThinBold:return e.SystemThinLineWidth+e.SystemBoldLineWidth+e.DistanceBetweenVerticalSystemLines;case SystemLinesEnum.BoldThinDots:return e.SystemThinLineWidth+e.SystemBoldLineWidth+e.DistanceBetweenVerticalSystemLines+e.SystemDotWidth+e.DistanceBetweenDotAndLine;case SystemLinesEnum.DotsThinBold:return e.SystemThinLineWidth+e.SystemBoldLineWidth+e.DistanceBetweenVerticalSystemLines+e.SystemDotWidth+e.DistanceBetweenDotAndLine;case SystemLinesEnum.DotsBoldBoldDots:return 2*e.SystemBoldLineWidth+2*e.SystemDotWidth+2*e.DistanceBetweenDotAndLine+e.DistanceBetweenVerticalSystemLines;default:return 0}}}const VF$b=Vex.Flow;class VexFlowInstrumentBracket extends GraphicalObject{constructor(e,t,s=0){super(),this.Visible=!0,this.PositionAndShape=new BoundingBox$1(this,e.ParentMusicSystem.PositionAndShape);const r=e.Measures[0],o=t.Measures[0];this.addConnector(r.getVFStave(),o.getVFStave(),VF$b.StaveConnector.type.BRACKET,s)}draw(e){this.Visible&&this.vexflowConnector.setContext(e).draw();const t=this.vexflowConnector,s=t.top_stave.getYForLine(0),r=t.bottom_stave.getYForLine(t.bottom_stave.getNumLines()-1)+t.thickness;this.PositionAndShape.AbsolutePosition.x=(t.top_stave.getX()-2+t.x_shift)/unitInPixels,this.PositionAndShape.AbsolutePosition.y=s/unitInPixels,this.PositionAndShape.Size.height=(r-s)/unitInPixels,this.PositionAndShape.Size.width=12/unitInPixels}addConnector(e,t,s,r){this.vexflowConnector=new VF$b.StaveConnector(e,t).setType(s).setXShift(r*-5)}}const VF$a=Vex.Flow;class VexFlowInstrumentBrace extends VexFlowInstrumentBracket{constructor(e,t,s=0){super(e,t,s),this.vexflowConnector.setType(VF$a.StaveConnector.type.BRACE)}}class VexFlowMusicSystem extends MusicSystem{constructor(e,t){super(e),this.rules=t}calculateBorders(e){if(this.staffLines.length===0)return;const t=this.calcBracketsWidth();this.boundingBox.BorderLeft=-t,this.boundingBox.BorderMarginLeft=-t,this.boundingBox.XBordersHaveBeenSet=!0;const r=this.staffLines[0].SkyBottomLineCalculator.getSkyLineMin();this.boundingBox.BorderTop=r,this.boundingBox.BorderMarginTop=r;const o=this.staffLines[this.staffLines.length-1],l=o.SkyBottomLineCalculator.getBottomLineMax()+o.PositionAndShape.RelativePosition.y;this.boundingBox.BorderBottom=l,this.boundingBox.BorderMarginBottom=l,this.boundingBox.XBordersHaveBeenSet=!0,this.boundingBox.YBordersHaveBeenSet=!0}createSystemLine(e,t,s,r,o,a,l=void 0){const c=a;let d=!1;if(l&&(d=!0,l.lineTo(a,VexFlowConverter.line(s,r)),l.addMeasureLine(s,r),s===SystemLinesEnum.DotsBoldBoldDots)){const m=l.ParentStaffLine.Measures.indexOf(l)+1,u=l.ParentStaffLine.Measures[m],g=a.ParentStaffLine.Measures[m];u&&g&&(u.lineTo(g,VexFlowConverter.line(SystemLinesEnum.BoldThinDots,r)),u.addMeasureLine(SystemLinesEnum.BoldThinDots,r))}return c&&c.addMeasureLine(s,r,d),new SystemLine(s,r,this,a,l)}createInstrumentBracket(e,t){const s=e,r=t,o=new VexFlowInstrumentBrace(s,r);this.InstrumentBrackets.push(o)}createGroupBracket(e,t,s){const r=e,o=t;if(s===0){const a=new VexFlowInstrumentBracket(r,o,s);this.GroupBrackets.push(a)}else{const a=new VexFlowInstrumentBrace(r,o,s);this.GroupBrackets.push(a)}}}class GraphicalMeasure extends GraphicalObject{constructor(e=void 0,t=void 0,s=void 0){super(),this.hasOnlyRests=!1,this.measureNumber=-1,this.ShowTimeSignature=!0,this.parentStaff=e,this.parentSourceMeasure=t,this.parentStaffLine=s,s?(this.parentStaff=s.ParentStaff,this.PositionAndShape=new BoundingBox$1(this,s.PositionAndShape)):this.PositionAndShape=new BoundingBox$1(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(e){this.parentMusicSystem=e}get MeasureNumber(){return this.measureNumber}get FirstInstructionStaffEntry(){return this.firstInstructionStaffEntry}set FirstInstructionStaffEntry(e){this.firstInstructionStaffEntry=e}get LastInstructionStaffEntry(){return this.lastInstructionStaffEntry}set LastInstructionStaffEntry(e){this.lastInstructionStaffEntry=e}get ParentStaffLine(){return this.parentStaffLine}set ParentStaffLine(e){this.parentStaffLine=e,this.parentStaffLine&&(this.PositionAndShape.Parent=this.parentStaffLine.PositionAndShape)}resetLayout(){throw new Error("not implemented")}getLineWidth(e){throw new Error("not implemented")}addClefAtBegin(e){throw new Error("not implemented")}addKeyAtBegin(e,t,s){throw new Error("not implemented")}addRhythmAtBegin(e){throw new Error("not implemented")}addClefAtEnd(e,t=!0){throw new Error("not implemented")}setPositionInStaffline(e){this.PositionAndShape.RelativePosition=new PointF2D(e,0)}setWidth(e){this.PositionAndShape.BorderRight=e}layoutSymbols(){throw new Error("not implemented")}findGraphicalStaffEntryFromTimestamp(e){var t;for(let s=0,r=this.staffEntries.length;s<r;++s){const o=this.staffEntries[s];if((t=o.relInMeasureTimestamp)!=null&&t.Equals(e))return o}}findGraphicalStaffEntryFromVerticalContainerTimestamp(e){for(let t=0,s=this.staffEntries.length;t<s;++t){const r=this.staffEntries[t];if(r.sourceStaffEntry.VerticalContainerParent.getAbsoluteTimestamp().Equals(e))return r}}hasSameDurationWithSourceMeasureParent(){const e=new Fraction$1(0,1);for(let t=0,s=this.staffEntries.length;t<s;++t){const r=this.staffEntries[t];e.Add(r.findStaffEntryMinNoteLength())}return e.Equals(this.parentSourceMeasure.Duration)}hasMultipleVoices(){if(this.staffEntries.length===0)return!1;const e=[];for(let t=0,s=this.staffEntries.length;t<s;++t){const r=this.staffEntries[t];for(let o=0,a=r.sourceStaffEntry.VoiceEntries.length;o<a;++o){const l=r.sourceStaffEntry.VoiceEntries[o];e.indexOf(l.ParentVoice)<0&&e.push(l.ParentVoice)}}return e.length>1}isVisible(){return this.ParentStaff.ParentInstrument.Visible}getGraphicalMeasureDurationFromStaffEntries(){let e=new Fraction$1(0,1);const t=[];for(let s=0,r=this.staffEntries.length;s<r;++s){const o=this.staffEntries[s];for(let a=0,l=o.sourceStaffEntry.VoiceEntries.length;a<l;++a){const c=o.sourceStaffEntry.VoiceEntries[a];t.indexOf(c.ParentVoice)<0&&t.push(c.ParentVoice)}}for(let s=0,r=t.length;s<r;++s){const o=t[s],a=new Fraction$1(0,1);for(const l of this.staffEntries)for(const c of l.graphicalVoiceEntries)c.parentVoiceEntry.ParentVoice===o&&c.notes.length>0&&a.Add(c.notes[0].graphicalNoteLength);e.lt(a)&&(e=Fraction$1.createFromFraction(a))}return e}addGraphicalStaffEntry(e){this.staffEntries.push(e)}addGraphicalStaffEntryAtTimestamp(e){if(e)if(this.staffEntries.length===0||this.staffEntries[this.staffEntries.length-1].relInMeasureTimestamp.lt(e.relInMeasureTimestamp))this.staffEntries.push(e);else for(let t=this.staffEntries.length-1;t>=0;t--){if(this.staffEntries[t].relInMeasureTimestamp.lt(e.relInMeasureTimestamp)){this.staffEntries.splice(t+1,0,e);break}t===0&&this.staffEntries.splice(t,0,e)}}isPianoRightHand(){return this.isUpperStaffOfInstrument()}isPianoLeftHand(){return this.isLowerStaffOfInstrument()}isUpperStaffOfInstrument(){return this.parentStaff.ParentInstrument.Staves.length===1?!0:this.ParentStaff===this.parentStaff.ParentInstrument.Staves[0]}isLowerStaffOfInstrument(){return this.parentStaff.ParentInstrument.Staves.length===1?!1:this.ParentStaff===this.ParentStaff.ParentInstrument.Staves.last()}beginsWithLineRepetition(){const e=this.parentSourceMeasure;return e?e.beginsWithLineRepetition():!1}endsWithLineRepetition(){const e=this.parentSourceMeasure;return e?e.endsWithLineRepetition():!1}beginsWithWordRepetition(){const e=this.parentSourceMeasure;return e?e.beginsWithWordRepetition():!1}endsWithWordRepetition(){const e=this.parentSourceMeasure;return e?e.endsWithWordRepetition():!1}getTransposedHalftones(){return this.parentStaff.ParentInstrument.GetMusicSheet.Transpose+this.parentStaff.ParentInstrument.Transpose}}class VexFlowVoiceEntry extends GraphicalVoiceEntry{constructor(e,t){super(e,t)}applyBordersFromVexflow(){const e=this.vfStaveNote;if(!e.getNoteHeadBeginX)return;const t=e.getBoundingBox(),s=e.getNoteHeadBeginX()-t.x;this.PositionAndShape.RelativePosition.y=t.y/unitInPixels,this.PositionAndShape.BorderTop=0,this.PositionAndShape.BorderBottom=t.h/unitInPixels,this.PositionAndShape.BorderLeft=-(s+e.width/2)/unitInPixels,this.PositionAndShape.BorderRight=(t.w-s)/unitInPixels}set vfStaveNote(e){this.mVexFlowStaveNote=e}get vfStaveNote(){return this.mVexFlowStaveNote}color(){var g;const e=this.rules.DefaultColorNotehead,t=this.rules.DefaultColorRest,s=this.rules.DefaultColorStem,r="#00000000";let o,a;const l=this.vfStaveNote;for(let b=0;b<this.notes.length;b++){const y=this.notes[b];if(a=y.sourceNote.NoteheadColor,o=a,this.rules.ColoringMode===ColoringModes.AutoColoring||this.rules.ColoringMode===ColoringModes.CustomColorSet)if(y.sourceNote.isRest())o=this.rules.ColoringSetCurrent.getValue(-1);else{const S=y.sourceNote.Pitch.FundamentalNote;o=this.rules.ColoringSetCurrent.getValue(S)}if(y.sourceNote.PrintObject?(!o||o==="#000000")&&(o=this.rules.DefaultColorNotehead):o=r,!a&&this.rules.ColoringMode===ColoringModes.XML&&y.sourceNote.PrintObject&&(!y.sourceNote.isRest()&&e?o=e:y.sourceNote.isRest()&&t&&(o=t)),o&&y.sourceNote.PrintObject)y.sourceNote.NoteheadColorCurrentlyRendered=o;else if(!o)continue;if(this.rules.ColoringEnabled&&y.sourceNote.NoteBeam&&this.rules.ColorBeams){const S=y.sourceNote.NoteBeam.Notes;let v=!0;for(let x=0;x<S.length;x++)S[x].NoteheadColorCurrentlyRendered!==o&&(v=!1);v&&(g=l==null?void 0:l.beam)!=null&&g.setStyle&&l.beam.setStyle({fillStyle:o,strokeStyle:o})}if(l){if(l.note_heads){const S=l.note_heads[b];S&&S.setStyle({fillStyle:o,strokeStyle:o})}l.setLedgerLineStyle&&(o===r?l.setLedgerLineStyle({fillStyle:o,strokeStyle:o,lineWidth:this.rules.LedgerLineWidth}):l.setLedgerLineStyle({fillStyle:this.rules.LedgerLineColorDefault,lineWidth:this.rules.LedgerLineWidth,strokeStyle:this.rules.LedgerLineColorDefault}))}}let c=s,d=!1;this.rules.ColoringEnabled&&(c=this.parentVoiceEntry.StemColor,(!c||c==="#000000")&&(c=s),this.rules.ColorStemsLikeNoteheads&&o&&(c=o,d=!0));let m=!0;for(const b of this.parentVoiceEntry.Notes)if(b.PrintObject){m=!1;break}m&&(c=r);const u={fillStyle:c,strokeStyle:c};l&&l.setStemStyle&&(!m&&d&&(this.parentVoiceEntry.StemColor=c),l.setStemStyle(u),l.flag&&l.setFlagStyle&&this.rules.ColorFlags&&l.setFlagStyle(u))}}const VF$9=Vex.Flow,NoteSubGroup=VF$9.NoteSubGroup;class VexFlowMeasure extends GraphicalMeasure{constructor(e,t=void 0,s=void 0){super(e,t,s),this.isTabMeasure=!1,this.octaveOffset=3,this.vfVoices={},this.vfTies=[],this.vfRepetitionWords=[],this.connectors=[],this.beams={},this.tuplets={},this.vftuplets={},this.minimumStaffEntriesWidth=-1,s?this.rules=s.ParentMusicSystem.rules:t&&(this.rules=t.Rules),this.resetLayout()}setAbsoluteCoordinates(e,t){this.stave.setX(e).setY(t)}resetLayout(){this.stave=new VF$9.Stave(0,0,0,{fill_style:this.rules.StaffLineColor,space_above_staff_ln:0,space_below_staff_ln:0,DYMusicScoreType:this.rules.DYMusicScoreType}),this.stave.MeasureNumber=this.MeasureNumber,this.ParentStaff&&this.setLineNumber(this.ParentStaff.StafflineCount),this.stave.setBegBarType(VF$9.Barline.type.NONE),this.parentSourceMeasure&&this.parentSourceMeasure.endingBarStyleEnum===SystemLinesEnum.None&&this.stave.setEndBarType(VF$9.Barline.type.NONE),this.updateInstructionWidth()}clean(){this.vfTies.length=0,this.connectors=[],this.resetLayout()}getLineWidth(e){switch(e){case SystemLinesEnum.SingleThin:return 5/unitInPixels;case SystemLinesEnum.DoubleThin:return 5/unitInPixels;case SystemLinesEnum.ThinBold:return 5/unitInPixels;case SystemLinesEnum.BoldThinDots:case SystemLinesEnum.DotsThinBold:return 10/unitInPixels;case SystemLinesEnum.DotsBoldBoldDots:return 10/unitInPixels+this.rules.RepeatEndStartPadding;default:return 0}}addClefAtBegin(e){if(this.rules.RenderClefsAtBeginningOfStaffline){if(this.octaveOffset=e.OctaveOffset,this.rules.DYMusicScoreType!=="jianpu")if(e.ClefType===ClefEnum.TAB)this.stave.addClef("tab",void 0,void 0,void 0);else{const t=VexFlowConverter.Clef(e,"default");this.stave.addClef(t.type,t.size,t.annotation,VF$9.StaveModifier.Position.BEGIN)}this.updateInstructionWidth()}}setLineNumber(e){e!==5&&(e===0?(this.stave.setNumLines(0),this.stave.getBottomLineY=function(){return this.getYForLine(this.options.num_lines)}):e===1?(this.stave.options.line_config=[{visible:!1},{visible:!1},{visible:!0},{visible:!1},{visible:!1}],this.stave.getBottomLineY=function(){return this.getYForLine(2)}):e===2?(this.stave.options.line_config=[{visible:!1},{visible:!1},{visible:!0},{visible:!0},{visible:!1}],this.stave.getBottomLineY=function(){return this.getYForLine(3)}):e===3?(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(e),this.stave.getBottomLineY=function(){return this.getYForLine(this.options.num_lines)}))}addKeyAtBegin(e,t,s){this.rules.RenderKeySignatures&&(this.stave.setKeySignature(VexFlowConverter.keySignature(e),VexFlowConverter.keySignature(t),void 0),this.updateInstructionWidth())}addRhythmAtBegin(e){const t=VexFlowConverter.TimeSignature(e);this.stave.addModifier(t,VF$9.StaveModifier.Position.BEGIN,{numerator:e.Rhythm.Numerator,denominator:e.Rhythm.Denominator}),this.ShowTimeSignature||t.setStyle({fillStyle:"#00000000"}),this.updateInstructionWidth()}addClefAtEnd(e,t=!0){const s=VexFlowConverter.Clef(e,"small");if(!(!t&&this.stave.endClef)){this.stave.setEndClef(s.type,s.size,s.annotation);for(const r of this.stave.getModifiers())if(t){const o=r.originalStrokeStyle,a=r.originalFillStyle;r.getStyle()&&(o&&a?(r.getStyle().strokeStyle=o,r.getStyle().fillStyle=a):(r.getStyle().strokeStyle=null,r.getStyle().fillStyle=null))}else if(r.getCategory()==="clefs"&&r.getPosition()===VF$9.StaveModifier.Position.END&&r.type===s.type){const o="#12345600",a=r.getStyle();a&&(r.originalStrokeStyle=a.strokeStyle,r.originalFillStyle=a.fillStyle),r.setStyle({strokeStyle:o,fillStyle:o})}return this.parentSourceMeasure.hasEndClef=!0,this.updateInstructionWidth()}}addMeasureLine(e,t,s=!0){switch(t){case SystemLinePosition.MeasureBegin:switch(e){case SystemLinesEnum.BoldThinDots:s||(this.stave.modifiers[0].draw=function(r){switch(r.checkContext(),this.setRendered(),this.type){case VF$9.Barline.type.SINGLE:this.drawVerticalBar(r,this.x,!1);break;case VF$9.Barline.type.DOUBLE:this.drawVerticalBar(r,this.x,!0);break;case VF$9.Barline.type.END:this.drawVerticalEndBar(r,this.x);break;case VF$9.Barline.type.REPEAT_BEGIN:this.drawRepeatBar(r,this.x,!0);break;case VF$9.Barline.type.REPEAT_END:this.drawRepeatBar(r,this.x,!1);break;case VF$9.Barline.type.REPEAT_BOTH:this.drawRepeatBar(r,this.x,!1),this.drawRepeatBar(r,this.x,!0);break}}),this.stave.setBegBarType(VF$9.Barline.type.REPEAT_BEGIN);break}break;case SystemLinePosition.MeasureEnd:switch(e){case SystemLinesEnum.DotsBoldBoldDots:this.stave.setEndBarType(VF$9.Barline.type.REPEAT_BOTH);break;case SystemLinesEnum.DotsThinBold:this.stave.setEndBarType(VF$9.Barline.type.REPEAT_END);break;case SystemLinesEnum.DoubleThin:this.stave.setEndBarType(VF$9.Barline.type.DOUBLE);break;case SystemLinesEnum.ThinBold:this.stave.setEndBarType(VF$9.Barline.type.END);break;case SystemLinesEnum.None:this.stave.setEndBarType(VF$9.Barline.type.NONE);break}break}}addMeasureNumber(){const e=this.MeasureNumber.toString(),t=3,s={justification:1,shift_x:0,shift_y:0};this.stave.setText(e,t,s)}addWordRepetition(e){let t,s=VF$9.StaveModifier.Position.END;const r=this.beginInstructionsWidth;switch(e.type){case RepetitionInstructionEnum.Segno:t=VF$9.Repetition.type.SEGNO_LEFT,s=VF$9.StaveModifier.Position.LEFT;break;case RepetitionInstructionEnum.Coda:t=VF$9.Repetition.type.CODA_LEFT,s=VF$9.StaveModifier.Position.LEFT;break;case RepetitionInstructionEnum.DaCapo:t=VF$9.Repetition.type.DC;break;case RepetitionInstructionEnum.DalSegno:t=VF$9.Repetition.type.DS;break;case RepetitionInstructionEnum.Fine:t=VF$9.Repetition.type.FINE;break;case RepetitionInstructionEnum.ToCoda:t=VF$9.Repetition.type.TO_CODA;break;case RepetitionInstructionEnum.DaCapoAlFine:t=VF$9.Repetition.type.DC_AL_FINE;break;case RepetitionInstructionEnum.DaCapoAlCoda:t=VF$9.Repetition.type.DC_AL_CODA;break;case RepetitionInstructionEnum.DalSegnoAlFine:t=VF$9.Repetition.type.DS_AL_FINE;break;case RepetitionInstructionEnum.DalSegnoAlCoda:t=VF$9.Repetition.type.DS_AL_CODA;break}if(t){if(this.stave.getModifiers().find(c=>c.symbol_type===t))return;const l=new VF$9.Repetition(t,r,-this.rules.RepetitionSymbolsYOffset);this.stave.addModifier(l,s);return}this.addVolta(e)}addVolta(e){var s;let t=VF$9.Volta.type.BEGIN;if(e.type===RepetitionInstructionEnum.Ending){switch(e.alignment){case AlignmentType.Begin:this.parentSourceMeasure.endsRepetitionEnding()?t=VF$9.Volta.type.BEGIN_END:t=VF$9.Volta.type.BEGIN;break;case AlignmentType.End:if(this.parentSourceMeasure.beginsRepetitionEnding())return;t=VF$9.Volta.type.END;break}const r=this.ParentStaffLine.SkyBottomLineCalculator,o=this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginLeft+.4,a=Math.max(this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginRight,o+.4),l=r.getSkyLineMinInRange(o,a)-2;let c=-6.1+this.rules.VoltaOffset,d=this.rules.VoltaOffset;if(l<c){const g=l-c;d+=g,c=l}let m;const u=this.parentSourceMeasure.MeasureNumber;for(let g=0;g<this.ParentStaffLine.Measures.length;g++){const b=this.ParentStaffLine.Measures[g];b instanceof VexFlowMeasure&&(b.MeasureNumber===u-1||b.MeasureNumber+((s=b.parentSourceMeasure)==null?void 0:s.multipleRestMeasures)===u)&&(m=b)}if(m){const g=m.stave.getModifiers();for(let b=0;b<g.length;b++){const y=g[b];if(y.hasOwnProperty("volta")){const S=m.ParentStaffLine.SkyBottomLineCalculator,v=m.PositionAndShape.AbsolutePosition.x+m.PositionAndShape.BorderMarginLeft+.4,x=Math.max(m.PositionAndShape.AbsolutePosition.x+m.PositionAndShape.BorderMarginRight,v+.4),A=S.getSkyLineMinInRange(v,x);if(A<=c){const E=A-c;d+=E,c=A}else y.y_shift=d*unitInPixels,m.ParentStaffLine.SkyBottomLineCalculator.updateSkyLineInRange(v,x,c)}}}d*=10,this.stave.setVoltaType(t,e.endingIndices[0],d),r.updateSkyLineInRange(o,a,c)}}setWidth(e){super.setWidth(e),this.stave.setWidth(e*unitInPixels)}layoutSymbols(){}draw(e){var l,c,d,m,u,g,b;const t=e.openGroup();(l=t==null?void 0:t.classList)==null||l.add("vf-measure");const s=e.openGroup();(c=s==null?void 0:s.classList)==null||c.add("vf-stave"),s==null||s.setAttribute("id",(m=(d=this.stave)==null?void 0:d.attrs)==null?void 0:m.id),this.stave.setContext(e).draw(),e.closeGroup();const r=e.openGroup();(u=r==null?void 0:r.classList)==null||u.add("vf-voices");for(const y in this.vfVoices)this.vfVoices.hasOwnProperty(y)&&(e.save(),this.vfVoices[y].draw(e,this.stave),e.restore());e.closeGroup();const o=e.openGroup();if((g=o==null?void 0:o.classList)==null||g.add("vf-beams"),this.rules.DYMusicScoreType!=="jianpu"){for(const y in this.vfbeams)if(this.vfbeams.hasOwnProperty(y))for(const S of this.vfbeams[y])S.setContext(e).draw()}if(this.autoVfBeams)for(const y of this.autoVfBeams)y.setContext(e).draw();if(!this.isTabMeasure||this.rules.TupletNumbersInTabs){if(this.autoTupletVfBeams)for(const y of this.autoTupletVfBeams)y.setContext(e).draw();for(const y in this.vftuplets)if(this.vftuplets.hasOwnProperty(y))for(const S of this.vftuplets[y])if(this.rules.DYMusicScoreType==="jianpu"){let v=S.getNotes();const x=new VF$9.StaveTie({first_note:v[0],last_note:v[v.length-1]},v.length+"");this.vfTies.push(x),S.setTupletLocation(1)}else S.setContext(e).draw()}e.closeGroup(),e.closeGroup();const a=e.openGroup();(b=a==null?void 0:a.classList)==null||b.add("vf-ties");for(const y of this.vfTies)y.setContext(e).draw();e.closeGroup();for(const y of this.connectors)y.setContext(e).draw();return this.correctNotePositions(),t}format(){this.formatVoices&&this.formatVoices((this.PositionAndShape.Size.width-this.beginInstructionsWidth-this.endInstructionsWidth)*unitInPixels,this)}correctNotePositions(){if(!this.isTabMeasure)for(const e of this.getVoicesWithinMeasure())for(const t of e.VoiceEntries)for(const s of t.Notes){const r=this.rules.GNote(s);if(!(r!=null&&r.vfnote))return;const o=r.vfnote[0];let a=0;r.parentVoiceEntry.parentVoiceEntry.StemDirection===StemDirectionType.Up?a+=3.5:a+=.5;const l=-r.notehead(o).line;a+=l+r.parentVoiceEntry.notes.last().notehead().line,r.PositionAndShape.RelativePosition.y=a}}getVoicesWithinMeasure(){const e=[];for(const t of this.staffEntries)for(const s of t.graphicalVoiceEntries)e.indexOf(s.parentVoiceEntry.ParentVoice)===-1&&e.push(s.parentVoiceEntry.ParentVoice);return e}getGraphicalVoiceEntriesPerVoice(e){const t=[];for(const s of this.staffEntries)for(const r of s.graphicalVoiceEntries)r.parentVoiceEntry.ParentVoice===e&&t.push(r);return t}getRestFilledVexFlowStaveNotesPerVoice(e){let t,s=this.getGraphicalVoiceEntriesPerVoice(e);for(let a=0;a<s.length;a++){const l=s[a],c=l.notes[0].sourceNote.getAbsoluteTimestamp();let d=new Fraction$1;for(const m of l.notes){const u=Fraction$1.plus(m.sourceNote.getAbsoluteTimestamp(),m.sourceNote.Length);d.lt(u)&&(d=u)}if(t){const m=Fraction$1.minus(c,t);if(m.RealValue>0){loglevelExports.trace(`Ghost Found in between (measure ${this.MeasureNumber})`);const u=this.createGhostGves(m);s.splice(a,0,...u),a+=u.length}}else{const m=Fraction$1.minus(c,this.parentSourceMeasure.AbsoluteTimestamp);if(m.RealValue>0){loglevelExports.trace(`Ghost Found at start (measure ${this.MeasureNumber})`);const u=this.createGhostGves(m);s.splice(0,0,...u),a+=u.length}}t=d}const r=Fraction$1.plus(this.parentSourceMeasure.AbsoluteTimestamp,this.parentSourceMeasure.Duration),o=Fraction$1.minus(r,t);if(o.RealValue>0){loglevelExports.trace(`Ghost Found at end (measure ${this.MeasureNumber})`);const a=this.createGhostGves(o);s=s.concat(a)}return s}createGhostGves(e){const t=VexFlowConverter.GhostNotes(e),s=[];for(const r of t){const o=new VexFlowVoiceEntry(void 0,void 0);o.vfStaveNote=r,s.push(o)}return s}handleBeam(e,t){const s=e.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;let r=this.beams[s];r||(r=this.beams[s]=[]);let o;for(const l of r)l[0]===t&&(o=l);o||(o=[t,[]],r.push(o));const a=e.parentVoiceEntry;o[1].indexOf(a)<0&&o[1].push(a)}handleTuplet(e,t){const s=e.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;t=e.sourceNote.NoteTuplet;let r=this.tuplets[s];r||(r=this.tuplets[s]=[]);let o;for(const l of r)l[0]===t&&(o=l);o||(o=[t,[]],r.push(o));const a=e.parentVoiceEntry;o[1].indexOf(a)<0&&o[1].push(a)}finalizeBeams(){this.vfbeams={};const e=[];for(const t in this.beams)if(this.beams.hasOwnProperty(t)){let s=this.vfbeams[t];s||(s=this.vfbeams[t]=[]);for(const r of this.beams[t]){let o=!1;for(const b of r[0].Notes)if(b.Length.RealValue>=new Fraction$1(1,4).RealValue&&(!b.TypeLength||b.TypeLength.RealValue>.125)){o=!0;break}if(o){loglevelExports.debug("Beam between note >= quarter, likely tremolo, currently unsupported. continuing.");continue}const a=[],l=r[0],c=r[1];let d=!0;for(const b of c)b.parentVoiceEntry.ParentVoice===l.Notes[0].ParentVoiceEntry.ParentVoice&&(d=b.parentVoiceEntry.WantedStemDirection===StemDirectionType.Undefined);let m=!1,u;const g=[];for(const b of c){const y=b.vfStaveNote;y&&(a.push(y),e.push(y)),b.parentVoiceEntry.IsGrace&&(m=!0),b.parentVoiceEntry.StemColor&&this.rules.ColoringEnabled&&g.push(b.parentVoiceEntry.StemColor)}if(a.length>1){const b=new VF$9.Beam(a,d);if(m&&(b.render_options.beam_width=3,b.render_options.partial_beam_length=4),g.length>=2&&this.rules.ColorBeams){u=g[0];for(const y of g)if(y!==u){u=void 0;break}b.setStyle({fillStyle:u,strokeStyle:u})}this.rules.FlatBeams&&(b.render_options.flat_beams=!0,b.render_options.flat_beam_offset=this.rules.FlatBeamOffset,b.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),s.push(b)}else loglevelExports.debug("Warning! Beam with no notes!")}}this.rules.AutoBeamNotes&&this.autoBeamNotes(e)}autoBeamNotes(e){if(!this.rules.AutoBeamTabs&&this.isTabMeasure)return;let t=[],s=[],r,o=[];this.autoTupletVfBeams=[];const a=[];this.autoVfBeams=[];let l=this.parentSourceMeasure.ActiveTimeSignature;l||(l=this.parentSourceMeasure.Duration);for(const m of this.staffEntries)for(const u of m.graphicalVoiceEntries){const g=u.vfStaveNote,b=u.notes[0],y=m.relInMeasureTimestamp.isOnBeat(l),S=s.length>=2,v=b.sourceNote.Length.RealValue-new Fraction$1(1,4).RealValue>-Fraction$1.FloatInaccuracyTolerance,x=u.parentVoiceEntry.IsGrace||v||e.contains(g);if(x||y){if(S){for(const E of s)t.push(E);a.push(t.slice()),t=[]}if(s=[],x)continue}const A=u.notes[0].sourceNote.NoteTuplet;if(A){let E=!1;for(const w of A.Notes){for(const _ of w)if(_.NoteTypeXml>=NoteType.QUARTER||_.ParentVoiceEntry.IsGrace||_.isRest()&&!this.rules.AutoBeamOptions.beam_rests){E=!0;break}if(E)break}if(!r)r=A;else if(r!==A){if(o.length>1){const w=new VF$9.Beam(o,!0);this.rules.FlatBeams&&(w.render_options.flat_beams=!0,w.render_options.flat_beam_offset=this.rules.FlatBeamOffset,w.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoTupletVfBeams.push(w)}o=[],r=A}E||o.push(g);continue}else r=void 0;s.push(g)}if(o.length>=2){const m=new VF$9.Beam(o,!0);this.rules.FlatBeams&&(m.render_options.flat_beams=!0,m.render_options.flat_beam_offset=this.rules.FlatBeamOffset,m.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoTupletVfBeams.push(m)}if(s.length>=2){for(const m of s)t.push(m);a.push(t)}const c=this.rules.AutoBeamOptions,d={beam_middle_only:c.beam_middle_rests_only,beam_rests:c.beam_rests,maintain_stem_directions:c.maintain_stem_directions};if(c.groups&&c.groups.length){const m=[];for(const u of c.groups)m.push(new VF$9.Fraction(u[0],u[1]));d.groups=m}for(const m of a){const u=VF$9.Beam.generateBeams(m,d);for(const g of u)this.rules.FlatBeams&&(g.render_options.flat_beams=!0,g.render_options.flat_beam_offset=this.rules.FlatBeamOffset,g.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoVfBeams.push(g)}}finalizeTuplets(){this.vftuplets={};for(const e in this.tuplets)if(this.tuplets.hasOwnProperty(e)){let t=this.vftuplets[e];t||(t=this.vftuplets[e]=[]);for(const s of this.tuplets[e]){const r=[],o=s[1];for(const a of o)r.push(a.vfStaveNote);if(r.length>1){const a=s[0],l=a.Notes[0][0].NormalNotes,c=a.Bracket||a.TupletLabelNumber===3&&this.rules.TripletsBracketed||a.TupletLabelNumber!==3&&this.rules.TupletsBracketed;let d=VF$9.Tuplet.LOCATION_TOP;a.tupletLabelNumberPlacement===PlacementEnum.Below&&(d=VF$9.Tuplet.LOCATION_BOTTOM),t.push(new VF$9.Tuplet(r,{bracketed:c,location:d,notes_occupied:l,num_notes:a.TupletLabelNumber,ratioed:this.rules.TupletsRatioed}))}else loglevelExports.debug("Warning! Tuplet with no notes! Trying to ignore, but this is a serious problem.")}}}layoutStaffEntry(e){}graphicalMeasureCreatedCalculations(){let e,t=[];const s=[];for(const o of this.staffEntries){e=!1,t=[];for(const a of o.graphicalVoiceEntries){if(a.parentVoiceEntry.IsGrace){t.push(a),s.push(a),e||(e=a.parentVoiceEntry.GraceSlur);continue}if(a.vfStaveNote=VexFlowConverter.StaveNote(a),t.length>0){const l=[];for(let d=0;d<t.length;d++){const m=t[d];m.GraceSlash=m.parentVoiceEntry.GraceNoteSlash,d>0&&(m.GraceSlash=!1);const u=VexFlowConverter.StaveNote(m);m.vfStaveNote=u,l.push(u)}const c=new VF$9.GraceNoteGroup(l,e);a.vfStaveNote.addModifier(0,c),t=[]}}}if(t.length>0)for(const o of t)o.vfStaveNote=VexFlowConverter.StaveNote(o),o.parentVoiceEntry.GraceAfterMainNote=!0;this.finalizeBeams(),this.finalizeTuplets();const r=this.getVoicesWithinMeasure();if(this.rules.RenderFingerings)for(const o of this.staffEntries)o.setModifierXOffsets();for(const o of r){if(!o)continue;this.vfVoices[o.VoiceId]=new VF$9.Voice({beat_value:this.parentSourceMeasure.Duration.Denominator,num_beats:this.parentSourceMeasure.Duration.Numerator,resolution:VF$9.RESOLUTION}).setMode(VF$9.Voice.Mode.SOFT);const a=this.getRestFilledVexFlowStaveNotesPerVoice(o);for(const l of a){if(l.parentVoiceEntry&&l.parentVoiceEntry.IsGrace&&!l.parentVoiceEntry.GraceAfterMainNote)continue;const c=l;if(c.vfStaveNote.ticks.denominator===0)continue;if(l.notes.length===0||!l.notes[0]||!l.notes[0].sourceNote.PrintObject){this.vfVoices[o.VoiceId].addTickable(c.vfStaveNote);continue}const d=c.parentStaffEntry;if(d&&d.vfClefBefore){const m=new NoteSubGroup([d.vfClefBefore]);c.vfStaveNote.getCategory&&c.vfStaveNote.getCategory()==="stavenotes"&&c.vfStaveNote.addModifier(0,m)}l.parentVoiceEntry&&this.rules.RenderFingerings&&((this.rules.FingeringPosition===PlacementEnum.Left||this.rules.FingeringPosition===PlacementEnum.Right)&&this.createFingerings(l),this.createStringNumber(l)),this.createArpeggio(l),this.vfVoices[o.VoiceId].addTickable(c.vfStaveNote)}}this.setStemDirectionFromVexFlow();for(const o of s)this.createFingerings(o),this.createStringNumber(o),this.createArpeggio(o);this.createArticulations(),this.createOrnaments()}createArpeggio(e){if(e.parentVoiceEntry&&e.parentVoiceEntry.Arpeggio){const t=e.parentVoiceEntry.Arpeggio;if(e.notes&&e.notes.length>1){const s=VexFlowConverter.StrokeTypeFromArpeggioType(t.type),r=new VF$9.Stroke(s,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&e.vfStaveNote.addStroke(0,r)}else loglevelExports.debug(`[OSMD] arpeggio in measure ${this.MeasureNumber} could not be drawn.
- voice entry had less than two notes, arpeggio is likely between voice entries, not currently supported in Vexflow.`)}}setStemDirectionFromVexFlow(){for(const e of this.staffEntries)for(const t of e.graphicalVoiceEntries)for(const s of t.notes){const r=s.vfnote;if(!r||!r[0])continue;switch(r[0].getStemDirection()){case VF$9.Stem.UP:t.parentVoiceEntry.StemDirection=StemDirectionType.Up;break;case VF$9.Stem.DOWN:t.parentVoiceEntry.StemDirection=StemDirectionType.Down;break}}}createArticulations(){for(let e=0,t=this.staffEntries.length;e<t;++e){const r=this.staffEntries[e].graphicalVoiceEntries;for(const o of r){const a=o.vfStaveNote;VexFlowConverter.generateArticulations(a,o.notes[0].sourceNote.ParentVoiceEntry.Articulations,this.rules)}}}createOrnaments(){for(let e=0,t=this.staffEntries.length;e<t;++e){const r=this.staffEntries[e].graphicalVoiceEntries;for(const o in r)if(r.hasOwnProperty(o)){const a=r[o].vfStaveNote,l=r[o].notes[0].sourceNote.ParentVoiceEntry.OrnamentContainer;l&&VexFlowConverter.generateOrnaments(a,l)}}}createFingerings(e){const t=e;let s=0;for(const o of e.notes)o.sourceNote.Fingering&&s++;let r=-1;for(const o of e.notes){const a=o.sourceNote.Fingering;if(!a){r++;continue}r++;let l=this.rules.FingeringPosition;this.rules.FingeringPositionGrace===PlacementEnum.AboveOrBelow&&(this.isUpperStaffOfInstrument()?l=PlacementEnum.Above:this.isLowerStaffOfInstrument()&&(l=PlacementEnum.Below)),a.placement!==PlacementEnum.NotYetDefined&&(l=a.placement);let c=this.rules.FingeringOffsetX,d;switch(l){default:case PlacementEnum.Left:d=VF$9.StaveModifier.Position.LEFT,c-=o.baseFingeringXOffset*unitInPixels;break;case PlacementEnum.Right:d=VF$9.StaveModifier.Position.RIGHT,c+=o.baseFingeringXOffset*unitInPixels;break;case PlacementEnum.Above:d=VF$9.StaveModifier.Position.ABOVE;break;case PlacementEnum.Below:d=VF$9.StaveModifier.Position.BELOW;break;case PlacementEnum.NotYetDefined:const u=e.parentStaffEntry.sourceStaffEntry.ParentStaff;e.notes.length>1||e.parentStaffEntry.graphicalVoiceEntries.length>1?d=VF$9.StaveModifier.Position.LEFT:u.idInMusicSheet===0?(d=VF$9.StaveModifier.Position.ABOVE,l=PlacementEnum.Above):(d=VF$9.StaveModifier.Position.BELOW,l=PlacementEnum.Below)}const m=new VF$9.FretHandFinger(a.value);if(m.setPosition(d),m.setOffsetX(c),l===PlacementEnum.Above||l===PlacementEnum.Below){const u=l===PlacementEnum.Above?-1:1,g=l===PlacementEnum.Above?r:s-1-r;if(this.rules.FingeringInsideStafflines&&s>1){const b=m.getWidth()/2,y=s*2.5;m.setOffsetY(u*(g+y)*b)}else if(!this.rules.FingeringInsideStafflines){const b=new VF$9.StringNumber(a.value);b.radius=0,b.setPosition(d),b.setOffsetY(u*g*b.getWidth()*2/3),t.vfStaveNote.addModifier(r,b);continue}}t.vfStaveNote.addModifier(r,m)}}createStringNumber(e){if(!this.rules.RenderStringNumbersClassical)return;const t=e;e.notes.forEach((s,r)=>{const o=s.sourceNote.StringInstruction;if(o){let a=o.value;switch(a){case"1":a="I";break;case"2":a="II";break;case"3":a="III";break;case"4":a="IV";break;case"5":a="V";break;case"6":a="VI";break}const l=new VF$9.StringNumber(a);l.radius=0;const c=-this.rules.StringNumberOffsetY;e.notes.length>1||e.parentStaffEntry.graphicalVoiceEntries.length>1?(l.setOffsetX(s.baseStringNumberXOffset*13),l.setPosition(VF$9.Modifier.Position.RIGHT)):l.setPosition(VF$9.Modifier.Position.ABOVE),l.setOffsetY(c),t.vfStaveNote.addModifier(r,l)}})}lineTo(e,t){const s=new VF$9.StaveConnector(e.getVFStave(),this.stave);s.setType(t),this.connectors.push(s)}getVFStave(){return this.stave}updateInstructionWidth(){let e=0,t=0;const s=this.stave.getModifiers();for(const r of s)r.getPosition()===5?e+=r.getWidth()+r.getPadding(void 0):r.getPosition()===6&&(t+=r.getWidth()+r.getPadding(void 0));this.beginInstructionsWidth=(e!=null?e:0)/unitInPixels,this.endInstructionsWidth=(t!=null?t:0)/unitInPixels}addStaveTie(e,t){this.vfTies.push(e),t.vfTie=e}}class GraphicalStaffEntry extends GraphicalObject{constructor(e,t=void 0,s=void 0){super(),this.graphicalChordContainers=[],this.tabStaffEntry=void 0,this.MaxAccidentals=0,this.graphicalInstructions=[],this.ties=[],this.graphicalTies=[],this.lyricsEntries=[],this.parentMeasure=e,this.graphicalVoiceEntries=[],this.sourceStaffEntry=t,s?(this.staffEntryParent=s,this.parentVerticalContainer=s.parentVerticalContainer,this.PositionAndShape=new BoundingBox$1(this,s.PositionAndShape)):this.PositionAndShape=new BoundingBox$1(this,e.PositionAndShape),t&&(this.relInMeasureTimestamp=t.Timestamp),this.FingeringEntries=[]}get GraphicalInstructions(){return this.graphicalInstructions}get GraphicalTies(){return this.graphicalTies}get LyricsEntries(){return this.lyricsEntries}set LyricsEntries(e){this.lyricsEntries=e}getAbsoluteTimestamp(){const e=this.parentMeasure.parentSourceMeasure.AbsoluteTimestamp.clone();return this.relInMeasureTimestamp&&e.Add(this.relInMeasureTimestamp),e}findTieGraphicalNoteFromNote(e){var s;const t=((s=window.GYM)==null?void 0:s.graceCustom)||!1;for(const r of this.graphicalVoiceEntries)for(const o of r.notes){const a=o.sourceNote;if(t){if(e.NoteToGraphicalNoteObjectId==a.NoteToGraphicalNoteObjectId)return o}else if(!a.isRest()&&a.Pitch.FundamentalNote===e.Pitch.FundamentalNote&&a.Pitch.Octave===e.Pitch.Octave&&a.getAbsoluteTimestamp().Equals(e.getAbsoluteTimestamp()))return o}}findEndTieGraphicalNoteFromNoteWithStartingSlur(e,t){if(e){for(const s of this.graphicalVoiceEntries)if(s.parentVoiceEntry===e.ParentVoiceEntry)for(const r of s.notes){const o=r.sourceNote;if(o.NoteTie&&o.NoteSlurs.indexOf(t)!==-1)return r}}}findGraphicalNoteFromGraceNote(e){if(e){for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry===e.ParentVoiceEntry){for(const s of t.notes)if(s.sourceNote===e)return s}}}findGraphicalNoteFromNote(e){if(e){for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry===e.ParentVoiceEntry){for(const s of t.notes)if(s.sourceNote===e&&this.getAbsoluteTimestamp().Equals(e.getAbsoluteTimestamp()))return s}}}getGraphicalNoteDurationFromVoice(e){for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry.ParentVoice===e)return t.notes[0].graphicalNoteLength;return new Fraction$1(0,1)}findVoiceEntryGraphicalNotes(e){for(const t of this.graphicalVoiceEntries)if(t.parentVoiceEntry===e)return t.notes}isVoiceEntryPartOfLinkedVoiceEntry(e){if(this.sourceStaffEntry.Link)for(let t=0,s=this.sourceStaffEntry.Link.LinkStaffEntries.length;t<s;++t){const r=this.sourceStaffEntry.Link.LinkStaffEntries[t];if(r.VoiceEntries.indexOf(e)!==-1&&r!==this.sourceStaffEntry)return!0}return!1}findStaffEntryMinNoteLength(){let e=new Fraction$1(Number.MAX_VALUE,1);for(const t of this.graphicalVoiceEntries)for(const s of t.notes){const r=s.graphicalNoteLength;r.lt(e)&&r.GetExpandedNumerator()>0&&(e=r)}return e}findStaffEntryMaxNoteLength(){let e=new Fraction$1(0,1);for(const t of this.graphicalVoiceEntries)for(const s of t.notes){const r=s.graphicalNoteLength;e.lt(r)&&r.GetExpandedNumerator()>0&&(e=r)}return e}findOrCreateGraphicalVoiceEntry(e){for(const s of this.graphicalVoiceEntries)if(s.parentVoiceEntry===e)return s;const t=MusicSheetCalculator.symbolFactory.createVoiceEntry(e,this);return this.graphicalVoiceEntries.push(t),t}findOrCreateGraphicalVoiceEntryFromGraphicalNote(e){for(const s of this.graphicalVoiceEntries)if(s===e.parentVoiceEntry)return s;const t=MusicSheetCalculator.symbolFactory.createVoiceEntry(e.sourceNote.ParentVoiceEntry,this);return this.graphicalVoiceEntries.push(t),t}addGraphicalNoteToListAtCorrectYPosition(e,t){const s=e.notes;if(s.length===0||t.PositionAndShape.RelativePosition.y<CollectionUtil.last(s).PositionAndShape.RelativePosition.y)s.push(t);else for(let r=s.length-1;r>=0;r--){if(s[r].PositionAndShape.RelativePosition.y>t.PositionAndShape.RelativePosition.y){s.splice(r+1,0,t);break}if(r===0){s.splice(0,0,t);break}}}hasOnlyRests(){for(const t of this.graphicalVoiceEntries)for(const s of t.notes)if(!s.sourceNote.isRest())return!1;return!0}getSkylineMin(){var r;const e=(r=this.parentMeasure)==null?void 0:r.ParentStaffLine.SkyBottomLineCalculator;if(!e)return;const[t,s]=this.getAbsoluteStartAndEnd();return e.getSkyLineMinInRange(t,s)}getHighestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getSkylineMin()}getLowestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getBottomlineMax()}getBottomlineMax(){var r;const e=(r=this.parentMeasure)==null?void 0:r.ParentStaffLine.SkyBottomLineCalculator;if(!e)return;const[t,s]=this.getAbsoluteStartAndEnd();return e.getBottomLineMaxInRange(t,s)}getAbsoluteStartAndEnd(){let e=this.PositionAndShape.AbsolutePosition.x;e-=this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.x;const t=e+this.PositionAndShape.Size.width;return[e,t]}}const VF$8=Vex.Flow;class VexFlowStaffEntry extends GraphicalStaffEntry{constructor(e,t,s){super(e,t,s)}calculateXPosition(){const e=this.parentMeasure.getVFStave();let t=0;for(const s of this.graphicalVoiceEntries)if(s.vfStaveNote){if(s.vfStaveNote.setStave(e),e&&e.getLines&&e.getLines()===1&&s.vfStaveNote.getStemDirection()<0&&(s.vfStaveNote.setStemDirection(VF$8.Stem.UP),s.parentVoiceEntry.StemDirection=StemDirectionType.Up),!s.vfStaveNote.preFormatted)continue;s.applyBordersFromVexflow(),this.parentMeasure.ParentStaff.isTab?this.PositionAndShape.RelativePosition.x=(s.vfStaveNote.getAbsoluteX()+s.vfStaveNote.glyph.getWidth())/unitInPixels:this.PositionAndShape.RelativePosition.x=s.vfStaveNote.getBoundingBox().getX()/unitInPixels;const r=s.notes[0].sourceNote;r.isRest()&&r.Length.RealValue===this.parentMeasure.parentSourceMeasure.ActiveTimeSignature.RealValue&&(this.PositionAndShape.RelativePosition.x+=this.parentMeasure.parentSourceMeasure.Rules.WholeRestXShiftVexflow-.1,s.PositionAndShape.BorderLeft=-.7,s.PositionAndShape.BorderRight=.7),s.PositionAndShape.BorderLeft<t&&(t=s.PositionAndShape.BorderLeft)}this.PositionAndShape.RelativePosition.x-=t,this.PositionAndShape.calculateBoundingBox()}setMaxAccidentals(){for(const e of this.graphicalVoiceEntries)for(const t of e.notes)if(t.DrawnAccidental!==AccidentalEnum.NONE)return this.MaxAccidentals=1;return this.MaxAccidentals=0}setModifierXOffsets(){let e=[];for(const o of this.graphicalVoiceEntries)e=e.concat(o.notes);const t=e.map(o=>o.staffLine),s=this.calculateModifierXOffsets(t,1),r=this.calculateModifierXOffsets(t,.5);e.forEach((o,a)=>{o.baseFingeringXOffset=r[a],o.baseStringNumberXOffset=s[a]})}calculateModifierXOffsets(e,t){const s=[];for(let r=0;r<e.length;r++){let o=0,a=!0;for(;a;)for(let l=r;l>=0;l--){if(Math.abs(e[r]-e[l])<=t&&o===s[l]){o++,a=!0;break}a=!1}s.push(o)}return s}}class VexFlowGraphicalNote extends GraphicalNote{constructor(e,t,s,r=OctaveEnum.NONE,o,a=void 0){if(super(e,t,o,a),this.clef=s,this.octaveShift=r,e.Pitch){const l=e.isRest()?e.Pitch:OctaveShift.getPitchFromOctaveShift(e.Pitch,r);this.vfpitch=VexFlowConverter.pitch(l,e.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0}}setAccidental(e){const t=this.drawPitch(e);this.vfpitch=VexFlowConverter.pitch(t,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.DrawnAccidental=t.Accidental}drawPitch(e){return OctaveShift.getPitchFromOctaveShift(e,this.octaveShift)}Transpose(e,t,s,r){const o=super.Transpose(e,t,s,r),a=OctaveShift.getPitchFromOctaveShift(o,this.octaveShift);return this.vfpitch=VexFlowConverter.pitch(a,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0,a}setIndex(e,t){this.vfnote=[e,t],this.vfnoteIndex=t}notehead(e=void 0){let t=e;t||(t=this.vfnote[0]);const s=t.note_heads;return s&&s.length>this.vfnoteIndex&&s[this.vfnoteIndex]?t.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 e=[];for(let t=0;;t++){const s=document.getElementById(`vf-${this.getSVGId()}-beam${t}`);if(!s)break;e.push(s)}return e}}class GraphicalChordSymbolContainer extends GraphicalObject{constructor(e,t,s,r,o,a){super(),this.chordSymbolContainer=e,this.boundingBox=new BoundingBox$1(this,t),this.rules=a,this.calculateLabel(s,o,r)}get GetChordSymbolContainer(){return this.chordSymbolContainer}get GraphicalLabel(){return this.graphicalLabel}calculateLabel(e,t,s){const r=ChordSymbolContainer.calculateChordText(this.chordSymbolContainer,t,s);this.graphicalLabel=new GraphicalLabel(new Label(r),e,this.rules.ChordSymbolTextAlignment,this.rules,this.boundingBox),this.graphicalLabel.PositionAndShape.RelativePosition=new PointF2D(this.rules.ChordSymbolRelativeXOffset,0),this.graphicalLabel.Label.colorDefault=this.rules.DefaultColorChordSymbol}}const VF$7=Vex.Flow;class VexFlowTabMeasure extends VexFlowMeasure{constructor(e,t=void 0,s=void 0){super(e,t,s),this.isTabMeasure=!0}resetLayout(){var t;const e=(t=this.ParentStaff.StafflineCount)!=null?t:6;this.stave=new VF$7.TabStave(0,0,0,{space_above_staff_ln:0,space_below_staff_ln:0,num_lines:e}),this.updateInstructionWidth()}graphicalMeasureCreatedCalculations(){for(let t=0,s=this.staffEntries.length;t<s;++t){const r=this.staffEntries[t];for(const o of r.graphicalVoiceEntries)o.notes[0].sourceNote.isRest()?o.vfStaveNote=VexFlowConverter.GhostNotes(o.notes[0].sourceNote.Length)[0]:o.vfStaveNote=VexFlowConverter.CreateTabNote(o)}this.rules.TupletNumbersInTabs&&this.finalizeTuplets();const e=this.getVoicesWithinMeasure();for(const t of e){if(!t)continue;this.vfVoices[t.VoiceId]=new VF$7.Voice({beat_value:this.parentSourceMeasure.Duration.Denominator,num_beats:this.parentSourceMeasure.Duration.Numerator,resolution:VF$7.RESOLUTION}).setMode(VF$7.Voice.Mode.SOFT);const s=this.getRestFilledVexFlowStaveNotesPerVoice(t);for(const r of s){if(r.parentVoiceEntry&&r.parentVoiceEntry.IsGrace&&!r.parentVoiceEntry.GraceAfterMainNote)continue;const o=r;if(r.notes.length===0||!r.notes[0]||!r.notes[0].sourceNote.PrintObject){this.vfVoices[t.VoiceId].addTickable(o.vfStaveNote);continue}if(r.parentVoiceEntry&&r.parentVoiceEntry.Arpeggio){const a=r.parentVoiceEntry.Arpeggio;if(r.notes&&r.notes.length>1){const l=VexFlowConverter.StrokeTypeFromArpeggioType(a.type),c=new VF$7.Stroke(l,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&o.vfStaveNote.addStroke(0,c)}else loglevelExports.debug(`[OSMD] arpeggio in measure ${this.MeasureNumber} could not be drawn.
- voice entry had less than two notes, arpeggio is likely between voice entries, not currently supported in Vexflow.`)}this.vfVoices[t.VoiceId].addTickable(o.vfStaveNote)}}}}class StaffLine extends GraphicalObject{constructor(e,t){super(),this.measures=[],this.staffLines=new Array(5),this.octaveShifts=[],this.lyricLines=[],this.lyricsDashes=[],this.abstractExpressions=[],this.graphicalSlurs=[],this.Pedals=[],this.WavyLines=[],this.parentMusicSystem=e,this.parentStaff=t,this.boundingBox=new BoundingBox$1(this,e.PositionAndShape),this.skyBottomLine=MusicSheetCalculator.symbolFactory.createSkyBottomLineCalculator(this),this.staffHeight=this.parentMusicSystem.rules.StaffHeight,this.topLineOffset=0,this.bottomLineOffset=4,this.calculateStaffLineOffsets()}calculateStaffLineOffsets(){if(this.ParentStaff.isTab)switch(this.ParentStaff.StafflineCount){case 5:this.staffHeight=this.bottomLineOffset=this.ParentStaff.ParentInstrument.GetMusicSheet.Rules.TabStaffInterlineHeight*6;break;default:this.staffHeight=this.bottomLineOffset=this.ParentStaff.ParentInstrument.GetMusicSheet.Rules.TabStaffInterlineHeight*this.ParentStaff.StafflineCount;break}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;break}}get Measures(){return this.measures}set Measures(e){this.measures=e}get StaffLines(){return this.staffLines}set StaffLines(e){this.staffLines=e}get Index(){return this.parentMusicSystem.StaffLines.indexOf(this)}get NextStaffLine(){const e=this.Index;return e!==this.parentMusicSystem.StaffLines.length?this.parentMusicSystem.StaffLines[e+1]:void 0}get LyricLines(){return this.lyricLines}get AbstractExpressions(){return this.abstractExpressions}set AbstractExpressions(e){this.abstractExpressions=e}set LyricLines(e){this.lyricLines=e}get LyricsDashes(){return this.lyricsDashes}set LyricsDashes(e){this.lyricsDashes=e}get ParentMusicSystem(){return this.parentMusicSystem}set ParentMusicSystem(e){this.parentMusicSystem=e}get ParentStaff(){return this.parentStaff}set ParentStaff(e){this.parentStaff=e}get SkyBottomLineCalculator(){return this.skyBottomLine}get SkyLine(){return this.skyBottomLine.SkyLine}get BottomLine(){return this.skyBottomLine.BottomLine}get OctaveShifts(){return this.octaveShifts}set OctaveShifts(e){this.octaveShifts=e}get StaffHeight(){return this.staffHeight}get TopLineOffset(){return this.topLineOffset}get BottomLineOffset(){return this.bottomLineOffset}get GraphicalSlurs(){return this.graphicalSlurs}addSlurToStaffline(e){this.graphicalSlurs.push(e)}addActivitySymbolClickArea(){const e=new StaffLineActivitySymbol(this),t=this.PositionAndShape;e.PositionAndShape.RelativePosition=new PointF2D(t.RelativePosition.x+t.BorderRight+.5,t.RelativePosition.y+.5),e.PositionAndShape.Parent=this.parentMusicSystem.PositionAndShape}isPartOfMultiStaffInstrument(){return this.parentStaff.ParentInstrument.Staves.length>1}findClosestStaffEntry(e){let t;for(let s=0,r=this.Measures.length;s<r;++s){const o=this.Measures[s];for(let a=0,l=o.staffEntries.length;a<l;++a){const c=o.staffEntries[a];Math.abs(c.PositionAndShape.RelativePosition.x-e+o.PositionAndShape.RelativePosition.x)<10&&(t=c)}}return t}}class VexFlowContinuousDynamicExpression extends GraphicalContinuousDynamicExpression{constructor(e,t,s,r){if(super(e,t,s),this.IsVerbal){const o=new Label(e.Label);this.label=new GraphicalLabel(o,r||this.rules.ContinuousDynamicTextHeight,TextAlignmentEnum.LeftCenter,this.rules,this.PositionAndShape),this.label.Label.fontStyle=FontStyles.Italic,this.label.setLabelPositionAndShapeBorders(),this.PositionAndShape.calculateBoundingBox()}}}class AlignmentManager{constructor(e){this.parentStaffline=e,this.rules=this.parentStaffline.ParentMusicSystem.rules}alignDynamicExpressions(){var s,r,o,a;const e=[];let t=new Array;for(let l=0;l<this.parentStaffline.AbstractExpressions.length-1;l++){const c=this.parentStaffline.AbstractExpressions[l],d=this.parentStaffline.AbstractExpressions[l+1],m=(s=c==null?void 0:c.SourceExpression)==null?void 0:s.Placement,u=(r=d==null?void 0:d.SourceExpression)==null?void 0:r.Placement;if(m===u){const g=this.getDistance(c.PositionAndShape,d.PositionAndShape);Math.abs(g.x)<this.rules.DynamicExpressionMaxDistance?(t.indexOf(c)===-1&&t.push(c),t.push(d)):(e.push(t),t=new Array)}}e.push(t);for(const l of e)if(l.length>0){const c=l.map(g=>g.PositionAndShape.Center.y),d=Math.max(...c),m=((o=window.GYM)==null?void 0:o.noNeedContinuousDynamic)||!1,u=((a=window.GYM)==null?void 0:a.noNeedGraphicalContinuousDynamic)||!1;for(let g=0;g<l.length;g++){const b=l[g],y=c[g]-d;if(b instanceof VexFlowContinuousDynamicExpression?m||(b.shiftYPosition(-y),b.calcPsi()):(u||(b.PositionAndShape.RelativePosition.y-=y*.8),b.PositionAndShape.calculateBoundingBox()),!m&&b.squeeze){const S=g<l.length-1?l[g+1]:void 0,v=g>0?l[g-1]:void 0;if(S){const x=this.getOverlap(b.PositionAndShape,S.PositionAndShape);b.squeeze(-(x.x+this.rules.DynamicExpressionSpacer))}if(v){const x=this.getOverlap(v.PositionAndShape,b.PositionAndShape);b.squeeze(x.x+this.rules.DynamicExpressionSpacer)}}}}}getDistance(e,t){const s=e.RelativePosition.x+e.BorderMarginRight,r=t.RelativePosition.x+t.BorderMarginLeft,o=e.RelativePosition.y+e.BorderMarginBottom,a=t.RelativePosition.y+t.BorderMarginTop;return new PointF2D(r-s,a-o)}getOverlap(e,t){return new PointF2D(e.RelativePosition.x+e.BorderMarginRight-(t.RelativePosition.x+t.BorderMarginLeft),e.RelativePosition.y+e.BorderMarginBottom-(t.RelativePosition.y+t.BorderMarginTop))}}class VexFlowStaffLine extends StaffLine{constructor(e,t){super(e,t),this.slursInVFStaffLine=[],this.alignmentManager=new AlignmentManager(this)}get SlursInVFStaffLine(){return this.slursInVFStaffLine}addVFSlurToVFStaffline(e){this.slursInVFStaffLine.push(e)}get AlignmentManager(){return this.alignmentManager}}const VF$6=Vex.Flow;class VexFlowMultiRestMeasure extends VexFlowMeasure{constructor(e,t=void 0,s=void 0){super(e,t,s),this.minimumStaffEntriesWidth=-1,s?this.rules=s.ParentMusicSystem.rules:t&&(this.rules=t.Rules),this.resetLayout(),this.multiRestElement=new VF$6.MultiMeasureRest(t.multipleRestMeasures,{})}draw(e){var o,a,l,c,d;const t=e.openGroup();(o=t==null?void 0:t.classList)==null||o.add("vf-measure");const s=e.openGroup();(a=s==null?void 0:s.classList)==null||a.add("vf-stave"),s==null||s.setAttribute("id",(c=(l=this.stave)==null?void 0:l.attrs)==null?void 0:c.id),this.stave.setContext(e).draw(),e.closeGroup();const r=e.openGroup();(d=r==null?void 0:r.classList)==null||d.add("vf-voices"),this.multiRestElement.setStave(this.stave),this.multiRestElement.setContext(e),this.multiRestElement.draw(),e.closeGroup();for(const m of this.connectors)m.setContext(e).draw();return e.closeGroup(),t}format(){}getVoicesWithinMeasure(){return[]}getGraphicalVoiceEntriesPerVoice(e){return[]}getRestFilledVexFlowStaveNotesPerVoice(e){return[]}handleBeam(e,t){}handleTuplet(e,t){}finalizeBeams(){}finalizeTuplets(){}layoutStaffEntry(e){}graphicalMeasureCreatedCalculations(){}createArticulations(){}createOrnaments(){}createFingerings(e){}getVFStave(){return this.stave}}const VF$5=Vex.Flow;class VexFlowBackend{getInnerElement(){return this.inner}getCanvas(){return this.canvas}getRenderElement(){let e=this.canvas;return this.getVexflowBackendType()===VF$5.Renderer.Backends.CANVAS&&(e=this.inner),e}getRenderer(){return this.renderer}removeAllChildrenFromContainer(e){for(;e.children.length!==0;)e.removeChild(e.children.item(0))}removeFromContainer(e){const t=this.getRenderElement();for(let s=0;s<e.children.length;s++)if(e.children.item(s)===t){e.removeChild(t);break}}resize(e,t){this.renderer.resize(e,t),this.width=e,this.height=t}}const VF$4=Vex.Flow;class CanvasVexFlowBackend extends VexFlowBackend{constructor(e){super(),this.rules=e}getVexflowBackendType(){return VF$4.Renderer.Backends.CANVAS}getOSMDBackendType(){return BackendType.Canvas}getCanvasSize(){var e;return(e=document.getElementById(this.rules.DYContainerId+this.graphicalMusicPage.PageNumber))==null?void 0:e.offsetHeight}initialize(e,t){this.zoom=t,this.canvas=document.createElement("canvas"),this.graphicalMusicPage||(this.graphicalMusicPage=new GraphicalMusicPage(void 0),this.graphicalMusicPage.PageNumber=1),this.canvas.id="osmdCanvasVexFlowBackendCanvas"+this.graphicalMusicPage.PageNumber,this.inner=document.createElement("div"),this.inner.id=this.rules.DYContainerId+this.graphicalMusicPage.PageNumber,this.inner.style.position="relative",this.canvas.style.zIndex="0",this.inner.appendChild(this.canvas),e.appendChild(this.inner),this.renderer=new VF$4.Renderer(this.canvas,this.getVexflowBackendType()),this.ctx=this.renderer.getContext()}initializeHeadless(e=300,t=300){this.graphicalMusicPage||(this.graphicalMusicPage=new GraphicalMusicPage(void 0),this.graphicalMusicPage.PageNumber=1),this.canvas=document.createElement("canvas"),this.canvas.width=e,this.canvas.height=t,this.renderer=new VF$4.Renderer(this.canvas,this.getVexflowBackendType()),this.ctx=this.renderer.getContext()}getContext(){return this.ctx}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(e){this.ctx.scale(e,e)}translate(e,t){this.CanvasRenderingCtx.translate(e,t)}renderText(e,t,s,r,o,a,l=void 0,c=void 0){const d=this.CanvasRenderingCtx.font;this.CanvasRenderingCtx.save(),this.CanvasRenderingCtx.font=VexFlowConverter.font(e,t,s,this.rules,c),this.CanvasRenderingCtx.fillStyle=l,this.CanvasRenderingCtx.strokeStyle=l,this.CanvasRenderingCtx.fillText(r,a.x,a.y+o),this.CanvasRenderingCtx.restore(),this.CanvasRenderingCtx.font=d}renderRectangle(e,t,s,r=1){const o=this.CanvasRenderingCtx.fillStyle;s?this.CanvasRenderingCtx.fillStyle=s:this.CanvasRenderingCtx.fillStyle=VexFlowConverter.style(t),this.CanvasRenderingCtx.globalAlpha=r,this.ctx.fillRect(e.x,e.y,e.width,e.height),this.CanvasRenderingCtx.fillStyle=o,this.CanvasRenderingCtx.globalAlpha=1}renderLine(e,t,s="#FF0000FF",r=2){const o=this.CanvasRenderingCtx.strokeStyle;this.CanvasRenderingCtx.strokeStyle=s,this.CanvasRenderingCtx.beginPath(),this.CanvasRenderingCtx.moveTo(e.x,e.y),this.CanvasRenderingCtx.lineTo(t.x,t.y),this.CanvasRenderingCtx.stroke(),this.CanvasRenderingCtx.strokeStyle=o}renderCurve(e){this.ctx.beginPath(),this.ctx.moveTo(e[0].x,e[0].y),this.ctx.bezierCurveTo(e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y),this.ctx.lineTo(e[7].x,e[7].y),this.ctx.bezierCurveTo(e[6].x,e[6].y,e[5].x,e[5].y,e[4].x,e[4].y),this.ctx.lineTo(e[0].x,e[0].y),this.ctx.closePath(),this.ctx.fill()}get CanvasRenderingCtx(){return this.ctx.vexFlowCanvasContext}}const VF$3=Vex.Flow;class SvgVexFlowBackend extends VexFlowBackend{constructor(e){super(),this.rules=e}getVexflowBackendType(){return VF$3.Renderer.Backends.SVG}getOSMDBackendType(){return BackendType.SVG}getCanvasSize(){var e;return(e=document.getElementById(this.rules.DYContainerId+this.graphicalMusicPage.PageNumber))==null?void 0:e.offsetHeight}initialize(e,t,s=void 0){this.zoom=t,this.canvas=document.createElement("div"),s||(s=this.graphicalMusicPage?this.graphicalMusicPage.PageNumber.toString():"1"),this.canvas.id=this.rules.DYContainerId+s,this.inner=this.canvas,this.inner.style.position="relative",this.canvas.style.zIndex="0",e.appendChild(this.inner),this.renderer=new Vex.Flow.Renderer(this.canvas,this.getVexflowBackendType()),this.ctx=this.renderer.getContext(),this.ctx.svg.id=this.rules.DYSVGContainerId+s}getContext(){return this.ctx}getSvgElement(){return this.ctx.svg}removeNode(e){var s;const t=(s=this.ctx)==null?void 0:s.svg;if(!t)return!1;try{t.removeChild(e)}catch(r){return loglevelExports.error(r),!1}return!0}clear(){if(!this.ctx)return;const e=this.ctx.svg;for(;e.lastChild;)e.removeChild(e.lastChild);this.rules.PageBackgroundColor&&(this.ctx.svg.style["background-color"]=this.rules.PageBackgroundColor)}scale(e){this.ctx.scale(e,e)}translate(e,t){}renderText(e,t,s,r,o,a,l=void 0,c=void 0){this.ctx.save();const d=this.ctx.openGroup("text");l&&(this.ctx.attributes.fill=l,this.ctx.attributes.stroke=l);let m=c;(!c||c==="default")&&(m=this.rules.DefaultFontFamily),this.ctx.setFont(m,e,VexFlowConverter.fontStyle(t)),this.ctx.attributes["font-size"]=`${e}px`,this.ctx.state["font-size"]=`${e}px`;let u="normal",g="normal";switch(t){case FontStyles.Bold:u="bold";break;case FontStyles.Italic:g="italic";break;case FontStyles.BoldItalic:u="bold",g="italic";break;default:u="normal"}return this.ctx.attributes["font-weight"]=u,this.ctx.state["font-weight"]=u,this.ctx.attributes["font-style"]=g,this.ctx.state["font-style"]=g,this.ctx.fillText(r,a.x,a.y+o),this.ctx.closeGroup(),this.ctx.restore(),d}renderRectangle(e,t,s,r=1){this.ctx.save();const o=this.ctx.openGroup("rect");return s?this.ctx.attributes.fill=s:this.ctx.attributes.fill=VexFlowConverter.style(t),this.ctx.attributes["fill-opacity"]=r,this.ctx.fillRect(e.x,e.y,e.width,e.height),this.ctx.restore(),this.ctx.attributes["fill-opacity"]=1,this.ctx.closeGroup(),o}renderLine(e,t,s="#FF0000FF",r=2){this.ctx.save();const o=this.ctx.openGroup("line");return this.ctx.beginPath(),this.ctx.moveTo(e.x,e.y),this.ctx.lineTo(t.x,t.y),this.ctx.attributes.stroke=s,this.ctx.lineWidth=r,this.ctx.stroke(),this.ctx.closeGroup(),this.ctx.restore(),o}renderCurve(e){const t=this.ctx.openGroup("curve");return this.ctx.beginPath(),this.ctx.moveTo(e[0].x,e[0].y),this.ctx.bezierCurveTo(e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y),this.ctx.lineTo(e[7].x,e[7].y),this.ctx.bezierCurveTo(e[6].x,e[6].y,e[5].x,e[5].y,e[4].x,e[4].y),this.ctx.lineTo(e[0].x,e[0].y),this.ctx.closePath(),this.ctx.fill(),this.ctx.closeGroup(),t}export(){const e=this.ctx.svg.cloneNode(!0),t=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),s=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",t);s.replaceChild(e,s.documentElement);const r=new XMLSerializer().serializeToString(s),o=document.createElement("a");o.href="data:image/svg+xml; charset=utf8, "+encodeURIComponent(r.replace(/></g,`>
- \r<`)),o.download="opensheetmusicdisplay_download.svg",o.innerHTML=window.location.href+"/download",document.body.appendChild(o)}}class VexFlowInstantaneousDynamicExpression extends GraphicalInstantaneousDynamicExpression{constructor(e,t,s){super(e,t,s);const r=new Label(this.Expression);this.label=new GraphicalLabel(r,this.rules.ContinuousDynamicTextHeight,TextAlignmentEnum.CenterCenter,this.rules,this.PositionAndShape),this.label.Label.fontStyle=FontStyles.BoldItalic,this.label.setLabelPositionAndShapeBorders(),this.PositionAndShape.calculateBoundingBox()}get InstantaneousDynamic(){return this.mInstantaneousDynamicExpression}get Expression(){return DynamicEnum[this.mInstantaneousDynamicExpression.DynEnum]}}class GraphicalOctaveShift extends GraphicalObject{constructor(e,t){super(),this.getOctaveShift=e,this.setSymbol(),this.PositionAndShape=new BoundingBox$1(this,t)}setSymbol(){switch(this.getOctaveShift.Type){case OctaveEnum.VA8:this.octaveSymbol=MusicSymbol.VA8;break;case OctaveEnum.VB8:this.octaveSymbol=MusicSymbol.VB8;break;case OctaveEnum.MA15:this.octaveSymbol=MusicSymbol.MA15;break;case OctaveEnum.MB15:this.octaveSymbol=MusicSymbol.MB15;break;default:throw new ArgumentOutOfRangeException("")}}}const VF$2=Vex.Flow;class VexFlowOctaveShift extends GraphicalOctaveShift{constructor(e,t){switch(super(e,t),e.Type){case OctaveEnum.VA8:this.position=VF$2.TextBracket.Positions.TOP,this.supscript="va",this.text="8";break;case OctaveEnum.MA15:this.position=VF$2.TextBracket.Positions.TOP,this.supscript="ma",this.text="15";break;case OctaveEnum.VB8:this.position=VF$2.TextBracket.Positions.BOTTOM,this.supscript="vb",this.text="8";break;case OctaveEnum.MB15:this.position=VF$2.TextBracket.Positions.BOTTOM,this.supscript="mb",this.text="15";break;default:loglevelExports.error("Unknown or NONE octaveshift. This should not be called!");break}}setStartNote(e){for(const t of e.graphicalVoiceEntries){const s=t;if(s!=null&&s.vfStaveNote)return this.startNote=s.vfStaveNote,!0}return!1}setEndNote(e){for(const t of e.graphicalVoiceEntries){const s=t;if(s!=null&&s.vfStaveNote)return this.endNote=s.vfStaveNote,!0}return!1}getTextBracket(){return new VF$2.TextBracket({position:this.position,start:this.startNote,stop:this.endNote,superscript:this.supscript,text:this.text})}}class VexflowStafflineNoteCalculator{constructor(e){this.staffPitchListMapping=new Dictionary,this.baseLineNote=NoteEnum.B,this.baseLineOctave=1,this.rules=e}trackNote(e){if(!(e instanceof VexFlowGraphicalNote)||e.Clef().ClefType!==ClefEnum.percussion||e.sourceNote.isRest()||this.rules.PercussionOneLineCutoff===0||this.rules.PercussionForceVoicesOneLineCutoff===-1)return;const t=e.parentVoiceEntry.parentStaffEntry.sourceStaffEntry.ParentStaff.idInMusicSheet;let s;this.staffPitchListMapping.containsKey(t)||this.staffPitchListMapping.setValue(t,new Array),s=this.staffPitchListMapping.getValue(t);const r=e.sourceNote.Pitch;VexflowStafflineNoteCalculator.findOrInsert(s,r)}static PitchIndexOf(e,t,s=0){if(s>e.length-1)return-1;for(let r=s;r<e.length;r++){const o=e[r];if(t.OperatorEquals(o))return r}return-1}static findOrInsert(e,t){for(let s=0;s<e.length;s++){const r=e[s];if(t.OperatorEquals(r))return s;if(t.OperatorFundamentalLessThan(r))return e.splice(s,0,t),s}return e.push(t),e.length-1}positionNote(e){const t=e.parentVoiceEntry.parentStaffEntry.sourceStaffEntry.ParentStaff.idInMusicSheet;if(!(e instanceof VexFlowGraphicalNote)||e.sourceNote.isRest()||!this.staffPitchListMapping.containsKey(t))return e;const s=this.staffPitchListMapping.getValue(t),r=this.rules.PercussionUseXMLDisplayStep&&e.sourceNote.displayStepUnpitched!==void 0;if(s.length>this.rules.PercussionOneLineCutoff&&!r)return e;const o=e,a=e.sourceNote.Pitch;let l=this.baseLineNote,c=this.baseLineOctave;if(this.rules.PercussionUseXMLDisplayStep&&e.sourceNote.displayStepUnpitched!==void 0&&(l=e.sourceNote.displayStepUnpitched,c=e.sourceNote.displayOctaveUnpitched+this.rules.PercussionOneLineXMLDisplayStepOctaveOffset),s.length<=this.rules.PercussionForceVoicesOneLineCutoff)o.setAccidental(new Pitch(l,c,a.Accidental));else{const d=VexflowStafflineNoteCalculator.PitchIndexOf(s,a);if(d>-1){const m=Math.ceil(s.length/2);if(!this.rules.PercussionUseXMLDisplayStep)if(d>=m)switch(c=2,(d-m)%5){case 1:l=NoteEnum.E;break;case 2:l=NoteEnum.G;break;case 3:l=NoteEnum.B;break;case 4:l=NoteEnum.D,c=3;break;default:l=NoteEnum.C;break}else switch(d%5){case 1:l=NoteEnum.F;break;case 2:l=NoteEnum.D;break;case 3:l=NoteEnum.B,c=0;break;case 4:l=NoteEnum.G,c=0;break;default:l=NoteEnum.A;break}const u=new Pitch(l,c,a.Accidental);o.setAccidental(u);const g=o.parentVoiceEntry.parentVoiceEntry;!this.rules.SetWantedStemDirectionByXml&&g.Notes.length<2&&(u.Octave>this.baseLineOctave||u.FundamentalNote===this.baseLineNote&&u.Octave===this.baseLineOctave?o.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=StemDirectionType.Up:o.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=StemDirectionType.Down)}}return o}getStafflineUniquePositionCount(e){return this.staffPitchListMapping.containsKey(e)?this.staffPitchListMapping.getValue(e).length:0}}class SkyBottomLineCalculator{constructor(e){this.mStaffLineParent=e,this.mRules=e.ParentMusicSystem.rules}calculateLines(){const e=Math.max(Math.ceil(this.StaffLineParent.PositionAndShape.Size.width*this.SamplingUnit),1);this.mSkyLine=[],this.mBottomLine=[];const t=new CanvasVexFlowBackend(this.StaffLineParent.ParentMusicSystem.rules);for(const a of this.StaffLineParent.Measures){a.PositionAndShape.calculateAbsolutePositionsRecursive(0,0);const l=a.getVFStave();let c=l.getWidth();if(!(c>0)&&!a.IsExtraGraphicalMeasure&&(loglevelExports.warn("SkyBottomLineCalculator: width not > 0 in measure "+a.MeasureNumber),c=50),!(c>=50)&&a.IsExtraGraphicalMeasure)continue;t.initializeHeadless(c);const d=t.getContext(),m=t.getCanvas();c=m.width;const u=m.height;this.mRules.DYMusicScoreType==="jianpu"?l.setY(l.y-50):l.setY(l.y+100);const g=l.getWidth();l.setWidth(c),a.format(),l.setWidth(g);try{a.draw(d)}catch(A){loglevelExports.warn("SkyBottomLineCalculator.calculateLines.draw",A)}const b=d.getImageData(0,0,c,u),y=4,S=Math.max(Math.ceil(a.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),v=new Array(S),x=new Array(S);for(let A=0;A<c;A++){for(let E=0;E<u;E++){const _=E*c*y+A*y;if(b.data[_+3]>0){v[A]=E;break}}for(let E=u;E>0;E--){const _=E*c*y+A*y;if(b.data[_+3]>0){x[A]=E;break}}}for(let A=0;A<v.length;A++)v[A]===void 0&&(v[A]=Math.max(this.findPreviousValidNumber(A,v),this.findNextValidNumber(A,v)));for(let A=0;A<x.length;A++)x[A]===void 0&&(x[A]=Math.max(this.findPreviousValidNumber(A,x),this.findNextValidNumber(A,x)));this.mSkyLine.push(...v),this.mBottomLine.push(...x),t.clear()}const s=this.mSkyLine.length/e,r=[],o=[];for(let a=0;a<this.mSkyLine.length&&r.length!==e;a+=s){const l=Math.min(this.mSkyLine.length,a+s);let c=this.mSkyLine.slice(a,l+1);r.push(Math.min(...c)),c=this.mBottomLine.slice(a,l+1),o.push(Math.max(...c))}this.mSkyLine=r,this.mBottomLine=o,this.mSkyLine.length!==e&&loglevelExports.debug(`SkyLine calculation was not correct (${this.mSkyLine.length} instead of ${e})`),this.mSkyLine=this.mSkyLine.map(a=>(a-Math.max(...this.mSkyLine))/unitInPixels+this.StaffLineParent.TopLineOffset),this.mBottomLine=this.mBottomLine.map(a=>(a-Math.min(...this.mBottomLine))/unitInPixels+this.StaffLineParent.BottomLineOffset)}findPreviousValidNumber(e,t){for(let s=e;s>=0;s--)if(!isNaN(t[s]))return t[s];return 0}findNextValidNumber(e,t){if(e>=t.length)return t[e-1];for(let s=e;s<t.length;s++)if(!isNaN(t[s]))return t[s];return 0}drawPixel(e,t,s="#FF0000FF"){const r=t.getContext(),o=r.fillStyle;r.fillStyle=s,r.fillRect(e.x,e.y,2,2),r.fillStyle=o}updateSkyLineWithWedge(e,t){let s=Math.floor(e.x*this.SamplingUnit),r=Math.ceil(t.x*this.SamplingUnit),o=(t.y-e.y)/(t.x-e.x);r-s<=1&&(r++,o=0),s<0&&(s=0),s>=this.BottomLine.length&&(s=this.BottomLine.length-1),r<0&&(r=0),r>=this.BottomLine.length&&(r=this.BottomLine.length),this.SkyLine[s]=e.y;for(let a=s+1;a<Math.min(r,this.SkyLine.length);a++)this.SkyLine[a]=this.SkyLine[a-1]+o/this.SamplingUnit}updateBottomLineWithWedge(e,t){let s=Math.floor(e.x*this.SamplingUnit),r=Math.ceil(t.x*this.SamplingUnit),o=(t.y-e.y)/(t.x-e.x);r-s<=1&&(r++,o=0),s<0&&(s=0),s>=this.BottomLine.length&&(s=this.BottomLine.length-1),r<0&&(r=0),r>=this.BottomLine.length&&(r=this.BottomLine.length),this.BottomLine[s]=e.y;for(let a=s+1;a<r;a++)this.BottomLine[a]=this.BottomLine[a-1]+o/this.SamplingUnit}updateSkyLineInRange(e,t,s){this.updateInRange(this.mSkyLine,e,t,s)}updateBottomLineInRange(e,t,s){this.updateInRange(this.BottomLine,e,t,s)}resetSkyLineInRange(e,t){this.updateInRange(this.SkyLine,e,t)}resetBottomLineInRange(e,t){this.setInRange(this.BottomLine,e,t)}setSkyLineWithValue(e){this.SkyLine.forEach(t=>e)}setBottomLineWithValue(e){this.BottomLine.forEach(t=>e)}getLeftIndexForPointX(e,t){const s=Math.floor(e*this.SamplingUnit);return s<0?0:s>=t?t-1:s}getRightIndexForPointX(e,t){const s=Math.ceil(e*this.SamplingUnit);return s<0?0:s>=t?t-1:s}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(e=>!isNaN(e)))}getSkyLineMinAtPoint(e){const t=Math.round(e*this.SamplingUnit);return this.mSkyLine[t]}getSkyLineMinInRange(e,t){return this.getMinInRange(this.SkyLine,e,t)}getBottomLineMax(){return Math.max(...this.BottomLine.filter(e=>!isNaN(e)))}getBottomLineMaxAtPoint(e){const t=Math.round(e*this.SamplingUnit);return this.mBottomLine[t]}getBottomLineMaxInRange(e,t){return this.getMaxInRange(this.BottomLine,e,t)}getBottomLineMaxInBoundingBox(e){const t=Math.floor(e.AbsolutePosition.x+e.BorderLeft),s=Math.ceil(e.AbsolutePosition.x+e.BorderRight);return this.getMaxInRange(this.mBottomLine,t,s)}updateWithBoundingBoxRecursively(e){if(e.ChildElements&&e.ChildElements.length>0)for(const t of e.ChildElements)this.updateWithBoundingBoxRecursively(t);else{const t=e.BorderTop+e.AbsolutePosition.y,s=e.BorderBottom+e.AbsolutePosition.y;if(t<0){const r=Math.floor(e.AbsolutePosition.x+e.BorderLeft),o=Math.ceil(e.AbsolutePosition.x+e.BorderRight);this.updateInRange(this.mSkyLine,r,o,t)}else if(s>this.StaffLineParent.StaffHeight){const r=Math.floor(e.AbsolutePosition.x+e.BorderLeft),o=Math.ceil(e.AbsolutePosition.x+e.BorderRight);this.updateInRange(this.mBottomLine,r,o,s)}}}updateInRange(e,t=0,s=e.length,r=0){if(t=Math.floor(t*this.SamplingUnit),s=Math.ceil(s*this.SamplingUnit),s<t)throw new Error("start index of line is greater than the end index");t<0&&(t=0),s>e.length&&(s=e.length);for(let o=t;o<s;o++)e[o]=Math.abs(r)>Math.abs(e[o])?r:e[o]}setInRange(e,t=0,s=e.length,r=0){if(t=Math.floor(t*this.SamplingUnit),s=Math.ceil(s*this.SamplingUnit),s<t)throw new Error("start index of line is greater then the end index");t<0&&(t=0),s>e.length&&(s=e.length);for(let o=t;o<s;o++)e[o]=r}getMinInRange(e,t,s){if(t=Math.floor(t*this.SamplingUnit),s=Math.ceil(s*this.SamplingUnit),!e)return Number.MAX_VALUE;if(t<0&&(t=0),t>=e.length&&(t=e.length-1),s<0&&(s=0),s>=e.length&&(s=e.length),t>=0&&s<=e.length)return Math.min(...e.slice(t,s+1))}getMaxInRange(e,t,s){if(t=Math.floor(t*this.SamplingUnit),s=Math.ceil(s*this.SamplingUnit),!e)return Number.MIN_VALUE;if(t<0&&(t=0),t>=e.length&&(t=e.length-1),s<0&&(s=0),s>=e.length&&(s=e.length),t>=0&&s<=e.length)return Math.max(...e.slice(t,s+1))}get SamplingUnit(){return this.mRules.SamplingUnit}get StaffLineParent(){return this.mStaffLineParent}get SkyLine(){return this.mSkyLine}get BottomLine(){return this.mBottomLine}}var parserExports$1={},parser$2={get exports(){return parserExports$1},set exports(i){parserExports$1=i}};/*!
- * d-path-parser - v1.0.0
- * by Massimo Artizzu (MaxArt2501)
- *
- * https://github.com/MaxArt2501/d-path-parser
- *
- * Licensed under the MIT License
- * See LICENSE for details
- */(function(i,e){(function(t,s){i.exports=s()})(commonjsGlobal,function(){return function(s){for(var r={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},o={number:function(S){return+b("number",S)},"coordinate pair":function(S){var v=b("number",S);if(v===null&&!S)return null;b("comma");var x=b("number",!0);return{x:+v,y:+x}},"arc definition":function(S){var v=o["coordinate pair"](S);if(!v&&!S)return null;b("comma");var x=+b("number",!0);b("comma",!0);var A=!!+b("flag",!0);b("comma");var E=!!+b("flag",!0);b("comma");var w=o["coordinate pair"](!0);return{radii:v,rotation:x,large:A,clockwise:E,end:w}}},a=0,l=[];a<s.length;){var c=b("command"),d=c.toUpperCase(),m=c!==d,u;switch(d){case"M":u=y("coordinate pair").map(function(S,v){return v===1&&(c=m?"l":"L"),g({end:S})});break;case"L":case"T":u=y("coordinate pair").map(function(S){return g({end:S})});break;case"C":if(u=y("coordinate pair"),u.length%3)throw Error("Expected coordinate pair triplet at position "+a);u=u.reduce(function(S,v,x){var A=x%3;if(!A)S.push(g({cp1:v}));else{var E=S[S.length-1];E[A===1?"cp2":"end"]=v}return S},[]);break;case"Q":case"S":if(u=y("coordinate pair"),u.length&1)throw Error("Expected coordinate pair couple at position "+a);u=u.reduce(function(S,v,x){var A=x&1;if(!A)S.push(g({cp:v}));else{var E=S[S.length-1];E.end=v}return S},[]);break;case"H":case"V":u=y("number").map(function(S){return g({value:S})});break;case"A":u=y("arc definition").map(g);break;case"Z":u=[{code:"Z"}];break}l.push.apply(l,u)}return l;function g(S){return S.code=c,S.relative=m,S}function b(S,v){r[S].lastIndex=a;var x=r[S].exec(s);if(!x||x.index!==a){if(!v)return null;throw Error("Expected "+S+" at position "+a)}return a=r[S].lastIndex,x[1]}function y(S){for(var v=[],x,A=!0;x=o[S](A);)v.push(x),A=!!b("comma");return v}}})})(parser$2);class SkyBottomLineCalculatorSVG extends SkyBottomLineCalculator{recursiveUpdate(e,t,s,r){const o=e.getBBox(),a=o.y/unitInPixels,l=o.height/unitInPixels+a,[c,d]=r;if(a<t.top||l>t.bottom)switch(e.tagName.toLowerCase()){case"g":for(const g of e.children)this.recursiveUpdate(g,t,s,r);break;case"circle":case"rect":case"line":case"path":let m=Math.floor((o.x-s.x)/unitInPixels*this.mRules.SamplingUnit);const u=m+Math.ceil(o.width/unitInPixels*this.mRules.SamplingUnit);if(e.parentElement.classList.contains("vf-beams")&&e.hasAttribute("d")){const g=parserExports$1(e.getAttribute("d"));if(g.length===5){const b=g[0],y=g[3],S=(y.end.y-b.end.y)/(y.end.x-b.end.x);let v=b.end.y/unitInPixels;for(m;m<=u;m++)v<c[m]&&(c[m]=v),v>d[m]&&(d[m]=v),v+=S/this.mRules.SamplingUnit}}else for(m;m<=u;m++)a<c[m]&&(c[m]=a),l>d[m]&&(d[m]=l);break}}calculateLinesForMeasure(e,t){var C,P,I;const s=t.getBBox(),r=Math.max(Math.round(e.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),o=s.height/unitInPixels,l=t.getElementsByClassName("vf-stave")[0].getBBox();let c=(l==null?void 0:l.height)/unitInPixels,d=(l==null?void 0:l.y)/unitInPixels;const m=e.getVFStave();let u=((C=m.options)!=null&&C.num_lines?m.options.num_lines:5)-1,g=-1,b=0;const y=[u];for(const R of(P=m.options)==null?void 0:P.line_config)R.visible?(g===-1&&(g=b),y.push(b)):u--,b++;const S=y.pop();g===-1&&(g=0),u=S-g;const v=(I=m.options)==null?void 0:I.spacing_between_lines_px,x=u*v/unitInPixels;c-x>.2&&(c=x,d=g*v/unitInPixels);const A=d+c,E=new Array(r).fill(d),w=new Array(r).fill(A),_=[E,w];if(o>c)for(const R of t.children)this.recursiveUpdate(R,{top:d,bottom:A},s,[E,w]);return _}calculateLines(){this.mSkyLine=[],this.mBottomLine=[];const e=document.createElement("div");document.body.append(e);const t=new SvgVexFlowBackend(this.mRules);t.initialize(e,1,"0");const s=t.getContext(),r=s.openGroup();r.classList.add("staffline");for(const o of this.StaffLineParent.Measures){o.PositionAndShape.calculateAbsolutePositionsRecursive(0,0),o.setAbsoluteCoordinates(o.PositionAndShape.AbsolutePosition.x*unitInPixels,o.PositionAndShape.AbsolutePosition.y*unitInPixels);const a=o.draw(s),[l,c]=this.calculateLinesForMeasure(o,a);this.mSkyLine.push(...l),this.mBottomLine.push(...c)}s.closeGroup();for(const o of r.getElementsByClassName("vf-ties"))for(const a of o.childNodes)if(a.nodeName.toLowerCase()==="path"){const l=a.getBBox();let c=Math.floor(l.x/unitInPixels*this.mRules.SamplingUnit);const d=c+Math.ceil(l.width/unitInPixels*this.mRules.SamplingUnit),m=l.y/unitInPixels,u=l.height/unitInPixels+m;for(c;c<=d;c++)m<this.mSkyLine[c]&&(this.mSkyLine[c]=m),u>this.mBottomLine[c]&&(this.mBottomLine[c]=u)}t.clear(),e.remove()}}const VF$1=Vex.Flow;class VexFlowGraphicalSymbolFactory{constructor(){this.hasBBox=!1,document.createElementNS("http://www.w3.org/2000/svg","g").getBBox!==void 0&&(this.hasBBox=!0)}createMusicSystem(e,t){return new VexFlowMusicSystem(e,t)}createStaffLine(e,t){return new VexFlowStaffLine(e,t)}createSkyBottomLineCalculator(e){return e.ParentMusicSystem.rules.PerformanceMode&&this.hasBBox?new SkyBottomLineCalculatorSVG(e):new SkyBottomLineCalculator(e)}createGraphicalMeasure(e,t,s=!1){return new VexFlowMeasure(t,e,void 0)}createMultiRestMeasure(e,t,s){return new VexFlowMultiRestMeasure(t,e,s)}createTabStaffMeasure(e,t){return new VexFlowTabMeasure(t,e)}createExtraGraphicalMeasure(e){const t=new VexFlowMeasure(e.ParentStaff,void 0,e);return t.IsExtraGraphicalMeasure=!0,t.ExtraGraphicalMeasurePreviousMeasure=e.Measures.last(),t}createStaffEntry(e,t){return new VexFlowStaffEntry(t,e,void 0)}createVoiceEntry(e,t){return new VexFlowVoiceEntry(e,t)}createNote(e,t,s,r=OctaveEnum.NONE,o,a=void 0){return new VexFlowGraphicalNote(e,t,s,r,o,a)}createGraceNote(e,t,s,r,o=OctaveEnum.NONE){return new VexFlowGraphicalNote(e,t,s,o,r)}addGraphicalAccidental(e,t){e.setAccidental(t)}addFermataAtTiedEndNote(e,t){}createInStaffClef(e,t){const s=e,r=VexFlowConverter.Clef(t,"small");s.vfClefBefore=new VF$1.ClefNote(r.type,r.size,r.annotation)}createChordSymbols(e,t,s,r){const o=t.parentMeasure.parentSourceMeasure.Rules;let a=0;const l=o.ChordSymbolXSpacing;for(const c of e.ChordContainers){const d=new GraphicalChordSymbolContainer(c,t.PositionAndShape,o.ChordSymbolTextHeight,s,r,t.parentMeasure.parentSourceMeasure.Rules),m=d.GraphicalLabel;m.PositionAndShape.RelativePosition.y-=o.ChordSymbolYOffset,m.PositionAndShape.RelativePosition.x+=a,m.setLabelPositionAndShapeBorders(),d.PositionAndShape.calculateBoundingBox(),t.graphicalChordContainers.push(d),a+=m.PositionAndShape.Size.width+l}}createGraphicalTechnicalInstruction(e,t){}}class GraphicalTie{constructor(e,t=void 0,s=void 0){this.tie=e,this.startNote=t,this.endNote=s}get SVGElement(){return this.vfTie.getAttribute("el")}get GetTie(){return this.tie}get StartNote(){return this.startNote}get Tie(){return this.tie}set StartNote(e){this.startNote=e}get EndNote(){return this.endNote}set EndNote(e){this.endNote=e}}class GraphicalLyricEntry{constructor(e,t,s,r){this.lyricsEntry=e,this.graphicalStaffEntry=t;const o=t.parentMeasure.parentSourceMeasure.Rules.LyricsAlignmentStandard;e.Text.length>=4&&e.Parent.Notes[0].Length.Denominator>4&&TextAlignmentEnum.LeftBottom;const a=new Label(e.Text);this.graphicalLabel=new GraphicalLabel(a,s,o,this.graphicalStaffEntry.parentMeasure.parentSourceMeasure.Rules,t.PositionAndShape),this.graphicalLabel.PositionAndShape.RelativePosition=new PointF2D(0,r),o===TextAlignmentEnum.LeftBottom&&(this.graphicalLabel.PositionAndShape.RelativePosition.x-=1)}get LyricsEntry(){return this.lyricsEntry}get ParentLyricWord(){return this.graphicalLyricWord}set ParentLyricWord(e){this.graphicalLyricWord=e}get GraphicalLabel(){return this.graphicalLabel}set GraphicalLabel(e){this.graphicalLabel=e}get StaffEntryParent(){return this.graphicalStaffEntry}set StaffEntryParent(e){this.graphicalStaffEntry=e}}class GraphicalLyricWord{constructor(e){this.graphicalLyricsEntries=[],this.lyricWord=e,this.initialize()}get GetLyricWord(){return this.lyricWord}get GraphicalLyricsEntries(){return this.graphicalLyricsEntries}set GraphicalLyricsEntries(e){this.graphicalLyricsEntries=e}isFilled(){for(let e=0;e<this.graphicalLyricsEntries.length;e++)if(!this.graphicalLyricsEntries[e])return!1;return!0}initialize(){for(let e=0;e<this.lyricWord.Syllables.length;e++)this.graphicalLyricsEntries.push(void 0)}}const _GraphicalCurve=class{constructor(){_GraphicalCurve.tPow3=new Array(_GraphicalCurve.bezierCurveStepSize),_GraphicalCurve.oneMinusTPow3=new Array(_GraphicalCurve.bezierCurveStepSize),_GraphicalCurve.bezierFactorOne=new Array(_GraphicalCurve.bezierCurveStepSize),_GraphicalCurve.bezierFactorTwo=new Array(_GraphicalCurve.bezierCurveStepSize);for(let i=0;i<_GraphicalCurve.bezierCurveStepSize;i++){const e=i/_GraphicalCurve.bezierCurveStepSize;_GraphicalCurve.tPow3[i]=Math.pow(e,3),_GraphicalCurve.oneMinusTPow3[i]=Math.pow(1-e,3),_GraphicalCurve.bezierFactorOne[i]=3*Math.pow(1-e,2)*e,_GraphicalCurve.bezierFactorTwo[i]=3*(1-e)*Math.pow(e,2)}}calculateCurvePointAtIndex(i){const e=Math.round(i*_GraphicalCurve.bezierCurveStepSize);return e<0||e>=_GraphicalCurve.bezierCurveStepSize?new PointF2D:new PointF2D(_GraphicalCurve.oneMinusTPow3[e]*this.bezierStartPt.x+_GraphicalCurve.bezierFactorOne[e]*this.bezierStartControlPt.x+_GraphicalCurve.bezierFactorTwo[e]*this.bezierEndControlPt.x+_GraphicalCurve.tPow3[e]*this.bezierEndPt.x,_GraphicalCurve.oneMinusTPow3[e]*this.bezierStartPt.y+_GraphicalCurve.bezierFactorOne[e]*this.bezierStartControlPt.y+_GraphicalCurve.bezierFactorTwo[e]*this.bezierEndControlPt.y+_GraphicalCurve.tPow3[e]*this.bezierEndPt.y)}};let GraphicalCurve=_GraphicalCurve;GraphicalCurve.bezierCurveStepSize=1e3;const _GraphicalSlur=class extends GraphicalCurve{constructor(i,e){super(),this.staffEntries=[],this.slur=i,this.rules=e}static Compare(i,e){if(i.staffEntries.length<1)return-1;if(e.staffEntries.length<1)return 1;const t=Fraction$1.minus(i.staffEntries[i.staffEntries.length-1].getAbsoluteTimestamp(),i.staffEntries[0].getAbsoluteTimestamp()),s=Fraction$1.minus(e.staffEntries[e.staffEntries.length-1].getAbsoluteTimestamp(),e.staffEntries[0].getAbsoluteTimestamp());return t.RealValue>s.RealValue?1:s.RealValue>t.RealValue?-1:0}calculateCurve(i){const e=this.staffEntries[0],t=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=t.findGraphicalNoteFromNote(this.slur.EndNote);!r&&this.graceEnd&&(r=t.findGraphicalNoteFromGraceNote(this.slur.EndNote));const o=e.parentMeasure.ParentStaffLine,a=o.SkyBottomLineCalculator;this.calculatePlacement(a,o);const l=this.calculateStartAndEnd(s,r,o,i,a),c=l.startX,d=l.endX;let m=l.startY,u=l.endY;const g=i.SlurTangentMinAngle,b=i.SlurTangentMaxAngle;let y;if(this.placement===PlacementEnum.Above){m-=i.SlurNoteHeadYOffset,u-=i.SlurNoteHeadYOffset;const S=new PointF2D(this.staffEntries[0].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[0].PositionAndShape.RelativePosition.x,m);s?S.x+=this.staffEntries[0].PositionAndShape.BorderRight:S.x=this.staffEntries[0].parentMeasure.beginInstructionsWidth,this.graceStart&&(S.x+=t.PositionAndShape.RelativePosition.x);const v=new PointF2D(this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].PositionAndShape.RelativePosition.x,u);if(r?v.x+=this.staffEntries[this.staffEntries.length-1].PositionAndShape.BorderLeft:v.x=this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.Size.width,this.graceEnd&&(v.x+=t.staffEntryParent.PositionAndShape.RelativePosition.x),y=this.calculateTopPoints(S,v,o,a),y.length===0){const ae=new PointF2D((v.x-S.x)/2+S.x,(v.y-S.y)/2+S.y);y.push(ae)}const x=Math.atan((u-m)/(d-c)),A=new PointF2D(0,0);let E=new PointF2D(d-c,-(u-m));const w=Matrix2D.getRotationMatrix(x),_=w.getTransposeMatrix();E=w.vectorMultiplication(E);const C=this.calculateTranslatedAndRotatedPointListAbove(y,c,m,w);let P=this.calculateMaxLeftSlope(C,A,E),I=this.calculateMaxRightSlope(C,A,E);const R=A.y-A.x*P,N=E.y-E.x*I,G=new PointF2D;let B=!1;Math.abs(Math.abs(P)-Math.abs(I))<1e-4?(G.x=E.x/2,G.y=0,B=!0):(G.x=(N-R)/(P-I),G.y=P*G.x+R);const k=this.calculateHeightWidthRatio(E.x,C);let T=0,V=0;if(Math.abs(k)>.001){const ae=Math.abs(P/(k*2)),de=Math.abs(P);T=Math.max(0,de*(Math.min(10,ae-1)/10)),P-=T;const le=Math.abs(I/(k*2)),me=Math.abs(I);V=Math.max(0,me*(Math.min(10,le-1)/10)),I+=V}let Z=g,W=-g;if(!B){const ae=this.calculateAngles(g,P,I,b);Z=ae.startAngle,W=ae.endAngle}const se=this.calculateControlPoints(E.x,Z,W,C,k,m,u);let ie=se.startControlPoint,fe=se.endControlPoint;ie=_.vectorMultiplication(ie),ie.x+=c,ie.y=-ie.y+m,fe=_.vectorMultiplication(fe),fe.x+=c,fe.y=-fe.y+m,this.bezierStartPt=new PointF2D(c,m-T),this.bezierStartControlPt=new PointF2D(ie.x,ie.y-T),this.bezierEndControlPt=new PointF2D(fe.x,fe.y-V),this.bezierEndPt=new PointF2D(d,u-V);const J=o.SkyLine.length,K=a.getLeftIndexForPointX(this.bezierStartPt.x,J),be=a.getLeftIndexForPointX(this.bezierEndPt.x,J),oe=this.bezierEndPt.x-this.bezierStartPt.x,Y=a.SamplingUnit;for(let ae=K;ae<be;ae++){const de=ae/Y-this.bezierStartPt.x,le=this.calculateCurvePointAtIndex(Math.abs(de)/oe);let me=a.getLeftIndexForPointX(le.x,J);me>=K&&(o.SkyLine[me]=Math.min(o.SkyLine[me],le.y)),me++,me<J&&(o.SkyLine[me]=Math.min(o.SkyLine[me],le.y))}}else{m+=i.SlurNoteHeadYOffset,u+=i.SlurNoteHeadYOffset;const S=new PointF2D(this.staffEntries[0].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[0].PositionAndShape.RelativePosition.x,m);s?S.x+=this.staffEntries[0].PositionAndShape.BorderRight:S.x=this.staffEntries[0].parentMeasure.beginInstructionsWidth,this.graceStart&&(S.x+=t.PositionAndShape.RelativePosition.x);const v=new PointF2D(this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].PositionAndShape.RelativePosition.x,u);if(r?v.x+=this.staffEntries[this.staffEntries.length-1].PositionAndShape.BorderLeft:v.x=this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.Size.width,this.graceEnd&&(v.x+=t.staffEntryParent.PositionAndShape.RelativePosition.x),y=this.calculateBottomPoints(S,v,o,a),y.length===0){const ae=new PointF2D((v.x-S.x)/2+S.x,(v.y-S.y)/2+S.y);y.push(ae)}const x=Math.atan((u-m)/(d-c)),A=new PointF2D(0,0);let E=new PointF2D(d-c,u-m);const w=Matrix2D.getRotationMatrix(-x),_=w.getTransposeMatrix();E=w.vectorMultiplication(E);const C=this.calculateTranslatedAndRotatedPointListBelow(y,c,m,w);let P=this.calculateMaxLeftSlope(C,A,E),I=this.calculateMaxRightSlope(C,A,E);const R=A.y-A.x*P,N=E.y-E.x*I,G=new PointF2D;let B=!1;Math.abs(Math.abs(P)-Math.abs(I))<1e-4?(G.x=E.x/2,G.y=0,B=!0):(G.x=(N-R)/(P-I),G.y=P*G.x+R);const k=this.calculateHeightWidthRatio(E.x,C);let T=0,V=0;if(Math.abs(k)>.001){const ae=Math.abs(P/(k*2)),de=Math.abs(P);T=Math.max(0,de*(Math.min(10,ae-1)/10)),P-=T;const le=Math.abs(I/(k*2)),me=Math.abs(I);V=Math.max(0,me*(Math.min(10,le-1)/10)),I+=V}let Z=g,W=-g;if(!B){const ae=this.calculateAngles(g,P,I,b);Z=ae.startAngle,W=ae.endAngle}const se=this.calculateControlPoints(E.x,Z,W,C,k,m,u);let ie=se.startControlPoint,fe=se.endControlPoint;ie=_.vectorMultiplication(ie),ie.x+=c,ie.y+=m,fe=_.vectorMultiplication(fe),fe.x+=c,fe.y+=m,this.bezierStartPt=new PointF2D(c,m+T),this.bezierStartControlPt=new PointF2D(ie.x,ie.y+T),this.bezierEndControlPt=new PointF2D(fe.x,fe.y+V),this.bezierEndPt=new PointF2D(d,u+V);const J=o.BottomLine.length,K=a.getLeftIndexForPointX(this.bezierStartPt.x,J),be=a.getLeftIndexForPointX(this.bezierEndPt.x,J),oe=this.bezierEndPt.x-this.bezierStartPt.x,Y=a.SamplingUnit;for(let ae=K;ae<be;ae++){const de=ae/Y-this.bezierStartPt.x,le=this.calculateCurvePointAtIndex(Math.abs(de)/oe);let me=a.getLeftIndexForPointX(le.x,J);me>=K&&(o.BottomLine[me]=Math.max(o.BottomLine[me],le.y)),me++,me<J&&(o.BottomLine[me]=Math.max(o.BottomLine[me],le.y))}}}calculateStartAndEnd(i,e,t,s,r){let o=0,a=0,l=0,c=0;if(i){o=i.PositionAndShape.RelativePosition.x+i.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x+i.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x,this.graceStart&&(o+=i.parentVoiceEntry.parentStaffEntry.staffEntryParent.PositionAndShape.RelativePosition.x);const d=i.parentVoiceEntry;this.placement===PlacementEnum.Above?a=d.PositionAndShape.RelativePosition.y+d.PositionAndShape.BorderTop:a=d.PositionAndShape.RelativePosition.y+d.PositionAndShape.BorderBottom,d.parentVoiceEntry.StemDirection===StemDirectionType.Down&&this.placement===PlacementEnum.Below&&(o-=.5),d.parentVoiceEntry.StemDirection===StemDirectionType.Up&&this.placement===PlacementEnum.Above&&(o+=.5)}else o=0;if(e){l=e.PositionAndShape.RelativePosition.x+e.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x+e.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x,this.graceEnd&&(l+=e.parentVoiceEntry.parentStaffEntry.staffEntryParent.PositionAndShape.RelativePosition.x);const d=e.parentVoiceEntry;this.placement===PlacementEnum.Above?c=d.PositionAndShape.RelativePosition.y+d.PositionAndShape.BorderTop:c=d.PositionAndShape.RelativePosition.y+d.PositionAndShape.BorderBottom,d.parentVoiceEntry.StemDirection===StemDirectionType.Down&&this.placement===PlacementEnum.Below&&(l-=.5),d.parentVoiceEntry.StemDirection===StemDirectionType.Up&&this.placement===PlacementEnum.Above&&(l+=.5)}else l=t.PositionAndShape.Size.width;return!i&&!e&&(a=-1.5,c=-1.5),i||(this.placement===PlacementEnum.Above?a=c-1:a=c+1),e||(this.placement===PlacementEnum.Above?c=a-1:c=a+1),this.slur.startNoteHasMoreStartingSlurs()&&this.slur.isSlurLonger()&&(this.placement===PlacementEnum.Above?a-=s.SlursStartingAtSameStaffEntryYOffset:a+=s.SlursStartingAtSameStaffEntryYOffset),this.slur.endNoteHasMoreEndingSlurs()&&this.slur.isSlurLonger()&&(this.placement===PlacementEnum.Above?c-=s.SlursStartingAtSameStaffEntryYOffset:c+=s.SlursStartingAtSameStaffEntryYOffset),this.placement===PlacementEnum.Above?(a=Math.min(a,1.5),c=Math.min(c,1.5)):(a=Math.max(a,t.StaffHeight-1.5),c=Math.max(c,t.StaffHeight-1.5)),{startX:o,startY:a,endX:l,endY:c}}calculatePlacement(i,e){if(this.rules.SlurPlacementFromXML){this.placement=this.slur.PlacementXml;return}for(let a=0,l=this.staffEntries.length;a<l;++a)if(this.staffEntries[a].parentMeasure.hasMultipleVoices()){this.slur.StartNote.ParentVoiceEntry.ParentVoice instanceof LinkedVoice||this.slur.EndNote.ParentVoiceEntry.ParentVoice instanceof LinkedVoice?this.placement=PlacementEnum.Below:this.placement=PlacementEnum.Above;return}for(let a=0,l=this.staffEntries.length;a<l;++a)if(this.staffEntries[a].LyricsEntries.length>0){this.placement=PlacementEnum.Above;return}const t=this.staffEntries[0],s=this.staffEntries[this.staffEntries.length-1],r=t.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection,o=s.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection;if(r===o)this.placement=r===StemDirectionType.Up?PlacementEnum.Below:PlacementEnum.Above;else{let a=t.PositionAndShape.BorderLeft+t.PositionAndShape.RelativePosition.x+t.parentMeasure.PositionAndShape.RelativePosition.x,l=s.PositionAndShape.BorderRight+s.PositionAndShape.RelativePosition.x+s.parentMeasure.PositionAndShape.RelativePosition.x;this.graceStart&&(a+=s.PositionAndShape.RelativePosition.x),this.graceEnd&&(l+=s.staffEntryParent.PositionAndShape.RelativePosition.x);const c=i.getSkyLineMinInRange(a,l)*-1;i.getBottomLineMaxInRange(a,l)-e.StaffHeight>c?this.placement=PlacementEnum.Above:this.placement=PlacementEnum.Below}}calculateTopPoints(i,e,t,s){const r=[];let o=s.getRightIndexForPointX(i.x,t.SkyLine.length),a=s.getLeftIndexForPointX(e.x,t.SkyLine.length);o<0&&(o=0),a>=t.SkyLine.length&&(a=t.SkyLine.length-1);for(let l=o;l<a;l++){const c=t.SkyLine[l];if(c!==0){const d=new PointF2D((.5+l)/s.SamplingUnit,c);r.push(d)}}return r}calculateBottomPoints(i,e,t,s){const r=[];let o=s.getRightIndexForPointX(i.x,t.BottomLine.length),a=s.getLeftIndexForPointX(e.x,t.BottomLine.length);o<0&&(o=0),a>=t.BottomLine.length&&(a=t.BottomLine.length-1);for(let l=o;l<a;l++){const c=t.BottomLine[l];if(c!==0){const d=new PointF2D((.5+l)/s.SamplingUnit,c);r.push(d)}}return r}calculateMaxLeftSlope(i,e,t){let s=-Number.MAX_VALUE;const r=e.x,o=e.y;for(let a=0;a<i.length;a++)Math.abs(i[a].y-Number.MAX_VALUE)<1e-4||Math.abs(i[a].y- -Number.MAX_VALUE)<1e-4||(s=Math.max(s,(i[a].y-o)/(i[a].x-r)));return s=Math.max(s,Math.abs(t.y-o)/(t.x-r)),s=Math.min(s,5.6713),s}calculateMaxRightSlope(i,e,t){let s=Number.MAX_VALUE;const r=t.x,o=t.y;for(let a=0;a<i.length;a++)Math.abs(i[a].y-Number.MAX_VALUE)<1e-4||Math.abs(i[a].y- -Number.MAX_VALUE)<1e-4||(s=Math.min(s,(o-i[a].y)/(r-i[a].x)));return s=Math.min(s,(o-e.y)/(r-e.x)),s=Math.max(s,-5.6713),s}getPointListMaxY(i){let e=-Number.MAX_VALUE;for(let t=0,s=i.length;t<s;++t){const r=i[t];Math.abs(r.y- -Number.MAX_VALUE)<1e-4||Math.abs(r.y-Number.MAX_VALUE)<1e-4||(e=Math.max(e,r.y))}return e}calculateTranslatedAndRotatedPointListAbove(i,e,t,s){const r=[];for(let o=0;o<i.length;o++){if(Math.abs(i[o].y-Number.MAX_VALUE)<1e-4||Math.abs(i[o].y- -Number.MAX_VALUE)<1e-4)continue;let a=new PointF2D(i[o].x-e,-(i[o].y-t));a=s.vectorMultiplication(a),r.push(a)}return r}calculateTranslatedAndRotatedPointListBelow(i,e,t,s){const r=[];for(let o=0;o<i.length;o++){if(Math.abs(i[o].y-Number.MAX_VALUE)<1e-4||Math.abs(i[o].y- -Number.MAX_VALUE)<1e-4)continue;let a=new PointF2D(i[o].x-e,i[o].y-t);a=s.vectorMultiplication(a),r.push(a)}return r}calculateHeightWidthRatio(i,e){return e.length===0?0:Math.max(0,this.getPointListMaxY(e))/i}calculateControlPoints(i,e,t,s,r,o,a){let l=this.rules.SlurHeightFactor,c=1;const d=this.rules.SlurHeightFlattenLongSlursCutoffAngle,m=this.rules.SlurHeightFlattenLongSlursCutoffWidth;e>d&&i>m&&(c+=i/70*this.rules.SlurHeightFlattenLongSlursFactorByWidth,c*=1+e/30*this.rules.SlurHeightFlattenLongSlursFactorByAngle,l/=c);const u=Math.min(.5,Math.max(.1,1.7*e/80*l*Math.pow(Math.max(r,.05),.4))),g=Math.min(.5,Math.max(.1,1.7*-t/80*l*Math.pow(Math.max(r,.05),.4))),b=new PointF2D;b.x=i*u*Math.cos(e*_GraphicalSlur.degreesToRadiansFactor),b.y=i*u*Math.sin(e*_GraphicalSlur.degreesToRadiansFactor);const y=new PointF2D;y.x=i-i*g*Math.cos(t*_GraphicalSlur.degreesToRadiansFactor),y.y=-(i*g*Math.sin(t*_GraphicalSlur.degreesToRadiansFactor));let S=b.y-y.y;for(;this.rules.SlurMaximumYControlPointDistance&&Math.abs(S)>this.rules.SlurMaximumYControlPointDistance;)S<0?(b.y+=1,y.y-=1):(b.y-=1,y.y+=1),S=b.y-y.y;return{startControlPoint:b,endControlPoint:y}}calculateAngles(i,e,t,s){let o=Math.atan(e)/_GraphicalSlur.degreesToRadiansFactor;e>0?o+=20:o-=20;let a=Math.atan(t)/_GraphicalSlur.degreesToRadiansFactor;t<0?a-=20:a+=20;const l=Math.min(Math.max(i,o),s),c=Math.max(Math.min(-i,a),-s);return{startAngle:l,endAngle:c}}};let GraphicalSlur=_GraphicalSlur;GraphicalSlur.degreesToRadiansFactor=Math.PI/180;class GraphicalPedal extends GraphicalObject{constructor(e,t){super(),this.getPedal=e,this.setSymbol(),this.PositionAndShape=new BoundingBox$1(this,t)}setSymbol(){!this.getPedal.IsLine&&this.getPedal.IsSign?this.pedalSymbol=MusicSymbol.PEDAL_SYMBOL:this.getPedal.IsLine&&this.getPedal.IsSign?this.pedalSymbol=MusicSymbol.PEDAL_MIXED:this.pedalSymbol=MusicSymbol.PEDAL_BRACKET}}class VexFlowPedal extends GraphicalPedal{constructor(e,t,s=!1,r=!1){switch(super(e,t),this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET,this.ChangeBegin=!1,this.ChangeEnd=!1,this.line=-3,this.EndSymbolPositionAndShape=void 0,this.ChangeBegin=e.ChangeBegin,this.ChangeEnd=e.ChangeEnd,this.pedalSymbol){case MusicSymbol.PEDAL_SYMBOL:this.vfStyle=Vex.Flow.PedalMarking.Styles.TEXT,this.EndSymbolPositionAndShape=new BoundingBox$1(this,t);break;case MusicSymbol.PEDAL_MIXED:s&&r?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:s?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:r?this.vfStyle=Vex.Flow.PedalMarking.Styles.MIXED_OPEN_END:this.vfStyle=Vex.Flow.PedalMarking.Styles.MIXED;break;case MusicSymbol.PEDAL_BRACKET:default:s&&r?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:s?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:r?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_END:this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET;break}}setStartNote(e){if(!e)return!1;for(const t of e.graphicalVoiceEntries){const s=t;if(s!=null&&s.vfStaveNote)return this.startNote=s.vfStaveNote,this.startVfVoiceEntry=s,!0}return!1}setEndNote(e){if(!e)return!1;for(const t of e.graphicalVoiceEntries){const s=t;if(s!=null&&s.vfStaveNote)return this.endNote=s.vfStaveNote,this.endVfVoiceEntry=s,!0}return!1}setEndMeasure(e){this.endMeasure=e}CalculateBoundingBox(){}setLine(e){this.line=e}getPedalMarking(){var t,s,r,o;const e=new Vex.Flow.PedalMarking([this.startNote,this.endNote]);return this.endMeasure&&e.setEndStave(this.endMeasure.getVFStave()),e.setStyle(this.vfStyle),e.setLine(this.line),e.setCustomText(this.DepressText,this.ReleaseText),(((t=this.endVfVoiceEntry)==null?void 0:t.parentStaffEntry)===((o=(r=(s=this.endVfVoiceEntry)==null?void 0:s.parentStaffEntry)==null?void 0:r.parentMeasure)==null?void 0:o.staffEntries.last())||!this.endVfVoiceEntry)&&(e.EndsStave=!0),e.ChangeBegin=this.ChangeBegin,e.ChangeEnd=this.ChangeEnd,e}}class GraphicalWavyLine extends GraphicalObject{constructor(e,t){super(),this.getWavyLine=e,this.PositionAndShape=new BoundingBox$1(this,t)}}class VexflowVibratoBracket extends GraphicalWavyLine{constructor(e,t,s=!1){super(e,t),this.line=1,this.isVibrato=!1,this.toEndOfStopStave=!1,this.isVibrato=s}get ToEndOfStopStave(){return this.toEndOfStopStave}setStartNote(e){for(const t of e.graphicalVoiceEntries){const s=t;if(s!=null&&s.vfStaveNote)return this.startNote=s.vfStaveNote,this.startVfVoiceEntry=s,!0}return!1}setEndNote(e){for(const t of e.graphicalVoiceEntries){const s=t;if(s!=null&&s.vfStaveNote){this.endNote=s.vfStaveNote,this.endVfVoiceEntry=s;const r=this.endVfVoiceEntry.parentStaffEntry.parentMeasure.staffEntries,o=r[r.length-1];return this.toEndOfStopStave=o===this.endVfVoiceEntry.parentStaffEntry,!0}}return!1}CalculateBoundingBox(){const e=this.getVibratoBracket();this.boundingBox.Size.height=e.render_options.wave_height*.2}getVibratoBracket(){const e=new Vex.Flow.VibratoBracket({start:this.startNote,stop:this.endNote,toEndOfStopStave:this.toEndOfStopStave});return e.setLine(this.line),this.isVibrato?e.render_options.vibrato_width=20:e.render_options.wave_girth=4,e}}const VF=Vex.Flow;class VexFlowMusicSheetCalculator extends MusicSheetCalculator{constructor(e){var t,s,r,o,a,l,c,d;super(),this.beamsNeedUpdate=!1,this.rules=e,MusicSheetCalculator.symbolFactory=new VexFlowGraphicalSymbolFactory,MusicSheetCalculator.TextMeasurer=new VexFlowTextMeasurer(this.rules),MusicSheetCalculator.stafflineNoteCalculator=new VexflowStafflineNoteCalculator(this.rules),((t=this.rules.DefaultVexFlowNoteFont)==null?void 0:t.toLowerCase())==="gonville"?Vex.Flow.DEFAULT_FONT_STACK=[(s=Vex.Flow.Fonts)==null?void 0:s.Gonville,(r=Vex.Flow.Fonts)==null?void 0:r.Bravura,(o=Vex.Flow.Fonts)==null?void 0:o.Custom]:((a=this.rules.DefaultVexFlowNoteFont)==null?void 0:a.toLowerCase())==="petaluma"&&(Vex.Flow.DEFAULT_FONT_STACK=[(l=Vex.Flow.Fonts)==null?void 0:l.Petaluma,(c=Vex.Flow.Fonts)==null?void 0:c.Gonville,(d=Vex.Flow.Fonts)==null?void 0:d.Bravura])}clearRecreatedObjects(){super.clearRecreatedObjects(),MusicSheetCalculator.stafflineNoteCalculator=new VexflowStafflineNoteCalculator(this.rules);for(const e of this.graphicalMusicSheet.MeasureList)for(const t of e)t==null||t.clean()}formatMeasures(){for(const e of this.graphicalMusicSheet.MeasureList){if(!e||!e[0])continue;e[0].format();for(const s of e){for(const r of s.staffEntries)r.calculateXPosition();s.finalizeBeams()}}this.beamsNeedUpdate=!1}calculateMeasureXLayout(e){const t=[];for(const m of e)m&&t.push(m);if(t.length===0)return 0;e=t;const s=[],r=new VF.Formatter({softmaxFactor:this.rules.SoftmaxFactorVexFlow});let o=e[0].staffEntries.length,a=1;for(const m of e){if(!m)continue;let u=0;for(const y of m.staffEntries)u+=y.setMaxAccidentals();m.parentSourceMeasure.ImplicitMeasure&&(o=Math.max(m.staffEntries.length,o),a=Math.max(m.staffEntries.length+u,a));const g=m.vfVoices,b=[];for(const y in g)g.hasOwnProperty(y)&&(b.push(g[y]),s.push(g[y]));if(b.length===0){loglevelExports.debug("Found a measure with no voices. Continuing anyway.",g);continue}r.joinVoices(b)}let l=12;const c=e[0].parentSourceMeasure,d=.3;if(s.length>0){l=r.preCalculateMinTotalWidth(s)/unitInPixels*this.rules.VoiceSpacingMultiplierVexflow+this.rules.VoiceSpacingAddendVexflow+o*d,c!=null&&c.ImplicitMeasure&&(l=c.Duration.RealValue/c.ActiveTimeSignature.RealValue*l,o>1&&(l+=a*d*1.5),l*=this.rules.PickupMeasureWidthMultiplier),MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(e,l);const m=(g,b)=>{r.formatToStave(s,b.getVFStave())},u=(g,b)=>{r.formatToStave(s,b.getVFStave(),{align_rests:!0,context:void 0})};for(const g of e){if(this.rules.AlignRests===AlignRestOption.Never)g.formatVoices=m;else if(this.rules.AlignRests===AlignRestOption.Always)g.formatVoices=u;else if(this.rules.AlignRests===AlignRestOption.Auto){let b=!1;for(const y of g.staffEntries){let S=0,v=0;for(const x of y.graphicalVoiceEntries)if(x.parentVoiceEntry.IsGrace||x&&x.notes&&x.notes[0]&&x.notes[0].sourceNote&&x.notes[0].sourceNote.PrintObject&&S++,x&&x.notes&&x.notes[0]&&x.notes[0].sourceNote&&x.notes[0].sourceNote.isRest()&&x.notes[0].sourceNote.PrintObject&&v++,S>1&&v>=1){b=!0;break}if(b)break}b?g.formatVoices=u:g.formatVoices=m}if(g===e[0]){const b=g;b.formatVoices(l*unitInPixels,b)}}}for(const m of e)if(m)for(const u of m.staffEntries)u.calculateXPosition();for(const m of e){if(!m)continue;const u=m.vfVoices,g=[];for(const b in u)u.hasOwnProperty(b)&&g.push(u[b]);if(g.length===0){loglevelExports.debug("Found a measure with no voices. Continuing anyway.",u);continue}r.joinVoices(g)}return l}calculateElongationFactor(e,t,s,r,o,a,l,c){let d=o,m=0;for(const u of e){const g=u.GraphicalLabel.Label.textAlignment;let b=l,y=c;if(u instanceof GraphicalLyricEntry&&u.ParentLyricWord){u.LyricsEntry.SyllableIndex>0&&(b=this.rules.BetweenSyllableMinimumDistance,TextAlignment.IsCenterAligned(g)&&(b+=1));const B=u.ParentLyricWord.GetLyricWord.Syllables;B.length>1&&u.LyricsEntry.SyllableIndex<B.length-1&&(this.dashSpace===void 0&&(this.dashSpace=1.5),y-=this.dashSpace)}const S=u instanceof GraphicalLyricEntry?u.GraphicalLabel.PositionAndShape:u.PositionAndShape,v=S.Size.width,A=t.PositionAndShape.RelativePosition.x+S.BorderMarginLeft;s[m]!==void 0&&s[m].extend;let E,w;s[m]&&(w=A-s[m].xPosition);let _,C;const P=r*o;TextAlignment.IsCenterAligned(g)?(y/=4,_=P-A,C=v/2-y,s[m]&&(E=s[m].labelWidth/2+v/2+b)):TextAlignment.IsLeft(g)&&(_=P-A,C=v-y,s[m]&&(E=s[m].labelWidth+b));let I=1;const R=C/_;let N=1;if(u instanceof GraphicalLyricEntry&&u.LyricsEntry){if(s[m]){const B=s[m].sourceNoteDuration;N=E/w,B.Denominator>4&&(N*=1.1)}}else s[m]&&(N=E/w);I=Math.max(R,N),d=Math.max(d,I);let G=Math.max(E-w||0,0);s[m]&&(G+=s[m].cumulativeOverlap),s[m]={cumulativeOverlap:G,extend:u instanceof GraphicalLyricEntry?u.LyricsEntry.extend:!1,labelWidth:v,measureNumber:a,sourceNoteDuration:u instanceof GraphicalLyricEntry?u.LyricsEntry&&u.LyricsEntry.Parent.Notes[0].Length:!1,text:u instanceof GraphicalLyricEntry?u.LyricsEntry.Text:u.GraphicalLabel.Label.text,xPosition:A},m++}return d}calculateElongationFactorFromStaffEntries(e,t,s,r){let o=s;const a={},l={};for(const c of e)c.LyricsEntries.length>0&&(o=this.calculateElongationFactor(c.LyricsEntries,c,a,t,o,r,this.rules.HorizontalBetweenLyricsDistance,this.rules.LyricOverlapAllowedIntoNextMeasure)),c.graphicalChordContainers.length>0&&(o=this.calculateElongationFactor(c.graphicalChordContainers,c,l,t,o,r,this.rules.ChordSymbolXSpacing,this.rules.ChordOverlapAllowedIntoNextMeasure));return o}calculateMeasureWidthFromStaffEntries(e,t){var a;let s=1;if(!((a=window.GYM)==null?void 0:a.multitrack))for(const l of e)!l||l.staffEntries.length===0||(s=this.calculateElongationFactorFromStaffEntries(l.staffEntries,t,s,l.MeasureNumber),s=1);return s=Math.min(s,this.rules.MaximumLyricsElongationFactor),t*s}createGraphicalTie(e,t,s,r,o){return new GraphicalTie(e,r,o)}updateStaffLineBorders(e){e.SkyBottomLineCalculator.updateStaffLineBorders()}graphicalMeasureCreatedCalculations(e){e.rules=this.rules,e.graphicalMeasureCreatedCalculations()}layoutVoiceEntry(e,t,s,r){for(let o=0;o<t.length;o++)t[o]=MusicSheetCalculator.stafflineNoteCalculator.positionNote(t[o])}layoutStaffEntry(e){e.parentMeasure.layoutStaffEntry(e)}initGraphicalMeasuresCreation(){}layoutArticulationMarks(e,t,s){}layoutGraphicalTie(e,t,s){var m,u,g,b,y,S;const r=e.StartNote,o=e.EndNote;let a,l=0;r&&r.vfnote&&r.vfnote.length>=2&&(a=r.vfnote[0],l=r.vfnote[1]);let c,d=0;if(o&&o.vfnote&&o.vfnote.length>=2&&(c=o.vfnote[0],d=o.vfnote[1]),t){if(a){const v=new VF.StaveTie({first_indices:[l],first_note:a}),x=r.parentVoiceEntry.parentStaffEntry.parentMeasure;if(c){c.getDuration()==="w"&&((u=(m=c.keyProps)==null?void 0:m[0])==null?void 0:u.line)>=3&&c.setStemDirection(-1);let A=((g=window.GYM)==null?void 0:g.tieDirection)||0;Math.abs(A)===1&&(((y=(b=c.keyProps)==null?void 0:b[0])==null?void 0:y.line)>=3?c.setStemDirection(-A):c.setStemDirection(A)),v==null||v.setDirection(c.getStemDirection())}if(x.vfTies.length>0){const A=x.vfTies[0].direction;v==null||v.setDirection(A?-A:1)}x.addStaveTie(v,e)}if(c){const v=new VF.StaveTie({last_indices:[d],last_note:c}),x=o.parentVoiceEntry.parentStaffEntry.parentMeasure;if(x.vfTies.length>0){const A=x.vfTies[0].direction;v==null||v.setDirection(A?-A:1)}x.addStaveTie(v,e)}}else if(a||c){let v;if(s)if(e.Tie.Type==="S"){const E=e.StartNote.sourceNote,w=e.EndNote.sourceNote;let _=1;E.FretNumber>w.FretNumber&&(_=-1),v=new VF.TabSlide({first_indices:[l],first_note:a,last_indices:[d],last_note:c},_)}else v=new VF.TabTie({first_indices:[l],first_note:a,last_indices:[d],last_note:c},e.Tie.Type);else{v=new VF.StaveTie({first_indices:[l],first_note:a,last_indices:[d],last_note:c});const E=e.Tie.getTieDirection(r.sourceNote);E===PlacementEnum.Below?v.setDirection(1):E===PlacementEnum.Above&&v.setDirection(-1);try{Math.abs((a==null?void 0:a.getTieRightX())-(c==null?void 0:c.getTieLeftX()))<10&&(v.render_options.first_x_shift=-3,v.render_options.last_x_shift=3)}catch(w){console.log(w)}}const x=o.parentVoiceEntry.parentStaffEntry.parentMeasure,A=((S=window.GYM)==null?void 0:S.graceCustom)||!1;A&&v.setDirection(A.direction),x.addStaveTie(v,e)}}calculateDynamicExpressionsForMultiExpression(e,t,s){if(t<this.rules.MinMeasureToDrawIndex||t>this.rules.MaxMeasureToDrawIndex)return;const r=e.AbsoluteTimestamp,o=this.graphicalMusicSheet.MeasureList[t],a=o[s].ParentStaffLine,l=o[s];if(!a)return;const c=this.getRelativePositionInStaffLineFromTimestamp(r,s,a,a==null?void 0:a.isPartOfMultiStaffInstrument());if(c.x<=0&&(c.x=l.beginInstructionsWidth+this.rules.RhythmRightMargin),e.InstantaneousDynamic){const d=new VexFlowInstantaneousDynamicExpression(e.InstantaneousDynamic,a,l);this.calculateGraphicalInstantaneousDynamicExpression(d,c,r),this.dynamicExpressionMap.set(r.RealValue,d.PositionAndShape)}if(e.StartingContinuousDynamic){const d=e.StartingContinuousDynamic,m=new VexFlowContinuousDynamicExpression(e.StartingContinuousDynamic,a,l.parentSourceMeasure);if(m.StartMeasure=l,!m.IsVerbal&&d.EndMultiExpression)try{this.calculateGraphicalContinuousDynamic(m,c),m.updateSkyBottomLine()}catch(u){}else m.IsVerbal?this.calculateGraphicalVerbalContinuousDynamic(m,c):loglevelExports.warn("This continuous dynamic is not covered. measure"+e.SourceMeasureParent.MeasureNumber)}}createMetronomeMark(e,t){var A,E,w,_,C,P,I,R,N;const s=Math.max(e.ParentMultiTempoExpression.SourceMeasureParent.MeasureNumber-1,0),r=t||s,o=Math.max(e.StaffNumber-1,0),a=this.graphicalMusicSheet.MeasureList[r][o].getVFStave();let l="q";if(e.beatUnit){const G=NoteTypeHandler.getNoteDurationFromType(e.beatUnit);l=VexFlowConverter.durations(G,!1)[0]}let c=this.rules.MetronomeMarkYShift,d=!1;const m=[];if(e.parentMeasure){for(const G of e.parentMeasure.StaffLinkedExpressions)for(const B of G)B&&B instanceof UnknownExpression&&m.push(B);for(const G of e.parentMeasure.TempoExpressions){const B=((A=G.InstantaneousTempo)==null?void 0:A.Enum)===TempoEnum.metronomeMark;if(!e.beatUnit&&G.InstantaneousTempo.beatUnit){const k=NoteTypeHandler.getNoteDurationFromType(e.beatUnit);l=VexFlowConverter.durations(k,!1)[0]}if(G.getPlacementOfFirstEntry()===PlacementEnum.Above&&!B){d=!0;break}}}d&&(c-=1.4);const u=(E=this.graphicalMusicSheet.MeasureList[0][0].ParentStaffLine)==null?void 0:E.SkyLine;let g=e.TempoInBpm,b="",y="",S="";for(const G of this.graphicalMusicSheet.MeasureList[r][o].parentSourceMeasure.TempoExpressions){if(y=G.CombinedExpressionsText,isSpecialMark(G.CombinedExpressionsText)){b=G.CombinedExpressionsText;break}if(isSpeedKeyword(G.CombinedExpressionsText)||isSpeedHiddenKeyword(G.CombinedExpressionsText)){b=formatSpeedKeyword(G.CombinedExpressionsText),g=G.sourceMeasure.TempoInBPM,isSpeedKeyword(G.CombinedExpressionsText)&&(S=l);break}}const v={bpm:e.TempoInBpm,dots:e.dotted,duration:l,name:b};b&&(v.bpm=g/(v.dots?1.5:1),isSpeedKeyword(y)?v.duration=S:(g===SpeedTag[b]||!SpeedTag[b])&&(v.duration=""));const x=((_=(w=this.graphicalMusicSheet.MeasureList[r][o].vfVoices)==null?void 0:w[1])==null?void 0:_.boundingBox.y)||0;if(this.rules.MetronomeMarksDrawn){if(u){const T=((P=(C=this.graphicalMusicSheet.MeasureList[0])==null?void 0:C[o])==null?void 0:P.ParentStaffLine).Measures.map(V=>V.MeasureNumber-1);if(x&&T.includes(r)&&(isSpeedKeyword(y)||isSpeedHiddenKeyword(y))){const V=u.slice(0,9);let Z=Math.min(...V);Z=Z<0?Z-1:Z,c+=Z}T.includes(r)&&m.length?u[0]=Math.min(u[0],-4.5+c-4):u[0]=Math.min(u[0],-4.5+c)}a.options.line_config.reduce((k,T)=>(T.visible&&k++,k),0)<5&&(c-=2),a.setTempo(v,c*unitInPixels);let B=0;try{const k=(N=(R=(I=this.graphicalMusicSheet.MeasureList[r][o])==null?void 0:I.vfVoices)==null?void 0:R[1])==null?void 0:N.getTickables();B+=k[e.parentMeasure.metronomeNoteIndex].getBoundingBox().getX()-a.getNoteStartX()}catch(k){}a.getModifiers()[a.getModifiers().length-1].setShiftX(B)}}calculateRehearsalMark(e){var d,m,u,g,b,y,S,v;const t=e.rehearsalExpression;if(!t)return;const s=(u=(m=(d=e.VerticalMeasureList)==null?void 0:d[0])==null?void 0:m.getVFStave)==null?void 0:u.call(m);if(!s)return;const r=-this.rules.RehearsalMarkYOffsetDefault-this.rules.RehearsalMarkYOffset;let o=this.rules.RehearsalMarkXOffsetDefault+this.rules.RehearsalMarkXOffset;e.IsSystemStartMeasure&&(o+=this.rules.RehearsalMarkXOffsetSystemStartMeasure);const a=this.rules.RehearsalMarkFontSize,l=s.getModifiers(),c=l.find(x=>x.getCategory().toLocaleLowerCase()==="repetitions");if(c&&c.setShiftY(c.y_shift-10),s.setSection(t.label,r,o,a),(b=(g=e.VerticalMeasureList)==null?void 0:g[0])!=null&&b.ParentStaffLine.AbstractExpressions){const x=l.find(A=>A.getCategory().toLocaleLowerCase()==="stavesection");for(let A of((v=(S=(y=e==null?void 0:e.VerticalMeasureList)==null?void 0:y[0])==null?void 0:S.ParentStaffLine)==null?void 0:v.AbstractExpressions)||[])A instanceof GraphicalUnknownExpression&&(x&&(A.Label.PositionAndShape.RelativePosition.y-=.5),c&&(A.Label.PositionAndShape.RelativePosition.y-=1.7))}}calculateSingleOctaveShift(e,t,s,r){var y;const o=t.OctaveShiftStart,a=o.ParentStartMultiExpression.Timestamp,l=(y=o.ParentEndMultiExpression)==null?void 0:y.Timestamp,c=this.rules.MinMeasureToDrawIndex,d=this.rules.MaxMeasureToDrawIndex;let m=this.graphicalMusicSheet.MeasureList[s][r].ParentStaffLine;m||(m=this.graphicalMusicSheet.MeasureList[c][r].ParentStaffLine);let u;o.ParentEndMultiExpression?u=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentEndMultiExpression.SourceMeasureParent,r):u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(r,!0),u.MeasureNumber>d+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(r,!0));let g;if(o.ParentEndMultiExpression?g=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,r):g=this.graphicalMusicSheet.MeasureList[c][r],g.MeasureNumber<c+1&&(g=this.graphicalMusicSheet.MeasureList[c][r]),g.parentSourceMeasure.measureListIndex<c||g.parentSourceMeasure.measureListIndex>d||u.parentSourceMeasure.measureListIndex<c||u.parentSourceMeasure.measureListIndex>d)return;let b=u.ParentStaffLine;if(b||(b=m),u&&m&&b){const S=new VexFlowOctaveShift(o,m.PositionAndShape);if(!S.startNote){let A;for(const E of g.staffEntries)if(E){A=E;break}if(!A||(S.setStartNote(A),!S.startNote))return}if(!S.endNote){let A;for(let E=u.staffEntries.length-1;E>=0;E++)if(u.staffEntries[E]){A=u.staffEntries[E];break}if(S.setEndNote(A),!S.endNote)return}let v=g.findGraphicalStaffEntryFromTimestamp(a);v||(v=g.staffEntries[0]);let x=u.findGraphicalStaffEntryFromTimestamp(l);if(x||(x=u.staffEntries[u.staffEntries.length-1]),S.setStartNote(v),b!==m){S.endsOnDifferentStaffLine=!0;let A=m.Measures[m.Measures.length-1];A===void 0&&(A=u);const E=A.staffEntries[A.staffEntries.length-1];S.setEndNote(E);const w=b.ParentMusicSystem.Id-m.ParentMusicSystem.Id;if(w>0)for(let _=m.ParentMusicSystem.Id;_<b.ParentMusicSystem.Id;_++){const C=_+1,I=this.musicSystems[C].StaffLines[r],R=I.Measures[0],N=new VexFlowOctaveShift(o,R.PositionAndShape);_<w&&(N.endsOnDifferentStaffLine=!0);let G=I.Measures[I.Measures.length-1];G.IsExtraGraphicalMeasure&&(G=I.Measures[I.Measures.length-2]);const B=R.staffEntries[0];let k=G.staffEntries[G.staffEntries.length-1];u.ParentStaffLine===I&&(G=u,k=x);const T="VexFlowMusicSheetCalculator.calculateSingleOctaveShift: ";B||loglevelExports.warn(T+"no firstNote found"),k||loglevelExports.warn(T+"no lastNote found"),N.setStartNote(B),N.setEndNote(k),I.OctaveShifts.push(N),this.calculateOctaveShiftSkyBottomLine(B,k,N,I)}this.calculateOctaveShiftSkyBottomLine(v,E,S,m)}else S.setEndNote(x),this.calculateOctaveShiftSkyBottomLine(v,x,S,m);m.OctaveShifts.push(S)}else loglevelExports.warn("End measure or staffLines for octave shift are undefined! This should not happen!")}calculateSinglePedal(e,t,s,r){var y;const o=t.PedalStart,a=o.ParentStartMultiExpression.Timestamp,l=(y=o.ParentEndMultiExpression)==null?void 0:y.Timestamp,c=this.rules.MinMeasureToDrawIndex,d=this.rules.MaxMeasureToDrawIndex;let m=this.graphicalMusicSheet.MeasureList[s][r].ParentStaffLine;m||(m=this.graphicalMusicSheet.MeasureList[c][r].ParentStaffLine);let u;o.ParentEndMultiExpression?u=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentEndMultiExpression.SourceMeasureParent,r):u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(r,!0),u||(u=o.ParentStartMultiExpression.SourceMeasureParent.VerticalMeasureList[r]),u.MeasureNumber>d+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(r,!0));let g;if(o.ParentEndMultiExpression?g=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,r):(g=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,r),g||(g=this.graphicalMusicSheet.MeasureList[c][r])),g.MeasureNumber<c+1&&(g=this.graphicalMusicSheet.MeasureList[c][r]),g.parentSourceMeasure.measureListIndex<c||g.parentSourceMeasure.measureListIndex>d||u.parentSourceMeasure.measureListIndex<c||u.parentSourceMeasure.measureListIndex>d)return;let b=u.ParentStaffLine;if(b||(b=m),u&&m&&b){let S=!1;m!==b&&(S=!0);const v=new VexFlowPedal(o,m.PositionAndShape,!1,S);let x=g.findGraphicalStaffEntryFromTimestamp(a);x||(x=g.staffEntries[0]);let A=u.findGraphicalStaffEntryFromTimestamp(l);if(A||(A=u.staffEntries[u.staffEntries.length-1]),!v.setStartNote(x))return;if(b!==m)if(v.pedalSymbol===MusicSymbol.PEDAL_SYMBOL){v.setEndNote(A),v.setEndMeasure(u),v.ReleaseText=" ",v.CalculateBoundingBox(),this.calculatePedalSkyBottomLine(v.startVfVoiceEntry,v.endVfVoiceEntry,v,m);const E=b.Measures[0],w=new VexFlowPedal(o,E.PositionAndShape),_=E.staffEntries[0];if(!w.setStartNote(_))return;w.setEndNote(A),v.setEndMeasure(u),b.Pedals.push(w),w.CalculateBoundingBox(),w.DepressText=" ",this.calculatePedalSkyBottomLine(w.startVfVoiceEntry,w.endVfVoiceEntry,w,b)}else{let E=m.Measures[m.Measures.length-1];E===void 0&&(E=u);const w=E.staffEntries[E.staffEntries.length-1];v.setEndNote(w),v.setEndMeasure(u),v.ChangeEnd=!1;const _=b.ParentMusicSystem.Id-m.ParentMusicSystem.Id;if(_>0){let C=1;for(let P=m.ParentMusicSystem.Id;P<b.ParentMusicSystem.Id;P++){const R=this.musicSystems[P+1].StaffLines[r],N=R.Measures[0];let G=!1,B=!1;C<_?G=!0:B=!0,C++;const k=new VexFlowPedal(o,N.PositionAndShape,!0,G);k.ChangeBegin=!1,B?k.ChangeEnd=o.ChangeEnd:k.ChangeEnd=!1;let T=R.Measures[R.Measures.length-1];const V=N.staffEntries[0];let Z=T.staffEntries[T.staffEntries.length-1];if(u.ParentStaffLine===R&&(T=u,Z=A),!k.setStartNote(V))break;k.setEndNote(Z),v.setEndMeasure(u),R.Pedals.push(k),k.CalculateBoundingBox(),this.calculatePedalSkyBottomLine(k.startVfVoiceEntry,k.endVfVoiceEntry,k,R)}}v.CalculateBoundingBox(),this.calculatePedalSkyBottomLine(v.startVfVoiceEntry,v.endVfVoiceEntry,v,m)}else v.setEndNote(A),v.setEndMeasure(u),v.CalculateBoundingBox(),this.calculatePedalSkyBottomLine(v.startVfVoiceEntry,v.endVfVoiceEntry,v,m);m.Pedals.push(v)}else loglevelExports.warn("End measure or staffLines for pedal are undefined! This should not happen!")}calculateSingleWavyLine(e,t,s,r){var y,S;const o=t.WavyLineStart,a=o.ParentStartMultiExpression.Timestamp,l=(y=o.ParentEndMultiExpression)==null?void 0:y.Timestamp,c=this.rules.MinMeasureToDrawIndex,d=this.rules.MaxMeasureToDrawIndex;let m=this.graphicalMusicSheet.MeasureList[s][r].ParentStaffLine;m||(m=this.graphicalMusicSheet.MeasureList[c][r].ParentStaffLine);let u;o.ParentEndMultiExpression?u=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentEndMultiExpression.SourceMeasureParent,r):u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(r,!0),u.MeasureNumber>d+1&&(u=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(r,!0));let g;if(o.ParentEndMultiExpression?g=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(o.ParentStartMultiExpression.SourceMeasureParent,r):g=this.graphicalMusicSheet.MeasureList[c][r],g.MeasureNumber<c+1&&(g=this.graphicalMusicSheet.MeasureList[c][r]),g.parentSourceMeasure.measureListIndex<c||g.parentSourceMeasure.measureListIndex>d||u.parentSourceMeasure.measureListIndex<c||u.parentSourceMeasure.measureListIndex>d)return;let b=u.ParentStaffLine;if(b||(b=m),u&&m&&b){const v=new VexflowVibratoBracket(o,m.PositionAndShape,g.ParentStaff.isTab);let x=g.findGraphicalStaffEntryFromTimestamp(a);x||(x=g.staffEntries[0]);let A=u.findGraphicalStaffEntryFromTimestamp(l);if(A||(A=u.staffEntries[u.staffEntries.length-1]),v.setStartNote(x),b!==m){let E=m.Measures[m.Measures.length-1];E===void 0&&(E=u);const w=E.staffEntries[E.staffEntries.length-1];if(v.setEndNote(w),b.ParentMusicSystem.Id-m.ParentMusicSystem.Id>0)for(let C=m.ParentMusicSystem.Id;C<b.ParentMusicSystem.Id;C++){const I=this.musicSystems[C+1].StaffLines[r],R=(S=I==null?void 0:I.Measures)==null?void 0:S[0];if(!R)return;const N=new VexflowVibratoBracket(o,R.PositionAndShape,I.ParentStaff.isTab);let G=I.Measures[I.Measures.length-1];const B=R.staffEntries[0];let k=G.staffEntries[G.staffEntries.length-1];u.ParentStaffLine===I&&(G=u,k=A),N.setStartNote(B),N.setEndNote(k),I.WavyLines.push(N),N.CalculateBoundingBox(),this.calculateWavyLineSkyBottomLine(N.startVfVoiceEntry,N.endVfVoiceEntry,N,I)}v.CalculateBoundingBox(),this.calculateWavyLineSkyBottomLine(v.startVfVoiceEntry,v.endVfVoiceEntry,v,m)}else v.setEndNote(A),v.CalculateBoundingBox(),this.calculateWavyLineSkyBottomLine(v.startVfVoiceEntry,v.endVfVoiceEntry,v,m);m.WavyLines.push(v)}else loglevelExports.warn("End measure or staffLines for wavy line are undefined! This should not happen!")}calculateWavyLineSkyBottomLine(e,t,s,r){var v,x;const o=s.startNote.getStave(),a=s.endNote.getStave(),l=Math.max(o.options.top_text_position,a.options.top_text_position);o.options.top_text_position=l,a.options.top_text_position=l;let c=-l,d=0,m=0,u=1/0,g=1/0;const b=1.85;let y=e.PositionAndShape.AbsolutePosition.x+e.PositionAndShape.BorderLeft;((x=(v=e.parentVoiceEntry)==null?void 0:v.OrnamentContainer)==null?void 0:x.GetOrnament)===OrnamentEnum.Trill&&(d=y,y+=2,m=y,u=r.SkyBottomLineCalculator.getSkyLineMinInRange(d,m),g=u+b);let S;if(s.ToEndOfStopStave)S=t.parentStaffEntry.parentMeasure.PositionAndShape.AbsolutePosition.x+t.parentStaffEntry.parentMeasure.PositionAndShape.BorderRight-1;else{S=t.PositionAndShape.AbsolutePosition.x+t.PositionAndShape.BorderRight;const A=t.parentStaffEntry.vfClefBefore;if(A){const E=A.getWidth()/10;S+=E}}c=r.SkyBottomLineCalculator.getSkyLineMinInRange(y,S),c!==1/0&&(c<u?(o.options.top_text_position=-c,a.options.top_text_position=-c,r.SkyBottomLineCalculator.updateSkyLineInRange(d,m,c-b)):(s.line=-g,c=g),c-=s.PositionAndShape.Size.height,r.SkyBottomLineCalculator.updateSkyLineInRange(y,S,c))}calculatePedalSkyBottomLine(e,t,s,r){var b,y,S,v;let o=t==null?void 0:t.PositionAndShape;o||(o=s.endMeasure.PositionAndShape);const a=Vex.Flow.PedalMarking.Styles,l=s.getPedalMarking(),c=l.line+3+(r.StaffLines.length-1),d=l.render_options.text_margin_right/10;let m=e.PositionAndShape.AbsolutePosition.x-d;(l.style===a.MIXED||l.style===a.MIXED_OPEN_END||l.style===a.TEXT)&&(m-=1);let u,g=r.StaffLines.length-1;for(const x of r.Pedals){const w=x.getPedalMarking().line+3+(r.StaffLines.length-1);g=Math.max(w,g)}if(s.EndSymbolPositionAndShape){const x=l.render_options.glyph_point_size/20;u=m+3.4;const A=o.AbsolutePosition.x-d,E=A+1.5;g=Math.max(r.SkyBottomLineCalculator.getBottomLineMaxInRange(m,u),g),g=Math.max(c+x*2,g);const w=r.SkyBottomLineCalculator.getBottomLineMaxInRange(A,E);s.DepressText||(g=Math.max(g,w)),s.setLine(g-3-(r.StaffLines.length-1)),r.SkyBottomLineCalculator.updateBottomLineInRange(m,u,g+x),r.SkyBottomLineCalculator.updateBottomLineInRange(A,E,g+x)}else{const x=l.render_options.bracket_height/10;if(l.EndsStave)t?u=t.parentStaffEntry.parentMeasure.PositionAndShape.AbsolutePosition.x+t.parentStaffEntry.parentMeasure.PositionAndShape.Size.width-d:u=o.AbsolutePosition.x+o.Size.width;else switch(l.style){case a.BRACKET_OPEN_END:case a.BRACKET_OPEN_BOTH:case a.MIXED_OPEN_END:u=o.AbsolutePosition.x+o.BorderRight-d;break;default:u=o.AbsolutePosition.x+o.BorderLeft-d;break}const A=(b=t==null?void 0:t.parentStaffEntry)==null?void 0:b.vfClefBefore;if(A){const E=A.getWidth()/10;u+=E}if(g=Math.max(r.SkyBottomLineCalculator.getBottomLineMaxInRange(m,u),g),g===1/0)return;if(g=Math.max(g,c+x),s.setLine(g-3-(r.StaffLines.length-1)),m>u){const E=u;u=m,m=E}r.SkyBottomLineCalculator.updateBottomLineInRange(m,u,g+x)}for(const x of r.Pedals){const A=x,E=A.getPedalMarking(),w=E.line+3+(r.StaffLines.length-1);if(g>w){const _=E.render_options.text_margin_right/10;let C=A.startVfVoiceEntry.PositionAndShape.AbsolutePosition.x-_,P;A.setLine(g-3-(r.StaffLines.length-1));let I=(y=A.endVfVoiceEntry)==null?void 0:y.PositionAndShape;if(I||(I=A.endMeasure.PositionAndShape),A.EndSymbolPositionAndShape){const R=l.render_options.glyph_point_size/20;P=C+3.4;const N=I.AbsolutePosition.x-_,G=N+1.5;r.SkyBottomLineCalculator.updateBottomLineInRange(C,P,g+R),r.SkyBottomLineCalculator.updateBottomLineInRange(N,G,g+R)}else{const R=E.render_options.bracket_height/10;if(E.EndsStave)P=I.AbsolutePosition.x+I.Size.width-_;else switch(l.style){case a.BRACKET_OPEN_END:case a.BRACKET_OPEN_BOTH:case a.MIXED_OPEN_END:P=I.AbsolutePosition.x+I.BorderRight-_;break;default:P=I.AbsolutePosition.x+I.BorderLeft-_;break}const N=(v=(S=A.endVfVoiceEntry)==null?void 0:S.parentStaffEntry)==null?void 0:v.vfClefBefore;if(N){const G=N.getWidth()/10;P+=G}if(C>P){const G=C;C=P,P=G}r.SkyBottomLineCalculator.updateBottomLineInRange(C,P,g+R)}}}}calculateOctaveShiftSkyBottomLine(e,t,s,r){if(!t){loglevelExports.warn("octaveshift: no endStaffEntry");return}let o=e.PositionAndShape.Size.width,a=t.PositionAndShape.Size.width;e.hasOnlyRests()?o=-o:o/=2,t.hasOnlyRests()?a*=2:a/=2,e===t&&(a*=2);const l=e.PositionAndShape.AbsolutePosition.x-o,c=t.PositionAndShape.AbsolutePosition.x+a;s.PositionAndShape.Size.width=l-c;const d=s.getTextBracket(),m=d.font.size/10;if(d.position===VF.TextBracket.Positions.TOP){const u=Math.ceil(r.SkyBottomLineCalculator.getSkyLineMinInRange(l,c));if(u===1/0)return;d.start.getStave().options.top_text_position=Math.abs(u),r.SkyBottomLineCalculator.updateSkyLineInRange(l,c,u-m*2)}else{const u=r.SkyBottomLineCalculator.getBottomLineMaxInRange(l,c);if(u===1/0)return;d.start.getStave().options.bottom_text_position=u,e.parentMeasure!==t.parentMeasure&&(d.stop.getStave().options.bottom_text_position=u),r.SkyBottomLineCalculator.updateBottomLineInRange(l,c,u+m*1.5)}}calculateWordRepetitionInstruction(e,t){let s;const r=this.graphicalMusicSheet.MeasureList[t];for(let o=0,a=r.length;o<a;++o){const l=r[o];if(l&&l.ParentStaffLine&&l.ParentStaff.ParentInstrument.Visible){s=l;break}}s&&s.addWordRepetition(e)}calculateExpressionAlignements(){for(const e of this.musicSystems)for(const t of e.StaffLines)try{t.AlignmentManager.alignDynamicExpressions(),t.AbstractExpressions.forEach(s=>{s.updateSkyBottomLine()})}catch(s){}}handleTiedGraphicalNote(e,t,s,r,o,a,l,c){}handleBeam(e,t,s){e.parentVoiceEntry.parentStaffEntry.parentMeasure.handleBeam(e,t)}handleVoiceEntryLyrics(e,t,s){e.LyricsEntries.forEach((r,o)=>{const a=new GraphicalLyricEntry(o,t,this.rules.LyricsHeight,this.rules.StaffHeight);if(t.LyricsEntries.push(a),a.GraphicalLabel.setLabelPositionAndShapeBorders(),o.Word){const c=o.Word.Syllables.indexOf(o);let d=s.indexOf(o.Word);if(d===-1&&(s.push(o.Word),d=s.indexOf(o.Word)),this.graphicalLyricWords.length===0||d>this.graphicalLyricWords.length-1){const m=new GraphicalLyricWord(o.Word);a.ParentLyricWord=m,m.GraphicalLyricsEntries[c]=a,this.graphicalLyricWords.push(m)}else{const m=this.graphicalLyricWords[d];a.ParentLyricWord=m,m.GraphicalLyricsEntries[c]=a,m.isFilled()&&(s.splice(d,1),this.graphicalLyricWords.splice(this.graphicalLyricWords.indexOf(m),1))}}})}handleVoiceEntryOrnaments(e,t,s){}handleVoiceEntryArticulations(e,t,s){}handleVoiceEntryTechnicalInstructions(e,t,s){}handleTuplet(e,t,s){e.parentVoiceEntry.parentStaffEntry.parentMeasure.handleTuplet(e,t)}findIndexGraphicalSlurFromSlur(e,t){for(let s=0;s<e.length;s++)if(e[s].slur===t)return s;return-1}calculateSlurs(){const e={};for(const t of this.graphicalMusicSheet.MeasureList[0])e[t.ParentStaff.idInMusicSheet]=[];for(const t of this.musicSystems)for(const s of t.StaffLines){const r=e[s.ParentStaff.idInMusicSheet];for(let o=0;o<r.length;o++){const a=r[o],l=new GraphicalSlur(a.slur,this.rules);s.addSlurToStaffline(l),r[o]=l}for(const o of s.Measures)for(const a of o.staffEntries){for(const l of a.graphicalVoiceEntries)for(const c of l.notes)for(const d of c.sourceNote.NoteSlurs)if(!(!d.EndNote||!d.StartNote)){if(d.StartNote===c.sourceNote){const m=new GraphicalSlur(d,this.rules);r.push(m),s.addSlurToStaffline(m)}if(d.EndNote===c.sourceNote){const m=this.findIndexGraphicalSlurFromSlur(r,d);if(m>=0){const u=r[m];u.staffEntries.indexOf(a)===-1&&u.staffEntries.push(a),r.splice(m,1)}}}for(const l of r)l.staffEntries.indexOf(a)===-1&&l.staffEntries.push(a)}}for(const t of this.musicSystems)for(const s of t.StaffLines){const r=s.GraphicalSlurs.sort(GraphicalSlur.Compare);for(const o of r)o.slur.isCrossed()||o.calculateCurve(this.rules)}}}class MusicPartManager{constructor(e){this.musicSheet=e}reInit(){this.init()}init(){this.parts=this.musicSheet.Repetitions.slice(),this.sheetStart=this.musicSheet.SelectionStart=new Fraction$1(0,1),this.sheetEnd=this.musicSheet.SelectionEnd=this.musicSheet.SheetEndTimestamp,this.calcMapping()}getCurrentRepetitionTimestampTransform(e){let t;for(let s=this.timestamps.length-1;s>=0;s--)if(t=this.timestamps[s],e.gte(t.from))return t;return this.timestamps[0]}absoluteEnrolledToSheetTimestamp(e){if(this.timestamps.length===0)return e;const t=this.getCurrentRepetitionTimestampTransform(e);return Fraction$1.plus(e,Fraction$1.minus(t.to,t.from))}get Parts(){return this.parts}get MusicSheet(){return this.musicSheet}getIterator(e){return e?new MusicPartManagerIterator(this.musicSheet,e,void 0):new MusicPartManagerIterator(this.musicSheet,this.musicSheet.SelectionStart,this.musicSheet.SelectionEnd)}setSelectionStart(e){this.musicSheet.SelectionStart=e,this.musicSheet.SelectionEnd=void 0}setSelectionRange(e,t){this.musicSheet.SelectionStart=e!=null?e:this.sheetStart,this.musicSheet.SelectionEnd=t!=null?t:this.sheetEnd}calcMapping(){this.timestamps=[];const e=this.getIterator();let t=e.CurrentRepetition,s=new TimestampTransform(e.CurrentEnrolledTimestamp.clone(),e.CurrentSourceTimestamp.clone(),void 0,0);for(this.timestamps.push(s);!e.EndReached;){if(e.JumpOccurred||t!==e.CurrentRepetition){if(t=e.CurrentRepetition,e.backJumpOccurred){const r=e.JumpResponsibleRepetition;s.nextBackJump=e.CurrentEnrolledTimestamp,s.curRepetition=r,s.curRepetitionIteration=e.CurrentJumpResponsibleRepetitionIterationBeforeJump;for(let o=this.timestamps.length-2;o>=0&&!(r.AbsoluteTimestamp.gt(this.timestamps[o].to)||this.timestamps[o].curRepetition);o--)this.timestamps[o].nextBackJump=s.nextBackJump,this.timestamps[o].curRepetition=r,this.timestamps[o].curRepetitionIteration=s.curRepetitionIteration}s=new TimestampTransform(e.CurrentEnrolledTimestamp.clone(),e.CurrentSourceTimestamp.clone(),void 0,0),this.timestamps.push(s)}e.moveToNext()}}}class TimestampTransform{constructor(e,t,s,r){this.from=e,this.to=t,this.curRepetition=s,this.curRepetitionIteration=r,this.nextBackJump=void 0,this.nextForwardJump=void 0}}class PartListEntry{constructor(e){this.enrolledTimestamps=[],this.visible=!0,this.musicSheet=e}get Visible(){return this.visible}set Visible(e){this.visible=e}getFirstSourceMeasure(){return this.musicSheet.SourceMeasures[this.startIndex]}getLastSourceMeasure(){return this.musicSheet.SourceMeasures[this.endIndex]}}class SourceMusicPart extends PartListEntry{constructor(e,t,s){super(e),this.musicSheet=e,this.startIndex=t,this.endIndex=s}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(e){this.parentRepetition=e}get AbsoluteTimestamp(){return Fraction$1.createFromFraction(this.musicSheet.SourceMeasures[this.startIndex].AbsoluteTimestamp)}setStartIndex(e){this.startIndex=e}setEndIndex(e){this.endIndex=e}}class Repetition extends PartListEntry{constructor(e,t=!1){super(e),this.backwardJumpInstructions=[],this.endingParts=[],this.endingIndexDict={},this.userNumberOfRepetitions=0,this.visibles=[],this.fromWords=!1,this.repetitonIterationOrder=[],this.numberOfEndings=1,this.musicSheet2=e,this.virtualOverallRepetition=t}get BackwardJumpInstructions(){return this.backwardJumpInstructions}get EndingIndexDict(){return this.endingIndexDict}get EndingParts(){return this.endingParts}get Visibles(){return this.visibles}set Visibles(e){this.visibles=e}get DefaultNumberOfRepetitions(){let e=2;return this.virtualOverallRepetition&&(e=1),Math.max(e,Object.keys(this.endingIndexDict).length,this.checkRepetitionForMultipleLyricVerses())}get UserNumberOfRepetitions(){return this.userNumberOfRepetitions}set UserNumberOfRepetitions(e){this.userNumberOfRepetitions=e,this.repetitonIterationOrder=[];const t=this.userNumberOfRepetitions-this.NumberOfEndings;for(let s=1;s<=this.userNumberOfRepetitions;s++)s<=t?this.repetitonIterationOrder.push(1):this.repetitonIterationOrder.push(s-t)}getForwardJumpTargetForIteration(e){const t=this.repetitonIterationOrder[e-1];return this.endingIndexDict[t]?this.endingIndexDict[t].part.StartIndex:-1}getBackwardJumpTarget(){return this.startMarker.measureIndex}setEndingsStartIndex(e,t){const s=new RepetitionEndingPart(new SourceMusicPart(this.musicSheet2,t,t));this.endingParts.push(s);for(const r of e)try{this.endingIndexDict[r]=s,s.endingIndices.push(r),this.numberOfEndings<r&&(this.numberOfEndings=r)}catch(o){loglevelExports.error("Repetition: Exception.",o)}}setEndingStartIndex(e,t){const s=new RepetitionEndingPart(new SourceMusicPart(this.musicSheet2,t,t));this.EndingIndexDict[e]=s,this.endingParts.push(s),s.endingIndices.push(e),this.numberOfEndings<e&&(this.numberOfEndings=e)}setEndingEndIndex(e,t){this.endingIndexDict[e]&&this.endingIndexDict[e].part.setEndIndex(t)}get NumberOfEndings(){return this.numberOfEndings}get FromWords(){return this.fromWords}set FromWords(e){this.fromWords=e}get AbsoluteTimestamp(){return Fraction$1.createFromFraction(this.musicSheet2.SourceMeasures[this.startMarker.measureIndex].AbsoluteTimestamp)}get StartIndex(){return this.startMarker.measureIndex}get EndIndex(){if(this.BackwardJumpInstructions.length===0)return this.StartIndex;let e=this.backwardJumpInstructions[this.backwardJumpInstructions.length-1].measureIndex;return this.endingIndexDict[this.NumberOfEndings]&&(e=Math.max(this.endingIndexDict[this.NumberOfEndings].part.EndIndex,e)),e}checkRepetitionForMultipleLyricVerses(){let e=0;const t=this.StartIndex,s=this.EndIndex;for(let r=t;r<=s;r++){const o=this.musicSheet2.SourceMeasures[r];for(let a=0;a<o.CompleteNumberOfStaves;a++)if(o.VerticalSourceStaffEntryContainers[a]){for(const l of o.VerticalSourceStaffEntryContainers[a].StaffEntries)if(l){let c=0;for(const d of l.VoiceEntries)c+=d.LyricsEntries.keys.length;e=Math.max(e,c)}}}return e}get FirstSourceMeasureNumber(){return this.getFirstSourceMeasure().MeasureNumber}get LastSourceMeasureNumber(){return this.getLastSourceMeasure().MeasureNumber}coversIdenticalMeasures(e){return this.StartIndex===e.StartIndex&&this.EndIndex===e.EndIndex}removeFromRepetitionInstructions(){this.startMarker!==void 0&&(this.startMarker.parentRepetition=void 0),this.endMarker!==void 0&&(this.endMarker.parentRepetition=void 0);for(const e of this.BackwardJumpInstructions)e.parentRepetition=void 0}}class RepetitionEndingPart{constructor(e){this.endingIndices=[],this.part=e}ToString(){return this.endingIndices.join(", ")}}class PlaybackSettings{constructor(e=new Fraction$1,t=0){this.rhythm=e,this.beatsPerMinute=t,this.beatLengthInMilliseconds=6e4/t,this.beatRealValue=1/4}static createFrom(e){return new PlaybackSettings(e.Rhythm,e.BeatsPerMinute)}get BeatsPerMinute(){return this.beatsPerMinute}set BeatsPerMinute(e){this.beatsPerMinute=e,this.beatLengthInMilliseconds=6e4/this.beatsPerMinute}get Rhythm(){return this.rhythm}set Rhythm(e){this.rhythm=e}get BeatRealValue(){return this.beatRealValue}get BeatLengthInMilliseconds(){return this.beatLengthInMilliseconds}getDurationInMilliseconds(e){return(typeof e=="number"?e:e.RealValue)*this.BeatLengthInMilliseconds/this.beatRealValue}getDurationAsNoteDuration(e,t=1024){const s=e/this.BeatLengthInMilliseconds;let r=Math.floor(s);const o=new Fraction$1(r,4),a=s-r;return r=Math.round(a/(1/t)/4),r===0&&e>0&&(r=1),o.Add(new Fraction$1(r,t)),o}}class MusicSheet{constructor(){this.idString="random idString, not initialized",this.sourceMeasures=[],this.repetitions=[],this.dynListStaves=[],this.timestampSortedDynamicExpressionsList=[],this.timestampSortedTempoExpressionsList=[],this.instrumentalGroups=[],this.instruments=[],this.musicPartManager=void 0,this.musicSheetErrors=new MusicSheetErrors,this.staves=[],this.playbackDataDict=new Dictionary,this.transpose=0,this.defaultStartTempoInBpm=0,this.drawErroneousMeasures=!1,this.hasBeenOpenedForTheFirstTime=!1,this.currentEnrolledPosition=new Fraction$1(0,1),this.soundTempos=new Map,this.playbackSettings=new PlaybackSettings,this.playbackSettings.rhythm=new Fraction$1(4,4,0,!1),this.userStartTempoInBPM=100,this.pageWidth=120,this.MusicPartManager=new MusicPartManager(this),this.hasBPMInfo=!1}get SoundTempos(){return this.soundTempos}set SoundTempos(e){this.soundTempos=e}static getIndexFromStaff(e){return e.idInMusicSheet}get CurrentKeyInstruction(){return this.currentKeyInstruction}set CurrentKeyInstruction(e){this.currentKeyInstruction=e}get SourceMeasures(){return this.sourceMeasures}set SourceMeasures(e){this.sourceMeasures=e}get Repetitions(){return this.repetitions}set Repetitions(e){this.repetitions=e}get DynListStaves(){return this.dynListStaves}get TimestampSortedTempoExpressionsList(){return this.timestampSortedTempoExpressionsList}get TimestampSortedDynamicExpressionsList(){return this.timestampSortedDynamicExpressionsList}get InstrumentalGroups(){return this.instrumentalGroups}get Parts(){return this.instruments}get Instruments(){return this.instruments}get SheetPlaybackSetting(){return this.playbackSettings}set SheetPlaybackSetting(e){this.playbackSettings=e}get DrawErroneousMeasures(){return this.drawErroneousMeasures}set DrawErroneousMeasures(e){this.drawErroneousMeasures=e}get HasBeenOpenedForTheFirstTime(){return this.hasBeenOpenedForTheFirstTime}set HasBeenOpenedForTheFirstTime(e){this.hasBeenOpenedForTheFirstTime=e}InitializeStartTempoInBPM(e){this.playbackSettings.BeatsPerMinute=e,this.userStartTempoInBPM=e}get DefaultStartTempoInBpm(){return this.defaultStartTempoInBpm}set DefaultStartTempoInBpm(e){this.defaultStartTempoInBpm=e,this.InitializeStartTempoInBPM(e)}get Path(){return this.path}set Path(e){this.path=e}get Staves(){return this.staves}get TitleString(){return this.title?this.title.text:""}set TitleString(e){this.Title=new Label(e)}get SubtitleString(){return this.subtitle?this.subtitle.text:""}set SubtitleString(e){this.Subtitle=new Label(e)}get ComposerString(){return this.composer?this.composer.text:""}set ComposerString(e){this.Composer=new Label(e)}get LyricistString(){return this.lyricist?this.lyricist.text:""}set LyricistString(e){this.Lyricist=new Label(e)}get Title(){return this.title}set Title(e){this.title=e}get Subtitle(){return this.subtitle}set Subtitle(e){this.subtitle=e}get Composer(){return this.composer}set Composer(e){this.composer=e}get Lyricist(){return this.lyricist}set Lyricist(e){this.lyricist=e}get Rules(){return this.rules||(loglevelExports.debug("warning: sheet.Rules was undefined. Creating new EngravingRules."),this.rules=new EngravingRules),this.rules}set Rules(e){this.rules=e}get SheetErrors(){return this.musicSheetErrors}get PlaybackDataDict(){return this.playbackDataDict}get SelectionStart(){return this.selectionStart}set SelectionStart(e){this.selectionStart=e.clone(),this.currentEnrolledPosition=e.clone()}get SelectionEnd(){return this.selectionEnd}set SelectionEnd(e){this.selectionEnd=e}set HasBPMInfo(e){this.hasBPMInfo=e}get HasBPMInfo(){return this.hasBPMInfo}addMeasure(e){this.sourceMeasures.push(e),e.measureListIndex=this.sourceMeasures.length-1}checkForInstrumentWithNoVoice(){for(let e=0,t=this.instruments.length;e<t;++e){const s=this.instruments[e];if(s.Voices.length===0){const r=new Voice(s,1);s.Voices.push(r)}}}getStaffFromIndex(e){return this.staves[e]}fillStaffList(){let e=0;for(let t=0,s=this.instruments.length;t<s;++t){const r=this.instruments[t];for(let o=0,a=r.Staves.length;o<a;++o){const l=r.Staves[o];l.idInMusicSheet=e,this.staves.push(l),e++}}}get MusicPartManager(){return this.musicPartManager}set MusicPartManager(e){this.musicPartManager=e}getCompleteNumberOfStaves(){let e=0;for(let t=0,s=this.instruments.length;t<s;++t){const r=this.instruments[t];e+=r.Staves.length}return e}getListOfMeasuresFromIndeces(e,t){const s=[];for(let r=e;r<=t;r++)s.push(this.sourceMeasures[r]);return s}getNextSourceMeasure(e){const t=this.sourceMeasures.indexOf(e);return t===this.sourceMeasures.length-1?e:this.sourceMeasures[t+1]}getFirstSourceMeasure(){return this.sourceMeasures[0]}getLastSourceMeasure(){return this.sourceMeasures[this.sourceMeasures.length-1]}resetAllNoteStates(){const e=this.MusicPartManager.getIterator();for(;!e.EndReached&&e.CurrentVoiceEntries;){for(let t=0,s=e.CurrentVoiceEntries.length;t<s;++t){const r=e.CurrentVoiceEntries[t];for(let o=0,a=r.Notes.length;o<a;++o){const l=r.Notes[o];l.state=NoteState.Normal}}e.moveToNext()}}getMusicSheetInstrumentIndex(e){return this.Instruments.indexOf(e)}getGlobalStaffIndexOfFirstStaff(e){const t=this.getMusicSheetInstrumentIndex(e);let s=0;for(let r=0;r<t;r++)s+=this.Instruments[r].Staves.length;return s}setRepetitionNewUserNumberOfRepetitions(e,t){let s=0;for(let r=0;r<this.repetitions.length;r++)if(this.repetitions[r]instanceof Repetition)if(e===s){this.repetitions[r].UserNumberOfRepetitions=t;break}else s++}getRepetitionByIndex(e){let t=0;for(let s=0;s<this.repetitions.length;s++)if(this.repetitions[s]instanceof Repetition){if(e===t)return this.repetitions[s];t++}}CompareTo(e){return this.Title.text.localeCompare(e.Title.text)}getExpressionsStartTempoInBPM(){if(this.TimestampSortedTempoExpressionsList.length>0){const e=this.TimestampSortedTempoExpressionsList[0];if(e.InstantaneousTempo)return e.InstantaneousTempo.TempoInBpm;if(e.ContinuousTempo)return e.ContinuousTempo.StartTempo}return this.userStartTempoInBPM}get Errors(){return this.musicSheetErrors.measureErrors}get FirstMeasureNumber(){try{return this.getFirstSourceMeasure().MeasureNumber}catch(e){return loglevelExports.info("MusicSheet.FirstMeasureNumber: ",e),0}}get LastMeasureNumber(){try{return this.getLastSourceMeasure().MeasureNumber}catch(e){return loglevelExports.info("MusicSheet.LastMeasureNumber: ",e),0}}get CurrentEnrolledPosition(){return this.currentEnrolledPosition.clone()}set CurrentEnrolledPosition(e){this.currentEnrolledPosition=e.clone()}get Transpose(){return this.transpose}set Transpose(e){this.transpose=e}get FullNameString(){return this.ComposerString+" "+this.TitleString}get IdString(){return this.idString}set IdString(e){this.idString=e}getEnrolledSelectionStartTimeStampWorkaround(){const e=this.MusicPartManager.getIterator(this.SelectionStart);return Fraction$1.createFromFraction(e.CurrentEnrolledTimestamp)}get SheetEndTimestamp(){const e=this.getLastSourceMeasure();return Fraction$1.plus(e.AbsoluteTimestamp,e.Duration)}getSourceMeasureFromTimeStamp(e){for(let t=0,s=this.sourceMeasures.length;t<s;++t){const r=this.sourceMeasures[t];for(let o=0,a=r.VerticalSourceStaffEntryContainers.length;o<a;++o){const l=r.VerticalSourceStaffEntryContainers[o];if(e.Equals(l.getAbsoluteTimestamp()))return r}}return this.findSourceMeasureFromTimeStamp(e)}findSourceMeasureFromTimeStamp(e){for(const t of this.sourceMeasures)if(t.AbsoluteTimestamp.lte(e)&&e.lt(Fraction$1.plus(t.AbsoluteTimestamp,t.Duration)))return t}getVisibleInstruments(){const e=[];for(let t=0,s=this.Instruments.length;t<s;++t){const r=this.Instruments[t];r.Voices.length>0&&r.Voices[0].Visible&&e.push(r)}return e}}MusicSheet.defaultTitle="[no title given]";class LyricWord{constructor(){this.syllables=[]}get Syllables(){return this.syllables}containsVoiceEntry(e){for(let t=0,s=this.Syllables.length;t<s;++t)if(this.Syllables[t].Parent===e)return!0;return!1}findLyricEntryInVoiceEntry(e){for(let t=0,s=this.Syllables.length;t<s;++t){const r=this.Syllables[t];if(r.Parent===e)return r}}}class LyricsEntry{constructor(e,t,s,r,o=-1){this.text=e,this.word=s,this.parent=r,this.verseNumber=t,o>=0&&(this.syllableIndex=o)}get Text(){return this.text}set Text(e){this.text=e}get Word(){return this.word}get Parent(){return this.parent}set Parent(e){this.parent=e}get VerseNumber(){return this.verseNumber}get SyllableIndex(){return this.syllableIndex}}class LyricsReader{constructor(e){this.openLyricWords={},this.musicSheet=e}addLyricEntry(e,t){var s,r;if(e){const o=e;for(let a=0,l=o.length;a<l;++a){const c=o[a];try{let d="single";if(c.element("text")){let m=c.element("text");if(c.element("syllabic")&&(d=c.element("syllabic").value),m){let u="";const g=c.elements();for(const v of g)(v.name==="text"||v.name==="elision")&&(u+=v.value);if(u=u.replace(" "," "),c.element("elision")!==void 0&&u==="-"){const v=c.elements();let x=0;for(let w=0;w<v.length;w++)if(v[w].name==="elision"){x=w;break}let A,E;if(x>0)for(let w=x;w<v.length;w++){const _=v[w];_.name==="text"&&(A=_),_.name==="syllabic"&&(E=_)}A!==void 0&&E&&(m=A,d="middle")}let b=1,y=!1;if(c.attributes()!==void 0&&c.attribute("number")){try{b=parseInt(c.attribute("number").value,10)}catch(v){y=!0}if(y=y||isNaN(b),y)try{const v=c.attribute("number").value.toLowerCase().split("verse");v.length>1&&(b=parseInt(v[1],10))}catch(v){const x=ITextTranslation.translateText("ReaderErrorMessages/LyricVerseNumberError","Invalid lyric verse number");this.musicSheet.SheetErrors.pushMeasureError(x);continue}}let S;if(d==="single"||d==="end"){if(this.openLyricWords[b]){this.currentLyricWord=this.openLyricWords[b];const v=this.currentLyricWord.Syllables.length;S=new LyricsEntry(u,b,this.currentLyricWord,t,v),this.currentLyricWord.Syllables.push(S),delete this.openLyricWords[b],this.currentLyricWord=void 0}else S=new LyricsEntry(u,b,void 0,t);S.extend=c.element("extend")!==void 0}else if(d==="begin")this.openLyricWords[b]&&(delete this.openLyricWords[b],this.currentLyricWord=void 0),this.currentLyricWord=new LyricWord,this.openLyricWords[b]=this.currentLyricWord,S=new LyricsEntry(u,b,this.currentLyricWord,t,0),this.currentLyricWord.Syllables.push(S);else if(d==="middle")if(this.openLyricWords[b]){this.currentLyricWord=this.openLyricWords[b];const v=this.currentLyricWord.Syllables.length;S=new LyricsEntry(u,b,this.currentLyricWord,t,v),this.currentLyricWord.Syllables.push(S)}else S=new LyricsEntry(u,b,void 0,t);S&&(t.LyricsEntries[b]||(t.LyricsEntries.setValue(b,S),(r=(s=t.ParentSourceStaffEntry)==null?void 0:s.VerticalContainerParent)!=null&&r.ParentMeasure&&(t.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure.hasLyrics=!0)),t.ParentVoice.Parent.LyricVersesNumbers[b]||t.ParentVoice.Parent.LyricVersesNumbers.push(b))}}}catch(d){const m=ITextTranslation.translateText("ReaderErrorMessages/LyricError","Error while reading lyric entry.");this.musicSheet.SheetErrors.pushMeasureError(m);continue}}t.ParentVoice.Parent.LyricVersesNumbers=t.ParentVoice.Parent.LyricVersesNumbers.filter((a,l,c)=>c.indexOf(a)===l)}}}class Articulation{constructor(e,t){this.articulationEnum=e,this.placement=t}Equals(e){return e.articulationEnum===this.articulationEnum&&e.placement===this.placement}}class ArticulationReader{constructor(e){this.rules=e}getAccEnumFromString(e){switch(e){case"sharp":return AccidentalEnum.SHARP;case"flat":return AccidentalEnum.FLAT;case"natural":return AccidentalEnum.NATURAL;case"double-sharp":case"sharp-sharp":return AccidentalEnum.DOUBLESHARP;case"double-flat":case"flat-flat":return AccidentalEnum.DOUBLEFLAT;case"triple-sharp":return AccidentalEnum.TRIPLESHARP;case"triple-flat":return AccidentalEnum.TRIPLEFLAT;case"quarter-sharp":return AccidentalEnum.QUARTERTONESHARP;case"quarter-flat":return AccidentalEnum.QUARTERTONEFLAT;case"three-quarters-sharp":return AccidentalEnum.THREEQUARTERSSHARP;case"three-quarters-flat":return AccidentalEnum.THREEQUARTERSFLAT;case"slash-quarter-sharp":return AccidentalEnum.SLASHQUARTERSHARP;case"slash-sharp":return AccidentalEnum.SLASHSHARP;case"double-slash-flat":return AccidentalEnum.DOUBLESLASHFLAT;case"sori":return AccidentalEnum.SORI;case"koron":return AccidentalEnum.KORON;default:return AccidentalEnum.NONE}}addArticulationExpression(e,t){var s,r;if(e!==void 0&&e.elements().length>0){const o=e.elements();for(let a=0,l=o.length;a<l;++a){const c=o[a];let d=c.name;try{d=d.replace("-","");const m=ArticulationEnum[d];if(VoiceEntry.isSupportedArticulation(m)){let u=PlacementEnum.NotYetDefined;const g=(s=c.attribute("placement"))==null?void 0:s.value;g==="above"?u=PlacementEnum.Above:g==="below"&&(u=PlacementEnum.Below);const b=new Articulation(m,u);if(d==="staccato"&&t.Articulations.length>0&&t.Articulations[0].articulationEnum!==ArticulationEnum.staccato&&t.Articulations.splice(0,0,b),d==="strongaccent"){const y=(r=c==null?void 0:c.attribute("type"))==null?void 0:r.value;y==="up"?b.articulationEnum=ArticulationEnum.marcatoup:y==="down"&&(b.articulationEnum=ArticulationEnum.marcatodown)}if(d==="detachedlegato"){const y=new Articulation(ArticulationEnum.staccato,u),S=new Articulation(ArticulationEnum.tenuto,u);t.Articulations.push(y,S)}if(!t.hasArticulation(b))switch(t.Articulations.push(b),b.articulationEnum){case ArticulationEnum.staccato:case ArticulationEnum.staccatissimo:t.DurationModifier=b;break;case ArticulationEnum.accent:case ArticulationEnum.strongaccent:t.VolumeModifier=b;break;default:break}}}catch(m){const u="Invalid note articulation.";loglevelExports.debug("addArticulationExpression",u,m);return}}}}addFermata(e,t){var o;let s=ArticulationEnum.fermata;e.attributes().length>0&&e.attribute("type")&&e.attribute("type").value==="inverted"&&(s=ArticulationEnum.invertedfermata);let r=PlacementEnum.Above;((o=e.attribute("placement"))==null?void 0:o.value)==="below"&&(r=PlacementEnum.Below),t.Articulations.push(new Articulation(s,r))}addTechnicalArticulations(e,t,s){var l,c;const r={bend:ArticulationEnum.bend,"down-bow":ArticulationEnum.downbow,"open-string":ArticulationEnum.naturalharmonic,"snap-pizzicato":ArticulationEnum.snappizzicato,stopped:ArticulationEnum.lefthandpizzicato,"up-bow":ArticulationEnum.upbow};for(const d in r){if(!r.hasOwnProperty(d))continue;const m=r[d],u=e.element(d);if(u){let g;((l=u.attribute("placement"))==null?void 0:l.value)==="above"&&(g=PlacementEnum.Above),((c=u.attribute("placement"))==null?void 0:c.value)==="below"&&(g=PlacementEnum.Below);const b=new Articulation(m,g);t.hasArticulation(b)||t.Articulations.push(b)}}const o=e.element("fingering");if(o){const d=this.createTechnicalInstruction(o,s);d.type=TechnicalInstructionType.Fingering,s.Fingering=d,t.TechnicalInstructions.push(d)}const a=e.element("string");if(a){const d=this.createTechnicalInstruction(a,s);d.type=TechnicalInstructionType.String,s.StringInstruction=d,t.TechnicalInstructions.push(d)}}createTechnicalInstruction(e,t){const s=new TechnicalInstruction;s.sourceNote=t,s.value=e.value;const r=e.attribute("placement");return this.rules.FingeringPositionFromXML&&(s.placement=this.getPlacement(r)),s}getPlacement(e,t=PlacementEnum.NotYetDefined){if(t!==PlacementEnum.NotYetDefined)return t;if(e)switch(e.value){case"above":return PlacementEnum.Above;case"below":return PlacementEnum.Below;case"left":return PlacementEnum.Left;case"right":return PlacementEnum.Right;default:return PlacementEnum.NotYetDefined}else return PlacementEnum.NotYetDefined}addOrnament(e,t){if(e){let s;const r={"delayed-inverted-turn":OrnamentEnum.DelayedInvertedTurn,"delayed-turn":OrnamentEnum.DelayedTurn,"inverted-mordent":OrnamentEnum.InvertedMordent,"inverted-turn":OrnamentEnum.InvertedTurn,mordent:OrnamentEnum.Mordent,"trill-mark":OrnamentEnum.Trill,turn:OrnamentEnum.Turn};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=e.element(o);if(a){s=new OrnamentContainer(r[o]);const l=a.attribute("placement");l&&l.value==="below"&&(s.placement=PlacementEnum.Below)}}if(s){const o=e.elements("accidental-mark");if(o){let a=PlacementEnum.Below,l=AccidentalEnum.NONE;const c=o;for(let d=0,m=c.length;d<m;++d){const u=c[d];let g=u.value;l=this.getAccEnumFromString(g);const b=u.attribute("placement");u.hasAttributes&&b&&(g=b.value,g==="above"?a=PlacementEnum.Above:g==="below"&&(a=PlacementEnum.Below)),a===PlacementEnum.Above?s.AccidentalAbove=l:a===PlacementEnum.Below&&(s.AccidentalBelow=l)}}t.OrnamentContainer=s}}}}class TabNote extends Note$1{constructor(e,t,s,r,o,a,l,c){super(e,t,s,r,o),this.stringNumberTab=a,this.fretNumber=l,this.bendArray=c}get StringNumberTab(){return this.stringNumberTab}get FretNumber(){return this.fretNumber}get BendArray(){return this.bendArray}}class VoiceGenerator{constructor(e,t,s,r,o=void 0){this.openBeams=[],this.beamNumberOffset=0,this.currentOctaveShift=0,this.tupletDict={},this.openTupletNumber=0,this.currMeasureVoiceEntries=[],this.graceVoiceEntriesTempList=[],this.staff=t,this.instrument=t.ParentInstrument,this.musicSheet=this.instrument.GetMusicSheet,this.slurReader=r,this.pluginManager=e,o?this.voice=new LinkedVoice(this.instrument,s,o):this.voice=new Voice(this.instrument,s),this.instrument.Voices.push(this.voice),this.staff.Voices.push(this.voice),this.lyricsReader=new LyricsReader(this.musicSheet),this.articulationReader=new ArticulationReader(this.musicSheet.Rules)}get openTieDict(){return this.staff.openTieDict}get GetVoice(){return this.voice}get OctaveShift(){return this.currentOctaveShift}set OctaveShift(e){this.currentOctaveShift=e}createVoiceEntry(e,t,s,r,o=!1,a=!1,l=!1){this.activeKey=s,this.activeRhythm=r,this.currentVoiceEntry=new VoiceEntry(Fraction$1.createFromFraction(e),this.voice,t,!0,o,a,l),o?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&&this.currentNormalVoiceEntry!==void 0&&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(e,t,s,r,o,a,l,c,d,m,u,g,b,y,S,v,x,A,E,w,_,C,P){this.currentStaffEntry=l,this.currentMeasure=c;try{this.currentNote=a?this.addRestNote(e.element("rest"),t,r,o,b,y,E):this.addSingleNote(e,t,r,s,o,u,g,b,y,S,v,x,A,E,_,C,P),this.currentNote.DotsXml=w;const I=e.elements("lyric");this.lyricsReader!==void 0&&I&&(this.lyricsReader.addLyricEntry(I,this.currentVoiceEntry),this.voice.Parent.HasLyrics=!0);let R=!1;const N=e.element("notations");if(N){this.articulationReader&&this.readArticulations(N,this.currentVoiceEntry,this.currentNote);const G=N.elements("slur");this.slurReader!==void 0&&G.length>0&&!this.currentNote.ParentVoiceEntry.IsGrace&&this.slurReader.addSlur(G,this.currentNote);const B=N.elements("tuplet");B.length>0&&(this.openTupletNumber=this.addTuplet(e,B),R=!0);const k=N.element("arpeggiate");if(k!==void 0){let W;if(this.currentVoiceEntry.Arpeggio)W=this.currentVoiceEntry.Arpeggio;else{let se=!1;for(const ie of this.currentStaffEntry.VoiceEntries)if(ie.Arpeggio){se=!0,W=ie.Arpeggio;break}if(!se){let ie=ArpeggioType.ARPEGGIO_DIRECTIONLESS;const fe=k.attribute("direction");if(fe)switch(fe.value){case"up":ie=ArpeggioType.ROLL_UP;break;case"down":ie=ArpeggioType.ROLL_DOWN;break;default:ie=ArpeggioType.ARPEGGIO_DIRECTIONLESS}W=new Arpeggio(this.currentVoiceEntry,ie),this.currentVoiceEntry.Arpeggio=W}}W.addNote(this.currentNote)}const T=N.elements("tied");T.length>0&&this.addTie(T,d,m,TieTypes.SIMPLE);const V=N.elements("slide");V.length>0&&this.addTie(V,d,m,TieTypes.SLIDE);const Z=N.element("technical");if(Z){const W=Z.elements("hammer-on");W.length>0&&this.addTie(W,d,m,TieTypes.HAMMERON);const se=Z.elements("pull-off");se.length>0&&this.addTie(se,d,m,TieTypes.PULLOFF)}}e.element("time-modification")!==void 0&&!R&&this.handleTimeModificationNode(e)}catch(I){loglevelExports.warn(I);const R=ITextTranslation.translateText("ReaderErrorMessages/NoteError","Ignored erroneous Note.");this.musicSheet.SheetErrors.pushMeasureError(R),this.musicSheet.SheetErrors.pushMeasureError(I)}return this.currentNote}checkForStaffEntryLink(e,t,s,r){const o=new StaffEntryLink(this.currentVoiceEntry);o.LinkStaffEntries.push(s),s.Link=o;const a=this.currentVoiceEntry.Timestamp.clone(),l=r.getVerticalContainerByTimestamp(a);return s=l.StaffEntries[e],s||(s=new SourceStaffEntry(l,t),l.StaffEntries[e]=s),s.VoiceEntries.push(this.currentVoiceEntry),o.LinkStaffEntries.push(s),s.Link=o,s}checkForOpenBeam(){this.openBeams.length>0&&this.currentNote&&this.handleOpenBeam()}checkOpenTies(){const e=this.openTieDict;for(const t in e)if(e.hasOwnProperty(t)){const s=e[t];Fraction$1.plus(s.StartNote.ParentStaffEntry.Timestamp,s.Duration).lt(s.StartNote.SourceMeasure.Duration)&&delete e[t]}}hasVoiceEntry(){return this.currentVoiceEntry!==void 0}readArticulations(e,t,s){const r=e.element("articulations");r&&this.articulationReader.addArticulationExpression(r,t);const o=e.element("fermata");o&&this.articulationReader.addFermata(o,t);const a=e.element("technical");a&&this.articulationReader.addTechnicalArticulations(a,t,s);const l=e.element("ornaments");l&&this.articulationReader.addOrnament(l,t)}addSingleNote(e,t,s,r,o,a,l,c,d,m,u,g,b,y,S,v,x){let A=0,E,w=AccidentalEnum.NONE,_=NoteEnum.C,C=NoteEnum.C,P=0,I=0,R,N,G;const B=e.elements();for(let fe=0,J=B.length;fe<J;++fe){const K=B[fe];try{if(K.name==="pitch"){const be=K.elements();for(let oe=0,Y=be.length;oe<Y;++oe){const ae=be[oe];N=void 0,G=void 0;try{if(ae.name==="step"){if(_=NoteEnum[ae.value],_===void 0){const de=ITextTranslation.translateText("ReaderErrorMessages/NotePitchError","Invalid pitch while reading note.");throw this.musicSheet.SheetErrors.pushMeasureError(de),new MusicSheetReadingException(de,void 0)}}else if(ae.name==="alter"){if(A=parseFloat(ae.value),isNaN(A)){const de=ITextTranslation.translateText("ReaderErrorMessages/NoteAlterationError","Invalid alteration while reading note.");throw this.musicSheet.SheetErrors.pushMeasureError(de),new MusicSheetReadingException(de,void 0)}w=Pitch.AccidentalFromHalfTones(A)}else if(ae.name==="octave"&&(P=parseInt(ae.value,10),isNaN(P))){const de=ITextTranslation.translateText("ReaderErrorMessages/NoteOctaveError","Invalid octave value while reading note.");throw this.musicSheet.SheetErrors.pushMeasureError(de),new MusicSheetReadingException(de,void 0)}}catch(de){loglevelExports.info("VoiceGenerator.addSingleNote read Step: ",de.message)}}}else if(K.name==="accidental")E=K.value,E==="natural"?w=AccidentalEnum.NATURAL:E==="slash-flat"?w=AccidentalEnum.SLASHFLAT:E==="slash-quarter-sharp"?w=AccidentalEnum.SLASHQUARTERSHARP:E==="slash-sharp"?w=AccidentalEnum.SLASHSHARP:E==="double-slash-flat"?w=AccidentalEnum.DOUBLESLASHFLAT:E==="sori"?w=AccidentalEnum.SORI:E==="koron"&&(w=AccidentalEnum.KORON);else if(K.name==="unpitched"){const be=K.element("display-step"),oe=K.element("display-octave");if(oe&&(P=parseInt(oe.value,10),I=P-3,l&&(P+=1),this.instrument.Staves[0].StafflineCount===1&&(I+=1)),be){_=NoteEnum[be.value.toUpperCase()];let Y=0,ae=this.musicSheet.Rules.PercussionXMLDisplayStepNoteValueShift;this.instrument.Staves[0].StafflineCount===1&&(ae-=3),[C,Y]=Pitch.lineShiftFromNoteEnum(_,ae),I+=Y}}else K.name==="instrument"?K.firstAttribute&&(R=K.firstAttribute.value):K.name==="notehead"&&(N=K.value,K.attribute("filled")&&(G=K.attribute("filled").value==="yes"))}catch(be){loglevelExports.info("VoiceGenerator.addSingleNote: ",be)}}P-=Pitch.OctaveXmlDifference;const k=new Pitch(_,P,w,E),T=Fraction$1.createFromFraction(t);let V,Z=-1,W=-1;const se=[],ie=e.element("notations");if(ie){const fe=ie.element("technical");if(fe){const J=fe.element("string");J&&(Z=parseInt(J.value,10));const K=fe.element("fret");K&&(W=parseInt(K.value,10)),fe.elements("bend").forEach(function(oe){const Y=oe.element("bend-alter");oe.element("release")!==void 0?se.push({bendalter:parseInt(Y.value,10),direction:"down"}):se.push({bendalter:parseInt(Y.value,10),direction:"up"})})}}return Z<0||W<0?V=new Note$1(this.currentVoiceEntry,this.currentStaffEntry,T,k,this.currentMeasure):V=new TabNote(this.currentVoiceEntry,this.currentStaffEntry,T,k,this.currentMeasure,Z,W,se),this.addNoteInfo(V,s,c,d,o,C,I,y,y),V.TypeLength=r,V.IsGraceNote=m,V.StemDirectionXml=u,V.TremoloStrokes=g,V.PlaybackInstrumentId=R,(N!==void 0&&N!=="normal"||G!==void 0)&&(V.Notehead=new Notehead(V,N,G)),V.NoteheadColorXml=y,V.NoteheadColor=y,V.PlaybackInstrumentId=R,V.TremoloType=S,V.glissandoType=v,V.slideType=x,this.currentVoiceEntry.addNote(V),u===StemDirectionType.None&&(b="#00000000"),this.currentVoiceEntry.StemDirectionXml=u,b&&(this.currentVoiceEntry.StemColorXml=b,this.currentVoiceEntry.StemColor=b,V.StemColorXml=b),e.elements("beam")&&!a&&this.createBeam(e,V),V}addRestNote(e,t,s,r,o,a,l){const c=Fraction$1.createFromFraction(t),d=e.element("display-step"),m=e.element("display-octave");let u,g,b;d&&m&&(u=NoteEnum[d.value.toUpperCase()],g=parseInt(m.value,10),b=new Pitch(u,g,AccidentalEnum.NONE));const y=new Note$1(this.currentVoiceEntry,this.currentStaffEntry,c,b,this.currentMeasure,!0);return this.addNoteInfo(y,s,o,a,r,u,g,l,l),this.currentVoiceEntry.Notes.push(y),this.openBeams.length>0&&this.openBeams.last().ExtendedNoteList.push(y),y}addNoteInfo(e,t,s,r,o,a,l,c,d){e.NoteTypeXml=t,e.PrintObject=s,e.IsCueNote=r,e.NormalNotes=o,e.displayStepUnpitched=a,e.displayOctaveUnpitched=l,e.NoteheadColorXml=c,e.NoteheadColor=c}createBeam(e,t){var s;try{const r=e.element("beam");let o;if(r!==void 0&&r.hasAttributes&&(o=r.attribute("number")),o){let a=parseInt(o.value,10);const l=e.elements("beam"),c=l[0].value;l&&(c==="begin"?(a===((s=this.openBeams.last())==null?void 0:s.BeamNumber)?(this.beamNumberOffset++,a+=this.beamNumberOffset):this.openBeams.last()&&this.handleOpenBeam(),this.openBeams.push(new Beam(a,this.beamNumberOffset))):a+=this.beamNumberOffset);let d=!1;if(!(a>0&&a<=this.openBeams.length)||!this.openBeams[a-1]){loglevelExports.debug("[OSMD] invalid beamnumber");return}for(let m=0,u=this.openBeams[a-1].Notes.length;m<u;++m){const g=this.openBeams[a-1].Notes[m];this.currentVoiceEntry===g.ParentVoiceEntry&&(d=!0)}d||(this.openBeams[a-1].addNoteToBeam(t),c==="end"&&this.endBeam())}}catch(r){const o=ITextTranslation.translateText("ReaderErrorMessages/BeamError","Error while reading beam.");throw this.musicSheet.SheetErrors.pushMeasureError(o),new MusicSheetReadingException("",r)}}endBeam(){this.openBeams.pop(),this.beamNumberOffset=Math.max(0,this.beamNumberOffset-1)}handleOpenBeam(){const e=this.openBeams.last();if(e.Notes.length===0){this.endBeam();return}if(e.Notes.length===1){const t=e.Notes[0];t.NoteBeam=void 0,this.endBeam();return}if(this.currentNote===CollectionUtil.last(e.Notes))this.endBeam();else{const s=CollectionUtil.last(e.Notes).ParentStaffEntry,r=this.currentMeasure.getVerticalContainerIndexByTimestamp(s.Timestamp),o=s.VerticalContainerParent.StaffEntries.indexOf(s);if(r<this.currentMeasure.VerticalSourceStaffEntryContainers.length-1){const a=this.currentMeasure.VerticalSourceStaffEntryContainers[r+1].StaffEntries[o];if(a)for(let l=0,c=a.VoiceEntries.length;l<c;++l){const d=a.VoiceEntries[l];if(d.ParentVoice===this.voice){const m=d.Notes[0];m.Length.lte(new Fraction$1(1,8))?(this.openBeams.last().addNoteToBeam(m),this.endBeam()):this.endBeam()}}}else this.endBeam()}}addTuplet(e,t){let s=!1;if(t!==void 0&&t.length>1){let r=e.element("time-modification");r&&(r=r.element("actual-notes"));const o=t;for(let a=0,l=o.length;a<l;++a){const c=o[a];if(c!==void 0&&c.attributes()){const d=c.attribute("bracket");d&&d.value==="yes"&&(s=!0);const m=c.attribute("type");if(m&&m.value==="start"){let u=1;c.attribute("number")&&(u=parseInt(c.attribute("number").value,10));let g=0;if(r&&(g=parseInt(r.value,10),isNaN(g))){const v=ITextTranslation.translateText("ReaderErrorMessages/TupletNoteDurationError","Invalid tuplet note duration.");throw this.musicSheet.SheetErrors.pushMeasureError(v),new MusicSheetReadingException(v,void 0)}const b=new Tuplet(g,s);b.tupletLabelNumberPlacement=PlacementEnum.Above;const y=c.attribute("placement");y&&(y.value==="below"&&(b.tupletLabelNumberPlacement=PlacementEnum.Below),b.PlacementFromXml=!0),this.tupletDict[u]&&(delete this.tupletDict[u],Object.keys(this.tupletDict).length===0?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--),this.tupletDict[u]=b;const S=[];S.push(this.currentNote),b.Notes.push(S),b.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=b,this.openTupletNumber=u}else if(m.value==="stop"){let u=1;c.attribute("number")&&(u=parseInt(c.attribute("number").value,10));const g=this.tupletDict[u];if(g){const b=c.attribute("placement");b&&(b.value==="below"?g.tupletLabelNumberPlacement=PlacementEnum.Below:g.tupletLabelNumberPlacement=PlacementEnum.Above,g.PlacementFromXml=!0);const y=[];if(y.push(this.currentNote),g.Notes.push(y),!g.PlacementFromXml){let S=!1;for(const v of g.Notes){for(const x of v)if(!x.isRest()){x.StemDirectionXml===StemDirectionType.Down?g.tupletLabelNumberPlacement=PlacementEnum.Below:g.tupletLabelNumberPlacement=PlacementEnum.Above,S=!0;break}if(S)break}}g.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=g,delete this.tupletDict[u],Object.keys(this.tupletDict).length===0?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--}}}}}else if(t[0]){const r=t[0];if(r.hasAttributes){const o=r.attribute("type").value;let a=1;r.attribute("number")&&(a=parseInt(r.attribute("number").value,10));const l=isNaN(a),c=r.attribute("bracket");if(c&&c.value==="yes"&&(s=!0),o==="start"){let d=0,m=e.element("time-modification");if(m&&(m=m.element("actual-notes")),m&&(d=parseInt(m.value,10),isNaN(d))){const y=ITextTranslation.translateText("ReaderErrorMessages/TupletNoteDurationError","Invalid tuplet note duration.");throw this.musicSheet.SheetErrors.pushMeasureError(y),new MusicSheetReadingException(y)}l&&(this.openTupletNumber++,a=this.openTupletNumber);let u=this.tupletDict[a];u||(u=this.tupletDict[a]=new Tuplet(d,s),u.tupletLabelNumberPlacement=PlacementEnum.Above);const g=r.attribute("placement");g&&(g.value==="below"?u.tupletLabelNumberPlacement=PlacementEnum.Below:u.tupletLabelNumberPlacement=PlacementEnum.Above,u.PlacementFromXml=!0);const b=[];b.push(this.currentNote),u.Notes.push(b),u.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=u,this.openTupletNumber=a}else if(o==="stop"){l&&(a=this.openTupletNumber);const d=this.tupletDict[this.openTupletNumber];if(d){const m=r.attribute("placement");m&&(m.value==="below"?d.tupletLabelNumberPlacement=PlacementEnum.Below:d.tupletLabelNumberPlacement=PlacementEnum.Above,d.PlacementFromXml=!0);const u=[];if(u.push(this.currentNote),d.Notes.push(u),!d.PlacementFromXml){let g=!1;for(const b of d.Notes){for(const y of b)if(!y.isRest()){y.StemDirectionXml===StemDirectionType.Down?d.tupletLabelNumberPlacement=PlacementEnum.Below:d.tupletLabelNumberPlacement=PlacementEnum.Above,g=!0;break}if(g)break}}d.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=d,Object.keys(this.tupletDict).length===0?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--,delete this.tupletDict[a]}}}}return this.openTupletNumber}handleTimeModificationNode(e){if(this.tupletDict[this.openTupletNumber])try{const t=this.tupletDict[this.openTupletNumber],s=CollectionUtil.last(t.Notes),r=s[0].ParentVoiceEntry;let o;r.Timestamp.Equals(this.currentVoiceEntry.Timestamp)?o=s:(o=[],t.Notes.push(o),t.Fractions.push(this.getTupletNoteDurationFromType(e))),o.push(this.currentNote),this.currentNote.NoteTuplet=t}catch(t){const s=ITextTranslation.translateText("ReaderErrorMessages/TupletNumberError","Invalid tuplet number.");throw this.musicSheet.SheetErrors.pushMeasureError(s),t}else if(this.currentVoiceEntry.Notes.length>0){const t=this.currentVoiceEntry.Notes[0];if(t.NoteTuplet){const s=t.NoteTuplet;CollectionUtil.last(s.Notes).push(this.currentNote),this.currentNote.NoteTuplet=s}}}addTie(e,t,s,r){if(e){if(e.length===1){const o=e[0];if(o!==void 0&&o.attributes()){const a=this.getTieDirection(o),l=o.attribute("type").value;try{if(l==="start"){const c=this.findCurrentNoteInTieDict(this.currentNote);c<0&&delete this.openTieDict[c];const d=this.getNextAvailableNumberForTie(),m=new Tie(this.currentNote,r);this.openTieDict[d]=m,m.TieNumber=d,m.TieDirection=a}else if(l==="stop"){const c=this.findCurrentNoteInTieDict(this.currentNote),d=this.openTieDict[c];d&&(d.AddNote(this.currentNote),delete this.openTieDict[c])}}catch(c){const d=ITextTranslation.translateText("ReaderErrorMessages/TieError","Error while reading tie.");this.musicSheet.SheetErrors.pushMeasureError(d)}}}else if(e.length===2){const o=this.findCurrentNoteInTieDict(this.currentNote);if(o>=0){const a=this.openTieDict[o];a.AddNote(this.currentNote);for(const l of e)if(l.attribute("type").value==="start"){const d=this.getTieDirection(l);a.NoteIndexToTieDirection[a.Notes.length-1]=d}}}}}getTieDirection(e){let t=PlacementEnum.NotYetDefined;const s=e.attribute("placement");s&&(s.value==="above"?t=PlacementEnum.Above:s.value==="below"&&(t=PlacementEnum.Below));const r=e.attribute("orientation");return r&&(r.value==="over"?t=PlacementEnum.Above:r.value==="under"&&(t=PlacementEnum.Below)),t}getNextAvailableNumberForTie(){const e=Object.keys(this.openTieDict);if(e.length===0)return 1;e.sort((t,s)=>+t-+s);for(let t=0;t<e.length;t++)if(""+(t+1)!==e[t])return t+1;return+e[e.length-1]+1}findCurrentNoteInTieDict(e){const t=this.openTieDict;for(const s in t)if(t.hasOwnProperty(s)){const r=t[s],o=r.Notes[0],a=e;if(r.Pitch.FundamentalNote===e.Pitch.FundamentalNote&&r.Pitch.Octave===e.Pitch.Octave)return parseInt(s,10);if(o.StringNumberTab!==void 0&&o.StringNumberTab===a.StringNumberTab)return parseInt(s,10)}return-1}getTupletNoteDurationFromType(e){if(e.element("type")){const t=e.element("type");if(t){const s=t.value;try{return NoteTypeHandler.getNoteDurationFromType(s)}catch(r){const o=ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid note duration.");throw this.musicSheet.SheetErrors.pushMeasureError(o),new MusicSheetReadingException("",r)}}}}}class ChordSymbolReader{static readChordSymbol(e,t,s){const r=e.element("root"),o=e.element("kind"),a=o.attribute("text");if(!r||!o)return;const l=r.element("root-step"),c=r.element("root-alter");if(!l)return;let d;try{d=NoteEnum[l.value.trim()]}catch(A){const E=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(E),loglevelExports.debug("InstrumentReader.readChordSymbol",E,A);return}let m=AccidentalEnum.NONE;if(c)try{m=Pitch.AccidentalFromHalfTones(parseInt(c.value,10))}catch(A){const E=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(E),loglevelExports.debug("InstrumentReader.readChordSymbol",E,A)}const u=new Pitch(d,1,m);let g=o.value.trim().replace("-","");if(a)switch(a.value){case"aug":g="augmented";break;case"dim":g="diminished";break}let b;try{b=ChordSymbolEnum[g]}catch(A){const E=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(E),loglevelExports.debug("InstrumentReader.readChordSymbol",E,A);return}let y;const S=e.element("bass");if(S){const A=S.element("bass-step"),E=S.element("bass-alter");let w=NoteEnum.C;if(A)try{w=NoteEnum[A.value.trim()]}catch(C){const P=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(P),loglevelExports.debug("InstrumentReader.readChordSymbol",P,C);return}let _=AccidentalEnum.NONE;if(E)try{_=Pitch.AccidentalFromHalfTones(parseInt(E.value,10))}catch(C){const P=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(P),loglevelExports.debug("InstrumentReader.readChordSymbol",P,C)}y=new Pitch(w,1,_)}const v=[],x=e.elements("degree");for(const A of x)if(A){const E=A.element("degree-value"),w=A.element("degree-alter"),_=A.element("degree-type");if(!E||!w||!_)return;let C;try{C=parseInt(E.value.trim(),10)}catch(R){const N=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(N),loglevelExports.debug("InstrumentReader.readChordSymbol",N,R);return}let P;try{P=Pitch.AccidentalFromHalfTones(parseInt(w.value,10))}catch(R){const N=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(N),loglevelExports.debug("InstrumentReader.readChordSymbol",N,R);return}let I;try{I=ChordDegreeText[_.value.trim().toLowerCase()]}catch(R){const N=ITextTranslation.translateText("ReaderErrorMessages/ChordSymbolError","Invalid chord symbol");t.SheetErrors.pushMeasureError(N),loglevelExports.debug("InstrumentReader.readChordSymbol",N,R);return}v.push(new Degree(C,P,I))}return new ChordSymbolContainer(u,b,y,v,t.Rules)}}class Pedal{constructor(e=!1,t=!0){this.ChangeEnd=!1,this.ChangeBegin=!1,this.line=e,this.sign=t}get IsLine(){return this.line}get IsSign(){return this.sign}}class WavyLine extends AbstractExpression{constructor(e){super(e)}}class ExpressionReader{constructor(e,t,s){this.openContinuousDynamicExpressions=[],this.musicSheet=e,this.staffNumber=s,this.globalStaffIndex=e.getGlobalStaffIndexOfFirstStaff(t)+(s-1),this.initialize()}readExpressionParameters(e,t,s,r,o,a,l){this.initialize();const c=e.element("offset");if(c!==void 0&&!l)try{this.offsetDivisions=parseInt(c.value,10)}catch(u){const g="ReaderErrorMessages/ExpressionOffsetError, Invalid expression offset -> set to default.";loglevelExports.debug("ExpressionReader.readExpressionParameters",g,u),this.musicSheet.SheetErrors.pushMeasureError(g),this.offsetDivisions=0}this.directionTimestamp=Fraction$1.createFromFraction(r);let d=new Fraction$1(Math.abs(this.offsetDivisions),s*4);this.offsetDivisions>0?r.RealValue>0?(d=Fraction$1.multiply(Fraction$1.minus(r,o),d),this.directionTimestamp=Fraction$1.plus(d,r)):this.directionTimestamp=Fraction$1.createFromFraction(d):this.offsetDivisions<0&&(r.RealValue>0?(d=Fraction$1.multiply(Fraction$1.minus(r,o),d),this.directionTimestamp=Fraction$1.minus(r,d)):this.directionTimestamp=Fraction$1.createFromFraction(d));const m=e.attribute("placement");if(m)try{const u=m.value;u==="below"?this.placement=PlacementEnum.Below:u==="above"&&(this.placement=PlacementEnum.Above)}catch(u){const g=ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement -> set to default.");loglevelExports.debug("ExpressionReader.readExpressionParameters",g,u),this.musicSheet.SheetErrors.pushMeasureError(g),this.placement=PlacementEnum.Below}if(this.placement===PlacementEnum.NotYetDefined)try{const u=e.element("direction-type");if(u){const g=u.element("dynamics");if(g){const v=g.attribute("default-y");v&&this.readExpressionPlacement(v,"read dynamics y pos")}const b=u.element("wedge");if(b){const v=b.attribute("default-y");v&&this.readExpressionPlacement(v,"read wedge y pos")}const y=u.element("words");if(y){const v=y.attribute("default-y");v&&this.readExpressionPlacement(v,"read words y pos")}const S=u.element("rehearsal");if(S){const v=S.attribute("default-y");v&&this.readExpressionPlacement(v,"read rehearsal pos")}}}catch(u){const g=ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement -> set to default.");loglevelExports.debug("ExpressionReader.readExpressionParameters",g,u),this.musicSheet.SheetErrors.pushMeasureError(g),this.placement=PlacementEnum.Below}this.placement===PlacementEnum.NotYetDefined&&(t.Staves.length>1?this.placement=PlacementEnum.Below:t.HasLyrics?this.placement=PlacementEnum.Above:this.placement=PlacementEnum.Below)}read(e,t,s,r=void 0,o=0){let a=!1,l=!1;const c=e.element("sound");if(c){const u=c.attribute("tempo"),g=c.attribute("dynamics");if(u){const b=u.value.match(/^(\d+)(\.\d+)?$/);(b==null?void 0:b.length)>0?this.soundTempo=Math.round(Number.parseFloat(u.value)):(loglevelExports.info("invalid xml tempo: "+u.value),this.soundTempo=100),t.TempoInBPM=this.soundTempo,this.musicSheet.DefaultStartTempoInBpm===0&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,a=!0}if(g){const b=g.value.match(/\d+/);this.soundDynamic=b!==void 0?parseInt(b[0],10):100,l=!0}}const d=e.element("direction-type");if(!d)return;let m=d.element("metronome");if(m){t.metronomeNoteIndex=o;const u=m.element("beat-unit"),g=m.element("beat-unit-dot")!==void 0,b=m.element("per-minute");if(u!==void 0&&b){m.hasAttributes&&m.attribute("default-x")!==void 0&&(this.directionTimestamp=Fraction$1.createFromFraction(s));const S=parseFloat(b.value);this.createNewTempoExpressionIfNeeded(t);const v=new InstantaneousTempoExpression(void 0,this.placement,this.staffNumber,S,this.currentMultiTempoExpression,!0);v.parentMeasure=t,this.soundTempo=S,t.TempoInBPM=this.soundTempo*(g?1.5:1),this.musicSheet.DefaultStartTempoInBpm===0&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),t.MeasureNumberXML===1&&this.musicSheet.SourceMeasures.length===0&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,v.dotted=g,v.beatUnit=u.value,this.currentMultiTempoExpression.addExpression(v,""),this.currentMultiTempoExpression.CombinedExpressionsText="test"}return}if(m=d.element("dynamics"),m){const u=e.element("notations")!==void 0;this.interpretInstantaneousDynamics(m,t,s,u);return}if(m=d.element("words"),m){const u=d.elements("words");let g="";for(const b of u)g+=b.value;if(m.value=g,a||isSpeedKeyword(m.value)||isSpeedHiddenKeyword(m.value)){this.createNewTempoExpressionIfNeeded(t),this.currentMultiTempoExpression.CombinedExpressionsText=m.value,(isSpeedKeyword(m.value)||isSpeedHiddenKeyword(m.value))&&(m.value=void 0);const b=new InstantaneousTempoExpression(m.value,this.placement,this.staffNumber,this.soundTempo,this.currentMultiTempoExpression);this.currentMultiTempoExpression.addExpression(b,"")}else l||this.interpretWords(m,t,s);return}if(m=d.element("wedge"),m){this.interpretWedge(m,t,r,t.MeasureNumber);return}if(m=d.element("rehearsal"),m){this.interpretRehearsalMark(m,t,s,t.MeasureNumber);return}}closeOpenExpressions(e,t){for(const s of this.openContinuousDynamicExpressions)this.createNewMultiExpressionIfNeeded(e,s.NumberXml,t),this.closeOpenContinuousDynamic(s,e,t);this.openContinuousTempoExpression&&this.closeOpenContinuousTempo(Fraction$1.plus(e.AbsoluteTimestamp,t))}addOctaveShift(e,t,s){var l;let r=1;const o=e.element("staff");if(o)try{r=parseInt(o.value,10)}catch(c){const d=ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftStaffError","Invalid octave shift staff number -> set to default");this.musicSheet.SheetErrors.pushMeasureError(d),r=1,loglevelExports.debug("ExpressionReader.addOctaveShift",d,c)}const a=e.element("direction-type");if(a){const c=a.element("octave-shift"),d=this.readPlacement(e);if(c!==void 0&&c.hasAttributes)try{const m=this.readNumber(c);if(c.attribute("size")){const u=parseInt(c.attribute("size").value,10);let g=0;u===8?g=1:u===15&&(g=2);let b=(l=c.attribute("type"))==null?void 0:l.value;if(b||(d===PlacementEnum.Above?b="down":d===PlacementEnum.Below&&(b="up")),b==="up"||b==="down"){const y=new OctaveShift(b,g);y.StaffNumber=r,this.getMultiExpression=this.createNewMultiExpressionIfNeeded(t,m),this.getMultiExpression.OctaveShiftStart=y,y.ParentStartMultiExpression=this.getMultiExpression,this.openOctaveShift=y}else if(b==="stop"){if(this.openOctaveShift){this.getMultiExpression=this.createNewMultiExpressionIfNeeded(t,this.openOctaveShift.numberXml,s);const y=this.getMultiExpression;y.OctaveShiftEnd=this.openOctaveShift,this.openOctaveShift.ParentEndMultiExpression=this.getMultiExpression,this.openOctaveShift=void 0}}else b||loglevelExports.debug("octave-shift missing type in xml")}}catch(m){const u=ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftError","Error while reading octave shift.");this.musicSheet.SheetErrors.pushMeasureError(u),loglevelExports.debug("ExpressionReader.addOctaveShift",u,m)}}}addPedalMarking(e,t,s){var o,a,l,c;const r=e.element("direction-type");if(r){const d=r.element("pedal");if(d!==void 0&&d.hasAttributes){let m=!1,u=!1;try{switch(((o=d.attribute("line"))==null?void 0:o.value)==="yes"?u=!0:((a=d.attribute("line"))==null?void 0:a.value)==="no"&&(u=!1,m=!0),((l=d.attribute("sign"))==null?void 0:l.value)==="yes"?m=!0:((c=d.attribute("sign"))==null?void 0:c.value)==="no"&&(m=!1,u=!0),d.attribute("type").value){case"start":this.openPedal&&this.openPedal.IsLine&&this.endOpenPedal(t),this.createNewMultiExpressionIfNeeded(t,-1),this.openPedal=new Pedal(u,m),this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openPedal&&this.endOpenPedal(t);break;case"change":this.openPedal&&this.openPedal.IsLine&&(this.openPedal.ChangeEnd=!0,this.createNewMultiExpressionIfNeeded(t,-1),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.createNewMultiExpressionIfNeeded(t,-1),this.openPedal=new Pedal(u,m),this.openPedal.ChangeBegin=!0,this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression);break;case"continue":break;default:break}}catch(g){const b=ITextTranslation.translateText("ReaderErrorMessages/PedalError","Error while reading pedal.");this.musicSheet.SheetErrors.pushMeasureError(b),loglevelExports.debug("ExpressionReader.addPedalMarking",b,g)}}}}endOpenPedal(e){this.createNewMultiExpressionIfNeeded(e,-1),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.openPedal=void 0}addWavyLine(e,t,s,r){if(e&&e.hasAttributes)try{switch(e.attribute("type").value){case"start":this.createNewMultiExpressionIfNeeded(t,-1),this.openWavyLine=new WavyLine(this.placement),this.getMultiExpression.WavyLineStart=this.openWavyLine,this.openWavyLine.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openWavyLine&&(this.createNewMultiExpressionIfNeeded(t,-1,s),this.getMultiExpression.WavyLineEnd=this.openWavyLine,this.openWavyLine.ParentEndMultiExpression=this.getMultiExpression,this.openWavyLine=void 0);break;case"continue":break;default:break}}catch(o){const a=ITextTranslation.translateText("ReaderErrorMessages/WavyLineError","Error while reading wavy-line.");this.musicSheet.SheetErrors.pushMeasureError(a),loglevelExports.debug("ExpressionReader.addWavyLine",a,o)}}initialize(){this.placement=PlacementEnum.NotYetDefined,this.soundTempo=0,this.soundDynamic=0,this.offsetDivisions=0}readPlacement(e){var s;const t=(s=e.attribute("placement"))==null?void 0:s.value;return t==="above"?PlacementEnum.Above:t==="below"?PlacementEnum.Below:PlacementEnum.NotYetDefined}readExpressionPlacement(e,t){try{const s=parseInt(e.value,10);s<0?this.placement=PlacementEnum.Below:s>0&&(this.placement=PlacementEnum.Above)}catch(s){loglevelExports.debug("ExpressionReader.readExpressionParameters",t,s)}}interpretInstantaneousDynamics(e,t,s,r){if(e.hasElements){e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(s));const o=this.readNumber(e);let a=e.elements()[0].name;if(a==="other-dynamics"&&(a=e.elements()[0].value),a){r?this.createNewMultiExpressionIfNeeded(t,o,Fraction$1.createFromFraction(s)):this.createNewMultiExpressionIfNeeded(t,o);const l=new InstantaneousDynamicExpression(a,this.soundDynamic,this.placement,this.staffNumber,t);l.InMeasureTimestamp=s.clone(),this.getMultiExpression.addExpression(l,""),this.initialize(),this.activeInstantaneousDynamic?this.activeInstantaneousDynamic.DynEnum=l.DynEnum:this.activeInstantaneousDynamic=new InstantaneousDynamicExpression(a,0,PlacementEnum.NotYetDefined,1,t)}}}interpretWords(e,t,s){const r=e.value;let o;const a=e.attribute("font-style");if(a&&a.value==="italic"&&(o=FontStyles.Italic),r.length>0){if(e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(s)),this.checkIfWordsNodeIsRepetitionInstruction(r))return;this.fillMultiOrTempoExpression(r,t,s,o),this.initialize()}}readNumber(e){var r;let t=1;const s=(r=e.attribute("number"))==null?void 0:r.value;return s&&(t=Number.parseInt(s,10)),t}interpretWedge(e,t,s,r){var a,l;e!==void 0&&e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(s));const o=this.readNumber(e);((l=(a=e.attribute("type"))==null?void 0:a.value)==null?void 0:l.toLowerCase())==="stop"?this.createNewMultiExpressionIfNeeded(t,o,s):this.createNewMultiExpressionIfNeeded(t,o),this.addWedge(e,t,s),this.initialize()}interpretRehearsalMark(e,t,s,r){t.rehearsalExpression=new RehearsalExpression(e.value,this.placement)}createNewMultiExpressionIfNeeded(e,t,s=void 0){s||(s=this.directionTimestamp);let r=this.getMultiExpression;return(!r||r&&(r.SourceMeasureParent!==e||r.numberXml!==t||r.SourceMeasureParent===e&&r.Timestamp!==s))&&(this.getMultiExpression=r=new MultiExpression(e,Fraction$1.createFromFraction(s)),e.StaffLinkedExpressions[this.globalStaffIndex].push(r)),r}createNewTempoExpressionIfNeeded(e){(!this.currentMultiTempoExpression||this.currentMultiTempoExpression.SourceMeasureParent!==e||this.currentMultiTempoExpression.Timestamp!==this.directionTimestamp)&&(this.currentMultiTempoExpression=new MultiTempoExpression(e,Fraction$1.createFromFraction(this.directionTimestamp)),e.TempoExpressions.push(this.currentMultiTempoExpression))}addWedge(e,t,s){if(e!==void 0&&e.hasAttributes){const r=this.readNumber(e),o=e.attribute("type").value.toLowerCase();try{if(o==="crescendo"||o==="diminuendo"){const a=new ContinuousDynamicExpression(ContDynamicEnum[o],this.placement,this.staffNumber,t,this.activeInstantaneousDynamic,r);this.openContinuousDynamicExpressions.push(a);let l=this.getMultiExpression;l||(l=this.createNewMultiExpressionIfNeeded(t,r)),l.StartingContinuousDynamic=a,a.StartMultiExpression=l,this.activeInstantaneousDynamic!==void 0&&this.activeInstantaneousDynamic.StaffNumber===a.StaffNumber&&(this.activeInstantaneousDynamic=void 0)}else if(o==="stop")for(const a of this.openContinuousDynamicExpressions)a.NumberXml===r&&a.NumberXml===r&&this.closeOpenContinuousDynamic(a,t,s)}catch(a){const l="ReaderErrorMessages/WedgeError, Error while reading Crescendo / Diminuendo.";this.musicSheet.SheetErrors.pushMeasureError(l),loglevelExports.debug("ExpressionReader.addWedge",l,a)}}}fillMultiOrTempoExpression(e,t,s,r){if(!e)return;const o=e.trim();this.createExpressionFromString("",o,t,s,e,r)}createExpressionFromString(e,t,s,r,o,a){if(InstantaneousTempoExpression.isInputStringInstantaneousTempo(t)||ContinuousTempoExpression.isInputStringContinuousTempo(t)){if(s.TempoExpressions.length>0)for(let m=0,u=s.TempoExpressions.length;m<u;++m){const g=s.TempoExpressions[m];if(g.Timestamp===this.directionTimestamp&&g.InstantaneousTempo!==void 0&&g.InstantaneousTempo.Label.indexOf(t)!==-1)return!1}if(this.createNewTempoExpressionIfNeeded(s),this.currentMultiTempoExpression.CombinedExpressionsText=o,InstantaneousTempoExpression.isInputStringInstantaneousTempo(t)){const m=new InstantaneousTempoExpression(t,this.placement,this.staffNumber,this.soundTempo,this.currentMultiTempoExpression);return this.currentMultiTempoExpression.addExpression(m,e),!0}if(ContinuousTempoExpression.isInputStringContinuousTempo(t)){const m=new ContinuousTempoExpression(t,this.placement,this.staffNumber,this.currentMultiTempoExpression);return this.currentMultiTempoExpression.addExpression(m,e),!0}}if(ContinuousDynamicExpression.isInputStringContinuousDynamic(t)){const m=new ContinuousDynamicExpression(void 0,this.placement,this.staffNumber,s,this.activeInstantaneousDynamic,-1,t),u=this.getMultiExpression;return u&&this.closeOpenContinuousDynamic(u.StartingContinuousDynamic,s,r),this.createNewMultiExpressionIfNeeded(s,-1),this.activeInstantaneousDynamic!==void 0&&this.activeInstantaneousDynamic.StaffNumber===m.StaffNumber&&(this.activeInstantaneousDynamic=void 0),this.openContinuousDynamicExpressions.push(m),m.StartMultiExpression=this.getMultiExpression,this.getMultiExpression.addExpression(m,e),!0}if(MoodExpression.isInputStringMood(t)){const m=this.createNewMultiExpressionIfNeeded(s,-1);s.hasMoodExpressions=!0;const u=new MoodExpression(t,this.placement,this.staffNumber);return u.fontStyle=a,m.addExpression(u,e),!0}const l=this.createNewMultiExpressionIfNeeded(s,-1);if(s.TempoExpressions.length>0)for(let m=0,u=s.TempoExpressions.length;m<u;++m){const g=s.TempoExpressions[m];if(g.Timestamp===this.directionTimestamp&&g.InstantaneousTempo!==void 0&&g.EntriesList.length>0&&!this.hasDigit(t)&&this.globalStaffIndex>0){if(g.EntriesList[0].label.indexOf(t)>=0)return!1;break}}let c=TextAlignmentEnum.CenterBottom;this.musicSheet.Rules.CompactMode&&(c=TextAlignmentEnum.LeftBottom);const d=new UnknownExpression(t,this.placement,c,this.staffNumber);return d.fontStyle=a,l.addExpression(d,e),!1}closeOpenContinuousDynamic(e,t,s){if(!e)return;const r=e.NumberXml;e.EndMultiExpression=this.createNewMultiExpressionIfNeeded(t,r,s),e.StartMultiExpression.EndingContinuousDynamic=e,this.openContinuousDynamicExpressions=this.openContinuousDynamicExpressions.filter(o=>o!==e)}closeOpenContinuousTempo(e){this.openContinuousTempoExpression.AbsoluteEndTimestamp=e,this.openContinuousTempoExpression=void 0}checkIfWordsNodeIsRepetitionInstruction(e){return e=e.trim().toLowerCase(),e==="coda"||e==="tocoda"||e==="to coda"||e==="fine"||e==="d.c."||e==="dacapo"||e==="da capo"||e==="d.s."||e==="dalsegno"||e==="dal segno"||e==="d.c. al fine"||e==="d.s. al fine"||e==="d.c. al coda"||e==="d.s. al coda"}hasDigit(e){return/\d/.test(e)}}class Slur{constructor(){}get StartNote(){return this.startNote}set StartNote(e){this.startNote=e}get EndNote(){return this.endNote}set EndNote(e){this.endNote=e}startNoteHasMoreStartingSlurs(){if(!this.startNote)return!1;for(let e=0,t=this.startNote.NoteSlurs.length;e<t;++e){const s=this.startNote.NoteSlurs[e];if(s!==this&&s.StartNote===this.startNote)return!0}return!1}endNoteHasMoreEndingSlurs(){if(!this.endNote)return!1;for(let e=0,t=this.endNote.NoteSlurs.length;e<t;++e){const s=this.endNote.NoteSlurs[e];if(s!==this&&s.EndNote===this.endNote)return!0}return!1}isCrossed(){return this.startNote.ParentStaffEntry.ParentStaff!==this.endNote.ParentStaffEntry.ParentStaff}isSlurLonger(){if(!this.endNote||!this.startNote)return!1;const e=Fraction$1.minus(this.endNote.getAbsoluteTimestamp(),this.startNote.getAbsoluteTimestamp());for(let t=0,s=this.startNote.NoteSlurs.length;t<s;++t){const r=this.startNote.NoteSlurs[t];if(r!==this&&r.EndNote!==void 0&&r.StartNote!==void 0&&Fraction$1.minus(r.EndNote.getAbsoluteTimestamp(),r.StartNote.getAbsoluteTimestamp()).CompareTo(e)===-1)return!0}for(let t=0,s=this.endNote.NoteSlurs.length;t<s;++t){const r=this.endNote.NoteSlurs[t];if(r!==this&&r.EndNote!==void 0&&r.StartNote!==void 0&&Fraction$1.minus(r.EndNote.getAbsoluteTimestamp(),r.StartNote.getAbsoluteTimestamp()).CompareTo(e))return!0}return!1}}class SlurReader{constructor(e){this.openSlurDict={},this.musicSheet=e}addSlur(e,t){try{if(e){for(const s of e)if(s.attributes().length>0){const r=s.attribute("type").value;let o=1;try{s.attribute("number")&&(o=parseInt(s.attribute("number").value,10))}catch(d){loglevelExports.debug("VoiceGenerator.addSlur number: ",d)}let a=PlacementEnum.NotYetDefined;const l=s.attribute("placement");l&&l.value&&(l.value==="above"?a=PlacementEnum.Above:l.value==="below"&&(a=PlacementEnum.Below));const c=s.attribute("orientation");if(c&&c.value&&(c.value==="over"?a=PlacementEnum.Above:c.value==="under"&&(a=PlacementEnum.Below)),r==="start"){let d=this.openSlurDict[o];d||(d=new Slur,this.openSlurDict[o]=d),d.StartNote=t,d.PlacementXml=a}else if(r==="stop"){const d=this.openSlurDict[o];d&&(d.EndNote=t,t.checkForDoubleSlur(d)||(t.NoteSlurs.push(d),d.StartNote.NoteSlurs.push(d)),delete this.openSlurDict[o])}}}}catch(s){const r=ITextTranslation.translateText("ReaderErrorMessages/SlurError","Error while reading slur.");this.musicSheet.SheetErrors.pushMeasureError(r)}}}class InstrumentReader{constructor(e,t,s,r){this.voiceGeneratorsDict={},this.staffMainVoiceGeneratorDict={},this.divisions=0,this.currentClefNumber=1,this.currentXmlMeasureIndex=0,this.activeKeyHasBeenInitialized=!1,this.abstractInstructions=[],this.openChordSymbolContainers=[],this.soundTempos=new Map,this.xmlNotes=[],this.repetitionInstructionReader=t,this.xmlMeasureList=s,this.musicSheet=r.GetMusicSheet,this.instrument=r,this.activeClefs=new Array(r.Staves.length),this.activeClefsHaveBeenInitialized=new Array(r.Staves.length);for(let o=0;o<r.Staves.length;o++)this.activeClefsHaveBeenInitialized[o]=!1;this.createExpressionGenerators(r.Staves.length),this.slurReader=new SlurReader(this.musicSheet),this.pluginManager=e}get SoundTempos(){return this.soundTempos}get ActiveKey(){return this.activeKey}get MaxTieNoteFraction(){return this.maxTieNoteFraction}get ActiveRhythm(){return this.activeRhythm}set ActiveRhythm(e){this.activeRhythm=e}readNextXmlMeasure(e,t,s){var d,m,u,g,b,y,S,v,x,A;if(this.currentXmlMeasureIndex>=this.xmlMeasureList.length)return!1;this.currentMeasure=e,this.followingMultirestMeasures=Math.max(this.followingMultirestMeasures-1,0),this.inSourceMeasureInstrumentIndex=this.musicSheet.getGlobalStaffIndexOfFirstStaff(this.instrument),this.repetitionInstructionReader&&this.repetitionInstructionReader.prepareReadingMeasure(e,this.currentXmlMeasureIndex);let r=new Fraction$1(0,1),o=new Fraction$1(0,1),a=!1;this.maxTieNoteFraction=new Fraction$1(0,1);let l=!1;const c=[];try{const E=this.xmlMeasureList[this.currentXmlMeasureIndex],w=E.elements();if(e.Rules.UseXMLMeasureNumbers&&!Number.isInteger(e.MeasureNumberXML)){const C=parseInt((d=E.attribute("number"))==null?void 0:d.value,10);Number.isInteger(C)&&(e.MeasureNumberXML=C)}let _;for(let C=0;C<w.length;C++){const P=w[C];if(C>0&&(_=w[C-1]),P.name==="print"){const I=P.attribute("new-system");(I==null?void 0:I.value)==="yes"&&(e.printNewSystemXml=!0);const R=P.attribute("new-page");(R==null?void 0:R.value)==="yes"&&(e.printNewPageXml=!0)}else if(P.name==="note"){P.element("grace")||(this.xmlNotes.push(P),c.push(P));let I=!0;((m=P.attribute("print-object"))==null?void 0:m.value)==="no"&&(I=!1);let R=1;this.instrument.Staves.length>1&&P.element("staff")&&(R=parseInt(P.element("staff").value,10),isNaN(R)&&(loglevelExports.debug("InstrumentReader.readNextXmlMeasure.get staff number"),R=1)),this.currentStaff=this.instrument.Staves[R-1];const N=P.element("chord")!==void 0;if(P.element("voice")){const H=parseInt(P.element("voice").value,10);this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(H,R-1)}else(!N||!this.currentVoiceGenerator)&&(this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(1,R-1));let G=0,B=new Fraction$1(0,1),k=2,T,V=!1;if(P.element("duration")){if(G=parseInt(P.element("duration").value,10),isNaN(G)){const H=ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid Note Duration.");this.musicSheet.SheetErrors.pushMeasureError(H),loglevelExports.debug("InstrumentReader.readNextXmlMeasure",H);continue}else if(B=new Fraction$1(G,4*this.divisions),G===0?B=this.getNoteDurationFromTypeNode(P):T=this.getNoteDurationFromTypeNode(P),P.element("time-modification")){B=this.getNoteDurationForTuplet(P);const H=P.element("time-modification");H!=null&&H.element("normal-notes")&&(k=parseInt(H.element("normal-notes").value,10)),V=!0}}const Z=P.element("rest")!==void 0,W=P.element("notations"),se=P.element("grace")!==void 0||G===0||N&&l;let ie=!1,fe=!1;if(se){const H=P.element("duration"),ne=P.element("grace");ne&&ne.attributes()&&ne.attribute("slash")&&ne.attribute("slash").value==="yes"&&(ie=!0),H||(B=this.getNoteDurationFromTypeNode(P));const ee=P.element("notations");ee&&ee.element("slur")&&(fe=!0)}let J=!1;P.element("cue")&&(J=!0);const be=P.element("type");let oe=NoteType.UNDEFINED;if(be){const H=be.attribute("size");(H==null?void 0:H.value)==="cue"&&(J=!0),oe=NoteTypeHandler.StringToNoteType(be.value)}let Y=StemDirectionType.Undefined,ae;const de=P.element("stem");if(de){switch(de.value){case"down":Y=StemDirectionType.Down;break;case"up":Y=StemDirectionType.Up;break;case"double":Y=StemDirectionType.Double;break;case"none":Y=StemDirectionType.None;break;default:Y=StemDirectionType.Undefined}const H=de.attribute("color");H&&(ae=this.parseXmlColor(H.value))}let le=0,me="",ve="",ye="";if(W){const H=W.element("ornaments");if(H){const he=H.element("tremolo");if(he){const ge=he.attribute("type");if(me=ge.value,ge){const xe=parseInt(he.value,10);xe>0&&(le=xe),(ge.value==="start"||ge.value==="stop")&&(B=new Fraction$1(parseInt(P.element("duration").value,10),4*this.divisions))}}const re=H.elements("wavy-line");if(re!==void 0)for(const ge of re){const xe=this.expressionReaders[this.readExpressionStaffNumber(P)-1];xe&&(xe.readExpressionParameters(ge,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!1),xe.addWavyLine(ge,this.currentMeasure,r,o))}}W.elements("glissando").find(he=>he.attribute("type").value==="start")&&(ve="start"),W.elements("slide").find(he=>he.attribute("type").value==="start")&&(ye="start")}let U;const $=P.element("notehead");if($){const H=$.attribute("color");H&&(U=this.parseXmlColor(H.value))}let M;const Q=P.attribute("color");Q&&(M=this.parseXmlColor(Q.value),U||(U=M),ae||(ae=M));let z=r.clone();N&&(z=o.clone()),this.currentStaffEntry=this.currentMeasure.findOrCreateStaffEntry(z,this.inSourceMeasureInstrumentIndex+R-1,this.currentStaff).staffEntry,(!this.currentVoiceGenerator.hasVoiceEntry()||!N&&!se&&!l||se&&!l||se&&!N||!se&&l)&&this.currentVoiceGenerator.createVoiceEntry(z,this.currentStaffEntry,this.activeKey,this.ActiveRhythm,se,ie,fe),!se&&!N&&(o=r.clone(),r.Add(B)),N&&this.currentStaffEntry!==void 0&&this.currentStaffEntry.ParentStaff!==this.currentStaff&&(this.currentStaffEntry=this.currentVoiceGenerator.checkForStaffEntryLink(this.inSourceMeasureInstrumentIndex+R-1,this.currentStaff,this.currentStaffEntry,this.currentMeasure));const F=this.currentStaffEntry!==void 0&&this.currentStaffEntry.Timestamp!==void 0&&this.currentStaffEntry.Timestamp.Equals(new Fraction$1(0,1))&&!this.currentStaffEntry.hasNotes();this.saveAbstractInstructionList(this.instrument.Staves.length,F),this.openChordSymbolContainers.length!==0&&(this.currentStaffEntry.ChordContainers=this.openChordSymbolContainers,this.openChordSymbolContainers=[]),this.activeRhythm,!V&&!se&&(B=new Fraction$1(G,4*this.divisions));const O=P.elements("dot").length;if(this.currentVoiceGenerator.read(P,B,T,oe,k,Z,this.currentStaffEntry,this.currentMeasure,t,this.maxTieNoteFraction,N,s,I,J,se,Y,le,ae,U,O,me,ve,ye),W!==void 0&&W.element("dynamics")){const H=this.expressionReaders[this.readExpressionStaffNumber(P)-1];H&&(H.readExpressionParameters(P,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!1),H.read(P,this.currentMeasure,o,void 0,c.length))}l=se}else if(P.name==="attributes"){const I=P.element("divisions");if(I&&(this.divisions=parseInt(I.value,10),isNaN(this.divisions))){const G=ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(loglevelExports.debug("InstrumentReader.readNextXmlMeasure",G),this.divisions=this.readDivisionsFromNotes(),this.divisions>0)this.musicSheet.SheetErrors.push(G+this.instrument.Name);else throw a=!0,new MusicSheetReadingException(G+this.instrument.Name)}if(!P.element("divisions")&&this.divisions===0&&this.currentXmlMeasureIndex===0){const G=ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(this.divisions=this.readDivisionsFromNotes(),this.divisions>0)this.musicSheet.SheetErrors.push(G+this.instrument.Name);else throw a=!0,new MusicSheetReadingException(G+this.instrument.Name)}this.addAbstractInstruction(P,s,_,r.clone()),r.Equals(new Fraction$1(0,1))&&this.isAttributesNodeAtBeginOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],P)&&this.saveAbstractInstructionList(this.instrument.Staves.length,!0),this.isAttributesNodeAtEndOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],P)&&this.saveClefInstructionAtEndOfMeasure();const R=P.elements("staff-details");for(const G of R){const B=G.element("staff-lines");if(B){let k=1;const T=G.attribute("number");T&&(k=parseInt(T.value,10)),this.instrument.Staves[k-1].StafflineCount=parseInt(B.value,10)}}const N=P.element("measure-style");if(N){const G=N.element("multiple-rest");if(G){const B=G.value;let k=0;try{k=Number.parseInt(B,10),e.multipleRestMeasures!==void 0&&k!==e.multipleRestMeasures?e.multipleRestMeasures=0:(e.multipleRestMeasures=k,this.currentMultirestStartMeasure=e,this.followingMultirestMeasures=k+1)}catch(T){console.log("multirest parse error: "+T)}}}}else if(P.name==="forward"){const I=parseInt(P.element("duration").value,10);r.Add(new Fraction$1(I,4*this.divisions))}else if(P.name==="backup"){const I=parseInt(P.element("duration").value,10);r.Sub(new Fraction$1(I,4*this.divisions)),r.IsNegative()&&(r=new Fraction$1(0,1)),o.Sub(new Fraction$1(I,4*this.divisions)),o.IsNegative()&&(o=new Fraction$1(0,1))}else if(P.name==="direction"){const I=P.elements("direction-type"),R=P.element("direction-type");let N=Math.min(1,r.RealValue);this.activeRhythm!==void 0&&this.activeRhythm.Rhythm&&(N/=this.activeRhythm.Rhythm.RealValue);let G=!1;if(this.repetitionInstructionReader&&(G=this.repetitionInstructionReader.handleRepetitionInstructionsFromWordsOrSymbols(R,N)),!G){let B=this.expressionReaders[0];const k=this.readExpressionStaffNumber(P)-1;if(k<this.expressionReaders.length&&(B=this.expressionReaders[k]),B){R.element("octave-shift")&&(B.readExpressionParameters(P,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!0),B.addOctaveShift(P,this.currentMeasure,o.clone())),R.element("pedal")&&(B.readExpressionParameters(P,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!0),B.addPedalMarking(P,this.currentMeasure,o.clone()));const T=R.element("words");if(T&&(GradientWords.map(Z=>Z==null?void 0:Z.toLocaleLowerCase()).includes((u=T.value)==null?void 0:u.toLocaleLowerCase())&&(this.currentGradualChangeMeasure=this.currentMeasure,this.currentMeasure.speedInfo={startWord:(g=T.value)==null?void 0:g.toLocaleLowerCase(),startXmlNoteIndex:c.length,endXmlNoteIndex:0,resetXmlNoteIndex:0,startMeasureListIndex:this.currentXmlMeasureIndex,endMeasureListIndex:0,resetMeasureListIndex:0},this.xmlNotes=[]),T.value.startsWith(GRADIENT_SPEED_CLOSE_TAG)&&((b=this.currentGradualChangeMeasure)!=null&&b.speedInfo)&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:this.xmlNotes.length,endMeasureListIndex:this.currentXmlMeasureIndex}),((y=T.value)==null?void 0:y.toLocaleLowerCase())==="a tempo".toLocaleLowerCase()&&((S=this.currentGradualChangeMeasure)!=null&&S.speedInfo))){const{endXmlNoteIndex:Z,resetXmlNoteIndex:W,endMeasureListIndex:se}=this.currentGradualChangeMeasure.speedInfo;W===0&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:Z||this.xmlNotes.length,endMeasureListIndex:se||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.xmlNotes=[]}if(I.find(V=>V.element("metronome"))&&((v=this.currentGradualChangeMeasure)!=null&&v.speedInfo)){const{endXmlNoteIndex:V,resetXmlNoteIndex:Z,endMeasureListIndex:W}=this.currentGradualChangeMeasure.speedInfo;Z===0&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:V||this.xmlNotes.length,endMeasureListIndex:W||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.xmlNotes=[]}B.readExpressionParameters(P,this.instrument,this.divisions,r,o,this.currentMeasure.MeasureNumber,!1),B.read(P,this.currentMeasure,r,o.clone(),c.length)}}}else if(P.name==="barline"){this.repetitionInstructionReader&&this.repetitionInstructionReader.handleLineRepetitionInstructions(P)&&(this.currentMeasure.HasEndLine=!0);const I=P.attribute("location");if(C===w.length-1||I&&I.value==="right"){const N=(x=P.element("bar-style"))==null?void 0:x.value;if(N&&(this.currentMeasure.endingBarStyleXml=N,this.currentMeasure.endingBarStyleEnum=SystemLinesEnumHelper.xmlBarlineStyleToSystemLinesEnum(N),(A=this.currentGradualChangeMeasure)!=null&&A.speedInfo)){const{endXmlNoteIndex:G,resetXmlNoteIndex:B,endMeasureListIndex:k}=this.currentGradualChangeMeasure.speedInfo;B===0&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:G||this.xmlNotes.length,endMeasureListIndex:k||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.currentGradualChangeMeasure=void 0,this.xmlNotes=[]}}}else if(P.name==="sound")try{if(P.attribute("tempo")){const I=parseFloat(P.attribute("tempo").value);P.element("offset")&&(this.soundTempos.has(this.currentXmlMeasureIndex)||this.soundTempos.set(this.currentXmlMeasureIndex,[]),this.soundTempos.get(this.currentXmlMeasureIndex).push(I)),this.currentXmlMeasureIndex===0&&(this.musicSheet.DefaultStartTempoInBpm=I,this.musicSheet.HasBPMInfo=!0)}}catch(I){loglevelExports.debug("InstrumentReader.readTempoInstruction",I)}else P.name==="harmony"&&this.openChordSymbolContainers.push(ChordSymbolReader.readChordSymbol(P,this.musicSheet,this.activeKey))}for(const C in this.voiceGeneratorsDict)this.voiceGeneratorsDict.hasOwnProperty(C)&&this.voiceGeneratorsDict[C].checkForOpenBeam();if(this.currentXmlMeasureIndex===this.xmlMeasureList.length-1){for(let C=0;C<this.instrument.Staves.length;C++)this.activeClefsHaveBeenInitialized[C]||this.createDefaultClefInstruction(this.musicSheet.getGlobalStaffIndexOfFirstStaff(this.instrument)+C);this.activeKeyHasBeenInitialized||this.createDefaultKeyInstruction();for(let C=0;C<this.expressionReaders.length;C++){const P=this.expressionReaders[C];P&&P.closeOpenExpressions(this.currentMeasure,r)}}Object.keys(this.voiceGeneratorsDict).forEach(C=>{this.voiceGeneratorsDict[C].finalizeReadingMeasure()}),this.musicSheet.HasBPMInfo?e.TempoInBPM===0&&this.previousMeasure&&(this.currentMeasure.TempoInBPM=this.previousMeasure.TempoInBPM):this.currentMeasure.TempoInBPM=120,this.currentMeasure.TempoInBPM||(this.currentMeasure.TempoInBPM=this.musicSheet.DefaultStartTempoInBpm)}catch(E){if(a)throw new MusicSheetReadingException(E.Message);const w=ITextTranslation.translateText("ReaderErrorMessages/MeasureError","Error while reading Measure.");this.musicSheet.SheetErrors.pushMeasureError(w),loglevelExports.debug("InstrumentReader.readNextXmlMeasure",w,E)}return this.previousMeasure=this.currentMeasure,this.currentXmlMeasureIndex+=1,!0}parseXmlColor(e){if(e)return e.length===7?e:e.length===9?"#"+e.substr(3):void 0}doCalculationsAfterDurationHasBeenSet(){for(const e in this.voiceGeneratorsDict)this.voiceGeneratorsDict.hasOwnProperty(e)&&this.voiceGeneratorsDict[e].checkOpenTies()}getOrCreateVoiceGenerator(e,t){const s=this.instrument.Staves[t];let r=this.voiceGeneratorsDict[e];if(r)s.Voices.indexOf(r.GetVoice)===-1&&s.Voices.push(r.GetVoice);else{const o=this.staffMainVoiceGeneratorDict[t];o?(r=new VoiceGenerator(this.pluginManager,s,e,this.slurReader,o.GetVoice),s.Voices.push(r.GetVoice),this.voiceGeneratorsDict[e]=r):(r=new VoiceGenerator(this.pluginManager,s,e,this.slurReader),s.Voices.push(r.GetVoice),this.voiceGeneratorsDict[e]=r,this.staffMainVoiceGeneratorDict[t]=r)}return r}createExpressionGenerators(e){this.expressionReaders=new Array(e);for(let t=0;t<e;t++)this.expressionReaders[t]=new ExpressionReader(this.musicSheet,this.instrument,t+1)}createDefaultClefInstruction(e){let t;this.musicSheet.SourceMeasures.length>0?t=this.musicSheet.SourceMeasures[0]:t=this.currentMeasure;const s=new ClefInstruction(ClefEnum.G,0,2);let r;t.FirstInstructionsStaffEntries[e]?(r=t.FirstInstructionsStaffEntries[e],r.removeFirstInstructionOfTypeClefInstruction()):(r=new SourceStaffEntry(void 0,void 0),t.FirstInstructionsStaffEntries[e]=r),s.Parent=r,r.Instructions.splice(0,0,s)}createDefaultKeyInstruction(){let e;this.musicSheet.SourceMeasures.length>0?e=this.musicSheet.SourceMeasures[0]:e=this.currentMeasure;const t=new KeyInstruction(void 0,0,KeyEnum.major);for(let s=this.inSourceMeasureInstrumentIndex;s<this.inSourceMeasureInstrumentIndex+this.instrument.Staves.length;s++)if(e.FirstInstructionsStaffEntries[s]){const r=e.FirstInstructionsStaffEntries[s];t.Parent=r,r.removeFirstInstructionOfTypeKeyInstruction(),r.Instructions[0]instanceof ClefInstruction?r.Instructions.splice(1,0,t):r.Instructions.splice(0,0,t)}else{const r=new SourceStaffEntry(void 0,void 0);e.FirstInstructionsStaffEntries[s]=r,t.Parent=r,r.Instructions.push(t)}}isAttributesNodeAtBeginOfMeasure(e,t){const s=e.elements(),r=s.indexOf(t);if(r>0&&s[r-1].name==="backup")return!0;let o=-1;for(let a=0;a<s.length;a++)if(s[a].name==="note"){o=a;break}return r<o&&o>0||o<0}isAttributesNodeAtEndOfMeasure(e,t){const s=e.elements().slice();let r=0;for(let a=0;a<s.length;a++)if(s[a]===t){r=a;break}let o=0;for(let a=r;a<s.length;a++)if(s[a].name==="note"){o=a;break}return r>o}getNoteDurationFromTypeNode(e){const t=e.element("type");if(t){const s=t.value;return NoteTypeHandler.getNoteDurationFromType(s)}return new Fraction$1(0,4*this.divisions)}addAbstractInstruction(e,t,s,r){if(e.element("divisions")&&e.elements().length===1)return;const o=e.element("transpose");if(o){const c=o.element("chromatic");c&&(this.instrument.PlaybackTranspose=parseInt(c.value,10))}const a=e.elements("clef");let l;if(a.length>0)for(let c=0,d=a.length;c<d;++c){const m=a[c];let u=ClefEnum.G,g=2,b=1,y=0;const S=m.element("line");if(S)try{g=parseInt(S.value,10)}catch(E){l=ITextTranslation.translateText("ReaderErrorMessages/ClefLineError","Invalid clef line given -> using default clef line."),this.musicSheet.SheetErrors.pushMeasureError(l),g=2,loglevelExports.debug("InstrumentReader.addAbstractInstruction",l,E)}const v=m.element("sign");if(v)try{u=ClefEnum[v.value],ClefInstruction.isSupportedClef(u)||(l=ITextTranslation.translateText("ReaderErrorMessages/ClefError","Unsupported clef found -> using default clef."),this.musicSheet.SheetErrors.pushMeasureError(l),u=ClefEnum.G,g=2),u===ClefEnum.TAB&&(y=-1)}catch(E){l=ITextTranslation.translateText("ReaderErrorMessages/ClefError","Invalid clef found -> using default clef."),this.musicSheet.SheetErrors.pushMeasureError(l),u=ClefEnum.G,g=2,loglevelExports.debug("InstrumentReader.addAbstractInstruction",l,E)}const x=m.element("clef-octave-change");if(x)try{y=parseInt(x.value,10)}catch(E){l=ITextTranslation.translateText("ReaderErrorMessages/ClefOctaveError","Invalid clef octave found -> using default clef octave."),this.musicSheet.SheetErrors.pushMeasureError(l),y=0}if(m.hasAttributes&&m.attribute("number"))try{b=parseInt(m.attribute("number").value,10),b>this.currentClefNumber&&(b=this.currentClefNumber),this.currentClefNumber=b+1}catch(E){l=ITextTranslation.translateText("ReaderErrorMessages/ClefError","Invalid clef found -> using default clef."),this.musicSheet.SheetErrors.pushMeasureError(l),b=1,this.currentClefNumber=b+1}const A=new ClefInstruction(u,y,g);this.abstractInstructions.push([b,A,r])}if(e.element("key")!==void 0&&this.instrument.MidiInstrumentId!==MidiInstrument.Percussion){let c=0;const d=e.element("key").element("fifths");if(d)try{c=parseInt(d.value,10)}catch(b){l=ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key found -> set to default."),this.musicSheet.SheetErrors.pushMeasureError(l),c=0,loglevelExports.debug("InstrumentReader.addAbstractInstruction",l,b)}let m=KeyEnum.none,u=e.element("key");if(u&&(u=u.element("mode")),u)try{m=KeyEnum[u.value]}catch(b){l=ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key found -> set to default."),this.musicSheet.SheetErrors.pushMeasureError(l),m=KeyEnum.major,loglevelExports.debug("InstrumentReader.addAbstractInstruction",l,b)}const g=new KeyInstruction(void 0,c,m);this.abstractInstructions.push([1,g,r])}if(e.element("time")){const c=e.element("time");let d=RhythmSymbolEnum.NONE,m=!0;if(c!==void 0&&c.hasAttributes){const x=c.attribute("symbol");x&&(x.value==="common"?d=RhythmSymbolEnum.COMMON:x.value==="cut"&&(d=RhythmSymbolEnum.CUT));const A=c.attribute("print-object");A&&A.value==="no"&&(m=!1)}let u=0,g=0;const b=c&&c.element("senza-misura")!==void 0,y=e.elements("time"),S=[],v=[];for(let x=0,A=y.length;x<A;++x){const E=y[x];S.push.apply(S,E.elements("beats")),v.push.apply(v,E.elements("beat-type"))}if(b)this.abstractInstructions.push([1,new RhythmInstruction(new Fraction$1(4,4,0,!1),RhythmSymbolEnum.NONE),r]);else{try{if(S!==void 0&&S.length>0&&v!==void 0&&S.length===v.length){const A=S.length,E=new Array(A);let w=0;for(let _=0;_<A;_++){const C=S[_].value;let P=0,I=0;if(C.indexOf("+")!==-1){const R=C.split("+");for(let N=0,G=R.length;N<G;++N)P+=parseInt(R[N],10)}else P=parseInt(C,10);I=parseInt(v[_].value,10),w=Math.max(w,I),E[_]=new Fraction$1(P,I,0,!1)}for(let _=0;_<A;_++)E[_].Denominator===w?u+=E[_].Numerator:u+=w/E[_].Denominator*E[_].Numerator;g=w}else u=parseInt(e.element("time").element("beats").value,10),g=parseInt(e.element("time").element("beat-type").value,10)}catch(A){l=ITextTranslation.translateText("ReaderErrorMessages/RhythmError","Invalid rhythm found -> set to default."),this.musicSheet.SheetErrors.pushMeasureError(l),u=4,g=4,loglevelExports.debug("InstrumentReader.addAbstractInstruction",l,A)}const x=new RhythmInstruction(new Fraction$1(u,g,0,!1),d);x.PrintObject=m,this.abstractInstructions.push([1,x,r])}}}saveAbstractInstructionList(e,t){for(let s=this.abstractInstructions.length-1;s>=0;s--){const r=this.abstractInstructions[s],o=r[0],a=r[1],l=r[2];if(a instanceof ClefInstruction){const c=a;if(this.currentXmlMeasureIndex===0||o<=this.activeClefs.length&&c!==this.activeClefs[o-1])if(!t&&this.currentStaffEntry!==void 0&&!this.currentStaffEntry.hasNotes()&&o-1===this.instrument.Staves.indexOf(this.currentStaffEntry.ParentStaff)){const d=c,m=this.currentStaffEntry;if(l&&Math.abs(l.RealValue-m.Timestamp.RealValue)>.01)continue;d.Parent=m,m.removeFirstInstructionOfTypeClefInstruction(),m.Instructions.push(d),this.activeClefs[o-1]=c,this.abstractInstructions.splice(s,1)}else if(t){if(l.RealValue!==0)continue;let d;if(this.currentMeasure){const m=c,u=this.inSourceMeasureInstrumentIndex+o-1,g=this.currentMeasure.FirstInstructionsStaffEntries[u];if(this.currentXmlMeasureIndex===0)if(!g)d=new SourceStaffEntry(void 0,void 0),this.currentMeasure.FirstInstructionsStaffEntries[u]=d,m.Parent=d,d.Instructions.push(m),this.activeClefsHaveBeenInitialized[o-1]=!0;else if(this.currentMeasure.FirstInstructionsStaffEntries[u]!==void 0&&!(g.Instructions[0]instanceof ClefInstruction))d=g,m.Parent=d,d.removeFirstInstructionOfTypeClefInstruction(),d.Instructions.splice(0,0,m),this.activeClefsHaveBeenInitialized[o-1]=!0;else{const b=new SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[u]=b,m.Parent=b,b.Instructions.push(m)}else if(this.activeClefsHaveBeenInitialized[o-1]){let b=this.previousMeasure;this.followingMultirestMeasures>0&&this.currentMeasure.Rules.RenderMultipleRestMeasures&&(b=this.currentMultirestStartMeasure);const y=new SourceStaffEntry(void 0,void 0);b.LastInstructionsStaffEntries[u]=y,m.Parent=y,y.Instructions.push(m)}else{const b=this.musicSheet.SourceMeasures[0];b.FirstInstructionsStaffEntries[u]?(d=b.FirstInstructionsStaffEntries[u],d.removeFirstInstructionOfTypeClefInstruction()):d=new SourceStaffEntry(void 0,void 0),m.Parent=d,d.Instructions.splice(0,0,m),this.activeClefsHaveBeenInitialized[o-1]=!0}this.activeClefs[o-1]=c,this.abstractInstructions.splice(s,1)}}else{let d;const m=this.activeRhythm.Rhythm;m.RealValue>0&&l.RealValue/m.RealValue>.9&&(this.currentMeasure.LastInstructionsStaffEntries[o-1]||(this.currentMeasure.LastInstructionsStaffEntries[o-1]=new SourceStaffEntry(void 0,this.instrument.Staves[o-1])),d=this.currentMeasure.LastInstructionsStaffEntries[o-1]),d&&(c.Parent=d,d.Instructions.push(c),this.activeClefs[o-1]=c,this.abstractInstructions.splice(s,1))}else o<=this.activeClefs.length&&c===this.activeClefs[o-1]&&this.abstractInstructions.splice(s,1)}if(a instanceof KeyInstruction){const c=a;if(!this.activeKey||this.activeKey.Key!==c.Key){this.activeKey=c,this.abstractInstructions.splice(s,1);let d;if(this.activeKeyHasBeenInitialized?d=this.currentMeasure:(this.activeKeyHasBeenInitialized=!0,this.currentXmlMeasureIndex>0?d=this.musicSheet.SourceMeasures[0]:d=this.currentMeasure),d)for(let m=this.inSourceMeasureInstrumentIndex;m<this.inSourceMeasureInstrumentIndex+e;m++){const u=c;if(d.FirstInstructionsStaffEntries[m]){const g=d.FirstInstructionsStaffEntries[m];u.Parent=g,g.removeFirstInstructionOfTypeKeyInstruction(),g.Instructions.length===0?g.Instructions.push(u):g.Instructions[0]instanceof ClefInstruction?g.Instructions.splice(1,0,u):g.Instructions.splice(0,0,u)}else{const g=new SourceStaffEntry(void 0,void 0);d.FirstInstructionsStaffEntries[m]=g,u.Parent=g,g.Instructions.push(u)}}}else this.abstractInstructions.splice(s,1)}if(a instanceof RhythmInstruction){const c=a;if(!this.activeRhythm||this.activeRhythm!==c){if(this.activeRhythm=c,this.abstractInstructions.splice(s,1),this.currentMeasure)for(let d=this.inSourceMeasureInstrumentIndex;d<this.inSourceMeasureInstrumentIndex+e;d++){const m=c;let u;this.currentMeasure.FirstInstructionsStaffEntries[d]?(u=this.currentMeasure.FirstInstructionsStaffEntries[d],u.removeFirstInstructionOfTypeRhythmInstruction()):(u=new SourceStaffEntry(void 0,void 0),this.currentMeasure.FirstInstructionsStaffEntries[d]=u),m.Parent=u,u.Instructions.push(m)}}else this.abstractInstructions.splice(s,1)}}}saveClefInstructionAtEndOfMeasure(){for(let e=this.abstractInstructions.length-1;e>=0;e--){const t=this.abstractInstructions[e][0],s=this.abstractInstructions[e][1];if(s instanceof ClefInstruction){const r=s;if(!this.activeClefs[t-1]||r.ClefType!==this.activeClefs[t-1].ClefType||r.ClefType===this.activeClefs[t-1].ClefType&&r.Line!==this.activeClefs[t-1].Line){const o=new SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[this.inSourceMeasureInstrumentIndex+t-1]=o;const a=r;a.Parent=o,o.Instructions.push(a),this.activeClefs[t-1]=r,this.abstractInstructions.splice(e,1)}}}}getNoteDurationForTuplet(e){let t=new Fraction$1(0,1);const s=this.getNoteDurationFromTypeNode(e);if(e.element("time-modification")){const r=e.element("time-modification");if(r&&r.element("actual-notes")!==void 0&&r.element("normal-notes")){const o=r.element("actual-notes"),a=r.element("normal-notes");if(o!==void 0&&a){const l=parseInt(o.value,10),c=parseInt(a.value,10);t=new Fraction$1(c*s.Numerator,l*s.Denominator)}}}return t}readExpressionStaffNumber(e){let t=1;if(e.element("staff")){const s=e.element("staff");if(s)try{t=parseInt(s.value,10)}catch(r){const o=ITextTranslation.translateText("ReaderErrorMessages/ExpressionStaffError","Invalid Expression staff number -> set to default.");this.musicSheet.SheetErrors.pushMeasureError(o),t=1,loglevelExports.debug("InstrumentReader.readExpressionStaffNumber",o,r)}}return t}readDivisionsFromNotes(){let e=0,t=this.currentXmlMeasureIndex,s=!1;for(;!s;){const r=this.xmlMeasureList[t].elements();for(let o=0,a=r.length;o<a;++o){const l=r[o];if(l.name==="note"&&!l.element("time-modification")){const c=l.element("duration"),d=l.element("type");if(c!==void 0&&d){const m=d.value;let u=0;try{u=parseInt(c.value,10)}catch(g){loglevelExports.debug("InstrumentReader.readDivisionsFromNotes",g);continue}switch(m){case"1024th":e=u/4*1024;break;case"512th":e=u/4*512;break;case"256th":e=u/4*256;break;case"128th":e=u/4*128;break;case"64th":e=u/4*64;break;case"32nd":e=u/4*32;break;case"16th":e=u/4*16;break;case"eighth":e=u/4*8;break;case"quarter":e=u/4*4;break;case"half":e=u/4*2;break;case"whole":e=u/4;break;case"breve":e=u/4/2;break;case"long":e=u/4/4;break;case"maxima":e=u/4/8;break}}}if(e>0){s=!0;break}}if(e===0&&(t++,t===this.xmlMeasureList.length)){const o=ITextTranslation.translateText("ReaderErrorMEssages/DivisionsError","Invalid divisions value at Instrument: ");throw new MusicSheetReadingException(o+this.instrument.Name)}}return e}}const _SubInstrument=class{constructor(i){this.parentInstrument=i,this.fixedKey=-1,this.name=this.parseMidiInstrument(this.parentInstrument.Name),this.midiInstrumentID=_SubInstrument.midiInstrument[this.name],this.volume=1}get ParentInstrument(){return this.parentInstrument}static isPianoInstrument(i){return i===MidiInstrument.Acoustic_Grand_Piano||i===MidiInstrument.Bright_Acoustic_Piano||i===MidiInstrument.Electric_Grand_Piano||i===MidiInstrument.Electric_Piano_1||i===MidiInstrument.Electric_Piano_2}setMidiInstrument(i){this.midiInstrumentID=_SubInstrument.midiInstrument[this.parseMidiInstrument(i)]}parseMidiInstrument(i){try{if(i){let e=i.toLowerCase().trim();e=e.replace(/\s+/g,"_");for(const t in _SubInstrument.midiInstrument)if(e.indexOf(t)!==-1)return t}if(this.parentInstrument.Name){let e=this.parentInstrument.Name.toLowerCase().trim();e=e.replace(/\s+/g,"_");for(const t in _SubInstrument.midiInstrument)if(e.indexOf(t)!==-1)return t}}catch(e){loglevelExports.error("Error parsing MIDI Instrument. Default to Grand Piano.")}return"unnamed"}};let SubInstrument=_SubInstrument;SubInstrument.midiInstrument={alto_saxophone:MidiInstrument.Alto_Sax,baritone_saxophone:MidiInstrument.Baritone_Sax,horn_in_f:MidiInstrument.French_Horn,english_horn:MidiInstrument.English_Horn,euphonium:MidiInstrument.Euphonium,clarinet_in_bb:MidiInstrument.clarinet_in_bb,clarinet_in_eb:MidiInstrument.clarinet_in_eb,clarinet:MidiInstrument.Clarinet,alto_clarinet:MidiInstrument.Alto_Clarinet,bass_clarinet:MidiInstrument.Bass_Clarinet,bassoon:MidiInstrument.Bassoon,bass_trombone:MidiInstrument.Bass_Trombone,alt:MidiInstrument.Synth_Voice,alto:MidiInstrument.Synth_Voice,banjo:MidiInstrument.Banjo,bariton:MidiInstrument.Synth_Voice,baritone:MidiInstrument.Synth_Voice,bass:MidiInstrument.Synth_Voice,blockflöte:MidiInstrument.Recorder,brass:MidiInstrument.Trombone,bratsche:MidiInstrument.Viola,cello:MidiInstrument.Cello,contrabass:MidiInstrument.Contrabass,drums:MidiInstrument.Percussion,flute:MidiInstrument.Flute,flöte:MidiInstrument.Flute,frenchhorn:MidiInstrument.French_Horn,gitarre:MidiInstrument.Acoustic_Guitar_nylon,guitar:MidiInstrument.Acoustic_Guitar_nylon,harfe:MidiInstrument.Orchestral_Harp,harp:MidiInstrument.Orchestral_Harp,klarinette:MidiInstrument.Clarinet,klavier:MidiInstrument.Acoustic_Grand_Piano,kontrabass:MidiInstrument.Contrabass,oboe:MidiInstrument.Oboe,organ:MidiInstrument.Church_Organ,orgel:MidiInstrument.Church_Organ,orgue:MidiInstrument.Church_Organ,percussion:MidiInstrument.Synth_Drum,小军鼓:MidiInstrument.Synth_Drum,snare_drum:MidiInstrument.Synth_Drum,bass_drum:MidiInstrument.Synth_Drum,side_drum:MidiInstrument.Synth_Drum,piano:MidiInstrument.Acoustic_Grand_Piano,piccolo:MidiInstrument.Piccolo,posaune:MidiInstrument.Trombone,recorder:MidiInstrument.Recorder,sax:MidiInstrument.Tenor_Sax,schlagwerk:MidiInstrument.Percussion,schlagzeug:MidiInstrument.Percussion,sopran:MidiInstrument.Synth_Voice,steeldrum:MidiInstrument.Steel_Drums,streicher:MidiInstrument.String_Ensemble_1,strings:MidiInstrument.String_Ensemble_1,tenor:MidiInstrument.Synth_Voice,tpt:MidiInstrument.Trumpet,trombone:MidiInstrument.Trombone,trompete:MidiInstrument.Trumpet,trumpet:MidiInstrument.Trumpet,tuba:MidiInstrument.Tuba,unnamed:MidiInstrument.Acoustic_Grand_Piano,viola:MidiInstrument.Viola,violin:MidiInstrument.Violin,"violon-c":MidiInstrument.Cello,"violon.":MidiInstrument.Violin,voice:MidiInstrument.Synth_Voice,woodblock:MidiInstrument.Woodblock,alto_clarinet_in_eb:MidiInstrument.AltoClarinetInEb,trumpet_in_bb:MidiInstrument.TrumpetInBb,tenor_saxophone:MidiInstrument.TenorSaxophone};class StringUtil{static StringContainsSeparatedWord(e,t,s=!1){return new RegExp("( |^)"+t+"([ .]|$)",s?"i":void 0).test(e)}}class RepetitionInstructionReader{set MusicSheet(e){this.musicSheet=e,this.xmlMeasureList=new Array(this.musicSheet.Instruments.length),this.repetitionInstructions=[]}prepareReadingMeasure(e,t){this.currentMeasureIndex=t}handleLineRepetitionInstructions(e){let t=!1;if(e.elements().length>0){let s="",r=!1,o="",a="",l="";const c=[],d=e.element("bar-style");d&&(l=d.value),e.attributes().length>0&&e.attribute("location")?s=e.attribute("location").value:s="right";const m=e.elements();for(let u=0,g=m.length;u<g;++u){const b=m[u];if(b.name==="repeat"&&b.hasAttributes)r=!0,o=b.attribute("direction").value;else if(b.name==="ending"&&b.hasAttributes&&b.attribute("type")!==void 0&&b.attribute("number")){a=b.attribute("type").value;const S=b.attribute("number").value.split("[,+]");for(let v=0,x=S.length;v<x;++v){const A=S[v],E=A.match("[0-9]");if(A.search("-")!==-1&&E.length===2){const w=parseInt(E[0],10),_=parseInt(E[1],10);for(let C=w;C<=_;C++)c.push(C)}else for(let w=0,_=E.length;w<_;++w){const C=E[w];c.push(parseInt(C,10))}}}}if(l==="light-heavy"&&c.length===0&&!r&&(t=!0),r||c.length>0)if(s==="left"){if(a==="start"){const u=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Ending,AlignmentType.Begin,void 0,c);this.addInstruction(this.repetitionInstructions,u)}if(o==="forward"){const u=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.StartLine);this.addInstruction(this.repetitionInstructions,u)}}else{if(a==="stop"){const u=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Ending,AlignmentType.End,void 0,c);this.addInstruction(this.repetitionInstructions,u)}if(o==="backward"){const u=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.BackJumpLine);this.addInstruction(this.repetitionInstructions,u)}}}return t}handleRepetitionInstructionsFromWordsOrSymbols(e,t){const s=e.element("words"),r=this.currentMeasureIndex;if(s){const o="d\\s?\\.s\\.",a=s.value.trim().toLowerCase();if(StringUtil.StringContainsSeparatedWord(a,o+" al fine",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.DalSegnoAlFine);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,o+" al coda",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.DalSegnoAlCoda);return this.addInstruction(this.repetitionInstructions,c),!0}const l="d\\.\\s?c\\.";if(StringUtil.StringContainsSeparatedWord(a,l+" al fine",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.DaCapoAlFine);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,l+" al coda",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.DaCapoAlCoda);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,l)||StringUtil.StringContainsSeparatedWord(a,"da\\s?capo",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.DaCapo);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,o,!0)||StringUtil.StringContainsSeparatedWord(a,"dal\\s?segno",!0)){let c;return StringUtil.StringContainsSeparatedWord(a,"al\\s?coda",!0)?c=new RepetitionInstruction(r,RepetitionInstructionEnum.DalSegnoAlCoda):c=new RepetitionInstruction(r,RepetitionInstructionEnum.DalSegno),this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,"to\\s?coda",!0)||StringUtil.StringContainsSeparatedWord(a,"a (la )?coda",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.ToCoda);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,"fine",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.Fine);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,"coda",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(a,"segno",!0)){const c=new RepetitionInstruction(r,RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,c),!0}}else if(e.element("segno")){const o=new RepetitionInstruction(r,RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,o),!0}else if(e.element("coda")){const o=new RepetitionInstruction(r,RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,o),!0}return!1}removeRedundantInstructions(){let e=0,t=0,s=0,r=0;for(let o=0;o<this.repetitionInstructions.length;o++){const a=this.repetitionInstructions[o];switch(a.type){case RepetitionInstructionEnum.Coda:s>0&&this.findInstructionInPreviousMeasure(o,a.measureIndex,RepetitionInstructionEnum.ToCoda)&&(a.type=RepetitionInstructionEnum.None),t===0&&s===0&&(a.type=RepetitionInstructionEnum.ToCoda,a.alignment=AlignmentType.End,a.measureIndex--);break;case RepetitionInstructionEnum.Segno:if(e-r>0){let l=!1;for(let c=0,d=this.repetitionInstructions.length;c<d;++c){const m=this.repetitionInstructions[c];if(a.measureIndex-m.measureIndex===1)switch(m.type){case RepetitionInstructionEnum.BackJumpLine:s-t>0?m.type=RepetitionInstructionEnum.DalSegnoAlCoda:m.type=RepetitionInstructionEnum.DalSegno,a.type=RepetitionInstructionEnum.None,l=!0;break;case RepetitionInstructionEnum.DalSegno:case RepetitionInstructionEnum.DalSegnoAlFine:case RepetitionInstructionEnum.DalSegnoAlCoda:a.type=RepetitionInstructionEnum.None,l=!0;break}if(l)break}if(l)break;s-t>0?a.type=RepetitionInstructionEnum.DalSegnoAlCoda:a.type=RepetitionInstructionEnum.DalSegno,a.alignment=AlignmentType.End,a.measureIndex--}break}if(this.backwardSearchForPreviousIdenticalInstruction(o,a)||a.type===RepetitionInstructionEnum.None)this.repetitionInstructions.splice(o,1),o--;else switch(a.type){case RepetitionInstructionEnum.Fine:break;case RepetitionInstructionEnum.ToCoda:s++;break;case RepetitionInstructionEnum.Coda:t++;break;case RepetitionInstructionEnum.Segno:e++;break;case RepetitionInstructionEnum.DalSegnoAlFine:case RepetitionInstructionEnum.DalSegnoAlCoda:r++;break}}this.repetitionInstructions.sort(RepetitionInstructionComparer.Compare)}findInstructionInPreviousMeasure(e,t,s){for(let r=e-1;r>=0;r--){const o=this.repetitionInstructions[r];if(t-o.measureIndex===1&&o.type===s)return!0}return!1}backwardSearchForPreviousIdenticalInstruction(e,t){for(let s=e-1;s>=0;s--)if(this.repetitionInstructions[s].equals(t))return!0;return!1}addInstruction(e,t){let s=!0;for(let r=0,o=e.length;r<o;++r){const a=e[r];if(t.equals(a)){s=!1;break}}s&&e.push(t)}}class RepetitionCalculator{constructor(){this.repetitionInstructions=[],this.openRepetitions=[],this.lastRepetitionCommonPartStartIndex=0}calculateRepetitions(e,t){this.musicSheet=e,this.repetitionInstructions=t,this.openRepetitions.length=0,this.lastRepetitionCommonPartStartIndex=0;const s=this.musicSheet.SourceMeasures;for(const l of this.repetitionInstructions){this.currentMeasureIndex=l.measureIndex;try{this.currentMeasure=s[this.currentMeasureIndex],this.handleRepetitionInstructions(l)}catch(c){loglevelExports.error("RepetitionCalculator: calculateRepetitions",c)}}for(;this.openRepetitions.length>0;)try{const l=this.openRepetitions.last();if(l.RepetitonUnderConstruction.FromWords){if(l.WaitingForCoda){let c=l.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex+1;c>=this.musicSheet.SourceMeasures.length&&(c=-1),l.RepetitonUnderConstruction.setEndingStartIndex(2,c)}else if(l.RepetitonUnderConstruction.BackwardJumpInstructions.length===0){this.openRepetitions.splice(this.openRepetitions.length-1,1);continue}}else if(l.RepetitonUnderConstruction.BackwardJumpInstructions.length===0){const c=s.length-1,d=new RepetitionInstruction(c,RepetitionInstructionEnum.BackJumpLine,AlignmentType.End,l.RepetitonUnderConstruction);l.RepetitonUnderConstruction.BackwardJumpInstructions.push(d),s[c].LastRepetitionInstructions.push(d)}this.finalizeRepetition(this.openRepetitions.last())}catch(l){try{const c=this.openRepetitions.last().RepetitonUnderConstruction;for(const d of this.repetitionInstructions)d.parentRepetition===c&&(d.parentRepetition=void 0);this.openRepetitions.splice(this.openRepetitions.length-1,1)}catch(c){loglevelExports.error("RepetitionCalculator: calculateRepetitions2",c)}}let r=!1;const o=0,a=this.musicSheet.SourceMeasures.length-1;for(const l of this.musicSheet.Repetitions)if(l.StartIndex===o&&l.EndIndex===a){r=!0;break}if(!r){const l=new Repetition(this.musicSheet,!0);l.FromWords=!0,l.startMarker=new RepetitionInstruction(o,RepetitionInstructionEnum.StartLine),l.startMarker.parentRepetition=l,this.musicSheet.SourceMeasures[o].FirstRepetitionInstructions.push(l.startMarker),l.endMarker=new RepetitionInstruction(a,RepetitionInstructionEnum.BackJumpLine),l.endMarker.parentRepetition=l,l.BackwardJumpInstructions.push(l.endMarker),l.UserNumberOfRepetitions=l.DefaultNumberOfRepetitions,this.musicSheet.Repetitions.push(l)}for(let l=0,c=this.musicSheet.SourceMeasures.length;l<c;++l){const d=this.musicSheet.SourceMeasures[l];d.FirstRepetitionInstructions.length>1&&d.FirstRepetitionInstructions.sort(RepetitionInstructionComparer.Compare),d.LastRepetitionInstructions.length>1&&d.LastRepetitionInstructions.sort(RepetitionInstructionComparer.Compare)}}handleRepetitionInstructions(e){let t;switch(e.type){case RepetitionInstructionEnum.StartLine:t=this.createNewRepetition(this.currentMeasureIndex),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!1,t.RepetitonUnderConstruction.startMarker=e,this.currentMeasure.FirstRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.BackJumpLine:t=this.getOrCreateCurrentRepetition2(!1),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e),t.RepetitonUnderConstruction.EndingParts.length===0&&this.finalizeRepetition(t);break;case RepetitionInstructionEnum.Ending:if(t=this.getOrCreateCurrentRepetition(),e.parentRepetition=t.RepetitonUnderConstruction,e.endingIndices.contains(1)&&e.alignment===AlignmentType.Begin){if(t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0||t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)){t=void 0;for(let r=this.openRepetitions.length-1;r>=0;r--){const o=this.openRepetitions[r];if(o.RepetitonUnderConstruction.BackwardJumpInstructions.length===0)for(t=o;this.openRepetitions.length-1>r;){const a=this.openRepetitions.last();this.finalizeRepetition(a)}}t===void 0&&(t=this.createNewRepetition(0),t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None))}t.RepetitonUnderConstruction.forwardJumpInstruction===void 0&&(t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(this.currentMeasureIndex-1,RepetitionInstructionEnum.ForwardJump,AlignmentType.End,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].LastRepetitionInstructions.push(t.RepetitonUnderConstruction.forwardJumpInstruction))}if(e.alignment===AlignmentType.Begin)t.RepetitonUnderConstruction.setEndingsStartIndex(e.endingIndices,this.currentMeasureIndex),this.currentMeasure.FirstRepetitionInstructions.push(e);else for(let r=0,o=e.endingIndices.length;r<o;++r){const a=e.endingIndices[r];t.RepetitonUnderConstruction.setEndingEndIndex(a,this.currentMeasureIndex),this.currentMeasure.LastRepetitionInstructions.push(e)}break;case RepetitionInstructionEnum.Segno:if(t=this.getCurrentRepetition(!0),t!==void 0&&t.SegnoFound&&t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&Math.abs(t.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex-this.currentMeasureIndex)<=1||this.openRepetitions.length&&this.openRepetitions.find(r=>r.RepetitonUnderConstruction.startMarker.type===RepetitionInstructionEnum.StartLine).RepetitonUnderConstruction.StartIndex===this.currentMeasureIndex)break;t=this.createNewRepetition(this.currentMeasureIndex),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=e,this.currentMeasure.FirstRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.Fine:if(this.openRepetitions.length===0||(t=this.getCurrentRepetition(!0),t===void 0))break;e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,t.RepetitonUnderConstruction.forwardJumpInstruction===void 0?(t.FineFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=e,t.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.currentMeasure.LastRepetitionInstructions.push(e)):this.currentMeasure.LastRepetitionInstructions.push(new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Fine,AlignmentType.End,void 0));break;case RepetitionInstructionEnum.ToCoda:if(this.openRepetitions.length===0||(t=this.getCurrentRepetition(!0),t===void 0))break;t.RepetitonUnderConstruction.forwardJumpInstruction===void 0&&(e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,t.ToCodaFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=e,this.currentMeasure.LastRepetitionInstructions.push(e));break;case RepetitionInstructionEnum.Coda:if(this.openRepetitions.length===0)break;t=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=t.RepetitonUnderConstruction,t.WaitingForCoda?(t.CodaFound=!0,t.RepetitonUnderConstruction.setEndingStartIndex(2,this.currentMeasureIndex),this.currentMeasure.LastRepetitionInstructions.push(e),this.finalizeRepetition(t),this.currentMeasureIndex>0&&(this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].printNewSystemXml=!0)):t.ToCodaFound||(t.RepetitonUnderConstruction.BackwardJumpInstructions.length===0?(t.ToCodaFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.ToCoda,AlignmentType.End,t.RepetitonUnderConstruction),this.currentMeasure.LastRepetitionInstructions.push(t.RepetitonUnderConstruction.forwardJumpInstruction)):this.currentMeasure.LastRepetitionInstructions.push(new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Coda,AlignmentType.Begin,void 0)));break;case RepetitionInstructionEnum.DaCapo:t=this.getOrCreateCurrentRepetition(),t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&this.finalizeRepetition(t),t.RepetitonUnderConstruction.StartIndex!==0&&(t=this.createNewRepetition(0)),e.parentRepetition=t.RepetitonUnderConstruction,t.RepetitonUnderConstruction.FromWords=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e),t.RepetitonUnderConstruction.EndingParts.length===0&&this.finalizeRepetition(t);break;case RepetitionInstructionEnum.DalSegno:if(t=this.getOrCreateCurrentRepetition2(!0),t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(t),t=this.createNewRepetition(0),t.RepetitonUnderConstruction.FromWords=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction)),e.parentRepetition=t.RepetitonUnderConstruction,!t.SegnoFound){const r=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);r>=0&&(t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(r,RepetitionInstructionEnum.Segno,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[r].FirstRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.startMarker))}t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)&&t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DalSegnoAlFine:if(this.openRepetitions.length===0)break;if(t=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=t.RepetitonUnderConstruction,!t.SegnoFound){const r=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);r>=0&&(t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(r,RepetitionInstructionEnum.Segno,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[r].FirstRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.startMarker))}if(!t.FineFound){const r=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Fine,e.measureIndex);r>=0&&(t.FineFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(r,RepetitionInstructionEnum.Fine,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[r].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction))}t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DaCapoAlFine:if(t=this.getOrCreateCurrentRepetition(),t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(t),t=this.createNewRepetition(0)),t.RepetitonUnderConstruction.startMarker!==void 0&&t.RepetitonUnderConstruction.StartIndex!==0&&(t=this.createNewRepetition(0)),t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.FromWords=!0,e.parentRepetition=t.RepetitonUnderConstruction,!t.FineFound){const r=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Fine,e.measureIndex);r>=0&&(t.FineFound=!0,t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(r,RepetitionInstructionEnum.Fine,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[r].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction))}t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DalSegnoAlCoda:if(this.openRepetitions.length===0)break;if(t=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=t.RepetitonUnderConstruction,!t.SegnoFound){const r=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);r>=0&&(t.SegnoFound=!0,t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(r,RepetitionInstructionEnum.Segno,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[r].FirstRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.startMarker))}if(!t.ToCodaFound){const r=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.ToCoda,e.measureIndex);if(r>=0)t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(r,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[r].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0;else{const o=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Coda,e.measureIndex);o>=0&&(t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(o,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[o].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0)}}t.ToCodaFound&&(t.WaitingForCoda=!0),t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DaCapoAlCoda:if(t=this.getOrCreateCurrentRepetition(),t.RepetitonUnderConstruction.BackwardJumpInstructions.length>0?(this.finalizeRepetition(t),t=this.createNewRepetition(0)):t.RepetitonUnderConstruction.EndingParts.length===0&&(this.finalizeRepetition(t),t=this.createNewRepetition(0)),t.RepetitonUnderConstruction.startMarker!==void 0&&t.RepetitonUnderConstruction.StartIndex!==0&&(t=this.createNewRepetition(0)),t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.FromWords=!0,e.parentRepetition=t.RepetitonUnderConstruction,!t.ToCodaFound){const r=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.ToCoda,e.measureIndex);if(r>=0)t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(r,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[r].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0;else{const o=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Coda,e.measureIndex);o>=0&&(t.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(o,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,t.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[o].LastRepetitionInstructions.splice(0,0,t.RepetitonUnderConstruction.forwardJumpInstruction),t.ToCodaFound=!0)}}t.ToCodaFound&&(t.WaitingForCoda=!0),t.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||t.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),t.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.None:break;default:throw new ArgumentOutOfRangeException("currentRepetitionInstruction")}return!0}findInstructionInMainListBackwards(e,t){for(let s=this.repetitionInstructions.length-1;s>=0;s--){const r=this.repetitionInstructions[s];if(r.measureIndex<=t&&r.type===e)return r.measureIndex}return-1}finalizeRepetition(e){const t=e.RepetitonUnderConstruction;if(t.BackwardJumpInstructions.length>0){let s=!0;const r=this.getLastFinalizedRepetition();if(r!==void 0&&t.coversIdenticalMeasures(r)){if(t.NumberOfEndings>r.NumberOfEndings){const o=this.musicSheet.Repetitions.indexOf(r,0);o>-1&&this.musicSheet.Repetitions.splice(o,1),r.removeFromRepetitionInstructions(),this.musicSheet.Repetitions.push(t)}s=!1,t.removeFromRepetitionInstructions()}else this.musicSheet.Repetitions.push(t);s&&(t.startMarker.type===RepetitionInstructionEnum.None&&this.musicSheet.SourceMeasures[t.StartIndex].FirstRepetitionInstructions.push(t.startMarker),t.UserNumberOfRepetitions=t.DefaultNumberOfRepetitions)}this.openRepetitions.splice(this.openRepetitions.length-1,1)}getCurrentRepetition(e){let t;for(let s=this.openRepetitions.length-1;s>=0;s--)if(this.openRepetitions[s].RepetitonUnderConstruction.FromWords===e){for(t=this.openRepetitions[s];s<this.openRepetitions.length-1;)this.finalizeRepetition(this.openRepetitions.last());return t}return t}getOrCreateCurrentRepetition(){if(this.openRepetitions.length>0)return this.openRepetitions.last();const e=this.createNewRepetition(0);return e.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,e.RepetitonUnderConstruction),e}getOrCreateCurrentRepetition2(e){let t;if(this.openRepetitions.length&&this.openRepetitions.last().RepetitonUnderConstruction.EndingParts.length<2){for(let r=this.openRepetitions.length-1;r>=0;r--)if(t=this.openRepetitions[r],t.RepetitonUnderConstruction.FromWords===e){for(;r<this.openRepetitions.length-1;)this.finalizeRepetition(this.openRepetitions.last());return t}}return t=this.createNewRepetition(this.lastRepetitionCommonPartStartIndex),t.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(this.lastRepetitionCommonPartStartIndex,RepetitionInstructionEnum.None,AlignmentType.Begin,t.RepetitonUnderConstruction),t.RepetitonUnderConstruction.FromWords=e,t}createNewRepetition(e){if(this.openRepetitions.length>0){const s=this.openRepetitions.last(),r=s.RepetitonUnderConstruction;if(r.BackwardJumpInstructions.length>0){const o=Object.keys(r.EndingIndexDict);(o.length===0||r.EndingIndexDict[o[o.length-1]].part.EndIndex>=0)&&this.finalizeRepetition(s)}}const t=new RepetitionBuildingContainer(this.musicSheet);return this.lastRepetitionCommonPartStartIndex=e,this.openRepetitions.push(t),t}getLastFinalizedRepetition(){if(this.musicSheet.Repetitions.length>0)return this.musicSheet.Repetitions.last()}}class RepetitionBuildingContainer{constructor(e){this.RepetitonUnderConstruction=new Repetition(e)}}class MusicSymbolModuleFactory{static createRepetitionInstructionReader(){return new RepetitionInstructionReader}static createRepetitionCalculator(){return new RepetitionCalculator}}class ReaderPluginManager{constructor(){this.voiceMeasureReadPlugins=[]}addVoiceMeasureReadPlugin(e){this.voiceMeasureReadPlugins.push(e)}processVoiceMeasureReadPlugins(e,t,s){for(const r of this.voiceMeasureReadPlugins)try{r.measureReadCalculations(e,t,s)}catch(o){loglevelExports.info("VoiceGenerator.addSingleNote: ",o)}}}class MusicSheetReader{constructor(e=void 0,t=new EngravingRules){this.completeNumberOfStaves=0,this.pluginManager=new ReaderPluginManager,e?this.afterSheetReadingModules=e:this.afterSheetReadingModules=[],this.repetitionInstructionReader=MusicSymbolModuleFactory.createRepetitionInstructionReader(),this.repetitionCalculator=MusicSymbolModuleFactory.createRepetitionCalculator(),this.rules=t}get PluginManager(){return this.pluginManager}get CompleteNumberOfStaves(){return this.completeNumberOfStaves}static doCalculationsAfterDurationHasBeenSet(e){for(const t of e)t.doCalculationsAfterDurationHasBeenSet()}createMusicSheet(e,t){try{return this._createMusicSheet(e,t)}catch(s){loglevelExports.error("MusicSheetReader.CreateMusicSheet",s);return}}_removeFromArray(e,t){const s=e.indexOf(t);s!==-1&&e.splice(s,1)}trimString(e){return e.replace(/^\s+|\s+$/g,"")}_lastElement(e){return e[e.length-1]}_createMusicSheet(e,t){var u;const s=[];let r=0;if(this.musicSheet=new MusicSheet,this.musicSheet.Path=t,this.musicSheet.Rules=this.rules,!e)throw new MusicSheetReadingException("Undefined root element");this.pushSheetLabels(e,t);const o=e.element("part-list");if(!o)throw new MusicSheetReadingException("Undefined partListNode");const a=e.elements("part"),l=o.elements();this.initializeReading(l,a,s);let c=!0;this.currentFraction=new Fraction$1(0,1);let d=!1,m=e.element("identification");for(m&&(m=m.element("encoding")),m&&(m=m.element("software")),m!==void 0&&m.value==="Guitar Pro 5"&&(d=!0);c;){this.currentMeasure!==void 0&&this.currentMeasure.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(r=0),this.currentMeasure=new SourceMeasure(this.completeNumberOfStaves,this.musicSheet.Rules);for(const g of s)try{c=c&&g.readNextXmlMeasure(this.currentMeasure,this.currentFraction,d)}catch(b){const y=ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading instruments.");throw new MusicSheetReadingException(y,b)}c&&(this.musicSheet.addMeasure(this.currentMeasure),this.checkIfRhythmInstructionsAreSetAndEqual(s),this.checkSourceMeasureForNullEntries(),r=this.setSourceMeasureDuration(s,r),MusicSheetReader.doCalculationsAfterDurationHasBeenSet(s),this.currentMeasure.AbsoluteTimestamp=this.currentFraction.clone(),this.musicSheet.SheetErrors.finalizeMeasure(this.currentMeasure.MeasureNumber),this.currentFraction.Add(this.currentMeasure.Duration),this.previousMeasure=this.currentMeasure,this.musicSheet.SoundTempos=(u=s[0])==null?void 0:u.SoundTempos)}this.repetitionInstructionReader&&(this.repetitionInstructionReader.removeRedundantInstructions(),this.repetitionCalculator&&this.repetitionCalculator.calculateRepetitions(this.musicSheet,this.repetitionInstructionReader.repetitionInstructions)),this.musicSheet.DefaultStartTempoInBpm===0&&(this.musicSheet.DefaultStartTempoInBpm=100),this.musicSheet.checkForInstrumentWithNoVoice(),this.musicSheet.fillStaffList();for(let g=0,b=this.afterSheetReadingModules.length;g<b;++g)this.afterSheetReadingModules[g].calculate(this.musicSheet);return this.musicSheet.userStartTempoInBPM=this.musicSheet.userStartTempoInBPM||this.musicSheet.DefaultStartTempoInBpm,this.musicSheet.InitializeStartTempoInBPM(this.musicSheet.userStartTempoInBPM),this.musicSheet.MusicPartManager.init(),this.musicSheet}initializeReading(e,t,s){const r=this.createInstrumentGroups(e);this.completeNumberOfStaves=this.getCompleteNumberOfStavesFromXml(t),t.length!==0&&(this.repetitionInstructionReader.MusicSheet=this.musicSheet,this.currentFraction=new Fraction$1(0,1),this.currentMeasure=void 0,this.previousMeasure=void 0);let o=0;for(const a of t){const l=a.attribute("id");if(l){const c=r[l.value],d=a.elements("measure");let m=1;try{m=this.getInstrumentNumberOfStavesFromXml(a)}catch(u){const g=ITextTranslation.translateText("ReaderErrorMessages/InstrumentStavesNumberError","Invalid number of staves at instrument: ");this.musicSheet.SheetErrors.push(g+c.Name);continue}c.createStaves(m),s.push(new InstrumentReader(this.pluginManager,this.repetitionInstructionReader,d,c)),this.repetitionInstructionReader&&(this.repetitionInstructionReader.xmlMeasureList[o]=d),o++}}}checkIfRhythmInstructionsAreSetAndEqual(e){const t=[];for(let o=0;o<this.completeNumberOfStaves;o++)if(this.currentMeasure.FirstInstructionsStaffEntries[o]){const a=this.currentMeasure.FirstInstructionsStaffEntries[o].Instructions[this.currentMeasure.FirstInstructionsStaffEntries[o].Instructions.length-1];a instanceof RhythmInstruction&&t.push(a)}let s=0,r=-1;for(let o=0,a=t.length;o<a;++o){const l=t[o];if(l.Rhythm.RealValue>s){if(this.areRhythmInstructionsMixed(t)&&l.SymbolEnum!==RhythmSymbolEnum.NONE)continue;s=l.Rhythm.RealValue,r=t.indexOf(l)}}if(t.length>0&&t.length<this.completeNumberOfStaves){const o=t[r].clone();for(let a=0;a<this.completeNumberOfStaves;a++)this.currentMeasure.FirstInstructionsStaffEntries[a]!==void 0&&!(this._lastElement(this.currentMeasure.FirstInstructionsStaffEntries[a].Instructions)instanceof RhythmInstruction)&&(this.currentMeasure.FirstInstructionsStaffEntries[a].removeAllInstructionsOfTypeRhythmInstruction(),this.currentMeasure.FirstInstructionsStaffEntries[a].Instructions.push(o.clone())),this.currentMeasure.FirstInstructionsStaffEntries[a]||(this.currentMeasure.FirstInstructionsStaffEntries[a]=new SourceStaffEntry(void 0,void 0),this.currentMeasure.FirstInstructionsStaffEntries[a].Instructions.push(o.clone()));for(let a=0,l=e.length;a<l;++a){const c=e[a];c.ActiveRhythm=o}}if(t.length===0&&this.currentMeasure===this.musicSheet.SourceMeasures[0]){const o=new RhythmInstruction(new Fraction$1(4,4,0,!1),RhythmSymbolEnum.NONE);for(let a=0;a<this.completeNumberOfStaves;a++)this.currentMeasure.FirstInstructionsStaffEntries[a]?this.currentMeasure.FirstInstructionsStaffEntries[a].removeAllInstructionsOfTypeRhythmInstruction():this.currentMeasure.FirstInstructionsStaffEntries[a]=new SourceStaffEntry(void 0,void 0),this.currentMeasure.FirstInstructionsStaffEntries[a].Instructions.push(o);for(let a=0,l=e.length;a<l;++a){const c=e[a];c.ActiveRhythm=o}}for(let o=0,a=t.length;o<a;++o){const l=t[o];if(l.Rhythm.RealValue<s&&this._lastElement(this.currentMeasure.FirstInstructionsStaffEntries[t.indexOf(l)].Instructions)instanceof RhythmInstruction){const c=this.currentMeasure.FirstInstructionsStaffEntries[t.indexOf(l)].Instructions;c[c.length-1]=t[r].clone()}Math.abs(l.Rhythm.RealValue-s)<1e-6&&l.SymbolEnum!==RhythmSymbolEnum.NONE&&this.areRhythmInstructionsMixed(t)&&(l.SymbolEnum=RhythmSymbolEnum.NONE)}}areRhythmInstructionsMixed(e){for(let t=1;t<e.length;t++)if(Math.abs(e[t].Rhythm.RealValue-e[0].Rhythm.RealValue)<1e-6&&e[t].SymbolEnum!==e[0].SymbolEnum)return!0;return!1}setSourceMeasureDuration(e,t){let s=new Fraction$1(0,1);const r=[];for(const l of e){r.push(l.MaxTieNoteFraction);const c=l.ActiveRhythm.Rhythm;s.lt(c)&&(s=new Fraction$1(c.Numerator,c.Denominator,0,!1))}const o=this.currentMeasure.calculateInstrumentsDuration(this.musicSheet,r);let a=new Fraction$1(0,1);for(const l of o)a.lt(l)&&(a=l);Fraction$1.Equal(a,s)?this.checkFractionsForEquivalence(a,s):a.lt(s)&&(a=this.currentMeasure.reverseCheck(this.musicSheet,a),this.checkFractionsForEquivalence(a,s)),this.currentMeasure.ImplicitMeasure=this.checkIfMeasureIsImplicit(a,s),this.currentMeasure.ImplicitMeasure||t++,this.currentMeasure.Duration=a,this.currentMeasure.ActiveTimeSignature=s,this.currentMeasure.MeasureNumber=t;for(let l=0;l<o.length;l++){const c=o[l];if(this.currentMeasure.ImplicitMeasure&&c!==a||!Fraction$1.Equal(c,s)&&!this.allInstrumentsHaveSameDuration(o,a)){const d=this.musicSheet.getGlobalStaffIndexOfFirstStaff(this.musicSheet.Instruments[l]);for(let m=0;m<this.musicSheet.Instruments[l].Staves.length;m++)if(!this.graphicalMeasureIsEmpty(d+m)){this.currentMeasure.setErrorInGraphicalMeasure(d+m,!0);const u=ITextTranslation.translateText("ReaderErrorMessages/MissingNotesError","Given Notes don't correspond to measure duration.");this.musicSheet.SheetErrors.pushMeasureError(u)}}}return t}checkFractionsForEquivalence(e,t){if(t.Denominator>e.Denominator){const s=t.Denominator/e.Denominator;e.expand(s)}}checkIfMeasureIsImplicit(e,t){return!this.previousMeasure&&e.lt(t)?!0:this.previousMeasure?Fraction$1.plus(this.previousMeasure.Duration,e).Equals(t):!1}allInstrumentsHaveSameDuration(e,t){let s=0;for(let r=0,o=e.length;r<o;++r)e[r].Equals(t)&&s++;return s===e.length&&t!==new Fraction$1(0,1)}graphicalMeasureIsEmpty(e){let t=0;for(let s=0;s<this.currentMeasure.VerticalSourceStaffEntryContainers.length;s++)this.currentMeasure.VerticalSourceStaffEntryContainers[s].StaffEntries[e]||t++;return t===this.currentMeasure.VerticalSourceStaffEntryContainers.length}checkSourceMeasureForNullEntries(){for(let e=this.currentMeasure.VerticalSourceStaffEntryContainers.length-1;e>=0;e--)for(let t=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries.length-1;t>=0;t--){const s=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries[t];if(s)for(let r=s.VoiceEntries.length-1;r>=0;r--){const o=s.VoiceEntries[r];o.Notes.length===0&&(this._removeFromArray(o.ParentVoice.VoiceEntries,o),this._removeFromArray(s.VoiceEntries,o))}s!==void 0&&s.VoiceEntries.length===0&&(this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries[t]=void 0)}for(let e=this.currentMeasure.VerticalSourceStaffEntryContainers.length-1;e>=0;e--){let t=0;for(let s=0,r=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries.length;s<r;++s)this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries[s]||t++;t===this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries.length&&this._removeFromArray(this.currentMeasure.VerticalSourceStaffEntryContainers,this.currentMeasure.VerticalSourceStaffEntryContainers[e])}}pushSheetLabels(e,t){this.readComposer(e),this.readTitle(e);try{(!this.musicSheet.Title||!this.musicSheet.Composer)&&this.readTitleAndComposerFromCredits(e)}catch(s){loglevelExports.info("MusicSheetReader.pushSheetLabels","readTitleAndComposerFromCredits",s)}try{if(!this.musicSheet.Title){const s=Math.max(0,t.lastIndexOf("/"),t.lastIndexOf("\\")),o=t.substr(s).split(".",1);this.musicSheet.Title=new Label(o[0])}}catch(s){loglevelExports.info("MusicSheetReader.pushSheetLabels","read title from file name",s)}}presentAttrsWithValue(e,t){for(const s of e.attributes())if(s.value===t)return!0;return!1}readComposer(e){const t=e.element("identification");if(t){const s=t.elements("creator");for(let r=0,o=s.length;r<o;++r){const a=s[r];if(a.hasAttributes){if(this.presentAttrsWithValue(a,"composer")){this.musicSheet.Composer=new Label(this.trimString(a.value));continue}(this.presentAttrsWithValue(a,"lyricist")||this.presentAttrsWithValue(a,"poet"))&&(this.musicSheet.Lyricist=new Label(this.trimString(a.value)))}}}}readTitleAndComposerFromCredits(e){var d,m;const t=this.computeSystemYCoordinates(e);if(t===0)return;let s=1,r,o=0,a,l;const c=e.elements("credit");for(let u=0,g=c.length;u<g;++u){const b=c[u];if(!b.attribute("page"))return;if(b.attribute("page").value==="1"){let y;if(b){if(y=b.element("credit-words"),!y.attribute("justify"))break;const S=(d=y.attribute("justify"))==null?void 0:d.value,v=(m=y.attribute("default-y"))==null?void 0:m.value,x=v!=null,A=x?parseFloat(v):Number.MIN_VALUE;if(x&&A>t){if(!this.musicSheet.Title){const E=y.attribute("font-size").value,w=parseFloat(E);s<w&&(s=w,r=y.value)}if(this.musicSheet.Subtitle||S!=="right"&&S!=="left"&&o<A&&(o=A,l&&(a=l),l=y.value),!(this.musicSheet.Composer!==void 0&&this.musicSheet.Lyricist))switch(S){case"right":this.musicSheet.Composer=new Label(this.trimString(y.value));break;case"left":this.musicSheet.Lyricist=new Label(this.trimString(y.value));break}}}}}!this.musicSheet.Title&&r&&(this.musicSheet.Title=new Label(this.trimString(r))),!this.musicSheet.Subtitle&&a&&(this.musicSheet.Subtitle=new Label(this.trimString(a)))}computeSystemYCoordinates(e){if(!e.element("defaults"))return 0;let t=0,s=0;try{const a=e.element("defaults").element("page-layout").element("page-height").value;t=parseFloat(a)}catch(a){return loglevelExports.info("MusicSheetReader.computeSystemYCoordinates(): couldn't find page height, not reading title/composer."),0}let r=!1;const o=e.elements("part");for(let a=0,l=o.length;a<l;++a){const c=o[a].elements("measure");for(let d=0,m=c.length;d<m;++d){const u=c[d];if(u.element("print")){const g=u.element("print").elements("system-layout");for(let b=0,y=g.length;b<y;++b){const S=g[b];if(S.element("top-system-distance")){const v=S.element("top-system-distance").value;s=parseFloat(v),r=!0;break}}break}}if(r)break}if(e.element("defaults").element("system-layout")&&e.element("defaults").element("system-layout").element("top-system-distance")){const l=e.element("defaults").element("system-layout").element("top-system-distance").value;s=parseFloat(l)}return s===0?0:t-s}readTitle(e){const t=e.element("work");let s;t&&(s=t.element("work-title"),s&&s.value&&(this.musicSheet.Title=new Label(this.trimString(s.value))));const r=e.element("movement-title");let o="";if(r&&(this.musicSheet.Title?o=this.trimString(r.value):this.musicSheet.Title=new Label(this.trimString(r.value))),t){const a=t.element("work-number");if(a){const l=a.value;l&&(o===""?o=l:o=o+", "+l)}}o&&(this.musicSheet.Subtitle=new Label(o))}createInstrumentGroups(e){let t=0;const s={};let r;try{const o=e;for(let a=0,l=o.length;a<l;++a){const c=o[a];if(c.name==="score-part"){const d=c.attribute("id").value,m=new Instrument(t,d,this.musicSheet,r);t++;const u=c.elements();for(let g=0,b=u.length;g<b;++g){const y=u[g];try{if(y.name==="part-name")m.Name=y.value,y.attribute("print-object")&&y.attribute("print-object").value==="no"&&(m.NameLabel.print=!1);else if(y.name==="part-abbreviation")m.PartAbbreviation=y.value;else if(y.name==="score-instrument"){const S=new SubInstrument(m);S.idString=y.firstAttribute.value,m.SubInstruments.push(S);const v=y.element("instrument-name");v&&(S.name=v.value,S.setMidiInstrument(v.value))}else if(y.name==="midi-instrument"){let S=m.getSubInstrument(y.firstAttribute.value);for(let x=0,A=m.SubInstruments.length;x<A;++x){const E=m.SubInstruments[x];if(E.idString===y.value){S=E;break}}const v=y.elements();for(let x=0,A=v.length;x<A;++x){const E=v[x];try{if(E.name==="midi-channel")parseInt(E.value,10)===10&&(m.MidiInstrumentId=MidiInstrument.Percussion);else if(E.name==="midi-program")m.SubInstruments.length>0&&m.MidiInstrumentId!==MidiInstrument.Percussion&&(S.midiInstrumentID=Math.max(0,parseInt(E.value,10)-1));else if(E.name==="midi-unpitched")S.fixedKey=Math.max(0,parseInt(E.value,10));else if(E.name==="volume")try{const w=parseFloat(E.value);S.volume=w/127}catch(w){loglevelExports.debug("ExpressionReader.readExpressionParameters","read volume",w)}else if(E.name==="pan")try{const w=parseFloat(E.value);S.pan=w/64}catch(w){loglevelExports.debug("ExpressionReader.readExpressionParameters","read pan",w)}}catch(w){loglevelExports.info("MusicSheetReader.createInstrumentGroups midi settings: ",w)}}}}catch(S){loglevelExports.info("MusicSheetReader.createInstrumentGroups: ",S)}}if(m.SubInstruments.length===0){const g=new SubInstrument(m);m.SubInstruments.push(g)}s[d]=m,r?(r.InstrumentalGroups.push(m),this.musicSheet.Instruments.push(m)):(this.musicSheet.InstrumentalGroups.push(m),this.musicSheet.Instruments.push(m))}else if(c.name==="part-group"&&c.attribute("type").value==="start"){const d=new InstrumentalGroup("group",this.musicSheet,r);r?r.InstrumentalGroups.push(d):this.musicSheet.InstrumentalGroups.push(d),r=d}else if(c.name==="part-group"&&c.attribute("type").value==="stop"&&r){if(r.InstrumentalGroups.length===1){const d=r.InstrumentalGroups[0];r.Parent?(r.Parent.InstrumentalGroups.push(d),this._removeFromArray(r.Parent.InstrumentalGroups,r)):(this.musicSheet.InstrumentalGroups.push(d),this._removeFromArray(this.musicSheet.InstrumentalGroups,r))}r=r.Parent}}}catch(o){const a=ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading Instruments");throw new MusicSheetReadingException(a,o)}for(let o=0,a=this.musicSheet.Instruments.length;o<a;++o){const l=this.musicSheet.Instruments[o];l.Name||(l.Name="Instr. "+l.IdString)}return s}getCompleteNumberOfStavesFromXml(e){let t=0;for(const s of e){const r=s.elements("measure");if(r.length>0){const o=r[0];if(o){let a=o.element("attributes");a&&(a=a.element("staves")),a?t+=parseInt(a.value,10):t++}}}if(isNaN(t)||t<=0){const s=ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of staves.");throw new MusicSheetReadingException(s)}return t}getInstrumentNumberOfStavesFromXml(e){let t=0;const s=e.element("measure");if(s){const r=s.element("attributes");let o;r&&(o=r.element("staves")),!r||!o?t=1:t=parseInt(o.value,10)}if(isNaN(t)||t<=0){const r=ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of Staves.");throw new MusicSheetReadingException(r)}return t}}function commonjsRequire(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var jszip_minExports={},jszip_min={get exports(){return jszip_minExports},set exports(i){jszip_minExports=i}};/*!
- JSZip v3.7.1 - A JavaScript class for generating and reading zip files
- <http://stuartk.com/jszip>
- (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
- Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
- JSZip uses the library pako released under the MIT license :
- https://github.com/nodeca/pako/blob/master/LICENSE
- */(function(i,e){(function(t){i.exports=t()})(function(){return function t(s,r,o){function a(d,m){if(!r[d]){if(!s[d]){var u=typeof commonjsRequire=="function"&&commonjsRequire;if(!m&&u)return u(d,!0);if(l)return l(d,!0);var g=new Error("Cannot find module '"+d+"'");throw g.code="MODULE_NOT_FOUND",g}var b=r[d]={exports:{}};s[d][0].call(b.exports,function(y){var S=s[d][1][y];return a(S||y)},b,b.exports,t,s,r,o)}return r[d].exports}for(var l=typeof commonjsRequire=="function"&&commonjsRequire,c=0;c<o.length;c++)a(o[c]);return a}({1:[function(t,s,r){var o=t("./utils"),a=t("./support"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(c){for(var d,m,u,g,b,y,S,v=[],x=0,A=c.length,E=A,w=o.getTypeOf(c)!=="string";x<c.length;)E=A-x,u=w?(d=c[x++],m=x<A?c[x++]:0,x<A?c[x++]:0):(d=c.charCodeAt(x++),m=x<A?c.charCodeAt(x++):0,x<A?c.charCodeAt(x++):0),g=d>>2,b=(3&d)<<4|m>>4,y=1<E?(15&m)<<2|u>>6:64,S=2<E?63&u:64,v.push(l.charAt(g)+l.charAt(b)+l.charAt(y)+l.charAt(S));return v.join("")},r.decode=function(c){var d,m,u,g,b,y,S=0,v=0,x="data:";if(c.substr(0,x.length)===x)throw new Error("Invalid base64 input, it looks like a data url.");var A,E=3*(c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(c.charAt(c.length-1)===l.charAt(64)&&E--,c.charAt(c.length-2)===l.charAt(64)&&E--,E%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=a.uint8array?new Uint8Array(0|E):new Array(0|E);S<c.length;)d=l.indexOf(c.charAt(S++))<<2|(g=l.indexOf(c.charAt(S++)))>>4,m=(15&g)<<4|(b=l.indexOf(c.charAt(S++)))>>2,u=(3&b)<<6|(y=l.indexOf(c.charAt(S++))),A[v++]=d,b!==64&&(A[v++]=m),y!==64&&(A[v++]=u);return A}},{"./support":30,"./utils":32}],2:[function(t,s,r){var o=t("./external"),a=t("./stream/DataWorker"),l=t("./stream/Crc32Probe"),c=t("./stream/DataLengthProbe");function d(m,u,g,b,y){this.compressedSize=m,this.uncompressedSize=u,this.crc32=g,this.compression=b,this.compressedContent=y}d.prototype={getContentWorker:function(){var m=new a(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),u=this;return m.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),m},getCompressedWorker:function(){return new a(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(m,u,g){return m.pipe(new l).pipe(new c("uncompressedSize")).pipe(u.compressWorker(g)).pipe(new c("compressedSize")).withStreamInfo("compression",u)},s.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,s,r){var o=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(a){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,s,r){var o=t("./utils"),a=function(){for(var l,c=[],d=0;d<256;d++){l=d;for(var m=0;m<8;m++)l=1&l?3988292384^l>>>1:l>>>1;c[d]=l}return c}();s.exports=function(l,c){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(d,m,u,g){var b=a,y=g+u;d^=-1;for(var S=g;S<y;S++)d=d>>>8^b[255&(d^m[S])];return-1^d}(0|c,l,l.length,0):function(d,m,u,g){var b=a,y=g+u;d^=-1;for(var S=g;S<y;S++)d=d>>>8^b[255&(d^m.charCodeAt(S))];return-1^d}(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(t,s,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,s,r){var o=null;o=typeof Promise<"u"?Promise:t("lie"),s.exports={Promise:o}},{lie:37}],7:[function(t,s,r){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),l=t("./utils"),c=t("./stream/GenericWorker"),d=o?"uint8array":"array";function m(u,g){c.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=g,this.meta={}}r.magic="\b\0",l.inherits(m,c),m.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(d,u.data),!1)},m.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},m.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},m.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(g){u.push({data:g,meta:u.meta})}},r.compressWorker=function(u){return new m("Deflate",u)},r.uncompressWorker=function(){return new m("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,s,r){function o(b,y){var S,v="";for(S=0;S<y;S++)v+=String.fromCharCode(255&b),b>>>=8;return v}function a(b,y,S,v,x,A){var E,w,_=b.file,C=b.compression,P=A!==d.utf8encode,I=l.transformTo("string",A(_.name)),R=l.transformTo("string",d.utf8encode(_.name)),N=_.comment,G=l.transformTo("string",A(N)),B=l.transformTo("string",d.utf8encode(N)),k=R.length!==_.name.length,T=B.length!==N.length,V="",Z="",W="",se=_.dir,ie=_.date,fe={crc32:0,compressedSize:0,uncompressedSize:0};y&&!S||(fe.crc32=b.crc32,fe.compressedSize=b.compressedSize,fe.uncompressedSize=b.uncompressedSize);var J=0;y&&(J|=8),P||!k&&!T||(J|=2048);var K=0,be=0;se&&(K|=16),x==="UNIX"?(be=798,K|=function(Y,ae){var de=Y;return Y||(de=ae?16893:33204),(65535&de)<<16}(_.unixPermissions,se)):(be=20,K|=function(Y){return 63&(Y||0)}(_.dosPermissions)),E=ie.getUTCHours(),E<<=6,E|=ie.getUTCMinutes(),E<<=5,E|=ie.getUTCSeconds()/2,w=ie.getUTCFullYear()-1980,w<<=4,w|=ie.getUTCMonth()+1,w<<=5,w|=ie.getUTCDate(),k&&(Z=o(1,1)+o(m(I),4)+R,V+="up"+o(Z.length,2)+Z),T&&(W=o(1,1)+o(m(G),4)+B,V+="uc"+o(W.length,2)+W);var oe="";return oe+=`
- \0`,oe+=o(J,2),oe+=C.magic,oe+=o(E,2),oe+=o(w,2),oe+=o(fe.crc32,4),oe+=o(fe.compressedSize,4),oe+=o(fe.uncompressedSize,4),oe+=o(I.length,2),oe+=o(V.length,2),{fileRecord:u.LOCAL_FILE_HEADER+oe+I+V,dirRecord:u.CENTRAL_FILE_HEADER+o(be,2)+oe+o(G.length,2)+"\0\0\0\0"+o(K,4)+o(v,4)+I+V+G}}var l=t("../utils"),c=t("../stream/GenericWorker"),d=t("../utf8"),m=t("../crc32"),u=t("../signature");function g(b,y,S,v){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=S,this.encodeFileName=v,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(g,c),g.prototype.push=function(b){var y=b.meta.percent||0,S=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,c.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:S?(y+100*(S-v-1))/S:100}}))},g.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var y=this.streamFiles&&!b.file.dir;if(y){var S=a(b,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:S.fileRecord,meta:{percent:0}})}else this.accumulate=!0},g.prototype.closedSource=function(b){this.accumulate=!1;var y=this.streamFiles&&!b.file.dir,S=a(b,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(S.dirRecord),y)this.push({data:function(v){return u.DATA_DESCRIPTOR+o(v.crc32,4)+o(v.compressedSize,4)+o(v.uncompressedSize,4)}(b),meta:{percent:100}});else for(this.push({data:S.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},g.prototype.flush=function(){for(var b=this.bytesWritten,y=0;y<this.dirRecords.length;y++)this.push({data:this.dirRecords[y],meta:{percent:100}});var S=this.bytesWritten-b,v=function(x,A,E,w,_){var C=l.transformTo("string",_(w));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(x,2)+o(x,2)+o(A,4)+o(E,4)+o(C.length,2)+C}(this.dirRecords.length,S,b,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},g.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},g.prototype.registerPrevious=function(b){this._sources.push(b);var y=this;return b.on("data",function(S){y.processChunk(S)}),b.on("end",function(){y.closedSource(y.previous.streamInfo),y._sources.length?y.prepareNextSource():y.end()}),b.on("error",function(S){y.error(S)}),this},g.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},g.prototype.error=function(b){var y=this._sources;if(!c.prototype.error.call(this,b))return!1;for(var S=0;S<y.length;S++)try{y[S].error(b)}catch(v){}return!0},g.prototype.lock=function(){c.prototype.lock.call(this);for(var b=this._sources,y=0;y<b.length;y++)b[y].lock()},s.exports=g},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,s,r){var o=t("../compressions"),a=t("./ZipFileWorker");r.generateWorker=function(l,c,d){var m=new a(c.streamFiles,d,c.platform,c.encodeFileName),u=0;try{l.forEach(function(g,b){u++;var y=function(A,E){var w=A||E,_=o[w];if(!_)throw new Error(w+" is not a valid compression method !");return _}(b.options.compression,c.compression),S=b.options.compressionOptions||c.compressionOptions||{},v=b.dir,x=b.date;b._compressWorker(y,S).withStreamInfo("file",{name:g,dir:v,date:x,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(m)}),m.entriesCount=u}catch(g){m.error(g)}return m}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,s,r){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var a=new o;for(var l in this)typeof this[l]!="function"&&(a[l]=this[l]);return a}}(o.prototype=t("./object")).loadAsync=t("./load"),o.support=t("./support"),o.defaults=t("./defaults"),o.version="3.7.1",o.loadAsync=function(a,l){return new o().loadAsync(a,l)},o.external=t("./external"),s.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,s,r){var o=t("./utils"),a=t("./external"),l=t("./utf8"),c=t("./zipEntries"),d=t("./stream/Crc32Probe"),m=t("./nodejsUtils");function u(g){return new a.Promise(function(b,y){var S=g.decompressed.getContentWorker().pipe(new d);S.on("error",function(v){y(v)}).on("end",function(){S.streamInfo.crc32!==g.decompressed.crc32?y(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}s.exports=function(g,b){var y=this;return b=o.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:l.utf8decode}),m.isNode&&m.isStream(g)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",g,!0,b.optimizedBinaryString,b.base64).then(function(S){var v=new c(b);return v.load(S),v}).then(function(S){var v=[a.Promise.resolve(S)],x=S.files;if(b.checkCRC32)for(var A=0;A<x.length;A++)v.push(u(x[A]));return a.Promise.all(v)}).then(function(S){for(var v=S.shift(),x=v.files,A=0;A<x.length;A++){var E=x[A];y.file(E.fileNameStr,E.decompressed,{binary:!0,optimizedBinaryString:!0,date:E.date,dir:E.dir,comment:E.fileCommentStr.length?E.fileCommentStr:null,unixPermissions:E.unixPermissions,dosPermissions:E.dosPermissions,createFolders:b.createFolders})}return v.zipComment.length&&(y.comment=v.zipComment),y})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,s,r){var o=t("../utils"),a=t("../stream/GenericWorker");function l(c,d){a.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(d)}o.inherits(l,a),l.prototype._bindStream=function(c){var d=this;(this._stream=c).pause(),c.on("data",function(m){d.push({data:m,meta:{percent:0}})}).on("error",function(m){d.isPaused?this.generatedError=m:d.error(m)}).on("end",function(){d.isPaused?d._upstreamEnded=!0:d.end()})},l.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},s.exports=l},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,s,r){var o=t("readable-stream").Readable;function a(l,c,d){o.call(this,c),this._helper=l;var m=this;l.on("data",function(u,g){m.push(u)||m._helper.pause(),d&&d(g)}).on("error",function(u){m.emit("error",u)}).on("end",function(){m.push(null)})}t("../utils").inherits(a,o),a.prototype._read=function(){this._helper.resume()},s.exports=a},{"../utils":32,"readable-stream":16}],14:[function(t,s,r){s.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,a);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,a)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var a=new Buffer(o);return a.fill(0),a},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(t,s,r){function o(_,C,P){var I,R=l.getTypeOf(C),N=l.extend(P||{},m);N.date=N.date||new Date,N.compression!==null&&(N.compression=N.compression.toUpperCase()),typeof N.unixPermissions=="string"&&(N.unixPermissions=parseInt(N.unixPermissions,8)),N.unixPermissions&&16384&N.unixPermissions&&(N.dir=!0),N.dosPermissions&&16&N.dosPermissions&&(N.dir=!0),N.dir&&(_=x(_)),N.createFolders&&(I=v(_))&&A.call(this,I,!0);var G=R==="string"&&N.binary===!1&&N.base64===!1;P&&P.binary!==void 0||(N.binary=!G),(C instanceof u&&C.uncompressedSize===0||N.dir||!C||C.length===0)&&(N.base64=!1,N.binary=!0,C="",N.compression="STORE",R="string");var B=null;B=C instanceof u||C instanceof c?C:y.isNode&&y.isStream(C)?new S(_,C):l.prepareContent(_,C,N.binary,N.optimizedBinaryString,N.base64);var k=new g(_,B,N);this.files[_]=k}var a=t("./utf8"),l=t("./utils"),c=t("./stream/GenericWorker"),d=t("./stream/StreamHelper"),m=t("./defaults"),u=t("./compressedObject"),g=t("./zipObject"),b=t("./generate"),y=t("./nodejsUtils"),S=t("./nodejs/NodejsStreamInputAdapter"),v=function(_){_.slice(-1)==="/"&&(_=_.substring(0,_.length-1));var C=_.lastIndexOf("/");return 0<C?_.substring(0,C):""},x=function(_){return _.slice(-1)!=="/"&&(_+="/"),_},A=function(_,C){return C=C!==void 0?C:m.createFolders,_=x(_),this.files[_]||o.call(this,_,null,{dir:!0,createFolders:C}),this.files[_]};function E(_){return Object.prototype.toString.call(_)==="[object RegExp]"}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(_){var C,P,I;for(C in this.files)I=this.files[C],(P=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&_(P,I)},filter:function(_){var C=[];return this.forEach(function(P,I){_(P,I)&&C.push(I)}),C},file:function(_,C,P){if(arguments.length!==1)return _=this.root+_,o.call(this,_,C,P),this;if(E(_)){var I=_;return this.filter(function(N,G){return!G.dir&&I.test(N)})}var R=this.files[this.root+_];return R&&!R.dir?R:null},folder:function(_){if(!_)return this;if(E(_))return this.filter(function(R,N){return N.dir&&_.test(R)});var C=this.root+_,P=A.call(this,C),I=this.clone();return I.root=P.name,I},remove:function(_){_=this.root+_;var C=this.files[_];if(C||(_.slice(-1)!=="/"&&(_+="/"),C=this.files[_]),C&&!C.dir)delete this.files[_];else for(var P=this.filter(function(R,N){return N.name.slice(0,_.length)===_}),I=0;I<P.length;I++)delete this.files[P[I].name];return this},generate:function(_){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(_){var C,P={};try{if((P=l.extend(_||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=P.type.toLowerCase(),P.compression=P.compression.toUpperCase(),P.type==="binarystring"&&(P.type="string"),!P.type)throw new Error("No output type specified.");l.checkSupport(P.type),P.platform!=="darwin"&&P.platform!=="freebsd"&&P.platform!=="linux"&&P.platform!=="sunos"||(P.platform="UNIX"),P.platform==="win32"&&(P.platform="DOS");var I=P.comment||this.comment||"";C=b.generateWorker(this,P,I)}catch(R){(C=new c("error")).error(R)}return new d(C,P.type||"string",P.mimeType)},generateAsync:function(_,C){return this.generateInternalStream(_).accumulate(C)},generateNodeStream:function(_,C){return(_=_||{}).type||(_.type="nodebuffer"),this.generateInternalStream(_).toNodejsStream(C)}};s.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,s,r){s.exports=t("stream")},{stream:void 0}],17:[function(t,s,r){var o=t("./DataReader");function a(l){o.call(this,l);for(var c=0;c<this.data.length;c++)l[c]=255&l[c]}t("../utils").inherits(a,o),a.prototype.byteAt=function(l){return this.data[this.zero+l]},a.prototype.lastIndexOfSignature=function(l){for(var c=l.charCodeAt(0),d=l.charCodeAt(1),m=l.charCodeAt(2),u=l.charCodeAt(3),g=this.length-4;0<=g;--g)if(this.data[g]===c&&this.data[g+1]===d&&this.data[g+2]===m&&this.data[g+3]===u)return g-this.zero;return-1},a.prototype.readAndCheckSignature=function(l){var c=l.charCodeAt(0),d=l.charCodeAt(1),m=l.charCodeAt(2),u=l.charCodeAt(3),g=this.readData(4);return c===g[0]&&d===g[1]&&m===g[2]&&u===g[3]},a.prototype.readData=function(l){if(this.checkOffset(l),l===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},s.exports=a},{"../utils":32,"./DataReader":18}],18:[function(t,s,r){var o=t("../utils");function a(l){this.data=l,this.length=l.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(l){this.checkIndex(this.index+l)},checkIndex:function(l){if(this.length<this.zero+l||l<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+l+"). Corrupted zip ?")},setIndex:function(l){this.checkIndex(l),this.index=l},skip:function(l){this.setIndex(this.index+l)},byteAt:function(l){},readInt:function(l){var c,d=0;for(this.checkOffset(l),c=this.index+l-1;c>=this.index;c--)d=(d<<8)+this.byteAt(c);return this.index+=l,d},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(l){},lastIndexOfSignature:function(l){},readAndCheckSignature:function(l){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},s.exports=a},{"../utils":32}],19:[function(t,s,r){var o=t("./Uint8ArrayReader");function a(l){o.call(this,l)}t("../utils").inherits(a,o),a.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},s.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,s,r){var o=t("./DataReader");function a(l){o.call(this,l)}t("../utils").inherits(a,o),a.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},a.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},a.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},a.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},s.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,s,r){var o=t("./ArrayReader");function a(l){o.call(this,l)}t("../utils").inherits(a,o),a.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},s.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,s,r){var o=t("../utils"),a=t("../support"),l=t("./ArrayReader"),c=t("./StringReader"),d=t("./NodeBufferReader"),m=t("./Uint8ArrayReader");s.exports=function(u){var g=o.getTypeOf(u);return o.checkSupport(g),g!=="string"||a.uint8array?g==="nodebuffer"?new d(u):a.uint8array?new m(o.transformTo("uint8array",u)):new l(o.transformTo("array",u)):new c(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,s,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,s,r){var o=t("./GenericWorker"),a=t("../utils");function l(c){o.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(l,o),l.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},s.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(t,s,r){var o=t("./GenericWorker"),a=t("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(l,o),l.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},s.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,s,r){var o=t("../utils"),a=t("./GenericWorker");function l(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(l,a),l.prototype.processChunk=function(c){if(c){var d=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=d+c.data.length}a.prototype.processChunk.call(this,c)},s.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(t,s,r){var o=t("../utils"),a=t("./GenericWorker");function l(c){a.call(this,"DataWorker");var d=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(m){d.dataIsReady=!0,d.data=m,d.max=m&&m.length||0,d.type=o.getTypeOf(m),d.isPaused||d._tickAndRepeat()},function(m){d.error(m)})}o.inherits(l,a),l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,d=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,d);break;case"uint8array":c=this.data.subarray(this.index,d);break;case"array":case"nodebuffer":c=this.data.slice(this.index,d)}return this.index=d,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},s.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(t,s,r){function o(a){this.name=a||"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}o.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,l){return this._listeners[a].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,l){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,l)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var l=this;return a.on("data",function(c){l.processChunk(c)}),a.on("end",function(){l.end()}),a.on("error",function(c){l.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,l){return this.extraStreamInfo[a]=l,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},s.exports=o},{}],29:[function(t,s,r){var o=t("../utils"),a=t("./ConvertWorker"),l=t("./GenericWorker"),c=t("../base64"),d=t("../support"),m=t("../external"),u=null;if(d.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch(y){}function g(y,S){return new m.Promise(function(v,x){var A=[],E=y._internalType,w=y._outputType,_=y._mimeType;y.on("data",function(C,P){A.push(C),S&&S(P)}).on("error",function(C){A=[],x(C)}).on("end",function(){try{var C=function(P,I,R){switch(P){case"blob":return o.newBlob(o.transformTo("arraybuffer",I),R);case"base64":return c.encode(I);default:return o.transformTo(P,I)}}(w,function(P,I){var R,N=0,G=null,B=0;for(R=0;R<I.length;R++)B+=I[R].length;switch(P){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(G=new Uint8Array(B),R=0;R<I.length;R++)G.set(I[R],N),N+=I[R].length;return G;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+P+"'")}}(E,A),_);v(C)}catch(P){x(P)}A=[]}).resume()})}function b(y,S,v){var x=S;switch(S){case"blob":case"arraybuffer":x="uint8array";break;case"base64":x="string"}try{this._internalType=x,this._outputType=S,this._mimeType=v,o.checkSupport(x),this._worker=y.pipe(new a(x)),y.lock()}catch(A){this._worker=new l("error"),this._worker.error(A)}}b.prototype={accumulate:function(y){return g(this,y)},on:function(y,S){var v=this;return y==="data"?this._worker.on(y,function(x){S.call(v,x.data,x.meta)}):this._worker.on(y,function(){o.delay(S,arguments,v)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(y){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},y)}},s.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,s,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var o=new ArrayBuffer(0);try{r.blob=new Blob([o],{type:"application/zip"}).size===0}catch(l){try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(o),r.blob=a.getBlob("application/zip").size===0}catch(c){r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch(l){r.nodestream=!1}},{"readable-stream":16}],31:[function(t,s,r){for(var o=t("./utils"),a=t("./support"),l=t("./nodejsUtils"),c=t("./stream/GenericWorker"),d=new Array(256),m=0;m<256;m++)d[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;d[254]=d[254]=1;function u(){c.call(this,"utf-8 decode"),this.leftOver=null}function g(){c.call(this,"utf-8 encode")}r.utf8encode=function(b){return a.nodebuffer?l.newBufferFrom(b,"utf-8"):function(y){var S,v,x,A,E,w=y.length,_=0;for(A=0;A<w;A++)(64512&(v=y.charCodeAt(A)))==55296&&A+1<w&&(64512&(x=y.charCodeAt(A+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),A++),_+=v<128?1:v<2048?2:v<65536?3:4;for(S=a.uint8array?new Uint8Array(_):new Array(_),A=E=0;E<_;A++)(64512&(v=y.charCodeAt(A)))==55296&&A+1<w&&(64512&(x=y.charCodeAt(A+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),A++),v<128?S[E++]=v:(v<2048?S[E++]=192|v>>>6:(v<65536?S[E++]=224|v>>>12:(S[E++]=240|v>>>18,S[E++]=128|v>>>12&63),S[E++]=128|v>>>6&63),S[E++]=128|63&v);return S}(b)},r.utf8decode=function(b){return a.nodebuffer?o.transformTo("nodebuffer",b).toString("utf-8"):function(y){var S,v,x,A,E=y.length,w=new Array(2*E);for(S=v=0;S<E;)if((x=y[S++])<128)w[v++]=x;else if(4<(A=d[x]))w[v++]=65533,S+=A-1;else{for(x&=A===2?31:A===3?15:7;1<A&&S<E;)x=x<<6|63&y[S++],A--;1<A?w[v++]=65533:x<65536?w[v++]=x:(x-=65536,w[v++]=55296|x>>10&1023,w[v++]=56320|1023&x)}return w.length!==v&&(w.subarray?w=w.subarray(0,v):w.length=v),o.applyFromCharCode(w)}(b=o.transformTo(a.uint8array?"uint8array":"array",b))},o.inherits(u,c),u.prototype.processChunk=function(b){var y=o.transformTo(a.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var S=y;(y=new Uint8Array(S.length+this.leftOver.length)).set(this.leftOver,0),y.set(S,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var v=function(A,E){var w;for((E=E||A.length)>A.length&&(E=A.length),w=E-1;0<=w&&(192&A[w])==128;)w--;return w<0||w===0?E:w+d[A[w]]>E?w:E}(y),x=y;v!==y.length&&(a.uint8array?(x=y.subarray(0,v),this.leftOver=y.subarray(v,y.length)):(x=y.slice(0,v),this.leftOver=y.slice(v,y.length))),this.push({data:r.utf8decode(x),meta:b.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,o.inherits(g,c),g.prototype.processChunk=function(b){this.push({data:r.utf8encode(b.data),meta:b.meta})},r.Utf8EncodeWorker=g},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,s,r){var o=t("./support"),a=t("./base64"),l=t("./nodejsUtils"),c=t("set-immediate-shim"),d=t("./external");function m(v){return v}function u(v,x){for(var A=0;A<v.length;++A)x[A]=255&v.charCodeAt(A);return x}r.newBlob=function(v,x){r.checkSupport("blob");try{return new Blob([v],{type:x})}catch(E){try{var A=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return A.append(v),A.getBlob(x)}catch(w){throw new Error("Bug : can't construct the Blob.")}}};var g={stringifyByChunk:function(v,x,A){var E=[],w=0,_=v.length;if(_<=A)return String.fromCharCode.apply(null,v);for(;w<_;)x==="array"||x==="nodebuffer"?E.push(String.fromCharCode.apply(null,v.slice(w,Math.min(w+A,_)))):E.push(String.fromCharCode.apply(null,v.subarray(w,Math.min(w+A,_)))),w+=A;return E.join("")},stringifyByChar:function(v){for(var x="",A=0;A<v.length;A++)x+=String.fromCharCode(v[A]);return x},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(v){return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,l.allocBuffer(1)).length===1}catch(v){return!1}}()}};function b(v){var x=65536,A=r.getTypeOf(v),E=!0;if(A==="uint8array"?E=g.applyCanBeUsed.uint8array:A==="nodebuffer"&&(E=g.applyCanBeUsed.nodebuffer),E)for(;1<x;)try{return g.stringifyByChunk(v,A,x)}catch(w){x=Math.floor(x/2)}return g.stringifyByChar(v)}function y(v,x){for(var A=0;A<v.length;A++)x[A]=v[A];return x}r.applyFromCharCode=b;var S={};S.string={string:m,array:function(v){return u(v,new Array(v.length))},arraybuffer:function(v){return S.string.uint8array(v).buffer},uint8array:function(v){return u(v,new Uint8Array(v.length))},nodebuffer:function(v){return u(v,l.allocBuffer(v.length))}},S.array={string:b,array:m,arraybuffer:function(v){return new Uint8Array(v).buffer},uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return l.newBufferFrom(v)}},S.arraybuffer={string:function(v){return b(new Uint8Array(v))},array:function(v){return y(new Uint8Array(v),new Array(v.byteLength))},arraybuffer:m,uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return l.newBufferFrom(new Uint8Array(v))}},S.uint8array={string:b,array:function(v){return y(v,new Array(v.length))},arraybuffer:function(v){return v.buffer},uint8array:m,nodebuffer:function(v){return l.newBufferFrom(v)}},S.nodebuffer={string:b,array:function(v){return y(v,new Array(v.length))},arraybuffer:function(v){return S.nodebuffer.uint8array(v).buffer},uint8array:function(v){return y(v,new Uint8Array(v.length))},nodebuffer:m},r.transformTo=function(v,x){if(x=x||"",!v)return x;r.checkSupport(v);var A=r.getTypeOf(x);return S[A][v](x)},r.getTypeOf=function(v){return typeof v=="string"?"string":Object.prototype.toString.call(v)==="[object Array]"?"array":o.nodebuffer&&l.isBuffer(v)?"nodebuffer":o.uint8array&&v instanceof Uint8Array?"uint8array":o.arraybuffer&&v instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(v){if(!o[v.toLowerCase()])throw new Error(v+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(v){var x,A,E="";for(A=0;A<(v||"").length;A++)E+="\\x"+((x=v.charCodeAt(A))<16?"0":"")+x.toString(16).toUpperCase();return E},r.delay=function(v,x,A){c(function(){v.apply(A||null,x||[])})},r.inherits=function(v,x){function A(){}A.prototype=x.prototype,v.prototype=new A},r.extend=function(){var v,x,A={};for(v=0;v<arguments.length;v++)for(x in arguments[v])arguments[v].hasOwnProperty(x)&&A[x]===void 0&&(A[x]=arguments[v][x]);return A},r.prepareContent=function(v,x,A,E,w){return d.Promise.resolve(x).then(function(_){return o.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new d.Promise(function(C,P){var I=new FileReader;I.onload=function(R){C(R.target.result)},I.onerror=function(R){P(R.target.error)},I.readAsArrayBuffer(_)}):_}).then(function(_){var C=r.getTypeOf(_);return C?(C==="arraybuffer"?_=r.transformTo("uint8array",_):C==="string"&&(w?_=a.decode(_):A&&E!==!0&&(_=function(P){return u(P,o.uint8array?new Uint8Array(P.length):new Array(P.length))}(_))),_):d.Promise.reject(new Error("Can't read the data of '"+v+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,s,r){var o=t("./reader/readerFor"),a=t("./utils"),l=t("./signature"),c=t("./zipEntry"),d=(t("./utf8"),t("./support"));function m(u){this.files=[],this.loadOptions=u}m.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var g=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(g)+", expected "+a.pretty(u)+")")}},isSignature:function(u,g){var b=this.reader.index;this.reader.setIndex(u);var y=this.reader.readString(4)===g;return this.reader.setIndex(b),y},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u=this.reader.readData(this.zipCommentLength),g=d.uint8array?"uint8array":"array",b=a.transformTo(g,u);this.zipComment=this.loadOptions.decodeFileName(b)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u,g,b,y=this.zip64EndOfCentralSize-44;0<y;)u=this.reader.readInt(2),g=this.reader.readInt(4),b=this.reader.readData(g),this.zip64ExtensibleData[u]={id:u,length:g,value:b}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u,g;for(u=0;u<this.files.length;u++)g=this.files[u],this.reader.setIndex(g.localHeaderOffset),this.checkSignature(l.LOCAL_FILE_HEADER),g.readLocalPart(this.reader),g.handleUTF8(),g.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(l.CENTRAL_FILE_HEADER);)(u=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var u=this.reader.lastIndexOfSignature(l.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,l.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(u);var g=u;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var y=g-b;if(0<y)this.isSignature(g,l.CENTRAL_FILE_HEADER)||(this.reader.zero=y);else if(y<0)throw new Error("Corrupted zip: missing "+Math.abs(y)+" bytes.")},prepareReader:function(u){this.reader=o(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},s.exports=m},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,s,r){var o=t("./reader/readerFor"),a=t("./utils"),l=t("./compressedObject"),c=t("./crc32"),d=t("./utf8"),m=t("./compressions"),u=t("./support");function g(b,y){this.options=b,this.loadOptions=y}g.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var y,S;if(b.skip(22),this.fileNameLength=b.readInt(2),S=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(S),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((y=function(v){for(var x in m)if(m.hasOwnProperty(x)&&m[x].magic===v)return m[x];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new l(this.compressedSize,this.uncompressedSize,this.crc32,y,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var y=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(y),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(b){if(this.extraFields[1]){var y=o(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(b){var y,S,v,x=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<x;)y=b.readInt(2),S=b.readInt(2),v=b.readData(S),this.extraFields[y]={id:y,length:S,value:v};b.setIndex(x)},handleUTF8:function(){var b=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=d.utf8decode(this.fileName),this.fileCommentStr=d.utf8decode(this.fileComment);else{var y=this.findExtraFieldUnicodePath();if(y!==null)this.fileNameStr=y;else{var S=a.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(S)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var x=a.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(x)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var y=o(b.value);return y.readInt(1)!==1||c(this.fileName)!==y.readInt(4)?null:d.utf8decode(y.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var y=o(b.value);return y.readInt(1)!==1||c(this.fileComment)!==y.readInt(4)?null:d.utf8decode(y.readData(b.length-5))}return null}},s.exports=g},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,s,r){function o(y,S,v){this.name=y,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=S,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var a=t("./stream/StreamHelper"),l=t("./stream/DataWorker"),c=t("./utf8"),d=t("./compressedObject"),m=t("./stream/GenericWorker");o.prototype={internalStream:function(y){var S=null,v="string";try{if(!y)throw new Error("No output type specified.");var x=(v=y.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),S=this._decompressWorker();var A=!this._dataBinary;A&&!x&&(S=S.pipe(new c.Utf8EncodeWorker)),!A&&x&&(S=S.pipe(new c.Utf8DecodeWorker))}catch(E){(S=new m("error")).error(E)}return new a(S,v,"")},async:function(y,S){return this.internalStream(y).accumulate(S)},nodeStream:function(y,S){return this.internalStream(y||"nodebuffer").toNodejsStream(S)},_compressWorker:function(y,S){if(this._data instanceof d&&this._data.compression.magic===y.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new c.Utf8EncodeWorker)),d.createWorkerFrom(v,y,S)},_decompressWorker:function(){return this._data instanceof d?this._data.getContentWorker():this._data instanceof m?this._data:new l(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],g=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<u.length;b++)o.prototype[u[b]]=g;s.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,s,r){(function(o){var a,l,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var d=0,m=new c(y),u=o.document.createTextNode("");m.observe(u,{characterData:!0}),a=function(){u.data=d=++d%2}}else if(o.setImmediate||o.MessageChannel===void 0)a="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var S=o.document.createElement("script");S.onreadystatechange=function(){y(),S.onreadystatechange=null,S.parentNode.removeChild(S),S=null},o.document.documentElement.appendChild(S)}:function(){setTimeout(y,0)};else{var g=new o.MessageChannel;g.port1.onmessage=y,a=function(){g.port2.postMessage(0)}}var b=[];function y(){var S,v;l=!0;for(var x=b.length;x;){for(v=b,b=[],S=-1;++S<x;)v[S]();x=b.length}l=!1}s.exports=function(S){b.push(S)!==1||l||a()}}).call(this,typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,s,r){var o=t("immediate");function a(){}var l={},c=["REJECTED"],d=["FULFILLED"],m=["PENDING"];function u(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=m,this.queue=[],this.outcome=void 0,x!==a&&S(this,x)}function g(x,A,E){this.promise=x,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}function b(x,A,E){o(function(){var w;try{w=A(E)}catch(_){return l.reject(x,_)}w===x?l.reject(x,new TypeError("Cannot resolve promise with itself")):l.resolve(x,w)})}function y(x){var A=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof A=="function")return function(){A.apply(x,arguments)}}function S(x,A){var E=!1;function w(P){E||(E=!0,l.reject(x,P))}function _(P){E||(E=!0,l.resolve(x,P))}var C=v(function(){A(_,w)});C.status==="error"&&w(C.value)}function v(x,A){var E={};try{E.value=x(A),E.status="success"}catch(w){E.status="error",E.value=w}return E}(s.exports=u).prototype.finally=function(x){if(typeof x!="function")return this;var A=this.constructor;return this.then(function(E){return A.resolve(x()).then(function(){return E})},function(E){return A.resolve(x()).then(function(){throw E})})},u.prototype.catch=function(x){return this.then(null,x)},u.prototype.then=function(x,A){if(typeof x!="function"&&this.state===d||typeof A!="function"&&this.state===c)return this;var E=new this.constructor(a);return this.state!==m?b(E,this.state===d?x:A,this.outcome):this.queue.push(new g(E,x,A)),E},g.prototype.callFulfilled=function(x){l.resolve(this.promise,x)},g.prototype.otherCallFulfilled=function(x){b(this.promise,this.onFulfilled,x)},g.prototype.callRejected=function(x){l.reject(this.promise,x)},g.prototype.otherCallRejected=function(x){b(this.promise,this.onRejected,x)},l.resolve=function(x,A){var E=v(y,A);if(E.status==="error")return l.reject(x,E.value);var w=E.value;if(w)S(x,w);else{x.state=d,x.outcome=A;for(var _=-1,C=x.queue.length;++_<C;)x.queue[_].callFulfilled(A)}return x},l.reject=function(x,A){x.state=c,x.outcome=A;for(var E=-1,w=x.queue.length;++E<w;)x.queue[E].callRejected(A);return x},u.resolve=function(x){return x instanceof this?x:l.resolve(new this(a),x)},u.reject=function(x){var A=new this(a);return l.reject(A,x)},u.all=function(x){var A=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=x.length,w=!1;if(!E)return this.resolve([]);for(var _=new Array(E),C=0,P=-1,I=new this(a);++P<E;)R(x[P],P);return I;function R(N,G){A.resolve(N).then(function(B){_[G]=B,++C!==E||w||(w=!0,l.resolve(I,_))},function(B){w||(w=!0,l.reject(I,B))})}},u.race=function(x){var A=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=x.length,w=!1;if(!E)return this.resolve([]);for(var _=-1,C=new this(a);++_<E;)P=x[_],A.resolve(P).then(function(I){w||(w=!0,l.resolve(C,I))},function(I){w||(w=!0,l.reject(C,I))});var P;return C}},{immediate:36}],38:[function(t,s,r){var o={};(0,t("./lib/utils/common").assign)(o,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),s.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,s,r){var o=t("./zlib/deflate"),a=t("./utils/common"),l=t("./utils/strings"),c=t("./zlib/messages"),d=t("./zlib/zstream"),m=Object.prototype.toString,u=0,g=-1,b=0,y=8;function S(x){if(!(this instanceof S))return new S(x);this.options=a.assign({level:g,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},x||{});var A=this.options;A.raw&&0<A.windowBits?A.windowBits=-A.windowBits:A.gzip&&0<A.windowBits&&A.windowBits<16&&(A.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var E=o.deflateInit2(this.strm,A.level,A.method,A.windowBits,A.memLevel,A.strategy);if(E!==u)throw new Error(c[E]);if(A.header&&o.deflateSetHeader(this.strm,A.header),A.dictionary){var w;if(w=typeof A.dictionary=="string"?l.string2buf(A.dictionary):m.call(A.dictionary)==="[object ArrayBuffer]"?new Uint8Array(A.dictionary):A.dictionary,(E=o.deflateSetDictionary(this.strm,w))!==u)throw new Error(c[E]);this._dict_set=!0}}function v(x,A){var E=new S(A);if(E.push(x,!0),E.err)throw E.msg||c[E.err];return E.result}S.prototype.push=function(x,A){var E,w,_=this.strm,C=this.options.chunkSize;if(this.ended)return!1;w=A===~~A?A:A===!0?4:0,typeof x=="string"?_.input=l.string2buf(x):m.call(x)==="[object ArrayBuffer]"?_.input=new Uint8Array(x):_.input=x,_.next_in=0,_.avail_in=_.input.length;do{if(_.avail_out===0&&(_.output=new a.Buf8(C),_.next_out=0,_.avail_out=C),(E=o.deflate(_,w))!==1&&E!==u)return this.onEnd(E),!(this.ended=!0);_.avail_out!==0&&(_.avail_in!==0||w!==4&&w!==2)||(this.options.to==="string"?this.onData(l.buf2binstring(a.shrinkBuf(_.output,_.next_out))):this.onData(a.shrinkBuf(_.output,_.next_out)))}while((0<_.avail_in||_.avail_out===0)&&E!==1);return w===4?(E=o.deflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===u):w!==2||(this.onEnd(u),!(_.avail_out=0))},S.prototype.onData=function(x){this.chunks.push(x)},S.prototype.onEnd=function(x){x===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=x,this.msg=this.strm.msg},r.Deflate=S,r.deflate=v,r.deflateRaw=function(x,A){return(A=A||{}).raw=!0,v(x,A)},r.gzip=function(x,A){return(A=A||{}).gzip=!0,v(x,A)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,s,r){var o=t("./zlib/inflate"),a=t("./utils/common"),l=t("./utils/strings"),c=t("./zlib/constants"),d=t("./zlib/messages"),m=t("./zlib/zstream"),u=t("./zlib/gzheader"),g=Object.prototype.toString;function b(S){if(!(this instanceof b))return new b(S);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},S||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||S&&S.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&!(15&v.windowBits)&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var x=o.inflateInit2(this.strm,v.windowBits);if(x!==c.Z_OK)throw new Error(d[x]);this.header=new u,o.inflateGetHeader(this.strm,this.header)}function y(S,v){var x=new b(v);if(x.push(S,!0),x.err)throw x.msg||d[x.err];return x.result}b.prototype.push=function(S,v){var x,A,E,w,_,C,P=this.strm,I=this.options.chunkSize,R=this.options.dictionary,N=!1;if(this.ended)return!1;A=v===~~v?v:v===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof S=="string"?P.input=l.binstring2buf(S):g.call(S)==="[object ArrayBuffer]"?P.input=new Uint8Array(S):P.input=S,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new a.Buf8(I),P.next_out=0,P.avail_out=I),(x=o.inflate(P,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&R&&(C=typeof R=="string"?l.string2buf(R):g.call(R)==="[object ArrayBuffer]"?new Uint8Array(R):R,x=o.inflateSetDictionary(this.strm,C)),x===c.Z_BUF_ERROR&&N===!0&&(x=c.Z_OK,N=!1),x!==c.Z_STREAM_END&&x!==c.Z_OK)return this.onEnd(x),!(this.ended=!0);P.next_out&&(P.avail_out!==0&&x!==c.Z_STREAM_END&&(P.avail_in!==0||A!==c.Z_FINISH&&A!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=l.utf8border(P.output,P.next_out),w=P.next_out-E,_=l.buf2string(P.output,E),P.next_out=w,P.avail_out=I-w,w&&a.arraySet(P.output,P.output,E,w,0),this.onData(_)):this.onData(a.shrinkBuf(P.output,P.next_out)))),P.avail_in===0&&P.avail_out===0&&(N=!0)}while((0<P.avail_in||P.avail_out===0)&&x!==c.Z_STREAM_END);return x===c.Z_STREAM_END&&(A=c.Z_FINISH),A===c.Z_FINISH?(x=o.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===c.Z_OK):A!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(P.avail_out=0))},b.prototype.onData=function(S){this.chunks.push(S)},b.prototype.onEnd=function(S){S===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=S,this.msg=this.strm.msg},r.Inflate=b,r.inflate=y,r.inflateRaw=function(S,v){return(v=v||{}).raw=!0,y(S,v)},r.ungzip=y},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,s,r){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(c){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var m=d.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var u in m)m.hasOwnProperty(u)&&(c[u]=m[u])}}return c},r.shrinkBuf=function(c,d){return c.length===d?c:c.subarray?c.subarray(0,d):(c.length=d,c)};var a={arraySet:function(c,d,m,u,g){if(d.subarray&&c.subarray)c.set(d.subarray(m,m+u),g);else for(var b=0;b<u;b++)c[g+b]=d[m+b]},flattenChunks:function(c){var d,m,u,g,b,y;for(d=u=0,m=c.length;d<m;d++)u+=c[d].length;for(y=new Uint8Array(u),d=g=0,m=c.length;d<m;d++)b=c[d],y.set(b,g),g+=b.length;return y}},l={arraySet:function(c,d,m,u,g){for(var b=0;b<u;b++)c[g+b]=d[m+b]},flattenChunks:function(c){return[].concat.apply([],c)}};r.setTyped=function(c){c?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,a)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,l))},r.setTyped(o)},{}],42:[function(t,s,r){var o=t("./common"),a=!0,l=!0;try{String.fromCharCode.apply(null,[0])}catch(u){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(u){l=!1}for(var c=new o.Buf8(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;function m(u,g){if(g<65537&&(u.subarray&&l||!u.subarray&&a))return String.fromCharCode.apply(null,o.shrinkBuf(u,g));for(var b="",y=0;y<g;y++)b+=String.fromCharCode(u[y]);return b}c[254]=c[254]=1,r.string2buf=function(u){var g,b,y,S,v,x=u.length,A=0;for(S=0;S<x;S++)(64512&(b=u.charCodeAt(S)))==55296&&S+1<x&&(64512&(y=u.charCodeAt(S+1)))==56320&&(b=65536+(b-55296<<10)+(y-56320),S++),A+=b<128?1:b<2048?2:b<65536?3:4;for(g=new o.Buf8(A),S=v=0;v<A;S++)(64512&(b=u.charCodeAt(S)))==55296&&S+1<x&&(64512&(y=u.charCodeAt(S+1)))==56320&&(b=65536+(b-55296<<10)+(y-56320),S++),b<128?g[v++]=b:(b<2048?g[v++]=192|b>>>6:(b<65536?g[v++]=224|b>>>12:(g[v++]=240|b>>>18,g[v++]=128|b>>>12&63),g[v++]=128|b>>>6&63),g[v++]=128|63&b);return g},r.buf2binstring=function(u){return m(u,u.length)},r.binstring2buf=function(u){for(var g=new o.Buf8(u.length),b=0,y=g.length;b<y;b++)g[b]=u.charCodeAt(b);return g},r.buf2string=function(u,g){var b,y,S,v,x=g||u.length,A=new Array(2*x);for(b=y=0;b<x;)if((S=u[b++])<128)A[y++]=S;else if(4<(v=c[S]))A[y++]=65533,b+=v-1;else{for(S&=v===2?31:v===3?15:7;1<v&&b<x;)S=S<<6|63&u[b++],v--;1<v?A[y++]=65533:S<65536?A[y++]=S:(S-=65536,A[y++]=55296|S>>10&1023,A[y++]=56320|1023&S)}return m(A,y)},r.utf8border=function(u,g){var b;for((g=g||u.length)>u.length&&(g=u.length),b=g-1;0<=b&&(192&u[b])==128;)b--;return b<0||b===0?g:b+c[u[b]]>g?b:g}},{"./common":41}],43:[function(t,s,r){s.exports=function(o,a,l,c){for(var d=65535&o|0,m=o>>>16&65535|0,u=0;l!==0;){for(l-=u=2e3<l?2e3:l;m=m+(d=d+a[c++]|0)|0,--u;);d%=65521,m%=65521}return d|m<<16|0}},{}],44:[function(t,s,r){s.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,s,r){var o=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();s.exports=function(a,l,c,d){var m=o,u=d+c;a^=-1;for(var g=d;g<u;g++)a=a>>>8^m[255&(a^l[g])];return-1^a}},{}],46:[function(t,s,r){var o,a=t("../utils/common"),l=t("./trees"),c=t("./adler32"),d=t("./crc32"),m=t("./messages"),u=0,g=4,b=0,y=-2,S=-1,v=4,x=2,A=8,E=9,w=286,_=30,C=19,P=2*w+1,I=15,R=3,N=258,G=N+R+1,B=42,k=113,T=1,V=2,Z=3,W=4;function se(M,Q){return M.msg=m[Q],Q}function ie(M){return(M<<1)-(4<M?9:0)}function fe(M){for(var Q=M.length;0<=--Q;)M[Q]=0}function J(M){var Q=M.state,z=Q.pending;z>M.avail_out&&(z=M.avail_out),z!==0&&(a.arraySet(M.output,Q.pending_buf,Q.pending_out,z,M.next_out),M.next_out+=z,Q.pending_out+=z,M.total_out+=z,M.avail_out-=z,Q.pending-=z,Q.pending===0&&(Q.pending_out=0))}function K(M,Q){l._tr_flush_block(M,0<=M.block_start?M.block_start:-1,M.strstart-M.block_start,Q),M.block_start=M.strstart,J(M.strm)}function be(M,Q){M.pending_buf[M.pending++]=Q}function oe(M,Q){M.pending_buf[M.pending++]=Q>>>8&255,M.pending_buf[M.pending++]=255&Q}function Y(M,Q){var z,F,O=M.max_chain_length,H=M.strstart,ne=M.prev_length,ee=M.nice_match,te=M.strstart>M.w_size-G?M.strstart-(M.w_size-G):0,ce=M.window,he=M.w_mask,re=M.prev,ge=M.strstart+N,xe=ce[H+ne-1],ue=ce[H+ne];M.prev_length>=M.good_match&&(O>>=2),ee>M.lookahead&&(ee=M.lookahead);do if(ce[(z=Q)+ne]===ue&&ce[z+ne-1]===xe&&ce[z]===ce[H]&&ce[++z]===ce[H+1]){H+=2,z++;do;while(ce[++H]===ce[++z]&&ce[++H]===ce[++z]&&ce[++H]===ce[++z]&&ce[++H]===ce[++z]&&ce[++H]===ce[++z]&&ce[++H]===ce[++z]&&ce[++H]===ce[++z]&&ce[++H]===ce[++z]&&H<ge);if(F=N-(ge-H),H=ge-N,ne<F){if(M.match_start=Q,ee<=(ne=F))break;xe=ce[H+ne-1],ue=ce[H+ne]}}while((Q=re[Q&he])>te&&--O!=0);return ne<=M.lookahead?ne:M.lookahead}function ae(M){var Q,z,F,O,H,ne,ee,te,ce,he,re=M.w_size;do{if(O=M.window_size-M.lookahead-M.strstart,M.strstart>=re+(re-G)){for(a.arraySet(M.window,M.window,re,re,0),M.match_start-=re,M.strstart-=re,M.block_start-=re,Q=z=M.hash_size;F=M.head[--Q],M.head[Q]=re<=F?F-re:0,--z;);for(Q=z=re;F=M.prev[--Q],M.prev[Q]=re<=F?F-re:0,--z;);O+=re}if(M.strm.avail_in===0)break;if(ne=M.strm,ee=M.window,te=M.strstart+M.lookahead,ce=O,he=void 0,he=ne.avail_in,ce<he&&(he=ce),z=he===0?0:(ne.avail_in-=he,a.arraySet(ee,ne.input,ne.next_in,he,te),ne.state.wrap===1?ne.adler=c(ne.adler,ee,he,te):ne.state.wrap===2&&(ne.adler=d(ne.adler,ee,he,te)),ne.next_in+=he,ne.total_in+=he,he),M.lookahead+=z,M.lookahead+M.insert>=R)for(H=M.strstart-M.insert,M.ins_h=M.window[H],M.ins_h=(M.ins_h<<M.hash_shift^M.window[H+1])&M.hash_mask;M.insert&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[H+R-1])&M.hash_mask,M.prev[H&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=H,H++,M.insert--,!(M.lookahead+M.insert<R)););}while(M.lookahead<G&&M.strm.avail_in!==0)}function de(M,Q){for(var z,F;;){if(M.lookahead<G){if(ae(M),M.lookahead<G&&Q===u)return T;if(M.lookahead===0)break}if(z=0,M.lookahead>=R&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+R-1])&M.hash_mask,z=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=M.strstart),z!==0&&M.strstart-z<=M.w_size-G&&(M.match_length=Y(M,z)),M.match_length>=R)if(F=l._tr_tally(M,M.strstart-M.match_start,M.match_length-R),M.lookahead-=M.match_length,M.match_length<=M.max_lazy_match&&M.lookahead>=R){for(M.match_length--;M.strstart++,M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+R-1])&M.hash_mask,z=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=M.strstart,--M.match_length!=0;);M.strstart++}else M.strstart+=M.match_length,M.match_length=0,M.ins_h=M.window[M.strstart],M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+1])&M.hash_mask;else F=l._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++;if(F&&(K(M,!1),M.strm.avail_out===0))return T}return M.insert=M.strstart<R-1?M.strstart:R-1,Q===g?(K(M,!0),M.strm.avail_out===0?Z:W):M.last_lit&&(K(M,!1),M.strm.avail_out===0)?T:V}function le(M,Q){for(var z,F,O;;){if(M.lookahead<G){if(ae(M),M.lookahead<G&&Q===u)return T;if(M.lookahead===0)break}if(z=0,M.lookahead>=R&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+R-1])&M.hash_mask,z=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=M.strstart),M.prev_length=M.match_length,M.prev_match=M.match_start,M.match_length=R-1,z!==0&&M.prev_length<M.max_lazy_match&&M.strstart-z<=M.w_size-G&&(M.match_length=Y(M,z),M.match_length<=5&&(M.strategy===1||M.match_length===R&&4096<M.strstart-M.match_start)&&(M.match_length=R-1)),M.prev_length>=R&&M.match_length<=M.prev_length){for(O=M.strstart+M.lookahead-R,F=l._tr_tally(M,M.strstart-1-M.prev_match,M.prev_length-R),M.lookahead-=M.prev_length-1,M.prev_length-=2;++M.strstart<=O&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+R-1])&M.hash_mask,z=M.prev[M.strstart&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=M.strstart),--M.prev_length!=0;);if(M.match_available=0,M.match_length=R-1,M.strstart++,F&&(K(M,!1),M.strm.avail_out===0))return T}else if(M.match_available){if((F=l._tr_tally(M,0,M.window[M.strstart-1]))&&K(M,!1),M.strstart++,M.lookahead--,M.strm.avail_out===0)return T}else M.match_available=1,M.strstart++,M.lookahead--}return M.match_available&&(F=l._tr_tally(M,0,M.window[M.strstart-1]),M.match_available=0),M.insert=M.strstart<R-1?M.strstart:R-1,Q===g?(K(M,!0),M.strm.avail_out===0?Z:W):M.last_lit&&(K(M,!1),M.strm.avail_out===0)?T:V}function me(M,Q,z,F,O){this.good_length=M,this.max_lazy=Q,this.nice_length=z,this.max_chain=F,this.func=O}function ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*P),this.dyn_dtree=new a.Buf16(2*(2*_+1)),this.bl_tree=new a.Buf16(2*(2*C+1)),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(I+1),this.heap=new a.Buf16(2*w+1),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*w+1),fe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(M){var Q;return M&&M.state?(M.total_in=M.total_out=0,M.data_type=x,(Q=M.state).pending=0,Q.pending_out=0,Q.wrap<0&&(Q.wrap=-Q.wrap),Q.status=Q.wrap?B:k,M.adler=Q.wrap===2?0:1,Q.last_flush=u,l._tr_init(Q),b):se(M,y)}function U(M){var Q=ye(M);return Q===b&&function(z){z.window_size=2*z.w_size,fe(z.head),z.max_lazy_match=o[z.level].max_lazy,z.good_match=o[z.level].good_length,z.nice_match=o[z.level].nice_length,z.max_chain_length=o[z.level].max_chain,z.strstart=0,z.block_start=0,z.lookahead=0,z.insert=0,z.match_length=z.prev_length=R-1,z.match_available=0,z.ins_h=0}(M.state),Q}function $(M,Q,z,F,O,H){if(!M)return y;var ne=1;if(Q===S&&(Q=6),F<0?(ne=0,F=-F):15<F&&(ne=2,F-=16),O<1||E<O||z!==A||F<8||15<F||Q<0||9<Q||H<0||v<H)return se(M,y);F===8&&(F=9);var ee=new ve;return(M.state=ee).strm=M,ee.wrap=ne,ee.gzhead=null,ee.w_bits=F,ee.w_size=1<<ee.w_bits,ee.w_mask=ee.w_size-1,ee.hash_bits=O+7,ee.hash_size=1<<ee.hash_bits,ee.hash_mask=ee.hash_size-1,ee.hash_shift=~~((ee.hash_bits+R-1)/R),ee.window=new a.Buf8(2*ee.w_size),ee.head=new a.Buf16(ee.hash_size),ee.prev=new a.Buf16(ee.w_size),ee.lit_bufsize=1<<O+6,ee.pending_buf_size=4*ee.lit_bufsize,ee.pending_buf=new a.Buf8(ee.pending_buf_size),ee.d_buf=1*ee.lit_bufsize,ee.l_buf=3*ee.lit_bufsize,ee.level=Q,ee.strategy=H,ee.method=z,U(M)}o=[new me(0,0,0,0,function(M,Q){var z=65535;for(z>M.pending_buf_size-5&&(z=M.pending_buf_size-5);;){if(M.lookahead<=1){if(ae(M),M.lookahead===0&&Q===u)return T;if(M.lookahead===0)break}M.strstart+=M.lookahead,M.lookahead=0;var F=M.block_start+z;if((M.strstart===0||M.strstart>=F)&&(M.lookahead=M.strstart-F,M.strstart=F,K(M,!1),M.strm.avail_out===0)||M.strstart-M.block_start>=M.w_size-G&&(K(M,!1),M.strm.avail_out===0))return T}return M.insert=0,Q===g?(K(M,!0),M.strm.avail_out===0?Z:W):(M.strstart>M.block_start&&(K(M,!1),M.strm.avail_out),T)}),new me(4,4,8,4,de),new me(4,5,16,8,de),new me(4,6,32,32,de),new me(4,4,16,16,le),new me(8,16,32,32,le),new me(8,16,128,128,le),new me(8,32,128,256,le),new me(32,128,258,1024,le),new me(32,258,258,4096,le)],r.deflateInit=function(M,Q){return $(M,Q,A,15,8,0)},r.deflateInit2=$,r.deflateReset=U,r.deflateResetKeep=ye,r.deflateSetHeader=function(M,Q){return M&&M.state?M.state.wrap!==2?y:(M.state.gzhead=Q,b):y},r.deflate=function(M,Q){var z,F,O,H;if(!M||!M.state||5<Q||Q<0)return M?se(M,y):y;if(F=M.state,!M.output||!M.input&&M.avail_in!==0||F.status===666&&Q!==g)return se(M,M.avail_out===0?-5:y);if(F.strm=M,z=F.last_flush,F.last_flush=Q,F.status===B)if(F.wrap===2)M.adler=0,be(F,31),be(F,139),be(F,8),F.gzhead?(be(F,(F.gzhead.text?1:0)+(F.gzhead.hcrc?2:0)+(F.gzhead.extra?4:0)+(F.gzhead.name?8:0)+(F.gzhead.comment?16:0)),be(F,255&F.gzhead.time),be(F,F.gzhead.time>>8&255),be(F,F.gzhead.time>>16&255),be(F,F.gzhead.time>>24&255),be(F,F.level===9?2:2<=F.strategy||F.level<2?4:0),be(F,255&F.gzhead.os),F.gzhead.extra&&F.gzhead.extra.length&&(be(F,255&F.gzhead.extra.length),be(F,F.gzhead.extra.length>>8&255)),F.gzhead.hcrc&&(M.adler=d(M.adler,F.pending_buf,F.pending,0)),F.gzindex=0,F.status=69):(be(F,0),be(F,0),be(F,0),be(F,0),be(F,0),be(F,F.level===9?2:2<=F.strategy||F.level<2?4:0),be(F,3),F.status=k);else{var ne=A+(F.w_bits-8<<4)<<8;ne|=(2<=F.strategy||F.level<2?0:F.level<6?1:F.level===6?2:3)<<6,F.strstart!==0&&(ne|=32),ne+=31-ne%31,F.status=k,oe(F,ne),F.strstart!==0&&(oe(F,M.adler>>>16),oe(F,65535&M.adler)),M.adler=1}if(F.status===69)if(F.gzhead.extra){for(O=F.pending;F.gzindex<(65535&F.gzhead.extra.length)&&(F.pending!==F.pending_buf_size||(F.gzhead.hcrc&&F.pending>O&&(M.adler=d(M.adler,F.pending_buf,F.pending-O,O)),J(M),O=F.pending,F.pending!==F.pending_buf_size));)be(F,255&F.gzhead.extra[F.gzindex]),F.gzindex++;F.gzhead.hcrc&&F.pending>O&&(M.adler=d(M.adler,F.pending_buf,F.pending-O,O)),F.gzindex===F.gzhead.extra.length&&(F.gzindex=0,F.status=73)}else F.status=73;if(F.status===73)if(F.gzhead.name){O=F.pending;do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>O&&(M.adler=d(M.adler,F.pending_buf,F.pending-O,O)),J(M),O=F.pending,F.pending===F.pending_buf_size)){H=1;break}H=F.gzindex<F.gzhead.name.length?255&F.gzhead.name.charCodeAt(F.gzindex++):0,be(F,H)}while(H!==0);F.gzhead.hcrc&&F.pending>O&&(M.adler=d(M.adler,F.pending_buf,F.pending-O,O)),H===0&&(F.gzindex=0,F.status=91)}else F.status=91;if(F.status===91)if(F.gzhead.comment){O=F.pending;do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>O&&(M.adler=d(M.adler,F.pending_buf,F.pending-O,O)),J(M),O=F.pending,F.pending===F.pending_buf_size)){H=1;break}H=F.gzindex<F.gzhead.comment.length?255&F.gzhead.comment.charCodeAt(F.gzindex++):0,be(F,H)}while(H!==0);F.gzhead.hcrc&&F.pending>O&&(M.adler=d(M.adler,F.pending_buf,F.pending-O,O)),H===0&&(F.status=103)}else F.status=103;if(F.status===103&&(F.gzhead.hcrc?(F.pending+2>F.pending_buf_size&&J(M),F.pending+2<=F.pending_buf_size&&(be(F,255&M.adler),be(F,M.adler>>8&255),M.adler=0,F.status=k)):F.status=k),F.pending!==0){if(J(M),M.avail_out===0)return F.last_flush=-1,b}else if(M.avail_in===0&&ie(Q)<=ie(z)&&Q!==g)return se(M,-5);if(F.status===666&&M.avail_in!==0)return se(M,-5);if(M.avail_in!==0||F.lookahead!==0||Q!==u&&F.status!==666){var ee=F.strategy===2?function(te,ce){for(var he;;){if(te.lookahead===0&&(ae(te),te.lookahead===0)){if(ce===u)return T;break}if(te.match_length=0,he=l._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++,he&&(K(te,!1),te.strm.avail_out===0))return T}return te.insert=0,ce===g?(K(te,!0),te.strm.avail_out===0?Z:W):te.last_lit&&(K(te,!1),te.strm.avail_out===0)?T:V}(F,Q):F.strategy===3?function(te,ce){for(var he,re,ge,xe,ue=te.window;;){if(te.lookahead<=N){if(ae(te),te.lookahead<=N&&ce===u)return T;if(te.lookahead===0)break}if(te.match_length=0,te.lookahead>=R&&0<te.strstart&&(re=ue[ge=te.strstart-1])===ue[++ge]&&re===ue[++ge]&&re===ue[++ge]){xe=te.strstart+N;do;while(re===ue[++ge]&&re===ue[++ge]&&re===ue[++ge]&&re===ue[++ge]&&re===ue[++ge]&&re===ue[++ge]&&re===ue[++ge]&&re===ue[++ge]&&ge<xe);te.match_length=N-(xe-ge),te.match_length>te.lookahead&&(te.match_length=te.lookahead)}if(te.match_length>=R?(he=l._tr_tally(te,1,te.match_length-R),te.lookahead-=te.match_length,te.strstart+=te.match_length,te.match_length=0):(he=l._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++),he&&(K(te,!1),te.strm.avail_out===0))return T}return te.insert=0,ce===g?(K(te,!0),te.strm.avail_out===0?Z:W):te.last_lit&&(K(te,!1),te.strm.avail_out===0)?T:V}(F,Q):o[F.level].func(F,Q);if(ee!==Z&&ee!==W||(F.status=666),ee===T||ee===Z)return M.avail_out===0&&(F.last_flush=-1),b;if(ee===V&&(Q===1?l._tr_align(F):Q!==5&&(l._tr_stored_block(F,0,0,!1),Q===3&&(fe(F.head),F.lookahead===0&&(F.strstart=0,F.block_start=0,F.insert=0))),J(M),M.avail_out===0))return F.last_flush=-1,b}return Q!==g?b:F.wrap<=0?1:(F.wrap===2?(be(F,255&M.adler),be(F,M.adler>>8&255),be(F,M.adler>>16&255),be(F,M.adler>>24&255),be(F,255&M.total_in),be(F,M.total_in>>8&255),be(F,M.total_in>>16&255),be(F,M.total_in>>24&255)):(oe(F,M.adler>>>16),oe(F,65535&M.adler)),J(M),0<F.wrap&&(F.wrap=-F.wrap),F.pending!==0?b:1)},r.deflateEnd=function(M){var Q;return M&&M.state?(Q=M.state.status)!==B&&Q!==69&&Q!==73&&Q!==91&&Q!==103&&Q!==k&&Q!==666?se(M,y):(M.state=null,Q===k?se(M,-3):b):y},r.deflateSetDictionary=function(M,Q){var z,F,O,H,ne,ee,te,ce,he=Q.length;if(!M||!M.state||(H=(z=M.state).wrap)===2||H===1&&z.status!==B||z.lookahead)return y;for(H===1&&(M.adler=c(M.adler,Q,he,0)),z.wrap=0,he>=z.w_size&&(H===0&&(fe(z.head),z.strstart=0,z.block_start=0,z.insert=0),ce=new a.Buf8(z.w_size),a.arraySet(ce,Q,he-z.w_size,z.w_size,0),Q=ce,he=z.w_size),ne=M.avail_in,ee=M.next_in,te=M.input,M.avail_in=he,M.next_in=0,M.input=Q,ae(z);z.lookahead>=R;){for(F=z.strstart,O=z.lookahead-(R-1);z.ins_h=(z.ins_h<<z.hash_shift^z.window[F+R-1])&z.hash_mask,z.prev[F&z.w_mask]=z.head[z.ins_h],z.head[z.ins_h]=F,F++,--O;);z.strstart=F,z.lookahead=R-1,ae(z)}return z.strstart+=z.lookahead,z.block_start=z.strstart,z.insert=z.lookahead,z.lookahead=0,z.match_length=z.prev_length=R-1,z.match_available=0,M.next_in=ee,M.input=te,M.avail_in=ne,z.wrap=H,b},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,s,r){s.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,s,r){s.exports=function(o,a){var l,c,d,m,u,g,b,y,S,v,x,A,E,w,_,C,P,I,R,N,G,B,k,T,V;l=o.state,c=o.next_in,T=o.input,d=c+(o.avail_in-5),m=o.next_out,V=o.output,u=m-(a-o.avail_out),g=m+(o.avail_out-257),b=l.dmax,y=l.wsize,S=l.whave,v=l.wnext,x=l.window,A=l.hold,E=l.bits,w=l.lencode,_=l.distcode,C=(1<<l.lenbits)-1,P=(1<<l.distbits)-1;e:do{E<15&&(A+=T[c++]<<E,E+=8,A+=T[c++]<<E,E+=8),I=w[A&C];t:for(;;){if(A>>>=R=I>>>24,E-=R,(R=I>>>16&255)===0)V[m++]=65535&I;else{if(!(16&R)){if(!(64&R)){I=w[(65535&I)+(A&(1<<R)-1)];continue t}if(32&R){l.mode=12;break e}o.msg="invalid literal/length code",l.mode=30;break e}N=65535&I,(R&=15)&&(E<R&&(A+=T[c++]<<E,E+=8),N+=A&(1<<R)-1,A>>>=R,E-=R),E<15&&(A+=T[c++]<<E,E+=8,A+=T[c++]<<E,E+=8),I=_[A&P];i:for(;;){if(A>>>=R=I>>>24,E-=R,!(16&(R=I>>>16&255))){if(!(64&R)){I=_[(65535&I)+(A&(1<<R)-1)];continue i}o.msg="invalid distance code",l.mode=30;break e}if(G=65535&I,E<(R&=15)&&(A+=T[c++]<<E,(E+=8)<R&&(A+=T[c++]<<E,E+=8)),b<(G+=A&(1<<R)-1)){o.msg="invalid distance too far back",l.mode=30;break e}if(A>>>=R,E-=R,(R=m-u)<G){if(S<(R=G-R)&&l.sane){o.msg="invalid distance too far back",l.mode=30;break e}if(k=x,(B=0)===v){if(B+=y-R,R<N){for(N-=R;V[m++]=x[B++],--R;);B=m-G,k=V}}else if(v<R){if(B+=y+v-R,(R-=v)<N){for(N-=R;V[m++]=x[B++],--R;);if(B=0,v<N){for(N-=R=v;V[m++]=x[B++],--R;);B=m-G,k=V}}}else if(B+=v-R,R<N){for(N-=R;V[m++]=x[B++],--R;);B=m-G,k=V}for(;2<N;)V[m++]=k[B++],V[m++]=k[B++],V[m++]=k[B++],N-=3;N&&(V[m++]=k[B++],1<N&&(V[m++]=k[B++]))}else{for(B=m-G;V[m++]=V[B++],V[m++]=V[B++],V[m++]=V[B++],2<(N-=3););N&&(V[m++]=V[B++],1<N&&(V[m++]=V[B++]))}break}}break}}while(c<d&&m<g);c-=N=E>>3,A&=(1<<(E-=N<<3))-1,o.next_in=c,o.next_out=m,o.avail_in=c<d?d-c+5:5-(c-d),o.avail_out=m<g?g-m+257:257-(m-g),l.hold=A,l.bits=E}},{}],49:[function(t,s,r){var o=t("../utils/common"),a=t("./adler32"),l=t("./crc32"),c=t("./inffast"),d=t("./inftrees"),m=1,u=2,g=0,b=-2,y=1,S=852,v=592;function x(B){return(B>>>24&255)+(B>>>8&65280)+((65280&B)<<8)+((255&B)<<24)}function A(){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 o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(B){var k;return B&&B.state?(k=B.state,B.total_in=B.total_out=k.total=0,B.msg="",k.wrap&&(B.adler=1&k.wrap),k.mode=y,k.last=0,k.havedict=0,k.dmax=32768,k.head=null,k.hold=0,k.bits=0,k.lencode=k.lendyn=new o.Buf32(S),k.distcode=k.distdyn=new o.Buf32(v),k.sane=1,k.back=-1,g):b}function w(B){var k;return B&&B.state?((k=B.state).wsize=0,k.whave=0,k.wnext=0,E(B)):b}function _(B,k){var T,V;return B&&B.state?(V=B.state,k<0?(T=0,k=-k):(T=1+(k>>4),k<48&&(k&=15)),k&&(k<8||15<k)?b:(V.window!==null&&V.wbits!==k&&(V.window=null),V.wrap=T,V.wbits=k,w(B))):b}function C(B,k){var T,V;return B?(V=new A,(B.state=V).window=null,(T=_(B,k))!==g&&(B.state=null),T):b}var P,I,R=!0;function N(B){if(R){var k;for(P=new o.Buf32(512),I=new o.Buf32(32),k=0;k<144;)B.lens[k++]=8;for(;k<256;)B.lens[k++]=9;for(;k<280;)B.lens[k++]=7;for(;k<288;)B.lens[k++]=8;for(d(m,B.lens,0,288,P,0,B.work,{bits:9}),k=0;k<32;)B.lens[k++]=5;d(u,B.lens,0,32,I,0,B.work,{bits:5}),R=!1}B.lencode=P,B.lenbits=9,B.distcode=I,B.distbits=5}function G(B,k,T,V){var Z,W=B.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new o.Buf8(W.wsize)),V>=W.wsize?(o.arraySet(W.window,k,T-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(V<(Z=W.wsize-W.wnext)&&(Z=V),o.arraySet(W.window,k,T-V,Z,W.wnext),(V-=Z)?(o.arraySet(W.window,k,T-V,V,0),W.wnext=V,W.whave=W.wsize):(W.wnext+=Z,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=Z))),0}r.inflateReset=w,r.inflateReset2=_,r.inflateResetKeep=E,r.inflateInit=function(B){return C(B,15)},r.inflateInit2=C,r.inflate=function(B,k){var T,V,Z,W,se,ie,fe,J,K,be,oe,Y,ae,de,le,me,ve,ye,U,$,M,Q,z,F,O=0,H=new o.Buf8(4),ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!B||!B.state||!B.output||!B.input&&B.avail_in!==0)return b;(T=B.state).mode===12&&(T.mode=13),se=B.next_out,Z=B.output,fe=B.avail_out,W=B.next_in,V=B.input,ie=B.avail_in,J=T.hold,K=T.bits,be=ie,oe=fe,Q=g;e:for(;;)switch(T.mode){case y:if(T.wrap===0){T.mode=13;break}for(;K<16;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(2&T.wrap&&J===35615){H[T.check=0]=255&J,H[1]=J>>>8&255,T.check=l(T.check,H,2,0),K=J=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&J)<<8)+(J>>8))%31){B.msg="incorrect header check",T.mode=30;break}if((15&J)!=8){B.msg="unknown compression method",T.mode=30;break}if(K-=4,M=8+(15&(J>>>=4)),T.wbits===0)T.wbits=M;else if(M>T.wbits){B.msg="invalid window size",T.mode=30;break}T.dmax=1<<M,B.adler=T.check=1,T.mode=512&J?10:12,K=J=0;break;case 2:for(;K<16;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(T.flags=J,(255&T.flags)!=8){B.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){B.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=J>>8&1),512&T.flags&&(H[0]=255&J,H[1]=J>>>8&255,T.check=l(T.check,H,2,0)),K=J=0,T.mode=3;case 3:for(;K<32;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}T.head&&(T.head.time=J),512&T.flags&&(H[0]=255&J,H[1]=J>>>8&255,H[2]=J>>>16&255,H[3]=J>>>24&255,T.check=l(T.check,H,4,0)),K=J=0,T.mode=4;case 4:for(;K<16;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}T.head&&(T.head.xflags=255&J,T.head.os=J>>8),512&T.flags&&(H[0]=255&J,H[1]=J>>>8&255,T.check=l(T.check,H,2,0)),K=J=0,T.mode=5;case 5:if(1024&T.flags){for(;K<16;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}T.length=J,T.head&&(T.head.extra_len=J),512&T.flags&&(H[0]=255&J,H[1]=J>>>8&255,T.check=l(T.check,H,2,0)),K=J=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(ie<(Y=T.length)&&(Y=ie),Y&&(T.head&&(M=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),o.arraySet(T.head.extra,V,W,Y,M)),512&T.flags&&(T.check=l(T.check,V,Y,W)),ie-=Y,W+=Y,T.length-=Y),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(ie===0)break e;for(Y=0;M=V[W+Y++],T.head&&M&&T.length<65536&&(T.head.name+=String.fromCharCode(M)),M&&Y<ie;);if(512&T.flags&&(T.check=l(T.check,V,Y,W)),ie-=Y,W+=Y,M)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(ie===0)break e;for(Y=0;M=V[W+Y++],T.head&&M&&T.length<65536&&(T.head.comment+=String.fromCharCode(M)),M&&Y<ie;);if(512&T.flags&&(T.check=l(T.check,V,Y,W)),ie-=Y,W+=Y,M)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;K<16;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(J!==(65535&T.check)){B.msg="header crc mismatch",T.mode=30;break}K=J=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),B.adler=T.check=0,T.mode=12;break;case 10:for(;K<32;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}B.adler=T.check=x(J),K=J=0,T.mode=11;case 11:if(T.havedict===0)return B.next_out=se,B.avail_out=fe,B.next_in=W,B.avail_in=ie,T.hold=J,T.bits=K,2;B.adler=T.check=1,T.mode=12;case 12:if(k===5||k===6)break e;case 13:if(T.last){J>>>=7&K,K-=7&K,T.mode=27;break}for(;K<3;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}switch(T.last=1&J,K-=1,3&(J>>>=1)){case 0:T.mode=14;break;case 1:if(N(T),T.mode=20,k!==6)break;J>>>=2,K-=2;break e;case 2:T.mode=17;break;case 3:B.msg="invalid block type",T.mode=30}J>>>=2,K-=2;break;case 14:for(J>>>=7&K,K-=7&K;K<32;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if((65535&J)!=(J>>>16^65535)){B.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&J,K=J=0,T.mode=15,k===6)break e;case 15:T.mode=16;case 16:if(Y=T.length){if(ie<Y&&(Y=ie),fe<Y&&(Y=fe),Y===0)break e;o.arraySet(Z,V,W,Y,se),ie-=Y,W+=Y,fe-=Y,se+=Y,T.length-=Y;break}T.mode=12;break;case 17:for(;K<14;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(T.nlen=257+(31&J),J>>>=5,K-=5,T.ndist=1+(31&J),J>>>=5,K-=5,T.ncode=4+(15&J),J>>>=4,K-=4,286<T.nlen||30<T.ndist){B.msg="too many length or distance symbols",T.mode=30;break}T.have=0,T.mode=18;case 18:for(;T.have<T.ncode;){for(;K<3;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}T.lens[ne[T.have++]]=7&J,J>>>=3,K-=3}for(;T.have<19;)T.lens[ne[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,z={bits:T.lenbits},Q=d(0,T.lens,0,19,T.lencode,0,T.work,z),T.lenbits=z.bits,Q){B.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;me=(O=T.lencode[J&(1<<T.lenbits)-1])>>>16&255,ve=65535&O,!((le=O>>>24)<=K);){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(ve<16)J>>>=le,K-=le,T.lens[T.have++]=ve;else{if(ve===16){for(F=le+2;K<F;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(J>>>=le,K-=le,T.have===0){B.msg="invalid bit length repeat",T.mode=30;break}M=T.lens[T.have-1],Y=3+(3&J),J>>>=2,K-=2}else if(ve===17){for(F=le+3;K<F;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}K-=le,M=0,Y=3+(7&(J>>>=le)),J>>>=3,K-=3}else{for(F=le+7;K<F;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}K-=le,M=0,Y=11+(127&(J>>>=le)),J>>>=7,K-=7}if(T.have+Y>T.nlen+T.ndist){B.msg="invalid bit length repeat",T.mode=30;break}for(;Y--;)T.lens[T.have++]=M}}if(T.mode===30)break;if(T.lens[256]===0){B.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,z={bits:T.lenbits},Q=d(m,T.lens,0,T.nlen,T.lencode,0,T.work,z),T.lenbits=z.bits,Q){B.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,z={bits:T.distbits},Q=d(u,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,z),T.distbits=z.bits,Q){B.msg="invalid distances set",T.mode=30;break}if(T.mode=20,k===6)break e;case 20:T.mode=21;case 21:if(6<=ie&&258<=fe){B.next_out=se,B.avail_out=fe,B.next_in=W,B.avail_in=ie,T.hold=J,T.bits=K,c(B,oe),se=B.next_out,Z=B.output,fe=B.avail_out,W=B.next_in,V=B.input,ie=B.avail_in,J=T.hold,K=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;me=(O=T.lencode[J&(1<<T.lenbits)-1])>>>16&255,ve=65535&O,!((le=O>>>24)<=K);){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(me&&!(240&me)){for(ye=le,U=me,$=ve;me=(O=T.lencode[$+((J&(1<<ye+U)-1)>>ye)])>>>16&255,ve=65535&O,!(ye+(le=O>>>24)<=K);){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}J>>>=ye,K-=ye,T.back+=ye}if(J>>>=le,K-=le,T.back+=le,T.length=ve,me===0){T.mode=26;break}if(32&me){T.back=-1,T.mode=12;break}if(64&me){B.msg="invalid literal/length code",T.mode=30;break}T.extra=15&me,T.mode=22;case 22:if(T.extra){for(F=T.extra;K<F;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}T.length+=J&(1<<T.extra)-1,J>>>=T.extra,K-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;me=(O=T.distcode[J&(1<<T.distbits)-1])>>>16&255,ve=65535&O,!((le=O>>>24)<=K);){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(!(240&me)){for(ye=le,U=me,$=ve;me=(O=T.distcode[$+((J&(1<<ye+U)-1)>>ye)])>>>16&255,ve=65535&O,!(ye+(le=O>>>24)<=K);){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}J>>>=ye,K-=ye,T.back+=ye}if(J>>>=le,K-=le,T.back+=le,64&me){B.msg="invalid distance code",T.mode=30;break}T.offset=ve,T.extra=15&me,T.mode=24;case 24:if(T.extra){for(F=T.extra;K<F;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}T.offset+=J&(1<<T.extra)-1,J>>>=T.extra,K-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){B.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(fe===0)break e;if(Y=oe-fe,T.offset>Y){if((Y=T.offset-Y)>T.whave&&T.sane){B.msg="invalid distance too far back",T.mode=30;break}ae=Y>T.wnext?(Y-=T.wnext,T.wsize-Y):T.wnext-Y,Y>T.length&&(Y=T.length),de=T.window}else de=Z,ae=se-T.offset,Y=T.length;for(fe<Y&&(Y=fe),fe-=Y,T.length-=Y;Z[se++]=de[ae++],--Y;);T.length===0&&(T.mode=21);break;case 26:if(fe===0)break e;Z[se++]=T.length,fe--,T.mode=21;break;case 27:if(T.wrap){for(;K<32;){if(ie===0)break e;ie--,J|=V[W++]<<K,K+=8}if(oe-=fe,B.total_out+=oe,T.total+=oe,oe&&(B.adler=T.check=T.flags?l(T.check,Z,oe,se-oe):a(T.check,Z,oe,se-oe)),oe=fe,(T.flags?J:x(J))!==T.check){B.msg="incorrect data check",T.mode=30;break}K=J=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;K<32;){if(ie===0)break e;ie--,J+=V[W++]<<K,K+=8}if(J!==(4294967295&T.total)){B.msg="incorrect length check",T.mode=30;break}K=J=0}T.mode=29;case 29:Q=1;break e;case 30:Q=-3;break e;case 31:return-4;case 32:default:return b}return B.next_out=se,B.avail_out=fe,B.next_in=W,B.avail_in=ie,T.hold=J,T.bits=K,(T.wsize||oe!==B.avail_out&&T.mode<30&&(T.mode<27||k!==4))&&G(B,B.output,B.next_out,oe-B.avail_out)?(T.mode=31,-4):(be-=B.avail_in,oe-=B.avail_out,B.total_in+=be,B.total_out+=oe,T.total+=oe,T.wrap&&oe&&(B.adler=T.check=T.flags?l(T.check,Z,oe,B.next_out-oe):a(T.check,Z,oe,B.next_out-oe)),B.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(be==0&&oe===0||k===4)&&Q===g&&(Q=-5),Q)},r.inflateEnd=function(B){if(!B||!B.state)return b;var k=B.state;return k.window&&(k.window=null),B.state=null,g},r.inflateGetHeader=function(B,k){var T;return B&&B.state&&2&(T=B.state).wrap?((T.head=k).done=!1,g):b},r.inflateSetDictionary=function(B,k){var T,V=k.length;return B&&B.state?(T=B.state).wrap!==0&&T.mode!==11?b:T.mode===11&&a(1,k,V,0)!==T.check?-3:G(B,k,V,V)?(T.mode=31,-4):(T.havedict=1,g):b},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,s,r){var o=t("../utils/common"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],d=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];s.exports=function(m,u,g,b,y,S,v,x){var A,E,w,_,C,P,I,R,N,G=x.bits,B=0,k=0,T=0,V=0,Z=0,W=0,se=0,ie=0,fe=0,J=0,K=null,be=0,oe=new o.Buf16(16),Y=new o.Buf16(16),ae=null,de=0;for(B=0;B<=15;B++)oe[B]=0;for(k=0;k<b;k++)oe[u[g+k]]++;for(Z=G,V=15;1<=V&&oe[V]===0;V--);if(V<Z&&(Z=V),V===0)return y[S++]=20971520,y[S++]=20971520,x.bits=1,0;for(T=1;T<V&&oe[T]===0;T++);for(Z<T&&(Z=T),B=ie=1;B<=15;B++)if(ie<<=1,(ie-=oe[B])<0)return-1;if(0<ie&&(m===0||V!==1))return-1;for(Y[1]=0,B=1;B<15;B++)Y[B+1]=Y[B]+oe[B];for(k=0;k<b;k++)u[g+k]!==0&&(v[Y[u[g+k]]++]=k);if(P=m===0?(K=ae=v,19):m===1?(K=a,be-=257,ae=l,de-=257,256):(K=c,ae=d,-1),B=T,C=S,se=k=J=0,w=-1,_=(fe=1<<(W=Z))-1,m===1&&852<fe||m===2&&592<fe)return 1;for(;;){for(I=B-se,N=v[k]<P?(R=0,v[k]):v[k]>P?(R=ae[de+v[k]],K[be+v[k]]):(R=96,0),A=1<<B-se,T=E=1<<W;y[C+(J>>se)+(E-=A)]=I<<24|R<<16|N|0,E!==0;);for(A=1<<B-1;J&A;)A>>=1;if(A!==0?(J&=A-1,J+=A):J=0,k++,--oe[B]==0){if(B===V)break;B=u[g+v[k]]}if(Z<B&&(J&_)!==w){for(se===0&&(se=Z),C+=T,ie=1<<(W=B-se);W+se<V&&!((ie-=oe[W+se])<=0);)W++,ie<<=1;if(fe+=1<<W,m===1&&852<fe||m===2&&592<fe)return 1;y[w=J&_]=Z<<24|W<<16|C-S|0}}return J!==0&&(y[C+J]=B-se<<24|64<<16|0),x.bits=Z,0}},{"../utils/common":41}],51:[function(t,s,r){s.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,s,r){var o=t("../utils/common"),a=0,l=1;function c(O){for(var H=O.length;0<=--H;)O[H]=0}var d=0,m=29,u=256,g=u+1+m,b=30,y=19,S=2*g+1,v=15,x=16,A=7,E=256,w=16,_=17,C=18,P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(g+2));c(G);var B=new Array(2*b);c(B);var k=new Array(512);c(k);var T=new Array(256);c(T);var V=new Array(m);c(V);var Z,W,se,ie=new Array(b);function fe(O,H,ne,ee,te){this.static_tree=O,this.extra_bits=H,this.extra_base=ne,this.elems=ee,this.max_length=te,this.has_stree=O&&O.length}function J(O,H){this.dyn_tree=O,this.max_code=0,this.stat_desc=H}function K(O){return O<256?k[O]:k[256+(O>>>7)]}function be(O,H){O.pending_buf[O.pending++]=255&H,O.pending_buf[O.pending++]=H>>>8&255}function oe(O,H,ne){O.bi_valid>x-ne?(O.bi_buf|=H<<O.bi_valid&65535,be(O,O.bi_buf),O.bi_buf=H>>x-O.bi_valid,O.bi_valid+=ne-x):(O.bi_buf|=H<<O.bi_valid&65535,O.bi_valid+=ne)}function Y(O,H,ne){oe(O,ne[2*H],ne[2*H+1])}function ae(O,H){for(var ne=0;ne|=1&O,O>>>=1,ne<<=1,0<--H;);return ne>>>1}function de(O,H,ne){var ee,te,ce=new Array(v+1),he=0;for(ee=1;ee<=v;ee++)ce[ee]=he=he+ne[ee-1]<<1;for(te=0;te<=H;te++){var re=O[2*te+1];re!==0&&(O[2*te]=ae(ce[re]++,re))}}function le(O){var H;for(H=0;H<g;H++)O.dyn_ltree[2*H]=0;for(H=0;H<b;H++)O.dyn_dtree[2*H]=0;for(H=0;H<y;H++)O.bl_tree[2*H]=0;O.dyn_ltree[2*E]=1,O.opt_len=O.static_len=0,O.last_lit=O.matches=0}function me(O){8<O.bi_valid?be(O,O.bi_buf):0<O.bi_valid&&(O.pending_buf[O.pending++]=O.bi_buf),O.bi_buf=0,O.bi_valid=0}function ve(O,H,ne,ee){var te=2*H,ce=2*ne;return O[te]<O[ce]||O[te]===O[ce]&&ee[H]<=ee[ne]}function ye(O,H,ne){for(var ee=O.heap[ne],te=ne<<1;te<=O.heap_len&&(te<O.heap_len&&ve(H,O.heap[te+1],O.heap[te],O.depth)&&te++,!ve(H,ee,O.heap[te],O.depth));)O.heap[ne]=O.heap[te],ne=te,te<<=1;O.heap[ne]=ee}function U(O,H,ne){var ee,te,ce,he,re=0;if(O.last_lit!==0)for(;ee=O.pending_buf[O.d_buf+2*re]<<8|O.pending_buf[O.d_buf+2*re+1],te=O.pending_buf[O.l_buf+re],re++,ee===0?Y(O,te,H):(Y(O,(ce=T[te])+u+1,H),(he=P[ce])!==0&&oe(O,te-=V[ce],he),Y(O,ce=K(--ee),ne),(he=I[ce])!==0&&oe(O,ee-=ie[ce],he)),re<O.last_lit;);Y(O,E,H)}function $(O,H){var ne,ee,te,ce=H.dyn_tree,he=H.stat_desc.static_tree,re=H.stat_desc.has_stree,ge=H.stat_desc.elems,xe=-1;for(O.heap_len=0,O.heap_max=S,ne=0;ne<ge;ne++)ce[2*ne]!==0?(O.heap[++O.heap_len]=xe=ne,O.depth[ne]=0):ce[2*ne+1]=0;for(;O.heap_len<2;)ce[2*(te=O.heap[++O.heap_len]=xe<2?++xe:0)]=1,O.depth[te]=0,O.opt_len--,re&&(O.static_len-=he[2*te+1]);for(H.max_code=xe,ne=O.heap_len>>1;1<=ne;ne--)ye(O,ce,ne);for(te=ge;ne=O.heap[1],O.heap[1]=O.heap[O.heap_len--],ye(O,ce,1),ee=O.heap[1],O.heap[--O.heap_max]=ne,O.heap[--O.heap_max]=ee,ce[2*te]=ce[2*ne]+ce[2*ee],O.depth[te]=(O.depth[ne]>=O.depth[ee]?O.depth[ne]:O.depth[ee])+1,ce[2*ne+1]=ce[2*ee+1]=te,O.heap[1]=te++,ye(O,ce,1),2<=O.heap_len;);O.heap[--O.heap_max]=O.heap[1],function(ue,Ae){var Ee,_e,Te,Pe,Ce,Ie,Re=Ae.dyn_tree,qe=Ae.max_code,bt=Ae.stat_desc.static_tree,Ue=Ae.stat_desc.has_stree,ht=Ae.stat_desc.extra_bits,nt=Ae.stat_desc.extra_base,Qe=Ae.stat_desc.max_length,ze=0;for(Pe=0;Pe<=v;Pe++)ue.bl_count[Pe]=0;for(Re[2*ue.heap[ue.heap_max]+1]=0,Ee=ue.heap_max+1;Ee<S;Ee++)Qe<(Pe=Re[2*Re[2*(_e=ue.heap[Ee])+1]+1]+1)&&(Pe=Qe,ze++),Re[2*_e+1]=Pe,qe<_e||(ue.bl_count[Pe]++,Ce=0,nt<=_e&&(Ce=ht[_e-nt]),Ie=Re[2*_e],ue.opt_len+=Ie*(Pe+Ce),Ue&&(ue.static_len+=Ie*(bt[2*_e+1]+Ce)));if(ze!==0){do{for(Pe=Qe-1;ue.bl_count[Pe]===0;)Pe--;ue.bl_count[Pe]--,ue.bl_count[Pe+1]+=2,ue.bl_count[Qe]--,ze-=2}while(0<ze);for(Pe=Qe;Pe!==0;Pe--)for(_e=ue.bl_count[Pe];_e!==0;)qe<(Te=ue.heap[--Ee])||(Re[2*Te+1]!==Pe&&(ue.opt_len+=(Pe-Re[2*Te+1])*Re[2*Te],Re[2*Te+1]=Pe),_e--)}}(O,H),de(ce,xe,O.bl_count)}function M(O,H,ne){var ee,te,ce=-1,he=H[1],re=0,ge=7,xe=4;for(he===0&&(ge=138,xe=3),H[2*(ne+1)+1]=65535,ee=0;ee<=ne;ee++)te=he,he=H[2*(ee+1)+1],++re<ge&&te===he||(re<xe?O.bl_tree[2*te]+=re:te!==0?(te!==ce&&O.bl_tree[2*te]++,O.bl_tree[2*w]++):re<=10?O.bl_tree[2*_]++:O.bl_tree[2*C]++,ce=te,xe=(re=0)===he?(ge=138,3):te===he?(ge=6,3):(ge=7,4))}function Q(O,H,ne){var ee,te,ce=-1,he=H[1],re=0,ge=7,xe=4;for(he===0&&(ge=138,xe=3),ee=0;ee<=ne;ee++)if(te=he,he=H[2*(ee+1)+1],!(++re<ge&&te===he)){if(re<xe)for(;Y(O,te,O.bl_tree),--re!=0;);else te!==0?(te!==ce&&(Y(O,te,O.bl_tree),re--),Y(O,w,O.bl_tree),oe(O,re-3,2)):re<=10?(Y(O,_,O.bl_tree),oe(O,re-3,3)):(Y(O,C,O.bl_tree),oe(O,re-11,7));ce=te,xe=(re=0)===he?(ge=138,3):te===he?(ge=6,3):(ge=7,4)}}c(ie);var z=!1;function F(O,H,ne,ee){oe(O,(d<<1)+(ee?1:0),3),function(te,ce,he,re){me(te),re&&(be(te,he),be(te,~he)),o.arraySet(te.pending_buf,te.window,ce,he,te.pending),te.pending+=he}(O,H,ne,!0)}r._tr_init=function(O){z||(function(){var H,ne,ee,te,ce,he=new Array(v+1);for(te=ee=0;te<m-1;te++)for(V[te]=ee,H=0;H<1<<P[te];H++)T[ee++]=te;for(T[ee-1]=te,te=ce=0;te<16;te++)for(ie[te]=ce,H=0;H<1<<I[te];H++)k[ce++]=te;for(ce>>=7;te<b;te++)for(ie[te]=ce<<7,H=0;H<1<<I[te]-7;H++)k[256+ce++]=te;for(ne=0;ne<=v;ne++)he[ne]=0;for(H=0;H<=143;)G[2*H+1]=8,H++,he[8]++;for(;H<=255;)G[2*H+1]=9,H++,he[9]++;for(;H<=279;)G[2*H+1]=7,H++,he[7]++;for(;H<=287;)G[2*H+1]=8,H++,he[8]++;for(de(G,g+1,he),H=0;H<b;H++)B[2*H+1]=5,B[2*H]=ae(H,5);Z=new fe(G,P,u+1,g,v),W=new fe(B,I,0,b,v),se=new fe(new Array(0),R,0,y,A)}(),z=!0),O.l_desc=new J(O.dyn_ltree,Z),O.d_desc=new J(O.dyn_dtree,W),O.bl_desc=new J(O.bl_tree,se),O.bi_buf=0,O.bi_valid=0,le(O)},r._tr_stored_block=F,r._tr_flush_block=function(O,H,ne,ee){var te,ce,he=0;0<O.level?(O.strm.data_type===2&&(O.strm.data_type=function(re){var ge,xe=4093624447;for(ge=0;ge<=31;ge++,xe>>>=1)if(1&xe&&re.dyn_ltree[2*ge]!==0)return a;if(re.dyn_ltree[18]!==0||re.dyn_ltree[20]!==0||re.dyn_ltree[26]!==0)return l;for(ge=32;ge<u;ge++)if(re.dyn_ltree[2*ge]!==0)return l;return a}(O)),$(O,O.l_desc),$(O,O.d_desc),he=function(re){var ge;for(M(re,re.dyn_ltree,re.l_desc.max_code),M(re,re.dyn_dtree,re.d_desc.max_code),$(re,re.bl_desc),ge=y-1;3<=ge&&re.bl_tree[2*N[ge]+1]===0;ge--);return re.opt_len+=3*(ge+1)+5+5+4,ge}(O),te=O.opt_len+3+7>>>3,(ce=O.static_len+3+7>>>3)<=te&&(te=ce)):te=ce=ne+5,ne+4<=te&&H!==-1?F(O,H,ne,ee):O.strategy===4||ce===te?(oe(O,2+(ee?1:0),3),U(O,G,B)):(oe(O,4+(ee?1:0),3),function(re,ge,xe,ue){var Ae;for(oe(re,ge-257,5),oe(re,xe-1,5),oe(re,ue-4,4),Ae=0;Ae<ue;Ae++)oe(re,re.bl_tree[2*N[Ae]+1],3);Q(re,re.dyn_ltree,ge-1),Q(re,re.dyn_dtree,xe-1)}(O,O.l_desc.max_code+1,O.d_desc.max_code+1,he+1),U(O,O.dyn_ltree,O.dyn_dtree)),le(O),ee&&me(O)},r._tr_tally=function(O,H,ne){return O.pending_buf[O.d_buf+2*O.last_lit]=H>>>8&255,O.pending_buf[O.d_buf+2*O.last_lit+1]=255&H,O.pending_buf[O.l_buf+O.last_lit]=255&ne,O.last_lit++,H===0?O.dyn_ltree[2*ne]++:(O.matches++,H--,O.dyn_ltree[2*(T[ne]+u+1)]++,O.dyn_dtree[2*K(H)]++),O.last_lit===O.lit_bufsize-1},r._tr_align=function(O){oe(O,2,3),Y(O,E,G),function(H){H.bi_valid===16?(be(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):8<=H.bi_valid&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)}(O)}},{"../utils/common":41}],53:[function(t,s,r){s.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,s,r){s.exports=typeof setImmediate=="function"?setImmediate:function(){var o=[].slice.apply(arguments);o.splice(1,0,0),setTimeout.apply(null,o)}},{}]},{},[10])(10)})})(jszip_min);class MXLHelper{static MXLtoIXmlElement(e){const t=new jszip_minExports;return t.loadAsync(e).then(o=>t.file("META-INF/container.xml").async("text"),o=>{throw o}).then(o=>{const c=new DOMParser().parseFromString(o,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return t.file(c).async("text")},o=>{throw o}).then(o=>{const l=new DOMParser().parseFromString(o,"text/xml"),c=new IXmlElement(l.documentElement);return Promise.resolve(c)},o=>{throw o}).then(o=>o,o=>{throw new Error("extractSheetFromMxl: "+o.message)})}static MXLtoXMLstring(e){const t=new jszip_minExports;return t.loadAsync(e).then(s=>t.file("META-INF/container.xml").async("text"),s=>{throw loglevelExports.error(s),s}).then(s=>{const a=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return t.file(a).async("text")},s=>{throw s})}}class PlaybackNoteGenerator{calculate(e){const t=new MusicPartManagerIterator(e);for(;!t.EndReached;){const s=t.CurrentEnrolledTimestamp,r=t.CurrentAudibleVoiceEntries();for(const o of r)this.handleVoiceEntry(e,o,s);t.moveToNext()}}handleVoiceEntry(e,t,s){if(t.IsGrace)return;const r=t.ParentVoice;let o;e.PlaybackDataDict.containsKey(r)?o=e.PlaybackDataDict.getValue(r):(o=[],e.PlaybackDataDict.setValue(r,o));for(const a of t.PlaybackEntries)if(a.HasNotes){for(const c of a.Notes)c.setLength();const l=Fraction$1.plus(s,a.TimestampShift);PlaybackNoteGenerator.addEntrySorted(o,a,l)}}static addEntrySorted(e,t,s){if(e.length===0)e.push({enrolledTimestamp:s,playbackEntry:t});else for(let r=e.length-1;r>=0;r--){const o=e[r];if(s.RealValue>o.enrolledTimestamp.RealValue)if(r===e.length-1){e.push({enrolledTimestamp:s,playbackEntry:t});break}else{e.splice(r+1,0,{enrolledTimestamp:s,playbackEntry:t});break}}}}class ScreenViewingRegion{constructor(e,t,s,r){this.psi=new BoundingBox$1(void 0),this.displaySizeInPixel=e,this.RelativeDisplaySize=t,this.RelativeDisplayPosition=s,this.WidthInUnits=r}static createWithRelativeDefaults(e,t){return new ScreenViewingRegion(e,new SizeF2D(1,1),new PointF2D(0,0),t)}static createWithDefaults(){return new ScreenViewingRegion(new SizeF2D(1,1),new SizeF2D(1,1),new PointF2D(0,0),1)}get UpperLeftPositionInUnits(){return this.psi.AbsolutePosition}set UpperLeftPositionInUnits(e){this.psi.AbsolutePosition=e}get DisplaySizeInPixel(){return this.displaySizeInPixel}set DisplaySizeInPixel(e){this.displaySizeInPixel=e,this.regionSizeInPixel=new SizeF2D(this.displaySizeInPixel.width*this.relativeRegionSize.width,this.displaySizeInPixel.height*this.relativeRegionSize.height),this.recalculateDependentVariables()}get RelativeDisplaySize(){return this.relativeRegionSize}set RelativeDisplaySize(e){this.relativeRegionSize=e,this.regionSizeInPixel=new 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(e){this.psi.BorderRight=e,this.recalculateDependentVariables()}get ViewRegionInUnits(){return new SizeF2D(this.psi.BorderRight,this.psi.BorderBottom)}isVisible(e,t){const s=this.psi.collisionDetection(e);return this.psi.liesInsideBorders(e),s}isInsideDisplayArea(e,t){return this.RelativeDisplayPosition.x<=e&&e<=this.RelativeDisplayPosition.x+this.RelativeDisplaySize.width&&this.RelativeDisplayPosition.y<=t&&t<=this.RelativeDisplayPosition.y+this.RelativeDisplaySize.height}transformToUnitCoordinates(e){return new PointF2D(this.UpperLeftPositionInUnits.x+this.ViewRegionInUnits.width*((e.x-this.RelativeDisplayPosition.x)/this.RelativeDisplaySize.width),this.UpperLeftPositionInUnits.y+this.ViewRegionInUnits.height*((e.y-this.RelativeDisplayPosition.y)/this.RelativeDisplaySize.height))}transformLengthXToUnitCoordinates(e){return e/this.horizontalUnitToPixelRatio}transformLengthYToUnitCoordinates(e){return e/this.verticalUnitToPixelRatio}recalculateDependentVariables(){const e=this.regionSizeInPixel.width/this.regionSizeInPixel.height;this.psi.BorderBottom=this.psi.BorderRight/e,this.horizontalUnitToPixelRatio=this.regionSizeInPixel.width/this.ViewRegionInUnits.width,this.verticalUnitToPixelRatio=this.regionSizeInPixel.height/this.ViewRegionInUnits.height}}class AbstractZoomView{constructor(e){this.aspectRatio=1,this.zoomViews=[],this.mouseZoomMode=!1,this.autoScrollY=!0,this.displayInteractionManager=e,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(e,t){if(!this.convertToUnitsReady())return;const s=this.getPositionInUnits(e,t);this.unitPosTouched(s,e,t)}get TouchActive(){return this.displayInteractionManager.TouchActive}get TouchMoving(){return this.displayInteractionManager.TouchMoving}positionDoubleTouched(e,t){if(!this.convertToUnitsReady())return;const s=this.getPositionInUnits(e,t);this.unitPosDoubleTouched(s,e,t)}get UsesManuallyControlledZoomMode(){return this.usesManuallyControlledZoomMode}set UsesManuallyControlledZoomMode(e){this.usesManuallyControlledZoomMode=e}mouseDown(e,t,s=!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 r=this.getPositionInUnits(e,t);this.unitPosTouchDown(r,e,t),this.usesManuallyControlledZoomMode||(s?this.mouseZoomMode=!0:this.mouseZoomMode=!1)}mouseUp(e,t){const s=this.getPositionInUnits(e,t);this.unitPosTouchUp(s,e,t)}mouseMove(e,t,s,r){this.mouseZoomMode?(Math.abs(s-0)>1e-8&&(this.RangeX=Math.abs(this.lastRangeX/(1+s))),!this.lockRanges&&Math.abs(r-0)>1e-8&&(this.RangeY=Math.abs(this.lastRangeY/(1-r)))):(Math.abs(s-0)>1e-8&&(this.OffsetX=this.lastOffsetX-s*this.RangeX),Math.abs(r-0)>1e-8&&(this.OffsetY=this.lastOffsetY-r*this.RangeY));const o=this.getPositionInUnits(e,t);this.unitPosMove(o,e,t)}zoom(e){this.RangeX=Math.abs(this.lastRangeX/e)}addZoomView(e){this.zoomViews.push(e)}get OffsetX(){return this.offsetX}set OffsetX(e){this.offsetX=Math.min(this.offsetXMax,Math.max(this.offsetXMin,e));for(const t of this.zoomViews)t.viewportXChanged(this.offsetX,this.RangeX)}get OffsetY(){return this.offsetY}set OffsetY(e){this.offsetY=e,this.offsetY>this.offsetYMax?this.offsetY=this.offsetYMax:this.offsetY<this.offsetYMin&&(this.offsetY=this.offsetYMin);for(const t of this.zoomViews)t.viewportYChanged(this.offsetY,this.RangeY)}get RangeX(){return this.rangeX}set RangeX(e){if(this.rangeX=Math.min(this.rangeXMax,Math.max(this.rangeXMin,e)),this.lockRanges){this.RangeY=this.RangeX/this.aspectRatio;for(const t of this.zoomViews)t.viewportXChanged(this.OffsetX,this.RangeX),t.viewportYChanged(this.OffsetY,this.RangeY)}else for(const t of this.zoomViews)t.viewportXChanged(this.OffsetX,this.RangeX)}get RangeY(){return this.rangeY}set RangeY(e){this.rangeY=Math.min(this.rangeYMax,Math.max(this.rangeYMin,e));for(const t of this.zoomViews)t.viewportYChanged(this.OffsetY,this.RangeY)}set AspectRatio(e){this.aspectRatio=e}initialize(e,t,s,r){this.setVerticalViewport(s,r),this.setHorizontalViewport(e,t)}setHorizontalViewport(e,t){this.RangeX=t,this.OffsetX=e,this.lastRangeX=this.RangeX,this.lastOffsetX=this.OffsetX}setVerticalViewport(e,t){this.RangeY=t,this.OffsetY=e,this.lastRangeY=this.RangeY,this.lastOffsetY=this.OffsetY}viewSizeChanged(e,t){this.lockRanges&&(this.aspectRatio=e/t,this.RangeY=this.RangeX/this.aspectRatio,this.lastRangeY=this.RangeY)}outputChanged(e,t,s){this.OffsetY=t}setOffsetXValueOnly(e){this.offsetX=Math.min(this.offsetXMax,Math.max(this.offsetXMin,e))}setXOffset(e,t){this.displayInteractionManager.TouchActive||this.XScrollingEnabled}setOffsetYValueOnly(e){this.offsetY=Math.min(this.offsetYMax,Math.max(this.offsetYMin,e))}setYOffset(e,t){this.displayInteractionManager.TouchActive||!this.YScrollingEnabled||t&&this.selectScrollControllerY(!0)}selectScrollControllerY(e){this.autoScrollY!==e&&(this.autoScrollY=e)}displaySizeChanged(e,t){throw new Error("Method not implemented.")}}var InteractionType=(i=>(i[i.SingleTouch=0]="SingleTouch",i[i.DoubleTouch=1]="DoubleTouch",i[i.TouchUp=2]="TouchUp",i[i.TouchDown=3]="TouchDown",i[i.Move=4]="Move",i))(InteractionType||{});class VoiceEntryInteractionListener{constructor(e){this.renderingManager=e}userDisplayInteraction(e,t,s){var r,o;switch(s){case InteractionType.TouchDown:case InteractionType.SingleTouch:case InteractionType.DoubleTouch:{const a=this.renderingManager.GraphicalMusicSheet.GetNearestVoiceEntry(t);a&&a.parentStaffEntry.parentVerticalContainer!==void 0&&((r=a.notes[0])==null?void 0:r.sourceNote.Pitch)!==void 0&&((o=this.renderingManager.PlaybackManager)==null||o.playVoiceEntry(a.parentVoiceEntry));break}}}}class SheetRenderingManager extends AbstractZoomView{constructor(e,t){super(e),this.mainViewingRegion=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=t,this.addZoomView(this),this.lockRanges=!0,this.TopBarHeightInPixel=70,this.BottomBarHeightInPixel=0,this.rules.UseDefaultVoiceInteractionListener&&this.listeners.push(new VoiceEntryInteractionListener(this))}addListener(e){this.listeners.push(e)}get Listeners(){return this.listeners}convertToUnitsReady(){return this.graphicalMusicSheet!==void 0}unitPosTouched(e,t,s){if(!this.SingleTouchDisabled){const r=new PointF2D(t,s);this.handleUserDisplayInteraction(r,e,InteractionType.SingleTouch)}}unitPosDoubleTouched(e,t,s){if(!this.DoubleTouchDisabled){const r=new PointF2D(t,s);this.handleUserDisplayInteraction(r,e,InteractionType.DoubleTouch)}}unitPosTouchDown(e,t,s){const r=new PointF2D(t,s);this.handleUserDisplayInteraction(r,e,InteractionType.TouchDown),this.yOffsetMouseDown=e.y}unitPosTouchUp(e,t,s){const r=new PointF2D(t,s);this.handleUserDisplayInteraction(r,e,InteractionType.TouchUp),this.displayInteractionManager.WasZoomGestureActive===!1&&this.unlockFromCursorIfNecessary(e),this.yOffsetMouseDown=Number.MIN_VALUE}unitPosMove(e,t,s){const r=new PointF2D(t,s);this.handleUserDisplayInteraction(r,e,InteractionType.Move),this.unlockFromCursorIfNecessary(e)}get MainViewingRegion(){return this.mainViewingRegion}setMusicSheet(e){this.graphicalMusicSheet=e,this.adaptDisplayLimitsToSheet(),this.setYOffset(0,!0)}viewportXChanged(e,t){this.graphicalMusicSheet!==void 0&&this.horizontalViewportChanged(e,t)}viewportYChanged(e,t){this.graphicalMusicSheet!==void 0&&(this.yOffsetMouseDown<=Number.MIN_VALUE+.5&&(this.yOffsetMouseDown=e),this.verticalViewportChanged(e,t))}displaySizeChanged(e,t){super.viewSizeChanged(e,t),!(Math.abs(e-0)<1e-7||Math.abs(t-0)<1e-7)&&(this.graphicalMusicSheet!==void 0&&this.graphicalMusicSheet.EnforceRedrawOfMusicSystems(),this.mainViewingRegion.DisplaySizeInPixel=new SizeF2D(e,t),this.adaptDisplayLimitsToSheet())}calcDisplayYPosition(e){return e.PositionAndShape.AbsolutePosition.y+e.PositionAndShape.BorderMarginTop-this.topBarHeightInUnits()-this.relativeTopPosition*this.heightWithoutTopBottomBarsInUnits()}yPositionForLastSystem(e){return e.PositionAndShape.AbsolutePosition.y+e.PositionAndShape.BorderMarginBottom-this.topBarHeightInUnits()-(1-this.relativeTopPosition)*this.heightWithoutTopBottomBarsInUnits()}scorePositionChanged(e,t,s,r,o,a){const l=this.calcDisplayYPosition(r);this.setYPosition(l,a)}setXPosition(e,t){this.LockDisplayToCursor&&this.setXOffset(e,t)}setYPosition(e,t){this.LockDisplayToCursor&&this.setYOffset(e,t)}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(e,t){return this.mainViewingRegion.transformToUnitCoordinates(new PointF2D(e,t))}graphicalObjectIsVisible(e){return this.mainViewingRegion.isVisible(e,!1)}adaptDisplayLimitsToSheet(){if(this.graphicalMusicSheet===void 0||this.graphicalMusicSheet.MusicPages.length===0||this.graphicalMusicSheet.MusicPages[0].MusicSystems.length===0)return;this.offsetXMin=0,this.rangeXMin=this.graphicalMusicSheet.MinAllowedSystemWidth,this.rangeXMax=300,this.offsetYMin=-.3*this.RangeY;const e=this.graphicalMusicSheet.MusicPages.last().PositionAndShape;this.offsetYMax=Math.max(0,e.BorderMarginBottom-.7*this.RangeY),this.OffsetY>this.offsetYMax&&this.setYOffset(this.offsetYMax,!0)}horizontalViewportChanged(e,t){this.mainViewingRegion.WidthInUnits!==t&&(this.mainViewingRegion.WidthInUnits=t)}verticalViewportChanged(e,t){this.mainViewingRegion.UpperLeftPositionInUnits=new PointF2D(this.mainViewingRegion.UpperLeftPositionInUnits.x,e)}unlockFromCursorIfNecessary(e){if(this.LockDisplayToCursor===!1||this.ZoomActive||this.displayInteractionManager.ZoomGestureActive||this.displayInteractionManager.WasZoomGestureActive)return;Math.abs((e.y-this.yOffsetMouseDown)*this.mainViewingRegion.RegionSizeInPixel.height/this.mainViewingRegion.ViewRegionInUnits.height)>this.unlockCursorDistancePixel&&(this.LockDisplayToCursor=!1)}getPositionInUnits(e,t){return this.mainViewingRegion.transformToUnitCoordinates(new PointF2D(e,t))}handleUserDisplayInteraction(e,t,s){switch(s){case InteractionType.TouchDown:case InteractionType.SingleTouch:case InteractionType.DoubleTouch:{const r=this.graphicalMusicSheet.GetNearestVoiceEntry(t);if(r){const o=new CustomEvent("note-click",{detail:{...r,setAvtivePlay:()=>{var a,l;if(r.parentStaffEntry.parentVerticalContainer!==void 0){const c=r.parentStaffEntry.parentVerticalContainer.AbsoluteTimestamp;this.setStartPosition(c),((a=r.notes[0])==null?void 0:a.sourceNote.Pitch)!==void 0&&(console.log("playback clicked note",r.parentVoiceEntry),(l=this.PlaybackManager)==null||l.playVoiceEntry(r.parentVoiceEntry))}}}});window.dispatchEvent(o)}}case InteractionType.TouchUp:case InteractionType.TouchDown:case InteractionType.Move:for(const r of this.listeners)r.userDisplayInteraction(e,t,s);break;default:throw new Error("type")}}setStartPosition(e){var t;this.graphicalMusicSheet!==void 0&&(this.graphicalMusicSheet.ParentMusicSheet.SelectionStart=e,(t=this.PlaybackManager)==null||t.reset())}get GraphicalMusicSheet(){return this.graphicalMusicSheet}}class WebSheetRenderingManager extends SheetRenderingManager{mouseMove(e,t,s,r){const o=this.getPositionInUnits(e,t);this.unitPosMove(o,e,t)}}class AbstractDisplayInteractionManager{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(e){this.listeners.push(e)}get ZoomGestureActive(){return this.zoomGestureActive}get WasZoomGestureActive(){return this.interactionWasZoomGesture}displaySizeChanged(e,t){this.displayWidth=e,this.displayHeight=t;for(const s of this.listeners)s.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(e,t,s){this.interactionWasZoomGesture=!1;const r=e/this.displayWidth,o=t/this.displayHeight;this.lastRelPosX=r,this.lastRelPosY=o,this.lastPixelX=e,this.lastPixelY=t,this.touchActive=!0,this.touchMoving=!1,this.touchCount=Math.min(this.touchCount+1,this.maxNumerOfFingers);for(const a of this.listeners)a.mouseDown(r,o,!s)}move(e,t){if(this.touchActive&&!this.zoomGestureActive){const s=e/this.displayWidth,r=t/this.displayHeight,o=s-this.lastRelPosX,a=r-this.lastRelPosY;this.touchMoving=!0;for(const l of this.listeners)l.mouseMove(s,r,o,a)}}zoomGestureStarted(){this.zoomGestureActive=!0}zoomGestureCompleted(){this.zoomGestureActive=!1,this.interactionWasZoomGesture=!0}zoomGestureMove(e){this.zoomGestureActive&&this.listeners.forEach(function(t){t.zoom(e)})}touchUp(e,t){this.touchActive=!1,this.touchMoving=!1,this.touchCount=Math.max(0,this.touchCount-1);const s=e/this.displayWidth,r=t/this.displayHeight;for(const o of this.listeners)o.mouseUp(s,r)}click(e,t){if(!this.mouseDidMove(this.lastPixelX,e,this.lastPixelY,t)&&!this.ZoomGestureActive){const s=e/this.displayWidth,r=t/this.displayHeight;for(const o of this.listeners)o.positionTouched(s,r)}}doubleClick(e,t){if(!this.mouseDidMove(this.lastPixelX,e,this.lastPixelY,t)&&!this.ZoomGestureActive){const s=e/this.displayWidth,r=t/this.displayHeight;for(const o of this.listeners)o.positionDoubleTouched(s,r)}}mouseDidMove(e,t,s,r){const o=Math.abs(e-t)/this.displayDpi,a=Math.abs(s-r)/this.displayDpi;return o>this.movementThreshInch||a>this.movementThreshInch}}class WebDisplayInteractionManager extends AbstractDisplayInteractionManager{constructor(e){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 Dictionary,this.DOUBLE_CLICK_WINDOW=200,this.lastClick=0,this.osmdSheetMusicContainer=e,this.listenForInteractions()}get FullOffsetTop(){return this.fullOffsetTop}get FullScrollTop(){return this.fullScrollTop}get FullOffsetLeft(){return this.fullOffsetLeft}get FullScrollLeft(){return this.fullScrollLeft}static resizeCallback(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(()=>{t.fullOffsetLeft=0,t.fullOffsetTop=0;let s=t.osmdSheetMusicContainer;for(;s;)t.fullOffsetLeft+=s.offsetLeft,t.fullOffsetTop+=s.offsetTop,s=s.offsetParent;t.resizeEventListener(),t.deregisterScrollOffsets(),t.registerScrollOffsets()},500)}registerScrollOffsets(){let e=this.osmdSheetMusicContainer;this.fullScrollTop=0,this.fullScrollLeft=0;const t=this;for(;e&&e!==document.documentElement;){if(this.parentScrollMap.set(e,[e.scrollTop,e.scrollLeft]),this.fullScrollLeft+=e.scrollLeft,this.fullScrollTop+=e.scrollTop,e.scrollHeight>e.clientHeight){const s=function(r){const o=t.parentScrollMap.get(this),a=o[0],l=o[1];t.fullScrollTop=t.fullScrollTop-a+this.scrollTop,t.fullScrollLeft=t.fullScrollLeft-l+this.scrollLeft,t.parentScrollMap.set(this,[this.scrollTop,this.scrollLeft])};this.scrollCallbackMap.set(e,s),e.addEventListener("scroll",s)}e=e.parentElement}}deregisterScrollOffsets(){for(const e of this.scrollCallbackMap.keys())e.removeEventListener("scroll",this.scrollCallbackMap.get(e));this.scrollCallbackMap.clear()}initialize(){this.fullOffsetLeft=0,this.fullOffsetTop=0;let e=this.osmdSheetMusicContainer;const t=[],s=this;for(window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(r=>{WebDisplayInteractionManager.resizeCallback(r,s)}));e;)this.fullOffsetLeft+=e.offsetLeft,this.fullOffsetTop+=e.offsetTop,this.resizeObserver?this.resizeObserver.observe(e):t.push(e),e=e.offsetParent;if(this.resizeObserver)this.disposeResizeListener=()=>{s.resizeObserver.disconnect(),s.resizeObserver=void 0};else{let r=()=>{WebDisplayInteractionManager.resizeCallback(t,s)};window.addEventListener("resize",r),this.disposeResizeListener=()=>{window.removeEventListener("resize",r),r=void 0}}s.registerScrollOffsets()}dispose(){this.disposeResizeListener();for(const e of this.EventCallbackMap.keys()){const t=this.EventCallbackMap.getValue(e);t[0].removeEventListener(e,t[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 e=this.downEventListener.bind(this),t=this.touchEndEventListener.bind(this),s=this.moveEventListener.bind(this);this.osmdSheetMusicContainer.addEventListener("mousedown",e),this.osmdSheetMusicContainer.addEventListener("touchend",t),document.addEventListener(this.moveEventName,s),this.EventCallbackMap.setValue("mousedown",[this.osmdSheetMusicContainer,e]),this.EventCallbackMap.setValue("touchend",[this.osmdSheetMusicContainer,t]),this.EventCallbackMap.setValue(this.moveEventName,[document,s])}downEventListener(e){const t=new Date().getTime(),s=t-this.lastClick;clearTimeout(this.clickTimeout);let r=0,o=0;this.isTouch()&&e instanceof TouchEvent?(r=e.touches[0].pageX,o=e.touches[0].pageY):e instanceof MouseEvent&&(r=e.pageX,o=e.pageY);const a=this.getOffsetCoordinates(r,o);if(s<this.DOUBLE_CLICK_WINDOW&&s>0)this.doubleClick(a.x,a.y);else{const l=this;this.clickTimeout=setTimeout(function(){clearTimeout(this.clickTimeout),l.isTouch()?l.touchDown(a.x,a.y,void 0):l.click(a.x,a.y)},this.DOUBLE_CLICK_WINDOW)}this.lastClick=t}moveEventListener(e){let t=0,s=0;if(this.isTouch()&&e instanceof TouchEvent){let o;e.touches&&e.touches.length>0?o=e.touches[0]:e.changedTouches&&e.changedTouches.length>0&&(o=e.changedTouches[0]),t=o==null?void 0:o.clientX,s=o==null?void 0:o.clientY}else e instanceof MouseEvent&&(t=e.clientX,s=e.clientY);const r=this.getOffsetCoordinates(t,s);this.move(r.x,r.y)}touchEndEventListener(e){let t;e.touches&&e.touches.length>0?t=e.touches[0]:e.changedTouches&&e.changedTouches.length>0&&(t=e.changedTouches[0]);const s=this.getOffsetCoordinates(t==null?void 0:t.pageX,t==null?void 0:t.pageY);this.touchUp(s.x,s.y)}resizeEventListener(){this.displaySizeChanged(this.osmdSheetMusicContainer.clientWidth,this.osmdSheetMusicContainer.clientHeight)}getOffsetCoordinates(e,t){const s=e-this.fullOffsetLeft+this.fullScrollLeft,r=t-this.fullOffsetTop+this.fullScrollTop;return new PointF2D(s,r)}}class DynamicsCalculator{static fillDynamicsList(e,t,s){for(let r=0;r<t.StaffLinkedExpressions.length;r++)for(let o=0,a=t.StaffLinkedExpressions[r].length;o<a;++o){const l=t.StaffLinkedExpressions[r][o];if(!(l.InstantaneousDynamic===void 0&&l.StartingContinuousDynamic===void 0)){if(l.StaffNumber=r,l.StartingContinuousDynamic!==void 0&&l.StartingContinuousDynamic.isWedge()&&l.StartingContinuousDynamic.EndMultiExpression!==void 0){const c=l.AbsoluteTimestamp,d=l.StartingContinuousDynamic.EndMultiExpression.AbsoluteTimestamp;if(c.Equals(d))continue}if(l.InstantaneousDynamic!==void 0){s[r].push(new DynamicsContainer(l.InstantaneousDynamic,l.StaffNumber));const c=this.getOtherStaffIndexIfLinkedStavesAreDetected(e,r,l.InstantaneousDynamic.Placement);c>=0&&s[c].push(new DynamicsContainer(l.InstantaneousDynamic,c))}if(l.StartingContinuousDynamic!==void 0){s[r].push(new DynamicsContainer(l.StartingContinuousDynamic,l.StaffNumber));const c=this.getOtherStaffIndexIfLinkedStavesAreDetected(e,r,l.StartingContinuousDynamic.Placement);c>=0&&s[c].push(new DynamicsContainer(l.StartingContinuousDynamic,c))}}}}static getOtherStaffIndexIfLinkedStavesAreDetected(e,t,s){const r=e.getStaffFromIndex(t),o=r.ParentInstrument.Staves.indexOf(r),a=r.ParentInstrument.Staves.length;return a>1&&o===0&&s===PlacementEnum.Below?t+1:a>1&&o===1&&s===PlacementEnum.Above?t-1:-1}static fillDynamicExpressions(e){const t=e.DynListStaves,s=e.getCompleteNumberOfStaves(),r=e.TimestampSortedDynamicExpressionsList;for(let o=0;o<s;o++)t.push([]);for(let o=0,a=e.SourceMeasures.length;o<a;++o){const l=e.SourceMeasures[o];DynamicsCalculator.fillDynamicsList(e,l,t)}for(let o=0;o<t.length;o++)for(let a=0,l=t[o].length;a<l;++a){const c=t[o][a];c.instantaneousDynamicExpression!==void 0&&!InstantaneousDynamicExpression.dynamicToRelativeVolumeDict.containsKey(c.instantaneousDynamicExpression.DynEnum)||r.push(c)}r.sort(DynamicsContainer.Compare)}calculate(e){DynamicsCalculator.fillDynamicExpressions(e)}}const _OpenSheetMusicDisplay=class{constructor(i,e=OSMDOptions.OSMDOptionsStandard(),t=new EngravingRules){if(this.version="1.4.5-audio-extended",this.cursorsOptions=[],this.cursors=[],this.zoom=1,this.zoomUpdated=!1,this.loadUrlTimeout=5e3,this.rules=t,typeof i=="string"?this.container=document.getElementById(i):i&&"appendChild"in i&&(this.container=i),!this.container)throw new Error("Please pass a valid div container to OpenSheetMusicDisplay");e.autoResize===void 0&&(e.autoResize=!0),this.backendType=BackendType.SVG,this.setOptions(e),this.interactionManager=new WebDisplayInteractionManager(this.container),this.renderingManager=new WebSheetRenderingManager(this.interactionManager,this.rules)}get cursor(){return this.cursors[0]}get RenderingManager(){return this.renderingManager}set PlaybackManager(i){this.renderingManager&&(this.renderingManager.PlaybackManager=i)}get PlaybackManager(){var i;return(i=this.renderingManager)==null?void 0:i.PlaybackManager}isUrl(i){return i.length<2083}isMxl(i){return i.substr(0,4)==="PK"}processMxl(i,e,t){MXLHelper.MXLtoXMLstring(i).then(s=>{e(this.processStringXml(s))},s=>{loglevelExports.error(new Error("[OSMD] Invalid MXL file: "+s)),t(new Error("[OSMD] Invalid MXL file: "+s))})}processStringXml(i){const e=new DOMParser;if(i.substr(0,3)==="")return loglevelExports.debug("[OSMD] UTF with BOM detected, truncate first three bytes and pass along: "+i),e.parseFromString(i.substr(3),"application/xml");if(i.substr(0,6).includes("<?xml")){const t=this.OnXMLRead(i);return loglevelExports.debug("[OSMD] Finally parsing XML content, length: "+t.length),e.parseFromString(t,"application/xml")}}load(i,e){this.reset();const t=this;return new Promise(function(r,o){new Promise(function(l,c){if(typeof i=="string"){const d=i.trim();if(t.isMxl(d))loglevelExports.debug("[OSMD] This is a zip file, unpack it first: "+d),t.processMxl(d,l,c);else{const m=t.processStringXml(d);if(m)l(m);else if(t.isUrl(d))AJAX.ajax(d).then(u=>{t.isMxl(u)?t.processMxl(u,l,c):l(t.processStringXml(u))},u=>{throw c(u),u});else{const u=new Error("[OSMD] osmd.load(string): Could not process string. Did not find <?xml at beginning.");console.error(u.message),c(u)}}}else if(i instanceof Document)l(i);else{const d=new Error("[OSMD] osmd.load(): content is not string or Document. Could not load.");console.error(d.message),c(d)}}).then(function(l){(!l||!l.nodeName)&&o(new Error("OpenSheetMusicDisplay: The document which was provided is invalid"));const c=l.childNodes;loglevelExports.debug("[OSMD] load(), Document url: "+l.URL);let d;for(let y=0,S=c.length;y<S;y+=1){const v=c[y];if(v.nodeType===Node.ELEMENT_NODE&&v.nodeName.toLowerCase()==="score-partwise"){d=v;break}}d||(console.error("Could not parse MusicXML, no valid partwise element found"),o(new Error("OpenSheetMusicDisplay: Document is not a valid 'partwise' MusicXML")));const m=new IXmlElement(d),u=new DynamicsCalculator,g=new PlaybackNoteGenerator,b=new MusicSheetReader([u,g],t.rules);t.sheet=b.createMusicSheet(m,"Untitled Score"),t.sheet===void 0&&o(new Error("given music sheet was incomplete or could not be loaded.")),loglevelExports.info(`[OSMD] Loaded sheet ${t.sheet.TitleString} successfully.`),t.needBackendUpdate=!0,t.updateGraphic(),r()}).catch(function(l){loglevelExports.debug("Content XML Promise was rejected"),o(l)})})}updateGraphic(){const i=new VexFlowMusicSheetCalculator(this.rules);this.graphic=new GraphicalMusicSheet(this.sheet,i),this.drawingParameters.drawCursors&&this.cursors.forEach(e=>{e.init(this.sheet.MusicPartManager,this.graphic)}),this.renderingManager.setMusicSheet(this.graphic),this.interactionManager.Initialize()}render(){var e;if(!this.graphic)throw new Error("OpenSheetMusicDisplay: Before rendering a music sheet, please load a MusicXML file");(e=this.drawer)==null||e.clear();let i=this.container.offsetWidth;this.rules.RenderSingleHorizontalStaffline&&(i=this.rules.SheetMaximumWidth),this.sheet.pageWidth=i/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,loglevelExports.debug("[OSMD] PageHeight: "+this.rules.PageHeight)):(loglevelExports.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),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)}createOrRefreshRenderBackend(){this.drawer&&this.drawer.Backends&&(this.drawer.Backends[0]&&this.drawer.Backends[0].removeAllChildrenFromContainer(this.container),this.drawer.Backends.clear()),this.drawingParameters.Rules=this.rules,this.drawer=new VexFlowMusicSheetDrawer(this.drawingParameters),this.drawer.drawableBoundingBoxElement=this.DrawBoundingBox,this.drawer.bottomLineVisible=this.drawBottomLine,this.drawer.skyLineVisible=this.drawSkyLine;let i=this.container.offsetWidth;this.rules.RenderSingleHorizontalStaffline&&(i=this.graphic.MusicPages[0].PositionAndShape.Size.width*10*this.zoom);let e;const t=32767;for(const s of this.graphic.MusicPages){if(s.PageNumber>this.rules.MaxPageToDrawNumber)break;const r=this.createBackend(this.backendType,s),o=" exceeds CanvasBackend limit of 32767. Cutting off score.";r.getOSMDBackendType()===BackendType.Canvas&&i>t&&(loglevelExports.warn("[OSMD] Warning: width of "+i+o),i=t),this.rules.PageFormat&&!this.rules.PageFormat.IsUndefined?e=i/this.rules.PageFormat.aspectRatio:(e=s.PositionAndShape.Size.height,e+=this.rules.PageBottomMargin,e+=this.rules.CompactMode?this.rules.PageTopMarginNarrow:this.rules.PageTopMargin,this.rules.RenderTitle&&(e+=this.rules.TitleTopDistance),e*=this.zoom*10),r.getOSMDBackendType()===BackendType.Canvas&&e>t&&(loglevelExports.warn("[OSMD] Warning: height of "+e+o),e=Math.min(e,t)),r.resize(i,e),r.clear(),this.drawer.Backends.push(r),this.graphic.drawer=this.drawer}}exportSVG(){var i;for(const e of(i=this.drawer)==null?void 0:i.Backends)e instanceof SvgVexFlowBackend&&e.export()}IsReadyToRender(){return this.graphic!==void 0}clear(){var i;(i=this.drawer)==null||i.clear(),this.reset()}dispose(){this.disposeResizeListener&&this.disposeResizeListener(),this.InteractionManager&&this.InteractionManager.Dispose()}setOptions(i){if(this.rules||(this.rules=new EngravingRules),this.drawingParameters||(this.drawingParameters=new DrawingParameters,this.drawingParameters.Rules=this.rules),i==null){loglevelExports.warn(`warning: osmd.setOptions() called without an options parameter, has no effect.
- example usage: osmd.setOptions({drawCredits: false, drawPartNames: false})`);return}this.OnXMLRead=function(r){return r},i.onXMLRead&&(this.OnXMLRead=i.onXMLRead),i.drawingParameters&&(this.drawingParameters.DrawingParametersEnum=DrawingParametersEnum[i.drawingParameters.toLowerCase()]);let t=!this.drawer||!this.drawer.Backends||this.drawer.Backends.length<1;if(i.backend!==void 0){const r=OSMDOptions.BackendTypeFromString(i.backend);t=t||this.backendType!==r,this.backendType=r}this.needBackendUpdate=t,i.autoBeam!==void 0&&(this.rules.AutoBeamNotes=i.autoBeam);const s=i.autoBeamOptions;if(s&&(s.maintain_stem_directions===void 0&&(s.maintain_stem_directions=!1),this.rules.AutoBeamOptions=s,s.groups&&s.groups.length)){for(const r of s.groups)if(r.length!==2)throw new Error("Each fraction in autoBeamOptions.groups must be of length 2, e.g. [3,4] for beaming three fourths")}i.percussionOneLineCutoff!==void 0&&(this.rules.PercussionOneLineCutoff=i.percussionOneLineCutoff),this.rules.PercussionOneLineCutoff!==0&&i.percussionForceVoicesOneLineCutoff!==void 0&&(this.rules.PercussionForceVoicesOneLineCutoff=i.percussionForceVoicesOneLineCutoff),i.alignRests!==void 0&&(this.rules.AlignRests=i.alignRests),i.coloringMode!==void 0&&this.setColoringMode(i),i.coloringEnabled!==void 0&&(this.rules.ColoringEnabled=i.coloringEnabled),i.colorStemsLikeNoteheads!==void 0&&(this.rules.ColorStemsLikeNoteheads=i.colorStemsLikeNoteheads),i.disableCursor&&(this.drawingParameters.drawCursors=!1),i.drawHiddenNotes&&(this.drawingParameters.drawHiddenNotes=!0),i.drawCredits!==void 0&&(this.drawingParameters.DrawCredits=i.drawCredits),i.drawComposer!==void 0&&(this.drawingParameters.DrawComposer=i.drawComposer),i.drawTitle!==void 0&&(this.drawingParameters.DrawTitle=i.drawTitle),i.drawSubtitle!==void 0&&(this.drawingParameters.DrawSubtitle=i.drawSubtitle),i.drawLyricist!==void 0&&(this.drawingParameters.DrawLyricist=i.drawLyricist),i.drawMetronomeMarks!==void 0&&(this.rules.MetronomeMarksDrawn=i.drawMetronomeMarks),i.drawPartNames!==void 0&&(this.drawingParameters.DrawPartNames=i.drawPartNames,i.drawPartAbbreviations||(this.rules.RenderPartAbbreviations=i.drawPartNames)),i.drawPartAbbreviations!==void 0&&(this.rules.RenderPartAbbreviations=i.drawPartAbbreviations),i.drawFingerings===!1&&(this.rules.RenderFingerings=!1),i.drawMeasureNumbers!==void 0&&(this.rules.RenderMeasureNumbers=i.drawMeasureNumbers),i.drawMeasureNumbersOnlyAtSystemStart&&(this.rules.RenderMeasureNumbersOnlyAtSystemStart=i.drawMeasureNumbersOnlyAtSystemStart),i.drawLyrics!==void 0&&(this.rules.RenderLyrics=i.drawLyrics),i.drawTimeSignatures!==void 0&&(this.rules.RenderTimeSignatures=i.drawTimeSignatures),i.drawSlurs!==void 0&&(this.rules.RenderSlurs=i.drawSlurs),i.measureNumberInterval!==void 0&&(this.rules.MeasureNumberLabelOffset=i.measureNumberInterval),i.useXMLMeasureNumbers!==void 0&&(this.rules.UseXMLMeasureNumbers=i.useXMLMeasureNumbers),i.fingeringPosition!==void 0&&(this.rules.FingeringPosition=AbstractExpression.PlacementEnumFromString(i.fingeringPosition)),i.fingeringInsideStafflines!==void 0&&(this.rules.FingeringInsideStafflines=i.fingeringInsideStafflines),i.newSystemFromXML!==void 0&&(this.rules.NewSystemAtXMLNewSystemAttribute=i.newSystemFromXML),i.newPageFromXML!==void 0&&(this.rules.NewPageAtXMLNewPageAttribute=i.newPageFromXML),i.fillEmptyMeasuresWithWholeRest!==void 0&&(this.rules.FillEmptyMeasuresWithWholeRest=i.fillEmptyMeasuresWithWholeRest),i.followCursor!==void 0&&(this.FollowCursor=i.followCursor),i.setWantedStemDirectionByXml!==void 0&&(this.rules.SetWantedStemDirectionByXml=i.setWantedStemDirectionByXml),i.darkMode?(this.rules.applyDefaultColorMusic("#FFFFFF"),this.rules.PageBackgroundColor="#000000"):i.darkMode===!1&&(this.rules.applyDefaultColorMusic("#000000"),this.rules.PageBackgroundColor=void 0),i.defaultColorMusic&&this.rules.applyDefaultColorMusic(i.defaultColorMusic),i.defaultColorNotehead&&(this.rules.DefaultColorNotehead=i.defaultColorNotehead),i.defaultColorRest&&(this.rules.DefaultColorRest=i.defaultColorRest),i.defaultColorStem&&(this.rules.DefaultColorStem=i.defaultColorStem),i.defaultColorLabel&&(this.rules.DefaultColorLabel=i.defaultColorLabel),i.defaultColorTitle&&(this.rules.DefaultColorTitle=i.defaultColorTitle),i.defaultFontFamily&&(this.rules.DefaultFontFamily=i.defaultFontFamily),i.defaultFontStyle&&(this.rules.DefaultFontStyle=i.defaultFontStyle),i.drawUpToMeasureNumber&&(this.rules.MaxMeasureToDrawIndex=i.drawUpToMeasureNumber-1),i.drawFromMeasureNumber&&(this.rules.MinMeasureToDrawIndex=i.drawFromMeasureNumber-1),i.drawUpToPageNumber&&(this.rules.MaxPageToDrawNumber=i.drawUpToPageNumber),i.drawUpToSystemNumber&&(this.rules.MaxSystemToDrawNumber=i.drawUpToSystemNumber),i.tupletsRatioed&&(this.rules.TupletsRatioed=!0),i.tupletsBracketed&&(this.rules.TupletsBracketed=!0),i.tripletsBracketed&&(this.rules.TripletsBracketed=!0),i.autoResize?(this.resizeHandlerAttached||this.autoResize(),this.autoResizeEnabled=!0):i.autoResize===!1&&(this.autoResizeEnabled=!1),i.pageFormat!==void 0&&this.setPageFormat(i.pageFormat),i.pageBackgroundColor!==void 0&&(this.rules.PageBackgroundColor=i.pageBackgroundColor),i.performanceMode!==void 0&&(this.rules.PerformanceMode=i.performanceMode),i.renderSingleHorizontalStaffline!==void 0&&(this.rules.RenderSingleHorizontalStaffline=i.renderSingleHorizontalStaffline),i.spacingFactorSoftmax!==void 0&&(this.rules.SoftmaxFactorVexFlow=i.spacingFactorSoftmax),i.spacingBetweenTextLines!==void 0&&(this.rules.SpacingBetweenTextLines=i.spacingBetweenTextLines),i.stretchLastSystemLine!==void 0&&(this.rules.StretchLastSystemLine=i.stretchLastSystemLine),i.autoGenerateMutipleRestMeasuresFromRestMeasures!==void 0&&(this.rules.AutoGenerateMutipleRestMeasuresFromRestMeasures=i.autoGenerateMutipleRestMeasuresFromRestMeasures),i.cursorsOptions!==void 0?this.cursorsOptions=i.cursorsOptions:this.cursorsOptions=[{type:0,color:this.EngravingRules.DefaultColorCursor,alpha:.5,follow:!0}]}setColoringMode(i){if(i.coloringMode===ColoringModes.XML){this.rules.ColoringMode=ColoringModes.XML;return}const e=[NoteEnum.C,NoteEnum.D,NoteEnum.E,NoteEnum.F,NoteEnum.G,NoteEnum.A,NoteEnum.B,-1];let t;if(i.coloringMode===ColoringModes.CustomColorSet){if(!i.coloringSetCustom||i.coloringSetCustom.length!==8)throw new Error("Invalid amount of colors: With coloringModes.customColorSet, you have to provide a coloringSetCustom parameter with 8 strings (C to B, rest note).");for(const r of i.coloringSetCustom)if(!/^\#[0-9a-fA-F]{6}$/.test(r))throw new Error(`One of the color strings in options.coloringSetCustom was not a valid HTML Hex color:
- `+r);t=i.coloringSetCustom}else if(i.coloringMode===ColoringModes.AutoColoring){t=[];const r=Object.keys(AutoColorSet);for(let o=0;o<r.length;o++)t.push(AutoColorSet[r[o]])}const s=new Dictionary;for(let r=0;r<e.length;r++)s.setValue(e[r],t[r]);s.setValue(-1,t[7]),this.rules.ColoringSetCurrent=s,this.rules.ColoringMode=i.coloringMode}setLogLevel(i){switch(i){case"trace":loglevelExports.setLevel(loglevelExports.levels.TRACE);break;case"debug":loglevelExports.setLevel(loglevelExports.levels.DEBUG);break;case"info":loglevelExports.setLevel(loglevelExports.levels.INFO);break;case"warn":loglevelExports.setLevel(loglevelExports.levels.WARN);break;case"error":loglevelExports.setLevel(loglevelExports.levels.ERROR);break;case"silent":loglevelExports.setLevel(loglevelExports.levels.SILENT);break;default:loglevelExports.warn(`Could not set log level to ${i}. Using warn instead.`),loglevelExports.setLevel(loglevelExports.levels.WARN);break}}getLogLevel(){return loglevelExports.getLevel()}reset(){this.drawingParameters.drawCursors&&this.cursors.forEach(i=>{i.hide()}),this.sheet=void 0,this.graphic=void 0,this.zoom=1}autoResize(){const i=this;this.handleResize(()=>{},()=>{var e;((e=this.graphic)==null?void 0:e.GetCalculator)instanceof VexFlowMusicSheetCalculator&&(this.graphic.GetCalculator.beamsNeedUpdate=!0),i.IsReadyToRender()&&i.render()})}handleResize(i,e){let t,s;const o=this;function a(){o.AutoResizeEnabled&&(t=new Date().getTime(),s||(i(),t=new Date().getTime(),s=window.setTimeout(l,200)))}function l(){s=void 0,window.clearTimeout(s),new Date().getTime()-t<200?s=window.setTimeout(l,200):e()}window.attachEvent?window.attachEvent("onresize",a):window.addEventListener("resize",a),this.disposeResizeListener=()=>{window.detachEvent?window.detachEvent("onresize",a):window.removeEventListener("resize",a),this.resizeHandlerAttached=!1},this.resizeHandlerAttached=!0,window.setTimeout(i,0),window.setTimeout(e,1)}enableOrDisableCursors(i){var e,t,s,r,o,a;if(this.drawingParameters.drawCursors=i,i){for(let l=0;l<this.cursorsOptions.length;l++){const c=(t=(e=this.cursors[l])==null?void 0:e.Hidden)!=null?t:!1,d=(s=this.cursors[l])==null?void 0:s.Iterator;(r=this.cursors[l])==null||r.hide();let m=(o=this.drawer)==null?void 0:o.Backends[0];if(m&&this.rules.RestoreCursorAfterRerender&&this.cursors[l]){const u=this.cursors[l].updateCurrentPage();m=this.drawer.Backends[u-1]}m&&m.getRenderElement()&&(this.cursors[l]=new Cursor(m.getRenderElement(),this,this.cursorsOptions[l])),this.sheet&&this.graphic&&this.cursors[l]&&this.cursors[l].init(this.sheet.MusicPartManager,this.graphic),this.rules.RestoreCursorAfterRerender&&(d&&(this.cursors[l].iterator=d),c?this.cursors[l].hide():this.cursors[l].show())}(a=this.renderingManager.PlaybackManager)==null||a.addListener(this.cursor)}else this.cursors.forEach(l=>{l.hide()})}createBackend(i,e){let t;return i===void 0||i===BackendType.SVG?t=new SvgVexFlowBackend(this.rules):t=new CanvasVexFlowBackend(this.rules),t.graphicalMusicPage=e,t.initialize(this.container,this.zoom),t.getContext().setFillStyle(this.rules.DefaultColorMusic),t.getContext().setStrokeStyle(this.rules.DefaultColorMusic),t}static StringToPageFormat(i){let e=PageFormat.UndefinedPageFormat;if(i.match("^[0-9]+x[0-9]+$")){const t=i.split("x"),s=Number.parseInt(t[0],10),r=Number.parseInt(t[1],10);s>0&&s<32768&&r>0&&r<32768&&(e=new PageFormat(s,r,`customPageFormat${i}`))}return i=i.replace(" ","_"),i=i.replace("Landscape","L"),i=i.replace("Portrait","P"),_OpenSheetMusicDisplay.PageFormatStandards.hasOwnProperty(i)&&(e=_OpenSheetMusicDisplay.PageFormatStandards[i]),e}setPageFormat(i){const e=_OpenSheetMusicDisplay.StringToPageFormat(i);this.needBackendUpdate=!e.Equals(this.rules.PageFormat),this.rules.PageFormat=e}setCustomPageFormat(i,e){if(i>0&&e>0){const t=new PageFormat(i,e);this.rules.PageFormat=t}}set DrawSkyLine(i){this.drawSkyLine=i,this.drawer&&(this.drawer.skyLineVisible=i)}get DrawSkyLine(){return this.drawer.skyLineVisible}set DrawBottomLine(i){this.drawBottomLine=i,this.drawer&&(this.drawer.bottomLineVisible=i)}get DrawBottomLine(){return this.drawer.bottomLineVisible}set DrawBoundingBox(i){this.setDrawBoundingBox(i,!0)}get DrawBoundingBox(){return this.drawBoundingBox}setDrawBoundingBox(i,e=!1){this.drawBoundingBox=i,this.drawer&&(this.drawer.drawableBoundingBoxElement=i),e&&this.render()}get AutoResizeEnabled(){return this.autoResizeEnabled}set AutoResizeEnabled(i){this.autoResizeEnabled=i}get Zoom(){return this.zoom}set Zoom(i){var e;this.zoom=i,this.zoomUpdated=!0,((e=this.graphic)==null?void 0:e.GetCalculator)instanceof VexFlowMusicSheetCalculator&&(this.graphic.GetCalculator.beamsNeedUpdate=this.zoomUpdated)}set FollowCursor(i){this.followCursor=i}get FollowCursor(){return this.followCursor}set TransposeCalculator(i){MusicSheetCalculator.transposeCalculator=i}get TransposeCalculator(){return 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}};let OpenSheetMusicDisplay=_OpenSheetMusicDisplay;OpenSheetMusicDisplay.PageFormatStandards={A3_L:new PageFormat(420,297,"A3_L"),A3_P:new PageFormat(297,420,"A3_P"),A4_L:new PageFormat(297,210,"A4_L"),A4_P:new PageFormat(210,297,"A4_P"),A5_L:new PageFormat(210,148,"A5_L"),A5_P:new PageFormat(148,210,"A5_P"),A6_L:new PageFormat(148,105,"A6_L"),A6_P:new PageFormat(105,148,"A6_P"),Endless:PageFormat.UndefinedPageFormat,Letter_L:new PageFormat(279.4,215.9,"Letter_L"),Letter_P:new PageFormat(215.9,279.4,"Letter_P")};var handlebarsExports={},handlebars={get exports(){return handlebarsExports},set exports(i){handlebarsExports=i}},handlebars_runtimeExports={},handlebars_runtime={get exports(){return handlebars_runtimeExports},set exports(i){handlebars_runtimeExports=i}},base$1={},utils={};utils.__esModule=!0;utils.extend=extend;utils.indexOf=indexOf;utils.escapeExpression=escapeExpression;utils.isEmpty=isEmpty;utils.createFrame=createFrame;utils.blockParams=blockParams;utils.appendContextPath=appendContextPath;var escape$1={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},badChars=/[&<>"'`=]/g,possible=/[&<>"'`=]/;function escapeChar(i){return escape$1[i]}function extend(i){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(i[t]=arguments[e][t]);return i}var toString=Object.prototype.toString;utils.toString=toString;var isFunction=function i(e){return typeof e=="function"};isFunction(/x/)&&(utils.isFunction=isFunction=function(i){return typeof i=="function"&&toString.call(i)==="[object Function]"});utils.isFunction=isFunction;var isArray=Array.isArray||function(i){return i&&typeof i=="object"?toString.call(i)==="[object Array]":!1};utils.isArray=isArray;function indexOf(i,e){for(var t=0,s=i.length;t<s;t++)if(i[t]===e)return t;return-1}function escapeExpression(i){if(typeof i!="string"){if(i&&i.toHTML)return i.toHTML();if(i==null)return"";if(!i)return i+"";i=""+i}return possible.test(i)?i.replace(badChars,escapeChar):i}function isEmpty(i){return!i&&i!==0?!0:!!(isArray(i)&&i.length===0)}function createFrame(i){var e=extend({},i);return e._parent=i,e}function blockParams(i,e){return i.path=e,i}function appendContextPath(i,e){return(i?i+".":"")+e}var exceptionExports={},exception={get exports(){return exceptionExports},set exports(i){exceptionExports=i}};(function(i,e){e.__esModule=!0;var t=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function s(r,o){var a=o&&o.loc,l=void 0,c=void 0,d=void 0,m=void 0;a&&(l=a.start.line,c=a.end.line,d=a.start.column,m=a.end.column,r+=" - "+l+":"+d);for(var u=Error.prototype.constructor.call(this,r),g=0;g<t.length;g++)this[t[g]]=u[t[g]];Error.captureStackTrace&&Error.captureStackTrace(this,s);try{a&&(this.lineNumber=l,this.endLineNumber=c,Object.defineProperty?(Object.defineProperty(this,"column",{value:d,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:m,enumerable:!0})):(this.column=d,this.endColumn=m))}catch(b){}}s.prototype=new Error,e.default=s,i.exports=e.default})(exception,exceptionExports);var helpers$1={},blockHelperMissingExports={},blockHelperMissing={get exports(){return blockHelperMissingExports},set exports(i){blockHelperMissingExports=i}};(function(i,e){e.__esModule=!0;var t=utils;e.default=function(s){s.registerHelper("blockHelperMissing",function(r,o){var a=o.inverse,l=o.fn;if(r===!0)return l(this);if(r===!1||r==null)return a(this);if(t.isArray(r))return r.length>0?(o.ids&&(o.ids=[o.name]),s.helpers.each(r,o)):a(this);if(o.data&&o.ids){var c=t.createFrame(o.data);c.contextPath=t.appendContextPath(o.data.contextPath,o.name),o={data:c}}return l(r,o)})},i.exports=e.default})(blockHelperMissing,blockHelperMissingExports);var eachExports={},each={get exports(){return eachExports},set exports(i){eachExports=i}};(function(i,e){e.__esModule=!0;function t(a){return a&&a.__esModule?a:{default:a}}var s=utils,r=exceptionExports,o=t(r);e.default=function(a){a.registerHelper("each",function(l,c){if(!c)throw new o.default("Must pass iterator to #each");var d=c.fn,m=c.inverse,u=0,g="",b=void 0,y=void 0;c.data&&c.ids&&(y=s.appendContextPath(c.data.contextPath,c.ids[0])+"."),s.isFunction(l)&&(l=l.call(this)),c.data&&(b=s.createFrame(c.data));function S(w,_,C){b&&(b.key=w,b.index=_,b.first=_===0,b.last=!!C,y&&(b.contextPath=y+w)),g=g+d(l[w],{data:b,blockParams:s.blockParams([l[w],w],[y+w,null])})}if(l&&typeof l=="object")if(s.isArray(l))for(var v=l.length;u<v;u++)u in l&&S(u,u,u===l.length-1);else if(typeof Symbol=="function"&&l[Symbol.iterator]){for(var x=[],A=l[Symbol.iterator](),E=A.next();!E.done;E=A.next())x.push(E.value);l=x;for(var v=l.length;u<v;u++)S(u,u,u===l.length-1)}else(function(){var w=void 0;Object.keys(l).forEach(function(_){w!==void 0&&S(w,u-1),w=_,u++}),w!==void 0&&S(w,u-1,!0)})();return u===0&&(g=m(this)),g})},i.exports=e.default})(each,eachExports);var helperMissingExports={},helperMissing={get exports(){return helperMissingExports},set exports(i){helperMissingExports=i}};(function(i,e){e.__esModule=!0;function t(o){return o&&o.__esModule?o:{default:o}}var s=exceptionExports,r=t(s);e.default=function(o){o.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},i.exports=e.default})(helperMissing,helperMissingExports);var _ifExports={},_if={get exports(){return _ifExports},set exports(i){_ifExports=i}};(function(i,e){e.__esModule=!0;function t(a){return a&&a.__esModule?a:{default:a}}var s=utils,r=exceptionExports,o=t(r);e.default=function(a){a.registerHelper("if",function(l,c){if(arguments.length!=2)throw new o.default("#if requires exactly one argument");return s.isFunction(l)&&(l=l.call(this)),!c.hash.includeZero&&!l||s.isEmpty(l)?c.inverse(this):c.fn(this)}),a.registerHelper("unless",function(l,c){if(arguments.length!=2)throw new o.default("#unless requires exactly one argument");return a.helpers.if.call(this,l,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},i.exports=e.default})(_if,_ifExports);var logExports={},log$1={get exports(){return logExports},set exports(i){logExports=i}};(function(i,e){e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var s=[void 0],r=arguments[arguments.length-1],o=0;o<arguments.length-1;o++)s.push(arguments[o]);var a=1;r.hash.level!=null?a=r.hash.level:r.data&&r.data.level!=null&&(a=r.data.level),s[0]=a,t.log.apply(t,s)})},i.exports=e.default})(log$1,logExports);var lookupExports={},lookup={get exports(){return lookupExports},set exports(i){lookupExports=i}};(function(i,e){e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(s,r,o){return s&&o.lookupProperty(s,r)})},i.exports=e.default})(lookup,lookupExports);var _withExports={},_with={get exports(){return _withExports},set exports(i){_withExports=i}};(function(i,e){e.__esModule=!0;function t(a){return a&&a.__esModule?a:{default:a}}var s=utils,r=exceptionExports,o=t(r);e.default=function(a){a.registerHelper("with",function(l,c){if(arguments.length!=2)throw new o.default("#with requires exactly one argument");s.isFunction(l)&&(l=l.call(this));var d=c.fn;if(s.isEmpty(l))return c.inverse(this);var m=c.data;return c.data&&c.ids&&(m=s.createFrame(c.data),m.contextPath=s.appendContextPath(c.data.contextPath,c.ids[0])),d(l,{data:m,blockParams:s.blockParams([l],[m&&m.contextPath])})})},i.exports=e.default})(_with,_withExports);helpers$1.__esModule=!0;helpers$1.registerDefaultHelpers=registerDefaultHelpers;helpers$1.moveHelperToHooks=moveHelperToHooks;function _interopRequireDefault$7(i){return i&&i.__esModule?i:{default:i}}var _helpersBlockHelperMissing=blockHelperMissingExports,_helpersBlockHelperMissing2=_interopRequireDefault$7(_helpersBlockHelperMissing),_helpersEach=eachExports,_helpersEach2=_interopRequireDefault$7(_helpersEach),_helpersHelperMissing=helperMissingExports,_helpersHelperMissing2=_interopRequireDefault$7(_helpersHelperMissing),_helpersIf=_ifExports,_helpersIf2=_interopRequireDefault$7(_helpersIf),_helpersLog=logExports,_helpersLog2=_interopRequireDefault$7(_helpersLog),_helpersLookup=lookupExports,_helpersLookup2=_interopRequireDefault$7(_helpersLookup),_helpersWith=_withExports,_helpersWith2=_interopRequireDefault$7(_helpersWith);function registerDefaultHelpers(i){_helpersBlockHelperMissing2.default(i),_helpersEach2.default(i),_helpersHelperMissing2.default(i),_helpersIf2.default(i),_helpersLog2.default(i),_helpersLookup2.default(i),_helpersWith2.default(i)}function moveHelperToHooks(i,e,t){i.helpers[e]&&(i.hooks[e]=i.helpers[e],t||delete i.helpers[e])}var decorators={},inlineExports={},inline={get exports(){return inlineExports},set exports(i){inlineExports=i}};(function(i,e){e.__esModule=!0;var t=utils;e.default=function(s){s.registerDecorator("inline",function(r,o,a,l){var c=r;return o.partials||(o.partials={},c=function(d,m){var u=a.partials;a.partials=t.extend({},u,o.partials);var g=r(d,m);return a.partials=u,g}),o.partials[l.args[0]]=l.fn,c})},i.exports=e.default})(inline,inlineExports);decorators.__esModule=!0;decorators.registerDefaultDecorators=registerDefaultDecorators;function _interopRequireDefault$6(i){return i&&i.__esModule?i:{default:i}}var _decoratorsInline=inlineExports,_decoratorsInline2=_interopRequireDefault$6(_decoratorsInline);function registerDefaultDecorators(i){_decoratorsInline2.default(i)}var loggerExports={},logger={get exports(){return loggerExports},set exports(i){loggerExports=i}};(function(i,e){e.__esModule=!0;var t=utils,s={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(o){if(typeof o=="string"){var a=t.indexOf(s.methodMap,o.toLowerCase());a>=0?o=a:o=parseInt(o,10)}return o},log:function(o){if(o=s.lookupLevel(o),typeof console<"u"&&s.lookupLevel(s.level)<=o){var a=s.methodMap[o];console[a]||(a="log");for(var l=arguments.length,c=Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];console[a].apply(console,c)}}};e.default=s,i.exports=e.default})(logger,loggerExports);var protoAccess={},createNewLookupObject$1={};createNewLookupObject$1.__esModule=!0;createNewLookupObject$1.createNewLookupObject=createNewLookupObject;var _utils$4=utils;function createNewLookupObject(){for(var i=arguments.length,e=Array(i),t=0;t<i;t++)e[t]=arguments[t];return _utils$4.extend.apply(void 0,[Object.create(null)].concat(e))}protoAccess.__esModule=!0;protoAccess.createProtoAccessControl=createProtoAccessControl;protoAccess.resultIsAllowed=resultIsAllowed;protoAccess.resetLoggedProperties=resetLoggedProperties;function _interopRequireDefault$5(i){return i&&i.__esModule?i:{default:i}}var _createNewLookupObject=createNewLookupObject$1,_logger$1=loggerExports,_logger2$1=_interopRequireDefault$5(_logger$1),loggedProperties=Object.create(null);function createProtoAccessControl(i){var e=Object.create(null);e.constructor=!1,e.__defineGetter__=!1,e.__defineSetter__=!1,e.__lookupGetter__=!1;var t=Object.create(null);return t.__proto__=!1,{properties:{whitelist:_createNewLookupObject.createNewLookupObject(t,i.allowedProtoProperties),defaultValue:i.allowProtoPropertiesByDefault},methods:{whitelist:_createNewLookupObject.createNewLookupObject(e,i.allowedProtoMethods),defaultValue:i.allowProtoMethodsByDefault}}}function resultIsAllowed(i,e,t){return checkWhiteList(typeof i=="function"?e.methods:e.properties,t)}function checkWhiteList(i,e){return i.whitelist[e]!==void 0?i.whitelist[e]===!0:i.defaultValue!==void 0?i.defaultValue:(logUnexpecedPropertyAccessOnce(e),!1)}function logUnexpecedPropertyAccessOnce(i){loggedProperties[i]!==!0&&(loggedProperties[i]=!0,_logger2$1.default.log("error",'Handlebars: Access has been denied to resolve the property "'+i+`" because it is not an "own property" of its parent.
- You can add a runtime option to disable the check or this warning:
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function resetLoggedProperties(){Object.keys(loggedProperties).forEach(function(i){delete loggedProperties[i]})}base$1.__esModule=!0;base$1.HandlebarsEnvironment=HandlebarsEnvironment;function _interopRequireDefault$4(i){return i&&i.__esModule?i:{default:i}}var _utils$3=utils,_exception$3=exceptionExports,_exception2$3=_interopRequireDefault$4(_exception$3),_helpers$2=helpers$1,_decorators=decorators,_logger=loggerExports,_logger2=_interopRequireDefault$4(_logger),_internalProtoAccess$1=protoAccess,VERSION="4.7.8";base$1.VERSION=VERSION;var COMPILER_REVISION=8;base$1.COMPILER_REVISION=COMPILER_REVISION;var LAST_COMPATIBLE_COMPILER_REVISION=7;base$1.LAST_COMPATIBLE_COMPILER_REVISION=LAST_COMPATIBLE_COMPILER_REVISION;var REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};base$1.REVISION_CHANGES=REVISION_CHANGES;var objectType="[object Object]";function HandlebarsEnvironment(i,e,t){this.helpers=i||{},this.partials=e||{},this.decorators=t||{},_helpers$2.registerDefaultHelpers(this),_decorators.registerDefaultDecorators(this)}HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:_logger2.default,log:_logger2.default.log,registerHelper:function i(e,t){if(_utils$3.toString.call(e)===objectType){if(t)throw new _exception2$3.default("Arg not supported with multiple helpers");_utils$3.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function i(e){delete this.helpers[e]},registerPartial:function i(e,t){if(_utils$3.toString.call(e)===objectType)_utils$3.extend(this.partials,e);else{if(typeof t>"u")throw new _exception2$3.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function i(e){delete this.partials[e]},registerDecorator:function i(e,t){if(_utils$3.toString.call(e)===objectType){if(t)throw new _exception2$3.default("Arg not supported with multiple decorators");_utils$3.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function i(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function i(){_internalProtoAccess$1.resetLoggedProperties()}};var log=_logger2.default.log;base$1.log=log;base$1.createFrame=_utils$3.createFrame;base$1.logger=_logger2.default;var safeStringExports={},safeString={get exports(){return safeStringExports},set exports(i){safeStringExports=i}};(function(i,e){e.__esModule=!0;function t(s){this.string=s}t.prototype.toString=t.prototype.toHTML=function(){return""+this.string},e.default=t,i.exports=e.default})(safeString,safeStringExports);var runtime={},wrapHelper$1={};wrapHelper$1.__esModule=!0;wrapHelper$1.wrapHelper=wrapHelper;function wrapHelper(i,e){if(typeof i!="function")return i;var t=function(){var r=arguments[arguments.length-1];return arguments[arguments.length-1]=e(r),i.apply(this,arguments)};return t}runtime.__esModule=!0;runtime.checkRevision=checkRevision;runtime.template=template;runtime.wrapProgram=wrapProgram;runtime.resolvePartial=resolvePartial;runtime.invokePartial=invokePartial;runtime.noop=noop;function _interopRequireDefault$3(i){return i&&i.__esModule?i:{default:i}}function _interopRequireWildcard$1(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}var _utils$2=utils,Utils=_interopRequireWildcard$1(_utils$2),_exception$2=exceptionExports,_exception2$2=_interopRequireDefault$3(_exception$2),_base=base$1,_helpers$1=helpers$1,_internalWrapHelper=wrapHelper$1,_internalProtoAccess=protoAccess;function checkRevision(i){var e=i&&i[0]||1,t=_base.COMPILER_REVISION;if(!(e>=_base.LAST_COMPATIBLE_COMPILER_REVISION&&e<=_base.COMPILER_REVISION))if(e<_base.LAST_COMPATIBLE_COMPILER_REVISION){var s=_base.REVISION_CHANGES[t],r=_base.REVISION_CHANGES[e];throw new _exception2$2.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+r+").")}else throw new _exception2$2.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+i[1]+").")}function template(i,e){if(!e)throw new _exception2$2.default("No environment passed to template");if(!i||!i.main)throw new _exception2$2.default("Unknown template object: "+typeof i);i.main.decorator=i.main_d,e.VM.checkRevision(i.compiler);var t=i.compiler&&i.compiler[0]===7;function s(a,l,c){c.hash&&(l=Utils.extend({},l,c.hash),c.ids&&(c.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,l,c);var d=Utils.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),m=e.VM.invokePartial.call(this,a,l,d);if(m==null&&e.compile&&(c.partials[c.name]=e.compile(a,i.compilerOptions,e),m=c.partials[c.name](l,d)),m!=null){if(c.indent){for(var u=m.split(`
- `),g=0,b=u.length;g<b&&!(!u[g]&&g+1===b);g++)u[g]=c.indent+u[g];m=u.join(`
- `)}return m}else throw new _exception2$2.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var r={strict:function(l,c,d){if(!l||!(c in l))throw new _exception2$2.default('"'+c+'" not defined in '+l,{loc:d});return r.lookupProperty(l,c)},lookupProperty:function(l,c){var d=l[c];if(d==null||Object.prototype.hasOwnProperty.call(l,c)||_internalProtoAccess.resultIsAllowed(d,r.protoAccessControl,c))return d},lookup:function(l,c){for(var d=l.length,m=0;m<d;m++){var u=l[m]&&r.lookupProperty(l[m],c);if(u!=null)return l[m][c]}},lambda:function(l,c){return typeof l=="function"?l.call(c):l},escapeExpression:Utils.escapeExpression,invokePartial:s,fn:function(l){var c=i[l];return c.decorator=i[l+"_d"],c},programs:[],program:function(l,c,d,m,u){var g=this.programs[l],b=this.fn(l);return c||u||m||d?g=wrapProgram(this,l,b,c,d,m,u):g||(g=this.programs[l]=wrapProgram(this,l,b)),g},data:function(l,c){for(;l&&c--;)l=l._parent;return l},mergeIfNeeded:function(l,c){var d=l||c;return l&&c&&l!==c&&(d=Utils.extend({},c,l)),d},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:i.compiler};function o(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=l.data;o._setup(l),!l.partial&&i.useData&&(c=initData(a,c));var d=void 0,m=i.useBlockParams?[]:void 0;i.useDepths&&(l.depths?d=a!=l.depths[0]?[a].concat(l.depths):l.depths:d=[a]);function u(g){return""+i.main(r,g,r.helpers,r.partials,c,m,d)}return u=executeDecorators(i.main,u,r,l.depths||[],c,m),u(a,l)}return o.isTop=!0,o._setup=function(a){if(a.partial)r.protoAccessControl=a.protoAccessControl,r.helpers=a.helpers,r.partials=a.partials,r.decorators=a.decorators,r.hooks=a.hooks;else{var l=Utils.extend({},e.helpers,a.helpers);wrapHelpersToPassLookupProperty(l,r),r.helpers=l,i.usePartial&&(r.partials=r.mergeIfNeeded(a.partials,e.partials)),(i.usePartial||i.useDecorators)&&(r.decorators=Utils.extend({},e.decorators,a.decorators)),r.hooks={},r.protoAccessControl=_internalProtoAccess.createProtoAccessControl(a);var c=a.allowCallsToHelperMissing||t;_helpers$1.moveHelperToHooks(r,"helperMissing",c),_helpers$1.moveHelperToHooks(r,"blockHelperMissing",c)}},o._child=function(a,l,c,d){if(i.useBlockParams&&!c)throw new _exception2$2.default("must pass block params");if(i.useDepths&&!d)throw new _exception2$2.default("must pass parent depths");return wrapProgram(r,a,i[a],l,0,c,d)},o}function wrapProgram(i,e,t,s,r,o,a){function l(c){var d=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],m=a;return a&&c!=a[0]&&!(c===i.nullContext&&a[0]===null)&&(m=[c].concat(a)),t(i,c,i.helpers,i.partials,d.data||s,o&&[d.blockParams].concat(o),m)}return l=executeDecorators(t,l,i,a,s,o),l.program=e,l.depth=a?a.length:0,l.blockParams=r||0,l}function resolvePartial(i,e,t){return i?!i.call&&!t.name&&(t.name=i,i=t.partials[i]):t.name==="@partial-block"?i=t.data["partial-block"]:i=t.partials[t.name],i}function invokePartial(i,e,t){var s=t.data&&t.data["partial-block"];t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var r=void 0;if(t.fn&&t.fn!==noop&&function(){t.data=_base.createFrame(t.data);var o=t.fn;r=t.data["partial-block"]=function(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=_base.createFrame(c.data),c.data["partial-block"]=s,o(l,c)},o.partials&&(t.partials=Utils.extend({},t.partials,o.partials))}(),i===void 0&&r&&(i=r),i===void 0)throw new _exception2$2.default("The partial "+t.name+" could not be found");if(i instanceof Function)return i(e,t)}function noop(){return""}function initData(i,e){return(!e||!("root"in e))&&(e=e?_base.createFrame(e):{},e.root=i),e}function executeDecorators(i,e,t,s,r,o){if(i.decorator){var a={};e=i.decorator(e,a,t,s&&s[0],r,o,s),Utils.extend(e,a)}return e}function wrapHelpersToPassLookupProperty(i,e){Object.keys(i).forEach(function(t){var s=i[t];i[t]=passLookupPropertyOption(s,e)})}function passLookupPropertyOption(i,e){var t=e.lookupProperty;return _internalWrapHelper.wrapHelper(i,function(s){return Utils.extend({lookupProperty:t},s)})}var noConflictExports={},noConflict={get exports(){return noConflictExports},set exports(i){noConflictExports=i}};(function(i,e){e.__esModule=!0,e.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var s=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=s),t}},i.exports=e.default})(noConflict,noConflictExports);(function(i,e){e.__esModule=!0;function t(A){return A&&A.__esModule?A:{default:A}}function s(A){if(A&&A.__esModule)return A;var E={};if(A!=null)for(var w in A)Object.prototype.hasOwnProperty.call(A,w)&&(E[w]=A[w]);return E.default=A,E}var r=base$1,o=s(r),a=safeStringExports,l=t(a),c=exceptionExports,d=t(c),m=utils,u=s(m),g=runtime,b=s(g),y=noConflictExports,S=t(y);function v(){var A=new o.HandlebarsEnvironment;return u.extend(A,o),A.SafeString=l.default,A.Exception=d.default,A.Utils=u,A.escapeExpression=u.escapeExpression,A.VM=b,A.template=function(E){return b.template(E,A)},A}var x=v();x.create=v,S.default(x),x.default=x,e.default=x,i.exports=e.default})(handlebars_runtime,handlebars_runtimeExports);var astExports={},ast={get exports(){return astExports},set exports(i){astExports=i}};(function(i,e){e.__esModule=!0;var t={helpers:{helperExpression:function(r){return r.type==="SubExpression"||(r.type==="MustacheStatement"||r.type==="BlockStatement")&&!!(r.params&&r.params.length||r.hash)},scopedId:function(r){return/^\.|this\b/.test(r.original)},simpleId:function(r){return r.parts.length===1&&!t.helpers.scopedId(r)&&!r.depth}}};e.default=t,i.exports=e.default})(ast,astExports);var base={},parserExports={},parser$1={get exports(){return parserExports},set exports(i){parserExports=i}};(function(i,e){e.__esModule=!0;var t=function(){var s={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(l,c,d,m,u,g,b){var y=g.length-1;switch(u){case 1:return g[y-1];case 2:this.$=m.prepareProgram(g[y]);break;case 3:this.$=g[y];break;case 4:this.$=g[y];break;case 5:this.$=g[y];break;case 6:this.$=g[y];break;case 7:this.$=g[y];break;case 8:this.$=g[y];break;case 9:this.$={type:"CommentStatement",value:m.stripComment(g[y]),strip:m.stripFlags(g[y],g[y]),loc:m.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:g[y],value:g[y],loc:m.locInfo(this._$)};break;case 11:this.$=m.prepareRawBlock(g[y-2],g[y-1],g[y],this._$);break;case 12:this.$={path:g[y-3],params:g[y-2],hash:g[y-1]};break;case 13:this.$=m.prepareBlock(g[y-3],g[y-2],g[y-1],g[y],!1,this._$);break;case 14:this.$=m.prepareBlock(g[y-3],g[y-2],g[y-1],g[y],!0,this._$);break;case 15:this.$={open:g[y-5],path:g[y-4],params:g[y-3],hash:g[y-2],blockParams:g[y-1],strip:m.stripFlags(g[y-5],g[y])};break;case 16:this.$={path:g[y-4],params:g[y-3],hash:g[y-2],blockParams:g[y-1],strip:m.stripFlags(g[y-5],g[y])};break;case 17:this.$={path:g[y-4],params:g[y-3],hash:g[y-2],blockParams:g[y-1],strip:m.stripFlags(g[y-5],g[y])};break;case 18:this.$={strip:m.stripFlags(g[y-1],g[y-1]),program:g[y]};break;case 19:var S=m.prepareBlock(g[y-2],g[y-1],g[y],g[y],!1,this._$),v=m.prepareProgram([S],g[y-1].loc);v.chained=!0,this.$={strip:g[y-2].strip,program:v,chain:!0};break;case 20:this.$=g[y];break;case 21:this.$={path:g[y-1],strip:m.stripFlags(g[y-2],g[y])};break;case 22:this.$=m.prepareMustache(g[y-3],g[y-2],g[y-1],g[y-4],m.stripFlags(g[y-4],g[y]),this._$);break;case 23:this.$=m.prepareMustache(g[y-3],g[y-2],g[y-1],g[y-4],m.stripFlags(g[y-4],g[y]),this._$);break;case 24:this.$={type:"PartialStatement",name:g[y-3],params:g[y-2],hash:g[y-1],indent:"",strip:m.stripFlags(g[y-4],g[y]),loc:m.locInfo(this._$)};break;case 25:this.$=m.preparePartialBlock(g[y-2],g[y-1],g[y],this._$);break;case 26:this.$={path:g[y-3],params:g[y-2],hash:g[y-1],strip:m.stripFlags(g[y-4],g[y])};break;case 27:this.$=g[y];break;case 28:this.$=g[y];break;case 29:this.$={type:"SubExpression",path:g[y-3],params:g[y-2],hash:g[y-1],loc:m.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:g[y],loc:m.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:m.id(g[y-2]),value:g[y],loc:m.locInfo(this._$)};break;case 32:this.$=m.id(g[y-1]);break;case 33:this.$=g[y];break;case 34:this.$=g[y];break;case 35:this.$={type:"StringLiteral",value:g[y],original:g[y],loc:m.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(g[y]),original:Number(g[y]),loc:m.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:g[y]==="true",original:g[y]==="true",loc:m.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:m.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:m.locInfo(this._$)};break;case 40:this.$=g[y];break;case 41:this.$=g[y];break;case 42:this.$=m.preparePath(!0,g[y],this._$);break;case 43:this.$=m.preparePath(!1,g[y],this._$);break;case 44:g[y-2].push({part:m.id(g[y]),original:g[y],separator:g[y-1]}),this.$=g[y-2];break;case 45:this.$=[{part:m.id(g[y]),original:g[y]}];break;case 46:this.$=[];break;case 47:g[y-1].push(g[y]);break;case 48:this.$=[];break;case 49:g[y-1].push(g[y]);break;case 50:this.$=[];break;case 51:g[y-1].push(g[y]);break;case 58:this.$=[];break;case 59:g[y-1].push(g[y]);break;case 64:this.$=[];break;case 65:g[y-1].push(g[y]);break;case 70:this.$=[];break;case 71:g[y-1].push(g[y]);break;case 78:this.$=[];break;case 79:g[y-1].push(g[y]);break;case 82:this.$=[];break;case 83:g[y-1].push(g[y]);break;case 86:this.$=[];break;case 87:g[y-1].push(g[y]);break;case 90:this.$=[];break;case 91:g[y-1].push(g[y]);break;case 94:this.$=[];break;case 95:g[y-1].push(g[y]);break;case 98:this.$=[g[y]];break;case 99:g[y-1].push(g[y]);break;case 100:this.$=[g[y]];break;case 101:g[y-1].push(g[y]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(l,c){throw new Error(l)},parse:function(l){var c=this,d=[0],m=[null],u=[],g=this.table,b="",y=0,S=0;this.lexer.setInput(l),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var v=this.lexer.yylloc;u.push(v);var x=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function A(){var k;return k=c.lexer.lex()||1,typeof k!="number"&&(k=c.symbols_[k]||k),k}for(var E,w,_,C,P={},I,R,N,G;;){if(w=d[d.length-1],this.defaultActions[w]?_=this.defaultActions[w]:((E===null||typeof E>"u")&&(E=A()),_=g[w]&&g[w][E]),typeof _>"u"||!_.length||!_[0]){var B="";{G=[];for(I in g[w])this.terminals_[I]&&I>2&&G.push("'"+this.terminals_[I]+"'");this.lexer.showPosition?B="Parse error on line "+(y+1)+`:
- `+this.lexer.showPosition()+`
- Expecting `+G.join(", ")+", got '"+(this.terminals_[E]||E)+"'":B="Parse error on line "+(y+1)+": Unexpected "+(E==1?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(B,{text:this.lexer.match,token:this.terminals_[E]||E,line:this.lexer.yylineno,loc:v,expected:G})}}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+E);switch(_[0]){case 1:d.push(E),m.push(this.lexer.yytext),u.push(this.lexer.yylloc),d.push(_[1]),E=null,S=this.lexer.yyleng,b=this.lexer.yytext,y=this.lexer.yylineno,v=this.lexer.yylloc;break;case 2:if(R=this.productions_[_[1]][1],P.$=m[m.length-R],P._$={first_line:u[u.length-(R||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(R||1)].first_column,last_column:u[u.length-1].last_column},x&&(P._$.range=[u[u.length-(R||1)].range[0],u[u.length-1].range[1]]),C=this.performAction.call(P,b,S,y,this.yy,_[1],m,u),typeof C<"u")return C;R&&(d=d.slice(0,-1*R*2),m=m.slice(0,-1*R),u=u.slice(0,-1*R)),d.push(this.productions_[_[1]][0]),m.push(P.$),u.push(P._$),N=g[d[d.length-2]][d[d.length-1]],d.push(N);break;case 3:return!0}}return!0}},r=function(){var a={EOF:1,parseError:function(c,d){if(this.yy.parser)this.yy.parser.parseError(c,d);else throw new Error(c)},setInput:function(c){return this._input=c,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 c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var d=c.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},unput:function(c){var d=c.length,m=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d-1),this.offset-=d;var u=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),m.length-1&&(this.yylineno-=m.length-1);var g=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:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-d]),this},more:function(){return this._more=!0,this},less:function(c){this.unput(this.match.slice(c))},pastInput:function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var c=this.pastInput(),d=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
- `+d+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,d,m,u,g;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length&&(m=this._input.match(this.rules[b[y]]),!(m&&(!d||m[0].length>d[0].length)&&(d=m,u=y,!this.options.flex)));y++);return d?(g=d[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,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(d[0].length),this.matched+=d[0],c=this.performAction.call(this,this.yy,this,b[u],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var c=this.next();return typeof c<"u"?c:this.lex()},begin:function(c){this.conditionStack.push(c)},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(c){this.begin(c)}};return a.options={},a.performAction=function(c,d,m,u){function g(b,y){return d.yytext=d.yytext.substring(b,d.yyleng-y+b)}switch(m){case 0:if(d.yytext.slice(-2)==="\\\\"?(g(0,1),this.begin("mu")):d.yytext.slice(-1)==="\\"?(g(0,1),this.begin("emu")):this.begin("mu"),d.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(g(5,9),"END_RAW_BLOCK");case 5:return 15;case 6: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:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(d.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return d.yytext=g(1,2).replace(/\\"/g,'"'),80;case 32:return d.yytext=g(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;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 41:return 72;case 42:return d.yytext=d.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.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}},a}();s.lexer=r;function o(){this.yy={}}return o.prototype=s,s.Parser=o,new o}();e.default=t,i.exports=e.default})(parser$1,parserExports);var whitespaceControlExports={},whitespaceControl={get exports(){return whitespaceControlExports},set exports(i){whitespaceControlExports=i}},visitorExports={},visitor={get exports(){return visitorExports},set exports(i){visitorExports=i}};(function(i,e){e.__esModule=!0;function t(d){return d&&d.__esModule?d:{default:d}}var s=exceptionExports,r=t(s);function o(){this.parents=[]}o.prototype={constructor:o,mutating:!1,acceptKey:function(m,u){var g=this.accept(m[u]);if(this.mutating){if(g&&!o.prototype[g.type])throw new r.default('Unexpected node type "'+g.type+'" found when accepting '+u+" on "+m.type);m[u]=g}},acceptRequired:function(m,u){if(this.acceptKey(m,u),!m[u])throw new r.default(m.type+" requires "+u)},acceptArray:function(m){for(var u=0,g=m.length;u<g;u++)this.acceptKey(m,u),m[u]||(m.splice(u,1),u--,g--)},accept:function(m){if(m){if(!this[m.type])throw new r.default("Unknown type: "+m.type,m);this.current&&this.parents.unshift(this.current),this.current=m;var u=this[m.type](m);if(this.current=this.parents.shift(),!this.mutating||u)return u;if(u!==!1)return m}},Program:function(m){this.acceptArray(m.body)},MustacheStatement:a,Decorator:a,BlockStatement:l,DecoratorBlock:l,PartialStatement:c,PartialBlockStatement:function(m){c.call(this,m),this.acceptKey(m,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:a,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(m){this.acceptArray(m.pairs)},HashPair:function(m){this.acceptRequired(m,"value")}};function a(d){this.acceptRequired(d,"path"),this.acceptArray(d.params),this.acceptKey(d,"hash")}function l(d){a.call(this,d),this.acceptKey(d,"program"),this.acceptKey(d,"inverse")}function c(d){this.acceptRequired(d,"name"),this.acceptArray(d.params),this.acceptKey(d,"hash")}e.default=o,i.exports=e.default})(visitor,visitorExports);(function(i,e){e.__esModule=!0;function t(m){return m&&m.__esModule?m:{default:m}}var s=visitorExports,r=t(s);function o(){var m=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=m}o.prototype=new r.default,o.prototype.Program=function(m){var u=!this.options.ignoreStandalone,g=!this.isRootSeen;this.isRootSeen=!0;for(var b=m.body,y=0,S=b.length;y<S;y++){var v=b[y],x=this.accept(v);if(x){var A=a(b,y,g),E=l(b,y,g),w=x.openStandalone&&A,_=x.closeStandalone&&E,C=x.inlineStandalone&&A&&E;x.close&&c(b,y,!0),x.open&&d(b,y,!0),u&&C&&(c(b,y),d(b,y)&&v.type==="PartialStatement"&&(v.indent=/([ \t]+$)/.exec(b[y-1].original)[1])),u&&w&&(c((v.program||v.inverse).body),d(b,y)),u&&_&&(c(b,y),d((v.inverse||v.program).body))}}return m},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(m){this.accept(m.program),this.accept(m.inverse);var u=m.program||m.inverse,g=m.program&&m.inverse,b=g,y=g;if(g&&g.chained)for(b=g.body[0].program;y.chained;)y=y.body[y.body.length-1].program;var S={open:m.openStrip.open,close:m.closeStrip.close,openStandalone:l(u.body),closeStandalone:a((b||u).body)};if(m.openStrip.close&&c(u.body,null,!0),g){var v=m.inverseStrip;v.open&&d(u.body,null,!0),v.close&&c(b.body,null,!0),m.closeStrip.open&&d(y.body,null,!0),!this.options.ignoreStandalone&&a(u.body)&&l(b.body)&&(d(u.body),c(b.body))}else m.closeStrip.open&&d(u.body,null,!0);return S},o.prototype.Decorator=o.prototype.MustacheStatement=function(m){return m.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(m){var u=m.strip||{};return{inlineStandalone:!0,open:u.open,close:u.close}};function a(m,u,g){u===void 0&&(u=m.length);var b=m[u-1],y=m[u-2];if(!b)return g;if(b.type==="ContentStatement")return(y||!g?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(b.original)}function l(m,u,g){u===void 0&&(u=-1);var b=m[u+1],y=m[u+2];if(!b)return g;if(b.type==="ContentStatement")return(y||!g?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(b.original)}function c(m,u,g){var b=m[u==null?0:u+1];if(!(!b||b.type!=="ContentStatement"||!g&&b.rightStripped)){var y=b.value;b.value=b.value.replace(g?/^\s+/:/^[ \t]*\r?\n?/,""),b.rightStripped=b.value!==y}}function d(m,u,g){var b=m[u==null?m.length-1:u-1];if(!(!b||b.type!=="ContentStatement"||!g&&b.leftStripped)){var y=b.value;return b.value=b.value.replace(g?/\s+$/:/[ \t]+$/,""),b.leftStripped=b.value!==y,b.leftStripped}}e.default=o,i.exports=e.default})(whitespaceControl,whitespaceControlExports);var helpers={};helpers.__esModule=!0;helpers.SourceLocation=SourceLocation;helpers.id=id;helpers.stripFlags=stripFlags;helpers.stripComment=stripComment;helpers.preparePath=preparePath;helpers.prepareMustache=prepareMustache;helpers.prepareRawBlock=prepareRawBlock;helpers.prepareBlock=prepareBlock;helpers.prepareProgram=prepareProgram;helpers.preparePartialBlock=preparePartialBlock;function _interopRequireDefault$2(i){return i&&i.__esModule?i:{default:i}}var _exception$1=exceptionExports,_exception2$1=_interopRequireDefault$2(_exception$1);function validateClose(i,e){if(e=e.path?e.path.original:e,i.path.original!==e){var t={loc:i.path.loc};throw new _exception2$1.default(i.path.original+" doesn't match "+e,t)}}function SourceLocation(i,e){this.source=i,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function id(i){return/^\[.*\]$/.test(i)?i.substring(1,i.length-1):i}function stripFlags(i,e){return{open:i.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function stripComment(i){return i.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function preparePath(i,e,t){t=this.locInfo(t);for(var s=i?"@":"",r=[],o=0,a=0,l=e.length;a<l;a++){var c=e[a].part,d=e[a].original!==c;if(s+=(e[a].separator||"")+c,!d&&(c===".."||c==="."||c==="this")){if(r.length>0)throw new _exception2$1.default("Invalid path: "+s,{loc:t});c===".."&&o++}else r.push(c)}return{type:"PathExpression",data:i,depth:o,parts:r,original:s,loc:t}}function prepareMustache(i,e,t,s,r,o){var a=s.charAt(3)||s.charAt(2),l=a!=="{"&&a!=="&",c=/\*/.test(s);return{type:c?"Decorator":"MustacheStatement",path:i,params:e,hash:t,escaped:l,strip:r,loc:this.locInfo(o)}}function prepareRawBlock(i,e,t,s){validateClose(i,t),s=this.locInfo(s);var r={type:"Program",body:e,strip:{},loc:s};return{type:"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:s}}function prepareBlock(i,e,t,s,r,o){s&&s.path&&validateClose(i,s);var a=/\*/.test(i.open);e.blockParams=i.blockParams;var l=void 0,c=void 0;if(t){if(a)throw new _exception2$1.default("Unexpected inverse block on decorator",t);t.chain&&(t.program.body[0].closeStrip=s.strip),c=t.strip,l=t.program}return r&&(r=l,l=e,e=r),{type:a?"DecoratorBlock":"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:e,inverse:l,openStrip:i.strip,inverseStrip:c,closeStrip:s&&s.strip,loc:this.locInfo(o)}}function prepareProgram(i,e){if(!e&&i.length){var t=i[0].loc,s=i[i.length-1].loc;t&&s&&(e={source:t.source,start:{line:t.start.line,column:t.start.column},end:{line:s.end.line,column:s.end.column}})}return{type:"Program",body:i,strip:{},loc:e}}function preparePartialBlock(i,e,t,s){return validateClose(i,t),{type:"PartialBlockStatement",name:i.path,params:i.params,hash:i.hash,program:e,openStrip:i.strip,closeStrip:t&&t.strip,loc:this.locInfo(s)}}base.__esModule=!0;base.parseWithoutProcessing=parseWithoutProcessing;base.parse=parse$2;function _interopRequireWildcard(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}function _interopRequireDefault$1(i){return i&&i.__esModule?i:{default:i}}var _parser=parserExports,_parser2=_interopRequireDefault$1(_parser),_whitespaceControl=whitespaceControlExports,_whitespaceControl2=_interopRequireDefault$1(_whitespaceControl),_helpers=helpers,Helpers=_interopRequireWildcard(_helpers),_utils$1=utils;base.parser=_parser2.default;var yy={};_utils$1.extend(yy,Helpers);function parseWithoutProcessing(i,e){if(i.type==="Program")return i;_parser2.default.yy=yy,yy.locInfo=function(s){return new yy.SourceLocation(e&&e.srcName,s)};var t=_parser2.default.parse(i);return t}function parse$2(i,e){var t=parseWithoutProcessing(i,e),s=new _whitespaceControl2.default(e);return s.accept(t)}var compiler={};compiler.__esModule=!0;compiler.Compiler=Compiler;compiler.precompile=precompile;compiler.compile=compile;function _interopRequireDefault(i){return i&&i.__esModule?i:{default:i}}var _exception=exceptionExports,_exception2=_interopRequireDefault(_exception),_utils=utils,_ast=astExports,_ast2=_interopRequireDefault(_ast),slice=[].slice;function Compiler(){}Compiler.prototype={compiler:Compiler,equals:function i(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var s=0;s<t;s++){var r=this.opcodes[s],o=e.opcodes[s];if(r.opcode!==o.opcode||!argEquals(r.args,o.args))return!1}t=this.children.length;for(var s=0;s<t;s++)if(!this.children[s].equals(e.children[s]))return!1;return!0},guid:0,compile:function i(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=_utils.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function i(e){var t=new this.compiler,s=t.compile(e,this.options),r=this.guid++;return this.usePartial=this.usePartial||s.usePartial,this.children[r]=s,this.useDepths=this.useDepths||s.useDepths,r},accept:function i(e){if(!this[e.type])throw new _exception2.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function i(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,s=t.length,r=0;r<s;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=s===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function i(e){transformLiteralToPath(e);var t=e.program,s=e.inverse;t=t&&this.compileProgram(t),s=s&&this.compileProgram(s);var r=this.classifySexpr(e);r==="helper"?this.helperSexpr(e,t,s):r==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",s),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,s),this.opcode("pushProgram",t),this.opcode("pushProgram",s),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function i(e){var t=e.program&&this.compileProgram(e.program),s=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode("registerDecorator",s.length,r.original)},PartialStatement:function i(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var s=e.params;if(s.length>1)throw new _exception2.default("Unsupported number of partial arguments: "+s.length,e);s.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):s.push({type:"PathExpression",parts:[],depth:0}));var r=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var a=e.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,r,a),this.opcode("append")},PartialBlockStatement:function i(e){this.PartialStatement(e)},MustacheStatement:function i(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function i(e){this.DecoratorBlock(e)},ContentStatement:function i(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function i(){},SubExpression:function i(e){transformLiteralToPath(e);var t=this.classifySexpr(e);t==="simple"?this.simpleSexpr(e):t==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function i(e,t,s){var r=e.path,o=r.parts[0],a=t!=null||s!=null;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",s),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",o,a)},simpleSexpr:function i(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function i(e,t,s){var r=this.setupFullMustacheParams(e,t,s),o=e.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",r.length,a);else{if(this.options.knownHelpersOnly)throw new _exception2.default("You specified knownHelpersOnly, but used the unknown helper "+a,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",r.length,o.original,_ast2.default.helpers.simpleId(o))}},PathExpression:function i(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],s=_ast2.default.helpers.scopedId(e),r=!e.depth&&!s&&this.blockParamIndex(t);r?this.opcode("lookupBlockParam",r,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,s):this.opcode("pushContext")},StringLiteral:function i(e){this.opcode("pushString",e.value)},NumberLiteral:function i(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function i(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function i(){this.opcode("pushLiteral","undefined")},NullLiteral:function i(){this.opcode("pushLiteral","null")},Hash:function i(e){var t=e.pairs,s=0,r=t.length;for(this.opcode("pushHash");s<r;s++)this.pushParam(t[s].value);for(;s--;)this.opcode("assignToHash",t[s].key);this.opcode("popHash")},opcode:function i(e){this.opcodes.push({opcode:e,args:slice.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function i(e){e&&(this.useDepths=!0)},classifySexpr:function i(e){var t=_ast2.default.helpers.simpleId(e.path),s=t&&!!this.blockParamIndex(e.path.parts[0]),r=!s&&_ast2.default.helpers.helperExpression(e),o=!s&&(r||t);if(o&&!r){var a=e.path.parts[0],l=this.options;l.knownHelpers[a]?r=!0:l.knownHelpersOnly&&(o=!1)}return r?"helper":o?"ambiguous":"simple"},pushParams:function i(e){for(var t=0,s=e.length;t<s;t++)this.pushParam(e[t])},pushParam:function i(e){var t=e.value!=null?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var s=void 0;if(e.parts&&!_ast2.default.helpers.scopedId(e)&&!e.depth&&(s=this.blockParamIndex(e.parts[0])),s){var r=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",s,r)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function i(e,t,s,r){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",t),this.opcode("pushProgram",s),e.hash?this.accept(e.hash):this.opcode("emptyHash",r),o},blockParamIndex:function i(e){for(var t=0,s=this.options.blockParams.length;t<s;t++){var r=this.options.blockParams[t],o=r&&_utils.indexOf(r,e);if(r&&o>=0)return[t,o]}}};function precompile(i,e,t){if(i==null||typeof i!="string"&&i.type!=="Program")throw new _exception2.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+i);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var s=t.parse(i,e),r=new t.Compiler().compile(s,e);return new t.JavaScriptCompiler().compile(r,e)}function compile(i,e,t){if(e===void 0&&(e={}),i==null||typeof i!="string"&&i.type!=="Program")throw new _exception2.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+i);e=_utils.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var s=void 0;function r(){var a=t.parse(i,e),l=new t.Compiler().compile(a,e),c=new t.JavaScriptCompiler().compile(l,e,void 0,!0);return t.template(c)}function o(a,l){return s||(s=r()),s.call(this,a,l)}return o._setup=function(a){return s||(s=r()),s._setup(a)},o._child=function(a,l,c,d){return s||(s=r()),s._child(a,l,c,d)},o}function argEquals(i,e){if(i===e)return!0;if(_utils.isArray(i)&&_utils.isArray(e)&&i.length===e.length){for(var t=0;t<i.length;t++)if(!argEquals(i[t],e[t]))return!1;return!0}}function transformLiteralToPath(i){if(!i.path.parts){var e=i.path;i.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}var javascriptCompilerExports={},javascriptCompiler={get exports(){return javascriptCompilerExports},set exports(i){javascriptCompilerExports=i}},codeGenExports={},codeGen={get exports(){return codeGenExports},set exports(i){codeGenExports=i}},sourceMap={},sourceMapGenerator={},base64Vlq={},base64$1={},hasRequiredBase64;function requireBase64(){if(hasRequiredBase64)return base64$1;hasRequiredBase64=1;var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return base64$1.encode=function(e){if(0<=e&&e<i.length)return i[e];throw new TypeError("Must be between 0 and 63: "+e)},base64$1.decode=function(e){var t=65,s=90,r=97,o=122,a=48,l=57,c=43,d=47,m=26,u=52;return t<=e&&e<=s?e-t:r<=e&&e<=o?e-r+m:a<=e&&e<=l?e-a+u:e==c?62:e==d?63:-1},base64$1}var hasRequiredBase64Vlq;function requireBase64Vlq(){if(hasRequiredBase64Vlq)return base64Vlq;hasRequiredBase64Vlq=1;var i=requireBase64(),e=5,t=1<<e,s=t-1,r=t;function o(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,d=l>>1;return c?-d:d}return base64Vlq.encode=function(c){var d="",m,u=o(c);do m=u&s,u>>>=e,u>0&&(m|=r),d+=i.encode(m);while(u>0);return d},base64Vlq.decode=function(c,d,m){var u=c.length,g=0,b=0,y,S;do{if(d>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(S=i.decode(c.charCodeAt(d++)),S===-1)throw new Error("Invalid base64 digit: "+c.charAt(d-1));y=!!(S&r),S&=s,g=g+(S<<b),b+=e}while(y);m.value=a(g),m.rest=d},base64Vlq}var util={},hasRequiredUtil;function requireUtil(){return hasRequiredUtil||(hasRequiredUtil=1,function(i){function e(w,_,C){if(_ in w)return w[_];if(arguments.length===3)return C;throw new Error('"'+_+'" is a required argument.')}i.getArg=e;var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,s=/^data:.+\,.+$/;function r(w){var _=w.match(t);return _?{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}:null}i.urlParse=r;function o(w){var _="";return w.scheme&&(_+=w.scheme+":"),_+="//",w.auth&&(_+=w.auth+"@"),w.host&&(_+=w.host),w.port&&(_+=":"+w.port),w.path&&(_+=w.path),_}i.urlGenerate=o;function a(w){var _=w,C=r(w);if(C){if(!C.path)return w;_=C.path}for(var P=i.isAbsolute(_),I=_.split(/\/+/),R,N=0,G=I.length-1;G>=0;G--)R=I[G],R==="."?I.splice(G,1):R===".."?N++:N>0&&(R===""?(I.splice(G+1,N),N=0):(I.splice(G,2),N--));return _=I.join("/"),_===""&&(_=P?"/":"."),C?(C.path=_,o(C)):_}i.normalize=a;function l(w,_){w===""&&(w="."),_===""&&(_=".");var C=r(_),P=r(w);if(P&&(w=P.path||"/"),C&&!C.scheme)return P&&(C.scheme=P.scheme),o(C);if(C||_.match(s))return _;if(P&&!P.host&&!P.path)return P.host=_,o(P);var I=_.charAt(0)==="/"?_:a(w.replace(/\/+$/,"")+"/"+_);return P?(P.path=I,o(P)):I}i.join=l,i.isAbsolute=function(w){return w.charAt(0)==="/"||t.test(w)};function c(w,_){w===""&&(w="."),w=w.replace(/\/$/,"");for(var C=0;_.indexOf(w+"/")!==0;){var P=w.lastIndexOf("/");if(P<0||(w=w.slice(0,P),w.match(/^([^\/]+:\/)?\/*$/)))return _;++C}return Array(C+1).join("../")+_.substr(w.length+1)}i.relative=c;var d=function(){var w=Object.create(null);return!("__proto__"in w)}();function m(w){return w}function u(w){return b(w)?"$"+w:w}i.toSetString=d?m:u;function g(w){return b(w)?w.slice(1):w}i.fromSetString=d?m:g;function b(w){if(!w)return!1;var _=w.length;if(_<9||w.charCodeAt(_-1)!==95||w.charCodeAt(_-2)!==95||w.charCodeAt(_-3)!==111||w.charCodeAt(_-4)!==116||w.charCodeAt(_-5)!==111||w.charCodeAt(_-6)!==114||w.charCodeAt(_-7)!==112||w.charCodeAt(_-8)!==95||w.charCodeAt(_-9)!==95)return!1;for(var C=_-10;C>=0;C--)if(w.charCodeAt(C)!==36)return!1;return!0}function y(w,_,C){var P=v(w.source,_.source);return P!==0||(P=w.originalLine-_.originalLine,P!==0)||(P=w.originalColumn-_.originalColumn,P!==0||C)||(P=w.generatedColumn-_.generatedColumn,P!==0)||(P=w.generatedLine-_.generatedLine,P!==0)?P:v(w.name,_.name)}i.compareByOriginalPositions=y;function S(w,_,C){var P=w.generatedLine-_.generatedLine;return P!==0||(P=w.generatedColumn-_.generatedColumn,P!==0||C)||(P=v(w.source,_.source),P!==0)||(P=w.originalLine-_.originalLine,P!==0)||(P=w.originalColumn-_.originalColumn,P!==0)?P:v(w.name,_.name)}i.compareByGeneratedPositionsDeflated=S;function v(w,_){return w===_?0:w===null?1:_===null?-1:w>_?1:-1}function x(w,_){var C=w.generatedLine-_.generatedLine;return C!==0||(C=w.generatedColumn-_.generatedColumn,C!==0)||(C=v(w.source,_.source),C!==0)||(C=w.originalLine-_.originalLine,C!==0)||(C=w.originalColumn-_.originalColumn,C!==0)?C:v(w.name,_.name)}i.compareByGeneratedPositionsInflated=x;function A(w){return JSON.parse(w.replace(/^\)]}'[^\n]*\n/,""))}i.parseSourceMapInput=A;function E(w,_,C){if(_=_||"",w&&(w[w.length-1]!=="/"&&_[0]!=="/"&&(w+="/"),_=w+_),C){var P=r(C);if(!P)throw new Error("sourceMapURL could not be parsed");if(P.path){var I=P.path.lastIndexOf("/");I>=0&&(P.path=P.path.substring(0,I+1))}_=l(o(P),_)}return a(_)}i.computeSourceURL=E}(util)),util}var arraySet={},hasRequiredArraySet;function requireArraySet(){if(hasRequiredArraySet)return arraySet;hasRequiredArraySet=1;var i=requireUtil(),e=Object.prototype.hasOwnProperty,t=typeof Map<"u";function s(){this._array=[],this._set=t?new Map:Object.create(null)}return s.fromArray=function(o,a){for(var l=new s,c=0,d=o.length;c<d;c++)l.add(o[c],a);return l},s.prototype.size=function(){return t?this._set.size:Object.getOwnPropertyNames(this._set).length},s.prototype.add=function(o,a){var l=t?o:i.toSetString(o),c=t?this.has(o):e.call(this._set,l),d=this._array.length;(!c||a)&&this._array.push(o),c||(t?this._set.set(o,d):this._set[l]=d)},s.prototype.has=function(o){if(t)return this._set.has(o);var a=i.toSetString(o);return e.call(this._set,a)},s.prototype.indexOf=function(o){if(t){var a=this._set.get(o);if(a>=0)return a}else{var l=i.toSetString(o);if(e.call(this._set,l))return this._set[l]}throw new Error('"'+o+'" is not in the set.')},s.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},s.prototype.toArray=function(){return this._array.slice()},arraySet.ArraySet=s,arraySet}var mappingList={},hasRequiredMappingList;function requireMappingList(){if(hasRequiredMappingList)return mappingList;hasRequiredMappingList=1;var i=requireUtil();function e(s,r){var o=s.generatedLine,a=r.generatedLine,l=s.generatedColumn,c=r.generatedColumn;return a>o||a==o&&c>=l||i.compareByGeneratedPositionsInflated(s,r)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(r,o){this._array.forEach(r,o)},t.prototype.add=function(r){e(this._last,r)?(this._last=r,this._array.push(r)):(this._sorted=!1,this._array.push(r))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},mappingList.MappingList=t,mappingList}var hasRequiredSourceMapGenerator;function requireSourceMapGenerator(){if(hasRequiredSourceMapGenerator)return sourceMapGenerator;hasRequiredSourceMapGenerator=1;var i=requireBase64Vlq(),e=requireUtil(),t=requireArraySet().ArraySet,s=requireMappingList().MappingList;function r(o){o||(o={}),this._file=e.getArg(o,"file",null),this._sourceRoot=e.getArg(o,"sourceRoot",null),this._skipValidation=e.getArg(o,"skipValidation",!1),this._sources=new t,this._names=new t,this._mappings=new s,this._sourcesContents=null}return r.prototype._version=3,r.fromSourceMap=function(a){var l=a.sourceRoot,c=new r({file:a.file,sourceRoot:l});return a.eachMapping(function(d){var m={generated:{line:d.generatedLine,column:d.generatedColumn}};d.source!=null&&(m.source=d.source,l!=null&&(m.source=e.relative(l,m.source)),m.original={line:d.originalLine,column:d.originalColumn},d.name!=null&&(m.name=d.name)),c.addMapping(m)}),a.sources.forEach(function(d){var m=d;l!==null&&(m=e.relative(l,d)),c._sources.has(m)||c._sources.add(m);var u=a.sourceContentFor(d);u!=null&&c.setSourceContent(d,u)}),c},r.prototype.addMapping=function(a){var l=e.getArg(a,"generated"),c=e.getArg(a,"original",null),d=e.getArg(a,"source",null),m=e.getArg(a,"name",null);this._skipValidation||this._validateMapping(l,c,d,m),d!=null&&(d=String(d),this._sources.has(d)||this._sources.add(d)),m!=null&&(m=String(m),this._names.has(m)||this._names.add(m)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:d,name:m})},r.prototype.setSourceContent=function(a,l){var c=a;this._sourceRoot!=null&&(c=e.relative(this._sourceRoot,c)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(c)]=l):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(a,l,c){var d=l;if(l==null){if(a.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);d=a.file}var m=this._sourceRoot;m!=null&&(d=e.relative(m,d));var u=new t,g=new t;this._mappings.unsortedForEach(function(b){if(b.source===d&&b.originalLine!=null){var y=a.originalPositionFor({line:b.originalLine,column:b.originalColumn});y.source!=null&&(b.source=y.source,c!=null&&(b.source=e.join(c,b.source)),m!=null&&(b.source=e.relative(m,b.source)),b.originalLine=y.line,b.originalColumn=y.column,y.name!=null&&(b.name=y.name))}var S=b.source;S!=null&&!u.has(S)&&u.add(S);var v=b.name;v!=null&&!g.has(v)&&g.add(v)},this),this._sources=u,this._names=g,a.sources.forEach(function(b){var y=a.sourceContentFor(b);y!=null&&(c!=null&&(b=e.join(c,b)),m!=null&&(b=e.relative(m,b)),this.setSourceContent(b,y))},this)},r.prototype._validateMapping=function(a,l,c,d){if(l&&typeof l.line!="number"&&typeof l.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(a&&"line"in a&&"column"in a&&a.line>0&&a.column>=0&&!l&&!c&&!d)){if(a&&"line"in a&&"column"in a&&l&&"line"in l&&"column"in l&&a.line>0&&a.column>=0&&l.line>0&&l.column>=0&&c)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:a,source:c,original:l,name:d}))}},r.prototype._serializeMappings=function(){for(var a=0,l=1,c=0,d=0,m=0,u=0,g="",b,y,S,v,x=this._mappings.toArray(),A=0,E=x.length;A<E;A++){if(y=x[A],b="",y.generatedLine!==l)for(a=0;y.generatedLine!==l;)b+=";",l++;else if(A>0){if(!e.compareByGeneratedPositionsInflated(y,x[A-1]))continue;b+=","}b+=i.encode(y.generatedColumn-a),a=y.generatedColumn,y.source!=null&&(v=this._sources.indexOf(y.source),b+=i.encode(v-u),u=v,b+=i.encode(y.originalLine-1-d),d=y.originalLine-1,b+=i.encode(y.originalColumn-c),c=y.originalColumn,y.name!=null&&(S=this._names.indexOf(y.name),b+=i.encode(S-m),m=S)),g+=b}return g},r.prototype._generateSourcesContent=function(a,l){return a.map(function(c){if(!this._sourcesContents)return null;l!=null&&(c=e.relative(l,c));var d=e.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,d)?this._sourcesContents[d]:null},this)},r.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},sourceMapGenerator.SourceMapGenerator=r,sourceMapGenerator}var sourceMapConsumer={},binarySearch={},hasRequiredBinarySearch;function requireBinarySearch(){return hasRequiredBinarySearch||(hasRequiredBinarySearch=1,function(i){i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2;function e(t,s,r,o,a,l){var c=Math.floor((s-t)/2)+t,d=a(r,o[c],!0);return d===0?c:d>0?s-c>1?e(c,s,r,o,a,l):l==i.LEAST_UPPER_BOUND?s<o.length?s:-1:c:c-t>1?e(t,c,r,o,a,l):l==i.LEAST_UPPER_BOUND?c:t<0?-1:t}i.search=function(s,r,o,a){if(r.length===0)return-1;var l=e(-1,r.length,s,r,o,a||i.GREATEST_LOWER_BOUND);if(l<0)return-1;for(;l-1>=0&&o(r[l],r[l-1],!0)===0;)--l;return l}}(binarySearch)),binarySearch}var quickSort={},hasRequiredQuickSort;function requireQuickSort(){if(hasRequiredQuickSort)return quickSort;hasRequiredQuickSort=1;function i(s,r,o){var a=s[r];s[r]=s[o],s[o]=a}function e(s,r){return Math.round(s+Math.random()*(r-s))}function t(s,r,o,a){if(o<a){var l=e(o,a),c=o-1;i(s,l,a);for(var d=s[a],m=o;m<a;m++)r(s[m],d)<=0&&(c+=1,i(s,c,m));i(s,c+1,m);var u=c+1;t(s,r,o,u-1),t(s,r,u+1,a)}}return quickSort.quickSort=function(s,r){t(s,r,0,s.length-1)},quickSort}var hasRequiredSourceMapConsumer;function requireSourceMapConsumer(){if(hasRequiredSourceMapConsumer)return sourceMapConsumer;hasRequiredSourceMapConsumer=1;var i=requireUtil(),e=requireBinarySearch(),t=requireArraySet().ArraySet,s=requireBase64Vlq(),r=requireQuickSort().quickSort;function o(d,m){var u=d;return typeof d=="string"&&(u=i.parseSourceMapInput(d)),u.sections!=null?new c(u,m):new a(u,m)}o.fromSourceMap=function(d,m){return a.fromSourceMap(d,m)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(m,u){var g=m.charAt(u);return g===";"||g===","},o.prototype._parseMappings=function(m,u){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(m,u,g){var b=u||null,y=g||o.GENERATED_ORDER,S;switch(y){case o.GENERATED_ORDER:S=this._generatedMappings;break;case o.ORIGINAL_ORDER:S=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var v=this.sourceRoot;S.map(function(x){var A=x.source===null?null:this._sources.at(x.source);return A=i.computeSourceURL(v,A,this._sourceMapURL),{source:A,generatedLine:x.generatedLine,generatedColumn:x.generatedColumn,originalLine:x.originalLine,originalColumn:x.originalColumn,name:x.name===null?null:this._names.at(x.name)}},this).forEach(m,b)},o.prototype.allGeneratedPositionsFor=function(m){var u=i.getArg(m,"line"),g={source:i.getArg(m,"source"),originalLine:u,originalColumn:i.getArg(m,"column",0)};if(g.source=this._findSourceIndex(g.source),g.source<0)return[];var b=[],y=this._findMapping(g,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,e.LEAST_UPPER_BOUND);if(y>=0){var S=this._originalMappings[y];if(m.column===void 0)for(var v=S.originalLine;S&&S.originalLine===v;)b.push({line:i.getArg(S,"generatedLine",null),column:i.getArg(S,"generatedColumn",null),lastColumn:i.getArg(S,"lastGeneratedColumn",null)}),S=this._originalMappings[++y];else for(var x=S.originalColumn;S&&S.originalLine===u&&S.originalColumn==x;)b.push({line:i.getArg(S,"generatedLine",null),column:i.getArg(S,"generatedColumn",null),lastColumn:i.getArg(S,"lastGeneratedColumn",null)}),S=this._originalMappings[++y]}return b},sourceMapConsumer.SourceMapConsumer=o;function a(d,m){var u=d;typeof d=="string"&&(u=i.parseSourceMapInput(d));var g=i.getArg(u,"version"),b=i.getArg(u,"sources"),y=i.getArg(u,"names",[]),S=i.getArg(u,"sourceRoot",null),v=i.getArg(u,"sourcesContent",null),x=i.getArg(u,"mappings"),A=i.getArg(u,"file",null);if(g!=this._version)throw new Error("Unsupported version: "+g);S&&(S=i.normalize(S)),b=b.map(String).map(i.normalize).map(function(E){return S&&i.isAbsolute(S)&&i.isAbsolute(E)?i.relative(S,E):E}),this._names=t.fromArray(y.map(String),!0),this._sources=t.fromArray(b,!0),this._absoluteSources=this._sources.toArray().map(function(E){return i.computeSourceURL(S,E,m)}),this.sourceRoot=S,this.sourcesContent=v,this._mappings=x,this._sourceMapURL=m,this.file=A}a.prototype=Object.create(o.prototype),a.prototype.consumer=o,a.prototype._findSourceIndex=function(d){var m=d;if(this.sourceRoot!=null&&(m=i.relative(this.sourceRoot,m)),this._sources.has(m))return this._sources.indexOf(m);var u;for(u=0;u<this._absoluteSources.length;++u)if(this._absoluteSources[u]==d)return u;return-1},a.fromSourceMap=function(m,u){var g=Object.create(a.prototype),b=g._names=t.fromArray(m._names.toArray(),!0),y=g._sources=t.fromArray(m._sources.toArray(),!0);g.sourceRoot=m._sourceRoot,g.sourcesContent=m._generateSourcesContent(g._sources.toArray(),g.sourceRoot),g.file=m._file,g._sourceMapURL=u,g._absoluteSources=g._sources.toArray().map(function(C){return i.computeSourceURL(g.sourceRoot,C,u)});for(var S=m._mappings.toArray().slice(),v=g.__generatedMappings=[],x=g.__originalMappings=[],A=0,E=S.length;A<E;A++){var w=S[A],_=new l;_.generatedLine=w.generatedLine,_.generatedColumn=w.generatedColumn,w.source&&(_.source=y.indexOf(w.source),_.originalLine=w.originalLine,_.originalColumn=w.originalColumn,w.name&&(_.name=b.indexOf(w.name)),x.push(_)),v.push(_)}return r(g.__originalMappings,i.compareByOriginalPositions),g},a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}a.prototype._parseMappings=function(m,u){for(var g=1,b=0,y=0,S=0,v=0,x=0,A=m.length,E=0,w={},_={},C=[],P=[],I,R,N,G,B;E<A;)if(m.charAt(E)===";")g++,E++,b=0;else if(m.charAt(E)===",")E++;else{for(I=new l,I.generatedLine=g,G=E;G<A&&!this._charIsMappingSeparator(m,G);G++);if(R=m.slice(E,G),N=w[R],N)E+=R.length;else{for(N=[];E<G;)s.decode(m,E,_),B=_.value,E=_.rest,N.push(B);if(N.length===2)throw new Error("Found a source, but no line and column");if(N.length===3)throw new Error("Found a source and line, but no column");w[R]=N}I.generatedColumn=b+N[0],b=I.generatedColumn,N.length>1&&(I.source=v+N[1],v+=N[1],I.originalLine=y+N[2],y=I.originalLine,I.originalLine+=1,I.originalColumn=S+N[3],S=I.originalColumn,N.length>4&&(I.name=x+N[4],x+=N[4])),P.push(I),typeof I.originalLine=="number"&&C.push(I)}r(P,i.compareByGeneratedPositionsDeflated),this.__generatedMappings=P,r(C,i.compareByOriginalPositions),this.__originalMappings=C},a.prototype._findMapping=function(m,u,g,b,y,S){if(m[g]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+m[g]);if(m[b]<0)throw new TypeError("Column must be greater than or equal to 0, got "+m[b]);return e.search(m,u,y,S)},a.prototype.computeColumnSpans=function(){for(var m=0;m<this._generatedMappings.length;++m){var u=this._generatedMappings[m];if(m+1<this._generatedMappings.length){var g=this._generatedMappings[m+1];if(u.generatedLine===g.generatedLine){u.lastGeneratedColumn=g.generatedColumn-1;continue}}u.lastGeneratedColumn=1/0}},a.prototype.originalPositionFor=function(m){var u={generatedLine:i.getArg(m,"line"),generatedColumn:i.getArg(m,"column")},g=this._findMapping(u,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositionsDeflated,i.getArg(m,"bias",o.GREATEST_LOWER_BOUND));if(g>=0){var b=this._generatedMappings[g];if(b.generatedLine===u.generatedLine){var y=i.getArg(b,"source",null);y!==null&&(y=this._sources.at(y),y=i.computeSourceURL(this.sourceRoot,y,this._sourceMapURL));var S=i.getArg(b,"name",null);return S!==null&&(S=this._names.at(S)),{source:y,line:i.getArg(b,"originalLine",null),column:i.getArg(b,"originalColumn",null),name:S}}}return{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(m){return m==null}):!1},a.prototype.sourceContentFor=function(m,u){if(!this.sourcesContent)return null;var g=this._findSourceIndex(m);if(g>=0)return this.sourcesContent[g];var b=m;this.sourceRoot!=null&&(b=i.relative(this.sourceRoot,b));var y;if(this.sourceRoot!=null&&(y=i.urlParse(this.sourceRoot))){var S=b.replace(/^file:\/\//,"");if(y.scheme=="file"&&this._sources.has(S))return this.sourcesContent[this._sources.indexOf(S)];if((!y.path||y.path=="/")&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}if(u)return null;throw new Error('"'+b+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(m){var u=i.getArg(m,"source");if(u=this._findSourceIndex(u),u<0)return{line:null,column:null,lastColumn:null};var g={source:u,originalLine:i.getArg(m,"line"),originalColumn:i.getArg(m,"column")},b=this._findMapping(g,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(m,"bias",o.GREATEST_LOWER_BOUND));if(b>=0){var y=this._originalMappings[b];if(y.source===g.source)return{line:i.getArg(y,"generatedLine",null),column:i.getArg(y,"generatedColumn",null),lastColumn:i.getArg(y,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},sourceMapConsumer.BasicSourceMapConsumer=a;function c(d,m){var u=d;typeof d=="string"&&(u=i.parseSourceMapInput(d));var g=i.getArg(u,"version"),b=i.getArg(u,"sections");if(g!=this._version)throw new Error("Unsupported version: "+g);this._sources=new t,this._names=new t;var y={line:-1,column:0};this._sections=b.map(function(S){if(S.url)throw new Error("Support for url field in sections not implemented.");var v=i.getArg(S,"offset"),x=i.getArg(v,"line"),A=i.getArg(v,"column");if(x<y.line||x===y.line&&A<y.column)throw new Error("Section offsets must be ordered and non-overlapping.");return y=v,{generatedOffset:{generatedLine:x+1,generatedColumn:A+1},consumer:new o(i.getArg(S,"map"),m)}})}return c.prototype=Object.create(o.prototype),c.prototype.constructor=o,c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){for(var d=[],m=0;m<this._sections.length;m++)for(var u=0;u<this._sections[m].consumer.sources.length;u++)d.push(this._sections[m].consumer.sources[u]);return d}}),c.prototype.originalPositionFor=function(m){var u={generatedLine:i.getArg(m,"line"),generatedColumn:i.getArg(m,"column")},g=e.search(u,this._sections,function(y,S){var v=y.generatedLine-S.generatedOffset.generatedLine;return v||y.generatedColumn-S.generatedOffset.generatedColumn}),b=this._sections[g];return b?b.consumer.originalPositionFor({line:u.generatedLine-(b.generatedOffset.generatedLine-1),column:u.generatedColumn-(b.generatedOffset.generatedLine===u.generatedLine?b.generatedOffset.generatedColumn-1:0),bias:m.bias}):{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(m){return m.consumer.hasContentsOfAllSources()})},c.prototype.sourceContentFor=function(m,u){for(var g=0;g<this._sections.length;g++){var b=this._sections[g],y=b.consumer.sourceContentFor(m,!0);if(y)return y}if(u)return null;throw new Error('"'+m+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(m){for(var u=0;u<this._sections.length;u++){var g=this._sections[u];if(g.consumer._findSourceIndex(i.getArg(m,"source"))!==-1){var b=g.consumer.generatedPositionFor(m);if(b){var y={line:b.line+(g.generatedOffset.generatedLine-1),column:b.column+(g.generatedOffset.generatedLine===b.line?g.generatedOffset.generatedColumn-1:0)};return y}}}return{line:null,column:null}},c.prototype._parseMappings=function(m,u){this.__generatedMappings=[],this.__originalMappings=[];for(var g=0;g<this._sections.length;g++)for(var b=this._sections[g],y=b.consumer._generatedMappings,S=0;S<y.length;S++){var v=y[S],x=b.consumer._sources.at(v.source);x=i.computeSourceURL(b.consumer.sourceRoot,x,this._sourceMapURL),this._sources.add(x),x=this._sources.indexOf(x);var A=null;v.name&&(A=b.consumer._names.at(v.name),this._names.add(A),A=this._names.indexOf(A));var E={source:x,generatedLine:v.generatedLine+(b.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+(b.generatedOffset.generatedLine===v.generatedLine?b.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:A};this.__generatedMappings.push(E),typeof E.originalLine=="number"&&this.__originalMappings.push(E)}r(this.__generatedMappings,i.compareByGeneratedPositionsDeflated),r(this.__originalMappings,i.compareByOriginalPositions)},sourceMapConsumer.IndexedSourceMapConsumer=c,sourceMapConsumer}var sourceNode={},hasRequiredSourceNode;function requireSourceNode(){if(hasRequiredSourceNode)return sourceNode;hasRequiredSourceNode=1;var i=requireSourceMapGenerator().SourceMapGenerator,e=requireUtil(),t=/(\r?\n)/,s=10,r="$$$isSourceNode$$$";function o(a,l,c,d,m){this.children=[],this.sourceContents={},this.line=a==null?null:a,this.column=l==null?null:l,this.source=c==null?null:c,this.name=m==null?null:m,this[r]=!0,d!=null&&this.add(d)}return o.fromStringWithSourceMap=function(l,c,d){var m=new o,u=l.split(t),g=0,b=function(){var A=w(),E=w()||"";return A+E;function w(){return g<u.length?u[g++]:void 0}},y=1,S=0,v=null;return c.eachMapping(function(A){if(v!==null)if(y<A.generatedLine)x(v,b()),y++,S=0;else{var E=u[g]||"",w=E.substr(0,A.generatedColumn-S);u[g]=E.substr(A.generatedColumn-S),S=A.generatedColumn,x(v,w),v=A;return}for(;y<A.generatedLine;)m.add(b()),y++;if(S<A.generatedColumn){var E=u[g]||"";m.add(E.substr(0,A.generatedColumn)),u[g]=E.substr(A.generatedColumn),S=A.generatedColumn}v=A},this),g<u.length&&(v&&x(v,b()),m.add(u.splice(g).join(""))),c.sources.forEach(function(A){var E=c.sourceContentFor(A);E!=null&&(d!=null&&(A=e.join(d,A)),m.setSourceContent(A,E))}),m;function x(A,E){if(A===null||A.source===void 0)m.add(E);else{var w=d?e.join(d,A.source):A.source;m.add(new o(A.originalLine,A.originalColumn,w,E,A.name))}}},o.prototype.add=function(l){if(Array.isArray(l))l.forEach(function(c){this.add(c)},this);else if(l[r]||typeof l=="string")l&&this.children.push(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},o.prototype.prepend=function(l){if(Array.isArray(l))for(var c=l.length-1;c>=0;c--)this.prepend(l[c]);else if(l[r]||typeof l=="string")this.children.unshift(l);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+l);return this},o.prototype.walk=function(l){for(var c,d=0,m=this.children.length;d<m;d++)c=this.children[d],c[r]?c.walk(l):c!==""&&l(c,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(l){var c,d,m=this.children.length;if(m>0){for(c=[],d=0;d<m-1;d++)c.push(this.children[d]),c.push(l);c.push(this.children[d]),this.children=c}return this},o.prototype.replaceRight=function(l,c){var d=this.children[this.children.length-1];return d[r]?d.replaceRight(l,c):typeof d=="string"?this.children[this.children.length-1]=d.replace(l,c):this.children.push("".replace(l,c)),this},o.prototype.setSourceContent=function(l,c){this.sourceContents[e.toSetString(l)]=c},o.prototype.walkSourceContents=function(l){for(var c=0,d=this.children.length;c<d;c++)this.children[c][r]&&this.children[c].walkSourceContents(l);for(var m=Object.keys(this.sourceContents),c=0,d=m.length;c<d;c++)l(e.fromSetString(m[c]),this.sourceContents[m[c]])},o.prototype.toString=function(){var l="";return this.walk(function(c){l+=c}),l},o.prototype.toStringWithSourceMap=function(l){var c={code:"",line:1,column:0},d=new i(l),m=!1,u=null,g=null,b=null,y=null;return this.walk(function(S,v){c.code+=S,v.source!==null&&v.line!==null&&v.column!==null?((u!==v.source||g!==v.line||b!==v.column||y!==v.name)&&d.addMapping({source:v.source,original:{line:v.line,column:v.column},generated:{line:c.line,column:c.column},name:v.name}),u=v.source,g=v.line,b=v.column,y=v.name,m=!0):m&&(d.addMapping({generated:{line:c.line,column:c.column}}),u=null,m=!1);for(var x=0,A=S.length;x<A;x++)S.charCodeAt(x)===s?(c.line++,c.column=0,x+1===A?(u=null,m=!1):m&&d.addMapping({source:v.source,original:{line:v.line,column:v.column},generated:{line:c.line,column:c.column},name:v.name})):c.column++}),this.walkSourceContents(function(S,v){d.setSourceContent(S,v)}),{code:c.code,map:d}},sourceNode.SourceNode=o,sourceNode}var hasRequiredSourceMap;function requireSourceMap(){return hasRequiredSourceMap||(hasRequiredSourceMap=1,sourceMap.SourceMapGenerator=requireSourceMapGenerator().SourceMapGenerator,sourceMap.SourceMapConsumer=requireSourceMapConsumer().SourceMapConsumer,sourceMap.SourceNode=requireSourceNode().SourceNode),sourceMap}(function(i,e){e.__esModule=!0;var t=utils,s=void 0;try{var r=requireSourceMap();s=r.SourceNode}catch(l){}s||(s=function(l,c,d,m){this.src="",m&&this.add(m)},s.prototype={add:function(c){t.isArray(c)&&(c=c.join("")),this.src+=c},prepend:function(c){t.isArray(c)&&(c=c.join("")),this.src=c+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function o(l,c,d){if(t.isArray(l)){for(var m=[],u=0,g=l.length;u<g;u++)m.push(c.wrap(l[u],d));return m}else if(typeof l=="boolean"||typeof l=="number")return l+"";return l}function a(l){this.srcFile=l,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(c,d){this.source.unshift(this.wrap(c,d))},push:function(c,d){this.source.push(this.wrap(c,d))},merge:function(){var c=this.empty();return this.each(function(d){c.add([" ",d,`
- `])}),c},each:function(c){for(var d=0,m=this.source.length;d<m;d++)c(this.source[d])},empty:function(){var c=this.currentLocation||{start:{}};return new s(c.start.line,c.start.column,this.srcFile)},wrap:function(c){var d=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return c instanceof s?c:(c=o(c,this,d),new s(d.start.line,d.start.column,this.srcFile,c))},functionCall:function(c,d,m){return m=this.generateList(m),this.wrap([c,d?"."+d+"(":"(",m,")"])},quotedString:function(c){return'"'+(c+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(c){var d=this,m=[];Object.keys(c).forEach(function(g){var b=o(c[g],d);b!=="undefined"&&m.push([d.quotedString(g),":",b])});var u=this.generateList(m);return u.prepend("{"),u.add("}"),u},generateList:function(c){for(var d=this.empty(),m=0,u=c.length;m<u;m++)m&&d.add(","),d.add(o(c[m],this));return d},generateArray:function(c){var d=this.generateList(c);return d.prepend("["),d.add("]"),d}},e.default=a,i.exports=e.default})(codeGen,codeGenExports);(function(i,e){e.__esModule=!0;function t(g){return g&&g.__esModule?g:{default:g}}var s=base$1,r=exceptionExports,o=t(r),a=utils,l=codeGenExports,c=t(l);function d(g){this.value=g}function m(){}m.prototype={nameLookup:function(b,y){return this.internalNameLookup(b,y)},depthedLookup:function(b){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(b),")"]},compilerInfo:function(){var b=s.COMPILER_REVISION,y=s.REVISION_CHANGES[b];return[b,y]},appendToBuffer:function(b,y,S){return a.isArray(b)||(b=[b]),b=this.source.wrap(b,y),this.environment.isSimple?["return ",b,";"]:S?["buffer += ",b,";"]:(b.appendToBuffer=!0,b)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(b,y){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",b,",",JSON.stringify(y),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(b,y,S,v){this.environment=b,this.options=y,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!v,this.name=this.environment.name,this.isChild=!!S,this.context=S||{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(b,y),this.useDepths=this.useDepths||b.useDepths||b.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||b.useBlockParams;var x=b.opcodes,A=void 0,E=void 0,w=void 0,_=void 0;for(w=0,_=x.length;w<_;w++)A=x[w],this.source.currentLocation=A.loc,E=E||A.loc,this[A.opcode].apply(this,A.args);if(this.source.currentLocation=E,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new o.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
- `]),this.decorators.push("return fn;"),v?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
- `),this.decorators.push(`}
- `),this.decorators=this.decorators.merge()));var C=this.createFunctionContext(v);if(this.isChild)return C;var P={compiler:this.compilerInfo(),main:C};this.decorators&&(P.main_d=this.decorators,P.useDecorators=!0);var I=this.context,R=I.programs,N=I.decorators;for(w=0,_=R.length;w<_;w++)R[w]&&(P[w]=R[w],N[w]&&(P[w+"_d"]=N[w],P.useDecorators=!0));return this.environment.usePartial&&(P.usePartial=!0),this.options.data&&(P.useData=!0),this.useDepths&&(P.useDepths=!0),this.useBlockParams&&(P.useBlockParams=!0),this.options.compat&&(P.compat=!0),v?P.compilerOptions=this.options:(P.compiler=JSON.stringify(P.compiler),this.source.currentLocation={start:{line:1,column:0}},P=this.objectLiteral(P),y.srcName?(P=P.toStringWithSourceMap({file:y.destName}),P.map=P.map&&P.map.toString()):P=P.toString()),P},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(b){var y=this,S="",v=this.stackVars.concat(this.registers.list);v.length>0&&(S+=", "+v.join(", "));var x=0;Object.keys(this.aliases).forEach(function(w){var _=y.aliases[w];_.children&&_.referenceCount>1&&(S+=", alias"+ ++x+"="+w,_.children[0]="alias"+x)}),this.lookupPropertyFunctionIsUsed&&(S+=", "+this.lookupPropertyFunctionVarDeclaration());var A=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&A.push("blockParams"),this.useDepths&&A.push("depths");var E=this.mergeSource(S);return b?(A.push(E),Function.apply(this,A)):this.source.wrap(["function(",A.join(","),`) {
- `,E,"}"])},mergeSource:function(b){var y=this.environment.isSimple,S=!this.forceBuffer,v=void 0,x=void 0,A=void 0,E=void 0;return this.source.each(function(w){w.appendToBuffer?(A?w.prepend(" + "):A=w,E=w):(A&&(x?A.prepend("buffer += "):v=!0,E.add(";"),A=E=void 0),x=!0,y||(S=!1))}),S?A?(A.prepend("return "),E.add(";")):x||this.source.push('return "";'):(b+=", buffer = "+(v?"":this.initializeBuffer()),A?(A.prepend("return buffer + "),E.add(";")):this.source.push("return buffer;")),b&&this.source.prepend("var "+b.substring(2)+(v?"":`;
- `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
- lookupProperty = container.lookupProperty || function(parent, propertyName) {
- if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
- return parent[propertyName];
- }
- return undefined
- }
- `.trim()},blockValue:function(b){var y=this.aliasable("container.hooks.blockHelperMissing"),S=[this.contextName(0)];this.setupHelperArgs(b,0,S);var v=this.popStack();S.splice(1,0,v),this.push(this.source.functionCall(y,"call",S))},ambiguousBlockValue:function(){var b=this.aliasable("container.hooks.blockHelperMissing"),y=[this.contextName(0)];this.setupHelperArgs("",0,y,!0),this.flushInline();var S=this.topStack();y.splice(1,0,S),this.pushSource(["if (!",this.lastHelper,") { ",S," = ",this.source.functionCall(b,"call",y),"}"])},appendContent:function(b){this.pendingContent?b=this.pendingContent+b:this.pendingLocation=this.source.currentLocation,this.pendingContent=b},append:function(){if(this.isInline())this.replaceStack(function(y){return[" != null ? ",y,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var b=this.popStack();this.pushSource(["if (",b," != null) { ",this.appendToBuffer(b,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(b){this.lastContext=b},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(b,y,S,v){var x=0;!v&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(b[x++])):this.pushContext(),this.resolvePath("context",b,x,y,S)},lookupBlockParam:function(b,y){this.useBlockParams=!0,this.push(["blockParams[",b[0],"][",b[1],"]"]),this.resolvePath("context",y,1)},lookupData:function(b,y,S){b?this.pushStackLiteral("container.data(data, "+b+")"):this.pushStackLiteral("data"),this.resolvePath("data",y,0,!0,S)},resolvePath:function(b,y,S,v,x){var A=this;if(this.options.strict||this.options.assumeObjects){this.push(u(this.options.strict&&x,this,y,S,b));return}for(var E=y.length;S<E;S++)this.replaceStack(function(w){var _=A.nameLookup(w,y[S],b);return v?[" && ",_]:[" != null ? ",_," : ",w]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(b,y){this.pushContext(),this.pushString(y),y!=="SubExpression"&&(typeof b=="string"?this.pushString(b):this.pushStackLiteral(b))},emptyHash:function(b){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(b?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var b=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(b.ids)),this.stringParams&&(this.push(this.objectLiteral(b.contexts)),this.push(this.objectLiteral(b.types))),this.push(this.objectLiteral(b.values))},pushString:function(b){this.pushStackLiteral(this.quotedString(b))},pushLiteral:function(b){this.pushStackLiteral(b)},pushProgram:function(b){b!=null?this.pushStackLiteral(this.programExpression(b)):this.pushStackLiteral(null)},registerDecorator:function(b,y){var S=this.nameLookup("decorators",y,"decorator"),v=this.setupHelperArgs(y,b);this.decorators.push(["fn = ",this.decorators.functionCall(S,"",["fn","props","container",v])," || fn;"])},invokeHelper:function(b,y,S){var v=this.popStack(),x=this.setupHelper(b,y),A=[];S&&A.push(x.name),A.push(v),this.options.strict||A.push(this.aliasable("container.hooks.helperMissing"));var E=["(",this.itemsSeparatedBy(A,"||"),")"],w=this.source.functionCall(E,"call",x.callParams);this.push(w)},itemsSeparatedBy:function(b,y){var S=[];S.push(b[0]);for(var v=1;v<b.length;v++)S.push(y,b[v]);return S},invokeKnownHelper:function(b,y){var S=this.setupHelper(b,y);this.push(this.source.functionCall(S.name,"call",S.callParams))},invokeAmbiguous:function(b,y){this.useRegister("helper");var S=this.popStack();this.emptyHash();var v=this.setupHelper(0,b,y),x=this.lastHelper=this.nameLookup("helpers",b,"helper"),A=["(","(helper = ",x," || ",S,")"];this.options.strict||(A[0]="(helper = ",A.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",A,v.paramsInit?["),(",v.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",v.callParams)," : helper))"])},invokePartial:function(b,y,S){var v=[],x=this.setupParams(y,1,v);b&&(y=this.popStack(),delete x.name),S&&(x.indent=JSON.stringify(S)),x.helpers="helpers",x.partials="partials",x.decorators="container.decorators",b?v.unshift(y):v.unshift(this.nameLookup("partials",y,"partial")),this.options.compat&&(x.depths="depths"),x=this.objectLiteral(x),v.push(x),this.push(this.source.functionCall("container.invokePartial","",v))},assignToHash:function(b){var y=this.popStack(),S=void 0,v=void 0,x=void 0;this.trackIds&&(x=this.popStack()),this.stringParams&&(v=this.popStack(),S=this.popStack());var A=this.hash;S&&(A.contexts[b]=S),v&&(A.types[b]=v),x&&(A.ids[b]=x),A.values[b]=y},pushId:function(b,y,S){b==="BlockParam"?this.pushStackLiteral("blockParams["+y[0]+"].path["+y[1]+"]"+(S?" + "+JSON.stringify("."+S):"")):b==="PathExpression"?this.pushString(y):b==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:m,compileChildren:function(b,y){for(var S=b.children,v=void 0,x=void 0,A=0,E=S.length;A<E;A++){v=S[A],x=new this.compiler;var w=this.matchExistingProgram(v);if(w==null){this.context.programs.push("");var _=this.context.programs.length;v.index=_,v.name="program"+_,this.context.programs[_]=x.compile(v,y,this.context,!this.precompile),this.context.decorators[_]=x.decorators,this.context.environments[_]=v,this.useDepths=this.useDepths||x.useDepths,this.useBlockParams=this.useBlockParams||x.useBlockParams,v.useDepths=this.useDepths,v.useBlockParams=this.useBlockParams}else v.index=w.index,v.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams}},matchExistingProgram:function(b){for(var y=0,S=this.context.environments.length;y<S;y++){var v=this.context.environments[y];if(v&&v.equals(b))return v}},programExpression:function(b){var y=this.environment.children[b],S=[y.index,"data",y.blockParams];return(this.useBlockParams||this.useDepths)&&S.push("blockParams"),this.useDepths&&S.push("depths"),"container.program("+S.join(", ")+")"},useRegister:function(b){this.registers[b]||(this.registers[b]=!0,this.registers.list.push(b))},push:function(b){return b instanceof d||(b=this.source.wrap(b)),this.inlineStack.push(b),b},pushStackLiteral:function(b){this.push(new d(b))},pushSource:function(b){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),b&&this.source.push(b)},replaceStack:function(b){var y=["("],S=void 0,v=void 0,x=void 0;if(!this.isInline())throw new o.default("replaceStack on non-inline");var A=this.popStack(!0);if(A instanceof d)S=[A.value],y=["(",S],x=!0;else{v=!0;var E=this.incrStack();y=["((",this.push(E)," = ",A,")"],S=this.topStack()}var w=b.call(this,S);x||this.popStack(),v&&this.stackSlot--,this.push(y.concat(w,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var b=this.inlineStack;this.inlineStack=[];for(var y=0,S=b.length;y<S;y++){var v=b[y];if(v instanceof d)this.compileStack.push(v);else{var x=this.incrStack();this.pushSource([x," = ",v,";"]),this.compileStack.push(x)}}},isInline:function(){return this.inlineStack.length},popStack:function(b){var y=this.isInline(),S=(y?this.inlineStack:this.compileStack).pop();if(!b&&S instanceof d)return S.value;if(!y){if(!this.stackSlot)throw new o.default("Invalid stack pop");this.stackSlot--}return S},topStack:function(){var b=this.isInline()?this.inlineStack:this.compileStack,y=b[b.length-1];return y instanceof d?y.value:y},contextName:function(b){return this.useDepths&&b?"depths["+b+"]":"depth"+b},quotedString:function(b){return this.source.quotedString(b)},objectLiteral:function(b){return this.source.objectLiteral(b)},aliasable:function(b){var y=this.aliases[b];return y?(y.referenceCount++,y):(y=this.aliases[b]=this.source.wrap(b),y.aliasable=!0,y.referenceCount=1,y)},setupHelper:function(b,y,S){var v=[],x=this.setupHelperArgs(y,b,v,S),A=this.nameLookup("helpers",y,"helper"),E=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:v,paramsInit:x,name:A,callParams:[E].concat(v)}},setupParams:function(b,y,S){var v={},x=[],A=[],E=[],w=!S,_=void 0;w&&(S=[]),v.name=this.quotedString(b),v.hash=this.popStack(),this.trackIds&&(v.hashIds=this.popStack()),this.stringParams&&(v.hashTypes=this.popStack(),v.hashContexts=this.popStack());var C=this.popStack(),P=this.popStack();(P||C)&&(v.fn=P||"container.noop",v.inverse=C||"container.noop");for(var I=y;I--;)_=this.popStack(),S[I]=_,this.trackIds&&(E[I]=this.popStack()),this.stringParams&&(A[I]=this.popStack(),x[I]=this.popStack());return w&&(v.args=this.source.generateArray(S)),this.trackIds&&(v.ids=this.source.generateArray(E)),this.stringParams&&(v.types=this.source.generateArray(A),v.contexts=this.source.generateArray(x)),this.options.data&&(v.data="data"),this.useBlockParams&&(v.blockParams="blockParams"),v},setupHelperArgs:function(b,y,S,v){var x=this.setupParams(b,y,S);return x.loc=JSON.stringify(this.source.currentLocation),x=this.objectLiteral(x),v?(this.useRegister("options"),S.push("options"),["options=",x]):S?(S.push(x),""):x}},function(){for(var g="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=m.RESERVED_WORDS={},y=0,S=g.length;y<S;y++)b[g[y]]=!0}(),m.isValidJavaScriptVariableName=function(g){return!m.RESERVED_WORDS[g]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(g)};function u(g,b,y,S,v){var x=b.popStack(),A=y.length;for(g&&A--;S<A;S++)x=b.nameLookup(x,y[S],v);return g?[b.aliasable("container.strict"),"(",x,", ",b.quotedString(y[S]),", ",JSON.stringify(b.source.currentLocation)," )"]:x}e.default=m,i.exports=e.default})(javascriptCompiler,javascriptCompilerExports);(function(i,e){e.__esModule=!0;function t(A){return A&&A.__esModule?A:{default:A}}var s=handlebars_runtimeExports,r=t(s),o=astExports,a=t(o),l=base,c=compiler,d=javascriptCompilerExports,m=t(d),u=visitorExports,g=t(u),b=noConflictExports,y=t(b),S=r.default.create;function v(){var A=S();return A.compile=function(E,w){return c.compile(E,w,A)},A.precompile=function(E,w){return c.precompile(E,w,A)},A.AST=a.default,A.Compiler=c.Compiler,A.JavaScriptCompiler=m.default,A.Parser=l.parser,A.parse=l.parse,A.parseWithoutProcessing=l.parseWithoutProcessing,A}var x=v();x.create=v,y.default(x),x.Visitor=g.default,x.default=x,e.default=x,i.exports=e.default})(handlebars,handlebarsExports);const createIsSecureContext=i=>i!==null&&i.isSecureContext,createNativeAudioBufferConstructor=i=>i===null?null:i.hasOwnProperty("AudioBuffer")?i.AudioBuffer:null,createNativeAudioContextConstructor=i=>i===null?null:i.hasOwnProperty("AudioContext")?i.AudioContext:i.hasOwnProperty("webkitAudioContext")?i.webkitAudioContext:null,createNativeAudioWorkletNodeConstructor=i=>i===null?null:i.hasOwnProperty("AudioWorkletNode")?i.AudioWorkletNode:null,createNativeOfflineAudioContextConstructor=i=>i===null?null:i.hasOwnProperty("OfflineAudioContext")?i.OfflineAudioContext:i.hasOwnProperty("webkitOfflineAudioContext")?i.webkitOfflineAudioContext:null,createWindow=()=>typeof window>"u"?null:window,window$1=createWindow();createNativeOfflineAudioContextConstructor(window$1);createNativeAudioContextConstructor(window$1);createNativeAudioWorkletNodeConstructor(window$1);createNativeAudioBufferConstructor(window$1);createIsSecureContext(window$1);var libExports$2={},lib$2={get exports(){return libExports$2},set exports(i){libExports$2=i}},libExports$1={},lib$1={get exports(){return libExports$1},set exports(i){libExports$1=i}};function b64ToUint6(i){return i>64&&i<91?i-65:i>96&&i<123?i-71:i>47&&i<58?i+4:i===43?62:i===47?63:0}function decode(i,e){for(var t=i.replace(/[^A-Za-z0-9\+\/]/g,""),s=t.length,r=e?Math.ceil((s*3+1>>2)/e)*e:s*3+1>>2,o=new Uint8Array(r),a,l,c=0,d=0,m=0;m<s;m++)if(l=m&3,c|=b64ToUint6(t.charCodeAt(m))<<18-6*l,l===3||s-m===1){for(a=0;a<3&&d<r;a++,d++)o[d]=c>>>(16>>>a&24)&255;c=0}return o}var base64={decode},fetch$1=function(i,e){return new Promise(function(t,s){var r=new XMLHttpRequest;e&&(r.responseType=e),r.open("GET",i),r.onload=function(){r.status===200?t(r.response):s(Error(r.statusText))},r.onerror=function(){s(Error("Network Error"))},r.send()})};(function(i){var e=base64,t=fetch$1;function s(P){return function(I){return typeof I=="string"&&P.test(I)}}function r(P,I){return typeof P=="string"?P+I:typeof P=="function"?P(I):I}function o(P,I,R,N){var G=a(I)?l:c(I)?d:m(I)?u:g(I)?b:y(I)?S:v(I)?x:A(I)?E:w(I)?_:null,B=R||{};return G?G(P,I,B):N?Promise.resolve(N):Promise.reject("Source not valid ("+I+")")}o.fetch=t;function a(P){return P instanceof ArrayBuffer}function l(P,I,R){return new Promise(function(N,G){P.decodeAudioData(I,function(B){N(B)},function(){G("Can't decode audio data ("+I.slice(0,30)+"...)")})})}var c=s(/\.(mp3|wav|ogg)(\?.*)?$/i);function d(P,I,R){var N=r(R.from,I);return o(P,o.fetch(N,"arraybuffer"),R)}function m(P){return P&&typeof P.then=="function"}function u(P,I,R){return I.then(function(N){return o(P,N,R)})}var g=Array.isArray;function b(P,I,R){return Promise.all(I.map(function(N){return o(P,N,R,N)}))}function y(P){return P&&typeof P=="object"}function S(P,I,R){var N={},G=Object.keys(I).map(function(B){if(R.only&&R.only.indexOf(B)===-1)return null;var k=I[B];return o(P,k,R,k).then(function(T){N[B]=T})});return Promise.all(G).then(function(){return N})}var v=s(/\.json(\?.*)?$/i);function x(P,I,R){var N=r(R.from,I);return o(P,o.fetch(N,"text").then(JSON.parse),R)}var A=s(/^data:audio/);function E(P,I,R){var N=I.indexOf(",");return o(P,e.decode(I.slice(N+1)).buffer,R)}var w=s(/\.js(\?.*)?$/i);function _(P,I,R){var N=r(R.from,I);return o(P,o.fetch(N,"text").then(C),R)}function C(P){var I=P.indexOf("MIDI.Soundfont.");if(I<0)throw Error("Invalid MIDI.js Soundfont format");I=P.indexOf("=",I)+2;var R=P.lastIndexOf(",");return JSON.parse(P.slice(I,R)+"}")}i.exports&&(i.exports=o),typeof window<"u"&&(window.loadAudio=o)})(lib$1);var libExports={},lib={get exports(){return libExports},set exports(i){libExports=i}},adsr=ADSR$1;function ADSR$1(i){var e=i.createGain(),t=e._voltage=getVoltage(i),s=scale(t),r=scale(t),o=scale(t);return e._startAmount=scale(r),e._endAmount=scale(o),e._multiplier=scale(s),e._multiplier.connect(e),e._startAmount.connect(e),e._endAmount.connect(e),e.value=s.gain,e.startValue=r.gain,e.endValue=o.gain,e.startValue.value=0,e.endValue.value=0,Object.defineProperties(e,props),e}var props={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(i){var e=this._multiplier.gain,t=this._startAmount.gain,s=this._endAmount.gain;this._voltage.start(i),this._decayFrom=this._decayFrom=i+this.attack,this._startedAt=i;var r=this.sustain;e.cancelScheduledValues(i),t.cancelScheduledValues(i),s.cancelScheduledValues(i),s.setValueAtTime(0,i),this.attack?(e.setValueAtTime(0,i),e.linearRampToValueAtTime(1,i+this.attack),t.setValueAtTime(1,i),t.linearRampToValueAtTime(0,i+this.attack)):(e.setValueAtTime(1,i),t.setValueAtTime(0,i)),this.decay&&e.setTargetAtTime(r,this._decayFrom,getTimeConstant(this.decay))}},stop:{value:function(i,e){e&&(i=i-this.release);var t=i+this.release;if(this.release){var s=this._multiplier.gain,r=this._startAmount.gain,o=this._endAmount.gain;s.cancelScheduledValues(i),r.cancelScheduledValues(i),o.cancelScheduledValues(i);var a=getTimeConstant(this.release);if(this.attack&&i<this._decayFrom){var l=getValue(0,1,this._startedAt,this._decayFrom,i);s.linearRampToValueAtTime(l,i),r.linearRampToValueAtTime(1-l,i),r.setTargetAtTime(0,i,a)}o.setTargetAtTime(1,i,a),s.setTargetAtTime(0,i,a)}return this._voltage.stop(t),t}},onended:{get:function(){return this._voltage.onended},set:function(i){this._voltage.onended=i}}},flat=new Float32Array([1,1]);function getVoltage(i){var e=i.createBufferSource(),t=i.createBuffer(1,2,i.sampleRate);return t.getChannelData(0).set(flat),e.buffer=t,e.loop=!0,e}function scale(i){var e=i.context.createGain();return i.connect(e),e}function getTimeConstant(i){return Math.log(i+1)/Math.log(100)}function getValue(i,e,t,s,r){var o=e-i,a=s-t,l=r-t,c=l/a,d=i+c*o;return d<=i&&(d=i),d>=e&&(d=e),d}var ADSR=adsr,EMPTY={},DEFAULTS={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0};function SamplePlayer(i,e,t){var s=!1,r=0,o={},a=i.createGain();a.gain.value=1;var l=Object.assign({},DEFAULTS,t),c={context:i,out:a,opts:l};return e instanceof AudioBuffer?c.buffer=e:c.buffers=e,c.start=function(u,g,b){if(c.buffer&&u!==null)return c.start(null,u,g);var y=u?c.buffers[u]:c.buffer;if(y){if(!s){console.warn("SamplePlayer not connected to any node.");return}}else{console.warn("Buffer "+u+" not found.");return}var S=b||EMPTY;g=Math.max(i.currentTime,g||0),c.emit("start",g,u,S);var v=m(u,y,S);return v.id=d(u,v),v.env.start(g),v.source.start(g),c.emit("started",g,v.id,v),S.duration&&v.stop(g+S.duration),v},c.play=function(u,g,b){return c.start(u,g,b)},c.stop=function(u,g){var b;return g=g||Object.keys(o),g.map(function(y){return b=o[y],b?(b.stop(u),b.id):null})},c.connect=function(u){return s=!0,a.connect(u),c},c.emit=function(u,g,b,y){c.onevent&&c.onevent(u,g,b,y);var S=c["on"+u];S&&S(g,b,y)},c;function d(u,g){return g.id=r++,o[g.id]=g,g.source.onended=function(){var b=i.currentTime;g.source.disconnect(),g.env.disconnect(),g.disconnect(),c.emit("ended",b,g.id,g)},g.id}function m(u,g,b){var y=i.createGain();return y.gain.value=0,y.connect(a),y.env=envelope(i,b,l),y.env.connect(y.gain),y.source=i.createBufferSource(),y.source.buffer=g,y.source.connect(y),y.source.loop=b.loop||l.loop,y.source.playbackRate.value=centsToRate(b.cents||l.cents),y.source.loopStart=b.loopStart||l.loopStart,y.source.loopEnd=b.loopEnd||l.loopEnd,y.stop=function(S){var v=S||i.currentTime;c.emit("stop",v,u);var x=y.env.stop(v);y.source.stop(x)},y}}function isNum$1(i){return typeof i=="number"}var PARAMS=["attack","decay","sustain","release"];function envelope(i,e,t){var s=ADSR(i),r=e.adsr||t.adsr;return PARAMS.forEach(function(o,a){r?s[o]=r[a]:s[o]=e[o]||t[o]}),s.value.value=isNum$1(e.gain)?e.gain:isNum$1(t.gain)?t.gain:1,s}function centsToRate(i){return i?Math.pow(2,i/1200):1}var player=SamplePlayer,events=function(i){return i.on=function(e,t){if(arguments.length===1&&typeof e=="function")return i.on("event",e);var s="on"+e,r=i[s];return i[s]=r?chain(r,t):t,i},i};function chain(i,e){return function(t,s,r,o){i(t,s,r,o),e(t,s,r,o)}}var REGEX$1=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function regex$1(){return REGEX$1}var SEMITONES$1=[0,2,4,5,7,9,11];function parse$1(i,e,t){if(typeof i!="string")return null;var s=REGEX$1.exec(i);if(!s||!e&&s[4])return null;var r={letter:s[1].toUpperCase(),acc:s[2].replace(/x/g,"##")};return r.pc=r.letter+r.acc,r.step=(r.letter.charCodeAt(0)+3)%7,r.alt=r.acc[0]==="b"?-r.acc.length:r.acc.length,r.chroma=SEMITONES$1[r.step]+r.alt,s[3]&&(r.oct=+s[3],r.midi=r.chroma+12*(r.oct+1),r.freq=midiToFreq$1(r.midi,t)),e&&(r.tonicOf=s[4]),r}function midiToFreq$1(i,e){return Math.pow(2,(i-69)/12)*(e||440)}var parser={parse:parse$1,regex:regex$1,midiToFreq:midiToFreq$1},FNS=["letter","acc","pc","step","alt","chroma","oct","midi","freq"];FNS.forEach(function(i){parser[i]=function(e){var t=parse$1(e);return t&&typeof t[i]<"u"?t[i]:null}});var noteParser$1=parser,note$1=noteParser$1,isMidi=function(i){return i!==null&&i!==[]&&i>=0&&i<129},toMidi=function(i){return isMidi(i)?+i:note$1.midi(i)},notes=function(i){if(i.buffers){var e=i.opts.map,t=typeof e=="function"?e:toMidi,s=function(o){return o?t(o)||o:null};i.buffers=mapBuffers(i.buffers,s);var r=i.start;i.start=function(o,a,l){var c=s(o),d=c%1;return d&&(c=Math.floor(c),l=Object.assign(l||{},{cents:Math.floor(d*100)})),r(c,a,l)}}return i};function mapBuffers(i,e){return Object.keys(i).reduce(function(t,s){return t[e(s)]=i[s],t},{})}var isArr=Array.isArray,isObj=function(i){return i&&typeof i=="object"},OPTS={},scheduler=function(i){return i.schedule=function(e,t){var s=i.context.currentTime,r=e<s?s:e;i.emit("schedule",r,t);var o,a,l,c;return t.map(function(d){if(d)isArr(d)?(o=d[0],a=d[1]):(o=d.time,a=d);else return null;return isObj(a)?(l=a.name||a.key||a.note||a.midi||null,c=a):(l=a,c=OPTS),i.start(l,r+(o||0),c)})},i},index_minExports={},index_min={get exports(){return index_minExports},set exports(i){index_minExports=i}};(function(i,e){(function(t){i.exports=t()})(function(){return function t(s,r,o){function a(d,m){if(!r[d]){if(!s[d]){var u=typeof commonjsRequire=="function"&&commonjsRequire;if(!m&&u)return u(d,!0);if(l)return l(d,!0);var g=new Error("Cannot find module '"+d+"'");throw g.code="MODULE_NOT_FOUND",g}var b=r[d]={exports:{}};s[d][0].call(b.exports,function(y){var S=s[d][1][y];return a(S||y)},b,b.exports,t,s,r,o)}return r[d].exports}for(var l=typeof commonjsRequire=="function"&&commonjsRequire,c=0;c<o.length;c++)a(o[c]);return a}({1:[function(t,s,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(o){function a(l){if(this._event=l,this._data=l.data,this.receivedTime=l.receivedTime,this._data&&this._data.length<2){console.warn("Illegal MIDI message of length",this._data.length);return}switch(this._messageCode=l.data[0]&240,this.channel=l.data[0]&15,this._messageCode){case 128:this.messageType="noteoff",this.key=l.data[1]&127,this.velocity=l.data[2]&127;break;case 144:this.messageType="noteon",this.key=l.data[1]&127,this.velocity=l.data[2]&127;break;case 160:this.messageType="keypressure",this.key=l.data[1]&127,this.pressure=l.data[2]&127;break;case 176:this.messageType="controlchange",this.controllerNumber=l.data[1]&127,this.controllerValue=l.data[2]&127,this.controllerNumber===120&&this.controllerValue===0?this.channelModeMessage="allsoundoff":this.controllerNumber===121?this.channelModeMessage="resetallcontrollers":this.controllerNumber===122?this.controllerValue===0?this.channelModeMessage="localcontroloff":this.channelModeMessage="localcontrolon":this.controllerNumber===123&&this.controllerValue===0?this.channelModeMessage="allnotesoff":this.controllerNumber===124&&this.controllerValue===0?this.channelModeMessage="omnimodeoff":this.controllerNumber===125&&this.controllerValue===0?this.channelModeMessage="omnimodeon":this.controllerNumber===126?this.channelModeMessage="monomodeon":this.controllerNumber===127&&(this.channelModeMessage="polymodeon");break;case 192:this.messageType="programchange",this.program=l.data[1];break;case 208:this.messageType="channelpressure",this.pressure=l.data[1]&127;break;case 224:this.messageType="pitchbendchange";var c=l.data[2]&127,d=l.data[1]&127;this.pitchBend=(c<<8)+d;break}}return new a(o)},s.exports=r.default},{}]},{},[1])(1)})})(index_min);var midimessage=index_minExports,midi$1=function(i){return i.listenToMidi=function(e,t){var s={},r=t||{},o=r.gain||function(a){return a/127};return e.onmidimessage=function(a){var l=a.messageType?a:midimessage(a);if(l.messageType==="noteon"&&l.velocity===0&&(l.messageType="noteoff"),!(r.channel&&l.channel!==r.channel))switch(l.messageType){case"noteon":s[l.key]=i.play(l.key,0,{gain:o(l.velocity)});break;case"noteoff":s[l.key]&&(s[l.key].stop(),delete s[l.key]);break}},i},i};(function(i){var e=player,t=events,s=notes,r=scheduler,o=midi$1;function a(l,c,d){return o(r(s(t(e(l,c,d)))))}i.exports&&(i.exports=a),typeof window<"u"&&(window.SamplePlayer=a)})(lib);function fillStr(i,e){return Array(e+1).join(i)}function isNum(i){return typeof i=="number"}function isStr(i){return typeof i=="string"}function isDef(i){return typeof i<"u"}function midiToFreq(i,e){return Math.pow(2,(i-69)/12)*(e||440)}var REGEX=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function regex(){return REGEX}var SEMITONES=[0,2,4,5,7,9,11];function parse(i,e,t){if(typeof i!="string")return null;var s=REGEX.exec(i);if(!s||!e&&s[4])return null;var r={letter:s[1].toUpperCase(),acc:s[2].replace(/x/g,"##")};r.pc=r.letter+r.acc,r.step=(r.letter.charCodeAt(0)+3)%7,r.alt=r.acc[0]==="b"?-r.acc.length:r.acc.length;var o=SEMITONES[r.step]+r.alt;return r.chroma=o<0?12+o:o%12,s[3]&&(r.oct=+s[3],r.midi=o+12*(r.oct+1),r.freq=midiToFreq(r.midi,t)),e&&(r.tonicOf=s[4]),r}var LETTERS="CDEFGAB";function accStr(i){return isNum(i)?i<0?fillStr("b",-i):fillStr("#",i):""}function octStr(i){return isNum(i)?""+i:""}function build(i,e,t){return i===null||typeof i>"u"?null:i.step?build(i.step,i.alt,i.oct):i<0||i>6?null:LETTERS.charAt(i)+accStr(e)+octStr(t)}function midi(i){if((isNum(i)||isStr(i))&&i>=0&&i<128)return+i;var e=parse(i);return e&&isDef(e.midi)?e.midi:null}function freq(i,e){var t=midi(i);return t===null?null:midiToFreq(t,e)}function letter(i){return(parse(i)||{}).letter}function acc(i){return(parse(i)||{}).acc}function pc(i){return(parse(i)||{}).pc}function step(i){return(parse(i)||{}).step}function alt(i){return(parse(i)||{}).alt}function chroma(i){return(parse(i)||{}).chroma}function oct(i){return(parse(i)||{}).oct}const noteParser=Object.freeze(Object.defineProperty({__proto__:null,acc,alt,build,chroma,freq,letter,midi,oct,parse,pc,regex,step},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(noteParser);var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var i=require$$0;function e(r,o){if(console.warn("new Soundfont() is deprected"),console.log("Please use Soundfont.instrument() instead of new Soundfont().instrument()"),!(this instanceof e))return new e(r);this.nameToUrl=o||e.nameToUrl,this.ctx=r,this.instruments={},this.promises=[]}e.prototype.onready=function(r){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(r)},e.prototype.instrument=function(r,o){console.warn("new Soundfont().instrument() is deprecated."),console.log("Please use Soundfont.instrument() instead.");var a=this.ctx;if(r=r||"default",r in this.instruments)return this.instruments[r];var l={name:r,play:s(a,o)};if(this.instruments[r]=l,r!=="default"){var c=e.instrument(a,r,o).then(function(d){return l.play=d.play,l});this.promises.push(c),l.onready=function(d){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),c.then(d)}}else l.onready=function(d){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),d()};return l};function t(r,o,a){return console.warn("Soundfont.loadBuffers is deprecate."),console.log("Use Soundfont.instrument(..) and get buffers properties from the result."),e.instrument(r,o,a).then(function(l){return l.buffers})}e.loadBuffers=t;function s(r,o){return o=o||{},function(a,l,c,d){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 m=a>0&&a<129?+a:i.midi(a),u=m?i.midiToFreq(m,440):null;if(u){c=c||.2,d=d||{};var g=d.destination||o.destination||r.destination,b=d.vcoType||o.vcoType||"sine",y=d.gain||o.gain||.4,S=r.createOscillator();S.type=b,S.frequency.value=u;var v=r.createGain();return v.gain.value=y,S.connect(v),v.connect(g),S.start(l),c>0&&S.stop(l+c),S}}}return e.noteToMidi=i.midi,legacy=e,legacy}(function(i){var e=libExports$1,t=libExports;function s(l,c,d){if(arguments.length===1)return function(y,S){return s(l,y,S)};var m=d||{},u=m.isSoundfontURL||r,g=m.nameToUrl||o,b=u(c)?c:g(c,m.soundfont,m.format);return e(l,b,{only:m.only||m.notes}).then(function(y){var S=t(l,y,m).connect(m.destination?m.destination:l.destination);return S.url=b,S.name=c,S})}function r(l){return/\.js(\?.*)?$/i.test(l)}function o(l,c,d){return d=d==="ogg"?d:"mp3",c=c==="FluidR3_GM"?c:"MusyngKite","https://gleitz.github.io/midi-js-soundfonts/"+c+"/"+l+"-"+d+".js"}var a=requireLegacy();a.instrument=s,a.nameToUrl=o,i.exports&&(i.exports=a),typeof window<"u"&&(window.Soundfont=a)})(lib$2);NoteEnum.C,NoteEnum.D,NoteEnum.E,NoteEnum.F,NoteEnum.G,NoteEnum.A,NoteEnum.B;const speedInfo={"rall.":1.333333333,"poco rit.":1.333333333,"rit.":1.333333333,"molto rit.":1.333333333,"molto rall":1.333333333,molto:1.333333333,lentando:1.333333333,allargando:1.333333333,morendo:1.333333333,"accel.":.8,calando:2,"poco accel.":.8,"gradually slowing":1.333333333,slowing:1.333333333,slow:1.333333333,slowly:1.333333333,faster:1.333333333},getNextNote=(i,e)=>{var l;let t=0;const s=i.closest(e);let r=s;const o=s==null?void 0:s.closest("measure");let a=null;for(;!a&&t<((o==null?void 0:o.childNodes.length)||50);)t++,((l=r==null?void 0:r.nextElementSibling)==null?void 0:l.tagName)==="note"&&(a=r==null?void 0:r.nextElementSibling),r=r==null?void 0:r.nextElementSibling;return a},getGradualLengthByXml=i=>{var d,m,u,g;const e=new DOMParser().parseFromString(i,"text/xml"),t=Array.from(e.querySelectorAll("measure")),s=Array.from(e.querySelectorAll("note")),r=Array.from(e.querySelectorAll("words")),o=Array.from(e.querySelectorAll("metronome")),a=[];for(const b of[...r,...o]){const y=getNextNote(b,"direction");if(y){const S=y==null?void 0:y.closest("measure"),v=Array.from(S.querySelectorAll("note")),x=Array.from(S.childNodes).filter(w=>w.nodeName==="note").findIndex(w=>w===y);let A=0,E=0;for(let w=0;w<v.length;w++){const C=+(((d=v[w].querySelector("duration"))==null?void 0:d.textContent)||"0");A+=C,w<x&&(E=A)}a.push({ele:b,index:s.indexOf(y),noteInMeasureIndex:x,textContent:b.textContent,measureIndex:t.indexOf(S),type:b.tagName,allDuration:A,leftDuration:E})}}a.push({ele:s[s.length-1],index:s.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:t.length});const l=[];a.sort((b,y)=>b.index-y.index);const c=Object.keys(speedInfo).map(b=>b.toLocaleLowerCase());for(const b of a){let y=!1,S=0;const v=(m=b.textContent)==null?void 0:m.toLocaleLowerCase().trim();b===a[a.length-1]&&((u=l[l.length-1])==null?void 0:u.length)===1&&(y=!0);const x=c.find(A=>{const E=A.split(" ");return v&&E.includes(v)});if(b.type==="metronome"||b.type==="words"&&(v.startsWith("a tempo")||x)||y){const A=l.findIndex(E=>E.length===1);A>-1&&b.index>((g=l[A])==null?void 0:g[0].start)&&(S=-1,l[A][1]={start:b.index,measureIndex:b.measureIndex,closedMeasureIndex:b.measureIndex,noteInMeasureIndex:b.noteInMeasureIndex,allDuration:b.allDuration,leftDuration:b.leftDuration,type:v})}b.type==="words"&&x&&l.push([{start:b.index,measureIndex:b.measureIndex,closedMeasureIndex:b.measureIndex+S,noteInMeasureIndex:b.noteInMeasureIndex,allDuration:b.allDuration,leftDuration:b.leftDuration,type:v}])}return l},browserInfo=browser();dayjs.extend(duration);const getFixTime=i=>{const e=getDuration(state$1.osmd);let t=e.numerator||0,s=e.denominator||4;const r=e.beatUnit||"quarter";return state$1.repeatedBeats?t=t===2?4:t:t===2&&s===4&&(t=4),state$1.isOpenMetronome?60/i*formatBeatUnit(r)*(t/s):0},retain=i=>Math.ceil(i*1e6)/1e6,formatLyricsEntries=i=>{var s,r;const e=((s=i.parentStaffEntry)==null?void 0:s.voiceEntries)||[],t=[];for(const o of e)if((r=o.lyricsEntries)!=null&&r.table){const a=Object.values(o.lyricsEntries.table);for(const l of a)t.push(l==null?void 0:l.value.text)}return t},createSpeedInfo=(i,e)=>{var t,s;if(i&&speedInfo[(t=i.startWord)==null?void 0:t.toLocaleLowerCase()]){const r=Math.max(i.endXmlNoteIndex,3),o=[],a=e,l=e/speedInfo[(s=i.startWord)==null?void 0:s.toLocaleLowerCase()];for(let c=0;c<r;c++){const d=a+(l-a)/r*(c+1);o.push(d)}return o}},tranTime=(i="")=>{let e=i;const t=i.split(":");return t.length===1?e=`00:${t[0]}:00`:t.length===2&&(e=`00:${t[0]}:${t[1]}`),`1970-01-01 00:${e}0`},getDuration=i=>{var t;if(i){const{Duration:s,TempoInBPM:r,ActiveTimeSignature:o,TempoExpressions:a}=(t=i.GraphicSheet.MeasureList[0][0])==null?void 0:t.parentSourceMeasure;if(s){let l="quarter";for(const d of a)l=d.InstantaneousTempo.beatUnit||"quarter";return{...formatDuration(o),TempoInBPM:r,beatUnit:l}}}return{...new Fraction$1,TempoInBPM:90,beatUnit:"quarter"}};function formatDuration(i,e){return i}function formatBeatUnit(i){let e=4;switch(i){case"1024th":e=1024;break;case"512th":e=512;break;case"256th":e=256;break;case"128th":e=128;break;case"64th":e=64;break;case"32nd":e=32;break;case"16th":e=16;break;case"eighth":e=8;break;case"quarter":e=4;break;case"half":e=2;break;case"whole":e=1;break;case"breve":e=.5;break;case"long":e=.25;break;case"maxima":e=.125;break}return e}function getTimeByBeatUnit(i,e,t){return t/formatBeatUnit(i)*e}const setElementNoteBefore=(i,e,t)=>{let s=0;if(e){for(let r=0;r<e.childNodes.length;r++){const o=e.childNodes[r];if(o.nodeName==="note"&&s++,o===i)break}if(s===0&&t){t.insertBefore(i,t.childNodes[0]);return}if(t&&t.childNodes.length>0){let r=0;const o=Array.from(t.childNodes).filter(l=>l.nodeName==="note"),a=o[o.length-1];if(s>=o.length&&a){t.insertBefore(i,t.childNodes[Array.from(t.childNodes).indexOf(a)]);return}for(let l=0;l<o.length;l++){const c=o[l];if(c.nodeName==="note"&&(r=r+1,r===s)){t.insertBefore(i,c);break}}}}},isRepeatWord=i=>{if(i){const e=i.toLocaleLowerCase(),t="d\\s?\\.s\\.",s="d\\.\\s?c\\.";return e==="@"||StringUtil.StringContainsSeparatedWord(e,t+" al fine",!0)||StringUtil.StringContainsSeparatedWord(e,t+" al coda",!0)||StringUtil.StringContainsSeparatedWord(e,s+" al fine",!0)||StringUtil.StringContainsSeparatedWord(e,s+" al coda",!0)||StringUtil.StringContainsSeparatedWord(e,s)||StringUtil.StringContainsSeparatedWord(e,"da\\s?capo",!0)||StringUtil.StringContainsSeparatedWord(e,t,!0)||StringUtil.StringContainsSeparatedWord(e,"dal\\s?segno",!0)||StringUtil.StringContainsSeparatedWord(e,"al\\s?coda",!0)||StringUtil.StringContainsSeparatedWord(e,"to\\s?coda",!0)||StringUtil.StringContainsSeparatedWord(e,"a (la )?coda",!0)||StringUtil.StringContainsSeparatedWord(e,"fine",!0)||StringUtil.StringContainsSeparatedWord(e,"coda",!0)||StringUtil.StringContainsSeparatedWord(e,"segno",!0)}return!1},onlyVisible=(i,e)=>{var b,y,S,v,x,A,E,w,_;if(!i)return"";const t=state$1.examSongId+"",s=new DOMParser().parseFromString(i,"text/xml"),r=((y=(b=s.getElementsByTagName("part-list"))==null?void 0:b[0])==null?void 0:y.getElementsByTagName("score-part"))||[],o=Array.from(r).map(C=>{var P,I;return((I=(P=C.getElementsByTagName("part-name"))==null?void 0:P[0])==null?void 0:I.textContent)||""}),a=s.getElementsByTagName("part"),l=[...(S=a[0])==null?void 0:S.getElementsByTagName("measure")],c=[...(v=a[0])==null?void 0:v.getElementsByTagName("metronome")],d=[...(x=a[0])==null?void 0:x.getElementsByTagName("words")],m=[...(A=a[0])==null?void 0:A.getElementsByTagName("coda")],u=[...(E=a[0])==null?void 0:E.getElementsByTagName("rehearsal")];((_=(w=o[0])==null?void 0:w.toLocaleUpperCase)==null?void 0:_.call(w))==="COMMON"&&(e++,o.shift());const g=r[e];if(state$1.partListNames=o,g){const C=g.getAttribute("id");Array.from(a).forEach(P=>{var I,R,N,G,B;if(P&&P.getAttribute("id")!==C)(I=P.parentNode)==null||I.removeChild(P);else if(P&&P.getAttribute("id")!=="P1"){const k={};for(let T=0;T<c.length;T++){const V=c[T],Z=(N=(R=V.parentElement)==null?void 0:R.parentElement)==null?void 0:N.parentElement;if(Z){const W=l.indexOf(Z);k[W]=V}}Object.values(k).forEach(T=>{var ie;const V=(ie=T.parentElement)==null?void 0:ie.parentElement,Z=V==null?void 0:V.parentElement,W=[...(Z==null?void 0:Z.childNodes)||[]],se=V?W.indexOf(V):-1;if(Z&&se>-1){const fe=l.indexOf(Z),J=P.getElementsByTagName("measure")[fe];setElementNoteBefore(V,Z,J)}}),d.forEach(T=>{var Z;let V=T.textContent||"";if(V=["cresc."].includes(V)?"":V,(isSpecialMark(V)||isSpeedKeyword(V)||isGradientWords(V)||isRepeatWord(V)||GRADIENT_SPEED_RESET_TAG)&&V){const W=(Z=T.parentElement)==null?void 0:Z.parentElement,se=W==null?void 0:W.parentElement,ie=[...(se==null?void 0:se.childNodes)||[]],fe=W?ie.indexOf(W):-1;if(W&&se&&fe>-1){const J=l.indexOf(se),K=P.getElementsByTagName("measure")[J];Array.from((K==null?void 0:K.getElementsByTagName("words"))||[]).reduce((Y,ae)=>{var de;return(de=ae.textContent)!=null&&de.includes(V)&&Y++,Y},0)===0&&(["12280"].includes(t)?K==null||K.insertBefore(W.cloneNode(!0),K==null?void 0:K.childNodes[fe]):setElementNoteBefore(W,se,K))}}}),m.forEach(T=>{var ie;const V=(ie=T.parentElement)==null?void 0:ie.parentElement,Z=V==null?void 0:V.parentElement,W=[...(Z==null?void 0:Z.childNodes)||[]],se=V?W.indexOf(V):-1;if(V&&Z&&se>-1){const fe=l.indexOf(Z),J=P.getElementsByTagName("measure")[fe];["12280"].includes(t)?J==null||J.insertBefore(V.cloneNode(!0),J==null?void 0:J.childNodes[se]):setElementNoteBefore(V,Z,J)}}),u.forEach(T=>{var W,se;const V=(W=T.parentElement)==null?void 0:W.parentElement,Z=V==null?void 0:V.parentElement;if(Z){const ie=l.indexOf(Z);(se=P.getElementsByTagName("measure")[ie])==null||se.appendChild(V.cloneNode(!0))}})}else d.forEach((k,T)=>{var Z,W,se;const V=k.textContent||"";if(isSpeedKeyword(V)&&V){const ie=(W=(Z=k.parentElement)==null?void 0:Z.parentElement)==null?void 0:W.parentElement;if(ie&&ie.firstElementChild&&ie.firstElementChild!==k){const fe=(se=k.parentElement)==null?void 0:se.parentElement,J=ie.firstElementChild;ie.insertBefore(fe,J)}}});if(P&&P.getAttribute("id")===C){const k=P.getElementsByTagName("barline"),T=(G=k[k.length-1])==null?void 0:G.parentElement;if(((B=T==null?void 0:T.lastElementChild)==null?void 0:B.tagName)!=="barline"){const V=(T==null?void 0:T.children)||[];for(let Z of V)if(Z.tagName==="barline"){T==null||T.appendChild(Z);break}}}}),Array.from(r).forEach(P=>{var I;P&&P.getAttribute("id")!==C&&((I=P.parentNode)==null||I.removeChild(P))})}return new XMLSerializer().serializeToString(appoggianceFormate(s))},appoggianceFormate=i=>{var s,r,o,a;if(!i)return i;const e=i.querySelectorAll("grace");if(!e.length)return i;const t=l=>l.querySelector("grace")?t(l==null?void 0:l.nextElementSibling):l;for(let l of e){const c=(s=l.parentElement)==null?void 0:s.querySelector("notations");if(c&&c.querySelectorAll("slur").length>1){let d=t((r=l.parentElement)==null?void 0:r.nextElementSibling);if(d&&d.querySelectorAll("slur").length>0){const m=Array.from(((o=d.querySelector("notations"))==null?void 0:o.children)||[]).map(g=>g.getAttribute("number")),u=c.querySelectorAll("slur");for(let g of u)m.includes(g.getAttribute("number"))||(a=d.querySelector("notations"))==null||a.appendChild(g)}}}return i},formatXML=i=>{var a,l;if(!i)return"";const e=new DOMParser().parseFromString(i,"text/xml"),t=Array.from(e.getElementsByTagName("measure")),s=Array.from(e.querySelectorAll("repeat"));parseXmlToRepeat(s);let r=-1,o=-1;for(const c of t){r===-1&&c.getElementsByTagName("beats").length&&(r=parseInt(c.getElementsByTagName("beats")[0].textContent||"4")),o===-1&&c.getElementsByTagName("beat-type").length&&(o=parseInt(c.getElementsByTagName("beat-type")[0].textContent||"4"));const d=parseInt(((a=c.getElementsByTagName("divisions")[0])==null?void 0:a.textContent)||"256");if(c.getElementsByTagName("note").length===0){const m=(l=c.getElementsByTagName("forward")[0])==null?void 0:l.getElementsByTagName("duration")[0];m&&(m.textContent="0"),c.innerHTML=c.innerHTML+`
- <note>
- <rest measure="yes"/>
- <duration>${d*r}</duration>
- <voice>1</voice>
- <type>whole</type>
- </note>`}}return new XMLSerializer().serializeToString(e)},formateTimes=i=>{var T,V,Z,W,se,ie,fe,J,K,be,oe,Y,ae,de,le,me,ve,ye,U,$,M,Q,z,F,O,H,ne,ee,te,ce,he;const e=customData.customNoteRealValue,t=customData.customNoteCurrentTime,s=state$1.examSongId+"";state$1.partIndex+"";let r=browserInfo.huawei?.08:0;const o=[],a=[],l=[],{originSpeed:c}=state$1,d=(re,ge)=>{var Ee,_e,Te,Pe,Ce,Ie;return state$1.appName!=="GYM"?re:["906"].includes(s)?((Ee=ge.measures[0])==null?void 0:Ee.realKey)||re:["782","784"].includes(s)&&[14,16,30,32].includes((_e=ge.firstVerticalMeasure)==null?void 0:_e.measureNumber)?((Te=o[o.length-1])==null?void 0:Te.realKey)||re:["900","901","640","641","739","740","800","801","773","774","869","872","714","715"].includes(s)&&(((Pe=ge.firstVerticalMeasure)==null?void 0:Pe.measureNumber)===3||((Ce=ge.firstVerticalMeasure)==null?void 0:Ce.measureNumber)===9)&&((Ie=ge.measures[0])==null?void 0:Ie.realKey)||re};if(!i.cursor)return[];const m=i.cursor.Iterator;console.time("音符跑完时间");let u=0,g=0,b=[],y=[],S=0,v=0,x=0,A="quarter",E,w,_=0,C=0,P=0;const I=[];state$1.gradualTimes&&console.log("后台设置的渐慢小节时间",state$1.gradual,state$1.gradualTimes);let R=m.currentTimeStamp.RealValue;const N=[];let G=!1,B=0;for(;!m.EndReached;){const re=(T=m.CurrentVoiceEntries)!=null&&T[0]?[(V=m.CurrentVoiceEntries)==null?void 0:V[0]]:[];let ge=[];state$1.multitrack>0?ge=[...m.CurrentVoiceEntries]:ge=[...m.CurrentVoiceEntries].filter(Ee=>{var _e;return Ee&&((_e=Ee==null?void 0:Ee.ParentVoice)==null?void 0:_e.VoiceId)!=1});let xe=0,ue=!1,Ae=!1;if(ge.length&&!G){ue=!0;let Ee=[...m.CurrentVoiceEntries].reduce((_e,Te)=>(_e.push(...Te.Notes),_e),[]);if(Ee=Ee.sort((_e,Te)=>{var Pe,Ce;return((Pe=_e==null?void 0:_e.length)==null?void 0:Pe.realValue)-((Ce=Te==null?void 0:Te.length)==null?void 0:Ce.realValue)}),xe=((W=(Z=Ee==null?void 0:Ee[0])==null?void 0:Z.length)==null?void 0:W.realValue)||0,state$1.multitrack>0&&ge.length===2){const _e=((ie=(se=Ee[0])==null?void 0:se.length)==null?void 0:ie.realValue)||0;B=(((J=(fe=Ee[Ee.length-1])==null?void 0:fe.length)==null?void 0:J.realValue)||0)-_e,G=B!==0}}(K=I[I.length-1])!=null&&K.isDouble&&!ge.length&&(Ae=!0),state$1.multitrack>0&&!ue&&G&&(ue=!0,xe=B,G=!1,B=0),N.push(m.currentTimeStamp.realValue-R),R=m.currentTimeStamp.realValue;for(const Ee of re){let _e=Ee.notes[0];if(_e.IsGraceNote&&(_e=_e.parentStaffEntry.voiceEntries.find(Pe=>!Pe.isGrace).notes[0]),_e.fixedKey=_e.ParentVoiceEntry.ParentVoice.Parent.SubInstruments[0].fixedKey||0,(be=_e==null?void 0:_e.voiceEntry)!=null&&be.isGrace){ue=!0;let Te=[...m.currentVoiceEntries].reduce((Pe,Ce)=>(Pe.push(...Ce.notes),Pe),[]);Te=Te.sort((Pe,Ce)=>{var Ie,Re;return((Ie=Ce==null?void 0:Ce.length)==null?void 0:Ie.realValue)-((Re=Pe==null?void 0:Pe.length)==null?void 0:Re.realValue)}),xe=xe!=0?Math.min((Y=(oe=Te==null?void 0:Te[0])==null?void 0:oe.length)==null?void 0:Y.realValue,xe):(de=(ae=Te==null?void 0:Te[0])==null?void 0:ae.length)==null?void 0:de.realValue}state$1.multitrack>0&&xe>_e.length.realValue&&(xe=_e.length.realValue),I.push({note:_e,iterator:{...m},currentTime:xe,isDouble:ue,isMutileSubject:Ae})}m.moveToNextVisibleVoiceEntry(!1)}for(let{note:re,iterator:ge,currentTime:xe,isDouble:ue,isMutileSubject:Ae}of I){if(re){if(g===0&&l.push(re.sourceMeasure),g===0&&state$1.isSpecialBookCategory)for(const je of(le=re.sourceMeasure)==null?void 0:le.TempoExpressions)(me=je==null?void 0:je.InstantaneousTempo)!=null&&me.beatUnit&&(A=je.InstantaneousTempo.beatUnit);let Ee=re.sourceMeasure.tempoInBPM;const{metronomeNoteIndex:_e}=ge.currentMeasure;_e!==0&&_e>g&&(Ee=((ve=o[o.length-1])==null?void 0:ve.speed)||100);const Te=[(ye=re.sourceMeasure.verticalMeasureList)==null?void 0:ye[0]],{realValue:Pe}=ge.currentTimeStamp,{RealValue:Ce,Denominator:Ie}=formatDuration(ge.currentMeasure.activeTimeSignature,ge.currentMeasure.duration);let{wholeValue:Re,numerator:qe,denominator:bt,realValue:Ue}=re.length;e[u]&&(Ue=e[u]),ue&&xe>0&&xe!=Ue&&(console.log(`小节 ${re.sourceMeasure.MeasureNumberXML} 替换: noteLength: ${Ue}, 最小: ${xe}`),Ue=xe),t&&Ae&&N[u+1]>0&&Ue>N[u+1]&&(console.log(Ue,N[u+1]),Ue=N[u+1]);let ht=v,nt=(state$1.isSpecialBookCategory?Ee:c)||1;u===0&&(r+=getFixTime(nt),state$1.fixtime=r);let Qe=0,ze=(state$1.isSpecialBookCategory?Ee:c)||1;w=ge.currentMeasure.speedInfo||w,E=((U=i.Sheet.SoundTempos)==null?void 0:U.get(re.sourceMeasure.measureListIndex))||E,(!E||E.length<2)&&(E=createSpeedInfo(w,ze));const Je=ge.currentMeasure.measureListIndex;if(state$1.gradualTimes&&Object.keys(state$1.gradualTimes).length>0){const je=state$1.gradual.find((We,ke)=>{var et;const $e=state$1.gradual[ke+1];return We[0].measureIndex<=Je&&((et=We[1])==null?void 0:et.measureIndex)>=Je&&(!$e||($e==null?void 0:$e[0].measureIndex)!==Je)}),[Ve,De]=je||[];if(Ve&&De){const We=De.measureIndex-Ve.measureIndex,ke=Ve.closedMeasureIndex==Je&&g>=Ve.noteInMeasureIndex,$e=De.closedMeasureIndex===Je&&g<De.noteInMeasureIndex,et=Ve.closedMeasureIndex!==Je&&De.closedMeasureIndex!==Je;if(ke||$e||et){const tt=state$1.gradualTimes[Ve.measureIndex],st=state$1.gradualTimes[De.measureIndex];if(tt&&st){const Mt=We-Ve.leftDuration/Ve.allDuration+De.leftDuration/De.allDuration,it=dayjs(tranTime(st)).diff(dayjs(tranTime(tt)),"millisecond");Qe=Ue/Ce/Mt*it/1e3}}}}else if(state$1.appName==="GYM"&&w&&E&&(w.startXmlNoteIndex===g||_>0)){const je=E[0]-(E[1]-E[0]),{resetXmlNoteIndex:Ve,endXmlNoteIndex:De}=w,We=De;let ke=(E[E.length-1]-je)/We;if(ke=re.DotsXml?ke/1.5:ke,_<We){const et=Math.ceil(ze+ke*_);let tt=getTimeByBeatUnit(A,et,ge.currentMeasure.activeTimeSignature.Denominator);const st=(Re+qe/bt)*Ie*(60/tt);ze+=Math.ceil(ke*(_+1)),tt=getTimeByBeatUnit(A,ze,ge.currentMeasure.activeTimeSignature.Denominator);const Mt=(Re+qe/bt)*Ie*(60/tt);Qe=(st+Mt)/2}else Ve>_&&(ze=($=o[u-1])==null?void 0:$.speed);nt=(state$1.isSpecialBookCategory?getTimeByBeatUnit(A,ze,ge.currentMeasure.activeTimeSignature.Denominator):c)||1;const $e=!(_<We)&&!(Ve>_);_++,$e&&(_=0,w=void 0,E=void 0,y=[])}const yt=Ue;let ft=Qe||Math.min(Ce,Ue)*formatBeatUnit(A)*(60/nt);const xt=Ce*Ie*(60/nt);v+=ft,x+=ft;let At=ft+ht;const dt=re.fixedKey||0,Et=(Q=(M=Te[0])==null?void 0:M.vfVoices["1"])==null?void 0:Q.tickables[g];if(o.length&&o[o.length-1].relativeTime===ht)continue;if(u===0){let je=0;(((F=(z=re.sourceMeasure.verticalMeasureList)==null?void 0:z[0])==null?void 0:F.staffEntries)||[]).forEach(De=>{var We,ke,$e,et,tt,st;(st=(tt=(et=($e=(ke=(We=De==null?void 0:De.sourceStaffEntry)==null?void 0:We.voiceEntries)==null?void 0:ke[0])==null?void 0:$e.notes)==null?void 0:et[0])==null?void 0:tt.length)!=null&&st.realValue&&(je+=De.sourceStaffEntry.voiceEntries[0].notes[0].length.realValue)}),je<Ce&&(S=xt-ft),S>0&&(r+=S)}let Ot=(O=Te[0])==null?void 0:O.stave;re.sourceMeasure.multipleRestMeasures&&(C=re.sourceMeasure.multipleRestMeasures,P=0),P<C?P++:(P=0,C=0);const Ze={isStaccato:re.voiceEntry.isStaccato(),isRestFlag:re.isRestFlag,noteId:re.NoteToGraphicalNoteObjectId,measureListIndex:re.sourceMeasure.measureListIndex,MeasureNumberXML:re.sourceMeasure.MeasureNumberXML,_noteLength:yt,svgElement:Et,frequency:((H=re==null?void 0:re.pitch)==null?void 0:H.frequency)||-1,nextFrequency:((ne=re==null?void 0:re.pitch)==null?void 0:ne.nextFrequency)||-1,prevFrequency:((ee=re==null?void 0:re.pitch)==null?void 0:ee.prevFrequency)||-1,difftime:S,octaveOffset:(te=Te[0])==null?void 0:te.octaveOffset,speed:ze,beatSpeed:nt,i:u,si:g,stepSpeeds:y,measureOpenIndex:l.length-1,measures:b,tempoInBPM:re.sourceMeasure.tempoInBPM,measureLength:xt,relaMeasureLength:x,id:Et==null?void 0:Et.attrs.id,note:re.halfTone+12,fixtime:r,relativeTime:retain(ht),time:retain(ht+r),endtime:retain(At+r),relaEndtime:retain(At),realValue:Pe,halfTone:re.halfTone,noteElement:re,fixedKey:dt,realKey:0,duration:0,formatLyricsEntries:formatLyricsEntries(re),stave:Ot,firstVerticalMeasure:Te[0],noteLength:1,osdmContext:i,speedbeatUnit:A,multipleRestMeasures:P};Ze.realKey=d(re.halfTone-dt*12,Ze),Ze.duration=Ze.endtime-Ze.time;let Pt=((he=(ce=Te[0])==null?void 0:ce.vfVoices["1"])==null?void 0:he.tickables)||[];[121].includes(state$1.subjectId)&&(Pt=re.sourceMeasure.verticalSourceStaffEntryContainers),Ze.noteLength=Pt.length||1,o.push(Ze),a.push(Ze.id),b.push(Ze),g<Pt.length-1?g++:(g=0,x=0,b=[])}u++}const k=o.sort((re,ge)=>re.relativeTime-ge.relativeTime).map((re,ge)=>({...re,i:ge}));console.timeEnd("音符跑完时间");try{i.cursor.reset()}catch(re){}return state$1.activeMeasureIndex=k[0].MeasureNumberXML,k},getNoteByMeasuresSlursStart=i=>{let e=i,t;if(i.noteElement.tie&&i.noteElement.tie.StartNote&&(t=i.noteElement.tie.StartNote),e&&t&&t!==e.noteElement){const s=[];for(const r of state$1.times)t===r.noteElement&&s.push(r);if(s.length)return s.find(r=>r.i===i.i-1)}return e},parseXmlToRepeat=i=>{if(!i.length)return;let e=[],t=0,s=0;for(let r=0;r<i.length;r++){const o=i[r],a=o.getAttribute("direction");let l=o.parentNode;for(;l&&l.tagName!=="measure";)l=l.parentNode;let c=l.getAttribute("number");c=c?Number(c):0,a==="forward"?t=c:a==="backward"&&(s=c,e.push({start:t,end:s}))}state$1.repeatInfo=e,console.log("重播",e)},verifyCanRepeat=(i,e)=>{let t=-1;if(state$1.repeatInfo.length){for(let s=state$1.repeatInfo.length-1;s>=0;s--){const{start:r,end:o}=state$1.repeatInfo[s];if(i<=r&&e>=o)return t=s,{repeatIdx:t,canRepeat:!0}}return{repeatIdx:t,canRepeat:!1}}else return{repeatIdx:t,canRepeat:!1}},selectionContainer="_selectionContainer_1jfjr_1",position="_position_1jfjr_8",note="_note_1jfjr_11",staveBox="_staveBox_1jfjr_14",leftStaveBox="_leftStaveBox_1jfjr_17",rightStaveBox="_rightStaveBox_1jfjr_31",centerStaveBox="_centerStaveBox_1jfjr_45",prepareStaveBox="_prepareStaveBox_1jfjr_70",disable="_disable_1jfjr_73",line="_line_1jfjr_76",lineStaff="_lineStaff_1jfjr_88",lineJianPu="_lineJianPu_1jfjr_91",scoreItem="_scoreItem_1jfjr_97",dotWrap="_dotWrap_1jfjr_134",noteFollow="_noteFollow_1jfjr_149",linePC="_linePC_1jfjr_185",styles$1={selectionContainer,position,note,staveBox,leftStaveBox,rightStaveBox,centerStaveBox,prepareStaveBox,disable,line,lineStaff,lineJianPu,scoreItem,dotWrap,noteFollow,linePC},selectData=reactive({notes:[],staves:[]}),calcNoteData=()=>{var a,l,c,d,m,u,g,b,y,S,v,x,A;const i=((a=document.getElementById("musicAndSelection"))==null?void 0:a.getBoundingClientRect())||{x:0,y:0},e=i.x||0,t=i.y||0,s=state$1.times,r=[],o=[];for(let E=0;E<s.length;E++){const w=s[E],_={...w,index:w.i,bbox:null,staveBox:null};if(!r.includes(w.noteId)){let C={};if((c=(l=w.stave)==null?void 0:l.attrs)!=null&&c.id){const P=document.querySelector(`#${w.stave.attrs.id}`);C=((u=(m=(d=P==null?void 0:P.parentElement)==null?void 0:d.parentElement)==null?void 0:m.getBoundingClientRect)==null?void 0:u.call(m))||{x:0,width:0}}if(w.svgElement){const P=document.querySelector(`#vf-${(b=(g=w.svgElement)==null?void 0:g.attrs)==null?void 0:b.id}`);if(P){const I=((y=P.getBoundingClientRect)==null?void 0:y.call(P))||{x:0,width:0};if(state$1.musicRenderType!==EnumMusicRenderType.staff){_.bbox={left:I.x-e-I.width/4+"px",top:I.y-t-I.height+"px",width:I.width*1.5+"px",height:I.height*3+"px"};const R=P.querySelector(".vf-numbered-note-head"),N=(S=R==null?void 0:R.getBoundingClientRect)==null?void 0:S.call(R);N&&(w.bbox={left:N.x-e-N.width/4,width:N.width*1.5})}else _.bbox={left:I.x-e-I.width/4+"px",top:C.y-t+"px",width:I.width*1.5+"px",height:C.height+"px"}}selectData.notes.push(_),r.push(w.noteId)}}if(!o.includes(w.MeasureNumberXML)){if(w.stave){if((x=(v=w.stave)==null?void 0:v.attrs)!=null&&x.id){const C=document.querySelector(`#${w.stave.attrs.id}`),P=[Array.from((C==null?void 0:C.querySelectorAll(".vf-clef"))||[]),Array.from((C==null?void 0:C.querySelectorAll(".vf-keysignature"))||[]),Array.from((C==null?void 0:C.getElementsByTagName("text"))||[])].flat();try{P.length&&P.forEach(R=>{var N;(N=R==null?void 0:R.style)==null||N.setProperty("display","none")})}catch(R){}const I=((A=C==null?void 0:C.getBoundingClientRect)==null?void 0:A.call(C))||{x:0,width:0,y:0,height:0};try{P.length&&P.forEach(R=>{var N;(N=R==null?void 0:R.style)==null||N.removeProperty("display")})}catch(R){}_.staveBox={left:I.x-e+"px",top:I.y-t+"px",width:I.width+"px",height:I.height+"px"},selectData.staves.push(_)}o.push(w.MeasureNumberXML)}else if(w.multipleRestMeasures){const C=selectData.staves.find(P=>P.MeasureNumberXML===w.MeasureNumberXML-1);C!=null&&C.staveBox&&(_.staveBox={left:C.staveBox.left,top:C.staveBox.top,width:C.staveBox.width},selectData.staves.push(_),o.push(w.MeasureNumberXML))}}}console.log("🚀 ~ selectData.notes:",selectData.notes,selectData.staves)},Selection=defineComponent({name:"selection",setup(){const i=useRoute$1();({...getQuery(),...i.query});const e=computed(()=>state$1.sectionStatus||state$1.modeType!=="practise"),t=computed(()=>s=>{if(state$1.sectionStatus){if(state$1.section.length===1&&s.MeasureNumberXML==state$1.section[0].MeasureNumberXML)return styles$1.leftStaveBox;if(state$1.section.length===2){const r=state$1.userChooseEndIndex>state$1.section[1].MeasureNumberXML?state$1.userChooseEndIndex:state$1.section[1].MeasureNumberXML;if(state$1.sectionFirst&&s.MeasureNumberXML===state$1.sectionFirst.MeasureNumberXML)return styles$1.prepareStaveBox;if(s.MeasureNumberXML>=state$1.section[0].MeasureNumberXML&&s.MeasureNumberXML<=r)return s.MeasureNumberXML==state$1.section[0].MeasureNumberXML&&s.MeasureNumberXML==r?styles$1.centerStaveBox:s.MeasureNumberXML==state$1.section[0].MeasureNumberXML?styles$1.leftStaveBox:s.MeasureNumberXML==r?styles$1.rightStaveBox:styles$1.staveBox}}else if(state$1.activeMeasureIndex==s.MeasureNumberXML&&!state$1.isReport)return styles$1.staveBox});return onMounted(()=>{calcNoteData()}),()=>createVNode("div",{id:"selectionBox",class:styles$1.selectionContainer,onClick:s=>s.stopPropagation()},[selectData.staves.map(s=>{var a;const r=s.id&&evaluatingData.evaluatings[s.measureListIndex],o=!state$1.isReport&&!state$1.times[state$1.activeNoteIndex].multipleRestMeasures&&metronomeData.cursorMode===2&&s.MeasureNumberXML===((a=metronomeData.activeMetro)==null?void 0:a.measureNumberXML)&&state$1.times[state$1.activeNoteIndex].MeasureNumberXML===s.MeasureNumberXML;return createVNode(Fragment,null,[s.staveBox&&createVNode("div",{class:[styles$1.position,t.value(s),r?`scoreItemLeve${r.leve}`:"",state$1.platform===IPlatform.PC?styles$1.linePC:""],style:s.staveBox,onClick:()=>handleSelection(s)},[o&&createVNode("div",{class:[styles$1.line,state$1.musicRenderType==EnumMusicRenderType.staff?styles$1.lineStaff:styles$1.lineJianPu],style:{left:metronomeData.activeMetro.left}},null),!state$1.isReport&&!!s.multipleRestMeasures&&state$1.activeMeasureIndex==s.MeasureNumberXML&&createVNode("div",{class:styles$1.dotWrap},[s.multipleRestMeasures]),createVNode(Transition,{name:"centerTop",onAfterEnter:()=>{r.show=!1}},{default:()=>{var l,c;return[(r==null?void 0:r.show)&&createVNode("div",{class:styles$1.scoreItem,style:{color:((l=leveByScoreMeasureIcons[r.leve])==null?void 0:l.color)||""}},[createVNode("img",{src:(c=leveByScoreMeasureIcons[r.leve])==null?void 0:c.icon},null),createVNode("span",null,[r.score])])]}})])])}),selectData.notes.map(s=>createVNode("div",{class:[styles$1.position,e.value&&styles$1.disable,styles$1.note,`noteIndex_${s.index}`],style:s.bbox,onClick:()=>skipNotePlay(s.index)},[createVNode("div",{class:styles$1.noteFollow,"data-vf":"vf"+s.id},[createVNode(Icon$1,{name:"success"},null),createVNode(Icon$1,{name:"cross"},null)])]))])}}),inGradualRange="_inGradualRange_1ryfw_24",styles={inGradualRange},musicRenderTypeKey="musicRenderType",musicData=reactive({showSelection:!1,isRenderLoading:!0,score:"",containerWidth:0}),resetMusicScore=()=>{var e;const i=((e=document.getElementById("musicAndSelection"))==null?void 0:e.offsetWidth)||625;state$1.musicZoom=i/musicData.containerWidth},resetRenderMusicScore=()=>{const i=queryString.parse(location.search),e=queryString.stringify({...i,_t:Date.now()});location.search="?"+e},MusicScore=defineComponent({name:"music-score",emits:["rendered"],props:{showSelection:{type:Boolean,default:!0},renderTypeKey:{type:String,default:""}},setup(i,{emit:e}){const t=()=>{const l=sessionStorage.getItem(i.renderTypeKey||musicRenderTypeKey);l in EnumMusicRenderType&&(state$1.musicRenderType=l)},s=async()=>{const l=await fetch(state$1.xmlUrl).then(d=>d.text()),c=formatXML(l);musicData.score=onlyVisible(c,state$1.partIndex),state$1.gradualTimes&&(state$1.gradual=getGradualLengthByXml(c))},r=async()=>{const l=document.getElementById("musicAndSelection");if(!l||!musicData.score)return;const c=new OpenSheetMusicDisplay(l,{drawTitle:!1,drawSubtitle:!1,autoResize:!1,followCursor:!1,drawPartNames:!1,drawComposer:!1});c.EngravingRules.PageRightMargin=2,c.EngravingRules.PageTopMargin=10,c.EngravingRules.PageTopMarginNarrow=3,c.EngravingRules.PageLeftMargin=2,c.EngravingRules.PageBottomMargin=2,c.EngravingRules.DYMusicScoreType=state$1.musicRenderType===EnumMusicRenderType.staff?"staff":"jianpu",state$1.musicRenderType===EnumMusicRenderType.fixedTone&&(window.sett={keySignature:!0}),c.EngravingRules.DYMusicScoreId=state$1.examSongId||"",await c.load(musicData.score),c.zoom=state$1.zoom,c.render(),e("rendered",c),musicData.showSelection=!0},o=()=>{var l;musicData.containerWidth=((l=document.getElementById("musicAndSelection"))==null?void 0:l.offsetWidth)||625};onMounted(async()=>{o(),t(),await s(),await r(),musicData.isRenderLoading=!1});const a=computed(()=>{var d;let l=!1;const c=((d=state$1.times[state$1.activeNoteIndex])==null?void 0:d.measureListIndex)||-1;for(const[m,u]of state$1.gradual)if(m&&u&&(l=m.measureIndex<=c&&c<u.measureIndex,l))break;return l});return()=>createVNode("div",{id:"musicAndSelection",style:{"--music-zoom":state$1.musicZoom},class:[a.value&&styles.inGradualRange,state$1.musicRenderType==EnumMusicRenderType.staff?"staff":"jianpuTone"]},[i.showSelection&&musicData.showSelection&&createVNode(Selection,null,null)])}}),scriptRel="modulepreload",assetsURL=function(i,e){return new URL(i,e).href},seen={},__vitePreload=function i(e,t,s){if(!t||t.length===0)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map(o=>{if(o=assetsURL(o,s),o in seen)return;seen[o]=!0;const a=o.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!s)for(let m=r.length-1;m>=0;m--){const u=r[m];if(u.href===o&&(!a||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${l}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":scriptRel,a||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),a)return new Promise((m,u)=>{d.addEventListener("load",m),d.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())},relationships={flute:{59:[27,26,25,15,24,22,17,20],60:[27,26,25,15,24,22,17,20],61:[27,26,25,15,24,22,17,21],62:[27,26,25,15,24,22,17],63:[27,26,25,15,24,22,17,19],64:[27,26,25,15,24,22,19],65:[27,26,25,15,24,19],66:[27,26,25,15,17,19],67:[27,26,25,15,19],68:[27,26,25,15,18,19],69:[27,26,15,19],70:[[27,14,19],[27,24,15,19]],71:[27,15,19],72:[27,19],73:[19],74:[26,25,24,22,17,15],75:[26,25,24,22,17,19,15],76:[27,26,25,15,24,22,19],77:[27,26,25,15,24,19],78:[27,26,25,15,17,19],79:[27,26,25,15,19],80:[27,26,25,15,18,19],81:[27,26,15,19],82:[[27,14,19],[27,24,15,19]],83:[27,15,19],84:[27,19],85:[19],86:[26,25,15,19],87:[27,26,25,15,24,22,17,18,19],88:[27,26,15,24,22,19],89:[27,25,24,15,19],90:[27,25,17,15,19],91:[27,26,25,19],92:[26,25,18,19],93:[26,24,15,19],94:[23,24,15,19],95:[27,25,15,16],96:[27,26,25,18,24,19]},clarinet:{52:[[3,4,6,8,9,11,14,18,20],[3,4,6,8,9,11,14,20]],53:[[3,4,6,8,9,11,12,20],[3,4,6,8,9,11,18,20]],54:[[3,4,6,8,9,11,13,18,20],[3,4,6,8,9,11,13,20],[3,4,6,8,9,11,15]],55:[3,4,6,8,9,11,20],56:[3,4,6,8,9,11,16,20],57:[3,4,6,8,9,20],58:[3,4,6,8,20],59:[[3,4,6,9,20],[3,4,6,8,10,20]],60:[3,4,6,20],61:[3,4,6,7,20],62:[3,4,20],63:[[3,4,20,24],[3,4,5,20],[3,8,20]],64:[3,20],65:[20],66:[[3],[20,23,24]],67:[],68:[2],69:[1],70:[1,19],71:[[3,4,6,8,9,11,14,18,19,20],[3,4,6,8,9,11,14,19,20]],72:[[3,4,6,8,9,11,12,19,20],[3,4,6,8,9,11,18,19,20]],73:[[3,4,6,8,9,11,13,19,20],[3,4,6,8,9,11,13,18,19,20],[3,4,6,8,9,11,15,19,20]],74:[3,4,6,8,9,11,19,20],75:[3,4,6,8,9,11,16,19,20],76:[3,4,6,8,9,19,20],77:[3,4,6,8,19,20],78:[[3,4,6,9,19,20],[3,4,6,8,10,19,20]],79:[3,4,6,19,20],80:[3,4,6,7,19,20],81:[3,4,19,20],82:[[3,4,19,20,24],[3,4,5,19,20],[3,4,8,19,20]],83:[3,19,20],84:[19,20],85:[4,6,8,9,19,20],86:[4,6,8,16,19,20],87:[[4,6,8,10,16,19,20],[4,6,9,16,19,20]],88:[4,6,16,19,20],89:[4,6,7,16,19,20]},trumpet:{0:[1,2,3],54:[4,5,6],55:[4,2,6],56:[1,5,6],57:[4,5,3],58:[4,2,3],59:[1,5,3],60:[1,2,3],61:[4,5,6],62:[4,2,6],63:[1,5,6],64:[4,5,3],65:[4,2,3],66:[1,5,3],67:[1,2,3],68:[1,5,6],69:[4,5,3],70:[4,2,3],71:[1,5,3],72:[1,2,3],73:[4,5,3],74:[4,2,3],75:[1,5,3],76:[1,2,3],77:[4,2,3],78:[1,4,3],79:[1,2,3],80:[1,5,6],81:[4,5,3],82:[4,2,3],83:[1,5,3],84:[1,2,3]},horn:{53:[1],54:[2],55:[],56:[2,3],57:[1,2],58:[1],59:[2],60:[],61:[1,2],62:[1],63:[2],64:[],65:[1],66:[2],67:[],68:[0,2,3],69:[0,1,2],70:[0,1],71:[0,2],72:[0],73:[0,2,3],74:[0,1,2],75:[0,1],76:[0,2],77:[0],78:[0,2],79:[0],80:[0,2,3],81:[0,1,2],82:[0,1],83:[0,2],84:[0]},"up-bass-horn":{0:[1,2,3],40:[4,5,6],41:[4,2,6],42:[1,5,6],43:[4,5,3],44:[4,2,3],45:[1,5,3],46:[1,2,3],47:[4,5,6],48:[4,2,6],49:[1,5,6],50:[4,5,3],51:[4,2,3],52:[1,5,3],53:[1,2,3],54:[1,5,6],55:[4,5,3],56:[4,2,3],57:[1,5,3],58:[1,2,3],59:[4,5,3],60:[4,2,3],61:[1,5,3],62:[1,2,3],63:[4,2,3],64:[1,5,3],65:[1,2,3],66:[1,5,6],67:[4,5,3],68:[4,2,3],69:[1,5,3],70:[1,2,3]},trombone:{0:[1],40:[22],41:[11],42:[5],43:[4],44:[3],45:[2],46:[1],47:[22],48:[11],49:[5],50:[4],51:[3],52:[2],53:[1],54:[5],55:[4],56:[3],57:[2],58:[1],59:[4],60:[3],61:[2],62:[1],63:[3],64:[2],65:[1],66:[5],67:[4],68:[3],69:[2],70:[1]},saxophone:{58:[2,4,5,13,17,18,19,23],59:[2,4,5,11,17,18,19,23],60:[2,4,5,17,18,19,23],61:[2,4,5,12,17,18,19,23],62:[2,4,5,17,18,19],63:[2,4,5,17,18,19,22],64:[2,4,5,17,18],65:[2,4,5,17],66:[[2,4,5,18],[2,4,5,17,21]],67:[2,4,5],68:[2,4,5,10],69:[2,4],70:[[2,4,16],[2,17],[2,3]],71:[2],72:[[4],[2,15]],73:[],74:[2,4,5,6,17,18,19],75:[2,4,5,6,17,18,19,22],76:[2,4,5,6,17,18],77:[2,4,5,6,17],78:[[2,4,5,6,18],[2,4,5,6,17,21]],79:[2,4,5,6],80:[2,4,5,6,10],81:[2,4,6],82:[[2,4,6,16],[2,6,17],[2,3,6]],83:[2,6],84:[[4,6],[2,6,15]],85:[6],86:[6,9],87:[6,7,8],88:[6,8,9,14],89:[[6,7,8,9,14],[1,4,6]]},tuba:{0:[1,2,3],28:[4,5,6],29:[4,2,6],30:[1,5,6],31:[4,5,3],32:[4,2,3],33:[4,2,6],34:[1,2,3],35:[4,5,6],36:[4,2,6],37:[1,5,6],38:[4,5,3],39:[4,2,3],40:[1,5,3],41:[1,2,3],42:[1,5,6],43:[4,5,3],44:[4,2,3],45:[1,5,3],46:[1,2,3],47:[4,5,3],48:[4,2,3],49:[1,5,3],50:[1,2,3],51:[4,2,3],52:[1,5,3],53:[1,2,3],54:[1,5,6],55:[4,5,3],56:[4,2,3],57:[1,5,3],58:[1,2,3]},piccolo:{60:[11,2,33,4,5,6,7,8],61:[11,2,33,4,5,6,7,88],62:[11,2,33,4,5,6,7],63:[11,2,33,4,5,6,77],64:[11,2,33,4,5,6],65:[11,2,33,4,5],66:[11,2,33,4,6,7],67:[11,2,33,4],68:[11,2,33,5,6,77],69:[11,2,33],70:[[11,2,4,5],[1,11,2,4,6,7]],71:[[11,2],[11,33,4]],72:[11,33],73:[[2,33],[11]],74:[33],75:[33,4,5,6,7],76:[1,2,33,4,5,6],77:[1,2,33,4,5],78:[1,2,33,4,6,8],79:[1,2,33,4],80:[1,2,33,4,6,7,8],81:[1,2,33],82:[1,2,33,5,6,7],83:[1,2,33,5,6],84:[1,2,5,6],85:[1,2,4,5,7,8,100],86:[1,2,4,5,7,8]},"small-drum":{0:["active","active-left","active-right"],64:["left","right"]},hulusi:{64:[7,6,5,4,3,2,11,91],65:[7,6,5,4,3,2,1,91],66:[7,6,5,4,3,2,91],67:[7,6,5,4,3,2,11,92],68:[7,6,5,4,3,2,1,92],69:[7,6,5,4,3,2,93],70:[7,6,5,4,3,11,93],71:[7,6,5,4,3,93],72:[7,6,5,4,95],73:[7,6,5,3,2,95],74:[7,6,5,95],75:[7,6,4,3,95],76:[7,6,95],77:[7,5,4,3,2,94],78:[7,5,4,94],79:[7,94],80:[6,94],81:[96]},pan:{55:[21],57:[20],59:[19],60:[18],62:[17],64:[16],65:[15],67:[14],69:[13],71:[12],72:[11],74:[10],76:[9],77:[8],79:[7],81:[6],83:[5],84:[4],86:[3],88:[2],89:[1]},ocarina:{57:[1,2,3,4,5,6,7,8,9,10,11,12],58:[1,2,3,4,5,6,8,9,10,11,12],59:[1,2,4,5,6,7,8,9,10,11,12],60:[1,2,4,5,6,8,9,10,11,12],61:[1,2,4,5,6,7,8,9,11,12],62:[1,2,4,5,6,8,9,11,12],63:[1,2,4,5,6,9,11,12],64:[1,2,4,5,6,8,11,12],65:[1,2,4,5,6,11,12],66:[1,2,4,6,9,11,12],67:[1,2,4,6,11,12],68:[1,2,6,9,11,12],69:[1,2,6,11,12],70:[1,6,9,11,12],71:[1,6,11,12],72:[6,11,12],73:[6,9,12],74:[6,12],75:[6,9],76:[6],77:[]},melodica:{53:[1],54:[101],55:[2],56:[102],57:[3],58:[103],59:[4],60:[5],61:[104],62:[6],63:[105],64:[7],65:[8],66:[106],67:[9],68:[107],69:[10],70:[108],71:[11],72:[12],73:[109],74:[13],75:[110],76:[14],77:[15],78:[111],79:[16],80:[112],81:[17],82:[113],83:[18],84:[19]},baroqueRecorder:{60:[11,2,33,4,5,6,7,8],61:[11,2,33,4,5,6,7,88],62:[11,2,33,4,5,6,7],63:[11,2,33,4,5,6,77],64:[11,2,33,4,5,6],65:[11,2,33,4,5,7,8],66:[11,2,33,4,6,7],67:[11,2,33,4],68:[11,2,33,5,6,77],69:[11,2,33],70:[11,2,4,5],71:[11,2],72:[11,33],73:[2,33],74:[33],75:[33,4,5,6,7],76:[1,2,33,4,5,6],77:[1,2,33,4,5,7],78:[1,2,33,4,6],79:[1,2,33,4],80:[1,2,33,5],81:[1,2,33],82:[1,2,33,5,6,7],83:[1,2,33,5,6],84:[1,2,5,6],85:[1,2,4,5,7,8,100],86:[1,2,4,5,7,8],87:[1,2,4],88:[1,2,33,4,5,6],89:[1,2,33,4,5,7],90:[1,2,33,4,6],91:[1,2,33,4],92:[1,2,33,5],93:[1,2,33],94:[1,2,33,5,6,7],95:[1,2,33,5,6],96:[1,2,5,6],97:[1,2,4,5,7,8],98:[1,2,4]}},mappingVoicePart=(i,e)=>{if(e==="GYM")return Number(i);if(e==="COLEXIU")return{Flute:2,Clarinet:4,Trombone:14,Tuba:17,Trumpet:12,Horn:13,AltoSaxophone:6,TenorSaxophone:6,Saxophone:6,UpBassHorn:15,Melodica:137,HulusiFlute:136,PanFlute:135,Ocarina:134,Recorder:120,Ukulele:130,Mouthorgan:140,Piano:150}[i];if(e==="ORCHESTRA")return{1:23,2:2,3:5,4:4,5:12,6:14,7:13,8:15,9:17}[i];if(e==="INSTRUMENT"){let t=i;return typeof t=="string"&&(t=t.toLocaleLowerCase().replace(/ /g,"")),console.log(t,"1212"),{flute:2,clarinet:4,trombone:14,tuba:17,trumpet:12,horn:13,altosaxophone:6,tenorsaxophone:6,saxophone:6,upbasshorn:15,melodica:137,hulusiFlute:136,panflute:135,recorder:120,ukulele:130,mouthorgan:140,piano:150,baroquerecorder:"baroque-recorder",4:"piccolo",3:"hulusi-flute",1:"pan-flute",2:"ocarina",5:"melodica",23:2,24:6,25:4,26:12,27:14,28:13,29:15,30:17,tenorrecorder:"piccolo",woodwind:"hulusi-flute",panpipes:"pan-flute",ocarina:"ocarina",nai:"melodica",15:"baroque-recorder",16:"baroque-recorder"}[t]||0}else if(e==="ENSEMBLE"){let t=i;const s={Piccolo:"piccolo",Flute:2,"Flute 1":2,"Flute 2":2,Oboe:1,"Clarinet in Bb 1":4,"Clarinet in Bb 2":4,"Alto Clarinet in Eb":4,"Bass Clarinet in Bb":4,Bassoon:1,"Alto Saxophone":5,"Tenor Saxophone":5,"Baritone Saxophone":5,"Trumpet in Bb 1":12,"Trumpet in Bb 2":12,"Horn in F":13,"Horn in F 1":13,"Horn in F 2":13,"Trombone 1":14,"Trombone 2":14,"Trombone 3":14,Euphonium:15,Tuba:17,Chimes:1,Bells:1,Xylophone:1,"Snare Drum":1,"Bass Drum":1,Triangle:1,"Suspended Cymbal":1,"Crash Cymbals":1,"Concert Toms":1,Timpani:1,flute:2,oboe:4,clarinet:4,trombone:14,tuba:17,trumpet:12,horn:13,altosaxophone:6,tenorsaxophone:6,saxophone:6,upbasshorn:15,melodica:137,hulusiFlute:136,panflute:135,recorder:120,ukulele:130,mouthorgan:140,piano:150,4:"piccolo",3:"hulusi-flute",1:"pan-flute",2:"ocarina",5:"melodica",26:12,tenorrecorder:"piccolo",woodwind:"hulusi-flute",panpipes:"pan-flute",ocarina:"ocarina",nai:"melodica",BaroqueRecorder:"baroque-recorder"};let r;if(typeof t=="string"){for(let o in s)if(o===t){r=s[o];break}}else r=s.code;return r}return 0},subjectFingering=i=>{switch(i){case 2:return{name:"flute",direction:"transverse",height:"1.6rem",hasTizhi:!0};case 4:return{name:"clarinet",direction:"vertical",width:"3rem",hasTizhi:!0};case 5:case 6:return{name:"saxophone",direction:"vertical",width:"4.34rem",hasTizhi:!0};case 12:return{name:"trumpet",direction:"transverse",height:"1.6rem",hasTizhi:!1};case 13:return{name:"horn",direction:"vertical",width:"4.98rem",hasTizhi:!1};case 14:return{name:"trombone",direction:"transverse",height:"1.6rem",hasTizhi:!1};case 15:return{name:"up-bass-horn",direction:"vertical",width:"4.34rem",hasTizhi:!1};case 17:return{name:"tuba",direction:"vertical",width:"4.34rem",hasTizhi:!1};case 120:return{name:"piccolo",direction:"vertical",width:"3rem",orientation:1,hasTizhi:!0};case"piccolo":return{name:"piccolo",direction:"vertical",width:"3rem",orientation:1,code:"竖笛",hasTizhi:!0};case"hulusi-flute":return{name:"hulusi-flute",direction:"vertical",width:"3rem",orientation:1,code:"葫芦丝",hasTizhi:!1};case"pan-flute":return{name:"pan-flute",direction:"transverse",height:"2rem",disabledFinger:!0,orientation:0,code:"排箫",hasTizhi:!1};case"ocarina":return{name:"ocarina",direction:"vertical",width:"3rem",disabledFinger:!0,orientation:0,code:"陶笛",hasTizhi:!1};case"melodica":return{name:"melodica",direction:"transverse",height:"2rem",orientation:0,code:"口风琴",hasTizhi:!1};case"baroque-recorder":return{name:"baroque-recorder",direction:"vertical",width:"3rem",orientation:1,code:"竖笛",hasTizhi:!0};default:return{}}},getFingeringConfig=async i=>{switch(i){case"flute":return{json:(await __vitePreload(()=>import("./index-7f22768f.js"),[],import.meta.url)).default,relationship:relationships.flute,height:"60px",styles:{}};case"clarinet":return{json:(await __vitePreload(()=>import("./index-2499965c.js"),[],import.meta.url)).default,relationship:relationships.clarinet,styles:{marginLeft:".4rem",marginRight:".7rem"}};case"trumpet":return{json:(await __vitePreload(()=>import("./index-f01bef28.js"),[],import.meta.url)).default,relationship:relationships.trumpet};case"horn":return{json:(await __vitePreload(()=>import("./index-20c025d3.js"),[],import.meta.url)).default,relationship:relationships.horn,height:"212px",width:"252px"};case"tuba":return{json:(await __vitePreload(()=>import("./index-902205b3.js"),[],import.meta.url)).default,relationship:relationships.tuba};case"piccolo":return{json:(await __vitePreload(()=>import("./index-991877f6.js"),[],import.meta.url)).default,relationship:relationships.piccolo};case"piccolo1":return{json:(await __vitePreload(()=>import("./index-0bbf84fb.js"),[],import.meta.url)).default,relationship:relationships.piccolo};case"piccolo2":return{json:(await __vitePreload(()=>import("./index-f5dd9e1d.js"),[],import.meta.url)).default,relationship:relationships.piccolo};case"up-bass-horn":return{json:(await __vitePreload(()=>import("./index-ad5b3309.js"),[],import.meta.url)).default,relationship:relationships["up-bass-horn"]};case"trombone":return{json:(await __vitePreload(()=>import("./index-f23e3dbf.js"),[],import.meta.url)).default,relationship:relationships.trombone};case"saxophone":return{json:(await __vitePreload(()=>import("./index-cef965b9.js"),[],import.meta.url)).default,relationship:relationships.saxophone,styles:{marginLeft:".2rem",marginRight:".3rem"}};case"small-drum":return{json:(await __vitePreload(()=>import("./index-7ad0b9f0.js"),[],import.meta.url)).default,relationship:relationships["up-bass-horn"],width:"180px"};case"hulusi-flute":return{json:(await __vitePreload(()=>import("./index-71a277d3.js"),[],import.meta.url)).default,relationship:relationships.hulusi,styles:{marginLeft:".6rem",marginRight:".7rem"}};case"hulusi-flute1":return{json:(await __vitePreload(()=>import("./index-03bddf2b.js"),[],import.meta.url)).default,relationship:relationships.hulusi,styles:{marginLeft:".6rem",marginRight:".7rem"}};case"hulusi-flute2":return{json:(await __vitePreload(()=>import("./index-97e45cdd.js"),[],import.meta.url)).default,relationship:relationships.hulusi,styles:{marginLeft:".6rem",marginRight:".7rem"}};case"pan-flute":return{json:(await __vitePreload(()=>import("./index-0bc55d54.js"),[],import.meta.url)).default,relationship:relationships.pan};case"pan-flute1":return{json:(await __vitePreload(()=>import("./index-97c2723f.js"),[],import.meta.url)).default,relationship:relationships.pan};case"pan-flute2":return{json:(await __vitePreload(()=>import("./index-589cb412.js"),[],import.meta.url)).default,relationship:relationships.pan};case"pan-flute3":return{json:(await __vitePreload(()=>import("./index-e427d448.js"),[],import.meta.url)).default,relationship:relationships.pan};case"ocarina":return{json:(await __vitePreload(()=>import("./index-ecdafa29.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"ocarina1":return{json:(await __vitePreload(()=>import("./index-1cca1c70.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"ocarina2":return{json:(await __vitePreload(()=>import("./index-a1f8bc5d.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"melodica":return{json:(await __vitePreload(()=>import("./index-55a98a41.js"),[],import.meta.url)).default,relationship:relationships.melodica,height:"80px",styles:{marginTop:"auto"}};case"melodica1":return{json:(await __vitePreload(()=>import("./index-b6d2ab3b.js"),[],import.meta.url)).default,relationship:relationships.melodica,height:"80px",styles:{marginTop:"auto"}};case"baroque-recorder":return{json:(await __vitePreload(()=>import("./index-7908a008.js"),[],import.meta.url)).default,relationship:relationships.baroqueRecorder};case"baroque-recorder1":return{json:(await __vitePreload(()=>import("./index-142fdf16.js"),[],import.meta.url)).default,relationship:relationships.baroqueRecorder};case"baroque-recorder2":return{json:(await __vitePreload(()=>import("./index-d13c0247.js"),[],import.meta.url)).default,relationship:relationships.baroqueRecorder};default:return null}},Notfind=defineComponent({name:"notfund",render(){return createVNode(Empty,{image:"error",description:this.$route.path+" 路径不存在"},{default:()=>[createVNode(Button,{type:"primary",onClick:()=>this.$router.replace("/")},{default:()=>[createTextVNode("返回首页")]})]})}});export{closeToast as $,handleEndSoundCheck as A,handleViewReport as B,handleStartEvaluat as C,api_videoUpdate as D,api_proxyServiceMessage as E,Fragment as F,connectWebsocket as G,getNoteByMeasuresSlursStart as H,Icon$1 as I,useClickAway as J,Button as K,handleSetSpeed as L,api_openCamera as M,NoticeBar as N,api_closeCamera as O,Popup as P,store_legacy as Q,RouterView as R,Snackbar$1 as S,TheError as T,toRefs as U,isVNode as V,api_cloudDestroy as W,postMessage as X,useRoute$1 as Y,showLoadingToast as Z,request$1$1 as _,setBehaviorId as a,removeResult as a$,getBehaviorId as a0,getCampId as a1,onUnmounted as a2,handleChangeSection as a3,togglePlay as a4,metronomeData as a5,handleResetPlay as a6,Badge as a7,api_back as a8,useRouter as a9,api_savePicture as aA,musicRenderTypeKey as aB,resetRenderMusicScore as aC,handleRessetState as aD,toggleFollow as aE,getAudioCurrentTime as aF,handleFollowStart as aG,handleFollowEnd as aH,api_setEventTracking as aI,Tick as aJ,FollowPractice as aK,handleInitTick as aL,promisefiyPostMessage as aM,api_setCache as aN,getToken as aO,api_suspendPlay as aP,followData as aQ,hanldeDirectSelection as aR,api_openWebView as aS,musicscoresettingKey as aT,createNamespace$1 as aU,Comment as aV,Text as aW,withInstall as aX,api_getToken as aY,getAudioDuration as aZ,sendResult as a_,getSecondRPM as aa,customData as ab,setGlobalData as ac,api_setStatusBarVisibility as ad,resetMusicScore as ae,onBeforeUnmount as af,Skeleton as ag,Transition as ah,MusicScore as ai,AudioList as aj,Evaluating as ak,isSpecialShapedScreen as al,mappingVoicePart as am,isRhythmicExercises as an,subjectFingering as ao,formateTimes as ap,Metronome as aq,getStorageSpeed as ar,nextTick as as,api_cloudLoading as at,addMeasureScore as au,createRouter as av,createWebHashHistory as aw,Notfind as ax,setStoreData as ay,createApp as az,setCampId as b,createElementBlock as b$,getEarphone as b0,api_toggleTune as b1,api_goback as b2,usePageVisibility as b3,setSection as b4,IPlatform as b5,api_getDeviceDelay as b6,api_openAdjustRecording as b7,api_setRequestedOrientation as b8,getFingeringConfig as b9,isSameValue as bA,Loading$1 as bB,mergeProps as bC,BORDER_UNSET_TOP_BOTTOM as bD,useScrollParent as bE,onUpdated as bF,useRect as bG,isHidden as bH,addUnit as bI,usePlaceholder as bJ,routeProps as bK,useRoute as bL,popupSharedProps as bM,unknownProp as bN,popupSharedPropKeys as bO,withKeys as bP,noop$1 as bQ,isFunction$3 as bR,BORDER_LEFT as bS,BORDER_TOP as bT,callInterceptor as bU,inBrowser$2 as bV,mountComponent as bW,usePopupState as bX,useCustomFieldValue as bY,commonjsGlobal as bZ,openBlock as b_,howler as ba,api_keepScreenLongLight as bb,EnumMusicRenderType as bc,evaluatCreateMusicPlayer as bd,resetPlaybackToStart as be,api_cloudAccompanyMessage as bf,__vitePreload as bg,isDef$1 as bh,extend$2 as bi,clamp as bj,numericProp as bk,makeRequiredProp as bl,makeArrayProp as bm,useTouch as bn,useParent as bo,useExpose as bp,watchEffect as bq,useEventListener$1 as br,preventDefault as bs,HAPTICS_FEEDBACK as bt,useChildren as bu,pick$1 as bv,makeNumericProp as bw,truthProp as bx,makeStringProp as by,unitToPx as bz,onMounted as c,normalizeStyle as c0,raf as c1,getScrollTop as c2,setScrollTop as c3,onBeforeUpdate as c4,onDeactivated as c5,onMountedOrActivated as c6,getZIndexStyle as c7,windowWidth as c8,windowHeight as c9,defineListenerProp as cA,useZIndex as cB,useTeleport as cC,useLock as cD,useRouteListener as cE,Teleport as cF,call as cG,createNamespace as cH,onActivated as ca,onPopupReopen as cb,doubleRaf as cc,useId as cd,BORDER_TOP_BOTTOM as ce,setRootScrollTop as cf,getElementTop as cg,route as ch,inject as ci,provide as cj,withDirectives as ck,vShow as cl,getRootScrollTop as cm,isObject$3 as cn,isPromise as co,FORM_KEY as cp,toArray as cq,formatNumber as cr,CUSTOM_FIELD_INJECTION_KEY as cs,resetScroll as ct,makeNumberProp as cu,cancelRaf as cv,getSizeStyle as cw,BORDER_BOTTOM as cx,stopPropagation as cy,addNumber as cz,defineComponent as d,computed as e,createVNode as f,getQuery as g,storeData as h,setUserInfo as i,getRandomKey as j,createTextVNode as k,ref as l,state$1 as m,reactive as n,onBeforeMount as o,evaluatingData as p,showToast as q,request as r,setToken as s,queryString as t,api_shareAchievements as u,browser as v,watch as w,handlePerformDetection as x,handleStartBegin as y,handleEndBegin as z};
|