var cn=Object.defineProperty;var hn=(i,e,r)=>e in i?cn(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var Vt=(i,e,r)=>(hn(i,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();const index$1="",common="",popup$2="",SnackbarSfc="",elevation="",loading$2="",button$1="",icon="",snackbar="",coreSfc="",cell="",CellSfc="",ripple="",formDetails="",hoverOverlay="",_switch="",SwitchSfc="",style="";function makeMap(i,e){const r=Object.create(null),s=i.split(",");for(let o=0;o!!r[o.toLowerCase()]:o=>!!r[o]}function normalizeStyle(i){if(isArray$9(i)){const e={};for(let r=0;r{if(r){const s=r.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$9(i))for(let r=0;risString$2(i)?i:i==null?"":isArray$9(i)||isObject$5(i)&&(i.toString===objectToString$3||!isFunction$6(i.toString))?JSON.stringify(i,replacer,2):String(i),replacer=(i,e)=>e&&e.__v_isRef?replacer(i,e.value):isMap$3(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[s,o])=>(r[`${s} =>`]=o,r),{})}:isSet$3(e)?{[`Set(${e.size})`]:[...e.values()]}:isObject$5(e)&&!isArray$9(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 r=i.indexOf(e);r>-1&&i.splice(r,1)},hasOwnProperty$f=Object.prototype.hasOwnProperty,hasOwn$2=(i,e)=>hasOwnProperty$f.call(i,e),isArray$9=Array.isArray,isMap$3=i=>toTypeString(i)==="[object Map]",isSet$3=i=>toTypeString(i)==="[object Set]",isFunction$6=i=>typeof i=="function",isString$2=i=>typeof i=="string",isSymbol$1=i=>typeof i=="symbol",isObject$5=i=>i!==null&&typeof i=="object",isPromise$1=i=>isObject$5(i)&&isFunction$6(i.then)&&isFunction$6(i.catch),objectToString$3=Object.prototype.toString,toTypeString=i=>objectToString$3.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 r=>e[r]||(e[r]=i(r))},camelizeRE$1=/-(\w)/g,camelize$2=cacheStringFunction(i=>i.replace(camelizeRE$1,(e,r)=>r?r.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 r=0;r{Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value:r})},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 r=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=r}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let r,s;for(r=0,s=this.effects.length;r{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{const{deps:e}=i;if(e.length){let r=0;for(let s=0;s{(g==="length"||g>=c)&&u.push(d)})}else switch(r!==void 0&&u.push(l.get(r)),e){case"add":isArray$9(i)?isIntegerKey(r)&&u.push(l.get("length")):(u.push(l.get(ITERATE_KEY)),isMap$3(i)&&u.push(l.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray$9(i)||(u.push(l.get(ITERATE_KEY)),isMap$3(i)&&u.push(l.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$3(i)&&u.push(l.get(ITERATE_KEY));break}if(u.length===1)u[0]&&triggerEffects(u[0]);else{const c=[];for(const d of u)d&&c.push(...d);triggerEffects(createDep(c))}}function triggerEffects(i,e){const r=isArray$9(i)?i:[...i];for(const s of r)s.computed&&triggerEffect(s);for(const s of r)s.computed||triggerEffect(s)}function triggerEffect(i,e){(i!==activeEffect||i.allowRecurse)&&(i.scheduler?i.scheduler():i.run())}function getDepFromReactive(i,e){var r;return(r=targetMap.get(i))===null||r===void 0?void 0:r.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(...r){const s=toRaw(this);for(let a=0,l=this.length;a{i[e]=function(...r){pauseTracking();const s=toRaw(this)[e].apply(this,r);return resetTracking(),s}}),i}function hasOwnProperty$e(i){const e=toRaw(this);return track(e,"has",i),e.hasOwnProperty(i)}function createGetter(i=!1,e=!1){return function(s,o,a){if(o==="__v_isReactive")return!i;if(o==="__v_isReadonly")return i;if(o==="__v_isShallow")return e;if(o==="__v_raw"&&a===(i?e?shallowReadonlyMap:readonlyMap:e?shallowReactiveMap:reactiveMap).get(s))return s;const l=isArray$9(s);if(!i){if(l&&hasOwn$2(arrayInstrumentations,o))return Reflect.get(arrayInstrumentations,o,a);if(o==="hasOwnProperty")return hasOwnProperty$e}const u=Reflect.get(s,o,a);return(isSymbol$1(o)?builtInSymbols.has(o):isNonTrackableKeys(o))||(i||track(s,"get",o),e)?u:isRef(u)?l&&isIntegerKey(o)?u:u.value:isObject$5(u)?i?readonly(u):reactive(u):u}}const set$1=createSetter(),shallowSet=createSetter(!0);function createSetter(i=!1){return function(r,s,o,a){let l=r[s];if(isReadonly(l)&&isRef(l)&&!isRef(o))return!1;if(!i&&(!isShallow(o)&&!isReadonly(o)&&(l=toRaw(l),o=toRaw(o)),!isArray$9(r)&&isRef(l)&&!isRef(o)))return l.value=o,!0;const u=isArray$9(r)&&isIntegerKey(s)?Number(s)i,getProto$1=i=>Reflect.getPrototypeOf(i);function get$2(i,e,r=!1,s=!1){i=i.__v_raw;const o=toRaw(i),a=toRaw(e);r||(e!==a&&track(o,"get",e),track(o,"get",a));const{has:l}=getProto$1(o),u=s?toShallow:r?toReadonly:toReactive;if(l.call(o,e))return u(i.get(e));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(e)}function has$4(i,e=!1){const r=this.__v_raw,s=toRaw(r),o=toRaw(i);return e||(i!==o&&track(s,"has",i),track(s,"has",o)),i===o?r.has(i):r.has(i)||r.has(o)}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 r=toRaw(this),{has:s,get:o}=getProto$1(r);let a=s.call(r,i);a||(i=toRaw(i),a=s.call(r,i));const l=o.call(r,i);return r.set(i,e),a?hasChanged(e,l)&&trigger(r,"set",i,e):trigger(r,"add",i,e),this}function deleteEntry(i){const e=toRaw(this),{has:r,get:s}=getProto$1(e);let o=r.call(e,i);o||(i=toRaw(i),o=r.call(e,i)),s&&s.call(e,i);const a=e.delete(i);return o&&trigger(e,"delete",i,void 0),a}function clear(){const i=toRaw(this),e=i.size!==0,r=i.clear();return e&&trigger(i,"clear",void 0,void 0),r}function createForEach(i,e){return function(s,o){const a=this,l=a.__v_raw,u=toRaw(l),c=e?toShallow:i?toReadonly:toReactive;return!i&&track(u,"iterate",ITERATE_KEY),l.forEach((d,g)=>s.call(o,c(d),c(g),a))}}function createIterableMethod(i,e,r){return function(...s){const o=this.__v_raw,a=toRaw(o),l=isMap$3(a),u=i==="entries"||i===Symbol.iterator&&l,c=i==="keys"&&l,d=o[i](...s),g=r?toShallow:e?toReadonly:toReactive;return!e&&track(a,"iterate",c?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:m,done:y}=d.next();return y?{value:m,done:y}:{value:u?[g(m[0]),g(m[1])]:g(m),done:y}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(i){return function(...e){return i==="delete"?!1:this}}function createInstrumentations(){const i={get(a){return get$2(this,a)},get size(){return size(this)},has:has$4,add,set,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(a){return get$2(this,a,!1,!0)},get size(){return size(this)},has:has$4,add,set,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},r={get(a){return get$2(this,a,!0)},get size(){return size(this,!0)},has(a){return has$4.call(this,a,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},s={get(a){return get$2(this,a,!0,!0)},get size(){return size(this,!0)},has(a){return has$4.call(this,a,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{i[a]=createIterableMethod(a,!1,!1),r[a]=createIterableMethod(a,!0,!1),e[a]=createIterableMethod(a,!1,!0),s[a]=createIterableMethod(a,!0,!0)}),[i,r,e,s]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(i,e){const r=e?i?shallowReadonlyInstrumentations:shallowInstrumentations:i?readonlyInstrumentations:mutableInstrumentations;return(s,o,a)=>o==="__v_isReactive"?!i:o==="__v_isReadonly"?i:o==="__v_raw"?s:Reflect.get(hasOwn$2(r,o)&&o in s?r:s,o,a)}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,r,s,o){if(!isObject$5(i)||i.__v_raw&&!(e&&i.__v_isReactive))return i;const a=o.get(i);if(a)return a;const l=getTargetType(i);if(l===0)return i;const u=new Proxy(i,l===2?s:r);return o.set(i,u),u}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$5(i)?reactive(i):i,toReadonly=i=>isObject$5(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 r=i.dep;r&&triggerEffects(r)}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,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:toRaw(e),this._value=r?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const r=this.__v_isShallow||isShallow(e)||isReadonly(e);e=r?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:toReactive(e),triggerRefValue(this))}}function unref(i){return isRef(i)?i.value:i}const shallowUnwrapHandlers={get:(i,e,r)=>unref(Reflect.get(i,e,r)),set:(i,e,r,s)=>{const o=i[e];return isRef(o)&&!isRef(r)?(o.value=r,!0):Reflect.set(i,e,r,s)}};function proxyRefs(i){return isReactive(i)?i:new Proxy(i,shallowUnwrapHandlers)}function toRefs(i){const e=isArray$9(i)?new Array(i.length):{};for(const r in i)e[r]=toRef(i,r);return e}class ObjectRefImpl{constructor(e,r,s){this._object=e,this._key=r,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,r){const s=i[e];return isRef(s)?s:new ObjectRefImpl(i,e,r)}var _a$1;class ComputedRefImpl{constructor(e,r,s,o){this._setter=r,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=!o,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,r=!1){let s,o;const a=isFunction$6(i);return a?(s=i,o=NOOP):(s=i.get,o=i.set),new ComputedRefImpl(s,o,a||!o,r)}function warn(i,...e){}function callWithErrorHandling(i,e,r,s){let o;try{o=s?i(...s):i()}catch(a){handleError(a,e,r)}return o}function callWithAsyncErrorHandling(i,e,r,s){if(isFunction$6(i)){const a=callWithErrorHandling(i,e,r,s);return a&&isPromise$1(a)&&a.catch(l=>{handleError(l,e,r)}),a}const o=[];for(let a=0;a>>1;getId(queue$1[s])flushIndex&&queue$1.splice(e,1)}function queuePostFlushCb(i){isArray$9(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(;egetId(r)-getId(s)),postFlushIndex=0;postFlushIndexi.id==null?1/0:i.id,comparator=(i,e)=>{const r=getId(i)-getId(e);if(r===0){if(i.pre&&!e.pre)return-1;if(e.pre&&!i.pre)return 1}return r};function flushJobs(i){isFlushPending=!1,isFlushing=!0,queue$1.sort(comparator);const e=NOOP;try{for(flushIndex=0;flushIndexisString$2(b)?b.trim():b)),m&&(o=r.map(looseToNumber))}let u,c=s[u=toHandlerKey(e)]||s[u=toHandlerKey(camelize$2(e))];!c&&a&&(c=s[u=toHandlerKey(hyphenate(e))]),c&&callWithAsyncErrorHandling(c,i,6,o);const d=s[u+"Once"];if(d){if(!i.emitted)i.emitted={};else if(i.emitted[u])return;i.emitted[u]=!0,callWithAsyncErrorHandling(d,i,6,o)}}function normalizeEmitsOptions(i,e,r=!1){const s=e.emitsCache,o=s.get(i);if(o!==void 0)return o;const a=i.emits;let l={},u=!1;if(!isFunction$6(i)){const c=d=>{const g=normalizeEmitsOptions(d,e,!0);g&&(u=!0,extend$3(l,g))};!r&&e.mixins.length&&e.mixins.forEach(c),i.extends&&c(i.extends),i.mixins&&i.mixins.forEach(c)}return!a&&!u?(isObject$5(i)&&s.set(i,null),null):(isArray$9(a)?a.forEach(c=>l[c]=null):extend$3(l,a),isObject$5(i)&&s.set(i,l),l)}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,r){if(!e||i._n)return i;const s=(...o)=>{s._d&&setBlockTracking(-1);const a=setCurrentRenderingInstance(e);let l;try{l=i(...o)}finally{setCurrentRenderingInstance(a),s._d&&setBlockTracking(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function markAttrsAccessed(){}function renderComponentRoot(i){const{type:e,vnode:r,proxy:s,withProxy:o,props:a,propsOptions:[l],slots:u,attrs:c,emit:d,render:g,renderCache:m,data:y,setupState:b,ctx:S,inheritAttrs:A}=i;let E,x;const P=setCurrentRenderingInstance(i);try{if(r.shapeFlag&4){const T=o||s;E=normalizeVNode(g.call(T,T,m,a,b,y,S)),x=c}else{const T=e;E=normalizeVNode(T.length>1?T(a,{attrs:c,slots:u,emit:d}):T(a,null)),x=e.props?c:getFunctionalFallthrough(c)}}catch(T){blockStack.length=0,handleError(T,i,1),E=createVNode(Comment)}let C=E;if(x&&A!==!1){const T=Object.keys(x),{shapeFlag:_}=C;T.length&&_&7&&(l&&T.some(isModelListener)&&(x=filterModelListeners(x,l)),C=cloneVNode(C,x))}return r.dirs&&(C=cloneVNode(C),C.dirs=C.dirs?C.dirs.concat(r.dirs):r.dirs),r.transition&&(C.transition=r.transition),E=C,setCurrentRenderingInstance(P),E}const getFunctionalFallthrough=i=>{let e;for(const r in i)(r==="class"||r==="style"||isOn(r))&&((e||(e={}))[r]=i[r]);return e},filterModelListeners=(i,e)=>{const r={};for(const s in i)(!isModelListener(s)||!(s.slice(9)in e))&&(r[s]=i[s]);return r};function shouldUpdateComponent(i,e,r){const{props:s,children:o,component:a}=i,{props:l,children:u,patchFlag:c}=e,d=a.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&c>=0){if(c&1024)return!0;if(c&16)return s?hasPropsChanged(s,l,d):!!l;if(c&8){const g=e.dynamicProps;for(let m=0;mi.__isSuspense;function queueEffectWithSuspense(i,e){e&&e.pendingBranch?isArray$9(i)?e.effects.push(...i):e.effects.push(i):queuePostFlushCb(i)}function provide(i,e){if(currentInstance){let r=currentInstance.provides;const s=currentInstance.parent&¤tInstance.parent.provides;s===r&&(r=currentInstance.provides=Object.create(s)),r[i]=e}}function inject(i,e,r=!1){const s=currentInstance||currentRenderingInstance;if(s){const o=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(o&&i in o)return o[i];if(arguments.length>1)return r&&isFunction$6(e)?e.call(s.proxy):e}}function watchEffect(i,e){return doWatch(i,null,e)}const INITIAL_WATCHER_VALUE={};function watch(i,e,r){return doWatch(i,e,r)}function doWatch(i,e,{immediate:r,deep:s,flush:o,onTrack:a,onTrigger:l}=EMPTY_OBJ){const u=getCurrentScope()===(currentInstance==null?void 0:currentInstance.scope)?currentInstance:null;let c,d=!1,g=!1;if(isRef(i)?(c=()=>i.value,d=isShallow(i)):isReactive(i)?(c=()=>i,s=!0):isArray$9(i)?(g=!0,d=i.some(C=>isReactive(C)||isShallow(C)),c=()=>i.map(C=>{if(isRef(C))return C.value;if(isReactive(C))return traverse(C);if(isFunction$6(C))return callWithErrorHandling(C,u,2)})):isFunction$6(i)?e?c=()=>callWithErrorHandling(i,u,2):c=()=>{if(!(u&&u.isUnmounted))return m&&m(),callWithAsyncErrorHandling(i,u,3,[y])}:c=NOOP,e&&s){const C=c;c=()=>traverse(C())}let m,y=C=>{m=x.onStop=()=>{callWithErrorHandling(C,u,4)}},b;if(isInSSRComponentSetup)if(y=NOOP,e?r&&callWithAsyncErrorHandling(e,u,3,[c(),g?[]:void 0,y]):c(),o==="sync"){const C=useSSRContext();b=C.__watcherHandles||(C.__watcherHandles=[])}else return NOOP;let S=g?new Array(i.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const A=()=>{if(x.active)if(e){const C=x.run();(s||d||(g?C.some((T,_)=>hasChanged(T,S[_])):hasChanged(C,S)))&&(m&&m(),callWithAsyncErrorHandling(e,u,3,[C,S===INITIAL_WATCHER_VALUE?void 0:g&&S[0]===INITIAL_WATCHER_VALUE?[]:S,y]),S=C)}else x.run()};A.allowRecurse=!!e;let E;o==="sync"?E=A:o==="post"?E=()=>queuePostRenderEffect(A,u&&u.suspense):(A.pre=!0,u&&(A.id=u.uid),E=()=>queueJob(A));const x=new ReactiveEffect(c,E);e?r?A():S=x.run():o==="post"?queuePostRenderEffect(x.run.bind(x),u&&u.suspense):x.run();const P=()=>{x.stop(),u&&u.scope&&remove$7(u.scope.effects,x)};return b&&b.push(P),P}function instanceWatch(i,e,r){const s=this.proxy,o=isString$2(i)?i.includes(".")?createPathGetter(s,i):()=>s[i]:i.bind(s,s);let a;isFunction$6(e)?a=e:(a=e.handler,r=e);const l=currentInstance;setCurrentInstance(this);const u=doWatch(o,a.bind(s),r);return l?setCurrentInstance(l):unsetCurrentInstance(),u}function createPathGetter(i,e){const r=e.split(".");return()=>{let s=i;for(let o=0;o{traverse(r,e)});else if(isPlainObject$3(i))for(const r in i)traverse(i[r],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 r=getCurrentInstance(),s=useTransitionState();let o;return()=>{const a=e.default&&getTransitionRawChildren(e.default(),!0);if(!a||!a.length)return;let l=a[0];if(a.length>1){for(const A of a)if(A.type!==Comment){l=A;break}}const u=toRaw(i),{mode:c}=u;if(s.isLeaving)return emptyPlaceholder(l);const d=getKeepAliveChild(l);if(!d)return emptyPlaceholder(l);const g=resolveTransitionHooks(d,u,s,r);setTransitionHooks(d,g);const m=r.subTree,y=m&&getKeepAliveChild(m);let b=!1;const{getTransitionKey:S}=d.type;if(S){const A=S();o===void 0?o=A:A!==o&&(o=A,b=!0)}if(y&&y.type!==Comment&&(!isSameVNodeType(d,y)||b)){const A=resolveTransitionHooks(y,u,s,r);if(setTransitionHooks(y,A),c==="out-in")return s.isLeaving=!0,A.afterLeave=()=>{s.isLeaving=!1,r.update.active!==!1&&r.update()},emptyPlaceholder(l);c==="in-out"&&d.type!==Comment&&(A.delayLeave=(E,x,P)=>{const C=getLeavingNodesForType(s,y);C[String(y.key)]=y,E._leaveCb=()=>{x(),E._leaveCb=void 0,delete g.delayedLeave},g.delayedLeave=P})}return l}}},BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(i,e){const{leavingVNodes:r}=i;let s=r.get(e.type);return s||(s=Object.create(null),r.set(e.type,s)),s}function resolveTransitionHooks(i,e,r,s){const{appear:o,mode:a,persisted:l=!1,onBeforeEnter:u,onEnter:c,onAfterEnter:d,onEnterCancelled:g,onBeforeLeave:m,onLeave:y,onAfterLeave:b,onLeaveCancelled:S,onBeforeAppear:A,onAppear:E,onAfterAppear:x,onAppearCancelled:P}=e,C=String(i.key),T=getLeavingNodesForType(r,i),_=(N,I)=>{N&&callWithAsyncErrorHandling(N,s,9,I)},B=(N,I)=>{const R=I[1];_(N,I),isArray$9(N)?N.every(F=>F.length<=1)&&R():N.length<=1&&R()},M={mode:a,persisted:l,beforeEnter(N){let I=u;if(!r.isMounted)if(o)I=A||u;else return;N._leaveCb&&N._leaveCb(!0);const R=T[C];R&&isSameVNodeType(i,R)&&R.el._leaveCb&&R.el._leaveCb(),_(I,[N])},enter(N){let I=c,R=d,F=g;if(!r.isMounted)if(o)I=E||c,R=x||d,F=P||g;else return;let k=!1;const V=N._enterCb=D=>{k||(k=!0,D?_(F,[N]):_(R,[N]),M.delayedLeave&&M.delayedLeave(),N._enterCb=void 0)};I?B(I,[N,V]):V()},leave(N,I){const R=String(i.key);if(N._enterCb&&N._enterCb(!0),r.isUnmounting)return I();_(m,[N]);let F=!1;const k=N._leaveCb=V=>{F||(F=!0,I(),V?_(S,[N]):_(b,[N]),N._leaveCb=void 0,T[R]===i&&delete T[R])};T[R]=i,y?B(y,[N,k]):k()},clone(N){return resolveTransitionHooks(N,e,r,s)}};return M}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,r){let s=[],o=0;for(let a=0;a1)for(let a=0;a!!i.type.__asyncLoader;function defineAsyncComponent(i){isFunction$6(i)&&(i={loader:i});const{loader:e,loadingComponent:r,errorComponent:s,delay:o=200,timeout:a,suspensible:l=!0,onError:u}=i;let c=null,d,g=0;const m=()=>(g++,c=null,y()),y=()=>{let b;return c||(b=c=e().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),u)return new Promise((A,E)=>{u(S,()=>A(m()),()=>E(S),g+1)});throw S}).then(S=>b!==c&&c?c:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),d=S,S)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:y,get __asyncResolved(){return d},setup(){const b=currentInstance;if(d)return()=>createInnerComp(d,b);const S=P=>{c=null,handleError(P,b,13,!s)};if(l&&b.suspense||isInSSRComponentSetup)return y().then(P=>()=>createInnerComp(P,b)).catch(P=>(S(P),()=>s?createVNode(s,{error:P}):null));const A=ref(!1),E=ref(),x=ref(!!o);return o&&setTimeout(()=>{x.value=!1},o),a!=null&&setTimeout(()=>{if(!A.value&&!E.value){const P=new Error(`Async component timed out after ${a}ms.`);S(P),E.value=P}},a),y().then(()=>{A.value=!0,b.parent&&isKeepAlive(b.parent.vnode)&&queueJob(b.parent.update)}).catch(P=>{S(P),E.value=P}),()=>{if(A.value&&d)return createInnerComp(d,b);if(E.value&&s)return createVNode(s,{error:E.value});if(r&&!x.value)return createVNode(r)}}})}function createInnerComp(i,e){const{ref:r,props:s,children:o,ce:a}=e.vnode,l=createVNode(i,s,o);return l.ref=r,l.ce=a,delete e.vnode.ce,l}const 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,r=currentInstance){const s=i.__wdc||(i.__wdc=()=>{let o=r;for(;o;){if(o.isDeactivated)return;o=o.parent}return i()});if(injectHook(e,s,r),r){let o=r.parent;for(;o&&o.parent;)isKeepAlive(o.parent.vnode)&&injectToKeepAliveRoot(s,e,r,o),o=o.parent}}function injectToKeepAliveRoot(i,e,r,s){const o=injectHook(e,i,s,!0);onUnmounted(()=>{remove$7(s[e],o)},r)}function injectHook(i,e,r=currentInstance,s=!1){if(r){const o=r[i]||(r[i]=[]),a=e.__weh||(e.__weh=(...l)=>{if(r.isUnmounted)return;pauseTracking(),setCurrentInstance(r);const u=callWithAsyncErrorHandling(e,r,i,l);return unsetCurrentInstance(),resetTracking(),u});return s?o.unshift(a):o.push(a),a}}const createHook=i=>(e,r=currentInstance)=>(!isInSSRComponentSetup||i==="sp")&&injectHook(i,(...s)=>e(...s),r),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 r=currentRenderingInstance;if(r===null)return i;const s=getExposeProxy(r)||r.proxy,o=i.dirs||(i.dirs=[]);for(let a=0;ae(l,u,void 0,a&&a[u]));else{const l=Object.keys(i);o=new Array(l.length);for(let u=0,c=l.length;uisVNode(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:r,setupState:s,data:o,props:a,accessCache:l,type:u,appContext:c}=i;let d;if(e[0]!=="$"){const b=l[e];if(b!==void 0)switch(b){case 1:return s[e];case 2:return o[e];case 4:return r[e];case 3:return a[e]}else{if(hasSetupBinding(s,e))return l[e]=1,s[e];if(o!==EMPTY_OBJ&&hasOwn$2(o,e))return l[e]=2,o[e];if((d=i.propsOptions[0])&&hasOwn$2(d,e))return l[e]=3,a[e];if(r!==EMPTY_OBJ&&hasOwn$2(r,e))return l[e]=4,r[e];shouldCacheAccess&&(l[e]=0)}}const g=publicPropertiesMap[e];let m,y;if(g)return e==="$attrs"&&track(i,"get",e),g(i);if((m=u.__cssModules)&&(m=m[e]))return m;if(r!==EMPTY_OBJ&&hasOwn$2(r,e))return l[e]=4,r[e];if(y=c.config.globalProperties,hasOwn$2(y,e))return y[e]},set({_:i},e,r){const{data:s,setupState:o,ctx:a}=i;return hasSetupBinding(o,e)?(o[e]=r,!0):s!==EMPTY_OBJ&&hasOwn$2(s,e)?(s[e]=r,!0):hasOwn$2(i.props,e)||e[0]==="$"&&e.slice(1)in i?!1:(a[e]=r,!0)},has({_:{data:i,setupState:e,accessCache:r,ctx:s,appContext:o,propsOptions:a}},l){let u;return!!r[l]||i!==EMPTY_OBJ&&hasOwn$2(i,l)||hasSetupBinding(e,l)||(u=a[0])&&hasOwn$2(u,l)||hasOwn$2(s,l)||hasOwn$2(publicPropertiesMap,l)||hasOwn$2(o.config.globalProperties,l)},defineProperty(i,e,r){return r.get!=null?i._.accessCache[e]=0:hasOwn$2(r,"value")&&this.set(i,e,r.value,null),Reflect.defineProperty(i,e,r)}};let shouldCacheAccess=!0;function applyOptions(i){const e=resolveMergedOptions(i),r=i.proxy,s=i.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook$1(e.beforeCreate,i,"bc");const{data:o,computed:a,methods:l,watch:u,provide:c,inject:d,created:g,beforeMount:m,mounted:y,beforeUpdate:b,updated:S,activated:A,deactivated:E,beforeDestroy:x,beforeUnmount:P,destroyed:C,unmounted:T,render:_,renderTracked:B,renderTriggered:M,errorCaptured:N,serverPrefetch:I,expose:R,inheritAttrs:F,components:k,directives:V,filters:D}=e;if(d&&resolveInjections(d,s,null,i.appContext.config.unwrapInjectedRef),l)for(const q in l){const G=l[q];isFunction$6(G)&&(s[q]=G.bind(r))}if(o){const q=o.call(r,r);isObject$5(q)&&(i.data=reactive(q))}if(shouldCacheAccess=!0,a)for(const q in a){const G=a[q],U=isFunction$6(G)?G.bind(r,r):isFunction$6(G.get)?G.get.bind(r,r):NOOP,Z=!isFunction$6(G)&&isFunction$6(G.set)?G.set.bind(r):NOOP,W=computed({get:U,set:Z});Object.defineProperty(s,q,{enumerable:!0,configurable:!0,get:()=>W.value,set:K=>W.value=K})}if(u)for(const q in u)createWatcher(u[q],s,r,q);if(c){const q=isFunction$6(c)?c.call(r):c;Reflect.ownKeys(q).forEach(G=>{provide(G,q[G])})}g&&callHook$1(g,i,"c");function O(q,G){isArray$9(G)?G.forEach(U=>q(U.bind(r))):G&&q(G.bind(r))}if(O(onBeforeMount,m),O(onMounted,y),O(onBeforeUpdate,b),O(onUpdated,S),O(onActivated,A),O(onDeactivated,E),O(onErrorCaptured,N),O(onRenderTracked,B),O(onRenderTriggered,M),O(onBeforeUnmount,P),O(onUnmounted,T),O(onServerPrefetch,I),isArray$9(R))if(R.length){const q=i.exposed||(i.exposed={});R.forEach(G=>{Object.defineProperty(q,G,{get:()=>r[G],set:U=>r[G]=U})})}else i.exposed||(i.exposed={});_&&i.render===NOOP&&(i.render=_),F!=null&&(i.inheritAttrs=F),k&&(i.components=k),V&&(i.directives=V)}function resolveInjections(i,e,r=NOOP,s=!1){isArray$9(i)&&(i=normalizeInject(i));for(const o in i){const a=i[o];let l;isObject$5(a)?"default"in a?l=inject(a.from||o,a.default,!0):l=inject(a.from||o):l=inject(a),isRef(l)&&s?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>l.value,set:u=>l.value=u}):e[o]=l}}function callHook$1(i,e,r){callWithAsyncErrorHandling(isArray$9(i)?i.map(s=>s.bind(e.proxy)):i.bind(e.proxy),e,r)}function createWatcher(i,e,r,s){const o=s.includes(".")?createPathGetter(r,s):()=>r[s];if(isString$2(i)){const a=e[i];isFunction$6(a)&&watch(o,a)}else if(isFunction$6(i))watch(o,i.bind(r));else if(isObject$5(i))if(isArray$9(i))i.forEach(a=>createWatcher(a,e,r,s));else{const a=isFunction$6(i.handler)?i.handler.bind(r):e[i.handler];isFunction$6(a)&&watch(o,a,i)}}function resolveMergedOptions(i){const e=i.type,{mixins:r,extends:s}=e,{mixins:o,optionsCache:a,config:{optionMergeStrategies:l}}=i.appContext,u=a.get(e);let c;return u?c=u:!o.length&&!r&&!s?c=e:(c={},o.length&&o.forEach(d=>mergeOptions$1(c,d,l,!0)),mergeOptions$1(c,e,l)),isObject$5(e)&&a.set(e,c),c}function mergeOptions$1(i,e,r,s=!1){const{mixins:o,extends:a}=e;a&&mergeOptions$1(i,a,r,!0),o&&o.forEach(l=>mergeOptions$1(i,l,r,!0));for(const l in e)if(!(s&&l==="expose")){const u=internalOptionMergeStrats[l]||r&&r[l];i[l]=u?u(i[l],e[l]):e[l]}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$6(i)?i.call(this,this):i,isFunction$6(e)?e.call(this,this):e)}:e:i}function mergeInject(i,e){return mergeObjectOptions(normalizeInject(i),normalizeInject(e))}function normalizeInject(i){if(isArray$9(i)){const e={};for(let r=0;r0)&&!(l&16)){if(l&8){const g=i.vnode.dynamicProps;for(let m=0;m{c=!0;const[y,b]=normalizePropsOptions(m,e,!0);extend$3(l,y),b&&u.push(...b)};!r&&e.mixins.length&&e.mixins.forEach(g),i.extends&&g(i.extends),i.mixins&&i.mixins.forEach(g)}if(!a&&!c)return isObject$5(i)&&s.set(i,EMPTY_ARR),EMPTY_ARR;if(isArray$9(a))for(let g=0;g-1,b[1]=A<0||S-1||hasOwn$2(b,"default"))&&u.push(m)}}}const d=[l,u];return isObject$5(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$9(e)?e.findIndex(r=>isSameType(r,i)):isFunction$6(e)&&isSameType(e,i)?0:-1}const isInternalKey=i=>i[0]==="_"||i==="$stable",normalizeSlotValue=i=>isArray$9(i)?i.map(normalizeVNode):[normalizeVNode(i)],normalizeSlot$1=(i,e,r)=>{if(e._n)return e;const s=withCtx((...o)=>normalizeSlotValue(e(...o)),r);return s._c=!1,s},normalizeObjectSlots=(i,e,r)=>{const s=i._ctx;for(const o in i){if(isInternalKey(o))continue;const a=i[o];if(isFunction$6(a))e[o]=normalizeSlot$1(o,a,s);else if(a!=null){const l=normalizeSlotValue(a);e[o]=()=>l}}},normalizeVNodeSlots=(i,e)=>{const r=normalizeSlotValue(e);i.slots.default=()=>r},initSlots=(i,e)=>{if(i.vnode.shapeFlag&32){const r=e._;r?(i.slots=toRaw(e),def(e,"_",r)):normalizeObjectSlots(e,i.slots={})}else i.slots={},e&&normalizeVNodeSlots(i,e);def(i.slots,InternalObjectKey,1)},updateSlots=(i,e,r)=>{const{vnode:s,slots:o}=i;let a=!0,l=EMPTY_OBJ;if(s.shapeFlag&32){const u=e._;u?r&&u===1?a=!1:(extend$3(o,e),!r&&u===1&&delete o._):(a=!e.$stable,normalizeObjectSlots(e,o)),l=e}else e&&(normalizeVNodeSlots(i,e),l={default:1});if(a)for(const u in o)!isInternalKey(u)&&!(u in l)&&delete o[u]};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,o=null){isFunction$6(s)||(s=Object.assign({},s)),o!=null&&!isObject$5(o)&&(o=null);const a=createAppContext(),l=new Set;let u=!1;const c=a.app={_uid:uid$1++,_component:s,_props:o,_container:null,_context:a,_instance:null,version,get config(){return a.config},set config(d){},use(d,...g){return l.has(d)||(d&&isFunction$6(d.install)?(l.add(d),d.install(c,...g)):isFunction$6(d)&&(l.add(d),d(c,...g))),c},mixin(d){return a.mixins.includes(d)||a.mixins.push(d),c},component(d,g){return g?(a.components[d]=g,c):a.components[d]},directive(d,g){return g?(a.directives[d]=g,c):a.directives[d]},mount(d,g,m){if(!u){const y=createVNode(s,o);return y.appContext=a,g&&e?e(y,d):i(y,d,m),u=!0,c._container=d,d.__vue_app__=c,getExposeProxy(y.component)||y.component.proxy}},unmount(){u&&(i(null,c._container),delete c._container.__vue_app__)},provide(d,g){return a.provides[d]=g,c}};return c}}function setRef(i,e,r,s,o=!1){if(isArray$9(i)){i.forEach((y,b)=>setRef(y,e&&(isArray$9(e)?e[b]:e),r,s,o));return}if(isAsyncWrapper(s)&&!o)return;const a=s.shapeFlag&4?getExposeProxy(s.component)||s.component.proxy:s.el,l=o?null:a,{i:u,r:c}=i,d=e&&e.r,g=u.refs===EMPTY_OBJ?u.refs={}:u.refs,m=u.setupState;if(d!=null&&d!==c&&(isString$2(d)?(g[d]=null,hasOwn$2(m,d)&&(m[d]=null)):isRef(d)&&(d.value=null)),isFunction$6(c))callWithErrorHandling(c,u,12,[l,g]);else{const y=isString$2(c),b=isRef(c);if(y||b){const S=()=>{if(i.f){const A=y?hasOwn$2(m,c)?m[c]:g[c]:c.value;o?isArray$9(A)&&remove$7(A,a):isArray$9(A)?A.includes(a)||A.push(a):y?(g[c]=[a],hasOwn$2(m,c)&&(m[c]=g[c])):(c.value=[a],i.k&&(g[i.k]=c.value))}else y?(g[c]=l,hasOwn$2(m,c)&&(m[c]=l)):b&&(c.value=l,i.k&&(g[i.k]=l))};l?(S.id=-1,queuePostRenderEffect(S,r)):S()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(i){return baseCreateRenderer(i)}function baseCreateRenderer(i,e){const r=getGlobalThis();r.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:l,createText:u,createComment:c,setText:d,setElementText:g,parentNode:m,nextSibling:y,setScopeId:b=NOOP,insertStaticContent:S}=i,A=(te,oe,z,me=null,pe=null,ee=null,ne=!1,fe=null,_e=!!oe.dynamicChildren)=>{if(te===oe)return;te&&!isSameVNodeType(te,oe)&&(me=he(te),K(te,pe,ee,!0),te=null),oe.patchFlag===-2&&(_e=!1,oe.dynamicChildren=null);const{type:Ae,ref:Pe,shapeFlag:Be}=oe;switch(Ae){case Text:E(te,oe,z,me);break;case Comment:x(te,oe,z,me);break;case Static:te==null&&P(oe,z,me,ne);break;case Fragment:k(te,oe,z,me,pe,ee,ne,fe,_e);break;default:Be&1?_(te,oe,z,me,pe,ee,ne,fe,_e):Be&6?V(te,oe,z,me,pe,ee,ne,fe,_e):(Be&64||Be&128)&&Ae.process(te,oe,z,me,pe,ee,ne,fe,_e,Se)}Pe!=null&&pe&&setRef(Pe,te&&te.ref,ee,oe||te,!oe)},E=(te,oe,z,me)=>{if(te==null)s(oe.el=u(oe.children),z,me);else{const pe=oe.el=te.el;oe.children!==te.children&&d(pe,oe.children)}},x=(te,oe,z,me)=>{te==null?s(oe.el=c(oe.children||""),z,me):oe.el=te.el},P=(te,oe,z,me)=>{[te.el,te.anchor]=S(te.children,oe,z,me,te.el,te.anchor)},C=({el:te,anchor:oe},z,me)=>{let pe;for(;te&&te!==oe;)pe=y(te),s(te,z,me),te=pe;s(oe,z,me)},T=({el:te,anchor:oe})=>{let z;for(;te&&te!==oe;)z=y(te),o(te),te=z;o(oe)},_=(te,oe,z,me,pe,ee,ne,fe,_e)=>{ne=ne||oe.type==="svg",te==null?B(oe,z,me,pe,ee,ne,fe,_e):I(te,oe,pe,ee,ne,fe,_e)},B=(te,oe,z,me,pe,ee,ne,fe)=>{let _e,Ae;const{type:Pe,props:Be,shapeFlag:Re,transition:xe,dirs:ce}=te;if(_e=te.el=l(te.type,ee,Be&&Be.is,Be),Re&8?g(_e,te.children):Re&16&&N(te.children,_e,null,me,pe,ee&&Pe!=="foreignObject",ne,fe),ce&&invokeDirectiveHook(te,null,me,"created"),M(_e,te,te.scopeId,ne,me),Be){for(const de in Be)de!=="value"&&!isReservedProp(de)&&a(_e,de,null,Be[de],ee,te.children,me,pe,Q);"value"in Be&&a(_e,"value",null,Be.value),(Ae=Be.onVnodeBeforeMount)&&invokeVNodeHook(Ae,me,te)}ce&&invokeDirectiveHook(te,null,me,"beforeMount");const Ee=(!pe||pe&&!pe.pendingBranch)&&xe&&!xe.persisted;Ee&&xe.beforeEnter(_e),s(_e,oe,z),((Ae=Be&&Be.onVnodeMounted)||Ee||ce)&&queuePostRenderEffect(()=>{Ae&&invokeVNodeHook(Ae,me,te),Ee&&xe.enter(_e),ce&&invokeDirectiveHook(te,null,me,"mounted")},pe)},M=(te,oe,z,me,pe)=>{if(z&&b(te,z),me)for(let ee=0;ee{for(let Ae=_e;Ae{const fe=oe.el=te.el;let{patchFlag:_e,dynamicChildren:Ae,dirs:Pe}=oe;_e|=te.patchFlag&16;const Be=te.props||EMPTY_OBJ,Re=oe.props||EMPTY_OBJ;let xe;z&&toggleRecurse(z,!1),(xe=Re.onVnodeBeforeUpdate)&&invokeVNodeHook(xe,z,oe,te),Pe&&invokeDirectiveHook(oe,te,z,"beforeUpdate"),z&&toggleRecurse(z,!0);const ce=pe&&oe.type!=="foreignObject";if(Ae?R(te.dynamicChildren,Ae,fe,z,me,ce,ee):ne||G(te,oe,fe,null,z,me,ce,ee,!1),_e>0){if(_e&16)F(fe,oe,Be,Re,z,me,pe);else if(_e&2&&Be.class!==Re.class&&a(fe,"class",null,Re.class,pe),_e&4&&a(fe,"style",Be.style,Re.style,pe),_e&8){const Ee=oe.dynamicProps;for(let de=0;de{xe&&invokeVNodeHook(xe,z,oe,te),Pe&&invokeDirectiveHook(oe,te,z,"updated")},me)},R=(te,oe,z,me,pe,ee,ne)=>{for(let fe=0;fe{if(z!==me){if(z!==EMPTY_OBJ)for(const fe in z)!isReservedProp(fe)&&!(fe in me)&&a(te,fe,z[fe],null,ne,oe.children,pe,ee,Q);for(const fe in me){if(isReservedProp(fe))continue;const _e=me[fe],Ae=z[fe];_e!==Ae&&fe!=="value"&&a(te,fe,Ae,_e,ne,oe.children,pe,ee,Q)}"value"in me&&a(te,"value",z.value,me.value)}},k=(te,oe,z,me,pe,ee,ne,fe,_e)=>{const Ae=oe.el=te?te.el:u(""),Pe=oe.anchor=te?te.anchor:u("");let{patchFlag:Be,dynamicChildren:Re,slotScopeIds:xe}=oe;xe&&(fe=fe?fe.concat(xe):xe),te==null?(s(Ae,z,me),s(Pe,z,me),N(oe.children,z,Pe,pe,ee,ne,fe,_e)):Be>0&&Be&64&&Re&&te.dynamicChildren?(R(te.dynamicChildren,Re,z,pe,ee,ne,fe),(oe.key!=null||pe&&oe===pe.subTree)&&traverseStaticChildren(te,oe,!0)):G(te,oe,z,Pe,pe,ee,ne,fe,_e)},V=(te,oe,z,me,pe,ee,ne,fe,_e)=>{oe.slotScopeIds=fe,te==null?oe.shapeFlag&512?pe.ctx.activate(oe,z,me,ne,_e):D(oe,z,me,pe,ee,ne,_e):$(te,oe,_e)},D=(te,oe,z,me,pe,ee,ne)=>{const fe=te.component=createComponentInstance(te,me,pe);if(isKeepAlive(te)&&(fe.ctx.renderer=Se),setupComponent(fe),fe.asyncDep){if(pe&&pe.registerDep(fe,O),!te.el){const _e=fe.subTree=createVNode(Comment);x(null,_e,oe,z)}return}O(fe,te,oe,z,pe,ee,ne)},$=(te,oe,z)=>{const me=oe.component=te.component;if(shouldUpdateComponent(te,oe,z))if(me.asyncDep&&!me.asyncResolved){q(me,oe,z);return}else me.next=oe,invalidateJob(me.update),me.update();else oe.el=te.el,me.vnode=oe},O=(te,oe,z,me,pe,ee,ne)=>{const fe=()=>{if(te.isMounted){let{next:Pe,bu:Be,u:Re,parent:xe,vnode:ce}=te,Ee=Pe,de;toggleRecurse(te,!1),Pe?(Pe.el=ce.el,q(te,Pe,ne)):Pe=ce,Be&&invokeArrayFns(Be),(de=Pe.props&&Pe.props.onVnodeBeforeUpdate)&&invokeVNodeHook(de,xe,Pe,ce),toggleRecurse(te,!0);const De=renderComponentRoot(te),Ne=te.subTree;te.subTree=De,A(Ne,De,m(Ne.el),he(Ne),te,pe,ee),Pe.el=De.el,Ee===null&&updateHOCHostEl(te,De.el),Re&&queuePostRenderEffect(Re,pe),(de=Pe.props&&Pe.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(de,xe,Pe,ce),pe)}else{let Pe;const{el:Be,props:Re}=oe,{bm:xe,m:ce,parent:Ee}=te,de=isAsyncWrapper(oe);if(toggleRecurse(te,!1),xe&&invokeArrayFns(xe),!de&&(Pe=Re&&Re.onVnodeBeforeMount)&&invokeVNodeHook(Pe,Ee,oe),toggleRecurse(te,!0),Be&&Me){const De=()=>{te.subTree=renderComponentRoot(te),Me(Be,te.subTree,te,pe,null)};de?oe.type.__asyncLoader().then(()=>!te.isUnmounted&&De()):De()}else{const De=te.subTree=renderComponentRoot(te);A(null,De,z,me,te,pe,ee),oe.el=De.el}if(ce&&queuePostRenderEffect(ce,pe),!de&&(Pe=Re&&Re.onVnodeMounted)){const De=oe;queuePostRenderEffect(()=>invokeVNodeHook(Pe,Ee,De),pe)}(oe.shapeFlag&256||Ee&&isAsyncWrapper(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&te.a&&queuePostRenderEffect(te.a,pe),te.isMounted=!0,oe=z=me=null}},_e=te.effect=new ReactiveEffect(fe,()=>queueJob(Ae),te.scope),Ae=te.update=()=>_e.run();Ae.id=te.uid,toggleRecurse(te,!0),Ae()},q=(te,oe,z)=>{oe.component=te;const me=te.vnode.props;te.vnode=oe,te.next=null,updateProps(te,oe.props,me,z),updateSlots(te,oe.children,z),pauseTracking(),flushPreFlushCbs(),resetTracking()},G=(te,oe,z,me,pe,ee,ne,fe,_e=!1)=>{const Ae=te&&te.children,Pe=te?te.shapeFlag:0,Be=oe.children,{patchFlag:Re,shapeFlag:xe}=oe;if(Re>0){if(Re&128){Z(Ae,Be,z,me,pe,ee,ne,fe,_e);return}else if(Re&256){U(Ae,Be,z,me,pe,ee,ne,fe,_e);return}}xe&8?(Pe&16&&Q(Ae,pe,ee),Be!==Ae&&g(z,Be)):Pe&16?xe&16?Z(Ae,Be,z,me,pe,ee,ne,fe,_e):Q(Ae,pe,ee,!0):(Pe&8&&g(z,""),xe&16&&N(Be,z,me,pe,ee,ne,fe,_e))},U=(te,oe,z,me,pe,ee,ne,fe,_e)=>{te=te||EMPTY_ARR,oe=oe||EMPTY_ARR;const Ae=te.length,Pe=oe.length,Be=Math.min(Ae,Pe);let Re;for(Re=0;RePe?Q(te,pe,ee,!0,!1,Be):N(oe,z,me,pe,ee,ne,fe,_e,Be)},Z=(te,oe,z,me,pe,ee,ne,fe,_e)=>{let Ae=0;const Pe=oe.length;let Be=te.length-1,Re=Pe-1;for(;Ae<=Be&&Ae<=Re;){const xe=te[Ae],ce=oe[Ae]=_e?cloneIfMounted(oe[Ae]):normalizeVNode(oe[Ae]);if(isSameVNodeType(xe,ce))A(xe,ce,z,null,pe,ee,ne,fe,_e);else break;Ae++}for(;Ae<=Be&&Ae<=Re;){const xe=te[Be],ce=oe[Re]=_e?cloneIfMounted(oe[Re]):normalizeVNode(oe[Re]);if(isSameVNodeType(xe,ce))A(xe,ce,z,null,pe,ee,ne,fe,_e);else break;Be--,Re--}if(Ae>Be){if(Ae<=Re){const xe=Re+1,ce=xeRe)for(;Ae<=Be;)K(te[Ae],pe,ee,!0),Ae++;else{const xe=Ae,ce=Ae,Ee=new Map;for(Ae=ce;Ae<=Re;Ae++){const Qe=oe[Ae]=_e?cloneIfMounted(oe[Ae]):normalizeVNode(oe[Ae]);Qe.key!=null&&Ee.set(Qe.key,Ae)}let de,De=0;const Ne=Re-ce+1;let Ue=!1,Ye=0;const $e=new Array(Ne);for(Ae=0;Ae=Ne){K(Qe,pe,ee,!0);continue}let tt;if(Qe.key!=null)tt=Ee.get(Qe.key);else for(de=ce;de<=Re;de++)if($e[de-ce]===0&&isSameVNodeType(Qe,oe[de])){tt=de;break}tt===void 0?K(Qe,pe,ee,!0):($e[tt-ce]=Ae+1,tt>=Ye?Ye=tt:Ue=!0,A(Qe,oe[tt],z,null,pe,ee,ne,fe,_e),De++)}const Ke=Ue?getSequence($e):EMPTY_ARR;for(de=Ke.length-1,Ae=Ne-1;Ae>=0;Ae--){const Qe=ce+Ae,tt=oe[Qe],ct=Qe+1{const{el:ee,type:ne,transition:fe,children:_e,shapeFlag:Ae}=te;if(Ae&6){W(te.component.subTree,oe,z,me);return}if(Ae&128){te.suspense.move(oe,z,me);return}if(Ae&64){ne.move(te,oe,z,Se);return}if(ne===Fragment){s(ee,oe,z);for(let Be=0;Be<_e.length;Be++)W(_e[Be],oe,z,me);s(te.anchor,oe,z);return}if(ne===Static){C(te,oe,z);return}if(me!==2&&Ae&1&&fe)if(me===0)fe.beforeEnter(ee),s(ee,oe,z),queuePostRenderEffect(()=>fe.enter(ee),pe);else{const{leave:Be,delayLeave:Re,afterLeave:xe}=fe,ce=()=>s(ee,oe,z),Ee=()=>{Be(ee,()=>{ce(),xe&&xe()})};Re?Re(ee,ce,Ee):Ee()}else s(ee,oe,z)},K=(te,oe,z,me=!1,pe=!1)=>{const{type:ee,props:ne,ref:fe,children:_e,dynamicChildren:Ae,shapeFlag:Pe,patchFlag:Be,dirs:Re}=te;if(fe!=null&&setRef(fe,null,z,te,!0),Pe&256){oe.ctx.deactivate(te);return}const xe=Pe&1&&Re,ce=!isAsyncWrapper(te);let Ee;if(ce&&(Ee=ne&&ne.onVnodeBeforeUnmount)&&invokeVNodeHook(Ee,oe,te),Pe&6)Y(te.component,z,me);else{if(Pe&128){te.suspense.unmount(z,me);return}xe&&invokeDirectiveHook(te,null,oe,"beforeUnmount"),Pe&64?te.type.remove(te,oe,z,pe,Se,me):Ae&&(ee!==Fragment||Be>0&&Be&64)?Q(Ae,oe,z,!1,!0):(ee===Fragment&&Be&384||!pe&&Pe&16)&&Q(_e,oe,z),me&&ye(te)}(ce&&(Ee=ne&&ne.onVnodeUnmounted)||xe)&&queuePostRenderEffect(()=>{Ee&&invokeVNodeHook(Ee,oe,te),xe&&invokeDirectiveHook(te,null,oe,"unmounted")},z)},ye=te=>{const{type:oe,el:z,anchor:me,transition:pe}=te;if(oe===Fragment){ae(z,me);return}if(oe===Static){T(te);return}const ee=()=>{o(z),pe&&!pe.persisted&&pe.afterLeave&&pe.afterLeave()};if(te.shapeFlag&1&&pe&&!pe.persisted){const{leave:ne,delayLeave:fe}=pe,_e=()=>ne(z,ee);fe?fe(te.el,ee,_e):_e()}else ee()},ae=(te,oe)=>{let z;for(;te!==oe;)z=y(te),o(te),te=z;o(oe)},Y=(te,oe,z)=>{const{bum:me,scope:pe,update:ee,subTree:ne,um:fe}=te;me&&invokeArrayFns(me),pe.stop(),ee&&(ee.active=!1,K(ne,te,oe,z)),fe&&queuePostRenderEffect(fe,oe),queuePostRenderEffect(()=>{te.isUnmounted=!0},oe),oe&&oe.pendingBranch&&!oe.isUnmounted&&te.asyncDep&&!te.asyncResolved&&te.suspenseId===oe.pendingId&&(oe.deps--,oe.deps===0&&oe.resolve())},Q=(te,oe,z,me=!1,pe=!1,ee=0)=>{for(let ne=ee;nete.shapeFlag&6?he(te.component.subTree):te.shapeFlag&128?te.suspense.next():y(te.anchor||te.el),ge=(te,oe,z)=>{te==null?oe._vnode&&K(oe._vnode,null,null,!0):A(oe._vnode||null,te,oe,null,null,null,z),flushPreFlushCbs(),flushPostFlushCbs(),oe._vnode=te},Se={p:A,um:K,m:W,r:ye,mt:D,mc:N,pc:G,pbc:R,n:he,o:i};let Ie,Me;return e&&([Ie,Me]=e(Se)),{render:ge,hydrate:Ie,createApp:createAppAPI(ge,Ie)}}function toggleRecurse({effect:i,update:e},r){i.allowRecurse=e.allowRecurse=r}function traverseStaticChildren(i,e,r=!1){const s=i.children,o=e.children;if(isArray$9(s)&&isArray$9(o))for(let a=0;a>1,i[r[u]]0&&(e[s]=r[a-1]),r[a]=s)}}for(a=r.length,l=r[a-1];a-- >0;)r[a]=l,l=e[l];return r}const isTeleport=i=>i.__isTeleport,isTeleportDisabled=i=>i&&(i.disabled||i.disabled===""),isTargetSVG=i=>typeof SVGElement<"u"&&i instanceof SVGElement,resolveTarget=(i,e)=>{const r=i&&i.to;return isString$2(r)?e?e(r):null:r},TeleportImpl={__isTeleport:!0,process(i,e,r,s,o,a,l,u,c,d){const{mc:g,pc:m,pbc:y,o:{insert:b,querySelector:S,createText:A,createComment:E}}=d,x=isTeleportDisabled(e.props);let{shapeFlag:P,children:C,dynamicChildren:T}=e;if(i==null){const _=e.el=A(""),B=e.anchor=A("");b(_,r,s),b(B,r,s);const M=e.target=resolveTarget(e.props,S),N=e.targetAnchor=A("");M&&(b(N,M),l=l||isTargetSVG(M));const I=(R,F)=>{P&16&&g(C,R,F,o,a,l,u,c)};x?I(r,B):M&&I(M,N)}else{e.el=i.el;const _=e.anchor=i.anchor,B=e.target=i.target,M=e.targetAnchor=i.targetAnchor,N=isTeleportDisabled(i.props),I=N?r:B,R=N?_:M;if(l=l||isTargetSVG(B),T?(y(i.dynamicChildren,T,I,o,a,l,u),traverseStaticChildren(i,e,!0)):c||m(i,e,I,R,o,a,l,u,!1),x)N||moveTeleport(e,r,_,d,1);else if((e.props&&e.props.to)!==(i.props&&i.props.to)){const F=e.target=resolveTarget(e.props,S);F&&moveTeleport(e,F,null,d,0)}else N&&moveTeleport(e,B,M,d,1)}updateCssVars(e)},remove(i,e,r,s,{um:o,o:{remove:a}},l){const{shapeFlag:u,children:c,anchor:d,targetAnchor:g,target:m,props:y}=i;if(m&&a(g),(l||!isTeleportDisabled(y))&&(a(d),u&16))for(let b=0;b0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(i),i}function createElementBlock(i,e,r,s,o,a){return setupBlock(createBaseVNode(i,e,r,s,o,a,!0))}function createBlock(i,e,r,s,o){return setupBlock(createVNode(i,e,r,s,o,!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:r})=>i!=null?isString$2(i)||isRef(i)||isFunction$6(i)?{i:currentRenderingInstance,r:i,k:e,f:!!r}:i:null;function createBaseVNode(i,e=null,r=null,s=0,o=null,a=i===Fragment?0:1,l=!1,u=!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:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return u?(normalizeChildren(c,r),a&128&&i.normalize(c)):r&&(c.shapeFlag|=isString$2(r)?8:16),isBlockTreeEnabled>0&&!l&¤tBlock&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&¤tBlock.push(c),c}const createVNode=_createVNode;function _createVNode(i,e=null,r=null,s=0,o=null,a=!1){if((!i||i===NULL_DYNAMIC_COMPONENT)&&(i=Comment),isVNode(i)){const u=cloneVNode(i,e,!0);return r&&normalizeChildren(u,r),isBlockTreeEnabled>0&&!a&¤tBlock&&(u.shapeFlag&6?currentBlock[currentBlock.indexOf(i)]=u:currentBlock.push(u)),u.patchFlag|=-2,u}if(isClassComponent(i)&&(i=i.__vccOpts),e){e=guardReactiveProps(e);let{class:u,style:c}=e;u&&!isString$2(u)&&(e.class=normalizeClass(u)),isObject$5(c)&&(isProxy(c)&&!isArray$9(c)&&(c=extend$3({},c)),e.style=normalizeStyle(c))}const l=isString$2(i)?1:isSuspense(i)?128:isTeleport(i)?64:isObject$5(i)?4:isFunction$6(i)?2:0;return createBaseVNode(i,e,r,s,o,l,a,!0)}function guardReactiveProps(i){return i?isProxy(i)||InternalObjectKey in i?extend$3({},i):i:null}function cloneVNode(i,e,r=!1){const{props:s,ref:o,patchFlag:a,children:l}=i,u=e?mergeProps(s||{},e):s;return{__v_isVNode:!0,__v_skip:!0,type:i.type,props:u,key:u&&normalizeKey(u),ref:e&&e.ref?r&&o?isArray$9(o)?o.concat(normalizeRef(e)):[o,normalizeRef(e)]:normalizeRef(e):o,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:l,target:i.target,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:e&&i.type!==Fragment?a===-1?16:a|16:a,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$9(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 r=0;const{shapeFlag:s}=i;if(e==null)e=null;else if(isArray$9(e))r=16;else if(typeof e=="object")if(s&65){const o=e.default;o&&(o._c&&(o._d=!1),normalizeChildren(i,o()),o._c&&(o._d=!0));return}else{r=32;const o=e._;!o&&!(InternalObjectKey in e)?e._ctx=currentRenderingInstance:o===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,i.patchFlag|=1024))}else isFunction$6(e)?(e={default:e,_ctx:currentRenderingInstance},r=32):(e=String(e),s&64?(r=16,e=[createTextVNode(e)]):r=8);i.children=e,i.shapeFlag|=r}function mergeProps(...i){const e={};for(let r=0;rcurrentInstance||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:r,children:s}=i.vnode,o=isStatefulComponent(i);initProps(i,r,o,e),initSlots(i,s);const a=o?setupStatefulComponent(i,e):void 0;return isInSSRComponentSetup=!1,a}function setupStatefulComponent(i,e){const r=i.type;i.accessCache=Object.create(null),i.proxy=markRaw(new Proxy(i.ctx,PublicInstanceProxyHandlers));const{setup:s}=r;if(s){const o=i.setupContext=s.length>1?createSetupContext(i):null;setCurrentInstance(i),pauseTracking();const a=callWithErrorHandling(s,i,0,[i.props,o]);if(resetTracking(),unsetCurrentInstance(),isPromise$1(a)){if(a.then(unsetCurrentInstance,unsetCurrentInstance),e)return a.then(l=>{handleSetupResult(i,l,e)}).catch(l=>{handleError(l,i,0)});i.asyncDep=a}else handleSetupResult(i,a,e)}else finishComponentSetup(i,e)}function handleSetupResult(i,e,r){isFunction$6(e)?i.type.__ssrInlineRender?i.ssrRender=e:i.render=e:isObject$5(e)&&(i.setupState=proxyRefs(e)),finishComponentSetup(i,r)}let compile$1;function finishComponentSetup(i,e,r){const s=i.type;if(!i.render){if(!e&&compile$1&&!s.render){const o=s.template||resolveMergedOptions(i).template;if(o){const{isCustomElement:a,compilerOptions:l}=i.appContext.config,{delimiters:u,compilerOptions:c}=s,d=extend$3(extend$3({isCustomElement:a,delimiters:u},l),c);s.render=compile$1(o,d)}}i.render=s.render||NOOP}setCurrentInstance(i),pauseTracking(),applyOptions(i),resetTracking(),unsetCurrentInstance()}function createAttrsProxy(i){return new Proxy(i.attrs,{get(e,r){return track(i,"get","$attrs"),e[r]}})}function createSetupContext(i){const e=s=>{i.exposed=s||{}};let r;return{get attrs(){return r||(r=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,r){if(r in e)return e[r];if(r in publicPropertiesMap)return publicPropertiesMap[r](i)},has(e,r){return r in e||r in publicPropertiesMap}}))}function getComponentName(i,e=!0){return isFunction$6(i)?i.displayName||i.name:i.name||e&&i.__name}function isClassComponent(i){return isFunction$6(i)&&"__vccOpts"in i}const computed=(i,e)=>computed$1(i,e,isInSSRComponentSetup);function h$1(i,e,r){const s=arguments.length;return s===2?isObject$5(e)&&!isArray$9(e)?isVNode(e)?createVNode(i,null,[e]):createVNode(i,e):createVNode(i,null,e):(s>3?r=Array.prototype.slice.call(arguments,2):s===3&&isVNode(r)&&(r=[r]),createVNode(i,e,r))}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,r)=>{e.insertBefore(i,r||null)},remove:i=>{const e=i.parentNode;e&&e.removeChild(i)},createElement:(i,e,r,s)=>{const o=e?doc$2.createElementNS(svgNS,i):doc$2.createElement(i,r?{is:r}:void 0);return i==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},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,r,s,o,a){const l=r?r.previousSibling:e.lastChild;if(o&&(o===a||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),r),!(o===a||!(o=o.nextSibling)););else{templateContainer.innerHTML=s?`${i}`:i;const u=templateContainer.content;if(s){const c=u.firstChild;for(;c.firstChild;)u.appendChild(c.firstChild);u.removeChild(c)}e.insertBefore(u,r)}return[l?l.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function patchClass(i,e,r){const s=i._vtc;s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?i.removeAttribute("class"):r?i.setAttribute("class",e):i.className=e}function patchStyle(i,e,r){const s=i.style,o=isString$2(r);if(r&&!o){if(e&&!isString$2(e))for(const a in e)r[a]==null&&setStyle(s,a,"");for(const a in r)setStyle(s,a,r[a])}else{const a=s.display;o?e!==r&&(s.cssText=r):e&&i.removeAttribute("style"),"_vod"in i&&(s.display=a)}}const importantRE=/\s*!important$/;function setStyle(i,e,r){if(isArray$9(r))r.forEach(s=>setStyle(i,e,s));else if(r==null&&(r=""),e.startsWith("--"))i.setProperty(e,r);else{const s=autoPrefix(i,e);importantRE.test(r)?i.setProperty(hyphenate(s),r.replace(importantRE,""),"important"):i[s]=r}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(i,e){const r=prefixCache[e];if(r)return r;let s=camelize$2(e);if(s!=="filter"&&s in i)return prefixCache[e]=s;s=capitalize(s);for(let o=0;ocachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(i,e){const r=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=r.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(s,r.value),e,5,[s])};return r.value=i,r.attached=getNow(),r}function patchStopImmediatePropagation(i,e){if(isArray$9(e)){const r=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0},e.map(s=>o=>!o._stopped&&s&&s(o))}else return e}const nativeOnRE=/^on[a-z]/,patchProp=(i,e,r,s,o=!1,a,l,u,c)=>{e==="class"?patchClass(i,s,o):e==="style"?patchStyle(i,r,s):isOn(e)?isModelListener(e)||patchEvent(i,e,r,s,l):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(i,e,s,o))?patchDOMProp(i,e,s,a,l,u,c):(e==="true-value"?i._trueValue=s:e==="false-value"&&(i._falseValue=s),patchAttr(i,e,s,o))};function shouldSetAsProp(i,e,r,s){return s?!!(e==="innerHTML"||e==="textContent"||e in i&&nativeOnRE.test(e)&&isFunction$6(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&i.tagName==="INPUT"||e==="type"&&i.tagName==="TEXTAREA"||nativeOnRE.test(e)&&isString$2(r)?!1:e in i}const TRANSITION="transition",ANIMATION="animation",Transition=(i,{slots:e})=>h$1(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$9(i)?i.forEach(r=>r(...e)):i&&i(...e)},hasExplicitCallback=i=>i?isArray$9(i)?i.some(e=>e.length>1):i.length>1:!1;function resolveTransitionProps(i){const e={};for(const k in i)k in DOMTransitionPropsValidators||(e[k]=i[k]);if(i.css===!1)return e;const{name:r="v",type:s,duration:o,enterFromClass:a=`${r}-enter-from`,enterActiveClass:l=`${r}-enter-active`,enterToClass:u=`${r}-enter-to`,appearFromClass:c=a,appearActiveClass:d=l,appearToClass:g=u,leaveFromClass:m=`${r}-leave-from`,leaveActiveClass:y=`${r}-leave-active`,leaveToClass:b=`${r}-leave-to`}=i,S=normalizeDuration(o),A=S&&S[0],E=S&&S[1],{onBeforeEnter:x,onEnter:P,onEnterCancelled:C,onLeave:T,onLeaveCancelled:_,onBeforeAppear:B=x,onAppear:M=P,onAppearCancelled:N=C}=e,I=(k,V,D)=>{removeTransitionClass(k,V?g:u),removeTransitionClass(k,V?d:l),D&&D()},R=(k,V)=>{k._isLeaving=!1,removeTransitionClass(k,m),removeTransitionClass(k,b),removeTransitionClass(k,y),V&&V()},F=k=>(V,D)=>{const $=k?M:P,O=()=>I(V,k,D);callHook($,[V,O]),nextFrame(()=>{removeTransitionClass(V,k?c:a),addTransitionClass(V,k?g:u),hasExplicitCallback($)||whenTransitionEnds(V,s,A,O)})};return extend$3(e,{onBeforeEnter(k){callHook(x,[k]),addTransitionClass(k,a),addTransitionClass(k,l)},onBeforeAppear(k){callHook(B,[k]),addTransitionClass(k,c),addTransitionClass(k,d)},onEnter:F(!1),onAppear:F(!0),onLeave(k,V){k._isLeaving=!0;const D=()=>R(k,V);addTransitionClass(k,m),forceReflow(),addTransitionClass(k,y),nextFrame(()=>{k._isLeaving&&(removeTransitionClass(k,m),addTransitionClass(k,b),hasExplicitCallback(T)||whenTransitionEnds(k,s,E,D))}),callHook(T,[k,D])},onEnterCancelled(k){I(k,!1),callHook(C,[k])},onAppearCancelled(k){I(k,!0),callHook(N,[k])},onLeaveCancelled(k){R(k),callHook(_,[k])}})}function normalizeDuration(i){if(i==null)return null;if(isObject$5(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(r=>r&&i.classList.add(r)),(i._vtc||(i._vtc=new Set)).add(e)}function removeTransitionClass(i,e){e.split(/\s+/).forEach(s=>s&&i.classList.remove(s));const{_vtc:r}=i;r&&(r.delete(e),r.size||(i._vtc=void 0))}function nextFrame(i){requestAnimationFrame(()=>{requestAnimationFrame(i)})}let endId=0;function whenTransitionEnds(i,e,r,s){const o=i._endId=++endId,a=()=>{o===i._endId&&s()};if(r)return setTimeout(a,r);const{type:l,timeout:u,propCount:c}=getTransitionInfo(i,e);if(!l)return s();const d=l+"end";let g=0;const m=()=>{i.removeEventListener(d,y),a()},y=b=>{b.target===i&&++g>=c&&m()};setTimeout(()=>{g(r[S]||"").split(", "),o=s(`${TRANSITION}Delay`),a=s(`${TRANSITION}Duration`),l=getTimeout(o,a),u=s(`${ANIMATION}Delay`),c=s(`${ANIMATION}Duration`),d=getTimeout(u,c);let g=null,m=0,y=0;e===TRANSITION?l>0&&(g=TRANSITION,m=l,y=a.length):e===ANIMATION?d>0&&(g=ANIMATION,m=d,y=c.length):(m=Math.max(l,d),g=m>0?l>d?TRANSITION:ANIMATION:null,y=g?g===TRANSITION?a.length:c.length:0);const b=g===TRANSITION&&/\b(transform|all)(,|$)/.test(s(`${TRANSITION}Property`).toString());return{type:g,timeout:m,propCount:y,hasTransform:b}}function getTimeout(i,e){for(;i.lengthtoMs(r)+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 r=getCurrentInstance(),s=useTransitionState();let o,a;return onUpdated(()=>{if(!o.length)return;const l=i.moveClass||`${i.name||"v"}-move`;if(!hasCSSTransform(o[0].el,r.vnode.el,l))return;o.forEach(callPendingCbs),o.forEach(recordPosition);const u=o.filter(applyTranslation);forceReflow(),u.forEach(c=>{const d=c.el,g=d.style;addTransitionClass(d,l),g.transform=g.webkitTransform=g.transitionDuration="";const m=d._moveCb=y=>{y&&y.target!==d||(!y||/transform$/.test(y.propertyName))&&(d.removeEventListener("transitionend",m),d._moveCb=null,removeTransitionClass(d,l))};d.addEventListener("transitionend",m)})}),()=>{const l=toRaw(i),u=resolveTransitionProps(l);let c=l.tag||Fragment;o=a,a=e.default?getTransitionRawChildren(e.default()):[];for(let d=0;ddelete 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),r=newPositionMap.get(i),s=e.left-r.left,o=e.top-r.top;if(s||o){const a=i.el.style;return a.transform=a.webkitTransform=`translate(${s}px,${o}px)`,a.transitionDuration="0s",i}}function hasCSSTransform(i,e,r){const s=i.cloneNode();i._vtc&&i._vtc.forEach(l=>{l.split(/\s+/).forEach(u=>u&&s.classList.remove(u))}),r.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(s);const{hasTransform:a}=getTransitionInfo(s);return o.removeChild(s),a}const keyNames={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},withKeys=(i,e)=>r=>{if(!("key"in r))return;const s=hyphenate(r.key);if(e.some(o=>o===s||keyNames[o]===s))return i(r)},vShow={beforeMount(i,{value:e},{transition:r}){i._vod=i.style.display==="none"?"":i.style.display,r&&e?r.beforeEnter(i):setDisplay(i,e)},mounted(i,{value:e},{transition:r}){r&&e&&r.enter(i)},updated(i,{value:e,oldValue:r},{transition:s}){!e!=!r&&(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:r}=e;return e.mount=s=>{const o=normalizeContainer(s);if(!o)return;const a=e._component;!isFunction$6(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.innerHTML="";const l=r(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},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 r={};for(const s in e){const o=e[s];r[s]=isArray$8(o)?o.map(i):i(o)}return r}const noop$2=()=>{},isArray$8=Array.isArray,TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=i=>i.replace(TRAILING_SLASH_RE,"");function parseURL(i,e,r="/"){let s,o={},a="",l="";const u=e.indexOf("#");let c=e.indexOf("?");return u=0&&(c=-1),c>-1&&(s=e.slice(0,c),a=e.slice(c+1,u>-1?u:e.length),o=i(a)),u>-1&&(s=s||e.slice(0,u),l=e.slice(u,e.length)),s=resolveRelativePath(s!=null?s:e,r),{fullPath:s+(a&&"?")+a+l,path:s,query:o,hash:l}}function stringifyURL(i,e){const r=e.query?i(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function stripBase(i,e){return!e||!i.toLowerCase().startsWith(e.toLowerCase())?i:i.slice(e.length)||"/"}function isSameRouteLocation(i,e,r){const s=e.matched.length-1,o=r.matched.length-1;return s>-1&&s===o&&isSameRouteRecord(e.matched[s],r.matched[o])&&isSameRouteLocationParams(e.params,r.params)&&i(e.query)===i(r.query)&&e.hash===r.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 r in i)if(!isSameRouteLocationParamsValue(i[r],e[r]))return!1;return!0}function isSameRouteLocationParamsValue(i,e){return isArray$8(i)?isEquivalentArray(i,e):isArray$8(e)?isEquivalentArray(e,i):i===e}function isEquivalentArray(i,e){return isArray$8(e)?i.length===e.length&&i.every((r,s)=>r===e[s]):i.length===1&&i[0]===e}function resolveRelativePath(i,e){if(i.startsWith("/"))return i;if(!i)return e;const r=e.split("/"),s=i.split("/");let o=r.length-1,a,l;for(a=0;a1&&o--;else break;return r.slice(0,o).join("/")+"/"+s.slice(a-(a===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 r=document.documentElement.getBoundingClientRect(),s=i.getBoundingClientRect();return{behavior:e.behavior,left:s.left-r.left-(e.left||0),top:s.top-r.top-(e.top||0)}}const computeScrollPosition=()=>({left:window.pageXOffset,top:window.pageYOffset});function scrollToPosition(i){let e;if("el"in i){const r=i.el,s=typeof r=="string"&&r.startsWith("#"),o=typeof r=="string"?s?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!o)return;e=getElementPosition(o,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:r,search:s,hash:o}=e,a=i.indexOf("#");if(a>-1){let u=o.includes(i.slice(a))?i.slice(a).length:1,c=o.slice(u);return c[0]!=="/"&&(c="/"+c),stripBase(c,"")}return stripBase(r,i)+s+o}function useHistoryListeners(i,e,r,s){let o=[],a=[],l=null;const u=({state:y})=>{const b=createCurrentLocation(i,location),S=r.value,A=e.value;let E=0;if(y){if(r.value=b,e.value=y,l&&l===S){l=null;return}E=A?y.position-A.position:0}else s(b);o.forEach(x=>{x(r.value,S,{delta:E,type:NavigationType.pop,direction:E?E>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function c(){l=r.value}function d(y){o.push(y);const b=()=>{const S=o.indexOf(y);S>-1&&o.splice(S,1)};return a.push(b),b}function g(){const{history:y}=window;y.state&&y.replaceState(assign$2({},y.state,{scroll:computeScrollPosition()}),"")}function m(){for(const y of a)y();a=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",g)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",g),{pauseListeners:c,listen:d,destroy:m}}function buildState(i,e,r,s=!1,o=!1){return{back:i,current:e,forward:r,replaced:s,position:window.history.length,scroll:o?computeScrollPosition():null}}function useHistoryStateNavigation(i){const{history:e,location:r}=window,s={value:createCurrentLocation(i,r)},o={value:e.state};o.value||a(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function a(c,d,g){const m=i.indexOf("#"),y=m>-1?(r.host&&document.querySelector("base")?i:i.slice(m))+c:createBaseLocation()+i+c;try{e[g?"replaceState":"pushState"](d,"",y),o.value=d}catch(b){console.error(b),r[g?"replace":"assign"](y)}}function l(c,d){const g=assign$2({},e.state,buildState(o.value.back,c,o.value.forward,!0),d,{position:o.value.position});a(c,g,!0),s.value=c}function u(c,d){const g=assign$2({},o.value,e.state,{forward:c,scroll:computeScrollPosition()});a(g.current,g,!0);const m=assign$2({},buildState(s.value,c,null),{position:g.position+1},d);a(c,m,!1),s.value=c}return{location:s,state:o,push:u,replace:l}}function createWebHistory(i){i=normalizeBase(i);const e=useHistoryStateNavigation(i),r=useHistoryListeners(i,e.state,e.location,e.replace);function s(a,l=!0){l||r.pauseListeners(),history.go(a)}const o=assign$2({location:"",base:i,go:s,createHref:createHref.bind(null,i)},e,r);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>e.state.value}),o}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 r=assign$2({},BASE_PATH_PARSER_OPTIONS,e),s=[];let o=r.start?"^":"";const a=[];for(const d of i){const g=d.length?[]:[90];r.strict&&!d.length&&(o+="/");for(let m=0;me.length?e.length===1&&e[0]===40+40?1:-1:0}function comparePathParserScore(i,e){let r=0;const s=i.score,o=e.score;for(;r0&&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 (${r})/"${d}": ${b}`)}let r=0,s=r;const o=[];let a;function l(){a&&o.push(a),a=[]}let u=0,c,d="",g="";function m(){d&&(r===0?a.push({type:0,value:d}):r===1||r===2||r===3?(a.length>1&&(c==="*"||c==="+")&&e(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:d,regexp:g,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):e("Invalid state to consume buffer"),d="")}function y(){d+=c}for(;u{l(P)}:noop$2}function l(g){if(isRouteName(g)){const m=s.get(g);m&&(s.delete(g),r.splice(r.indexOf(m),1),m.children.forEach(l),m.alias.forEach(l))}else{const m=r.indexOf(g);m>-1&&(r.splice(m,1),g.record.name&&s.delete(g.record.name),g.children.forEach(l),g.alias.forEach(l))}}function u(){return r}function c(g){let m=0;for(;m=0&&(g.record.path!==r[m].record.path||!isRecordChildOf(g,r[m]));)m++;r.splice(m,0,g),g.record.name&&!isAliasRecord(g)&&s.set(g.record.name,g)}function d(g,m){let y,b={},S,A;if("name"in g&&g.name){if(y=s.get(g.name),!y)throw createRouterError(1,{location:g});A=y.record.name,b=assign$2(paramsFromLocation(m.params,y.keys.filter(P=>!P.optional).map(P=>P.name)),g.params&¶msFromLocation(g.params,y.keys.map(P=>P.name))),S=y.stringify(b)}else if("path"in g)S=g.path,y=r.find(P=>P.re.test(S)),y&&(b=y.parse(S),A=y.record.name);else{if(y=m.name?s.get(m.name):r.find(P=>P.re.test(m.path)),!y)throw createRouterError(1,{location:g,currentLocation:m});A=y.record.name,b=assign$2({},m.params,g.params),S=y.stringify(b)}const E=[];let x=y;for(;x;)E.unshift(x.record),x=x.parent;return{name:A,path:S,params:b,matched:E,meta:mergeMetaFields(E)}}return i.forEach(g=>a(g)),{addRoute:a,resolve:d,removeRoute:l,getRoutes:u,getRecordMatcher:o}}function paramsFromLocation(i,e){const r={};for(const s of e)s in i&&(r[s]=i[s]);return r}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={},r=i.props||!1;if("component"in i)e.default=r;else for(const s in i.components)e[s]=typeof r=="boolean"?r:r[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,r)=>assign$2(e,r.meta),{})}function mergeOptions(i,e){const r={};for(const s in i)r[s]=s in e?e[s]:i[s];return r}function isRecordChildOf(i,e){return e.children.some(r=>r===i||isRecordChildOf(i,r))}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 o=0;oa&&encodeQueryValue(a)):[s&&encodeQueryValue(s)]).forEach(a=>{a!==void 0&&(e+=(e.length?"&":"")+r,a!=null&&(e+="="+a))})}return e}function normalizeQuery(i){const e={};for(const r in i){const s=i[r];s!==void 0&&(e[r]=isArray$8(s)?s.map(o=>o==null?null:""+o):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 o=i.indexOf(s);o>-1&&i.splice(o,1)}}function r(){i=[]}return{add:e,list:()=>i,reset:r}}function guardToPromiseFn(i,e,r,s,o){const a=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((l,u)=>{const c=m=>{m===!1?u(createRouterError(4,{from:r,to:e})):m instanceof Error?u(m):isRouteLocation(m)?u(createRouterError(2,{from:e,to:m})):(a&&s.enterCallbacks[o]===a&&typeof m=="function"&&a.push(m),l())},d=i.call(s&&s.instances[o],e,r,c);let g=Promise.resolve(d);i.length<3&&(g=g.then(c)),g.catch(m=>u(m))})}function extractComponentsGuards(i,e,r,s){const o=[];for(const a of i)for(const l in a.components){let u=a.components[l];if(!(e!=="beforeRouteEnter"&&!a.instances[l]))if(isRouteComponent(u)){const d=(u.__vccOpts||u)[e];d&&o.push(guardToPromiseFn(d,r,s,a,l))}else{let c=u();o.push(()=>c.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${l}" at "${a.path}"`));const g=isESModule(d)?d.default:d;a.components[l]=g;const y=(g.__vccOpts||g)[e];return y&&guardToPromiseFn(y,r,s,a,l)()}))}}return o}function isRouteComponent(i){return typeof i=="object"||"displayName"in i||"props"in i||"__vccOpts"in i}function useLink(i){const e=inject(routerKey),r=inject(routeLocationKey),s=computed(()=>e.resolve(unref(i.to))),o=computed(()=>{const{matched:c}=s.value,{length:d}=c,g=c[d-1],m=r.matched;if(!g||!m.length)return-1;const y=m.findIndex(isSameRouteRecord.bind(null,g));if(y>-1)return y;const b=getOriginalPath(c[d-2]);return d>1&&getOriginalPath(g)===b&&m[m.length-1].path!==b?m.findIndex(isSameRouteRecord.bind(null,c[d-2])):y}),a=computed(()=>o.value>-1&&includesParams(r.params,s.value.params)),l=computed(()=>o.value>-1&&o.value===r.matched.length-1&&isSameRouteLocationParams(r.params,s.value.params));function u(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:a,isExactActive:l,navigate:u}}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 r=reactive(useLink(i)),{options:s}=inject(routerKey),o=computed(()=>({[getLinkClass(i.activeClass,s.linkActiveClass,"router-link-active")]:r.isActive,[getLinkClass(i.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const a=e.default&&e.default(r);return i.custom?a:h$1("a",{"aria-current":r.isExactActive?i.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:o.value},a)}}}),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 r in e){const s=e[r],o=i[r];if(typeof s=="string"){if(s!==o)return!1}else if(!isArray$8(o)||o.length!==s.length||s.some((a,l)=>a!==o[l]))return!1}return!0}function getOriginalPath(i){return i?i.aliasOf?i.aliasOf.path:i.path:""}const getLinkClass=(i,e,r)=>i!=null?i:e!=null?e:r,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(i,{attrs:e,slots:r}){const s=inject(routerViewLocationKey),o=computed(()=>i.route||s.value),a=inject(viewDepthKey,0),l=computed(()=>{let d=unref(a);const{matched:g}=o.value;let m;for(;(m=g[d])&&!m.components;)d++;return d}),u=computed(()=>o.value.matched[l.value]);provide(viewDepthKey,computed(()=>l.value+1)),provide(matchedRouteKey,u),provide(routerViewLocationKey,o);const c=ref();return watch(()=>[c.value,u.value,i.name],([d,g,m],[y,b,S])=>{g&&(g.instances[m]=d,b&&b!==g&&d&&d===y&&(g.leaveGuards.size||(g.leaveGuards=b.leaveGuards),g.updateGuards.size||(g.updateGuards=b.updateGuards))),d&&g&&(!b||!isSameRouteRecord(g,b)||!y)&&(g.enterCallbacks[m]||[]).forEach(A=>A(d))},{flush:"post"}),()=>{const d=o.value,g=i.name,m=u.value,y=m&&m.components[g];if(!y)return normalizeSlot(r.default,{Component:y,route:d});const b=m.props[g],S=b?b===!0?d.params:typeof b=="function"?b(d):b:null,E=h$1(y,assign$2({},S,e,{onVnodeUnmounted:x=>{x.component.isUnmounted&&(m.instances[g]=null)},ref:c}));return normalizeSlot(r.default,{Component:E,route:d})||E}}});function normalizeSlot(i,e){if(!i)return null;const r=i(e);return r.length===1?r[0]:r}const RouterView=RouterViewImpl;function createRouter(i){const e=createRouterMatcher(i.routes,i),r=i.parseQuery||parseQuery,s=i.stringifyQuery||stringifyQuery,o=i.history,a=useCallbacks(),l=useCallbacks(),u=useCallbacks(),c=shallowRef(START_LOCATION_NORMALIZED);let d=START_LOCATION_NORMALIZED;isBrowser&&i.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const g=applyToParams.bind(null,Y=>""+Y),m=applyToParams.bind(null,encodeParam),y=applyToParams.bind(null,decode$5);function b(Y,Q){let he,ge;return isRouteName(Y)?(he=e.getRecordMatcher(Y),ge=Q):ge=Y,e.addRoute(ge,he)}function S(Y){const Q=e.getRecordMatcher(Y);Q&&e.removeRoute(Q)}function A(){return e.getRoutes().map(Y=>Y.record)}function E(Y){return!!e.getRecordMatcher(Y)}function x(Y,Q){if(Q=assign$2({},Q||c.value),typeof Y=="string"){const te=parseURL(r,Y,Q.path),oe=e.resolve({path:te.path},Q),z=o.createHref(te.fullPath);return assign$2(te,oe,{params:y(oe.params),hash:decode$5(te.hash),redirectedFrom:void 0,href:z})}let he;if("path"in Y)he=assign$2({},Y,{path:parseURL(r,Y.path,Q.path).path});else{const te=assign$2({},Y.params);for(const oe in te)te[oe]==null&&delete te[oe];he=assign$2({},Y,{params:m(Y.params)}),Q.params=m(Q.params)}const ge=e.resolve(he,Q),Se=Y.hash||"";ge.params=g(y(ge.params));const Ie=stringifyURL(s,assign$2({},Y,{hash:encodeHash(Se),path:ge.path})),Me=o.createHref(Ie);return assign$2({fullPath:Ie,hash:Se,query:s===stringifyQuery?normalizeQuery(Y.query):Y.query||{}},ge,{redirectedFrom:void 0,href:Me})}function P(Y){return typeof Y=="string"?parseURL(r,Y,c.value.path):assign$2({},Y)}function C(Y,Q){if(d!==Y)return createRouterError(8,{from:Q,to:Y})}function T(Y){return M(Y)}function _(Y){return T(assign$2(P(Y),{replace:!0}))}function B(Y){const Q=Y.matched[Y.matched.length-1];if(Q&&Q.redirect){const{redirect:he}=Q;let ge=typeof he=="function"?he(Y):he;return typeof ge=="string"&&(ge=ge.includes("?")||ge.includes("#")?ge=P(ge):{path:ge},ge.params={}),assign$2({query:Y.query,hash:Y.hash,params:"path"in ge?{}:Y.params},ge)}}function M(Y,Q){const he=d=x(Y),ge=c.value,Se=Y.state,Ie=Y.force,Me=Y.replace===!0,te=B(he);if(te)return M(assign$2(P(te),{state:typeof te=="object"?assign$2({},Se,te.state):Se,force:Ie,replace:Me}),Q||he);const oe=he;oe.redirectedFrom=Q;let z;return!Ie&&isSameRouteLocation(s,ge,he)&&(z=createRouterError(16,{to:oe,from:ge}),Z(ge,ge,!0,!1)),(z?Promise.resolve(z):I(oe,ge)).catch(me=>isNavigationFailure(me)?isNavigationFailure(me,2)?me:U(me):q(me,oe,ge)).then(me=>{if(me){if(isNavigationFailure(me,2))return M(assign$2({replace:Me},P(me.to),{state:typeof me.to=="object"?assign$2({},Se,me.to.state):Se,force:Ie}),Q||oe)}else me=F(oe,ge,!0,Me,Se);return R(oe,ge,me),me})}function N(Y,Q){const he=C(Y,Q);return he?Promise.reject(he):Promise.resolve()}function I(Y,Q){let he;const[ge,Se,Ie]=extractChangingRecords(Y,Q);he=extractComponentsGuards(ge.reverse(),"beforeRouteLeave",Y,Q);for(const te of ge)te.leaveGuards.forEach(oe=>{he.push(guardToPromiseFn(oe,Y,Q))});const Me=N.bind(null,Y,Q);return he.push(Me),runGuardQueue(he).then(()=>{he=[];for(const te of a.list())he.push(guardToPromiseFn(te,Y,Q));return he.push(Me),runGuardQueue(he)}).then(()=>{he=extractComponentsGuards(Se,"beforeRouteUpdate",Y,Q);for(const te of Se)te.updateGuards.forEach(oe=>{he.push(guardToPromiseFn(oe,Y,Q))});return he.push(Me),runGuardQueue(he)}).then(()=>{he=[];for(const te of Y.matched)if(te.beforeEnter&&!Q.matched.includes(te))if(isArray$8(te.beforeEnter))for(const oe of te.beforeEnter)he.push(guardToPromiseFn(oe,Y,Q));else he.push(guardToPromiseFn(te.beforeEnter,Y,Q));return he.push(Me),runGuardQueue(he)}).then(()=>(Y.matched.forEach(te=>te.enterCallbacks={}),he=extractComponentsGuards(Ie,"beforeRouteEnter",Y,Q),he.push(Me),runGuardQueue(he))).then(()=>{he=[];for(const te of l.list())he.push(guardToPromiseFn(te,Y,Q));return he.push(Me),runGuardQueue(he)}).catch(te=>isNavigationFailure(te,8)?te:Promise.reject(te))}function R(Y,Q,he){for(const ge of u.list())ge(Y,Q,he)}function F(Y,Q,he,ge,Se){const Ie=C(Y,Q);if(Ie)return Ie;const Me=Q===START_LOCATION_NORMALIZED,te=isBrowser?history.state:{};he&&(ge||Me?o.replace(Y.fullPath,assign$2({scroll:Me&&te&&te.scroll},Se)):o.push(Y.fullPath,Se)),c.value=Y,Z(Y,Q,he,Me),U()}let k;function V(){k||(k=o.listen((Y,Q,he)=>{if(!ae.listening)return;const ge=x(Y),Se=B(ge);if(Se){M(assign$2(Se,{replace:!0}),ge).catch(noop$2);return}d=ge;const Ie=c.value;isBrowser&&saveScrollPosition(getScrollKey(Ie.fullPath,he.delta),computeScrollPosition()),I(ge,Ie).catch(Me=>isNavigationFailure(Me,12)?Me:isNavigationFailure(Me,2)?(M(Me.to,ge).then(te=>{isNavigationFailure(te,20)&&!he.delta&&he.type===NavigationType.pop&&o.go(-1,!1)}).catch(noop$2),Promise.reject()):(he.delta&&o.go(-he.delta,!1),q(Me,ge,Ie))).then(Me=>{Me=Me||F(ge,Ie,!1),Me&&(he.delta&&!isNavigationFailure(Me,8)?o.go(-he.delta,!1):he.type===NavigationType.pop&&isNavigationFailure(Me,20)&&o.go(-1,!1)),R(ge,Ie,Me)}).catch(noop$2)}))}let D=useCallbacks(),$=useCallbacks(),O;function q(Y,Q,he){U(Y);const ge=$.list();return ge.length?ge.forEach(Se=>Se(Y,Q,he)):console.error(Y),Promise.reject(Y)}function G(){return O&&c.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((Y,Q)=>{D.add([Y,Q])})}function U(Y){return O||(O=!Y,V(),D.list().forEach(([Q,he])=>Y?he(Y):Q()),D.reset()),Y}function Z(Y,Q,he,ge){const{scrollBehavior:Se}=i;if(!isBrowser||!Se)return Promise.resolve();const Ie=!he&&getSavedScrollPosition(getScrollKey(Y.fullPath,0))||(ge||!he)&&history.state&&history.state.scroll||null;return nextTick().then(()=>Se(Y,Q,Ie)).then(Me=>Me&&scrollToPosition(Me)).catch(Me=>q(Me,Y,Q))}const W=Y=>o.go(Y);let K;const ye=new Set,ae={currentRoute:c,listening:!0,addRoute:b,removeRoute:S,hasRoute:E,getRoutes:A,resolve:x,options:i,push:T,replace:_,go:W,back:()=>W(-1),forward:()=>W(1),beforeEach:a.add,beforeResolve:l.add,afterEach:u.add,onError:$.add,isReady:G,install(Y){const Q=this;Y.component("RouterLink",RouterLink),Y.component("RouterView",RouterView),Y.config.globalProperties.$router=Q,Object.defineProperty(Y.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(c)}),isBrowser&&!K&&c.value===START_LOCATION_NORMALIZED&&(K=!0,T(o.location).catch(Se=>{}));const he={};for(const Se in START_LOCATION_NORMALIZED)he[Se]=computed(()=>c.value[Se]);Y.provide(routerKey,Q),Y.provide(routeLocationKey,reactive(he)),Y.provide(routerViewLocationKey,c);const ge=Y.unmount;ye.add(Y),Y.unmount=function(){ye.delete(Y),ye.size<1&&(d=START_LOCATION_NORMALIZED,k&&k(),k=null,c.value=START_LOCATION_NORMALIZED,K=!1,O=!1),ge()}}};return ae}function runGuardQueue(i){return i.reduce((e,r)=>e.then(()=>r()),Promise.resolve())}function extractChangingRecords(i,e){const r=[],s=[],o=[],a=Math.max(e.matched.length,i.matched.length);for(let l=0;lisSameRouteRecord(d,u))?s.push(u):r.push(u));const c=i.matched[l];c&&(e.matched.find(d=>isSameRouteRecord(d,c))||o.push(c))}return[r,s,o]}function useRouter(){return inject(routerKey)}function useRoute$1(){return inject(routeLocationKey)}const isDef$1=i=>i!=null,isFunction$5=i=>typeof i=="function",isObject$4=i=>i!==null&&typeof i=="object",isPromise=i=>isObject$4(i)&&isFunction$5(i.then)&&isFunction$5(i.catch),isNumeric=i=>typeof i=="number"||/^\d+(\.\d+)?$/.test(i),isIOS$2=()=>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 r=e.split(".");let s=i;return r.forEach(o=>{var a;s=isObject$4(s)&&(a=s[o])!=null?a:""}),s}function pick$1(i,e,r){return e.reduce((s,o)=>((!r||i[o]!==void 0)&&(s[o]=i[o]),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 r=e.innerWidth,s=e.innerHeight;return makeDOMRect(r,s)}return e!=null&&e.getBoundingClientRect?e.getBoundingClientRect():makeDOMRect(0,0)};function useParent$1(i){const e=inject(i,null);if(e){const r=getCurrentInstance(),{link:s,unlink:o,internalChildren:a}=e;s(r),onUnmounted(()=>o(r));const l=computed(()=>a.indexOf(r));return{parent:e,index:l}}return{parent:null,index:ref(-1)}}function flattenVNodes(i){const e=[],r=s=>{Array.isArray(s)&&s.forEach(o=>{var a;isVNode(o)&&(e.push(o),(a=o.component)!=null&&a.subTree&&(e.push(o.component.subTree),r(o.component.subTree.children)),o.children&&r(o.children))})};return r(i),e}var findVNodeIndex=(i,e)=>{const r=i.indexOf(e);return r===-1?i.findIndex(s=>e.key!==void 0&&e.key!==null&&s.type===e.type&&s.key===e.key):r};function sortChildren(i,e,r){const s=flattenVNodes(i.subTree.children);r.sort((a,l)=>findVNodeIndex(s,a.vnode)-findVNodeIndex(s,l.vnode));const o=r.map(a=>a.proxy);e.sort((a,l)=>{const u=o.indexOf(a),c=o.indexOf(l);return u-c})}function useChildren$1(i){const e=reactive([]),r=reactive([]),s=getCurrentInstance();return{children:e,linkChildren:a=>{provide(i,Object.assign({link:c=>{c.proxy&&(r.push(c),e.push(c.proxy),sortChildren(s,e,r))},unlink:c=>{const d=r.indexOf(c);e.splice(d,1),r.splice(d,1)},children:e,internalChildren:r},a))}}}function onMountedOrActivated(i){let e;onMounted(()=>{i(),nextTick(()=>{e=!0})}),onActivated(()=>{e&&i()})}function useEventListener$1(i,e,r={}){if(!inBrowser$1)return;const{target:s=window,passive:o=!1,capture:a=!1}=r;let l=!1,u;const c=m=>{if(l)return;const y=unref(m);y&&!u&&(y.addEventListener(i,e,{capture:a,passive:o}),u=!0)},d=m=>{if(l)return;const y=unref(m);y&&u&&(y.removeEventListener(i,e,a),u=!1)};onUnmounted(()=>d(s)),onDeactivated(()=>d(s)),onMountedOrActivated(()=>c(s));let g;return isRef(s)&&(g=watch(s,(m,y)=>{d(y),c(m)})),()=>{g==null||g(),d(s),l=!0}}function useClickAway(i,e,r={}){if(!inBrowser$1)return;const{eventName:s="click"}=r;useEventListener$1(s,a=>{(Array.isArray(i)?i:[i]).every(c=>{const d=unref(c);return d&&!d.contains(a.target)})&&e(a)},{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 r=i;for(;r&&r!==e&&isElement$1(r);){const{overflowY:s}=window.getComputedStyle(r);if(overflowScrollReg.test(s))return r;r=r.parentNode}return e}function useScrollParent(i,e=defaultRoot){const r=ref();return onMounted(()=>{i.value&&(r.value=getScrollParent(i.value,e))}),r}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 r=e?getScrollTop(e):getRootScrollTop();return useRect(i).top+r}const isIOS$1=isIOS$2();function resetScroll(){isIOS$1&&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 r=window.getComputedStyle(e),s=r.display==="none",o=e.offsetParent===null&&r.position!=="fixed";return s||o}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$1=i=>i.replace(camelizeRE,(e,r)=>r.toUpperCase()),kebabCase=i=>i.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,""),clamp=(i,e,r)=>Math.min(Math.max(i,e),r);function trimExtraChar(i,e,r){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(r,"")}function formatNumber(i,e=!0,r=!0){e?i=trimExtraChar(i,".",/\./g):i=i.split(".")[0],r?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$d}=Object.prototype;function assignKey(i,e,r){const s=e[r];isDef$1(s)&&(!hasOwnProperty$d.call(i,r)||!isObject$4(s)?i[r]=s:i[r]=deepAssign(Object(i[r]),s))}function deepAssign(i,e){return Object.keys(e).forEach(r=>{assignKey(i,e,r)}),i}var stdin_default$J={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$J}),Locale={messages(){return messages[lang.value]},use(i,e){lang.value=i,this.add({[i]:e})},add(i={}){deepAssign(messages,i)}};var stdin_default$I=Locale;function createTranslate(i){const e=camelize$1(i)+".";return(r,...s)=>{const o=stdin_default$I.messages(),a=get(o,e+r)||get(o,r);return isFunction$5(a)?a(...s):a}}function genBem(i,e){return e?typeof e=="string"?` ${i}--${e}`:Array.isArray(e)?e.reduce((r,s)=>r+genBem(i,s),""):Object.keys(e).reduce((r,s)=>r+(e[s]?genBem(i,s):""),""):""}function createBEM(i){return(e,r)=>(e&&typeof e!="string"&&(r=e,e=""),e=e?`${i}__${e}`:i,`${e}${genBem(e,r)}`)}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"),LONG_PRESS_START_TIME=500;function callInterceptor(i,{args:e=[],done:r,canceled:s}){if(i){const o=i.apply(null,e);isPromise(o)?o.then(a=>{a?r():s&&s()}).catch(noop$1):o?r():s&&s()}else r()}function withInstall(i){return i.install=e=>{const{name:r}=i;r&&(e.component(r,i),e.component(camelize$1(`-${r}`),i))},i}const POPUP_TOGGLE_KEY=Symbol();function onPopupReopen(i){const e=inject(POPUP_TOGGLE_KEY,null);e&&watch(e,r=>{r&&i()})}const useHeight=(i,e)=>{const r=ref(),s=()=>{r.value=useRect(i).height};return onMounted(()=>{if(nextTick(s),e)for(let o=1;o<=3;o++)setTimeout(s,100*o)}),onPopupReopen(()=>nextTick(s)),watch([windowWidth,windowHeight],s),r};function usePlaceholder(i,e){const r=useHeight(i,!0);return s=>createVNode("div",{class:e("placeholder"),style:{height:r.value?`${r.value}px`:void 0}},[s()])}const[name$G,bem$E]=createNamespace$1("action-bar"),ACTION_BAR_KEY=Symbol(name$G),actionBarProps={placeholder:Boolean,safeAreaInsetBottom:truthProp};var stdin_default$H=defineComponent({name:name$G,props:actionBarProps,setup(i,{slots:e}){const r=ref(),s=usePlaceholder(r,bem$E),{linkChildren:o}=useChildren$1(ACTION_BAR_KEY);o();const a=()=>{var l;return createVNode("div",{ref:r,class:[bem$E(),{"van-safe-area-bottom":i.safeAreaInsetBottom}]},[(l=e.default)==null?void 0:l.call(e)])};return()=>i.placeholder?s(a):a()}});const ActionBar=withInstall(stdin_default$H);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:r,$router:s}){i&&s?s[r?"replace":"push"](i):e&&(r?location.replace(e):location.href=e)}function useRoute(){const i=getCurrentInstance().proxy;return()=>route(i)}const[name$F,bem$D]=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$F,props:badgeProps,setup(i,{slots:e}){const r=()=>{if(e.content)return!0;const{content:u,showZero:c}=i;return isDef$1(u)&&u!==""&&(c||u!==0&&u!=="0")},s=()=>{const{dot:u,max:c,content:d}=i;if(!u&&r())return e.content?e.content():isDef$1(c)&&isNumeric(d)&&+d>+c?`${c}+`:d},o=u=>u.startsWith("-")?u.replace("-",""):`-${u}`,a=computed(()=>{const u={background:i.color};if(i.offset){const[c,d]=i.offset,{position:g}=i,[m,y]=g.split("-");e.default?(typeof d=="number"?u[m]=addUnit(m==="top"?d:-d):u[m]=m==="top"?addUnit(d):o(d),typeof c=="number"?u[y]=addUnit(y==="left"?c:-c):u[y]=y==="left"?addUnit(c):o(c)):(u.marginTop=addUnit(d),u.marginLeft=addUnit(c))}return u}),l=()=>{if(r()||i.dot)return createVNode("div",{class:bem$D([i.position,{dot:i.dot,fixed:!!e.default}]),style:a.value},[s()])};return()=>{if(e.default){const{tag:u}=i;return createVNode(u,{class:bem$D("wrapper")},{default:()=>[e.default(),l()]})}return l()}}});const Badge=withInstall(stdin_default$G);let globalZIndex=2e3;const useGlobalZIndex=()=>++globalZIndex,setGlobalZIndex=i=>{globalZIndex=i},[name$E,bem$C]=createNamespace$1("config-provider"),CONFIG_PROVIDER_KEY=Symbol(name$E),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(r=>{e[`--van-${kebabCase(r)}`]=i[r]}),e}defineComponent({name:name$E,props:configProviderProps,setup(i,{slots:e}){const r=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}`)},o=(a=i.theme)=>{document.documentElement.classList.remove(`van-theme-${a}`)};watch(()=>i.theme,(a,l)=>{l&&o(l),s()},{immediate:!0}),onActivated(s),onDeactivated(o),onBeforeUnmount(o)}return provide(CONFIG_PROVIDER_KEY,i),watchEffect(()=>{i.zIndex!==void 0&&setGlobalZIndex(i.zIndex)}),()=>createVNode(i.tag,{class:bem$C(),style:r.value},{default:()=>{var s;return[(s=e.default)==null?void 0:s.call(e)]}})}});const[name$D,bem$B]=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$D,props:iconProps,setup(i,{slots:e}){const r=inject(CONFIG_PROVIDER_KEY,null),s=computed(()=>i.classPrefix||(r==null?void 0:r.iconPrefix)||bem$B());return()=>{const{tag:o,dot:a,name:l,size:u,badge:c,color:d}=i,g=isImage(l);return createVNode(Badge,mergeProps({dot:a,tag:o,class:[s.value,g?"":`${s.value}-${l}`],style:{color:d,fontSize:addUnit(u)},content:c},i.badgeProps),{default:()=>{var m;return[(m=e.default)==null?void 0:m.call(e),g&&createVNode("img",{class:bem$B("image"),src:l},null)]}})}}});const Icon$1=withInstall(stdin_default$F),[name$C,bem$A]=createNamespace$1("loading"),SpinIcon=Array(12).fill(null).map((i,e)=>createVNode("i",{class:bem$A("line",String(e+1))},null)),CircularIcon=createVNode("svg",{class:bem$A("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$C,props:loadingProps,setup(i,{slots:e}){const r=computed(()=>extend$2({color:i.color},getSizeStyle(i.size))),s=()=>{const a=i.type==="spinner"?SpinIcon:CircularIcon;return createVNode("span",{class:bem$A("spinner",i.type),style:r.value},[e.icon?e.icon():a])},o=()=>{var a;if(e.default)return createVNode("span",{class:bem$A("text"),style:{fontSize:addUnit(i.textSize),color:(a=i.textColor)!=null?a:i.color}},[e.default()])};return()=>{const{type:a,vertical:l}=i;return createVNode("div",{class:bem$A([a,{vertical:l}]),"aria-live":"polite","aria-busy":!0},[s(),o()])}}});const Loading$2=withInstall(stdin_default$E),[name$B,bem$z]=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$B,props:buttonProps,emits:["click"],setup(i,{emit:e,slots:r}){const s=useRoute(),o=()=>r.loading?r.loading():createVNode(Loading$2,{size:i.loadingSize,type:i.loadingType,class:bem$z("loading")},null),a=()=>{if(i.loading)return o();if(r.icon)return createVNode("div",{class:bem$z("icon")},[r.icon()]);if(i.icon)return createVNode(Icon$1,{name:i.icon,class:bem$z("icon"),classPrefix:i.iconPrefix},null)},l=()=>{let d;if(i.loading?d=i.loadingText:d=r.default?r.default():i.text,d)return createVNode("span",{class:bem$z("text")},[d])},u=()=>{const{color:d,plain:g}=i;if(d){const m={color:g?d:"white"};return g||(m.background=d),d.includes("gradient")?m.border=0:m.borderColor=d,m}},c=d=>{i.loading?preventDefault(d):i.disabled||(e("click",d),s())};return()=>{const{tag:d,type:g,size:m,block:y,round:b,plain:S,square:A,loading:E,disabled:x,hairline:P,nativeType:C,iconPosition:T}=i,_=[bem$z([g,m,{plain:S,block:y,round:b,square:A,loading:E,disabled:x,hairline:P}]),{[BORDER_SURROUND]:P}];return createVNode(d,{type:C,class:_,style:u(),disabled:x,onClick:c},{default:()=>[createVNode("div",{class:bem$z("content")},[T==="left"&&a(),l(),T==="right"&&a()])]})}}});const Button$1=withInstall(stdin_default$D),[name$A,bem$y]=createNamespace$1("action-bar-button"),actionBarButtonProps=extend$2({},routeProps,{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean});var stdin_default$C=defineComponent({name:name$A,props:actionBarButtonProps,setup(i,{slots:e}){const r=useRoute(),{parent:s,index:o}=useParent$1(ACTION_BAR_KEY),a=computed(()=>{if(s){const u=s.children[o.value-1];return!(u&&"isButton"in u)}}),l=computed(()=>{if(s){const u=s.children[o.value+1];return!(u&&"isButton"in u)}});return useExpose({isButton:!0}),()=>{const{type:u,icon:c,text:d,color:g,loading:m,disabled:y}=i;return createVNode(Button$1,{class:bem$y([u,{last:l.value,first:a.value}]),size:"large",type:u,icon:c,color:g,loading:m,disabled:y,onClick:r},{default:()=>[e.default?e.default():d]})}}});const ActionBarButton=withInstall(stdin_default$C),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),r=ref(0),s=ref(0),o=ref(0),a=ref(0),l=ref(""),u=()=>l.value==="vertical",c=()=>l.value==="horizontal",d=()=>{r.value=0,s.value=0,o.value=0,a.value=0,l.value=""};return{move:y=>{const b=y.touches[0];r.value=(b.clientX<0?0:b.clientX)-i.value,s.value=b.clientY-e.value,o.value=Math.abs(r.value),a.value=Math.abs(s.value);const S=10;(!l.value||o.value{d(),i.value=y.touches[0].clientX,e.value=y.touches[0].clientY},reset:d,startX:i,startY:e,deltaX:r,deltaY:s,offsetX:o,offsetY:a,direction:l,isVertical:u,isHorizontal:c}}let totalLockCount=0;const BODY_LOCK_CLASS="van-overflow-hidden";function useLockScroll(i,e){const r=useTouch(),s="01",o="10",a=g=>{r.move(g);const m=r.deltaY.value>0?o:s,y=getScrollParent(g.target,i.value),{scrollHeight:b,offsetHeight:S,scrollTop:A}=y;let E="11";A===0?E=S>=b?"00":"01":A+S>=b&&(E="10"),E!=="11"&&r.isVertical()&&!(parseInt(E,2)&parseInt(m,2))&&preventDefault(g,!0)},l=()=>{document.addEventListener("touchstart",r.start),document.addEventListener("touchmove",a,{passive:!1}),totalLockCount||document.body.classList.add(BODY_LOCK_CLASS),totalLockCount++},u=()=>{totalLockCount&&(document.removeEventListener("touchstart",r.start),document.removeEventListener("touchmove",a),totalLockCount--,totalLockCount||document.body.classList.remove(BODY_LOCK_CLASS))},c=()=>e()&&l(),d=()=>e()&&u();onMountedOrActivated(c),onDeactivated(d),onBeforeUnmount(d),watch(e,g=>{g?l():u()})}function useLazyRender(i){const e=ref(!1);return watch(i,r=>{r&&(e.value=r)},{immediate:!0}),r=>()=>e.value?r():null}const[name$z,bem$x]=createNamespace$1("overlay"),overlayProps={show:Boolean,zIndex:numericProp,duration:numericProp,className:unknownProp,lockScroll:truthProp,lazyRender:truthProp,customStyle:Object};var stdin_default$B=defineComponent({name:name$z,props:overlayProps,setup(i,{slots:e}){const r=ref(),s=useLazyRender(()=>i.show||!i.lazyRender),o=l=>{i.lockScroll&&preventDefault(l,!0)},a=s(()=>{var l;const u=extend$2(getZIndexStyle(i.zIndex),i.customStyle);return isDef$1(i.duration)&&(u.animationDuration=`${i.duration}s`),withDirectives(createVNode("div",{ref:r,style:u,class:[bem$x(),i.className]},[(l=e.default)==null?void 0:l.call(e)]),[[vShow,i.show]])});return useEventListener$1("touchmove",o,{target:r}),()=>createVNode(Transition,{name:"van-fade",appear:!0},{default:a})}});const Overlay=withInstall(stdin_default$B),popupProps$1=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$y,bem$w]=createNamespace$1("popup");var stdin_default$A=defineComponent({name:name$y,inheritAttrs:!1,props:popupProps$1,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(i,{emit:e,attrs:r,slots:s}){let o,a;const l=ref(),u=ref(),c=useLazyRender(()=>i.show||!i.lazyRender),d=computed(()=>{const _={zIndex:l.value};if(isDef$1(i.duration)){const B=i.position==="center"?"animationDuration":"transitionDuration";_[B]=`${i.duration}s`}return _}),g=()=>{o||(o=!0,l.value=i.zIndex!==void 0?+i.zIndex:useGlobalZIndex(),e("open"))},m=()=>{o&&callInterceptor(i.beforeClose,{done(){o=!1,e("close"),e("update:show",!1)}})},y=_=>{e("clickOverlay",_),i.closeOnClickOverlay&&m()},b=()=>{if(i.overlay)return createVNode(Overlay,{show:i.show,class:i.overlayClass,zIndex:l.value,duration:i.duration,customStyle:i.overlayStyle,role:i.closeOnClickOverlay?"button":void 0,tabindex:i.closeOnClickOverlay?0:void 0,onClick:y},{default:s["overlay-content"]})},S=_=>{e("clickCloseIcon",_),m()},A=()=>{if(i.closeable)return createVNode(Icon$1,{role:"button",tabindex:0,name:i.closeIcon,class:[bem$w("close-icon",i.closeIconPosition),HAPTICS_FEEDBACK],classPrefix:i.iconPrefix,onClick:S},null)},E=()=>e("opened"),x=()=>e("closed"),P=_=>e("keydown",_),C=c(()=>{var _;const{round:B,position:M,safeAreaInsetTop:N,safeAreaInsetBottom:I}=i;return withDirectives(createVNode("div",mergeProps({ref:u,style:d.value,role:"dialog",tabindex:0,class:[bem$w({round:B,[M]:M}),{"van-safe-area-top":N,"van-safe-area-bottom":I}],onKeydown:P},r),[(_=s.default)==null?void 0:_.call(s),A()]),[[vShow,i.show]])}),T=()=>{const{position:_,transition:B,transitionAppear:M}=i,N=_==="center"?"van-fade":`van-popup-slide-${_}`;return createVNode(Transition,{name:B||N,appear:M,onAfterEnter:E,onAfterLeave:x},{default:C})};return watch(()=>i.show,_=>{_&&!o&&(g(),r.tabindex===0&&nextTick(()=>{var B;(B=u.value)==null||B.focus()})),!_&&o&&(o=!1,e("close"))}),useExpose({popupRef:u}),useLockScroll(u,()=>i.show&&i.lockScroll),useEventListener$1("popstate",()=>{i.closeOnPopstate&&(m(),a=!1)}),onMounted(()=>{i.show&&g()}),onActivated(()=>{a&&(e("update:show",!0),a=!1)}),onDeactivated(()=>{i.show&&i.teleport&&(m(),a=!0)}),provide(POPUP_TOGGLE_KEY,()=>i.show),()=>i.teleport?createVNode(Teleport,{to:i.teleport},{default:()=>[b(),T()]}):createVNode(Fragment,null,[b(),T()])}});const Popup=withInstall(stdin_default$A),[name$x,bem$v,t$3]=createNamespace$1("picker"),getFirstEnabledOption=i=>i.find(e=>!e.disabled)||i[0];function getColumnsType(i,e){const r=i[0];if(r){if(Array.isArray(r))return"multiple";if(e.children in r)return"cascade"}return"default"}function findIndexOfEnabledOption(i,e){e=clamp(e,0,i.length);for(let r=e;r=0;r--)if(!i[r].disabled)return r;return 0}const isOptionExist=(i,e,r)=>e!==void 0&&!!i.find(s=>s[r.value]===e);function findOptionByValue(i,e,r){const s=i.findIndex(a=>a[r.value]===e),o=findIndexOfEnabledOption(i,s);return i[o]}function formatCascadeColumns(i,e,r){const s=[];let o={[e.children]:i},a=0;for(;o&&o[e.children];){const l=o[e.children],u=r.value[a];if(o=isDef$1(u)?findOptionByValue(l,u,e):void 0,!o&&l.length){const c=getFirstEnabledOption(l)[e.value];o=findOptionByValue(l,c,e)}a++,s.push(l)}return s}function getElementTranslateY(i){const{transform:e}=window.getComputedStyle(i),r=e.slice(7,e.length-1).split(", ")[5];return Number(r)}function assignDefaultFields(i){return extend$2({text:"text",value:"value",children:"children"},i)}const DEFAULT_DURATION=200,MOMENTUM_TIME=300,MOMENTUM_DISTANCE=15,[name$w,bem$u]=createNamespace$1("picker-column"),PICKER_KEY=Symbol(name$w);var stdin_default$z=defineComponent({name:name$w,props:{value:numericProp,fields:makeRequiredProp(Object),options:makeArrayProp(),readonly:Boolean,allowHtml:Boolean,optionHeight:makeRequiredProp(Number),swipeDuration:makeRequiredProp(numericProp),visibleOptionNum:makeRequiredProp(numericProp)},emits:["change","clickOption"],setup(i,{emit:e,slots:r}){let s,o,a,l,u;const c=ref(),d=ref(),g=ref(0),m=ref(0),y=useTouch(),b=()=>i.options.length,S=()=>i.optionHeight*(+i.visibleOptionNum-1)/2,A=I=>{const R=findIndexOfEnabledOption(i.options,I),F=-R*i.optionHeight,k=()=>{const V=i.options[R][i.fields.value];V!==i.value&&e("change",V)};s&&F!==g.value?u=k:k(),g.value=F},E=()=>i.readonly||!i.options.length,x=I=>{s||E()||(u=null,m.value=DEFAULT_DURATION,A(I),e("clickOption",i.options[I]))},P=I=>clamp(Math.round(-I/i.optionHeight),0,b()-1),C=(I,R)=>{const F=Math.abs(I/R);I=g.value+F/.003*(I<0?-1:1);const k=P(I);m.value=+i.swipeDuration,A(k)},T=()=>{s=!1,m.value=0,u&&(u(),u=null)},_=I=>{if(!E()){if(y.start(I),s){const R=getElementTranslateY(d.value);g.value=Math.min(0,R-S())}m.value=0,o=g.value,a=Date.now(),l=o,u=null}},B=I=>{if(E())return;y.move(I),y.isVertical()&&(s=!0,preventDefault(I,!0)),g.value=clamp(o+y.deltaY.value,-(b()*i.optionHeight),i.optionHeight);const R=Date.now();R-a>MOMENTUM_TIME&&(a=R,l=g.value)},M=()=>{if(E())return;const I=g.value-l,R=Date.now()-a;if(RMOMENTUM_DISTANCE){C(I,R);return}const k=P(g.value);m.value=DEFAULT_DURATION,A(k),setTimeout(()=>{s=!1},0)},N=()=>{const I={height:`${i.optionHeight}px`};return i.options.map((R,F)=>{const k=R[i.fields.text],{disabled:V}=R,D=R[i.fields.value],$={role:"button",style:I,tabindex:V?-1:0,class:[bem$u("item",{disabled:V,selected:D===i.value}),R.className],onClick:()=>x(F)},O={class:"van-ellipsis",[i.allowHtml?"innerHTML":"textContent"]:k};return createVNode("li",$,[r.option?r.option(R,F):createVNode("div",O,null)])})};return useParent$1(PICKER_KEY),useExpose({stopMomentum:T}),watchEffect(()=>{const I=i.options.findIndex(k=>k[i.fields.value]===i.value),F=-findIndexOfEnabledOption(i.options,I)*i.optionHeight;g.value=F}),useEventListener$1("touchmove",B,{target:c}),()=>createVNode("div",{ref:c,class:bem$u(),onTouchstartPassive:_,onTouchend:M,onTouchcancel:M},[createVNode("ul",{ref:d,style:{transform:`translate3d(0, ${g.value+S()}px, 0)`,transitionDuration:`${m.value}ms`,transitionProperty:m.value?"all":"none"},class:bem$u("wrapper"),onTransitionend:T},[N()])])}});const[name$v]=createNamespace$1("picker-toolbar"),pickerToolbarProps={title:String,cancelButtonText:String,confirmButtonText:String},pickerToolbarSlots=["cancel","confirm","title","toolbar"],pickerToolbarPropKeys=Object.keys(pickerToolbarProps);var stdin_default$y=defineComponent({name:name$v,props:pickerToolbarProps,emits:["confirm","cancel"],setup(i,{emit:e,slots:r}){const s=()=>{if(r.title)return r.title();if(i.title)return createVNode("div",{class:[bem$v("title"),"van-ellipsis"]},[i.title])},o=()=>e("cancel"),a=()=>e("confirm"),l=()=>{const c=i.cancelButtonText||t$3("cancel");return createVNode("button",{type:"button",class:[bem$v("cancel"),HAPTICS_FEEDBACK],onClick:o},[r.cancel?r.cancel():c])},u=()=>{const c=i.confirmButtonText||t$3("confirm");return createVNode("button",{type:"button",class:[bem$v("confirm"),HAPTICS_FEEDBACK],onClick:a},[r.confirm?r.confirm():c])};return()=>createVNode("div",{class:bem$v("toolbar")},[r.toolbar?r.toolbar():[l(),s(),u()]])}});function scrollLeftTo(i,e,r){let s=0;const o=i.scrollLeft,a=r===0?1:Math.round(r*1e3/16);function l(){i.scrollLeft+=(e-o)/a,++se||!a&&oe?raf(c):s&&raf(s)}c()}let current=0;function useId(){const i=getCurrentInstance(),{name:e="unknown"}=(i==null?void 0:i.type)||{};return`${e}-${++current}`}function useRefs(){const i=ref([]),e=[];return onBeforeUpdate(()=>{i.value=[]}),[i,s=>(e[s]||(e[s]=o=>{i.value[s]=o}),e[s])]}function useVisibilityChange(i,e){if(!inBrowser$2||!window.IntersectionObserver)return;const r=new IntersectionObserver(a=>{e(a[0].intersectionRatio>0)},{root:document.body}),s=()=>{i.value&&r.observe(i.value)},o=()=>{i.value&&r.unobserve(i.value)};onDeactivated(o),onBeforeUnmount(o),onMountedOrActivated(s)}const[name$u,bem$t]=createNamespace$1("sticky"),stickyProps={zIndex:numericProp,position:makeStringProp("top"),container:Object,offsetTop:makeNumericProp(0),offsetBottom:makeNumericProp(0)};var stdin_default$x=defineComponent({name:name$u,props:stickyProps,emits:["scroll","change"],setup(i,{emit:e,slots:r}){const s=ref(),o=useScrollParent(s),a=reactive({fixed:!1,width:0,height:0,transform:0}),l=computed(()=>unitToPx(i.position==="top"?i.offsetTop:i.offsetBottom)),u=computed(()=>{const{fixed:m,height:y,width:b}=a;if(m)return{width:`${b}px`,height:`${y}px`}}),c=computed(()=>{if(!a.fixed)return;const m=extend$2(getZIndexStyle(i.zIndex),{width:`${a.width}px`,height:`${a.height}px`,[i.position]:`${l.value}px`});return a.transform&&(m.transform=`translate3d(0, ${a.transform}px, 0)`),m}),d=m=>e("scroll",{scrollTop:m,isFixed:a.fixed}),g=()=>{if(!s.value||isHidden(s))return;const{container:m,position:y}=i,b=useRect(s),S=getScrollTop(window);if(a.width=b.width,a.height=b.height,y==="top")if(m){const A=useRect(m),E=A.bottom-l.value-a.height;a.fixed=l.value>b.top&&A.bottom>0,a.transform=E<0?E:0}else a.fixed=l.value>b.top;else{const{clientHeight:A}=document.documentElement;if(m){const E=useRect(m),x=A-E.top-l.value-a.height;a.fixed=A-l.valueE.top,a.transform=x<0?-x:0}else a.fixed=A-l.valuea.fixed,m=>e("change",m)),useEventListener$1("scroll",g,{target:o,passive:!0}),useVisibilityChange(s,g),()=>{var m;return createVNode("div",{ref:s,style:u.value},[createVNode("div",{class:bem$t({fixed:a.fixed}),style:c.value},[(m=r.default)==null?void 0:m.call(r)])])}}});const Sticky=withInstall(stdin_default$x),[name$t,bem$s]=createNamespace$1("tab");var stdin_default$w=defineComponent({name:name$t,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:numericProp,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:truthProp},setup(i,{slots:e}){const r=computed(()=>{const o={},{type:a,color:l,disabled:u,isActive:c,activeColor:d,inactiveColor:g}=i;l&&a==="card"&&(o.borderColor=l,u||(c?o.backgroundColor=l:o.color=l));const y=c?d:g;return y&&(o.color=y),o}),s=()=>{const o=createVNode("span",{class:bem$s("text",{ellipsis:!i.scrollable})},[e.title?e.title():i.title]);return i.dot||isDef$1(i.badge)&&i.badge!==""?createVNode(Badge,{dot:i.dot,content:i.badge,showZero:i.showZeroBadge},{default:()=>[o]}):o};return()=>createVNode("div",{id:i.id,role:"tab",class:[bem$s([i.type,{grow:i.scrollable&&!i.shrink,shrink:i.shrink,active:i.isActive,disabled:i.disabled}])],style:r.value,tabindex:i.disabled?void 0:i.isActive?0:-1,"aria-selected":i.isActive,"aria-disabled":i.disabled||void 0,"aria-controls":i.controls},[s()])}});const[name$s,bem$r]=createNamespace$1("swipe"),swipeProps={loop:truthProp,width:numericProp,height:numericProp,vertical:Boolean,autoplay:makeNumericProp(0),duration:makeNumericProp(500),touchable:truthProp,lazyRender:Boolean,initialSwipe:makeNumericProp(0),indicatorColor:String,showIndicators:truthProp,stopPropagation:truthProp},SWIPE_KEY=Symbol(name$s);var stdin_default$v=defineComponent({name:name$s,props:swipeProps,emits:["change","dragStart","dragEnd"],setup(i,{emit:e,slots:r}){const s=ref(),o=ref(),a=reactive({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let l=!1;const u=useTouch(),{children:c,linkChildren:d}=useChildren$1(SWIPE_KEY),g=computed(()=>c.length),m=computed(()=>a[i.vertical?"height":"width"]),y=computed(()=>i.vertical?u.deltaY.value:u.deltaX.value),b=computed(()=>a.rect?(i.vertical?a.rect.height:a.rect.width)-m.value*g.value:0),S=computed(()=>m.value?Math.ceil(Math.abs(b.value)/m.value):g.value),A=computed(()=>g.value*m.value),E=computed(()=>(a.active+g.value)%g.value),x=computed(()=>{const W=i.vertical?"vertical":"horizontal";return u.direction.value===W}),P=computed(()=>{const W={transitionDuration:`${a.swiping?0:i.duration}ms`,transform:`translate${i.vertical?"Y":"X"}(${a.offset}px)`};if(m.value){const K=i.vertical?"height":"width",ye=i.vertical?"width":"height";W[K]=`${A.value}px`,W[ye]=i[ye]?`${i[ye]}px`:""}return W}),C=W=>{const{active:K}=a;return W?i.loop?clamp(K+W,-1,g.value):clamp(K+W,0,S.value):K},T=(W,K=0)=>{let ye=W*m.value;i.loop||(ye=Math.min(ye,-b.value));let ae=K-ye;return i.loop||(ae=clamp(ae,b.value,0)),ae},_=({pace:W=0,offset:K=0,emitChange:ye})=>{if(g.value<=1)return;const{active:ae}=a,Y=C(W),Q=T(Y,K);if(i.loop){if(c[0]&&Q!==b.value){const he=Q0;c[g.value-1].setOffset(he?-A.value:0)}}a.active=Y,a.offset=Q,ye&&Y!==ae&&e("change",E.value)},B=()=>{a.swiping=!0,a.active<=-1?_({pace:g.value}):a.active>=g.value&&_({pace:-g.value})},M=()=>{B(),u.reset(),doubleRaf(()=>{a.swiping=!1,_({pace:-1,emitChange:!0})})},N=()=>{B(),u.reset(),doubleRaf(()=>{a.swiping=!1,_({pace:1,emitChange:!0})})};let I;const R=()=>clearTimeout(I),F=()=>{R(),+i.autoplay>0&&g.value>1&&(I=setTimeout(()=>{N(),F()},+i.autoplay))},k=(W=+i.initialSwipe)=>{if(!s.value)return;const K=()=>{var ye,ae;if(!isHidden(s)){const Y={width:s.value.offsetWidth,height:s.value.offsetHeight};a.rect=Y,a.width=+((ye=i.width)!=null?ye:Y.width),a.height=+((ae=i.height)!=null?ae:Y.height)}g.value&&(W=Math.min(g.value-1,W),W===-1&&(W=g.value-1)),a.active=W,a.swiping=!0,a.offset=T(W),c.forEach(Y=>{Y.setOffset(0)}),F()};isHidden(s)?nextTick().then(K):K()},V=()=>k(a.active);let D;const $=W=>{!i.touchable||W.touches.length>1||(u.start(W),l=!1,D=Date.now(),R(),B())},O=W=>{i.touchable&&a.swiping&&(u.move(W),x.value&&(!i.loop&&(a.active===0&&y.value>0||a.active===g.value-1&&y.value<0)||(preventDefault(W,i.stopPropagation),_({offset:y.value}),l||(e("dragStart",{index:E.value}),l=!0))))},q=()=>{if(!i.touchable||!a.swiping)return;const W=Date.now()-D,K=y.value/W;if((Math.abs(K)>.25||Math.abs(y.value)>m.value/2)&&x.value){const ae=i.vertical?u.offsetY.value:u.offsetX.value;let Y=0;i.loop?Y=ae>0?y.value>0?-1:1:0:Y=-Math[y.value>0?"ceil":"floor"](y.value/m.value),_({pace:Y,emitChange:!0})}else y.value&&_({pace:0});l=!1,a.swiping=!1,e("dragEnd",{index:E.value}),F()},G=(W,K={})=>{B(),u.reset(),doubleRaf(()=>{let ye;i.loop&&W===g.value?ye=a.active===0?0:W:ye=W%g.value,K.immediate?doubleRaf(()=>{a.swiping=!1}):a.swiping=!1,_({pace:ye-a.active,emitChange:!0})})},U=(W,K)=>{const ye=K===E.value,ae=ye?{backgroundColor:i.indicatorColor}:void 0;return createVNode("i",{style:ae,class:bem$r("indicator",{active:ye})},null)},Z=()=>{if(r.indicator)return r.indicator({active:E.value,total:g.value});if(i.showIndicators&&g.value>1)return createVNode("div",{class:bem$r("indicators",{vertical:i.vertical})},[Array(g.value).fill("").map(U)])};return useExpose({prev:M,next:N,state:a,resize:V,swipeTo:G}),d({size:m,props:i,count:g,activeIndicator:E}),watch(()=>i.initialSwipe,W=>k(+W)),watch(g,()=>k(a.active)),watch(()=>i.autoplay,F),watch([windowWidth,windowHeight],V),watch(usePageVisibility(),W=>{W==="visible"?F():R()}),onMounted(k),onActivated(()=>k(a.active)),onPopupReopen(()=>k(a.active)),onDeactivated(R),onBeforeUnmount(R),useEventListener$1("touchmove",O,{target:o}),()=>{var W;return createVNode("div",{ref:s,class:bem$r()},[createVNode("div",{ref:o,style:P.value,class:bem$r("track",{vertical:i.vertical}),onTouchstartPassive:$,onTouchend:q,onTouchcancel:q},[(W=r.default)==null?void 0:W.call(r)]),Z()])}}});const Swipe=withInstall(stdin_default$v),[name$r,bem$q]=createNamespace$1("tabs");var stdin_default$u=defineComponent({name:name$r,props:{count:makeRequiredProp(Number),inited:Boolean,animated:Boolean,duration:makeRequiredProp(numericProp),swipeable:Boolean,lazyRender:Boolean,currentIndex:makeRequiredProp(Number)},emits:["change"],setup(i,{emit:e,slots:r}){const s=ref(),o=u=>e("change",u),a=()=>{var u;const c=(u=r.default)==null?void 0:u.call(r);return i.animated||i.swipeable?createVNode(Swipe,{ref:s,loop:!1,class:bem$q("track"),duration:+i.duration*1e3,touchable:i.swipeable,lazyRender:i.lazyRender,showIndicators:!1,onChange:o},{default:()=>[c]}):c},l=u=>{const c=s.value;c&&c.state.active!==u&&c.swipeTo(u,{immediate:!i.inited})};return watch(()=>i.currentIndex,l),onMounted(()=>{l(i.currentIndex)}),useExpose({swipeRef:s}),()=>createVNode("div",{class:bem$q("content",{animated:i.animated||i.swipeable})},[a()])}});const[name$q,bem$p]=createNamespace$1("tabs"),tabsProps={type:makeStringProp("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:makeNumericProp(0),duration:makeNumericProp(.3),animated:Boolean,ellipsis:truthProp,swipeable:Boolean,scrollspy:Boolean,offsetTop:makeNumericProp(0),background:String,lazyRender:truthProp,lineWidth:numericProp,lineHeight:numericProp,beforeChange:Function,swipeThreshold:makeNumericProp(5),titleActiveColor:String,titleInactiveColor:String},TABS_KEY=Symbol(name$q);var stdin_default$t=defineComponent({name:name$q,props:tabsProps,emits:["change","scroll","rendered","clickTab","update:active"],setup(i,{emit:e,slots:r}){let s,o,a;const l=ref(),u=ref(),c=ref(),d=ref(),g=useId(),m=useScrollParent(l),[y,b]=useRefs(),{children:S,linkChildren:A}=useChildren$1(TABS_KEY),E=reactive({inited:!1,position:"",lineStyle:{},currentIndex:-1}),x=computed(()=>S.length>+i.swipeThreshold||!i.ellipsis||i.shrink),P=computed(()=>({borderColor:i.color,background:i.background})),C=(ae,Y)=>{var Q;return(Q=ae.name)!=null?Q:Y},T=computed(()=>{const ae=S[E.currentIndex];if(ae)return C(ae,E.currentIndex)}),_=computed(()=>unitToPx(i.offsetTop)),B=computed(()=>i.sticky?_.value+s:0),M=ae=>{const Y=u.value,Q=y.value;if(!x.value||!Y||!Q||!Q[E.currentIndex])return;const he=Q[E.currentIndex].$el,ge=he.offsetLeft-(Y.offsetWidth-he.offsetWidth)/2;scrollLeftTo(Y,ge,ae?0:+i.duration)},N=()=>{const ae=E.inited;nextTick(()=>{const Y=y.value;if(!Y||!Y[E.currentIndex]||i.type!=="line"||isHidden(l.value))return;const Q=Y[E.currentIndex].$el,{lineWidth:he,lineHeight:ge}=i,Se=Q.offsetLeft+Q.offsetWidth/2,Ie={width:addUnit(he),backgroundColor:i.color,transform:`translateX(${Se}px) translateX(-50%)`};if(ae&&(Ie.transitionDuration=`${i.duration}s`),isDef$1(ge)){const Me=addUnit(ge);Ie.height=Me,Ie.borderRadius=Me}E.lineStyle=Ie})},I=ae=>{const Y=ae=0&&ae{const Q=I(ae);if(!isDef$1(Q))return;const he=S[Q],ge=C(he,Q),Se=E.currentIndex!==null;E.currentIndex!==Q&&(E.currentIndex=Q,Y||M(),N()),ge!==i.active&&(e("update:active",ge),Se&&e("change",ge,he.title)),a&&!i.scrollspy&&setRootScrollTop(Math.ceil(getElementTop(l.value)-_.value))},F=(ae,Y)=>{const Q=S.find((ge,Se)=>C(ge,Se)===ae),he=Q?S.indexOf(Q):0;R(he,Y)},k=(ae=!1)=>{if(i.scrollspy){const Y=S[E.currentIndex].$el;if(Y&&m.value){const Q=getElementTop(Y,m.value)-B.value;o=!0,scrollTopTo(m.value,Q,ae?0:+i.duration,()=>{o=!1})}}},V=(ae,Y,Q)=>{const{title:he,disabled:ge}=S[Y],Se=C(S[Y],Y);ge||(callInterceptor(i.beforeChange,{args:[Se],done:()=>{R(Y),k()}}),route(ae)),e("clickTab",{name:Se,title:he,event:Q,disabled:ge})},D=ae=>{a=ae.isFixed,e("scroll",ae)},$=ae=>{nextTick(()=>{F(ae),k(!0)})},O=()=>{for(let ae=0;aeB.value)return ae===0?0:ae-1}return S.length-1},q=()=>{if(i.scrollspy&&!o){const ae=O();R(ae)}},G=()=>S.map((ae,Y)=>createVNode(stdin_default$w,mergeProps({key:ae.id,id:`${g}-${Y}`,ref:b(Y),type:i.type,color:i.color,style:ae.titleStyle,class:ae.titleClass,shrink:i.shrink,isActive:Y===E.currentIndex,controls:ae.id,scrollable:x.value,activeColor:i.titleActiveColor,inactiveColor:i.titleInactiveColor,onClick:Q=>V(ae,Y,Q)},pick$1(ae,["dot","badge","title","disabled","showZeroBadge"])),{title:ae.$slots.title})),U=()=>{if(i.type==="line"&&S.length)return createVNode("div",{class:bem$p("line"),style:E.lineStyle},null)},Z=()=>{var ae,Y,Q;const{type:he,border:ge,sticky:Se}=i,Ie=[createVNode("div",{ref:Se?void 0:c,class:[bem$p("wrap"),{[BORDER_TOP_BOTTOM]:he==="line"&&ge}]},[createVNode("div",{ref:u,role:"tablist",class:bem$p("nav",[he,{shrink:i.shrink,complete:x.value}]),style:P.value,"aria-orientation":"horizontal"},[(ae=r["nav-left"])==null?void 0:ae.call(r),G(),U(),(Y=r["nav-right"])==null?void 0:Y.call(r)])]),(Q=r["nav-bottom"])==null?void 0:Q.call(r)];return Se?createVNode("div",{ref:c},[Ie]):Ie};watch([()=>i.color,windowWidth],N),watch(()=>i.active,ae=>{ae!==T.value&&F(ae)}),watch(()=>S.length,()=>{E.inited&&(F(i.active),N(),nextTick(()=>{M(!0)}))});const W=()=>{F(i.active,!0),nextTick(()=>{E.inited=!0,c.value&&(s=useRect(c.value).height),M(!0)})},K=(ae,Y)=>e("rendered",ae,Y);return useExpose({resize:()=>{N(),nextTick(()=>{var ae,Y;return(Y=(ae=d.value)==null?void 0:ae.swipeRef.value)==null?void 0:Y.resize()})},scrollTo:$}),onActivated(N),onPopupReopen(N),onMountedOrActivated(W),useVisibilityChange(l,N),useEventListener$1("scroll",q,{target:m,passive:!0}),A({id:g,props:i,setLine:N,onRendered:K,currentName:T,scrollIntoView:M}),()=>createVNode("div",{ref:l,class:bem$p([i.type])},[i.sticky?createVNode(Sticky,{container:l.value,offsetTop:_.value,onScroll:D},{default:()=>[Z()]}):Z(),createVNode(stdin_default$u,{ref:d,count:S.length,inited:E.inited,animated:i.animated,duration:i.duration,swipeable:i.swipeable,lazyRender:i.lazyRender,currentIndex:E.currentIndex,onChange:R},{default:()=>{var ae;return[(ae=r.default)==null?void 0:ae.call(r)]}})])}});const TAB_STATUS_KEY=Symbol(),useTabStatus=()=>inject(TAB_STATUS_KEY,null),[name$p,bem$o]=createNamespace$1("swipe-item");var stdin_default$s=defineComponent({name:name$p,setup(i,{slots:e}){let r;const s=reactive({offset:0,inited:!1,mounted:!1}),{parent:o,index:a}=useParent$1(SWIPE_KEY);if(!o)return;const l=computed(()=>{const d={},{vertical:g}=o.props;return o.size.value&&(d[g?"height":"width"]=`${o.size.value}px`),s.offset&&(d.transform=`translate${g?"Y":"X"}(${s.offset}px)`),d}),u=computed(()=>{const{loop:d,lazyRender:g}=o.props;if(!g||r)return!0;if(!s.mounted)return!1;const m=o.activeIndicator.value,y=o.count.value-1,b=m===0&&d?y:m-1,S=m===y&&d?0:m+1;return r=a.value===m||a.value===b||a.value===S,r}),c=d=>{s.offset=d};return onMounted(()=>{nextTick(()=>{s.mounted=!0})}),useExpose({setOffset:c}),()=>{var d;return createVNode("div",{class:bem$o(),style:l.value},[u.value?(d=e.default)==null?void 0:d.call(e):null])}}});const SwipeItem=withInstall(stdin_default$s),[name$o,bem$n]=createNamespace$1("tab"),tabProps=extend$2({},routeProps,{dot:Boolean,name:numericProp,badge:numericProp,title:String,disabled:Boolean,titleClass:unknownProp,titleStyle:[String,Object],showZeroBadge:truthProp});var stdin_default$r=defineComponent({name:name$o,props:tabProps,setup(i,{slots:e}){const r=useId(),s=ref(!1),{parent:o,index:a}=useParent$1(TABS_KEY);if(!o)return;const l=()=>{var g;return(g=i.name)!=null?g:a.value},u=()=>{s.value=!0,o.props.lazyRender&&nextTick(()=>{o.onRendered(l(),i.title)})},c=computed(()=>{const g=l()===o.currentName.value;return g&&!s.value&&u(),g}),d=ref(!c.value);return watch(c,g=>{g?d.value=!1:doubleRaf(()=>{d.value=!0})}),watch(()=>i.title,()=>{o.setLine(),o.scrollIntoView()}),provide(TAB_STATUS_KEY,c),()=>{var g;const m=`${o.id}-${a.value}`,{animated:y,swipeable:b,scrollspy:S,lazyRender:A}=o.props;if(!e.default&&!y)return;const E=S||c.value;if(y||b)return createVNode(SwipeItem,{id:r,role:"tabpanel",class:bem$n("panel-wrapper",{inactive:d.value}),tabindex:c.value?0:-1,"aria-hidden":!c.value,"aria-labelledby":m},{default:()=>{var C;return[createVNode("div",{class:bem$n("panel")},[(C=e.default)==null?void 0:C.call(e)])]}});const P=s.value||S||!A?(g=e.default)==null?void 0:g.call(e):null;return useExpose({id:r}),withDirectives(createVNode("div",{id:r,role:"tabpanel",class:bem$n("panel"),tabindex:E?0:-1,"aria-labelledby":m},[P]),[[vShow,E]])}}});const Tab=withInstall(stdin_default$r),Tabs=withInstall(stdin_default$t),[name$n,bem$m]=createNamespace$1("picker-group"),PICKER_GROUP_KEY=Symbol(name$n),pickerGroupProps=extend$2({tabs:makeArrayProp(),nextStepText:String},pickerToolbarProps);defineComponent({name:name$n,props:pickerGroupProps,emits:["confirm","cancel"],setup(i,{emit:e,slots:r}){const s=ref(0),{children:o,linkChildren:a}=useChildren$1(PICKER_GROUP_KEY);a();const l=()=>s.value{l()?s.value++:e("confirm",o.map(d=>d.confirm()))},c=()=>e("cancel");return()=>{var d;const g=(d=r.default)==null?void 0:d.call(r),m=l()?i.nextStepText:i.confirmButtonText;return createVNode("div",{class:bem$m()},[createVNode(stdin_default$y,{title:i.title,cancelButtonText:i.cancelButtonText,confirmButtonText:m,onConfirm:u,onCancel:c},pick$1(r,pickerToolbarSlots)),createVNode(Tabs,{active:s.value,"onUpdate:active":y=>s.value=y,class:bem$m("tabs"),shrink:!0,animated:!0,lazyRender:!1},{default:()=>[i.tabs.map((y,b)=>createVNode(Tab,{title:y,titleClass:bem$m("tab-title")},{default:()=>[g==null?void 0:g[b]]}))]})])}}});const pickerSharedProps=extend$2({loading:Boolean,readonly:Boolean,allowHtml:Boolean,optionHeight:makeNumericProp(44),showToolbar:truthProp,swipeDuration:makeNumericProp(1e3),visibleOptionNum:makeNumericProp(6)},pickerToolbarProps),pickerProps=extend$2({},pickerSharedProps,{columns:makeArrayProp(),modelValue:makeArrayProp(),toolbarPosition:makeStringProp("top"),columnsFieldNames:Object});var stdin_default$q=defineComponent({name:name$x,props:pickerProps,emits:["confirm","cancel","change","clickOption","update:modelValue"],setup(i,{emit:e,slots:r}){const s=ref(),o=ref(i.modelValue.slice(0)),{parent:a}=useParent$1(PICKER_GROUP_KEY),{children:l,linkChildren:u}=useChildren$1(PICKER_KEY);u();const c=computed(()=>assignDefaultFields(i.columnsFieldNames)),d=computed(()=>unitToPx(i.optionHeight)),g=computed(()=>getColumnsType(i.columns,c.value)),m=computed(()=>{const{columns:F}=i;switch(g.value){case"multiple":return F;case"cascade":return formatCascadeColumns(F,c.value,o);default:return[F]}}),y=computed(()=>m.value.some(F=>F.length)),b=computed(()=>m.value.map((F,k)=>findOptionByValue(F,o.value[k],c.value))),S=computed(()=>m.value.map((F,k)=>F.findIndex(V=>V[c.value.value]===o.value[k]))),A=(F,k)=>{if(o.value[F]!==k){const V=o.value.slice(0);V[F]=k,o.value=V}},E=()=>({selectedValues:o.value.slice(0),selectedOptions:b.value,selectedIndexes:S.value}),x=(F,k)=>{A(k,F),g.value==="cascade"&&o.value.forEach((V,D)=>{const $=m.value[D];isOptionExist($,V,c.value)||A(D,$.length?$[0][c.value.value]:void 0)}),nextTick(()=>{e("change",extend$2({columnIndex:k},E()))})},P=(F,k)=>e("clickOption",extend$2({columnIndex:k,currentOption:F},E())),C=()=>{l.forEach(k=>k.stopMomentum());const F=E();return nextTick(()=>{e("confirm",F)}),F},T=()=>e("cancel",E()),_=()=>m.value.map((F,k)=>createVNode(stdin_default$z,{value:o.value[k],fields:c.value,options:F,readonly:i.readonly,allowHtml:i.allowHtml,optionHeight:d.value,swipeDuration:i.swipeDuration,visibleOptionNum:i.visibleOptionNum,onChange:V=>x(V,k),onClickOption:V=>P(V,k)},{option:r.option})),B=F=>{if(y.value){const k={height:`${d.value}px`},V={backgroundSize:`100% ${(F-d.value)/2}px`};return[createVNode("div",{class:bem$v("mask"),style:V},null),createVNode("div",{class:[BORDER_UNSET_TOP_BOTTOM,bem$v("frame")],style:k},null)]}},M=()=>{const F=d.value*+i.visibleOptionNum,k={height:`${F}px`};return createVNode("div",{ref:s,class:bem$v("columns"),style:k},[_(),B(F)])},N=()=>{if(i.showToolbar&&!a)return createVNode(stdin_default$y,mergeProps(pick$1(i,pickerToolbarPropKeys),{onConfirm:C,onCancel:T}),pick$1(r,pickerToolbarSlots))};watch(m,F=>{F.forEach((k,V)=>{k.length&&!isOptionExist(k,o.value[V],c.value)&&A(V,getFirstEnabledOption(k)[c.value.value])})},{immediate:!0});let I;return watch(()=>i.modelValue,F=>{!isSameValue(F,o.value)&&!isSameValue(F,I)&&(o.value=F.slice(0),I=F.slice(0))},{deep:!0}),watch(o,F=>{isSameValue(F,i.modelValue)||(I=F.slice(0),e("update:modelValue",I))},{immediate:!0}),useEventListener$1("touchmove",preventDefault,{target:s}),useExpose({confirm:C,getSelectedOptions:()=>b.value}),()=>{var F,k;return createVNode("div",{class:bem$v()},[i.toolbarPosition==="top"?N():null,i.loading?createVNode(Loading$2,{class:bem$v("loading")},null):null,(F=r["columns-top"])==null?void 0:F.call(r),M(),(k=r["columns-bottom"])==null?void 0:k.call(r),i.toolbarPosition==="bottom"?N():null])}}});const Picker=withInstall(stdin_default$q),[name$m,bem$l]=createNamespace$1("cell"),cellSharedProps={tag:makeStringProp("div"),icon:String,size:String,title:numericProp,value:numericProp,label:numericProp,center:Boolean,isLink:Boolean,border:truthProp,required:Boolean,iconPrefix:String,valueClass:unknownProp,labelClass:unknownProp,titleClass:unknownProp,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}},cellProps=extend$2({},cellSharedProps,routeProps);var stdin_default$p=defineComponent({name:name$m,props:cellProps,setup(i,{slots:e}){const r=useRoute(),s=()=>{if(e.label||isDef$1(i.label))return createVNode("div",{class:[bem$l("label"),i.labelClass]},[e.label?e.label():i.label])},o=()=>{var c;if(e.title||isDef$1(i.title)){const d=(c=e.title)==null?void 0:c.call(e);return Array.isArray(d)&&d.length===0?void 0:createVNode("div",{class:[bem$l("title"),i.titleClass],style:i.titleStyle},[d||createVNode("span",null,[i.title]),s()])}},a=()=>{const c=e.value||e.default;if(c||isDef$1(i.value))return createVNode("div",{class:[bem$l("value"),i.valueClass]},[c?c():createVNode("span",null,[i.value])])},l=()=>{if(e.icon)return e.icon();if(i.icon)return createVNode(Icon$1,{name:i.icon,class:bem$l("left-icon"),classPrefix:i.iconPrefix},null)},u=()=>{if(e["right-icon"])return e["right-icon"]();if(i.isLink){const c=i.arrowDirection&&i.arrowDirection!=="right"?`arrow-${i.arrowDirection}`:"arrow";return createVNode(Icon$1,{name:c,class:bem$l("right-icon")},null)}};return()=>{var c;const{tag:d,size:g,center:m,border:y,isLink:b,required:S}=i,A=(c=i.clickable)!=null?c:b,E={center:m,required:S,clickable:A,borderless:!y};return g&&(E[g]=!!g),createVNode(d,{class:bem$l(E),role:A?"button":void 0,tabindex:A?0:void 0,onClick:r},{default:()=>{var x;return[l(),o(),a(),u(),(x=e.extra)==null?void 0:x.call(e)]}})}}});const Cell=withInstall(stdin_default$p);function isEmptyValue(i){return Array.isArray(i)?!i.length:i===0?!1:!i}function runSyncRule(i,e){if(isEmptyValue(i)){if(e.required)return!1;if(e.validateEmpty===!1)return!0}return!(e.pattern&&!e.pattern.test(String(i)))}function runRuleValidator(i,e){return new Promise(r=>{const s=e.validator(i,e);if(isPromise(s)){s.then(r);return}r(s)})}function getRuleMessage(i,e){const{message:r}=e;return isFunction$5(r)?r(i,e):r||""}function startComposing({target:i}){i.composing=!0}function endComposing({target:i}){i.composing&&(i.composing=!1,i.dispatchEvent(new Event("input")))}function resizeTextarea(i,e){const r=getRootScrollTop();i.style.height="auto";let s=i.scrollHeight;if(isObject$4(e)){const{maxHeight:o,minHeight:a}=e;o!==void 0&&(s=Math.min(s,o)),a!==void 0&&(s=Math.max(s,a))}s&&(i.style.height=`${s}px`,setRootScrollTop(r))}function mapInputType(i){return i==="number"?{type:"text",inputmode:"decimal"}:i==="digit"?{type:"tel",inputmode:"numeric"}:{type:i}}function getStringLength(i){return[...i].length}function cutString(i,e){return[...i].slice(0,e).join("")}const[name$l,bem$k]=createNamespace$1("field"),fieldSharedProps={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:numericProp,formatter:Function,clearIcon:makeStringProp("clear"),modelValue:makeNumericProp(""),inputAlign:String,placeholder:String,autocomplete:String,errorMessage:String,enterkeyhint:String,clearTrigger:makeStringProp("focus"),formatTrigger:makeStringProp("onChange"),error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null}},fieldProps=extend$2({},cellSharedProps,fieldSharedProps,{rows:numericProp,type:makeStringProp("text"),rules:Array,autosize:[Boolean,Object],labelWidth:numericProp,labelClass:unknownProp,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}});var stdin_default$o=defineComponent({name:name$l,props:fieldProps,emits:["blur","focus","clear","keypress","clickInput","endValidate","startValidate","clickLeftIcon","clickRightIcon","update:modelValue"],setup(i,{emit:e,slots:r}){const s=useId(),o=reactive({status:"unvalidated",focused:!1,validateMessage:""}),a=ref(),l=ref(),u=ref(),{parent:c}=useParent$1(FORM_KEY),d=()=>{var Q;return String((Q=i.modelValue)!=null?Q:"")},g=Q=>{if(isDef$1(i[Q]))return i[Q];if(c&&isDef$1(c.props[Q]))return c.props[Q]},m=computed(()=>{const Q=g("readonly");if(i.clearable&&!Q){const he=d()!=="",ge=i.clearTrigger==="always"||i.clearTrigger==="focus"&&o.focused;return he&&ge}return!1}),y=computed(()=>u.value&&r.input?u.value():i.modelValue),b=Q=>Q.reduce((he,ge)=>he.then(()=>{if(o.status==="failed")return;let{value:Se}=y;if(ge.formatter&&(Se=ge.formatter(Se,ge)),!runSyncRule(Se,ge)){o.status="failed",o.validateMessage=getRuleMessage(Se,ge);return}if(ge.validator)return isEmptyValue(Se)&&ge.validateEmpty===!1?void 0:runRuleValidator(Se,ge).then(Ie=>{Ie&&typeof Ie=="string"?(o.status="failed",o.validateMessage=Ie):Ie===!1&&(o.status="failed",o.validateMessage=getRuleMessage(Se,ge))})}),Promise.resolve()),S=()=>{o.status="unvalidated",o.validateMessage=""},A=()=>e("endValidate",{status:o.status,message:o.validateMessage}),E=(Q=i.rules)=>new Promise(he=>{S(),Q?(e("startValidate"),b(Q).then(()=>{o.status==="failed"?(he({name:i.name,message:o.validateMessage}),A()):(o.status="passed",he(),A())})):he()}),x=Q=>{if(c&&i.rules){const{validateTrigger:he}=c.props,ge=toArray(he).includes(Q),Se=i.rules.filter(Ie=>Ie.trigger?toArray(Ie.trigger).includes(Q):ge);Se.length&&E(Se)}},P=Q=>{var he;const{maxlength:ge}=i;if(isDef$1(ge)&&getStringLength(Q)>+ge){const Se=d();if(Se&&getStringLength(Se)===+ge)return Se;const Ie=(he=a.value)==null?void 0:he.selectionEnd;if(o.focused&&Ie){const Me=[...Q],te=Me.length-+ge;return Me.splice(Ie-te,te),Me.join("")}return cutString(Q,+ge)}return Q},C=(Q,he="onChange")=>{const ge=Q;Q=P(Q);const Se=getStringLength(ge)-getStringLength(Q);if(i.type==="number"||i.type==="digit"){const Me=i.type==="number";Q=formatNumber(Q,Me,Me)}let Ie=0;if(i.formatter&&he===i.formatTrigger){const{formatter:Me,maxlength:te}=i;if(Q=Me(Q),isDef$1(te)&&getStringLength(Q)>+te&&(Q=cutString(Q,+te)),a.value&&o.focused){const{selectionEnd:oe}=a.value,z=cutString(ge,oe);Ie=getStringLength(Me(z))-getStringLength(z)}}if(a.value&&a.value.value!==Q)if(o.focused){let{selectionStart:Me,selectionEnd:te}=a.value;if(a.value.value=Q,isDef$1(Me)&&isDef$1(te)){const oe=getStringLength(Q);Se?(Me-=Se,te-=Se):Ie&&(Me+=Ie,te+=Ie),a.value.setSelectionRange(Math.min(Me,oe),Math.min(te,oe))}}else a.value.value=Q;Q!==i.modelValue&&e("update:modelValue",Q)},T=Q=>{Q.target.composing||C(Q.target.value)},_=()=>{var Q;return(Q=a.value)==null?void 0:Q.blur()},B=()=>{var Q;return(Q=a.value)==null?void 0:Q.focus()},M=()=>{const Q=a.value;i.type==="textarea"&&i.autosize&&Q&&resizeTextarea(Q,i.autosize)},N=Q=>{o.focused=!0,e("focus",Q),nextTick(M),g("readonly")&&_()},I=Q=>{o.focused=!1,C(d(),"onBlur"),e("blur",Q),!g("readonly")&&(x("onBlur"),nextTick(M),resetScroll())},R=Q=>e("clickInput",Q),F=Q=>e("clickLeftIcon",Q),k=Q=>e("clickRightIcon",Q),V=Q=>{preventDefault(Q),e("update:modelValue",""),e("clear",Q)},D=computed(()=>{if(typeof i.error=="boolean")return i.error;if(c&&c.props.showError&&o.status==="failed")return!0}),$=computed(()=>{const Q=g("labelWidth"),he=g("labelAlign");if(Q&&he!=="top")return{width:addUnit(Q)}}),O=Q=>{Q.keyCode===13&&(!(c&&c.props.submitOnEnter)&&i.type!=="textarea"&&preventDefault(Q),i.type==="search"&&_()),e("keypress",Q)},q=()=>i.id||`${s}-input`,G=()=>o.status,U=()=>{const Q=bem$k("control",[g("inputAlign"),{error:D.value,custom:!!r.input,"min-height":i.type==="textarea"&&!i.autosize}]);if(r.input)return createVNode("div",{class:Q,onClick:R},[r.input()]);const he={id:q(),ref:a,name:i.name,rows:i.rows!==void 0?+i.rows:void 0,class:Q,disabled:g("disabled"),readonly:g("readonly"),autofocus:i.autofocus,placeholder:i.placeholder,autocomplete:i.autocomplete,enterkeyhint:i.enterkeyhint,"aria-labelledby":i.label?`${s}-label`:void 0,onBlur:I,onFocus:N,onInput:T,onClick:R,onChange:endComposing,onKeypress:O,onCompositionend:endComposing,onCompositionstart:startComposing};return i.type==="textarea"?createVNode("textarea",he,null):createVNode("input",mergeProps(mapInputType(i.type),he),null)},Z=()=>{const Q=r["left-icon"];if(i.leftIcon||Q)return createVNode("div",{class:bem$k("left-icon"),onClick:F},[Q?Q():createVNode(Icon$1,{name:i.leftIcon,classPrefix:i.iconPrefix},null)])},W=()=>{const Q=r["right-icon"];if(i.rightIcon||Q)return createVNode("div",{class:bem$k("right-icon"),onClick:k},[Q?Q():createVNode(Icon$1,{name:i.rightIcon,classPrefix:i.iconPrefix},null)])},K=()=>{if(i.showWordLimit&&i.maxlength){const Q=getStringLength(d());return createVNode("div",{class:bem$k("word-limit")},[createVNode("span",{class:bem$k("word-num")},[Q]),createTextVNode("/"),i.maxlength])}},ye=()=>{if(c&&c.props.showErrorMessage===!1)return;const Q=i.errorMessage||o.validateMessage;if(Q){const he=r["error-message"],ge=g("errorMessageAlign");return createVNode("div",{class:bem$k("error-message",ge)},[he?he({message:Q}):Q])}},ae=()=>{const Q=g("labelWidth"),he=g("labelAlign"),ge=g("colon")?":":"";if(r.label)return[r.label(),ge];if(i.label)return createVNode("label",{id:`${s}-label`,for:q(),style:he==="top"&&Q?{width:addUnit(Q)}:void 0},[i.label+ge])},Y=()=>[createVNode("div",{class:bem$k("body")},[U(),m.value&&createVNode(Icon$1,{ref:l,name:i.clearIcon,class:bem$k("clear")},null),W(),r.button&&createVNode("div",{class:bem$k("button")},[r.button()])]),K(),ye()];return useExpose({blur:_,focus:B,validate:E,formValue:y,resetValidation:S,getValidationStatus:G}),provide(CUSTOM_FIELD_INJECTION_KEY,{customValue:u,resetValidation:S,validateWithTrigger:x}),watch(()=>i.modelValue,()=>{C(d()),S(),x("onChange"),nextTick(M)}),onMounted(()=>{C(d(),i.formatTrigger),nextTick(M)}),useEventListener$1("touchstart",V,{target:computed(()=>{var Q;return(Q=l.value)==null?void 0:Q.$el})}),()=>{const Q=g("disabled"),he=g("labelAlign"),ge=Z(),Se=()=>{const Ie=ae();return he==="top"?[ge,Ie].filter(Boolean):Ie||[]};return createVNode(Cell,{size:i.size,class:bem$k({error:D.value,disabled:Q,[`label-${he}`]:he}),center:i.center,border:i.border,isLink:i.isLink,clickable:i.clickable,titleStyle:$.value,valueClass:bem$k("value"),titleClass:[bem$k("label",[he,{required:i.required}]),i.labelClass],arrowDirection:i.arrowDirection},{icon:ge&&he!=="top"?()=>ge:null,title:Se,value:Y,extra:r.extra})}}});const Field=withInstall(stdin_default$o);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$k,bem$j]=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$n=defineComponent({name:name$k,props:toastProps,emits:["update:show"],setup(i,{emit:e,slots:r}){let s,o=!1;const a=()=>{const m=i.show&&i.forbidClick;o!==m&&(o=m,lockClick(o))},l=m=>e("update:show",m),u=()=>{i.closeOnClick&&l(!1)},c=()=>clearTimeout(s),d=()=>{const{icon:m,type:y,iconSize:b,iconPrefix:S,loadingType:A}=i;if(m||y==="success"||y==="fail")return createVNode(Icon$1,{name:m||y,size:b,class:bem$j("icon"),classPrefix:S},null);if(y==="loading")return createVNode(Loading$2,{class:bem$j("loading"),size:b,type:A},null)},g=()=>{const{type:m,message:y}=i;if(r.message)return createVNode("div",{class:bem$j("text")},[r.message()]);if(isDef$1(y)&&y!=="")return m==="html"?createVNode("div",{key:0,class:bem$j("text"),innerHTML:String(y)},null):createVNode("div",{class:bem$j("text")},[y])};return watch(()=>[i.show,i.forbidClick],a),watch(()=>[i.show,i.type,i.message,i.duration],()=>{c(),i.show&&i.duration>0&&(s=setTimeout(()=>{l(!1)},i.duration))}),onMounted(a),onUnmounted(a),()=>createVNode(Popup,mergeProps({class:[bem$j([i.position,i.wordBreak==="normal"?"break-normal":i.wordBreak,{[i.type]:!i.icon}]),i.className],lockScroll:!1,onClick:u,onClosed:c,"onUpdate:show":l},pick$1(i,popupInheritProps)),{default:()=>[d(),g()]})}});function usePopupState(){const i=reactive({show:!1}),e=o=>{i.show=o},r=o=>{extend$2(i,o,{transitionAppear:!0}),e(!0)},s=()=>e(!1);return useExpose({open:r,close:s,toggle:e}),{open:r,close:s,state:i,toggle:e}}function mountComponent(i){const e=createApp(i),r=document.createElement("div");return document.body.appendChild(r),{instance:e.mount(r),unmount(){e.unmount(),document.body.removeChild(r)}}}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$1=extend$2({},defaultOptions$1);const defaultOptionsMap=new Map;function parseOptions(i){return isObject$4(i)?i:{message:i}}function createInstance(){const{instance:i,unmount:e}=mountComponent({setup(){const r=ref(""),{open:s,state:o,close:a,toggle:l}=usePopupState(),u=()=>{},c=()=>createVNode(stdin_default$n,mergeProps(o,{onClosed:u,"onUpdate:show":l}),null);return watch(r,d=>{o.message=d}),getCurrentInstance().render=c,{open:s,close:a,message:r}}});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(),r=parseOptions(i);return e.open(extend$2({},currentOptions$1,defaultOptionsMap.get(r.type||currentOptions$1.type),r)),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$n);const[name$j,bem$i]=createNamespace$1("switch"),switchProps={size:numericProp,loading:Boolean,disabled:Boolean,modelValue:unknownProp,activeColor:String,inactiveColor:String,activeValue:{type:unknownProp,default:!0},inactiveValue:{type:unknownProp,default:!1}};var stdin_default$m=defineComponent({name:name$j,props:switchProps,emits:["change","update:modelValue"],setup(i,{emit:e,slots:r}){const s=()=>i.modelValue===i.activeValue,o=()=>{if(!i.disabled&&!i.loading){const l=s()?i.inactiveValue:i.activeValue;e("update:modelValue",l),e("change",l)}},a=()=>{if(i.loading){const l=s()?i.activeColor:i.inactiveColor;return createVNode(Loading$2,{class:bem$i("loading"),color:l},null)}if(r.node)return r.node()};return useCustomFieldValue(()=>i.modelValue),()=>{var l;const{size:u,loading:c,disabled:d,activeColor:g,inactiveColor:m}=i,y=s(),b={fontSize:addUnit(u),backgroundColor:y?g:m};return createVNode("div",{role:"switch",class:bem$i({on:y,loading:c,disabled:d}),style:b,tabindex:d?void 0:0,"aria-checked":y,onClick:o},[createVNode("div",{class:bem$i("node")},[a()]),(l=r.background)==null?void 0:l.call(r)])}}});const Switch$1=withInstall(stdin_default$m),[name$i,bem$h]=createNamespace$1("image"),imageProps={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:numericProp,height:numericProp,radius:numericProp,lazyLoad:Boolean,iconSize:numericProp,showError:truthProp,errorIcon:makeStringProp("photo-fail"),iconPrefix:String,showLoading:truthProp,loadingIcon:makeStringProp("photo")};var stdin_default$l=defineComponent({name:name$i,props:imageProps,emits:["load","error"],setup(i,{emit:e,slots:r}){const s=ref(!1),o=ref(!0),a=ref(),{$Lazyload:l}=getCurrentInstance().proxy,u=computed(()=>{const E={width:addUnit(i.width),height:addUnit(i.height)};return isDef$1(i.radius)&&(E.overflow="hidden",E.borderRadius=addUnit(i.radius)),E});watch(()=>i.src,()=>{s.value=!1,o.value=!0});const c=E=>{o.value&&(o.value=!1,e("load",E))},d=()=>{const E=new Event("load");Object.defineProperty(E,"target",{value:a.value,enumerable:!0}),c(E)},g=E=>{s.value=!0,o.value=!1,e("error",E)},m=(E,x,P)=>P?P():createVNode(Icon$1,{name:E,size:i.iconSize,class:x,classPrefix:i.iconPrefix},null),y=()=>{if(o.value&&i.showLoading)return createVNode("div",{class:bem$h("loading")},[m(i.loadingIcon,bem$h("loading-icon"),r.loading)]);if(s.value&&i.showError)return createVNode("div",{class:bem$h("error")},[m(i.errorIcon,bem$h("error-icon"),r.error)])},b=()=>{if(s.value||!i.src)return;const E={alt:i.alt,class:bem$h("img"),style:{objectFit:i.fit,objectPosition:i.position}};return i.lazyLoad?withDirectives(createVNode("img",mergeProps({ref:a},E),null),[[resolveDirective("lazy"),i.src]]):createVNode("img",mergeProps({ref:a,src:i.src,onLoad:c,onError:g},E),null)},S=({el:E})=>{const x=()=>{E===a.value&&o.value&&d()};a.value?x():nextTick(x)},A=({el:E})=>{E===a.value&&!s.value&&g()};return l&&inBrowser$2&&(l.$on("loaded",S),l.$on("error",A),onBeforeUnmount(()=>{l.$off("loaded",S),l.$off("error",A)})),onMounted(()=>{nextTick(()=>{var E;(E=a.value)!=null&&E.complete&&d()})}),()=>{var E;return createVNode("div",{class:bem$h({round:i.round,block:i.block}),style:u.value},[b(),y(),(E=r.default)==null?void 0:E.call(r)])}}});const Image$1=withInstall(stdin_default$l),[name$h,bem$g]=createNamespace$1("circle");let uid=0;const format=i=>Math.min(Math.max(+i,0),100);function getPath(i,e){const r=i?1:0;return`M ${e/2} ${e/2} m 0, -500 a 500, 500 0 1, ${r} 0, 1000 a 500, 500 0 1, ${r} 0, -1000`}const circleProps={text:String,size:numericProp,fill:makeStringProp("none"),rate:makeNumericProp(100),speed:makeNumericProp(0),color:[String,Object],clockwise:truthProp,layerColor:String,currentRate:makeNumberProp(0),strokeWidth:makeNumericProp(40),strokeLinecap:String,startPosition:makeStringProp("top")};var stdin_default$k=defineComponent({name:name$h,props:circleProps,emits:["update:currentRate"],setup(i,{emit:e,slots:r}){const s=`van-circle-${uid++}`,o=computed(()=>+i.strokeWidth+1e3),a=computed(()=>getPath(i.clockwise,o.value)),l=computed(()=>{const y={top:0,right:90,bottom:180,left:270}[i.startPosition];if(y)return{transform:`rotate(${y}deg)`}});watch(()=>i.rate,m=>{let y;const b=Date.now(),S=i.currentRate,A=format(m),E=Math.abs((S-A)*1e3/+i.speed),x=()=>{const P=Date.now(),T=Math.min((P-b)/E,1)*(A-S)+S;e("update:currentRate",format(parseFloat(T.toFixed(1)))),(A>S?TA)&&(y=raf(x))};i.speed?(y&&cancelRaf(y),y=raf(x)):e("update:currentRate",A)},{immediate:!0});const u=()=>{const{strokeWidth:y,currentRate:b,strokeLinecap:S}=i,A=3140*b/100,E=isObject$4(i.color)?`url(#${s})`:i.color,x={stroke:E,strokeWidth:`${+y+1}px`,strokeLinecap:S,strokeDasharray:`${A}px 3140px`};return createVNode("path",{d:a.value,style:x,class:bem$g("hover"),stroke:E},null)},c=()=>{const m={fill:i.fill,stroke:i.layerColor,strokeWidth:`${i.strokeWidth}px`};return createVNode("path",{class:bem$g("layer"),style:m,d:a.value},null)},d=()=>{const{color:m}=i;if(!isObject$4(m))return;const y=Object.keys(m).sort((b,S)=>parseFloat(b)-parseFloat(S)).map((b,S)=>createVNode("stop",{key:S,offset:b,"stop-color":m[b]},null));return createVNode("defs",null,[createVNode("linearGradient",{id:s,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[y])])},g=()=>{if(r.default)return r.default();if(i.text)return createVNode("div",{class:bem$g("text")},[i.text])};return()=>createVNode("div",{class:bem$g(),style:getSizeStyle(i.size)},[createVNode("svg",{viewBox:`0 0 ${o.value} ${o.value}`,style:l.value},[d(),c(),u()]),g()])}});const Circle=withInstall(stdin_default$k),[name$g,bem$f]=createNamespace$1("empty"),emptyProps={image:makeStringProp("default"),imageSize:[Number,String,Array],description:String};var stdin_default$j=defineComponent({name:name$g,props:emptyProps,setup(i,{slots:e}){const r=()=>{const x=e.description?e.description():i.description;if(x)return createVNode("p",{class:bem$f("description")},[x])},s=()=>{if(e.default)return createVNode("div",{class:bem$f("bottom")},[e.default()])},o=useId(),a=x=>`${o}-${x}`,l=x=>`url(#${a(x)})`,u=(x,P,C)=>createVNode("stop",{"stop-color":x,offset:`${P}%`,"stop-opacity":C},null),c=(x,P)=>[u(x,0),u(P,100)],d=x=>[createVNode("defs",null,[createVNode("radialGradient",{id:a(x),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)"},[u("#EBEDF0",0),u("#F2F3F5",100,.3)])]),createVNode("ellipse",{fill:l(x),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],g=()=>[createVNode("defs",null,[createVNode("linearGradient",{id:a("a"),x1:"64%",y1:"100%",x2:"64%"},[u("#FFF",0,.5),u("#F2F3F5",100)])]),createVNode("g",{opacity:".8"},[createVNode("path",{d:"M36 131V53H16v20H2v58h34z",fill:l("a")},null),createVNode("path",{d:"M123 15h22v14h9v77h-31V15z",fill:l("a")},null)])],m=()=>[createVNode("defs",null,[createVNode("linearGradient",{id:a("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%"},[u("#F2F3F5",0,.3),u("#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:l("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:l("b")},null)])],y=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{id:a(1),x1:"64%",y1:"100%",x2:"64%"},[u("#FFF",0,.5),u("#F2F3F5",100)]),createVNode("linearGradient",{id:a(2),x1:"50%",x2:"50%",y2:"84%"},[u("#EBEDF0",0),u("#DCDEE0",100,0)]),createVNode("linearGradient",{id:a(3),x1:"100%",x2:"100%",y2:"100%"},[c("#EAEDF0","#DCDEE0")]),createVNode("radialGradient",{id:a(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[u("#EBEDF0",0),u("#FFF",100,0)])]),createVNode("g",{fill:"none"},[g(),createVNode("path",{fill:l(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:l(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:l(3)},null),createVNode("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:l(3)},null),createVNode("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:l(3)},null),createVNode("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:l(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:a(5)},[c("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:a(6)},[c("#EAEDF1","#DCDEE0")]),createVNode("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:a(7)},[c("#EAEDF1","#DCDEE0")])]),g(),m(),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:l(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:l(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:l(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)])]),S=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:a(8)},[c("#EAEDF1","#DCDEE0")])]),g(),m(),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:l(8)},null)]),A=()=>createVNode("svg",{viewBox:"0 0 160 160"},[createVNode("defs",null,[createVNode("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:a(9)},[c("#EEE","#D8D8D8")]),createVNode("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:a(10)},[c("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:a(11)},[c("#F2F3F5","#DCDEE0")]),createVNode("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:a(12)},[c("#FFF","#F7F8FA")])]),g(),m(),d("d"),createVNode("g",{transform:"rotate(-45 113 -4)",fill:"none"},[createVNode("rect",{fill:l(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),createVNode("rect",{fill:l(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),createVNode("circle",{stroke:l(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),createVNode("circle",{fill:l(12),cx:"27",cy:"27",r:"16"},null),createVNode("path",{d:"M37 7c-8 0-15 5-16 12",stroke:l(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),E=()=>{var x;if(e.image)return e.image();const P={error:S,search:A,network:y,default:b};return((x=P[i.image])==null?void 0:x.call(P))||createVNode("img",{src:i.image},null)};return()=>createVNode("div",{class:bem$f()},[createVNode("div",{class:bem$f("image"),style:getSizeStyle(i.imageSize)},[E()]),r(),s()])}});const Empty=withInstall(stdin_default$j),[name$f,bem$e,t$2]=createNamespace$1("dialog"),dialogProps=extend$2({},popupSharedProps,{title:String,theme:String,width:numericProp,message:[String,Function],callback:Function,allowHtml:Boolean,className:unknownProp,transition:makeStringProp("van-dialog-bounce"),messageAlign:String,closeOnPopstate:truthProp,showCancelButton:Boolean,cancelButtonText:String,cancelButtonColor:String,cancelButtonDisabled:Boolean,confirmButtonText:String,confirmButtonColor:String,confirmButtonDisabled:Boolean,showConfirmButton:truthProp,closeOnClickOverlay:Boolean}),popupInheritKeys=[...popupSharedPropKeys,"transition","closeOnPopstate"];var stdin_default$i=defineComponent({name:name$f,props:dialogProps,emits:["confirm","cancel","keydown","update:show"],setup(i,{emit:e,slots:r}){const s=ref(),o=reactive({confirm:!1,cancel:!1}),a=x=>e("update:show",x),l=x=>{var P;a(!1),(P=i.callback)==null||P.call(i,x)},u=x=>()=>{i.show&&(e(x),i.beforeClose?(o[x]=!0,callInterceptor(i.beforeClose,{args:[x],done(){l(x),o[x]=!1},canceled(){o[x]=!1}})):l(x))},c=u("cancel"),d=u("confirm"),g=withKeys(x=>{var P,C;if(x.target!==((C=(P=s.value)==null?void 0:P.popupRef)==null?void 0:C.value))return;({Enter:i.showConfirmButton?d:noop$1,Escape:i.showCancelButton?c:noop$1})[x.key](),e("keydown",x)},["enter","esc"]),m=()=>{const x=r.title?r.title():i.title;if(x)return createVNode("div",{class:bem$e("header",{isolated:!i.message&&!r.default})},[x])},y=x=>{const{message:P,allowHtml:C,messageAlign:T}=i,_=bem$e("message",{"has-title":x,[T]:T}),B=isFunction$5(P)?P():P;return C&&typeof B=="string"?createVNode("div",{class:_,innerHTML:B},null):createVNode("div",{class:_},[B])},b=()=>{if(r.default)return createVNode("div",{class:bem$e("content")},[r.default()]);const{title:x,message:P,allowHtml:C}=i;if(P){const T=!!(x||r.title);return createVNode("div",{key:C?1:0,class:bem$e("content",{isolated:!T})},[y(T)])}},S=()=>createVNode("div",{class:[BORDER_TOP,bem$e("footer")]},[i.showCancelButton&&createVNode(Button$1,{size:"large",text:i.cancelButtonText||t$2("cancel"),class:bem$e("cancel"),style:{color:i.cancelButtonColor},loading:o.cancel,disabled:i.cancelButtonDisabled,onClick:c},null),i.showConfirmButton&&createVNode(Button$1,{size:"large",text:i.confirmButtonText||t$2("confirm"),class:[bem$e("confirm"),{[BORDER_LEFT]:i.showCancelButton}],style:{color:i.confirmButtonColor},loading:o.confirm,disabled:i.confirmButtonDisabled,onClick:d},null)]),A=()=>createVNode(ActionBar,{class:bem$e("footer")},{default:()=>[i.showCancelButton&&createVNode(ActionBarButton,{type:"warning",text:i.cancelButtonText||t$2("cancel"),class:bem$e("cancel"),color:i.cancelButtonColor,loading:o.cancel,disabled:i.cancelButtonDisabled,onClick:c},null),i.showConfirmButton&&createVNode(ActionBarButton,{type:"danger",text:i.confirmButtonText||t$2("confirm"),class:bem$e("confirm"),color:i.confirmButtonColor,loading:o.confirm,disabled:i.confirmButtonDisabled,onClick:d},null)]}),E=()=>r.footer?r.footer():i.theme==="round-button"?A():S();return()=>{const{width:x,title:P,theme:C,message:T,className:_}=i;return createVNode(Popup,mergeProps({ref:s,role:"dialog",class:[bem$e([C]),_],style:{width:addUnit(x)},tabindex:0,"aria-labelledby":P||T,onKeydown:g,"onUpdate:show":a},pick$1(i,popupInheritKeys)),{default:()=>[m(),b(),E()]})}}});let instance$2;const DEFAULT_OPTIONS={title:"",width:"",theme:null,message:"",overlay:!0,callback:null,teleport:"body",className:"",allowHtml:!1,lockScroll:!0,transition:void 0,beforeClose:null,overlayClass:"",overlayStyle:void 0,messageAlign:"",cancelButtonText:"",cancelButtonColor:null,cancelButtonDisabled:!1,confirmButtonText:"",confirmButtonColor:null,confirmButtonDisabled:!1,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1};let currentOptions=extend$2({},DEFAULT_OPTIONS);function initInstance$1(){({instance:instance$2}=mountComponent({setup(){const{state:e,toggle:r}=usePopupState();return()=>createVNode(stdin_default$i,mergeProps(e,{"onUpdate:show":r}),null)}}))}function showDialog(i){return inBrowser$2?new Promise((e,r)=>{instance$2||initInstance$1(),instance$2.open(extend$2({},currentOptions,i,{callback:s=>{(s==="confirm"?e:r)(s)}}))}):Promise.resolve()}const showConfirmDialog=i=>showDialog(extend$2({showCancelButton:!0},i));withInstall(stdin_default$i);const[name$e,bem$d]=createNamespace$1("dropdown-menu"),dropdownMenuProps={overlay:truthProp,zIndex:numericProp,duration:makeNumericProp(.2),direction:makeStringProp("down"),activeColor:String,closeOnClickOutside:truthProp,closeOnClickOverlay:truthProp},DROPDOWN_KEY=Symbol(name$e);var stdin_default$h=defineComponent({name:name$e,props:dropdownMenuProps,setup(i,{slots:e}){const r=useId(),s=ref(),o=ref(),a=ref(0),{children:l,linkChildren:u}=useChildren$1(DROPDOWN_KEY),c=useScrollParent(s),d=computed(()=>l.some(E=>E.state.showWrapper)),g=computed(()=>{if(d.value&&isDef$1(i.zIndex))return{zIndex:+i.zIndex+1}}),m=()=>{i.closeOnClickOutside&&l.forEach(E=>{E.toggle(!1)})},y=()=>{if(o.value){const E=useRect(o);i.direction==="down"?a.value=E.bottom:a.value=windowHeight.value-E.top}},b=()=>{d.value&&y()},S=E=>{l.forEach((x,P)=>{P===E?x.toggle():x.state.showPopup&&x.toggle(!1,{immediate:!0})})},A=(E,x)=>{const{showPopup:P}=E.state,{disabled:C,titleClass:T}=E;return createVNode("div",{id:`${r}-${x}`,role:"button",tabindex:C?void 0:0,class:[bem$d("item",{disabled:C}),{[HAPTICS_FEEDBACK]:!C}],onClick:()=>{C||S(x)}},[createVNode("span",{class:[bem$d("title",{down:P===(i.direction==="down"),active:P}),T],style:{color:P?i.activeColor:""}},[createVNode("div",{class:"van-ellipsis"},[E.renderTitle()])])])};return u({id:r,props:i,offset:a,updateOffset:y}),useClickAway(s,m),useEventListener$1("scroll",b,{target:c,passive:!0}),()=>{var E;return createVNode("div",{ref:s,class:bem$d()},[createVNode("div",{ref:o,style:g.value,class:bem$d("bar",{opened:d.value})},[l.map(A)]),(E=e.default)==null?void 0:E.call(e)])}}});const[name$d,bem$c]=createNamespace$1("dropdown-item"),dropdownItemProps={title:String,options:makeArrayProp(),disabled:Boolean,teleport:[String,Object],lazyRender:truthProp,modelValue:unknownProp,titleClass:unknownProp};var stdin_default$g=defineComponent({name:name$d,inheritAttrs:!1,props:dropdownItemProps,emits:["open","opened","close","closed","change","update:modelValue"],setup(i,{emit:e,slots:r,attrs:s}){const o=reactive({showPopup:!1,transition:!0,showWrapper:!1}),{parent:a,index:l}=useParent$1(DROPDOWN_KEY);if(!a)return;const u=x=>()=>e(x),c=u("open"),d=u("close"),g=u("opened"),m=()=>{o.showWrapper=!1,e("closed")},y=x=>{i.teleport&&x.stopPropagation()},b=(x=!o.showPopup,P={})=>{x!==o.showPopup&&(o.showPopup=x,o.transition=!P.immediate,x&&(a.updateOffset(),o.showWrapper=!0))},S=()=>{if(r.title)return r.title();if(i.title)return i.title;const x=i.options.find(P=>P.value===i.modelValue);return x?x.text:""},A=x=>{const{activeColor:P}=a.props,C=x.value===i.modelValue,T=()=>{o.showPopup=!1,x.value!==i.modelValue&&(e("update:modelValue",x.value),e("change",x.value))},_=()=>{if(C)return createVNode(Icon$1,{class:bem$c("icon"),color:P,name:"success"},null)};return createVNode(Cell,{role:"menuitem",key:x.value,icon:x.icon,title:x.text,class:bem$c("option",{active:C}),style:{color:C?P:""},tabindex:C?0:-1,clickable:!0,onClick:T},{value:_})},E=()=>{const{offset:x}=a,{zIndex:P,overlay:C,duration:T,direction:_,closeOnClickOverlay:B}=a.props,M=getZIndexStyle(P);return _==="down"?M.top=`${x.value}px`:M.bottom=`${x.value}px`,withDirectives(createVNode("div",mergeProps({style:M,class:bem$c([_]),onClick:y},s),[createVNode(Popup,{show:o.showPopup,"onUpdate:show":N=>o.showPopup=N,role:"menu",class:bem$c("content"),overlay:C,position:_==="down"?"top":"bottom",duration:o.transition?T:0,lazyRender:i.lazyRender,overlayStyle:{position:"absolute"},"aria-labelledby":`${a.id}-${l.value}`,closeOnClickOverlay:B,onOpen:c,onClose:d,onOpened:g,onClosed:m},{default:()=>{var N;return[i.options.map(A),(N=r.default)==null?void 0:N.call(r)]}})]),[[vShow,o.showWrapper]])};return useExpose({state:o,toggle:b,renderTitle:S}),()=>i.teleport?createVNode(Teleport,{to:i.teleport},{default:()=>[E()]}):E()}});const DropdownItem=withInstall(stdin_default$g),DropdownMenu=withInstall(stdin_default$h),getDistance=i=>Math.sqrt((i[0].clientX-i[1].clientX)**2+(i[0].clientY-i[1].clientY)**2),bem$b=createNamespace$1("image-preview")[1];var stdin_default$f=defineComponent({props:{src:String,show:Boolean,active:Number,minZoom:makeRequiredProp(numericProp),maxZoom:makeRequiredProp(numericProp),rootWidth:makeRequiredProp(Number),rootHeight:makeRequiredProp(Number),disableZoom:Boolean},emits:["scale","close","longPress"],setup(i,{emit:e,slots:r}){const s=reactive({scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,imageRatio:0,displayWidth:0,displayHeight:0}),o=useTouch(),a=ref(),l=computed(()=>{const{rootWidth:R,rootHeight:F}=i,k=F/R;return s.imageRatio>k}),u=computed(()=>{const{scale:R,moveX:F,moveY:k,moving:V,zooming:D}=s,$={transitionDuration:D||V?"0s":".3s"};if(R!==1){const O=F/R,q=k/R;$.transform=`scale(${R}, ${R}) translate(${O}px, ${q}px)`}return $}),c=computed(()=>{if(s.imageRatio){const{rootWidth:R,rootHeight:F}=i,k=l.value?F/s.imageRatio:R;return Math.max(0,(s.scale*k-R)/2)}return 0}),d=computed(()=>{if(s.imageRatio){const{rootWidth:R,rootHeight:F}=i,k=l.value?F:R*s.imageRatio;return Math.max(0,(s.scale*k-F)/2)}return 0}),g=R=>{R=clamp(R,+i.minZoom,+i.maxZoom+1),R!==s.scale&&(s.scale=R,e("scale",{scale:R,index:i.active}))},m=()=>{g(1),s.moveX=0,s.moveY=0},y=()=>{const R=s.scale>1?1:2;g(R),s.moveX=0,s.moveY=0};let b,S,A,E,x,P,C,T=!1;const _=R=>{const{touches:F}=R;if(b=F.length,b===2&&i.disableZoom)return;const{offsetX:k}=o;o.start(R),S=s.moveX,A=s.moveY,C=Date.now(),T=!1,s.moving=b===1&&s.scale!==1,s.zooming=b===2&&!k.value,s.zooming&&(E=s.scale,x=getDistance(R.touches))},B=R=>{const{touches:F}=R;if(o.move(R),s.moving){const{deltaX:k,deltaY:V}=o,D=k.value+S,$=V.value+A;if((D>c.value||D<-c.value)&&!T&&o.isHorizontal()){s.moving=!1;return}T=!0,preventDefault(R,!0),s.moveX=clamp(D,-c.value,c.value),s.moveY=clamp($,-d.value,d.value)}if(s.zooming&&(preventDefault(R,!0),F.length===2)){const k=getDistance(F),V=E*k/x;g(V)}},M=()=>{if(b>1)return;const{offsetX:R,offsetY:F}=o,k=Date.now()-C,V=250,D=5;R.value{e("close"),P=null},V):k>LONG_PRESS_START_TIME&&e("longPress"))},N=R=>{let F=!1;if((s.moving||s.zooming)&&(F=!0,s.moving&&S===s.moveX&&A===s.moveY&&(F=!1),!R.touches.length)){s.zooming&&(s.moveX=clamp(s.moveX,-c.value,c.value),s.moveY=clamp(s.moveY,-d.value,d.value),s.zooming=!1),s.moving=!1,S=0,A=0,E=1,s.scale<1&&m();const k=+i.maxZoom;s.scale>k&&(s.scale=k)}preventDefault(R,F),M(),o.reset()},I=R=>{const{naturalWidth:F,naturalHeight:k}=R.target;s.imageRatio=k/F};return watch(()=>i.active,m),watch(()=>i.show,R=>{R||m()}),useEventListener$1("touchmove",B,{target:computed(()=>{var R;return(R=a.value)==null?void 0:R.$el})}),()=>{const R={loading:()=>createVNode(Loading$2,{type:"spinner"},null)};return createVNode(SwipeItem,{ref:a,class:bem$b("swipe-item"),onTouchstartPassive:_,onTouchend:N,onTouchcancel:N},{default:()=>[r.image?createVNode("div",{class:bem$b("image-wrap")},[r.image({src:i.src})]):createVNode(Image$1,{src:i.src,fit:"contain",class:bem$b("image",{vertical:l.value}),style:u.value,onLoad:I},R)]})}}});const[name$c,bem$a]=createNamespace$1("image-preview"),popupProps=["show","teleport","transition","overlayStyle","closeOnPopstate"],imagePreviewProps={show:Boolean,loop:truthProp,images:makeArrayProp(),minZoom:makeNumericProp(1/3),maxZoom:makeNumericProp(3),overlay:truthProp,closeable:Boolean,showIndex:truthProp,className:unknownProp,closeIcon:makeStringProp("clear"),transition:String,beforeClose:Function,overlayClass:unknownProp,overlayStyle:Object,swipeDuration:makeNumericProp(300),startPosition:makeNumericProp(0),showIndicators:Boolean,closeOnPopstate:truthProp,closeIconPosition:makeStringProp("top-right"),teleport:[String,Object]};var stdin_default$e=defineComponent({name:name$c,props:imagePreviewProps,emits:["scale","close","closed","change","longPress","update:show"],setup(i,{emit:e,slots:r}){const s=ref(),o=reactive({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),a=()=>{if(s.value){const P=useRect(s.value.$el);o.rootWidth=P.width,o.rootHeight=P.height,s.value.resize()}},l=P=>e("scale",P),u=P=>e("update:show",P),c=()=>{callInterceptor(i.beforeClose,{args:[o.active],done:()=>u(!1)})},d=P=>{P!==o.active&&(o.active=P,e("change",P))},g=()=>{if(i.showIndex)return createVNode("div",{class:bem$a("index")},[r.index?r.index({index:o.active}):`${o.active+1} / ${i.images.length}`])},m=()=>{if(r.cover)return createVNode("div",{class:bem$a("cover")},[r.cover()])},y=()=>{o.disableZoom=!0},b=()=>{o.disableZoom=!1},S=()=>createVNode(Swipe,{ref:s,lazyRender:!0,loop:i.loop,class:bem$a("swipe"),duration:i.swipeDuration,initialSwipe:i.startPosition,showIndicators:i.showIndicators,indicatorColor:"white",onChange:d,onDragEnd:b,onDragStart:y},{default:()=>[i.images.map((P,C)=>createVNode(stdin_default$f,{src:P,show:i.show,active:o.active,maxZoom:i.maxZoom,minZoom:i.minZoom,rootWidth:o.rootWidth,rootHeight:o.rootHeight,disableZoom:o.disableZoom,onScale:l,onClose:c,onLongPress:()=>e("longPress",{index:C})},{image:r.image}))]}),A=()=>{if(i.closeable)return createVNode(Icon$1,{role:"button",name:i.closeIcon,class:[bem$a("close-icon",i.closeIconPosition),HAPTICS_FEEDBACK],onClick:c},null)},E=()=>e("closed"),x=(P,C)=>{var T;return(T=s.value)==null?void 0:T.swipeTo(P,C)};return useExpose({swipeTo:x}),onMounted(a),watch([windowWidth,windowHeight],a),watch(()=>i.startPosition,P=>d(+P)),watch(()=>i.show,P=>{const{images:C,startPosition:T}=i;P?(d(+T),nextTick(()=>{a(),x(+T,{immediate:!0})})):e("close",{index:o.active,url:C[o.active]})}),()=>createVNode(Popup,mergeProps({class:[bem$a(),i.className],overlayClass:[bem$a("overlay"),i.overlayClass],onClosed:E,"onUpdate:show":u},pick$1(i,popupProps)),{default:()=>[A(),S(),g(),m()]})}});let instance$1;const defaultConfig={loop:!0,images:[],maxZoom:3,minZoom:1/3,onScale:void 0,onClose:void 0,onChange:void 0,teleport:"body",className:"",showIndex:!0,closeable:!1,closeIcon:"clear",transition:void 0,beforeClose:void 0,overlayStyle:void 0,overlayClass:void 0,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeIconPosition:"top-right"};function initInstance(){({instance:instance$1}=mountComponent({setup(){const{state:i,toggle:e}=usePopupState(),r=()=>{i.images=[]};return()=>createVNode(stdin_default$e,mergeProps(i,{onClosed:r,"onUpdate:show":e}),null)}}))}const showImagePreview=(i,e=0)=>{if(inBrowser$2)return instance$1||initInstance(),i=Array.isArray(i)?{images:i,startPosition:e}:i,instance$1.open(extend$2({},defaultConfig,i)),instance$1};withInstall(stdin_default$e);const[name$b,bem$9,t$1]=createNamespace$1("list"),listProps={error:Boolean,offset:makeNumericProp(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:makeStringProp("down"),loadingText:String,finishedText:String,immediateCheck:truthProp};var stdin_default$d=defineComponent({name:name$b,props:listProps,emits:["load","update:error","update:loading"],setup(i,{emit:e,slots:r}){const s=ref(i.loading),o=ref(),a=ref(),l=useTabStatus(),u=useScrollParent(o),c=()=>{nextTick(()=>{if(s.value||i.finished||i.disabled||i.error||(l==null?void 0:l.value)===!1)return;const{direction:b}=i,S=+i.offset,A=useRect(u);if(!A.height||isHidden(o))return;let E=!1;const x=useRect(a);b==="up"?E=A.top-x.top<=S:E=x.bottom-A.bottom<=S,E&&(s.value=!0,e("update:loading",!0),e("load"))})},d=()=>{if(i.finished){const b=r.finished?r.finished():i.finishedText;if(b)return createVNode("div",{class:bem$9("finished-text")},[b])}},g=()=>{e("update:error",!1),c()},m=()=>{if(i.error){const b=r.error?r.error():i.errorText;if(b)return createVNode("div",{role:"button",class:bem$9("error-text"),tabindex:0,onClick:g},[b])}},y=()=>{if(s.value&&!i.finished&&!i.disabled)return createVNode("div",{class:bem$9("loading")},[r.loading?r.loading():createVNode(Loading$2,{class:bem$9("loading-icon")},{default:()=>[i.loadingText||t$1("loading")]})])};return watch(()=>[i.loading,i.finished,i.error],c),l&&watch(l,b=>{b&&c()}),onUpdated(()=>{s.value=i.loading}),onMounted(()=>{i.immediateCheck&&c()}),useExpose({check:c}),useEventListener$1("scroll",c,{target:u,passive:!0}),()=>{var b;const S=(b=r.default)==null?void 0:b.call(r),A=createVNode("div",{ref:a,class:bem$9("placeholder")},null);return createVNode("div",{ref:o,role:"feed",class:bem$9(),"aria-busy":s.value},[i.direction==="down"?S:A,y(),d(),m(),i.direction==="up"?S:A])}}});const List$1=withInstall(stdin_default$d),[name$a,bem$8]=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$c=defineComponent({name:name$a,props:navBarProps,emits:["clickLeft","clickRight"],setup(i,{emit:e,slots:r}){const s=ref(),o=usePlaceholder(s,bem$8),a=g=>e("clickLeft",g),l=g=>e("clickRight",g),u=()=>r.left?r.left():[i.leftArrow&&createVNode(Icon$1,{class:bem$8("arrow"),name:"arrow-left"},null),i.leftText&&createVNode("span",{class:bem$8("text")},[i.leftText])],c=()=>r.right?r.right():createVNode("span",{class:bem$8("text")},[i.rightText]),d=()=>{const{title:g,fixed:m,border:y,zIndex:b}=i,S=getZIndexStyle(b),A=i.leftArrow||i.leftText||r.left,E=i.rightText||r.right;return createVNode("div",{ref:s,style:S,class:[bem$8({fixed:m}),{[BORDER_BOTTOM]:y,"van-safe-area-top":i.safeAreaInsetTop}]},[createVNode("div",{class:bem$8("content")},[A&&createVNode("div",{class:[bem$8("left"),i.clickable?HAPTICS_FEEDBACK:""],onClick:a},[u()]),createVNode("div",{class:[bem$8("title"),"van-ellipsis"]},[r.title?r.title():g]),E&&createVNode("div",{class:[bem$8("right"),i.clickable?HAPTICS_FEEDBACK:""],onClick:l},[c()])])])};return()=>i.fixed&&i.placeholder?o(d):d()}});const NavBar=withInstall(stdin_default$c),[name$9,bem$7]=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$b=defineComponent({name:name$9,props:noticeBarProps,emits:["close","replay"],setup(i,{emit:e,slots:r}){let s=0,o=0,a;const l=ref(),u=ref(),c=reactive({show:!0,offset:0,duration:0}),d=()=>{if(r["left-icon"])return r["left-icon"]();if(i.leftIcon)return createVNode(Icon$1,{class:bem$7("left-icon"),name:i.leftIcon},null)},g=()=>{if(i.mode==="closeable")return"cross";if(i.mode==="link")return"arrow"},m=E=>{i.mode==="closeable"&&(c.show=!1,e("close",E))},y=()=>{if(r["right-icon"])return r["right-icon"]();const E=g();if(E)return createVNode(Icon$1,{name:E,class:bem$7("right-icon"),onClick:m},null)},b=()=>{c.offset=s,c.duration=0,raf(()=>{doubleRaf(()=>{c.offset=-o,c.duration=(o+s)/+i.speed,e("replay")})})},S=()=>{const E=i.scrollable===!1&&!i.wrapable,x={transform:c.offset?`translateX(${c.offset}px)`:"",transitionDuration:`${c.duration}s`};return createVNode("div",{ref:l,role:"marquee",class:bem$7("wrap")},[createVNode("div",{ref:u,style:x,class:[bem$7("content"),{"van-ellipsis":E}],onTransitionend:b},[r.default?r.default():i.text])])},A=()=>{const{delay:E,speed:x,scrollable:P}=i,C=isDef$1(E)?+E*1e3:0;s=0,o=0,c.offset=0,c.duration=0,clearTimeout(a),a=setTimeout(()=>{if(!l.value||!u.value||P===!1)return;const T=useRect(l).width,_=useRect(u).width;(P||_>T)&&doubleRaf(()=>{s=T,o=_,c.offset=-o,c.duration=o/+x})},C)};return onPopupReopen(A),onMountedOrActivated(A),useEventListener$1("pageshow",A),useExpose({reset:A}),watch(()=>[i.text,i.scrollable],A),()=>{const{color:E,wrapable:x,background:P}=i;return withDirectives(createVNode("div",{role:"alert",class:bem$7({wrapable:x}),style:{color:E,background:P}},[d(),S(),y()]),[[vShow,c.show]])}}});const NoticeBar=withInstall(stdin_default$b),[name$8,bem$6]=createNamespace$1("progress"),progressProps={color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:truthProp,pivotColor:String,trackColor:String,strokeWidth:numericProp,percentage:{type:numericProp,default:0,validator:i=>+i>=0&&+i<=100}};var stdin_default$a=defineComponent({name:name$8,props:progressProps,setup(i){const e=computed(()=>i.inactive?void 0:i.color),r=()=>{const{textColor:s,pivotText:o,pivotColor:a,percentage:l}=i,u=o!=null?o:`${l}%`;if(i.showPivot&&u){const c={color:s,left:`${+l}%`,transform:`translate(-${+l}%,-50%)`,background:a||e.value};return createVNode("span",{style:c,class:bem$6("pivot",{inactive:i.inactive})},[u])}};return()=>{const{trackColor:s,percentage:o,strokeWidth:a}=i,l={background:s,height:addUnit(a)},u={width:`${o}%`,background:e.value};return createVNode("div",{class:bem$6(),style:l},[createVNode("span",{class:bem$6("portion",{inactive:i.inactive}),style:u},null),r()])}}});const Progress=withInstall(stdin_default$a),[name$7,bem$5]=createNamespace$1("skeleton-title"),skeletonTitleProps={round:Boolean,titleWidth:numericProp};var stdin_default$9=defineComponent({name:name$7,props:skeletonTitleProps,setup(i){return()=>createVNode("h3",{class:bem$5([{round:i.round}]),style:{width:addUnit(i.titleWidth)}},null)}});const SkeletonTitle=withInstall(stdin_default$9);var stdin_default$8=SkeletonTitle;const[name$6,bem$4]=createNamespace$1("skeleton-avatar"),skeletonAvatarProps={avatarSize:numericProp,avatarShape:makeStringProp("round")};var stdin_default$7=defineComponent({name:name$6,props:skeletonAvatarProps,setup(i){return()=>createVNode("div",{class:bem$4([i.avatarShape]),style:getSizeStyle(i.avatarSize)},null)}});const SkeletonAvatar=withInstall(stdin_default$7);var stdin_default$6=SkeletonAvatar;const DEFAULT_ROW_WIDTH="100%",skeletonParagraphProps={round:Boolean,rowWidth:{type:numericProp,default:DEFAULT_ROW_WIDTH}},[name$5,bem$3]=createNamespace$1("skeleton-paragraph");var stdin_default$5=defineComponent({name:name$5,props:skeletonParagraphProps,setup(i){return()=>createVNode("div",{class:bem$3([{round:i.round}]),style:{width:i.rowWidth}},null)}});const SkeletonParagraph=withInstall(stdin_default$5);var stdin_default$4=SkeletonParagraph;const[name$4,bem$2]=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$3=defineComponent({name:name$4,inheritAttrs:!1,props:skeletonProps,setup(i,{slots:e,attrs:r}){const s=()=>{if(i.avatar)return createVNode(stdin_default$6,{avatarShape:i.avatarShape,avatarSize:i.avatarSize},null)},o=()=>{if(i.title)return createVNode(stdin_default$8,{round:i.round,titleWidth:i.titleWidth},null)},a=c=>{const{rowWidth:d}=i;return d===DEFAULT_ROW_WIDTH&&c===+i.row-1?DEFAULT_LAST_ROW_WIDTH:Array.isArray(d)?d[c]:d},l=()=>Array(+i.row).fill("").map((c,d)=>createVNode(stdin_default$4,{key:d,round:i.round,rowWidth:addUnit(a(d))},null)),u=()=>e.template?e.template():createVNode(Fragment,null,[s(),createVNode("div",{class:bem$2("content")},[o(),l()])]);return()=>{var c;return i.loading?createVNode("div",mergeProps({class:bem$2({animate:i.animate,round:i.round})},r),[u()]):(c=e.default)==null?void 0:c.call(e)}}});const Skeleton=withInstall(stdin_default$3),[name$3,bem$1]=createNamespace$1("slider"),sliderProps={min:makeNumericProp(0),max:makeNumericProp(100),step:makeNumericProp(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:numericProp,buttonSize:numericProp,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var stdin_default$2=defineComponent({name:name$3,props:sliderProps,emits:["change","dragEnd","dragStart","update:modelValue"],setup(i,{emit:e,slots:r}){let s,o,a;const l=ref(),u=[ref(),ref()],c=ref(),d=useTouch(),g=computed(()=>Number(i.max)-Number(i.min)),m=computed(()=>{const R=i.vertical?"width":"height";return{background:i.inactiveColor,[R]:addUnit(i.barHeight)}}),y=R=>i.range&&Array.isArray(R),b=()=>{const{modelValue:R,min:F}=i;return y(R)?`${(R[1]-R[0])*100/g.value}%`:`${(R-Number(F))*100/g.value}%`},S=()=>{const{modelValue:R,min:F}=i;return y(R)?`${(R[0]-Number(F))*100/g.value}%`:"0%"},A=computed(()=>{const F={[i.vertical?"height":"width"]:b(),background:i.activeColor};c.value&&(F.transition="none");const k=()=>i.vertical?i.reverse?"bottom":"top":i.reverse?"right":"left";return F[k()]=S(),F}),E=R=>{const F=+i.min,k=+i.max,V=+i.step;R=clamp(R,F,k);const D=Math.round((R-F)/V)*V;return addNumber(F,D)},x=R=>{var F,k;const V=(F=R[0])!=null?F:Number(i.min),D=(k=R[1])!=null?k:Number(i.max);return V>D?[D,V]:[V,D]},P=(R,F)=>{y(R)?R=x(R).map(E):R=E(R),isSameValue(R,i.modelValue)||e("update:modelValue",R),F&&!isSameValue(R,a)&&e("change",R)},C=R=>{if(R.stopPropagation(),i.disabled||i.readonly)return;const{min:F,reverse:k,vertical:V,modelValue:D}=i,$=useRect(l),O=()=>V?k?$.bottom-R.clientY:R.clientY-$.top:k?$.right-R.clientX:R.clientX-$.left,q=V?$.height:$.width,G=Number(F)+O()/q*g.value;if(y(D)){const[U,Z]=D,W=(U+Z)/2;G<=W?P([G,Z],!0):P([U,G],!0)}else P(G,!0)},T=R=>{i.disabled||i.readonly||(d.start(R),o=i.modelValue,y(o)?a=o.map(E):a=E(o),c.value="start")},_=R=>{if(i.disabled||i.readonly)return;c.value==="start"&&e("dragStart",R),preventDefault(R,!0),d.move(R),c.value="dragging";const F=useRect(l),k=i.vertical?d.deltaY.value:d.deltaX.value,V=i.vertical?F.height:F.width;let D=k/V*g.value;if(i.reverse&&(D=-D),y(a)){const $=i.reverse?1-s:s;o[$]=a[$]+D}else o=a+D;P(o)},B=R=>{i.disabled||i.readonly||(c.value==="dragging"&&(P(o,!0),e("dragEnd",R)),c.value="")},M=R=>typeof R=="number"?bem$1("button-wrapper",["left","right"][R]):bem$1("button-wrapper",i.reverse?"left":"right"),N=(R,F)=>{if(typeof F=="number"){const k=r[F===0?"left-button":"right-button"];if(k)return k({value:R})}return r.button?r.button({value:R}):createVNode("div",{class:bem$1("button"),style:getSizeStyle(i.buttonSize)},null)},I=R=>{const F=typeof R=="number"?i.modelValue[R]:i.modelValue;return createVNode("div",{ref:u[R!=null?R:0],role:"slider",class:M(R),tabindex:i.disabled?void 0:0,"aria-valuemin":i.min,"aria-valuenow":F,"aria-valuemax":i.max,"aria-disabled":i.disabled||void 0,"aria-readonly":i.readonly||void 0,"aria-orientation":i.vertical?"vertical":"horizontal",onTouchstartPassive:k=>{typeof R=="number"&&(s=R),T(k)},onTouchend:B,onTouchcancel:B,onClick:stopPropagation},[N(F,R)])};return P(i.modelValue),useCustomFieldValue(()=>i.modelValue),u.forEach(R=>{useEventListener$1("touchmove",_,{target:R})}),()=>createVNode("div",{ref:l,style:m.value,class:bem$1({vertical:i.vertical,disabled:i.disabled}),onClick:C},[createVNode("div",{class:bem$1("bar"),style:A.value},[i.range?[I(0),I(1)]:I()])])}});const Slider=withInstall(stdin_default$2),[name$2,bem,t]=createNamespace$1("uploader");function readFileContent(i,e){return new Promise(r=>{if(e==="file"){r();return}const s=new FileReader;s.onload=o=>{r(o.target.result)},e==="dataUrl"?s.readAsDataURL(i):e==="text"&&s.readAsText(i)})}function isOversize(i,e){return toArray(i).some(r=>r.file?isFunction$5(e)?e(r.file):r.file.size>+e:!1)}function filterFiles(i,e){const r=[],s=[];return i.forEach(o=>{isOversize(o,e)?s.push(o):r.push(o)}),{valid:r,invalid:s}}const IMAGE_REGEXP=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i,isImageUrl=i=>IMAGE_REGEXP.test(i);function isImageFile(i){return i.isImage?!0:i.file&&i.file.type?i.file.type.indexOf("image")===0:i.url?isImageUrl(i.url):typeof i.content=="string"?i.content.indexOf("data:image")===0:!1}var stdin_default$1=defineComponent({props:{name:numericProp,item:makeRequiredProp(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview"],setup(i,{emit:e,slots:r}){const s=()=>{const{status:d,message:g}=i.item;if(d==="uploading"||d==="failed"){const m=d==="failed"?createVNode(Icon$1,{name:"close",class:bem("mask-icon")},null):createVNode(Loading$2,{class:bem("loading")},null),y=isDef$1(g)&&g!=="";return createVNode("div",{class:bem("mask")},[m,y&&createVNode("div",{class:bem("mask-message")},[g])])}},o=d=>{const{name:g,item:m,index:y,beforeDelete:b}=i;d.stopPropagation(),callInterceptor(b,{args:[m,{name:g,index:y}],done:()=>e("delete")})},a=()=>e("preview"),l=()=>{if(i.deletable&&i.item.status!=="uploading"){const d=r["preview-delete"];return createVNode("div",{role:"button",class:bem("preview-delete",{shadow:!d}),tabindex:0,"aria-label":t("delete"),onClick:o},[d?d():createVNode(Icon$1,{name:"cross",class:bem("preview-delete-icon")},null)])}},u=()=>{if(r["preview-cover"]){const{index:d,item:g}=i;return createVNode("div",{class:bem("preview-cover")},[r["preview-cover"](extend$2({index:d},g))])}},c=()=>{const{item:d,lazyLoad:g,imageFit:m,previewSize:y}=i;return isImageFile(d)?createVNode(Image$1,{fit:m,src:d.content||d.url,class:bem("preview-image"),width:Array.isArray(y)?y[0]:y,height:Array.isArray(y)?y[1]:y,lazyLoad:g,onClick:a},{default:u}):createVNode("div",{class:bem("file"),style:getSizeStyle(i.previewSize)},[createVNode(Icon$1,{class:bem("file-icon"),name:"description"},null),createVNode("div",{class:[bem("file-name"),"van-ellipsis"]},[d.file?d.file.name:d.url]),u()])};return()=>createVNode("div",{class:bem("preview")},[c(),s(),l()])}});const uploaderProps={name:makeNumericProp(""),accept:makeStringProp("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:makeNumericProp(1/0),imageFit:makeStringProp("cover"),resultType:makeStringProp("dataUrl"),uploadIcon:makeStringProp("photograph"),uploadText:String,deletable:truthProp,afterRead:Function,showUpload:truthProp,modelValue:makeArrayProp(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:truthProp,previewOptions:Object,previewFullImage:truthProp,maxSize:{type:[Number,String,Function],default:1/0}};var stdin_default=defineComponent({name:name$2,props:uploaderProps,emits:["delete","oversize","clickUpload","closePreview","clickPreview","update:modelValue"],setup(i,{emit:e,slots:r}){const s=ref(),o=[],a=(T=i.modelValue.length)=>({name:i.name,index:T}),l=()=>{s.value&&(s.value.value="")},u=T=>{if(l(),isOversize(T,i.maxSize))if(Array.isArray(T)){const _=filterFiles(T,i.maxSize);if(T=_.valid,e("oversize",_.invalid,a()),!T.length)return}else{e("oversize",T,a());return}T=reactive(T),e("update:modelValue",[...i.modelValue,...toArray(T)]),i.afterRead&&i.afterRead(T,a())},c=T=>{const{maxCount:_,modelValue:B,resultType:M}=i;if(Array.isArray(T)){const N=+_-B.length;T.length>N&&(T=T.slice(0,N)),Promise.all(T.map(I=>readFileContent(I,M))).then(I=>{const R=T.map((F,k)=>{const V={file:F,status:"",message:""};return I[k]&&(V.content=I[k]),V});u(R)})}else readFileContent(T,M).then(N=>{const I={file:T,status:"",message:""};N&&(I.content=N),u(I)})},d=T=>{const{files:_}=T.target;if(i.disabled||!_||!_.length)return;const B=_.length===1?_[0]:[].slice.call(_);if(i.beforeRead){const M=i.beforeRead(B,a());if(!M){l();return}if(isPromise(M)){M.then(N=>{c(N||B)}).catch(l);return}}c(B)};let g;const m=()=>e("closePreview"),y=T=>{if(i.previewFullImage){const _=i.modelValue.filter(isImageFile),B=_.map(M=>(M.file&&!M.url&&M.status!=="failed"&&(M.url=URL.createObjectURL(M.file),o.push(M.url)),M.url)).filter(Boolean);g=showImagePreview(extend$2({images:B,startPosition:_.indexOf(T),onClose:m},i.previewOptions))}},b=()=>{g&&g.close()},S=(T,_)=>{const B=i.modelValue.slice(0);B.splice(_,1),e("update:modelValue",B),e("delete",T,a(_))},A=(T,_)=>{const B=["imageFit","deletable","previewSize","beforeDelete"],M=extend$2(pick$1(i,B),pick$1(T,B,!0));return createVNode(stdin_default$1,mergeProps({item:T,index:_,onClick:()=>e("clickPreview",T,a(_)),onDelete:()=>S(T,_),onPreview:()=>y(T)},pick$1(i,["name","lazyLoad"]),M),pick$1(r,["preview-cover","preview-delete"]))},E=()=>{if(i.previewImage)return i.modelValue.map(A)},x=T=>e("clickUpload",T),P=()=>{if(i.modelValue.length>=+i.maxCount)return;const T=i.readonly?null:createVNode("input",{ref:s,type:"file",class:bem("input"),accept:i.accept,capture:i.capture,multiple:i.multiple,disabled:i.disabled,onChange:d},null);return r.default?createVNode("div",{class:bem("input-wrapper"),onClick:x},[r.default(),T]):withDirectives(createVNode("div",{class:bem("upload",{readonly:i.readonly}),style:getSizeStyle(i.previewSize),onClick:x},[createVNode(Icon$1,{name:i.uploadIcon,class:bem("upload-icon")},null),i.uploadText&&createVNode("span",{class:bem("upload-text")},[i.uploadText]),T]),[[vShow,i.showUpload]])},C=()=>{s.value&&!i.disabled&&s.value.click()};return onBeforeUnmount(()=>{o.forEach(T=>URL.revokeObjectURL(T))}),useExpose({chooseFile:C,closeImagePreview:b}),useCustomFieldValue(()=>i.modelValue),()=>createVNode("div",{class:bem()},[createVNode("div",{class:bem("wrapper",{disabled:i.disabled})},[E(),P()])])}});const Uploader=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 getDefaultExportFromCjs(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function getAugmentedNamespace(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var r=function s(){if(this instanceof s){var o=[null];o.push.apply(o,arguments);var a=Function.bind.apply(e,o);return new a}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var o=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:function(){return i[s]}})}),r}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$4,isObject:isObject$3,Global:Global$5};function make_assign(){return Object.assign?Object.assign:function(e,r,s,o){for(var a=1;a"u"?null:console;if(i){var e=i.warn?i.warn:i.log;e.apply(i,arguments)}}function createStore(i,e,r){r||(r=""),i&&!isList(i)&&(i=[i]),e&&!isList(e)&&(e=[e]);var s=r?"__storejs_"+r+"_":"",o=r?new RegExp("^"+s):null,a=/^[a-zA-Z0-9_\-]*$/;if(!a.test(r))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var l={_namespacePrefix:s,_namespaceRegexp:o,_testStorage:function(c){try{var d="__storejs__test__";c.write(d,d);var g=c.read(d)===d;return c.remove(d),g}catch(m){return!1}},_assignPluginFnProp:function(c,d){var g=this[d];this[d]=function(){var y=slice$2(arguments,0),b=this;function S(){if(g)return each$7(arguments,function(E,x){y[x]=E}),g.apply(b,y)}var A=[S].concat(y);return c.apply(b,A)}},_serialize:function(c){return JSON.stringify(c)},_deserialize:function(c,d){if(!c)return d;var g="";try{g=JSON.parse(c)}catch(m){g=c}return g!==void 0?g: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(y){d._addPlugin(y)});return}var g=pluck(this.plugins,function(y){return c===y});if(!g){if(this.plugins.push(c),!isFunction$3(c))throw new Error("Plugins must be function values that return objects");var m=c.call(this);if(!isObject$2(m))throw new Error("Plugins must return an object of function properties");each$7(m,function(y,b){if(!isFunction$3(y))throw new Error("Bad plugin property: "+b+" from plugin "+c.name+". Plugins should only return functions.");d._assignPluginFnProp(y,b)})}},addStorage:function(c){_warn("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(c)}},u=create(l,storeAPI,{plugins:[]});return u.raw={},each$7(u,function(c,d){isFunction$3(c)&&(u.raw[d]=bind$2(u,c))}),each$7(i,function(c){u._addStorage(c)}),each$7(e,function(c){u._addPlugin(c)}),u}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 r=localStorage$1().key(e);i(read$5(r),r)}}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 r=globalStorage.key(e);i(globalStorage[r],r)}}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 r=fixKey(i);_withStorageEl(function(s){s.setAttribute(r,e),s.save(storageName)})}}function read$3(i){if(!disable$1){var e=fixKey(i),r=null;return _withStorageEl(function(s){r=s.getAttribute(e)}),r}}function each$4(i){_withStorageEl(function(e){for(var r=e.XMLDocument.documentElement.attributes,s=r.length-1;s>=0;s--){var o=r[s];i(e.getAttribute(o.name),o.name)}})}function remove$4(i){var e=fixKey(i);_withStorageEl(function(r){r.removeAttribute(e),r.save(storageName)})}function clearAll$3(){_withStorageEl(function(i){var e=i.XMLDocument.documentElement.attributes;i.load(storageName);for(var r=e.length-1;r>=0;r--)i.removeAttribute(e[r].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,r,s;try{r=new ActiveXObject("htmlfile"),r.open(),r.write("<"+i+">document.w=window'),r.close(),e=r.w.frames[0].document,s=e.createElement("div")}catch(o){s=doc$1.createElement("div"),e=doc$1.body}return function(o){var a=[].slice.call(arguments,0);a.unshift(s),e.appendChild(s),s.addBehavior("#default#userData"),s.load(storageName),o.apply(this,a),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),r=e.length-1;r>=0;r--)if(trim(e[r])){var s=e[r].split("="),o=unescape(s[0]),a=unescape(s[1]);i(a,o)}}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 r=sessionStorage$1().key(e);i(read$1(r),r)}}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 r=meta[e];return typeof r=="string"?r:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'}function str(i,e){var r,s,o,a,l=gap,u,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,u=[],Object.prototype.toString.apply(c)==="[object Array]"){for(a=c.length,r=0;ri==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=>(r,s)=>{const o=r.length;return s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?r:s===null?[...r,[encode$1(e,i),"[",o,"]"].join("")]:[...r,[encode$1(e,i),"[",encode$1(o,i),"]=",encode$1(s,i)].join("")]};case"bracket":return e=>(r,s)=>s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?r:s===null?[...r,[encode$1(e,i),"[]"].join("")]:[...r,[encode$1(e,i),"[]=",encode$1(s,i)].join("")];case"colon-list-separator":return e=>(r,s)=>s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?r:s===null?[...r,[encode$1(e,i),":list="].join("")]:[...r,[encode$1(e,i),":list=",encode$1(s,i)].join("")];case"comma":case"separator":case"bracket-separator":{const e=i.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(s,o)=>o===void 0||i.skipNull&&o===null||i.skipEmptyString&&o===""?s:(o=o===null?"":o,s.length===0?[[encode$1(r,i),e,encode$1(o,i)].join("")]:[[s,encode$1(o,i)].join(i.arrayFormatSeparator)])}default:return e=>(r,s)=>s===void 0||i.skipNull&&s===null||i.skipEmptyString&&s===""?r:s===null?[...r,encode$1(e,i)]:[...r,[encode$1(e,i),"=",encode$1(s,i)].join("")]}}function parserForArrayFormat(i){let e;switch(i.arrayFormat){case"index":return(r,s,o)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){o[r]=s;return}o[r]===void 0&&(o[r]={}),o[r][e[1]]=s};case"bracket":return(r,s,o)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){o[r]=s;return}if(o[r]===void 0){o[r]=[s];return}o[r]=[...o[r],s]};case"colon-list-separator":return(r,s,o)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){o[r]=s;return}if(o[r]===void 0){o[r]=[s];return}o[r]=[...o[r],s]};case"comma":case"separator":return(r,s,o)=>{const a=typeof s=="string"&&s.includes(i.arrayFormatSeparator),l=typeof s=="string"&&!a&&decode$3(s,i).includes(i.arrayFormatSeparator);s=l?decode$3(s,i):s;const u=a||l?s.split(i.arrayFormatSeparator).map(c=>decode$3(c,i)):s===null?s:decode$3(s,i);o[r]=u};case"bracket-separator":return(r,s,o)=>{const a=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!a){o[r]=s&&decode$3(s,i);return}const l=s===null?[]:s.split(i.arrayFormatSeparator).map(u=>decode$3(u,i));if(o[r]===void 0){o[r]=l;return}o[r]=[...o[r],...l]};default:return(r,s,o)=>{if(o[r]===void 0){o[r]=s;return}o[r]=[...[o[r]].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,r)=>Number(e)-Number(r)).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 r=i.indexOf("#");return r!==-1&&(e=i.slice(r)),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 r=parserForArrayFormat(e),s=Object.create(null);if(typeof i!="string"||(i=i.trim().replace(/^[?#&]/,""),!i))return s;for(const o of i.split("&")){if(o==="")continue;const a=e.decode?o.replace(/\+/g," "):o;let[l,u]=splitOnFirst(a,"=");l===void 0&&(l=a),u=u===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?u:decode$3(u,e),r(decode$3(l,e),u,s)}for(const[o,a]of Object.entries(s))if(typeof a=="object"&&a!==null)for(const[l,u]of Object.entries(a))a[l]=parseValue(u,e);else s[o]=parseValue(a,e);return e.sort===!1?s:(e.sort===!0?Object.keys(s).sort():Object.keys(s).sort(e.sort)).reduce((o,a)=>{const l=s[a];return l&&typeof l=="object"&&!Array.isArray(l)?o[a]=keysSorter(l):o[a]=l,o},Object.create(null))}function stringify$2(i,e){if(!i)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},validateArrayFormatSeparator(e.arrayFormatSeparator);const r=l=>e.skipNull&&isNullOrUndefined(i[l])||e.skipEmptyString&&i[l]==="",s=encoderForArrayFormat(e),o={};for(const[l,u]of Object.entries(i))r(l)||(o[l]=u);const a=Object.keys(o);return e.sort!==!1&&a.sort(e.sort),a.map(l=>{const u=i[l];return u===void 0?"":u===null?encode$1(l,e):Array.isArray(u)?u.length===0&&e.arrayFormat==="bracket-separator"?encode$1(l,e)+"[]":u.reduce(s(l),[]).join("&"):encode$1(l,e)+"="+encode$1(u,e)}).filter(l=>l.length>0).join("&")}function parseUrl(i,e){var o,a;e={decode:!0,...e};let[r,s]=splitOnFirst(i,"#");return r===void 0&&(r=i),{url:(a=(o=r==null?void 0:r.split("?"))==null?void 0:o[0])!=null?a:"",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 r=removeHash(i.url).split("?")[0]||"",s=extract(i.url),o={...parse$5(s,{sort:!1}),...i.query};let a=stringify$2(o,e);a&&(a=`?${a}`);let l=getHash(i.url);if(i.fragmentIdentifier){const u=new URL(r);u.hash=i.fragmentIdentifier,l=e[encodeFragmentIdentifier]?u.hash:`#${i.fragmentIdentifier}`}return`${r}${a}${l}`}function pick(i,e,r){r={parseFragmentIdentifier:!0,[encodeFragmentIdentifier]:!1,...r};const{url:s,query:o,fragmentIdentifier:a}=parseUrl(i,r);return stringifyUrl({url:s,query:includeKeys(o,e),fragmentIdentifier:a},r)}function exclude(i,e,r){const s=Array.isArray(e)?o=>!e.includes(o):(o,a)=>!e(o,a);return pick(i,s,r)}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}},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 r=window.GYM||{};r[i]=e,window.GYM=r},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 r=Math.floor(i/60/60%24),s=Math.floor(i/60%60),o=Math.floor(i%60);return e==="cn"?`${r>0?r.toString().padStart(2,"0")+"时":""}${s.toString().padStart(2,"0")}分${o.toString().padStart(2,"0")}秒`:`${r>0?r.toString().padStart(2,"0")+":":""}${s.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`},SPEEDKEY="speeds",setStorageSpeed=(i,e)=>{const r=store_legacy.get(SPEEDKEY)||{};r[i]=e,store_legacy.set(SPEEDKEY,r)},getStorageSpeed=i=>(store_legacy.get(SPEEDKEY)||{})[i]||0,matchProductApiUrl=()=>{const i=getQuery(),e={cbs:{dev:"https://dev.resource.colexiu.com",test:"https://test.resource.colexiu.com",online:"https://mec.colexiu.com"},gym:{dev:"https://dev.dayaedu.com",test:"https://test.dayaedu.com",online:"https://online.dayaedu.com"},colexiu:{dev:"https://dev.colexiu.com/",test:"https://test.colexiu.com",online:"https://online.colexiu.com"},orchestra:{dev:"https://dev.lexiaoya.cn",test:"https://test.lexiaoya.cn",online:"https://online.lexiaoya.cn"},instrument:{dev:"https://dev.kt.colexiu.com",test:"https://test.kt.colexiu.com",test2:"https://test.lexiaoya.cn",online:"https://kt.colexiu.com"}};let r=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//online")||location.origin.includes("//kt")||location.origin.includes("//mec")?"online":"dev";if(i.isCbs)return e.cbs[r]+"/cbs-app";{const s=location.pathname.includes("gym")?"gym":location.pathname.includes("colexiu")?"colexiu":location.pathname.includes("orchestra")?"orchestra":"instrument";return s==="instrument"&&r==="test"&&(r=location.origin.includes("//test.kt")?"test":"test2"),e[s][r]+"/edu-app"}},debounce=(i,e=0)=>{let r;return function(...s){clearTimeout(r),r=setTimeout(()=>i.apply(this,s),e)}},originalPostMessage=window.postMessage;window.postMessage=i=>{originalPostMessage(i,"*")};const loop=()=>{},calls={};var Mi,Ii,Bi,ki,Li,Ri;const instance=window.DAYA||((Ii=(Mi=window.webkit)==null?void 0:Mi.messageHandlers)==null?void 0:Ii.DAYA)||window.COLEXIU||((ki=(Bi=window.webkit)==null?void 0:Bi.messageHandlers)==null?void 0:ki.COLEXIU)||window.ORCHESTRA||((Ri=(Li=window.webkit)==null?void 0:Li.messageHandlers)==null?void 0:Ri.ORCHESTRA);instance&&window.addEventListener("message",i=>{var e,r;try{const s=i.data?typeof i.data=="object"?i.data:JSON.parse(i.data):{},o=((e=s.content)==null?void 0:e.uuid)||s.uuid;try{s.content&&(s.content=JSON.parse(s.content))}catch(u){}if(!o){const u=Object.keys(calls).filter(c=>c.indexOf(s.api)===0);for(const c of u){const d=calls[c]||loop;typeof d=="function"&&d(s),Array.isArray(d)&&d.forEach(g=>{typeof g=="function"&&g(s)})}return}const a=((r=s.content)==null?void 0:r.uuid)||s.uuid||s.api+s.uuid,l=calls[a]||loop;typeof l=="function"&&l(s)}catch(s){console.error("通信消息解析错误",s)}});const postMessage$1=(i,e)=>{if(instance){const r=getRandomKey();calls[r]=e||loop,i.content=i.content?{...i.content,uuid:r}:{uuid:r},instance.postMessage(JSON.stringify(i)),console.log("h5_请求_api:",i)}},listenerMessage=(i,e)=>{const r=i;calls[r]||(calls[r]=[]),calls[r].push(e||loop)},removeListenerMessage=(i,e)=>{const r=i;if(Array.isArray(calls[r])){const s=calls[r].indexOf(e);calls[r].splice(s,1)}},promisefiyPostMessage=i=>new Promise(e=>{postMessage$1(i,r=>e(r))}),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$1({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$1({api:"cancelEvaluating"})},api_startRecordingCb=(i,e)=>{postMessage$1({api:"startRecording",content:i},e)},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$1({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$1({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$1({api:"goBack"})},api_back=()=>{postMessage$1({api:"back"})},api_cloudLoading=(i=!1)=>{postMessage$1({api:"cloudLoading",content:{show:i,type:"fullscreen"}})},api_cloudDestroy=()=>{postMessage$1({api:"cloudDestroy"})},api_setEventTracking=()=>{postMessage$1({api:"setEventTracking",content:{type:"klx_xiaokuAI"}})},api_savePicture=i=>storeData.isApp?promisefiyPostMessage({api:"savePicture",content:i}):Promise.resolve({}),api_setCache=i=>{postMessage$1({api:"setCache",content:i})},api_suspendPlay=i=>{listenerMessage("suspendPlay",i)},api_startCapture=()=>{postMessage$1({api:"startCapture"})},api_endCapture=()=>{postMessage$1({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$1({api:"keepScreenLongLight",content:{isOpenLight:!0}})},api_setRequestedOrientation=i=>{postMessage$1({api:"setRequestedOrientation",content:{orientation:i}})},api_playProgress=i=>{listenerMessage("playProgress",i)},api_openAdjustRecording=i=>{postMessage$1({api:"openAdjustRecording",content:i})},hideComplexButton=(i,e)=>{e?listenerMessage("hideComplexButton",i):removeListenerMessage("hideComplexButton",i)},addCheckPlayEnd=i=>{listenerMessage("checkPlayEnd",i)},removeCheckPlayEnd=i=>{removeListenerMessage("checkPlayEnd",i)},api_checkSocketStatus=()=>promisefiyPostMessage({api:"checkSocketStatus"}),addAccompanyError=i=>{listenerMessage("accompanyError",i)},removeAccompanyError=i=>{removeListenerMessage("accompanyError",i)},addSocketStatus=i=>{listenerMessage("socketConnectSuccessReport",i)},removeSocketStatus=i=>{removeListenerMessage("socketConnectSuccessReport",i)},api_disconnectSocket=()=>promisefiyPostMessage({api:"disconnectSocket"}),api_cloudDetail=(i,e)=>{postMessage$1({api:"cloudDetail",content:i},e)},api_cloudGetMediaStatus=()=>promisefiyPostMessage({api:"cloudGetMediaStatus"}),api_cloudPlay=i=>{promisefiyPostMessage({api:"cloudPlay",content:i})},api_cloudSuspend=i=>{promisefiyPostMessage({api:"cloudSuspend",content:i})},api_cloudSetCurrentTime=i=>{promisefiyPostMessage({api:"cloudSetCurrentTime",content:i})},api_cloudChangeSpeed=i=>{promisefiyPostMessage({api:"cloudChangeSpeed",content:i})},api_cloudVolume=i=>{promisefiyPostMessage({api:"cloudVolume",content:i})},api_cloudTimeUpdae=i=>{listenerMessage("cloudTimeUpdae",i)},api_remove_cloudTimeUpdae=i=>{removeListenerMessage("cloudTimeUpdae",i)},api_cloudplayed=i=>{listenerMessage("cloudplayed",i)},api_remove_cloudplayed=i=>{removeListenerMessage("cloudplayed",i)},api_midiMicDelay=i=>{postMessage$1({api:"proxyServiceMessage",content: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$1,{type:"primary",size:"small",onClick:()=>history.go(0)},{default:()=>[createTextVNode("重新加载")]})]})])}});var shams=function i(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),s=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r 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 a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==o||l.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 r=this;if(typeof r!="function"||toStr$1.call(r)!==funcType)throw new TypeError(ERROR_MESSAGE+r);for(var s=slice$1.call(arguments,1),o,a=function(){if(this instanceof o){var g=r.apply(this,s.concat(slice$1.call(arguments)));return Object(g)===g?g:this}else return r.apply(e,s.concat(slice$1.call(arguments)))},l=Math.max(0,r.length-s.length),u=[],c=0;c"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 r;if(e==="%AsyncFunction%")r=getEvalledConstructor("async function () {}");else if(e==="%GeneratorFunction%")r=getEvalledConstructor("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=getEvalledConstructor("async function* () {}");else if(e==="%AsyncGenerator%"){var s=i("%AsyncGeneratorFunction%");s&&(r=s.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=i("%AsyncGenerator%");o&&(r=getProto(o.prototype))}return INTRINSICS[e]=r,r},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 r=$strSlice(e,0,1),s=$strSlice(e,-1);if(r==="%"&&s!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(s==="%"&&r!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o=[];return $replace$1(e,rePropName,function(a,l,u,c){o[o.length]=u?$replace$1(c,reEscapeChar,"$1"):l||a}),o},getBaseIntrinsic=function i(e,r){var s=e,o;if(hasOwn$1(LEGACY_ALIASES,s)&&(o=LEGACY_ALIASES[s],s="%"+o[0]+"%"),hasOwn$1(INTRINSICS,s)){var a=INTRINSICS[s];if(a===needsEval&&(a=doEval(s)),typeof a>"u"&&!r)throw new $TypeError$1("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:s,value:a}}throw new $SyntaxError("intrinsic "+e+" does not exist!")},getIntrinsic=function i(e,r){if(typeof e!="string"||e.length===0)throw new $TypeError$1("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="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),o=s.length>0?s[0]:"",a=getBaseIntrinsic("%"+o+"%",r),l=a.name,u=a.value,c=!1,d=a.alias;d&&(o=d[0],$spliceApply(s,$concat$1([0,1],d)));for(var g=1,m=!0;g=s.length){var A=$gOPD(u,y);m=!!A,m&&"get"in A&&!("originalValue"in A.get)?u=A.get:u=u[y]}else m=hasOwn$1(u,y),u=u[y];m&&!c&&(INTRINSICS[l]=u)}}return u},callBindExports={},callBind$1={get exports(){return callBindExports},set exports(i){callBindExports=i}};(function(i){var e=functionBind,r=getIntrinsic,s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(o,s),l=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch(g){u=null}i.exports=function(m){var y=a(e,o,arguments);if(l&&u){var b=l(y,"length");b.configurable&&u(y,"length",{value:1+c(0,m.length-(arguments.length-1))})}return y};var d=function(){return a(e,s,arguments)};u?u(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,r){var s=GetIntrinsic$1(e,!!r);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$2=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 r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var s=i<0?-$floor(-i):$floor(i);if(s!==i){var o=String(s),a=$slice.call(e,o.length+1);return $replace.call(o,r,"$&_")+"."+$replace.call($replace.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,r,"$&_")}var utilInspect=require$$0$1,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,objectInspect=function i(e,r,s,o){var a=r||{};if(has$3(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=has$3(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.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,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return u?addNumericSeparator(e,c):c}if(typeof e=="bigint"){var d=String(e)+"n";return u?addNumericSeparator(e,d):d}var g=typeof a.depth>"u"?5:a.depth;if(typeof s>"u"&&(s=0),s>=g&&g>0&&typeof e=="object")return isArray$7(e)?"[Array]":"[Object]";var m=getIndent(a,s);if(typeof o>"u")o=[];else if(indexOf$2(o,e)>=0)return"[Circular]";function y(V,D,$){if(D&&(o=$arrSlice.call(o),o.push(D)),$){var O={depth:a.depth};return has$3(a,"quoteStyle")&&(O.quoteStyle=a.quoteStyle),i(V,O,s+1,o)}return i(V,a,s+1,o)}if(typeof e=="function"&&!isRegExp$1(e)){var b=nameOf(e),S=arrObjKeys(e,y);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(S.length>0?" { "+$join.call(S,", ")+" }":"")}if(isSymbol(e)){var A=hasShammedSymbols?$replace.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(e);return typeof e=="object"&&!hasShammedSymbols?markBoxed(A):A}if(isElement(e)){for(var E="<"+$toLowerCase.call(String(e.nodeName)),x=e.attributes||[],P=0;P",E}if(isArray$7(e)){if(e.length===0)return"[]";var C=arrObjKeys(e,y);return m&&!singleLineValues(C)?"["+indentedJoin(C,m)+"]":"[ "+$join.call(C,", ")+" ]"}if(isError(e)){var T=arrObjKeys(e,y);return!("cause"in Error.prototype)&&"cause"in e&&!isEnumerable.call(e,"cause")?"{ ["+String(e)+"] "+$join.call($concat.call("[cause]: "+y(e.cause),T),", ")+" }":T.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+$join.call(T,", ")+" }"}if(typeof e=="object"&&l){if(inspectSymbol&&typeof e[inspectSymbol]=="function"&&utilInspect)return utilInspect(e,{depth:g-s});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(isMap$2(e)){var _=[];return mapForEach&&mapForEach.call(e,function(V,D){_.push(y(D,e,!0)+" => "+y(V,e))}),collectionOf("Map",mapSize.call(e),_,m)}if(isSet$2(e)){var B=[];return setForEach&&setForEach.call(e,function(V){B.push(y(V,e))}),collectionOf("Set",setSize.call(e),B,m)}if(isWeakMap(e))return weakCollectionOf("WeakMap");if(isWeakSet(e))return weakCollectionOf("WeakSet");if(isWeakRef(e))return weakCollectionOf("WeakRef");if(isNumber$1(e))return markBoxed(y(Number(e)));if(isBigInt(e))return markBoxed(y(bigIntValueOf.call(e)));if(isBoolean$1(e))return markBoxed(booleanValueOf.call(e));if(isString$1(e))return markBoxed(y(String(e)));if(!isDate$1(e)&&!isRegExp$1(e)){var M=arrObjKeys(e,y),N=gPO?gPO(e)===Object.prototype:e instanceof Object||e.constructor===Object,I=e instanceof Object?"":"null prototype",R=!N&&toStringTag&&Object(e)===e&&toStringTag in e?$slice.call(toStr(e),8,-1):I?"Object":"",F=N||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",k=F+(R||I?"["+$join.call($concat.call([],R||[],I||[]),": ")+"] ":"");return M.length===0?k+"{}":m?k+"{"+indentedJoin(M,m)+"}":k+"{ "+$join.call(M,", ")+" }"}return String(e)};function wrapQuotes(i,e,r){var s=(r.quoteStyle||e)==="double"?'"':"'";return s+i+s}function quote(i){return $replace.call(String(i),/"/g,""")}function isArray$7(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$2.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 r=0,s=i.length;re.maxStringLength){var r=i.length-e.maxStringLength,s="... "+r+" more character"+(r>1?"s":"");return inspectString($slice.call(i,0,e.maxStringLength),e)+s}var o=$replace.call($replace.call(i,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(o,"single",e)}function lowbyte(i){var e=i.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(i){return"Object("+i+")"}function weakCollectionOf(i){return i+" { ? }"}function collectionOf(i,e,r,s){var o=s?indentedJoin(r,s):$join.call(r,", ");return i+" ("+e+") {"+o+"}"}function singleLineValues(i){for(var e=0;e=0)return!1;return!0}function getIndent(i,e){var r;if(i.indent===" ")r=" ";else if(typeof i.indent=="number"&&i.indent>0)r=$join.call(Array(i.indent+1)," ");else return null;return{base:r,prev:$join.call(Array(e+1),r)}}function indentedJoin(i,e){if(i.length===0)return"";var r=` `+e.prev+e.base;return r+$join.call(i,","+r)+` `+e.prev}function arrObjKeys(i,e){var r=isArray$7(i),s=[];if(r){s.length=i.length;for(var o=0;o1;){var r=e.pop(),s=r.obj[r.prop];if(isArray$6(s)){for(var o=[],a=0;a=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===formats$2.RFC1738&&(d===40||d===41)){u+=l.charAt(c);continue}if(d<128){u=u+hexTable[d];continue}if(d<2048){u=u+(hexTable[192|d>>6]+hexTable[128|d&63]);continue}if(d<55296||d>=57344){u=u+(hexTable[224|d>>12]+hexTable[128|d>>6&63]+hexTable[128|d&63]);continue}c+=1,d=65536+((d&1023)<<10|l.charCodeAt(c)&1023),u+=hexTable[240|d>>18]+hexTable[128|d>>12&63]+hexTable[128|d>>6&63]+hexTable[128|d&63]}return u},compact=function i(e){for(var r=[{obj:{o:e},prop:"o"}],s=[],o=0;o"u"&&(C=0)}if(typeof c=="function"?x=c(r,x):x instanceof Date?x=m(x):s==="comma"&&isArray$5(x)&&(x=utils$2.maybeMap(x,function(O){return O instanceof Date?m(O):O})),x===null){if(a)return u&&!S?u(r,defaults$1.encoder,A,"key",y):r;x=""}if(isNonNullishPrimitive(x)||utils$2.isBuffer(x)){if(u){var B=S?r:u(r,defaults$1.encoder,A,"key",y);return[b(B)+"="+b(u(x,defaults$1.encoder,A,"value",y))]}return[b(r)+"="+b(String(x))]}var M=[];if(typeof x>"u")return M;var N;if(s==="comma"&&isArray$5(x))S&&u&&(x=utils$2.maybeMap(x,u)),N=[{value:x.length>0?x.join(",")||null:void 0}];else if(isArray$5(c))N=c;else{var I=Object.keys(x);N=d?I.sort(d):I}for(var R=o&&isArray$5(x)&&x.length===1?r+"[]":r,F=0;F"u"?defaults$1.allowDots:!!e.allowDots,charset:r,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:a,format:s,formatter:o,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 r=i,s=normalizeStringifyOptions(e),o,a;typeof s.filter=="function"?(a=s.filter,r=a("",r)):isArray$5(s.filter)&&(a=s.filter,o=a);var l=[];if(typeof r!="object"||r===null)return"";var u;e&&e.arrayFormat in arrayPrefixGenerators?u=e.arrayFormat:e&&"indices"in e?u=e.indices?"indices":"repeat":u="indices";var c=arrayPrefixGenerators[u];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;o||(o=Object.keys(r)),s.sort&&o.sort(s.sort);for(var g=getSideChannel(),m=0;m0?S+b:""},utils$1=utils$3,has=Object.prototype.hasOwnProperty,isArray$4=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,r){return String.fromCharCode(parseInt(r,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,r){var s={},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=r.parameterLimit===1/0?void 0:r.parameterLimit,l=o.split(r.delimiter,a),u=-1,c,d=r.charset;if(r.charsetSentinel)for(c=0;c-1&&(S=isArray$4(S)?[S]:S),has.call(s,b)?s[b]=utils$1.combine(s[b],S):s[b]=S}return s},parseObject=function(i,e,r,s){for(var o=s?e:parseArrayValue(e,r),a=i.length-1;a>=0;--a){var l,u=i[a];if(u==="[]"&&r.parseArrays)l=[].concat(o);else{l=r.plainObjects?Object.create(null):{};var c=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,d=parseInt(c,10);!r.parseArrays&&c===""?l={0:o}:!isNaN(d)&&u!==c&&String(d)===c&&d>=0&&r.parseArrays&&d<=r.arrayLimit?(l=[],l[d]=o):c!=="__proto__"&&(l[c]=o)}o=l}return o},parseKeys=function i(e,r,s,o){if(e){var a=s.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,c=s.depth>0&&l.exec(a),d=c?a.slice(0,c.index):a,g=[];if(d){if(!s.plainObjects&&has.call(Object.prototype,d)&&!s.allowPrototypes)return;g.push(d)}for(var m=0;s.depth>0&&(c=u.exec(a))!==null&&m"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:r,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 r=normalizeParseOptions(e);if(i===""||i===null||typeof i>"u")return r.plainObjects?Object.create(null):{};for(var s=typeof i=="string"?parseValues(i,r):i,o=r.plainObjects?Object.create(null):{},a=Object.keys(s),l=0;l-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 r=i.shift();return{done:r===void 0,value:r}}};return support.iterable&&(e[Symbol.iterator]=function(){return e}),e}function Headers(i){this.map={},i instanceof Headers?i.forEach(function(e,r){this.append(r,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 r=this.map[i];this.map[i]=r?r+", "+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 r in this.map)this.map.hasOwnProperty(r)&&i.call(e,this.map[r],r,this)};Headers.prototype.keys=function(){var i=[];return this.forEach(function(e,r){i.push(r)}),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,r){i.push([r,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,r){i.onload=function(){e(i.result)},i.onerror=function(){r(i.error)}})}function readBlobAsArrayBuffer(i){var e=new FileReader,r=fileReaderReady(e);return e.readAsArrayBuffer(i),r}function readBlobAsText(i){var e=new FileReader,r=fileReaderReady(e);return e.readAsText(i),r}function readArrayBufferAsText(i){for(var e=new Uint8Array(i),r=new Array(e.length),s=0;s-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 r=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,!r&&i._bodyInit!=null&&(r=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")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(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 o=/\?/;this.url+=(o.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(r){if(r){var s=r.split("="),o=s.shift().replace(/\+/g," "),a=s.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(a))}}),e}function parseHeaders(i){var e=new Headers,r=i.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(s){return s.indexOf(` `)===0?s.substr(1,s.length):s}).forEach(function(s){var o=s.split(":"),a=o.shift().trim();if(a){var l=o.join(":").trim();e.append(a,l)}}),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,r){this.message=e,this.name=r;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(r,s){var o=new Request(i,e);if(o.signal&&o.signal.aborted)return s(new DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var c={status:a.status,statusText:a.statusText,headers:parseHeaders(a.getAllResponseHeaders()||"")};c.url="responseURL"in a?a.responseURL:c.headers.get("X-Request-URL");var d="response"in a?a.response:a.responseText;setTimeout(function(){r(new Response(d,c))},0)},a.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){s(new DOMException("Aborted","AbortError"))},0)};function u(c){try{return c===""&&global$1.location.href?global$1.location.href:c}catch(d){return c}}a.open(o.method,u(o.url),!0),o.credentials==="include"?a.withCredentials=!0:o.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(support.blob?a.responseType="blob":support.arrayBuffer&&o.headers.get("Content-Type")&&o.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof Headers)?Object.getOwnPropertyNames(e.headers).forEach(function(c){a.setRequestHeader(c,normalizeValue(e.headers[c]))}):o.headers.forEach(function(c,d){a.setRequestHeader(d,c)}),o.signal&&(o.signal.addEventListener("abort",l),a.onreadystatechange=function(){a.readyState===4&&o.signal.removeEventListener("abort",l)}),a.send(typeof o._bodyInit>"u"?null:o._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 r=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),r.push.apply(r,s)}return r}function _objectSpread2(i){for(var e=1;e"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,r){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(o,a,l){var u=[null];u.push.apply(u,a);var c=Function.bind.apply(o,u),d=new c;return l&&_setPrototypeOf(d,l.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,o)}function o(){return _construct(s,arguments,_getPrototypeOf(this).constructor)}return o.prototype=Object.create(s.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(o,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),o;if(e){var a=_getPrototypeOf(this).constructor;o=Reflect.construct(s,arguments,a)}else o=s.apply(this,arguments);return _possibleConstructorReturn(this,o)}}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 r=Object.prototype.toString.call(i).slice(8,-1);if(r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set")return Array.from(i);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(i,e)}}function _arrayLikeToArray(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,s=new Array(e);r1&&arguments[1]!==void 0?arguments[1]:{global:!1,core:!1,defaultInstance:!1},o=!1,a=!1,l=!1;if(typeof s=="number"?(process&&process.env,o=!0,a=!1):_typeof(s)==="object"&&s&&(a=s.global||!1,o=s.core||!1,l=s.defaultInstance||!1),a){i.globalMiddlewares.splice(i.globalMiddlewares.length-i.defaultGlobalMiddlewaresLength,0,r);return}if(o){i.coreMiddlewares.splice(i.coreMiddlewares.length-i.defaultCoreMiddlewaresLength,0,r);return}if(l){this.defaultMiddlewares.push(r);return}this.middlewares.push(r)}},{key:"execute",value:function(){var r=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(r)}}]),i}();Onion.globalMiddlewares=[];Onion.defaultGlobalMiddlewaresLength=0;Onion.coreMiddlewares=[];Onion.defaultCoreMiddlewaresLength=0;var MapCache$1=function(){function i(e){_classCallCheck(this,i),this.cache=new Map,this.timer={},this.extendOptions(e)}return _createClass(i,[{key:"extendOptions",value:function(r){this.maxCache=r.maxCache||0}},{key:"get",value:function(r){return this.cache.get(JSON.stringify(r))}},{key:"set",value:function(r,s){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:6e4;if(this.maxCache>0&&this.cache.size>=this.maxCache){var l=_toConsumableArray(this.cache.keys())[0];this.cache.delete(l),this.timer[l]&&clearTimeout(this.timer[l])}var u=JSON.stringify(r);this.cache.set(u,s),a>0&&(this.timer[u]=setTimeout(function(){o.cache.delete(u),delete o.timer[u]},a))}},{key:"delete",value:function(r){var s=JSON.stringify(r);return delete this.timer[s],this.cache.delete(s)}},{key:"clear",value:function(){return this.timer={},this.cache.clear()}}]),i}(),RequestError=function(i){_inherits(r,i);var e=_createSuper(r);function r(s,o){var a,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"RequestError";return _classCallCheck(this,r),a=e.call(this,s),a.name="RequestError",a.request=o,a.type=l,a}return r}(_wrapNativeSuper(Error)),ResponseError=function(i){_inherits(r,i);var e=_createSuper(r);function r(s,o,a,l){var u,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"ResponseError";return _classCallCheck(this,r),u=e.call(this,o||s.statusText),u.name="ResponseError",u.data=a,u.response=s,u.request=l,u.type=c,u}return r}(_wrapNativeSuper(Error));function readerGBK(i){return new Promise(function(e,r){var s=new FileReader;s.onload=function(){e(s.result)},s.onerror=r,s.readAsText(i,"GBK")})}function safeJsonParse(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=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(o){if(e)throw new ResponseError(r,"JSON.parse fail",i,s,"ParseError")}return i}function timeout2Throw(i,e,r){return new Promise(function(s,o){setTimeout(function(){o(new RequestError(e||"timeout of ".concat(i,"ms exceeded"),r,"Timeout"))},i)})}function cancel2Throw(i){return new Promise(function(e,r){i.cancelToken&&i.cancelToken.promise.then(function(s){r(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$3(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$1(i){return i!==null&&_typeof(i)==="object"}function forEach2ObjArr(i,e){if(i)if(_typeof(i)!=="object"&&(i=[i]),isArray$3(i))for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},s=r.prefix,o=r.suffix;return s&&(e="".concat(s).concat(e)),o&&(e="".concat(e).concat(o)),{url:e,options:r}},warnedCoreType=!1;function __defaultValidateCache(i,e){var r=e.method,s=r===void 0?"get":r;return s.toLowerCase()==="get"}function fetchMiddleware(i,e){if(!i)return e();var r=i.req;r=r===void 0?{}:r;var s=r.options,o=s===void 0?{}:s,a=r.url,l=a===void 0?"":a,u=i.cache,c=i.responseInterceptors,d=o.timeout,g=d===void 0?0:d,m=o.timeoutMessage,y=o.__umiRequestCoreType__,b=y===void 0?"normal":y,S=o.useCache,A=S===void 0?!1:S,E=o.method,x=E===void 0?"get":E,P=o.params,C=o.ttl,T=o.validateCache,_=T===void 0?__defaultValidateCache:T;if(b!=="normal")return process&&process.env,e();var B=fetch;if(!B)throw new Error("Global fetch not exist!");var M=getEnv()==="BROWSER",N=_(l,o)&&A&&M;if(N){var I=u.get({url:l,params:P,method:x});if(I)return I=I.clone(),I.useCache=!0,i.res=I,e()}var R;return g>0?R=Promise.race([cancel2Throw(o),B(l,o),timeout2Throw(g,m,i.req)]):R=Promise.race([cancel2Throw(o),B(l,o)]),c.forEach(function(F){R=R.then(function(k){var V=typeof k.clone=="function"?k.clone():k;return F(V,o)})}),R.then(function(F){if(N&&F.status===200){var k=F.clone();k.useCache=!0,u.set({url:l,params:P,method:x},k,C)}return i.res=F,e()})}function parseResponseMiddleware(i,e){var r;return e().then(function(){if(i){var s=i.res,o=s===void 0?{}:s,a=i.req,l=a===void 0?{}:a,u=l||{},c=u.options;c=c===void 0?{}:c;var d=c.responseType,g=d===void 0?"json":d,m=c.charset,y=m===void 0?"utf8":m;c.getResponse;var b=c.throwErrIfParseFail,S=b===void 0?!1:b,A=c.parseResponse,E=A===void 0?!0:A;if(E&&!(!o||!o.clone)){if(r=getEnv()==="BROWSER"?o.clone():o,r.useCache=o.useCache||!1,y==="gbk")try{return o.blob().then(readerGBK).then(function(x){return safeJsonParse(x,!1,r,l)})}catch(x){throw new ResponseError(r,x.message,null,l,"ParseError")}else if(g==="json")return o.text().then(function(x){return safeJsonParse(x,S,r,l)});try{return o[g]()}catch(x){throw new ResponseError(r,"responseType not support",null,l,"ParseError")}}}}).then(function(s){if(i){i.res;var o=i.req,a=o===void 0?{}:o,l=a||{},u=l.options;u=u===void 0?{}:u;var c=u.getResponse,d=c===void 0?!1:c;if(r){if(r.status>=200&&r.status<300){if(d){i.res={data:s,response:r};return}i.res=s;return}throw new ResponseError(r,"http error",s,a,"HttpError")}}}).catch(function(s){if(s instanceof RequestError||s instanceof ResponseError)throw s;var o=i.req,a=i.res;throw s.request=s.request||o,s.response=s.response||a,s.type=s.type||s.name,s.data=s.data||void 0,s})}function simplePostMiddleware(i,e){if(!i)return e();var r=i.req;r=r===void 0?{}:r;var s=r.options,o=s===void 0?{}:s,a=o.method,l=a===void 0?"get":a;if(["post","put","patch","delete"].indexOf(l.toLowerCase())===-1)return e();var u=o.requestType,c=u===void 0?"json":u,d=o.data;if(d){var g=Object.prototype.toString.call(d);g==="[object Object]"||g==="[object Array]"?c==="json"?(o.headers=_objectSpread2({Accept:"application/json","Content-Type":"application/json;charset=UTF-8"},o.headers),o.body=JSON.stringify(d)):c==="form"&&(o.headers=_objectSpread2({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},o.headers),o.body=reqStringify(d)):(o.headers=_objectSpread2({Accept:"application/json"},o.headers),o.body=d)}return i.req.options=o,e()}function paramsSerialize(i,e){var r,s;if(i)if(e)r=e(i);else if(isURLSearchParams(i))r=i.toString();else if(isArray$3(i))s=[],forEach2ObjArr(i,function(a){a===null||typeof a>"u"?s.push(a):s.push(isObject$1(a)?JSON.stringify(a):a)}),r=reqStringify(s);else{s={},forEach2ObjArr(i,function(a,l){var u=a;a===null||typeof a>"u"?s[l]=a:isDate(a)?u=a.toISOString():isArray$3(a)?u=a:isObject$1(a)&&(u=JSON.stringify(a)),s[l]=u});var o=reqStringify(s);r=o}return r}function simpleGetMiddleware(i,e){if(!i)return e();var r=i.req;r=r===void 0?{}:r;var s=r.options,o=s===void 0?{}:s,a=o.paramsSerializer,l=o.params,u=i.req;u=u===void 0?{}:u;var c=u.url,d=c===void 0?"":c;o.method=o.method?o.method.toUpperCase():"GET",o.credentials=o.credentials||"same-origin";var g=paramsSerialize(l,a);if(i.req.originUrl=d,g){var m=d.indexOf("?")!==-1?"&":"?";i.req.url="".concat(d).concat(m).concat(g)}return i.req.options=o,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$1(e),this.initOptions=e,this.instanceRequestInterceptors=[],this.instanceResponseInterceptors=[]}return _createClass(i,[{key:"use",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!1,core:!1};return this.onion.use(r,s),this}},{key:"extendOptions",value:function(r){this.initOptions=mergeRequestOptions(this.initOptions,r),this.mapCache.extendOptions(r)}},{key:"dealRequestInterceptors",value:function(r){var s=function(l,u){return l.then(function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return r.req.url=c.url||r.req.url,r.req.options=c.options||r.req.options,u(r.req.url,r.req.options)})},o=[].concat(_toConsumableArray(i.requestInterceptors),_toConsumableArray(this.instanceRequestInterceptors));return o.reduce(s,Promise.resolve()).then(function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return r.req.url=a.url||r.req.url,r.req.options=a.options||r.req.options,Promise.resolve()})}},{key:"request",value:function(r,s){var o=this,a=this.onion,l={req:{url:r,options:_objectSpread2(_objectSpread2({},s),{},{url:r})},res:null,cache:this.mapCache,responseInterceptors:[].concat(_toConsumableArray(i.responseInterceptors),_toConsumableArray(this.instanceResponseInterceptors))};if(typeof r!="string")throw new Error("url MUST be a string");return new Promise(function(u,c){o.dealRequestInterceptors(l).then(function(){return a.execute(l)}).then(function(){u(l.res)}).catch(function(d){var g=l.req.options.errorHandler;if(g)try{var m=g(d);u(m)}catch(y){c(y)}else c(d)})})}}],[{key:"requestUse",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!0};if(typeof r!="function")throw new TypeError("Interceptor must be function!");s.global?i.requestInterceptors.push(r):this.instanceRequestInterceptors.push(r)}},{key:"responseUse",value:function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!0};if(typeof r!="function")throw new TypeError("Interceptor must be function!");s.global?i.responseInterceptors.push(r):this.instanceResponseInterceptors.push(r)}}]),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(o){e=o});var r=this;i(function(o){r.reason||(r.reason=new Cancel(o),e(r.reason))})}CancelToken.prototype.throwIfRequested=function i(){if(this.reason)throw this.reason};CancelToken.source=function i(){var e,r=new CancelToken(function(o){e=o});return{token:r,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]:{},r=new Core(e),s=function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=mergeRequestOptions(r.initOptions,u);return r.request(l,c)};s.use=r.use.bind(r),s.fetchIndex=r.fetchIndex,s.interceptors={request:{use:Core.requestUse.bind(r)},response:{use:Core.responseUse.bind(r)}};var o=["get","post","delete","put","patch","head","options","rpc"];return o.forEach(function(a){s[a]=function(l,u){return s(l,_objectSpread2(_objectSpread2({},u),{},{method:a}))}}),s.Cancel=Cancel,s.CancelToken=CancelToken,s.isCancel=isCancel,s.extendOptions=r.extendOptions.bind(r),s.middlewares={instance:r.onion.middlewares,defaultInstance:r.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 r=9007199254740991,s="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]",l="[object Map]",u="[object Object]",c="[object Promise]",d="[object Set]",g="[object WeakMap]",m="[object DataView]",y=/[\\^$.*+?()[\]{}|]/g,b=/^\[object .+?Constructor\]$/,S=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,A=typeof self=="object"&&self&&self.Object===Object&&self,E=S||A||Function("return this")(),x=e&&!e.nodeType&&e,P=x&&!0&&i&&!i.nodeType&&i,C=P&&P.exports===x;function T(de,De){return de==null?void 0:de[De]}function _(de){var De=!1;if(de!=null&&typeof de.toString!="function")try{De=!!(de+"")}catch(Ne){}return De}function B(de,De){return function(Ne){return de(De(Ne))}}var M=Function.prototype,N=Object.prototype,I=E["__core-js_shared__"],R=function(){var de=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||"");return de?"Symbol(src)_1."+de:""}(),F=M.toString,k=N.hasOwnProperty,V=N.toString,D=RegExp("^"+F.call(k).replace(y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=C?E.Buffer:void 0,O=N.propertyIsEnumerable,q=$?$.isBuffer:void 0,G=B(Object.keys,Object),U=te(E,"DataView"),Z=te(E,"Map"),W=te(E,"Promise"),K=te(E,"Set"),ye=te(E,"WeakMap"),ae=!O.call({valueOf:1},"valueOf"),Y=pe(U),Q=pe(Z),he=pe(W),ge=pe(K),Se=pe(ye);function Ie(de){return V.call(de)}function Me(de){if(!xe(de)||z(de))return!1;var De=Be(de)||_(de)?D:b;return De.test(pe(de))}function te(de,De){var Ne=T(de,De);return Me(Ne)?Ne:void 0}var oe=Ie;(U&&oe(new U(new ArrayBuffer(1)))!=m||Z&&oe(new Z)!=l||W&&oe(W.resolve())!=c||K&&oe(new K)!=d||ye&&oe(new ye)!=g)&&(oe=function(de){var De=V.call(de),Ne=De==u?de.constructor:void 0,Ue=Ne?pe(Ne):void 0;if(Ue)switch(Ue){case Y:return m;case Q:return l;case he:return c;case ge:return d;case Se:return g}return De});function z(de){return!!R&&R in de}function me(de){var De=de&&de.constructor,Ne=typeof De=="function"&&De.prototype||N;return de===Ne}function pe(de){if(de!=null){try{return F.call(de)}catch(De){}try{return de+""}catch(De){}}return""}function ee(de){return _e(de)&&k.call(de,"callee")&&(!O.call(de,"callee")||V.call(de)==s)}var ne=Array.isArray;function fe(de){return de!=null&&Re(de.length)&&!Be(de)}function _e(de){return ce(de)&&fe(de)}var Ae=q||Ee;function Pe(de){if(fe(de)&&(ne(de)||typeof de=="string"||typeof de.splice=="function"||Ae(de)||ee(de)))return!de.length;var De=oe(de);if(De==l||De==d)return!de.size;if(ae||me(de))return!G(de).length;for(var Ne in de)if(k.call(de,Ne))return!1;return!0}function Be(de){var De=xe(de)?V.call(de):"";return De==o||De==a}function Re(de){return typeof de=="number"&&de>-1&&de%1==0&&de<=r}function xe(de){var De=typeof de;return!!de&&(De=="object"||De=="function")}function ce(de){return!!de&&typeof de=="object"}function Ee(){return!1}i.exports=Pe})(lodash_isempty,lodash_isemptyExports);var objectTag$4="[object Object]";function isHostObject(i){var e=!1;if(i!=null&&typeof i.toString!="function")try{e=!!(i+"")}catch(r){}return e}function overArg$1(i,e){return function(r){return i(e(r))}}var funcProto$2=Function.prototype,objectProto$f=Object.prototype,funcToString$2=funcProto$2.toString,hasOwnProperty$c=objectProto$f.hasOwnProperty,objectCtorString=funcToString$2.call(Object),objectToString$1=objectProto$f.toString,getPrototype$2=overArg$1(Object.getPrototypeOf,Object);function isObjectLike$1(i){return!!i&&typeof i=="object"}function isPlainObject$2(i){if(!isObjectLike$1(i)||objectToString$1.call(i)!=objectTag$4||isHostObject(i))return!1;var e=getPrototype$2(i);if(e===null)return!0;var r=hasOwnProperty$c.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&funcToString$2.call(r)==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 r=200,s="Expected a function",o="__lodash_hash_undefined__",a=1,l=2,u=1/0,c=9007199254740991,d="[object Arguments]",g="[object Array]",m="[object Boolean]",y="[object Date]",b="[object Error]",S="[object Function]",A="[object GeneratorFunction]",E="[object Map]",x="[object Number]",P="[object Object]",C="[object Promise]",T="[object RegExp]",_="[object Set]",B="[object String]",M="[object Symbol]",N="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",F="[object Float32Array]",k="[object Float64Array]",V="[object Int8Array]",D="[object Int16Array]",$="[object Int32Array]",O="[object Uint8Array]",q="[object Uint8ClampedArray]",G="[object Uint16Array]",U="[object Uint32Array]",Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,K=/^\./,ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ae=/[\\^$.*+?()[\]{}|]/g,Y=/\\(\\)?/g,Q=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ge={};ge[F]=ge[k]=ge[V]=ge[D]=ge[$]=ge[O]=ge[q]=ge[G]=ge[U]=!0,ge[d]=ge[g]=ge[I]=ge[m]=ge[R]=ge[y]=ge[b]=ge[S]=ge[E]=ge[x]=ge[P]=ge[T]=ge[_]=ge[B]=ge[N]=!1;var Se=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Ie=typeof self=="object"&&self&&self.Object===Object&&self,Me=Se||Ie||Function("return this")(),te=e&&!e.nodeType&&e,oe=te&&!0&&i&&!i.nodeType&&i,z=oe&&oe.exports===te,me=z&&Se.process,pe=function(){try{return me&&me.binding("util")}catch(re){}}(),ee=pe&&pe.isTypedArray;function ne(re,Te){for(var Fe=-1,qe=re?re.length:0;++Fe-1}function ut(re,Te){var Fe=this.__data__,qe=Ut(Fe,re);return qe<0?Fe.push([re,Te]):Fe[qe][1]=Te,this}Ce.prototype.clear=Le,Ce.prototype.delete=Oe,Ce.prototype.get=Ze,Ce.prototype.has=je,Ce.prototype.set=ut;function Ge(re){var Te=-1,Fe=re?re.length:0;for(this.clear();++TeSt))return!1;var _t=Je.get(re);if(_t&&Je.get(Te))return _t==Te;var Rt=-1,Dt=!0,Mt=at&a?new gt:void 0;for(Je.set(re,Te),Je.set(Te,re);++Rt-1&&re%1==0&&re-1&&re%1==0&&re<=c}function ti(re){var Te=typeof re;return!!re&&(Te=="object"||Te=="function")}function li(re){return!!re&&typeof re=="object"}function gi(re){return typeof re=="symbol"||li(re)&&Qe.call(re)==M}var Ti=ee?Pe(ee):Gi;function rn(re){return re==null?"":ji(re)}function sn(re,Te,Fe){var qe=re==null?void 0:ni(re,Te);return qe===void 0?Fe:qe}function on(re,Te){return re!=null&&Ki(re,Te,Ht)}function ui(re){return Ci(re)?Ot(re):zi(re)}function an(re,Te,Fe){var qe=qt(re)||Ti(re);if(Te=Ui(Te),Fe==null)if(qe||ti(re)){var at=re.constructor;qe?Fe=qt(re)?new at:[]:Fe=pi(at)?ri(ot(re)):{}}else Fe={};return(qe?ne:Zt)(re,function(Je,yt,St){return Te(Fe,Je,yt,St)}),Fe}function ln(re){return re}function un(re){return oi(re)?_e(ai(re)):$i(re)}i.exports=an})(lodash_transform,lodash_transformExports);const isEmpty$1=lodash_isemptyExports,isPlainObject$1=lodash_isplainobject,transform=lodash_transformExports;var src=function i(e,{cleanKeys:r=[],cleanValues:s=[],emptyArrays:o=!0,emptyObjects:a=!0,emptyStrings:l=!0,NaNValues:u=!1,nullValues:c=!0,undefinedValues:d=!0}={}){return transform(e,(g,m,y)=>{if(!r.includes(y)&&((Array.isArray(m)||isPlainObject$1(m))&&(m=i(m,{NaNValues:u,cleanKeys:r,cleanValues:s,emptyArrays:o,emptyObjects:a,emptyStrings:l,nullValues:c,undefinedValues:d})),!s.includes(m)&&!(a&&isPlainObject$1(m)&&isEmpty$1(m))&&!(o&&Array.isArray(m)&&!m.length)&&!(l&&m==="")&&!(u&&Number.isNaN(m))&&!(c&&m===null)&&!(d&&m===void 0))){if(Array.isArray(g))return g.push(m);g[y]=m}})};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"});whiteUrl();browser();getQuery();const request=extend$1({requestType:"form",timeout:1e4});request.interceptors.request.use((i,e)=>{const r=e.isContentCenter?"/cbs-app":storeData.platformApi;storeData.proxy+r,i=matchProductApiUrl()+i;const s=getToken(),o={};return s&&!e.isContentCenter&&(o.Authorization=s),{url:i,options:{...e,params:src(e.params),data:src(e.data),headers:{...e.headers,...o}}}},{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 r=await i.clone().json();if(r.code===5e3)return r;if(r.code!==200&&r.errCode!==0){const s=r.msg||r.message||"处理失败,请重试";throw r.code===403||r.code,new Error(s)}return r},{global:!1});var dayjs_minExports={},dayjs_min={get exports(){return dayjs_minExports},set exports(i){dayjs_minExports=i}};(function(i,e){(function(r,s){i.exports=s()})(commonjsGlobal,function(){var r=1e3,s=6e4,o=36e5,a="millisecond",l="second",u="minute",c="hour",d="day",g="week",m="month",y="quarter",b="year",S="date",A="Invalid Date",E=/^(\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,P={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(V){var D=["th","st","nd","rd"],$=V%100;return"["+V+(D[($-20)%10]||D[$]||D[0])+"]"}},C=function(V,D,$){var O=String(V);return!O||O.length>=D?V:""+Array(D+1-O.length).join($)+V},T={s:C,z:function(V){var D=-V.utcOffset(),$=Math.abs(D),O=Math.floor($/60),q=$%60;return(D<=0?"+":"-")+C(O,2,"0")+":"+C(q,2,"0")},m:function V(D,$){if(D.date()<$.date())return-V($,D);var O=12*($.year()-D.year())+($.month()-D.month()),q=D.clone().add(O,m),G=$-q<0,U=D.clone().add(O+(G?-1:1),m);return+(-(O+($-q)/(G?q-U:U-q))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:m,y:b,w:g,d,D:S,h:c,m:u,s:l,ms:a,Q:y}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},_="en",B={};B[_]=P;var M=function(V){return V instanceof F},N=function V(D,$,O){var q;if(!D)return _;if(typeof D=="string"){var G=D.toLowerCase();B[G]&&(q=G),$&&(B[G]=$,q=G);var U=D.split("-");if(!q&&U.length>1)return V(U[0])}else{var Z=D.name;B[Z]=D,q=Z}return!O&&q&&(_=q),q||!O&&_},I=function(V,D){if(M(V))return V.clone();var $=typeof D=="object"?D:{};return $.date=V,$.args=arguments,new F($)},R=T;R.l=N,R.i=M,R.w=function(V,D){return I(V,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var F=function(){function V($){this.$L=N($.locale,null,!0),this.parse($)}var D=V.prototype;return D.parse=function($){this.$d=function(O){var q=O.date,G=O.utc;if(q===null)return new Date(NaN);if(R.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var U=q.match(E);if(U){var Z=U[2]-1||0,W=(U[7]||"0").substring(0,3);return G?new Date(Date.UTC(U[1],Z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,W)):new Date(U[1],Z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,W)}}return new Date(q)}($),this.$x=$.x||{},this.init()},D.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},D.$utils=function(){return R},D.isValid=function(){return this.$d.toString()!==A},D.isSame=function($,O){var q=I($);return this.startOf(O)<=q&&q<=this.endOf(O)},D.isAfter=function($,O){return I($)=0&&m<=1){if(y._volume=m,y._muted)return y;y.usingWebAudio&&y.masterGain.gain.setValueAtTime(m,r.ctx.currentTime);for(var b=0;b=0;y--)m._howls[y].unload();return m.usingWebAudio&&m.ctx&&typeof m.ctx.close<"u"&&(m.ctx.close(),m.ctx=null,g()),m},codecs:function(m){return(this||r)._codecs[m.replace(/^x-/,"")]},_setup:function(){var m=this||r;if(m.state=m.ctx&&m.ctx.state||"suspended",m._autoSuspend(),!m.usingWebAudio)if(typeof Audio<"u")try{var y=new Audio;typeof y.oncanplaythrough>"u"&&(m._canPlayEvent="canplay")}catch(b){m.noAudio=!0}else m.noAudio=!0;try{var y=new Audio;y.muted&&(m.noAudio=!0)}catch(b){}return m.noAudio||m._setupCodecs(),m},_setupCodecs:function(){var m=this||r,y=null;try{y=typeof Audio<"u"?new Audio:null}catch(T){return m}if(!y||typeof y.canPlayType!="function")return m;var b=y.canPlayType("audio/mpeg;").replace(/^no$/,""),S=m._navigator?m._navigator.userAgent:"",A=S.match(/OPR\/([0-6].)/g),E=A&&parseInt(A[0].split("/")[1],10)<33,x=S.indexOf("Safari")!==-1&&S.indexOf("Chrome")===-1,P=S.match(/Version\/(.*?) /),C=x&&P&&parseInt(P[1],10)<15;return m._codecs={mp3:!!(!E&&(b||y.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!b,opus:!!y.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!y.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!y.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(y.canPlayType('audio/wav; codecs="1"')||y.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!y.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!y.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(y.canPlayType("audio/x-m4a;")||y.canPlayType("audio/m4a;")||y.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(y.canPlayType("audio/x-m4b;")||y.canPlayType("audio/m4b;")||y.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(y.canPlayType("audio/x-mp4;")||y.canPlayType("audio/mp4;")||y.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!C&&y.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!C&&y.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!y.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(y.canPlayType("audio/x-flac;")||y.canPlayType("audio/flac;")).replace(/^no$/,"")},m},_unlockAudio:function(){var m=this||r;if(!(m._audioUnlocked||!m.ctx)){m._audioUnlocked=!1,m.autoUnlock=!1,!m._mobileUnloaded&&m.ctx.sampleRate!==44100&&(m._mobileUnloaded=!0,m.unload()),m._scratchBuffer=m.ctx.createBuffer(1,1,22050);var y=function(b){for(;m._html5AudioPool.length"u"?C.noteOn(0):C.start(0),typeof m.ctx.resume=="function"&&m.ctx.resume(),C.onended=function(){C.disconnect(0),m._audioUnlocked=!0,document.removeEventListener("touchstart",y,!0),document.removeEventListener("touchend",y,!0),document.removeEventListener("click",y,!0),document.removeEventListener("keydown",y,!0);for(var T=0;T"u"||!r.usingWebAudio)){for(var y=0;y"u"||!r.usingWebAudio))return m.state==="running"&&m.ctx.state!=="interrupted"&&m._suspendTimer?(clearTimeout(m._suspendTimer),m._suspendTimer=null):m.state==="suspended"||m.state==="running"&&m.ctx.state==="interrupted"?(m.ctx.resume().then(function(){m.state="running";for(var y=0;y"u"&&(m="__default",!b._playLock)){for(var A=0,E=0;E0?x._seek:b._sprite[m][0]/1e3),T=Math.max(0,(b._sprite[m][0]+b._sprite[m][1])/1e3-C),_=T*1e3/Math.abs(x._rate),B=b._sprite[m][0]/1e3,M=(b._sprite[m][0]+b._sprite[m][1])/1e3;x._sprite=m,x._ended=!1;var N=function(){x._paused=!1,x._seek=C,x._start=B,x._stop=M,x._loop=!!(x._loop||b._sprite[m][2])};if(C>=M){b._ended(x);return}var I=x._node;if(b._webAudio){var R=function(){b._playLock=!1,N(),b._refreshBuffer(x);var D=x._muted||b._muted?0:x._volume;I.gain.setValueAtTime(D,r.ctx.currentTime),x._playStart=r.ctx.currentTime,typeof I.bufferSource.start>"u"?x._loop?I.bufferSource.noteGrainOn(0,C,86400):I.bufferSource.noteGrainOn(0,C,T):x._loop?I.bufferSource.start(0,C,86400):I.bufferSource.start(0,C,T),_!==1/0&&(b._endTimers[x._id]=setTimeout(b._ended.bind(b,x),_)),y||setTimeout(function(){b._emit("play",x._id),b._loadQueue()},0)};r.state==="running"&&r.ctx.state!=="interrupted"?R():(b._playLock=!0,b.once("resume",R),b._clearTimer(x._id))}else{var F=function(){I.currentTime=C,I.muted=x._muted||b._muted||r._muted||I.muted,I.volume=x._volume*r.volume(),I.playbackRate=x._rate;try{var D=I.play();if(D&&typeof Promise<"u"&&(D instanceof Promise||typeof D.then=="function")?(b._playLock=!0,N(),D.then(function(){b._playLock=!1,I._unlocked=!0,y?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})):y||(b._playLock=!1,N(),b._emit("play",x._id)),I.playbackRate=x._rate,I.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}m!=="__default"||x._loop?b._endTimers[x._id]=setTimeout(b._ended.bind(b,x),_):(b._endTimers[x._id]=function(){b._ended(x),I.removeEventListener("ended",b._endTimers[x._id],!1)},I.addEventListener("ended",b._endTimers[x._id],!1))}catch($){b._emit("playerror",x._id,$)}};I.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(I.src=b._src,I.load());var k=window&&window.ejecta||!I.readyState&&r._navigator.isCocoonJS;if(I.readyState>=3||k)F();else{b._playLock=!0,b._state="loading";var V=function(){b._state="loaded",F(),I.removeEventListener(r._canPlayEvent,V,!1)};I.addEventListener(r._canPlayEvent,V,!1),b._clearTimer(x._id)}}return x._id},pause:function(m){var y=this;if(y._state!=="loaded"||y._playLock)return y._queue.push({event:"pause",action:function(){y.pause(m)}}),y;for(var b=y._getSoundIds(m),S=0;S"u"?A._node.bufferSource.noteOff(0):A._node.bufferSource.stop(0),y._cleanBuffer(A._node)}else(!isNaN(A._node.duration)||A._node.duration===1/0)&&A._node.pause();arguments[1]||y._emit("pause",A?A._id:null)}return y},stop:function(m,y){var b=this;if(b._state!=="loaded"||b._playLock)return b._queue.push({event:"stop",action:function(){b.stop(m)}}),b;for(var S=b._getSoundIds(m),A=0;A"u"?E._node.bufferSource.noteOff(0):E._node.bufferSource.stop(0),b._cleanBuffer(E._node)):(!isNaN(E._node.duration)||E._node.duration===1/0)&&(E._node.currentTime=E._start||0,E._node.pause(),E._node.duration===1/0&&b._clearSound(E._node))),y||b._emit("stop",E._id))}return b},mute:function(m,y){var b=this;if(b._state!=="loaded"||b._playLock)return b._queue.push({event:"mute",action:function(){b.mute(m,y)}}),b;if(typeof y>"u")if(typeof m=="boolean")b._muted=m;else return b._muted;for(var S=b._getSoundIds(y),A=0;A"u"){var A=m._getSoundIds(),E=A.indexOf(y[0]);E>=0?S=parseInt(y[0],10):b=parseFloat(y[0])}else y.length>=2&&(b=parseFloat(y[0]),S=parseInt(y[1],10));var x;if(typeof b<"u"&&b>=0&&b<=1){if(m._state!=="loaded"||m._playLock)return m._queue.push({event:"volume",action:function(){m.volume.apply(m,y)}}),m;typeof S>"u"&&(m._volume=b),S=m._getSoundIds(S);for(var P=0;P"u")}}return A},_startFadeInterval:function(m,y,b,S,A,E){var x=this,P=y,C=b-y,T=Math.abs(C/.01),_=Math.max(4,T>0?S/T:S),B=Date.now();m._fadeTo=b,m._interval=setInterval(function(){var M=(Date.now()-B)/S;B=Date.now(),P+=C*M,P=Math.round(P*100)/100,C<0?P=Math.max(b,P):P=Math.min(b,P),x._webAudio?m._volume=P:x.volume(P,m._id,!0),E&&(x._volume=P),(by&&P>=b)&&(clearInterval(m._interval),m._interval=null,m._fadeTo=null,x.volume(b,m._id),x._emit("fade",m._id))},_)},_stopFade:function(m){var y=this,b=y._soundById(m);return b&&b._interval&&(y._webAudio&&b._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(b._interval),b._interval=null,y.volume(b._fadeTo,m),b._fadeTo=null,y._emit("fade",m)),y},loop:function(){var m=this,y=arguments,b,S,A;if(y.length===0)return m._loop;if(y.length===1)if(typeof y[0]=="boolean")b=y[0],m._loop=b;else return A=m._soundById(parseInt(y[0],10)),A?A._loop:!1;else y.length===2&&(b=y[0],S=parseInt(y[1],10));for(var E=m._getSoundIds(S),x=0;x=0?S=parseInt(y[0],10):b=parseFloat(y[0])}else y.length===2&&(b=parseFloat(y[0]),S=parseInt(y[1],10));var x;if(typeof b=="number"){if(m._state!=="loaded"||m._playLock)return m._queue.push({event:"rate",action:function(){m.rate.apply(m,y)}}),m;typeof S>"u"&&(m._rate=b),S=m._getSoundIds(S);for(var P=0;P=0?S=parseInt(y[0],10):m._sounds.length&&(S=m._sounds[0]._id,b=parseFloat(y[0]))}else y.length===2&&(b=parseFloat(y[0]),S=parseInt(y[1],10));if(typeof S>"u")return 0;if(typeof b=="number"&&(m._state!=="loaded"||m._playLock))return m._queue.push({event:"seek",action:function(){m.seek.apply(m,y)}}),m;var x=m._soundById(S);if(x)if(typeof b=="number"&&b>=0){var P=m.playing(S);P&&m.pause(S,!0),x._seek=b,x._ended=!1,m._clearTimer(S),!m._webAudio&&x._node&&!isNaN(x._node.duration)&&(x._node.currentTime=b);var C=function(){P&&m.play(S,!0),m._emit("seek",S)};if(P&&!m._webAudio){var T=function(){m._playLock?setTimeout(T,0):C()};setTimeout(T,0)}else C()}else if(m._webAudio){var _=m.playing(S)?r.ctx.currentTime-x._playStart:0,B=x._rateSeek?x._rateSeek-x._seek:0;return x._seek+(B+_*Math.abs(x._rate))}else return x._node.currentTime;return m},playing:function(m){var y=this;if(typeof m=="number"){var b=y._soundById(m);return b?!b._paused:!1}for(var S=0;S=0&&r._howls.splice(S,1);var A=!0;for(b=0;b=0){A=!1;break}return a&&A&&delete a[m._src],r.noAudio=!1,m._state="unloaded",m._sounds=[],m=null,null},on:function(m,y,b,S){var A=this,E=A["_on"+m];return typeof y=="function"&&E.push(S?{id:b,fn:y,once:S}:{id:b,fn:y}),A},off:function(m,y,b){var S=this,A=S["_on"+m],E=0;if(typeof y=="number"&&(b=y,y=null),y||b)for(E=0;E=0;E--)(!A[E].id||A[E].id===y||m==="load")&&(setTimeout(function(x){x.call(this,y,b)}.bind(S,A[E].fn),0),A[E].once&&S.off(m,A[E].fn,A[E].id));return S._loadQueue(m),S},_loadQueue:function(m){var y=this;if(y._queue.length>0){var b=y._queue[0];b.event===m&&(y._queue.shift(),y._loadQueue()),m||b.action()}return y},_ended:function(m){var y=this,b=m._sprite;if(!y._webAudio&&m._node&&!m._node.paused&&!m._node.ended&&m._node.currentTime=0;S--){if(b<=y)return;m._sounds[S]._ended&&(m._webAudio&&m._sounds[S]._node&&m._sounds[S]._node.disconnect(0),m._sounds.splice(S,1),b--)}}},_getSoundIds:function(m){var y=this;if(typeof m>"u"){for(var b=[],S=0;S=0;if(r._scratchBuffer&&m.bufferSource&&(m.bufferSource.onended=null,m.bufferSource.disconnect(0),b))try{m.bufferSource.buffer=r._scratchBuffer}catch(S){}return m.bufferSource=null,y},_clearSound:function(m){var y=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);y||(m.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var o=function(m){this._parent=m,this.init()};o.prototype={init:function(){var m=this,y=m._parent;return m._muted=y._muted,m._loop=y._loop,m._volume=y._volume,m._rate=y._rate,m._seek=0,m._paused=!0,m._ended=!0,m._sprite="__default",m._id=++r._counter,y._sounds.push(m),m.create(),m},create:function(){var m=this,y=m._parent,b=r._muted||m._muted||m._parent._muted?0:m._volume;return y._webAudio?(m._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),m._node.gain.setValueAtTime(b,r.ctx.currentTime),m._node.paused=!0,m._node.connect(r.masterGain)):r.noAudio||(m._node=r._obtainHtml5Audio(),m._errorFn=m._errorListener.bind(m),m._node.addEventListener("error",m._errorFn,!1),m._loadFn=m._loadListener.bind(m),m._node.addEventListener(r._canPlayEvent,m._loadFn,!1),m._endFn=m._endListener.bind(m),m._node.addEventListener("ended",m._endFn,!1),m._node.src=y._src,m._node.preload=y._preload===!0?"auto":y._preload,m._node.volume=b*r.volume(),m._node.load()),m},reset:function(){var m=this,y=m._parent;return m._muted=y._muted,m._loop=y._loop,m._volume=y._volume,m._rate=y._rate,m._seek=0,m._rateSeek=0,m._paused=!0,m._ended=!0,m._sprite="__default",m._id=++r._counter,m},_errorListener:function(){var m=this;m._parent._emit("loaderror",m._id,m._node.error?m._node.error.code:0),m._node.removeEventListener("error",m._errorFn,!1)},_loadListener:function(){var m=this,y=m._parent;y._duration=Math.ceil(m._node.duration*10)/10,Object.keys(y._sprite).length===0&&(y._sprite={__default:[0,y._duration*1e3]}),y._state!=="loaded"&&(y._state="loaded",y._emit("load"),y._loadQueue()),m._node.removeEventListener(r._canPlayEvent,m._loadFn,!1)},_endListener:function(){var m=this,y=m._parent;y._duration===1/0&&(y._duration=Math.ceil(m._node.duration*10)/10,y._sprite.__default[1]===1/0&&(y._sprite.__default[1]=y._duration*1e3),y._ended(m)),m._node.removeEventListener("ended",m._endFn,!1)}};var a={},l=function(m){var y=m._src;if(a[y]){m._duration=a[y].duration,d(m);return}if(/^data:[^;]+;base64,/.test(y)){for(var b=atob(y.split(",")[1]),S=new Uint8Array(b.length),A=0;A0?(a[y._src]=A,d(y,A)):b()};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(m).then(S).catch(b):r.ctx.decodeAudioData(m,S,b)},d=function(m,y){y&&!m._duration&&(m._duration=y.duration),Object.keys(m._sprite).length===0&&(m._sprite={__default:[0,m._duration*1e3]}),m._state!=="loaded"&&(m._state="loaded",m._emit("load"),m._loadQueue())},g=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=!1}catch(A){r.usingWebAudio=!1}r.ctx||(r.usingWebAudio=!1);var m=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),y=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),b=y?parseInt(y[1],10):null;if(m&&b&&b<9){var S=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!S&&(r.usingWebAudio=!1)}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup()}};i.Howler=r,i.Howl=s,typeof commonjsGlobal<"u"?(commonjsGlobal.HowlerGlobal=e,commonjsGlobal.Howler=r,commonjsGlobal.Howl=s,commonjsGlobal.Sound=o):typeof window<"u"&&(window.HowlerGlobal=e,window.Howler=r,window.Howl=s,window.Sound=o)})();/*! * 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(r){var s=this;if(!s.ctx||!s.ctx.listener)return s;for(var o=s._howls.length-1;o>=0;o--)s._howls[o].stereo(r);return s},HowlerGlobal.prototype.pos=function(r,s,o){var a=this;if(!a.ctx||!a.ctx.listener)return a;if(s=typeof s!="number"?a._pos[1]:s,o=typeof o!="number"?a._pos[2]:o,typeof r=="number")a._pos=[r,s,o],typeof a.ctx.listener.positionX<"u"?(a.ctx.listener.positionX.setTargetAtTime(a._pos[0],Howler.ctx.currentTime,.1),a.ctx.listener.positionY.setTargetAtTime(a._pos[1],Howler.ctx.currentTime,.1),a.ctx.listener.positionZ.setTargetAtTime(a._pos[2],Howler.ctx.currentTime,.1)):a.ctx.listener.setPosition(a._pos[0],a._pos[1],a._pos[2]);else return a._pos;return a},HowlerGlobal.prototype.orientation=function(r,s,o,a,l,u){var c=this;if(!c.ctx||!c.ctx.listener)return c;var d=c._orientation;if(s=typeof s!="number"?d[1]:s,o=typeof o!="number"?d[2]:o,a=typeof a!="number"?d[3]:a,l=typeof l!="number"?d[4]:l,u=typeof u!="number"?d[5]:u,typeof r=="number")c._orientation=[r,s,o,a,l,u],typeof c.ctx.listener.forwardX<"u"?(c.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),c.ctx.listener.forwardY.setTargetAtTime(s,Howler.ctx.currentTime,.1),c.ctx.listener.forwardZ.setTargetAtTime(o,Howler.ctx.currentTime,.1),c.ctx.listener.upX.setTargetAtTime(a,Howler.ctx.currentTime,.1),c.ctx.listener.upY.setTargetAtTime(l,Howler.ctx.currentTime,.1),c.ctx.listener.upZ.setTargetAtTime(u,Howler.ctx.currentTime,.1)):c.ctx.listener.setOrientation(r,s,o,a,l,u);else return d;return c},Howl.prototype.init=function(r){return function(s){var o=this;return o._orientation=s.orientation||[1,0,0],o._stereo=s.stereo||null,o._pos=s.pos||null,o._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},o._onstereo=s.onstereo?[{fn:s.onstereo}]:[],o._onpos=s.onpos?[{fn:s.onpos}]:[],o._onorientation=s.onorientation?[{fn:s.onorientation}]:[],r.call(this,s)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,s){var o=this;if(!o._webAudio)return o;if(o._state!=="loaded")return o._queue.push({event:"stereo",action:function(){o.stereo(r,s)}}),o;var a=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof s>"u")if(typeof r=="number")o._stereo=r,o._pos=[r,0,0];else return o._stereo;for(var l=o._getSoundIds(s),u=0;u"u")if(typeof r=="number")l._pos=[r,s,o];else return l._pos;for(var u=l._getSoundIds(a),c=0;c"u")if(typeof r=="number")l._orientation=[r,s,o];else return l._orientation;for(var u=l._getSoundIds(a),c=0;c"u"&&(o.pannerAttr||(o.pannerAttr={coneInnerAngle:o.coneInnerAngle,coneOuterAngle:o.coneOuterAngle,coneOuterGain:o.coneOuterGain,distanceModel:o.distanceModel,maxDistance:o.maxDistance,refDistance:o.refDistance,rolloffFactor:o.rolloffFactor,panningModel:o.panningModel}),r._pannerAttr={coneInnerAngle:typeof o.pannerAttr.coneInnerAngle<"u"?o.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof o.pannerAttr.coneOuterAngle<"u"?o.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof o.pannerAttr.coneOuterGain<"u"?o.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof o.pannerAttr.distanceModel<"u"?o.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof o.pannerAttr.maxDistance<"u"?o.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof o.pannerAttr.refDistance<"u"?o.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof o.pannerAttr.rolloffFactor<"u"?o.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof o.pannerAttr.panningModel<"u"?o.pannerAttr.panningModel:r._panningModel});else return l=r._soundById(parseInt(s[0],10)),l?l._pannerAttr:r._pannerAttr;else s.length===2&&(o=s[0],a=parseInt(s[1],10));for(var u=r._getSoundIds(a),c=0;c{var r,s;if(!midiData.playing)return;const i=state$1.times[midiData.index];if(!i)return;midiData.index++;const e=i.endtime-i.time;(s=(r=midiData.iframeRef)==null?void 0:r.contentWindow)==null||s.playNote(i.realKey,e),timer=setTimeout(()=>{playNote()},e/midiData.rate*1e3)},hanldeInitMidiData=i=>{midiData.iframeRef=i},hanldeSetMidiPlaybackRate=i=>{midiData.rate=i},setMidiCurrentTime=i=>{clearTimeout(timer),midiData.index=i,playNote()},scoreMode="_scoreMode_6lpfe_1",tipBox="_tipBox_6lpfe_5",tipContent="_tipContent_6lpfe_15",tipBtn="_tipBtn_6lpfe_18",hiddenPop="_hiddenPop_6lpfe_28",styles$g={scoreMode,tipBox,tipContent,tipBtn,hiddenPop};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]",isFunction$2=i=>typeof i=="function",isArray$2=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,removeItem=(i,e)=>{if(i.length){const r=i.indexOf(e);if(r>-1)return i.splice(r,1)}},inBrowser=()=>typeof window<"u",camelize=i=>i.replace(/-(\w)/g,(e,r)=>r.toUpperCase());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",""),r=window.getComputedStyle(document.documentElement).fontSize;return e*parseFloat(r)}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 r=toSizeUnit(i),s=r.match(/(vh|%|rem|px|vw)$/)[0];return""+parseFloat(r)*e+s}};function supportTouch(){var i=typeof window<"u";return i&&"ontouchstart"in window}function useMounted(i){let e=!1;onMounted(()=>{i(),nextTick(()=>{e=!0})}),onActivated(()=>{e&&i()})}function useEventListener(i,e,r,s={}){if(!inBrowser())return;const{passive:o=!1,capture:a=!1}=s;let l=!1,u=!1;const c=y=>{if(l||u)return;const b=unref(y);b&&(b.addEventListener(e,r,{passive:o,capture:a}),l=!0)},d=y=>{if(!l||u)return;const b=unref(y);b&&(b.removeEventListener(e,r,{capture:a}),l=!1)};let g;isRef(i)&&(g=watch(()=>i.value,(y,b)=>{d(b),c(y)}));const m=()=>{g==null||g(),d(i),u=!0};return useMounted(()=>{c(i)}),onBeforeUnmount(()=>{d(i)}),onDeactivated(()=>{d(i)}),m}var __rest=globalThis&&globalThis.__rest||function(i,e){var r={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&e.indexOf(s)<0&&(r[s]=i[s]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(i);or.indexOf(l)),parentProvider:a,bindParent:d=>{onMounted(()=>{nextTick().then(()=>{s(l,d)})}),onBeforeUnmount(()=>{nextTick().then(()=>{o(l,d)})})}}}function flatVNodes(i){const e=[],r=s=>{if(s!=null&&s.component){r(s==null?void 0:s.component.subTree);return}Array.isArray(s==null?void 0:s.children)&&s.children.forEach(o=>{isVNode(o)&&(e.push(o),r(o))})};return r(i),e}function useChildren(i){const e=getCurrentInstance(),r=reactive([]),s=[],o=computed(()=>r.length),a=()=>{const d=flatVNodes(e.subTree);r.sort((g,m)=>d.indexOf(g.vnode)-d.indexOf(m.vnode))},l=(d,g)=>{r.push(d),s.push(g),a()},u=(d,g)=>{removeItem(r,d),removeItem(s,g)};return{length:o,childProviders:s,bindChildren:d=>{provide(i,Object.assign({childInstances:r,collect:l,clear:u},d))}}}function asyncGeneratorStep$1(i,e,r,s,o,a,l){try{var u=i[a](l),c=u.value}catch(d){r(d);return}u.done?e(c):Promise.resolve(c).then(s,o)}function _asyncToGenerator$1(i){return function(){var e=this,r=arguments;return new Promise(function(s,o){var a=i.apply(e,r);function l(c){asyncGeneratorStep$1(a,s,o,l,u,"next",c)}function u(c){asyncGeneratorStep$1(a,s,o,l,u,"throw",c)}l(void 0)})}}function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(i){for(var e=1;e(r[s]=i[s],r),{}):i[e]}function mount(i){var e=createApp(i),r=document.createElement("div");return document.body.appendChild(r),{instance:e.mount(r),unmount(){e.unmount(),document.body.removeChild(r)}}}function mountInstance(i,e,r){e===void 0&&(e={}),r===void 0&&(r={});var s={setup(){return()=>h$1(i,_extends$5({},e,r))}},{unmount:o}=mount(s);return{unmountInstance:o}}function useValidation(){var i=ref(""),e=function(){var o=_asyncToGenerator$1(function*(a,l,u){if(!isArray$2(a)||!a.length)return!0;var c=yield Promise.all(a.map(d=>d(l,u)));return!c.some(d=>d!==!0?(i.value=String(d),!0):!1)});return function(l,u,c){return o.apply(this,arguments)}}(),r=()=>{i.value=""},s=function(){var o=_asyncToGenerator$1(function*(a,l,u,c,d){a.includes(l)&&(yield e(u,c,d))&&(i.value="")});return function(l,u,c,d,g){return o.apply(this,arguments)}}();return{errorMessage:i,validate:e,resetValidation:r,validateWithTrigger:s}}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",r=e+"-"+i,s=a=>a?a[0]==="$"?a.replace("$",e):a.startsWith("--")?""+r+a:r+"__"+a:r,o=function(){for(var a=arguments.length,l=new Array(a),u=0;u{if(isArray$2(c)){var[d,g,m=null]=c;return d?g:m}return c})};return{n:s,classes:o}}function call(i){for(var e=arguments.length,r=new Array(e>1?e-1:0),s=1;so(...r));if(i)return i(...r)}function defineListenerProp(i){return{type:[Function,Array],default:i}}function formatElevation(i,e){return i===!1?null:(i===!0&&e&&(i=e),"var-elevation--"+i)}function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(i){for(var e=1;e{e.tasker=null;var{x:s,y:o,centerX:a,centerY:l,size:u}=computeRippleStyles(this,i),c=document.createElement("div");c.classList.add(n$9()),c.style.opacity="0",c.style.transform="translate("+s+"px, "+o+"px) scale3d(.3, .3, .3)",c.style.width=u+"px",c.style.height=u+"px",e.color&&(c.style.backgroundColor=e.color),c.dataset.createdAt=String(performance.now()),setStyles(this),this.appendChild(c),window.setTimeout(()=>{c.style.transform="translate("+a+"px, "+l+"px) scale3d(1, 1, 1)",c.style.opacity=".25"},20)};e.tasker=window.setTimeout(r,30)}}function removeRipple(){var i=this._ripple,e=()=>{var r=this.querySelectorAll("."+n$9());if(r.length){var s=r[r.length-1],o=ANIMATION_DURATION-performance.now()+Number(s.dataset.createdAt);window.setTimeout(()=>{s.style.opacity="0",window.setTimeout(()=>{var a;return(a=s.parentNode)==null?void 0:a.removeChild(s)},ANIMATION_DURATION)},o)}};i.tasker?window.setTimeout(e,30):e()}function forbidRippleTask(){if(!(!supportTouch()||!Context.enableRipple)){var i=this._ripple;i.tasker&&window.clearTimeout(i.tasker),i.tasker=null}}function mounted$1(i,e){var r;i._ripple=_extends$4({tasker:null},(r=e.value)!=null?r:{},{removeRipple:removeRipple.bind(i)}),i.addEventListener("touchstart",createRipple,{passive:!0}),i.addEventListener("touchmove",forbidRippleTask,{passive:!0}),i.addEventListener("dragstart",removeRipple,{passive:!0}),document.addEventListener("touchend",i._ripple.removeRipple,{passive:!0}),document.addEventListener("touchcancel",i._ripple.removeRipple,{passive:!0})}function unmounted$1(i){i.removeEventListener("touchstart",createRipple),i.removeEventListener("touchmove",forbidRippleTask),i.removeEventListener("dragstart",removeRipple),document.removeEventListener("touchend",i._ripple.removeRipple),document.removeEventListener("touchcancel",i._ripple.removeRipple)}function updated$1(i,e){var r,s,o,a,l={color:(r=e.value)==null?void 0:r.color,disabled:(s=e.value)==null?void 0:s.disabled},u=l.color!==((o=i._ripple)==null?void 0:o.color)||l.disabled!==((a=i._ripple)==null?void 0:a.disabled);if(u){var c,d;i._ripple=_extends$4({tasker:l.disabled?null:(c=i._ripple)==null?void 0:c.tasker,removeRipple:(d=i._ripple)==null?void 0:d.removeRipple},l)}}var Ripple={mounted:mounted$1,unmounted:unmounted$1,updated:updated$1,install(i){i.directive("ripple",this)}};const Ripple$1=Ripple;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:r}=getCurrentInstance();e&&watch(e,s=>{s===!1?releaseLock(r):s===!0&&i()===!0&&addLock(r)}),watch(i,s=>{e&&e()===!1||(s===!0?addLock(r):releaseLock(r))}),onBeforeMount(()=>{e&&e()===!1||i()===!0&&addLock(r)}),onUnmounted(()=>{e&&e()===!1||i()===!0&&releaseLock(r)}),onActivated(()=>{e&&e()===!1||i()===!0&&addLock(r)}),onDeactivated(()=>{e&&e()===!1||i()===!0&&releaseLock(r)})}function useZIndex(i,e){var r=ref(Context.zIndex);return watch(i,s=>{s&&(Context.zIndex+=e,r.value=Context.zIndex)},{immediate:!0}),{zIndex:r}}var props$8={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,r,s,o,a,l){try{var u=i[a](l),c=u.value}catch(d){r(d);return}u.done?e(c):Promise.resolve(c).then(s,o)}function _asyncToGenerator(i){return function(){var e=this,r=arguments;return new Promise(function(s,o){var a=i.apply(e,r);function l(c){asyncGeneratorStep(a,s,o,l,u,"next",c)}function u(c){asyncGeneratorStep(a,s,o,l,u,"throw",c)}l(void 0)})}}var{n:n$8,classes:classes$6}=createNamespace("icon");function __render__$8(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__$8=defineComponent({name:"VarIcon",props:props$8,setup(i){var e=ref(""),r=ref(!1),s=function(){var o=_asyncToGenerator(function*(a,l){var{transition:u}=i;if(l==null||toNumber(u)===0){e.value=a;return}r.value=!0,yield nextTick(),setTimeout(()=>{l!=null&&(e.value=a),r.value=!1},toNumber(u))});return function(l,u){return o.apply(this,arguments)}}();return watch(()=>i.name,s,{immediate:!0}),{n:n$8,classes:classes$6,nextName:e,animateInProgress:r,isURL,toNumber,toSizeUnit}}});__sfc__$8.render=__render__$8;const Icon=__sfc__$8;Icon.install=function(i){i.component(Icon.name,Icon)};function typeValidator$3(i){return["circle","wave","cube","rect","disappear"].includes(i)}function sizeValidator$2(i){return["normal","mini","small","large"].includes(i)}var props$7={type:{type:String,default:"circle",validator:typeValidator$3},radius:{type:[String,Number]},size:{type:String,default:"normal",validator:sizeValidator$2},color:{type:String},description:{type:String},loading:{type:Boolean,default:!1}},{n:n$7,classes:classes$5}=createNamespace("loading"),_withScopeId=i=>(pushScopeId(""),i=i(),popScopeId(),i),_hoisted_1$3=_withScopeId(()=>createBaseVNode("svg",{viewBox:"25 25 50 50"},[createBaseVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none"})],-1)),_hoisted_2$1=[_hoisted_1$3];function __render__$7(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$1,6)],2)):createCommentVNode("v-if",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(i.loadingTypeDict,(r,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(r,o=>(openBlock(),createElementBlock("div",{key:o+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__$7=defineComponent({name:"VarLoading",props:props$7,setup(i,e){var{slots:r}=e,s={wave:5,cube:4,rect:8,disappear:3},o=computed(()=>call(r.default)?i.loading:!0);return{n:n$7,classes:classes$5,multiplySizeUnit,loadingTypeDict:s,isShow:o}}});__sfc__$7.render=__render__$7;const Loading$1=__sfc__$7;Loading$1.install=function(i){i.component(Loading$1.name,Loading$1)};var props$6={hovering:{type:Boolean,default:!0}},{n:n$6,classes:classes$4}=createNamespace("hover-overlay");function __render__$6(i,e){return openBlock(),createElementBlock("div",{class:normalizeClass(i.classes(i.n(),[i.hovering,i.n("--hovering")]))},null,2)}var __sfc__$6=defineComponent({name:"VarHoverOverlay",props:props$6,setup(){return{n:n$6,classes:classes$4}}});__sfc__$6.render=__render__$6;const HoverOverlay=__sfc__$6;HoverOverlay.install=function(i){i.component(HoverOverlay.name,HoverOverlay)};function useHoverOverlay(){var i=ref(!1),e=r=>{i.value=r};return{hovering:i,handleHovering:e}}function shouldDisabled(i){if(!i)return!1;var e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);return!!(i==="desktop"&&e||i==="mobile"&&!e)}function getStyle(i){var e=i.getAttribute("style");return e?e.split(";").filter(Boolean).reduce((r,s)=>{var[o,a]=s.split(":").map(l=>l.trim());return r[camelize(o)]=a,r},{}):{}}function updateRawStyle(i){var{value:e}=i._hover,r=getStyle(i);Object.keys(e).forEach(s=>{var o=camelize(s),a=e[o];a!=null&&r[o]&&(i._hover.rawStyle[o]=r[o])})}function updateStyle(i,e){Object.keys(e).forEach(r=>{var s=e[r];s!=null&&(i.style[r]=s)})}function clearStyle(i){Object.keys(i._hover.value).forEach(e=>{var r=i._hover.value[e];r!=null&&(i.style[e]="")})}function restoreStyle(i){clearStyle(i),updateStyle(i,i._hover.rawStyle)}function createHover(){var{value:i}=this._hover;if(this._hover.hovering=!0,isFunction$2(i)){i(this._hover.hovering);return}updateStyle(this,i)}function removeHover(){if(this._hover.hovering=!1,isFunction$2(this._hover.value)){this._hover.value(this._hover.hovering);return}restoreStyle(this)}function mounted(i,e){var r,s,{arg:o,value:a}=e;shouldDisabled(o)||(i._hover={value:a,hovering:(r=(s=i._hover)==null?void 0:s.hovering)!=null?r:!1,rawStyle:{}},updateRawStyle(i),i.addEventListener("mouseenter",createHover),i.addEventListener("mouseleave",removeHover))}function unmounted(i,e){shouldDisabled(e.arg)||(restoreStyle(i),i.removeEventListener("mouseenter",createHover),i.removeEventListener("mouseleave",removeHover))}function beforeUpdate(i,e){i._hover&&unmounted(i,e)}function shouldUpdateStyle(i,e){return!isFunction$2(e.value)&&i._hover.hovering}function updated(i,e){mounted(i,e),shouldUpdateStyle(i,e)&&updateStyle(i,e.value)}var Hover={mounted,unmounted,beforeUpdate,updated,install(i){i.directive("hover",this)}};const Hover$1=Hover;function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(i){for(var e=1;e{if(!r)return{elevation:formatElevation(i.elevation,2),type:i.type!=null?i.type:"default",size:i.size!=null?i.size:"normal",color:i.color,text:i.text,textColor:i.textColor,outline:i.outline};var{type:d,size:g,color:m,textColor:y,mode:b}=r;return{elevation:"",type:i.type!=null?i.type:d.value,size:i.size!=null?i.size:g.value,color:i.color!=null?i.color:m.value,textColor:i.textColor!=null?i.textColor:y.value,text:b.value!=="normal",outline:b.value==="outline"}}),l=d=>{i.autoLoading&&(e.value=!0,d=isArray$2(d)?d:[d],Promise.all(d).then(()=>{e.value=!1}).catch(()=>{e.value=!1}))},u=d=>{var{loading:g,disabled:m,onClick:y}=i;!y||g||m||e.value||l(call(y,d))},c=d=>{var{loading:g,disabled:m,onTouchstart:y}=i;!y||g||m||e.value||l(call(y,d))};return{n:n$5,classes:classes$3,pending:e,states:a,hovering:s,handleHovering:o,handleClick:u,handleTouchstart:c}}});__sfc__$5.render=__render__$5;const Button=__sfc__$5;Button.install=function(i){i.component(Button.name,Button)};function typeValidator$1(i){return["default","primary","info","success","warning","danger"].includes(i)}function sizeValidator(i){return["normal","mini","small","large"].includes(i)}function modeValidator(i){return["normal","text","outline"].includes(i)}var props$4={type:{type:String,default:"default",validator:typeValidator$1},size:{type:String,default:"normal",validator:sizeValidator},color:{type:String},textColor:{type:String},mode:{type:String,default:"normal",validator:modeValidator},elevation:{type:[Boolean,Number,String],default:!0},vertical:{type:Boolean,default:!1}},{n:n$4,classes:classes$2}=createNamespace("button-group");function __render__$4(i,e){return openBlock(),createElementBlock("div",{class:normalizeClass(i.classes(i.n(),i.n("$--box"),[i.mode,""+i.n("--mode-"+i.mode)],[i.vertical,i.n("--vertical"),i.n("--horizontal")],[i.mode==="normal",i.formatElevation(i.elevation,2)]))},[renderSlot(i.$slots,"default")],2)}var __sfc__$4=defineComponent({name:"VarButtonGroup",props:props$4,setup(i){var{bindButtons:e}=useButtons(),r={elevation:computed(()=>i.elevation),type:computed(()=>i.type),size:computed(()=>i.size),color:computed(()=>i.color),textColor:computed(()=>i.textColor),mode:computed(()=>i.mode)};return e(r),{n:n$4,classes:classes$2,formatElevation}}});__sfc__$4.render=__render__$4;const ButtonGroup=__sfc__$4;ButtonGroup.install=function(i){i.component(ButtonGroup.name,ButtonGroup)};var props$3={errorMessage:{type:String,default:""},extraMessage:{type:String,default:""}},{n:n$3}=createNamespace("form-details"),_hoisted_1$1={key:0},_hoisted_2={key:0};function __render__$3(i,e){return openBlock(),createBlock(Transition,{name:i.n()},{default:withCtx(()=>[i.errorMessage||i.extraMessage?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(i.n())},[createBaseVNode("div",{class:normalizeClass(i.n("error-message"))},[createVNode(Transition,{name:i.n("message")},{default:withCtx(()=>[i.errorMessage?(openBlock(),createElementBlock("div",_hoisted_1$1,toDisplayString(i.errorMessage),1)):createCommentVNode("v-if",!0)]),_:1},8,["name"])],2),createBaseVNode("div",{class:normalizeClass(i.n("extra-message"))},[createVNode(Transition,{name:i.n("message")},{default:withCtx(()=>[i.extraMessage?(openBlock(),createElementBlock("div",_hoisted_2,toDisplayString(i.extraMessage),1)):createCommentVNode("v-if",!0)]),_:1},8,["name"])],2)],2)):createCommentVNode("v-if",!0)]),_:1},8,["name"])}var __sfc__$3=defineComponent({name:"VarFormDetails",props:props$3,setup:()=>({n:n$3})});__sfc__$3.render=__render__$3;const FormDetails=__sfc__$3;FormDetails.install=function(i){i.component(FormDetails.name,FormDetails)};function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(i){for(var e=1;e{r(_extends$2({},a,{instance:s}))}:null;return{index:e,form:i,bindForm:o}}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(i){for(var e=1;e[createTextVNode(toDisplayString(i.content),1)])],2),createBaseVNode("div",{class:normalizeClass(i.n("action"))},[i.iconName?(openBlock(),createBlock(r,{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__$2=defineComponent({name:"VarSnackbarCore",components:{VarLoading:Loading$1,VarIcon:Icon},props:props$2,setup(i){var e=ref(null),{zIndex:r}=useZIndex(()=>i.show,1);useLock(()=>i.show,()=>i.lockScroll);var s=computed(()=>i.type==="loading"||i.forbidClick),o=computed(()=>i.type?ICON_TYPE_DICT[i.type]:""),a=()=>{e.value=setTimeout(()=>{i.type!=="loading"&&call(i["onUpdate:show"],!1)},i.duration)};return watch(()=>i.show,l=>{l?(call(i.onOpen),a()):l===!1&&(clearTimeout(e.value),call(i.onClose))}),watch(()=>i._update,()=>{clearTimeout(e.value),a()}),useMounted(()=>{i.show&&(call(i.onOpen),a())}),{SNACKBAR_TYPE,n:n$2,classes:classes$1,zIndex:r,iconName:o,isForbidClick:s}}});__sfc__$2.render=__render__$2;const VarSnackbarCore=__sfc__$2;var{n:n$1}=createNamespace("snackbar");function __render__$1(i,e){var r=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(r,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__$1=defineComponent({name:"VarSnackbar",components:{VarSnackbarCore},props:props$2,setup(){var{disabled:i}=useTeleport();return{n:n$1,disabled:i}}});__sfc__$1.render=__render__$1;const VarSnackbar=__sfc__$1;function _extends(){return _extends=Object.assign?Object.assign.bind():function(i){for(var e=1;e{},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:r,reactiveSnackOptions:s,_update:o}=e,a=document.querySelector(".var-transition-group");s.forbidClick||s.type==="loading"?a.classList.add("var-pointer-auto"):a.classList.remove("var-pointer-auto"),isAllowMultiple&&(s.position="top");var l=isAllowMultiple?"relative":"absolute",u=_extends({position:l},getTop(s.position));return createVNode(VarSnackbarCore,mergeProps(s,{key:r,style:u,"data-id":r,_update:o,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),r=reactive(_extends({},defaultOptions,e));r.show=!0,isMount||(isMount=!0,unmount=mountInstance(TransitionGroupHost).unmountInstance);var{length:s}=uniqSnackbarOptions,o={id:sid++,reactiveSnackOptions:r};if(s===0||isAllowMultiple)addUniqOption(o);else{var a="update-"+sid;updateUniqOption(r,a)}return{clear(){!isAllowMultiple&&uniqSnackbarOptions.length?uniqSnackbarOptions[0].reactiveSnackOptions.show=!1:r.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"),r=uniqSnackbarOptions.find(s=>s.id===toNumber(e));r&&call(r.reactiveSnackOptions.onOpened)}function removeUniqOption(i){i.parentElement&&i.parentElement.classList.remove("var-pointer-auto");var e=i.getAttribute("data-id"),r=uniqSnackbarOptions.find(o=>o.id===toNumber(e));r&&(r.animationEnd=!0,call(r.reactiveSnackOptions.onClosed));var s=uniqSnackbarOptions.every(o=>o.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[r]=uniqSnackbarOptions;r.reactiveSnackOptions=_extends({},r.reactiveSnackOptions,i),r._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;var props$1={modelValue:{default:!1},activeValue:{default:!0},inactiveValue:{default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},color:{type:String},loadingColor:{type:String},closeColor:{type:String},size:{type:[String,Number]},rules:{type:Array},ripple:{type:Boolean,default:!0},onClick:defineListenerProp(),onChange:defineListenerProp(),"onUpdate:modelValue":defineListenerProp()},{n,classes}=createNamespace("switch");function __render__(i,e){var r=resolveComponent("var-loading"),s=resolveComponent("var-hover-overlay"),o=resolveComponent("var-form-details"),a=resolveDirective("ripple"),l=resolveDirective("hover");return withDirectives((openBlock(),createElementBlock("div",{class:normalizeClass(i.n())},[createBaseVNode("div",{class:normalizeClass(i.classes(i.n("block"),[i.disabled||i.formDisabled,i.n("--disabled")])),onClick:e[0]||(e[0]=function(){return i.switchActive&&i.switchActive(...arguments)}),style:normalizeStyle(i.styleComputed.switch)},[createBaseVNode("div",{style:normalizeStyle(i.styleComputed.track),class:normalizeClass(i.classes(i.n("track"),[i.modelValue===i.activeValue,i.n("track--active")],[i.errorMessage,i.n("track--error")]))},null,6),withDirectives((openBlock(),createElementBlock("div",{class:normalizeClass(i.classes(i.n("ripple"),[i.modelValue===i.activeValue,i.n("ripple--active")])),style:normalizeStyle(i.styleComputed.ripple)},[createBaseVNode("div",{style:normalizeStyle(i.styleComputed.handle),class:normalizeClass(i.classes(i.n("handle"),i.n("$-elevation--2"),[i.modelValue===i.activeValue,i.n("handle--active")],[i.errorMessage,i.n("handle--error")]))},[i.loading?(openBlock(),createBlock(r,{key:0,radius:i.radius,color:"currentColor"},null,8,["radius"])):createCommentVNode("v-if",!0)],6),createVNode(s,{hovering:i.hovering},null,8,["hovering"])],6)),[[a,{disabled:!i.ripple||i.disabled||i.loading||i.formDisabled}]])],6),createVNode(o,{"error-message":i.errorMessage},null,8,["error-message"])],2)),[[l,i.hover,"desktop"]])}var __sfc__=defineComponent({name:"VarSwitch",components:{VarLoading:Loading$1,VarFormDetails:FormDetails,VarHoverOverlay:HoverOverlay},directives:{Ripple:Ripple$1,Hover:Hover$1},props:props$1,setup(i){var{bindForm:e,form:r}=useForm(),{errorMessage:s,validateWithTrigger:o,validate:a,resetValidation:l}=useValidation(),{hovering:u,handleHovering:c}=useHoverOverlay(),d=()=>a(i.rules,i.modelValue),g=()=>nextTick(()=>o(["onChange"],"onChange",i.rules,i.modelValue)),m=computed(()=>{var{size:x,modelValue:P,color:C,closeColor:T,loadingColor:_,activeValue:B}=i;return{handle:{width:multiplySizeUnit(x),height:multiplySizeUnit(x),backgroundColor:P===B?C:T,color:_},ripple:{left:P===B?multiplySizeUnit(x,.5):"-"+multiplySizeUnit(x,.5),color:P===B?C:T||"#999",width:multiplySizeUnit(x,2),height:multiplySizeUnit(x,2)},track:{height:multiplySizeUnit(x,.72),width:multiplySizeUnit(x,1.9),borderRadius:multiplySizeUnit(x,2/3),filter:P===B||s!=null&&s.value?void 0:"brightness(.6)",backgroundColor:P===B?C:T},switch:{height:multiplySizeUnit(x,1.2),width:multiplySizeUnit(x,2)}}}),y=computed(()=>{var{size:x="5.333vw"}=i;return multiplySizeUnit(x,.4)}),b=x=>{var{onClick:P,onChange:C,disabled:T,loading:_,readonly:B,modelValue:M,activeValue:N,inactiveValue:I,"onUpdate:modelValue":R}=i;if(call(P,x),!(T||_||B||r!=null&&r.disabled.value||r!=null&&r.readonly.value)){var F=M===N?I:N;call(C,F),call(R,F),g()}},S=x=>{i.disabled||r!=null&&r.disabled.value||c(x)},A=()=>{call(i["onUpdate:modelValue"],i.inactiveValue),l()},E={reset:A,validate:d,resetValidation:l};return call(e,E),{n,classes,switchActive:b,hovering:u,hover:S,radius:y,styleComputed:m,errorMessage:s,formDisabled:r==null?void 0:r.disabled,formReadonly:r==null?void 0:r.readonly}}});__sfc__.render=__render__;const Switch=__sfc__;Switch.install=function(i){i.component(Switch.name,Switch)};const Image1=""+new URL("../png/5-d8bfbf51.png",import.meta.url).href,Image2=""+new URL("../png/4-cfa387c7.png",import.meta.url).href,Image3=""+new URL("../png/3-d02c685a.png",import.meta.url).href,Image4=""+new URL("../png/2-5c4c2ef5.png",import.meta.url).href,Image5=""+new URL("../png/1-a0d5037d.png",import.meta.url).href,clx1=""+new URL("../svg/clx5-b3331931.svg",import.meta.url).href,clx2=""+new URL("../svg/clx4-7a8a1657.svg",import.meta.url).href,clx3=""+new URL("../svg/clx3-82262a8a.svg",import.meta.url).href,clx4=""+new URL("../svg/clx2-99f2ced3.svg",import.meta.url).href,clx5=""+new URL("../svg/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+mK82TVkTdJOxzdRNWGMdfpsyboRI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k1c7de+L1SYK8uJyR4xg5FovO1B2ukrPT3EbSoARLwATOkHQYgYlQMMbqRyaGaoJ7Tk/+cvRnZs0XBqNXd9gGWjzNIEpObRiBOfUHlYURwBipH21Ldpv0pC/WNTBqgDQN7MiyCzbrJEO5YQmaWsE8ARSBERzj9KMddPWaw7J5F3Ma40C37srLzqA0LAVmeaCgGIIiMUbpR1oS8czz7X4cMw40NefUXbldEntqM6NtWiYri4jWjn6Kva26HwxyceDGMnb7KhNRgmV5oJBlEVHb0Q4VMAkPHwQ0wi8xZDkW8zl4pmL7Ysz1b7oVvRudNtk26Ywa2wI33zcXjG0DEGJ6VemoRswGCr4gM6hF7EbPk8y5RPl518wvXewscCFEx1Q7aqU8oRY/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$1=[{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$1[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},dots="_dots_grcfh_1",dot="_dot_grcfh_1",hide="_hide_grcfh_21",styles$f={dots,dot,hide},tickData=reactive({list:[],len:0,tickEnd:!1,beatLengthInMilliseconds:0,state:"",source1:"",source2:"",index:0,show:!1});let _time;function closeTick(){tickData.show&&(_time&&clearTimeout(_time),tickData.tickEnd=!0,tickData.show=!1)}const handlePlay=(i,e)=>new Promise(r=>{_time=setTimeout(()=>{if(tickData.tickEnd){r(i);return}if(tickData.index++,e){const s=state$1.setting.beatVolume/100;e.volume=s,e.volume<=0||state$1.isOpenMetronome||state$1.isSingOpenMetronome?e.muted=!0:e.muted=!1,e.play()}r(i)},tickData.beatLengthInMilliseconds)}),audioData$2=reactive({tick:null,tock:null}),createAudio=i=>new Promise(e=>{const r=new Audio(i);r.load(),r.onloadedmetadata=()=>{e(r)},r.onerror=()=>{e(null)}}),handleInitTick=(i,e)=>{tickData.state="",tickData.beatLengthInMilliseconds=i,tickData.len=e},handleStartTick=async()=>{tickData.show=!0,tickData.tickEnd=!1,tickData.state!=="ok"&&(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?audioData$2.tick:i===tickData.len?null:audioData$2.tock;await handlePlay(i,e)}return tickData.show=!1,!0},Tick=defineComponent({name:"metronome",setup(){const i={top:"0px",left:"0px"};e();function e(){const r=document.querySelector("#musicAndSelection"),s=r==null?void 0:r.querySelector("#osmdSvgPage1"),o=s==null?void 0:s.querySelector(".staffline"),a=r==null?void 0:r.getBoundingClientRect(),l=s==null?void 0:s.getBoundingClientRect(),u=o==null?void 0:o.getBoundingClientRect();Object.assign(i,{top:((l==null?void 0:l.top)||0)-((a==null?void 0:a.top)||0)-18+"px",left:((u==null?void 0:u.left)||0)-((l==null?void 0:l.left)||0)+"px"})}return onMounted(()=>{Promise.all([createAudio(tickWav),createAudio(tockWav)]).then(([r,s])=>{r&&(audioData$2.tick=r),s&&(audioData$2.tock=s)})}),()=>tickData.show&&createVNode("div",{class:styles$f.dots,style:i},[Array.from({length:tickData.len}).map((r,s)=>createVNode("div",{class:[styles$f.dot,tickData.len-tickData.index<=s&&styles$f.hide]},null))])}}),fraction="_fraction_8vx8x_1",close$1="_close_8vx8x_11",bg="_bg_8vx8x_18",content$6="_content_8vx8x_21",title$3="_title_8vx8x_21",desc="_desc_8vx8x_29",btn$5="_btn_8vx8x_37",loadColumn="_loadColumn_8vx8x_42",loadIcon="_loadIcon_8vx8x_57",successIcon="_successIcon_8vx8x_61",styles$e={fraction,close:close$1,bg,content:content$6,title:title$3,desc,btn:btn$5,loadColumn,loadIcon,successIcon};var lottieExports={},lottie={get exports(){return lottieExports},set exports(i){lottieExports=i}};(function(module,exports){typeof navigator<"u"&&function(i,e){module.exports=e()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(i){return document.createElement(i)}function extendPrototype(i,e){var r,s=i.length,o;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(i,e){var r=RGBtoHSV(i[0]*255,i[1]*255,i[2]*255);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(i,e){var r=RGBtoHSV(i[0]*255,i[1]*255,i[2]*255);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var i=[],e,r;for(e=0;e<256;e+=1)r=e.toString(16),i[e]=r.length===1?"0"+r:r;return function(s,o,a){return s<0&&(s=0),o<0&&(o=0),a<0&&(a=0),"#"+i[s]+i[o]+i[a]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(i){return document.createElementNS(svgNS,i)}function _typeof$5(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(i)}var dataManager=function(){var i=1,e=[],r,s,o={onmessage:function(){},postMessage:function(b){r({data:b})}},a={postMessage:function(b){o.onmessage({data:b})}};function l(y){if(window.Worker&&window.Blob&&getWebWorker()){var b=new Blob(["var _workerSelf = self; self.onmessage = ",y.toString()],{type:"text/javascript"}),S=URL.createObjectURL(b);return new Worker(S)}return r=y,o}function u(){s||(s=l(function(b){function S(){function E($,O){var q,G,U=$.length,Z,W,K,ye;for(G=0;G=0;O-=1)if($[O].ty==="sh")if($[O].ks.k.i)_($[O].ks.k);else for(U=$[O].ks.k.length,G=0;Gq[0]?!0:q[0]>$[0]?!1:$[1]>q[1]?!0:q[1]>$[1]?!1:$[2]>q[2]?!0:q[2]>$[2]?!1:null}var M=function(){var $=[4,4,14];function O(G){var U=G.t.d;G.t.d={k:[{s:U,t:0}]}}function q(G){var U,Z=G.length;for(U=0;U=0;U-=1)if(G[U].ty==="sh")if(G[U].ks.k.i)G[U].ks.k.c=G[U].closed;else for(K=G[U].ks.k.length,W=0;W500)&&(this._imageLoaded(),clearInterval(C)),P+=1}.bind(this),50)}function a(x){var P=s(x,this.assetsPath,this.path),C=createNS("image");isSafari?this.testImageLoaded(C):C.addEventListener("load",this._imageLoaded,!1),C.addEventListener("error",function(){T.img=i,this._imageLoaded()}.bind(this),!1),C.setAttributeNS("http://www.w3.org/1999/xlink","href",P),this._elementHelper.append?this._elementHelper.append(C):this._elementHelper.appendChild(C);var T={img:C,assetData:x};return T}function l(x){var P=s(x,this.assetsPath,this.path),C=createTag("img");C.crossOrigin="anonymous",C.addEventListener("load",this._imageLoaded,!1),C.addEventListener("error",function(){T.img=i,this._imageLoaded()}.bind(this),!1),C.src=P;var T={img:C,assetData:x};return T}function u(x){var P={assetData:x},C=s(x,this.assetsPath,this.path);return dataManager.loadData(C,function(T){P.img=T,this._footageLoaded()}.bind(this),function(){P.img={},this._footageLoaded()}.bind(this)),P}function c(x,P){this.imagesLoadedCb=P;var C,T=x.length;for(C=0;Cthis.animationData.op&&(this.animationData.op=i.op,this.totalFrames=Math.floor(i.op-this.animationData.ip));var e=this.animationData.layers,r,s=e.length,o=i.layers,a,l=o.length;for(a=0;athis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(i){this.triggerRenderFrameError(i)}},AnimationItem.prototype.play=function(i){i&&this.name!==i||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(i){i&&this.name!==i||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(i){i&&this.name!==i||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(i){i&&this.name!==i||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(i){for(var e,r=0;r=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,e=0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(i,e){this.playCount=0,i[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=i[0]-i[1],this.timeCompleted=this.totalFrames,this.firstFrame=i[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):i[1]>i[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=i[1]-i[0],this.timeCompleted=this.totalFrames,this.firstFrame=i[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(i,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-i)),this.firstFrame=i,this.totalFrames=e-i,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(i,e){if(e&&(this.segments.length=0),_typeof$4(i[0])==="object"){var r,s=i.length;for(r=0;r=0;q-=1)e[q].animation.destroy(O)}function N(O,q,G){var U=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),Z,W=U.length;for(Z=0;Z0?T=N:C=N;while(Math.abs(M)>a&&++I=o?E(C,F,T,_):k===0?F:A(C,M,M+c,T,_)}},i}(),pooling=function(){function i(e){return e.concat(createSizedArray(e.length))}return{double:i}}(),poolFactory=function(){return function(i,e,r){var s=0,o=i,a=createSizedArray(o),l={newElement:u,release:c};function u(){var d;return s?(s-=1,d=a[s]):d=e(),d}function c(d){s===o&&(a=pooling.double(a),o*=2),r&&r(d),a[s]=d,s+=1}return l}}(),bezierLengthPool=function(){function i(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,i)}(),segmentsLengthPool=function(){function i(){return{lengths:[],totalLength:0}}function e(r){var s,o=r.lengths.length;for(s=0;s-.001&&P<.001}function r(y,b,S,A,E,x,P,C,T){if(S===0&&x===0&&T===0)return e(y,b,A,E,P,C);var _=i.sqrt(i.pow(A-y,2)+i.pow(E-b,2)+i.pow(x-S,2)),B=i.sqrt(i.pow(P-y,2)+i.pow(C-b,2)+i.pow(T-S,2)),M=i.sqrt(i.pow(P-A,2)+i.pow(C-E,2)+i.pow(T-x,2)),N;return _>B?_>M?N=_-B-M:N=M-B-_:M>B?N=M-B-_:N=B-_-M,N>-1e-4&&N<1e-4}var s=function(){return function(y,b,S,A){var E=getDefaultCurveSegments(),x,P,C,T,_,B=0,M,N=[],I=[],R=bezierLengthPool.newElement();for(C=S.length,x=0;xP?-1:1,_=!0;_;)if(A[x]<=P&&A[x+1]>P?(C=(P-A[x])/(A[x+1]-A[x]),_=!1):x+=T,x<0||x>=E-1){if(x===E-1)return S[x];_=!1}return S[x]+(S[x+1]-S[x])*C}function d(y,b,S,A,E,x){var P=c(E,x),C=1-P,T=i.round((C*C*C*y[0]+(P*C*C+C*P*C+C*C*P)*S[0]+(P*P*C+C*P*P+P*C*P)*A[0]+P*P*P*b[0])*1e3)/1e3,_=i.round((C*C*C*y[1]+(P*C*C+C*P*C+C*C*P)*S[1]+(P*P*C+C*P*P+P*C*P)*A[1]+P*P*P*b[1])*1e3)/1e3;return[T,_]}var g=createTypedArray("float32",8);function m(y,b,S,A,E,x,P){E<0?E=0:E>1&&(E=1);var C=c(E,P);x=x>1?1:x;var T=c(x,P),_,B=y.length,M=1-C,N=1-T,I=M*M*M,R=C*M*M*3,F=C*C*M*3,k=C*C*C,V=M*M*N,D=C*M*N+M*C*N+M*M*T,$=C*C*N+M*C*T+C*M*T,O=C*C*T,q=M*N*N,G=C*N*N+M*T*N+M*N*T,U=C*T*N+M*T*T+C*N*T,Z=C*T*T,W=N*N*N,K=T*N*N+N*T*N+N*N*T,ye=T*T*N+N*T*T+T*N*T,ae=T*T*T;for(_=0;_=d.t-r){c.h&&(c=d),o=0;break}if(d.t-r>i){o=a;break}a=x||i=x?T.points.length-1:0;for(y=T.points[_].point.length,m=0;m=N&&B=x)s[0]=C[0],s[1]=C[1],s[2]=C[2];else if(i<=P)s[0]=c.s[0],s[1]=c.s[1],s[2]=c.s[2];else{var D=createQuaternion(c.s),$=createQuaternion(C),O=(i-P)/(x-P);quaternionToEuler(s,slerp(D,$,O))}else for(a=0;a=x?b=1:i1e-6?(y=Math.acos(b),S=Math.sin(y),A=Math.sin((1-r)*y)/S,E=Math.sin(r*y)/S):(A=1-r,E=r),s[0]=A*o+E*c,s[1]=A*a+E*d,s[2]=A*l+E*g,s[3]=A*u+E*m,s}function quaternionToEuler(i,e){var r=e[0],s=e[1],o=e[2],a=e[3],l=Math.atan2(2*s*a-2*r*o,1-2*s*s-2*o*o),u=Math.asin(2*r*s+2*o*a),c=Math.atan2(2*r*a-2*s*o,1-2*r*r-2*o*o);i[0]=l/degToRads,i[1]=u/degToRads,i[2]=c/degToRads}function createQuaternion(i){var e=i[0]*degToRads,r=i[1]*degToRads,s=i[2]*degToRads,o=Math.cos(e/2),a=Math.cos(r/2),l=Math.cos(s/2),u=Math.sin(e/2),c=Math.sin(r/2),d=Math.sin(s/2),g=o*a*l-u*c*d,m=u*c*l+o*a*d,y=u*a*l+o*c*d,b=o*c*l-u*a*d;return[m,y,b,g]}function getValueAtCurrentTime(){var i=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(i===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&i>=r||this._caching.lastFrame=i&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(i,this._caching);this.pv=s}return this._caching.lastFrame=i,this.pv}function setVValue(i){var e;if(this.propType==="unidimensional")e=i*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var r=0,s=this.v.length;r1e-5&&(this.v[r]=e,this._mdf=!0),r+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var i,e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(i=0;i=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[s]||a[s]&&!o)&&(a[s]=pointPool.newElement()),a[s][0]=i,a[s][1]=e},ShapePath.prototype.setTripleAt=function(i,e,r,s,o,a,l,u){this.setXYAt(i,e,"v",l,u),this.setXYAt(r,s,"o",l,u),this.setXYAt(o,a,"i",l,u)},ShapePath.prototype.reverse=function(){var i=new ShapePath;i.setPathData(this.c,this._length);var e=this.v,r=this.o,s=this.i,o=0;this.c&&(i.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],r[0][0],r[0][1],0,!1),o=1);var a=this._length-1,l=this._length,u;for(u=o;u=D[D.length-1].t-this.offsetTime)_=D[D.length-1].s?D[D.length-1].s[0]:D[D.length-2].e[0],M=!0;else{for(var $=T,O=D.length-1,q=!0,G,U,Z;q&&(G=D[$],U=D[$+1],!(U.t-this.offsetTime>x));)$=U.t-this.offsetTime)k=1;else if(xC&&x>C)||(this._caching.lastIndex=T0||G>-1e-6&&G<0?s(G*U)/U:G}function q(){var G=this.props,U=O(G[0]),Z=O(G[1]),W=O(G[4]),K=O(G[5]),ye=O(G[12]),ae=O(G[13]);return"matrix("+U+","+Z+","+W+","+K+","+ye+","+ae+")"}return function(){this.reset=o,this.rotate=a,this.rotateX=l,this.rotateY=u,this.rotateZ=c,this.skew=g,this.skewFromAxis=m,this.shear=d,this.scale=y,this.setTransform=b,this.translate=S,this.transform=A,this.multiply=E,this.applyToPoint=_,this.applyToX=B,this.applyToY=M,this.applyToZ=N,this.applyToPointArray=V,this.applyToTriplePoints=k,this.applyToPointStringified=D,this.toCSS=$,this.to2dCSS=q,this.clone=C,this.cloneFromProps=T,this.equals=P,this.inversePoints=F,this.inversePoint=R,this.getInverseMatrix=I,this._t=this.transform,this.isIdentity=x,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(r){return typeof r}:_typeof$3=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$3(i)}var lottie={};function setLocation(i){setLocationHref(i)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(i){setSubframeEnabled(i)}function setPrefix(i){setIdPrefix(i)}function loadAnimation(i){return animationManager.loadAnimation(i)}function setQuality(i){if(typeof i=="string")switch(i){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(i)&&i>1&&setDefaultCurveSegments(i)}function inBrowser(){return typeof navigator<"u"}function installPlugin(i,e){i==="expressions"&&setExpressionsPlugin(e)}function getFactory(i){switch(i){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(i){for(var e=queryString.split("&"),r=0;r=1?a.push({s:i-1,e:e-1}):(a.push({s:i,e:1}),a.push({s:0,e:e-1}));var l=[],u,c=a.length,d;for(u=0;us+r)){var g,m;d.s*o<=s?g=0:g=(d.s*o-s)/r,d.e*o>=s+r?m=1:m=(d.e*o-s)/r,l.push([g,m])}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(i){var e,r=i.length;for(e=0;e1?e=1+s:this.s.v<0?e=0+s:e=this.s.v+s,this.e.v>1?r=1+s:this.e.v<0?r=0+s:r=this.e.v+s,e>r){var o=e;e=r,r=o}e=Math.round(e*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var a,l,u=this.shapes.length,c,d,g,m,y,b=0;if(r===e)for(l=0;l=0;l-=1)if(A=this.shapes[l],A.shape._mdf){for(E=A.localShapeCollection,E.releaseShapes(),this.m===2&&u>1?(T=this.calculateShapeEdges(e,r,A.totalShapeLength,C,b),C+=A.totalShapeLength):T=[[x,P]],d=T.length,c=0;c=1?S.push({s:A.totalShapeLength*(x-1),e:A.totalShapeLength*(P-1)}):(S.push({s:A.totalShapeLength*x,e:A.totalShapeLength}),S.push({s:0,e:A.totalShapeLength*(P-1)}));var _=this.addShapes(A,S[0]);if(S[0].s!==S[0].e){if(S.length>1){var B=A.shape.paths.shapes[A.shape.paths._length-1];if(B.c){var M=_.pop();this.addPaths(_,E),_=this.addShapes(A,S[1],M)}else this.addPaths(_,E),_=this.addShapes(A,S[1])}this.addPaths(_,E)}}A.shape.paths=E}}},TrimModifier.prototype.addPaths=function(i,e){var r,s=i.length;for(r=0;re.e){r.c=!1;break}else e.s<=d&&e.e>=d+g.addedLength?(this.addSegment(o[a].v[u-1],o[a].o[u-1],o[a].i[u],o[a].v[u],r,m,E),E=!1):(b=bez.getNewSegment(o[a].v[u-1],o[a].v[u],o[a].o[u-1],o[a].i[u],(e.s-d)/g.addedLength,(e.e-d)/g.addedLength,y[u-1]),this.addSegmentFromArray(b,r,m,E),E=!1,r.c=!1),d+=g.addedLength,m+=1;if(o[a].c&&y.length){if(g=y[u-1],d<=e.e){var x=y[u-1].addedLength;e.s<=d&&e.e>=d+x?(this.addSegment(o[a].v[u-1],o[a].o[u-1],o[a].i[0],o[a].v[0],r,m,E),E=!1):(b=bez.getNewSegment(o[a].v[u-1],o[a].v[0],o[a].o[u-1],o[a].i[0],(e.s-d)/x,(e.e-d)/x,y[u-1]),this.addSegmentFromArray(b,r,m,E),E=!1,r.c=!1)}else r.c=!1;d+=g.addedLength,m+=1}if(r._length&&(r.setXYAt(r.v[A][0],r.v[A][1],"i",A),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;a=this.p.keyframes[this.p.keyframes.length-1].t?(g=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/d,0),m=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/d,0)):(g=this.p.pv,m=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/d,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){g=[],m=[];var y=this.px,b=this.py;y._caching.lastFrame+y.offsetTime<=y.keyframes[0].t?(g[0]=y.getValueAtTime((y.keyframes[0].t+.01)/d,0),g[1]=b.getValueAtTime((b.keyframes[0].t+.01)/d,0),m[0]=y.getValueAtTime(y.keyframes[0].t/d,0),m[1]=b.getValueAtTime(b.keyframes[0].t/d,0)):y._caching.lastFrame+y.offsetTime>=y.keyframes[y.keyframes.length-1].t?(g[0]=y.getValueAtTime(y.keyframes[y.keyframes.length-1].t/d,0),g[1]=b.getValueAtTime(b.keyframes[b.keyframes.length-1].t/d,0),m[0]=y.getValueAtTime((y.keyframes[y.keyframes.length-1].t-.01)/d,0),m[1]=b.getValueAtTime((b.keyframes[b.keyframes.length-1].t-.01)/d,0)):(g=[y.pv,b.pv],m[0]=y.getValueAtTime((y._caching.lastFrame+y.offsetTime-.01)/d,y.offsetTime),m[1]=b.getValueAtTime((b._caching.lastFrame+b.offsetTime-.01)/d,b.offsetTime))}else m=i,g=m;this.v.rotate(-Math.atan2(g[1]-m[1],g[0]-m[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function s(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function o(){}function a(c){this._addDynamicProperty(c),this.elem.addDynamicProperty(c),this._isDirty=!0}function l(c,d,g){if(this.elem=c,this.frameId=-1,this.propType="transform",this.data=d,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(g||c),d.p&&d.p.s?(this.px=PropertyFactory.getProp(c,d.p.x,0,0,this),this.py=PropertyFactory.getProp(c,d.p.y,0,0,this),d.p.z&&(this.pz=PropertyFactory.getProp(c,d.p.z,0,0,this))):this.p=PropertyFactory.getProp(c,d.p||{k:[0,0,0]},1,0,this),d.rx){if(this.rx=PropertyFactory.getProp(c,d.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(c,d.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(c,d.rz,0,degToRads,this),d.or.k[0].ti){var m,y=d.or.k.length;for(m=0;m0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(i){var e,r=i.length;for(e=0;e0?Math.floor(y):Math.ceil(y),A=this.pMatrix.props,E=this.rMatrix.props,x=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var P=0;if(y>0){for(;PS;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;b&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-b,!0),P-=b)}s=this.data.m===1?0:this._currentCopies-1,o=this.data.m===1?1:-1,a=this._currentCopies;for(var C,T;a;){if(e=this.elemsData[s].it,r=e[e.length-1].transform.mProps.v.props,T=r.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(s/(this._currentCopies-1)),P!==0){for((s!==0&&o===1||s!==this._currentCopies-1&&o===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],E[8],E[9],E[10],E[11],E[12],E[13],E[14],E[15]),this.matrix.transform(x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15]),this.matrix.transform(A[0],A[1],A[2],A[3],A[4],A[5],A[6],A[7],A[8],A[9],A[10],A[11],A[12],A[13],A[14],A[15]),C=0;C0&&s<1?[e]:[]:[e-s,e+s].filter(function(o){return o>0&&o<1})},PolynomialBezier.prototype.split=function(i){if(i<=0)return[singlePoint(this.points[0]),this];if(i>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],i),r=lerpPoint(this.points[1],this.points[2],i),s=lerpPoint(this.points[2],this.points[3],i),o=lerpPoint(e,r,i),a=lerpPoint(r,s,i),l=lerpPoint(o,a,i);return[new PolynomialBezier(this.points[0],e,o,l,!0),new PolynomialBezier(l,a,s,this.points[3],!0)]};function extrema(i,e){var r=i.points[0][e],s=i.points[i.points.length-1][e];if(r>s){var o=s;s=r,r=o}for(var a=quadRoots(3*i.a[e],2*i.b[e],i.c[e]),l=0;l0&&a[l]<1){var u=i.point(a[l])[e];us&&(s=u)}return{min:r,max:s}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var i=this.bounds();return{left:i.x.min,right:i.x.max,top:i.y.min,bottom:i.y.max,width:i.x.max-i.x.min,height:i.y.max-i.y.min,cx:(i.x.max+i.x.min)/2,cy:(i.y.max+i.y.min)/2}};function intersectData(i,e,r){var s=i.boundingBox();return{cx:s.cx,cy:s.cy,width:s.width,height:s.height,bez:i,t:(e+r)/2,t1:e,t2:r}}function splitData(i){var e=i.bez.split(.5);return[intersectData(e[0],i.t1,i.t),intersectData(e[1],i.t,i.t2)]}function boxIntersect(i,e){return Math.abs(i.cx-e.cx)*2=a||i.width<=s&&i.height<=s&&e.width<=s&&e.height<=s){o.push([i.t,e.t]);return}var l=splitData(i),u=splitData(e);intersectsImpl(l[0],u[0],r+1,s,o,a),intersectsImpl(l[0],u[1],r+1,s,o,a),intersectsImpl(l[1],u[0],r+1,s,o,a),intersectsImpl(l[1],u[1],r+1,s,o,a)}}PolynomialBezier.prototype.intersections=function(i,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var s=[];return intersectsImpl(intersectData(this,0,1),intersectData(i,0,1),0,e,s,r),s},PolynomialBezier.shapeSegment=function(i,e){var r=(e+1)%i.length();return new PolynomialBezier(i.v[e],i.o[e],i.i[r],i.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(i,e){var r=(e+1)%i.length();return new PolynomialBezier(i.v[r],i.i[r],i.o[e],i.v[e],!0)};function crossProduct(i,e){return[i[1]*e[2]-i[2]*e[1],i[2]*e[0]-i[0]*e[2],i[0]*e[1]-i[1]*e[0]]}function lineIntersection(i,e,r,s){var o=[i[0],i[1],1],a=[e[0],e[1],1],l=[r[0],r[1],1],u=[s[0],s[1],1],c=crossProduct(crossProduct(o,a),crossProduct(l,u));return floatZero(c[2])?null:[c[0]/c[2],c[1]/c[2]]}function polarOffset(i,e,r){return[i[0]+Math.cos(e)*r,i[1]-Math.sin(e)*r]}function pointDistance(i,e){return Math.hypot(i[0]-e[0],i[1]-e[1])}function pointEqual(i,e){return floatEqual(i[0],e[0])&&floatEqual(i[1],e[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(i,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(i,e.s,0,null,this),this.frequency=PropertyFactory.getProp(i,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(i,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(i,e,r,s,o,a,l){var u=r-Math.PI/2,c=r+Math.PI/2,d=e[0]+Math.cos(r)*s*o,g=e[1]-Math.sin(r)*s*o;i.setTripleAt(d,g,d+Math.cos(u)*a,g-Math.sin(u)*a,d+Math.cos(c)*l,g-Math.sin(c)*l,i.length())}function getPerpendicularVector(i,e){var r=[e[0]-i[0],e[1]-i[1]],s=-Math.PI*.5,o=[Math.cos(s)*r[0]-Math.sin(s)*r[1],Math.sin(s)*r[0]+Math.cos(s)*r[1]];return o}function getProjectingAngle(i,e){var r=e===0?i.length()-1:e-1,s=(e+1)%i.length(),o=i.v[r],a=i.v[s],l=getPerpendicularVector(o,a);return Math.atan2(0,1)-Math.atan2(l[1],l[0])}function zigZagCorner(i,e,r,s,o,a,l){var u=getProjectingAngle(e,r),c=e.v[r%e._length],d=e.v[r===0?e._length-1:r-1],g=e.v[(r+1)%e._length],m=a===2?Math.sqrt(Math.pow(c[0]-d[0],2)+Math.pow(c[1]-d[1],2)):0,y=a===2?Math.sqrt(Math.pow(c[0]-g[0],2)+Math.pow(c[1]-g[1],2)):0;setPoint(i,e.v[r%e._length],u,l,s,y/((o+1)*2),m/((o+1)*2))}function zigZagSegment(i,e,r,s,o,a){for(var l=0;l1&&e.length>1&&(o=getIntersection(i[0],e[e.length-1]),o)?[[i[0].split(o[0])[0]],[e[e.length-1].split(o[1])[1]]]:[r,s]}function pruneIntersections(i){for(var e,r=1;r1&&(e=pruneSegmentIntersection(i[i.length-1],i[0]),i[i.length-1]=e[0],i[0]=e[1]),i}function offsetSegmentSplit(i,e){var r=i.inflectionPoints(),s,o,a,l;if(r.length===0)return[offsetSegment(i,e)];if(r.length===1||floatEqual(r[1],1))return a=i.split(r[0]),s=a[0],o=a[1],[offsetSegment(s,e),offsetSegment(o,e)];a=i.split(r[0]),s=a[0];var u=(r[1]-r[0])/(1-r[0]);return a=a[1].split(u),l=a[0],o=a[1],[offsetSegment(s,e),offsetSegment(l,e),offsetSegment(o,e)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(i,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(i,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(i,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(i,e,r,s){var o=shapePool.newElement();o.c=i.c;var a=i.length();i.c||(a-=1);var l,u,c,d=[];for(l=0;l=0;l-=1)c=PolynomialBezier.shapeSegmentInverted(i,l),d.push(offsetSegmentSplit(c,e));d=pruneIntersections(d);var g=null,m=null;for(l=0;l0&&(K=!1),K){var Y=createTag("style");Y.setAttribute("f-forigin",G[U].fOrigin),Y.setAttribute("f-origin",G[U].origin),Y.setAttribute("f-family",G[U].fFamily),Y.type="text/css",Y.innerText="@font-face {font-family: "+G[U].fFamily+"; font-style: normal; src: url('"+G[U].fPath+"');}",q.appendChild(Y)}}else if(G[U].fOrigin==="g"||G[U].origin===1){for(ye=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),ae=0;ae=55296&&G<=56319){var U=O.charCodeAt(1);U>=56320&&U<=57343&&(q=(G-55296)*1024+U-56320+65536)}return q}function B(O,q){var G=O.toString(16)+q.toString(16);return m.indexOf(G)!==-1}function M(O){return O===c}function N(O){return O===u}function I(O){var q=_(O);return q>=d&&q<=g}function R(O){return I(O.substr(0,2))&&I(O.substr(2,2))}function F(O){return r.indexOf(O)!==-1}function k(O,q){var G=_(O.substr(q,2));if(G!==s)return!1;var U=0;for(q+=2;U<5;){if(G=_(O.substr(q,2)),Gl)return!1;U+=1,q+=2}return _(O.substr(q,2))===o}function V(){this.isLoaded=!0}var D=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};D.isModifier=B,D.isZeroWidthJoiner=M,D.isFlagEmoji=R,D.isRegionalCode=I,D.isCombinedCharacter=F,D.isRegionalFlag=k,D.isVariationSelector=N,D.BLACK_FLAG_CODE_POINT=s;var $={addChars:x,addFonts:E,getCharData:P,getFontByName:T,measureText:C,checkLoadedFonts:S,setIsLoaded:V};return D.prototype=$,D}();function SlotManager(i){this.animationData=i}SlotManager.prototype.getProp=function(i){return this.animationData.slots&&this.animationData.slots[i.sid]?Object.assign(i,this.animationData.slots[i.sid].p):i};function slotFactory(i){return new SlotManager(i)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,r=this.renderableComponents.length;for(e=0;e.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(i){this.audio.rate(i)},AudioElement.prototype.volume=function(i){this._volumeMultiplier=i,this._previousVolume=i*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(i){var e,r=this.layers.length,s;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(s=this.layers[e],s.ip-s.st<=i-this.layers[e].st&&s.op-s.st>i-this.layers[e].st&&this.buildItem(e)),this.completeLayers=this.elements[e]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(i){switch(i.ty){case 2:return this.createImage(i);case 0:return this.createComp(i);case 1:return this.createSolid(i);case 3:return this.createNull(i);case 4:return this.createShape(i);case 5:return this.createText(i);case 6:return this.createAudio(i);case 13:return this.createCamera(i);case 15:return this.createFootage(i);default:return this.createNull(i)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(i){return new AudioElement(i,this.globalData,this)},BaseRenderer.prototype.createFootage=function(i){return new FootageElement(i,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var i,e=this.layers.length;for(i=0;i0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(P,"url("+getLocationHref()+"#"+y+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(i){return this.viewData[i].prop},MaskElement.prototype.renderFrame=function(i){var e=this.element.finalTransform.mat,r,s=this.masksProperties.length;for(r=0;r1&&(s+=" C"+e.o[o-1][0]+","+e.o[o-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==s){var l="";r.elem&&(e.c&&(l=i.inv?this.solidPath+s:s),r.elem.setAttribute("d",l)),r.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var i={};i.createFilter=e,i.createAlphaToLuminanceFilter=r;function e(s,o){var a=createNS("filter");return a.setAttribute("id",s),o!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function r(){var s=createNS("feColorMatrix");return s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),s}return i}(),featureSupport=function(){var i={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(i.maskType=!1),/firefox/i.test(navigator.userAgent)&&(i.svgLumaHidden=!1),i}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(i){var e,r="SourceGraphic",s=i.data.ef?i.data.ef.length:0,o=createElementID(),a=filtersFactory.createFilter(o,!0),l=0;this.filters=[];var u;for(e=0;e=0&&(s=this.shapeModifiers[e].processShapes(this._isFirstFrame),!s);e-=1);}},searchProcessedElement:function(e){for(var r=this.processedElements,s=0,o=r.length;s.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var i=0,e=this.data.k.k.length;i0;)x=y.transformers[I].mProps._mdf||x,N-=1,I-=1;if(x)for(N=_-y.styles[C].lvl,I=y.transformers.length-1;N>0;)M.multiply(y.transformers[I].mProps.v),N-=1,I-=1}else M=i;if(B=y.sh.paths,A=B._length,x){for(E="",S=0;S=1?V=.99:V<=-1&&(V=-.99);var D=F*V,$=Math.cos(k+y.a.v)*D+E[0],O=Math.sin(k+y.a.v)*D+E[1];S.setAttribute("fx",$),S.setAttribute("fy",O),A&&!y.g._collapsable&&(y.of.setAttribute("fx",$),y.of.setAttribute("fy",O))}}}function g(m,y,b){var S=y.style,A=y.d;A&&(A._mdf||b)&&A.dashStr&&(S.pElem.setAttribute("stroke-dasharray",A.dashStr),S.pElem.setAttribute("stroke-dashoffset",A.dashoffset[0])),y.c&&(y.c._mdf||b)&&S.pElem.setAttribute("stroke","rgb("+bmFloor(y.c.v[0])+","+bmFloor(y.c.v[1])+","+bmFloor(y.c.v[2])+")"),(y.o._mdf||b)&&S.pElem.setAttribute("stroke-opacity",y.o.v),(y.w._mdf||b)&&(S.pElem.setAttribute("stroke-width",y.w.v),S.msElem&&S.msElem.setAttribute("stroke-width",y.w.v))}return r}();function SVGShapeElement(i,e,r){this.shapes=[],this.shapesData=i.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(i,e,r),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var i,e=this.shapes.length,r,s,o=this.stylesList.length,a,l=[],u=!1;for(s=0;s1&&u&&this.setShapesAsAnimated(l)}},SVGShapeElement.prototype.setShapesAsAnimated=function(i){var e,r=i.length;for(e=0;e=0;c-=1){if(E=this.searchProcessedElement(i[c]),E?e[c]=r[E-1]:i[c]._render=l,i[c].ty==="fl"||i[c].ty==="st"||i[c].ty==="gf"||i[c].ty==="gs"||i[c].ty==="no")E?e[c].style.closed=!1:e[c]=this.createStyleElement(i[c],o),i[c]._render&&e[c].style.pElem.parentNode!==s&&s.appendChild(e[c].style.pElem),y.push(e[c].style);else if(i[c].ty==="gr"){if(!E)e[c]=this.createGroupElement(i[c]);else for(m=e[c].it.length,g=0;g1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(i){this.effectsSequence.push(i),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(i){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!i)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var s,o=this.effectsSequence.length,a=i||this.data.d.k[this.keysIndex].s;for(s=0;se);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(i){for(var e=[],r=0,s=i.length,o,a,l=!1,u=!1,c="";r=55296&&o<=56319?FontManager.isRegionalFlag(i,r)?c=i.substr(r,14):(a=i.charCodeAt(r+1),a>=56320&&a<=57343&&(FontManager.isModifier(o,a)?(c=i.substr(r,2),l=!0):FontManager.isFlagEmoji(i.substr(r,4))?c=i.substr(r,4):c=i.substr(r,2))):o>56319?(a=i.charCodeAt(r+1),FontManager.isVariationSelector(o)&&(l=!0)):FontManager.isZeroWidthJoiner(o)&&(l=!0,u=!0),l?(e[e.length-1]+=c,l=!1):e.push(c),r+=c.length;return e},TextProperty.prototype.completeTextData=function(i){i.__complete=!0;var e=this.elem.globalData.fontManager,r=this.data,s=[],o,a,l,u=0,c,d=r.m.g,g=0,m=0,y=0,b=[],S=0,A=0,E,x,P=e.getFontByName(i.f),C,T=0,_=getFontProperties(P);i.fWeight=_.weight,i.fStyle=_.style,i.finalSize=i.s,i.finalText=this.buildFinalText(i.t),a=i.finalText.length,i.finalLineHeight=i.lh;var B=i.tr/1e3*i.finalSize,M;if(i.sz)for(var N=!0,I=i.sz[0],R=i.sz[1],F,k;N;){k=this.buildFinalText(i.t),F=0,S=0,a=k.length,B=i.tr/1e3*i.finalSize;var V=-1;for(o=0;oI&&k[o]!==" "?(V===-1?a+=1:o=V,F+=i.finalLineHeight||i.finalSize*1.2,k.splice(o,V===o?1:0,"\r"),V=-1,S=0):(S+=T,S+=B);F+=P.ascent*i.finalSize/100,this.canResize&&i.finalSize>this.minimumFontSize&&RA?S:A,S=-2*B,c="",l=!0,y+=1):c=$,e.chars?(C=e.getCharData($,P.fStyle,e.getFontByName(i.f).fFamily),T=l?0:C.w*i.finalSize/100):T=e.measureText(c,i.f,i.finalSize),$===" "?D+=T+B:(S+=T+B+D,D=0),s.push({l:T,an:T,add:g,n:l,anIndexes:[],val:c,line:y,animatorJustifyOffset:0}),d==2){if(g+=T,c===""||c===" "||o===a-1){for((c===""||c===" ")&&(g-=T);m<=o;)s[m].an=g,s[m].ind=u,s[m].extra=T,m+=1;u+=1,g=0}}else if(d==3){if(g+=T,c===""||o===a-1){for(c===""&&(g-=T);m<=o;)s[m].an=g,s[m].ind=u,s[m].extra=T,m+=1;g=0,u+=1}}else s[u].ind=u,s[u].extra=0,u+=1;if(i.l=s,A=S>A?S:A,b.push(S),i.sz)i.boxWidth=i.sz[0],i.justifyOffset=0;else switch(i.boxWidth=A,i.j){case 1:i.justifyOffset=-i.boxWidth;break;case 2:i.justifyOffset=-i.boxWidth/2;break;default:i.justifyOffset=0}i.lineWidths=b;var O=r.a,q,G;x=O.length;var U,Z,W=[];for(E=0;E0?u=this.ne.v/100:c=-this.ne.v/100,this.xe.v>0?d=1-this.xe.v/100:g=1+this.xe.v/100;var m=BezierFactory.getBezierEasing(u,c,d,g).get,y=0,b=this.finalS,S=this.finalE,A=this.data.sh;if(A===2)S===b?y=l>=S?1:0:y=i(0,e(.5/(S-b)+(l-b)/(S-b),1)),y=m(y);else if(A===3)S===b?y=l>=S?0:1:y=1-i(0,e(.5/(S-b)+(l-b)/(S-b),1)),y=m(y);else if(A===4)S===b?y=0:(y=i(0,e(.5/(S-b)+(l-b)/(S-b),1)),y<.5?y*=2:y=1-2*(y-.5)),y=m(y);else if(A===5){if(S===b)y=0;else{var E=S-b;l=e(i(0,l+.5-b),S-b);var x=-E/2+l,P=E/2;y=Math.sqrt(1-x*x/(P*P))}y=m(y)}else A===6?(S===b?y=0:(l=e(i(0,l+.5-b),S-b),y=(1+Math.cos(Math.PI+Math.PI*2*l/(S-b)))/2),y=m(y)):(l>=r(b)&&(l-b<0?y=i(0,e(e(S,1)-(b-l),1)):y=i(0,e(S-l,1))),y=m(y));if(this.sm.v!==100){var C=this.sm.v*.01;C===0&&(C=1e-8);var T=.5-C*.5;y1&&(y=1))}return y*this.a.v},getValue:function(l){this.iterateDynamicProperties(),this._mdf=l||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,l&&this.data.r===2&&(this.e.v=this._currentTextLength);var u=this.data.r===2?1:100/this.data.totalChars,c=this.o.v/u,d=this.s.v/u+c,g=this.e.v/u+c;if(d>g){var m=d;d=g,g=m}this.finalS=d,this.finalE=g}},extendPrototype([DynamicPropertyContainer],s);function o(a,l,u){return new s(a,l)}return{getTextSelectorProp:o}}();function TextAnimatorDataProperty(i,e,r){var s={propType:!1},o=PropertyFactory.getProp,a=e.a;this.a={r:a.r?o(i,a.r,0,degToRads,r):s,rx:a.rx?o(i,a.rx,0,degToRads,r):s,ry:a.ry?o(i,a.ry,0,degToRads,r):s,sk:a.sk?o(i,a.sk,0,degToRads,r):s,sa:a.sa?o(i,a.sa,0,degToRads,r):s,s:a.s?o(i,a.s,1,.01,r):s,a:a.a?o(i,a.a,1,0,r):s,o:a.o?o(i,a.o,0,.01,r):s,p:a.p?o(i,a.p,1,0,r):s,sw:a.sw?o(i,a.sw,0,0,r):s,sc:a.sc?o(i,a.sc,1,0,r):s,fc:a.fc?o(i,a.fc,1,0,r):s,fh:a.fh?o(i,a.fh,0,0,r):s,fs:a.fs?o(i,a.fs,0,.01,r):s,fb:a.fb?o(i,a.fb,0,.01,r):s,t:a.t?o(i,a.t,0,0,r):s},this.s=TextSelectorProp.getTextSelectorProp(i,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(i,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=i,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var i,e=this._textData.a.length,r,s=PropertyFactory.getProp;for(i=0;i=S+ce||!_?(I=(S+ce-E)/A.partialLength,ae=T.point[0]+(A.point[0]-T.point[0])*I,Y=T.point[1]+(A.point[1]-T.point[1])*I,a.translate(-r[0]*y[g].an*.005,-(r[1]*D)*.01),x=!1):_&&(E+=A.partialLength,P+=1,P>=_.length&&(P=0,C+=1,B[C]?_=B[C].points:F.v.c?(P=0,C=0,_=B[C].points):(E-=A.partialLength,_=null)),_&&(T=A,A=_[P],M=A.partialLength));ye=y[g].an/2-y[g].add,a.translate(-ye,0,0)}else ye=y[g].an/2-y[g].add,a.translate(-ye,0,0),a.translate(-r[0]*y[g].an*.005,-r[1]*D*.01,0);for(G=0;Gi?this.textSpans[i].span:createNS(u?"g":"text"),C<=i){if(c.setAttribute("stroke-linecap","butt"),c.setAttribute("stroke-linejoin","round"),c.setAttribute("stroke-miterlimit","4"),this.textSpans[i].span=c,u){var _=createNS("g");c.appendChild(_),this.textSpans[i].childSpan=_}this.textSpans[i].span=c,this.layerElement.appendChild(c)}c.style.display="inherit"}if(d.reset(),m&&(l[i].n&&(y=-A,b+=r.yOffset,b+=S?1:0,S=!1),this.applyTextPropertiesToMatrix(r,d,l[i].line,y,b),y+=l[i].l||0,y+=A),u){T=this.globalData.fontManager.getCharData(r.finalText[i],s.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var B;if(T.t===1)B=new SVGCompElement(T.data,this.globalData,this);else{var M=emptyShapeData;T.data&&T.data.shapes&&(M=this.buildShapeData(T.data,r.finalSize)),B=new SVGShapeElement(M,this.globalData,this)}if(this.textSpans[i].glyph){var N=this.textSpans[i].glyph;this.textSpans[i].childSpan.removeChild(N.layerElement),N.destroy()}this.textSpans[i].glyph=B,B._debug=!0,B.prepareFrame(0),B.renderFrame(),this.textSpans[i].childSpan.appendChild(B.layerElement),T.t===1&&this.textSpans[i].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else m&&c.setAttribute("transform","translate("+d.props[12]+","+d.props[13]+")"),c.textContent=l[i].val,c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}m&&c&&c.setAttribute("d",g)}for(;i=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(i-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var i,e=this.layers.length;for(i=0;i=0;s-=1)e.finalTransform.multiply(e.transforms[s].transform.mProps.v);e._mdf=a},processSequences:function(e){var r,s=this.sequenceList.length;for(r=0;r=1){this.buffers=[];var e=this.globalData.canvasContext,r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r);var s=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(s),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var r=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=r}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var s=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(s.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var o=assetLoader.getLumaCanvas(this.canvasContext.canvas),a=o.getContext("2d");a.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(o,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var r=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(r),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(r),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(i,e,r,s){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var o=4;e.ty==="rc"?o=5:e.ty==="el"?o=6:e.ty==="sr"&&(o=7),this.sh=ShapePropertyFactory.getShapeProp(i,e,o,i);var a,l=r.length,u;for(a=0;a=0;a-=1){if(m=this.searchProcessedElement(i[a]),m?e[a]=r[m-1]:i[a]._shouldRender=s,i[a].ty==="fl"||i[a].ty==="st"||i[a].ty==="gf"||i[a].ty==="gs")m?e[a].style.closed=!1:e[a]=this.createStyleElement(i[a],S),d.push(e[a].style);else if(i[a].ty==="gr"){if(!m)e[a]=this.createGroupElement(i[a]);else for(c=e[a].it.length,u=0;u=0;o-=1)e[o].ty==="tr"?(l=r[o].transform,this.renderShapeTransform(i,l)):e[o].ty==="sh"||e[o].ty==="el"||e[o].ty==="rc"||e[o].ty==="sr"?this.renderPath(e[o],r[o]):e[o].ty==="fl"?this.renderFill(e[o],r[o],l):e[o].ty==="st"?this.renderStroke(e[o],r[o],l):e[o].ty==="gf"||e[o].ty==="gs"?this.renderGradientFill(e[o],r[o],l):e[o].ty==="gr"?this.renderShape(l,e[o].it,r[o].it):e[o].ty;s&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(i,e){if(this._isFirstFrame||e._mdf||i.transforms._mdf){var r=i.trNodes,s=e.paths,o,a,l,u=s._length;r.length=0;var c=i.transforms.finalTransform;for(l=0;l=1?g=.99:g<=-1&&(g=-.99);var m=c*g,y=Math.cos(d+e.a.v)*m+l[0],b=Math.sin(d+e.a.v)*m+l[1];o=a.createRadialGradient(y,b,0,l[0],l[1],c)}var S,A=i.g.p,E=e.g.c,x=1;for(S=0;Sa&&c==="xMidYMid slice"||oo&&u==="meet"||ao&&u==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(s/this.transformCanvas.h))/2*this.renderConfig.dpr:d==="xMax"&&(ao&&u==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(s/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,g==="YMid"&&(a>o&&u==="meet"||ao&&u==="meet"||a=0;i-=1)this.elements[i]&&this.elements[i].destroy&&this.elements[i].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(i,e){if(!(this.renderedFrame===i&&this.renderConfig.clearCanvas===!0&&!e||this.destroyed||i===-1)){this.renderedFrame=i,this.globalData.frameNum=i-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=i;var r,s=this.layers.length;for(this.completeLayers||this.checkLayers(i),r=s-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(i-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=s-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(i){var e=this.elements;if(!(e[i]||this.layers[i].ty===99)){var r=this.createItem(this.layers[i],this,this.globalData);e[i]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var i=this.pendingElements.pop();i.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var i,e=15;for(i=0;i=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var i,e=this.layers.length;for(i=e-1;i>=0;i-=1)this.elements[i]&&this.elements[i].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(i){return new CVCompElement(i,this.globalData,this)};function CanvasRenderer(i,e){this.animationItem=i,this.renderConfig={clearCanvas:e&&e.clearCanvas!==void 0?e.clearCanvas:!0,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(i){return new CVCompElement(i,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var r=this.finalTransform.mat.toCSS();e.transform=r,e.webkitTransform=r}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(i,e,r){this.initElement(i,e,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var i;this.data.hasMask?(i=createNS("rect"),i.setAttribute("width",this.data.sw),i.setAttribute("height",this.data.sh),i.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(i=createTag("div"),i.style.width=this.data.sw+"px",i.style.height=this.data.sh+"px",i.style.backgroundColor=this.data.sc),this.layerElement.appendChild(i)};function HShapeElement(i,e,r){this.shapes=[],this.shapesData=i.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(i,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var i;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),i=this.svgElement;else{i=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;i.setAttribute("width",e.w),i.setAttribute("height",e.h),i.appendChild(this.shapesContainer),this.layerElement.appendChild(i)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=i},HShapeElement.prototype.getTransformedPoint=function(i,e){var r,s=i.length;for(r=0;r0&&c<1&&o[y].push(this.calculateF(c,i,e,r,s,y))):(d=l*l-4*u*a,d>=0&&(g=(-l+bmSqrt(d))/(2*a),g>0&&g<1&&o[y].push(this.calculateF(g,i,e,r,s,y)),m=(-l-bmSqrt(d))/(2*a),m>0&&m<1&&o[y].push(this.calculateF(m,i,e,r,s,y)))));this.shapeBoundingBox.left=bmMin.apply(null,o[0]),this.shapeBoundingBox.top=bmMin.apply(null,o[1]),this.shapeBoundingBox.right=bmMax.apply(null,o[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,o[1])},HShapeElement.prototype.calculateF=function(i,e,r,s,o,a){return bmPow(1-i,3)*e[a]+3*bmPow(1-i,2)*i*r[a]+3*(1-i)*bmPow(i,2)*s[a]+bmPow(i,3)*o[a]},HShapeElement.prototype.calculateBoundingBox=function(i,e){var r,s=i.length;for(r=0;rr&&(r=o)}r*=i.mult}else r=i.v*i.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(i){return this.currentBBox.x<=i.x&&this.currentBBox.y<=i.y&&this.currentBBox.width+this.currentBBox.x>=i.x+i.width&&this.currentBBox.height+this.currentBBox.y>=i.y+i.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var i=this.tempBoundingBox,e=999999;if(i.x=e,i.xMax=-e,i.y=e,i.yMax=-e,this.calculateBoundingBox(this.itemsData,i),i.width=i.xMax=0;e-=1){var s=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-s.p.v[0],-s.p.v[1],s.p.v[2]),this.mat.rotateX(-s.or.v[0]).rotateY(-s.or.v[1]).rotateZ(s.or.v[2]),this.mat.rotateX(-s.rx.v).rotateY(-s.ry.v).rotateZ(s.rz.v),this.mat.scale(1/s.s.v[0],1/s.s.v[1],1/s.s.v[2]),this.mat.translate(s.a.v[0],s.a.v[1],s.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var o;this.p?o=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:o=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(o[0],2)+Math.pow(o[1],2)+Math.pow(o[2],2)),l=[o[0]/a,o[1]/a,o[2]/a],u=Math.sqrt(l[2]*l[2]+l[0]*l[0]),c=Math.atan2(l[1],u),d=Math.atan2(l[0],-l[2]);this.mat.rotateY(d).rotateX(-c)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var g=!this._prevMat.equals(this.mat);if((g||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var m,y,b;for(e=0;e=i)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(i,e){var r=createTag("div"),s,o;styleDiv(r);var a=createTag("div");if(styleDiv(a),e==="3d"){s=r.style,s.width=this.globalData.compSize.w+"px",s.height=this.globalData.compSize.h+"px";var l="50% 50%";s.webkitTransformOrigin=l,s.mozTransformOrigin=l,s.transformOrigin=l,o=a.style;var u="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";o.transform=u,o.webkitTransform=u}r.appendChild(a);var c={container:a,perspectiveElem:r,startPos:i,endPos:i,type:e};return this.threeDElements.push(c),c},HybridRendererBase.prototype.build3dContainers=function(){var i,e=this.layers.length,r,s="";for(i=0;i=0;i-=1)this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(i,e){for(var r=0,s=this.threeDElements.length;rr?(o=i/this.globalData.compSize.w,a=i/this.globalData.compSize.w,l=0,u=(e-this.globalData.compSize.h*(i/this.globalData.compSize.w))/2):(o=e/this.globalData.compSize.h,a=e/this.globalData.compSize.h,l=(i-this.globalData.compSize.w*(e/this.globalData.compSize.h))/2,u=0);var c=this.resizerElem.style;c.webkitTransform="matrix3d("+o+",0,0,0,0,"+a+",0,0,0,0,1,0,"+l+","+u+",0,1)",c.transform=c.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var i=this.globalData.compSize.w,e=this.globalData.compSize.h,r,s=this.threeDElements.length;for(r=0;r=d;)F/=2,k/=2,V>>>=1;return(F+V)/k};return I.int32=function(){return N.g(4)|0},I.quick=function(){return N.g(4)/4294967296},I.double=I,E(P(N.S),i),(T.pass||_||function(R,F,k,V){return V&&(V.S&&S(V,N),R.state=function(){return S(N,{})}),k?(e[l]=R,F):R})(I,M,"global"in T?T.global:this==e,T.state)}e["seed"+l]=y;function b(C){var T,_=C.length,B=this,M=0,N=B.i=B.j=0,I=B.S=[];for(_||(C=[_++]);Mr){var s=r;r=e,e=s}return Math.min(Math.max(i,e),r)}function radiansToDegrees(i){return i/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(i){return i*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(i,e){if(typeof i=="number"||i instanceof Number)return e=e||0,Math.abs(i-e);e||(e=helperLengthArray);var r,s=Math.min(i.length,e.length),o=0;for(r=0;r.5?d/(2-o-a):d/(o+a),o){case e:l=(r-s)/d+(r1&&(r-=1),r<1/6?i+(e-i)*6*r:r<1/2?e:r<2/3?i+(e-i)*(2/3-r)*6:i}function hslToRgb(i){var e=i[0],r=i[1],s=i[2],o,a,l;if(r===0)o=s,l=s,a=s;else{var u=s<.5?s*(1+r):s+r-s*r,c=2*s-u;o=hue2rgb(c,u,e+1/3),a=hue2rgb(c,u,e),l=hue2rgb(c,u,e-1/3)}return[o,a,l,i[3]]}function linear(i,e,r,s,o){if((s===void 0||o===void 0)&&(s=e,o=r,e=0,r=1),r=r)return o;var l=r===e?0:(i-e)/(r-e);if(!s.length)return s+(o-s)*l;var u,c=s.length,d=createTypedArray("float32",c);for(u=0;u1){for(o=0;o1?e=1:e<0&&(e=0);var l=i(e);if($bm_isInstanceOfArray(o)){var u,c=o.length,d=createTypedArray("float32",c);for(u=0;udata.k[e].t&&idata.k[e+1].t-i?(s=e+2,o=data.k[e+1].t):(s=e+1,o=data.k[e].t);break}s===-1&&(s=e+1,o=data.k[e].t)}var a={};return a.index=s,a.time=o/elem.comp.globalData.frameRate,a}function key(i){var e,r,s;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+i);i-=1,e={time:data.k[i].t/elem.comp.globalData.frameRate,value:[]};var o=Object.prototype.hasOwnProperty.call(data.k[i],"s")?data.k[i].s:data.k[i-1].e;for(s=o.length,r=0;rE.length-1)&&(b=E.length-1),C=E[E.length-1-b].t,P=x-C);var T,_,B;if(y==="pingpong"){var M=Math.floor((A-C)/P);if(M%2!==0)return this.getValueAtTime((P-(A-C)%P+C)/this.comp.globalData.frameRate,0)}else if(y==="offset"){var N=this.getValueAtTime(C/this.comp.globalData.frameRate,0),I=this.getValueAtTime(x/this.comp.globalData.frameRate,0),R=this.getValueAtTime(((A-C)%P+C)/this.comp.globalData.frameRate,0),F=Math.floor((A-C)/P);if(this.pv.length){for(B=new Array(N.length),_=B.length,T=0;T<_;T+=1)B[T]=(I[T]-N[T])*F+R[T];return B}return(I-N)*F+R}else if(y==="continue"){var k=this.getValueAtTime(x/this.comp.globalData.frameRate,0),V=this.getValueAtTime((x-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(B=new Array(k.length),_=B.length,T=0;T<_;T+=1)B[T]=k[T]+(k[T]-V[T])*((A-x)/this.comp.globalData.frameRate)/5e-4;return B}return k+(k-V)*((A-x)/.001)}return this.getValueAtTime(((A-C)%P+C)/this.comp.globalData.frameRate,0)}function e(y,b,S){if(!this.k)return this.pv;y=y?y.toLowerCase():"";var A=this.comp.renderedFrame,E=this.keyframes,x=E[0].t;if(A>=x)return this.pv;var P,C;S?(b?P=Math.abs(this.elem.comp.globalData.frameRate*b):P=Math.max(0,this.elem.data.op-x),C=x+P):((!b||b>E.length-1)&&(b=E.length-1),C=E[b].t,P=C-x);var T,_,B;if(y==="pingpong"){var M=Math.floor((x-A)/P);if(M%2===0)return this.getValueAtTime(((x-A)%P+x)/this.comp.globalData.frameRate,0)}else if(y==="offset"){var N=this.getValueAtTime(x/this.comp.globalData.frameRate,0),I=this.getValueAtTime(C/this.comp.globalData.frameRate,0),R=this.getValueAtTime((P-(x-A)%P+x)/this.comp.globalData.frameRate,0),F=Math.floor((x-A)/P)+1;if(this.pv.length){for(B=new Array(N.length),_=B.length,T=0;T<_;T+=1)B[T]=R[T]-(I[T]-N[T])*F;return B}return R-(I-N)*F}else if(y==="continue"){var k=this.getValueAtTime(x/this.comp.globalData.frameRate,0),V=this.getValueAtTime((x+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(B=new Array(k.length),_=B.length,T=0;T<_;T+=1)B[T]=k[T]+(k[T]-V[T])*(x-A)/.001;return B}return k+(k-V)*(x-A)/.001}return this.getValueAtTime((P-((x-A)%P+x))/this.comp.globalData.frameRate,0)}function r(y,b){if(!this.k)return this.pv;if(y=(y||.4)*.5,b=Math.floor(b||5),b<=1)return this.pv;var S=this.comp.renderedFrame/this.comp.globalData.frameRate,A=S-y,E=S+y,x=b>1?(E-A)/(b-1):1,P=0,C=0,T;this.pv.length?T=createTypedArray("float32",this.pv.length):T=0;for(var _;PP){var M=C,N=A.c&&C===T-1?0:C+1,I=(P-_)/x[C].addedLength;B=bez.getPointInSegment(A.v[M],A.v[N],A.o[M],A.i[N],I,x[C]);break}else _+=x[C].addedLength;C+=1}return B||(B=A.c?[A.v[0][0],A.v[0][1]]:[A.v[A._length-1][0],A.v[A._length-1][1]]),B},vectorOnPath:function(b,S,A){b==1?b=this.v.c:b==0&&(b=.999);var E=this.pointOnPath(b,S),x=this.pointOnPath(b+.001,S),P=x[0]-E[0],C=x[1]-E[1],T=Math.sqrt(Math.pow(P,2)+Math.pow(C,2));if(T===0)return[0,0];var _=A==="tangent"?[P/T,C/T]:[-C/T,P/T];return _},tangentOnPath:function(b,S){return this.vectorOnPath(b,S,"tangent")},normalOnPath:function(b,S){return this.vectorOnPath(b,S,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([g],c),extendPrototype([g],d),d.prototype.getValueAtTime=u,d.prototype.initiateExpression=ExpressionManager.initiateExpression;var m=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(y,b,S,A,E){var x=m(y,b,S,A,E);return x.propertyIndex=b.ix,x.lock=!1,S===3?expressionHelpers.searchExpressions(y,b.pt,x):S===4&&expressionHelpers.searchExpressions(y,b.ks,x),x.k&&y.addDynamicProperty(x),x}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function i(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(e,r){var s=this.calculateExpression(r);if(e.t!==s){var o={};return this.copyData(o,e),o.t=s.toString(),o.__complete=!1,o}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),r=this.searchExpressions();return this.kf=e||r,this.kf},TextProperty.prototype.searchExpressions=i}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function i(e,r){var s=createNS("feMerge");s.setAttribute("result",e);var o,a;for(a=0;a=d?m=S<0?s:o:m=s+b*Math.pow((u-i)/S,1/r),g[y]=m,y+=1,a+=256/(l-1);return g.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(i){if(i||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(i||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(i||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(i||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(i||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(i||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};function SVGDropShadowEffect(i,e,r,s,o){var a=e.container.globalData.renderConfig.filterSize,l=e.data.fs||a;i.setAttribute("x",l.x||a.x),i.setAttribute("y",l.y||a.y),i.setAttribute("width",l.width||a.width),i.setAttribute("height",l.height||a.height),this.filterManager=e;var u=createNS("feGaussianBlur");u.setAttribute("in","SourceAlpha"),u.setAttribute("result",s+"_drop_shadow_1"),u.setAttribute("stdDeviation","0"),this.feGaussianBlur=u,i.appendChild(u);var c=createNS("feOffset");c.setAttribute("dx","25"),c.setAttribute("dy","0"),c.setAttribute("in",s+"_drop_shadow_1"),c.setAttribute("result",s+"_drop_shadow_2"),this.feOffset=c,i.appendChild(c);var d=createNS("feFlood");d.setAttribute("flood-color","#00ff00"),d.setAttribute("flood-opacity","1"),d.setAttribute("result",s+"_drop_shadow_3"),this.feFlood=d,i.appendChild(d);var g=createNS("feComposite");g.setAttribute("in",s+"_drop_shadow_3"),g.setAttribute("in2",s+"_drop_shadow_2"),g.setAttribute("operator","in"),g.setAttribute("result",s+"_drop_shadow_4"),i.appendChild(g);var m=this.createMergeNode(s,[s+"_drop_shadow_4",o]);i.appendChild(m)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(i){if(i||this.filterManager._mdf){if((i||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),i||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(e[0]*255),Math.round(e[1]*255),Math.round(e[2]*255)))}if((i||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),i||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*degToRads,o=r*Math.cos(s),a=r*Math.sin(s);this.feOffset.setAttribute("dx",o),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(i,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=i,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(i){for(var e=0,r=_svgMatteSymbols.length;e-1&&i%1==0&&i-1&&i%1==0&&i<=MAX_SAFE_INTEGER}function isArrayLike(i){return i!=null&&isLength(i.length)&&!isFunction$1(i)}var objectProto$a=Object.prototype;function isPrototype(i){var e=i&&i.constructor,r=typeof e=="function"&&e.prototype||objectProto$a;return i===r}function baseTimes(i,e){for(var r=-1,s=Array(i);++r-1}function listCacheSet(i,e){var r=this.__data__,s=assocIndexOf(r,i);return s<0?(++this.size,r.push([i,e])):r[s][1]=e,this}function ListCache(i){var e=-1,r=i==null?0:i.length;for(this.clear();++eu))return!1;var d=a.get(i),g=a.get(e);if(d&&g)return d==e&&g==i;var m=-1,y=!0,b=r&COMPARE_UNORDERED_FLAG$1?new SetCache:void 0;for(a.set(i,e),a.set(e,i);++m{const r=i.__vccOpts||i;for(const[s,o]of e)r[s]=o;return r};const _sfc_main=defineComponent({props:{animationData:{type:Object,default:()=>({})},animationLink:{type:String,default:""},loop:{type:[Boolean,Number],default:!0},autoPlay:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},speed:{type:Number,default:1},delay:{type:Number,default:0},direction:{type:String,default:"forward"},pauseOnHover:{type:Boolean,default:!1},playOnHover:{type:Boolean,default:!1},backgroundColor:{type:String,default:"transparent"},pauseAnimation:{type:Boolean,default:!1},renderer:{type:String,default:"svg"},rendererSettings:{type:Object,default:()=>({})},assetsPath:{type:String,default:""}},emits:{onComplete:null,onLoopComplete:null,onEnterFrame:null,onSegmentStart:null,onAnimationLoaded:null},setup(i,{emit:e}){let r=ref(null);const s=ref("");let o=1;const a=N=>document.querySelector(`[data-id="${N}"]`)!==null,l=async N=>{let I=i.autoPlay;i.playOnHover&&(I=!1);let R={};if(isEqual(i.animationData,{})===!1&&(R=cloneDeep(i.animationData)),i.animationLink!="")try{R=await(await fetch(i.animationLink)).json()}catch(V){console.error(V);return}let F=i.loop;typeof F=="number"&&F>0&&(F=F-1),i.delay>0&&(I=!1);const k={container:N,renderer:i.renderer,loop:F,autoplay:I,animationData:R,assetsPath:i.assetsPath};isEqual(i.rendererSettings,{})===!1&&(k.rendererSettings=i.rendererSettings),r=Lottie.loadAnimation(k),setTimeout(()=>{I=i.autoPlay,i.playOnHover?r.pause():I?r.play():r.pause(),e("onAnimationLoaded")},i.delay),r.setSpeed(i.speed),i.direction==="reverse"&&r.setDirection(-1),i.direction==="normal"&&r.setDirection(1),(i.pauseAnimation||i.playOnHover)&&r.pause(),r.addEventListener("loopComplete",()=>{i.direction==="alternate"&&(r.stop(),o=o*-1,r.setDirection(o),r.play()),e("onLoopComplete")}),r.addEventListener("complete",()=>{e("onComplete")}),r.addEventListener("enterFrame",()=>{e("onEnterFrame")}),r.addEventListener("segmentStart",()=>{e("onSegmentStart")})},u=computed(()=>{let N=i.width,I=i.height;return typeof i.width=="number"&&(N=`${i.width}px`),typeof i.height=="number"&&(I=`${i.height}px`),{"--lottie-animation-container-width":N,"--lottie-animation-container-height":I,"--lottie-animation-container-background-color":i.backgroundColor}}),c=()=>{r&&i.pauseOnHover&&r.pause(),r&&i.playOnHover&&r.play()},d=()=>{r&&i.pauseOnHover&&r.play(),r&&i.playOnHover&&r.pause()};watch(()=>i.pauseAnimation,()=>{if((i.pauseOnHover||i.playOnHover)&&i.pauseAnimation){console.error("If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover");return}r&&(i.pauseAnimation?r.pause():r.play())});const g=()=>{r&&r.play()},m=()=>{r&&r.pause()},y=()=>{r&&r.stop()},b=()=>{r&&r.destroy()},S=(N=1)=>{if(N<=0)throw new Error("Speed must be greater than 0");r&&r.setSpeed(N)},A=N=>{r&&(N==="forward"?r.setDirection(1):N==="reverse"&&r.setDirection(-1))},E=(N,I=!0)=>{r&&r.goToAndStop(N,I)},x=(N,I=!0)=>{r&&r.goToAndPlay(N,I)},P=(N,I=!1)=>{r&&r.playSegments(N,I)},C=(N=!0)=>{r&&r.setSubframe(N)},T=(N=!0)=>{if(r)return r.getDuration(N)},_=(N,I=0)=>{r&&r.renderer.elements[I].updateDocumentData(N)},B=N=>{for(var I="",R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",F=R.length,k=0;k{if(i.pauseOnHover&&i.playOnHover)throw new Error("You cannot set pauseOnHover and playOnHover for Vue3-Lottie at the same time.");if(i.animationLink===""&&isEqual(i.animationData,{}))throw new Error("You must provide either animationLink or animationData");const I=setInterval(()=>{if(a(N)){clearInterval(I);const R=document.querySelector(`[data-id="${N}" ]`);R&&l(R)}},0)};return onMounted(async()=>{s.value=B(20),M(s.value)}),{elementid:s,hoverEnded:d,hoverStarted:c,getCurrentStyle:u,play:g,pause:m,stop:y,destroy:b,setSpeed:S,setDirection:A,goToAndStop:E,goToAndPlay:x,playSegments:P,setSubFrame:C,getDuration:T,updateDocumentData:_}}}),_hoisted_1=["data-id"];function _sfc_render(i,e,r,s,o,a){return openBlock(),createElementBlock("div",{"data-id":i.elementid,class:"lottie-animation-container",style:normalizeStyle(i.getCurrentStyle),onMouseenter:e[0]||(e[0]=(...l)=>i.hoverStarted&&i.hoverStarted(...l)),onMouseleave:e[1]||(e[1]=(...l)=>i.hoverEnded&&i.hoverEnded(...l))},null,44,_hoisted_1)}var Vue3Lottie=_export_sfc(_sfc_main,[["render",_sfc_render]]);const v="5.7.1",fr=25,ip=0,op=50,w=120,h=120,nm="转动",ddd=0,assets=[],layers=[{ddd:0,ind:1,ty:4,nm:"转动",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[60,60,0],ix:2},a:{a:0,k:[-16,-36,0],ix:1},s:{a:0,k:[23.737,23.737,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[447.14,447.14],ix:2},p:{a:0,k:[0,0],ix:3},nm:"椭圆路径 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"st",c:{a:0,k:[.125490196078,.741176470588,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:46,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"描边 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[-16,-36],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"变换"}],nm:"椭圆 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:0,k:0,ix:1},e:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[0],e:[50]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:25,s:[50],e:[0]},{t:50}],ix:2},o:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[0],e:[720]},{t:50}],ix:3},m:1,ix:2,nm:"修剪路径 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:50,st:0,bm:0},{ddd:0,ind:2,ty:4,nm:"底",sr:1,ks:{o:{a:0,k:30,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[60,60,0],ix:2},a:{a:0,k:[-16,-36,0],ix:1},s:{a:0,k:[23.737,23.737,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[447.14,447.14],ix:2},p:{a:0,k:[0,0],ix:3},nm:"椭圆路径 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:46,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"描边 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[-16,-36],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"变换"}],nm:"椭圆 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:50,st:0,bm:0}],markers=[],loading={v,fr,ip,op,w,h,nm,ddd,assets,layers,markers},AbnormalPop=defineComponent({name:"abnormal-pop",props:{},emits:["close","confirm"],setup(i,{emit:e}){return()=>createVNode(Fragment,null,[evaluatingData.socketErrorStatus===0&&createVNode("div",{class:styles$e.fraction},[createVNode("img",{class:styles$e.close,src:popImgs.icon_close,onClick:()=>e("close")},null),createVNode("img",{class:styles$e.bg,src:popImgs.icon_bg},null),createVNode("div",{class:styles$e.content},[createVNode("div",{class:styles$e.title},[createTextVNode("您的网络连接异常")]),createVNode("div",{class:styles$e.desc},[createTextVNode("请确保网络正常后重新连接")])]),createVNode("div",null,[createVNode("img",{src:popImgs.icon_btn,class:styles$e.btn,onClick:()=>e("confirm",!0)},null)])]),evaluatingData.socketErrorStatus===1&&createVNode("div",{class:styles$e.loadColumn},[createVNode(Vue3Lottie,{class:styles$e.loadIcon,animationData:loading,loop:!0},null),createVNode("img",{class:styles$e.close,src:popImgs.icon_close,onClick:()=>e("close")},null),createVNode("p",null,[createTextVNode("正在连接服务器,请稍后…")])]),evaluatingData.socketErrorStatus===2&&createVNode("div",{class:styles$e.loadColumn},[createVNode("img",{class:styles$e.successIcon,src:popImgs.icon_success},null),createVNode("p",null,[createTextVNode("连接成功")])])])}}),icon_bg=""+new URL("../svg/icon_bg-026faf73.svg",import.meta.url).href,icon_close=""+new URL("../svg/icon_close-0f82fcc9.svg",import.meta.url).href,icon_btn$1=""+new URL("../svg/icon_btn-f3b09ea8.svg",import.meta.url).href,icon_success=""+new URL("../svg/icon_success-6e9ec0d6.svg",import.meta.url).href,homework="_homework_spg76_1",styles$d={homework},studentQueryUserInfo=async()=>await request.get("/user/getUserInfo"),api_musicPracticeRecordSave=i=>request.post("/musicPracticeRecord/save",{requestType:"json",data:i}),api_lessonTrainingSubmitTraining=i=>request.post("/lessonTraining/submitTraining",{requestType:"json",data:i}),api_lessonTrainingTrainingStudentDetail=i=>request.get(`/lessonTraining/trainingContentStudentDetail?id=${i}`),api_musicPracticeRecordVideoUpload=i=>request.post("/musicPracticeRecord/videoUpload",{data:i,requestType:"json"}),sysSuggestionAdd=i=>request.post("/sysSuggestion/save",{data:i,requestType:"json"}),api_musicPracticeRecordDetail=i=>request.get("/musicPracticeRecord/detail/"+i),api_subjectList=i=>request.post("/subject/list",{data:i,requestType:"json"}),api_musicSheetPage=i=>request.post("/musicSheet/page",{data:i,requestType:"json"}),getSuggestionList=i=>request.post("/sysSuggestionType/page",{data:i,requestType:"json"}),WorkHome=defineComponent({name:"HomeWork",props:{workeData:{type:Object,default:()=>({})}},emits:["change"],setup(i,{expose:e}){const r=reactive({trainingTimes:"",trainingSpeed:0,times:0,workRecord:"",isAddOk:0,starTime:0,start:"",end:""}),s=()=>{const c=["studnetT-0","studnetT-2","studnetT-4"];for(let d=0;d{const c=i.workeData;if(c.id){let d={};try{d=JSON.parse(c.trainingContent)}catch(g){console.log("🚀 ~ error:",g)}r.times=d.trainingTimes||0,r.trainingTimes=(c.trainingTimes/60).toFixed(1)||"0",r.trainingSpeed=d.practiceSpeed,r.start=Number(d.practiceChapterBegin),r.end=Number(d.practiceChapterEnd),state$1.userChooseEndIndex=r.end,r.isAddOk===0&&setSection(r.start,r.end,r.trainingSpeed)}},a=async()=>{const c=await api_lessonTrainingTrainingStudentDetail(i.workeData.id);(c==null?void 0:c.code)===200&&(r.trainingTimes=(c.data.trainingTimes/60).toFixed(1)||"0")},l=async()=>{let c=Math.ceil((Date.now()-r.starTime)/1e3);try{const d=await api_lessonTrainingSubmitTraining({id:i.workeData.id,trainingTimes:c});(d==null?void 0:d.code)==200&&a()}catch(d){}};watch(()=>state$1.playState,()=>{state$1.playState==="play"?r.starTime=Date.now():l()});const u=()=>{state$1.playState==="play"&&(console.log("退出"),l())};return onMounted(()=>{s(),o()}),e({handleAdd:u}),()=>createVNode("div",{class:styles$d.homework},[r.trainingTimes,createTextVNode(" / "),r.times,createTextVNode(" 分钟")])}}),WorkEaluating=defineComponent({name:"EvaluatingWork",props:{workeData:{type:Object,default:()=>({})}},setup(i,{expose:e}){var l;getQuery();const r=reactive({difficulty:"",evaluatingRecord:(l=i.workeData)==null?void 0:l.id,start:"",end:"",evaluateSpeed:0}),s=()=>{const u=["studnetT-0"];for(let c=0;c{let u={};try{u=JSON.parse(i.workeData.trainingContent)}catch(c){console.log("🚀 ~ error:",c)}["BEGINNER","ADVANCED","PERFORMER"].includes(u.evaluateDifficult)&&(r.difficulty=u.evaluateDifficult,state$1.setting.evaluationDifficulty=u.evaluateDifficult,r.evaluateSpeed=u.evaluateSpeed,r.start=Number(u.practiceChapterBegin),r.end=Number(u.practiceChapterEnd),state$1.userChooseEndIndex=r.end,setSection(r.start,r.end,r.evaluateSpeed))},a=async u=>{try{const c=await api_lessonTrainingSubmitTraining({id:r.evaluatingRecord,trainingTimes:(u==null?void 0:u.score)||0,recordId:evaluatingData.resultData.recordId})}catch(c){console.log(c)}};return watch(()=>evaluatingData.resultData.recordId,()=>{evaluatingData.resulstMode&&evaluatingData.resultData.recordId&&evaluatingData.isComplete&&a(evaluatingData.resultData)}),onMounted(()=>{s(),o()}),()=>createVNode("div",null,null)}}),headerTop="_headerTop_11clo_1",headTopLeftBox="_headTopLeftBox_11clo_10",img$2="_img_11clo_17",title$2="_title_11clo_24",hidenBack="_hidenBack_11clo_35",modeChangeBox="_modeChangeBox_11clo_39",headRight="_headRight_11clo_60",btn$4="_btn_11clo_65",iconBtn="_iconBtn_11clo_76",metronomeBtn="_metronomeBtn_11clo_87",speedCon="_speedCon_11clo_90",disabled="_disabled_11clo_112",playBtn="_playBtn_11clo_116",btnWrap="_btnWrap_11clo_122",playLeftButton="_playLeftButton_11clo_131",playRightButton="_playRightButton_11clo_136",progress="_progress_11clo_141",resetBtn="_resetBtn_11clo_149",pauseLeftButton="_pauseLeftButton_11clo_160",pauseRightButton="_pauseRightButton_11clo_165",pcTransPop="_pcTransPop_11clo_178",modeView="_modeView_11clo_181",hidden="_hidden_11clo_192",back="_back_11clo_197",name$1="_name_11clo_204",modeBox="_modeBox_11clo_212",styles$c={headerTop,headTopLeftBox,img:img$2,title:title$2,hidenBack,modeChangeBox,headRight,btn:btn$4,iconBtn,metronomeBtn,speedCon,disabled,playBtn,btnWrap,playLeftButton,playRightButton,progress,resetBtn,pauseLeftButton,pauseRightButton,pcTransPop,modeView,hidden,back,name:name$1,modeBox},iconBack="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAC+lBMVEUAAAAip/8AnP8Anf8Env8Anf8gpP8pp/8cmf8Dnf9kwP8Anf9BsP93xfyIzf98yf9ivf8Anf9Bs/93yP8BnP8Anf8Fnv8Cnv8fqf8Vpf8Am/+a1v9yxf8oq/+T0v9twf8Pov8Am/+By/80r/8Tpf8Am/+Fzf9mv/8Anf9kv/9dvP+N0P8/r/8En/9dvP9SuP9Asf85rP9zxf88rf88rv8Anv9avf8Anf91xf9LtP83r/81sf81sP8mqP8kp//s9//m9f8AnP8qqP8sqf8hpv9DtP9Ztf8Anf9ctv/q9v+Vzv////8gpf/5/f/v+P/y+f8uqv+Nyv9Jt/8wqv9Drv/0+v9etv9Wsv9Tsv80q/8moff2+/+L0f+Gx/8epf+Zz/+Bxf9Hr/97w/9ev/9juP9Htv9Arv82rP/j9P/c8f/A5v9puv9it/87rf/f8v/Y8P9wvv9hwP9bvv9Quv9htv8vqP0hofobn/mQ1P9Nuf84rP+Lyv95yv9WvP9Uu/9muf9Qsv9PsP8Fn/8cnfbh8/+t3/+Dz/9mwv92wf9Stv8rpfshn/a65P+H0P98zP9yv/9tvf9Yvf8Qov8npv78/v/W7v+e2P90wP9MsP8yqv8kpv4lpPwno/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vxddHXIi+Z5h1aj754fuVAO/lHdmWMPnc+evnbHVlZi7tdPnzkfHjtTB/5LmaC2qvLQ/tbW/Ycqq2oFZaCIPxTrYK3PPK55AAAAAElFTkSuQmCC",iconMode="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAXVBMVEUAAAA90f8/0f8+0f8+0v8+0/8+0v9A1f890v8/0/9A0/881/8+0f890f8+0f8+0f8+0v8+0v832/890f890f890P890v8+0f8+0v880v880v880v880v851f8+0f9sV87yAAAAHnRSTlMAs9j2q17NB3lAOhnw6d/TyogOkY4rpEadlHJVRBI3ljbIAAAA/ElEQVQ4y8WU2XKEIBBFr9IIivuos8b//8wkFpA7U+k8pWrOk7fqsAjd4C2EaTDt6OeU3X0RudoPdqzZD7oaB+tWHEhNzp4wzeFIkchWMHumd4C7FBlJK047YYFHQdgoDSwJ4Fm6RsmwVAEnliRKLUslsPwmjS/SjaUlSv5Fali6R2nuniXe1OYQqc2zFLbkyIpM0/PffVlxrssKwlmpym+qcxx2W07+4fB/qMud46dYB2gbr3LoG0A5gvInmRrKYZYUu1m5lpKzpwtWpZFKRZVapegqzkYpX+E8KI1gOU9aS/W0WtCaszE0sdrmdRfH2L8ejNmPrRmmgHfwCVpdNPkKLr+KAAAAAElFTkSuQmCC",__vite_glob_0_0$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAuCAMAAABkkgs4AAABmFBMVEUAAAA0rP9f6v8mnf8nnv9T4f8nn/9Q3f8qpP8qpP9X5P8qpP9O2/8xrv8uqv9a6/9Cx/88vv8rpv9X5/8yrv9S3v9X5/9N1/8xr/8noP9T3/9BxP8/xP9N1v80sP8pov9Z6f9L1P9AxP8+wP8zsP8oof9W5f8mnf9Z6v9W5P9M1v8/w/89wf9Y5/9M1v9Z6v9Hz/82tf9O2f9L1f9b6/9Bxf8+wP9a7P9b6f9W5f////8po/9CyP9P2/9M1/9J0v9Hz/82tf84uf8vrP8rpv9R3v9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uMIOyMg099ic/4fmb1b38aqduX1KE4gOMn90Z8IYnciqBHiOiJXtxHaOVuejdcM8xtGoWbczcoxn2hCEJsojBsa2E0fDNIVAh8Yc/9g/fMiXfeins/r3/fwzmHw4FBVBS3sf8JUDwEg8811Er+IEkSI8n3tkT2oPF4qPYFTNWwRFLCHLgovj50FC4GwXkpVJsCX2sbMFDQAQwS7UDE3FBFUbjvtW9gsbQvW4Yh4Y5o1I6cAHVTJMnQS6VFsL5R4jIcpMRtF70maQdJ1zguGYZBK6WNdeA5LcVlms5kElYqlTo/7yV/BVGFg3QaLZ16AJjb36LlBEURT+lbcVuT7MQJon1xjtZ1nZa5zf05AMDqWdiQCeIpz2ezfNvaTsHidhDguKLTPbIuhc9WYeDxhVE5AsfZXC7HZgu33HncCXA8LnGZPpnWsbDPA6Clw02a4Ktsl1GZbq7K59MUZX8C8Fh/UDJtbB4uOd/MGIlWH3OMugMxsCgQkeLNTYxyiUQoCiPHRkDPcmPLMrtq87nT2VG7bJZPE5FhBCRtNZaBIzizF2LKzVgx1mmqDAwKwwWRhxKhvZkg6AtMnKCmUKzX6x0V7ukxD4uBNJ+FntCTiQAY8CLtC+TI3N2tx1TWDgrpPngZNh4/RLzAZbTcws2fFVgUO2qO5QtQPltlGQePt8qjYMgo8uvi4fLlql4sxprNnWFt/BmB88O8Hw+SYvnm2qwXYeP2oCUPPnnBK4FZoaG1K5cvyK4bk9QawmwAvCG4Mn5ttrWHyp1wj1z1NLNa27weXwmCt434fYLQaGlWC74qtmVprYYg+Pwj4H2etfnj8tHdfQVBKvd3R+Xj+TUP+AeP178wPfnhw+T0gt/7evo3o0Z1Zc8PYoMAAAAASUVORK5CYII=",backImg=""+new URL("../png/back-c3f6ce34.png",import.meta.url).href,__vite_glob_0_3$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAARVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////9SnXPCAAAAFnRSTlMAM2aZ1Mz38e3ky7+loYBuOzUbD1hXtcj05wAAAIpJREFUSMftlUsLgCAQhHtY+X6W//+ntkJBHkTWk4FzGmS+g7rMTkPtOhm7MPmwx7gHBDBH0NwFoClxOeAI1eW8hRjJAQLGFoEl5XIgmWUASfIQvgZ4ccg3b+BQ1QAFxjzACp7XAA5m/QBbDdj6BxCXxjwr9uN6Hr6OgVLNYIvsX2WcLxT0yhpq1g0MeSOzj9WeiwAAAABJRU5ErkJggg==",__vite_glob_0_4$1=""+new URL("../svg/background-b89deedf.svg",import.meta.url).href,__vite_glob_0_5$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAe1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////NgkbwAAAAKHRSTlMAf9skC4XC99iVZkfz8eWteOvnrqqQhm9bTDsvFAXKpJybcmhYSSYbq8omrgAAASZJREFUSMfdlMmSwjAMRAVkJTuQCQlh3/r/v3AOcZVjZJRU+TTzDr7YbbUsyfQ38Pa7KMui3d6jWaw3UGzWc64vMKKYDHIMYBAcSSbGBzGJHMA4iIItGFsx4xCMUMo7gYVEKgEsSMUoYaF0iOCWg/xK7nWQK+3eS3K3us+DPHHuM+3O+3n348sl9u/P97SbxznHiPz8kHy94hSMNH6Rnf6qOmm5Wi2Nbrr2ZKGtoPCJfBhUrTg7C6IFYEYr2Xm9PQh0tB9YFK3eVgImNlx5uTajVpWJFuTj923G7vk60JAmmCMISJNi2hJSJpCTRsosic+qLfH/iBeO/083aAb3jBsZdCeA36o5dfRJV0f4QlR3Xxo8aeoiiPIqC4Ewq/IoKOom6emf8Qv7FXRZWnmBuQAAAABJRU5ErkJggg==",__vite_glob_0_6$1=""+new URL("../png/bg-20e7cc98.png",import.meta.url).href,__vite_glob_0_7$1=""+new URL("../svg/close2-9bf3f858.svg",import.meta.url).href,__vite_glob_0_8$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsA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V1Gzeu7N869bynXs311T8dvv/Ax8xpgEA98oxAAAAAElFTkSuQmCC",__vite_glob_0_9$1=""+new URL("../svg/cursor-icon-1-b64224eb.svg",import.meta.url).href,__vite_glob_0_10$1=""+new URL("../svg/cursor-icon-2-03a5f875.svg",import.meta.url).href,__vite_glob_0_11$1=""+new URL("../svg/cursor-icon-3-020a25ee.svg",import.meta.url).href,__vite_glob_0_12$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAACJVBMVEUAAAAAnP8apf8Cnf8Anf8iqf8gqv+o2f8AnP+BzP8AnP9jvv8Anf9AsP8Anf8Bnf8AnP9Bsf8Anf85qv86r/8gqf8Upf93xv+U0/+GzP+e1/8Am/8Kof9yxP8Am/8Oo/85sv9qwf+EzP93yP8Am/88sv8Oo/9St/93yv+BzP9lv/9Dsf96yP86rf9Ptf9Hs/91xP85rv+Mz/+Lz/8xsP8xr/8pqP////8kp/8yq/80q/8mp/8hpv83rP8sqf9dtf9Ltv9Dtf85rf9gt/9Ktf+Wzv+Gx/9atP8uqf9rxP9Msf8Anf+Oyv8vqv9XtP9Vs/8epf9+xP9iuP94wv92wf9Itv9rvP8wq/+i2v+Gz/9Puv9yx/9vxv9vvv9avv9Xvf9Suv9Ssv89rv+35P+X1v+Q0v+RzP+Kyv9kwv9hwf9ou/9MuP9Osv9Fsv87sP8rqP8Kof/S7f+L0f91yf9nw/9evv9Uu/9kuf9Gtv9QsP8/r/9Drv+r2/9muf9Stf9Otf9Js/9Jr/9Gr/8XpP/o9v/l9P/K6/+y4f+e2f+a2P+S1P+J0P9+zP94y/8zrf/a8f/O6/+84/+v4P+y3v+v3P+g0v+Dxv+Axv9cvf9As/9BsP8ur/8Rov8En//g8v/J6P/F5/+/5v+55P+m3P+a0P9ywP9xvv9Ut/9Xtv/2+//W7v+/4v+Z0/+Bzv97y/9ov/9buv8oqv9cuP9ewP83sP/t9/5Xuf91EEEfAAAANnRSTlMA9BiPahQE/fzzz8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TZWy2WWw/ZgVSBy64xIJjus3o1yaqqqSnH3cBrrLIEdGIhEykD6F7hLc6wSVcUiQ7NlLHQALwV3JG2g8YeFwI72fgQmcMiSBS4IgSCT+JbgAAFg/cagkhok8w7IMpuxn4JCBxCULkWekJDtO1mFgMzoQ0pli2CpFUTQrNoRu0cNpONkXkKRDh9EGoJXSnoDxVToUKhZDVJXhww1F6N45EvjHS0bUvdIK6BqbJOxVhgoVPR7PbbcQMad3hBOuIMRk/2tZvdhVKtRtHIIFzfJhzDkMg7Tdi1XQo58/8BULHn/MH4/DoMakhgssBQW+HszrQZ91umRvNWNudwwGVI3hxTD2IsywkIiUpq3ghcXQ4Qy/Km63239LwyAlhvv4Gt3FoB2DBQzYLLRdrasknBGLFymaSYmiyLM1OtTDoO3CJhiyZbh2UVc3FVj4454RT65rwxYYYfmQr6cLvx9gAptBVKae/2gBr1hNuWjmKfnzxlBxDyjWM9GcyQreoF+bemh1cCp538wbfjyLs5lO62FqTQ/eNmY25prRNq7w8FXRvIK3o82c0TwG3mfbMB0Xzu/zyaOjZP7+vHBs2rCB/9DtmJfmZiYmZuaWzDs6MOoPgZ9gUTrqi+oAAAAASUVORK5CYII=",__vite_glob_0_13$1=""+new URL("../svg/down-1c21ed5a.svg",import.meta.url).href,glImg=""+new URL("../png/gl-0a9176b7.png",import.meta.url).href,__vite_glob_0_15$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAqCAMAAAAanYxCAAABm1BMVEUAAADGyM+sr7mrr7inqbWqr6+lqbOjprG0tLTR09icoKqytb6xtL2prLaeoqyWmaObm72UmKHExs7S09iRlJ/Fxs68wMaQk56eo62bn6nQ0djCxcymqrSlqbKSlJ++wMmgo62anqjKzNLAwsqjp7GWmaPN0Na4u8OnqrWTlaClqLKUl6HQ0tahpq+ZnKfBw8qPk53JzdG5vcXMztTMztP///+0tbimqrS9vsHJycvExcekqLK5ur3Q0NLCwsW/wMPNztDMzM67vL/Gx8nX2NnS1dnb293Z2t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UGuwDo3iBPoa1WGqtxNWl8tVEBqQaqoHuK3II2AGdfUpOWJp4/MKz0FnIZBqHKBb751KS+b1qlEuguI2eh5bjA96SaNPk9wImapCLoziKzcGWJxygF3Syih1Y6vtPnQKdHbsKNtX6MfxTobiJzfenxXVLroJtD3sJsJYvSJqMmZTYlEdWEDLq3yLtiOh1LiQ3127Qhoh7ADy/VPRpLp4vvEOMlmK6rnorqhLJZ8dTDVmsYNqvqvgqyS0YEeZHlebmOSg3lqa8hwa3NaMAKq1T2RT9A1Xier1pRKac0Seck1MpgWuBAVRvEqkdFWEz9AiopLScSKmCUFqxRni8+2g9mM1FZzjOCRxq/8EkegWJJDVB5WV6aOQhqr3chsmxgmL8S/3uJjlf8GEsSGiA3QLP7+k+YuFeLLkU3oPwUfjRM4CkrRRIODeSqkNFq93TD2HOtC2+sMyxW9zsPxx6nH8okHLgGqA1QdK9NH4rQ53cj2Ww+xZJY2IOX9/oBba+Me+oYCTnCa/d6J2wZTx4C8+75qZFg/sFVzEcieZTNsZhQ798hdQFjc1CknZ5IprcBxxZd76eOhN77zZrZYsnnqx6GJQHIp/0a97PZfgPAbthd7kPjOaYIB1rMteb9aeQIuvmZZu2LGT6HirMA/DZ8VSPFWnNmXjfuQeLxx1Kr+wvEf/gy7IxgBoY94Fe3Vfr4+KTS88n8xVa7tPWz9VEzrZ9bpXbr4jwoFTEaFuZuXz93QjPnrt+eWzAYRy2/ATedNa/vpLAPAAAAAElFTkSuQmCC",__vite_glob_0_16$1=""+new URL("../svg/guding-active-e8543b78.svg",import.meta.url).href,__vite_glob_0_17$1=""+new URL("../svg/guding-a3ea7233.svg",import.meta.url).href,__vite_glob_0_18$1=""+new URL("../png/headImg-fa687b2a.png",import.meta.url).href,__vite_glob_0_19$1=""+new URL("../png/headTit-e8696132.png",import.meta.url).href,__vite_glob_0_21$1=""+new URL("../svg/icon-staff-active-5035908c.svg",import.meta.url).href,__vite_glob_0_22$1=""+new URL("../svg/icon-staff-5a2b7c94.svg",import.meta.url).href,__vite_glob_0_23$1=""+new URL("../svg/icon_evaluatingOff-0b1c80e6.svg",import.meta.url).href,__vite_glob_0_24$1=""+new URL("../svg/icon_evaluatingOn-bb155620.svg",import.meta.url).href,__vite_glob_0_25$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAWlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////9ZMre9AAAAHXRSTlMA7/YXwF1PNyEEEYuH1fjlysewn5l0b0UpHAzU8WC2XK4AAADqSURBVEjH7VXJFoMgDKyiooj7vvD/v9kLVUIB35zbOSYzD0iG5PVHXh6xIoirMvfzU822NKmPnykPMjefRT5BxJyCQXkxuPhcBcAdgi4k6BwVUkF8VWpvwoJmtwRSPUBaLa6fBDVteK8e0Zv8xWqU5EJwaTVyuflFRTKJbqxISLgqLsFM+VeioIr5Exfk7Hi7j95iclOhw5MyMb4MjCQ16WhLvex3fKujtBqrKVhp9WABfCX40XhZ8cbpxOG0BrOt4TXfWXLGeHla5kPtDX8g9IvCQwAdM+ggg0clOozhcY8uFHRlwUvx5/EGSk55VOMytXYAAAAASUVORK5CYII=",__vite_glob_0_26$1=""+new URL("../svg/icon_menu-30009ed1.svg",import.meta.url).href,__vite_glob_0_27$1=""+new URL("../svg/icon_minus-35cb01c5.svg",import.meta.url).href,__vite_glob_0_28$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAC+lBMVEUAAAB44/tBwf9F0/VDvP8+vf9M3elPtP8z1/RHyP074+NDt/8+6dpCuP9Gt/81zf49v/8+vP895eBZ8dU75OEwzv4+xf8/u/9AvP885OZI69xFxf864uQxzv4x0fxEtv9O7NtDuf840Pw33O8/69Y+vf9A6tlD6dtA69dTuv8/vf////////9Dtv87wP833e1e8dlF7Ng3yf830v1Y8Nlb7eAuy/863O896N1l3fxDtf9Dtv844edCuf864egyz/1v3vpm6epW7OI3xv9Z8tQyzf5C3PNFt/8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S5BYX0BpAqI7Q90P2nS9fafv992d2TRIa9Q1NQGh7geUkAPviXTuslZHjHbt4sWZO39x5tyo0+kwIRhCDjFGwd0aZoT4dPnGm2WB9o8q1unYVtJFP/hQ9ZO4MbBTgGZJ4C8zE4uLTSYTiWE5BwrCYvCXmeNGq3Ko+uLnz3ccnzTMyFuiePXhBHSD/73aeL2rFS+Yh/nJL5i909prTKb9UOocQMBFERPyuvPRh9l3A9Ce64ZIMpPeXlNTsxWVgliEb4lQMFDjFK/KA0MiNJJ11dfdP1jiZe/wYA12Kknl48IChAhUvvQfNxoyWVs2/rohyn9R//HpDxzYQQoT5evKywuGho/vrxyBwJB4ulCsDeMXR05kGeoXGB7/4CMPlJc/8EhYfHhgPwLwGhg22k26xtJO0vkDY20NjF8eoZWuvXonmtK8rftR7/iQcFepZxU8yRSX0u0fdg3Uh0Tc2SOAzazBpsEOrl0IDvEvhTnYS9dZvVPi9sclurlaANzC9fn6iP7SDalgt8S4rb6D01Mc3LwH+vgM9HZzSAkPC8nXh7sFSzey7L0dJqUP1vv6Vlb6+urDxkU4eFs9SP8DBsPTop/3Wh4AAAAASUVORK5CYII=",__vite_glob_0_29$1=""+new URL("../svg/icon_pause-b4b9ea85.svg",import.meta.url).href,__vite_glob_0_30$1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAC+lBMVEUAAABLv/8/2PpO7Nw9vv////9Az/g8wP821/dOs/9E6t1Sy/9Ct/88w/8+v/8z1PlFtv9Gt/89v/842PY96N80zf9DvP875OFM5+Ewzv4+6tlI69w/69ZB6dpDuf9Vu/8/vv9a8dVDtv9Dtv9AwP8+6tk85eA5yP864+Je8dlHt/89vv9G1P5c5+c91ftbvv9C6tlDuv9O7do959z///8+vP8wzv46wv844ec/7NZDuP833O9f8Nsyz/1p7+P///871fs54edjy/9C6ttgxP853utI69w5xf9UtP9o2/5b89Rl7ORM6d83y/9buv83xv884+RiyP9t4fRt3fz+//9Etf9A7NU4x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ih2xX/FYDR9UGjgpVTH36kGWkvPhO5vyc6tbxco0Grow0fzEY0l4H/SOZDspcx/I7jO768XKvV4hvOSqMMjEBt8M+Vp6isgUl5TPKxYSt0AsZoDY9XpHKIOAkRbN35qmI9gBmy8nTpLmhpSvURpH379i3grmpQeVAHoU6e3DFW0EC8X6iVaQLt/H1ngbXeE6oRBekAEUIQwrPx0YLfTBnJPJmU/as9ugv/Iutpg/v/gPUd1cHa2tr+/tOshQnE+6VYA0tk9+4k8kZmoD7x/umx/fs/80z//rHp3eL7iB7oEDvSG1go+TjNqwxjUg4pm0PlwHLZp5qN6ZPu50+MWS7ncW+8EmYPTMg6TOUX6gEeX9G9k7XJve3bICSk58UmRIMnlH1YT23PVG97IwBvf1WeKswaPBV5eKf23BeRPDgswdvBwdfXwcE7Icw/3S9P5e/NYnoqIPfeoYOTe0ZEHDgQEaGKHRya4GA24H/wnuVZaWhhzAAAAABJRU5ErkJggg==",__vite_glob_0_31$1=""+new URL("../svg/icon_play-4e74a97f.svg",import.meta.url).href,__vite_glob_0_32=""+new URL("../svg/icon_plus-8646d352.svg",import.meta.url).href,__vite_glob_0_33=""+new URL("../png/icon_reset-51a1bf04.png",import.meta.url).href,__vite_glob_0_34=""+new URL("../svg/icon_resetbtn-b9bae964.svg",import.meta.url).href,__vite_glob_0_35=""+new URL("../svg/icon_speed-ba38a91a.svg",import.meta.url).href,__vite_glob_0_36=""+new URL("../svg/icon_speedRest-c6c9e93d.svg",import.meta.url).href,__vite_glob_0_37=""+new URL("../svg/icon_zhuanpu-61d31826.svg",import.meta.url).href,__vite_glob_0_38=""+new URL("../svg/info-ba658f25.svg",import.meta.url).href,__vite_glob_0_39="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAqCAMAAAAanYxCAAACnVBMVEUAAAB6yP8jqv8Nof8oqv81r/8Po/87sP8Nm/8ttP9NuP6Y1P8Vpf9pwf9St/84sf8Vov9Jtv+e1v8BnP9Ft/93xv96yf93xv8BnP89tP9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HRGyH1MMqvVv3Q3f6mrM33dGHSng0DDdJ0rg8G474SFojOzWPeNrzizMxNmUtaZAq3TSfBbgNMzLDIUw7pv0cOKThbMJJ0Gc2z3ywMgp6cYfPmSIRnOXv4wkT0syVCwGAEB8v22YB5uu7+2+gSLnt4+iSp38WNPrkrS19vJggX/7TiwwMTiMQGuC/noaVh6enqPWKXK75rRPKDNdOWrVOKePhFsEh5bmIBFTHbwHP0gx48vDOvuTmfnicWvtMTiPHZfNcuPFeDI2wGbi+Gsov1dNVnf+089XwQF+WvpWgZBVVVV3d11bI2ejEzXcBbLj+AfbYUDy9iesYgO8iVg4QexWOHzYBBOJSja4owtWMnUOsmr3tORgI3fAoKjZ71XkrUp0M30xOa7Uq+JyQ93MfswOeElvbv5BEyiMrO5YG21c+MqzDbutLK+YGMGlvgLK+BTTEziq54AAAAASUVORK5CYII=",lxImg=""+new URL("../png/lx-4dd7abe9.png",import.meta.url).href,__vite_glob_0_42="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAk1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ROyVeAAAAMHRSTlMArVfi/JpK9EX47OY5FMS2hmgoBtahMxcM8LxvPiIc3cx8U1ARpo14dTuqfn1iXlzwPa3dAAABhklEQVRIx+1T2ZKCQAxEuZEbBZQV72vP+f+vWzoDKcZjSx+2aqvWfjFp0j0xmdGe+CsofN9Pe/k8iQ/rsl/hH+PqhbONIRrMuDwSgLfigjQkZuG0uSkIrYNjixZRJhnL7ZhKEiuZDaWbLRgmMbXHhCFNg/hVZwFOd83kfYmCHMykCez4Yw+nSGsx6AR555Phn0xAVbYRpugVVheCTRMcEND3sdYHjggUATA8trOoMal+/ZwIRaDAUk8I1ouGePtBMKMxcQHtapDdFsQoOPHqkGEGNwUJGXJaG3KVwS3BEAV60DMIbQGquC5wXCwr1xSsR+jqqsCHm+t0KdM4trwiSD2sm1IVY9yWS0Gto9uEfQdR1Zu0cyEI4CNWygC/KCqnTTg/F5R0TffqgKd+E2xD2r0i4Nc0IixiOIxAhObOw+/nuSBzRQ9GIGcMqLveNckGwVYooD1ZU36CGV9NTyy3siX+ipenEQqT2plZ2t3IcutUaP8bli7uhC4ni/p7FQ8LHm/pid/BN3OTZ3R1P8PrAAAAAElFTkSuQmCC",__vite_glob_0_44=""+new URL("../svg/modeType-7cd93c3f.svg",import.meta.url).href,__vite_glob_0_45="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAjVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8DizOFAAAALnRSTlMA+sUUL1chBLeLbQnsqnP03II0fUg9D82/d2IZ8eechijf1KhN0cixl5BBomdSUHFLSQAAAa1JREFUSMfdVdmSgyAQ9D5W463xyp3Nnfn/z1tksRCByOPW9guI3cDMdA3a/4RZtlEetQ9TiW35Rxhx9K0lemEAC6P4RHc84OE5Ur7dgwixLeGnIEMu5PsgRyPgRwBwMq1erPji+KUO4KPREwv0csYPDgBPNGYxiHEIuID7StPOMciQsmZAxBuqsg5SxIxRcgC4a9qKXHhbdG5XbHV5bpOBdt8SNzhj4Q0migk/Y6xAwwuYnFnTGlAkFfbsGf+uEnH1VkAxGGe/RpP1frAXUKyo4Juuhi7K2QZPNygvbggj+okHQ3abHZnvpofXU5fT/GF7jMkxqCV1HID7agI1QZjhTKDQ7mpXOg/bp8O+N6WgN0MVMelaKaW1JpzQVixc/RuYZypZgwq+GPNR8ObjBTkQcPbWL6n92HMCMwYh9Bs5jQiWelKC6iURBAcRH2elTE/XZ2NRAW0zM8TOsH4cbzdvTpGwQdq6vJv584DRhboYOIE0cIM7tvnc7k/EtxSvzw+KhxbejMCSPVnU6O6FOXLhUWzRV0cV12Dp2cVldts1Tln91pRRZY8s0P4yfgAA6rAk3MjRBgAAAABJRU5ErkJggg==",__vite_glob_0_46=""+new URL("../svg/music-856b3e8e.svg",import.meta.url).href,__vite_glob_0_47="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAdVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////li2ZAAAAAJnRSTlMAC/NHUvfm2MGprZV4cBSSTATIrpyPhGdmWy8i7Vc8OeqkiGkbu1jhCIMAAAEpSURBVEjH3ZTXsoMgEEAVIkWDRqOm2NLu/v8n3rnFCQgumeEpOY+6R5YtRu9BfJKcEC5P8WvxBwb/sMMrn09BI/UeUgowEKVHyGBBhsefweKMCntb2KM3Tmwhwe5NwQFFhKNLOCLC1iVsA04IuwNepfA+4J0OnyV8WsP3Ad+48J0O50HvbVHXRXunD382w5WBBrsOWF5dRsCCZN1KeF4bk9Q/p6nOXfG7iz5xbR51EmYuO8/uyN8syi9ti7D4ZJgPBdtwvIJmfjqBhpFVbNRynB+3RoX1+irnTlKzyEoTKtBJ/6pcLPa10oRFv5qf0zdWB9cFSKhHELBg4xCEJlCXgP6flF9QkcFY4UI1Rkumgq8JvJhWBpyqJhWc9UTebpL0jIu0UTSPPoxv5H52EMFGNzkAAAAASUVORK5CYII=",__vite_glob_0_48=""+new URL("../svg/off-8d507628.svg",import.meta.url).href,__vite_glob_0_49=""+new URL("../svg/on-13b29450.svg",import.meta.url).href,pcImg=""+new URL("../png/pc-bb226da5.png",import.meta.url).href,PcEndIcon=""+new URL("../png/pc_end_icon-c048a862.png",import.meta.url).href,__vite_glob_0_52=""+new URL("../png/pc_icon_pausebtn-6844b114.png",import.meta.url).href,__vite_glob_0_53=""+new URL("../png/pc_icon_playbtn-727f07a3.png",import.meta.url).href,__vite_glob_0_54=""+new URL("../png/pc_icon_resetbtn-e6358a0f.png",import.meta.url).href,__vite_glob_0_55="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAPFBMVEUAAAD////////////////////////////////////////////////////////////////////////////YSWgTAAAAE3RSTlM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cMhLRmGuTLckV4AIRLKFnmR4TLHD5L16+G22/U5xTA8ygsBY7lCo9vXLh4xtgQFkWBtZKASswARMBgTvt+9SbHdPwIjZqiQMCgYi8EwyQekCBBBwxRB5YjEgPhv9XBLtVKXe3MfkBiRABEwjDoiASICDVNFKKRgAoyOUaAIVgCSCMHBMFS4EElACkQ6xp0QzjuuYR3ORVKQ5HEkIUkqOIXbQT339Ki83pvDj3KRIsIpIAOjMpdSXiILNxsMehAOemXnrbi+ndeQOSBZ1jMqyxaUz1OSzikgkRkSAUJLJEPktVa1rbq7P4+iaFEiiyh6NetxBCuR39LrpkVBKArj+NFBMIoogpnem6ld4CJcqVlxN26MlIso9f2/xzznZjkjOQ23P/NSnnt/HNp1jIFst9slt0U8Wy7VX8Sv1PDRHO+AxEcgp4tCNGLkciqRlA09Jb0h6StIykgc8yJZ88HVqnmW8SpxTHEBJMuylUa4BqS4IyutKiQFctBDDlkmUiCtIhWHgyaCi0Ba9FXkQjCy/iOcfzSHIkRefFIXCIxwHYbVNES1C4/mITYB0qWeQvCwGtZrwvFWbdIjs3VFNhxPNs3V50CwScskGvNnErDi1NogpzE2At5kTERmW4gkCEJv4/Klf4bDrhcEicjbJiE7Z8TzXBeDa47Dv87OKdvt+KV6jsqDMLBJbpOqVypwVLf//u5H/u+Zh7BIInpUZreThBlA96Tv+ko5n2+GxF2+rQBFJG2b7pkTC0+M4B5zPtrDgLL3EV+tMnDBmtS+e82675Zx7U0lPUb2lSGlel4est67MxBP6kupEP6BImWfNBpFEghSRjQineYfUPyb8TEnrQZWhVgD0mwaRT4E7BFNSbshFBRFQ9LP7ESqjkkvZFsGjDebXqrfMYxOn15sMRgs6EnfkEyUCbVWle0AAAAASUVORK5CYII=",__vite_glob_0_58=""+new URL("../png/qx-94a58756.png",import.meta.url).href,__vite_glob_0_59="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAA4CAMAAAACeQDhAAAAYFBMVEX////C0N8AAADI1OL////////D0d/B0N7////Cz97////B0N7Bz9/////////C0eDD1OHC1uD////////////////Cz97Bz97////////Bz976+/zb4+vt8fXm6/HT3ec/6Yw9AAAAGXRSTlP+/QD+G/lq9/Lx5eO2bE9MGhm4t5ybmplvrXGEmwAAAPRJREFUWMPt2cmNxDAMRNESJcv71jsp2c4/y8FAaHQG4oUvgfr3AhVhvg0NV9IMtzlQgTL/AFeGR/gFLB0r6JZvwAesAp8SsICVYPkPCB2r6QKBnqzoSQgNK2oCZlY1486q7hhY1YCGVTVgZRZgARZgARZgARZgARZgARZgARagH6BcACTWhISDVR3IrCrDgxXBYzxZ0Tli8onVJD8hygVWgksiNidZqQBZ3AZ6iVyJFaRL5EWgvRfxJ7gynF6k3wlEqxMRn4+UUElKR/Yi4tZyWEQnKlz8XjZrLwr69Xda7e9WKmvfO5WAYovT2LpK2nGKGxV/emea0reWbEgAAAAASUVORK5CYII=",__vite_glob_0_60="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAAA4CAMAAAALkqCbAAABJlBMVEUYjNQAAAAYj9ceovcYjNUcofYboPYfo/YZjNQZjNUcovYZjtYajNYanvUul9kan/Urp/cZi9QZjNQYi9Uurf8aofUZjNU4tv9Lwv9Gvv81tP9IwP8+uv9SxP1Evf9Au/9RxP4lqf4tr/9PxP8nq/8rrv88uf9Nw/86t/8zs/8wsf8vsP8prf9CvP8boPcan/VRxf8covgfpPsjqP0hpvwdo/kxsv/b8v4oqfooq/4urvxPw/1Kv/wyr/lGvfsjpvk0sfs5tPkfpPhDu/03tPxCufpLwf47tvwqq/strfk0s/4jp/w9uPxAuv09tvmh2vl+0ftOvvhSquAsltjV7/3J6/2t4ftfyPvC5/rF5vldv/VjvO+Nye1+w+xrt+VptuVasOQtltg78navAAAAFnRSTlP8ABn0820b5eO2nGlMT/i4t5qZbBxPjRTlEQAAAypJREFUWMPE0FFrgzAUhuEUUUEo7UVHYXcd7bBrUbq1JQYkQYSq+f//Z9/JoSvItquavBfGeAJ5UMy4JF6kpdfSRZzM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uu+BXMvGrz5eNBmeNTXOCSODTjcPgyN/JPH0uLjpxT5RC2nxGRH7cBdNe8OeveeXfagQ2TRyFd80DFigH5H1FYwdorR7SwTWJ2GsEKZ022cMrcjantFIMqIifMq5wKX4cpofdOEriKnGCFg9ZY5ghMqE5uaaFv0Tgx/rMkZKgoGa42g2mDQ7YD7GrGYqkUDuOn8bUOWBfUt/jqdsjINprDP4wmFQh69r0WyEOWfDUVuZ8x6/zJ7kccqCiyfiN+AZvUU2QfucypgUJ+zKOQSOFYMGY1uX7WZJbLZIoU9bmvCi/NKFWgmjBAoq25xJVRdJhl4NBrkT3Rel97hMkVS5wphIoJkCgRMJr9gUM2sVB3zawE5Xi15YbRU6RivKWb1xcVkiMIee3kNZ3Y5w2KFRXFFGjGmnhKE55UMx7IWgywLm/YKUfDNKSz1FcOB+JQj9qOOI6y3wmvhVGuybq0gWEjK04LgGKAjOLBpVdQx4PXXRTj+r/sS8jesmv/1T+gPQQfItZdGe54AAAAASUVORK5CYII=",__vite_glob_0_62="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VHQRUAAAAMnRSTlMAP7j89I1C8U9vC8y0lnY5EOvkwRb41b2jnGNdVBvf2tLGua2SWiyHgQe8j2VIJWozIt6D2UYAAAGVSURBVEjH7ZXZdoIwEECn4grIqsgquOBe2+b/P64zUYhKqHB6fPM+xMkxNyQzMsKbVxHrNkMGPaihN2CIrcdAWEtW0Acp/XLB0sKpy5oLzAUIy0m3/kjdclEICxznJjTAnOPSBdB9cmhETpkBhnw0Ez5o7X+Fk7+dlMkZEaf45w9hhJPsGhusQOvXCunNrMNKlGGNYDIiEILtOLwETo0w5sJALQXaOVIw2EiFPdaENszvBNAwMKVCjKExZaxzJ6g2XmIiFXT6hoakEHzD2Hn4uZbeYYKbzyCixzxkyVelAhXhCyzUvAfB20gFjU7ED8a+r4K+XvsOpVV2hw1lNAgCjc58m6UAg61E2DKBvRcC32khERx2w1AIvP5pVfjkt5shFKyEYFHgVgWfFQWgLjK1uJAdDhr/MRkVYd+97Fs8K0RBkKoVwVJExT2+ZU+sXyUghO51Ye66EVw4r7SjCupozOmF57s3Tmv7Tu9wiJoJEXU7SKYtGxkcGfK0e4tWCWrWqhkjSdam3RPqLlWed2+F/lDevIhf0Np+Ls5xJpMAAAAASUVORK5CYII=",__vite_glob_0_63=""+new URL("../svg/section0-6aca7de8.svg",import.meta.url).href,__vite_glob_0_64="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAA/FBMVEUAAAA11/////////801/801v801/////////////////////////////811/801/801/801/801/8z1v801v801/811/////811/811/////8y1v801v////8w1f8o1/8z1/801v////801/////////////801/////801/////////8z1v802P////////801/////////////////801v////////8z1v////////801v////802P////////802P////811/8z2P8z1/8z1/////////8z2/8z1f////801f8z1v801/////801f8y1f////////801v9Vj+jxAAAAUnRSTlMAPz+4/vrxT5aNbkLy5L389czDtJyNZmRcQjgbFw8KBuHU09PNx8G5ta6mkpBwXFI5LAn07evq39vYvKOgiYZ3dnVZVEgvJBQRD/aZgn9UTyQZ1bGXnwAAAalJREFUSMftlWdTwkAQhlcpSq8CUhJ6R7rSERAEu7n//1/cC4QEcmGScfjG84G8N5Mnd+xONnDhXCwCXTMhxHoHGticAvJY/ALKukAk7oGJQ5AwJQB4P9ErIHmAEKGYkZNHkggD3SDZAB1En1DIgRWFCOjiAQUnEORKn3AtIP8VQsNxfF8cOyVcX50QarjI7PJUkMg6NIWeYmUSZOoaQoNQgrLQcbnEFrg0hHdRsHJ74UYsJtJkCjz2xIvL+YEAWQxRprDA+GwhpHAgJDoYXplCgBBPnP7EJGE0m03SeK0AS4jjw90QodscVancYgliE0KwQS11JKSbTMFHTyQejCx3QrFSKbtoWVn/YUkrGgwG0SNVZZVGGCYMYUxkurxCaGLIMYQkUfCtEKIY+mrhhYaUG6GhpOgDDXm1MMSrRWxAgaa1KKQHg+ybgExVAu/dPlfaK4SCTL+lEjYWueMpjDWwKRr3C7Lg3d049/ulWfBT8lU5aNlvRWzhFYBC8Bl9pz+MjZk2xCwGBxlUDY5K4DKGhjESyxga9wj32fPg7V7tI7W3H5Q6XDgTf95TzsvvVW+XAAAAAElFTkSuQmCC",__vite_glob_0_65=""+new URL("../svg/section1-65bdce67.svg",import.meta.url).href,__vite_glob_0_66="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAmVBMVEUAAAA11/801v801/8z1v801/802P801/801/801v801/802P812P8z2P802f8v1/8y2P801v801v801/801v811/801/8z1v811/801/801/801/812P802P8y1v8o1/8z1/801/8z2P811v811f8z2P801/801v801/8z1/802P801v811/801/811/8z1/8z1v8y1/801v996yOAAAAAMnRSTlMAP7iN9fFP/Mz6tG5DORUPCuvUwZZk5eC9pZuRXVQbBtp3c1pDLNLFiIIkvK6faK5LM4y0/gUAAAGdSURBVEjH7ZXZdoIwEEDHHVxYC8qO4L61zf9/XGdSISih4unxzftAJpobk4wZ4M2riMYmQwY9aKA3YIg5joDQu6xgClKm5YCuDpDYrGQlF1ZihJ2AU3b6zUvql4Mc2OJzPoMWzOY4dAu0nxxakdPJAEM67YQOjf2v4Hg7rTzNCXGJDn8IGXY213jJCpRpo5BWel1WMho2CDNG+EIwXZenwG0QfC4MjFKgmcMRBmupkGBOaML8RgAFg5lUiDBcqox1bwTdxE1oUmFM39AjLoRzlu0tbAPpHjScfAEh/czdKXmGVJhgdAEdNetOsNZSQaEV8YWx76swDgJvTscq28OaTtT3fYXWXD2lMwY7ibBjAjMRAp9JkQguqzAUAs9/WhemfHcLhIKTEHQK7LrgYauWCVA13myOR4X/mZY1IaHPP4H44pcdBUFq1ARdFRmn3GbQqyQuBiH0rwNz2w7hl8NJCQwwJh+cnnO4uXHKs3d6j4+wnRBStYNYfbKQic09qt4cB8DYtK3eRQJjq231pnJPGPt09Lh6j+iF8uZF/ACMe35iP7VHJwAAAABJRU5ErkJggg==",__vite_glob_0_67=""+new URL("../svg/section2-15e16c95.svg",import.meta.url).href,__vite_glob_0_68="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAAAkCAMAAAAU7iwuAAAC01BMVEUAAAAAbKwAdbQAbawAbasAa6z+//8EcbL8/f76/P7///8Aa6wAbq0Ac7mcxt8AbKwCbqz7/f7w9voAarAAbc3l8Pe/2er////a6fT3+v3h7vUAbKwAbK0AcK75/P2byN+SwdwBba3s9PkAa6z///8AbKsAa6sAbKwAbKwAa6sAbbH2+vyXw90Aa60Aa64Aa64AaK7///8AZq/v9vnj7/bs9Pm10+cAbKwAa6sAbK0AbasAaqv9/v/4+/3p8vjs9Pn9/v96stT+/v4Aa6sIc7D9/v/d6/PQ4/D+/v/n8feFudfM4u9dosv0+fv2/PzH5/n8/f76/P7////0+Pzv9vr3+vz6/P7v9fn1+vzh7fXg7vbZ6PO82Omt0OS51ujQ5PCLvdra6vOpzeT///+Xw96Ovdn8/f74+/3o8vhYn8kef7f1+Pt5sdM4jb38/f7z+Pv2+f34/P3////x9/r9/f7Y6fL9/v/l8PfY6PPo8vjv9vrM4u7d6/Ty9/r2+fy01Ofj7/b///+00+f3+vymzOP9/f7s8/mfx+Db6/Ruq89zr9H1+vvI3+52sNKFuddGlMP+/v4XeLQlgrmWw915s9M9kMALcq9MmMXL4vAVebOAt9a31eo6jb4Hbq1XnsoTebOky+JJlsLC3uwuiLvN5PTo9fg9ksIAba/r9vrh8Phvoszj9v/8/f76/P3////4+/31+f36/P7////u9fno8vj+///6/f7k7/bk7/bI4Ozz9/v5/P7f7fTs8/ng7fXG3ez////////D2+r////9/f/t9PmmzeLB3OvF3ey31eiSv9vT5fDL4O7g7fXJ4e/I3+3W5/LP4/Bfosrk7/jE3e2OvttWnsdhpcq41+dho8vn8PV5sdOgyOE6jb1tqtDN4u9gpcpdosw9kL4Xd7PL4O4DcrBnps37+/uNvNz7+//b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zNnNyefZAVocVKbe53KAJ2qthk3snmrVlNWZnBkYUatg4lggG1auhjkvsblRaKM83kcJtM40Ax0tymBYzi42GFLEMRJg27Xi2zlcSyW4jlXumxmTpTRyOwNprWE9DCb62Hc2JvBBD9FENiEjCH4t1T18YiO3GDOz4+CXMtg2jJd7MDKrHwcBfEQ7s0PlAAgAHVJOQCVisTjkLuRwGtnkAJSsahIM1KNJiHlDhhzwWt3GgwGpxWABrSmyOVAxkju3SMj53M1hkb/8Lgq5JB1Y1UXCmSWrNEUk8uBUhHqQ24uS7Fp98k7nWsD1vYid16rWpkZZPGQchAlK9cDct0QJYTcZGmNyiWyxvPQqL3Qy0XL7O3a5VXRroVcDpRh5PV03/K5Jgp0Jl9/LEV3tEAcA5cuWpa1RY4ohsbJhG+kEnfvh/tsCblzYKBjdaLf54DD+I9txsnyrCIyUuWqo6AjCaKOuHrOtxnpGJkuf7Yo6sXJOPlv5K6ft80vGG7bq7nNeagYWUFmuUmFZnqczF9VctXtjjjziibhzhmX10/Fyiy6aArEydAkLFKwczpaP1a+f/Wf1IyVxRMvax12VVt2a4BFPax8qVmbYo5G+/b5VLQfEy2Tq2q9mRezSpKCFw5HbqnubHh5HUZXGq7HuNignGoGNSY7GFFpdFdFttqOLRXmLMRhsjab47Q+qBBZozhuPf47elreZuBV88mMa20xcVXNnjMp7lSHc3LF8ELfCbDFH7q/y3Yj+Zz53CaHJxhoqetZscoCJsXmLRdKd5sMs680LW455uXIiHkTs2QpBGSJRspN/FBOWZov3VuO3ZhqsDo1LpuX52gaJaR7UjTOsgtSiEwwe0yav+Cw8cqH4pCfpo2B1FRPwGfkxEkExG/UelypWp4Wpwukaf9IWrrZT0UjJIZCPMqjnoI3m42c1P4b8Ks4aJqOTQhy5p/8AorDsWUjtbzuAAAAAElFTkSuQmCC",__vite_glob_0_69="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAolBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8ELnaCAAAANXRSTlMAoQX7Zd3N9hDu6ePZrKd7TxPTnJR1X1hTIgjm38ONcW1pRj05Jx0XuZePg1s1LAzKsrFah5VL3fAAAAGESURBVEjH5dPZdoIwEAbgYZdFFhURlV1wX6qd93+1noRjayAWuG2/a37+ZM4E/oNShP4u6V3HCPoJZdtAKoBu5+kav02gm46v3O6AxQRu3YE5MryBFQr0q5CE2iGEbqKCiAsYYM7Ms2/FaUhCJrcVh1bIQyvM5ZAKsk7J0ArjCnzb4pH6fiLndFed3cQwVUFCRAc4qlhBSbX3h5mwB3BVfKGPoCXXEMdbqI3GyDq2A2R+xfNoFjZoHve1fAB1VbElbgViJAl61hm2aVUzsKS/XT0ALhJyCJC4bMKLkFBdTgG9hWupOdtxQEpCrjmAbOzYZ1RM8L0ZHbcms5uTmW8DY6gHMm3cPVN+DYg6TTDmN25gD8RG4r3y8rjizDU4ZZ8RmcgdWH5O/nS08B0bWBuMFuQZe/KUOwKzhIYxohmf67VaOLai4YuJM2q/ozXdEuFUPbe9COTMd/w02IyApzSwtrYd9+JBt4pZcEkPOhNiavx8b4fQg7iYWhpKq10SQn9L+MO+AABdeIeCFJ6hAAAAAElFTkSuQmCC",__vite_glob_0_70=""+new URL("../svg/shenggui-31fe8d1c.svg",import.meta.url).href,__vite_glob_0_71=""+new URL("../svg/shuodiao-active-36a3e38b.svg",import.meta.url).href,__vite_glob_0_72=""+new URL("../svg/shuodiao-da855d30.svg",import.meta.url).href,__vite_glob_0_73="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAk1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ROyVeAAAAMHRSTlMAs+gEyfz5sJmFMu/UgFJJLB0J5L+1q6CQbFg6FRH18uDVxYx4TTfhzcCkdGFFQyQX0OdKAAABGElEQVRIx93Q127DMBBE0SEpq1nFci+Su52e8P+/LgkMWKCzYypvQc7zXGCx+PsGx2indRYdB+jiFNiroIRPE1nHtMJdq5G9oe/elfbtD/0VqEpbga7BKCuagCgssSRBxoIMorOlzpAkPEggGfNgDMmIByNIQh6EkPR+G2geaEj2PNhDMufBHJI3HrxDtLXE1kC0YMEBMhNYUX86JMXHxgp6T+oEogiFfaBUDKZcC/svKZj08eb+sfqWgzIL3c7D3URdVOBMEWdra3ubh0BdLeCxnChH+1kmV64CHs3MDWYGHoPILVbwWbpBAq/ECSIDn+bZKWp4pU4whN+ras3RgTm0QYku6hl5ElXFl30+REemzOP4JcV/8wmuL3NAy/72ggAAAABJRU5ErkJggg==",__vite_glob_0_74="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAMAAACgaw2xAAAAP1BMVEUAAABnMgZoMgdnMgdnMgdmMQRnMgdoMghnMQZmMgdnMgdnMwdnMgdmMgdmMQZnMQhoMgdnMQVdLgBmMwBnMgcNnY9bAAAAFHRSTlMAyNbh9hjMqqDq27W0iXheTC8LBTn38I8AAABSSURBVBjTYyAMeNhxSDAzDbCECBygSTDCAUV2YBolzM/OxsghgGE5KxOUjW4UN0wRF5oEC0yCGU2CESbBgSYhyAm1ghXdnay8TCwsbHxCDMQBALW4BaypDFDaAAAAAElFTkSuQmCC",__vite_glob_0_75="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAA8CAMAAAAwsEgmAAABiVBMVEUAAAC4wOOgw9WYwOCht8uit82jt82kuM+jtc+jtchNn9ugt82kt82ht8yUudBJndujuc6juM2kuM5SuftJndpTodlXv/pQodlfpNZSuvpcpNdSuvqet82jt82Ms9Cgt82juMyht82guMqitM1awPxYwfqjvNJct+ZcxPtmzfpSufpmy/pRuPplyvlZwPpjpddbo9h1qtVjyPlexPpsptWMstKFsNNbwvtUuvuStNCcts5lyPpSufxbwf+ftcyqts5Vv/9exvtexvr///9s0/lv1/lIndqC6fl95fldxfqF7Ply2flhyfl74vlawfpTuvqI8Plfx/p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Lv39kBGD3C6EHS8Ww2MdvyjUSMZq3WaPw7EJ1DUlp6JDLCu0ePHF3WoE7zPgovBNL74TBJb8cQTmQok0m9WDyrAxvIH4BHKzxMmuBcHOAuZIc1vXher9f+8vCiUZJW4UmPDE6nX9P1a4CvOpMmDwFj696UdqKf1esX1rEZQFh4eCEPAUMeCGc8bCilafp5/dooHNNYVNLUeVW+MPORzZUA1i+LAAsP6Owu/YH1l8ADwjMMgKWHgslDSvdVNICLEcOwTDOPHq3wVNJ73OMFuw+dNYS5NI4FaLkeTukxlqyksDVMvGCZCLdJb9nCY8kkly7CLtmld92SZlUBwxNPf33rqN9/wCNG0g4Y2U6awovHEf6ZTOILUdodVh4AkzTC7ho8PAlXeR7cw8KJwxP5TsNBwImr9cgmWBlgaA0w5UFJ0/XAPACW0gCjB0pzuGNN123hIVytlNRYaPPIA9dUeSD8pGyTLpgmwPIgpOVOb9HEx1gfeABMHpbwwM7SQ63pBOsGWM6FPNSakkdQhtfF5spllbRBsJR2XLG9+AIbKlPSMjySdoQnD9MyGykraRUewio8kh71MLs00BKO4jVFWEnP4JEBD4Q1lBbhAUzSMjxcU/4LeCWSPpHrkbclrX4BU3QY0SOVapdGWEoj/JXxuo0emkpafeNp5bHIRHWDh3yhYz3UxN8xWSN9zvBo4vZrOu5hiu6ukLSauOOavpWs8KbwXNc0vNjx05yU0nRNcfPIY/oL66zhfvJwfC6h6c/MvXqH3g8+fWAJ+OGzgfmlFWarG2rqAKqUjHVOAAAAAElFTkSuQmCC",__vite_glob_0_77=""+new URL("../svg/task-bg-859300d7.svg",import.meta.url).href,__vite_glob_0_78="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAq1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Nr6iZAAAAOHRSTlMAJgv9++oO8xXvGQf3ppph39y9UzQe5NLBrZ9+cV1GLdbOs5CHOsq5jIlnV0xCI8OvhHdrk5JoP6sIt7sAAAHaSURBVEjH3ZTpcvIwDEUF2cgCCYEkQAhbodAW6PYt9/2frJGnnQyWhgfo+escS9G1Tb+Ryc5z8I0T5indZ5DDYlvQHfoVBFl0R/gLhTkxcZrGsqEECs6a10bAQggpVOp2qXCBsRBGUBm1S0/QKjxCIZ/yNELTmk0AyZ7oZV6N2RTf9yBZUPRT9yxDhsDz/U3n2tQQvJu/3TX/WFvZwhyCA4XAA+f2yAlajNGRBGAGayDp8+IK8OyD5HTf7/qxCcU/ANnPRBJLOKCjnX2ElvUVcM15bdi85RkdvbYgWj65z9xvC5Sc+C1/FGFrtilHwwBwe5YwUwSk3ew+ySLUhJIuMHgNWRTQhD29AchPjU82Z01wo6sLBANS+NCEIT2YC3FWhKEmTH2+CL31URE2ijCjJYAjLTwSxK4iTCgDsBokiIQwhRTG5opsqG4lITSKsDRhPsce8CGEkxRCn8t6/dSMy+YohRMNTXRbAJUQSiG4RZRwdBeToBASIQzp3fTyBkaE7QnhEHsc3dVBixPbwswSvp/aV3M2tHd1KYWKo/MDME9C6Je2sAKQmY308/rftYQdOLoMLc4LKVy8GyFygMCfmP35ewW/3oadUDj85r0iqPaiH506nA3oV/IFZYG/rsR0MY4AAAAASUVORK5CYII=",__vite_glob_0_79=""+new URL("../svg/tickoff-0fda3f41.svg",import.meta.url).href,__vite_glob_0_80="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAN3RSTlMAnCjnJlsL/O+8DvXr497MtV4fEgTVwq6YhmhiRRsXnzn5jYlySywIBqilkn53blNAMy4i0HxPwwsuwgAAAblJREFUSMfd1dlyqkAUheEdUeYZHFAgajQx83RO1vu/WUgXJbB3k/I6/w3Y9GdXKwr9mWaz8+kx9nHOdja5dj5wRaosBitKtaAVdxFEQa0RV63YQNNSTcmTzUkIdZTdtjOu6ULx1IynFhDShWLVDN+ArTAunPdm0LQBfNAlomg+xOW/8EcSSwr1uora0y+6QPiuO4dKbEEvCrXbeLb+YSWxTCm2uQ3s23tgycFi0omVp0B9C3gmNZWAwRewjJ7I1SLZFgjU1SmwY6C51heVuis+AauipgQIGVhjINRxTSHguM0CBrBi4BFSROptgtWDB1gTvmdoxIaWaHshlg2NCOgNKj8hVgpoRKFWcPaJS7wjdML9tAAvI03P0Iq1+kEcNeAePZENdj75cDRgjl5T6omYrg0SnSwGOpHWHmoB3sFBJxKgFCDh4DT4Pp4F2HNgGtOeeBDAEQAFdeIgQCCAldaTToh2AtxTYfwifAG2dz5+EQsG2v/ymMbEiwRzAK/u2BpmwEEJIMwPxph42zEQAzjkIUZF6Q9AZQG2+wqcxYyL7H9kdyAF8EgLePObihrBgezJXmTDR/Nf6RuYZKNPXpyrswAAAABJRU5ErkJggg==",__vite_glob_0_81=""+new URL("../svg/tickon-fbcde2e9.svg",import.meta.url).href,__vite_glob_0_82=""+new URL("../png/tj-a46bf4d1.png",import.meta.url).href,__vite_glob_0_83=""+new URL("../png/tpbz-57c42ef9.png",import.meta.url).href,__vite_glob_0_84=""+new URL("../svg/tv-6937ad6f.svg",import.meta.url).href,__vite_glob_0_85=""+new URL("../svg/yijian-9ffcec54.svg",import.meta.url).href,__vite_glob_0_86=""+new URL("../png/yjfk-ac627152.png",import.meta.url).href,nameImg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK4AAAAqCAMAAAAd85ASAAAAn1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8Kd3m4AAAANHRSTlMA8UX6vTtxKulsaLVizhiWqH4hJtmuFe3gQQj2glsNNwSRe50yxi4ehk5HdVTSEsLki8mi9hji2gAABVJJREFUWMPdmNtiojAQQEdRQUWgIoogCGpV6qVa8//ftkkGCAgp1O7L7nkok7TAaTIziPAvYPfhiTk8EZqMEGqYv1E20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ctHwYnpZ6wxAzF6XFdAwDS44yqCNZYSXjBPm5XFsKVEjBYKEYIciCguxsQTDFs2miA7Sa/Ko/SJDM+MP3P+/HlgjK+0UMVQIOybwRNMdIyvjJFW/VLHqxiu7DwizkOdQlVKq7KYEgNG2hn8yeFDBjKSy8InNdHwX2Q58Y03j+OqpHUCatyMiYbtl0UPCbaUKtAFPFtp/CuWA6NDXg8aNw4OPi7o9REjBwoOaBM02YnpZSlyWsYDI7VsgmN8FUzvyyLBOl0i80RwTAgEe6BS5VgHhpr9y5ahmhhfO+bBy8ojwjrdw9KE4BH8QVC0gnnIsswJ1AYmOHUDWTqFaFZrIOojKTunhEDtmIiQUA8npdLGRql08ggNCYot1YQ4SWqTdEjp4Ts+IjA2trQ0NlYTNNw3WikZ+B/LKfXPIrHMVAAAAABJRU5ErkJggg==",icons=Object.assign({"./add.png":__vite_glob_0_0$1,"./addImg.png":__vite_glob_0_1$1,"./back.png":backImg,"./background.png":__vite_glob_0_3$1,"./background.svg":__vite_glob_0_4$1,"./background1.png":__vite_glob_0_5$1,"./bg.png":__vite_glob_0_6$1,"./close2.svg":__vite_glob_0_7$1,"./closeImg.png":__vite_glob_0_8$1,"./cursor-icon-1.svg":__vite_glob_0_9$1,"./cursor-icon-2.svg":__vite_glob_0_10$1,"./cursor-icon-3.svg":__vite_glob_0_11$1,"./cutImg.png":__vite_glob_0_12$1,"./down.svg":__vite_glob_0_13$1,"./gl.png":glImg,"./guan.png":__vite_glob_0_15$1,"./guding-active.svg":__vite_glob_0_16$1,"./guding.svg":__vite_glob_0_17$1,"./headImg.png":__vite_glob_0_18$1,"./headTit.png":__vite_glob_0_19$1,"./icon-back.png":iconBack,"./icon-staff-active.svg":__vite_glob_0_21$1,"./icon-staff.svg":__vite_glob_0_22$1,"./icon_evaluatingOff.svg":__vite_glob_0_23$1,"./icon_evaluatingOn.svg":__vite_glob_0_24$1,"./icon_menu.png":__vite_glob_0_25$1,"./icon_menu.svg":__vite_glob_0_26$1,"./icon_minus.svg":__vite_glob_0_27$1,"./icon_pause.png":__vite_glob_0_28$1,"./icon_pause.svg":__vite_glob_0_29$1,"./icon_play.png":__vite_glob_0_30$1,"./icon_play.svg":__vite_glob_0_31$1,"./icon_plus.svg":__vite_glob_0_32,"./icon_reset.png":__vite_glob_0_33,"./icon_resetbtn.svg":__vite_glob_0_34,"./icon_speed.svg":__vite_glob_0_35,"./icon_speedRest.svg":__vite_glob_0_36,"./icon_zhuanpu.svg":__vite_glob_0_37,"./info.svg":__vite_glob_0_38,"./kai.png":__vite_glob_0_39,"./list.png":listImg,"./lx.png":lxImg,"./mingsong.png":__vite_glob_0_42,"./mode.png":iconMode,"./modeType.svg":__vite_glob_0_44,"./music.png":__vite_glob_0_45,"./music.svg":__vite_glob_0_46,"./music1.png":__vite_glob_0_47,"./off.svg":__vite_glob_0_48,"./on.svg":__vite_glob_0_49,"./pc.png":pcImg,"./pc_end_icon.png":PcEndIcon,"./pc_icon_pausebtn.png":__vite_glob_0_52,"./pc_icon_playbtn.png":__vite_glob_0_53,"./pc_icon_resetbtn.png":__vite_glob_0_54,"./perform.png":__vite_glob_0_55,"./photo.png":__vite_glob_0_56,"./qipao.png":__vite_glob_0_57,"./qx.png":__vite_glob_0_58,"./radio.png":__vite_glob_0_59,"./radioActive.png":__vite_glob_0_60,"./recommendationName.png":__vite_glob_0_61,"./section0.png":__vite_glob_0_62,"./section0.svg":__vite_glob_0_63,"./section1.png":__vite_glob_0_64,"./section1.svg":__vite_glob_0_65,"./section2.png":__vite_glob_0_66,"./section2.svg":__vite_glob_0_67,"./settingName.png":__vite_glob_0_68,"./shenggui.png":__vite_glob_0_69,"./shenggui.svg":__vite_glob_0_70,"./shuodiao-active.svg":__vite_glob_0_71,"./shuodiao.svg":__vite_glob_0_72,"./sing.png":__vite_glob_0_73,"./speed.png":__vite_glob_0_74,"./speedBtn.png":__vite_glob_0_75,"./subtract.png":__vite_glob_0_76,"./task-bg.svg":__vite_glob_0_77,"./tickoff.png":__vite_glob_0_78,"./tickoff.svg":__vite_glob_0_79,"./tickon.png":__vite_glob_0_80,"./tickon.svg":__vite_glob_0_81,"./tj.png":__vite_glob_0_82,"./tpbz.png":__vite_glob_0_83,"./tv.svg":__vite_glob_0_84,"./yijian.svg":__vite_glob_0_85,"./yjfk.png":__vite_glob_0_86,"./zt.png":nameImg,"./大按钮/播放小备份 3@2x.png":__vite_glob_0_88}),headImg=i=>icons[`./${i}`]||"",speedContainer="_speedContainer_qtzmq_1",head$2="_head_qtzmq_1",headTit$2="_headTit_qtzmq_8",closeImg$2="_closeImg_qtzmq_16",content$5="_content_qtzmq_24",conBox$2="_conBox_qtzmq_33",tit$1="_tit_qtzmq_45",spendCon="_spendCon_qtzmq_51",btn$3="_btn_qtzmq_57",sliderCon="_sliderCon_qtzmq_63",customButton="_customButton_qtzmq_82",speedVal="_speedVal_qtzmq_87",speedBtn="_speedBtn_qtzmq_99",speedSel="_speedSel_qtzmq_105",metronome="_metronome_qtzmq_125",styles$b={speedContainer,head:head$2,headTit:headTit$2,closeImg:closeImg$2,content:content$5,conBox:conBox$2,tit:tit$1,spendCon,btn:btn$3,sliderCon,customButton,speedVal,speedBtn,speedSel,metronome},Speed=defineComponent({name:"speed",setup(){const i=ref(state$1.speed),e=()=>{i.value=Math.max(i.value-1,45)},r=()=>{i.value=Math.min(i.value+1,270)};watch(()=>i.value,()=>{handleSetSpeed(i.value)});const s=computed({get(){return!metronomeData.disable},set(o){metronomeData.disable=!o}});return()=>createVNode("div",{class:styles$b.speedContainer},[createVNode("div",{class:styles$b.head},[createVNode("img",{class:styles$b.headTit,src:headImg("headTit.png")},null),createVNode("img",{class:styles$b.closeImg,src:headImg("closeImg.png"),onClick:()=>{headData.speedShow=!1}},null)]),createVNode("div",{class:styles$b.content},[createVNode("div",{class:styles$b.conBox},[createVNode("div",{class:styles$b.tit},[createTextVNode("速度")]),createVNode("div",{class:styles$b.spendCon},[createVNode("img",{src:headImg("cutImg.png"),class:[styles$b.btn],onClick:e},null),createVNode("div",{class:styles$b.sliderCon},[createVNode(Slider,{class:styles$b.slider,max:270,min:45,modelValue:i.value,"onUpdate:modelValue":o=>i.value=o},{button:()=>createVNode("div",{class:styles$b.customButton},[createVNode("div",{class:styles$b.speedVal},[i.value]),createVNode("div",{class:styles$b.speedBtn},null)])})]),createVNode("img",{src:headImg("addImg.png"),class:[styles$b.btn],onClick:r},null)]),createVNode("div",{class:styles$b.speedSel},[createVNode("div",{onClick:()=>{i.value=state$1.originSpeed}},[createTextVNode("原速")]),createVNode("div",{onClick:()=>{i.value=70}},[createTextVNode("70")]),createVNode("div",{onClick:()=>{i.value=80}},[createTextVNode("80")]),createVNode("div",{onClick:()=>{i.value=90}},[createTextVNode("90")]),createVNode("div",{onClick:()=>{i.value=100}},[createTextVNode("100")]),createVNode("div",{onClick:()=>{i.value=110}},[createTextVNode("110")])]),createVNode("div",{class:styles$b.metronome},[createVNode("div",{class:styles$b.tit},[createTextVNode("节拍器")]),createVNode(Switch$1,{modelValue:s.value,"onUpdate:modelValue":o=>s.value=o},null)])])])])}}),settting="_settting_qz7lt_1",head$1="_head_qz7lt_1",headTit$1="_headTit_qz7lt_8",closeImg$1="_closeImg_qz7lt_16",content$4="_content_qz7lt_24",conBox$1="_conBox_qz7lt_33",cellBox="_cellBox_qz7lt_45",tit="_tit_qz7lt_67",radioBox="_radioBox_qz7lt_73",active="_active_qz7lt_92",frequency$1="_frequency_qz7lt_97",frequencyNum="_frequencyNum_qz7lt_101",btn$2="_btn_qz7lt_113",reactionTimeBox="_reactionTimeBox_qz7lt_119",reactionTime="_reactionTime_qz7lt_119",timeName="_timeName_qz7lt_136",cellBtnBox="_cellBtnBox_qz7lt_142",styles$a={settting,head:head$1,headTit:headTit$1,closeImg:closeImg$1,content:content$4,conBox:conBox$1,cellBox,tit,radioBox,active,frequency:frequency$1,frequencyNum,btn:btn$2,reactionTimeBox,reactionTime,timeName,cellBtnBox},index="",_numberOfSegments=58,smoothAnimationState={isShow:ref(!1),canvasDom:null,canvasCtx:null,canvasDomWith:0,canvasDomHeight:80,smoothAnimationBoxDom:null,smoothBotDom:null,osmdCanvasPageDom:null,osdmScrollDom:null,pointsPos:[],translateXNum:0,aveSpeed:0,clientWidth:0};watch(smoothAnimationState.isShow,()=>{var i,e;smoothAnimationState.isShow.value?((i=smoothAnimationState.smoothAnimationBoxDom)==null||i.classList.remove("smoothAnimationBoxHide"),moveSmoothAnimation(moveState.progress,moveState.activeIndex)):(e=smoothAnimationState.smoothAnimationBoxDom)==null||e.classList.add("smoothAnimationBoxHide")});function initSmoothAnimation(){createSmoothAnimation();const i=getPointsPosByBatePos();console.log(i,"batePos"),smoothAnimationState.pointsPos=createSmoothCurvePoints(i,void 0,void 0,_numberOfSegments);const e=i.reduce((r,s,o,a)=>(o!==0&&Math.abs(s.MeasureNumberXML-a[o-1].MeasureNumberXML)<=1&&(r+=s.x-a[o-1].x),r),0);smoothAnimationState.aveSpeed=e/(state$1.times[state$1.times.length-1].time-state$1.times[0].time)/1e3*16.67,calcClientWidth(),document.addEventListener("resize",calcClientWidth),smoothAnimationState.isShow.value=!0,console.log(smoothAnimationState,"一行谱小鸟数据")}function moveSmoothAnimationByPlayTime(){var a,l,u,c,d;const i=getAudioCurrentTime();if(i<=state$1.fixtime||i>((a=state$1.times.last())==null?void 0:a.time))return;let e=state$1.activeNoteIndex+1,r=(l=state$1.times[e])==null?void 0:l.bbox;for(;!r&&er?(smoothAnimationState.translateXNum=0,smoothAnimationState.osdmScrollDom.scrollLeft=i.x-r*.9):o<0?(smoothAnimationState.translateXNum=0,smoothAnimationState.osdmScrollDom.scrollLeft=i.x-r*.1):u>s-r*.3&&u<=s-r*.25?smoothAnimationState.translateXNum+=e*.5:u>s-r*.25&&u<=s-r*.2?smoothAnimationState.translateXNum+=e*.6:u>s-r*.2&&u<=s-r*.15?smoothAnimationState.translateXNum+=e*.7:u>s-r*.15&&u<=s-r*.1?smoothAnimationState.translateXNum+=e*.8:u>s-r*.1&&u<=s-r*.05?smoothAnimationState.translateXNum+=e*.9:u>s-r*.05&&u<=s?smoothAnimationState.translateXNum+=e:u>s&&u<=s+r*.05?smoothAnimationState.translateXNum+=e*1.2:u>s+r*.05&&u<=s+r*.1?smoothAnimationState.translateXNum+=e*1.4:u>s+r*.1&&u<=s+r*.15?smoothAnimationState.translateXNum+=e*1.7:u>s+r*.15&&u<=s+r*.2?smoothAnimationState.translateXNum+=e*2:u>s+r*.2&&u<=s+r*.25?smoothAnimationState.translateXNum+=e*2.4:u>s+r*.25&&u<=s+r*.3?smoothAnimationState.translateXNum+=e*2.8:u>s+r*.3&&u<=s+r*.35?smoothAnimationState.translateXNum+=e*3.3:u>s+r*.35&&u<=s+r*.4?smoothAnimationState.translateXNum+=e*3.8:u>s+r*.4&&u<=s+r*.45?smoothAnimationState.translateXNum+=e*4.4:u>s+r*.45&&u<=s+r*.5&&(smoothAnimationState.translateXNum+=e*5),smoothAnimationState.osmdCanvasPageDom.style.transform=`translateX(-${smoothAnimationState.translateXNum}px)`}function smoothAnimationMove(i,e,r){smoothAnimationState.smoothBotDom&&(smoothAnimationState.smoothBotDom.style.transform=`translate(${i.x}px, ${i.y}px)`),smoothAnimationState.canvasCtx&&drawSmoothCurve(smoothAnimationState.canvasCtx,e,r)}function calcClientWidth(){smoothAnimationState.clientWidth=document.body.clientWidth}function createSmoothAnimation(){const i=document.querySelector("#musicAndSelection");smoothAnimationState.osdmScrollDom=i;const e=document.querySelector("#osmdCanvasPage1");smoothAnimationState.osmdCanvasPageDom=e;const r=document.createElement("div");r.className="smoothAnimationBox",smoothAnimationState.smoothAnimationBoxDom=r;const s=document.createElement("div");s.className="smoothAnimationCon";const o=document.createElement("canvas");o.className="smoothCanvas",smoothAnimationState.canvasDom=o,smoothAnimationState.canvasDomWith=(e==null?void 0:e.offsetWidth)|0,o.width=smoothAnimationState.canvasDomWith,o.height=smoothAnimationState.canvasDomHeight,smoothAnimationState.canvasCtx=o.getContext("2d");const a=document.createElement("div");a.className="smoothBot",smoothAnimationState.smoothBotDom=a,s.appendChild(o),s.appendChild(a),r.appendChild(s),e==null||e.insertBefore(r,e.firstChild)}function getPointsPosByBatePos(){let i=0;const e=state$1.times.reduce((s,o)=>(o.frequency!==-1&&(s+=o.frequency,i++),s),0)/i;return state$1.times.reduce((s,o)=>(o.bbox&&s.push({MeasureNumberXML:o.MeasureNumberXML,x:o.bbox.x,y:((o.frequency===-1?e:o.frequency)-e)/e*smoothAnimationState.canvasDomHeight/2+smoothAnimationState.canvasDomHeight/2}),s),[])}function createSmoothCurvePoints(i,e,r,s){if(i.length<=2)return i;e=e||.5,r=!!r,s=s||20;let o=i.slice(0),a=[],l,u,c,d,g,m,y,b,S,A,E,x,P;for(r?(o.unshift(i[i.length-1]),o.unshift(i[i.length-1]),o.push(i[0])):(o.unshift(i[0]),o.push(i[i.length-1])),P=1;P1){const _=o[P+1].MeasureNumberXML+1;let B=o.findIndex(M=>_===M.MeasureNumberXML);B===-1&&(B=P+1),d=(o[B].x-o[P].x)*e}if(o[P-1].MeasureNumberXML-o[P].MeasureNumberXML>1){const _=o[P].MeasureNumberXML-1;let B=o.findIndex((M,N)=>{var I;return _===M.MeasureNumberXML&&_!==((I=o[N+1])==null?void 0:I.MeasureNumberXML)});B===-1&&(B=P),c=(o[P+1].x-o[B].x)*e}if(o[P+1].MeasureNumberXML-o[P+2].MeasureNumberXML<-1){const _=o[P+1].MeasureNumberXML+1;let B=o.findIndex(M=>_===M.MeasureNumberXML);B===-1&&(B=P+1),d=(o[B].x-o[P].x)*e}if(o[P-1].MeasureNumberXML-o[P].MeasureNumberXML<-1){const _=o[P].MeasureNumberXML-1;let B=o.findIndex((M,N)=>{var I;return _===M.MeasureNumberXML&&_!==((I=o[N+1])==null?void 0:I.MeasureNumberXML)});B===-1&&(B=P),c=(o[P+1].x-o[B].x)*e}const C=i[P-1].MeasureNumberXML,T=i[P].MeasureNumberXML;for(x=0;x<=s;x++){if(T-C<0||T-C>1){a.push({x:l,y:u,MeasureNumberXML:C});continue}E=x/s,y=2*Math.pow(E,3)-3*Math.pow(E,2)+1,b=-(2*Math.pow(E,3))+3*Math.pow(E,2),S=Math.pow(E,3)-2*Math.pow(E,2)+E,A=Math.pow(E,3)-Math.pow(E,2),l=y*o[P].x+b*o[P+1].x+S*c+A*d,u=y*o[P].y+b*o[P+1].y+S*g+A*m,a.push({x:l,y:u,MeasureNumberXML:x===s?T:C})}}return a}function drawSmoothCurve(i,e,r){i.lineWidth=4,i.lineJoin="round",i.strokeStyle="rgba(255,255,255,0.6)",drawLines(i,e),r!=null&&r.length&&(i.strokeStyle="#FFC121",drawLines(i,r))}function drawLines(i,e){i.beginPath(),i.moveTo(e[0].x,e[0].y);for(let r=1;r1){i.stroke(),i.beginPath(),i.moveTo(e[r+1].x,e[r+1].y);continue}i.lineTo(e[r].x,e[r].y)}i.stroke()}const recommendation="_recommendation_f3qyk_1",head="_head_f3qyk_1",headTit="_headTit_f3qyk_8",closeImg="_closeImg_f3qyk_16",content$3="_content_f3qyk_24",conBox="_conBox_f3qyk_33",dropdownMenu="_dropdownMenu_f3qyk_45",currItem="_currItem_f3qyk_103",field="_field_f3qyk_107",uploader="_uploader_f3qyk_124",uploaderbox="_uploaderbox_f3qyk_152",img$1="_img_f3qyk_163",btnCon="_btnCon_f3qyk_173",styles$9={recommendation,head,headTit,closeImg,content:content$3,conBox,dropdownMenu,currItem,field,uploader,uploaderbox,img:img$1,btnCon};var cosJsSdkV5Exports={},cosJsSdkV5={get exports(){return cosJsSdkV5Exports},set exports(i){cosJsSdkV5Exports=i}};(function(i,e){(function(s,o){i.exports=o()})(commonjsGlobal,function(){return function(r){var s={};function o(a){if(s[a])return s[a].exports;var l=s[a]={i:a,l:!1,exports:{}};return r[a].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=r,o.c=s,o.d=function(a,l,u){o.o(a,l)||Object.defineProperty(a,l,{enumerable:!0,get:u})},o.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},o.t=function(a,l){if(l&1&&(a=o(a)),l&8||l&4&&typeof a=="object"&&a&&a.__esModule)return a;var u=Object.create(null);if(o.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:a}),l&2&&typeof a!="string")for(var c in a)o.d(u,c,function(d){return a[d]}.bind(null,c));return u},o.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(l,"a",l),l},o.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},o.p="/dist/",o(o.s="./index.js")}({"./index.js":function(r,s,o){var a=o("./src/cos.js");r.exports=a},"./lib/base64.js":function(r,s){var o=function(a){a=a||{};var l=a.Base64,u="2.1.9",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(k){for(var V={},D=0,$=k.length;D<$;D++)V[k.charAt(D)]=D;return V}(c),g=String.fromCharCode,m=function(V){if(V.length<2){var D=V.charCodeAt(0);return D<128?V:D<2048?g(192|D>>>6)+g(128|D&63):g(224|D>>>12&15)+g(128|D>>>6&63)+g(128|D&63)}else{var D=65536+(V.charCodeAt(0)-55296)*1024+(V.charCodeAt(1)-56320);return g(240|D>>>18&7)+g(128|D>>>12&63)+g(128|D>>>6&63)+g(128|D&63)}},y=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(V){return V.replace(y,m)},S=function(V){var D=[0,2,1][V.length%3],$=V.charCodeAt(0)<<16|(V.length>1?V.charCodeAt(1):0)<<8|(V.length>2?V.charCodeAt(2):0),O=[c.charAt($>>>18),c.charAt($>>>12&63),D>=2?"=":c.charAt($>>>6&63),D>=1?"=":c.charAt($&63)];return O.join("")},A=a.btoa?function(k){return a.btoa(k)}:function(k){return k.replace(/[\s\S]{1,3}/g,S)},E=function(k){return A(b(k))},x=function(V,D){return D?E(String(V)).replace(/[+\/]/g,function($){return $=="+"?"-":"_"}).replace(/=/g,""):E(String(V))},P=function(V){return x(V,!0)},C=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),T=function(V){switch(V.length){case 4:var D=(7&V.charCodeAt(0))<<18|(63&V.charCodeAt(1))<<12|(63&V.charCodeAt(2))<<6|63&V.charCodeAt(3),$=D-65536;return g(($>>>10)+55296)+g(($&1023)+56320);case 3:return g((15&V.charCodeAt(0))<<12|(63&V.charCodeAt(1))<<6|63&V.charCodeAt(2));default:return g((31&V.charCodeAt(0))<<6|63&V.charCodeAt(1))}},_=function(V){return V.replace(C,T)},B=function(V){var D=V.length,$=D%4,O=(D>0?d[V.charAt(0)]<<18:0)|(D>1?d[V.charAt(1)]<<12:0)|(D>2?d[V.charAt(2)]<<6:0)|(D>3?d[V.charAt(3)]:0),q=[g(O>>>16),g(O>>>8&255),g(O&255)];return q.length-=[0,0,2,1][$],q.join("")},M=a.atob?function(k){return a.atob(k)}:function(k){return k.replace(/[\s\S]{1,4}/g,B)},N=function(k){return _(M(k))},I=function(V){return N(String(V).replace(/[-_]/g,function(D){return D=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},R=function(){var V=a.Base64;return a.Base64=l,V},F={VERSION:u,atob:M,btoa:A,fromBase64:I,toBase64:x,utob:b,encode:x,encodeURI:P,btou:_,decode:I,noConflict:R};return F}();r.exports=o},"./lib/crypto.js":function(r,s,o){(function(a){var l=o("./node_modules/@babel/runtime/helpers/typeof.js"),u=u||function(c,d){var g={},m=g.lib={},y=function(){},b=m.Base={extend:function(B){y.prototype=this;var M=new y;return B&&M.mixIn(B),M.hasOwnProperty("init")||(M.init=function(){M.$super.init.apply(this,arguments)}),M.init.prototype=M,M.$super=this,M},create:function(){var B=this.extend();return B.init.apply(B,arguments),B},init:function(){},mixIn:function(B){for(var M in B)B.hasOwnProperty(M)&&(this[M]=B[M]);B.hasOwnProperty("toString")&&(this.toString=B.toString)},clone:function(){return this.init.prototype.extend(this)}},S=m.WordArray=b.extend({init:function(B,M){B=this.words=B||[],this.sigBytes=M!=d?M:4*B.length},toString:function(B){return(B||E).stringify(this)},concat:function(B){var M=this.words,N=B.words,I=this.sigBytes;if(B=B.sigBytes,this.clamp(),I%4)for(var R=0;R>>2]|=(N[R>>>2]>>>24-8*(R%4)&255)<<24-8*((I+R)%4);else if(65535>>2]=N[R>>>2];else M.push.apply(M,N);return this.sigBytes+=B,this},clamp:function(){var B=this.words,M=this.sigBytes;B[M>>>2]&=4294967295<<32-8*(M%4),B.length=c.ceil(M/4)},clone:function(){var B=b.clone.call(this);return B.words=this.words.slice(0),B},random:function(B){for(var M=[],N=0;N>>2]>>>24-8*(I%4)&255;N.push((R>>>4).toString(16)),N.push((R&15).toString(16))}return N.join("")},parse:function(B){for(var M=B.length,N=[],I=0;I>>3]|=parseInt(B.substr(I,2),16)<<24-4*(I%8);return new S.init(N,M/2)}},x=A.Latin1={stringify:function(B){var M=B.words;B=B.sigBytes;for(var N=[],I=0;I>>2]>>>24-8*(I%4)&255));return N.join("")},parse:function(B){for(var M=B.length,N=[],I=0;I>>2]|=(B.charCodeAt(I)&255)<<24-8*(I%4);return new S.init(N,M)}},P=A.Utf8={stringify:function(B){try{return decodeURIComponent(escape(x.stringify(B)))}catch(M){throw Error("Malformed UTF-8 data")}},parse:function(B){return x.parse(unescape(encodeURIComponent(B)))}},C=m.BufferedBlockAlgorithm=b.extend({reset:function(){this._data=new S.init,this._nDataBytes=0},_append:function(B){typeof B=="string"&&(B=P.parse(B)),this._data.concat(B),this._nDataBytes+=B.sigBytes},_process:function(B){var M=this._data,N=M.words,I=M.sigBytes,R=this.blockSize,F=I/(4*R),F=B?c.ceil(F):c.max((F|0)-this._minBufferSize,0);if(B=F*R,I=c.min(4*B,I),B){for(var k=0;kB;B++){if(16>B)m[B]=S[A+B]|0;else{var M=m[B-3]^m[B-8]^m[B-14]^m[B-16];m[B]=M<<1|M>>>31}M=(x<<5|x>>>27)+_+m[B],M=20>B?M+((P&C|~P&T)+1518500249):40>B?M+((P^C^T)+1859775393):60>B?M+((P&C|P&T|C&T)-1894007588):M+((P^C^T)-899497514),_=T,T=C,C=P<<30|P>>>2,P=x,x=M}E[0]=E[0]+x|0,E[1]=E[1]+P|0,E[2]=E[2]+C|0,E[3]=E[3]+T|0,E[4]=E[4]+_|0},_doFinalize:function(){var S=this._data,A=S.words,E=8*this._nDataBytes,x=8*S.sigBytes;return A[x>>>5]|=128<<24-x%32,A[(x+64>>>9<<4)+14]=Math.floor(E/4294967296),A[(x+64>>>9<<4)+15]=E,S.sigBytes=4*A.length,this._process(),this._hash},clone:function(){var S=g.clone.call(this);return S._hash=this._hash.clone(),S}});c.SHA1=g._createHelper(y),c.HmacSHA1=g._createHmacHelper(y)})(),function(){var c=u,d=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(m,y){m=this._hasher=new m.init,typeof y=="string"&&(y=d.parse(y));var b=m.blockSize,S=4*b;y.sigBytes>S&&(y=m.finalize(y)),y.clamp();for(var A=this._oKey=y.clone(),E=this._iKey=y.clone(),x=A.words,P=E.words,C=0;C>>2]>>>24-P%4*8&255,T=S[P+1>>>2]>>>24-(P+1)%4*8&255,_=S[P+2>>>2]>>>24-(P+2)%4*8&255,B=C<<16|T<<8|_,M=0;M<4&&P+M*.75>>6*(3-M)&63));var N=E.charAt(64);if(N)for(;x.length%4;)x.push(N);return x.join("")},parse:function(b){var S=b.length,A=this._map,E=A.charAt(64);if(E){var x=b.indexOf(E);x!=-1&&(S=x)}for(var P=[],C=0,T=0;T>>6-T%4*2;P[C>>>2]|=(_|B)<<24-C%4*8,C++}return g.create(P,C)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),l(a)==="object"?a.exports=u:window.CryptoJS=u}).call(this,o("./node_modules/webpack/buildin/module.js")(r))},"./lib/json2xml.js":function(r,s,o){var a=o("./node_modules/@babel/runtime/helpers/typeof.js"),l="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",u="-.0-9·̀-ͯ‿⁀",c=new RegExp("^([^"+l+"])|^((x|X)(m|M)(l|L))|([^"+l+u+"])","g"),d=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,g=function(A){var E=[];if(A instanceof Object)for(var x in A)A.hasOwnProperty(x)&&E.push(x);return E},m=function(A,E){var x=function(C,T,_,B,M){var N=E.indent!==void 0?E.indent:" ",I=E.prettyPrint?` `+new Array(B).join(N):"";E.removeIllegalNameCharacters&&(C=C.replace(c,"_"));var R=[I,"<",C,_||""];return T&&T.length>0?(R.push(">"),R.push(T),M&&R.push(I),R.push("")):R.push("/>"),R.join("")};return function P(C,T,_){var B=a(C);switch((Array.isArray?Array.isArray(C):C instanceof Array)?B="array":C instanceof Date&&(B="date"),B){case"array":var M=[];return C.map(function(F){M.push(P(F,1,_+1))}),E.prettyPrint&&M.push(` `),M.join("");case"date":return C.toJSON?C.toJSON():C+"";case"object":var N=[];for(var I in C)if(C.hasOwnProperty(I))if(C[I]instanceof Array)for(var R=0;R0&&N.push(` `),N.join("");case"function":return C();default:return E.escape?b(C):""+C}}(A,0,0)},y=function(A){var E=['"),E.join("")};function b(S){return(""+S).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(d,"")}r.exports=function(S,A){if(A||(A={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof S=="string")try{S=JSON.parse(S.toString())}catch(C){return!1}var E="",x="";A&&(a(A)=="object"?(A.xmlHeader&&(E=y(!!A.xmlHeader.standalone)),typeof A.docType<"u"&&(x="")):E=y()),A=A||{};var P=[E,A.prettyPrint&&x?` `:"",x,m(S,A)];return P.join("").replace(/\n{2,}/g,` `).replace(/\s+$/g,"")}},"./lib/md5.js":function(r,s,o){(function(a){var l,u=o("./node_modules/@babel/runtime/helpers/typeof.js");(function(){var c=(typeof window>"u"?"undefined":u(window))==="object",d=c?window:{};d.JS_MD5_NO_WINDOW&&(c=!1);var g=!c&&(typeof self>"u"?"undefined":u(self))==="object";g&&(d=self);var m=!d.JS_MD5_NO_COMMON_JS&&u(a)==="object"&&a.exports,y=o("./node_modules/webpack/buildin/amd-options.js"),b=!d.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",S="0123456789abcdef".split(""),A=[128,32768,8388608,-2147483648],E=[0,8,16,24],x=["hex","array","digest","buffer","arrayBuffer","base64"],P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),C=[],T;if(b){var _=new ArrayBuffer(68);T=new Uint8Array(_),C=new Uint32Array(_)}(d.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(R){return Object.prototype.toString.call(R)==="[object Array]"}),b&&(d.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(R){return u(R)==="object"&&R.buffer&&R.buffer.constructor===ArrayBuffer});var B=function(F){return function(k,V){return new N(!0).update(k,V)[F]()}},M=function(){var F=B("hex");F.getCtx=F.create=function(){return new N},F.update=function(D){return F.create().update(D)};for(var k=0;k>6,q[D++]=128|k&63):k<55296||k>=57344?(q[D++]=224|k>>12,q[D++]=128|k>>6&63,q[D++]=128|k&63):(k=65536+((k&1023)<<10|R.charCodeAt(++V)&1023),q[D++]=240|k>>18,q[D++]=128|k>>12&63,q[D++]=128|k>>6&63,q[D++]=128|k&63);else for(D=this.start;V<$&&D<64;++V)k=R.charCodeAt(V),F||k<128?O[D>>2]|=k<>2]|=(192|k>>6)<>2]|=(128|k&63)<=57344?(O[D>>2]|=(224|k>>12)<>2]|=(128|k>>6&63)<>2]|=(128|k&63)<>2]|=(240|k>>18)<>2]|=(128|k>>12&63)<>2]|=(128|k>>6&63)<>2]|=(128|k&63)<=64?(this.start=D-64,this.hash(),this.hashed=!0):this.start=D}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var R=this.blocks,F=this.lastByteIndex;R[F>>2]|=A[F&3],F>=56&&(this.hashed||this.hash(),R[0]=R[16],R[16]=R[1]=R[2]=R[3]=R[4]=R[5]=R[6]=R[7]=R[8]=R[9]=R[10]=R[11]=R[12]=R[13]=R[14]=R[15]=0),R[14]=this.bytes<<3,R[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},N.prototype.hash=function(){var R,F,k,V,D,$,O=this.blocks;this.first?(R=O[0]-680876937,R=(R<<7|R>>>25)-271733879<<0,V=(-1732584194^R&2004318071)+O[1]-117830708,V=(V<<12|V>>>20)+R<<0,k=(-271733879^V&(R^-271733879))+O[2]-1126478375,k=(k<<17|k>>>15)+V<<0,F=(R^k&(V^R))+O[3]-1316259209,F=(F<<22|F>>>10)+k<<0):(R=this.h0,F=this.h1,k=this.h2,V=this.h3,R+=(V^F&(k^V))+O[0]-680876936,R=(R<<7|R>>>25)+F<<0,V+=(k^R&(F^k))+O[1]-389564586,V=(V<<12|V>>>20)+R<<0,k+=(F^V&(R^F))+O[2]+606105819,k=(k<<17|k>>>15)+V<<0,F+=(R^k&(V^R))+O[3]-1044525330,F=(F<<22|F>>>10)+k<<0),R+=(V^F&(k^V))+O[4]-176418897,R=(R<<7|R>>>25)+F<<0,V+=(k^R&(F^k))+O[5]+1200080426,V=(V<<12|V>>>20)+R<<0,k+=(F^V&(R^F))+O[6]-1473231341,k=(k<<17|k>>>15)+V<<0,F+=(R^k&(V^R))+O[7]-45705983,F=(F<<22|F>>>10)+k<<0,R+=(V^F&(k^V))+O[8]+1770035416,R=(R<<7|R>>>25)+F<<0,V+=(k^R&(F^k))+O[9]-1958414417,V=(V<<12|V>>>20)+R<<0,k+=(F^V&(R^F))+O[10]-42063,k=(k<<17|k>>>15)+V<<0,F+=(R^k&(V^R))+O[11]-1990404162,F=(F<<22|F>>>10)+k<<0,R+=(V^F&(k^V))+O[12]+1804603682,R=(R<<7|R>>>25)+F<<0,V+=(k^R&(F^k))+O[13]-40341101,V=(V<<12|V>>>20)+R<<0,k+=(F^V&(R^F))+O[14]-1502002290,k=(k<<17|k>>>15)+V<<0,F+=(R^k&(V^R))+O[15]+1236535329,F=(F<<22|F>>>10)+k<<0,R+=(k^V&(F^k))+O[1]-165796510,R=(R<<5|R>>>27)+F<<0,V+=(F^k&(R^F))+O[6]-1069501632,V=(V<<9|V>>>23)+R<<0,k+=(R^F&(V^R))+O[11]+643717713,k=(k<<14|k>>>18)+V<<0,F+=(V^R&(k^V))+O[0]-373897302,F=(F<<20|F>>>12)+k<<0,R+=(k^V&(F^k))+O[5]-701558691,R=(R<<5|R>>>27)+F<<0,V+=(F^k&(R^F))+O[10]+38016083,V=(V<<9|V>>>23)+R<<0,k+=(R^F&(V^R))+O[15]-660478335,k=(k<<14|k>>>18)+V<<0,F+=(V^R&(k^V))+O[4]-405537848,F=(F<<20|F>>>12)+k<<0,R+=(k^V&(F^k))+O[9]+568446438,R=(R<<5|R>>>27)+F<<0,V+=(F^k&(R^F))+O[14]-1019803690,V=(V<<9|V>>>23)+R<<0,k+=(R^F&(V^R))+O[3]-187363961,k=(k<<14|k>>>18)+V<<0,F+=(V^R&(k^V))+O[8]+1163531501,F=(F<<20|F>>>12)+k<<0,R+=(k^V&(F^k))+O[13]-1444681467,R=(R<<5|R>>>27)+F<<0,V+=(F^k&(R^F))+O[2]-51403784,V=(V<<9|V>>>23)+R<<0,k+=(R^F&(V^R))+O[7]+1735328473,k=(k<<14|k>>>18)+V<<0,F+=(V^R&(k^V))+O[12]-1926607734,F=(F<<20|F>>>12)+k<<0,D=F^k,R+=(D^V)+O[5]-378558,R=(R<<4|R>>>28)+F<<0,V+=(D^R)+O[8]-2022574463,V=(V<<11|V>>>21)+R<<0,$=V^R,k+=($^F)+O[11]+1839030562,k=(k<<16|k>>>16)+V<<0,F+=($^k)+O[14]-35309556,F=(F<<23|F>>>9)+k<<0,D=F^k,R+=(D^V)+O[1]-1530992060,R=(R<<4|R>>>28)+F<<0,V+=(D^R)+O[4]+1272893353,V=(V<<11|V>>>21)+R<<0,$=V^R,k+=($^F)+O[7]-155497632,k=(k<<16|k>>>16)+V<<0,F+=($^k)+O[10]-1094730640,F=(F<<23|F>>>9)+k<<0,D=F^k,R+=(D^V)+O[13]+681279174,R=(R<<4|R>>>28)+F<<0,V+=(D^R)+O[0]-358537222,V=(V<<11|V>>>21)+R<<0,$=V^R,k+=($^F)+O[3]-722521979,k=(k<<16|k>>>16)+V<<0,F+=($^k)+O[6]+76029189,F=(F<<23|F>>>9)+k<<0,D=F^k,R+=(D^V)+O[9]-640364487,R=(R<<4|R>>>28)+F<<0,V+=(D^R)+O[12]-421815835,V=(V<<11|V>>>21)+R<<0,$=V^R,k+=($^F)+O[15]+530742520,k=(k<<16|k>>>16)+V<<0,F+=($^k)+O[2]-995338651,F=(F<<23|F>>>9)+k<<0,R+=(k^(F|~V))+O[0]-198630844,R=(R<<6|R>>>26)+F<<0,V+=(F^(R|~k))+O[7]+1126891415,V=(V<<10|V>>>22)+R<<0,k+=(R^(V|~F))+O[14]-1416354905,k=(k<<15|k>>>17)+V<<0,F+=(V^(k|~R))+O[5]-57434055,F=(F<<21|F>>>11)+k<<0,R+=(k^(F|~V))+O[12]+1700485571,R=(R<<6|R>>>26)+F<<0,V+=(F^(R|~k))+O[3]-1894986606,V=(V<<10|V>>>22)+R<<0,k+=(R^(V|~F))+O[10]-1051523,k=(k<<15|k>>>17)+V<<0,F+=(V^(k|~R))+O[1]-2054922799,F=(F<<21|F>>>11)+k<<0,R+=(k^(F|~V))+O[8]+1873313359,R=(R<<6|R>>>26)+F<<0,V+=(F^(R|~k))+O[15]-30611744,V=(V<<10|V>>>22)+R<<0,k+=(R^(V|~F))+O[6]-1560198380,k=(k<<15|k>>>17)+V<<0,F+=(V^(k|~R))+O[13]+1309151649,F=(F<<21|F>>>11)+k<<0,R+=(k^(F|~V))+O[4]-145523070,R=(R<<6|R>>>26)+F<<0,V+=(F^(R|~k))+O[11]-1120210379,V=(V<<10|V>>>22)+R<<0,k+=(R^(V|~F))+O[2]+718787259,k=(k<<15|k>>>17)+V<<0,F+=(V^(k|~R))+O[9]-343485551,F=(F<<21|F>>>11)+k<<0,this.first?(this.h0=R+1732584193<<0,this.h1=F-271733879<<0,this.h2=k-1732584194<<0,this.h3=V+271733878<<0,this.first=!1):(this.h0=this.h0+R<<0,this.h1=this.h1+F<<0,this.h2=this.h2+k<<0,this.h3=this.h3+V<<0)},N.prototype.hex=function(){this.finalize();var R=this.h0,F=this.h1,k=this.h2,V=this.h3;return S[R>>4&15]+S[R&15]+S[R>>12&15]+S[R>>8&15]+S[R>>20&15]+S[R>>16&15]+S[R>>28&15]+S[R>>24&15]+S[F>>4&15]+S[F&15]+S[F>>12&15]+S[F>>8&15]+S[F>>20&15]+S[F>>16&15]+S[F>>28&15]+S[F>>24&15]+S[k>>4&15]+S[k&15]+S[k>>12&15]+S[k>>8&15]+S[k>>20&15]+S[k>>16&15]+S[k>>28&15]+S[k>>24&15]+S[V>>4&15]+S[V&15]+S[V>>12&15]+S[V>>8&15]+S[V>>20&15]+S[V>>16&15]+S[V>>28&15]+S[V>>24&15]},N.prototype.toString=N.prototype.hex,N.prototype.digest=function(R){if(R==="hex")return this.hex();this.finalize();var F=this.h0,k=this.h1,V=this.h2,D=this.h3,$=[F&255,F>>8&255,F>>16&255,F>>24&255,k&255,k>>8&255,k>>16&255,k>>24&255,V&255,V>>8&255,V>>16&255,V>>24&255,D&255,D>>8&255,D>>16&255,D>>24&255];return $},N.prototype.array=N.prototype.digest,N.prototype.arrayBuffer=function(){this.finalize();var R=new ArrayBuffer(16),F=new Uint32Array(R);return F[0]=this.h0,F[1]=this.h1,F[2]=this.h2,F[3]=this.h3,R},N.prototype.buffer=N.prototype.arrayBuffer,N.prototype.base64=function(){for(var R,F,k,V="",D=this.array(),$=0;$<15;)R=D[$++],F=D[$++],k=D[$++],V+=P[R>>>2]+P[(R<<4|F>>>4)&63]+P[(F<<2|k>>>6)&63]+P[k&63];return R=D[$],V+=P[R>>>2]+P[R<<4&63]+"==",V};var I=M();m?a.exports=I:(d.md5=I,y&&(l=function(){return I}.call(I,o,I,a),l!==void 0&&(a.exports=l)))})()}).call(this,o("./node_modules/webpack/buildin/module.js")(r))},"./lib/request.js":function(r,s,o){var a=o("./node_modules/@babel/runtime/helpers/typeof.js"),l=function(y){switch(a(y)){case"string":return y;case"boolean":return y?"true":"false";case"number":return isFinite(y)?y:"";default:return""}},u=function(y,b,S,A){return b=b||"&",S=S||"=",y===null&&(y=void 0),a(y)==="object"?Object.keys(y).map(function(E){var x=encodeURIComponent(l(E))+S;return Array.isArray(y[E])?y[E].map(function(P){return x+encodeURIComponent(l(P))}).join(b):x+encodeURIComponent(l(y[E]))}).filter(Boolean).join(b):A?encodeURIComponent(l(A))+S+encodeURIComponent(l(y)):""},c=function(y,b,S){var A={},E=b.getAllResponseHeaders();return E&&E.length>0&&E.trim().split(` `).forEach(function(x){if(x){var P=x.indexOf(":"),C=x.substr(0,P).trim().toLowerCase(),T=x.substr(P+1).trim();A[C]=T}}),{error:y,statusCode:b.status,statusMessage:b.statusText,headers:A,body:S}},d=function(y,b){return!b&&b==="text"?y.responseText:y.response},g=function(y,b){var S=(y.method||"GET").toUpperCase(),A=y.url;if(y.qs){var E=u(y.qs);E&&(A+=(A.indexOf("?")===-1?"?":"&")+E)}var x=new XMLHttpRequest;if(x.open(S,A,!0),x.responseType=y.dataType||"text",y.xhrFields)for(var P in y.xhrFields)x[P]=y.xhrFields[P];var C=y.headers;if(C)for(var T in C)C.hasOwnProperty(T)&&T.toLowerCase()!=="content-length"&&T.toLowerCase()!=="user-agent"&&T.toLowerCase()!=="origin"&&T.toLowerCase()!=="host"&&x.setRequestHeader(T,C[T]);return y.onProgress&&x.upload&&(x.upload.onprogress=y.onProgress),y.onDownloadProgress&&(x.onprogress=y.onDownloadProgress),y.timeout&&(x.timeout=y.timeout),x.ontimeout=function(_){var B=new Error("timeout");b(c(B,x))},x.onload=function(){b(c(null,x,d(x,y.dataType)))},x.onerror=function(_){var B=d(x,y.dataType);if(B)b(c(null,x,B));else{var M=x.statusText;!M&&x.status===0&&(M=new Error("CORS blocked or network error")),b(c(M,x,B))}},x.send(y.body||""),x};r.exports=g},"./lib/xml2json.js":function(r,s,o){var a=o("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,l=function(){this.version="1.3.5";var c={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},d=new RegExp(/(?!xmlns)^.*:/);return this.grokType=function(g){return/^\s*$/.test(g)?null:/^(?:true|false)$/i.test(g)?g.toLowerCase()==="true":isFinite(g)?parseFloat(g):g},this.parseString=function(g,m){if(g){var y=this.stringToXML(g);return y.getElementsByTagName("parsererror").length?null:this.parseXML(y,m)}else return null},this.parseXML=function(g,m){for(var y in m)c[y]=m[y];var b={},S=0,A="",E=g.childNodes.length;if(E)for(var x,P,C,T=0;T=B+M||B?new java.lang.String(_,B,M)+"":_}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(_){E.prototype[_]=function(){return null}});function T(_,B){_.currentElement?_.currentElement.appendChild(B):_.doc.appendChild(B)}s.__DOMHandler=E,s.normalizeLineEndings=b,s.DOMParser=S},"./node_modules/@xmldom/xmldom/lib/dom.js":function(r,s,o){var a=o("./node_modules/@xmldom/xmldom/lib/conventions.js"),l=a.find,u=a.NAMESPACE;function c(ie){return ie!==""}function d(ie){return ie?ie.split(/[\t\n\f\r ]+/).filter(c):[]}function g(ie,le){return ie.hasOwnProperty(le)||(ie[le]=!0),ie}function m(ie){if(!ie)return[];var le=d(ie);return Object.keys(le.reduce(g,{}))}function y(ie){return function(le){return ie&&ie.indexOf(le)!==-1}}function b(ie,le){for(var we in ie)Object.prototype.hasOwnProperty.call(ie,we)&&(le[we]=ie[we])}function S(ie,le){var we=ie.prototype;if(!(we instanceof le)){let ke=function(){};ke.prototype=le.prototype,ke=new ke,b(we,ke),ie.prototype=we=ke}we.constructor!=ie&&(typeof ie!="function"&&console.error("unknown Class:"+ie),we.constructor=ie)}var A={},E=A.ELEMENT_NODE=1,x=A.ATTRIBUTE_NODE=2,P=A.TEXT_NODE=3,C=A.CDATA_SECTION_NODE=4,T=A.ENTITY_REFERENCE_NODE=5,_=A.ENTITY_NODE=6,B=A.PROCESSING_INSTRUCTION_NODE=7,M=A.COMMENT_NODE=8,N=A.DOCUMENT_NODE=9,I=A.DOCUMENT_TYPE_NODE=10,R=A.DOCUMENT_FRAGMENT_NODE=11,F=A.NOTATION_NODE=12,k={},V={};k.INDEX_SIZE_ERR=(V[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(V[2]="DOMString size error",2);var D=k.HIERARCHY_REQUEST_ERR=(V[3]="Hierarchy request error",3);k.WRONG_DOCUMENT_ERR=(V[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(V[5]="Invalid character",5),k.NO_DATA_ALLOWED_ERR=(V[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(V[7]="No modification allowed",7);var $=k.NOT_FOUND_ERR=(V[8]="Not found",8);k.NOT_SUPPORTED_ERR=(V[9]="Not supported",9);var O=k.INUSE_ATTRIBUTE_ERR=(V[10]="Attribute in use",10);k.INVALID_STATE_ERR=(V[11]="Invalid state",11),k.SYNTAX_ERR=(V[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(V[13]="Invalid modification",13),k.NAMESPACE_ERR=(V[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(V[15]="Invalid access",15);function q(ie,le){if(le instanceof Error)var we=le;else we=this,Error.call(this,V[ie]),this.message=V[ie],Error.captureStackTrace&&Error.captureStackTrace(this,q);return we.code=ie,le&&(this.message=this.message+": "+le),we}q.prototype=Error.prototype,b(k,q);function G(){}G.prototype={length:0,item:function(ie){return ie>=0&&ie=0){for(var Ve=le.length-1;ke0},lookupPrefix:function(ie){for(var le=this;le;){var we=le._nsMap;if(we){for(var ke in we)if(Object.prototype.hasOwnProperty.call(we,ke)&&we[ke]===ie)return ke}le=le.nodeType==x?le.ownerDocument:le.parentNode}return null},lookupNamespaceURI:function(ie){for(var le=this;le;){var we=le._nsMap;if(we&&Object.prototype.hasOwnProperty.call(we,ie))return we[ie];le=le.nodeType==x?le.ownerDocument:le.parentNode}return null},isDefaultNamespace:function(ie){var le=this.lookupPrefix(ie);return le==null}};function he(ie){return ie=="<"&&"<"||ie==">"&&">"||ie=="&"&&"&"||ie=='"'&&"""||"&#"+ie.charCodeAt()+";"}b(A,Q),b(A,Q.prototype);function ge(ie,le){if(le(ie))return!0;if(ie=ie.firstChild)do if(ge(ie,le))return!0;while(ie=ie.nextSibling)}function Se(){this.ownerDocument=this}function Ie(ie,le,we){ie&&ie._inc++;var ke=we.namespaceURI;ke===u.XMLNS&&(le._nsMap[we.prefix?we.localName:""]=we.value)}function Me(ie,le,we,ke){ie&&ie._inc++;var Ve=we.namespaceURI;Ve===u.XMLNS&&delete le._nsMap[we.prefix?we.localName:""]}function te(ie,le,we){if(ie&&ie._inc){ie._inc++;var ke=le.childNodes;if(we)ke[ke.length++]=we;else{for(var Ve=le.firstChild,We=0;Ve;)ke[We++]=Ve,Ve=Ve.nextSibling;ke.length=We,delete ke[ke.length]}}}function oe(ie,le){var we=le.previousSibling,ke=le.nextSibling;return we?we.nextSibling=ke:ie.firstChild=ke,ke?ke.previousSibling=we:ie.lastChild=we,le.parentNode=null,le.previousSibling=null,le.nextSibling=null,te(ie.ownerDocument,ie),le}function z(ie){return ie&&(ie.nodeType===Q.DOCUMENT_NODE||ie.nodeType===Q.DOCUMENT_FRAGMENT_NODE||ie.nodeType===Q.ELEMENT_NODE)}function me(ie){return ie&&(ee(ie)||ne(ie)||pe(ie)||ie.nodeType===Q.DOCUMENT_FRAGMENT_NODE||ie.nodeType===Q.COMMENT_NODE||ie.nodeType===Q.PROCESSING_INSTRUCTION_NODE)}function pe(ie){return ie&&ie.nodeType===Q.DOCUMENT_TYPE_NODE}function ee(ie){return ie&&ie.nodeType===Q.ELEMENT_NODE}function ne(ie){return ie&&ie.nodeType===Q.TEXT_NODE}function fe(ie,le){var we=ie.childNodes||[];if(l(we,ee)||pe(le))return!1;var ke=l(we,pe);return!(le&&ke&&we.indexOf(ke)>we.indexOf(le))}function _e(ie,le){var we=ie.childNodes||[];function ke(We){return ee(We)&&We!==le}if(l(we,ke))return!1;var Ve=l(we,pe);return!(le&&Ve&&we.indexOf(Ve)>we.indexOf(le))}function Ae(ie,le,we){if(!z(ie))throw new q(D,"Unexpected parent node type "+ie.nodeType);if(we&&we.parentNode!==ie)throw new q($,"child not in parent");if(!me(le)||pe(le)&&ie.nodeType!==Q.DOCUMENT_NODE)throw new q(D,"Unexpected node type "+le.nodeType+" for parent node type "+ie.nodeType)}function Pe(ie,le,we){var ke=ie.childNodes||[],Ve=le.childNodes||[];if(le.nodeType===Q.DOCUMENT_FRAGMENT_NODE){var We=Ve.filter(ee);if(We.length>1||l(Ve,ne))throw new q(D,"More than one element or text in fragment");if(We.length===1&&!fe(ie,we))throw new q(D,"Element in fragment can not be inserted before doctype")}if(ee(le)&&!fe(ie,we))throw new q(D,"Only one element can be added and only after doctype");if(pe(le)){if(l(ke,pe))throw new q(D,"Only one doctype is allowed");var rt=l(ke,ee);if(we&&ke.indexOf(rt)1||l(Ve,ne))throw new q(D,"More than one element or text in fragment");if(We.length===1&&!_e(ie,we))throw new q(D,"Element in fragment can not be inserted before doctype")}if(ee(le)&&!_e(ie,we))throw new q(D,"Only one element can be added and only after doctype");if(pe(le)){if(l(ke,function(He){return pe(He)&&He!==we}))throw new q(D,"Only one doctype is allowed");var rt=l(ke,ee);if(we&&ke.indexOf(rt)0&&ge(we.documentElement,function(Ve){if(Ve!==we&&Ve.nodeType===E){var We=Ve.getAttribute("class");if(We){var rt=ie===We;if(!rt){var mt=m(We);rt=le.every(y(mt))}rt&&ke.push(Ve)}}}),ke})},createElement:function(ie){var le=new ce;le.ownerDocument=this,le.nodeName=ie,le.tagName=ie,le.localName=ie,le.childNodes=new G;var we=le.attributes=new W;return we._ownerElement=le,le},createDocumentFragment:function(){var ie=new tt;return ie.ownerDocument=this,ie.childNodes=new G,ie},createTextNode:function(ie){var le=new De;return le.ownerDocument=this,le.appendData(ie),le},createComment:function(ie){var le=new Ne;return le.ownerDocument=this,le.appendData(ie),le},createCDATASection:function(ie){var le=new Ue;return le.ownerDocument=this,le.appendData(ie),le},createProcessingInstruction:function(ie,le){var we=new ct;return we.ownerDocument=this,we.tagName=we.nodeName=we.target=ie,we.nodeValue=we.data=le,we},createAttribute:function(ie){var le=new Ee;return le.ownerDocument=this,le.name=ie,le.nodeName=ie,le.localName=ie,le.specified=!0,le},createEntityReference:function(ie){var le=new Qe;return le.ownerDocument=this,le.nodeName=ie,le},createElementNS:function(ie,le){var we=new ce,ke=le.split(":"),Ve=we.attributes=new W;return we.childNodes=new G,we.ownerDocument=this,we.nodeName=le,we.tagName=le,we.namespaceURI=ie,ke.length==2?(we.prefix=ke[0],we.localName=ke[1]):we.localName=le,Ve._ownerElement=we,we},createAttributeNS:function(ie,le){var we=new Ee,ke=le.split(":");return we.ownerDocument=this,we.nodeName=le,we.name=le,we.namespaceURI=ie,we.specified=!0,ke.length==2?(we.prefix=ke[0],we.localName=ke[1]):we.localName=le,we}},S(Se,Q);function ce(){this._nsMap={}}ce.prototype={nodeType:E,hasAttribute:function(ie){return this.getAttributeNode(ie)!=null},getAttribute:function(ie){var le=this.getAttributeNode(ie);return le&&le.value||""},getAttributeNode:function(ie){return this.attributes.getNamedItem(ie)},setAttribute:function(ie,le){var we=this.ownerDocument.createAttribute(ie);we.value=we.nodeValue=""+le,this.setAttributeNode(we)},removeAttribute:function(ie){var le=this.getAttributeNode(ie);le&&this.removeAttributeNode(le)},appendChild:function(ie){return ie.nodeType===R?this.insertBefore(ie,null):xe(this,ie)},setAttributeNode:function(ie){return this.attributes.setNamedItem(ie)},setAttributeNodeNS:function(ie){return this.attributes.setNamedItemNS(ie)},removeAttributeNode:function(ie){return this.attributes.removeNamedItem(ie.nodeName)},removeAttributeNS:function(ie,le){var we=this.getAttributeNodeNS(ie,le);we&&this.removeAttributeNode(we)},hasAttributeNS:function(ie,le){return this.getAttributeNodeNS(ie,le)!=null},getAttributeNS:function(ie,le){var we=this.getAttributeNodeNS(ie,le);return we&&we.value||""},setAttributeNS:function(ie,le,we){var ke=this.ownerDocument.createAttributeNS(ie,le);ke.value=ke.nodeValue=""+we,this.setAttributeNode(ke)},getAttributeNodeNS:function(ie,le){return this.attributes.getNamedItemNS(ie,le)},getElementsByTagName:function(ie){return new U(this,function(le){var we=[];return ge(le,function(ke){ke!==le&&ke.nodeType==E&&(ie==="*"||ke.tagName==ie)&&we.push(ke)}),we})},getElementsByTagNameNS:function(ie,le){return new U(this,function(we){var ke=[];return ge(we,function(Ve){Ve!==we&&Ve.nodeType===E&&(ie==="*"||Ve.namespaceURI===ie)&&(le==="*"||Ve.localName==le)&&ke.push(Ve)}),ke})}},Se.prototype.getElementsByTagName=ce.prototype.getElementsByTagName,Se.prototype.getElementsByTagNameNS=ce.prototype.getElementsByTagNameNS,S(ce,Q);function Ee(){}Ee.prototype.nodeType=x,S(Ee,Q);function de(){}de.prototype={data:"",substringData:function(ie,le){return this.data.substring(ie,ie+le)},appendData:function(ie){ie=this.data+ie,this.nodeValue=this.data=ie,this.length=ie.length},insertData:function(ie,le){this.replaceData(ie,0,le)},appendChild:function(ie){throw new Error(V[D])},deleteData:function(ie,le){this.replaceData(ie,le,"")},replaceData:function(ie,le,we){var ke=this.data.substring(0,ie),Ve=this.data.substring(ie+le);we=ke+we+Ve,this.nodeValue=this.data=we,this.length=we.length}},S(de,Q);function De(){}De.prototype={nodeName:"#text",nodeType:P,splitText:function(ie){var le=this.data,we=le.substring(ie);le=le.substring(0,ie),this.data=this.nodeValue=le,this.length=le.length;var ke=this.ownerDocument.createTextNode(we);return this.parentNode&&this.parentNode.insertBefore(ke,this.nextSibling),ke}},S(De,de);function Ne(){}Ne.prototype={nodeName:"#comment",nodeType:M},S(Ne,de);function Ue(){}Ue.prototype={nodeName:"#cdata-section",nodeType:C},S(Ue,de);function Ye(){}Ye.prototype.nodeType=I,S(Ye,Q);function $e(){}$e.prototype.nodeType=F,S($e,Q);function Ke(){}Ke.prototype.nodeType=_,S(Ke,Q);function Qe(){}Qe.prototype.nodeType=T,S(Qe,Q);function tt(){}tt.prototype.nodeName="#document-fragment",tt.prototype.nodeType=R,S(tt,Q);function ct(){}ct.prototype.nodeType=B,S(ct,Q);function it(){}it.prototype.serializeToString=function(ie,le,we){return ot.call(ie,le,we)},Q.prototype.toString=ot;function ot(ie,le){var we=[],ke=this.nodeType==9&&this.documentElement||this,Ve=ke.prefix,We=ke.namespaceURI;if(We&&Ve==null){var Ve=ke.lookupPrefix(We);if(Ve==null)var rt=[{namespace:We,prefix:null}]}return ht(this,we,ie,le,rt),we.join("")}function bt(ie,le,we){var ke=ie.prefix||"",Ve=ie.namespaceURI;if(!Ve||ke==="xml"&&Ve===u.XML||Ve===u.XMLNS)return!1;for(var We=we.length;We--;){var rt=we[We];if(rt.prefix===ke)return rt.namespace!==Ve}return!0}function nt(ie,le,we){ie.push(" ",le,'="',we.replace(/[<>&"\t\n\r]/g,he),'"')}function ht(ie,le,we,ke,Ve){if(Ve||(Ve=[]),ke)if(ie=ke(ie),ie){if(typeof ie=="string"){le.push(ie);return}}else return;switch(ie.nodeType){case E:var We=ie.attributes,rt=We.length,ve=ie.firstChild,mt=ie.tagName;we=u.isHTML(ie.namespaceURI)||we;var He=mt;if(!we&&!ie.prefix&&ie.namespaceURI){for(var Et,Ct=0;Ct=0;wt--){var H=Ve[wt];if(H.prefix===""&&H.namespace===ie.namespaceURI){Et=H.namespace;break}}if(Et!==ie.namespaceURI)for(var wt=Ve.length-1;wt>=0;wt--){var H=Ve[wt];if(H.namespace===ie.namespaceURI){H.prefix&&(He=H.prefix+":"+mt);break}}}le.push("<",He);for(var ue=0;ue"),we&&/^script$/i.test(mt))for(;ve;)ve.data?le.push(ve.data):ht(ve,le,we,ke,Ve.slice()),ve=ve.nextSibling;else for(;ve;)ht(ve,le,we,ke,Ve.slice()),ve=ve.nextSibling;le.push("")}else le.push("/>");return;case N:case R:for(var ve=ie.firstChild;ve;)ht(ve,le,we,ke,Ve.slice()),ve=ve.nextSibling;return;case x:return nt(le,ie.name,ie.value);case P:return le.push(ie.data.replace(/[<&>]/g,he));case C:return le.push("");case M:return le.push("");case I:var Ce=ie.publicId,Le=ie.systemId;if(le.push("");else if(Le&&Le!=".")le.push(" SYSTEM ",Le,">");else{var Oe=ie.internalSubset;Oe&&le.push(" [",Oe,"]"),le.push(">")}return;case B:return le.push("");case T:return le.push("&",ie.nodeName,";");default:le.push("??",ie.nodeName)}}function ze(ie,le,we){var ke;switch(le.nodeType){case E:ke=le.cloneNode(!1),ke.ownerDocument=ie;case R:break;case x:we=!0;break}if(ke||(ke=le.cloneNode(!1)),ke.ownerDocument=ie,ke.parentNode=null,we)for(var Ve=le.firstChild;Ve;)ke.appendChild(ze(ie,Ve,we)),Ve=Ve.nextSibling;return ke}function lt(ie,le,we){var ke=new le.constructor;for(var Ve in le)if(Object.prototype.hasOwnProperty.call(le,Ve)){var We=le[Ve];typeof We!="object"&&We!=ke[Ve]&&(ke[Ve]=We)}switch(le.childNodes&&(ke.childNodes=new G),ke.ownerDocument=ie,ke.nodeType){case E:var rt=le.attributes,mt=ke.attributes=new W,He=rt.length;mt._ownerElement=ke;for(var Et=0;Et",lt:"<",quot:'"'}),s.HTML_ENTITIES=a({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),s.entityMap=s.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":function(r,s,o){var a=o("./node_modules/@xmldom/xmldom/lib/dom.js");s.DOMImplementation=a.DOMImplementation,s.XMLSerializer=a.XMLSerializer,s.DOMParser=o("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(r,s,o){var a=o("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,l=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,u=new RegExp("[\\-\\.0-9"+l.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),c=new RegExp("^"+l.source+u.source+"*(?::"+l.source+u.source+"*)?$"),d=0,g=1,m=2,y=3,b=4,S=5,A=6,E=7;function x(D,$){this.message=D,this.locator=$,Error.captureStackTrace&&Error.captureStackTrace(this,x)}x.prototype=new Error,x.prototype.name=x.name;function P(){}P.prototype={parse:function(D,$,O){var q=this.domBuilder;q.startDocument(),I($,$={}),C(D,$,O,q,this.errorHandler),q.endDocument()}};function C(D,$,O,q,G){function U(ce){if(ce>65535){ce-=65536;var Ee=55296+(ce>>10),de=56320+(ce&1023);return String.fromCharCode(Ee,de)}else return String.fromCharCode(ce)}function Z(ce){var Ee=ce.slice(1,-1);return Object.hasOwnProperty.call(O,Ee)?O[Ee]:Ee.charAt(0)==="#"?U(parseInt(Ee.substr(1).replace("x","0x"))):(G.error("entity not found:"+ce),ce)}function W(ce){if(ce>Se){var Ee=D.substring(Se,ce).replace(/&#?\w+;/g,Z);Q&&K(Se),q.characters(Ee,0,ce-Se),Se=ce}}function K(ce,Ee){for(;ce>=ae&&(Ee=Y.exec(D));)ye=Ee.index,ae=ye+Ee[0].length,Q.lineNumber++;Q.columnNumber=ce-ye+1}for(var ye=0,ae=0,Y=/.*(?:\r\n?|\n)|.*$/g,Q=q.locator,he=[{currentNSMap:$}],ge={},Se=0;;){try{var Ie=D.indexOf("<",Se);if(Ie<0){if(!D.substr(Se).match(/^\s*$/)){var Me=q.doc,te=Me.createTextNode(D.substr(Se));Me.appendChild(te),q.currentElement=te}return}switch(Ie>Se&&W(Ie),D.charAt(Ie+1)){case"/":var Ae=D.indexOf(">",Ie+3),oe=D.substring(Ie+2,Ae).replace(/[ \t\n\r]+$/g,""),z=he.pop();Ae<0?(oe=D.substring(Ie+2).replace(/[\s<].*/,""),G.error("end tag name: "+oe+" is not complete:"+z.tagName),Ae=Ie+1+oe.length):oe.match(/\sSe?Se=Ae:W(Math.max(Ie,Se)+1)}}function T(D,$){return $.lineNumber=D.lineNumber,$.columnNumber=D.columnNumber,$}function _(D,$,O,q,G,U){function Z(Q,he,ge){O.attributeNames.hasOwnProperty(Q)&&U.fatalError("Attribute "+Q+" redefined"),O.addValue(Q,he.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,G),ge)}for(var W,K,ye=++$,ae=d;;){var Y=D.charAt(ye);switch(Y){case"=":if(ae===g)W=D.slice($,ye),ae=y;else if(ae===m)ae=y;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(ae===y||ae===g)if(ae===g&&(U.warning('attribute value must after "="'),W=D.slice($,ye)),$=ye+1,ye=D.indexOf(Y,$),ye>0)K=D.slice($,ye),Z(W,K,$-1),ae=S;else throw new Error("attribute value no end '"+Y+"' match");else if(ae==b)K=D.slice($,ye),Z(W,K,$),U.warning('attribute "'+W+'" missed start quot('+Y+")!!"),$=ye+1,ae=S;else throw new Error('attribute value must after "="');break;case"/":switch(ae){case d:O.setTagName(D.slice($,ye));case S:case A:case E:ae=E,O.closed=!0;case b:case g:break;case m:O.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return U.error("unexpected end of input"),ae==d&&O.setTagName(D.slice($,ye)),ye;case">":switch(ae){case d:O.setTagName(D.slice($,ye));case S:case A:case E:break;case b:case g:K=D.slice($,ye),K.slice(-1)==="/"&&(O.closed=!0,K=K.slice(0,-1));case m:ae===m&&(K=W),ae==b?(U.warning('attribute "'+K+'" missed quot(")!'),Z(W,K,$)):((!a.isHTML(q[""])||!K.match(/^(?:disabled|checked|selected)$/i))&&U.warning('attribute "'+K+'" missed value!! "'+K+'" instead!!'),Z(K,K,$));break;case y:throw new Error("attribute value missed!!")}return ye;case"€":Y=" ";default:if(Y<=" ")switch(ae){case d:O.setTagName(D.slice($,ye)),ae=A;break;case g:W=D.slice($,ye),ae=m;break;case b:var K=D.slice($,ye);U.warning('attribute "'+K+'" missed quot(")!!'),Z(W,K,$);case S:ae=A;break}else switch(ae){case m:O.tagName,(!a.isHTML(q[""])||!W.match(/^(?:disabled|checked|selected)$/i))&&U.warning('attribute "'+W+'" missed value!! "'+W+'" instead2!!'),Z(W,W,$),$=ye,ae=g;break;case S:U.warning('attribute space is required"'+W+'"!!');case A:ae=g,$=ye;break;case y:ae=b,$=ye;break;case E:throw new Error("elements closed character '/' and '>' must be connected to")}}ye++}}function B(D,$,O){for(var q=D.tagName,G=null,Y=D.length;Y--;){var U=D[Y],Z=U.qName,W=U.value,Q=Z.indexOf(":");if(Q>0)var K=U.prefix=Z.slice(0,Q),ye=Z.slice(Q+1),ae=K==="xmlns"&&ye;else ye=Z,K=null,ae=Z==="xmlns"&&"";U.localName=ye,ae!==!1&&(G==null&&(G={},I(O,O={})),O[ae]=G[ae]=W,U.uri=a.XMLNS,$.startPrefixMapping(ae,W))}for(var Y=D.length;Y--;){U=D[Y];var K=U.prefix;K&&(K==="xml"&&(U.uri=a.XML),K!=="xmlns"&&(U.uri=O[K||""]))}var Q=q.indexOf(":");Q>0?(K=D.prefix=q.slice(0,Q),ye=D.localName=q.slice(Q+1)):(K=null,ye=D.localName=q);var he=D.uri=O[K||""];if($.startElement(he,ye,q,D),D.closed){if($.endElement(he,ye,q),G)for(K in G)Object.prototype.hasOwnProperty.call(G,K)&&$.endPrefixMapping(K)}else return D.currentNSMap=O,D.localNSMap=G,!0}function M(D,$,O,q,G){if(/^(?:script|textarea)$/i.test(O)){var U=D.indexOf("",$),Z=D.substring($+1,U);if(/[&<]/.test(Z))return/^script$/i.test(O)?(G.characters(Z,0,Z.length),U):(Z=Z.replace(/&#?\w+;/g,q),G.characters(Z,0,Z.length),U)}return $+1}function N(D,$,O,q){var G=q[O];return G==null&&(G=D.lastIndexOf(""),G<$&&(G=D.lastIndexOf("",$+4);return U>$?(O.comment(D,$+4,U-$-4),U+3):(q.error("Unclosed comment"),-1)}else return-1;default:if(D.substr($+3,6)=="CDATA["){var U=D.indexOf("]]>",$+9);return O.startCDATA(),O.characters(D,$+9,U-$-9),O.endCDATA(),U+3}var Z=V(D,$),W=Z.length;if(W>1&&/!doctype/i.test(Z[0][0])){var K=Z[1][0],ye=!1,ae=!1;W>3&&(/^public$/i.test(Z[2][0])?(ye=Z[3][0],ae=W>4&&Z[4][0]):/^system$/i.test(Z[2][0])&&(ae=Z[3][0]));var Y=Z[W-1];return O.startDTD(K,ye,ae),O.endDTD(),Y.index+Y[0].length}}return-1}function F(D,$,O){var q=D.indexOf("?>",$);if(q){var G=D.substring($,q).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return G?(G[0].length,O.processingInstruction(G[1],G[2]),q+2):-1}return-1}function k(){this.attributeNames={}}k.prototype={setTagName:function(D){if(!c.test(D))throw new Error("invalid tagName:"+D);this.tagName=D},addValue:function(D,$,O){if(!c.test(D))throw new Error("invalid attribute:"+D);this.attributeNames[D]=this.length,this[this.length++]={qName:D,value:$,offset:O}},length:0,getLocalName:function(D){return this[D].localName},getLocator:function(D){return this[D].locator},getQName:function(D){return this[D].qName},getURI:function(D){return this[D].uri},getValue:function(D){return this[D].value}};function V(D,$){var O,q=[],G=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(G.lastIndex=$,G.exec(D);O=G.exec(D);)if(q.push(O),O[1])return q}s.XMLReader=P,s.ParseError=x},"./node_modules/process/browser.js":function(r,s){var o=r.exports={},a,l;function u(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=u}catch(C){a=u}try{typeof clearTimeout=="function"?l=clearTimeout:l=c}catch(C){l=c}})();function d(C){if(a===setTimeout)return setTimeout(C,0);if((a===u||!a)&&setTimeout)return a=setTimeout,setTimeout(C,0);try{return a(C,0)}catch(T){try{return a.call(null,C,0)}catch(_){return a.call(this,C,0)}}}function g(C){if(l===clearTimeout)return clearTimeout(C);if((l===c||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(C);try{return l(C)}catch(T){try{return l.call(null,C)}catch(_){return l.call(this,C)}}}var m=[],y=!1,b,S=-1;function A(){!y||!b||(y=!1,b.length?m=b.concat(m):S=-1,m.length&&E())}function E(){if(!y){var C=d(A);y=!0;for(var T=m.length;T;){for(b=m,m=[];++S1)for(var _=1;_Z)return ge(null,!1);if(Se>1){var Ie=Math.max(he[0].Size,he[1].Size);if(Ie!==U)return ge(null,!1)}var Me=function te(oe){if(oe=ge.length){Y.emit("has_and_check_upload_id",Q);return}var te=ge[Me];if(!d.isInArray(Q,te)){l.removeUploadId.call(O,te),Ie(Me+1);return}if(l.using[te]){Ie(Me+1);return}S.call(O,{Bucket:k,Region:V,Key:D,UploadId:te,tracker:I.tracker},function(oe,z){O._isRunningTask(F)&&(oe?(l.removeUploadId.call(O,te),Ie(Me+1)):Y.emit("upload_id_available",{UploadId:te,PartList:z.PartList}))})};Se(0)}),Y.on("get_remote_upload_id_list",function(){b.call(O,{Bucket:k,Region:V,Key:D,tracker:I.tracker},function(Q,he){if(O._isRunningTask(F)){if(Q)return Y.emit("error",Q);var ge=d.filter(he.UploadList,function(Me){return Me.Key===D&&(!$||Me.StorageClass.toUpperCase()===$.toUpperCase())}).reverse().map(function(Me){return Me.UploadId||Me.UploadID});if(ge.length)Y.emit("seek_local_avail_upload_id",ge);else{var Se=l.getFileId(I.Body,I.ChunkSize,k,D),Ie;Se&&(Ie=l.getUploadIdList.call(O,Se))&&d.each(Ie,function(Me){l.removeUploadId.call(O,Me)}),Y.emit("no_available_upload_id")}}})}),Y.emit("get_remote_upload_id_list")}function b(I,R){var F=this,k=[],V={Bucket:I.Bucket,Region:I.Region,Prefix:I.Key,calledBySdk:I.calledBySdk||"sliceUploadFile",tracker:I.tracker},D=function $(){F.multipartList(V,function(O,q){if(O)return R(O);k.push.apply(k,q.Upload||[]),q.IsTruncated==="true"?(V.KeyMarker=q.NextKeyMarker,V.UploadIdMarker=q.NextUploadIdMarker,$()):R(null,{UploadList:k})})};D()}function S(I,R){var F=this,k=[],V={Bucket:I.Bucket,Region:I.Region,Key:I.Key,UploadId:I.UploadId,calledBySdk:"sliceUploadFile",tracker:I.tracker},D=function $(){F.multipartListPart(V,function(O,q){if(O)return R(O);k.push.apply(k,q.Part||[]),q.IsTruncated==="true"?(V.PartNumberMarker=q.NextPartNumberMarker,$()):R(null,{PartList:k})})};D()}function A(I,R){var F=this,k=I.TaskId,V=I.Bucket,D=I.Region,$=I.Key,O=I.UploadData,q=I.FileSize,G=I.SliceSize,U=Math.min(I.AsyncLimit||F.options.ChunkParallelLimit||1,256),Z=I.Body,W=Math.ceil(q/G),K=0,ye=I.ServerSideEncryption,ae=I.Headers,Y=d.filter(O.PartList,function(he){return he.Uploaded&&(K+=he.PartNumber>=W&&q%G||G),!he.Uploaded}),Q=I.onProgress;u.eachLimit(Y,U,function(he,ge){if(F._isRunningTask(k)){var Se=he.PartNumber,Ie=Math.min(q,he.PartNumber*G)-(he.PartNumber-1)*G,Me=0;E.call(F,{TaskId:k,Bucket:V,Region:D,Key:$,SliceSize:G,FileSize:q,PartNumber:Se,ServerSideEncryption:ye,Body:Z,UploadData:O,Headers:ae,onProgress:function(oe){K+=oe.loaded-Me,Me=oe.loaded,Q({loaded:K,total:q})},tracker:I.tracker},function(te,oe){F._isRunningTask(k)&&(!te&&!oe.ETag&&(te='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),te?K-=Me:(K+=Ie-Me,he.ETag=oe.ETag),Q({loaded:K,total:q}),ge(te||null,oe))})}},function(he){if(F._isRunningTask(k)){if(he)return R(he);R(null,{UploadId:O.UploadId,SliceList:O.PartList})}})}function E(I,R){var F=this,k=I.TaskId,V=I.Bucket,D=I.Region,$=I.Key,O=I.FileSize,q=I.Body,G=I.PartNumber*1,U=I.SliceSize,Z=I.ServerSideEncryption,W=I.UploadData,K=I.Headers||{},ye=F.options.ChunkRetryTimes+1,ae=U*(G-1),Y=U,Q=ae+U;Q>O&&(Q=O,Y=Q-ae);var he=["x-cos-traffic-limit","x-cos-mime-limit"],ge={};d.each(K,function(Ie,Me){he.indexOf(Me)>-1&&(ge[Me]=Ie)});var Se=W.PartList[G-1];u.retry(ye,function(Ie){F._isRunningTask(k)&&d.fileSlice(q,ae,Q,!0,function(Me){F.multipartUpload({TaskId:k,Bucket:V,Region:D,Key:$,ContentLength:Y,PartNumber:G,UploadId:W.UploadId,ServerSideEncryption:Z,Body:Me,Headers:ge,onProgress:I.onProgress,calledBySdk:"sliceUploadFile",tracker:I.tracker},function(te,oe){if(F._isRunningTask(k))return te?Ie(te):(Se.Uploaded=!0,Ie(null,oe))})})},function(Ie,Me){if(F._isRunningTask(k))return R(Ie,Me)})}function x(I,R){var F=I.Bucket,k=I.Region,V=I.Key,D=I.UploadId,$=I.SliceList,O=this,q=this.options.ChunkRetryTimes+1,G=I.Headers,U=$.map(function(Z){return{PartNumber:Z.PartNumber,ETag:Z.ETag}});u.retry(q,function(Z){O.multipartComplete({Bucket:F,Region:k,Key:V,UploadId:D,Parts:U,Headers:G,calledBySdk:"sliceUploadFile",tracker:I.tracker},Z)},function(Z,W){R(Z,W)})}function P(I,R){var F=I.Bucket,k=I.Region,V=I.Key,D=I.UploadId,$=I.Level||"task",O=I.AsyncLimit,q=this,G=new c;if(G.on("error",function(U){return R(U)}),G.on("get_abort_array",function(U){C.call(q,{Bucket:F,Region:k,Key:V,Headers:I.Headers,AsyncLimit:O,AbortArray:U},R)}),$==="bucket")b.call(q,{Bucket:F,Region:k,calledBySdk:"abortUploadTask"},function(U,Z){if(U)return R(U);G.emit("get_abort_array",Z.UploadList||[])});else if($==="file"){if(!V)return R(d.error(new Error("abort_upload_task_no_key")));b.call(q,{Bucket:F,Region:k,Key:V,calledBySdk:"abortUploadTask"},function(U,Z){if(U)return R(U);G.emit("get_abort_array",Z.UploadList||[])})}else if($==="task"){if(!D)return R(d.error(new Error("abort_upload_task_no_id")));if(!V)return R(d.error(new Error("abort_upload_task_no_key")));G.emit("get_abort_array",[{Key:V,UploadId:D}])}else return R(d.error(new Error("abort_unknown_level")))}function C(I,R){var F=I.Bucket,k=I.Region,V=I.Key,D=I.AbortArray,$=I.AsyncLimit||1,O=this,q=0,G=new Array(D.length);u.eachLimit(D,$,function(U,Z){var W=q;if(V&&V!==U.Key){G[W]={error:{KeyNotMatch:!0}},Z(null);return}var K=U.UploadId||U.UploadID;O.multipartAbort({Bucket:F,Region:k,Key:U.Key,Headers:I.Headers,UploadId:K},function(ye){var ae={Bucket:F,Region:k,Key:U.Key,UploadId:K};G[W]={error:ye,task:ae},Z(null)}),q++},function(U){if(U)return R(U);for(var Z=[],W=[],K=0,ye=G.length;Kk?"sliceUploadFile":"putObject";I.tracker=new g({Beacon:F.options.BeaconReporter,clsReporter:F.options.ClsReporter,bucket:I.Bucket,region:I.Region,apiName:"uploadFile",realApi:G,fileKey:I.Key,fileSize:$,accelerate:q,deepTracker:F.options.DeepTracker,customId:F.options.CustomId,delay:F.options.TrackerDelay})}d.each(I,function(ae,Y){a(ae)!=="object"&&typeof ae!="function"&&(O[Y]=ae)});var U=I.onTaskReady,Z=function(Y){O.TaskId=Y,U&&U(Y)};I.onTaskReady=Z;var W=$>k?"sliceUploadFile":"putObject",K=I.onFileFinish,ye=function(Y,Q){I.tracker&&I.tracker.report(Y,Q),K&&K(Y,Q,O),R&&R(Y,Q)};V.push({api:W,params:I,callback:ye}),F._addTasks(V)}function _(I,R){var F=this,k=I.SliceSize===void 0?F.options.SliceSize:I.SliceSize,V=0,D=0,$=d.throttleOnProgress.call(F,D,I.onProgress),O=I.files.length,q=I.onFileFinish,G=Array(O),U=function(K,ye,ae){$(null,!0),q&&q(K,ye,ae),G[ae.Index]={options:ae,error:K,data:ye},--O<=0&&R&&R(null,{files:G})},Z=[];d.each(I.files,function(W,K){(function(){var ye=W.Body,ae=ye.size||ye.length||0,Y={Index:K,TaskId:""};if(!F.options.UseRawKey&&W.Key&&W.Key.substr(0,1)==="/"&&(W.Key=W.Key.substr(1)),V+=ae,F.options.EnableReporter){var Q=F.options.UseAccelerate||typeof F.options.Domain=="string"&&F.options.Domain.includes("accelerate."),he=ae>k?"sliceUploadFile":"putObject";W.tracker=new g({Beacon:F.options.BeaconReporter,clsReporter:F.options.ClsReporter,bucket:W.Bucket,region:W.Region,apiName:"uploadFiles",realApi:he,fileKey:W.Key,fileSize:ae,accelerate:Q,deepTracker:F.options.DeepTracker,customId:F.options.CustomId,delay:F.options.TrackerDelay})}d.each(W,function(pe,ee){a(pe)!=="object"&&typeof pe!="function"&&(Y[ee]=pe)});var ge=W.onTaskReady,Se=function(ee){Y.TaskId=ee,ge&&ge(ee)};W.onTaskReady=Se;var Ie=0,Me=W.onProgress,te=function(ee){D=D-Ie+ee.loaded,Ie=ee.loaded,Me&&Me(ee),$({loaded:D,total:V})};W.onProgress=te;var oe=ae>k?"sliceUploadFile":"putObject",z=W.onFileFinish,me=function(ee,ne){W.tracker&&W.tracker.report(ee,ne),z&&z(ee,ne),U&&U(ee,ne,Y)};Z.push({api:oe,params:W,callback:me})})()}),F._addTasks(Z)}function B(I,R){var F=new c,k=this,V=I.Bucket,D=I.Region,$=I.Key,O=I.CopySource,q=d.getSourceParams.call(this,O);if(!q){R(d.error(new Error("CopySource format error")));return}var G=q.Bucket,U=q.Region,Z=decodeURIComponent(q.Key),W=I.CopySliceSize===void 0?k.options.CopySliceSize:I.CopySliceSize;W=Math.max(0,W);var K=I.CopyChunkSize||this.options.CopyChunkSize,ye=this.options.CopyChunkParallelLimit,ae=this.options.ChunkRetryTimes+1,Y=0,Q=0,he,ge,Se={},Ie={},Me={};F.on("copy_slice_complete",function(te){d.each(I.Headers,function(z,me){me.toLowerCase().indexOf("x-cos-meta-")});var oe=d.map(te.PartList,function(z){return{PartNumber:z.PartNumber,ETag:z.ETag}});u.retry(ae,function(z){k.multipartComplete({Bucket:V,Region:D,Key:$,UploadId:te.UploadId,Parts:oe,tracker:I.tracker,calledBySdk:"sliceCopyFile"},z)},function(z,me){if(l.removeUsing(te.UploadId),z)return ge(null,!0),R(z);l.removeUploadId(te.UploadId),ge({loaded:he,total:he},!0),R(null,me)})}),F.on("get_copy_data_finish",function(te){var oe=l.getCopyFileId(O,Se,K,V,$);oe&&l.saveUploadId(oe,te.UploadId,k.options.UploadIdCacheLimit),l.setUsing(te.UploadId);var z=d.filter(te.PartList,function(me){return me.Uploaded&&(Q+=me.PartNumber>=Y&&he%K||K),!me.Uploaded});u.eachLimit(z,ye,function(me,pe){var ee=me.PartNumber,ne=me.CopySourceRange,fe=me.end-me.start;u.retry(ae,function(_e){M.call(k,{Bucket:V,Region:D,Key:$,CopySource:O,UploadId:te.UploadId,PartNumber:ee,CopySourceRange:ne,tracker:I.tracker,calledBySdk:"sliceCopyFile"},_e)},function(_e,Ae){if(_e)return pe(_e);Q+=fe,ge({loaded:Q,total:he}),me.ETag=Ae.ETag,pe(_e||null,Ae)})},function(me){if(me)return l.removeUsing(te.UploadId),ge(null,!0),R(me);F.emit("copy_slice_complete",te)})}),F.on("get_chunk_size_finish",function(){var te=function(){k.multipartInit({Bucket:V,Region:D,Key:$,Headers:Me,tracker:I.tracker,calledBySdk:"sliceCopyFile"},function(ee,ne){if(ee)return R(ee);I.UploadId=ne.UploadId,F.emit("get_copy_data_finish",{UploadId:I.UploadId,PartList:I.PartList})})},oe=l.getCopyFileId(O,Se,K,V,$),z=l.getUploadIdList(oe);if(!oe||!z)return te();var me=function pe(ee){if(ee>=z.length)return te();var ne=z[ee];if(l.using[ne])return pe(ee+1);S.call(k,{Bucket:V,Region:D,Key:$,UploadId:ne,tracker:I.tracker,calledBySdk:"sliceCopyFile"},function(fe,_e){if(fe)l.removeUploadId(ne),pe(ee+1);else{if(l.using[ne])return pe(ee+1);var Ae={},Pe=0;d.each(_e.PartList,function(Be){var Re=parseInt(Be.Size),xe=Pe+Re-1;Ae[Be.PartNumber+"|"+Pe+"|"+xe]=Be.ETag,Pe+=Re}),d.each(I.PartList,function(Be){var Re=Ae[Be.PartNumber+"|"+Be.start+"|"+Be.end];Re&&(Be.ETag=Re,Be.Uploaded=!0)}),F.emit("get_copy_data_finish",{UploadId:ne,PartList:I.PartList})}})};me(0)}),F.on("get_file_size_finish",function(){if(function(){for(var oe=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],z=1024*1024,me=0;meee.length&&(Ie[pe]=me)}),F.emit("get_file_size_finish")}})}function M(I,R){var F=I.TaskId,k=I.Bucket,V=I.Region,D=I.Key,$=I.CopySource,O=I.UploadId,q=I.PartNumber*1,G=I.CopySourceRange,U=this.options.ChunkRetryTimes+1,Z=this;u.retry(U,function(W){Z.uploadPartCopy({TaskId:F,Bucket:k,Region:V,Key:D,CopySource:$,UploadId:O,PartNumber:q,CopySourceRange:G,tracker:I.tracker,calledBySdk:I.calledBySdk},function(K,ye){W(K||null,ye)})},function(W,K){return R(W,K)})}var N={sliceUploadFile:m,abortUploadTask:P,uploadFile:T,uploadFiles:_,sliceCopyFile:B};r.exports.init=function(I,R){R.transferToTaskMethod(N,"sliceUploadFile"),d.each(N,function(F,k){I.prototype[k]=d.apiWrapper(k,F)})}},"./src/async.js":function(r,s){var o=function(c,d,g,m){if(m=m||function(){},!c.length||d<=0)return m();var y=0,b=0,S=0;(function A(){if(y>=c.length)return m();for(;S=c.length?m():A())})})()},a=function(c,d,g){var m=function y(b){d(function(S,A){S&&b"u"?"undefined":a(location))==="object"&&location.protocol==="http:"?"http:":"https:"),se=this.options.ServiceDomain,be=H.AppId||this.options.appId,ve=H.Region;se?(se=se.replace(/\{\{AppId\}\}/gi,be||"").replace(/\{\{Region\}\}/gi,ve||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(se)||(se=J+"//"+se),se.slice(-1)==="/"&&(se=se.slice(0,-1))):ve?se=J+"//cos."+ve+".myqcloud.com":se=J+"//service.cos.myqcloud.com";var Ce="",Le=ve?"cos."+ve+".myqcloud.com":"service.cos.myqcloud.com",Oe=se.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");Le===Oe&&(Ce=Le),He.call(this,{Action:"name/cos:GetService",url:se,method:"GET",headers:H.Headers,SignHost:Ce,tracker:H.tracker},function(Ze,je){if(Ze)return ue(Ze);var ut=je&&je.ListAllMyBucketsResult&&je.ListAllMyBucketsResult.Buckets&&je.ListAllMyBucketsResult.Buckets.Bucket||[];ut=u.isArray(ut)?ut:[ut];var Ge=je&&je.ListAllMyBucketsResult&&je.ListAllMyBucketsResult.Owner||{};ue(null,{Buckets:ut,Owner:Ge,statusCode:je.statusCode,headers:je.headers})})}function d(H,ue){var J=this,se="";if(H.BucketAZConfig){var be={BucketAZConfig:H.BucketAZConfig};se=u.json2xml({CreateBucketConfiguration:be})}He.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,body:se,tracker:H.tracker},function(ve,Ce){if(ve)return ue(ve);var Le=ke({protocol:J.options.Protocol,domain:J.options.Domain,bucket:H.Bucket,region:H.Region,isLocation:!0});ue(null,{Location:Le,statusCode:Ce.statusCode,headers:Ce.headers})})}function g(H,ue){He.call(this,{Action:"name/cos:HeadBucket",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,method:"HEAD",tracker:H.tracker},ue)}function m(H,ue){var J={};J.prefix=H.Prefix||"",J.delimiter=H.Delimiter,J.marker=H.Marker,J["max-keys"]=H.MaxKeys,J["encoding-type"]=H.EncodingType,He.call(this,{Action:"name/cos:GetBucket",ResourceKey:J.prefix,method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,qs:J,tracker:H.tracker},function(se,be){if(se)return ue(se);var ve=be.ListBucketResult||{},Ce=ve.Contents||[],Le=ve.CommonPrefixes||[];Ce=u.isArray(Ce)?Ce:[Ce],Le=u.isArray(Le)?Le:[Le];var Oe=u.clone(ve);u.extend(Oe,{Contents:Ce,CommonPrefixes:Le,statusCode:be.statusCode,headers:be.headers}),ue(null,Oe)})}function y(H,ue){He.call(this,{Action:"name/cos:DeleteBucket",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,method:"DELETE",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function b(H,ue){var J=H.Headers,se="";if(H.AccessControlPolicy){var be=u.clone(H.AccessControlPolicy||{}),ve=be.Grants||be.Grant;ve=u.isArray(ve)?ve:[ve],delete be.Grant,delete be.Grants,be.AccessControlList={Grant:ve},se=u.json2xml({AccessControlPolicy:be}),J["Content-Type"]="application/xml",J["Content-MD5"]=u.b64(u.md5(se))}u.each(J,function(Ce,Le){Le.indexOf("x-cos-grant-")===0&&(J[Le]=we(J[Le]))}),He.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:H.Bucket,Region:H.Region,headers:J,action:"acl",body:se,tracker:H.tracker},function(Ce,Le){if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function S(H,ue){He.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"acl",tracker:H.tracker},function(J,se){if(J)return ue(J);var be=se.AccessControlPolicy||{},ve=be.Owner||{},Ce=be.AccessControlList.Grant||[];Ce=u.isArray(Ce)?Ce:[Ce];var Le=le(be);se.headers&&se.headers["x-cos-acl"]&&(Le.ACL=se.headers["x-cos-acl"]),Le=u.extend(Le,{Owner:ve,Grants:Ce,statusCode:se.statusCode,headers:se.headers}),ue(null,Le)})}function A(H,ue){var J=H.CORSConfiguration||{},se=J.CORSRules||H.CORSRules||[];se=u.clone(u.isArray(se)?se:[se]),u.each(se,function(Le){u.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Oe){var Ze=Oe+"s",je=Le[Ze]||Le[Oe]||[];delete Le[Ze],Le[Oe]=u.isArray(je)?je:[je]})});var be={CORSRule:se};H.ResponseVary&&(be.ResponseVary=H.ResponseVary);var ve=u.json2xml({CORSConfiguration:be}),Ce=H.Headers;Ce["Content-Type"]="application/xml",Ce["Content-MD5"]=u.b64(u.md5(ve)),He.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:ve,action:"cors",headers:Ce,tracker:H.tracker},function(Le,Oe){if(Le)return ue(Le);ue(null,{statusCode:Oe.statusCode,headers:Oe.headers})})}function E(H,ue){He.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"cors",tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.error&&J.error.Code==="NoSuchCORSConfiguration"){var be={CORSRules:[],statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}var ve=se.CORSConfiguration||{},Ce=ve.CORSRules||ve.CORSRule||[];Ce=u.clone(u.isArray(Ce)?Ce:[Ce]);var Le=ve.ResponseVary;u.each(Ce,function(Oe){u.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Ze){var je=Ze+"s",ut=Oe[je]||Oe[Ze]||[];delete Oe[Ze],Oe[je]=u.isArray(ut)?ut:[ut]})}),ue(null,{CORSRules:Ce,ResponseVary:Le,statusCode:se.statusCode,headers:se.headers})})}function x(H,ue){He.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"cors",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode||J.statusCode,headers:se.headers})})}function P(H,ue){He.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"location",tracker:H.tracker},ue)}function C(H,ue){var J=H.Policy;try{typeof J=="string"&&(J=JSON.parse(J))}catch(ve){}if(!J||typeof J=="string")return ue(u.error(new Error("Policy format error")));var se=JSON.stringify(J);J.version||(J.version="2.0");var be=H.Headers;be["Content-Type"]="application/json",be["Content-MD5"]=u.b64(u.md5(se)),He.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:H.Bucket,Region:H.Region,action:"policy",body:se,headers:be,tracker:H.tracker},function(ve,Ce){if(ve&&ve.statusCode===204)return ue(null,{statusCode:ve.statusCode});if(ve)return ue(ve);ue(null,{statusCode:Ce.statusCode,headers:Ce.headers})})}function T(H,ue){He.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"policy",rawBody:!0,tracker:H.tracker},function(J,se){if(J)return J.statusCode&&J.statusCode===403?ue(u.error(J,{ErrorStatus:"Access Denied"})):J.statusCode&&J.statusCode===405?ue(u.error(J,{ErrorStatus:"Method Not Allowed"})):J.statusCode&&J.statusCode===404?ue(u.error(J,{ErrorStatus:"Policy Not Found"})):ue(J);var be={};try{be=JSON.parse(se.body)}catch(ve){}ue(null,{Policy:be,statusCode:se.statusCode,headers:se.headers})})}function _(H,ue){He.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"policy",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode||J.statusCode,headers:se.headers})})}function B(H,ue){var J=H.Tagging||{},se=J.TagSet||J.Tags||H.Tags||[];se=u.clone(u.isArray(se)?se:[se]);var be=u.json2xml({Tagging:{TagSet:{Tag:se}}}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:be,action:"tagging",headers:ve,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function M(H,ue){He.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"tagging",tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.error&&(J.error==="Not Found"||J.error.Code==="NoSuchTagSet")){var be={Tags:[],statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}var ve=[];try{ve=se.Tagging.TagSet.Tag||[]}catch(Ce){}ve=u.clone(u.isArray(ve)?ve:[ve]),ue(null,{Tags:ve,statusCode:se.statusCode,headers:se.headers})})}function N(H,ue){He.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"tagging",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function I(H,ue){var J=H.LifecycleConfiguration||{},se=J.Rules||H.Rules||[];se=u.clone(se);var be=u.json2xml({LifecycleConfiguration:{Rule:se}}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:be,action:"lifecycle",headers:ve,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function R(H,ue){He.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"lifecycle",tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.error&&J.error.Code==="NoSuchLifecycleConfiguration"){var be={Rules:[],statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}var ve=[];try{ve=se.LifecycleConfiguration.Rule||[]}catch(Ce){}ve=u.clone(u.isArray(ve)?ve:[ve]),ue(null,{Rules:ve,statusCode:se.statusCode,headers:se.headers})})}function F(H,ue){He.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"lifecycle",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function k(H,ue){if(!H.VersioningConfiguration){ue(u.error(new Error("missing param VersioningConfiguration")));return}var J=H.VersioningConfiguration||{},se=u.json2xml({VersioningConfiguration:J}),be=H.Headers;be["Content-Type"]="application/xml",be["Content-MD5"]=u.b64(u.md5(se)),He.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:se,action:"versioning",headers:be,tracker:H.tracker},function(ve,Ce){if(ve&&ve.statusCode===204)return ue(null,{statusCode:ve.statusCode});if(ve)return ue(ve);ue(null,{statusCode:Ce.statusCode,headers:Ce.headers})})}function V(H,ue){He.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"versioning",tracker:H.tracker},function(J,se){J||!se.VersioningConfiguration&&(se.VersioningConfiguration={}),ue(J,se)})}function D(H,ue){var J=u.clone(H.ReplicationConfiguration),se=u.json2xml({ReplicationConfiguration:J});se=se.replace(/<(\/?)Rules>/gi,"<$1Rule>"),se=se.replace(/<(\/?)Tags>/gi,"<$1Tag>");var be=H.Headers;be["Content-Type"]="application/xml",be["Content-MD5"]=u.b64(u.md5(se)),He.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:se,action:"replication",headers:be,tracker:H.tracker},function(ve,Ce){if(ve&&ve.statusCode===204)return ue(null,{statusCode:ve.statusCode});if(ve)return ue(ve);ue(null,{statusCode:Ce.statusCode,headers:Ce.headers})})}function $(H,ue){He.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"replication",tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.error&&(J.error==="Not Found"||J.error.Code==="ReplicationConfigurationnotFoundError")){var be={ReplicationConfiguration:{Rules:[]},statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}!se.ReplicationConfiguration&&(se.ReplicationConfiguration={}),se.ReplicationConfiguration.Rule&&(se.ReplicationConfiguration.Rules=u.makeArray(se.ReplicationConfiguration.Rule),delete se.ReplicationConfiguration.Rule),ue(J,se)})}function O(H,ue){He.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"replication",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function q(H,ue){if(!H.WebsiteConfiguration){ue(u.error(new Error("missing param WebsiteConfiguration")));return}var J=u.clone(H.WebsiteConfiguration||{}),se=J.RoutingRules||J.RoutingRule||[];se=u.isArray(se)?se:[se],delete J.RoutingRule,delete J.RoutingRules,se.length&&(J.RoutingRules={RoutingRule:se});var be=u.json2xml({WebsiteConfiguration:J}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:be,action:"website",headers:ve,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function G(H,ue){He.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:H.Headers,action:"website",tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.error.Code==="NoSuchWebsiteConfiguration"){var be={WebsiteConfiguration:{},statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}var ve=se.WebsiteConfiguration||{};if(ve.RoutingRules){var Ce=u.clone(ve.RoutingRules.RoutingRule||[]);Ce=u.makeArray(Ce),ve.RoutingRules=Ce}ue(null,{WebsiteConfiguration:ve,statusCode:se.statusCode,headers:se.headers})})}function U(H,ue){He.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"website",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function Z(H,ue){if(!H.RefererConfiguration){ue(u.error(new Error("missing param RefererConfiguration")));return}var J=u.clone(H.RefererConfiguration||{}),se=J.DomainList||{},be=se.Domains||se.Domain||[];be=u.isArray(be)?be:[be],be.length&&(J.DomainList={Domain:be});var ve=u.json2xml({RefererConfiguration:J}),Ce=H.Headers;Ce["Content-Type"]="application/xml",Ce["Content-MD5"]=u.b64(u.md5(ve)),He.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:ve,action:"referer",headers:Ce,tracker:H.tracker},function(Le,Oe){if(Le&&Le.statusCode===204)return ue(null,{statusCode:Le.statusCode});if(Le)return ue(Le);ue(null,{statusCode:Oe.statusCode,headers:Oe.headers})})}function W(H,ue){He.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:H.Headers,action:"referer",tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.error.Code==="NoSuchRefererConfiguration"){var be={WebsiteConfiguration:{},statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}var ve=se.RefererConfiguration||{};if(ve.DomainList){var Ce=u.makeArray(ve.DomainList.Domain||[]);ve.DomainList={Domains:Ce}}ue(null,{RefererConfiguration:ve,statusCode:se.statusCode,headers:se.headers})})}function K(H,ue){var J=H.DomainConfiguration||{},se=J.DomainRule||H.DomainRule||[];se=u.clone(se);var be=u.json2xml({DomainConfiguration:{DomainRule:se}}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:be,action:"domain",headers:ve,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function ye(H,ue){He.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"domain",tracker:H.tracker},function(J,se){if(J)return ue(J);var be=[];try{be=se.DomainConfiguration.DomainRule||[]}catch(ve){}be=u.clone(u.isArray(be)?be:[be]),ue(null,{DomainRule:be,statusCode:se.statusCode,headers:se.headers})})}function ae(H,ue){He.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"domain",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function Y(H,ue){var J=H.OriginConfiguration||{},se=J.OriginRule||H.OriginRule||[];se=u.clone(se);var be=u.json2xml({OriginConfiguration:{OriginRule:se}}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:be,action:"origin",headers:ve,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function Q(H,ue){He.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"origin",tracker:H.tracker},function(J,se){if(J)return ue(J);var be=[];try{be=se.OriginConfiguration.OriginRule||[]}catch(ve){}be=u.clone(u.isArray(be)?be:[be]),ue(null,{OriginRule:be,statusCode:se.statusCode,headers:se.headers})})}function he(H,ue){He.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"origin",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function ge(H,ue){var J=u.json2xml({BucketLoggingStatus:H.BucketLoggingStatus||""}),se=H.Headers;se["Content-Type"]="application/xml",se["Content-MD5"]=u.b64(u.md5(J)),He.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:J,action:"logging",headers:se,tracker:H.tracker},function(be,ve){if(be&&be.statusCode===204)return ue(null,{statusCode:be.statusCode});if(be)return ue(be);ue(null,{statusCode:ve.statusCode,headers:ve.headers})})}function Se(H,ue){He.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"logging",tracker:H.tracker},function(J,se){if(J)return ue(J);ue(null,{BucketLoggingStatus:se.BucketLoggingStatus,statusCode:se.statusCode,headers:se.headers})})}function Ie(H,ue,J){var se=u.clone(ue.InventoryConfiguration);if(se.OptionalFields){var be=se.OptionalFields||[];se.OptionalFields={Field:be}}if(se.Destination&&se.Destination.COSBucketDestination&&se.Destination.COSBucketDestination.Encryption){var ve=se.Destination.COSBucketDestination.Encryption;Object.keys(ve).indexOf("SSECOS")>-1&&(ve["SSE-COS"]=ve.SSECOS,delete ve.SSECOS)}var Ce=u.json2xml({InventoryConfiguration:se}),Le=ue.Headers;Le["Content-Type"]="application/xml",Le["Content-MD5"]=u.b64(u.md5(Ce));var Oe=H==="PUT"?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";He.call(this,{Action:Oe,method:H,Bucket:ue.Bucket,Region:ue.Region,body:Ce,action:"inventory",qs:{id:ue.Id},headers:Le,tracker:ue.tracker},function(Ze,je){if(Ze&&Ze.statusCode===204)return J(null,{statusCode:Ze.statusCode});if(Ze)return J(Ze);J(null,{statusCode:je.statusCode,headers:je.headers})})}function Me(H,ue){return Ie.call(this,"PUT",H,ue)}function te(H,ue){return Ie.call(this,"POST",H,ue)}function oe(H,ue){He.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"inventory",qs:{id:H.Id},tracker:H.tracker},function(J,se){if(J)return ue(J);var be=se.InventoryConfiguration;if(be&&be.OptionalFields&&be.OptionalFields.Field){var ve=be.OptionalFields.Field;u.isArray(ve)||(ve=[ve]),be.OptionalFields=ve}if(be.Destination&&be.Destination.COSBucketDestination&&be.Destination.COSBucketDestination.Encryption){var Ce=be.Destination.COSBucketDestination.Encryption;Object.keys(Ce).indexOf("SSE-COS")>-1&&(Ce.SSECOS=Ce["SSE-COS"],delete Ce["SSE-COS"])}ue(null,{InventoryConfiguration:be,statusCode:se.statusCode,headers:se.headers})})}function z(H,ue){He.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"inventory",qs:{"continuation-token":H.ContinuationToken},tracker:H.tracker},function(J,se){if(J)return ue(J);var be=se.ListInventoryConfigurationResult,ve=be.InventoryConfiguration||[];ve=u.isArray(ve)?ve:[ve],delete be.InventoryConfiguration,u.each(ve,function(Ce){if(Ce&&Ce.OptionalFields&&Ce.OptionalFields.Field){var Le=Ce.OptionalFields.Field;u.isArray(Le)||(Le=[Le]),Ce.OptionalFields=Le}if(Ce.Destination&&Ce.Destination.COSBucketDestination&&Ce.Destination.COSBucketDestination.Encryption){var Oe=Ce.Destination.COSBucketDestination.Encryption;Object.keys(Oe).indexOf("SSE-COS")>-1&&(Oe.SSECOS=Oe["SSE-COS"],delete Oe["SSE-COS"])}}),be.InventoryConfigurations=ve,u.extend(be,{statusCode:se.statusCode,headers:se.headers}),ue(null,be)})}function me(H,ue){He.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"inventory",qs:{id:H.Id},tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function pe(H,ue){if(!H.AccelerateConfiguration){ue(u.error(new Error("missing param AccelerateConfiguration")));return}var J={AccelerateConfiguration:H.AccelerateConfiguration||{}},se=u.json2xml(J),be={};be["Content-Type"]="application/xml",be["Content-MD5"]=u.b64(u.md5(se)),He.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:se,action:"accelerate",headers:be,tracker:H.tracker},function(ve,Ce){if(ve)return ue(ve);ue(null,{statusCode:Ce.statusCode,headers:Ce.headers})})}function ee(H,ue){He.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:H.Bucket,Region:H.Region,action:"accelerate",tracker:H.tracker},function(J,se){J||!se.AccelerateConfiguration&&(se.AccelerateConfiguration={}),ue(J,se)})}function ne(H,ue){var J=H.ServerSideEncryptionConfiguration||{},se=J.Rule||J.Rules||[],be=u.json2xml({ServerSideEncryptionConfiguration:{Rule:se}}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:H.Bucket,Region:H.Region,body:be,action:"encryption",headers:ve,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function fe(H,ue){He.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"encryption",tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.code==="NoSuchEncryptionConfiguration"){var be={EncryptionConfiguration:{Rules:[]},statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}var ve=u.makeArray(se.EncryptionConfiguration&&se.EncryptionConfiguration.Rule||[]);se.EncryptionConfiguration={Rules:ve},ue(J,se)})}function _e(H,ue){He.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"encryption",tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function Ae(H,ue){He.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:H.Bucket,Region:H.Region,Key:H.Key,VersionId:H.VersionId,headers:H.Headers,tracker:H.tracker},function(J,se){if(J){var be=J.statusCode;return H.Headers["If-Modified-Since"]&&be&&be===304?ue(null,{NotModified:!0,statusCode:be}):ue(J)}se.ETag=u.attr(se.headers,"etag",""),ue(null,se)})}function Pe(H,ue){var J={};J.prefix=H.Prefix||"",J.delimiter=H.Delimiter,J["key-marker"]=H.KeyMarker,J["version-id-marker"]=H.VersionIdMarker,J["max-keys"]=H.MaxKeys,J["encoding-type"]=H.EncodingType,He.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:J.prefix,method:"GET",Bucket:H.Bucket,Region:H.Region,headers:H.Headers,qs:J,action:"versions",tracker:H.tracker},function(se,be){if(se)return ue(se);var ve=be.ListVersionsResult||{},Ce=ve.DeleteMarker||[];Ce=u.isArray(Ce)?Ce:[Ce];var Le=ve.Version||[];Le=u.isArray(Le)?Le:[Le];var Oe=u.clone(ve);delete Oe.DeleteMarker,delete Oe.Version,u.extend(Oe,{DeleteMarkers:Ce,Versions:Le,statusCode:be.statusCode,headers:be.headers}),ue(null,Oe)})}function Be(H,ue){if(this.options.ObjectKeySimplifyCheck){var J=u.simplifyPath(H.Key);if(J==="/"){ue(u.error(new Error("The Getobject Key is illegal")));return}}var se=H.Query||{},be=H.QueryString||"",ve=u.throttleOnProgress.call(this,0,H.onProgress),Ce=H.tracker;Ce&&Ce.setParams({signStartTime:new Date().getTime()}),se["response-content-type"]=H.ResponseContentType,se["response-content-language"]=H.ResponseContentLanguage,se["response-expires"]=H.ResponseExpires,se["response-cache-control"]=H.ResponseCacheControl,se["response-content-disposition"]=H.ResponseContentDisposition,se["response-content-encoding"]=H.ResponseContentEncoding,He.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:H.Bucket,Region:H.Region,Key:H.Key,VersionId:H.VersionId,DataType:H.DataType,headers:H.Headers,qs:se,qsStr:be,rawBody:!0,onDownloadProgress:ve,tracker:Ce},function(Le,Oe){if(ve(null,!0),Le){var Ze=Le.statusCode;return H.Headers["If-Modified-Since"]&&Ze&&Ze===304?ue(null,{NotModified:!0}):ue(Le)}ue(null,{Body:Oe.body,ETag:u.attr(Oe.headers,"etag",""),statusCode:Oe.statusCode,headers:Oe.headers})})}function Re(H,ue){var J=this,se=H.ContentLength,be=u.throttleOnProgress.call(J,se,H.onProgress),ve=H.Headers;!ve["Cache-Control"]&&!ve["cache-control"]&&(ve["Cache-Control"]=""),!ve["Content-Type"]&&!ve["content-type"]&&(ve["Content-Type"]=H.Body&&H.Body.type||"");var Ce=H.UploadAddMetaMd5||J.options.UploadAddMetaMd5||J.options.UploadCheckContentMd5,Le=H.tracker;Ce&&Le&&Le.setParams({md5StartTime:new Date().getTime()}),u.getBodyMd5(Ce,H.Body,function(Oe){Oe&&(Le&&Le.setParams({md5EndTime:new Date().getTime()}),J.options.UploadCheckContentMd5&&(ve["Content-MD5"]=u.b64(Oe)),(H.UploadAddMetaMd5||J.options.UploadAddMetaMd5)&&(ve["x-cos-meta-md5"]=Oe)),H.ContentLength!==void 0&&(ve["Content-Length"]=H.ContentLength),be(null,!0),He.call(J,{Action:"name/cos:PutObject",TaskId:H.TaskId,method:"PUT",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:H.Headers,qs:H.Query,body:H.Body,onProgress:be,tracker:Le},function(Ze,je){if(Ze)return be(null,!0),ue(Ze);be({loaded:se,total:se},!0);var ut=ke({ForcePathStyle:J.options.ForcePathStyle,protocol:J.options.Protocol,domain:J.options.Domain,bucket:H.Bucket,region:J.options.UseAccelerate?"accelerate":H.Region,object:H.Key});ut=ut.substr(ut.indexOf("://")+3),je.Location=ut,je.ETag=u.attr(je.headers,"etag",""),ue(null,je)})},H.onHashProgress)}function xe(H,ue){He.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:H.Headers,VersionId:H.VersionId,action:H.Recursive?"recursive":"",tracker:H.tracker},function(J,se){if(J){var be=J.statusCode;return be&&be===404?ue(null,{BucketNotFound:!0,statusCode:be}):ue(J)}ue(null,{statusCode:se.statusCode,headers:se.headers})})}function ce(H,ue){var J={};H.VersionId&&(J.versionId=H.VersionId),He.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:H.Headers,qs:J,action:"acl",tracker:H.tracker},function(se,be){if(se)return ue(se);var ve=be.AccessControlPolicy||{},Ce=ve.Owner||{},Le=ve.AccessControlList&&ve.AccessControlList.Grant||[];Le=u.isArray(Le)?Le:[Le];var Oe=le(ve);delete Oe.GrantWrite,be.headers&&be.headers["x-cos-acl"]&&(Oe.ACL=be.headers["x-cos-acl"]),Oe=u.extend(Oe,{Owner:Ce,Grants:Le,statusCode:be.statusCode,headers:be.headers}),ue(null,Oe)})}function Ee(H,ue){var J=H.Headers,se="";if(H.AccessControlPolicy){var be=u.clone(H.AccessControlPolicy||{}),ve=be.Grants||be.Grant;ve=u.isArray(ve)?ve:[ve],delete be.Grant,delete be.Grants,be.AccessControlList={Grant:ve},se=u.json2xml({AccessControlPolicy:be}),J["Content-Type"]="application/xml",J["Content-MD5"]=u.b64(u.md5(se))}u.each(J,function(Ce,Le){Le.indexOf("x-cos-grant-")===0&&(J[Le]=we(J[Le]))}),He.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:H.Bucket,Region:H.Region,Key:H.Key,action:"acl",headers:J,body:se,tracker:H.tracker},function(Ce,Le){if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function de(H,ue){var J=H.Headers;J.Origin=H.Origin,J["Access-Control-Request-Method"]=H.AccessControlRequestMethod,J["Access-Control-Request-Headers"]=H.AccessControlRequestHeaders,He.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:J,tracker:H.tracker},function(se,be){if(se)return se.statusCode&&se.statusCode===403?ue(null,{OptionsForbidden:!0,statusCode:se.statusCode}):ue(se);var ve=be.headers||{};ue(null,{AccessControlAllowOrigin:ve["access-control-allow-origin"],AccessControlAllowMethods:ve["access-control-allow-methods"],AccessControlAllowHeaders:ve["access-control-allow-headers"],AccessControlExposeHeaders:ve["access-control-expose-headers"],AccessControlMaxAge:ve["access-control-max-age"],statusCode:be.statusCode,headers:be.headers})})}function De(H,ue){var J=this,se=H.Headers;!se["Cache-Control"]&&!se["cache-control"]&&(se["Cache-Control"]="");var be=H.CopySource||"",ve=u.getSourceParams.call(this,be);if(!ve){ue(u.error(new Error("CopySource format error")));return}var Ce=ve.Bucket,Le=ve.Region,Oe=decodeURIComponent(ve.Key);He.call(this,{Scope:[{action:"name/cos:GetObject",bucket:Ce,region:Le,prefix:Oe},{action:"name/cos:PutObject",bucket:H.Bucket,region:H.Region,prefix:H.Key}],method:"PUT",Bucket:H.Bucket,Region:H.Region,Key:H.Key,VersionId:H.VersionId,headers:H.Headers,tracker:H.tracker},function(Ze,je){if(Ze)return ue(Ze);var ut=u.clone(je.CopyObjectResult||{}),Ge=ke({ForcePathStyle:J.options.ForcePathStyle,protocol:J.options.Protocol,domain:J.options.Domain,bucket:H.Bucket,region:H.Region,object:H.Key,isLocation:!0});u.extend(ut,{Location:Ge,statusCode:je.statusCode,headers:je.headers}),ue(null,ut)})}function Ne(H,ue){var J=H.CopySource||"",se=u.getSourceParams.call(this,J);if(!se){ue(u.error(new Error("CopySource format error")));return}var be=se.Bucket,ve=se.Region,Ce=decodeURIComponent(se.Key);He.call(this,{Scope:[{action:"name/cos:GetObject",bucket:be,region:ve,prefix:Ce},{action:"name/cos:PutObject",bucket:H.Bucket,region:H.Region,prefix:H.Key}],method:"PUT",Bucket:H.Bucket,Region:H.Region,Key:H.Key,VersionId:H.VersionId,qs:{partNumber:H.PartNumber,uploadId:H.UploadId},headers:H.Headers,tracker:H.tracker},function(Le,Oe){if(Le)return ue(Le);var Ze=u.clone(Oe.CopyPartResult||{});u.extend(Ze,{statusCode:Oe.statusCode,headers:Oe.headers}),ue(null,Ze)})}function Ue(H,ue){var J=H.Objects||[],se=H.Quiet;J=u.isArray(J)?J:[J];var be=u.json2xml({Delete:{Object:J,Quiet:se||!1}}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be));var Ce=u.map(J,function(Le){return{action:"name/cos:DeleteObject",bucket:H.Bucket,region:H.Region,prefix:Le.Key}});He.call(this,{Scope:Ce,method:"POST",Bucket:H.Bucket,Region:H.Region,body:be,action:"delete",headers:ve,tracker:H.tracker},function(Le,Oe){if(Le)return ue(Le);var Ze=Oe.DeleteResult||{},je=Ze.Deleted||[],ut=Ze.Error||[];je=u.isArray(je)?je:[je],ut=u.isArray(ut)?ut:[ut];var Ge=u.clone(Ze);u.extend(Ge,{Error:ut,Deleted:je,statusCode:Oe.statusCode,headers:Oe.headers}),ue(null,Ge)})}function Ye(H,ue){var J=H.Headers;if(!H.RestoreRequest){ue(u.error(new Error("missing param RestoreRequest")));return}var se=H.RestoreRequest||{},be=u.json2xml({RestoreRequest:se});J["Content-Type"]="application/xml",J["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:H.Bucket,Region:H.Region,Key:H.Key,VersionId:H.VersionId,body:be,action:"restore",headers:J,tracker:H.tracker},ue)}function $e(H,ue){var J=H.Tagging||{},se=J.TagSet||J.Tags||H.Tags||[];se=u.clone(u.isArray(se)?se:[se]);var be=u.json2xml({Tagging:{TagSet:{Tag:se}}}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:H.Bucket,Key:H.Key,Region:H.Region,body:be,action:"tagging",headers:ve,VersionId:H.VersionId,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);ue(null,{statusCode:Le.statusCode,headers:Le.headers})})}function Ke(H,ue){He.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:H.Key,Bucket:H.Bucket,Region:H.Region,headers:H.Headers,action:"tagging",VersionId:H.VersionId,tracker:H.tracker},function(J,se){if(J){if(J.statusCode===404&&J.error&&(J.error==="Not Found"||J.error.Code==="NoSuchTagSet")){var be={Tags:[],statusCode:J.statusCode};J.headers&&(be.headers=J.headers),ue(null,be)}else ue(J);return}var ve=[];try{ve=se.Tagging.TagSet.Tag||[]}catch(Ce){}ve=u.clone(u.isArray(ve)?ve:[ve]),ue(null,{Tags:ve,statusCode:se.statusCode,headers:se.headers})})}function Qe(H,ue){He.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:H.Headers,action:"tagging",VersionId:H.VersionId,tracker:H.tracker},function(J,se){if(J&&J.statusCode===204)return ue(null,{statusCode:J.statusCode});if(J)return ue(J);ue(null,{statusCode:se.statusCode,headers:se.headers})})}function tt(H,ue){var J=H.SelectType;if(!J)return ue(u.error(new Error("missing param SelectType")));var se=H.SelectRequest||{},be=u.json2xml({SelectRequest:se}),ve=H.Headers;ve["Content-Type"]="application/xml",ve["Content-MD5"]=u.b64(u.md5(be)),He.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:H.Bucket,Region:H.Region,Key:H.Key,headers:H.Headers,action:"select",qs:{"select-type":H.SelectType},VersionId:H.VersionId,body:be,DataType:"arraybuffer",rawBody:!0,tracker:H.tracker},function(Ce,Le){if(Ce&&Ce.statusCode===204)return ue(null,{statusCode:Ce.statusCode});if(Ce)return ue(Ce);var Oe=u.parseSelectPayload(Le.body);ue(null,{statusCode:Le.statusCode,headers:Le.headers,Body:Oe.body,Payload:Oe.payload})})}function ct(H,ue){var J=this,se=H.Headers,be=H.tracker;!se["Cache-Control"]&&!se["cache-control"]&&(se["Cache-Control"]=""),!se["Content-Type"]&&!se["content-type"]&&(se["Content-Type"]=H.Body&&H.Body.type||"");var ve=H.Body&&(H.UploadAddMetaMd5||J.options.UploadAddMetaMd5);ve&&be&&be.setParams({md5StartTime:new Date().getTime()}),u.getBodyMd5(ve,H.Body,function(Ce){Ce&&(H.Headers["x-cos-meta-md5"]=Ce),ve&&be&&be.setParams({md5EndTime:new Date().getTime()}),He.call(J,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:H.Bucket,Region:H.Region,Key:H.Key,action:"uploads",headers:H.Headers,qs:H.Query,tracker:be},function(Le,Oe){if(Le)return be&&be.parent&&be.parent.setParams({errorNode:"multipartInit"}),ue(Le);if(Oe=u.clone(Oe||{}),Oe&&Oe.InitiateMultipartUploadResult)return ue(null,u.extend(Oe.InitiateMultipartUploadResult,{statusCode:Oe.statusCode,headers:Oe.headers}));ue(null,Oe)})},H.onHashProgress)}function it(H,ue){var J=this;u.getFileSize("multipartUpload",H,function(){var se=H.tracker,be=J.options.UploadCheckContentMd5;be&&se&&se.setParams({md5StartTime:new Date().getTime()}),u.getBodyMd5(be,H.Body,function(ve){ve&&(H.Headers["Content-MD5"]=u.b64(ve)),be&&se&&se.setParams({md5EndTime:new Date().getTime()}),se&&se.setParams({partNumber:H.PartNumber}),He.call(J,{Action:"name/cos:UploadPart",TaskId:H.TaskId,method:"PUT",Bucket:H.Bucket,Region:H.Region,Key:H.Key,qs:{partNumber:H.PartNumber,uploadId:H.UploadId},headers:H.Headers,onProgress:H.onProgress,body:H.Body||null,tracker:se},function(Ce,Le){if(Ce)return se&&se.parent&&se.parent.setParams({errorNode:"multipartUpload"}),ue(Ce);ue(null,{ETag:u.attr(Le.headers,"etag",""),statusCode:Le.statusCode,headers:Le.headers})})})})}function ot(H,ue){for(var J=this,se=H.UploadId,be=H.Parts,ve=H.tracker,Ce=0,Le=be.length;Ce-1?ut(je.Authorization):"sign="+encodeURIComponent(je.Authorization)),je.SecurityToken&&(Ge+="&x-cos-security-token="+je.SecurityToken),je.ClientIP&&(Ge+="&clientIP="+je.ClientIP),je.ClientUA&&(Ge+="&clientUA="+je.ClientUA),je.Token&&(Ge+="&token="+je.Token),ve&&(Ge+="&"+ve),setTimeout(function(){ue(null,{Url:Ge})})}});return Oe?(Ce+="?"+Oe.Authorization+(Oe.SecurityToken?"&x-cos-security-token="+Oe.SecurityToken:""),ve&&(Ce+="&"+ve)):ve&&(Ce+="?"+ve),Ce}function le(H){var ue={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},J={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},se=H&&H.AccessControlList||{},be=se.Grant;be&&(be=u.isArray(be)?be:[be]);var ve={READ:0,WRITE:0,FULL_CONTROL:0};return be&&be.length&&u.each(be,function(Ce){Ce.Grantee.ID==="qcs::cam::anyone:anyone"||Ce.Grantee.URI==="http://cam.qcloud.com/groups/global/AllUsers"?ve[Ce.Permission]=1:Ce.Grantee.ID!==H.Owner.ID&&ue[J[Ce.Permission]].push('id="'+Ce.Grantee.ID+'"')}),ve.FULL_CONTROL||ve.WRITE&&ve.READ?ue.ACL="public-read-write":ve.READ?ue.ACL="public-read":ue.ACL="private",u.each(J,function(Ce){ue[Ce]=we(ue[Ce].join(","))}),ue}function we(H){var ue=H.split(","),J={},se,be;for(se=0;se"u"?"undefined":a(location))==="object"&&location.protocol==="http:"?"http:":"https:");ve||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(ue)>-1?ve="{Region}.myqcloud.com":ve="cos.{Region}.myqcloud.com",H.ForcePathStyle||(ve="{Bucket}."+ve)),ve=ve.replace(/\{\{AppId\}\}/gi,be).replace(/\{\{Bucket\}\}/gi,se).replace(/\{\{Region\}\}/gi,ue).replace(/\{\{.*?\}\}/gi,""),ve=ve.replace(/\{AppId\}/gi,be).replace(/\{BucketName\}/gi,se).replace(/\{Bucket\}/gi,J).replace(/\{Region\}/gi,ue).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(ve)||(ve=Le+"//"+ve),ve.slice(-1)==="/"&&(ve=ve.slice(0,-1));var Oe=ve;return H.ForcePathStyle&&(Oe+="/"+J),Oe+="/",Ce&&(Oe+=u.camSafeUrlEncode(Ce).replace(/%2F/g,"/")),H.isLocation&&(Oe=Oe.replace(/^https?:\/\//,"")),Oe}var Ve=function(ue){if(!ue.Bucket||!ue.Region)return"";var J=ue.UseAccelerate===void 0?this.options.UseAccelerate:ue.UseAccelerate,se=ue.Url||ke({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:ue.Bucket,region:J?"accelerate":ue.Region}),be=se.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return be};function We(H,ue){var J=u.clone(H.Headers),se="";u.each(J,function(st,et){(st===""||["content-type","cache-control","expires"].indexOf(et.toLowerCase())>-1)&&delete J[et],et.toLowerCase()==="host"&&(se=st)});var be=H.ForceSignHost!==!1;!se&&H.SignHost&&be&&(J.Host=H.SignHost);var ve=!1,Ce=function(et,Xe){ve||(ve=!0,Xe&&Xe.XCosSecurityToken&&!Xe.SecurityToken&&(Xe=u.clone(Xe),Xe.SecurityToken=Xe.XCosSecurityToken,delete Xe.XCosSecurityToken),ue&&ue(et,Xe))},Le=this,Oe=H.Bucket||"",Ze=H.Region||"",je=H.Key||"";Le.options.ForcePathStyle&&Oe&&(je=Oe+"/"+je);var ut="/"+je,Ge={},dt=H.Scope;if(!dt){var vt=H.Action||"",It=H.ResourceKey||H.Key||"";dt=H.Scope||[{action:vt,bucket:Oe,region:Ze,prefix:It}]}var Bt=u.md5(JSON.stringify(dt));Le._StsCache=Le._StsCache||[],function(){var st,et;for(st=Le._StsCache.length-1;st>=0;st--){et=Le._StsCache[st];var Xe=Math.round(u.getSkewTime(Le.options.SystemClockOffset)/1e3)+30;if(et.StartTime&&Xe=et.ExpiredTime){Le._StsCache.splice(st,1);continue}if(!et.ScopeLimit||et.ScopeLimit&&et.ScopeKey===Bt){Ge=et;break}}}();var pt=function(){var et="";Ge.StartTime&&H.Expires?et=Ge.StartTime+";"+(Ge.StartTime+H.Expires*1):Ge.StartTime&&Ge.ExpiredTime&&(et=Ge.StartTime+";"+Ge.ExpiredTime);var Xe=u.getAuth({SecretId:Ge.TmpSecretId,SecretKey:Ge.TmpSecretKey,Method:H.Method,Pathname:ut,Query:H.Query,Headers:J,Expires:H.Expires,UseRawKey:Le.options.UseRawKey,SystemClockOffset:Le.options.SystemClockOffset,KeyTime:et,ForceSignHost:be}),ft={Authorization:Xe,SecurityToken:Ge.SecurityToken||Ge.XCosSecurityToken||"",Token:Ge.Token||"",ClientIP:Ge.ClientIP||"",ClientUA:Ge.ClientUA||"",SignFrom:"client"};Ce(null,ft)},gt=function(et){if(et.Authorization){var Xe=!1,ft=et.Authorization;if(ft)if(ft.indexOf(" ")>-1)Xe=!1;else if(ft.indexOf("q-sign-algorithm=")>-1&&ft.indexOf("q-ak=")>-1&&ft.indexOf("q-sign-time=")>-1&&ft.indexOf("q-key-time=")>-1&&ft.indexOf("q-url-param-list=")>-1)Xe=!0;else try{ft=atob(ft),ft.indexOf("a=")>-1&&ft.indexOf("k=")>-1&&ft.indexOf("t=")>-1&&ft.indexOf("r=")>-1&&ft.indexOf("b=")>-1&&(Xe=!0)}catch(Lt){}if(!Xe)return u.error(new Error("getAuthorization callback params format error"))}else{if(!et.TmpSecretId)return u.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!et.TmpSecretKey)return u.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!et.SecurityToken&&!et.XCosSecurityToken)return u.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!et.ExpiredTime)return u.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(et.ExpiredTime&&et.ExpiredTime.toString().length!==10)return u.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(et.StartTime&&et.StartTime.toString().length!==10)return u.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(Ge.ExpiredTime&&Ge.ExpiredTime-u.getSkewTime(Le.options.SystemClockOffset)/1e3>60)pt();else if(Le.options.getAuthorization)Le.options.getAuthorization.call(Le,{Bucket:Oe,Region:Ze,Method:H.Method,Key:je,Pathname:ut,Query:H.Query,Headers:J,Scope:dt,SystemClockOffset:Le.options.SystemClockOffset,ForceSignHost:be},function(st){typeof st=="string"&&(st={Authorization:st});var et=gt(st);if(et)return Ce(et);st.Authorization?Ce(null,st):(Ge=st||{},Ge.Scope=dt,Ge.ScopeKey=Bt,Le._StsCache.push(Ge),pt())});else if(Le.options.getSTS)Le.options.getSTS.call(Le,{Bucket:Oe,Region:Ze},function(st){Ge=st||{},Ge.Scope=dt,Ge.ScopeKey=Bt,Ge.TmpSecretId||(Ge.TmpSecretId=Ge.SecretId),Ge.TmpSecretKey||(Ge.TmpSecretKey=Ge.SecretKey);var et=gt(Ge);if(et)return Ce(et);Le._StsCache.push(Ge),pt()});else return function(){var st=u.getAuth({SecretId:H.SecretId||Le.options.SecretId,SecretKey:H.SecretKey||Le.options.SecretKey,Method:H.Method,Pathname:ut,Query:H.Query,Headers:J,Expires:H.Expires,UseRawKey:Le.options.UseRawKey,SystemClockOffset:Le.options.SystemClockOffset,ForceSignHost:be}),et={Authorization:st,SecurityToken:Le.options.SecurityToken||Le.options.XCosSecurityToken,SignFrom:"client"};return Ce(null,et),et}();return""}function rt(H){var ue=this,J=!1,se=!1,be=!1,ve=H.headers&&(H.headers.date||H.headers.Date)||H.error&&H.error.ServerTime;try{var Ce=H.error.Code,Le=H.error.Message;(Ce==="RequestTimeTooSkewed"||Ce==="AccessDenied"&&Le==="Request has expired")&&(se=!0)}catch(Ze){}if(H)if(se&&ve){var Oe=Date.parse(ve);this.options.CorrectClockSkew&&Math.abs(u.getSkewTime(this.options.SystemClockOffset)-Oe)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=Oe-Date.now(),J=!0)}else Math.floor(H.statusCode/100)===5?J=!0:H.message==="CORS blocked or network error"&&(be=!0,J=ue.options.AutoSwitchHost);return{canRetry:J,networkError:be}}function mt(H){var ue=H.requestUrl,J=H.clientCalcSign,se=H.networkError;if(!this.options.AutoSwitchHost||!ue||!J||!se)return!1;var be=/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/,ve=/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/,Ce=be.test(ue)&&!ve.test(ue);return Ce}function He(H,ue){var J=this;!H.headers&&(H.headers={}),!H.qs&&(H.qs={}),H.VersionId&&(H.qs.versionId=H.VersionId),H.qs=u.clearKey(H.qs),H.headers&&(H.headers=u.clearKey(H.headers)),H.qs&&(H.qs=u.clearKey(H.qs));var se=u.clone(H.qs);H.action&&(se[H.action]="");var be=H.url||H.Url,ve=H.SignHost||Ve.call(this,{Bucket:H.Bucket,Region:H.Region,Url:be}),Ce=H.tracker,Le=function Oe(Ze){var je=J.options.SystemClockOffset;Ce&&Ce.setParams({signStartTime:new Date().getTime(),httpRetryTimes:Ze-1}),H.SwitchHost&&(ve=ve.replace(/myqcloud.com/,"tencentcos.cn")),We.call(J,{Bucket:H.Bucket||"",Region:H.Region||"",Method:H.method,Key:H.Key,Query:se,Headers:H.headers,SignHost:ve,Action:H.Action,ResourceKey:H.ResourceKey,Scope:H.Scope,ForceSignHost:J.options.ForceSignHost,SwitchHost:H.SwitchHost},function(ut,Ge){if(ut){ue(ut);return}Ce&&Ce.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),H.AuthData=Ge,Et.call(J,H,function(dt,vt){Ce&&Ce.setParams({httpEndTime:new Date().getTime()});var It=!1,Bt=!1;if(dt){var pt=rt.call(J,dt);It=pt.canRetry||je!==J.options.SystemClockOffset,Bt=pt.networkError}if(dt&&Ze<2&&It){H.headers&&(delete H.headers.Authorization,delete H.headers.token,delete H.headers.clientIP,delete H.headers.clientUA,H.headers["x-cos-security-token"]&&delete H.headers["x-cos-security-token"],H.headers["x-ci-security-token"]&&delete H.headers["x-ci-security-token"]);var gt=mt.call(J,{requestUrl:(dt==null?void 0:dt.url)||"",clientCalcSign:Ge.SignFrom==="client",networkError:Bt});H.SwitchHost=gt,Oe(Ze+1)}else ue(dt,vt)})})};Le(1)}function Et(H,ue){var J=this,se=H.TaskId;if(!(se&&!J._isRunningTask(se))){var be=H.Bucket,ve=H.Region,Ce=H.Key,Le=H.method||"GET",Oe=H.Url||H.url,Ze=H.body,je=H.rawBody;J.options.UseAccelerate&&(ve="accelerate"),Oe=Oe||ke({ForcePathStyle:J.options.ForcePathStyle,protocol:J.options.Protocol,domain:J.options.Domain,bucket:be,region:ve,object:Ce}),H.SwitchHost&&(Oe=Oe.replace(/myqcloud.com/,"tencentcos.cn"));var ut=Ce?Oe:"";H.action&&(Oe=Oe+"?"+(u.isIOS_QQ?"".concat(H.action,"="):H.action)),H.qsStr&&(Oe.indexOf("?")>-1?Oe=Oe+"&"+H.qsStr:Oe=Oe+"?"+H.qsStr);var Ge={method:Le,url:Oe,headers:H.headers,qs:H.qs,body:Ze},dt="x-cos-security-token";if(u.isCIHost(Oe)&&(dt="x-ci-security-token"),Ge.headers.Authorization=H.AuthData.Authorization,H.AuthData.Token&&(Ge.headers.token=H.AuthData.Token),H.AuthData.ClientIP&&(Ge.headers.clientIP=H.AuthData.ClientIP),H.AuthData.ClientUA&&(Ge.headers.clientUA=H.AuthData.ClientUA),H.AuthData.SecurityToken&&(Ge.headers[dt]=H.AuthData.SecurityToken),Ge.headers&&(Ge.headers=u.clearKey(Ge.headers)),Ge=u.clearKey(Ge),H.onProgress&&typeof H.onProgress=="function"){var vt=Ze&&(Ze.size||Ze.length)||0;Ge.onProgress=function(Xe){if(!(se&&!J._isRunningTask(se))){var ft=Xe?Xe.loaded:0;H.onProgress({loaded:ft,total:vt})}}}H.onDownloadProgress&&(Ge.onDownloadProgress=H.onDownloadProgress),H.DataType&&(Ge.dataType=H.DataType),this.options.Timeout&&(Ge.timeout=this.options.Timeout),J.options.ForcePathStyle&&(Ge.pathStyle=J.options.ForcePathStyle),J.emit("before-send",Ge);var It=Ge.url.includes("accelerate."),Bt=Ge.qs?Object.keys(Ge.qs).map(function(Xe){return"".concat(Xe,"=").concat(Ge.qs[Xe])}).join("&"):"",pt=Bt?Ge.url+"?"+Bt:Ge.url;if(H.tracker){var gt;H.tracker.setParams({url:pt,httpMethod:Ge.method,accelerate:It,httpSize:((gt=Ge.body)===null||gt===void 0?void 0:gt.size)||0}),H.tracker.parent&&!H.tracker.parent.params.url&&H.tracker.parent.setParams({url:ut,accelerate:It})}var st=(J.options.Request||l)(Ge,function(Xe){if(!(Xe&&Xe.error==="abort")){var ft={options:Ge,error:Xe&&Xe.error,statusCode:Xe&&Xe.statusCode||0,statusMessage:Xe&&Xe.statusMessage||"",headers:Xe&&Xe.headers||{},body:Xe&&Xe.body};J.emit("after-receive",ft);var Lt=ft.error,kt=ft.body,Tt={statusCode:ft.statusCode,statusMessage:ft.statusMessage,headers:ft.headers},Wt,Ot=function(zt,Ht){if(se&&J.off("inner-kill-task",et),!Wt){Wt=!0;var Gt={};Tt&&Tt.statusCode&&(Gt.statusCode=Tt.statusCode),Tt&&Tt.headers&&(Gt.headers=Tt.headers),zt?(Ge.url&&(Gt.url=Ge.url),Ge.method&&(Gt.method=Ge.method),zt=u.extend(zt||{},Gt),ue(zt,null)):(Ht=u.extend(Ht||{},Gt),ue(null,Ht)),st=null}};if(Lt)return Ot(u.error(Lt));var Ut=Tt.statusCode,ri=Math.floor(Ut/100)===2;if(je){if(ri)return Ot(null,{body:kt});if(kt instanceof Blob){u.readAsBinaryString(kt,function(ni){var zt=u.parseResBody(ni),Ht=zt.Error||zt;return Ot(u.error(new Error(Ht.Message||"response body error"),{code:Ht.Code,error:Ht}))});return}}var ii=u.parseResBody(kt),Zt=ii.Error||ii;ri?Ot(null,ii):Zt?Ot(u.error(new Error(Zt.Message),{code:Zt.Code,error:Zt})):Ut?Ot(u.error(new Error(Tt.statusMessage),{code:""+Ut})):Ut&&Ot(u.error(new Error("statusCode error")))}}),et=function Xe(ft){ft.TaskId===se&&(st&&st.abort&&st.abort(),J.off("inner-kill-task",Xe))};se&&J.on("inner-kill-task",et)}}var Ct={getService:c,putBucket:d,headBucket:g,getBucket:m,deleteBucket:y,putBucketAcl:b,getBucketAcl:S,putBucketCors:A,getBucketCors:E,deleteBucketCors:x,getBucketLocation:P,getBucketPolicy:T,putBucketPolicy:C,deleteBucketPolicy:_,putBucketTagging:B,getBucketTagging:M,deleteBucketTagging:N,putBucketLifecycle:I,getBucketLifecycle:R,deleteBucketLifecycle:F,putBucketVersioning:k,getBucketVersioning:V,putBucketReplication:D,getBucketReplication:$,deleteBucketReplication:O,putBucketWebsite:q,getBucketWebsite:G,deleteBucketWebsite:U,putBucketReferer:Z,getBucketReferer:W,putBucketDomain:K,getBucketDomain:ye,deleteBucketDomain:ae,putBucketOrigin:Y,getBucketOrigin:Q,deleteBucketOrigin:he,putBucketLogging:ge,getBucketLogging:Se,putBucketInventory:Me,postBucketInventory:te,getBucketInventory:oe,listBucketInventory:z,deleteBucketInventory:me,putBucketAccelerate:pe,getBucketAccelerate:ee,putBucketEncryption:ne,getBucketEncryption:fe,deleteBucketEncryption:_e,getObject:Be,headObject:Ae,listObjectVersions:Pe,putObject:Re,deleteObject:xe,getObjectAcl:ce,putObjectAcl:Ee,optionsObject:de,putObjectCopy:De,deleteMultipleObject:Ue,restoreObject:Ye,putObjectTagging:$e,getObjectTagging:Ke,deleteObjectTagging:Qe,selectObjectContent:tt,appendObject:lt,uploadPartCopy:Ne,multipartInit:ct,multipartUpload:it,multipartComplete:ot,multipartList:bt,multipartListPart:nt,multipartAbort:ht,request:ze,getObjectUrl:ie,getAuth:At};function wt(H,ue,J){u.each(["Cors","Acl"],function(se){if(H.slice(-se.length)===se){var be=H.slice(0,-se.length)+se.toUpperCase(),ve=u.apiWrapper(H,ue),Ce=!1;J[be]=function(){!Ce&&console.warn("warning: cos."+be+" has been deprecated. Please Use cos."+H+" instead."),Ce=!0,ve.apply(this,arguments)}}})}r.exports.init=function(H,ue){ue.transferToTaskMethod(Ct,"putObject"),u.each(Ct,function(J,se){H.prototype[se]=u.apiWrapper(se,J),wt(se,J,H.prototype)})}},"./src/cos.js":function(r,s,o){var a=o("./src/util.js"),l=o("./src/event.js"),u=o("./src/task.js"),c=o("./src/base.js"),d=o("./src/advance.js"),g=o("./package.json"),m={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1024*1024,SliceSize:1024*1024,CopyChunkParallelLimit:20,CopyChunkSize:1024*1024*10,CopySliceSize:1024*1024*10,MaxPartNumber:1e4,ProgressInterval:1e3,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,UseRawKey:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadQueueSize:1e4,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,AutoSwitchHost:!0,CopySourceParser:null,ObjectKeySimplifyCheck:!0,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},y=function(S){if(this.options=a.extend(a.clone(m),S||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1024*1024,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1024*1024,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,this.options.AppId&&console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'),this.options.SecretId&&this.options.SecretId.indexOf(" ")>-1&&(console.error("error: SecretId格式错误,请检查"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey格式错误,请检查"),console.error("error: SecretKey format is incorrect. Please check")),a.isNode()&&(console.log("Tip: Next.js、Nuxt.js 等服务端渲染技术可正常使用JavaScript SDK,请忽略下方 nodejs 环境警告"),console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: https://cloud.tencent.com/document/product/436/8629"),console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")),this.options.ForcePathStyle)throw console.warn("cos-js-sdk-v5不再支持使用path-style,仅支持使用virtual-hosted-style,参考文档:https://cloud.tencent.com/document/product/436/96243"),new Error("ForcePathStyle is not supported");l.init(this),u.init(this)};c.init(y,u),d.init(y,u),y.util={md5:a.md5,xml2json:a.xml2json,json2xml:a.json2xml,encodeBase64:a.encodeBase64},y.getAuthorization=a.getAuth,y.version=g.version,r.exports=y},"./src/event.js":function(r,s){var o=function(u){var c={},d=function(m){return!c[m]&&(c[m]=[]),c[m]};u.on=function(g,m){g==="task-list-update"&&console.warn('warning: Event "'+g+'" has been deprecated. Please use "list-update" instead.'),d(g).push(m)},u.off=function(g,m){for(var y=d(g),b=y.length-1;b>=0;b--)m===y[b]&&y.splice(b,1)},u.emit=function(g,m){for(var y=d(g).map(function(S){return S}),b=0;b=0;P--){var C=c[P][2];(!C||C+u=0;C--){var T=c[C];T[0]===E&&T[1]===x&&c.splice(C,1)}c.unshift([E,x,Math.round(Date.now()/1e3)]),c.length>P&&c.splice(P),b()}},removeUploadId:function(E){y.call(this),delete S.using[E];for(var x=c.length-1;x>=0;x--)c[x][1]===E&&c.splice(x,1);b()}};r.exports=S},"./src/task.js":function(r,s,o){var a=o("./src/session.js"),l=o("./src/util.js"),u={},c=function(m,y){u[y]=m[y],m[y]=function(b,S){b.SkipTask?u[y].call(this,b,S):this._addTask(y,b,S)}},d=function(m){var y=[],b={},S=0,A=0,E=function(M){var N={id:M.id,Bucket:M.Bucket,Region:M.Region,Key:M.Key,FilePath:M.FilePath,state:M.state,loaded:M.loaded,size:M.size,speed:M.speed,percent:M.percent,hashPercent:M.hashPercent,error:M.error};return M.FilePath&&(N.FilePath=M.FilePath),M._custom&&(N._custom=M._custom),N},x=function(){var B,M=function(){B=0,m.emit("task-list-update",{list:l.map(y,E)}),m.emit("list-update",{list:l.map(y,E)})};return function(){B||(B=setTimeout(M))}}(),P=function(){if(!(y.length<=m.options.UploadQueueSize)){for(var M=0;Mm.options.UploadQueueSize;){var N=y[M].state==="waiting"||y[M].state==="checking"||y[M].state==="uploading";!y[M]||!N?(b[y[M].id]&&delete b[y[M].id],y.splice(M,1),A--):M++}x()}},C=function B(){if(!(S>=m.options.FileParallelLimit)){for(;y[A]&&y[A].state!=="waiting";)A++;if(!(A>=y.length)){var M=y[A];A++,S++,M.state="checking",M.params.onTaskStart&&M.params.onTaskStart(E(M)),!M.params.UploadData&&(M.params.UploadData={});var N=l.formatParams(M.api,M.params);u[M.api].call(m,N,function(I,R){m._isRunningTask(M.id)&&((M.state==="checking"||M.state==="uploading")&&(M.state=I?"error":"success",I&&(M.error=I),S--,x(),B(),M.callback&&M.callback(I,R),M.state==="success"&&(M.params&&(delete M.params.UploadData,delete M.params.Body,delete M.params),delete M.callback)),P())}),x(),setTimeout(B)}}},T=function(M,N){var I=b[M];if(I){var R=I&&I.state==="waiting",F=I&&(I.state==="checking"||I.state==="uploading");if(N==="canceled"&&I.state!=="canceled"||N==="paused"&&R||N==="paused"&&F){I.state=N,m.emit("inner-kill-task",{TaskId:M,toState:N});try{var k=I&&I.params&&I.params.UploadData.UploadId}catch(V){}N==="canceled"&&k&&a.removeUsing(k),x(),F&&(S--,C()),N==="canceled"&&(I.params&&(delete I.params.UploadData,delete I.params.Body,delete I.params),delete I.callback)}P()}};m._addTasks=function(B){l.each(B,function(M){m._addTask(M.api,M.params,M.callback,!0)}),x()};var _=!0;m._addTask=function(B,M,N,I){M=l.formatParams(B,M);var R=l.uuid();M.TaskId=R,M.onTaskReady&&M.onTaskReady(R),M.TaskReady&&(M.TaskReady(R),_&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),_=!1);var F={params:M,callback:N,api:B,index:y.length,id:R,Bucket:M.Bucket,Region:M.Region,Key:M.Key,FilePath:M.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:M._custom},k=M.onHashProgress;M.onHashProgress=function(D){m._isRunningTask(F.id)&&(F.hashPercent=D.percent,k&&k(D),x())};var V=M.onProgress;return M.onProgress=function(D){m._isRunningTask(F.id)&&(F.state==="checking"&&(F.state="uploading"),F.loaded=D.loaded,F.speed=D.speed,F.percent=D.percent,V&&V(D),x())},l.getFileSize(B,M,function(D,$){if(D)return N(l.error(D));b[R]=F,y.push(F),F.size=$,!I&&x(),C(),P()}),R},m._isRunningTask=function(B){var M=b[B];return!!(M&&(M.state==="checking"||M.state==="uploading"))},m.getTaskList=function(){return l.map(y,E)},m.cancelTask=function(B){T(B,"canceled")},m.pauseTask=function(B){T(B,"paused")},m.restartTask=function(B){var M=b[B];M&&(M.state==="paused"||M.state==="error")&&(M.state="waiting",x(),A=Math.min(A,M.index),C())},m.isUploadRunning=function(){return S||A"u"?"undefined":u(navigator))==="object"){var N=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(N==null?void 0:N.type)||(N==null?void 0:N.effectiveType)||"unknown"}return"unknown"},getProtocol:function(){return(typeof location>"u"?"undefined":u(location))==="object"?location.protocol.replace(/:/,""):"unknown protocol"},getOsType:function(){if((typeof navigator>"u"?"undefined":u(navigator))!=="object")return"unknown os";var N=navigator.userAgent.toLowerCase(),I=/macintosh|mac os x/i.test(navigator.userAgent);return N.indexOf("win32")>=0||N.indexOf("wow32")>=0?"win32":N.indexOf("win64")>=0||N.indexOf("wow64")>=0?"win64":I?"mac":"unknown os"},isMobile:function(){var N=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;return!!((typeof navigator>"u"?"undefined":u(navigator))==="object"&&navigator.userAgent.match(N))},isAndroid:function(){var N=/(Android|Adr|Linux)/i;return!!((typeof navigator>"u"?"undefined":u(navigator))==="object"&&navigator.userAgent.match(N))},isIOS:function(){var N=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator>"u"?"undefined":u(navigator))==="object"&&navigator.userAgent.match(N))},isOtherMobile:function(){return b&&!isAndroid&&!isIOS},getUA:function(){if((typeof navigator>"u"?"undefined":u(navigator))!=="object")return"unknown device";var N=navigator.userAgent;return N}},b=y.isMobile(),S=y.isAndroid()?"android":y.isIOS?"ios":"other_mobile",A=y.getOsType(),E=b?S:A,x=y.getUA(),P=y.getProtocol(),C=function(N){return["putObject","sliceUploadFile","uploadFile","uploadFiles"].includes(N)?"UploadTask":N==="getObject"?"DownloadTask":["putObjectCopy","sliceCopyFile"].includes(N)?"CopyTask":N};function T(M){return M.replace(/([A-Z])/g,"_$1").toLowerCase()}function _(M){var N={},I=["sdkVersionName","sdkVersionCode","osName","networkType","requestName","requestResult","bucket","region","appid","accelerate","url","host","requestPath","userAgent","networkProtocol","httpMethod","httpSize","httpSpeed","httpTookTime","httpMd5","httpSign","httpFullTime","httpDomain","partNumber","httpRetryTimes","customId","traceId","realApi"],R=[].concat(I,["errorNode","errorCode","errorName","errorMessage","errorRequestId","errorHttpCode","errorServiceName","errorType","fullError"]),F=M.requestResult==="Success"?I:R;for(var k in M)if(F.includes(k)){var V=T(k);N[V]=M[k]}return N.request_name=M.realApi?C(M.realApi):M.requestName,N}var B=function(){function M(N){a(this,M);var I=N.parent,R=N.traceId,F=N.bucket,k=N.region,V=N.apiName,D=N.realApi,$=N.httpMethod,O=N.fileKey,q=N.fileSize,G=N.accelerate,U=N.customId,Z=N.delay,W=N.deepTracker,K=N.Beacon,ye=N.clsReporter,ae=F&&F.substr(F.lastIndexOf("-")+1)||"";this.parent=I,this.deepTracker=W,this.delay=Z,ye&&!this.clsReporter&&(this.clsReporter=ye),this.params={sdkVersionName:"cos-js-sdk-v5",sdkVersionCode:c.version,osName:E,networkType:"",requestName:V||"",requestResult:"",realApi:D,bucket:F,region:k,accelerate:G,httpMethod:$,url:"",host:"",httpDomain:"",requestPath:O||"",userAgent:x,networkProtocol:P,errorType:"",errorCode:"",errorName:"",errorMessage:"",errorRequestId:"",errorHttpCode:0,errorServiceName:"",errorNode:"",httpTookTime:0,httpSize:q||0,httpMd5:0,httpSign:0,httpFullTime:0,httpSpeed:0,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0,traceId:R||y.getUid(),appid:ae,partNumber:0,httpRetryTimes:0,customId:U||"",partTime:0},K&&(this.beacon=g(K,Z))}return l(M,[{key:"formatResult",value:function(I,R){var F,k,V,D,$,O,q=new Date().getTime(),G=y.getNetType(),U=I?(I==null?void 0:I.code)||(I==null||(F=I.error)===null||F===void 0?void 0:F.code)||(I==null||(k=I.error)===null||k===void 0?void 0:k.Code):"",Z=I?(I==null?void 0:I.message)||(I==null||(V=I.error)===null||V===void 0?void 0:V.message)||(I==null||(D=I.error)===null||D===void 0?void 0:D.Message):"",W=Z,K=I?(I==null?void 0:I.resource)||(I==null||($=I.error)===null||$===void 0?void 0:$.resource)||(I==null||(O=I.error)===null||O===void 0?void 0:O.Resource):"",ye=I?I==null?void 0:I.statusCode:R.statusCode,ae=I?(I==null?void 0:I.headers)&&(I==null?void 0:I.headers["x-cos-request-id"]):(R==null?void 0:R.headers)&&(R==null?void 0:R.headers["x-cos-request-id"]),Y=I?ae?"Server":"Client":"";this.params.requestName==="getObject"&&(this.params.httpSize=R?R.headers&&R.headers["content-length"]:0);var Q=this.params.realApi==="sliceUploadFile",he=this.params.realApi==="sliceCopyFile";if(Q||he){var ge=this.params.httpSize/1024/this.params.partTime;Object.assign(this.params,{httpSpeed:ge<0?0:ge.toFixed(3)})}else{var Se=q-this.params.startTime,Ie=this.params.httpEndTime-this.params.httpStartTime,Me=this.params.httpSize/1024/(Ie/1e3),te=this.params.md5EndTime-this.params.md5StartTime,oe=this.params.signEndTime-this.params.signStartTime;this.parent&&(this.parent.addParamValue("httpTookTime",m(Ie)),this.parent.addParamValue("httpFullTime",m(Se)),this.parent.addParamValue("httpMd5",m(te)),this.parent.addParamValue("httpSign",m(oe)),["multipartUpload","uploadPartCopy","putObjectCopy"].includes(this.params.requestName)&&this.parent.addParamValue("partTime",m(Ie))),Object.assign(this.params,{httpFullTime:m(Se),httpMd5:m(te),httpSign:m(oe),httpTookTime:m(Ie),httpSpeed:Me<0?0:Me.toFixed(3)})}if(Object.assign(this.params,{networkType:G,requestResult:I?"Failure":"Success",errorType:Y,errorCode:U,errorHttpCode:ye,errorName:W,errorMessage:Z,errorServiceName:K,errorRequestId:ae}),I&&(!U||!Z)&&(this.params.fullError=I?JSON.stringify(I):""),this.params.url){try{var z=/^http(s)?:\/\/(.*?)\//.exec(this.params.url);this.params.host=z[2]}catch(me){this.params.host=this.params.url}this.params.httpDomain=this.params.host}}},{key:"report",value:function(I,R){if(!(!this.beacon&&!this.clsReporter)){this.formatResult(I,R);var F=_(this.params);this.beacon&&this.sendEventsToBeacon(F),this.clsReporter&&this.sendEventsToCLS(F)}}},{key:"setParams",value:function(I){Object.assign(this.params,I)}},{key:"addParamValue",value:function(I,R){this.params[I]=(+this.params[I]+ +R).toFixed(3)}},{key:"sendEventsToBeacon",value:function(I){var R=this.params.requestName==="sliceUploadFile"||this.params.realApi==="sliceUploadFile";if(!(R&&!this.deepTracker)){var F="qcloud_track_cos_sdk";this.delay===0?this.beacon&&this.beacon.onDirectUserAction(F,I):this.beacon&&this.beacon.onUserAction(F,I)}}},{key:"sendEventsToCLS",value:function(I){var R=this.delay===0;this.clsReporter.log(I,R)}},{key:"generateSubTracker",value:function(I){return Object.assign(I,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,accelerate:this.params.accelerate,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay,clsReporter:this.clsReporter}),new M(I)}}]),M}();r.exports=B},"./src/util.js":function(r,s,o){(function(a){var l=o("./node_modules/@babel/runtime/helpers/typeof.js");function u(xe,ce){var Ee=typeof Symbol<"u"&&xe[Symbol.iterator]||xe["@@iterator"];if(!Ee){if(Array.isArray(xe)||(Ee=c(xe))||ce&&xe&&typeof xe.length=="number"){Ee&&(xe=Ee);var de=0,De=function(){};return{s:De,n:function(){return de>=xe.length?{done:!0}:{done:!1,value:xe[de++]}},e:function(Ke){throw Ke},f:De}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ne=!0,Ue=!1,Ye;return{s:function(){Ee=Ee.call(xe)},n:function(){var Ke=Ee.next();return Ne=Ke.done,Ke},e:function(Ke){Ue=!0,Ye=Ke},f:function(){try{!Ne&&Ee.return!=null&&Ee.return()}finally{if(Ue)throw Ye}}}}function c(xe,ce){if(xe){if(typeof xe=="string")return d(xe,ce);var Ee=Object.prototype.toString.call(xe).slice(8,-1);if(Ee==="Object"&&xe.constructor&&(Ee=xe.constructor.name),Ee==="Map"||Ee==="Set")return Array.from(xe);if(Ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ee))return d(xe,ce)}}function d(xe,ce){(ce==null||ce>xe.length)&&(ce=xe.length);for(var Ee=0,de=new Array(ce);EeNe?1:-1})}var P=function(ce,Ee){var de,De,Ne,Ue=[],Ye=x(ce);for(de=0;de-1||C.indexOf(De)>-1)&&(Ee[de]=ce[de])}return Ee},_=function(ce){ce=ce||{};var Ee=ce.SecretId,de=ce.SecretKey,De=ce.KeyTime,Ne=(ce.method||ce.Method||"get").toLowerCase(),Ue=G(ce.Query||ce.params||{}),Ye=T(G(ce.Headers||ce.headers||{})),$e=ce.Key||"",Ke;ce.UseRawKey?Ke=ce.Pathname||ce.pathname||"/"+$e:(Ke=ce.Pathname||ce.pathname||$e,Ke.indexOf("/")!==0&&(Ke="/"+Ke));var Qe=ce.ForceSignHost!==!1;if(!Ye.Host&&!Ye.host&&ce.Bucket&&ce.Region&&Qe&&(Ye.Host=ce.Bucket+".cos."+ce.Region+".myqcloud.com"),!Ee)throw new Error("missing param SecretId");if(!de)throw new Error("missing param SecretKey");var tt=Math.round(z(ce.SystemClockOffset)/1e3)-1,ct=tt,it=ce.Expires||ce.expires;it===void 0?ct+=900:ct+=it*1||0;var ot="sha1",bt=Ee,nt=De||tt+";"+ct,ht=De||tt+";"+ct,ze=x(Ye,!0).join(";").toLowerCase(),lt=x(Ue,!0).join(";").toLowerCase(),At=m.HmacSHA1(ht,de).toString(),ie=[Ne,Ke,Re.obj2str(Ue,!0),Re.obj2str(Ye,!0),""].join(` `),le=["sha1",nt,m.SHA1(ie).toString(),""].join(` `),we=m.HmacSHA1(le,At).toString(),ke=["q-sign-algorithm="+ot,"q-ak="+bt,"q-sign-time="+nt,"q-key-time="+ht,"q-header-list="+ze,"q-url-param-list="+lt,"q-signature="+we].join("&");return ke},B=function(ce,Ee,de){var De=Ee/8,Ne=ce.slice(de,de+De);return new Uint8Array(Ne).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[Ee](Ne)[0]},M=function(ce,Ee,de,De){var Ne=ce.slice(Ee,de),Ue="";return new Uint8Array(Ne).forEach(function(Ye){Ue+=String.fromCharCode(Ye)}),De&&(Ue=decodeURIComponent(escape(Ue))),Ue},N=function(ce){for(var Ee={},de=M(ce),De={records:[]};ce.byteLength;){var Ne=B(ce,32,0),Ue=B(ce,32,4),Ye=Ne-Ue-16,$e=0,Ke;for(ce=ce.slice(12);$eparseInt(De[Ne])?1:-1;return 0},ce=function(de){if(!de)return!1;var De=(de.match(/Chrome\/([.\d]+)/)||[])[1],Ne=(de.match(/QBCore\/([.\d]+)/)||[])[1],Ue=(de.match(/QQBrowser\/([.\d]+)/)||[])[1],Ye=De&&xe(De,"53.0.2785.116")<0&&Ne&&xe(Ne,"3.53.991.400")<0&&Ue&&xe(Ue,"9.0.2524.400")<=0||!1;return Ye};return ce(typeof navigator<"u"&&navigator.userAgent)}(),D=function(ce,Ee,de,De,Ne){var Ue;if(ce.slice?Ue=ce.slice(Ee,de):ce.mozSlice?Ue=ce.mozSlice(Ee,de):ce.webkitSlice&&(Ue=ce.webkitSlice(Ee,de)),De&&V){var Ye=new FileReader;Ye.onload=function($e){Ue=null,Ne(new Blob([Ye.result]))},Ye.readAsArrayBuffer(Ue)}else Ne(Ue)},$=function(ce,Ee,de,De){de=de||R,ce?typeof Ee=="string"?de(Re.md5(Ee,!0)):Blob&&Ee instanceof Blob?Re.getFileMd5(Ee,function(Ne,Ue){de(Ue)},De):de():de()},O=1024*1024,q=function(ce,Ee,de){var De=ce.size,Ne=0,Ue=g.getCtx(),Ye=function $e(Ke){if(Ke>=De){var Qe=Ue.digest("hex");Ee(null,Qe);return}var tt=Math.min(De,Ke+O);Re.fileSlice(ce,Ke,tt,!1,function(ct){k(ct,function(it){ct=null,Ue=Ue.update(it,!0),Ne+=it.length,it=null,de&&de({loaded:Ne,total:De,percent:Math.round(Ne/De*1e4)/1e4}),$e(Ke+O)})})};Ye(0)};function G(xe){return Y(xe,function(ce){return l(ce)==="object"&&ce!==null?G(ce):ce})}function U(xe,ce,Ee){return xe&&ce in xe?xe[ce]:Ee}function Z(xe,ce){return ae(ce,function(Ee,de){xe[de]=ce[de]}),xe}function W(xe){return xe instanceof Array}function K(xe,ce){for(var Ee=!1,de=0;de-1,$e=!Ue||typeof Ue=="string"&&Ue.indexOf("{Region}")>-1;if(ce.indexOf("Bucket")>-1||ce==="deleteMultipleObject"||ce==="multipartList"||ce==="listObjectVersions"){if(Ye&&!de)return"Bucket";if($e&&!De)return"Region"}else if(ce.indexOf("Object")>-1||ce.indexOf("multipart")>-1||ce==="sliceUploadFile"||ce==="abortUploadTask"||ce==="uploadFile"){if(Ye&&!de)return"Bucket";if($e&&!De)return"Region";if(!Ne)return"Key"}return!1},Ie=function(ce,Ee){if(Ee=Z({},Ee),ce!=="getAuth"&&ce!=="getV4Auth"&&ce!=="getObjectUrl"){var de=Ee.Headers||{};if(Ee&&l(Ee)==="object"){(function(){for(var Ne in Ee)Ee.hasOwnProperty(Ne)&&Ne.indexOf("x-cos-")>-1&&(de[Ne]=Ee[Ne])})();var De={"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext","Pic-Operations":"PicOperations"};Re.each(De,function(Ne,Ue){Ee[Ne]!==void 0&&(de[Ue]=Ee[Ne])}),Ee.Headers=F(de)}}return Ee},Me=function(ce,Ee){return function(de,De){var Ne=this;typeof de=="function"&&(De=de,de={}),de=Ie(ce,de);var Ue;if(Ne.options.EnableReporter)if(de.calledBySdk==="sliceUploadFile"||de.calledBySdk==="sliceCopyFile")Ue=de.tracker&&de.tracker.generateSubTracker({apiName:ce});else if(["uploadFile","uploadFiles"].includes(ce))Ue=null;else{var Ye=0;de.Body&&(Ye=typeof de.Body=="string"?de.Body.length:de.Body.size||de.Body.byteLength||0);var $e=Ne.options.UseAccelerate||typeof Ne.options.Domain=="string"&&Ne.options.Domain.includes("accelerate.");Ue=new A({Beacon:Ne.options.BeaconReporter,clsReporter:Ne.options.ClsReporter,bucket:de.Bucket,region:de.Region,apiName:ce,realApi:ce,accelerate:$e,fileKey:de.Key,fileSize:Ye,deepTracker:Ne.options.DeepTracker,customId:Ne.options.CustomId,delay:Ne.options.TrackerDelay})}de.tracker=Ue;var Ke=function(nt){return nt&&nt.headers&&(nt.headers["x-cos-request-id"]&&(nt.RequestId=nt.headers["x-cos-request-id"]),nt.headers["x-ci-request-id"]&&(nt.RequestId=nt.headers["x-ci-request-id"]),nt.headers["x-cos-version-id"]&&(nt.VersionId=nt.headers["x-cos-version-id"]),nt.headers["x-cos-delete-marker"]&&(nt.DeleteMarker=nt.headers["x-cos-delete-marker"])),nt},Qe=function(nt,ht){Ue&&Ue.report(nt,ht),De&&De(Ke(nt),Ke(ht))},tt=function(){if(ce!=="getService"&&ce!=="abortUploadTask"){var nt=Se.call(Ne,ce,de);if(nt)return"missing param "+nt;if(de.Region){if(Ne.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(de.Region))return"Region format error."}else{if(de.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(de.Region))return"Region format error."}!Ne.options.CompatibilityMode&&de.Region.indexOf("-")===-1&&de.Region!=="yfb"&&de.Region!=="default"&&de.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(de.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(de.Bucket))if(de.AppId)de.Bucket=de.Bucket+"-"+de.AppId;else if(Ne.options.AppId)de.Bucket=de.Bucket+"-"+Ne.options.AppId;else return'Bucket should format as "test-1250000000".';de.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete de.AppId)}!Ne.options.UseRawKey&&de.Key&&de.Key.substr(0,1)==="/"&&(de.Key=de.Key.substr(1))}},ct=tt(),it=["getAuth","getObjectUrl"].includes(ce);if(typeof Promise=="function"&&!it&&!De)return new Promise(function(bt,nt){if(De=function(ze,lt){ze?nt(ze):bt(lt)},ct)return Qe(Re.error(new Error(ct)));Ee.call(Ne,de,Qe)});if(ct)return Qe(Re.error(new Error(ct)));var ot=Ee.call(Ne,de,Qe);if(it)return ot}},te=function(ce,Ee){var de=this,De=0,Ne=0,Ue=Date.now(),Ye,$e;function Ke(){if($e=0,Ee&&typeof Ee=="function"){Ye=Date.now();var Qe=Math.max(0,Math.round((Ne-De)/((Ye-Ue)/1e3)*100)/100)||0,tt;Ne===0&&ce===0?tt=1:tt=Math.floor(Ne/ce*100)/100||0,Ue=Ye,De=Ne;try{Ee({loaded:Ne,total:ce,speed:Qe,percent:tt})}catch(ct){}}}return function(Qe,tt){if(Qe&&(Ne=Qe.loaded,ce=Qe.total),tt)clearTimeout($e),Ke();else{if($e)return;$e=setTimeout(Ke,de.options.ProgressInterval)}}},oe=function(ce,Ee,de){var De;if(typeof Ee.Body=="string"?Ee.Body=new Blob([Ee.Body],{type:"text/plain"}):Ee.Body instanceof ArrayBuffer&&(Ee.Body=new Blob([Ee.Body])),Ee.Body&&(Ee.Body instanceof Blob||Ee.Body.toString()==="[object File]"||Ee.Body.toString()==="[object Blob]"))De=Ee.Body.size;else{de(Re.error(new Error("params body format error, Only allow File|Blob|String.")));return}Ee.ContentLength=De,de(null,De)},z=function(ce){return Date.now()+(ce||0)},me=function(ce,Ee){var de=ce;return ce.message=ce.message||null,typeof Ee=="string"?(ce.error=Ee,ce.message=Ee):l(Ee)==="object"&&Ee!==null&&(Z(ce,Ee),(Ee.code||Ee.name)&&(ce.code=Ee.code||Ee.name),Ee.message&&(ce.message=Ee.message),Ee.stack&&(ce.stack=Ee.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(ce,"name",{writable:!0,enumerable:!1}),Object.defineProperty(ce,"message",{enumerable:!0})),ce.name=Ee&&Ee.name||ce.name||ce.code||"Error",ce.code||(ce.code=ce.name),ce.error||(ce.error=G(de)),ce},pe=function(){return(typeof globalThis>"u"?"undefined":l(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},ee=function(){return(typeof window>"u"?"undefined":l(window))!=="object"&&(typeof a>"u"?"undefined":l(a))==="object"&&!0&&!pe()},ne=function(ce){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(ce)},fe=function(){if((typeof navigator>"u"?"undefined":l(navigator))!=="object")return!1;var xe=navigator.userAgent,ce=!!xe.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return ce}(),_e=function(){return(typeof navigator>"u"?"undefined":l(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),Ae=function(ce,Ee){var de=S.encode(ce);return Ee&&(de=de.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),de},Pe=function(ce){var Ee=ce.split("/"),de=[],De=u(Ee),Ne;try{for(De.s();!(Ne=De.n()).done;){var Ue=Ne.value;Ue===".."?de.length&&de.pop():Ue.length&&Ue!=="."&&de.push(Ue)}}catch(Ye){De.e(Ye)}finally{De.f()}return"/"+de.join("/")},Be=function(ce){var Ee;if(ce&&typeof ce=="string"){var de=ce.trim(),De=de.indexOf("<")===0,Ne=de.indexOf("{")===0;if(De)Ee=Re.xml2json(ce)||{};else if(Ne)try{var Ue=ce.replace(/\n/g," "),Ye=JSON.parse(Ue);Object.prototype.toString.call(Ye)==="[object Object]"?Ee=Ye:Ee=ce}catch($e){Ee=ce}else Ee=ce}else Ee=ce||{};return Ee},Re={noop:R,formatParams:Ie,apiWrapper:Me,xml2json:y,json2xml:b,md5:g,clearKey:F,fileSlice:D,getBodyMd5:$,getFileMd5:q,b64:he,extend:Z,isArray:W,isInArray:K,makeArray:ye,each:ae,map:Y,filter:Q,clone:G,attr:U,uuid:ge,camSafeUrlEncode:E,throttleOnProgress:te,getFileSize:oe,getSkewTime:z,error:me,obj2str:P,getAuth:_,parseSelectPayload:N,getSourceParams:I,isBrowser:!0,isNode:ee,isCIHost:ne,isIOS_QQ:fe&&_e,encodeBase64:Ae,simplifyPath:Pe,readAsBinaryString:k,parseResBody:Be};r.exports=Re}).call(this,o("./node_modules/process/browser.js"))}})})})(cosJsSdkV5);const COS=getDefaultExportFromCjs(cosJsSdkV5Exports),tencentBucket="daya-online-1303457149",ossType="tencent";async function fileUpload(i,e){const{data:r}=await getUploadSign(i);return await onOnlyFileUpload(r.signature,{fileName:i,file:e})}const getUploadSign=async i=>{const e="yjl/"+i;return request.post("/open/getUploadSign",{data:{postData:{key:e},pluginName:ossType,bucketName:tencentBucket,filename:e},requestType:"json",params:{pluginName:ossType}})},onOnlyFileUpload=async(i,e)=>{let r="",s=null;if(await new COS({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(a,l)=>{l({Authorization:i})}}).uploadFile({Bucket:tencentBucket,Region:"ap-nanjing",Key:`yjl/${e.fileName}`,Body:e.file,SliceSize:1024*1024*500,onProgress:function(a){}}).then(a=>{var l;((l=a.Location)==null?void 0:l.indexOf("http"))>=0?r=a.Location:r="https://"+a.Location}).catch(a=>{s=a}),r)return r;throw new Error(s)},Recommendation=defineComponent({name:"recommendation",emits:["close"],setup(i,{emit:e}){const r=ref([]),s=reactive({message:"",suggestId:""}),o=ref([]),a=async()=>{try{const y=(await getSuggestionList({rows:9999,page:1,useClient:"SMART_PRACTICE"})).data.rows||[];r.value=y.map(b=>({text:b.name,value:b.id}))}catch(m){}},l=async()=>{var m;if(!s.message||!s.suggestId){const y=s.suggestId?"请先填写意见反馈":"请先选择反馈类型";showToast({message:y,position:"top"});return}try{const y=o.value.reduce((b,S)=>(S.url&&b.push(S.url),b),[]);await sysSuggestionAdd({content:s.message,type:"SMART_PRACTICE",suggestionTypeId:s.suggestId,mobileNo:(m=storeData.user)==null?void 0:m.phone,attachmentUrls:y.join(",")}),showToast({message:"意见反馈已提交",position:"top"}),e("close"),s.suggestId="",s.message="",o.value=[]}catch(y){}},u=computed(()=>r.value.find(y=>y.value===s.suggestId)),c=m=>{let y=[];Array.isArray(m)?y=m.map(b=>(b.status="uploading",b.message="上传中...",b.key=new Date().getTime()+b.file.name,b)):(m.status="uploading",m.message="上传中...",m.key=new Date().getTime()+m.file.name,y.push(m)),y.map(async b=>{try{const S=await fileUpload(b.key,b.file);b.status="",b.url=S}catch(S){b.status="failed",b.message="上传失败"}})},d=5,g=()=>{showToast(`文件大小不能超过 ${d}M`)};return onMounted(()=>{a()}),()=>createVNode("div",{class:[styles$9.recommendation]},[createVNode("div",{class:styles$9.head},[createVNode("img",{class:styles$9.headTit,src:headImg("recommendationName.png")},null),createVNode("img",{class:styles$9.closeImg,src:headImg("closeImg.png"),onClick:()=>{e("close")}},null)]),createVNode("div",{class:styles$9.content},[createVNode("div",{class:styles$9.conBox},[createVNode(DropdownMenu,{class:[styles$9.dropdownMenu,u.value&&styles$9.currItem],overlay:!1},{default:()=>[createVNode(DropdownItem,{class:["recommendationDropdownItem"],title:u.value?u.value.name:"请选择反馈类型",modelValue:s.suggestId,"onUpdate:modelValue":m=>s.suggestId=m,options:r.value},null)]}),createVNode(Field,{class:styles$9.field,modelValue:s.message,"onUpdate:modelValue":m=>s.message=m,border:!1,type:"textarea",maxlength:200,placeholder:"请详细描述您遇到的问题,以便我们尽快为您解决"},null),createVNode(Uploader,{accept:".jpg,jpeg,.png",class:styles$9.uploader,"max-size":d*1024*1024,onOversize:g,modelValue:o.value,"onUpdate:modelValue":m=>o.value=m,"after-read":c,multiple:!0,"max-count":4},{default:()=>[createVNode("div",{class:styles$9.uploaderbox},[createVNode("img",{class:styles$9.img,src:headImg("photo.png")},null),createVNode("div",null,[createTextVNode("上传图片")])])]}),createVNode("div",{class:styles$9.btnCon},[createVNode("img",{class:styles$9.img,src:headImg("qx.png"),onClick:()=>{e("close")}},null),createVNode("img",{class:styles$9.img,src:headImg("tj.png"),onClick:l},null)])])])])}}),Settting=defineComponent({name:"settting",setup(){const i=reactive({screenModelShow:!1,recommendationShow:!1}),e=s=>{const o=state$1.baseFrequency-10,a=state$1.baseFrequency+10;let l=state$1.setting.frequency;if(s===1){if(l-1a)return showToast({message:`最高标准音高${a}HZ`});l=l+1}state$1.setting.frequency=l>=0?l:0},r=s=>s=String(Math.min(3e3,s));return()=>createVNode("div",{class:styles$a.settting},[createVNode("div",{class:styles$a.head},[createVNode("img",{class:styles$a.headTit,src:headImg("settingName.png")},null),createVNode("img",{class:styles$a.closeImg,src:headImg("closeImg.png"),onClick:()=>{headTopData.settingMode=!1}},null)]),createVNode("div",{class:styles$a.content},[createVNode("div",{class:styles$a.conBox},[createVNode("div",{class:styles$a.cellBox},[createVNode("div",{class:styles$a.tit},[createTextVNode("指法")]),createVNode(Switch$1,{modelValue:state$1.setting.displayFingering,"onUpdate:modelValue":s=>state$1.setting.displayFingering=s},null)]),createVNode("div",{class:styles$a.cellBox},[createVNode("div",{class:styles$a.tit},[createTextVNode("循环播放")]),createVNode(Switch$1,{modelValue:state$1.setting.repeatAutoPlay,"onUpdate:modelValue":s=>state$1.setting.repeatAutoPlay=s},null)]),createVNode("div",{class:styles$a.cellBox},[createVNode("div",{class:styles$a.tit},[createTextVNode("旋律线")]),createVNode(Switch$1,{modelValue:smoothAnimationState.isShow.value,"onUpdate:modelValue":s=>smoothAnimationState.isShow.value=s},null)]),createVNode("div",{class:styles$a.cellBox},[createVNode("div",{class:styles$a.tit},[createTextVNode("标准音高")]),createVNode("div",{class:styles$a.frequency},[createVNode("img",{src:headImg("cutImg.png"),class:[styles$a.btn],onClick:()=>e(1)},null),createVNode("div",{class:styles$a.frequencyNum},[state$1.setting.frequency,createTextVNode("HZ")]),createVNode("img",{src:headImg("addImg.png"),class:[styles$a.btn],onClick:()=>e(2)},null)])]),createVNode("div",{class:styles$a.cellBox},[createVNode("div",{class:styles$a.tit},[createTextVNode("反应时间")]),createVNode("div",{class:styles$a.reactionTimeBox},[createVNode(Field,{class:styles$a.reactionTime,type:"digit",placeholder:"最大可输入3000毫秒",formatter:r,"input-align":"center",modelValue:state$1.setting.reactionTimeMs,"onUpdate:modelValue":s=>state$1.setting.reactionTimeMs=s},null),createVNode("div",{class:styles$a.timeName},[createTextVNode("毫秒")])])]),createVNode("div",{class:styles$a.cellBox},[createVNode("div",{class:styles$a.tit},[createTextVNode("切换谱面")]),createVNode("div",{class:styles$a.radioBox},[[{name:"单行谱",value:!0},{name:"多行谱",value:!1}].map(s=>createVNode("div",{class:state$1.isSingleLine===s.value&&styles$a.active,onClick:()=>{state$1.isSingleLine=s.value}},[s.name]))])]),createVNode("div",{class:styles$a.cellBox},[createVNode("div",{class:styles$a.tit},[createTextVNode("转谱")]),createVNode("div",{class:styles$a.radioBox},[[{name:"五线谱",value:"staff"},{name:"首调",value:"firstTone"},{name:"固定谱",value:"fixedTone"}].map(s=>createVNode("div",{class:state$1.musicRenderType===s.value&&styles$a.active,onClick:()=>{state$1.musicRenderType=s.value}},[s.name]))])]),createVNode("div",{class:styles$a.cellBtnBox},[createVNode("img",{src:headImg("tpbz.png")},null),createVNode("img",{src:headImg("yjfk.png"),onClick:()=>i.recommendationShow=!0},null)])])]),createVNode(Popup,{show:i.recommendationShow,"onUpdate:show":s=>i.recommendationShow=s,class:"popup-custom van-scale center-closeBtn recommenBoxClass_drag",transition:"van-scale",teleport:"body","overlay-style":{background:"rgba(0, 0, 0, 0.3)"}},{default:()=>[createVNode(Recommendation,{onClose:()=>{i.recommendationShow=!1}},null)]})])}});function autoCorrelate(i,e){for(var r=i.length,s=0,o=0;od[m+1];)m++;for(var y=-1,b=-1,o=m;oy&&(y=d[o],b=o);var S=b,A=d[S-1],E=d[S],x=d[S+1];let P=(A+x-2*E)/2,C=(x-A)/2;return P&&(S=S-C/(2*P)),e/S}const audioRecorder={audioContext:null,mediaRecorder:null,recordeState:!1,progress:i=>{},init(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)},toggleRecord(i){return new Promise((e,r)=>{i?navigator.mediaDevices.getUserMedia({audio:!0}).then(s=>{audioRecorder.mediaRecorder=s.getAudioTracks()[0],audioRecorder.recordeState=!0;const o=this.audioContext.createMediaStreamSource(s),a=this.audioContext.createAnalyser();a.fftSize=2048,o.connect(a);var l=new Float32Array(a.fftSize);const u=this.audioContext.sampleRate;function c(){if(!audioRecorder.recordeState)return;a.getFloatTimeDomainData(l);const d=autoCorrelate(l,u);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 r={audio:!0};navigator.mediaDevices.getUserMedia(r).then(s=>{i(!0),console.log("授权成功!")},()=>{i(!1),console.error("授权失败!")})}else i(!1),console.error("浏览器不支持 getUserMedia")})}},query$3=getQuery(),followData=reactive({list:[],index:0,start:!1,rendered:!1,earphone:!1}),handleRecord=i=>{if(query$3.isCbs)return;i<0&&(i=0);const e=i/1e3,r={clientType:storeData.user.clientType,musicSheetId:state$1.examSongId,sysMusicScoreId:state$1.examSongId,feature:"FOLLOW_UP_TRAINING",practiceSource:"FOLLOW_UP_TRAINING",playTime:e,deviceType:browser().android?"ANDROID":"IOS",behaviorId:getBehaviorId()};api_musicPracticeRecordSave(r)},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(i||api_cloudToggleFollow(i?"start":"end"),i)followTime.value=Date.now();else{const e=Date.now()-followTime.value;followTime.value!==0&&e>0&&(handleRecord(e),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 r=document.getElementById(`vf-${i.id}`);r&&r.classList.remove("follow-up","follow-down")})},handleFollowStart=async()=>{var e;const i=await api_cloudToggleFollow("start");if(!((e=i==null?void 0:i.content)!=null&&e.reson)){if(followData.start=!0,!await handleStartTick())return followData.start=!1,!1;onClear(),followData.start=!0,followData.index=0,followData.list=[],resetPlaybackToStart(),openToggleRecord(!0),getNoteIndex();const s=getDuration(state$1.osmd);metronomeData.totalNumerator=s.numerator||2,metronomeData.followAudioIndex=1,state$1.beatStartTime=0,followBeatPaly()}},handleFollowEnd=()=>{onClear(),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 r;const e=(r=i==null?void 0:i.content)==null?void 0:r.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.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,r=!1)=>{const s=document.querySelector(`div[data-vf=vf${i.id}]`);s&&(s.classList.remove("follow-up","follow-down","follow-error","follow-success"),r?s.classList.add("follow-success"):s.classList.add("follow-error",e));const o=document.getElementById(`vf-${i.id}`);o&&(o.classList.remove("follow-up","follow-down"),e&&o.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)}}),guidePopup="_guidePopup_x5pic_1",tipsContainer="_tipsContainer_x5pic_14",backBtn="_backBtn_x5pic_20",right$1="_right_x5pic_36",content$2="_content_x5pic_44",box$1="_box_x5pic_49",item$1="_item_x5pic_55",img="_img_x5pic_59",iconHead="_iconHead_x5pic_63",head2="_head2_x5pic_69",btns$1="_btns_x5pic_73",btn$1="_btn_x5pic_73",endBtn="_endBtn_x5pic_84",studentbtn="_studentbtn_x5pic_87",teacherBtn="_teacherBtn_x5pic_98",nextBtn="_nextBtn_x5pic_130",studentNext="_studentNext_x5pic_145",myscale="_myscale_x5pic_1",styles$8={guidePopup,tipsContainer,backBtn,right:right$1,content:content$2,box:box$1,item:item$1,img,iconHead,head2,btns:btns$1,btn:btn$1,endBtn,studentbtn,teacherBtn,nextBtn,studentNext,myscale},__vite_glob_0_0=""+new URL("../png/aiTeacher1-906c9519.png",import.meta.url).href,__vite_glob_0_1=""+new URL("../png/aiTeacher2-398558c8.png",import.meta.url).href,__vite_glob_0_2=""+new URL("../png/aiTeacher3-4ce7d3e9.png",import.meta.url).href,__vite_glob_0_3=""+new URL("../png/aiTeacher4-a64809b7.png",import.meta.url).href,__vite_glob_0_4=""+new URL("../png/endBtn-fbbc61e9.png",import.meta.url).href,__vite_glob_0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FJk8Fof2ABYD1D41ccn/MfUf029l7iZQK8EZG9preb0VSu6/2R47KPAw8AjESHDVC3b/wGTrTjxyhLnnAAAAABJRU5ErkJggg==",__vite_glob_0_7=""+new URL("../png/endBtn-fbbc61e9.png",import.meta.url).href,__vite_glob_0_8=""+new URL("../png/pc_teacherBottom1-7d7c0406.png",import.meta.url).href,__vite_glob_0_9=""+new URL("../png/pc_teacherBottom2-1041fb46.png",import.meta.url).href,__vite_glob_0_10=""+new URL("../png/pc_teacherBottom3-9e8e8dfa.png",import.meta.url).href,__vite_glob_0_11=""+new URL("../png/pc_teacherBottom4-06ba0f51.png",import.meta.url).href,__vite_glob_0_12=""+new URL("../png/pc_teacherBottom5-d02e3c8f.png",import.meta.url).href,__vite_glob_0_13=""+new URL("../png/pc_teacherBottom6-bc1100b9.png",import.meta.url).href,__vite_glob_0_14=""+new URL("../png/studentB1-cada9dc3.png",import.meta.url).href,__vite_glob_0_15=""+new URL("../png/studentB2-22f8c5b1.png",import.meta.url).href,__vite_glob_0_16=""+new URL("../png/studentB3-63e84adf.png",import.meta.url).href,__vite_glob_0_17=""+new URL("../png/studentBtn-cc71146a.png",import.meta.url).href,__vite_glob_0_18=""+new URL("../png/studnetT1-6bad1a7e.png",import.meta.url).href,__vite_glob_0_19=""+new URL("../png/studnetT2-a1c68390.png",import.meta.url).href,__vite_glob_0_20=""+new URL("../png/studnetT3-aea2d51e.png",import.meta.url).href,__vite_glob_0_21=""+new URL("../png/studnetT4-e9bcb3f4.png",import.meta.url).href,__vite_glob_0_22=""+new URL("../png/studnetT5-d98576d3.png",import.meta.url).href,__vite_glob_0_23=""+new URL("../png/studnetT6-e26e655b.png",import.meta.url).href,__vite_glob_0_24=""+new URL("../png/studnetT7-85b09492.png",import.meta.url).href,__vite_glob_0_25=""+new URL("../png/studnetT8-f4dec487.png",import.meta.url).href,__vite_glob_0_26=""+new URL("../png/teacherTop1-fac539f2.png",import.meta.url).href,__vite_glob_0_27=""+new URL("../png/teacherTop2-7139ad50.png",import.meta.url).href,__vite_glob_0_28=""+new URL("../png/teacherTop3-d5b41852.png",import.meta.url).href,__vite_glob_0_29=""+new URL("../png/teacherTop4-6b47a5e7.png",import.meta.url).href,__vite_glob_0_30=""+new URL("../png/teacherTop5-ce3e332a.png",import.meta.url).href,__vite_glob_0_31=""+new URL("../png/teacherTop6-7e748eed.png",import.meta.url).href,modules=Object.assign({"./aiTeacher1.png":__vite_glob_0_0,"./aiTeacher2.png":__vite_glob_0_1,"./aiTeacher3.png":__vite_glob_0_2,"./aiTeacher4.png":__vite_glob_0_3,"./endBtn.png":__vite_glob_0_4,"./indexDot.png":__vite_glob_0_5,"./nextBtn.png":__vite_glob_0_6,"./numbrBtn.png":__vite_glob_0_7,"./pc_teacherBottom1.png":__vite_glob_0_8,"./pc_teacherBottom2.png":__vite_glob_0_9,"./pc_teacherBottom3.png":__vite_glob_0_10,"./pc_teacherBottom4.png":__vite_glob_0_11,"./pc_teacherBottom5.png":__vite_glob_0_12,"./pc_teacherBottom6.png":__vite_glob_0_13,"./studentB1.png":__vite_glob_0_14,"./studentB2.png":__vite_glob_0_15,"./studentB3.png":__vite_glob_0_16,"./studentBtn.png":__vite_glob_0_17,"./studnetT1.png":__vite_glob_0_18,"./studnetT2.png":__vite_glob_0_19,"./studnetT3.png":__vite_glob_0_20,"./studnetT4.png":__vite_glob_0_21,"./studnetT5.png":__vite_glob_0_22,"./studnetT6.png":__vite_glob_0_23,"./studnetT7.png":__vite_glob_0_24,"./studnetT8.png":__vite_glob_0_25,"./teacherTop1.png":__vite_glob_0_26,"./teacherTop2.png":__vite_glob_0_27,"./teacherTop3.png":__vite_glob_0_28,"./teacherTop4.png":__vite_glob_0_29,"./teacherTop5.png":__vite_glob_0_30,"./teacherTop6.png":__vite_glob_0_31}),getImage=i=>modules[`./${i}`]||"",query$2=getQuery(),setGuidance=i=>query$2.isCbs?{}:request.post("/functionGuidance/save",{data:i,requestType:"json"}),getGuidance=i=>storeData.platformApi=="/cbs-app"?{data:null}:request.get("/functionGuidance/queryTagDetail",{data:i,params:i}),TeacherTop=defineComponent({name:"teacherTop-guide",emits:["close"],setup(i,{emit:e}){const r=reactive({box:{},show:!1,steps:state$1.platform===IPlatform.PC?[{ele:"",eleRect:{},img:getImage("pc_teacherBottom1.png"),handStyle:{top:"0.91rem"},imgStyle:{bottom:"2.5rem",width:"3.63rem",height:"2.28rem",left:"-0.45rem"},btnsStyle:{bottom:"2.72rem",left:"1.1rem",transform:"scale(.83)"}},{ele:"",img:getImage("pc_teacherBottom2.png"),handStyle:{top:"-1.39rem",left:"0.15rem",transform:"rotate(180deg)"},imgStyle:{bottom:"2.5rem",width:"4.20rem",height:"2.28rem",left:"-0.45rem"},btnsStyle:{bottom:"2.72rem",left:"1.1rem",transform:"scale(.83)"}},{ele:"",img:getImage("pc_teacherBottom3.png"),handStyle:{top:"-1.39rem",left:"0.17rem",transform:"rotate(180deg)"},imgStyle:{bottom:"2.5rem",width:"5.15rem",height:"2.28rem",left:"-0.45rem"},btnsStyle:{bottom:"2.72rem",left:"1.1rem",transform:"scale(.83)"}},{ele:"",img:getImage("pc_teacherBottom4.png"),handStyle:{top:"-1.39rem",left:"1.4rem",transform:"rotate(180deg)"},imgStyle:{bottom:"2.5rem",width:"4.39rem",height:"2.28rem",left:"-0.45rem"},btnsStyle:{bottom:"2.72rem",left:"1.1rem",transform:"scale(.83)"}},{ele:"",img:getImage("pc_teacherBottom5.png"),handStyle:{top:"-1.39rem",left:"1.4rem",transform:"rotate(180deg)"},imgStyle:{bottom:"2.5rem",width:"4.58rem",height:"2.28rem",left:"-0.45rem"},btnsStyle:{bottom:"2.72rem",left:"1.1rem",transform:"scale(.83)"}},{ele:"",img:getImage("pc_teacherBottom6.png"),handStyle:{top:"-1.39rem",left:"1.4rem",transform:"rotate(180deg)"},imgStyle:{bottom:"2.5rem",width:"4.01rem",height:"2.28rem",left:"-3.4rem"},btnsStyle:{bottom:"2.72rem",left:"-2.1rem",transform:"scale(.83)"}}]:[{ele:"",eleRect:{},img:getImage("teacherTop1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:"1.32rem",width:"3.63rem",height:"2.28rem",left:"-2rem"},btnsStyle:{top:"2.8rem",left:"-0.5rem",transform:"scale(.83)"}},{ele:"",img:getImage("teacherTop2.png"),handStyle:{top:"-1.39rem",left:"0.15rem",transform:"rotate(180deg)"},imgStyle:{top:"1.32rem",width:"4.20rem",height:"2.28rem",left:"-2rem"},btnsStyle:{top:"2.8rem",left:"-0.5rem",transform:"scale(.83)"}},{ele:"",img:getImage("teacherTop3.png"),handStyle:{top:"-1.39rem",left:"0.17rem",transform:"rotate(180deg)"},imgStyle:{top:"1.32rem",width:"5.15rem",height:"2.28rem",left:"-2rem"},btnsStyle:{top:"2.8rem",left:"-0.5rem",transform:"scale(.83)"}},{ele:"",img:getImage("teacherTop4.png"),handStyle:{top:"-1.39rem",left:"1.4rem",transform:"rotate(180deg)"},imgStyle:{top:"1.32rem",width:"4.39rem",height:"2.28rem",left:"-2rem"},btnsStyle:{top:"2.8rem",left:"-0.5rem",transform:"scale(.83)"}},{ele:"",img:getImage("teacherTop5.png"),handStyle:{top:"-1.39rem",left:"1.4rem",transform:"rotate(180deg)"},imgStyle:{top:"1.32rem",width:"4.58rem",height:"2.28rem",left:"-2rem"},btnsStyle:{top:"2.8rem",left:"-0.5rem",transform:"scale(.83)"}},{ele:"",img:getImage("teacherTop6.png"),handStyle:{top:"-1.39rem",left:"1.4rem",transform:"rotate(180deg)"},imgStyle:{top:"1.32rem",width:"4.01rem",height:"2.28rem",left:"-3.4rem"},btnsStyle:{top:"2.8rem",left:"-2.1rem",transform:"scale(.83)"}}],step:0}),s=ref(!1);getQuery();const o=ref({});(async()=>{var d;try{if(state$1.guideInfo)o.value=state$1.guideInfo;else{const g=await getGuidance({guideTag:"guideInfo"});g.data?o.value=JSON.parse((d=g.data)==null?void 0:d.guideValue)||null:o.value={}}o.value&&o.value.teacherTop?s.value=!1:s.value=!0}catch(g){console.log(g)}})();const l=()=>{console.log(`teacherTop${r.step}`);const d=document.getElementById(`teacherTop-${r.step}`);if(d){if(d.style.display==="none"){u();return}const g=d.getBoundingClientRect();r.box={left:g.x+"px",top:g.y+"px",width:g.width+"px",height:g.height+"px"}}};onMounted(()=>{setTimeout(()=>{l()},1200)});const u=()=>{if(r.step>=5){c();return}r.step=r.step+1,l()},c=async()=>{o.value?o.value.teacherTop=!0:o.value={teacherTop:!0};try{const d=await setGuidance({guideTag:"guideInfo",guideValue:JSON.stringify(o.value)})}catch(d){console.log(d)}state$1.guideInfo=o.value,s.value=!1};return()=>createVNode(Popup,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",styles$8.guidePopup],show:s.value,"onUpdate:show":d=>s.value=d},{default:()=>[createVNode("div",{class:styles$8.content,onClick:()=>u()},[createVNode("div",{class:styles$8.backBtn,onClick:d=>{d.stopPropagation(),c()}},[createTextVNode("跳过")]),createVNode("div",{class:styles$8.box,style:r.box,id:`modeType-${r.step}`},[r.steps.map((d,g)=>{var m,y;return createVNode("div",{onClick:b=>b.stopPropagation(),class:styles$8.item,style:{display:g===r.step?"":"none",left:`${(m=d.eleRect)==null?void 0:m.left}px`,top:`${(y=d.eleRect)==null?void 0:y.top}px`}},[createVNode("img",{class:styles$8.img,style:d.imgStyle,src:d.img},null),createVNode("div",{class:styles$8.btns,style:d.btnsStyle},[r.step+1==r.steps.length?createVNode(Fragment,null,[createVNode("div",{class:[styles$8.endBtn],onClick:()=>c()},[createTextVNode("完成")]),createVNode("div",{class:[styles$8.nextBtn],style:{"border-color":"#fff"},onClick:()=>{r.step=0,l()}},[createTextVNode("再看一遍")])]):createVNode(Button$1,{class:styles$8.teacherBtn,round:!0,type:"primary",onClick:()=>u()},{default:()=>[createTextVNode("下一步 ("),r.step+1,createTextVNode("/"),r.steps.length,createTextVNode(")")]})])])})])])]})}}),StudentTop=defineComponent({name:"studnetT-guide",emits:["close"],setup(i,{emit:e}){const r=reactive({box:{},show:!1,steps:[{ele:"",eleRect:{},img:getImage("studnetT1.png"),handStyle:{top:"0.67rem",left:"0.1rem"},imgStyle:{top:"1.2rem",width:"5.64rem",height:"2.77rem",left:"-2rem"},btnsStyle:{top:"4.4rem",left:"-0.7rem"}},{ele:"",img:getImage("studnetT2.png"),handStyle:{top:"0.67rem",left:"0.1rem"},imgStyle:{top:"1.2rem",width:"5.46rem",height:"2.3rem",left:"-2rem"},btnsStyle:{top:"3.9rem",left:"-0.7rem"}},{ele:"",img:getImage("studnetT3.png"),handStyle:{top:"0.67rem",left:"0.1rem"},imgStyle:{top:"1.2rem",width:"5.46rem",height:"2.30rem",left:"-2rem"},btnsStyle:{top:"3.9rem",left:"-0.7rem"}},{ele:"",img:getImage("studnetT4.png"),handStyle:{top:"0.67rem",left:"0.1rem"},imgStyle:{top:"1.2rem",width:"5.46rem",height:"2.30rem",left:"-2rem"},btnsStyle:{top:"3.9rem",left:"-0.7rem"}},{ele:"",img:getImage("studnetT5.png"),handStyle:{top:"0.67rem",left:"0.1rem"},imgStyle:{top:"1.2rem",width:"5.46rem",height:"2.6rem",left:"-3rem"},btnsStyle:{top:"4.1rem",left:"-1.3rem"}},{ele:"",img:getImage("studnetT6.png"),handStyle:{top:"0.67rem",left:"0.1rem"},imgStyle:{top:"0.92rem",width:"5.46rem",height:"2.30rem",left:"-5.5rem"},btnsStyle:{top:"3.6rem",left:"-1.8rem"}},{ele:"",eleRect:{},img:getImage("studnetT7.png"),handStyle:{top:"0.67rem",left:"0.1rem"},imgStyle:{top:"0.92rem",width:"5.46rem",height:"2.3rem",left:"-5.5rem"},btnsStyle:{top:"3.6rem",left:"-3.7rem"}},{ele:"",eleRect:{},img:getImage("studnetT8.png"),handStyle:{top:"-1.38rem",left:".26rem",transform:"rotate(180deg)"},imgStyle:{top:"-3.8rem",width:"5.46rem",height:"2.28rem",left:"-5rem"},btnsStyle:{top:"-1.2rem",left:"-4.3rem"}}],step:0,initDone:!1}),s=ref(!1);getQuery();const o=ref({});(async()=>{var d;console.log("学生引导123");try{if(state$1.guideInfo)o.value=state$1.guideInfo;else{const g=await getGuidance({guideTag:"guideInfo"});g.data?o.value=JSON.parse((d=g.data)==null?void 0:d.guideValue)||null:o.value={}}o.value&&o.value.studnetT?s.value=!1:s.value=headTopData.modeType!=="init"}catch(g){console.log(g)}})();const l=()=>{console.log(`studnetT${r.step}`);const d=document.getElementById(`studnetT-${r.step}`);if(d){if(d.style.display==="none"){u();return}const g=d.getBoundingClientRect();r.box={left:g.x+"px",top:g.y+"px",width:g.width+"px",height:g.height+"px"}}};onMounted(()=>{setTimeout(()=>{l(),r.initDone=!0},1200)});const u=()=>{if(r.step>=7){c();return}r.step=r.step+1,l()},c=async()=>{o.value?o.value.studnetT=!0:o.value={studnetT:!0};try{const d=await setGuidance({guideTag:"guideInfo",guideValue:JSON.stringify(o.value)})}catch(d){console.log(d)}state$1.guideInfo=o.value,s.value=!1};return()=>createVNode(Popup,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",styles$8.guidePopup],show:s.value,"onUpdate:show":d=>s.value=d},{default:()=>[createVNode("div",{class:styles$8.content,onClick:()=>u()},[r.step!=r.steps.length-1&&createVNode("div",{class:styles$8.backBtn,onClick:d=>{d.stopPropagation(),c()}},[createTextVNode("跳过")]),r.initDone&&createVNode("div",{class:styles$8.box,style:r.box,id:`modeType-${r.step}`},[r.steps.map((d,g)=>{var m,y;return createVNode("div",{onClick:b=>b.stopPropagation(),class:styles$8.item,style:{display:g===r.step?"":"none",left:`${(m=d.eleRect)==null?void 0:m.left}px`,top:`${(y=d.eleRect)==null?void 0:y.top}px`}},[createVNode("img",{class:styles$8.img,style:d.imgStyle,src:d.img},null),createVNode("img",{class:styles$8.iconHead,style:d.handStyle,src:getImage("indexDot.png")},null),createVNode("div",{class:styles$8.btns,style:d.btnsStyle},[r.step+1==r.steps.length?createVNode(Fragment,null,[createVNode("div",{class:[styles$8.studentNext],onClick:()=>c()},[createTextVNode("完成")]),createVNode("div",{class:[styles$8.nextBtn],style:{"border-color":"#fff"},onClick:()=>{r.step=0,l()}},[createTextVNode("再看一遍")])]):createVNode(Button$1,{class:styles$8.studentNext,round:!0,type:"primary",onClick:()=>u()},{default:()=>[createTextVNode("下一步 ("),r.step+1,createTextVNode("/"),r.steps.length,createTextVNode(")")]})])])})])])]})}}),index_module={},iconToggle="_iconToggle_1k628_1",popup$1="_popup_1k628_12",pcPartPop="_pcPartPop_1k628_16",styles$7={iconToggle,popup:popup$1,pcPartPop},container$2="_container_1u7ni_1",top="_top_1u7ni_10",closeIcon="_closeIcon_1u7ni_30",picker="_picker_1u7ni_53",pcPicker="_pcPicker_1u7ni_60",button="_button_1u7ni_66",pcContainer="_pcContainer_1u7ni_73",title$1="_title_1u7ni_82",pcPartTop="_pcPartTop_1u7ni_98",pcPartTopZIndex="_pcPartTopZIndex_1u7ni_102",styles$6={container:container$2,top,closeIcon,picker,pcPicker,button,pcContainer,title:title$1,pcPartTop,pcPartTopZIndex},ChoosePartName=defineComponent({name:"choosePartName",props:{partListNames:{type:Array,default:()=>[]},partIndex:{type:Number,default:0}},emits:["close"],setup(i,{emit:e}){const r=ref(!1),{partListNames:s,partIndex:o}=toRefs(i);let a=s.value.findIndex(g=>g.value===o.value);a=a>-1?a:0;const l=ref(a),u=computed(()=>s.value),c=ref([o.value]),d=ref();return onMounted(()=>{}),()=>{var g;return createVNode("div",{class:[styles$6.container,state$1.platform===IPlatform.PC&&styles$6.pcContainer]},[state$1.platform===IPlatform.PC&&createVNode("div",{class:[!((g=state$1.guideInfo)!=null&&g.teacherDrag)&&styles$6.pcPartTopZIndex,styles$6.pcPartTop,"top_drag"]},null),createVNode("div",{class:styles$6.top},[createVNode("div",{class:styles$6.title},[createTextVNode("请选择您练习的乐器")]),createVNode("span",{class:styles$6.closeIcon,onClick:()=>e("close")},null)]),createVNode(Picker,{ref:d,class:[styles$6.picker,state$1.platform===IPlatform.PC&&styles$6.pcPicker],defaultIndex:i.partIndex,modelValue:c.value,"onUpdate:modelValue":m=>c.value=m,showToolbar:!1,columns:u.value,visibleItemCount:Math.ceil(document.body.clientHeight/44/3),onChange:m=>{r.value||(r.value=!0),l.value=m.selectedValues[0]}},null),createVNode(Button$1,{class:styles$6.button,type:"primary",round:!0,block:!0,onClick:()=>{r.value?e("close",l.value):e("close",o.value)}},{default:()=>[createTextVNode("确定")]})])}}}),instruments={"Acoustic Grand Piano":"大钢琴","Bright Acoustic Piano":"明亮的钢琴","Electric Grand Piano":"电钢琴","Rhodes Piano":"柔和的电钢琴","Chorused Piano":"加合唱效果的电钢琴",Harpsichord:"羽管键琴",Clavichord:"科拉维科特琴",Celesta:"钢片琴",Glockenspiel:"钢片琴","Music box":"八音盒",Vibraphone:"颤音琴",Marimba:"马林巴",Xylophone:"木琴","Tubular Bells":"管钟",Dulcimer:"大扬琴","Hammond Organ":"击杆风琴","Percussive Organ":"打击式风琴","Rock Organ":"摇滚风琴","Church Organ":"教堂风琴","Reed Organ":"簧管风琴",Accordian:"手风琴",Harmonica:"口琴","Tango Accordian":"探戈手风琴","Acoustic Guitar":"钢弦吉他","Electric Guitar":"闷音电吉他","Overdriven Guitar":"加驱动效果的电吉他","Distortion Guitar":"加失真效果的电吉他","Guitar Harmonics":"吉他和音","Acoustic Bass":"大贝司","Electric Bass":"电贝司","Fretless Bass":"无品贝司","Slap Bass":"掌击","Synth Bass":"电子合成",Violin:"小提琴",Viola:"中提琴",Cello:"大提琴",Contrabass:"低音大提琴","Tremolo Strings":"弦乐群颤音音色","Pizzicato Strings":"弦乐群拨弦音色","Orchestral Harp":"竖琴",Timpani:"定音鼓","String Ensemble":"弦乐合奏音色","Synth Strings":"合成弦乐合奏音色","Choir Aahs":"人声合唱","Voice Oohs":"人声","Synth Voice":"合成人声","Orchestra Hit":"管弦乐敲击齐奏",Trumpet:"小号",Trombone:"长号",Tuba:"大号","Muted Trumpet":"加弱音器小号","French Horn":"法国号","Brass Section":"铜管组","Synth Brass":"合成铜管音色","Soprano Sax":"高音萨克斯管","Alto Sax":"中音萨克斯管","Tenor Sax":"次中音萨克斯管","Baritone Sax":"低音萨克斯管",Oboe:"双簧管","English Horn":"英国管",Bassoon:"巴松",Clarinet:"单簧管","Soprano Saxophone":"高音萨克斯管","Alto Saxophone":"中音萨克斯管","Tenor Saxophone":"次中音萨克斯管","Baritone Saxophone":"低音萨克斯管",Piccolo:"短笛",Flute:"长笛",Recorder:"竖笛","Soprano Recorder":"高音竖笛","Pan Flute":"排箫","Bottle Blow":"瓶木管",Whistle:"口哨声",Ocarina:"陶笛",Lead:"合成主音","Lead lead":"合成主音","Pad age":"合成音色",Pad:"合成音色",FX:"合成效果 科幻",Sitar:"西塔尔",Banjo:"班卓琴",Shamisen:"三昧线",Koto:"十三弦筝",Kalimba:"卡林巴",Bagpipe:"风笛",Fiddle:"民族提琴",Shanai:"山奈","Tinkle Bell":"叮当铃",Agogos:"阿戈戈铃","Steel Drums":"钢鼓","Taiko Drum":"太鼓","Melodic Toms":"嗵嗵鼓","Synth Drums":"合成鼓","Reverse Cymbals":"反向镲","Agogo Bells":"阿戈戈铃","Taiko Drums":"太鼓",Bongos:"邦戈鼓","Bongo Bell":"邦戈铃",Congas:"康加鼓",Guiro:"刮壶","Guitar Fret Noise":"吉他换把杂音","Breath Noise":"呼吸声",Seashore:"海浪声","Bird Tweet":"鸟鸣","Telephone Ring":"电话铃",Helicopter:"直升机",Applause:"鼓掌声",Gunshot:"枪声","Acoustic Bass Drum":"大鼓","Bass Drum":"大鼓","Side Drum":"小鼓鼓边","Acoustic Snare":"小鼓","Hand Claps":"拍手","Electric Snare":"小鼓","Low Floor Tom":"低音嗵鼓","Closed Hi-Hat":"闭合踩镲","High Floor Tom":"高音落地嗵鼓","Pedal Hi-Hat":"脚踏踩镲","Low Tom":"低音嗵鼓","Open Hi-Hat":"开音踩镲","Low-Mid Tom":"中低音嗵鼓","Hi Mid Tom":"高音鼓","Crash Cymbals":"对镲","High Tom":"高音嗵鼓","Ride Cymbals":"叮叮镲","Chinese Cymbals":"中国镲","Ride Bell":"圆铃",Tambourine:"铃鼓","Splash Cymbal":"溅音镲",Cowbell:"牛铃","Crash Cymbal":"强音钹","Vibra-Slap":"颤音器","Ride Cymbal":"打点钹","Hi Bongo":"高音邦戈鼓","Low Bongo":"低音邦戈鼓","Mute Hi Conga":"弱音高音康加鼓","Open Hi Conga":"强音高音康加鼓","Low Conga":"低音康加鼓","High Timbale":"高音天巴鼓","Low Timbale":"低音天巴鼓","High Agogo":"高音阿戈戈铃","Low Agogo":"低音阿戈戈铃",Cabasa:"卡巴萨",Maracas:"沙锤","Short Whistle":"短口哨","Long Whistle":"长口哨","Short Guiro":"短刮壶","Long Guiro":"长刮壶",Claves:"响棒","Hi Wood Block":"高音木鱼","Low Wood Block":"低音木鱼","Mute Triangle":"弱音三角铁","Open Triangle":"强音三角铁","Drum Set":"架子鼓","Hulusi flute":"葫芦丝",Melodica:"口风琴",Nai:"口风琴","Snare Drum":"小军鼓",Cymbal:"镲",Cymbals:"镲","Horn in F":"圆号",Triangle:"三角铁",Vibrato:"颤音琴","Suspend Cymbals":"吊镲","Suspended Cymbals":"吊镲","Tom-Toms":"嗵嗵鼓",Bell:"铃铛",Bells:"铃铛","Alto Clarinet":"中音单簧管","Bass Clarinet":"低音单簧管",Cornet:"短号",Euphonium:"上低音号","crash cymbals":"对镲",Castanets:"响板",Shaker:"沙锤","Mark tree":"音树",Chimes:"管钟","Mark Tree":"音树","Tom-toms":"嗵嗵鼓","Hi-Hat":"踩镲","Sleigh Bells":"雪橇铃",Flexatone:"弹音器","Brake drum":"闸鼓",Gong:"锣","concert tom":"音乐会嗵嗵鼓","brake drum":"车轮鼓","finger cymbal":"指钹","ride cymbal":"叮叮镲","Concert Toms":"音乐会嗵嗵鼓",Vibraslap:"弹音器","Wood Blocks":"木鱼","Temple Blocks":"木鱼","Wood Block":"木鱼","Field Drum":"军鼓","Quad-Toms":"筒鼓",Quads:"筒鼓","Drums set":"架子鼓","High Bongo":"邦戈",Timbales:"天巴鼓"},getInstrumentName=(i="")=>{if(i=i.toLocaleLowerCase().replace(/ /g,""),!i)return"";for(let e in instruments)if(e.toLocaleLowerCase().replace(/ /g,"").includes(i))return instruments[e];for(let e in instruments){const r=e.toLocaleLowerCase().replace(/ /g,"");if(i.includes(r))return instruments[e]}return""},sortMusical=(i,e)=>{let r=0;switch(i){case"长笛":r=1;break;case"单簧管":r=2;break;case"中音单簧管":r=3;break;case"低音单簧管":r=4;break;case"高音萨克斯风":r=5;break;case"中音萨克斯风":r=6;break;case"次中音萨克斯风":r=7;break;case"低音萨克斯风":r=8;break;case"小号":r=9;break;case"长号":r=10;break;case"圆号":r=11;break;case"大号":r=12;break;case"上低音号":r=13;break;default:r=e+14;break}return r};function useDrag(i,e,r,s){const o=ref({top:-1,left:-1}),a=s+e;watch(r,()=>{r.value?(u(),window.addEventListener("resize",c),nextTick(()=>{const d=document.querySelector(`.${e}`);d&&i.map(g=>{const m=document.querySelector(`.${g}`);m&&(m.style.cursor="move",drag(m,d,o))})})):(window.removeEventListener("resize",c),setCachePos(a,o.value))});const l=computed(()=>o.value.left===-1&&o.value.top===-1?{}:{position:"fixed",left:`${o.value.left}px`,top:`${o.value.top}px`,transform:"initial",transformOrigin:"initial",margin:"initial",transition:"initial"});function u(){const d=getCachePos(a);d&&(o.value=d,nextTick(()=>{c()}))}function c(){if(o.value.left===-1&&o.value.top===-1)return;const d=document.querySelector(`.${e}`);if(!d)return;const g=d.getBoundingClientRect(),m=document.documentElement.clientWidth,y=document.documentElement.clientHeight,{top:b,left:S}=o.value,A=m-g.width,E=y-g.height;let x=S,P=b;const C=0,T=0;x=xA?A:x,P=PE?E:P,o.value={top:P,left:x}}return{pos:o,styleDrag:l}}function drag(i,e,r){function s(o){const a=e.getBoundingClientRect(),l=o.clientX,u=o.clientY,c=document.documentElement.clientWidth,d=document.documentElement.clientHeight,g=c-a.width,m=d-a.height,y=0,b=0;function S(E){let x=a.left+(E.clientX-l),P=a.top+(E.clientY-u);x=xg?g:x,P=Pm?m:P,r.value={top:P,left:x}}function A(){document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",A)}document.addEventListener("mousemove",S),document.addEventListener("mouseup",A)}i.addEventListener("mousedown",s)}const localStorageName="dragCachePos";function getCachePos(i){const e=localStorage.getItem(localStorageName);if(e)try{return JSON.parse(e)[i]}catch(r){return null}return null}function setCachePos(i,e){const r=localStorage.getItem(localStorageName);let s={};if(r)try{s=JSON.parse(r)}catch(o){}s[i]=e,localStorage.setItem(localStorageName,JSON.stringify(s))}const dragBom="_dragBom_u8a8z_1",box="_box_u8a8z_9",right="_right_u8a8z_18",guide="_guide_u8a8z_23",guideBg="_guideBg_u8a8z_39",guideDone="_guideDone_u8a8z_47",guideTop="_guideTop_u8a8z_58",guideLeft="_guideLeft_u8a8z_66",guideRight="_guideRight_u8a8z_75",styles$5={dragBom,box,right,guide,guideBg,guideDone,guideTop,guideLeft,guideRight},Dragbom=defineComponent({name:"dragBom",emits:["guideDone"],props:{showGuide:{type:Boolean,default:!1}},setup(i,{emit:e}){const r=reactive({guidePos:"bottom"}),s=()=>{var g,m,y;const o=document.documentElement.clientHeight||document.body.clientHeight;document.documentElement.clientWidth||document.body.clientWidth;const a=((g=document.querySelector(".bom_guide"))==null?void 0:g.clientHeight)||0,l=((m=document.querySelector(".bom_guide"))==null?void 0:m.clientWidth)||0,u=(y=document.querySelector(".bom_drag"))==null?void 0:y.getBoundingClientRect(),c=(u==null?void 0:u.top)||0,d=(u==null?void 0:u.left)||0;o-c>a?r.guidePos="bottom":r.guidePos=d>l?"left":"right"};return onMounted(()=>{nextTick(()=>{setTimeout(()=>{s()},0)})}),()=>createVNode(Fragment,null,[createVNode("div",{class:[styles$5.dragBom,"bom_drag"]},[createVNode("div",{class:styles$5.box},null),createVNode("div",{class:[styles$5.box,styles$5.right]},null)]),i.showGuide&&createVNode("div",{class:[styles$5.guide,r.guidePos==="left"&&styles$5.guideLeft,r.guidePos==="right"&&styles$5.guideRight,"bom_guide"],onClick:()=>e("guideDone")},[createVNode("div",{class:styles$5.guideBg},null),createVNode("div",{class:styles$5.guideDone},null)])])}}),toggleMusicSheet=reactive({show:!1,toggle:(i=!0)=>{toggleMusicSheet.show=i}}),ToggleMusicSheet=defineComponent({name:"ToggleMusicSheet",setup(){var c,d;const i=getQuery(),e=computed(()=>{let g=state$1.partListNames||[];return g=g.filter(y=>{var b;return!((b=y==null?void 0:y.toLocaleUpperCase())!=null&&b.includes("COMMON"))}),g.map((y,b)=>{const S=!!(state$1.canSelectTracks.length==0||state$1.canSelectTracks.includes(y)),A=getInstrumentName(y),E=sortMusical(A,b);return{text:y+(A?`(${A})`:""),value:b,sortId:E,canselect:S}}).filter(y=>y.canselect).sort((y,b)=>y.sortId-b.sortId)}),r=computed(()=>{var g;if(e&&e.value.length){const m=((g=e.value.find(y=>y.value==state$1.partIndex))==null?void 0:g.value)||0;return console.log(3333,m),m}else return 0}),s=g=>{if(state$1.partIndex===g)return;togglePlay("paused"),postMessage({api:"cloudDestroy"}),postMessage({api:"cloudLoading",content:{show:!0,type:"fullscreen"}});const m=location.origin+location.pathname+"?"+queryString.stringify({...i,behaviorId:sessionStorage.getItem("behaviorId")||"",_t:new Date().valueOf(),"part-index":g});console.log(m),location.href=m},o="switchBoxClass_drag",a=(c=storeData.user)!=null&&c.id?String((d=storeData.user)==null?void 0:d.id):"",l=state$1.platform!==IPlatform.PC?{styleDrag:{value:null}}:useDrag([`${o} .top_drag`,`${o} .bom_drag`],o,toRef(toggleMusicSheet,"show"),a),u=async()=>{state$1.guideInfo.teacherDrag=!0;try{const g=await setGuidance({guideTag:"guideInfo",guideValue:JSON.stringify(state$1.guideInfo)})}catch(g){console.log(g)}};return()=>createVNode(Popup,{class:[styles$7.popup,[state$1.platform===IPlatform.PC&&styles$7.pcPartPop,"switchBoxClass_drag"]],show:toggleMusicSheet.show,"onUpdate:show":g=>toggleMusicSheet.show=g,style:l.styleDrag.value},{default:()=>{var g;return[createVNode(ChoosePartName,{partIndex:r.value||0,partListNames:e.value,onClose:m=>{console.log("🚀 ~ value:",m),toggleMusicSheet.show=!1,m!==void 0&&s(m)}},null),state$1.platform===IPlatform.PC&&createVNode(Dragbom,{showGuide:!((g=state$1.guideInfo)!=null&&g.teacherDrag),onGuideDone:u},null)]}})}}),icon_btn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMoAAABKCAMAAADNCztCAAAC+lBMVEUAAAAFdbhx6P9x5f913/9ixvcEdbkEdLkFdLlz3P0FdboAdblr5/9qzvoFdLh23fx80/tVv/IEdLgFdLkHdrprz/p21vwFdbp22/0FdLlt0Porl9R31vt40/t20/tt6v8EdLhr3P1w0fpv6f4EdLkGdLk9qeJt6v971Pps5v930/pr6f8FdLkFdLhz5vwGdbr///8rrvcFdLgpqvcssPctsvcqrPcqq/dX1/5m5P8vs/df3f5q5/9c2/5l4v9V1f5i4f8vtfdb2v5R0v5g3/9P0P5o5v9T0/5s6f8us/dMzv5GyP4rqfcwqvdDxv43rfcomd5BxP5Iyv4+wv5Z2f8xt/hKzP5Jy/44vPvr+v9u6v8zuvgsrvX7/f4wtfg3ufg1vfht6v/p+f48vfcxufg6r/cvrffM5+84tegqoM7G8P5Fx/stnLyh5v551/4srvIxpMpHxfhEwvgytPcvocc8v/gzrvdUwvg+s/e74/NBvu02q9Hp9fk4tPcsqecsquRKqMUpmb0rmbqU5P44vvkus/ZFxPMtruosq+ounb9AwPkvr/crpdpd3f90yeqi0uArotNVzP5kzPlRxvlMxPhHv/gwt/jZ7fNRrstAuvcusfMsrO8pm8Hu9/pvz/lbyfkzvPg/tvczsffT6/M2seNNzPpLu/g6r9cqncZAv/ZKyPVBvOkrp+B9w9gUg8b2+/1Ux/lFuvjB5vI8u/HA4u3s+/+o5v5oz/pfy/rj8vZCsfKZ1/Asq+01pema0uWUzN4llNcvn8JCwPAusfBJxO+63uosp9yL4P47v/xYyPlUvOWn1eQ9tuBot9AOfcHe9f3x+fw9wfvF6fZ4zu+z2+diwec5sOAyqNU5ocLU8v3K8f110fmF1viT0uw8s9teudh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ezy99gwI/uMbNL8SqBqQ2VwA/9P/A3BYEmVmvqAlInF6+1sn0oYubRZHItIJNWpUnHUYevxM6cqzeYoXpuMLYQCC2uO81XhJCKMszhntEiZdChAFEobzSWMzIwObGICEQkXlkncJRSCCcMfwQ8NJREOKG41EAlHAmqCMrVsGNUf2aPKnyrinTjakZFJdCbQ/q2iTUzypMdtRDGjut1uFbhHwA+NZ1GGz1QqPMJO6adoep25WazzeRGuW4TzFy/iwmXArbgNlLkL4WKNYP4S93xWJomTQzswiVlHwqciEQk0sFSjC2Q4JA4V4Uzc2EFzSIKCbDo0qdTaZb1leSkiFxUqRhfUlIWL5ACGUMYP0ewC8o9Zk2nsucAFN3c+8pnwsRh8YGEqsEK4yKRiWWAwmRijk2eREdD59MtztL7l/sW5mHSgIQzF7IJYpELhXZxGkwFKJ5BkCqZROoBcLJpFFIpEs5jQG0UiF4EIV12DlE4rIAbmTqE0Ngm5pD7piyRcFJew6/lQZESsXLze8TFKp8wlJmZnUNr+O3Hsw0RkY0aYCV9hfIFJwQ34pki8P9spzZhNOPLgQtuewSVlKlZtr6RKRfm/VNK0vcfj7eymMMkjAvJQYzTWGM+FMxEO+LwMZ4JMVFMkWGXWJmkOFYjU/YxRVBdMRORnU/D6I2QqBBuYAJnygog66rb3eEQuzoSHty76moLsfJKCzKVUl4mWllZUVFi9d7n4TLB43KbGh4VbslMMPsxiWMTbChGwNJOkJjeLMgZePmc2ST5+aPgt9+IAd66oKpYRTMVmYIdlisXD4wV1E6sHKSMrl6QlfwnV6fjS3PqstAJCAvwmMNjjMijhTkJhN5aOjBuoA4XsHgZfvXXbOxvbBjqozpJ8YsWMbJpgqL+7rXrnbjF72b0Xi2cnu1JxhN1HsJLZdWQXVjqqm9u6+4doguwZRIYZU+kYZypEJMmbnkHHLBnT88hoKJiVsziLjjmyFufMKiD/Qf7MZTkTpo8bE0yfkLNsZtpO/wtEPqpW49UVJQAAAABJRU5ErkJggg==",container$1="_container_jp744_1",close="_close_jp744_11",title="_title_jp744_18",content$1="_content_jp744_23",btns="_btns_jp744_32",btn="_btn_jp744_32",btnCancel="_btnCancel_jp744_46",styles$4={container:container$1,close,title,content:content$1,btns,btn,btnCancel},TheVip=defineComponent({name:"TheVip",setup(){const i={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://kt.colexiu.com"};let e=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//online")||location.origin.includes("//kt")||location.origin.includes("//mec")?"online":"dev";const r=()=>{getQuery().modelType?api_goback():api_back()};return()=>createVNode(Popup,{teleport:"body",closeOnClickOverlay:!1,class:["popup-custom"],show:!0},{default:()=>[createVNode("div",{class:styles$4.container},[createVNode("div",{class:styles$4.content},[createTextVNode("立即开通"),createVNode("span",{style:{color:"#FF5A56"}},[createTextVNode('"乐器AI学练工具"')]),createTextVNode("服务,解锁更多专属权益,享受全新学习体验!")]),createVNode("div",{class:styles$4.btns},[createVNode("img",{class:[styles$4.btn,styles$4.btnCancel],src:icon_btn_cancel,onClick:r},null),createVNode("img",{class:styles$4.btn,src:icon_btn,onClick:()=>{postMessage$1({api:"openWebView",content:{url:`${location.origin.includes("192")?"https://test.lexiaoya.cn":i[e]}/classroom-app/#/member-center`,orientation:1}})}},null)])])]})}}),ModeView=defineComponent({name:"modeView",setup(){const i=getQuery(),e=reactive({showPC:!1,showStudent:!1,showVip:!1}),r=()=>{storeData.platformType!=="STUDENT"||storeData.user.clientType!=="STUDENT"?e.showPC=!0:storeData.user.vipMember||state$1.paymentType==="FREE"||i.showCourseMember==="true"?e.showStudent=!0:e.showVip=!0},s=async()=>{const a=await studentQueryUserInfo(),l=(a==null?void 0:a.data)||{};storeData.user.vipMember=l.vipMember,storeData.user.vipMember&&(e.showVip=!1,r())},o=usePageVisibility();return watch(()=>o.value,a=>{if(a==="visible"){if(storeData.user.vipMember)return;console.log("页面显示"),s()}}),onMounted(()=>{r()}),()=>createVNode("div",{class:[styles$c.modeView,headTopData.modeType!=="init"&&styles$c.hidden]},[createVNode("img",{src:backImg,class:styles$c.back},null),createVNode("img",{src:nameImg,class:styles$c.name},null),createVNode("div",{class:styles$c.modeBox},[createVNode("img",{src:lxImg,class:styles$c.modeImg,onClick:()=>headTopData.handleChangeModeType("practise")},null),createVNode("img",{src:glImg,class:styles$c.modeImg,onClick:()=>headTopData.handleChangeModeType("follow")},null),createVNode("img",{src:pcImg,class:styles$c.modeImg,onClick:()=>headTopData.handleChangeModeType("evaluating")},null)]),e.showVip&&createVNode(TheVip,null,null)])}}),popup="_popup_1mmv3_1",tabs="_tabs_1mmv3_4",wrap="_wrap_1mmv3_60",searchBox="_searchBox_1mmv3_64",isFocus="_isFocus_1mmv3_73",searchBtn="_searchBtn_1mmv3_99",item="_item_1mmv3_120",itemActive="_itemActive_1mmv3_128",content="_content_1mmv3_133",name="_name_1mmv3_133",titleImg="_titleImg_1mmv3_136",iconType="_iconType_1mmv3_145",VIP="_VIP_1mmv3_154",detail="_detail_1mmv3_163",usedNum="_usedNum_1mmv3_168",author="_author_1mmv3_187",noData="_noData_1mmv3_193",styles$3={popup,tabs,wrap,searchBox,isFocus,searchBtn,item,itemActive,content,name,titleImg,iconType,VIP,detail,usedNum,author,noData},searImg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAdVBMVEUAAAApov8pov8kpP8pov4oov8po/8po/8pov4qov8oov8po/8pov4pov8po/8qo/4oov4qo/8po/8pov8ppP8npP8qpf8iof8uov8oov4pov8pov4pov4qov8qov8ppP8oof8ppf8noP8oo/8np/8rnP8pov/KqiHjAAAAJnRSTlMA+u4c3NBJrogyxWj12aOZko2CdlsjGA8L5N7UtLKZcF8+OzoaEmDU9ZIAAAEBSURBVCjPdZDZtsIgDEUD1Q5QO1d7na8D//+JHii0CMv9ElY2SQjk+G8FZ+XxcntRSLpVDnbdf6kpUz7l4LlkLttWeZNxc8zXOu1YPfoDeid1z7+CFjp9N7VXtUvIQyKzm49ow1DnU8NKsx8ONX3zxrNOBFrIkQJymxTYgUKekHdEdKgiOUF2iEyvHIGSBqHUIQIlLcJRqSxye/tJF6V4JAfIFPFmYsAZH3NAfLF4l4dys6722SuHHVLFPLzEUfpOIFEt00H9XnqiDoXrTwKePye0Gc7KsEmc7dmc4SaGNkWrlarYeBbIkzUsw7gksDTeu6btU727tYJiFsvppxVcfgBP6SNcJ6sEZwAAAABJRU5ErkJggg==",huoimg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAMAAAD+dOxOAAAAxlBMVEUAAAD/cWr/hV7/c2f/j1n/gmH/eV7/eGP/f1//dmT/cGf/emL/d2T/cGf/fWL/kFj/gF//cWj/h1z/fmH/gV3/dmT/jF3/jFr/iF3/e2L/bGj/iFv/gmD/hV3/dmT/jFr/e2P/iFz/c2b/hl3/eGX/fWH/kFn/bWf/cWb/lFf/cGf/bGj/b2f/jVn/dGb/gGH/iVz/f2D/l1n/aWn/hV7/e2H/hF3/fmD/iFv/eGP/gV//dmT/b2f/dGT/cmb/kFf/i1r/jVkmmW9mAAAANXRSTlMACZ1CLRsT+vr01M/FppmLg3NhOScOBfz48O3t7OTi3dzcysK5sbGvqKKPhIN5bmxsSkI/F17JNJMAAACvSURBVBjTZc5VEgJBDATQXsXd3d1lBRgYuP+lyGQpdineT3dS+QjYcWHihyVlDlGmlHKKiM2LRG96T1Irf+e9z3TYJpRS3Wcta1AEqXTcj5FLi6qdd0M6cNDb11D8jGzci9oh5XkOoc45QcNh6XyQfcQuzECWM4buTRkD1ZQqCczvJFFW/6mWhvEgBShDalsgI4SwoSyFSGqANhMCbC2SFpdC0+DMrDQEKicOHv+8AZLzJUTMW2tcAAAAAElFTkSuQmCC",List=defineComponent({name:"TheMusicList-list",props:{recentFlag:{type:Boolean,default:!1}},setup(i){const e=reactive({name:"",page:1,rows:20,musicSheetCategoriesId:state$1.bizMusicCategoryId,recentFlag:i.recentFlag?!0:null,excludeMusicId:i.recentFlag?null:state$1.examSongId}),r=reactive({isFocus:!1,list:[],finished:!1,loading:!1,hasNext:!0}),s=async()=>{var l,u,c,d;if(r.hasNext){r.loading=!0;try{const g=await api_musicSheetPage({...e});(g==null?void 0:g.code)===200&&Array.isArray((l=g.data)==null?void 0:l.rows)&&(r.list=[...r.list,...g.data.rows]),r.finished=((c=(u=g.data)==null?void 0:u.rows)==null?void 0:c.length)r.list.length}catch(g){console.log(g)}r.loading=!1}};function o(){e.page=1,e.rows=20,r.list=[],r.finished=!1,r.loading=!1,r.hasNext=!0,s()}watch(()=>i.recentFlag,()=>{r.hasNext=!0}),onMounted(()=>{s()});const a=l=>{l.id!==state$1.examSongId&&(togglePlay("paused"),postMessage$1({api:"cloudLoading",content:{show:!0,type:"fullscreen"}}),location.href=location.origin+location.pathname+"?"+queryString.stringify({id:l.id,_t:Date.now()}))};return()=>createVNode("div",{class:styles$3.wrap},[createVNode("div",{class:[styles$3.searchBox,r.isFocus&&styles$3.isFocus]},[createVNode("img",{src:searImg},null),createVNode(Field,{placeholder:"请输入曲目名称",modelValue:e.name,"onUpdate:modelValue":l=>e.name=l,autocomplete:"off",onFocus:()=>{r.isFocus=!0},onBlur:()=>{r.isFocus=!1}},null),createVNode("div",{class:styles$3.searchBtn,onClick:o},[createTextVNode("搜索")])]),createVNode(List$1,{loading:r.loading,finished:r.finished,immediateCheck:!1,onLoad:()=>{e.page++,s()}},{default:()=>[r.list.map(l=>createVNode("div",{class:[styles$3.item,state$1.examSongId==l.id&&styles$3.itemActive],onClick:()=>a(l)},[createVNode("div",{class:styles$3.titleImg},[createVNode("i",{class:[styles$3.iconType,styles$3[l.paymentType]]},null),createVNode(Image$1,{src:l.titleImg,class:styles$3.img},null)]),createVNode("div",{class:styles$3.content},[createVNode("p",{class:styles$3.name},[l.musicSheetName]),createVNode("div",{class:styles$3.detail},[l.usedNum&&createVNode("div",{class:styles$3.usedNum},[createVNode("img",{src:huoimg},null),createVNode("div",null,[l.usedNum])]),l.composer&&createVNode("p",{class:styles$3.author},[l.composer])])])])),!r.loading&&r.list.length===0&&createVNode("div",{class:styles$3.noData},[createTextVNode("暂无数据")])]})])}}),query$1=getQuery(),isMusicList=computed(()=>!(state$1.playState=="play"||followData.start||evaluatingData.startBegin||query$1.workRecord||query$1.modelType||state$1.platform===IPlatform.PC||query$1.isCbs)),musicListShow=ref(!1),TheMusicList=defineComponent({name:"TheMusicList",setup(){return()=>createVNode(Fragment,null,[createVNode(Popup,{class:styles$3.popup,position:"left",show:musicListShow.value,"onUpdate:show":i=>musicListShow.value=i,round:!0,"overlay-style":{background:"rgba(0, 0, 0, 0.3)"}},{default:()=>[createVNode("div",{class:styles$3.tabs},[createVNode(Tabs,null,{default:()=>[createVNode(Tab,{title:"其他曲谱"},{default:()=>[createVNode(List,null,null)]}),createVNode(Tab,{title:"最近练习"},{default:()=>[createVNode(List,{recentFlag:!0},null)]})]})])]})])}}),headTopData=reactive({modeType:"",showBack:!0,settingMode:!1,handleChangeModeType(i){if(!(i==="evaluating"&&!state$1.enableEvaluation)&&!(i==="follow"&&state$1.isPercussion)){if(i==="follow"&&metronomeData.cursorMode===2&&(metronomeData.cursorMode=1),i==="evaluating"){if(!evaluatingData.jsonLoadDone){evaluatingData.jsonLoading=!0,state$1.audioDone&&showToast("资源加载中,请稍后");return}if(state$1.platform===IPlatform.PC){showConfirmDialog({className:"modalTip",title:"温馨提示",message:"该功能暂未开放,敬请期待!",showCancelButton:!1});return}state$1.playIngSpeed=state$1.originSpeed,handleStartEvaluat()}else i==="follow"&&toggleFollow();headTopData.modeType="show"}}}),headData=reactive({speedShow:!1,musicTypeShow:!1}),HeaderTop=defineComponent({name:"header-top",emits:["close"],setup(i,{emit:e}){var V,D;const r=getQuery(),s=ref(!1),o=ref(!1),a=computed(()=>state$1.playState==="play"?{display:!0,disabled:!0}:evaluatingData.startBegin||followData.start?{display:!0,disabled:!0}:{display:!0,disabled:!1}),l=computed(()=>state$1.playState==="play"?{display:!0,disabled:!0}:evaluatingData.startBegin||followData.start?{display:!0,disabled:!0}:{disabled:!1,display:!0}),u=computed(()=>headTopData.modeType!=="show"||state$1.modeType==="follow"?{display:!1,disabled:!0}:state$1.modeType==="evaluating"||state$1.playState==="play"?{display:!0,disabled:!0}:{disabled:!1,display:!0}),c=computed(()=>headTopData.modeType!=="show"?{display:!1,disabled:!0}:state$1.playState==="play"?{display:!0,disabled:!0}:{disabled:!1,display:!0}),d=computed(()=>state$1.isShowFingering?headTopData.modeType!=="show"||!state$1.fingeringInfo.name||["evaluating","follow"].includes(state$1.modeType)?{display:!1,disabled:!0}:state$1.playState==="play"?{display:!0,disabled:!0}:{disabled:!1,display:!0}:{display:!0,disabled:!0});computed(()=>headTopData.modeType!=="show"||state$1.modeType!=="evaluating"?{display:!1,disabled:!0}:state$1.playState==="play"?{display:!0,disabled:!0}:{disabled:!1,display:!0});const g=computed(()=>headTopData.modeType!=="show"||["evaluating","follow"].includes(state$1.modeType)?{display:!1,disabled:!0}:state$1.playState==="play"?{display:!0,disabled:!0}:{disabled:!1,display:!0}),m=computed(()=>{if(headTopData.modeType!=="show"||state$1.modeType==="follow")return{display:!1,disabled:!1};if(state$1.modeType==="evaluating")return{display:!1,disabled:!0};if(!state$1.isAppPlay)if(state$1.playType==="play"){if(state$1.music&&state$1.accompany)return{display:!0,disabled:!1}}else{let $=0;if(state$1.fanSong&&$++,state$1.banSong&&$++,state$1.mingSong&&$++,$>1)return{display:!0,disabled:!1}}return{disabled:!0,display:!0}}),y=computed(()=>{if(headTopData.modeType!=="show"||state$1.modeType==="follow")return{display:!1,disabled:!1};if(state$1.modeType==="evaluating")return{display:!1,disabled:!0};if(state$1.playState==="play")return{display:!0,disabled:!0};if(!state$1.isAppPlay&&!state$1.isConcert){let $=0;if(state$1.fanSong&&$++,state$1.banSong&&$++,state$1.mingSong&&$++,$>0)return{display:!0,disabled:!1}}return{disabled:!0,display:!0}}),b=computed(()=>headTopData.modeType!=="show"||!headTopData.showBack?{display:!1,disabled:!1}:followData.start||evaluatingData.startBegin?{display:!0,disabled:!0}:{display:!0,disabled:!1}),S=computed(()=>headTopData.modeType!=="show"?{display:!1,disabled:!1}:["evaluating","follow"].includes(state$1.modeType)?{display:!1,disabled:!0}:state$1.isAppPlay&&state$1.midiPlayIniting?{display:!0,disabled:!0}:{display:!0,disabled:!1}),A=computed(()=>{if(headTopData.modeType!=="show")return{display:!1,disabled:!1};if(["evaluating","follow"].includes(state$1.modeType))return{display:!1,disabled:!0};if(state$1.playState==="play")return{display:!1,disabled:!0};const $=getAudioCurrentTime();return state$1.isAppPlay&&state$1.midiPlayIniting?{display:!1,disabled:!0}:$?{display:!0,disabled:!1}:{display:!1,disabled:!0}}),E=computed(()=>l.value.display&&u.value.display&&g.value.display&&m.value.display&&b.value.display&&s.value),x=computed(()=>l.value.display&&u.value.display&&g.value.display&&m.value.display&&b.value.display&&o.value),P=computed(()=>!!(storeData.user.vipMember||state$1.paymentType==="FREE"||r.showCourseMember==="true")),C=browser(),T=()=>{if(HANDLE_WORK_ADD(),!storeData.isApp){window.close();return}if((C.iPhone||C.ios)&&r.workRecord){setTimeout(()=>{api_back()},550);return}api_back()},_=()=>{r.workRecord||(state$1.defaultModeType==1?(headTopData.handleChangeModeType("practise"),(state$1.platform===IPlatform.PC||state$1.isPreView)&&(headTopData.showBack=!1)):r.modelType?(r.modelType==="practise"?headTopData.handleChangeModeType("practise"):r.modelType==="evaluating"&&headTopData.handleChangeModeType("evaluating"),headTopData.showBack=!1):setTimeout(()=>{headTopData.modeType="init"},500))},B=$=>{var O,q;((O=$==null?void 0:$.data)==null?void 0:O.api)==="setPlayState"&&togglePlay("paused","courseware"),((q=$==null?void 0:$.data)==null?void 0:q.api)==="imagePos"&&$!=null&&$.data.data&&(state$1.playBtnDirection=$.data.data==="right"?"right":"left",state$1.musicScoreBtnDirection=state$1.playBtnDirection)},M="settingBoxClass_drag",N=(V=storeData.user)!=null&&V.id?String((D=storeData.user)==null?void 0:D.id):"",I=state$1.platform!==IPlatform.PC?{styleDrag:{value:null}}:useDrag([`${M} .top_drag`,`${M} .bom_drag`],M,toRef(headTopData,"settingMode"),N);onMounted(()=>{_(),window.addEventListener("message",B),state$1.platform===IPlatform.PC?s.value=!0:o.value=!0}),onUnmounted(()=>{window.removeEventListener("message",B)}),watch(state$1.setting,()=>{console.log(state$1.setting,"state.setting"),store_legacy.set("musicscoresetting",state$1.setting)}),(async()=>{var O;let $=null;try{const q=await getGuidance({guideTag:"guideInfo"});q.data?$=JSON.parse((O=q.data)==null?void 0:O.guideValue)||null:$={},state$1.guideInfo=$}catch(q){console.log(q)}})();const F=async()=>{state$1.guideInfo.teacherDrag=!0;try{const $=await setGuidance({guideTag:"guideInfo",guideValue:JSON.stringify(state$1.guideInfo)})}catch($){console.log($)}};function k(){if(!state$1.isEvxml){const{isOpenMetronome:$,isSingOpenMetronome:O}=state$1,{xmlMp3BeatFixTime:q}=metronomeData;state$1.playType==="play"?$&&!O?state$1.fixtime=state$1.fixtime+q:!$&&O&&(state$1.fixtime=state$1.fixtime-q):O&&!$?state$1.fixtime=state$1.fixtime+q:!O&&$&&(state$1.fixtime=state$1.fixtime-q);const G=state$1.fixtime;state$1.times.map(U=>{state$1.playType==="play"?$&&!O?(U.time=U.time+q,U.endtime=U.endtime+q,U.fixtime=G):!$&&O&&(U.time=U.time-q,U.endtime=U.endtime-q,U.fixtime=G):O&&!$?(U.time=U.time+q,U.endtime=U.endtime+q,U.fixtime=G):!O&&$&&(U.time=U.time-q,U.endtime=U.endtime-q,U.fixtime=G)});try{metronomeData.metro.calculation(state$1.times)}catch(U){}console.log("重新之后的times",state$1.times,G)}handleRessetState(),A.value.display=!1}return()=>createVNode(Fragment,null,[createVNode("div",{class:[styles$c.headerTop],onClick:$=>{$.stopPropagation(),state$1.platform===IPlatform.PC&&window.parent.postMessage({api:"onAttendToggleMenu"},"*")}},[createVNode("div",{class:styles$c.headTopLeftBox},[createVNode("img",{src:iconBack,class:["headTopBackBtn",styles$c.img,!headTopData.showBack&&styles$c.hidenBack],onClick:T},null),state$1.modeType==="practise"&&smoothAnimationState.isShow.value?createVNode("div",{class:styles$c.title,onClick:()=>{isMusicList.value&&(musicListShow.value=!0)}},[createVNode(NoticeBar,{text:state$1.examSongName,background:"none"},null)]):createVNode("img",{src:listImg,class:[styles$c.img],onClick:()=>{isMusicList.value&&(musicListShow.value=!0)}},null)]),createVNode("div",{id:state$1.platform===IPlatform.PC?"teacherTop-0":"studnetT-0",style:{display:b.value.display?"":"none"},class:[styles$c.modeChangeBox,b.value.disabled&&styles$c.disabled],onClick:()=>{handleRessetState(),headTopData.modeType="init"}},[createVNode("img",{class:styles$c.img,src:iconMode},null),createVNode("div",{class:styles$c.title},[state$1.modeType==="practise"?"练习模式":state$1.modeType==="follow"?"跟练模式":state$1.modeType==="evaluating"?"评测模式":""])]),createVNode("div",{class:[styles$c.headRight],onClick:$=>{$.stopPropagation()}},[createVNode("div",{style:{display:y.value.display?"":"none"},class:[styles$c.btn,y.value.disabled&&styles$c.disabled],onClick:()=>{state$1.playType==="play"?(state$1.playType="sing",state$1.playSource=state$1.fanSong?"music":state$1.banSong?"background":"mingSong"):(state$1.playType="play",state$1.playSource=state$1.music?"music":"background"),k()}},[createVNode("img",{style:{display:state$1.playType==="play"?"":"none"},class:styles$c.iconBtn,src:headImg("perform.png")},null),createVNode("img",{style:{display:state$1.playType==="play"?"none":""},class:styles$c.iconBtn,src:headImg("sing.png")},null),createVNode("span",null,[state$1.playType==="play"?"演奏":"演唱"])]),createVNode("div",{id:state$1.platform===IPlatform.PC?"teacherTop-1":"studnetT-1",style:{display:m.value.display?"":"none"},class:[styles$c.btn,m.value.disabled&&styles$c.disabled],onClick:()=>{state$1.playType==="play"?state$1.playSource=state$1.playSource==="music"?"background":"music":state$1.playSource==="music"?state$1.playSource=state$1.banSong?"background":"mingSong":state$1.playSource==="background"?state$1.playSource=state$1.mingSong?"mingSong":"music":state$1.playSource=state$1.fanSong?"music":"background"}},[createVNode("img",{style:{display:state$1.playSource==="music"?"":"none"},class:styles$c.iconBtn,src:state$1.playType==="play"?headImg("music.png"):headImg("music1.png")},null),createVNode("img",{style:{display:state$1.playSource==="background"?"":"none"},class:styles$c.iconBtn,src:state$1.playType==="play"?headImg("background.png"):headImg("background1.png")},null),createVNode("img",{style:{display:state$1.playSource==="mingSong"?"":"none"},class:styles$c.iconBtn,src:headImg("mingsong.png")},null),createVNode("span",null,[state$1.playSource==="music"?state$1.playType==="play"?"原声":"范唱":state$1.playSource==="background"?state$1.playType==="play"?"伴奏":"伴唱":"唱名"])]),createVNode("div",{id:state$1.platform===IPlatform.PC?"teacherTop-2":"studnetT-2",style:{display:g.value.display?"":"none"},class:[styles$c.btn,g.value.disabled&&styles$c.disabled],onClick:()=>handleChangeSection()},[createVNode("img",{style:{display:state$1.section.length===0?"":"none"},class:styles$c.iconBtn,src:headImg("section0.png")},null),createVNode("img",{style:{display:state$1.section.length===1?"":"none"},class:styles$c.iconBtn,src:headImg("section1.png")},null),createVNode("img",{style:{display:state$1.section.length===2?"":"none"},class:styles$c.iconBtn,src:headImg("section2.png")},null),createVNode("span",null,[createTextVNode("选段")])]),state$1.modeType!=="evaluating"&&createVNode(Fragment,null,[createVNode("div",{style:{display:c.value.display?"":"none"},class:[styles$c.btn,styles$c.metronomeBtn,c.value.disabled&&styles$c.disabled],onClick:async()=>{headData.speedShow=!headData.speedShow}},[createVNode("img",{style:{display:metronomeData.disable?"block":"none"},class:styles$c.iconBtn,src:headImg("tickon.png")},null),createVNode("img",{style:{display:metronomeData.disable?"none":"block"},class:styles$c.iconBtn,src:headImg("tickoff.png")},null),createVNode("span",{style:{whiteSpace:"nowrap"}},[createTextVNode("节拍")]),createVNode("div",{class:styles$c.speedCon},[createVNode("img",{src:headImg("speed.png")},null),createVNode("div",null,[state$1.speed])])]),createVNode(Popup,{show:headData.speedShow,"onUpdate:show":$=>headData.speedShow=$,class:"popup-custom van-scale center-closeBtn settingBoxClass_drag",transition:"van-scale",teleport:"body",style:I.styleDrag.value,"overlay-style":{background:"rgba(0, 0, 0, 0.3)"}},{default:()=>{var $;return[createVNode(Speed,null,null),state$1.platform===IPlatform.PC&&createVNode(Dragbom,{showGuide:!(($=state$1.guideInfo)!=null&&$.teacherDrag),onGuideDone:F},null)]}})]),state$1.musicRendered&&!r.lessonTrainingId&&!r.questionId&&state$1.isConcert&&createVNode("div",{class:[styles$c.btn,state$1.playState==="play"&&d.value.disabled&&styles$c.disabled],onClick:()=>{toggleMusicSheet.toggle(!0)}},[createVNode("img",{class:styles$c.iconBtn,src:headImg("shenggui.png")},null),createVNode("span",null,[createTextVNode("声轨")])]),createVNode("div",{id:state$1.platform===IPlatform.PC?"teacherTop-6":"studnetT-6",style:{display:a.value.display?"":"none"},class:[styles$c.btn,a.value.disabled&&styles$c.disabled],onClick:()=>headTopData.settingMode=!0},[createVNode("img",{class:styles$c.iconBtn,src:headImg("icon_menu.png")},null),createVNode("span",null,[createTextVNode("设置")])])])]),createVNode("div",{id:"studnetT-7",style:{display:S.value.display?"":"none"},class:[styles$c.playBtn,S.value.disabled&&styles$c.disabled,state$1.platform===IPlatform.PC&&state$1.musicScoreBtnDirection==="left"?styles$c.playLeftButton:state$1.platform===IPlatform.PC&&state$1.musicScoreBtnDirection==="right"?styles$c.playRightButton:""],onClick:()=>togglePlay()},[createVNode("div",{class:styles$c.btnWrap},[createVNode("img",{style:{display:state$1.playState==="play"?"none":""},class:styles$c.iconBtn,src:headImg("icon_play.png")},null),createVNode("img",{style:{display:state$1.playState==="play"?"":"none"},class:styles$c.iconBtn,src:headImg("icon_pause.png")},null),createVNode(Circle,{style:{opacity:state$1.playState==="play"?1:0},class:styles$c.progress,"stroke-width":80,currentRate:state$1.playProgress,rate:100,color:"#FFED78","layer-color":"rgba(0,0,0,0)"},null)])]),createVNode("div",{id:"tips-step-9",style:{display:A.value.display?"":"none"},class:[styles$c.resetBtn,A.value.disabled&&styles$c.disabled,state$1.platform===IPlatform.PC&&state$1.musicScoreBtnDirection==="left"?styles$c.pauseLeftButton:state$1.platform===IPlatform.PC&&state$1.musicScoreBtnDirection==="right"?styles$c.pauseRightButton:""],onClick:()=>handleResetPlay()},[createVNode("img",{class:styles$c.iconBtn,src:headImg("icon_reset.png")},null)]),createVNode(Popup,{show:headTopData.settingMode,"onUpdate:show":$=>headTopData.settingMode=$,class:"popup-custom van-scale center-closeBtn settingBoxClass_drag",transition:"van-scale",teleport:"body",style:I.styleDrag.value,"overlay-style":{background:"rgba(0, 0, 0, 0.3)"}},{default:()=>{var $;return[createVNode(Settting,null,null),state$1.platform===IPlatform.PC&&createVNode(Dragbom,{showGuide:!(($=state$1.guideInfo)!=null&&$.teacherDrag),onGuideDone:F},null)]}}),createVNode(ModeView,null,null),E.value&&!r.isCbs&&P.value&&createVNode(TeacherTop,null,null),x.value&&!r.isCbs&&P.value&&createVNode(StudentTop,null,null)])}}),workHomeRef=ref(),data=reactive({trainingType:"",worke:{}}),HANDLE_WORK_ADD=()=>{var i;data.trainingType==="PRACTICE"&&((i=workHomeRef.value)==null||i.handleAdd())},WorkIndex=defineComponent({name:"workIndex",setup(i){const e=getQuery(),r=()=>{if(!data.trainingType)return;const o=data.trainingType==="PRACTICE"?"practise":"evaluating";headTopData.handleChangeModeType(o)},s=async()=>{const o=await api_lessonTrainingTrainingStudentDetail(e.workRecord);(o==null?void 0:o.code)===200&&(data.trainingType=o.data.trainingType,data.worke=o.data,r())};return watch(()=>evaluatingData.jsonLoadDone,()=>{data.trainingType==="EVALUATION"&&evaluatingData.jsonLoading&&evaluatingData.jsonLoadDone&&headTopData.handleChangeModeType("evaluating")}),onMounted(()=>{s()}),()=>createVNode(Fragment,null,[data.trainingType==="PRACTICE"&&createVNode(WorkHome,{ref:workHomeRef,workeData:data.worke},null),data.trainingType==="EVALUATION"&&createVNode(WorkEaluating,{workeData:data.worke},null)])}}),browserInfo$2=browser();let socketStartTime=0;const popImgs={icon_bg,icon_close,icon_btn:icon_btn$1,icon_success},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,socketErrorPop:!1,errorContents:"",socketErrorStatus:0,delayCheckSocketError:!1,isErrorState:!1,accompanyErrorType:"",isAudioPlayEnd:!1,preloadJson:!0,jsonLoading:!1,jsonLoadDone:!1,hideResultModal:!1}),sendOffsetTime=async i=>{var r;const e=await api_getDeviceDelay();api_midiMicDelay({header:{commond:"audioPlayStart",type:"SOUND_COMPARE"},body:{offsetTime:i,micDelay:(r=e==null?void 0:e.content)==null?void 0:r.value}})},handleStartEvaluat=async()=>{var i;if(state$1.modeType==="evaluating")handleCancelEvaluat();else if(state$1.platform!=="PC"){const e=await api_checkSocketStatus();((i=e==null?void 0:e.content)==null?void 0:i.status)==="connected"&&handleStopPlay()}else handleStopPlay();state$1.modeType=state$1.modeType==="evaluating"?"practise":"evaluating",state$1.modeType!=="evaluating"&&(evaluatingData.rendered=!1)},startCheckDelay=async()=>{var e;const i=await api_checkSocketStatus();return((e=i==null?void 0:i.content)==null?void 0:e.status)==="connected"?new Promise(r=>{r({checked:!0})}):(socketStartTime=+new Date,evaluatingData.socketErrorPop=!0,evaluatingData.socketErrorStatus=1,new Promise(r=>{r({checked:!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 r=Date.now()-evaluatingData.backtime-i;console.error("真正播放延迟",r,"currentTime:",i),await api_proxyServiceMessage({header:{commond:"audioPlayStart",type:"SOUND_COMPARE"},body:{offsetTime:r<0?0:r,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 r in evaluatingData.evaluatings)evaluatingData.evaluatings[r].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:r}=i.content;e.commond==="checking"&&(evaluatingData.soundEffectFrequency=r.frequency),(e==null?void 0:e.commond)==="measureScore"&&(console.log("🚀 ~ 评测返回:",i),addMeasureScore(r)),(e==null?void 0:e.commond)==="overall"&&(console.log("🚀 ~ 评测返回:",i),state$1.isHideEvaluatReportSaveBtn=!1,setTimeout(()=>{data.trainingType==="EVALUATION"&&!evaluatingData.isComplete?evaluatingData.hideResultModal=!0:evaluatingData.hideResultModal=!1,evaluatingData.resulstMode=!evaluatingData.isErrorState},200),evaluatingData.resultData={...r,...getLeveByScore(r.score)},closeToast())}},handleStartBegin=async i=>{var s,o;state$1.isAppPlay&&await api_cloudSetCurrentTime({currentTime:0,songID:state$1.examSongId}),evaluatingData.isComplete=!1,evaluatingData.evaluatings={},evaluatingData.resultData={},evaluatingData.backtime=0,resetPlaybackToStart(),evaluatingData.isAudioPlayEnd=!1;const e=await startEvaluating(evaluatingData.contentData);if((e==null?void 0:e.api)!=="startEvaluating"){Snackbar$1.error("请在APP端进行评测"),evaluatingData.startBegin=!1;return}if((s=e==null?void 0:e.content)!=null&&s.reson){showToast((o=e.content)==null?void 0:o.des),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.playType==="play"&&state$1.needTick||state$1.playType==="sing"&&state$1.needSingTick)if(state$1.playType==="play"&&!state$1.isOpenMetronome||state$1.playType==="sing"&&!state$1.isSingOpenMetronome){const a=await handleStartTick();if(console.log("🚀 ~ tickend:",a),!a){state$1.playState="paused",evaluatingData.startBegin=!1;return}}else handleStartTick();onPlay()}if(evaluatingData.isErrorState)return;let r=state$1.speed/state$1.originSpeed;r=parseFloat(r.toFixed(2)),await api_startRecordingCb({accompanimentState:state$1.setting.enableAccompaniment?1:0,firstNoteTime:i||0,speedRate:r},()=>{state$1.isAppPlay&&setTimeout(()=>{sendOffsetTime(0)},300)}),state$1.setting.camera&&(console.log("开始录制视频"),await api_startCapture()),state$1.isAppPlay&&(await api_cloudChangeSpeed({speed:state$1.originSpeed,originalSpeed:state$1.originSpeed,songID:state$1.examSongId}),audioData$1.progress=0,audioListStart(state$1.playState))},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 r;if(console.error("开始录音"),!evaluatingData.startBegin)return;let e=((r=i==null?void 0:i.content)==null?void 0:r.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"||(console.log("评测结束1"),endEvaluating({musicScoreId:state$1.examSongId}),!i&&data.trainingType==="EVALUATION"?showToast({message:"完整演奏结束才算作业分数!"}):showLoadingToast({message:"评分中",duration:0,overlay:!0,overlayClass:styles$g.scoreMode}),setTimeout(()=>{evaluatingData.startBegin=!1},500),evaluatingData.isComplete=i,state$1.setting.camera&&(console.log("结束录制视频"),api_endCapture()))},handleEndBegin=()=>{handleEndEvaluat(),handleStopPlay()},handleCancelEvaluat=i=>{evaluatingData.evaluatings={},evaluatingData.startBegin=!1,closeToast(),api_proxyServiceMessage({header:{commond:"recordCancel",type:"SOUND_COMPARE",status:200}}),cancelEvaluating(),handleStopPlay(),console.log("评测结束2"),endEvaluating({musicScoreId:state$1.examSongId}),state$1.setting.camera&&(console.log("结束录制视频"),api_endCapture())},handleViewReport=(i,e)=>{var o;const r=((o=evaluatingData.resultData)==null?void 0:o[i])||"";let s="";switch(e){case"gym":s=location.origin+location.pathname+"#/report/"+r;break;case"orchestra":s=location.origin+location.pathname+"report-share.html?id="+r;break;case"instrument":s=location.origin+location.pathname+"#/evaluat-report?id="+r+"&musicRenderType="+state$1.musicRenderType;break;default:s=location.origin+location.pathname+"report-share.html?id="+r;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)},handleAccompanyError=i=>{if(console.log("异常信息返回",i),i!=null&&i.content){const{type:e,reson:r}=i.content;switch(e){case"enterBackground":case"playError":case"socketError":if(evaluatingData.soundEffectMode){evaluatingData.socketErrorStatus=0,evaluatingData.delayCheckSocketError=!0,evaluatingData.socketErrorPop=e==="socketError",evaluatingData.accompanyErrorType=e;return}state$1.modeType==="evaluating"&&evaluatingData.startBegin&&handleCancelEvaluat(),closeTick(),evaluatingData.socketErrorStatus=0,evaluatingData.socketErrorPop=e==="socketError",evaluatingData.isErrorState=!0,evaluatingData.accompanyErrorType=e,resetPlaybackToStart();break}}},handleSocketStatus=i=>{var e;if(((e=i==null?void 0:i.content)==null?void 0:e.status)==="connected"){const r=+new Date;evaluatingData.delayCheckSocketError=!1;const s=r-socketStartTime;if(s<1e3){const o=1e3-s;console.log(o,99999),setTimeout(()=>{evaluatingData.socketErrorStatus=2},o)}}},hanldeConfirmPop=async()=>{api_checkSocketStatus(),evaluatingData.socketErrorStatus=1,socketStartTime=+new Date},hanldeClosePop=()=>{evaluatingData.socketErrorPop=!1,evaluatingData.socketErrorStatus=0},Evaluating=defineComponent({name:"evaluating",setup(){const i=usePageVisibility(),e=reactive({finger:!1,play_mode:"",enableAccompaniment:!0}),r=()=>{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":e.play_mode==="background"?"background":"mingSong",!0))},s=()=>{state$1.setting.displayFingering=e.finger,state$1.playSource=e.play_mode,e.enableAccompaniment||toggleMutePlayAudio(e.play_mode==="music"?"music":e.play_mode==="background"?"background":"mingSong",!1)};return watch(i,o=>{o=="hidden"&&evaluatingData.startBegin}),watch(()=>evaluatingData.socketErrorStatus,()=>{evaluatingData.socketErrorStatus===2&&setTimeout(()=>{evaluatingData.socketErrorPop=!1},1e3)}),onMounted(()=>{resetPlaybackToStart(),r(),evaluatingData.resultData={},evaluatingData.evaluatings={},evaluatingData.soundEffectFrequency=0,evaluatingData.checkStep=0,evaluatingData.rendered=!0,sendResult(handleScoreResult),hideComplexButton(handleComplexButton,!0),api_recordStartTime(recordStartTimePoint),addAccompanyError(handleAccompanyError),addSocketStatus(handleSocketStatus),state$1.isSelectMeasureMode||clearSelection(),console.log("加载评测模块成功")}),onUnmounted(()=>{evaluatingData.checkEnd=!1,evaluatingData.rendered=!1,resetPlaybackToStart(),removeResult(handleScoreResult),hideComplexButton(()=>{},!1),api_remove_recordStartTime(recordStartTimePoint),s(),removeAccompanyError(handleAccompanyError),removeSocketStatus(handleSocketStatus),api_disconnectSocket(),console.log("卸载评测模块成功")}),()=>createVNode("div",null,[createVNode("div",{class:styles$g.hiddenPop},[createVNode("img",{src:popImgs.icon_bg},null),createVNode("img",{src:popImgs.icon_btn},null),createVNode("img",{src:popImgs.icon_success},null),createVNode("img",{src:popImgs.icon_close},null)]),createVNode(Popup,{teleport:"body",closeOnClickOverlay:!1,class:["popup-custom","van-scale"],transition:"van-scale",show:evaluatingData.socketErrorPop,"onUpdate:show":o=>evaluatingData.socketErrorPop=o},{default:()=>[createVNode(AbnormalPop,{onConfirm:hanldeConfirmPop,onClose:hanldeClosePop},null)]})])}}),initMidi=(i,e)=>{const r=ref(!1);if(e){console.log("曲谱为midi,使用app播放"),r.value=!0,state$1.midiPlayIniting=!0;const s=getDuration(state$1.osmd);api_cloudDestroy(),api_cloudDetail({midi:e,denominator:s.denominator,numerator:s.numerator,originalSpeed:state$1.originSpeed,interval:50,duration:i*1e3},()=>{state$1.midiPlayIniting=!1,r.value=!1,e&&changeMode("music")}),state$1.durationNum=i}return{initial:r}},getActiveMidiId=()=>{var i,e,r,s,o,a,l;return(l=(a=(o=(s=(r=(e=(i=state$1.osmd)==null?void 0:i.sheet)==null?void 0:e.instruments)==null?void 0:r[0])==null?void 0:s.subInstruments)==null?void 0:o[0])==null?void 0:a.midiInstrumentID)!=null?l:0},changeMode=async(i,e)=>{var s,o,a,l;const r=i==="background"?"music":"background";if(console.log(!state$1.songs[i],i,r),state$1.isAppPlay){const u=new Map;for(const c of state$1.partListNames)u.set(c,60);api_cloudVolume({activeMidiId:getActiveMidiId(),activeMidiVolume:r==="background"?100:0,parts:Array.from(u.keys()).map(c=>({name:c,volume:u.get(c)}))})}state$1.playSource=i,e==="all"?((s=state$1.audiosInstance)==null||s.setMute(!0,state$1.songs[r]),(o=state$1.audiosInstance)==null||o.setMute(!0,state$1.songs[i])):((a=state$1.audiosInstance)==null||a.setMute(!0,state$1.songs[r]),(l=state$1.audiosInstance)==null||l.setMute(!1,state$1.songs[i]))},cloudToggleState=async i=>{const e=await api_cloudGetMediaStatus(),r=e==null?void 0:e.content.status;if(r==="init"||r==="suspend"&&i==="paused")return;r==="suspend"?(state$1.isSelectMeasureMode&&(audioData$1.progress=state$1.midiSectionStart),await api_cloudPlay({songID:state$1.examSongId,startTime:audioData$1.progress*1e3,originalSpeed:state$1.originSpeed,speed:state$1.modeType==="evaluating"?state$1.originSpeed:state$1.speed,hertz:440}),onPlay()):(await api_cloudSuspend({songID:state$1.examSongId}),state$1.modeType==="evaluating"&&(audioData$1.progress=0));const s=await api_cloudGetMediaStatus();state$1.playState=(s==null?void 0:s.content.status)==="suspend"?"paused":"play",console.log(s,"cloudGetMediaStatused")},icon_loading_img="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAc4AAACsCAMAAADFc7xnAAAC7lBMVEUAAAD///////////////////////8A0sX/////////////////////////////////////////lYb/o4YA08v/////////////yUD///////////8C2dAAzML/qIUA1Mr///////8BwrX/1QD/1AD/1QD///8B1cz/1QD///////8B0MYByb7/1QD/1QD///////8BzsP///8Bxbr/////kof/////1gAA1c3/1AD/1AAByb7/////1AD/15P///8B08kBxroD4Nn/1QD/1QD/lob/////1QD/mIYBy78Axrv///8B3dT/iIcC2ND/q4X/1QAByb4B0ccC39f/qIUC187/////1QD/ooUD3NQByL3/iocC2dACzcMCzMH/1QD///8CzsP///8C29T/1QD/oob/1gD/nIYC184CzcP/////mof/1wAA0ssA0sj/l4P/0wD/////lYb/noYBzcP/////nob/iYb/////rYX/////j4b/1pP/nob/oIb/////k4b/qoX/1QACyr//kIcC29P/1QD/15UD08n/1QAD4NgD1s4E39YBzcT/1QD/nYb/1AD/1wD/1pP/o4YC39j/1pMC0cgC08oBx7z/q4b/1AAC2M//mof/iof/15P/kIf/rYb/1pT/15T/rIYC183/q4b/1QD/////o4X/qYX/1pT/////////sIX/y5D/1wD/2Zj/jIf/h4cD4dr/q4X/r4X/2JMC0MX/////15P/1QD/15H/////1AD/1pMC2tEC29P/j4YC2ND/lIb/koYByL0C184By8EC1cwBwrYC3tf/jYb/q4X/kYb/iob/iI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2HOAsHfqq8kCdPWV9V4insUM/VfKtrahHLcBU1cA9wFLXyB5gaddIDbCUNVRyuwXYKfpVJaBm+qZ3fKH2etaJLcBF1DkGRC66JnBO20XVDFagHqKmxAAHTW8ohtZQ9YFeZQGF17mSrClMhjw0Udku5KYHLLKNZZ0r7LFd3Atd50p6IZorSU1/Oci0ZlLcL2N7JJiTXgDK/ZzLIfzoMwAAAABJRU5ErkJggg==",Loading=defineComponent({name:"loading",setup(){function i(r=2e3,s){let o=Date.now(),a=0;const l=setInterval(()=>{let u=Date.now()-o;if(u>=r){clearInterval(l),s(96);return}a=Math.min(100,u/r*100),s(a)},300)}const e=ref(0);return i(2e3,r=>{e.value=r}),()=>!state$1.audioDone&&createVNode("div",{class:styles$h.loading},[createVNode("div",{class:styles$h.loadingWrap},[createVNode("img",{class:styles$h.loadingIcon,src:icon_loading_img},null),createVNode(Progress,{percentage:e.value},null),createVNode("div",{class:styles$h.loadingTip},[createTextVNode("音频资源加载中,请稍后")])])])}}),audioData$1=reactive({songEle:null,backgroundEle:null,mingSongEle:null,songCollection:{songEle:null,backgroundEle:null,fanSongEle:null,banSongEle:null,mingSongEle:null,beatSongEle:null,betaBackgroundEle:null,betaFanSongEle:null,betaBanSongEle:null,betaMingSongEle:null},midiRender:!1,progress:0,duration:0}),midiRef=ref(),audioListStart=i=>{var e,r,s,o,a,l;if(i==="play"&&state$1.originSpeed!==0&&setAudioPlaybackRate(state$1.speed/state$1.originSpeed),state$1.isAppPlay){cloudToggleState(i);return}i==="play"?((e=audioData$1.songEle)==null||e.play(),(r=audioData$1.backgroundEle)==null||r.play(),(s=audioData$1.mingSongEle)==null||s.play()):i==="paused"&&((o=audioData$1.songEle)==null||o.pause(),(a=audioData$1.backgroundEle)==null||a.pause(),(l=audioData$1.mingSongEle)==null||l.pause())},setAudioPlaybackRate=i=>{if(state$1.isAppPlay){if(state$1.modeType==="evaluating")return;hanldeSetMidiPlaybackRate(i);return}audioData$1.songEle&&(audioData$1.songEle.playbackRate=i),audioData$1.backgroundEle&&(audioData$1.backgroundEle.playbackRate=i),audioData$1.mingSongEle&&(audioData$1.mingSongEle.playbackRate=i)},getAudioCurrentTime=()=>{var i,e,r,s;return state$1.isAppPlay?audioData$1.progress:state$1.playSource==="music"?((i=audioData$1.songEle)==null?void 0:i.currentTime)||audioData$1.progress:state$1.playSource==="background"?((e=audioData$1.backgroundEle)==null?void 0:e.currentTime)||audioData$1.progress:state$1.playSource==="mingSong"?((r=audioData$1.mingSongEle)==null?void 0:r.currentTime)||audioData$1.progress:((s=audioData$1.songEle)==null?void 0:s.currentTime)||audioData$1.progress},getAudioDuration=()=>{var i,e,r,s;if(state$1.isAppPlay){const o=((i=state$1.times[state$1.times.length-1||0])==null?void 0:i.endtime)||0;return audioData$1.duration||o}return((e=audioData$1.songEle)==null?void 0:e.duration)||((r=audioData$1.backgroundEle)==null?void 0:r.duration)||((s=audioData$1.mingSongEle)==null?void 0:s.duration)||audioData$1.duration},setAudioCurrentTime=(i,e=0)=>{if(state$1.isAppPlay){setMidiCurrentTime(e);return}audioData$1.songEle&&(audioData$1.songEle.currentTime=i),audioData$1.backgroundEle&&(audioData$1.backgroundEle.currentTime=i),audioData$1.mingSongEle&&(audioData$1.mingSongEle.currentTime=i),audioData$1.progress=i},toggleMutePlayAudio=(i,e)=>{i==="music"?audioData$1.songEle&&(audioData$1.songEle.muted=e):i==="background"?audioData$1.backgroundEle&&(audioData$1.backgroundEle.muted=e):i==="mingSong"&&audioData$1.mingSongEle&&(audioData$1.mingSongEle.muted=e)},changeSongSourceByBate=i=>{var o,a,l;const e=((o=audioData$1.songEle)==null?void 0:o.currentTime)||0,r=((a=audioData$1.backgroundEle)==null?void 0:a.currentTime)||0,s=((l=audioData$1.mingSongEle)==null?void 0:l.currentTime)||0;i?state$1.playType==="play"?(audioData$1.songEle=audioData$1.songCollection.songEle,audioData$1.backgroundEle=audioData$1.songCollection.backgroundEle):(audioData$1.songEle=audioData$1.songCollection.fanSongEle,audioData$1.backgroundEle=audioData$1.songCollection.banSongEle,audioData$1.mingSongEle=audioData$1.songCollection.mingSongEle):state$1.playType==="play"?(audioData$1.songEle=audioData$1.songCollection.beatSongEle||audioData$1.songCollection.songEle,audioData$1.backgroundEle=audioData$1.songCollection.betaBackgroundEle||audioData$1.songCollection.backgroundEle):(audioData$1.songEle=audioData$1.songCollection.betaFanSongEle||audioData$1.songCollection.fanSongEle,audioData$1.backgroundEle=audioData$1.songCollection.betaBanSongEle||audioData$1.songCollection.banSongEle,audioData$1.mingSongEle=audioData$1.songCollection.betaMingSongEle||audioData$1.songCollection.mingSongEle),audioData$1.songEle&&(audioData$1.songEle.currentTime=e),audioData$1.backgroundEle&&(audioData$1.backgroundEle.currentTime=r),audioData$1.mingSongEle&&(audioData$1.mingSongEle.currentTime=s),state$1.playSource==="music"?(audioData$1.songEle&&(audioData$1.songEle.muted=!1),audioData$1.backgroundEle&&(audioData$1.backgroundEle.muted=!0),audioData$1.mingSongEle&&(audioData$1.mingSongEle.muted=!0)):state$1.playSource==="background"?(audioData$1.songEle&&(audioData$1.songEle.muted=!0),audioData$1.backgroundEle&&(audioData$1.backgroundEle.muted=!1),audioData$1.mingSongEle&&(audioData$1.mingSongEle.muted=!0)):(audioData$1.songEle&&(audioData$1.songEle.muted=!0),audioData$1.backgroundEle&&(audioData$1.backgroundEle.muted=!0),audioData$1.mingSongEle&&(audioData$1.mingSongEle.muted=!1))},AudioList=defineComponent({name:"audio-list",setup(){const i=()=>{midiRef.value.contentWindow.handleRendered=()=>{audioData$1.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$1.songEle&&(audioData$1.songEle.muted=!1),audioData$1.backgroundEle&&(audioData$1.backgroundEle.muted=!0),audioData$1.mingSongEle&&(audioData$1.mingSongEle.muted=!0)):state$1.playSource==="background"?(audioData$1.songEle&&(audioData$1.songEle.muted=!0),audioData$1.backgroundEle&&(audioData$1.backgroundEle.muted=!1),audioData$1.mingSongEle&&(audioData$1.mingSongEle.muted=!0)):(audioData$1.songEle&&(audioData$1.songEle.muted=!0),audioData$1.backgroundEle&&(audioData$1.backgroundEle.muted=!0),audioData$1.mingSongEle&&(audioData$1.mingSongEle.muted=!1))});const e=u=>new Promise(c=>{const d=new Audio(u+"?v="+Date.now());d.load(),d.onloadedmetadata=()=>{c(d)},d.onerror=()=>{c(null)}}),r=u=>{var m,y,b;const c=(u==null?void 0:u.currentTime)||((m=u==null?void 0:u.content)==null?void 0:m.currentTime),d=(u==null?void 0:u.totalDuration)||((y=u==null?void 0:u.content)==null?void 0:y.totalDuration),g=c/1e3;if(audioData$1.progress=g,audioData$1.songEle&&(audioData$1.songEle.currentTime=g),audioData$1.backgroundEle&&(audioData$1.backgroundEle.currentTime=g),audioData$1.mingSongEle&&(audioData$1.mingSongEle.currentTime=g),audioData$1.duration=d/1e3,((b=u==null?void 0:u.content)==null?void 0:b.totalDuration)>1e3&&c>=d){if(evaluatingData.isAudioPlayEnd)return;evaluatingData.isAudioPlayEnd=!0,onEnded()}},s=u=>{var g,m,y;if(audioData$1.duration==0){const b=((g=state$1.times[state$1.times.length-1||0])==null?void 0:g.endtime)||0;audioData$1.duration=b}const c=(u==null?void 0:u.currentTime)||((m=u==null?void 0:u.content)==null?void 0:m.currentTime);u!=null&&u.totalDuration||((y=u==null?void 0:u.content)==null||y.totalDuration);const d=c/1e3;audioData$1.progress=d,state$1.sectionStatus&&state$1.section.length==2&&c>=state$1.section},o=u=>{u&&(console.log("midi结束"),audioData$1.progress=0,onEnded())};function a(){return Promise.all([e(state$1.music),e(state$1.accompany),e(state$1.fanSong),e(state$1.banSong),e(state$1.mingSong)])}function l(){return Promise.all([e(state$1.beatSong.music),e(state$1.beatSong.accompany),e(state$1.beatSong.fanSong),e(state$1.beatSong.banSong),e(state$1.beatSong.mingSong)])}return onMounted(async()=>{var u;if(state$1.playMode!=="MIDI"){console.time("音频加载时间");const[c,d,g,m,y]=await a();audioData$1.backgroundEle=d,audioData$1.songEle=c,Object.assign(audioData$1.songCollection,{songEle:c,backgroundEle:d,fanSongEle:g,banSongEle:m,mingSongEle:y}),c?(c.addEventListener("play",onPlay),c.addEventListener("ended",onEnded),d&&(d.muted=!0)):d&&(d.addEventListener("play",onPlay),d.addEventListener("ended",onEnded)),g?(g.addEventListener("play",onPlay),g.addEventListener("ended",onEnded),m&&(m.muted=!0),y&&(y.muted=!0)):m?(m.addEventListener("play",onPlay),m.addEventListener("ended",onEnded),y&&(y.muted=!0)):y&&(y.addEventListener("play",onPlay),y.addEventListener("ended",onEnded));const[b,S,A,E,x]=await l();Object.assign(audioData$1.songCollection,{beatSongEle:b,betaBackgroundEle:S,betaFanSongEle:A,betaBanSongEle:E,betaMingSongEle:x}),b?(b.addEventListener("play",onPlay),b.addEventListener("ended",onEnded),S&&(S.muted=!0)):S&&(S.addEventListener("play",onPlay),S.addEventListener("ended",onEnded)),A?(A.addEventListener("play",onPlay),A.addEventListener("ended",onEnded),E&&(E.muted=!0),x&&(x.muted=!0)):E?(E.addEventListener("play",onPlay),E.addEventListener("ended",onEnded),x&&(x.muted=!0)):x&&(x.addEventListener("play",onPlay),x.addEventListener("ended",onEnded)),state$1.audioDone=!0,console.timeEnd("音频加载时间"),console.log("音频数据:",audioData$1),api_playProgress(r)}else{state$1.audioDone=!0;const c=((u=state$1.times[state$1.times.length-1||0])==null?void 0:u.endtime)||0;audioData$1.duration=c,api_cloudTimeUpdae(s),api_cloudplayed(o)}}),onUnmounted(()=>{api_remove_cloudplayed(o),api_remove_cloudTimeUpdae(s)}),()=>createVNode(Fragment,null,[createVNode(Loading,null,null),createVNode("div",{class:styles$h.audioList},[state$1.playMode==="MIDI"&&state$1.speed!=0&&createVNode("iframe",{style:{display:"none"},ref:midiRef,src:"/midi/index.html",onLoad:i},null)])])}}),browserInfo$1=browser();let tipsTimer=null;const audioData=reactive({tick:null,tock:null}),metronomeData=reactive({disable:!0,initPlayerState:!1,lineShow:!1,isClick:!1,metro:null,metroList:[],activeList:[],metroMeasure:[],activeIndex:null,activeMetro:{},cursorMode:1,cursorTips:"",followAudioIndex:1,totalNumerator:2,xmlMp3BeatFixTime:0});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()}});watch(()=>metronomeData.lineShow,()=>{const i=document.querySelector("#cursorImg-0");i&&(metronomeData.lineShow?i.classList.add("lineHide"):i.classList.remove("lineHide"))});class Metronome{constructor(e){Vt(this,"playType","tick");Vt(this,"source",null);Vt(this,"source1",null);Vt(this,"source2",null);Vt(this,"createAudio",e=>new Promise(r=>{const s=new Audio(e);s.load(),s.onloadedmetadata=()=>{r(s)},s.onerror=()=>{r(null)}}));Vt(this,"sound",e=>{state$1.sectionStatus||(e=setCurrentTime(e));let r=-1,s=-1;for(let o=0;o=a)r=o,s=a;else break}if(r>-1&&metronomeData.activeIndex!==r){metronomeData.activeIndex=r,metronomeData.activeMetro=this.getStep(s),this.playAudio(),metronomeData.isClick=!1;return}metronomeData.isClick=!1});Vt(this,"playAudio",()=>{var r;if(state$1.modeType==="practise"&&state$1.playMode!=="MIDI"&&(state$1.playType==="play"&&state$1.playSource==="music"&&audioData$1.songCollection.beatSongEle||state$1.playType==="play"&&state$1.playSource==="background"&&audioData$1.songCollection.betaBackgroundEle||state$1.playType==="sing"&&state$1.playSource==="music"&&audioData$1.songCollection.betaFanSongEle||state$1.playType==="sing"&&state$1.playSource==="background"&&audioData$1.songCollection.betaBanSongEle||state$1.playType==="sing"&&state$1.playSource==="mingSong"&&audioData$1.songCollection.betaMingSongEle)||(console.log("播放自带的节拍器 233333"),!metronomeData.initPlayerState||state$1.playState==="paused"))return;const e=state$1.setting.beatVolume/100;this.source=((r=metronomeData.activeMetro)==null?void 0:r.index)===0?audioData.tick:audioData.tock,this.source.volume=metronomeData.disable?0:e,this.source.volume<=0?this.source.muted=!0:this.source.muted=!1,this.source.play()});Vt(this,"simulatePlayAudio",()=>{if(!metronomeData.initPlayerState)return;const e=state$1.setting.beatVolume/100;this.source=metronomeData.followAudioIndex===1?audioData.tick:audioData.tock,this.source.volume=metronomeData.disable?0:e,this.source.volume<=0?this.source.muted=!0:this.source.muted=!1,console.log("音量",this.source,this.source.volume),this.source.play(),metronomeData.followAudioIndex+=1,metronomeData.followAudioIndex=metronomeData.followAudioIndex>metronomeData.totalNumerator?1:metronomeData.followAudioIndex});Vt(this,"loadAudio1",()=>new howler.Howl({src:tockAndTick.tick}));Vt(this,"loadAudio2",()=>new howler.Howl({src:tockAndTick.tock}))}init(e){this.calculation(e),metronomeData.activeList=[],this.initPlayer()}initPlayer(){metronomeData.initPlayerState||Promise.all([this.createAudio(tickWav),this.createAudio(tockWav)]).then(([e,r])=>{e&&(audioData.tick=e),r&&(audioData.tock=r),metronomeData.initPlayerState=!0})}selectPlay(){}getStep(e){for(let r=0;ra.time===e);if(o)return o}return{}}calculation(e){var l,u,c,d,g,m,y,b,S,A,E,x,P,C;const r=[];let s=-1;for(let T=0;T-1&&B!=s){const N={measureNumberXML:B,measureNumberIndex:M,numerator:((y=(m=(g=_==null?void 0:_.noteElement)==null?void 0:g.sourceMeasure)==null?void 0:m.ActiveTimeSignature)==null?void 0:y.numerator)||0,start:_.measures[0].time,end:_.measures[_.measures.length-1].endtime,time:_.measures[_.measures.length-1].endtime-_.measures[0].time,stave_x:((x=(E=(A=(S=(b=_==null?void 0:_.noteElement)==null?void 0:b.sourceMeasure)==null?void 0:S.verticalMeasureList)==null?void 0:A[0])==null?void 0:E.stave)==null?void 0:x.x)||0,end_x:((P=_==null?void 0:_.stave)==null?void 0:P.end_x)||0||0,stepList:[],svgs:[],isRestFlag:_.isRestFlag};if([121].includes(state$1.subjectId)){const I=e.filter(R=>{var F,k;return((k=(F=R==null?void 0:R.noteElement)==null?void 0:F.sourceMeasure)==null?void 0:k.measureListIndex)==M});_.measures=I,N.start=_.measures[0].time,N.end=_.measures[_.measures.length-1].endtime,N.time=_.measures[_.measures.length-1].endtime-_.measures[0].time;try{const R=_.noteElement.sourceMeasure.verticalMeasureList.reduce((k,V)=>(k.push(...V.vfVoices[1].tickables),k),[]),F=[];N.svgs=R.map(k=>{const V=k.getBoundingBox().x;if(!F.includes(V)&&k.duration!=="w")return F.push(V),k._start_x=V,k}).filter(Boolean).sort((k,V)=>k._start_x-V._start_x)}catch(R){console.log(R)}N.stepList=calculateMutilpleMetroStep(_.measures,N)}else{let I=_.measures;state$1.isCombineRender&&(I=I.filter(R=>R.MeasureNumberXML===N.measureNumberXML)),N.stepList=calculateMetroStep(I,N)}r.push(N),s=B}}console.log(r,r.length,"小节汇总");let o=[];const a=[];try{for(let T=0;T-1?`${k} + ${N}%`:`${k}px + ${N}%`:`${N}%`,_.stepList[I]=F}a[T].push({index:I,time:R,left:(F==null?void 0:F.indexOf("%"))>-1?`calc(${F})`:F,measureNumberXML:_.measureNumberXML,isRestFlag:_.isRestFlag})}}}catch(T){console.log(T)}metronomeData.metroList=o,metronomeData.metroMeasure=a,metronomeData.activeMetro=((C=a[0])==null?void 0:C[0])||{}}}function calculateMetroStep(i,e){var u,c,d,g,m,y,b,S,A,E,x,P,C,T,_,B,M,N,I,R,F,k,V,D,$,O,q,G,U,Z,W,K,ye,ae,Y,Q,he,ge,Se,Ie,Me,te,oe,z,me,pe,ee,ne,fe,_e,Ae,Pe,Be,Re,xe,ce,Ee,de,De,Ne,Ue,Ye,$e,Ke,Qe,tt,ct;const s=i.reduce((it,ot)=>(it+=ot._noteLength,it),0)/e.numerator;if(i.length===1){const it=i[0].svgElement;if(it&&!it.isRest()){const ot=((m=(g=(d=(c=(u=it==null?void 0:it.attrs)==null?void 0:u.el)==null?void 0:c.parentElement)==null?void 0:d.parentElement)==null?void 0:g.getBoundingClientRect)==null?void 0:m.call(g))||{x:0,right:0};let bt=((S=(b=(y=it==null?void 0:it.attrs)==null?void 0:y.el)==null?void 0:b.getBoundingClientRect)==null?void 0:S.call(b))||{x:0},nt=Math.abs(ot.right-bt.x)/e.numerator,ht=[];for(let ze=0;ze=1){o-=s;let ht=((k=(F=(R=(I=(N=(M=ot==null?void 0:ot.svgElement)==null?void 0:M.attrs)==null?void 0:N.el)==null?void 0:I.parentElement)==null?void 0:R.parentElement)==null?void 0:F.getBoundingClientRect)==null?void 0:k.call(F))||{x:0};if(state$1.musicRenderType!=="staff"&&(ht=((U=(G=(q=(O=($=(D=(V=ot==null?void 0:ot.svgElement)==null?void 0:V.attrs)==null?void 0:D.el)==null?void 0:$.parentElement)==null?void 0:O.parentElement)==null?void 0:q.querySelector(".vf-stave"))==null?void 0:G.getBoundingClientRect)==null?void 0:U.call(G))||{x:0}),!ht.width&&a.length>0&&(ht=state$1.musicRenderType!=="staff"?((he=(Q=(Y=(ae=(ye=(K=(W=(Z=a[0])==null?void 0:Z.svgElement)==null?void 0:W.attrs)==null?void 0:K.el)==null?void 0:ye.parentElement)==null?void 0:ae.parentElement)==null?void 0:Y.querySelector(".vf-stave"))==null?void 0:Q.getBoundingClientRect)==null?void 0:he.call(Q))||{x:0}:((z=(oe=(te=(Me=(Ie=(Se=(ge=a[0])==null?void 0:ge.svgElement)==null?void 0:Se.attrs)==null?void 0:Ie.el)==null?void 0:Me.parentElement)==null?void 0:te.parentElement)==null?void 0:oe.getBoundingClientRect)==null?void 0:z.call(oe))||{x:0}),a.length>0){let ie=((fe=(ne=(ee=(pe=(me=a[0])==null?void 0:me.svgElement)==null?void 0:pe.attrs)==null?void 0:ee.el)==null?void 0:ne.getBoundingClientRect)==null?void 0:fe.call(ne))||{x:0},le=ie.x-ht.x;if(a[0]._noteLength/s>=1){const we=((Re=(Be=(Pe=(Ae=(_e=i[a[0].index+1])==null?void 0:_e.svgElement)==null?void 0:Ae.attrs)==null?void 0:Pe.el)==null?void 0:Be.getBoundingClientRect)==null?void 0:Re.call(Be))||{x:ht.right},ke=Math.abs(ie.x-we.x)/2;le=ie.x-ht.x+ke}l.push(le)}else{let le=(((de=(Ee=(ce=(xe=ot==null?void 0:ot.svgElement)==null?void 0:xe.attrs)==null?void 0:ce.el)==null?void 0:Ee.getBoundingClientRect)==null?void 0:de.call(Ee))||{x:0}).x-ht.x;l.push(le)}a=[];let ze=((Ye=(Ue=(Ne=(De=ot==null?void 0:ot.svgElement)==null?void 0:De.attrs)==null?void 0:Ne.el)==null?void 0:Ue.getBoundingClientRect)==null?void 0:Ye.call(Ue))||{x:0},lt=ze.x-ht.x,At=0;if(nt>1){const ie=((ct=(tt=(Qe=(Ke=($e=i[it+1])==null?void 0:$e.svgElement)==null?void 0:Ke.attrs)==null?void 0:Qe.el)==null?void 0:tt.getBoundingClientRect)==null?void 0:ct.call(tt))||{x:ht.right};At=Math.abs(ze.x-ie.x)/nt}for(let ie=1;ieNumber.EPSILON&&o>0&&a.push(ot)}return l=l.reduce((it,ot)=>(it.includes(ot)?it.push(void 0):it.push(ot),it),[]),l}function calculateMutilpleMetroStep(i,e){var u,c,d,g,m,y,b,S,A,E,x,P,C,T,_,B,M,N,I;const r=e.time/e.numerator,s=((b=(y=(m=(g=(d=(c=(u=i[0])==null?void 0:u.svgElement)==null?void 0:c.attrs)==null?void 0:d.el)==null?void 0:g.parentElement)==null?void 0:m.parentElement)==null?void 0:y.getBoundingClientRect)==null?void 0:b.call(y))||{x:0};if(i.length===1){const R=e.svgs[0];let F=((E=(A=(S=R==null?void 0:R.attrs)==null?void 0:S.el)==null?void 0:A.getBoundingClientRect)==null?void 0:E.call(A))||{x:0};return R&&!R.isRest()?[F.x-s.x]:[]}let o=0,a=[],l=[];for(let R=0;Rr){o-=r;let $=D.x-s.x;a.length>0&&(V=(_=(T=e.svgs[a[0]._index])==null?void 0:T.attrs)==null?void 0:_.el,D=((B=V==null?void 0:V.getBoundingClientRect)==null?void 0:B.call(V))||{x:0},$=D.x-s.x),l.push($),a=[]}else a.push(F);if(Math.abs(o-r)<.001){let $=D.x-s.x;a.length>0&&(V=(N=(M=e.svgs[a[0]._index])==null?void 0:M.attrs)==null?void 0:N.el,D=((I=V==null?void 0:V.getBoundingClientRect)==null?void 0:I.call(V))||{x:0},$=D.x-s.x),l.push($),o=0,a=[]}}return l=l.reduce((R,F)=>(R.includes(F)?R.push(void 0):R.push(F),R),[]),l}function setCurrentTime(i){return browserInfo$1.huawei||browserInfo$1.xiaomi?i+=.125:browserInfo$1.android?i+=.11:browserInfo$1.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 scriptRel="modulepreload",assetsURL=function(i,e){return new URL(i,e).href},seen={},__vitePreload=function i(e,r,s){if(!r||r.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=assetsURL(a,s),a in seen)return;seen[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(!!s)for(let g=o.length-1;g>=0;g--){const m=o[g];if(m.href===a&&(!l||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":scriptRel,l||(d.as="script",d.crossOrigin=""),d.href=a,document.head.appendChild(d),l)return new Promise((g,m)=>{d.addEventListener("load",g),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${a}`)))})})).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 r=i;return typeof r=="string"&&(r=r.toLocaleLowerCase().replace(/ /g,"")),{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",whistling:"whistling",nai:"melodica",15:"baroque-recorder",16:"baroque-recorder"}[r]||0}else if(e==="ENSEMBLE"){let r=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 o;if(typeof r=="string"){for(let a in s)if(a===r){o=s[a];break}}else o=s.code;return o}return 0},matchVoicePart=(i,e)=>{if(e==="SINGLE")return{33:"pan-flute",34:"ocarina",35:"hulusi-flute",37:"piccolo",36:"melodica",38:"baroque-recorder",39:"whistling",1:2,5:5,3:4,11:12,13:14,12:13,14:15,16:17}[i];{let r=i;const s={Piccolo:"piccolo",Flute:2,"Flute 1":2,"Flute 2":2,Oboe:1,"Clarinet in Bb":4,"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",whistling:"whistling",nai:"melodica",BaroqueRecorder:"baroque-recorder","Drum Set":24,Marimba:26,Vibraphone:27,"Tubular Bells":30,Mallets:32};let o;if(typeof r=="string"){r=r.toLocaleLowerCase().replace(/ /g,"");for(let a in s){let l=a;if(typeof a=="string"&&(l=l.toLocaleLowerCase().replace(/ /g,"")),l===r){o=s[a];break}}}else o=s.code;return o}},subjectFingering=i=>{switch(i){case 2:return{name:"flute",direction:"transverse",height:"1.6rem",scaleData:{scale:"0.8",offset:"3.64rem"},hasTizhi:!0,id:1};case 4:return{name:"clarinet",direction:"vertical",width:"3rem",hasTizhi:!0,id:3};case 5:case 6:return{name:"saxophone",direction:"vertical",width:"4.34rem",hasTizhi:!0,id:5};case 12:return{name:"trumpet",direction:"transverse",height:"1.6rem",scaleData:{scale:"0.8",offset:"3.64rem"},hasTizhi:!1,id:11};case 13:return{name:"horn",direction:"vertical",width:"4.98rem",hasTizhi:!1,id:12};case 14:return{name:"trombone",direction:"transverse",height:"1.6rem",scaleData:{scale:"0.8",offset:"3.64rem"},hasTizhi:!1,id:13};case 15:return{name:"up-bass-horn",direction:"vertical",width:"4.34rem",hasTizhi:!1,id:14};case 17:return{name:"tuba",direction:"vertical",width:"4.34rem",hasTizhi:!1,id:16};case 120:return{name:"piccolo",direction:"vertical",width:"3rem",orientation:0,hasTizhi:!0,id:2};case"piccolo":return{name:"piccolo",direction:"vertical",width:"3rem",orientation:0,code:"竖笛",hasTizhi:!0,id:37};case"hulusi-flute":return{name:"hulusi-flute",direction:"vertical",width:"3rem",orientation:0,code:"葫芦丝",hasTizhi:!1,id:35};case"pan-flute":return{name:"pan-flute",direction:"transverse",height:"2rem",scaleData:{scale:"0.8",offset:"3.64rem"},disabledFinger:!0,orientation:0,code:"排箫",hasTizhi:!1,id:33};case"ocarina":return{name:"ocarina",direction:"vertical",width:"3rem",disabledFinger:!0,orientation:0,code:"陶笛",hasTizhi:!1,id:34};case"whistling":return{name:"whistling",direction:"vertical",width:"3rem",disabledFinger:!0,orientation:0,code:"陶笛",hasTizhi:!1,id:39};case"melodica":return{name:"melodica",direction:"transverse",height:"2rem",scaleData:{scale:"0.8",offset:"3.64rem"},orientation:0,code:"口风琴",hasTizhi:!1,id:36};case"baroque-recorder":return{name:"baroque-recorder",direction:"vertical",width:"3rem",orientation:0,code:"竖笛",hasTizhi:!0,id:38};default:return typeof i=="number"?{id:i}:{}}},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-8848f89c.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"ocarina1":return{json:(await __vitePreload(()=>import("./index-ad04d4cf.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"ocarina2":return{json:(await __vitePreload(()=>import("./index-c7652d9b.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"whistling":return{json:(await __vitePreload(()=>import("./index-c5bb109e.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"whistling1":return{json:(await __vitePreload(()=>import("./index-38262e39.js"),[],import.meta.url)).default,relationship:relationships.ocarina,width:"180px",styles:{marginTop:"auto"}};case"whistling2":return{json:(await __vitePreload(()=>import("./index-6972bb98.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}},getMusicSheetDetail=i=>request.get("/musicSheet/cbsDetail/"+i);class AJAX{static ajax(e,r=9e3){let s;const o=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=r,new Promise((a,l)=>{s.onreadystatechange=()=>{s.readyState===XMLHttpRequest.DONE&&(s.status===200||s.status===0&&s.responseText?a(s.responseText):l(new Error("Could not retrieve requested URL "+s.status)))},s.ontimeout=u=>{l(new Error("Server request Timeout"))},s.overrideMimeType(o),s.open("GET",e,!0),s.send()})}}const _Fraction=class{constructor(i=0,e=1,r=0,s=!0){this.numerator=0,this.denominator=1,this.wholeValue=0,this.numerator=i,this.denominator=e,this.wholeValue=r,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 r=i.clone();return r.Add(e),r}static minus(i,e){const r=i.clone();return r.Sub(e),r}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)>=1&&Math.abs(i)>=1;)i>e?i-=e:e-=i;const r=Math.round(i);return Math.max(r,1)}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 r=this.GetExpandedNumerator();for(;ei;)e.Numerator++;if(this.numerator>this.denominator){const r=new _Fraction(this.numerator-1,this.denominator,this.wholeValue);for(;r.Denominator>i;)r.Numerator--;if(r.Denominator_Fraction.maximumAllowedNumber){const r=this.denominator/_Fraction.maximumAllowedNumber;this.numerator=Math.round(this.numerator/r),this.denominator=Math.round(this.denominator/r)}if(this.numerator>_Fraction.maximumAllowedNumber){const r=this.numerator/_Fraction.maximumAllowedNumber;this.numerator=Math.round(this.numerator/r),this.denominator=Math.round(this.denominator/r)}}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,r){for(let s=0,o=e.length;s(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,r,s,o,a,l=""){super(e),super.parentMeasure=s,this.NumberXml=a,this.dynamicType=i,this.label=l,this.staffNumber=r,this.activeInstantaneousDynamic=o,this.startVolume=1,this.endVolume=1,this.setStartAndEndVolume(),l!==""&&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 r;if(this.EndMultiExpression?r=this.EndMultiExpression.AbsoluteTimestamp:r=Fraction$1.plus(this.startMultiExpression.SourceMeasureParent.AbsoluteTimestamp,this.startMultiExpression.SourceMeasureParent.Duration),i.lt(e))return-1;if(r.lt(i))return-2;const s=Fraction$1.minus(i,e).RealValue/Fraction$1.minus(r,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,r){this.message=e,r&&(this.message+=" "+r.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,r){i.exports?i.exports=r():e.log=r()})(commonjsGlobal,function(){var e=function(){},r="undefined",s=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function a(A,E){var x=A[E];if(typeof x.bind=="function")return x.bind(A);try{return Function.prototype.bind.call(x,A)}catch(P){return function(){return Function.prototype.apply.apply(x,[A,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(A){return A==="debug"&&(A="log"),typeof console===r?!1:A==="trace"&&s?l:console[A]!==void 0?a(console,A):console.log!==void 0?a(console,"log"):e}function c(A,E){for(var x=0;x=0&&I<=P.levels.SILENT){if(C=I,R!==!1&&_(I),c.call(P,I,A),typeof console===r&&I"u"}i.isUndefined=u;function c(m){return Object.prototype.toString.call(m)==="[object String]"}i.isString=c;function d(m){return u(m)||!l(m)?function(y,b){return y=0;a--)if(s(i[a],e))return a;return-1}arrays$4.lastIndexOf=lastIndexOf;function contains(i,e,r){return indexOf$1(i,e,r)>=0}arrays$4.contains=contains;function remove(i,e,r){var s=indexOf$1(i,e,r);return s<0?!1:(i.splice(s,1),!0)}arrays$4.remove=remove;function frequency(i,e,r){for(var s=r||util$a.defaultEquals,o=i.length,a=0,l=0;l=i.length||r<0||r>=i.length)return!1;var s=i[e];return i[e]=i[r],i[r]=s,!0}arrays$4.swap=swap;function toString$1(i){return"["+i.toString()+"]"}arrays$4.toString=toString$1;function forEach(i,e){for(var r=0,s=i;re.size())return!1;var r=!0;return this.forEach(function(s){return e.contains(s)?!0:(r=!1,!1)}),r},i.prototype.remove=function(e){return this.contains(e)?(this.dictionary.remove(e),!0):!1},i.prototype.forEach=function(e){this.dictionary.forEach(function(r,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,r){if(r===void 0&&(r=1),util$7.isUndefined(e)||r<=0)return!1;if(this.contains(e))this.dictionary.getValue(e).copies+=r;else{var s={value:e,copies:r};this.dictionary.setValue(e,s)}return this.nElements+=r,!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,r){if(r===void 0&&(r=1),util$7.isUndefined(e)||r<=0)return!1;if(this.contains(e)){var s=this.dictionary.getValue(e);return r>s.copies?this.nElements-=s.copies:this.nElements-=r,s.copies-=r,s.copies<=0&&this.dictionary.remove(e),!0}else return!1},i.prototype.toArray=function(){for(var e=[],r=this.dictionary.values(),s=0,o=r;sthis.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(r===this.nElements)this.lastNode.next=s,this.lastNode=s;else if(r===0)s.next=this.firstNode,this.firstNode=s;else{var o=this.nodeAtIndex(r-1);if(o===null)return!1;s.next=o.next,o.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 r=this.nodeAtIndex(e);if(r!==null)return r.element},i.prototype.indexOf=function(e,r){var s=r||util$6.defaultEquals;if(util$6.isUndefined(e))return-1;for(var o=this.firstNode,a=0;o!==null;){if(s(o.element,e))return a;a++,o=o.next}return-1},i.prototype.contains=function(e,r){return this.indexOf(e,r)>=0},i.prototype.remove=function(e,r){var s=r||util$6.defaultEquals;if(this.nElements<1||util$6.isUndefined(e))return!1;for(var o=null,a=this.firstNode;a!==null;){if(s(a.element,e))return o===null?(this.firstNode=a.next,a===this.lastNode&&(this.lastNode=null)):a===this.lastNode?(this.lastNode=o,o.next=a.next,a.next=null):(o.next=a.next,a.next=null),this.nElements--,!0;o=a,a=a.next}return!1},i.prototype.clear=function(){this.firstNode=null,this.lastNode=null,this.nElements=0},i.prototype.equals=function(e,r){var s=r||util$6.defaultEquals;return!(e instanceof i)||this.size()!==e.size()?!1:this.equalsAux(this.firstNode,e.firstNode,s)},i.prototype.equalsAux=function(e,r,s){for(;e!==null&&r!==null;){if(!s(e.element,r.element))return!1;e=e.next,r=r.next}return!0},i.prototype.removeElementAtIndex=function(e){if(!(e<0||e>=this.nElements||this.firstNode===null||this.lastNode===null)){var r;if(this.nElements===1)r=this.firstNode.element,this.firstNode=null,this.lastNode=null;else{var s=this.nodeAtIndex(e-1);s===null?(r=this.firstNode.element,this.firstNode=this.firstNode.next):s.next===this.lastNode&&(r=this.lastNode.element,this.lastNode=s),s!==null&&s.next!==null&&(r=s.next.element,s.next=s.next.next)}return this.nElements--,r}},i.prototype.forEach=function(e){for(var r=this.firstNode;r!==null&&e(r.element)!==!1;)r=r.next},i.prototype.reverse=function(){for(var e=null,r=this.firstNode,s=null;r!==null;)s=r.next,r.next=e,e=r,r=s;s=this.firstNode,this.firstNode=this.lastNode,this.lastNode=s},i.prototype.toArray=function(){for(var e=[],r=this.firstNode;r!==null;)e.push(r.element),r=r.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 r=this.firstNode,s=0;s0&&(e=e.rightCh);return e},i.prototype.transplant=function(e,r){e.parent===null?this.root=r:e===e.parent.leftCh?e.parent.leftCh=r:e.parent.rightCh=r,r!==null&&(r.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 r=this.minimumAux(e.rightCh);r.parent!==e&&(this.transplant(r,r.rightCh),r.rightCh=e.rightCh,r.rightCh.parent=r),this.transplant(e,r),r.leftCh=e.leftCh,r.leftCh.parent=r}},i.prototype.inorderTraversalAux=function(e,r,s){e===null||s.stop||(this.inorderTraversalAux(e.leftCh,r,s),!s.stop&&(s.stop=r(e.element)===!1,!s.stop&&this.inorderTraversalAux(e.rightCh,r,s)))},i.prototype.levelTraversalAux=function(e,r){var s=new Queue_1$1.default;for(e!==null&&s.enqueue(e),e=s.dequeue()||null;e!=null;){if(r(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,r,s){e===null||s.stop||(s.stop=r(e.element)===!1,!s.stop&&(this.preorderTraversalAux(e.leftCh,r,s),!s.stop&&this.preorderTraversalAux(e.rightCh,r,s)))},i.prototype.postorderTraversalAux=function(e,r,s){e===null||s.stop||(this.postorderTraversalAux(e.leftCh,r,s),!s.stop&&(this.postorderTraversalAux(e.rightCh,r,s),!s.stop&&(s.stop=r(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 r=null,s=this.root;s!==null;){var o=this.compare(e.element,s.element);if(o===0)return null;o<0?(r=s,s=s.leftCh):(r=s,s=s.rightCh)}return e.parent=r,r===null?this.root=e:this.compare(e.element,r.element)<0?r.leftCh=e:r.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,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])};return function(e,r){i(e,r);function s(){this.constructor=e}e.prototype=r===null?Object.create(r):(s.prototype=r.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,r){return r>=this.data.length?e>=this.data.length?-1:e:this.compare(this.data[e],this.data[r])<=0?e:r},i.prototype.siftUp=function(e){for(var r=this.parentIndex(e);e>0&&this.compare(this.data[r],this.data[e])>0;)arrays$1.swap(this.data,r,e),e=r,r=this.parentIndex(e)},i.prototype.siftDown=function(e){for(var r=this.minIndex(this.leftChildIndex(e),this.rightChildIndex(e));r>=0&&this.compare(this.data[e],this.data[r])>0;)arrays$1.swap(this.data,r,e),e=r,r=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 r=collections.compareToEquals(this.compare);return arrays$1.contains(this.data,e,r)},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,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])};return function(e,r){i(e,r);function s(){this.constructor=e}e.prototype=r===null?Object.create(r):(s.prototype=r.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,r){this.key=e,this.value=r}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(r){var s=i.call(this,r)||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(r){var s=this.tail.prev;s.next=r,r.prev=s,r.next=this.tail,this.tail.prev=r},e.prototype.getLinkedDictionaryPair=function(r){if(!util$4.isUndefined(r)){var s="$"+this.toStr(r),o=this.table[s];return o}},e.prototype.getValue=function(r){var s=this.getLinkedDictionaryPair(r);if(!util$4.isUndefined(s))return s.value},e.prototype.remove=function(r){var s=this.getLinkedDictionaryPair(r);if(!util$4.isUndefined(s))return i.prototype.remove.call(this,r),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(r,s){var o="$"+this.toStr(s.key);s.next=r.next,s.prev=r.prev,this.remove(r.key),s.prev.next=s,s.next.prev=s,this.table[o]=s,++this.nElements},e.prototype.setValue=function(r,s){if(!(util$4.isUndefined(r)||util$4.isUndefined(s))){var o=this.getLinkedDictionaryPair(r),a=new LinkedDictionaryPair(r,s),l="$"+this.toStr(r);if(util$4.isUndefined(o)){this.appendToTail(a),this.table[l]=a,++this.nElements;return}else return this.replace(o,a),o.value}},e.prototype.keys=function(){var r=[];return this.forEach(function(s,o){r.push(s)}),r},e.prototype.values=function(){var r=[];return this.forEach(function(s,o){r.push(o)}),r},e.prototype.forEach=function(r){for(var s=this.head.next;!isHeadOrTailLinkedDictionaryPair(s);){var o=r(s.key,s.value);if(o===!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,r,s){s===void 0&&(s=!1),this.dict=new Dictionary_1$2.default(e),this.equalsF=r||util$3.defaultEquals,this.allowDuplicate=s}return i.prototype.getValue=function(e){var r=this.dict.getValue(e);return util$3.isUndefined(r)?[]:arrays.copy(r)},i.prototype.setValue=function(e,r){if(util$3.isUndefined(e)||util$3.isUndefined(r))return!1;var s=this.dict.getValue(e);return util$3.isUndefined(s)?(this.dict.setValue(e,[r]),!0):!this.allowDuplicate&&arrays.contains(s,r,this.equalsF)?!1:(s.push(r),!0)},i.prototype.remove=function(e,r){if(util$3.isUndefined(r)){var s=this.dict.remove(e);return!util$3.isUndefined(s)}var o=this.dict.getValue(e);return!util$3.isUndefined(o)&&arrays.remove(o,r,this.equalsF)?(o.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(),r=[],s=0,o=e;s-1&&this.insertIdIntoRoot(r,s);for(var o in this.nodes)if(this.nodes.hasOwnProperty(o)){var a=this.findNodeId(o,e);a>-1&&this.insertIdIntoNode(o,r,a)}},i.prototype.insertIdAfterId=function(e,r){var s=this.findRootId(e);s>-1&&this.insertIdIntoRoot(r,s+1);for(var o in this.nodes)if(this.nodes.hasOwnProperty(o)){var a=this.findNodeId(o,e);a>-1&&this.insertIdIntoNode(o,r,a+1)}},i.prototype.insertIdIntoId=function(e,r){this.nodeInsertAtEnd(e,r),this.nodes[r]=[]},i.prototype.insertIdIntoRoot=function(e,r){if(r===void 0)this.rootInsertAtEnd(e);else if(r<0){var s=this.rootIds.length;this.rootIds.splice(r+s+1,0,e)}else this.rootIds.splice(r,0,e);this.nodes[e]=this.nodes[e]||[]},i.prototype.insertIdIntoNode=function(e,r,s){if(this.nodes[e]=this.nodes[e]||[],this.nodes[r]=this.nodes[r]||[],s===void 0)this.nodeInsertAtEnd(e,r);else if(s<0){var o=this.nodes[e].length;this.nodes[e].splice(s+o+1,0,r)}else this.nodes[e].splice(s,0,r)},i.prototype.moveId=function(e,r,s){var o=e,a=this.findRootId(o);this.nodes[r];for(var l in this.nodes)if(this.nodes.hasOwnProperty(l)){this.findNodeId(l,r);break}var u=r,c=this.findRootId(u);this.nodes[r];for(var l in this.nodes)if(this.nodes.hasOwnProperty(l)){this.findNodeId(l,r);break}if(a>-1)if(c>-1)switch(this.rootDelete(a),c>a&&c--,s){case Direction.BEFORE:this.insertIdIntoRoot(o,c);break;case Direction.AFTER:this.insertIdIntoRoot(o,c+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(u,o);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(u,o);break}else{this.rootDelete(a);for(var l in this.nodes)if(this.nodes.hasOwnProperty(l)){var d=this.findNodeId(l,u);if(d>-1){switch(s){case Direction.BEFORE:this.insertIdIntoNode(l,o,d);break;case Direction.AFTER:this.insertIdIntoNode(l,o,d+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(u,o);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(u,o);break}break}}}else if(c>-1){for(var l in this.nodes)if(this.nodes.hasOwnProperty(l)){var d=this.findNodeId(l,o);if(d>-1){this.nodeDeleteAtIndex(l,d);break}}switch(s){case Direction.BEFORE:this.insertIdIntoRoot(o,c);break;case Direction.AFTER:this.insertIdIntoRoot(o,c+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(u,o);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(u,o);break}}else{for(var l in this.nodes)if(this.nodes.hasOwnProperty(l)){var d=this.findNodeId(l,o);if(d>-1){this.nodeDeleteAtIndex(l,d);break}}for(var l in this.nodes)if(this.nodes.hasOwnProperty(l)){var d=this.findNodeId(l,u);if(d>-1){switch(s){case Direction.BEFORE:this.insertIdIntoNode(l,o,d);break;case Direction.AFTER:this.insertIdIntoNode(l,o,d+1);break;case Direction.INSIDE_AT_START:this.nodeInsertAtStart(u,o);break;case Direction.INSIDE_AT_END:this.nodeInsertAtEnd(u,o);break}break}}}},i.prototype.swapArrayElements=function(e,r,s){var o=e[r];return e[r]=e[s],e[s]=o,e},i.prototype.rootDeleteId=function(e){var r=this.findRootId(e);r>-1&&this.rootDelete(r)},i.prototype.nodeAndSubNodesDelete=function(e){for(var r=[],s=0;s(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,r){e instanceof ContinuousDynamicExpression?this.continuousDynamicExpression=e:e instanceof InstantaneousDynamicExpression&&(this.instantaneousDynamicExpression=e),this.staffNumber=r}static Compare(e,r){return e.parMultiExpression().AbsoluteTimestamp.CompareTo(r.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,r){super(void 0),this.rhythm=e,this.numerator=e.Numerator,this.denominator=e.Denominator,this.symbolEnum=r}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 r=this;return r===e?!0:!r||!e?!1:r.numerator===e.numerator&&r.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,r,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=[],this.SkipInvisibleNotes=!0,this.testNoteIdx=0;try{this.frontReached=!0,this.musicSheet=e,this.currentBpm=e.userStartTempoInBPM,this.currentVoiceEntries=void 0,this.frontReached=!1;for(const o of this.musicSheet.Repetitions)this.setRepetitionIterationCount(o,1);for(let o=0;o=this.JumpResponsibleRepetition.StartIndex&&o.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(o)}}handleRepetitionsAtMeasureEnd(){for(let e=0,r=this.currentMeasure.LastRepetitionInstructions.length;e-1&&this.getRepetitionIterationCount(o)=this.JumpResponsibleRepetition.StartIndex&&o.EndIndex<=this.JumpResponsibleRepetition.EndIndex&&this.resetRepetitionIterationCount(o),this.repetitionIterationCountDictKeys.contains(o))){const a=o.getForwardJumpTargetForIteration(this.getRepetitionIterationCount(o));if(a>=0){this.currentMeasureIndex=a,this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex],this.currentVoiceEntryIndex=-1,this.jumpResponsibleRepetition=o,this.forwardJumpOccurred=!0;return}a===-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 r=0,s=e.length;r0&&(this.currentDynamicEntryIndex>=e.length||e[this.currentDynamicEntryIndex].parMultiExpression().AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentDynamicEntryIndex--;for(;this.currentDynamicEntryIndex0&&(this.currentTempoEntryIndex>=r.length||r[this.currentTempoEntryIndex].AbsoluteTimestamp.gte(this.CurrentSourceTimestamp));)this.currentTempoEntryIndex--;for(;this.currentTempoEntryIndex0){this.currentVoiceEntryIndex--;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),this.activateCurrentDynamicOrTempoInstructions();const r=this.musicSheet.SelectionEnd;r&&this.currentTimeStamp.lt(r)&&(this.endReached=!1),this.currentMeasureIndex=this.musicSheet.SourceMeasures.indexOf(this.CurrentMeasure);return}else if(this.currentVoiceEntryIndex===0&&this.currentMeasureIndex!==0){const e=this.musicSheet.SourceMeasures[this.currentMeasureIndex-1];this.currentMeasureIndex--,this.currentMeasure=this.musicSheet.SourceMeasures[this.currentMeasureIndex];const r=e.VerticalSourceStaffEntryContainers[e.VerticalSourceStaffEntryContainers.length-1];this.currentVoiceEntries=this.getVoiceEntries(r),this.currentVerticalContainerInMeasureTimestamp=r.Timestamp,this.currentVoiceEntryIndex=e.VerticalSourceStaffEntryContainers.length-1,this.currentTimeStamp=Fraction$1.plus(this.currentMeasure.AbsoluteTimestamp,r.Timestamp),this.activateCurrentDynamicOrTempoInstructions();const s=this.musicSheet.SelectionEnd;s&&this.currentTimeStamp.lt(s)&&(this.endReached=!1);return}this.frontReached=!0,this.currentTimeStamp=new Fraction$1(-1,1)}recursiveMove(){var e,r,s,o;if(this.currentVoiceEntryIndex++,this.currentVoiceEntryIndex===0&&(this.handleRepetitionsAtMeasureBegin(),this.activateCurrentRhythmInstructions()),this.currentVoiceEntryIndex>=0&&this.currentVoiceEntryIndex=0&&this.currentMeasureIndex0){if(!e)return!0;for(let s=0,o=r.length;sr,this.openSheetMusicDisplay.Sheet.SelectionStart=this.openSheetMusicDisplay.Sheet.SourceMeasures[r].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(),this.iterator.SkipInvisibleNotes=this.skipInvisibleNotes}getStaffEntryFromVoiceEntry(e){const r=e.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure.measureListIndex,s=e.ParentSourceStaffEntry.ParentStaff.idInMusicSheet;return this.graphic.findGraphicalStaffEntryFromMeasureList(s,r,e.ParentSourceStaffEntry)}updateWithTimestamp(e){const r=this.manager.absoluteEnrolledToSheetTimestamp(e),s=this.graphic.calculateXPositionFromTimestamp(r),o=s[0],a=s[1];this.updateCurrentPageFromSystem(a);const l=s[2];if(!l)return;const u=Math.max(l.parentMeasure.MeasureNumber,1);let c;for(const y of this.graphic.MeasureList[u-1])if(y){c=y;break}const d=this.graphic.calculateCursorPoints(o,a),g=d[0].y,m=d[1].y-g;if(c){if(this.updateWidthAndStyle(c.PositionAndShape,o,g,m),this.openSheetMusicDisplay.FollowCursor){const y=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:y<1e3?"smooth":"auto",block:this.ScrollPosition})}this.cursorElement.style.display=""}}update(){if(this.hidden||this.hidden===void 0||this.hidden===null)return;this.updateCurrentPage();const e=this.Iterator;let r=e.CurrentVisibleVoiceEntries(),s=e.CurrentMeasureIndex,o=0,a=0,l=0,u;if(r.length===0&&!e.FrontReached&&!e.EndReached&&(e.moveToPrevious(),r=e.CurrentVisibleVoiceEntries(),e.moveToNext()),e.FrontReached&&r.length===0){e.moveToNext(),r=e.CurrentVisibleVoiceEntries();const y=this.findVisibleGraphicalMeasure(e.CurrentMeasureIndex);o=y.PositionAndShape.AbsolutePosition.x,u=y.ParentMusicSystem,e.moveToPrevious()}else if(e.EndReached||!e.CurrentVoiceEntries||r.length===0){e.moveToPrevious(),r=e.CurrentVisibleVoiceEntries(),s=e.CurrentMeasureIndex;const y=this.findVisibleGraphicalMeasure(e.CurrentMeasureIndex);o=y.PositionAndShape.AbsolutePosition.x+y.PositionAndShape.Size.width,u=y.ParentMusicSystem,e.moveToNext()}else if(e.CurrentMeasure.isReducedToMultiRest){const y=this.findVisibleGraphicalMeasure(e.CurrentMeasureIndex),b=y.parentSourceMeasure.multipleRestMeasures,A=e.CurrentMeasure.multipleRestMeasureNumber/(b+1),E=y.PositionAndShape.Size.width-y.beginInstructionsWidth;o=y.PositionAndShape.AbsolutePosition.x+y.beginInstructionsWidth+A*E,u=y.ParentMusicSystem}else{const b=r.map(S=>this.getStaffEntryFromVoiceEntry(S)).sort((S,A)=>{var E,x,P,C;return((x=(E=S==null?void 0:S.PositionAndShape)==null?void 0:E.AbsolutePosition)==null?void 0:x.x)<=((C=(P=A==null?void 0:A.PositionAndShape)==null?void 0:P.AbsolutePosition)==null?void 0:C.x)?-1:1})[0];b&&(o=b.PositionAndShape.AbsolutePosition.x,u=b.parentMeasure.ParentMusicSystem)}if(!u)return;a=u.PositionAndShape.AbsolutePosition.y+u.StaffLines[0].PositionAndShape.RelativePosition.y;let c=u.PositionAndShape.AbsolutePosition.y;const d=u.StaffLines[u.StaffLines.length-1];d&&(c+=d.PositionAndShape.RelativePosition.y+d.StaffHeight),l=c-a;const g=this.findVisibleGraphicalMeasure(s);if(!g)return;const m=g.PositionAndShape;if(this.updateWidthAndStyle(m,o,a,l),this.openSheetMusicDisplay.FollowCursor&&this.cursorOptions.follow)if(this.openSheetMusicDisplay.EngravingRules.RenderSingleHorizontalStaffline)this.cursorElement.scrollIntoView({behavior:"smooth",inline:"center"});else{const y=this.cursorElement.getBoundingClientRect().top;this.cursorElement.scrollIntoView({behavior:y<1e3?"smooth":"auto",block:"center"})}this.cursorElement.style.display=""}findVisibleGraphicalMeasure(e){for(let r=0;r{s.push.apply(s,o.Notes)}),s}GNotesUnderCursor(e){const r=this.VoicesUnderCursor(e),s=[];return r.forEach(o=>{s.push(...o.Notes.map(a=>this.rules.GNote(a)))}),s}updateCurrentPage(){let e=this.iterator.currentTimeStamp;e.RealValue<0&&(e=new Fraction$1(0,0));for(const r of this.graphic.MusicPages)if(r.MusicSystems.last().GetSystemsLastTimeStamp().gt(e)){const o=r.PageNumber;return o!==this.currentPageNumber&&(this.container.removeChild(this.cursorElement),this.container=document.getElementById(this.rules.DYContainerId+o),this.container.appendChild(this.cursorElement)),this.currentPageNumber=o}return 1}get SkipInvisibleNotes(){return this.skipInvisibleNotes}set SkipInvisibleNotes(e){this.skipInvisibleNotes=e,this.iterator.SkipInvisibleNotes=e}get CursorOptions(){return this.cursorOptions}set CursorOptions(e){this.cursorOptions=e}updateCurrentPageFromSystem(e){if(e!=null&&e.Parent){const r=e.Parent.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}Dispose(){this.rules=void 0,this.openSheetMusicDisplay=void 0,this.cursorOptions=void 0}}var 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||{}),CursorType=(i=>(i[i.Standard=0]="Standard",i[i.ThinLeft=1]="ThinLeft",i[i.ShortThinTopLeft=2]="ShortThinTopLeft",i[i.CurrentArea=3]="CurrentArea",i[i.CurrentAreaLeft=4]="CurrentAreaLeft",i))(CursorType||{}),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||{}),SkyBottomLineBatchCalculatorBackendType=(i=>(i[i.Plain=0]="Plain",i[i.WebGL=1]="WebGL",i))(SkyBottomLineBatchCalculatorBackendType||{});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,r=[];for(let s=0;s0){let s;for(let o=0,a=r.length;oo?1:0}getFirstNonNullStaffEntry(){for(let e=0,r=this.staffEntries.length;e(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,r,s=0,o=OutlineAndFillStyleEnum.BaseWritingColor,a=void 0){this.start=e,this.end=r,this.width=s,this.styleId=o,this.colorHex=a}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 PointF2D{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}static get Empty(){return new PointF2D}static pointsAreEqual(e,r){return e.x===r.x&&e.y===r.y}ToString(){return"["+this.x+", "+this.y+"]"}}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,r,s=void 0,o=!1){this.accidental=2,this.fundamentalNote=i,this.octave=e,this.accidental=r,this.accidentalXml=s,this.halfTone=i+(e+_Pitch.octXmlDiff)*12+_Pitch.HalfTonesFromAccidental(r),o||(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 r=_Pitch.pitchEnumValues,s=r.indexOf(i);let o=0,a=(s+e)%r.length;return s+e>r.length-1&&(o=1),a<0&&(a=r.length+a,o=-1),[r[a],o]}static CalculateTransposedHalfTone(i,e){const r=i.fundamentalNote+i.AccidentalHalfTones+e;return _Pitch.WrapAroundCheck(r,12)}static WrapAroundCheck(i,e){let r=0;for(;i<0;)i+=e,r--;for(;i>=e;)i-=e,r++;return{overflow:r,halftone:i}}static calcFrequency(i,e){const r=window.DYProjectName==="musicScore"?{"-2":[11,3],"-7":[12],"-9":[5],12:[33,34,35,37,38,2],24:[39]}:{"-2":[4,12,23],"-7":[13],"-9":[6],12:[5,116,55]};let s=0,o;if(i instanceof _Pitch){const d=i;s=d.octave-1,o=d.fundamentalNote-9+d.AccidentalHalfTones}else typeof i=="number"&&(o=i-57);const a=window.DYSubjectId;let l=0;if(window.DYEnvironment==="COLEXIU"&&(r[12]=[120]),window.xmlNeedAdjustVoice){for(const d in r)if(Object.prototype.hasOwnProperty.call(r,d)&&r[d].includes(a)){l=parseFloat(d);break}}let u=o+l;return e==="next"&&u++,e==="prev"&&u--,442*Math.pow(2,s)*Math.pow(2,u/12)}static calcFractionalKey(i){return Math.log(i/440)/Math.LN10*_Pitch.halftoneFactor+57}static fromFrequency(i){const e=_Pitch.calcFractionalKey(i)+.5,r=Math.floor(e/12)-_Pitch.octXmlDiff,s=Math.floor(e)%12;let o=s,a=2;return this.pitchEnumValues.indexOf(o)===-1&&(o=s-1,a=0),new _Pitch(o,r,a)}static fromHalftone(i){const e=Math.floor(i/12)-_Pitch.octXmlDiff,r=i%12;let s=r,o=2;return this.pitchEnumValues.indexOf(s)===-1&&(s=r-1,o=0),new _Pitch(s,e,o)}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()}ToStringShort(i=0){let e=_Pitch.accidentalVexflow(this.accidental);e||(e="");const r=this.octave+i;return _Pitch.getNoteEnumString(this.fundamentalNote)+e+r}get ToStringShortGet(){return this.ToStringShort(0)}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_Pitch.pitchEnumValues.length-1?(s=_Pitch.pitchEnumValues[e+i-_Pitch.pitchEnumValues.length],r++):s=_Pitch.pitchEnumValues[e+i],new _Pitch(s,r,2)}getLowerPitchByTransposeFactor(i){const e=_Pitch.pitchEnumValues.indexOf(this.fundamentalNote);let r=this.octave,s;return e-i<0?(s=_Pitch.pitchEnumValues[_Pitch.pitchEnumValues.length+e-i],r--):s=_Pitch.pitchEnumValues[e-i],new _Pitch(s,r,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 ClefInstruction extends AbstractNotationInstruction{constructor(e=0,r=0,s=2){super(void 0),this.clefType=0,this.line=2,this.octaveOffset=0,this.line=s,this.clefType=e,this.octaveOffset=r,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 r=0;r<=2;r++){const s=new ClefInstruction(0,r,2);e.push(s)}for(let r=-2;r<=0;r++){const s=new ClefInstruction(1,r,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.Percussion=128]="Percussion",i))(MidiInstrument||{});const _KeyInstruction=class extends AbstractNotationInstruction{constructor(i=void 0,e=0,r=0){super(i),this.isTransposedBy=0,this.Key=e,this.keyTypeOriginal=e,this.mode=r,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 r=new _KeyInstruction(void 0,e,0);i.push(r)}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=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||{});class SizeF2D{constructor(e=0,r=0){this.width=e,this.height=r}}class RectangleF2D{constructor(e,r,s,o){this.x=0,this.y=0,this.width=0,this.height=0,this.x=e,this.y=r,this.width=s,this.height=o}static createFromLocationAndSize(e,r){return new RectangleF2D(e.x,e.y,r.width,r.height)}get Location(){return new PointF2D(this.x,this.y)}get Size(){return new SizeF2D(this.width,this.height)}}class AClassHierarchyTrackable{isInstanceOfClass(e){let r=this.constructor.prototype;for(;r;){if(e===r.constructor.name)return!0;r=r.__proto__}return!1}}class GraphicalObject extends AClassHierarchyTrackable{get PositionAndShape(){return this.boundingBox}set PositionAndShape(e){this.boundingBox=e}}class Clickable extends GraphicalObject{}let BoundingBox$1=class{constructor(e=void 0,r=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=r,this.dataObject=e,this.isSymbol=s,this.xBordersHaveBeenSet=!1,this.yBordersHaveBeenSet=!1,r&&(this.Parent=r)}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.borderMarginRightthis.borderTop?this.borderTop:this.borderMarginTop}set BorderMarginTop(e){this.borderMarginTop=e,this.calculateMarginRectangle()}get BorderMarginBottom(){return this.borderMarginBottom-1&&this.parent.ChildElements.splice(l,1)}this.parent=e,((s=(r=this.parent)==null?void 0:r.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"):(a=(o=this.parent)==null?void 0:o.ChildElements)==null||a.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,r=this.ChildElements.length;e.001;break;case 2:case 3:o=this.relativePosition.y,e.calculateMarginPositionAlongDirection(this,r),a=Math.abs(o-this.relativePosition.y)>.001;break;default:throw new ArgumentOutOfRangeException("direction")}while(a)}collisionDetection(e){const r=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 r>0&&s>0}liesInsideBorders(e){const r=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(r&&s){const o=this.AbsolutePosition.y+this.borderTop<=e.absolutePosition.y+e.borderTop&&e.absolutePosition.y+e.borderTop<=this.AbsolutePosition.y+this.borderBottom,a=this.AbsolutePosition.y+this.borderTop<=e.absolutePosition.y+e.borderBottom&&e.absolutePosition.y+e.borderBottom<=this.AbsolutePosition.y+this.borderBottom;if(o&&a)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 r=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 r>0&&s>0}liesInsideMargins(e){const r=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(r&&s){const o=this.AbsolutePosition.y+this.borderMarginTop<=e.absolutePosition.y+e.borderMarginTop&&e.absolutePosition.y+e.borderMarginTop<=this.AbsolutePosition.y+this.borderMarginBottom,a=this.AbsolutePosition.y+this.borderMarginTop<=e.absolutePosition.y+e.borderMarginBottom&&e.absolutePosition.y+e.borderMarginBottom<=this.AbsolutePosition.y+this.borderMarginBottom;if(o&&a)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,r,s){this.RelativePosition=new PointF2D(s.x,s.y),this.setAbsolutePositionFromParent();let o=0,a=!1;do switch(r){case 0:case 1:o=this.relativePosition.x,e.calculatePositionAlongDirection(this,r),a=Math.abs(o-this.relativePosition.x)>1e-4;break;case 2:case 3:o=this.relativePosition.y,e.calculatePositionAlongDirection(this,r),a=Math.abs(o-this.relativePosition.y)>1e-4;break;default:throw new ArgumentOutOfRangeException("direction")}while(a)}getClickedObjectOfType(e){const r=this.dataObject;if(this.pointLiesInsideBorders(e)&&r)return r;for(let s=0,o=this.childElements.length;s(i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.Up=2]="Up",i[i.Down=3]="Down",i[i.NotYetDefined=4]="NotYetDefined",i))(ColDirEnum||{});Array.prototype.last||Object.defineProperty(Array.prototype,"last",{enumerable:!1,writable:!0,value:function(){return this[this.length-1]}});Array.prototype.clear||Object.defineProperty(Array.prototype,"clear",{enumerable:!1,writable:!0,value:function(){this.length=0}});Array.prototype.contains||Object.defineProperty(Array.prototype,"contains",{enumerable:!1,writable:!0,value:function(i){return this.indexOf(i)!==-1}});class CollectionUtil{static contains2(e,r){for(let s=0;s(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 ColoringModes=(i=>(i[i.XML=0]="XML",i[i.AutoColoring=1]="AutoColoring",i[i.CustomColorSet=2]="CustomColorSet",i))(ColoringModes||{}),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||{});class ChordSymbolContainer{constructor(e,r,s,o,a){this.rootPitch=e,this.chordKind=r,this.bassPitch=s,this.degrees=o,this.rules=a}get RootPitch(){return this.rootPitch}get ChordKind(){return this.chordKind}get BassPitch(){return this.bassPitch}get ChordDegrees(){return this.degrees}static calculateChordText(e,r,s){let o=e.RootPitch;if(MusicSheetCalculator.transposeCalculator&&(o=MusicSheetCalculator.transposeCalculator.transposePitch(e.RootPitch,s,r)),e.ChordKind===31)return e.getTextFromChordKindEnum(e.ChordKind);let a=Pitch.getNoteEnumString(o.FundamentalNote);o.Accidental!==AccidentalEnum.NONE&&(a+=e.getTextForAccidental(o.Accidental));const l={adds:[],alts:[],subs:[]};for(const g of e.ChordDegrees)if(g){let m="";switch(g.alteration!==AccidentalEnum.NONE&&(m+=e.getTextForAccidental(g.alteration)),m+=g.value,g.text){case 0:l.adds.push(m);break;case 1:l.alts.push(m);break;case 2:l.subs.push(m);break}}let u=e.getTextFromChordKindEnum(e.ChordKind);const c=["adds","alts","subs"],d=e.rules.CustomChords;for(const g of d){if(g.chordKind!==e.chordKind)continue;let m=!0;for(const y of c){for(const b of g.degrees[y]||[])if(l[y].indexOf(b)<0){m=!1;break}if(!m)break}if(m){for(const y of c)for(const b of g.degrees[y]||[])l[y].splice(l[y].indexOf(b),1);u=g.alternateName}}if(a+=u,l.adds.length>0&&(a+="("+l.adds.join(",")+")"),l.alts.length>0&&(a+="(alt "+l.alts.join(",")+")"),l.subs.length>0&&(a+="(omit "+l.subs.join(",")+")"),e.BassPitch){let g=e.BassPitch;MusicSheetCalculator.transposeCalculator&&(g=MusicSheetCalculator.transposeCalculator.transposePitch(e.BassPitch,s,r)),a+="/",a+=Pitch.getNoteEnumString(g.FundamentalNote),a+=e.getTextForAccidental(g.Accidental)}return a}getTextForAccidental(e){const r=this.rules.ChordAccidentalTexts.getValue(e);return r!==void 0?r:""}getTextFromChordKindEnum(e){var r;return(r=this.rules.ChordSymbolLabelTexts.getValue(e))!=null?r:""}}class Degree{constructor(e,r,s){this.value=e,this.alteration=r,this.text=s}}class CustomChord{constructor(e,r,s){this.alternateName=e,this.chordKind=r,this.degrees=s}static createCustomChord(e,r,s){return new CustomChord(e,r,s)}static renameCustomChord(e,r,s){for(const o of s)o.alternateName===e&&(o.alternateName=r)}}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,r,s,o=void 0){super(),this.DrawnAccidental=AccidentalEnum.NONE,this.lineShift=0,this.sourceNote=e,this.parentVoiceEntry=r,this.PositionAndShape=new BoundingBox$1(this,r.PositionAndShape),o?this.graphicalNoteLength=o:this.graphicalNoteLength=e.Length,this.numberOfDots=this.calculateNumberOfNeededDots(this.graphicalNoteLength),this.rules=s,this.rules.addGraphicalNoteToNoteMap(e,this)}Transpose(e,r,s,o){let a=this.sourceNote.Pitch;return MusicSheetCalculator.transposeCalculator&&(a=MusicSheetCalculator.transposeCalculator.transposePitch(this.sourceNote.Pitch,e,s)),a}calculateNumberOfNeededDots(e){return!this.sourceNote||!this.sourceNote.NoteTuplet?e.calculateNumberOfNeededDots():0}get ParentMusicPage(){return this.parentVoiceEntry.parentStaffEntry.parentMeasure.ParentMusicSystem.Parent}static FromNote(e,r){return r.NoteToGraphicalNoteMap.getValue(e.NoteToGraphicalNoteObjectId)}ToStringShort(e=0){var r;return(r=this.sourceNote)==null?void 0:r.ToStringShort(e)}get ToStringShortGet(){return this.ToStringShort(0)}}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.DYMusicScoreId="",this.DYCustomRepeatCount=0,this.DYMusicClientType="",this.NoteDistances=[1,1,1.3,1.6,2,2.5,3,4],this.NoteDistancesScalingFactors=[1,2,4,8,16,32,64,128],this.DurationDistanceDict={},this.DurationScalingDistanceDict={},this.NoteToGraphicalNoteMapObjectCount=0,this.RenderCount=0,this.PlayAlreadyStartedNotesFromCursorPosition=!1,this.PlaybackSkipNotesSafetyInterval=.02,this.UseDefaultVoiceInteractionListener=!0,this.LimitCursorPositionToCurrentMeasure=!0,this.loadDefaultValues()}loadDefaultValues(){this.SamplingUnit=_EngravingRules.unit*3,this.MpatMode=!0,this.SheetTitleHeight=4,this.SheetSubtitleHeight=2,this.SheetMinimumDistanceBetweenTitleAndSubtitle=1,this.SheetComposerHeight=2,this.SheetAuthorHeight=2,this.SheetCopyrightHeight=1.5,this.SheetCopyrightMargin=2,this.SheetComposerSubtitleUseLegacyParsing=!1,this.CompactMode=!1,this.PagePlacementEnum=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.SystemLyricistDistance=2,this.InstrumentLabelTextHeight=2,this.MinimumDistanceBetweenSystems=7,this.MinSkyBottomDistBetweenSystems=5,this.LastSystemMaxScalingFactor=1.4,this.AutoBeamNotes=!1,this.AutoBeamOptions={beam_middle_rests_only:!1,beam_rests:!1,maintain_stem_directions:!1},this.AutoBeamTabs=!1,this.BeamWidth=_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.PercussionUseCajon2NoteSystem=!1,this.BetweenKeySymbolsDistance=.2,this.KeyRightMargin=.75,this.RhythmRightMargin=1.25,this.ShowRhythmAgainAfterPartEndOrFinalBarline=!0,this.NewPartAndSystemAfterFinalBarline=!1,this.InStaffClefScalingFactor=.8,this.DistanceBetweenNaturalAndSymbolWhenCancelling=.4,this.NoteHelperLinesOffset=.25,this.MeasureLeftMargin=.7,this.MeasureRightMargin=0,this.DistanceBetweenLastInstructionAndRepetitionBarline=1,this.ArpeggioDistance=.6,this.StaccatoShorteningFactor=2,this.IdealStemLength=3,this.StemNoteHeadBorderYOffset=.2,this.StemMargin=.2,this.StemMinLength=2.5,this.StemMaxLength=4.5,this.BeamSlopeMaxAngle=10,this.StemMinAllowedDistanceBetweenNoteHeadAndBeamLine=1,this.SetWantedStemDirectionByXml=!0,this.GraceNoteScalingFactor=.6,this.GraceNoteXOffset=.2,this.GraceNoteGroupXMargin=0,this.WedgeOpeningLength=1.2,this.WedgeMeasureEndOpeningLength=.75,this.WedgeMeasureBeginOpeningLength=.75,this.WedgePlacementAboveY=-1.5,this.WedgePlacementBelowY=1.5,this.WedgeHorizontalMargin=.6,this.WedgeVerticalMargin=.5,this.DistanceOffsetBetweenTwoHorizontallyCrossedWedges=.3,this.WedgeMinLength=2,this.WedgeEndDistanceBetweenTimestampsFactor=1.75,this.SoftAccentWedgePadding=.4,this.SoftAccentSizeFactor=.6,this.DistanceBetweenAdjacentDynamics=.75,this.TempoChangeMeasureValidity=4,this.TempoContinousFactor=.7,this.StaccatoScalingFactor=.8,this.BetweenDotsDistance=.8,this.OrnamentAccidentalScalingFactor=.65,this.ChordSymbolTextHeight=2,this.ChordSymbolTextAlignment=TextAlignmentEnum.LeftBottom,this.ChordSymbolRelativeXOffset=-1,this.ChordSymbolExtraXShiftForShortChordSymbols=.3,this.ChordSymbolExtraXShiftWidthThreshold=2,this.ChordSymbolXSpacing=1,this.ChordOverlapAllowedIntoNextMeasure=0,this.ChordSymbolYOffset=.1,this.ChordSymbolYPadding=0,this.ChordSymbolYAlignment=!0,this.ChordSymbolYAlignmentScope="staffline",this.ChordSymbolWholeMeasureRestXOffset=0,this.ChordSymbolWholeMeasureRestXOffsetMeasure1=-2,this.ChordAccidentalTexts=new Dictionary,this.resetChordAccidentalTexts(this.ChordAccidentalTexts,!1),this.ChordSymbolLabelTexts=new Dictionary,this.resetChordSymbolLabelTexts(this.ChordSymbolLabelTexts),this.CustomChords=[],this.resetChordNames(),this.RepetitionSymbolsYOffset=0,this.RepetitionEndInstructionXShiftAsPercentOfStaveWidth=.4,this.RehearsalMarkXOffsetDefault=10,this.RehearsalMarkXOffset=0,this.RehearsalMarkXOffsetSystemStartMeasure=-20,this.RehearsalMarkYOffsetDefault=-15,this.RehearsalMarkYOffset=0,this.RehearsalMarkFontSize=10,this.MeasureNumberLabelHeight=1.5*_EngravingRules.unit,this.MeasureNumberLabelOffset=2,this.MeasureNumberLabelXOffset=-.5,this.TupletsRatioed=!1,this.TupletsBracketed=!1,this.TripletsBracketed=!1,this.TupletsBracketedUseXMLValue=!0,this.TupletNumberLabelHeight=1.5*_EngravingRules.unit,this.TupletNumberYOffset=.5,this.TupletNumberLimitConsecutiveRepetitions=!0,this.TupletNumberMaxConsecutiveRepetitions=2,this.TupletNumberAlwaysDisableAfterFirstMax=!0,this.TupletNumberUseShowNoneXMLValue=!0,this.LabelMarginBorderFactor=.1,this.TupletVerticalLineLength=.5,this.TupletNumbersInTabs=!0,this.TabTupletYOffsetBottom=1,this.TabTupletYOffsetTop=-3.5,this.TabTupletYOffsetEffects=1.5,this.TabTupletsBracketed=!0,this.TabBeamsRendered=!0,this.TabKeySignatureRendered=!1,this.TabKeySignatureSpacingAdded=!0,this.TabTimeSignatureRendered=!1,this.TabTimeSignatureSpacingAdded=!0,this.TabFingeringsRendered=!1,this.SlurPlacementFromXML=!0,this.SlurPlacementAtStems=!1,this.SlurPlacementUseSkyBottomLine=!1,this.BezierCurveStepSize=1e3,this.calculateCurveParametersArrays(),this.TieGhostObjectWidth=.75,this.TieYPositionOffsetFactor=.3,this.MinimumNeededXspaceForTieGhostObject=1,this.TieHeightMinimum=.28,this.TieHeightMaximum=1.2,this.TieHeightInterpolationK=.0288,this.TieHeightInterpolationD=.136,this.SlurNoteHeadYOffset=.5,this.SlurEndArticulationYOffset=.8,this.SlurStartArticulationYOffsetOfArticulation=.5,this.SlurStemXOffset=.3,this.SlurSlopeMaxAngle=15,this.SlurTangentMinAngle=30,this.SlurTangentMaxAngle=80,this.SlurHeightFactor=1,this.SlurHeightFlattenLongSlursFactorByWidth=.24,this.SlurHeightFlattenLongSlursFactorByAngle=.36,this.SlurHeightFlattenLongSlursCutoffAngle=47,this.SlurHeightFlattenLongSlursCutoffWidth=16,this.SlursStartingAtSameStaffEntryYOffset=.8,this.SlurMaximumYControlPointDistance=void 0,this.GlissandoNoteOffset=.5,this.GlissandoStafflineStartMinimumWidth=1,this.GlissandoStafflineStartYDistanceToNote=.8,this.GlissandoStafflineEndOffset=1,this.GlissandoDefaultWidth=.1,this.RepetitionAllowFirstMeasureBeginningRepeatBarline=!1,this.RepetitionEndingLabelHeight=2,this.RepetitionEndingLabelXOffset=.5,this.RepetitionEndingLabelYOffset=.3,this.RepetitionEndingLineYLowerOffset=.5,this.RepetitionEndingLineYUpperOffset=.3,this.VoltaOffset=2.5,this.LyricsAlignmentStandard=TextAlignmentEnum.LeftBottom,this.LyricsHeight=2,this.LyricsYOffsetToStaffHeight=0,this.LyricsYMarginToBottomLine=.2,this.LyricsExtraXShiftForShortLyrics=.5,this.LyricsExtraXShiftForShortLyricsWidthThreshold=1.4,this.LyricsUseXPaddingForLongLyrics=!0,this.LyricsXPaddingFactorForLongLyrics=1,this.LyricsXPaddingWidthThreshold=1.7,this.LyricsXPaddingReductionForLongNotes=.7,this.LyricsXPaddingReductionForLastNoteInMeasure=1.2,this.LyricsXPaddingForLastNoteInMeasure=!0,this.VerticalBetweenLyricsDistance=.5,this.HorizontalBetweenLyricsDistance=.2,this.BetweenSyllableMaximumDistance=10,this.BetweenSyllableMinimumDistance=.5,this.LyricOverlapAllowedIntoNextMeasure=3.4,this.MinimumDistanceBetweenDashes=10,this.MaximumLyricsElongationFactor=2.5,this.TempoYSpacing=.5,this.InstantaneousTempoTextHeight=2.3,this.ContinuousDynamicTextHeight=2.3,this.MoodTextHeight=2.3,this.UnknownTextHeight=2,this.ContinuousTempoTextHeight=2.3,this.DynamicExpressionMaxDistance=2,this.DynamicExpressionSpacer=.5,this.IgnoreRepeatedDynamics=!1,this.ExpressionsUseXMLColor=!0,this.VexFlowDefaultNotationFontScale=39,this.VexFlowDefaultTabFontScale=39,this.TremoloStrokeScale=1,this.TremoloYSpacingScale=1,this.TremoloBuzzRollThickness=.25,this.StemWidth=.15,this.StaffLineWidth=.1,this.StaffLineColor=void 0,this.LedgerLineWidth=1,this.LedgerLineStrokeStyle=void 0,this.LedgerLineColorDefault="#000000",this.WedgeLineWidth=.12,this.TupletLineWidth=.12,this.LyricUnderscoreLineWidth=.12,this.SystemThinLineWidth=.12,this.SystemBoldLineWidth=_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.OctaveShiftOnWholeMeasureNoteUntilEndOfMeasure=!1,this.GraceLineWidth=this.StaffLineWidth*this.GraceNoteScalingFactor,this.MultipleRestMeasureDefaultWidth=4,this.MultipleRestMeasureAddKeySignature=!0,this.FixedMeasureWidth=!1,this.FixedMeasureWidthFixedValue=void 0,this.FixedMeasureWidthUseForPickupMeasures=!1,this.MinimumCrossedBeamDifferenceMargin=1e-4,this.SheetMaximumWidth=32767,this.VoiceSpacingMultiplierVexflow=.85,this.VoiceSpacingAddendVexflow=3,this.PickupMeasureWidthMultiplier=1,this.PickupMeasureRepetitionSpacing=.8,this.PickupMeasureSpacingSingleNoteAddend=1.6,this.DisplacedNoteMargin=.1,this.MinNoteDistance=2,this.SubMeasureXSpacingThreshold=35,this.MeasureDynamicsMaxScalingFactor=2.5,this.WholeRestXShiftVexflow=-1.5,this.MetronomeMarksDrawn=!0,this.MetronomeMarkXShift=-6,this.MetronomeMarkYShift=-1,this.SoftmaxFactorVexFlow=15,this.StaggerSameWholeNotes=!0,this.AlignRests=AlignRestOption.Never,this.RestCollisionYPadding=0,this.FillEmptyMeasuresWithWholeRest=FillEmptyMeasuresWithWholeRests.No,this.ArpeggiosGoAcrossVoices=!1,this.RenderArpeggios=!0,this.RenderSlurs=!0,this.RenderGlissandi=!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.RenderCopyright=!1,this.RenderPartNames=!0,this.RenderPartAbbreviations=!0,this.RenderSystemLabelsAfterFirstPage=!0,this.RenderFingerings=!0,this.RenderMeasureNumbers=!0,this.RenderMeasureNumbersOnlyAtSystemStart=!1,this.UseXMLMeasureNumbers=!0,this.RenderLyrics=!0,this.RenderChordSymbols=!0,this.RenderMultipleRestMeasures=!0,this.AutoGenerateMultipleRestMeasuresFromRestMeasures=!0,this.RenderRehearsalMarks=!0,this.RenderClefsAtBeginningOfStaffline=!0,this.RenderKeySignatures=!0,this.RenderTimeSignatures=!0,this.RenderPedals=!0,this.RenderWavyLines=!0,this.ArticulationPlacementFromXML=!0,this.BreathMarkDistance=.8,this.FingeringPosition=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.NewSystemAtXMLNewPageAttribute=!1,this.RestoreCursorAfterRerender=!0,this.StretchLastSystemLine=!1,this.IgnoreBracketsWords=!0,this.PlaceWordsInsideStafflineFromXml=!1,this.PlaceWordsInsideStafflineYOffset=.9,this.UseJustifiedBuilder=!0,this.PageFormat=PageFormat.UndefinedPageFormat,this.PageBackgroundColor=void 0,this.PerformanceMode=!1,this.RenderSingleHorizontalStaffline=!1,this.SpacingBetweenTextLines=0,this.NoteToGraphicalNoteMap=new Dictionary,this.NoteToGraphicalNoteMapObjectCount=0,this.SkyBottomLineBatchMinMeasures=5,this.SkyBottomLineWebGLMinMeasures=80,this.AlwaysSetPreferredSkyBottomLineBackendAutomatically=!0,this.DisableWebGLInFirefox=!0,this.DisableWebGLInSafariAndIOS=!0,this.setPreferredSkyBottomLineBackendAutomatically();try{this.MaxInstructionsConstValue=this.ClefLeftMargin+this.ClefRightMargin+this.KeyRightMargin+this.RhythmRightMargin+11}catch(i){loglevelExports.info("EngravingRules()",i)}this.MpatMode&&(this.NewPartAndSystemAfterFinalBarline=!0)}setPreferredSkyBottomLineBackendAutomatically(i=-1){var o,a,l,u;let e="",r="";typeof globalThis=="object"&&(e=(a=(o=globalThis.navigator)==null?void 0:o.vendor)!=null?a:"",r=(u=(l=globalThis.navigator)==null?void 0:l.userAgent)!=null?u:"");let s=!1;(this.DisableWebGLInSafariAndIOS&&/apple/i.test(e)||this.DisableWebGLInFirefox&&r.includes("Firefox"))&&(s=!0),this.PreferredSkyBottomLineBatchCalculatorBackend=SkyBottomLineBatchCalculatorBackendType.Plain,s||i>=this.SkyBottomLineWebGLMinMeasures&&(this.PreferredSkyBottomLineBatchCalculatorBackend=SkyBottomLineBatchCalculatorBackendType.WebGL)}applyDefaultColorMusic(i){this.DefaultColorMusic=i,this.DefaultColorNotehead=i,this.DefaultColorRest=i,this.DefaultColorStem=i,this.DefaultColorLabel=i,this.DefaultColorLyrics=i,this.DefaultColorTitle=i,this.LedgerLineColorDefault=i}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}resetChordAccidentalTexts(i,e){i.setValue(AccidentalEnum.SHARP,e?"♯":"#"),i.setValue(AccidentalEnum.FLAT,e?"♭":"b"),i.setValue(AccidentalEnum.DOUBLEFLAT,e?"𝄫":"bb"),i.setValue(AccidentalEnum.DOUBLESHARP,e?"𝄪":"x")}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,`m7${this.ChordAccidentalTexts.getValue(AccidentalEnum.FLAT)}5`),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,r,s,o){if(ChordSymbolEnum[e]!==void 0){const a={adds:r,alts:s,subs:o};this.CustomChords.push(CustomChord.createCustomChord(i,ChordSymbolEnum[e],a))}}renameChord(i,e){CustomChord.renameCustomChord(i,e,this.CustomChords)}resetChordNames(){const i=this.ChordAccidentalTexts.getValue(AccidentalEnum.SHARP),e=this.ChordAccidentalTexts.getValue(AccidentalEnum.FLAT);this.addChordName("alt","major",[`${i}5`,`${e}9`,`${i}9`],[`${e}5`],[]),this.addChordName("7alt","dominant",[`${i}5`,`${e}9`,`${i}9`],[`${e}5`],[]),this.addChordName("7sus4","dominant",["4"],[],["3"]),this.addChordName("7sus4","suspendedfourth",["7"],[],[]),this.addChordName("9sus4","dominantninth",["4"],[],["3"]),this.addChordName("9sus4","suspendedfourth",["9"],[],[]),this.addChordName("11sus4","dominant11th",["4"],[],["3"]),this.addChordName("11sus4","suspendedfourth",["11"],[],[]),this.addChordName("13sus4","dominant13th",["4"],[],["3"]),this.addChordName("13sus4","suspendedfourth",["13"],[],[]),this.addChordName("7sus2","dominant",["2"],[],["3"]),this.addChordName("7sus2","suspendedsecond",["7"],[],[]),this.addChordName(`m7${e}5`,"minorseventh",[],[`${e}5`],[]),this.addChordName("9sus2","dominantninth",["2"],[],["3"]),this.addChordName("9sus2","suspendedsecond",["9"],[],[]),this.addChordName("11sus2","dominant11th",["2"],[],["3"]),this.addChordName("11sus2","suspendedsecond",["11"],[],[]),this.addChordName("13sus2","dominant13th",["2"],[],["3"]),this.addChordName("13sus2","suspendedsecond",["13"],[],[]),this.addChordName("m(maj9)","majorminor",["9"],[],[]),this.addChordName("m(maj11)","majorminor",["11"],[],[]),this.addChordName("m(maj13)","majorminor",["13"],[],[]),this.addChordName("69","majorsixth",["9"],[],[]),this.addChordName("mi69","minorsixth",["9"],[],[])}calculateCurveParametersArrays(){this.TPower3=new Array(this.BezierCurveStepSize),this.OneMinusTPower3=new Array(this.BezierCurveStepSize),this.FactorOne=new Array(this.BezierCurveStepSize),this.FactorTwo=new Array(this.BezierCurveStepSize);for(let i=0;i{var s,o,a,l;return((o=(s=r.sourceNote.Pitch)==null?void 0:s.getHalfTone())!=null?o:0)-((l=(a=e.sourceNote.Pitch)==null?void 0:a.getHalfTone())!=null?l:0)}),this.notes}sortForVexflow(){return this.notes.sort((e,r)=>{var s,o,a;return((o=(s=e.sourceNote.Pitch)==null?void 0:s.getHalfTone())!=null?o:0)-((a=r.sourceNote.Pitch.getHalfTone())!=null?a:0)}),this.notes}color(){}}class GraphicalMusicSheet{constructor(e,r){this.musicPages=[],this.measureList=[],this.verticalGraphicalStaffEntryContainers=[],this.cursors=[],this.leadSheet=!1,this.musicSheet=e,this.numberOfStaves=this.musicSheet.Staves.length,this.calculator=r,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 Copyright(){return this.copyright}set Copyright(e){this.copyright=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 r=0;r=0;o--){const a=(s=this.measureList[o])==null?void 0:s[r];if(a)return a}}findGraphicalStaffEntryFromMeasureList(e,r,s){for(let o=r;o0)return l.staffEntries[0]}}getFirstVisibleMeasuresListFromIndices(e,r){const s=[],o=this.measureList[0].length;for(let a=e;a<=r;a++)for(let l=0;l=0;r--){if(this.verticalGraphicalStaffEntryContainers[r].AbsoluteTimestamp.lt(e)){const s=new VerticalGraphicalStaffEntryContainer(this.numberOfStaves,e);return this.verticalGraphicalStaffEntryContainers.splice(r+1,0,s),s}if(this.verticalGraphicalStaffEntryContainers[r].AbsoluteTimestamp.Equals(e))return this.verticalGraphicalStaffEntryContainers[r]}}GetVerticalContainerFromTimestamp(e,r=0){const s=CollectionUtil.binarySearch(this.verticalGraphicalStaffEntryContainers,new VerticalGraphicalStaffEntryContainer(0,e),VerticalGraphicalStaffEntryContainer.compareByTimestamp,r);if(s>=0)return this.verticalGraphicalStaffEntryContainers[s]}GetInterpolatedIndexInVerticalContainers(e){const r=this.verticalGraphicalStaffEntryContainers;if(r.length===1)return 0;let s=0,o=r.length-1,a,l;if(e.lte(r[r.length-1].AbsoluteTimestamp)){for(;o-s>1;){const g=Math.floor((o+s)/2);if(r[s].AbsoluteTimestamp.Equals(e)){o=s;break}else if(r[o].AbsoluteTimestamp.Equals(e)){s=o;break}else{if(r[g].AbsoluteTimestamp.Equals(e))return this.verticalGraphicalStaffEntryContainers.indexOf(r[g]);e.lt(r[g].AbsoluteTimestamp)?o=g:s=g}}if(s===o)return this.verticalGraphicalStaffEntryContainers.indexOf(r[s]);a=r[s].AbsoluteTimestamp,l=r[o].AbsoluteTimestamp}else a=r[r.length-1].AbsoluteTimestamp,l=Fraction$1.plus(this.getLongestStaffEntryDuration(r.length-1),a),o=r.length;const u=l.RealValue-a.RealValue,c=l.RealValue-e.RealValue,d=o-c/u;return Math.min(d,this.verticalGraphicalStaffEntryContainers.length-1)}getVisibleStavesIndicesFromSourceMeasure(e){const r=[],s=[];for(let o=0,a=e.length;o=0;)o=this.measureList[--s][e];return this.measureList[s][e]}getMeasureIndex(e,r,s){for(r=0;r{var s;return((s=r.parentStaffEntry)==null?void 0:s.relInMeasureTimestamp)!==void 0})}GetNearestNote(e,r){const s=this.GetNearestVoiceEntry(e);if(!s)return;let o,a=Number.MAX_SAFE_INTEGER;for(const l of s.notes){const u=l.PositionAndShape.AbsolutePosition.y,c=Math.abs(l.PositionAndShape.AbsolutePosition.x-e.x),d=Math.abs(u-e.y);c+dl.PositionAndShape.RelativePosition.x&&(s=l):s=l)}}catch(o){loglevelExports.info("GraphicalMusicSheet.getStaffEntry",o)}return s}GetPreviousVisibleContainerIndex(e){for(let r=e-1;r>=0;r--){const s=this.verticalGraphicalStaffEntryContainers[r].StaffEntries;for(let o=0,a=s.length;o=0;a--)if(s=this.getStaffEntry(a),s)if(r){if(s.sourceStaffEntry.ParentStaff.ParentInstrument.Visible)return s}else return s}findClosestRightStaffEntry(e,r){let s;const o=Math.max(0,Math.ceil(e));for(let a=o;a1}isVisible(){return this.ParentStaff.ParentInstrument.Visible}getGraphicalMeasureDurationFromStaffEntries(){let e=new Fraction$1(0,1);const r=[];for(let s=0,o=this.staffEntries.length;s0&&l.Add(c.notes[0].graphicalNoteLength);e.lt(l)&&(e=Fraction$1.createFromFraction(l))}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 r=this.staffEntries.length-1;r>=0;r--){if(this.staffEntries[r].relInMeasureTimestamp.lt(e.relInMeasureTimestamp)){this.staffEntries.splice(r+1,0,e);break}r===0&&this.staffEntries.splice(r,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}}const Vex=()=>{};Vex.L=(i,e)=>{if(!e)return;const r=Array.prototype.slice.call(e).join(" ");window.console.log(i+": "+r)};Vex.MakeException=i=>class extends Error{constructor(r,s){super(r),this.name=i,this.message=r,this.data=s}};class RuntimeError{constructor(e,r){this.code=e,this.message=r}toString(){return"[RuntimeError] "+this.code+":"+this.message}}Vex.RuntimeError=RuntimeError;Vex.RERR=Vex.RuntimeError;Vex.Merge=(i,e)=>{for(const r in e)i[r]=e[r];return i};Vex.Min=Math.min;Vex.Max=Math.max;Vex.forEach=(i,e)=>{for(let r=0;ri%e>=e/2?parseInt(i/e,10)*e+e:parseInt(i/e,10)*e;Vex.MidLine=(i,e)=>{let r=e+(i-e)/2;return r%2>0&&(r=Vex.RoundN(r*10,5)/10),r};Vex.SortAndUnique=(i,e,r)=>{if(i.length>1){const s=[];let o;i.sort(e);for(let a=0;a{let r=i.length;for(;r--;)if(i[r]===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,r,s="#55")=>{i.save(),i.setFillStyle(s),i.beginPath(),i.arc(e,r,3,0,Math.PI*2,!0),i.closePath(),i.fill(),i.restore()};Vex.BM=(i,e)=>{const r=new Date().getTime();e();const s=new Date().getTime()-r;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,r){if(typeof e!="number"||typeof r!="number")throw new Vex.RERR("BadArgument",`Invalid numbers: ${e}, ${r}`);let s;for(;r!==0;)s=r,r=e%r,e=s;return e}static LCM(e,r){return e*r/Fraction.GCD(e,r)}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 r=e[0];return e.shift(),Fraction.LCM(r,Fraction.LCMM(e))}}constructor(e,r){this.set(e,r)}set(e,r){return this.numerator=e===void 0?1:e,this.denominator=r===void 0?1:r,this}value(){return this.numerator/this.denominator}simplify(){let e=this.numerator,r=this.denominator;const s=Fraction.GCD(e,r);return e/=s,r/=s,r<0&&(r=-r,e=-e),this.set(e,r)}add(e,r){let s,o;e instanceof Fraction?(s=e.numerator,o=e.denominator):(e!==void 0?s=e:s=0,r!==void 0?o=r:o=1);const a=Fraction.LCM(this.denominator,o),l=a/this.denominator,u=a/o,c=this.numerator*l+s*u;return this.set(c,a)}subtract(e,r){let s,o;e instanceof Fraction?(s=e.numerator,o=e.denominator):(e!==void 0?s=e:s=0,r!==void 0?o=r:o=1);const a=Fraction.LCM(this.denominator,o),l=a/this.denominator,u=a/o,c=this.numerator*l-s*u;return this.set(c,a)}multiply(e,r){let s,o;return e instanceof Fraction?(s=e.numerator,o=e.denominator):(e!==void 0?s=e:s=1,r!==void 0?o=r:o=1),this.set(this.numerator*s,this.denominator*o)}divide(e,r){let s,o;return e instanceof Fraction?(s=e.numerator,o=e.denominator):(e!==void 0?s=e:s=1,r!==void 0?o=r:o=1),this.set(this.numerator*o,this.denominator*s)}equals(e){const r=Fraction.__compareA.copy(e).simplify(),s=Fraction.__compareB.copy(this).simplify();return r.numerator===s.numerator&&r.denominator===s.denominator}greaterThan(e){const r=Fraction.__compareB.copy(this);return r.subtract(e),r.numerator>0}greaterThanEquals(e){const r=Fraction.__compareB.copy(this);return r.subtract(e),r.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 r=this.quotient(),s=Fraction.__tmp.copy(this);return r<0?s.abs().fraction():s.fraction(),r!==0?(e+=r,s.numerator!==0&&(e+=" "+s.toSimplifiedString())):s.numerator===0?e="0":e=s.toSimplifiedString(),e}parse(e){const r=e.split("/"),s=parseInt(r[0],10),o=r[1]?parseInt(r[1],10):1;return this.set(s,o)}}Fraction.__compareA=new Fraction;Fraction.__compareB=new Fraction;Fraction.__tmp=new Fraction;const X$3=Vex.MakeException("RegistryError");function setIndexValue(i,e,r,s,o){i[e][r]||(i[e][r]={}),i[e][r][s]=o}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:r,value:s,oldValue:o}){const a=this.getElementById(e);o!==null&&this.index[r][o]&&delete this.index[r][o][e],s!==null&&setIndexValue(this.index,r,s,a.getAttribute("id"),a)}register(e,r){if(r=r||e.getAttribute("id"),!r)throw new X$3("Can't add element without `id` attribute to registry",e);return e.setAttribute("id",r),setIndexValue(this.index,"id",r,r,e),Registry.INDEXES.forEach(s=>{this.updateIndex({id:r,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,r){const s=this.index[e];return s&&s[r]?Object.keys(s[r]).map(o=>s[r][o]):[]}getElementsByType(e){return this.getElementsByAttribute("type",e)}getElementsByClass(e){return this.getElementsByAttribute("class",e)}onUpdate({id:e,name:r,value:s,oldValue:o}){function a(l,u){return l.filter(c=>c===u).length>0}return a(Registry.INDEXES.concat(["id","class"]),r)?(this.updateIndex({id:e,name:r,value:s,oldValue:o}),this):this}}Registry.defaultRegistry=null;let Element$1=class vi{static newID(){return"auto"+vi.ID++}constructor({type:e}={}){this.attrs={id:vi.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,r=this.getStyle()){return r?(e.save(),r.shadowColor&&e.setShadowColor(r.shadowColor),r.shadowBlur&&e.setShadowBlur(r.shadowBlur),r.fillStyle&&e.setFillStyle(r.fillStyle),r.strokeStyle&&e.setStrokeStyle(r.strokeStyle),r.lineWidth&&e.setLineWidth(r.lineWidth),this):this}restoreStyle(e=this.context,r=this.getStyle()){return r?(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,r){const s=this.attrs.id,o=this.attrs[e];return this.attrs[e]=r,this.registry&&this.registry.onUpdate({id:s,name:e,value:r,oldValue:o}),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,r,s,o){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.addPoint(e,r),this.addPoint(s,o)}width(){return this.x2-this.x1}height(){return this.y2-this.y1}addPoint(e,r){e!=null&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),ethis.x2&&(this.x2=e)),r!=null&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),rthis.y2&&(this.y2=r))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addQuadraticCurve(e,r,s,o,a,l){const u=e+.6666666666666666*(s-e),c=r+2/3*(o-r),d=u+1/3*(a-e),g=c+1/3*(l-r);this.addBezierCurve(e,r,u,c,d,g,a,l)}addBezierCurve(e,r,s,o,a,l,u,c){const d=[e,r],g=[s,o],m=[a,l],y=[u,c];let b;this.addPoint(d[0],d[1]),this.addPoint(y[0],y[1]);const S=(A,E)=>Math.pow(1-A,3)*d[E]+3*Math.pow(1-A,2)*A*g[E]+3*(1-A)*Math.pow(A,2)*m[E]+Math.pow(A,3)*y[E];for(b=0;b<=1;b++){const A=6*d[b]-12*g[b]+6*m[b],E=-3*d[b]+9*g[b]-9*m[b]+3*y[b],x=3*g[b]-3*d[b];if(E===0){if(A===0)continue;const _=-x/A;0<_&&_<1&&(b===0&&this.addX(S(_,b)),b===1&&this.addY(S(_,b)));continue}const P=Math.pow(A,2)-4*x*E;if(P<0)continue;const C=(-A+Math.sqrt(P))/(2*E);0{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,r)=>{e===void 0&&(e="treble");const s={octave_shift:0};typeof r=="object"&&Vex.Merge(s,r);const o=i.split("/");if(o.length<2)throw new Vex.RERR("BadArguments",`Key must have note + octave and an optional glyph: ${i}`);const a=o[0].toUpperCase(),l=Flow.keyProperties.note_values[a];if(!l)throw new Vex.RERR("BadArguments","Invalid key name: "+a);l.octave&&(o[1]=l.octave);let u=parseInt(o[1],10);u-=s.octave_shift;let d=(u*7-4*7+l.index)/2;d+=Flow.clefProperties(e).line_shift;let g=0;d<=0&&d*2%2===0&&(g=1),d>=6&&d*2%2===0&&(g=-1);const m=typeof l.int_val<"u"?u*12+l.int_val:null,y=l.code,b=l.shift_right;let S={};if(o.length>2&&o[2]){const A=o[2].toUpperCase();S=Flow.keyProperties.customNoteHeads[A]||{}}return{key:a,octave:u,line:d,int_value:m,accidental:l.accidental,code:y,stroke:g,shift_right:b,displaced:!1,...S}};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},TI:{code:"v11",shift_right:0,stem_up_y_shift:5,stem_down_y_shift:5,stem_up_x_offset:6,stem_down_x_offset:4},X0:{code:"v92",stem_up_x_offset:-2,stem_down_x_offset:0,stem_up_y_offset:4,stem_down_y_offset:4},X1:{code:"v95",shift_right:-.5,stem_up_y_offset:4,stem_down_y_offset:4},X2:{code:"v3e",shift_right:.5,stem_up_y_offset:4,stem_down_y_offset:4},X3:{code:"v3b",shift_right:0,stem_up_x_offset:-1.2,stem_down_x_offset:0,stem_up_y_offset:-1,stem_down_y_offset:2},S1:{code:"vd3",shift_right:0},S2:{code:"vd2",shift_right:0},R1:{code:"vd5",shift_right:0},R2:{code:"vd4",shift_right:0},rwl:{code:"rwl",shift_right:0},rhl:{code:"rhl",shift_right:0}};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 r=null,s=0,o=0;if(i.toString().toUpperCase()==="X"){const a=new Glyph("v7f",Flow.DEFAULT_TABLATURE_FONT_SCALE).getMetrics();r="v7f",s=a.width,o=-a.height/2}else s=Flow.textWidth(i.toString());return{text:i,code:r,getWidth:()=>s*e,shift_y:o}};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 r=Flow.keySignature.accidentalList(e.acc),s=[];for(let o=0;o({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 r=/(\d*\/?\d+|[a-z])(d*)([nrhms]|$)/.exec(i);if(!r)return null;const s=r[1],o=r[2].length;let a=r[3];return a.length===0&&(a="n"),{duration:s,dots:o,type:a}};Flow.parseNoteStruct=i=>{const e=i.duration,r=Flow.parseNoteDurationString(e);if(!r)return null;let s=Flow.durationToTicks(r.duration);if(s==null)return null;let o=i.type;const a=[];if(o){if(!Flow.getGlyphProps.validTypes[o])return null}else o=r.type||"n",i.keys!==void 0&&i.keys.forEach((c,d)=>{const g=c.split("/");g&&g.length===3&&(a[d]=g[2])});const l=i.dots?i.dots:r.dots;if(typeof l!="number")return null;let u=s;for(let c=0;c{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 r=Flow.getGlyphProps.duration_codes[i];if(r===void 0)return null;e||(e="n");let s=r.type[e];if(s===void 0){const o=Flow.keyProperties.customNoteHeads[e.toUpperCase()];if(o===void 0)return null;s={code_head:o.code,...o}}return{...r.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,r){return Math.max(e,r)>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),r>this.CANVAS_BROWSER_SIZE_LIMIT&&(r=this.CANVAS_BROWSER_SIZE_LIMIT)),[e,r]}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,r,s){return this.vexFlowCanvasContext.font=(s||"")+" "+r+"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,r){return this.vexFlowCanvasContext.scale(parseFloat(e),parseFloat(r))}resize(e,r){return[e,r]=this.SanitizeCanvasDims(parseInt(e,10),parseInt(r,10)),this.vexFlowCanvasContext.resize(e,r)}rect(e,r,s,o){return this.vexFlowCanvasContext.rect(e,r,s,o)}fillRect(e,r,s,o){return this.vexFlowCanvasContext.fillRect(e,r,s,o)}clearRect(e,r,s,o){return this.vexFlowCanvasContext.clearRect(e,r,s,o)}beginPath(){return this.vexFlowCanvasContext.beginPath()}moveTo(e,r){return this.vexFlowCanvasContext.moveTo(e,r)}lineTo(e,r){return this.vexFlowCanvasContext.lineTo(e,r)}bezierCurveTo(e,r,s,o,a,l){return this.vexFlowCanvasContext.bezierCurveTo(e,r,s,o,a,l)}quadraticCurveTo(e,r,s,o){return this.vexFlowCanvasContext.quadraticCurveTo(e,r,s,o)}arc(e,r,s,o,a,l){return this.vexFlowCanvasContext.arc(e,r,s,o,a,l)}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,r,s){return this.vexFlowCanvasContext.fillText(e,r,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,r,s){return this.state.font_family=e,this.state.font_size=r,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,r){return this.state.scale={x:e,y:r},this.attributes.transform="S"+e+","+r+",0,0",this.attributes.scale=e+","+r+",0,0",this.attributes.font=this.state.font_size*this.state.scale.x+"pt "+this.state.font_family,this.background_attributes.transform="S"+e+","+r+",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,r){return this.element.style.width=e,this.paper.setSize(e,r),this}setViewBox(e){this.paper.canvas.setAttribute("viewBox",e)}rect(e,r,s,o){return o<0&&(r+=o,o=-o),this.paper.rect(e,r,s-.5,o-.5).attr(this.attributes).attr("fill","none").attr("stroke-width",this.lineWidth),this}fillRect(e,r,s,o){return o<0&&(r+=o,o=-o),this.paper.rect(e,r,s-.5,o-.5).attr(this.attributes),this}clearRect(e,r,s,o){return o<0&&(r+=o,o=-o),this.paper.rect(e,r,s-.5,o-.5).attr(this.background_attributes),this}beginPath(){return this.path="",this.pen.x=0,this.pen.y=0,this}moveTo(e,r){return this.path+="M"+e+","+r,this.pen.x=e,this.pen.y=r,this}lineTo(e,r){return this.path+="L"+e+","+r,this.pen.x=e,this.pen.y=r,this}bezierCurveTo(e,r,s,o,a,l){return this.path+="C"+e+","+r+","+s+","+o+","+a+","+l,this.pen.x=a,this.pen.y=l,this}quadraticCurveTo(e,r,s,o){return this.path+="Q"+e+","+r+","+s+","+o,this.pen.x=s,this.pen.y=o,this}arc(e,r,s,o,a,l){function u(d){for(;d<0;)d+=Math.PI*2;for(;d>Math.PI*2;)d-=Math.PI*2;return d}if(o=u(o),a=u(a),o>a){const d=o;o=a,a=d,l=!l}const c=a-o;return c>Math.PI?(this.arcHelper(e,r,s,o,o+c/2,l),this.arcHelper(e,r,s,o+c/2,a,l)):this.arcHelper(e,r,s,o,a,l),this}arcHelper(e,r,s,o,a,l){const u=e+s*Math.cos(o),c=r+s*Math.sin(o),d=e+s*Math.cos(a),g=r+s*Math.sin(a);let m=0,y=0;l?(y=1,a-oMath.PI&&(m=1),this.path+="M"+u+","+c+",A"+s+","+s+",0,"+m+","+y+","+d+","+g+"M"+this.pen.x+","+this.pen.y}glow(){const e=this.paper.set();if(this.shadow_attributes.width>0){const r=this.shadow_attributes,s=r.width/2;for(let o=1;o<=s;o++)e.push(this.paper.path(this.path).attr({stroke:r.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(r.width/s*o).toFixed(3),opacity:+((r.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,r=this.paper.path(this.path).attr(this.attributes).attr("fill","none").attr("stroke-width",e);return this.glow(r),this}closePath(){return this.path+="Z",this}measureText(e){const r=this.paper.text(0,0,e).attr(this.attributes).attr("fill","none").attr("stroke","none"),s=r.getBBox();return r.remove(),{width:s.width,height:s.height}}fillText(e,r,s){return this.paper.text(r+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 r=this.create("svg");this.element.appendChild(r),this.svg=r,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,r,s,o){const a=this.create("g");return this.groups.push(a),this.parent.appendChild(a),this.parent=a,e&&a.setAttribute("class",Vex.Prefix(e)),r&&a.setAttribute("id",Vex.Prefix(r)),s&&s.pointerBBox&&a.setAttribute("pointer-events","bounding-box"),o&&o==="isX"&&(a.style.transformOrigin="center",a.style.transformBox="content-box",a.style.transform="scale(1.5) translateY(-5px)"),a}closeGroup(e){if(e&&e==="transform"){const r=this.groups.pop();let s=r.getAttribute("class");s=s+" vf-stopDot",r.setAttribute("class",s)}else 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,r,s){let o=!1,a=!1,l="normal";typeof s=="string"&&(s.indexOf("italic")!==-1&&(s=s.replace(/italic/g,""),a=!0),s.indexOf("bold")!==-1&&(s=s.replace(/bold/g,""),o=!0),s=s.replace(/ /g,"")),s=o?"bold":s,s=typeof s>"u"||s===""?"normal":s,l=a?"italic":l;const u={"font-family":e,"font-size":r+"pt","font-weight":s,"font-style":l};return this.fontSize=Number(r),Vex.Merge(this.attributes,u),Vex.Merge(this.state,u),this}setRawFont(e){e=e.trim();const r=e.split(" ");return this.attributes["font-family"]=r[1],this.state["font-family"]=r[1],this.attributes["font-size"]=r[0],this.state["font-size"]=r[0],this.fontSize=Number(r[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,r){this.width=e,this.height=r,this.element.style.width=e;const s={width:e,height:r};return this.applyAttributes(this.svg,s),this.scale(this.state.scale.x,this.state.scale.y),this}scale(e,r){this.state.scale={x:e,y:r};const s=this.width/e,o=this.height/r;return this.setViewBox(0,0,s,o),this}setViewBox(...e){if(e.length===1){const[r]=e;this.svg.setAttribute("viewBox",r)}else{const[r,s,o,a]=e,l=r+" "+s+" "+o+" "+a;this.svg.setAttribute("viewBox",l)}}applyAttributes(e,r){const s=attrNamesToIgnoreMap[e.nodeName];return Object.keys(r).forEach(o=>{var a;s&&s[o]||!o||!r[o]||o==="d"&&((a=r[o])==null?void 0:a.indexOf("NaN"))>-1||e.setAttributeNS(null,o,r[o])}),e}clear(){for(;this.svg.lastChild;)this.svg.removeChild(this.svg.lastChild);this.scale(this.state.scale.x,this.state.scale.y)}rect(e,r,s,o,a){o<0&&(r+=o,o*=-1);const l=this.create("rect");return typeof a>"u"&&(a={fill:"none","stroke-width":this.lineWidth,stroke:this.attributes.stroke}),Vex.Merge(a,{x:e,y:r,width:s,height:o}),this.applyAttributes(l,a),this.add(l),this}fillRect(e,r,s,o){return o<0&&(r+=o,o*=-1),this.rect(e,r,s,o,this.attributes),this}clearRect(e,r,s,o){return this.rect(e,r,s,o,this.background_attributes),this}beginPath(){return this.path="",this.pen.x=NaN,this.pen.y=NaN,this}moveTo(e,r){return this.path+="M"+e+" "+r,this.pen.x=e,this.pen.y=r,this}lineTo(e,r){return this.path+="L"+e+" "+r,this.pen.x=e,this.pen.y=r,this}bezierCurveTo(e,r,s,o,a,l){return this.path+="C"+e+" "+r+","+s+" "+o+","+a+" "+l,this.pen.x=a,this.pen.y=l,this}quadraticCurveTo(e,r,s,o){return this.path+="Q"+e+" "+r+","+s+" "+o,this.pen.x=s,this.pen.y=o,this}arc(e,r,s,o,a,l){function u(d){for(;d<0;)d+=Math.PI*2;for(;d>Math.PI*2;)d-=Math.PI*2;return d}if(o=u(o),a=u(a),o>a){const d=o;o=a,a=d,l=!l}const c=a-o;return c>Math.PI?(this.arcHelper(e,r,s,o,o+c/2,l),this.arcHelper(e,r,s,o+c/2,a,l)):this.arcHelper(e,r,s,o,a,l),this}arcHelper(e,r,s,o,a,l){const u=e+s*Math.cos(o),c=r+s*Math.sin(o),d=e+s*Math.cos(a),g=r+s*Math.sin(a);let m=0,y=0;l?(y=1,a-oMath.PI&&(m=1),this.path+="M"+u+" "+c+" A"+s+" "+s+" 0 "+m+" "+y+" "+d+" "+g,!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,r=e.width/2;for(let s=1;s<=r;s++){const o={stroke:e.color,"stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width*.4/r*s).toFixed(3),opacity:+((e.opacity||.3)/r).toFixed(3)},a=this.create("path");o.d=this.path,this.applyAttributes(a,o),this.add(a)}}return this}fill(e){this.glow();const r=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(r,e),this.add(r),this}stroke(e=void 0){this.glow();const r=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(r,s),this.add(r),this}measureText(e){const r=this.create("text");if(typeof r.getBBox!="function")return{x:0,y:0,width:0,height:0};r.textContent=e,this.applyAttributes(r,this.attributes),this.svg.appendChild(r);let s=r.getBBox();return this.ie&&e!==""&&this.attributes["font-style"]==="italic"&&(s=this.ieMeasureTextFix(s,e)),this.svg.removeChild(r),s}ieMeasureTextFix(e){const r=Number(this.fontSize),s=1.196,o=1.9598,a=s*r+o,l=e.width-a,u=e.height-1.5;return{x:e.x,y:e.y,width:l,height:u}}fillText(e,r,s){if(!e||e.length<=0)return;const o={};Vex.Merge(o,this.attributes),o.stroke="none",o.x=r,o.y=s;const a=this.create("text");a.textContent=e,this.applyAttributes(a,o),this.add(a)}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,r,s,o,a){const l=new Renderer(e,r);s&&o&&l.resize(s,o),a||(a="#FFF");const u=l.getContext();return u.setBackgroundFillStyle(a),Renderer.lastContext=u,u}static getCanvasContext(e,r,s,o){return Renderer.buildContext(e,Renderer.Backends.CANVAS,r,s,o)}static getRaphaelContext(e,r,s,o){return Renderer.buildContext(e,Renderer.Backends.RAPHAEL,r,s,o)}static getSVGContext(e,r,s,o){return Renderer.buildContext(e,Renderer.Backends.SVG,r,s,o)}static bolsterCanvasContext(e){if(Renderer.USE_CANVAS_PROXY)return new CanvasContext(e);const r=["clear","setFont","setRawFont","setFillStyle","setBackgroundFillStyle","setStrokeStyle","setShadowColor","setShadowBlur","setLineWidth","setLineCap","setLineDash","openGroup","closeGroup","getGroup"];return e.vexFlowCanvasContext=e,r.forEach(s=>{e[s]=e[s]||CanvasContext.prototype[s]}),e}static drawDashedLine(e,r,s,o,a,l){e.beginPath();const u=o-r,c=a-s,d=Math.atan2(c,u);let g=r,m=s;e.moveTo(r,s);let y=0,b=!0;for(;!((u<0?g<=o:g>=o)&&(c<0?m<=a:m>=a));){const S=l[y++%l.length],A=g+Math.cos(d)*S;g=u<0?Math.max(o,A):Math.min(o,A);const E=m+Math.sin(d)*S;m=c<0?Math.max(a,E):Math.min(a,E),b?e.lineTo(g,m):e.moveTo(g,m),b=!b}e.closePath(),e.stroke()}constructor(e,r){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=r,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",{willReadFrequently:!0}))}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,r){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,r]=CanvasContext.SanitizeCanvasDims(e,r);const s=window.devicePixelRatio||1;this.element.width=e*s,this.element.height=r*s,this.element.style.width=e+"px",this.element.style.height=r+"px",this.ctx=Renderer.bolsterCanvasContext(this.element.getContext("2d",{willReadFrequently:!0})),this.ctx.scale(s,s)}else this.ctx.resize(e,r);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.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,r){return this.x_begin=e,this.x_end=r,this}setDirection(e){this.stem_direction=e}setExtension(e){this.stem_extension=e}getExtension(){return this.stem_extension}setYBounds(e,r){this.y_top=e,this.y_bottom=r}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,r=[this.y_top,this.y_bottom],s=Stem.HEIGHT+this.stem_extension,o=(e?Math.min:Math.max)(...r),a=(e?Math.max:Math.min)(...r);return{topY:o+s*-this.stem_direction,baseY:a}}setVisibility(e){return this.hide=!e,this}setStemlet(e,r){return this.isStemlet=e,this.stemletHeight=r,this}draw(){if(this.setRendered(),this.hide)return;const e=this.checkContext();let r,s;const o=this.stem_direction;o===Stem.DOWN?(r=this.x_begin,s=this.y_top+this.stem_down_y_offset):(r=this.x_end,s=this.y_bottom-this.stem_up_y_offset);const a=this.getHeight();L$j("Rendering stem - ","Top Y: ",this.y_top,"Bottom Y: ",this.y_bottom);const l=this.isStemlet?a-this.stemletHeight*this.stem_direction:0;if(e.save(),this.applyStyle(e),e.beginPath(),e.setLineWidth(Stem.WIDTH),e.moveTo(r,s-l),e.lineTo(r,s-a-this.renderHeightAdjustment*o),e.svg){const u={class:Vex.Prefix("stem")};this.id&&(u.id=this.id),e.stroke(u)}else e.stroke();this.restoreStyle(e),e.restore()}}let Tuplet$1=class jt extends Element$1{static get LOCATION_TOP(){return 1}static get LOCATION_BOTTOM(){return-1}static get NESTING_OFFSET(){return 15}constructor(e,r){if(super(),this.setAttribute("type","Tuplet"),!e||!e.length)throw new Vex.RuntimeError("BadArguments","No notes provided for tuplet.");this.options=Vex.Merge({},r),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||jt.LOCATION_TOP,Formatter.AlignRestsToNotes(e,!0,!0),this.resolveGlyphs(),this.attach()}attach(){for(let e=0;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,r=this.notes[0];let s=a(r,e),o=a(r,e);function a(l,u){return l.tupletStack.filter(c=>c.location===u).length}return this.notes.forEach(l=>{const u=a(l,e);s=u>s?u:s,o=uo&&(o=l)}}return o+e+r}draw(){this.checkContext(),this.setRendered();const e=this.notes[0],r=this.notes[this.notes.length-1];this.bracketed?(this.x_pos=e.getTieLeftX()-5,this.width=r.getTieRightX()-this.x_pos+5):(this.x_pos=e.getStemX(),this.width=r.getStemX()-this.x_pos),this.y_pos=this.getYPosition();const s=(u,c)=>u+c.getMetrics().width;let o=this.numerator_glyphs.reduce(s,0);this.ratioed&&(o=this.denom_glyphs.reduce(s,o),o+=this.point*.32);const l=this.x_pos+this.width/2-o/2;if(this.bracketed){const u=this.width/2-o/2-5;u>0&&(this.context.fillRect(this.x_pos,this.y_pos,u,1),this.context.fillRect(this.x_pos+this.width/2+o/2+5,this.y_pos,u,1),this.context.fillRect(this.x_pos,this.y_pos+(this.location===jt.LOCATION_BOTTOM),1,this.location*10),this.context.fillRect(this.x_pos+this.width,this.y_pos+(this.location===jt.LOCATION_BOTTOM),1,this.location*10))}if(this.RenderTupletNumber!==!1){let u=0;this.numerator_glyphs.forEach(c=>{c.render(this.context,l+u,this.y_pos+this.point/3-2),u+=c.getMetrics().width})}if(this.ratioed){const u=l+x_offset+this.point*.16,c=this.point*.06;this.context.beginPath(),this.context.arc(u,this.y_pos-this.point*.08,c,0,Math.PI*2,!0),this.context.closePath(),this.context.fill(),this.context.beginPath(),this.context.arc(u,this.y_pos+this.point*.12,c,0,Math.PI*2,!0),this.context.closePath(),this.context.fill(),x_offset+=this.point*.32,this.denom_glyphs.forEach(d=>{d.render(this.context,l+x_offset,this.y_pos+this.point/3-2),x_offset+=d.getMetrics().width})}}};function calculateStemDirection(i){let e=0;return i.forEach(r=>{r.keyProps&&r.keyProps.forEach(s=>{e+=s.line-3})}),e>=0?Stem.DOWN:Stem.UP}const getStemSlope=(i,e)=>{const r=i.getStemExtents().topY,s=i.getStemX(),o=e.getStemExtents().topY,a=e.getStemX();return(o-r)/(a-s)},BEAM_LEFT="L",BEAM_RIGHT="R",BEAM_BOTH="B";let Beam$1=class yi 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 o=parseInt(e.split("/")[0],10),a=parseInt(e.split("/")[1],10);if(o%3===0)return[new Fraction(3,a)];if(a>4)return[new Fraction(2,a)];if(a<=4)return[new Fraction(1,a)]}else return s.map(o=>new Fraction().parse(o));return[new Fraction(1,4)]}static applyAndGetBeams(e,r,s){return yi.generateBeams(e.getTickables(),{groups:s,stem_direction:r})}static generateBeams(e,r){r||(r={}),(!r.groups||!r.groups.length)&&(r.groups=[new Fraction(2,8)]);const s=r.groups.map(T=>{if(!T.multiply)throw new Vex.RuntimeError("InvalidBeamGroups","The beam groups must be an array of Vex.Flow.Fractions");return T.clone().multiply(Flow.RESOLUTION,1)}),o=e;let a=0,l=[],u=[];function c(T){return T.reduce((_,B)=>B.getTicks().clone().add(_),new Fraction(0,1))}function d(){s.length-1>a?a+=1:a=0}function g(){let T=[];o.forEach(_=>{if(T=[],_.shouldIgnoreTicks()){l.push(u),u=T;return}u.push(_);const B=s[a].clone(),M=c(u),N=Flow.durationToNumber(_.duration)<8;N&&_.tuplet&&(B.numerator*=2),M.greaterThan(B)?(N||T.push(u.pop()),l.push(u),u=T,d()):M.equals(B)&&(l.push(u),u=T,d())}),u.length>0&&l.push(u)}function m(){return l.filter(T=>{if(T.length>1){let _=!0;return T.forEach(B=>{B.getIntrinsicTicks()>=Flow.durationToTicks("4")&&(_=!1)}),_}return!1})}function y(){const T=[];l.forEach(_=>{let B=[];_.forEach((M,N,I)=>{const R=N===0||N===I.length-1,F=I[N-1],k=!r.beam_rests&&M.isRest(),V=r.beam_rests&&r.beam_middle_only&&M.isRest()&&R;let D=!1;if(r.maintain_stem_directions&&F&&!M.isRest()&&!F.isRest()){const q=F.getStemDirection();D=M.getStemDirection()!==q}const $=parseInt(M.duration,10)<8;k||V||D||$?(B.length>0&&T.push(B),B=D?[M]:[]):B.push(M)}),B.length>0&&T.push(B)}),l=T}function b(){l.forEach(T=>{let _;if(r.maintain_stem_directions){const B=S(T);_=B?B.getStemDirection():Stem.UP}else r.stem_direction?_=r.stem_direction:_=calculateStemDirection(T);A(T,_)})}function S(T){for(let _=0;_{B.setStemDirection(_)})}function E(){const T=[];return l.forEach(_=>{let B=null;_.forEach(M=>{M.tuplet&&B!==M.tuplet&&(B=M.tuplet,T.push(B))})}),T}g(),y(),b();const x=m(),P=E(),C=[];return x.forEach(T=>{const _=new yi(T);r.show_stemlets&&(_.render_options.show_stemlets=!0),r.secondary_breaks&&(_.render_options.secondary_break_ticks=Flow.durationToTicks(r.secondary_breaks)),r.flat_beams===!0&&(_.render_options.flat_beams=!0,_.render_options.flat_beam_offset=r.flat_beam_offset),C.push(_)}),P.forEach(T=>{const _=T.notes[0].stem_direction===Stem.DOWN?Tuplet$1.LOCATION_BOTTOM:Tuplet$1.LOCATION_TOP;T.setTupletLocation(_);let B=!1;for(let M=0;M=Flow.durationToTicks("4"))throw new Vex.RuntimeError("BadArguments","Beams can only be applied to notes shorter than a quarter note.");let s,o;for(this.stem_direction=Stem.UP,s=0;su+c.stem_direction,0)>-1?Stem.UP:Stem.DOWN),s=0;ss.getGlyph().beam_count).reduce((s,o)=>o>s?o:s)}breakSecondaryAt(e){return this.break_on_indices=e,this}getSlopeY(e,r,s,o){return s+(e-r)*o}calculateSlope(){const{notes:e,stem_direction:r,render_options:{max_slope:s,min_slope:o,slope_iterations:a,slope_cost:l}}=this,u=e[0],c=getStemSlope(u,e[e.length-1]),d=(s-o)/a;let g=Number.MAX_VALUE,m=0,y=0;for(let b=o;b<=s;b+=d){let S=0,A=0;for(let C=1;CE)&&(d=E,u=Math.min(...A.getYs()),c=A.getBeamCount())}let g=l/e.length;const m=s*1.5,y=o+c*m,b=u+y*-r;r===Stem.DOWN&&gb&&(g=u-y),a+this.render_options.flat_beam_offset_per_beam>0?r===Stem.DOWN&&g>a&&!this.render_options.flat_beams?this.render_options.flat_beam_offset=g:r===Stem.UP&&g0){let o=this.render_options.flat_beam_offset;this.render_options.flat_beam_offset_per_beam&&(o+=this.render_options.flat_beam_offset_per_beam*this.getBeamCount());let a=this.notes[0].note_heads[0].y;const l=this.stem_direction>0?Math.min:Math.max;for(const u of this.notes)for(const c of u.note_heads)a=l(a,c.y);s=a+o*-this.stem_direction}return s}applyStemExtensions(){const{notes:e,slope:r,y_shift:s,stem_direction:o,beam_count:a,render_options:{show_stemlets:l,stemlet_extension:u,beam_width:c}}=this,d=e[0],g=this.getBeamYToDraw(),m=d.getStemX();for(let y=0;y=8&&(b=this.break_on_indices.indexOf(g)!==-1,this.render_options.secondary_break_ticks&&c>=this.render_options.secondary_break_ticks&&(c=0,b=!0));const S=m.getIntrinsicTicks(){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"],r=this.notes[0];let s=this.getBeamYToDraw();const o=r.getStemX(),a=this.render_options.beam_width*this.stem_direction,l={};for(const u of this.notes)l[u.getAttribute("id")]=0;for(let u=0;u{e.getStave()||e.setStave(this.stave)}),this.preFormatted=!0,this)}draw(e=this.context,r=this.stave){this.setRendered();let s=null;for(let o=0;o0&&s){const l=a.getBoundingBox();l&&s.mergeWith(l)}a.setContext(e),a.drawWithStyle()}this.boundingBox=s}};function drawBoldDoubleLine(i,e,r,s,o){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 a=3,l=3.5;const u=2;e===StaveConnector.type.BOLD_DOUBLE_RIGHT&&(a=-5,l=3),i.fillRect(r+a,s,1,o-s),i.fillRect(r-u,s,l,o-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,r){super(),this.setAttribute("type","StaveConnector"),this.thickness=Flow.STAVE_LINE_THICKNESS,this.width=3,this.top_stave=e,this.bottom_stave=r,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,r){return this.texts.push({content:e,options:Vex.Merge({shift_x:0,shift_y:0},r)}),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 r=this.top_stave.getYForLine(0),s=this.bottom_stave.getYForLine(this.bottom_stave.getNumLines()-1)+this.thickness,o=this.width,a=this.top_stave.getX();(this.type===StaveConnector.type.SINGLE_RIGHT||this.type===StaveConnector.type.BOLD_DOUBLE_RIGHT||this.type===StaveConnector.type.THIN_DOUBLE)&&(a=this.top_stave.getX()+this.top_stave.width);let u=s-r;switch(this.type){case StaveConnector.type.SINGLE:o=1;break;case StaveConnector.type.SINGLE_LEFT:o=1;break;case StaveConnector.type.SINGLE_RIGHT:o=1;break;case StaveConnector.type.DOUBLE:a-=this.width+2;break;case StaveConnector.type.BRACE:{o=12;const c=this.top_stave.getX()-2+this.x_shift,d=r,g=c,m=s,y=c-o,b=d+u/2,S=y-.9*o,A=d+.2*u,E=c+1.1*o,x=b-.135*u,P=E,C=b+.135*u,T=S,_=m-.2*u,B=y-o,M=_,N=c+.4*o,I=b+.135*u,R=N,F=b-.135*u,k=B,V=A;e.beginPath(),e.moveTo(c,d),e.bezierCurveTo(S,A,E,x,y,b),e.bezierCurveTo(P,C,T,_,g,m),e.bezierCurveTo(B,M,N,I,y,b),e.bezierCurveTo(R,F,k,V,c,d),e.fill(),e.stroke();break}case StaveConnector.type.BRACKET:r-=4,s+=4,u=s-r,Glyph.renderGlyph(e,a-5,r-3,40,"v1b",!0),Glyph.renderGlyph(e,a-5,s+3,40,"v10",!0),a-=this.width+2;break;case StaveConnector.type.BOLD_DOUBLE_LEFT:drawBoldDoubleLine(e,this.type,a+this.x_shift,r,s);break;case StaveConnector.type.BOLD_DOUBLE_RIGHT:drawBoldDoubleLine(e,this.type,a,r,s);break;case StaveConnector.type.THIN_DOUBLE:o=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(a,r,o,u),this.type===StaveConnector.type.THIN_DOUBLE&&e.fillRect(a-3,r,o,u),e.save(),e.lineWidth=2,e.setFont(this.font.family,this.font.size,this.font.weight);for(let c=0;c0){const E=A.space.deviation,x=E>=0?"+":"";e.setFillStyle("red"),e.fillText(x+Math.round(E),u+r.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 r=Flow.parseNoteStruct(e);if(!r)throw new Vex.RuntimeError("BadArguments",`Invalid note initialization object: ${JSON.stringify(e)}`);if(this.duration=r.duration,this.dots=r.dots,this.noteType=r.type,this.customTypes=r.customTypes,this.DYMusicScoreType=e.DYMusicScoreType,e.duration_override?this.setDuration(e.duration_override):this.setIntrinsicTicks(r.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,r){return r.setNote(this),r.setIndex(e),this.modifiers.push(r),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,r=0){return e.setNote(this),e.setIndex(r),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,r=0;this.modifierContext!=null&&(e=this.modifierContext.state.left_shift,r=this.modifierContext.state.right_shift);const s=this.getWidth();return{width:s,noteWidth:s-e-r-this.extraLeftPx-this.extraRightPx,left_shift:this.x_shift,modLeftPx:e,modRightPx:r,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 r=this.tickContext.getExtraPx();this.left_modPx=Math.max(this.left_modPx,r.left),this.right_modPx=Math.max(this.right_modPx,r.right)}}}function L$i(...i){NoteHead.DEBUG&&Vex.L("Vex.Flow.NoteHead",i)}function drawSlashNoteHead(i,e,r,s,o,a){const l=Flow.SLASH_NOTEHEAD_WIDTH;i.save(),i.setLineWidth(Flow.STEM_WIDTH);let u=!1;if(Flow.durationToNumber(e)>2&&(u=!0),u||(r-=Flow.STEM_WIDTH/2*o),i.beginPath(),i.moveTo(r,s+a),i.lineTo(r,s+1),i.lineTo(r+l,s-a),i.lineTo(r+l,s),i.lineTo(r,s+a),i.closePath(),u?i.fill():i.stroke(),Flow.durationToFraction(e).equals(.5)){const c=[-3,-1,l+1,l+3];for(let d=0;d5||this.line<0)&&(this.isLedgerLinedRest=!0,this.duration==="h"?(e.custom_glyph_code="rhl",this.x_shift_ledger_rest-=4):this.duration==="w"&&(e.custom_glyph_code="rwl",this.x_shift_ledger_rest-=4,this.y_shift_ledger_rest=-5)),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.stem_up_y_shift=e.stem_up_y_shift||0,this.stem_down_y_shift=e.stem_down_y_shift||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,r=Stem.WIDTH/2;return e+(this.displaced?(this.width-r)*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(),r=e/2,s=this.y-r;return new Flow.BoundingBox(this.getAbsoluteX(),s,this.width,e)}setStave(e){const r=this.getLine();return this.stave=e,this.setY(e.getYForNote(r)),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 r=this.getAbsoluteX(),s=this.y;this.custom_glyph&&(r+=this.x_shift_ledger_rest,this.stem_direction===Stem.UP?(r+=this.stem_up_x_offset,s+=this.stem_up_y_shift||0):this.stem_direction===Stem.DOWN&&(r+=this.stem_down_x_offset,s+=this.stem_down_y_shift||0),s+=this.y_shift_ledger_rest),L$i("Drawing note head '",this.note_type,this.duration,"' at",r,s);const o=this.stem_direction,a=this.render_options.glyph_font_scale;if(this.style&&this.applyStyle(e),this.note_type==="s"){const l=this.stave.getSpacingBetweenLines();drawSlashNoteHead(e,this.duration,r,s,o,l)}else Glyph.renderGlyph(e,r,s,a,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:r}=this,s=r===null&&this.renderFlag;if(e&&e.flag&&s){const o=this.getStemDirection()===Stem.DOWN?e.code_flag_downstem:e.code_flag_upstem;this.flag=new Glyph(o,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 r=Flow.durationToFraction(this.duration).value()<=1?0:20;switch(this.duration){case"8":this.beam==null&&(r=35);break;case"16":r=this.beam==null?35:25;break;case"32":r=this.beam==null?45:35;break;case"64":r=this.beam==null?50:40;break;case"128":r=this.beam==null?55:45;break}return r}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 r=this.getTopGlyph()||this.getGlyph();this.stem.setOptions({stem_up_y_offset:r.stem_up_y_offset,stem_down_y_offset:r.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,r=this.getAbsoluteX()+this.x_shift+this.getGlyphWidth();return this.stem_direction===Stem.DOWN?e:r}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 r=this.getStemExtents();return this.hasStem()?Math.min(this.stave.getYForTopText(e),r.topY-this.render_options.annotation_spacing*(e+1)):this.stave.getYForTopText(e)}getYForBottomText(e){const r=this.getStemExtents();return this.hasStem()?Math.max(this.stave.getYForTopText(e),r.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,r){const s=r.getTickContext(),o=s.getExtraPx(),a=s.getX()-o.left-o.extraLeft+this.getSpacingFromNextModifier();e.forEach(l=>{const u=l.getTickContext();l.setStave(r.stave),u.setXOffset(a)})}}class Dot extends Modifier{static get CATEGORY(){return"dots"}static format(e,r){const s=r.right_shift,o=1;if(!e||e.length===0)return!1;const a=[],l={};for(let b=0;bS.line-b.line);let u=s,c=0,d=null,g=null,m=null,y=0;for(let b=0;bc?u:c,d=x,g=A}return r.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,r=this.note.getModifierStartXY(this.position,this.index,{forceFlagRight:!0});this.note.getCategory()==="tabnotes"&&(r.y=this.note.getStemExtents().baseY+1);const s=r.x+this.x_shift+this.width-this.radius;let o=this.dot_shiftY*e;this.note&&this.note.DYMusicScoreType=="jianpu"&&(o=-5);const a=r.y+this.y_shift+o,l=this.context;l.beginPath(),l.arc(s,a,this.radius,0,Math.PI*2,!1),l.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,r){if(i.note.shiftRestVerticalDisabled)return;const s=(e.isrest?0:1)*r;i.line+=s,i.maxLine+=s,i.minLine+=s,i.note.setKeyLine(0,i.note.getKeyLine(0)+s)}function centerRest(i,e,r){const s=i.line-Vex.MidLine(e.minLine,r.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,r,s,o){let{width:a,height:l,wave_width:u,wave_girth:c,wave_height:d,stem_direction:g}=o;const m=Math.floor(a/u);let y=l/(m/2)*g;y==0&&(g=1,y=.3),e.beginPath(),e.moveTo(r,s+c);for(let b=0;b2?s[1]:null;let c=a>2?s[2]:s[1];a===2&&l.stemDirection===-1&&c.stemDirection===1&&!l.isrest&&!c.isRest&&(l=s[1],c=s[0]);const d=Math.max(l.voice_shift,c.voice_shift);let g=0,m;if(a===2){const y=l.stemDirection===c.stemDirection?0:.5;if(l.stemDirection===c.stemDirection&&l.minLine<=c.maxLine&&(l.isrest||(m=Math.abs(l.line-(c.maxLine+.5)),m=Math.max(m,l.stemMin),l.minLine=l.line-m,l.note.setStemLength(m*10))),l.minLine<=c.maxLine+y)if(l.isrest)shiftRestVertical(l,c,1),l.note.hasLedgerLinedRest&&(l.note.shiftRestVerticalDisabled=!0);else if(c.isrest)shiftRestVertical(c,l,-1),c.note.hasLedgerLinedRest&&(c.note.shiftRestVerticalDisabled=!0);else{g=d;const b=Math.abs(l.line-c.line);let S=0,A=0;l.note.duration==="h"?S++:l.note.duration==="w"&&A++,c.note.duration==="h"?S++:c.note.duration==="w"&&A++;let E=S===1||A===1||l.note.dots!==c.note.dots;if(o&&(E=E||A===2),b===0&&E){if(c.note.setXShift(g),l.note.dots>0){let x=0;for(const P of l.note.modifiers)if(P instanceof Dot&&(x++,P.setYShift(-10*(c.maxLine-l.line+1)),x===l.note.dots))break}}else b<1&&b>0?c.note.setXShift(g):l.note.voice!==c.note.voice&&l.stemDirection===c.stemDirection&&(l.line>c.line?l.stemDirection===1?c.note.renderFlag=!1:l.note.renderFlag=!1:c.line>l.line?c.stemDirection===1?l.note.renderFlag=!1:c.note.renderFlag=!1:c.stemDirection===1&&(c.stemDirection=-1,c.note.setStemDirection(-1)))}return!0}if(u!==null&&u.minLiner.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.paddingRight=0,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(s=>s.getStyle()),r=[];this.note_heads.forEach(s=>r.push(s.note_type)),this.buildNoteHeads(),this.note_heads.forEach((s,o)=>{s.setStyle(e[o]),r[o]&&(s.note_type=r[o])}),this.stave&&this.note_heads.forEach(s=>s.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(),r=this.getKeys();let s=null,o=null,a=!1,l,u,c;e===Stem.UP?(l=0,u=r.length,c=1):e===Stem.DOWN&&(l=r.length-1,u=-1,c=-1);for(let d=l;d!==u;d+=c){const g=this.keyProps[d],m=g.line;s===null?s=m:(o=Math.abs(s-m),o===0||o===.5?a=!a:(a=!1,this.use_default_head_x=!0)),s=m;const y=new NoteHead({duration:this.duration,note_type:this.noteType,displaced:a,stem_direction:e,custom_glyph_code:g.code,glyph_font_scale:this.render_options.glyph_font_scale,x_shift:g.shift_right,stem_up_x_offset:g.stem_up_x_offset,stem_down_x_offset:g.stem_down_x_offset,stem_up_y_shift:g.stem_up_y_shift,stem_down_y_shift:g.stem_down_y_shift,line:g.line});y.isLedgerLinedRest&&(this.hasLedgerLinedRest=!0),this.note_heads[d]=y}}autoStem(){this.minLine=this.keyProps[0].line,this.maxLine=this.keyProps[this.keyProps.length-1].line;const e=3,s=(this.minLine+this.maxLine)/20&&(this.keyProps[r-1].displaced=!0)),e=l,this.keyProps.push(a)}e=-1/0,this.keyProps.forEach(r=>{r.liner.line-s.line)}getBoundingBox(){if(!this.preFormatted)throw new Vex.RERR("UnformattedNote","Can't call getBoundingBox on an unformatted note.");const{width:e,modLeftPx:r,extraLeftPx:s}=this.getMetrics(),o=this.getAbsoluteX()-r-s-this.paddingRight;let a=0,l=0;const u=this.getStave().getSpacingBetweenLines()/2,c=u*2;if(this.isRest()){const d=this.ys[0],g=Flow.durationToFraction(this.duration);g.equals(1)||g.equals(2)?(a=d-u,l=d+u):(a=d-this.glyph.line_above*c,l=d+this.glyph.line_below*c)}else if(this.glyph.stem){const d=this.getStemExtents();d.baseY+=u*this.stem_direction,a=Math.min(d.topY,d.baseY),l=Math.max(d.topY,d.baseY)}else{a=null,l=null;for(let d=0;dr&&(r=o):o1}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 r=this.getStemExtents();return Math.min(this.stave.getYForTopText(e),r.topY-this.render_options.annotation_spacing*(e+1))}getYForBottomText(e){const r=this.getStemExtents();return Math.max(this.stave.getYForTopText(e),r.baseY+this.render_options.annotation_spacing*e)}setStave(e){super.setStave(e);const r=this.note_heads.map(s=>(s.setStave(e),s.getY()));if(this.setYs(r),this.stem){const{y_top:s,y_bottom:o}=this.getNoteHeadBounds();this.stem.setYBounds(s,o)}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 r=this.keyProps[this.keyProps.length-1].line,s=Math.max(e,r),o=Math.min(e,r);e=Vex.MidLine(s,o)}return e}getModifierStartXY(e,r,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:o,BELOW:a,LEFT:l,RIGHT:u}=Modifier.Position;let c=0;return e===l?c=-1*2:e===u?(c=this.getGlyphWidth()+this.x_shift+2,this.stem_direction===Stem.UP&&this.hasFlag()&&(s.forceFlagRight||isInnerNoteIndex(this,r))&&(c+=this.flag.getMetrics().width)):(e===a||e===o)&&(c=this.getGlyphWidth()/2),{x:this.getAbsoluteX()+c,y:this.ys[r]}}setStyle(e){super.setStyle(e),this.note_heads.forEach(r=>r.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,r){return this.note_heads[e].setStyle(r),this}setKeyLine(e,r){return this.keyProps[e].line=r,this.reset(),this}getKeyLine(e){return this.keyProps[e].line}addToModifierContext(e){this.setModifierContext(e);for(let r=0;r{const y=m.getLine(),b=m.getY();(e===null||br)&&(r=b),o===null&&m.isDisplaced()&&(o=m.getAbsoluteX()),s===null&&!m.isDisplaced()&&(s=m.getAbsoluteX()),a=y>a?y:a,l=y{let _;T&&C?_=A-s:C?_=S-s:_=b-s;const B=C&&T?l:a;o.beginPath(),o.moveTo(_,P),o.lineTo(_+B,P),o.stroke()},x={...e.getStyle()||{},...this.getLedgerLineStyle()||{}};this.applyStyle(o,x);for(let P=6;P<=u;++P){const C=S!==null&&P<=g,T=b!==null&&P<=d;E(e.getYForNote(P),C,T)}for(let P=0;P>=c;--P){const C=S!==null&&P>=y,T=b!==null&&P>=m;E(e.getYForNote(P),C,T)}this.restoreStyle(o,x)}drawVibrato(){if(this.vibrato){const e=this.context,r=this.vibrato.getNoteHeadEndX()+2;let{y_bottom:s}=this.vibrato.getNoteHeadBounds(),{y_top:o}=this.getNoteHeadBounds();const a=s1&&l.getAttribute("type")==="Accidental"&&this.modifiers.findIndex(g=>g.getAttribute("type")==="GraceNoteGroup")>=0)&&!(l.note&&l.note.DYMusicScoreType=="jianpu"&&l.getAttribute("type")==="Dot"&&!l.note.formatterMetrics.duration)){if(l.note&&l.note.DYMusicScoreType=="jianpu"&&l.getAttribute("type")==="Dot")try{l.note.getModifierStartXY(l.position,0,{forceFlagRight:!0}).x-l.note.x<9&&(l.x_shift+=7)}catch(d){console.log("🚀 ~ error:",d)}l.note&&l.note.DYMusicScoreType=="jianpu"&&(((s=l==null?void 0:l.articulation)==null?void 0:s.code)==="v28"||((o=l==null?void 0:l.articulation)==null?void 0:o.code)==="v42")&&(r="transform"),u.applyStyle(e,c),l.setContext(e),l.drawWithStyle(),u.restoreStyle(e,c)}}e.closeGroup(r),this.drawVibrato(),this.drawSlide()}drawFlag(){const{stem:e,beam:r,context:s}=this;if(!s)throw new Vex.RERR("NoCanvasContext","Can't draw without a canvas context.");const o=r===null&&this.renderFlag;if(this.getGlyph().flag&&o){const{y_top:l,y_bottom:u}=this.getNoteHeadBounds(),c=e.getHeight(),d=this.getStemX();let g=this.getStemDirection()===Stem.DOWN?l-c+2:u-c-2;if(e&&!r){const m=this.keyProps[0].line;(m>6.5||m<-.5)&&(g=g+(m>6.5?(m-6.5)*10:(m+.5)*10))}s.openGroup("flag",null,{pointerBBox:!0}),this.applyStyle(s,this.getFlagStyle()||!1),this.flag.render(s,d,g),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 r=this.stave.options.line_config.filter(o=>o.visible).length;this.keyProps[0].line===4&&r<5&&e.setY(e.getY()+10),r===1&&e.setLine(3)}}catch(r){}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 o=0;oo.setX(r)),this.stem){let o=this.getStemX();const a=this.keyProps[0].line;(a>6.5||a<-.5)&&(this.beam||(this.stem.renderHeightAdjustment=a>6.5?(a-6.5)*10:Math.abs(a+.5)*10)),this.stem.setNoteHeadXBounds(o,o)}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,r){const{left_shift:s,right_shift:o}=r,a=1;if(!e||e.length===0)return!1;const l=[];let u=null,c=0,d=0;for(let E=0;Ex.line-E.line);let g=0,m=0,y=0,b=0,S=null,A=null;for(let E=0;Ey?x:y):C===Modifier.Position.RIGHT&&(T.setXShift(m),x=d+N,b=x>b?x:b),S=_,A=P}return r.left_shift+=y,r.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,r=this.note.getModifierStartXY(this.position,this.index);let s=r.x+this.x_shift+this.x_offset,o=r.y+this.y_shift+this.y_offset+5;switch(this.position){case Modifier.Position.ABOVE:s-=4,o-=12;break;case Modifier.Position.BELOW:s-=2,o+=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,o),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 r=e.toLowerCase(),o=/^([cdefgab])(b|bb|n|#|##)?$/.exec(r);if(o!=null){const a=o[1],l=o[2];return{root:a,accidental:l}}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 r=e.toLowerCase(),o=/^([cdefgab])(b|#)?(mel|harm|m|M)?$/.exec(r);if(o!=null){const a=o[1],l=o[2];let u=o[3];return u||(u="M"),{root:a,accidental:l,type:u}}else throw new Vex.RERR("BadArguments",`Invalid key: ${e}`)}getNoteValue(e){const r=Music.noteValues[e];if(r==null)throw new Vex.RERR("BadArguments",`Invalid note name: ${e}`);return r.int_val}getIntervalValue(e){const r=Music.intervals[e];if(r==null)throw new Vex.RERR("BadArguments",`Invalid interval name: ${e}`);return r}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,r,s){if(s==null&&(s=1),s!==1&&s!==-1)throw new Vex.RERR("BadArguments",`Invalid direction: ${s}`);let o=(e+s*r)%Music.NUM_TONES;return o<0&&(o+=Music.NUM_TONES),o}getRelativeNoteName(e,r){const s=this.getNoteParts(e),o=this.getNoteValue(s.root);let a=r-o;if(Math.abs(a)>Music.NUM_TONES-3){let u=1;a>0&&(u=-1);const c=(r+1+(o+1))%Music.NUM_TONES*u;if(Math.abs(c)>2)throw new Vex.RERR("BadArguments",`Notes not related: ${e}, ${r})`);a=c}if(Math.abs(a)>2)throw new Vex.RERR("BadArguments",`Notes not related: ${e}, ${r})`);let l=s.root;if(a>0)for(let u=1;u<=a;++u)l+="#";else if(a<0)for(let u=-1;u>=a;--u)l+="b";return l}getScaleTones(e,r){const s=[e];let o=e;for(let a=0;ai.getMetrics().width;class Accidental extends Modifier{static get CATEGORY(){return"accidentals"}static format(e,r){const o=r.left_shift+1,a=3;if(!e||e.length===0)return;const l=[];let u=null,c=0,d;for(let P=0;PC.line-P.line);const g=[];let m=0,y=null;for(let P=0;Pm?C.shift:m,y=C.line}let b=0;for(let P=0;Pg[T+D],M=D=>D.map(B),N=(D,$)=>{const[O,q]=M([D,$]).map(G=>G.line);return O-q},I=(...D)=>D.map(M).every($=>!this.checkCollision(...$)),R=_-T+1;let F=this.checkCollision(g[T],g[_])?"a":"b";switch(R){case 3:F==="a"&&N(1,2)===.5&&N(0,1)!==.5&&(F="second_on_bottom");break;case 4:I([0,2],[1,3])&&(F="spaced_out_tetrachord");break;case 5:F==="b"&&I([1,3])&&(F="spaced_out_pentachord",I([0,2],[2,4])&&(F="very_spaced_out_pentachord"));break;case 6:I([0,3],[1,4],[2,5])&&(F="spaced_out_hexachord"),I([0,2],[2,4],[1,3],[3,5])&&(F="very_spaced_out_hexachord");break}let k,V;if(R>=7){let D=2,$=!0;for(;$===!0;){$=!1;for(let O=0;O+DV?b:V}else for(k=P;k<=_;k++)V=Flow.accidentalColumnsTable[R][F][k-P],g[k].column=V,b=b>V?b:V;P=_}const S=[],A=[];for(let P=0;P<=b;P++)S[P]=0,A[P]=0;S[0]=m+o,A[0]=m+o,g.forEach(P=>{P.width>S[P.column]&&(S[P.column]=P.width)});for(let P=1;P{let C=0;const T=x+P.numAcc;for(x;x0?(o=r.flatLine||r.dblSharpLine?2.5:3,e.dblSharpLine&&(s-=.5)):(o=e.flatLine||e.dblSharpLine?2.5:3,r.dblSharpLine&&(s-=.5));const a=Math.abs(s){const c=new Fraction(0,1);u.getTickables().forEach(g=>{if(g.shouldIgnoreTicks())return;const m=o[c.value()];m?m.push(g):(s.push(c.value()),o[c.value()]=[g]),c.add(g.getTicks())})});const a=new Music;r||(r="C");const l=a.createScaleMap(r);s.forEach(u=>{const c=o[u],d=[],g=m=>{m.isRest()||m.shouldIgnoreTicks()||(m.keys.forEach((y,b)=>{const S=a.getNoteParts(y.split("/")[0]),A=S.accidental||"n",E=S.root+A,x=l[S.root]===E,P=d.indexOf(E)>-1;if(!x||x&&P){l[S.root]=E;const C=new Accidental(A);m.addAccidental(b,C),d.push(E)}}),m.getModifiers().forEach(y=>{y.getCategory()==="gracenotegroups"&&y.getGraceNotes().forEach(g)}))};c.forEach(g)})}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:r,position:s,note:o,index:a,cautionary:l,x_shift:u,y_shift:c,glyph:d,parenLeft:g,parenRight:m,render_options:{parenLeftPadding:y,parenRightPadding:b}}=this;if(this.checkContext(),!(o&&a!=null))throw new Vex.RERR("NoAttachedNote","Can't draw accidental without a note and index.");const S=o.getModifierStartXY(s,a);let A=S.x+u;const E=S.y+c;L$g("Rendering: ",r,A,E),l?(m.render(e,A,E),A-=getGlyphWidth(m),A-=b,A-=this.accidental.parenRightPaddingAdjustment,d.render(e,A,E),A-=getGlyphWidth(d),A-=y,g.render(e,A,E)):d.render(e,A,E),this.setRendered()}}let NoteSubGroup$1=class Di extends Modifier{static get CATEGORY(){return"notesubgroup"}static format(e,r){if(!e||e.length===0)return!1;let s=0;for(let o=0;o{r.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 Di.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(r=>r.setContext(this.context).drawWithStyle())}};class StaveTie extends Element$1{constructor(e,r){super(),this.setAttribute("type","StaveTie"),this.notes=e,this.context=null,this.text=r,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 r=this.context;let s=this.render_options.cp1,o=this.render_options.cp2;Math.abs(e.last_x_px-e.first_x_px)<10&&(s=2,o=8);const a=this.render_options.first_x_shift,l=this.render_options.last_x_shift,u=this.render_options.y_shift*e.direction;for(let c=0;cy&&Math.abs(g-y)<10?-6:0;if(this.first_note&&this.first_note.DYMusicScoreType==="jianpu"){if(this.getAttribute("type")==="TabTie")continue;g1){const r=new Beam$1(e);r.render_options.beam_width=3,r.render_options.partial_beam_length=4,this.beams.push(r)}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(r=>{r.setContext(this.context).draw()}),this.beams.forEach(r=>{r.setContext(this.context).draw()}),this.show_slur){const r=this.getNote().getCategory()===StaveNote.CATEGORY,s=r?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=(r?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,r){const s=r.left_shift,o=0;if(!e||e.length===0)return this;const a=e.map(c=>{const d=c.getNote();if(d instanceof StaveNote){const{line:g,displaced:m}=d.getKeyProps()[c.getIndex()],y=m?d.getExtraLeftPx():0;return{line:g,shift:y,stroke:c}}else{const{str:g}=d.getPositions()[c.getIndex()];return{line:g,shift:0,stroke:c}}}),l=s,u=a.reduce((c,{stroke:d,shift:g})=>(d.setXShift(l+g),Math.max(d.getWidth()+o,c)),0);return r.left_shift+=u,!0}constructor(e,r){super(),this.setAttribute("type","Stroke"),this.note=null,this.options=Vex.Merge({},r),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 r=this.note.getYs(),s=e.y,o=e.y;const a=e.x-5,l=this.note.stave.options.spacing_between_lines_px,u=this.getModifierContext().getModifiers(this.note.getCategory());for(let b=0;b_.line-T.line);let A=0,E=0,x=0,P=null,C=null;for(g=0;gE?T:E):b===Modifier.Position.RIGHT&&(m.setXShift(A),T+=M,x=T>x?T:x),P=_,C=y}return r.left_shift+=E,r.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 r=this.note.stave.options.spacing_between_lines_px,s=this.note.getModifierStartXY(this.position,this.index);let o=s.x+this.x_shift+this.x_offset,a=s.y+this.y_shift+this.y_offset;switch(this.position){case Modifier.Position.ABOVE:case Modifier.Position.BELOW:{const u=this.note.getStemExtents();let c=u.topY,d=u.baseY+2;this.note.stem_direction===StaveNote.STEM_DOWN&&(c=u.baseY,d=u.topY-2),this.position===Modifier.Position.ABOVE?a=this.note.hasStem()?c-r*1.75:s.y-r*1.75:a=this.note.hasStem()?d+r*1.5:s.y+r*1.75,a+=this.y_shift+this.y_offset;break}case Modifier.Position.LEFT:o-=this.radius/2+5;break;case Modifier.Position.RIGHT:o+=this.radius/2+6;break;default:throw new Vex.RERR("InvalidPosition",`The position ${this.position} is invalid`)}e.save(),e.beginPath(),e.arc(o,a,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 l=o-e.measureText(this.string_number).width/2;if(e.fillText(""+this.string_number,l,a+4.5),this.last_note!=null){const u=this.last_note.getStemX()-this.note.getX()+5;e.strokeStyle="#000000",e.lineCap="round",e.lineWidth=.6,this.dashed?Renderer.drawDashedLine(e,o+10,a,o+u,a,[3,3]):Renderer.drawDashedLine(e,o+10,a,o+u,a,[3,0]);let c,d;switch(this.leg){case Renderer.LineEndType.UP:c=-10,d=this.dashed?[3,3]:[3,0],Renderer.drawDashedLine(e,o+u,a,o+u,a+c,d);break;case Renderer.LineEndType.DOWN:c=10,d=this.dashed?[3,3]:[3,0],Renderer.drawDashedLine(e,o+u,a,o+u,a+c,d);break}}e.restore()}}class TickContext extends Tickable{static getNextContext(e){const r=e.tContexts,s=r.indexOf(e);return r[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:r,extraLeftPx:s,extraRightPx:o}=this;return{width:e,notePx:r,extraLeftPx:s,extraRightPx:o}}getCurrentTick(){return this.currentTick}setCurrentTick(e){this.currentTick=e,this.preFormatted=!1}getExtraPx(){let e=0,r=0,s=0,o=0;for(let a=0;ai(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,r,s)=>{const o=roundToNearestHalf(getRoundingFunction(e,r),e),a=i&&isWithinLines(o,r),l=o%1===0;return a&&l?o+.5*-s:o},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 r=i.getStave(),s=i.getStemDirection(),{topY:o,baseY:a}=i.getStemExtents();if(isStaveNote(i))return i.hasStem()?s===Stem.UP?o:a:Math.min(...i.getYs());if(isTabNote(i))return i.hasStem()&&s===Stem.UP?o:r.getYForTopText(e);throw new Vex.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")},getBottomY=(i,e)=>{const r=i.getStave(),s=i.getStemDirection(),{topY:o,baseY:a}=i.getStemExtents();if(isStaveNote(i))return i.hasStem()?s===Stem.UP?a:o:Math.max(...i.getYs());if(isTabNote(i))return i.hasStem()?s===Stem.UP?r.getYForBottomText(e):o:r.getYForBottomText(e);throw new Vex.RERR("UnknownCategory","Only can get the top and bottom ys of stavenotes and tabnotes")},getInitialOffset=(i,e)=>{const r=e===ABOVE&&i.getStemDirection()===Stem.UP||e===BELOW&&i.getStemDirection()===Stem.DOWN;return isStaveNote(i)?i.hasStem()&&r?.5:1:i.hasStem()&&r?1:0};let Articulation$1=class fi extends Modifier{static get CATEGORY(){return"articulations"}static get INITIAL_OFFSET(){return-.5}static format(e,r){if(!e||e.length===0)return!1;const s=c=>c.getPosition()===ABOVE,o=c=>c.getPosition()===BELOW,a=.5,l=(c,d,g)=>roundToNearestHalf(getRoundingFunction(d,g),c.glyph.getMetrics().height/10+a);e.filter(s).forEach(c=>{c.setTextLine(r.top_text_line),r.top_text_line+=l(c,r.top_text_line,ABOVE)}),e.filter(o).forEach(c=>{c.setTextLine(r.text_line),r.text_line+=l(c,r.text_line,BELOW)});const u=e.map(c=>c.getWidth()).reduce((c,d)=>Math.max(d,c));return r.left_shift+=u/2,r.right_shift+=u/2,!0}static easyScoreHook({articulations:e},r,s){if(!e)return;const o={staccato:"a.",tenuto:"a-"};e.split(",").map(a=>a.trim().split(".")).map(([a,l])=>{const u={type:o[a]};return l&&(u.position=Modifier.PositionString[l]),s.getFactory().Articulation(u)}).map(a=>r.addModifier(0,a))}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.breathMarkDistance=.8,this.articulation=Flow.articulationCodes(this.type),this.type==="abr"&&(this.articulation={code:"v6c",between_lines:!1}),!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 fi.CATEGORY}draw(){const{note:e,index:r,position:s,glyph:o,articulation:{between_lines:a},text_line:l,context:u}=this;if(this.checkContext(),!e||r==null)throw new Vex.RERR("NoAttachedNote","Can't draw Articulation without a note and index.");this.setRendered();const c=e.getStave(),d=c.getSpacingBetweenLines(),g=e.getCategory()==="tabnotes";let{x:m}=e.getModifierStartXY(s,r);if(this.type==="abr"){let E=0;const x=e.getTickContext(),P=TickContext.getNextContext(x),C=e.getTickContext().getX();if(P)E=(P.getX()-C)*this.breathMarkDistance;else{const T=e.getStave();E=(T.getX()+T.getWidth()-C)*this.breathMarkDistance}m+=E}const y=this.getXShift();y&&(m+=y);const b=!a||g,S=getInitialOffset(e,s);let A={[ABOVE]:()=>{o.setOrigin(.5,1);const E=getTopY(e,l)-(l+S)*d+(this.y_shift||0);return b?Math.min(c.getYForTopText(fi.INITIAL_OFFSET),E):E},[BELOW]:()=>{o.setOrigin(.5,0);const E=getBottomY(e,l)+(l+S)*d;return b?Math.max(c.getYForBottomText(fi.INITIAL_OFFSET),E):E}}[s]();if(!g){const E=s===ABOVE?-1:1,x=g?e.positions[r].str:e.getKeyProps()[r].line,C=(e.getYs()[r]-A)/d+x,T=snapLineToStaff(a,C,s,E);isWithinLines(T,s)&&o.setOrigin(.5,.5),A+=Math.abs(T-C)*d*E}L$e(`Rendering articulation at (x: ${m}, y: ${A})`),o.render(u,m,A)}};function L$d(...i){Ornament.DEBUG&&Vex.L("Vex.Flow.Ornament",i)}class Ornament extends Modifier{static get CATEGORY(){return"ornaments"}static format(e,r){if(!e||e.length===0)return!1;let s=0;for(let o=0;o0&&o--;for(let c=0;c{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,o;const r=i[e+1];return r&&((s=r==null?void 0:r.keys)!=null&&s.includes("b/4"))||(o=r==null?void 0:r.keys)!=null&&o.includes("r/4")?getNext(i,e+1):r}function lookAhead(i,e,r,s){let o=e;for(r+=1;r{if(c.getMode()===Voice$1.Mode.STRICT&&!c.isComplete())throw new Vex.RERR("IncompleteVoice","Voice does not have enough notes.");return Math.max(u,Fraction.LCM(u,c.getResolutionMultiplier()))},1),o={},a=[],l=[];return i.forEach(u=>{const c=new Fraction(0,s);u.getTickables().forEach(d=>{const g=c.numerator;if(!o[g]){const m=new e;l.push(m),o[g]=m}r(d,o[g]),a.push(g),c.add(d.getTicks())})}),{map:o,array:l,list:Vex.SortAndUnique(a,(u,c)=>u-c,(u,c)=>u===c),resolutionMultiplier:s}}class Formatter{static SimpleFormat(e,r=0,{paddingBetween:s=10}={}){e.reduce((o,a)=>{a.addToModifierContext(new ModifierContext);const l=new TickContext().addTickable(a).preFormat(),u=l.getExtraPx();return l.setX(o+u.left),o+l.getWidth()+u.right+s},r)}static plotDebugging(e,r,s,o,a){const l=s+Note.STAVEPADDING,u=r.contextGaps;function c(d,g,m){e.beginPath(),e.setStrokeStyle(m),e.setFillStyle(m),e.setLineWidth(1),e.fillRect(d,o,g-d,a-o)}e.save(),e.setFont("Arial",8,""),u.gaps.forEach(d=>{c(l+d.x1,l+d.x2,"#aaa"),e.fillText(Math.round(d.x2-d.x1),l+d.x1,a+12)}),e.fillText(Math.round(u.total)+"px",l-20,a+12),e.setFillStyle("red"),e.fillText("Loss: "+r.lossHistory.map(d=>Math.round(d)),l-20,a+22),e.restore()}static FormatAndDraw(e,r,s,o){const a={auto_beam:!1,align_rests:!1};typeof o=="object"?Vex.Merge(a,o):typeof o=="boolean"&&(a.auto_beam=o);const l=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(s),u=a.auto_beam?Beam$1.applyAndGetBeams(l):[];return new Formatter().joinVoices([l],{align_rests:a.align_rests}).formatToStave([l],r,{align_rests:a.align_rests,stave:r}),l.setStave(r).draw(e,r),u.forEach(c=>c.setContext(e).draw()),l.getBoundingBox()}static FormatAndDrawTab(e,r,s,o,a,l,u){const c={auto_beam:l,align_rests:!1};typeof u=="object"?Vex.Merge(c,u):typeof u=="boolean"&&(c.auto_beam=u);const d=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(a),g=new Voice$1(Flow.TIME4_4).setMode(Voice$1.Mode.SOFT).addTickables(o),m=c.auto_beam?Beam$1.applyAndGetBeams(d):[];new Formatter().joinVoices([d],{align_rests:c.align_rests}).joinVoices([g]).formatToStave([d,g],s,{align_rests:c.align_rests}),d.draw(e,s),g.draw(e,r),m.forEach(y=>y.setContext(e).draw()),new StaveConnector(s,r).setContext(e).draw()}static AlignRestsToNotes(e,r,s){return e.forEach((o,a)=>{if(o instanceof StaveNote&&o.isRest()){if(o.tuplet&&!s)return;const l=o.getGlyph().position.toUpperCase();if(l!=="R/4"&&l!=="B/4")return;if(r||o.beam!=null){const u=o.getKeyProps()[0];if(a===0)u.line=lookAhead(e,u.line,a,!1),o.setKeyLine(0,u.line);else if(a>0&&a0){const A=b<1.5?Math.abs(b-1.5)*u:0;S.setResetHeight(A)}else{const A=b>4.5?Math.abs(b-4.5)*u:0;S.setResetHeight(A)}}}}}}),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,r){if(!e||!e.length)throw new Vex.RERR("BadArgument","No voices to format rests");e.forEach(s=>Formatter.AlignRestsToNotes(s.getTickables(),r))}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:r,map:s}=this.tickContexts;return this.minTotalWidth=r.map(o=>{const a=s[o];return a.preFormat(),a.getWidth()}).reduce((o,a)=>o+a,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 r=createContexts(e,ModifierContext,(s,o)=>s.addToModifierContext(o));return this.modiferContexts=r,r}createTickContexts(e){const r=createContexts(e,TickContext,(s,o)=>o.addTickable(s));return r.array.forEach(s=>{s.tContexts=r.array}),this.totalTicks=e[0].getTicksUsed().clone(),this.tickContexts=r,r}preFormat(e=0,r,s,o){const a=this.tickContexts,{list:l,map:u,resolutionMultiplier:c}=a;s&&o&&s.forEach(E=>E.setStave(o).preFormat());let d=0,g=0;const m=e/2;if(this.minTotalWidth=0,l.forEach(E=>{const x=u[E];r&&x.setContext(r),x.preFormat();const P=x.getWidth();this.minTotalWidth+=P;const C=x.getMetrics();d=d+g+C.extraLeftPx,x.setX(d),g=P-C.extraLeftPx}),this.minTotalWidth=d+g,this.hasMinTotalWidth=!0,e<=0)return;const y=e-this.minTotalWidth;let b=this.totalTicks.value();b===0&&(b=1);const S=y/(b*c);let A=0;l.forEach((E,x)=>{const P=l[x-1]||0,C=u[E],T=(E-P)*S;A+=T,C.setX(C.getX()+A),C.getCenterAlignedTickables().forEach(_=>{_.center_x_shift=m-C.getX()})}),l.length!==1&&(this.justifyWidth=e,this.lossHistory=[],this.evaluate())}evaluate(){const e=this.justifyWidth;this.contextGaps={total:0,gaps:[]},this.tickContexts.list.forEach((a,l)=>{if(l===0)return;const u=this.tickContexts.list[l-1],c=this.tickContexts.map[u],d=this.tickContexts.map[a],g=c.getMetrics(),m=c.getX()+g.width,y=d.getX(),b=y-m;this.contextGaps.total+=b,this.contextGaps.gaps.push({x1:m,x2:y}),d.getFormatterMetrics().freedom.left=b,c.getFormatterMetrics().freedom.right=b});const r=this.durationStats={};function s(a,l){const u=r[a];u===void 0?r[a]={mean:l,count:1}:(u.count+=1,u.mean=(u.mean+l)/2)}this.voices.forEach(a=>{a.getTickables().forEach((l,u,c)=>{const d=l.getTicks().clone().simplify().toString(),g=l.getMetrics(),m=l.getFormatterMetrics(),y=l.getX()+g.noteWidth+g.modRightPx+g.extraRightPx;let b=0;if(u{a.getTickables().forEach(l=>{const u=l.getTicks().clone().simplify().toString(),c=l.getFormatterMetrics();c.iterations+=1,c.space.deviation=c.space.used-r[u].mean,c.duration=u,c.space.mean=r[u].mean,o+=Math.pow(r[u].mean,2)})}),this.totalCost=Math.sqrt(o),this.lossHistory.push(this.totalCost),this}tune(){const e=o=>o.reduce((a,l)=>a+l);function r(o,a,l,u){o.setX(o.getX()+u),o.getFormatterMetrics().freedom.left+=u,o.getFormatterMetrics().freedom.right-=u,a&&(a.getFormatterMetrics().freedom.right+=u),l&&(l.getFormatterMetrics().freedom.left-=u)}let s=0;return this.tickContexts.list.forEach((o,a,l)=>{const u=this.tickContexts.map[o],c=a>0?this.tickContexts.map[l[a-1]]:null,d=ay.getFormatterMetrics().space.deviation));g>0?s=-Math.min(u.getFormatterMetrics().freedom.right,Math.abs(g)):g<0&&(d?s=Math.min(d.getFormatterMetrics().freedom.right,Math.abs(g)):s=0);const m=Math.min(5,Math.abs(s));s=s>0?m:-m}),this.evaluate()}postFormat(){const e=r=>r.list.forEach(s=>r.map[s].postFormat());return e(this.modiferContexts),e(this.tickContexts),this}joinVoices(e){return this.createModifierContexts(e),this.hasMinTotalWidth=!1,this}format(e,r,s){const o={align_rests:!1,context:null,stave:null};return Vex.Merge(o,s),this.voices=e,this.alignRests(e,o.align_rests),this.createTickContexts(e),this.preFormat(r,o.context,e,o.stave),this}formatToStave(e,r,s){const o=r.getNoteEndX()-r.getNoteStartX()-10;L$a("Formatting voices to width: ",o);const a={context:r.getContext()};return Vex.Merge(a,s),this.format(e,o,a)}}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,r,s){e.setYShift(r.getYForLine(s)-r.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 r=Barline.type;this.widths={},this.widths[r.SINGLE]=5,this.widths[r.DOUBLE]=5,this.widths[r.END]=5,this.widths[r.REPEAT_BEGIN]=5,this.widths[r.REPEAT_END]=5,this.widths[r.REPEAT_BOTH]=5,this.widths[r.NONE]=5,this.paddings={},this.paddings[r.SINGLE]=0,this.paddings[r.DOUBLE]=0,this.paddings[r.END]=0,this.paddings[r.REPEAT_BEGIN]=15,this.paddings[r.REPEAT_END]=15,this.paddings[r.REPEAT_BOTH]=15,this.paddings[r.NONE]=0,this.layoutMetricsMap={},this.layoutMetricsMap[r.SINGLE]={xMin:0,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[r.DOUBLE]={xMin:-3,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[r.END]={xMin:-5,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[r.REPEAT_END]={xMin:-10,xMax:1,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[r.REPEAT_BEGIN]={xMin:-2,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[r.REPEAT_BOTH]={xMin:-10,xMax:10,paddingLeft:5,paddingRight:5},this.layoutMetricsMap[r.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,r,s){e.checkContext();const o=e.getTopLineTopY(),a=e.getBottomLineBottomY();s&&e.context.fillRect(r-3,o,1,a-o),e.context.fillRect(r,o,1,a-o)}drawVerticalEndBar(e,r){e.checkContext();const s=e.getTopLineTopY(),o=e.getBottomLineBottomY();e.context.fillRect(r-5,s,1,o-s),e.context.fillRect(r-2,s,3,o-s)}drawRepeatBar(e,r,s){e.checkContext();const o=e.getTopLineTopY(),a=e.getBottomLineBottomY();let l=3;s||(l=-5),e.context.fillRect(r+l,o,1,a-o),e.context.fillRect(r-2,o,3,a-o);const u=2;s?l+=4:l-=4;const c=r+l+u/2;let d=(e.getNumLines()-1)*e.getSpacingBetweenLines();d=d/2-e.getSpacingBetweenLines()/2;let g=o+d+u/2;e.context.beginPath(),e.context.arc(c,g,u,0,Math.PI*2,!1),e.context.fill(),g+=e.getSpacingBetweenLines(),e.context.beginPath(),e.context.arc(c,g,u,0,Math.PI*2,!1),e.context.fill()}}let Repetition$1=class Pt 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,r,s){super(),this.setAttribute("type","Repetition"),this.symbol_type=e,this.x=r,this.x_shift=0,this.y_shift=s,this.font={family:"times",size:12,weight:"bold italic"}}getCategory(){return Pt.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,r){switch(this.setRendered(),this.symbol_type){case Pt.type.CODA_RIGHT:this.drawCodaFixed(e,r+e.width);break;case Pt.type.CODA_LEFT:this.drawSymbolText(e,r,"Coda",!0);break;case Pt.type.SEGNO_LEFT:this.drawSignoFixed(e,r);break;case Pt.type.SEGNO_RIGHT:this.drawSignoFixed(e,r+e.width);break;case Pt.type.DC:this.drawSymbolText(e,r,"D.C.",!1);break;case Pt.type.DC_AL_CODA:this.drawSymbolText(e,r,"D.C. al",!0);break;case Pt.type.DC_AL_FINE:this.drawSymbolText(e,r,"D.C. al Fine",!1);break;case Pt.type.DS:this.drawSymbolText(e,r,"D.S.",!1);break;case Pt.type.DS_AL_CODA:this.drawSymbolText(e,r,"D.S. al",!0);break;case Pt.type.DS_AL_FINE:this.drawSymbolText(e,r,"D.S. al Fine",!1);break;case Pt.type.FINE:this.drawSymbolText(e,r,"Fine",!1);break;case Pt.type.TO_CODA:this.drawSymbolText(e,r,"To",!0);break}return this}drawCodaFixed(e,r){const s=e.getYForTopText(e.options.num_lines)+this.y_shift;return Glyph.renderGlyph(e.context,this.x+r+this.x_shift,s+25,40,"v4d",!0),this}drawSignoFixed(e,r){const s=e.getYForTopText(e.options.num_lines)+this.y_shift;return Glyph.renderGlyph(e.context,this.x+r+this.x_shift,s+25,30,"v8c",!0),this}drawSymbolText(e,r,s,o){const a=e.checkContext();a.save(),a.setFont(this.font.family,this.font.size,this.font.weight);let l=0+this.x_shift,u=r+this.x_shift;if(this.symbol_type===Pt.type.CODA_LEFT?(l=this.x+this.x_shift,u=l+a.measureText(s).width+12):(this.x_shift=-(l+a.measureText(s).width+12+e.options.vertical_bar_width+12),l=this.x+this.x_shift+e.options.vertical_bar_width,u=l+a.measureText(s).width+12),this.xShiftAsPercentOfStaveWidth){const d=e.width*this.xShiftAsPercentOfStaveWidth;(this.symbol_type===Pt.type.DC_AL_FINE||this.symbol_type===Pt.type.FINE||this.symbol_type===Pt.type.DC||this.symbol_type===Pt.type.DS_AL_FINE||this.symbol_type===Pt.type.DS||this.symbol_type===Pt.type.FINE)&&(l+=d)}const c=e.getYForTopText(e.options.num_lines)+this.y_shift+25;return o&&Glyph.renderGlyph(a,u,c,40,"v4d",!0),a.fillText(s,l,c+5),a.restore(),this}};class StaveSection extends StaveModifier{static get CATEGORY(){return"stavesection"}constructor(e,r,s){super(),this.setAttribute("type","StaveSection"),this.setWidth(16),this.section=e,this.x=r,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,r){const s=e.checkContext();this.setRendered(),s.save(),s.lineWidth=2,s.setFont(this.font.family,this.font.size,this.font.weight);const o=s.measureText(""+this.section),a=o.width;let l=o.height;!l&&o.emHeightAscent>=0&&(l=o.emHeightAscent+2),l||(l=o.fontBoundingBoxAscent+3);let u=a+6;u<18&&(u=18);const c=l+this.font.size/10,d=e.getYForTopText(3)+19-c*1.15+this.shift_y;let g=this.x+r;return s.beginPath(),s.lineWidth=2,s.rect(g,d+l/4,u,c),s.stroke(),g+=(u-a)/2,s.fillText(""+this.section,g,d+c),s.restore(),this}}class StaveTempo extends StaveModifier{static get CATEGORY(){return"stavetempo"}constructor(e,r,s){super(),this.setAttribute("type","StaveTempo"),this.tempo=e,this.position=Modifier.Position.ABOVE,this.x=r,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,r){const s=e.checkContext();this.setRendered();const o=this.render_options,a=o.glyph_font_scale/38,l=this.tempo.name,u=this.tempo.duration,c=this.tempo.dots,d=this.tempo.bpm,g=this.font;let m=this.x+this.shift_x+r;const y=e.getYForTopText(1)+this.shift_y;if(s.save(),s.openGroup("stavetempo",null,{}),l&&(s.setFont(g.family,g.size,g.weight),s.fillText(l,m,y),m+=s.measureText(l).width),u&&d){s.setFont(g.family,g.size,"normal"),l&&(m+=s.measureText(" ").width,s.fillText("(",m,y),m+=s.measureText("(").width);const b=Flow.getGlyphProps(u);if(m+=3*a,Glyph.renderGlyph(s,m,y,o.glyph_font_scale,b.code_head),m+=b.getWidth()*a,b.stem){let S=30;b.beam_count&&(S+=3*(b.beam_count-1)),S*=a;const A=y-S;s.fillRect(m-a,A,a,S),b.flag&&(Glyph.renderGlyph(s,m,A,o.glyph_font_scale,b.code_flag_upstem),c||(m+=6*a))}for(let S=0;S=e.line?c.above:c.below)}this.placeGlyphOnLine(o,this.stave,e.line),this.glyphs.push(o);const l=this.xPositions[this.xPositions.length-1],u=o.getMetrics().width+a;this.xPositions.push(l+u),this.width+=u}cancelKey(e){return this.formatted=!1,this.cancelKeySpec=e,this}convertToCancelAccList(e){const r=Flow.keySignature(e),s=this.accList.length>0&&r.length>0&&r[0].type!==this.accList[0].type,o=s?r.length:r.length-this.accList.length;if(o<1)return;const a=[];for(let l=0;l0?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 o=(this.position===StaveModifier.Position.END?this.stave.endClef:this.stave.clef)||this.stave.clef;s&&this.convertAccLines(o,s.type,s.accList),this.convertAccLines(o,r,e);for(let a=0;a0){const e=this.stave.context.openGroup("keysignature");for(let r=0;r{const e=i.split("/").filter(r=>r!=="");if(e.length!==2)throw new Vex.RERR("BadTimeSignature",`Invalid time spec: ${i}. Must be in the form "/"`);e.forEach(r=>{if(isNaN(Number(r)))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,r=15,s=!0){if(super(),this.setAttribute("type","TimeSignature"),this.validate_args=s,e===null)return;const o=r;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(o)}getCategory(){return TimeSignature.CATEGORY}parseTimeSpec(e){if(e==="C"||e==="C|"){const{line:o,code:a,point:l}=TimeSignature.glyphs[e];return{line:o,num:!1,glyph:new Glyph(a,l)}}this.validate_args&&assertIsValidFraction(e);const[r,s]=e.split("/").map(o=>o.split(""));return{num:!0,glyph:this.makeTimeSignatureGlyph(r,s)}}makeTimeSignatureGlyph(e,r){const s=new Glyph("v0",this.point);s.topGlyphs=[],s.botGlyphs=[];let o=0;for(let m=0;ma?o:a,u=s.getMetrics().x_min;s.getMetrics=()=>({x_min:u,x_max:u+l,width:l});const c=(l-o)/2,d=(l-a)/2,g=this;return s.renderToStave=function(y){let b=y+c;for(let S=0;Sr.visible).filter(Boolean).length}formatBegModifiers(e){let r=0;e.forEach(s=>{s.getNoteStartX()>r&&(r=s.getNoteStartX())}),e.forEach(s=>{s.setNoteStartX(r)}),r=0,e.forEach(s=>{s.getModifiers(StaveModifier.Position.BEGIN,Barline.CATEGORY).forEach(a=>{a.getType()==Barline.type.REPEAT_BEGIN&&a.getX()>r&&(r=a.getX())})}),e.forEach(s=>{s.getModifiers(StaveModifier.Position.BEGIN,Barline.CATEGORY).forEach(a=>{a.getType()==Barline.type.REPEAT_BEGIN&&a.setX(r)})}),r=0,e.forEach(s=>{s.getModifiers(StaveModifier.Position.BEGIN,TimeSignature.CATEGORY).forEach(a=>{a.getX()>r&&(r=a.getX())})}),e.forEach(s=>{s.getModifiers(StaveModifier.Position.BEGIN,TimeSignature.CATEGORY).forEach(a=>{a.setX(r)})})}getOptions(){return this.options}setNoteStartX(e){return this.formatted||this.format(),this.setStartX(e),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 r=e-this.x;this.formatted=!1,this.x=e,this.start_x+=r,this.end_x+=r;for(let s=0;ss.getWidth()&&(r-=s.getWidth()),r}setRepetitionTypeLeft(e,r){return this.modifiers.push(new Repetition$1(e,this.x,r)),this}setRepetitionTypeRight(e,r){return this.modifiers.push(new Repetition$1(e,this.x,r)),this}setVoltaType(e,r,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:r,MeasureNumber:this.MeasureNumber,y:s,x:this.x};else if(e===4){let o=this.MeasureNumber-volta.MeasureNumber,a=Math.max(volta.y,s);for(let l=0;l<=o;l++)voltaMeasureNumber[volta.MeasureNumber+l]={type:l===0?2:l===o?4:0,number_t:r,y:a};volta={}}else this.modifiers.push(new Volta(e,r,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,r,s=0,o=12){const a=new StaveSection(e,this.x+s,r);return a.font.size=o,this.modifiers.push(a),this}setTempo(e,r){return this.modifiers.push(new StaveTempo(e,this.x,r)),this}setText(e,r,s){let o=new StaveText(e,r,s);return o.setFont({family:"Arial",size:14,weight:"normal"}),this.modifiers.push(o),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,r=e.spacing_between_lines_px;return this.getYForLine(e.num_lines)+e.space_below_staff_ln*r}getBottomLineY(){return this.getYForLine(this.options.num_lines)}getYForLine(e){const r=this.options,s=r.spacing_between_lines_px,o=r.space_above_staff_ln;return this.y+e*s+o*s}getLineForY(e){const r=this.options,s=r.spacing_between_lines_px,o=r.space_above_staff_ln;return(e-this.y)/s-o}getYForTopText(e){const r=e||0;return this.getYForLine(-r-this.options.top_text_position)}getYForBottomText(e){const r=e||0;return this.getYForLine(this.options.bottom_text_position+r)}getYForNote(e){const r=this.options,s=r.spacing_between_lines_px,o=r.space_above_staff_ln;return this.y+o*s+5*s-e*s}getYForGlyphs(){return this.getYForLine(3)}addModifier(e,r,s){return r!==void 0&&e.setPosition(r),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:r,REPEAT_BEGIN:s,NONE:o}=Barline.type;return(e===r||e===s||e===o)&&(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,r,s,o){o===void 0&&(o=StaveModifier.Position.BEGIN),o===StaveModifier.Position.END?this.endClef=e:this.clef=e;const a=this.getModifiers(o,Clef.CATEGORY);return a.length===0?this.addClef(e,r,s,o):a[0].setType(e,r,s),this}setEndClef(e,r,s){return this.setClef(e,r,s,StaveModifier.Position.END),this}setKeySignature(e,r,s){this.options.keySignature=e,s===void 0&&(s=StaveModifier.Position.BEGIN);const o=this.getModifiers(s,KeySignature.CATEGORY);return o.length===0?this.options.DYMusicScoreType!=="jianpu"&&this.addKeySignature(e,r,s):o[0].setKeySig(e,r),this}setEndKeySignature(e,r){return this.setKeySignature(e,r,StaveModifier.Position.END),this}setTimeSignature(e,r,s){s===void 0&&(s=StaveModifier.Position.BEGIN);const o=this.getModifiers(s,TimeSignature.CATEGORY);return o.length===0?this.addTimeSignature(e,r,s):o[0].setTimeSig(e),this}setEndTimeSignature(e,r){return this.setTimeSignature(e,r,StaveModifier.Position.END),this}addKeySignature(e,r,s){return s===void 0&&(s=StaveModifier.Position.BEGIN),this.addModifier(new KeySignature(e,r).setPosition(s),s),this}addClef(e,r,s,o){return o===void 0||o===StaveModifier.Position.BEGIN?this.clef=e:o===StaveModifier.Position.END&&(this.endClef=e),this.addModifier(new Clef(e,r,s),o),this}addEndClef(e,r,s){return this.addClef(e,r,s,StaveModifier.Position.END),this}addTimeSignature(e,r,s){return this.addModifier(new TimeSignature(e,r),s),this}addEndTimeSignature(e,r){return this.addTimeSignature(e,r,StaveModifier.Position.END),this}addTrebleGlyph(){return this.addClef("treble"),this}getModifiers(e,r){return e===void 0&&r===void 0?this.modifiers:this.modifiers.filter(s=>(e===void 0||e===s.getPosition())&&(r===void 0||r===s.getCategory()))}sortByCategory(e,r){for(let s=e.length-1;s>=0;s--)for(let o=0;or[e[o+1].getCategory()]){const a=e[o];e[o]=e[o+1],e[o+1]=a}}format(){const e=this.modifiers[0],r=this.modifiers[1],s=this.getModifiers(StaveModifier.Position.BEGIN),o=this.getModifiers(StaveModifier.Position.END);this.sortByCategory(s,{barlines:0,clefs:1,keysignatures:2,timesignatures:3}),this.sortByCategory(o,{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))),o.indexOf(r)>0&&o.splice(0,0,new Barline(Barline.type.NONE));let a,l,u,c=0,d=this.x;for(let y=0;yd?d=b:u.setX(d),d+=a,l+a===0&&c--}d>this.start_x&&this.setStartX(d),d=this.x+this.width;const g={left:0,right:0,paddingRight:0,paddingLeft:0};let m=0;for(let y=0;y{l.includes(c)?u.visible=!0:u.visible=!1})}for(let l=0;lthis.drawStaveTempo()),this.measure>0){this.context.save(),this.context.setFont(this.font.family,this.font.size,this.font.weight);const l=this.context.measureText(""+this.measure).width;o=this.getYForTopText(0)+3,this.context.fillText(""+this.measure,this.x-l/2,o),this.context.restore()}return this}drawStaveTempo(){if(!this.staveTempos.length)return;const e=document.querySelector(`#${this.attrs.id}`);if(!e)return;const r=e.parentElement.getBBox(),s=this.getYForLine(0),o=e.parentElement.parentElement.querySelectorAll(".vf-curve");if(o.length){const a=this.x+this.staveTempos[0].shift_x+this.getModifierXShift(0),l=this.getYForTopText(1)+r.y-s+5;o.forEach(u=>{const c=u.getBBox();c.x-10a&&c.y-10l&&(r.y=c.y+5)})}for(let a=0;a1&&(hideTrackTune$1=!0)}}else this.options.keySignature!=_keySignature&&this.setText(`1=${r}`,1,{justification:1,shift_x:50,shift_y:-50});_keySignature=this.options.keySignature}if(this.MeasureNumber>=0&&this.timeSignature.numerator){let r=40,s=0;this.MeasureNumber<2&&(r=70,s=-72),this.setText(`${this.timeSignature.numerator}`,1,{justification:1,shift_x:r,shift_y:s-13}),this.setText("ᅳ",1,{justification:1,shift_x:r+3,shift_y:s-2}),this.setText(`${this.timeSignature.denominator}`,1,{justification:1,shift_x:r,shift_y:s+8})}}drawVertical(e,r){this.drawVerticalFixed(this.x+e,r)}drawVerticalFixed(e,r){this.checkContext();const s=this.getYForLine(0),o=this.getYForLine(this.options.num_lines-1);r&&this.context.fillRect(e-3,s,1,o-s+1),this.context.fillRect(e,s,1,o-s+1)}drawVerticalBar(e){this.drawVerticalBarFixed(this.x+e,!1)}drawVerticalBarFixed(e){this.checkContext();const r=this.getYForLine(0),s=this.getYForLine(this.options.num_lines-1);this.context.fillRect(e,r,1,s-r+1)}getConfigForLines(){return this.options.line_config}setConfigForLine(e,r){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(r.visible===void 0)throw new Vex.RERR("StaveConfigError","The line configuration object is missing the 'visible' property.");if(typeof r.visible!="boolean")throw new Vex.RERR("StaveConfigError","The line configuration objects 'visible' property must be true or false.");return this.options.line_config[e]=r,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 r in e)e[r]||(e[r]=this.options.line_config[r]),Vex.Merge(this.options.line_config[r],e[r]);return this.options.line_config=e,this}}class TabStave extends Stave{constructor(e,r,s,o){const a={spacing_between_lines_px:13,num_lines:6,top_text_position:1};Vex.Merge(a,o),super(e,r,s,a),this.setAttribute("type","TabStave")}getYForGlyphs(){return this.getYForLine(2.5)}addTabGlyph(){return this.addClef("tab"),this}}function getUnusedStringGroups(i,e){const r=[];let s=[];for(let o=1;o<=i;o++)e.indexOf(o)>-1?(r.push(s),s=[]):s.push(o);return s.length>0&&r.push(s),r}function getPartialStemLines(i,e,r,s){const o=s!==1,a=s!==-1,l=r.getSpacingBetweenLines(),u=r.getNumLines(),c=[];return e.forEach(d=>{const g=d.indexOf(u)>-1,m=d.indexOf(1)>-1;if(o&&m||a&&g)return;d.length===1&&d.push(d[0]);const y=[];d.forEach((b,S,A)=>{const E=b===1,x=b===u;let P=r.getYForLine(b-1);S===0&&!E?P-=l/2-1:S===A.length-1&&!x&&(P+=l/2-1),y.push(P),s===1&&E?y.push(i-2):s===-1&&x&&y.push(i+2)}),c.push(y.sort((b,S)=>b-S))}),c}let TabNote$1=class Ni extends StemmableNote{static get CATEGORY(){return"tabnotes"}constructor(e,r){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:r,draw_dots:r,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 Ni.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;ethis.width}setStave(e){super.setStave(e),this.context=e.context;let r;if(this.context){const o=this.context;for(this.width=0,r=0;ra.width),this.width=Math.max(a.getWidth(),this.width)}this.glyph.getWidth=()=>this.width}const s=this.positions.map(({str:o})=>e.getYForLine(o-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 r=0;r{e.getCategory()==="dots"&&!this.render_options.draw_dots||(e.setContext(this.context),e.drawWithStyle())})}drawStemThrough(){const e=this.getStemX(),r=this.getStemY(),s=this.context,o=this.render_options.draw_stem_through_stave;if(this.render_options.draw_stem&&o){const l=this.stave.getNumLines(),u=this.positions.map(g=>g.str),c=getUnusedStringGroups(l,u),d=getPartialStemLines(r,c,this.getStave(),this.getStemDirection());s.save(),s.setLineWidth(Stem.WIDTH),d.forEach(g=>{g.length!==0&&(s.beginPath(),s.moveTo(e,g[0]),s.lineTo(e,g[g.length-1]),s.stroke(),s.closePath())}),s.restore()}}drawPositions(){const e=this.context,r=this.getAbsoluteX(),s=this.ys;for(let o=0;oparseInt(o,10)?TabSlide.SLIDE_DOWN:TabSlide.SLIDE_UP}this.slide_direction=r,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 r=this.context,s=e.first_x_px,o=e.first_ys,a=e.last_x_px,l=this.slide_direction;if(l!==TabSlide.SLIDE_UP&&l!==TabSlide.SLIDE_DOWN)throw new Vex.RERR("BadSlide","Invalid slide direction");for(let u=0;uthis.numStrings)throw new Vex.RERR("BadArguments",`String number must be between 1 and ${this.numStrings}:${e}`);return this.tuningValues[r-1]}getValueForFret(e,r){const s=this.getValueForString(r),o=parseInt(e,10);if(o<0)throw new Vex.RERR("BadArguments","Fret number must be 0 or higher: "+e);return s+o}getNoteForFret(e,r){const s=this.getValueForFret(e,r),o=Math.floor(s/12),a=s%12;return Flow.integerToNote(a)+"/"+o}}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 r=Music.root_indices[this.keyParts.root];for(let s=0;s{const s=TextDynamics.GLYPHS[r];if(!s)throw new Vex.RERR("Invalid dynamics character: "+r);const o=this.render_options.glyph_font_size,a=new Glyph(s.code,o);this.glyphs.push(a),e+=s.width}),this.setWidth(e),this.preFormatted=!0,this}draw(){this.setRendered();const e=this.getAbsoluteX(),r=this.stave.getYForLine(this.line+-3);L$7("Rendering Dynamics: ",this.sequence);let s=e;this.glyphs.forEach((o,a)=>{const l=this.sequence[a];o.render(this.context,s,r),s+=TextDynamics.GLYPHS[l].width})}}function drawArrowHead(i,e,r,s,o,a,l){i.beginPath(),i.moveTo(e,r),i.lineTo(s,o),i.lineTo(a,l),i.lineTo(e,r),i.closePath(),i.fill()}function drawArrowLine(i,e,r,s){const o=s.draw_start_arrow&&s.draw_end_arrow,a=e.x,l=e.y,u=r.x,c=r.y,d=Math.sqrt((u-a)*(u-a)+(c-l)*(c-l)),g=(d-s.arrowhead_length/3)/d;let m,y,b,S;s.draw_end_arrow||o?(m=Math.round(a+(u-a)*g),y=Math.round(l+(c-l)*g)):(m=u,y=c),s.draw_start_arrow||o?(b=a+(u-a)*(1-g),S=l+(c-l)*(1-g)):(b=a,S=l),s.color&&(i.setStrokeStyle(s.color),i.setFillStyle(s.color)),i.beginPath(),i.moveTo(b,S),i.lineTo(m,y),i.stroke(),i.closePath();const A=Math.atan2(c-l,u-a),E=Math.abs(s.arrowhead_length/Math.cos(s.arrowhead_angle));let x,P,C,T,_,B;(s.draw_end_arrow||o)&&(x=A+Math.PI+s.arrowhead_angle,C=u+Math.cos(x)*E,T=c+Math.sin(x)*E,P=A+Math.PI-s.arrowhead_angle,_=u+Math.cos(P)*E,B=c+Math.sin(P)*E,drawArrowHead(i,C,T,u,c,_,B)),(s.draw_start_arrow||o)&&(x=A+s.arrowhead_angle,C=a+Math.cos(x)*E,T=l+Math.sin(x)*E,P=A-s.arrowhead_angle,_=a+Math.cos(P)*E,B=l+Math.sin(P)*E,drawArrowHead(i,C,T,a,l,_,B))}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(),r=this.render_options;r.line_dash&&e.setLineDash(r.line_dash),r.line_width&&e.setLineWidth(r.line_width),r.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 r=this.first_note,s=this.last_note,o=this.render_options;e.save(),this.applyLineStyle();let a,l;this.first_indices.forEach((y,b)=>{const S=this.last_indices[b];a=r.getModifierStartXY(2,y),l=s.getModifierStartXY(1,S);const A=a.y>l.y;a.x+=r.getMetrics().modRightPx+o.padding_left,l.x-=s.getMetrics().modLeftPx+o.padding_right;const E=r.getGlyph().getWidth();r.getKeyProps()[y].displaced&&r.getStemDirection()===1&&(a.x+=E+o.padding_left),s.getKeyProps()[S].displaced&&s.getStemDirection()===-1&&(l.x-=E+o.padding_right),a.y+=A?-3:1,l.y+=A?2:0,drawArrowLine(e,a,l,this.render_options)}),e.restore();const u=e.measureText(this.text).width,c=o.text_justification;let d=0;c===StaveLine.TextJustification.LEFT?d=a.x:c===StaveLine.TextJustification.CENTER?d=(l.x-a.x)/2+a.x-u/2:c===StaveLine.TextJustification.RIGHT&&(d=l.x-u);let g;const m=o.text_position_vertical;return m===StaveLine.TextVerticalPosition.TOP?g=r.getStave().getYForTopText():m===StaveLine.TextVerticalPosition.BOTTOM&&(g=r.getStave().getYForBottomText(Flow.TEXT_HEIGHT_OFFSET_HACK)),e.save(),this.applyFontStyle(),e.fillText(this.text,d,g),e.restore(),this}}function L$6(...i){PedalMarking.DEBUG&&Vex.L("Vex.Flow.PedalMarking",i)}function drawPedalGlyph(i,e,r,s,o){const a=PedalMarking.GLYPHS[i];new Glyph(a.code,o).render(e,r+a.x_shift,s+a.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 r=new PedalMarking(e);return r.setStyle(PedalMarking.Styles.MIXED),r.setCustomText("Sost. Ped."),r}static createUnaCorda(e){const r=new PedalMarking(e);return r.setStyle(PedalMarking.Styles.TEXT),r.setCustomText("una corda","tre corda"),r}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 r=0;r3)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 r=!1,s,o;const a=this;this.notes.forEach((l,u,c)=>{r=!r;let d=0;if(l?(d=l.getNoteHeadBeginX(),this.BeginsStave&&(d=l.getStave().getNoteStartX())):d=this.endStave.end_x+this.endStaveAddedWidth,this.EndsStave)r?this.ChangeBegin&&(d=l.getAbsoluteX()):(l?this.ChangeEnd?d=l.getAbsoluteX():d=l.getStave().end_x+this.endStaveAddedWidth-a.render_options.text_margin_right:d=this.endStave.end_x+this.endStaveAddedWidth-a.render_options.text_margin_right,this.endMargin=-a.render_options.text_margin_right);else if(l)if(r)this.ChangeBegin&&(d=l.getAbsoluteX());else switch(a.style){case PedalMarking.Styles.BRACKET_OPEN_END:case PedalMarking.Styles.BRACKET_OPEN_BOTH:case PedalMarking.Styles.MIXED_OPEN_END:d=l.getNoteHeadEndX();break;default:this.ChangeEnd?d=l.getAbsoluteX():(d=l.getNoteHeadBeginX()-a.render_options.text_margin_right,this.startMargin=-a.render_options.text_margin_right);break}let g=this.endStave;l&&(g=l.getStave());let m=g.getYForBottomText(a.line+3);o&&o>m&&(m=o);const y=c[u+1]===l,b=c[u-1]===l;let S=0;if(r)if(S=b?5:0,(a.style===PedalMarking.Styles.MIXED||a.style===PedalMarking.Styles.MIXED_OPEN_END)&&!b)if(a.custom_depress_text){const A=e.measureText(a.custom_depress_text).width;e.fillText(a.custom_depress_text,d-A/2,m),S=A/2+a.render_options.text_margin_right}else drawPedalGlyph("pedal_depress",e,d,m,a.render_options.glyph_point_size),S=20+a.render_options.text_margin_right;else e.beginPath(),a.style===PedalMarking.Styles.BRACKET_OPEN_BEGIN||a.style===PedalMarking.Styles.BRACKET_OPEN_BOTH?e.moveTo(d+S,m):(this.ChangeBegin&&(d+=5),e.moveTo(d,m-a.render_options.bracket_height),this.ChangeBegin&&(d+=5),e.lineTo(d+S,m)),e.stroke(),e.closePath();else S=y&&!this.EndsStave?-5:0,e.beginPath(),e.moveTo(s,o),e.lineTo(d+S,m),a.style!==PedalMarking.Styles.BRACKET_OPEN_END&&a.style!==PedalMarking.Styles.MIXED_OPEN_END&&a.style!==PedalMarking.Styles.BRACKET_OPEN_BOTH&&(this.ChangeEnd&&(d+=5),e.lineTo(d,m-a.render_options.bracket_height)),e.stroke(),e.closePath();s=d+S,o=m})}drawText(){const e=this.context;let r=!1;const s=this,o=s.render_options.glyph_point_size;this.notes.forEach(a=>{if(!a)return;r=!r;const l=a.getStave(),u=a.getAbsoluteX(),c=l.getYForBottomText(s.line+3);let d=0;r?s.custom_depress_text?(d=e.measureText(s.custom_depress_text).width,e.fillText(s.custom_depress_text,u-d/2,c)):drawPedalGlyph("pedal_depress",e,u,c,o):s.custom_release_text?(d=e.measureText(s.custom_release_text).width,e.fillText(s.custom_release_text,u-d/2,c)):drawPedalGlyph("pedal_release",e,u,c,o)})}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:r,text:s="",superscript:o="",position:a=TextBracket.Positions.TOP}){super(),this.setAttribute("type","TextBracket"),this.start=e,this.stop=r,this.text=s,this.superscript=o,this.position=typeof a=="string"?TextBracket.PositionString[a]:a,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,r){return this.render_options.dashed=e,r&&(this.render_options.dash=r),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 r=0;switch(this.position){case TextBracket.Positions.TOP:r=this.start.getStave().getYForTopText(this.line);break;case TextBracket.Positions.BOTTOM:r=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:r},o={x:this.stop.getAbsoluteX(),y:r};L$5("Rendering TextBracket: start:",s,"stop:",o,"y:",r);const a=this.render_options.bracket_height*this.position;e.save(),this.applyStyle(e),e.fillText(this.text,s.x,s.y);let l=e.measureText(this.text).width;l>0||(l=10*this.text.length);let u=e.measureText("M").width;u>0||(u=20);const c=s.y-u/2.5;e.setFont(this.font.family,this.font.size/1.4,this.font.weight),e.fillText(this.superscript,s.x+l+1,c);let d=e.measureText(this.superscript).width;d>0||(d=12,this.superscript.includes("m")&&(d+=5));let g=e.measureText("M").width;g>0||(g=10);let m=s.x,y=c,b=o.x+this.stop.getGlyph().getWidth();this.position===TextBracket.Positions.TOP?(m+=l+d+5,y-=g/2.7):this.position===TextBracket.Positions.BOTTOM&&(y+=g/2.7,m+=l+2,this.render_options.underline_superscript||(m+=d)),this.render_options.dashed?(b0||r===!0;return r&&!(a>0)&&(this.pos=o),u?this.matchSuccess():this.matchFail(o),{success:u,results:s,numMatches:a}}expectZeroOrMore(e){return this.expectOneOrMore(e,!0)}expect(e){L$2("Evaluating rules:",e);let r;if(!e)throw new X$2("Invalid Rule: "+e,e);const s=e.bind(this.grammar)();if(s.token)r=this.matchToken(s.token,s.noSpace===!0),r.success&&(this.pos+=r.incrementPos);else if(s.expect)s.oneOrMore?r=this.expectOneOrMore(s):s.zeroOrMore?r=this.expectZeroOrMore(s):r=this.expectOne(s);else throw new X$2("Bad grammar! No `token` or `expect` property",s);return r.matches=[],r.results&&r.results.forEach(o=>r.matches.push(flattenMatches(o))),s.run&&r.success&&s.run(r),r}}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=r=>r.slice(1,-1);return{expect:[this.KEY,this.EQUALS,this.VAL],run:r=>this.builder.addNoteOption(r.matches[0],e(r.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,r){L$1("addNoteOption: key:",e,"value:",r),this.piece.options[e]=r}addNote(e,r,s){L$1("addNote:",e,r,s),this.piece.chord.push({key:e,accid:r,octave:s})}addSingleNote(e,r,s){L$1("addSingleNote:",e,r,s),this.addNote(e,r,s)}addChord(e){L$1("startChord"),typeof e[0]!="object"?this.addSingleNote(e[0]):e.forEach(r=>{r&&this.addNote(...r)}),L$1("endChord")}commitPiece(){L$1("commitPiece");const{factory:e}=this;if(!e)return;const r={...this.options,...this.piece.options},{stem:s,clef:o}=r,a=s.toLowerCase()==="auto",l=!a&&s.toLowerCase()==="up"?StaveNote.STEM_UP:StaveNote.STEM_DOWN,{chord:u,duration:c,dots:d,type:g}=this.piece,m=u.map(S=>S.key+"/"+S.octave),y=e.StaveNote({keys:m,duration:c,dots:d,type:g,clef:o,auto_stem:a});a||y.setStemDirection(l);const b=u.map(S=>S.accid||null);b.forEach((S,A)=>{S&&y.addAccidental(A,e.Accidental({type:S}))});for(let S=0;SS(r,y,this)),this.elements.notes.push(y),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 r=/\s*,\s*/;i.class.split(r).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(r=>this.addCommitHook(r)),this}setContext(e){return this.factory&&this.factory.setContext(e),this}parse(e,r={}){this.builder.reset(r);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,r={}){return this.factory.Beam({notes:e,options:r}),e}tuplet(e,r={}){return this.factory.Tuplet({notes:e,options:r}),e}notes(e,r={}){return r={clef:this.defaults.clef,stem:this.defaults.stem,...r},this.parse(e,r),this.builder.getElements().notes}voice(e,r){return r={time:this.defaults.time,...r},this.factory.Voice(r).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 r=Flow.sanitizeDuration(this.duration);var s=NumberedNote.numberedDurationLine[r.toString()];if(s&&(this.duration_lines=s),s=NumberedNote.longDurationLine[r.toString()],s&&(this.long_duration_lines=s),!_text_width){var o="__$text_wraper$$__";let l=document.createElement("canvas");l.id=o,document.body.append(l);const u=document.getElementById(o),c=u.getContext("2d");c.font="Arial 22px";var a=c.measureText("5");_text_width=a.width+2,document.body.removeChild(u)}}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 r=NumberedNote.noteLift;if(!r)return;var s=this.keys[0].split("/"),o=s[0];o==="b"&&(o="R"),o=o.replace(new RegExp("#","g"),""),o=o.replace(new RegExp("n","g"),""),o.length>1&&(o=o.replace(new RegExp("b","g"),""));const a=NumberedNoteHead.numberedNotationMapping[o.toUpperCase()];if(r.includes(a))for(let l=0;l{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=r*this.duration_dot_width+7,s.y_shift=1*this.unit_height,r++;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;eu),s=r.length?r[0]/r[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 o={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&&(o.x+=this.note_width),group.notes.push(o);let a=group.notes.reduce((u,c)=>u+c.duration,0);a=parseInt(a),a>e&&(a-=e),a>e-10&&ac.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 r=this.getAbsoluteX()+2.5;this.x=r;let s=this.stave.getYForLine(2)+this.note_height/2;this.y=s,this.buildToneHeads(),this.preFormatModifier(),this.applyStyle(),this.note_tones.forEach(o=>{o!=null&&o.key.includes("X2")?o.draw(e,"isX"):o.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,r){e=e||this.context;let s=r||this.y+this.duration_line_space;for(let o=0;o<5;o++){let a=[],l=0;for(let u=0;uo)a.push(c),l++;else{if(a.length>1){let d=a.length-1;s=a[0].y+this.duration_line_space,e.rect(a[0].x,s+o*3,a[d].x-a[0].x+a[d].width,.5)}a=[],l=u+1}}if(a.length>1){let u=a.length-1;s=a[0].y+this.duration_line_space,e.rect(a[0].x,s+o*3,a[u].x-a[0].x+a[u].width,.5)}}}draw_dot(e,r,s,o){e.openGroup("numbered-note-dot"),e.beginPath(),e.arc(r,s,o,0,2*Math.PI),e.closePath(),e.fill(),e.closeGroup()}drawDurationLine(e,r){var s=this.attrs.id+"-lines";e.openGroup("numbered_note_lines",s);var o,a;if(this.duration_lines>0){const c=this.duration_line_space;var l=this.full_width;if(r&&r.width&&(l=r.width),l<0&&(l=this.note_width),!r||typeof r.startX>"u"?o=this.x-c/2-this.left_width:o=r.startX,!r||typeof r.startY>"u"?a=this.y+this.duration_line_space:a=r.startY,group.finish&&(this.drawDurationLoneLine(e,a),group=initGroup()),this.ornament?(o+=12,a-=22,l=15,ornamentGroup&&(o-=10,l+=10)):ornamentGroup&&(o+=this.note_width,l-=this.note_width),l>0){for(var u=0;uc.getAttribute("type")==="Dot"),l=this.modifiers.findIndex(c=>c.getAttribute("type")==="Accidental"),u=this.modifiers.findIndex(c=>c.getAttribute("type")==="GraceNoteGroup");o&&l>-1?this.modifiers[l].accidental.code=o==="#"?"v18":"v44":a>=0||u>=0?a>=0&&this.modifiers.splice(a+1,1):this.modifiers.splice(l,1)}}catch(o){console.log("🚀 ~ error",o)}}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,o)=>s+o,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 r=[];return this.modifiers.forEach(s=>{s.getCategory()===e&&r.push(s)}),r}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(r=>{e+=r.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",X:"x",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",X:"x",min:-.5,max:2.5};case"D":return{C:"7",D:"1",E:"2",F:"3",G:"4",A:"5",B:"6",R:"0",X:"x",min:.5,max:3.5};case"E":return{C:"6",D:"7",E:"1",F:"2",G:"3",A:"4",B:"5",R:"0",X:"x",min:1,max:4};case"F":return{C:"5",D:"6",E:"7",F:"1",G:"2",A:"3",B:"4",R:"0",X:"x",min:1.5,max:4.5};case"G":case"Gb":return{C:"4",D:"5",E:"6",F:"7",G:"1",A:"2",B:"3",R:"0",X:"x",min:2,max:5};case"Eb":return{C:"6",D:"7",E:"1",F:"2",G:"3",A:"4",B:"5",R:"0",X:"x",min:1,max:4};case"D#":case"Db":return{C:"7",D:"1",E:"2",F:"3",G:"4",A:"5",B:"6",R:"0",X:"x",min:.5,max:3.5};case"F#":return{C:"5",D:"6",E:"7",F:"1",G:"2",A:"3",B:"4",R:"0",X:"x",min:1.5,max:4.5};case"Ab":case"G#":return{C:"3",D:"4",E:"5",F:"6",G:"7",A:"1",B:"2",R:"0",X:"x",min:-1,max:2};case"Bb":case"A#":return{C:"2",D:"3",E:"4",F:"5",G:"6",A:"7",B:"1",R:"0",X:"x",min:-.5,max:2.5};case"C#":case"Cb":default:return{C:"1",D:"2",E:"3",F:"4",G:"5",A:"6",B:"7",R:"0",X:"x",min:0,max:3}}}tone_to_numbered_key(){var e=this.key.split("/"),r=e[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"),"")),e.includes("X2")&&(r="X");let s=0,o=0;this.note.stave&&this.note.stave.options&&this.note.stave.options.keySignature&&(tone=this.note.stave.options.keySignature);const a=this.note.getLine();return aNumberedNoteHead.numberedNotationMapping.max&&(o=Math.ceil((a-NumberedNoteHead.numberedNotationMapping.max)/3.5)),r.toUpperCase()==="R"&&(s=0,o=0),{key:NumberedNoteHead.numberedNotationMapping[r.toUpperCase()],td:o,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,r){let s=this.y;r&&r==="isX"?e.openGroup("numbered-note-head","","","isX"):e.openGroup("numbered-note-head");var o=this.x+(this.note.ornament?-2:0);let a=s-this.note.unit_height-this.note.dot_space-(this.note.ornament?-4:2);for(let u=0;u1&&(c-=this.note.duration_line_space),s+=c}this.draw_dot(e,o+_text_width,s,this.note.dot_width),s+=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,r,s,o){e.openGroup("numbered-note-dot"),e.beginPath(),e.arc(r,s,o,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 r=e.options;return i=Object.assign(e,i),i.options=Object.assign(r,i.options),i}class Factory{constructor(e){L("New factory: ",e);const r={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=r,this.setOptions(e)}static newFromElementId(e,r=500,s=200){return new Factory({renderer:{elementId:e,width:r,height:s}})}reset(){this.renderQ=[],this.systems=[],this.staves=[],this.voices=[],this.stave=null}getOptions(){return this.options}setOptions(e){for(const r of["stave","renderer","font"])Object.assign(this.options[r],e[r]);(this.options.renderer.elementId!==null||this.options.renderer.context)&&this.initRenderer(),this.reset()}initRenderer(){const{elementId:e,backend:r,width:s,height:o,background:a}=this.options.renderer;if(e==="")throw new X("HTML DOM element not set in Factory");this.context=Renderer.buildContext(e,r,s,o,a)}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 r=new Stave(e.x,e.y,e.width,e.options);return this.staves.push(r),r.setContext(this.context),this.stave=r,r}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 r=new TabStave(e.x,e.y,e.width,e.options);return this.staves.push(r),r.setContext(this.context),this.stave=r,r}StaveNote(e){const r=new StaveNote(e);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}GhostNote(e){const r=new GhostNote(e);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}TextNote(e){const r=new TextNote(e);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}NumberedNote(e){const r=new NumberedNote(e);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}BarNote(e){e=setDefaults$1(e,{type:"single",options:{}});const r=new BarNote(e.type);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}ClefNote(e){e=setDefaults$1(e,{type:"treble",options:{size:"default"}});const r=new ClefNote(e.type,e.options.size,e.options.annotation);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}TimeSigNote(e){e=setDefaults$1(e,{time:"4/4",options:{}});const r=new TimeSigNote(e.time);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}KeySigNote(e){const r=new KeySigNote(e.key,e.cancelKey,e.alterKey);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}TabNote(e){const r=new TabNote$1(e);return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}GraceNote(e){const r=new GraceNote(e);return this.stave&&r.setStave(this.stave),r.setContext(this.context),r}GraceNoteGroup(e){const r=new GraceNoteGroup(e.notes,e.slur);return r.setContext(this.context),r}Accidental(e){e=setDefaults$1(e,{type:null,options:{}});const r=new Accidental(e.type);return r.setContext(this.context),r}Annotation(e){e=setDefaults$1(e,{text:"p",vJustify:"below",hJustify:"center",fontFamily:"Times",fontSize:14,fontWeight:"bold italic",options:{}});const r=new Annotation(e.text);return r.setJustification(e.hJustify),r.setVerticalJustification(e.vJustify),r.setFont(e.fontFamily,e.fontSize,e.fontWeight),r.setContext(this.context),r}Articulation(e){e=setDefaults$1(e,{type:"a.",position:"above",options:{}});const r=new Articulation$1(e.type);return r.setPosition(e.position),r.setContext(this.context),r}TextDynamics(e){e=setDefaults$1(e,{text:"p",duration:"q",dots:0,line:0,options:{}});const r=new TextDynamics({text:e.text,line:e.line,duration:e.duration,dots:e.dots});return this.stave&&r.setStave(this.stave),r.setContext(this.context),this.renderQ.push(r),r}Fingering(e){e=setDefaults$1(e,{number:"0",position:"left",options:{}});const r=new FretHandFinger(e.number);return r.setPosition(e.position),r.setContext(this.context),r}StringNumber(e){e=setDefaults$1(e,{number:"0",position:"left",options:{}});const r=new StringNumber(e.number);return r.setPosition(e.position),r.setContext(this.context),r}TickContext(){return new TickContext().setContext(this.context)}ModifierContext(){return new ModifierContext}MultiMeasureRest(e){const r=new MultiMeasureRest(e.number_of_measures,e);return r.setContext(this.context),this.renderQ.push(r),r}Voice(e){e=setDefaults$1(e,{time:"4/4",options:{}});const r=new Voice$1(e.time);return this.voices.push(r),r}StaveConnector(e){e=setDefaults$1(e,{top_stave:null,bottom_stave:null,type:"double",options:{}});const r=new StaveConnector(e.top_stave,e.bottom_stave);return r.setType(e.type).setContext(this.context),this.renderQ.push(r),r}Formatter(){return new Formatter}Tuplet(e){e=setDefaults$1(e,{notes:[],options:{}});const r=new Tuplet$1(e.notes,e.options).setContext(this.context);return this.renderQ.push(r),r}Beam(e){e=setDefaults$1(e,{notes:[],options:{autoStem:!1,secondaryBeamBreaks:[]}});const r=new Beam$1(e.notes,e.options.autoStem).setContext(this.context);return r.breakSecondaryAt(e.options.secondaryBeamBreaks),this.renderQ.push(r),r}Curve(e){e=setDefaults$1(e,{from:null,to:null,options:{}});const r=new Curve(e.from,e.to,e.options).setContext(this.context);return this.renderQ.push(r),r}StaveTie(e){e=setDefaults$1(e,{from:null,to:null,first_indices:[0],last_indices:[0],text:null,options:{direction:void 0}});const r=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&&r.setDirection(e.options.direction),r.setContext(this.context),this.renderQ.push(r),r}StaveLine(e){e=setDefaults$1(e,{from:null,to:null,first_indices:[0],last_indices:[0],options:{}});const r=new StaveLine({first_note:e.from,last_note:e.to,first_indices:e.first_indices,last_indices:e.last_indices});return e.options.text&&r.setText(e.options.text),e.options.font&&r.setFont(e.options.font),r.setContext(this.context),this.renderQ.push(r),r}VibratoBracket(e){e=setDefaults$1(e,{from:null,to:null,options:{harsh:!1}});const r=new VibratoBracket({start:e.from,stop:e.to});return e.options.line&&r.setLine(e.options.line),e.options.harsh&&r.setHarsh(e.options.harsh),r.setContext(this.context),this.renderQ.push(r),r}TextBracket(e){e=setDefaults$1(e,{from:null,to:null,text:"",options:{superscript:"",position:1}});const r=new TextBracket({start:e.from,stop:e.to,text:e.text,superscript:e.options.superscript,position:e.options.position});return e.options.line&&r.setLine(e.options.line),e.options.font&&r.setFont(e.options.font),r.setContext(this.context),this.renderQ.push(r),r}System(e={}){e.factory=this;const r=new System(e).setContext(this.context);return this.systems.push(r),r}EasyScore(e={}){return e.factory=this,new EasyScore(e)}PedalMarking(e={}){e=setDefaults$1(e,{notes:[],options:{style:"mixed"}});const r=new PedalMarking(e.notes);return r.setStyle(PedalMarking.StylesString[e.options.style]),r.setContext(this.context),this.renderQ.push(r),r}NoteSubGroup(e={}){e=setDefaults$1(e,{notes:[],options:{}});const r=new NoteSubGroup$1(e.notes);return r.setContext(this.context),r}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 r=e.options;return i=Object.assign(e,i),i.options=Object.assign(r,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(r=>r.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 r=this.options.y,s=0,o=[];const a=[];this.parts.forEach(u=>{r=r+u.stave.space(u.spaceAbove),u.stave.setY(r),e.joinVoices(u.voices),r=r+u.stave.space(u.spaceBelow),r=r+u.stave.space(this.options.spaceBetweenStaves),u.debugNoteMetrics&&(a.push({y:r,voice:u.voices[0]}),r+=15),o=o.concat(u.voices),s=Math.max(s,u.stave.getNoteStartX())}),this.parts.forEach(u=>u.stave.setNoteStartX(s));const l=this.options.width-(s-this.options.x)-Note.STAVEPADDING;e.format(o,l);for(let u=0;u{r.voice.getTickables().forEach(s=>Note.plotMetrics(e,s,r.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 r=0;r<2;r++)this.matrix[e][r]=0}}static getRotationMatrix(e){const r=new Matrix2D,s=Math.cos(e),o=Math.sin(e);return r.matrix[0][0]=s,r.matrix[0][1]=-o,r.matrix[1][0]=o,r.matrix[1][1]=s,r}scalarMultiplication(e){for(let r=0;r<2;r++)for(let s=0;s<2;s++)this.matrix[r][s]*=e}getTransposeMatrix(){const e=new Matrix2D;for(let r=0;r<2;r++)for(let s=0;s<2;s++)e.matrix[r][s]=this.matrix[s][r];return e}vectorMultiplication(e){const r=new PointF2D;return r.x=e.x*this.matrix[0][0]+e.y*this.matrix[0][1],r.y=e.x*this.matrix[1][0]+e.y*this.matrix[1][1],r}}class MusicSheetErrors{constructor(){this.measureErrors={},this.errors=[],this.tempErrors=[]}finalizeMeasure(e){let r=this.measureErrors[e];r||(r=[]),this.measureErrors[e]=r.concat(this.tempErrors),this.tempErrors=[]}pushMeasureError(e){this.tempErrors.push(e)}push(e){this.errors.push(e)}}class Arpeggio{constructor(e,r=7){this.parentVoiceEntry=e,this.type=r,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,r=0){this.notes=[],this.extendedNoteList=[],this.BeamNumberOffsetToXML=0,this.AutoGenerated=!1,this.BeamNumber=e,this.BeamNumberOffsetToXML=r}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 Glissando{constructor(e){this.notes=[],this.XMLNumber=1,this.AddNote(e),this.StartNote=e,this.Direction=ColDirEnum.NotYetDefined}get Notes(){return this.notes}get Duration(){const e=new Fraction$1;for(const r of this.notes)e.Add(r.Length);return e}get Pitch(){return this.StartNote.Pitch}AddNote(e){this.notes.push(e),e.NoteGlissando=this,this.notes.length===2&&(this.notes[0].Pitch.getHalfTone()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 8;case"slash":return 4;case"diamond":return 1;case"square":return 5;case"la":return 5;case"do":case"triangle":return 6;case"inverted triangle":return 7;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.TRIANGLE_INVERTED=7]="TRIANGLE_INVERTED",i[i.X=8]="X",i))(NoteHeadShape||{});class ITextTranslation{static translateText(e,r){if(!this.defaultTextTranslation)return r}}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 r=this.NoteTypeXmlValues.indexOf(e);return r!==-1?r: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 r=ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid note duration.");throw new MusicSheetReadingException(r)}}}}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,r,s){this.staffEntries=[],this.comments=[],this.timestamp=r,this.staffEntries=new Array(s),this.parentMeasure=e}$get$(e){return this.staffEntries[e]}$set$(e,r){this.staffEntries[e]=r}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,r){this.voiceEntries=[],this.instructions=[],this.chordSymbolContainers=[],this.verticalContainerParent=e,this.parentStaff=r}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,r=0;for(;e0)return!0;return!1}hasTie(){for(let e=0,r=this.VoiceEntries.length;er.parentRepetition.StartIndex)return-1}if(e.alignment===0&&r.alignment===0){if(e.parentRepetition.EndIndexr.parentRepetition.EndIndex)return-1}}return 0}}class RepetitionInstruction{constructor(e,r,s=1,o=void 0,a=void 0){this.endingIndices=void 0,this.measureIndex=e,a&&(this.endingIndices=a.slice()),this.type=r,this.alignment=s,this.parentRepetition=o}CompareTo(e){const r=e;if(this.measureIndex>r.measureIndex)return 1;if(this.measureIndex(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,r){this.printNewSystemXml=!1,this.printNewPageXml=!1,this.IsSystemStartMeasure=!1,this.hasLyrics=!1,this.hasMoodExpressions=!1,this.allRests=!1,this.isReducedToMultiRest=!1,this.multipleRestMeasureNumber=0,this.staffLinkedExpressions=[],this.tempoExpressions=[],this.verticalSourceStaffEntryContainers=[],this.graphicalMeasureErrors=[],this.firstRepetitionInstructions=[],this.lastRepetitionInstructions=[],this.metronomeNoteIndex=0,this.WasRendered=!1,this.completeNumberOfStaves=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=r,this.TempoInBPM=0;for(let s=0;s1)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,r,s){let o,a;for(const u of this.verticalSourceStaffEntryContainers)if(u.Timestamp.Equals(e)){a=u;break}if(a)return a.StaffEntries[r]?o=a.StaffEntries[r]:(o=new SourceStaffEntry(a,s),a.StaffEntries[r]=o),{createdNewContainer:!1,staffEntry:o};const l=this.verticalSourceStaffEntryContainers[this.verticalSourceStaffEntryContainers.length-1];if(this.verticalSourceStaffEntryContainers.length===0||l.Timestamp.lt(e)){const u=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.push(u),o=new SourceStaffEntry(u,s),u.StaffEntries[r]=o}else for(let u=this.verticalSourceStaffEntryContainers.length-1;u>=0;u--){if(this.verticalSourceStaffEntryContainers[u].Timestamp.lt(e)){const c=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(u+1,0,c),o=new SourceStaffEntry(c,s),c.StaffEntries[r]=o;break}if(u===0){const c=new VerticalSourceStaffEntryContainer(this,e.clone(),this.completeNumberOfStaves);this.verticalSourceStaffEntryContainers.splice(u,0,c),o=new SourceStaffEntry(c,s),c.StaffEntries[r]=o;break}}return{createdNewContainer:!0,staffEntry:o}}findOrCreateVoiceEntry(e,r){let s,o=!1;for(const a of e.VoiceEntries)if(a.ParentVoice===r){s=a;break}return s||(s=new VoiceEntry(e.Timestamp,r,e),o=!0),{createdVoiceEntry:o,voiceEntry:s}}getPreviousSourceStaffEntryFromIndex(e,r){for(let s=r-1;s>=0;s--)if(this.verticalSourceStaffEntryContainers[s][e])return this.verticalSourceStaffEntryContainers[s][e]}getVerticalContainerIndexByTimestamp(e){for(let r=0,s=this.VerticalSourceStaffEntryContainers.length;r=0;m--){const y=this.verticalSourceStaffEntryContainers[m][u+c];if(y!==void 0&&y.hasTie()&&l.lt(Fraction$1.plus(y.Timestamp,y.calculateMaxNoteLength()))){l=Fraction$1.plus(y.Timestamp,y.calculateMaxNoteLength());break}}}}o.push(l)}for(let a=0,l=o.length;a0)return!0}return!1}beginsWithLineRepetition(){for(let e=0,r=this.FirstRepetitionInstructions.length;e=0;o--)if(s=this.verticalSourceStaffEntryContainers[o].StaffEntries[e],s&&(!r||s.VoiceEntries.length>0))return s}canBeReducedToMultiRest(){var s,o,a,l,u,c;if(this.firstRepetitionInstructions.length>0||this.lastRepetitionInstructions.length>0)return!1;let e=!0,r=!1;for(const d of this.verticalSourceStaffEntryContainers)if(d){for(const g of d.StaffEntries)if(!(!g||!g.ParentStaff.ParentInstrument.Visible)){if(g.ChordContainers.length>0)return!1;g.ParentStaff.hasLyrics&&(r=!0);for(const m of g.VoiceEntries){for(const y of m.Notes)if(!y.isRest()){e=!1;break}if(!e)break}}}if(!e||r||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 g=0,m=d==null?void 0:d.Instructions.length;g=0;r--)for(let s=0;s(i[i.Fingering=0]="Fingering",i[i.String=1]="String",i))(TechnicalInstructionType||{});class TechnicalInstruction{}class PlaybackNote{constructor(e,r){this.parentEntry=e,this.parentNote=r,this.ParentNote.PlaybackNote=this,this.Length=this.ParentNote.Length,r.Pitch!==void 0?this.ParentNote.ParentStaff.ParentInstrument.MidiInstrumentId===MidiInstrument.Percussion?this.MidiKey=PlaybackNote.noteToMidiDrumKey(r):this.MidiKey=r.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 o;const r=e.Pitch.getHalfTone()-12,s=(o=e.Notehead)==null?void 0:o.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 r}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 r}case 3:switch(e.Pitch.FundamentalNote){case NoteEnum.C:switch(s){case NoteHeadShape.CIRCLEX:return 52;default:return 55}default:return r}default:return r}}}class PlaybackEntry{constructor(e){this.notes=[],this.TimestampShift=new Fraction$1,this.parentVoiceEntry=e;for(const r of e.Notes)this.Notes.push(new PlaybackNote(this,r))}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 r of this.Notes)r.Length=e}get HasNotes(){return this.Notes.length>0}}class VoiceEntry{constructor(e,r,s,o=!0,a=!1,l=!1,u=!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=r,this.parentSourceStaffEntry=s,this.isGrace=a,this.graceAfterMainNote=!1,this.graceNoteSlash=l,this.graceSlur=u,a||r.VoiceEntries.push(this),o&&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 r of this.graceVoiceEntriesBefore)r.parentSourceStaffEntry=this.ParentSourceStaffEntry}get GraceVoiceEntriesAfter(){return this.graceVoiceEntriesAfter}set GraceVoiceEntriesAfter(e){this.graceVoiceEntriesAfter=e;for(const r of this.graceVoiceEntriesAfter)r.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 r=this.playbackEntries.indexOf(e);r>-1&&this.playbackEntries.splice(r,1)}set Articulations(e){this.articulations=e}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 r of this.articulations)if(r.Equals(e))return!0;return!1}static isSupportedArticulation(e){switch(e){case 0:case 1:case 2: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 18:case 27:return!0;default:return!1}}hasTie(){for(let e=0,r=this.Notes.length;e0)return!0;return!1}isStaccato(){for(const e of this.Articulations)if(e.articulationEnum===6)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 r="1";return this.lyricsEntries.forEach((s,o)=>{e===o&&(r=s)}),r}}var ArticulationEnum=(i=>(i[i.accent=0]="accent",i[i.strongaccent=1]="strongaccent",i[i.softaccent=2]="softaccent",i[i.marcatoup=3]="marcatoup",i[i.marcatodown=4]="marcatodown",i[i.invertedstrongaccent=5]="invertedstrongaccent",i[i.staccato=6]="staccato",i[i.staccatissimo=7]="staccatissimo",i[i.spiccato=8]="spiccato",i[i.tenuto=9]="tenuto",i[i.fermata=10]="fermata",i[i.invertedfermata=11]="invertedfermata",i[i.breathmark=12]="breathmark",i[i.caesura=13]="caesura",i[i.lefthandpizzicato=14]="lefthandpizzicato",i[i.naturalharmonic=15]="naturalharmonic",i[i.snappizzicato=16]="snappizzicato",i[i.upbow=17]="upbow",i[i.downbow=18]="downbow",i[i.scoop=19]="scoop",i[i.plop=20]="plop",i[i.doit=21]="doit",i[i.falloff=22]="falloff",i[i.stress=23]="stress",i[i.unstress=24]="unstress",i[i.detachedlegato=25]="detachedlegato",i[i.otherarticulation=26]="otherarticulation",i[i.bend=27]="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,r,s,o,a=void 0){super(),this.CenteringXShift=0,this.label=e,this.boundingBox=new BoundingBox$1(this,a),this.label.fontHeight=r,this.label.textAlignment=s,this.rules=o,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 u,c;if(this.Label.text.trim()==="")return;this.TextLines=[];const e=(c=(u=this.rules)==null?void 0:u.LabelMarginBorderFactor)!=null?c:.1,r=this.Label.text.split(/[\n\r]+/g),s=r.length;let o=0;for(let d=0;d0&&this.TextLines.length>1&&(a+=this.rules.SpacingBetweenTextLines*s/10);const l=this.PositionAndShape;switch(this.Label.textAlignment){case TextAlignmentEnum.CenterBottom:l.BorderTop=-a,l.BorderLeft=-o/2,l.BorderBottom=0,l.BorderRight=o/2;break;case TextAlignmentEnum.CenterCenter:l.BorderTop=-a/2,l.BorderLeft=-o/2,l.BorderBottom=a/2,l.BorderRight=o/2;break;case TextAlignmentEnum.CenterTop:l.BorderTop=0,l.BorderLeft=-o/2,l.BorderBottom=a,l.BorderRight=o/2;break;case TextAlignmentEnum.LeftBottom:l.BorderTop=-a,l.BorderLeft=0,l.BorderBottom=0,l.BorderRight=o;break;case TextAlignmentEnum.LeftCenter:l.BorderTop=-a/2,l.BorderLeft=0,l.BorderBottom=a/2,l.BorderRight=o;break;case TextAlignmentEnum.LeftTop:l.BorderTop=0,l.BorderLeft=0,l.BorderBottom=a,l.BorderRight=o;break;case TextAlignmentEnum.RightBottom:l.BorderTop=-a,l.BorderLeft=-o,l.BorderBottom=0,l.BorderRight=0;break;case TextAlignmentEnum.RightCenter:l.BorderTop=-a/2,l.BorderLeft=-o,l.BorderBottom=a/2,l.BorderRight=0;break;case TextAlignmentEnum.RightTop:l.BorderTop=0,l.BorderLeft=-o,l.BorderBottom=a,l.BorderRight=0;break}l.BorderMarginTop=l.BorderTop-a*e,l.BorderMarginLeft=l.BorderLeft-a*e,l.BorderMarginBottom=l.BorderBottom+a*e,l.BorderMarginRight=l.BorderRight+a*e}}class Label{constructor(e="",r=TextAlignmentEnum.CenterBottom,s=void 0,o=!0){this.IsCreditLabel=!1,this.isLyricText=!1,this.text=e,this.print=o,this.textAlignment=r,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,r){this.drawableBoundingBoxElement="None",this.skyLineVisible=!1,this.bottomLineVisible=!1,this.needSpecialArrTs=[],this.phonicScoreMode=PhonicScoreModes.Manual,this.textMeasurer=e,this.splitScreenLineColor=-1,this.drawingParameters=r,this.rules=r.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 o=new BoundingBox$1(s);o.AbsolutePosition=s.Start,o.BorderBottom=s.End.y-s.Start.y,o.BorderRight=s.Width/2,o.BorderLeft=-s.Width/2,this.isVisible(o)&&this.drawLineAsVerticalRectangle(s,GraphicalLayers.Cursor)}this.drawingParameters.drawScrollIndicator&&this.drawScrollIndicator();const r=Math.min(this.graphicalMusicSheet.MusicPages.length,this.rules.MaxPageToDrawNumber);for(let s=0;sW[0]).filter(Boolean))||[],U=[];let Z=!1;for(let W=0;WW.x-K.x))==null?void 0:_[0])==null?void 0:B.measure;break}}}catch(O){console.log("🚀 ~ error",O)}let D=0;V?D=((M=V.stave)==null?void 0:M.end_x)||0:D=((N=s.sourceNote.SourceMeasure.VerticalMeasureList[0])==null?void 0:N.getVFStave()).end_x;const $=0;a.ScreenPosition.x=D,a.ScreenPosition.y=F===0?(e.PositionAndShape.Parent.AbsolutePosition.y-3-$)*10:F*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(o.text)&&(a.ScreenPosition.y=(e.PositionAndShape.Parent.AbsolutePosition.y+e.PositionAndShape.Parent.BorderTop+e.PositionAndShape.Parent.BorderMarginTop)*10),["play","listen"].includes(o.text.toLocaleLowerCase())&&o.textAlignment===TextAlignmentEnum.LeftBottom&&(a.ScreenPosition.y=(e.PositionAndShape.Parent.AbsolutePosition.y-1+e.PositionAndShape.Parent.BorderBottom)*10);const d=["ffp","p-f","sfzp","szf","sffzp"];for(let F=0;F0&&(isTopFont(e.Label.textAlignment)||[TextAlignmentEnum.CenterBottom].includes(e.Label.textAlignment))){let F=-1,k=!1;for(const V of(u==null?void 0:u.AbstractExpressions)||[])if(V.Label===e?F=(I=V==null?void 0:V.parentMeasure)==null?void 0:I.measureListIndex:(R=V.expression)!=null&&R.TempoInBpm&&(k=V.expression.TempoInBpm>0),k&&F>-1){a.ScreenPosition.y-=4*10;break}}this.renderLabel(e,r,a)}calculateLabel(e){var u,c;const r=new LabelRenderSpecs,s=e.Label;r.ScreenPosition=this.applyScreenTransformation(e.PositionAndShape.AbsolutePosition),r.FontHeightInPixel=this.calculatePixelDistance(s.fontHeight);const o=this.calculatePixelDistance(e.PositionAndShape.Size.width);switch(r.BitmapWidth=Math.ceil(o),r.BitmapHeight=e.TextLines?Math.ceil(r.FontHeightInPixel*(.2+e.TextLines.length)):10,s.textAlignment){case TextAlignmentEnum.LeftTop:break;case TextAlignmentEnum.LeftCenter:r.ScreenPosition.y-=r.BitmapHeight/2;break;case TextAlignmentEnum.LeftBottom:r.ScreenPosition.y-=r.BitmapHeight;break;case TextAlignmentEnum.CenterTop:r.ScreenPosition.x-=r.BitmapWidth/2;break;case TextAlignmentEnum.CenterCenter:r.ScreenPosition.x-=r.BitmapWidth/2,r.ScreenPosition.y-=r.BitmapHeight/2;break;case TextAlignmentEnum.CenterBottom:r.ScreenPosition.x-=r.BitmapWidth/2,r.ScreenPosition.y-=r.BitmapHeight,s.text==="筒音作5"&&this.rules.DYMusicScoreType==="jianpu"&&(r.ScreenPosition.x=80);break;case TextAlignmentEnum.RightTop:r.ScreenPosition.x-=r.BitmapWidth;break;case TextAlignmentEnum.RightCenter:r.ScreenPosition.x-=r.BitmapWidth,r.ScreenPosition.y-=r.BitmapHeight/2;break;case TextAlignmentEnum.RightBottom:r.ScreenPosition.x-=r.BitmapWidth,r.ScreenPosition.y-=r.BitmapHeight;break;default:throw new ArgumentOutOfRangeException("")}const a=e.PositionAndShape.Parent.DataObject,l=[1,3,7,9,15,20,22,24,28,30,36,41];this.rules.DYMusicScoreId&&this.rules.DYMusicScoreId==="1722157850347765762"&&(s.text==="."&&(r.ScreenPosition.x=142,r.ScreenPosition.y=134),s.text==="T"&&(this.needSpecialArrTs.push(r),((c=(u=a==null?void 0:a.measures)==null?void 0:u[0])==null?void 0:c.MeasureNumber)===1?r.ScreenPosition.y+=20:r.ScreenPosition.y-=20));for(let d in this.needSpecialArrTs)l.includes(Number(d))&&(this.needSpecialArrTs[d].ScreenPosition.x-=20);return r}applyScreenTransformations(e){const r=[];for(const s of e)r.push(this.applyScreenTransformation(s));return r}drawSplitScreenLine(){}renderRectangle(e,r,s,o=void 0,a=1){throw new Error("not implemented")}drawScrollIndicator(){}drawSelectionStartSymbol(e){}drawSelectionEndSymbol(e){}renderLabel(e,r,s){throw new Error("not implemented")}renderSystemToScreen(e,r,s){}drawSkyLine(e){}drawBottomLine(e){}drawInstrumentBrace(e,r){}drawGroupBracket(e,r){}isVisible(e){return!0}drawMusicSystem(e){const r=this.getSystemAbsBoundingRect(e),s=this.getSytemBoundingBoxInPixels(r);this.drawMusicSystemComponents(e,s,r)}getSytemBoundingBoxInPixels(e){const r=this.applyScreenTransformationForRect(e);return r.x=Math.round(r.x),r.y=Math.round(r.y),r}getSystemAbsBoundingRect(e){const r=e.PositionAndShape.BoundingRectangle;return new RectangleF2D(e.PositionAndShape.AbsolutePosition.x+e.PositionAndShape.BorderLeft-1,e.PositionAndShape.AbsolutePosition.y+e.PositionAndShape.BorderTop-1,r.width+6,r.height+2)}drawMusicSystemComponents(e,r,s){const o=this.graphicalMusicSheet.SelectionStartSymbol,a=this.graphicalMusicSheet.SelectionEndSymbol;this.drawingParameters.drawSelectionStartSymbol&&o!==void 0&&this.isVisible(o.PositionAndShape)&&this.drawSelectionStartSymbol(o),this.drawingParameters.drawSelectionEndSymbol&&a!==void 0&&this.isVisible(a.PositionAndShape)&&this.drawSelectionEndSymbol(a);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(this.rules.RenderSystemLabelsAfterFirstPage||e.Parent===e.Parent.Parent.MusicPages[0])for(const c of e.Labels)c.SVGNode=this.drawLabel(c,GraphicalLayers.Notes);const l=this.graphicalMusicSheet.ParentMusicSheet.Instruments,u=l.filter(c=>c.Visible).length;for(const c of e.InstrumentBrackets)this.drawInstrumentBrace(c,e);if(l.length>0)if(u>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,r,s,o){return!0}drawSystemLineObject(e){}drawStaffLine(e){for(const r of e.Measures)this.drawMeasure(r),r.parentSourceMeasure&&(r.parentSourceMeasure.WasRendered=!0);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,r){r.LyricLines.forEach(s=>{s.Start.y+=r.PositionAndShape.AbsolutePosition.y,s.End.y+=r.PositionAndShape.AbsolutePosition.y,s.Start.x+=r.PositionAndShape.AbsolutePosition.x,s.End.x+=r.PositionAndShape.AbsolutePosition.x,this.drawGraphicalLine(s,this.rules.LyricUnderscoreLineWidth,s.colorHex)})}drawExpressions(e){}drawGraphicalLine(e,r,s="black"){return this.drawLine(e.Start,e.End,s,r)}drawLine(e,r,s="#FF0000FF",o){}drawDashes(e){e.forEach(r=>r.SVGNode=this.drawLabel(r,GraphicalLayers.Notes))}drawOctaveShifts(e){}drawStaffLines(e){if(e.StaffLines){const r=e.PositionAndShape.AbsolutePosition;for(let s=0;s<5;s++)this.drawLineAsHorizontalRectangleWithOffset(e.StaffLines[s],r,GraphicalLayers.Notes)}}drawSymbol(e,r,s,o=1,a=GraphicalLayers.Notes){}get leadSheet(){return this.graphicalMusicSheet.LeadSheet}set leadSheet(e){this.graphicalMusicSheet.LeadSheet=e}drawPage(e){if(this.isVisible(e.PositionAndShape)){for(const r of e.MusicSystems)this.isVisible(r.PositionAndShape)&&this.drawMusicSystem(r);if(e===e.Parent.MusicPages[0])for(const r of e.Labels)r.SVGNode=this.drawLabel(r,GraphicalLayers.Notes);this.drawableBoundingBoxElement&&this.drawBoundingBoxes(e.PositionAndShape,0,this.drawableBoundingBoxElement)}}drawBoundingBoxes(e,r=0,s="all"){const o=e.DataObject.constructor.name;let a=!1;s==="all"&&(a=!0),(a||o===s)&&this.drawBoundingBox(e,void 0,!0,o,r),r++,e.ChildElements.forEach(l=>this.drawBoundingBoxes(l,r,s))}drawBoundingBox(e,r=void 0,s=!1,o=void 0,a=0){let l=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,r),a-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,r),a-1)),l=this.applyScreenTransformationForRect(l);const u=this.renderRectangle(l,GraphicalLayers.Background,a,r,.5);if(o){const c=new Label(o),d=new LabelRenderSpecs;d.BitmapWidth=l.width,d.BitmapHeight=l.height,d.FontHeightInPixel=l.height,d.ScreenPosition=new PointF2D(l.x,l.y+12),this.renderLabel(new GraphicalLabel(c,.8,TextAlignmentEnum.CenterCenter,this.rules),a,d)}return u}drawMarkedAreas(e){for(const r of e.GraphicalMarkedAreas)r&&(r.systemRectangle&&this.drawRectangle(r.systemRectangle,GraphicalLayers.Background),r.settings&&(r.settings.SVGNode=this.drawLabel(r.settings,GraphicalLayers.Comment)),r.labelRectangle&&this.drawRectangle(r.labelRectangle,GraphicalLayers.Background),r.label&&(r.label.SVGNode=this.drawLabel(r.label,GraphicalLayers.Comment)))}drawStaffLineSymbols(e){const r=e.ParentStaff.ParentInstrument,s=e.PositionAndShape.AbsolutePosition.x,o=e.PositionAndShape.AbsolutePosition.y+2,a=e.PositionAndShape.BorderRight;r.highlight&&this.drawingParameters.drawHighlights&&this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(s,o),new PointF2D(s+a,o),4,OutlineAndFillStyleEnum.Highlighted),GraphicalLayers.Highlight);let l=MusicSymbolDrawingStyle.Disabled,u=MusicSymbol.PLAY,c=this.drawingParameters.drawActivitySymbols;switch(this.phonicScoreMode){case PhonicScoreModes.Midi:u=MusicSymbol.PLAY,this.midiPlaybackAvailable&&e.ParentStaff.audible&&(l=MusicSymbolDrawingStyle.PlaybackSymbols);break;case PhonicScoreModes.Following:u=MusicSymbol.MIC,e.ParentStaff.following&&(l=MusicSymbolDrawingStyle.FollowSymbols);break;default:c=!1;break}if(c){const d=new PointF2D(s+a+2,o);this.drawSymbol(u,l,d)}if(this.drawingParameters.drawErrors)for(const d of e.Measures){const g=d.PositionAndShape,m=g.AbsolutePosition.x,y=g.AbsolutePosition.y+2;d.hasError&&this.graphicalMusicSheet.ParentMusicSheet.DrawErroneousMeasures&&this.drawLineAsHorizontalRectangle(new GraphicalLine(new PointF2D(m,y),new PointF2D(m+g.BorderRight,y),4,OutlineAndFillStyleEnum.ErrorUnderlay),GraphicalLayers.MeasureError)}}}class VexFlowTextMeasurer{constructor(e){this.fontSize=20,this.fontSizeStandard=this.fontSize;const r=document.createElement("canvas");this.context=r.getContext("2d"),this.rules=e}computeTextWidthToHeightRatio(e,r,s,o=void 0,a=this.fontSize){return this.context.font=VexFlowConverter.font(a,s,r,this.rules,o),this.context.measureText(e).width/a}setFontSize(e=this.fontSizeStandard){return this.fontSize=e,e}}class AbstractGraphicalExpression extends GraphicalObject{constructor(e,r,s){super(),this.expression=r,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,r){super(r.PositionAndShape.Parent.DataObject,e,e.parentMeasure),this.label=r}get GraphicalLabel(){return this.label}updateSkyBottomLine(){}}class GraphicalInstantaneousDynamicExpression extends AbstractGraphicalExpression{constructor(e,r,s){super(r,e,s.parentSourceMeasure),this.mInstantaneousDynamicExpression=e,this.mMeasure=s}updateSkyBottomLine(){const e=this.parentStaffLine.SkyBottomLineCalculator,r=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginLeft,s=this.PositionAndShape.RelativePosition.x+this.PositionAndShape.BorderMarginRight;let o=0;switch(this.Placement){case PlacementEnum.Above:o=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginTop,e.updateSkyLineInRange(r,s,o);break;case PlacementEnum.Below:o=this.PositionAndShape.RelativePosition.y+this.PositionAndShape.BorderMarginBottom,e.updateBottomLineInRange(r,s,o);break;default:loglevelExports.error("Placement for GraphicalInstantaneousDynamicExpression is unknown")}}}class GraphicalContinuousDynamicExpression extends AbstractGraphicalExpression{constructor(e,r,s){super(r,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 o;const e=this.parentStaffLine.SkyBottomLineCalculator,r=this.IsVerbal?this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginLeft:0,s=this.IsVerbal?this.label.PositionAndShape.RelativePosition.x+this.label.PositionAndShape.BorderMarginRight:0;switch(!this.IsSoftAccent&&!this.IsVerbal&&this.lines.length<2&&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: "+((o=this.startMeasure)==null?void 0:o.MeasureNumber)),this.Placement){case PlacementEnum.Above:if(this.IsSoftAccent)e.updateSkyLineWithWedge(this.lines[0].Start,this.lines[0].End),e.updateSkyLineWithWedge(this.lines[2].End,this.lines[2].Start),e.updateSkyLineWithLine(this.lines[0].End,this.lines[2].End,this.lines[0].End.y);else if(!this.IsVerbal)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 a=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;e.updateSkyLineInRange(r,s,a)}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 a=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;e.updateBottomLineInRange(r,s,a)}break;default:loglevelExports.error("Placement for GraphicalContinuousDynamicExpression is unknown")}}createCrescendoLines(e,r,s,o=this.rules.WedgeOpeningLength,a=this.rules.WedgeLineWidth){const l=new PointF2D(e,s),u=new PointF2D(r,s-o/2),c=new PointF2D(r,s+o/2);this.addWedgeLines(l,u,c,a)}createFirstHalfCrescendoLines(e,r,s,o=this.rules.WedgeMeasureEndOpeningLength,a=this.rules.WedgeLineWidth){const l=new PointF2D(e,s),u=new PointF2D(r,s-o/2),c=new PointF2D(r,s+o/2);this.addWedgeLines(l,u,c,a)}createSecondHalfCrescendoLines(e,r,s,o=this.rules.WedgeMeasureBeginOpeningLength,a=this.rules.WedgeOpeningLength,l=this.rules.WedgeLineWidth){const u=new PointF2D(e,s-o/2),c=new PointF2D(e,s+o/2),d=new PointF2D(r,s-a/2),g=new PointF2D(r,s+a/2);this.addDoubleLines(u,d,c,g,l)}recalculateCrescendoLines(e,r,s){const o=Math.abs(this.lines[0].Start.y-this.lines[1].Start.y)>1e-4;this.lines.clear(),o?this.createSecondHalfCrescendoLines(e,r,s):this.isSplittedPart?this.createFirstHalfCrescendoLines(e,r,s):this.createCrescendoLines(e,r,s)}createDiminuendoLines(e,r,s,o=this.rules.WedgeOpeningLength,a=this.rules.WedgeLineWidth){const l=new PointF2D(e,s-o/2),u=new PointF2D(e,s+o/2),c=new PointF2D(r,s);this.addWedgeLines(c,l,u,a)}createFirstHalfDiminuendoLines(e,r,s,o=this.rules.WedgeOpeningLength,a=this.rules.WedgeMeasureEndOpeningLength,l=this.rules.WedgeLineWidth){const u=new PointF2D(e,s-o/2),c=new PointF2D(e,s+o/2),d=new PointF2D(r,s-a/2),g=new PointF2D(r,s+a/2);this.addDoubleLines(u,d,c,g,l)}createSecondHalfDiminuendoLines(e,r,s,o=this.rules.WedgeMeasureBeginOpeningLength,a=this.rules.WedgeLineWidth){const l=new PointF2D(e,s-o/2),u=new PointF2D(e,s+o/2),c=new PointF2D(r,s);this.addWedgeLines(c,l,u,a)}recalculateDiminuendoLines(e,r,s){const o=Math.abs(this.lines[0].End.y-this.lines[1].End.y)>1e-4;this.lines.clear(),o?this.createFirstHalfDiminuendoLines(e,r,s):this.isSplittedPart?this.createSecondHalfDiminuendoLines(e,r,s):this.createDiminuendoLines(e,r,s)}createFirstHalfLines(e,r,s,o=this.rules.WedgeOpeningLength,a=this.rules.WedgeMeasureEndOpeningLength,l=this.rules.WedgeLineWidth){this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?this.createFirstHalfCrescendoLines(e,r,s,a,l):this.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&this.createFirstHalfDiminuendoLines(e,r,s,o,a,l)}createSecondHalfLines(e,r,s,o=this.rules.WedgeMeasureBeginOpeningLength,a=this.rules.WedgeOpeningLength,l=this.rules.WedgeLineWidth){this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?this.createSecondHalfCrescendoLines(e,r,s,o,a,l):this.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&this.createSecondHalfDiminuendoLines(e,r,s,o,l)}createLines(e,r,s,o=this.rules.WedgeOpeningLength,a=this.rules.WedgeLineWidth){this.ContinuousDynamic.DynamicType===ContDynamicEnum.crescendo?this.createCrescendoLines(e,r,s,o,a):this.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo&&this.createDiminuendoLines(e,r,s,o,a)}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.IsSoftAccent?(this.PositionAndShape.BorderMarginLeft=0,this.PositionAndShape.BorderMarginRight=this.lines[3].Start.x-this.lines[0].Start.x):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)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,r,s,o){const a=new GraphicalLine(e,r,o),l=new GraphicalLine(e,s,o);this.rules.DefaultColorMusic&&(a.colorHex=this.rules.DefaultColorMusic,l.colorHex=this.rules.DefaultColorMusic),this.lines.push(a),this.lines.push(l)}addDoubleLines(e,r,s,o,a){const l=new GraphicalLine(e,r,a),u=new GraphicalLine(s,o,a);this.rules.DefaultColorMusic&&(l.colorHex=this.rules.DefaultColorMusic,u.colorHex=this.rules.DefaultColorMusic),this.lines.push(l),this.lines.push(u)}}class DrawingParameters{constructor(e=DrawingParametersEnum.default,r){this.drawCursors=!0,this.drawTitle=!0,this.drawSubtitle=!0,this.drawLyricist=!0,this.drawComposer=!0,this.drawCopyright=!1,this.drawCredits=!0,this.drawPartNames=!0,this.fingeringPosition=PlacementEnum.Left,this.drawHiddenNotes=!1,this.rules=r,this.rules||(this.rules=new EngravingRules),this.DrawingParametersEnum=e}set DrawingParametersEnum(e){switch(this.drawingParametersEnum=e,e){case DrawingParametersEnum.allon:this.setForAllOn();break;case DrawingParametersEnum.thumbnail:this.setForThumbnail();break;case DrawingParametersEnum.leadsheet:this.setForLeadsheet();break;case DrawingParametersEnum.compact:this.setForCompactMode();break;case DrawingParametersEnum.compacttight:this.setForCompactTightMode();break;case DrawingParametersEnum.default:default:this.setForDefault()}}get DrawingParametersEnum(){return this.drawingParametersEnum}setForAllOn(){this.drawHighlights=!0,this.drawErrors=!0,this.drawSelectionStartSymbol=!0,this.drawSelectionEndSymbol=!0,this.drawCursors=!0,this.drawActivitySymbols=!0,this.drawScrollIndicator=!0,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0,this.DrawTitle=!0,this.DrawSubtitle=!0,this.DrawComposer=!0,this.DrawLyricist=!0,this.drawCredits=!0,this.DrawPartNames=!0,this.drawHiddenNotes=!0,this.rules.CompactMode=!1}setForDefault(){this.rules.loadDefaultValues(),this.setForAllOn(),this.drawHiddenNotes=!1}setForThumbnail(){this.drawHighlights=!1,this.drawErrors=!1,this.drawSelectionStartSymbol=!1,this.drawSelectionStartSymbol=!1,this.drawCursors=!1,this.drawActivitySymbols=!1,this.drawScrollIndicator=!1,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0,this.drawHiddenNotes=!1}setForCompactMode(){this.rules.CompactMode=!0,this.DrawCredits=!1,this.drawHiddenNotes=!1}setForCompactTightMode(){this.setForCompactMode(),this.DrawPartNames=!1,this.rules.VoiceSpacingMultiplierVexflow=.65,this.rules.VoiceSpacingAddendVexflow=2,this.rules.MinSkyBottomDistBetweenStaves=1,this.rules.MinSkyBottomDistBetweenSystems=1,this.rules.BetweenStaffDistance=2.5,this.rules.StaffDistance=3.5,this.rules.MinimumDistanceBetweenSystems=1,this.rules.PageBottomMargin=0,this.rules.PageLeftMargin=2,this.rules.PageRightMargin=2}setForLeadsheet(){this.drawHighlights=!1,this.drawErrors=!1,this.drawSelectionStartSymbol=!0,this.drawSelectionEndSymbol=!0,this.drawCursors=!0,this.drawActivitySymbols=!1,this.drawScrollIndicator=!0,this.drawAnnotations=!0,this.drawComments=!0,this.drawMarkedAreas=!0}get DrawCredits(){return this.drawCredits}set DrawCredits(e){this.drawCredits=e,this.DrawComposer=e,this.DrawTitle=e,this.DrawSubtitle=e,this.DrawLyricist=e,this.DrawCopyright=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 DrawCopyright(){return this.drawCopyright}set DrawCopyright(e){this.drawCopyright=e,this.rules.RenderCopyright=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}}class GraphicalUnknownExpression extends AbstractGraphicalExpression{constructor(e,r,s,o,a=void 0){super(e,new AbstractExpression(s),o),this.label=r,this.sourceMultiExpression=a}updateSkyBottomLine(){const e=this.parentStaffLine.SkyBottomLineCalculator,r=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 o=this.label.PositionAndShape.BorderMarginTop+this.label.PositionAndShape.RelativePosition.y;e.updateSkyLineInRange(r,s,o);break;case PlacementEnum.Below:const a=this.label.PositionAndShape.BorderMarginBottom+this.label.PositionAndShape.RelativePosition.y;e.updateBottomLineInRange(r,s,a);break;default:loglevelExports.error("Placement for GraphicalUnknownExpression is unknown")}}}const VF$c=Vex.Flow;class VexFlowBackend{getInnerElement(){return this.inner}getCanvas(){return this.canvas}getRenderElement(){let e=this.canvas;return this.getVexflowBackendType()===VF$c.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 r=this.getRenderElement();for(let s=0;s \r<`)),a.download="opensheetmusicdisplay_download.svg",a.innerHTML=window.location.href+"/download",document.body.appendChild(a)}}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=(r,s)=>s?String(r.Label.PositionAndShape.RelativePosition[s]):String(r.Label.PositionAndShape.RelativePosition.x)+String(r.Label.PositionAndShape.RelativePosition.y),this.hasDot=(r,s,o,a)=>{const l=s||Object.values(a);for(const u of l){if(o)return r.x===u.x&&r.y===u.y;if(r.x===u.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 r,s,o;this.rules.DefaultVexFlowNoteFont==="gonville"&&(Vex.Flow.DEFAULT_FONT_STACK=[(r=Vex.Flow.Fonts)==null?void 0:r.Gonville,(s=Vex.Flow.Fonts)==null?void 0:s.Bravura,(o=Vex.Flow.Fonts)==null?void 0:o.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 a of e.MusicPages){if(a.PageNumber>this.rules.MaxPageToDrawNumber)break;const l=this.backends[this.pageIdx];l.graphicalMusicPage=a,l.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 r=this.backend.getContext().openGroup();r&&r.classList.add("staffline"),super.drawStaffLine(e);const s=e.PositionAndShape.AbsolutePosition;this.rules.RenderSlurs&&this.drawSlurs(e,s),this.backend.getContext().closeGroup(),this.rules.RenderGlissandi&&this.drawGlissandi(e,s)}drawSlurs(e,r){var o,a,l,u;const s=(o=window.GYM)==null?void 0:o.vfcurveItem;for(let c=0;c(m.index?m.index===c:!0)&&m.MeasureNumberXML==d.staffEntries[d.staffEntries.length-1].parentMeasure.MeasureNumber);g&&(d.bezierEndControlPt.y+=(a=g==null?void 0:g.bezierEndControlPt)!=null&&a.y?g.bezierEndControlPt.y:0,d.bezierEndPt.y+=(l=g==null?void 0:g.bezierEndPt)!=null&&l.y?g.bezierEndPt.y:0,d.bezierStartControlPt.y+=(u=g==null?void 0:g.bezierStartControlPt)!=null&&u.y?g.bezierStartControlPt.y:0)}catch(g){console.log(g)}this.drawSlur(d,r)}}}drawGlissandi(e,r){for(const s of e.GraphicalGlissandi)this.drawGlissando(s,r)}drawGlissando(e,r){if(e.StaffLine.ParentStaff.isTab||e.calculateLine(this.rules),e.Line){const s=new PointF2D(e.Line.Start.x+r.x,e.Line.Start.y),o=new PointF2D(e.Line.End.x+r.x,e.Line.End.y);this.drawLine(s,o,e.Color,e.Width)}else{const s=e.vfTie;if(s){const o=this.backend.getContext();s.setContext(o),s.draw()}}}drawSlur(e,r){const s=[];let o,a,l,u;this.rules.DYMusicScoreType==="jianpu"?((e.placement>0||e.bezierStartPt.y>0)&&(e.bezierStartPt.y=-.8,e.bezierStartControlPt.y=-2.5),o=new PointF2D(e.bezierStartPt.x+r.x,e.bezierStartPt.y+r.y),a=new PointF2D(e.bezierStartControlPt.x+r.x,e.bezierStartControlPt.y+r.y),l=new PointF2D(e.bezierEndControlPt.x+r.x,e.bezierStartControlPt.y+r.y),u=new PointF2D(e.bezierEndPt.x+r.x,e.bezierStartPt.y+r.y)):(o=new PointF2D(e.bezierStartPt.x+r.x,e.bezierStartPt.y+r.y),a=new PointF2D(e.bezierStartControlPt.x+r.x,e.bezierStartControlPt.y+r.y),l=new PointF2D(e.bezierEndControlPt.x+r.x,e.bezierEndControlPt.y+r.y),u=new PointF2D(e.bezierEndPt.x+r.x,e.bezierEndPt.y+r.y)),s.push(this.applyScreenTransformation(o)),s.push(this.applyScreenTransformation(a)),s.push(this.applyScreenTransformation(l)),s.push(this.applyScreenTransformation(u)),e.placement===PlacementEnum.Above?(o.y-=.05,a.y-=.3,l.y-=.3,u.y-=.05):(o.y+=.05,a.y+=.3,l.y+=.3,u.y+=.05),s.push(this.applyScreenTransformation(o)),s.push(this.applyScreenTransformation(a)),s.push(this.applyScreenTransformation(l)),s.push(this.applyScreenTransformation(u)),e.SVGElement=this.backend.renderCurve(s)}drawMeasure(e){e.setAbsoluteCoordinates(e.PositionAndShape.AbsolutePosition.x*unitInPixels,e.PositionAndShape.AbsolutePosition.y*unitInPixels);const r=this.backend.getContext();try{e.draw(r)}catch(o){loglevelExports.warn("VexFlowMusicSheetDrawer.drawMeasure",o)}let s=0;for(const o of e.staffEntries)this.drawStaffEntry(o),s=this.drawBuzzRolls(o,s)}drawBuzzRolls(e,r){var s;for(const o of e.graphicalVoiceEntries)for(const a of o.notes)if((s=a.sourceNote.TremoloInfo)!=null&&s.tremoloUnmeasured){const l=this.rules.TremoloBuzzRollThickness,u=.9,c=.5,d=a;let g,m;const y=d.vfnote[0].getStemDirection();let b;if(this.backend instanceof SvgVexFlowBackend&&(b=d.getStemSVG()),(b==null?void 0:b.getBbox)!==void 0){const _=b.getBBox();g=new PointF2D(_.x/10,_.y/10),m=_.height/10}else m=d.vfnote[0].getStemLength()/10,g=new PointF2D(d.vfnote[0].getStem().x_begin/10,d.vfnote[0].getStem().y_top/10),y===1&&(g.y-=m);let A=g.y+m/3;d.vfnote[0].getBeamCount()>1&&(A=g.y+m/2,y===-1&&(A-=c+.2));const E=g.x-.5,x=A,P=[],C=[new PointF2D(0,-l),new PointF2D(u-l,0),new PointF2D(-u+l,-c),new PointF2D(0,-l),new PointF2D(u,0),new PointF2D(0,l),new PointF2D(-u+l,0),new PointF2D(u-l,c),new PointF2D(0,l),new PointF2D(-u,0)];let T=new PointF2D(E,x);P.push(T);for(const _ of C)T=P.last(),P.push(new PointF2D(T.x+_.x,T.y-_.y));this.DrawPath(P,d.ParentMusicPage,!0,`buzzRoll${r}`),r++}return r}drawLine(e,r,s="#000000FF",o=.2){return e=this.applyScreenTransformation(e),r=this.applyScreenTransformation(r),this.backend.renderLine(e,r,s,o*unitInPixels)}DrawOverlayLine(e,r,s,o="#FF0000FF",a=.2,l){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 u=s.PageNumber-1,c=this.backends[u];return e=this.applyScreenTransformation(e),r=this.applyScreenTransformation(r),l||(l=`overlayLine ${e.x}/${e.y}`),c.renderLine(e,r,o,a*unitInPixels,l)}DrawPath(e,r,s=!0,o){const a=r.PageNumber-1,l=this.backends[a],u=[];for(const c of e)u.push(this.applyScreenTransformation(c));return l.renderPath(u,s,o)}drawSkyLine(e){const r=e.PositionAndShape.AbsolutePosition,s=e.PositionAndShape.Size.width;this.drawSampledLine(e.SkyLine,r,s)}drawBottomLine(e){const r=new PointF2D(e.PositionAndShape.AbsolutePosition.x,e.PositionAndShape.AbsolutePosition.y),s=e.PositionAndShape.Size.width;this.drawSampledLine(e.BottomLine,r,s,"#0000FFFF")}drawSampledLine(e,r,s,o="#FF0000FF"){const a=[];let l=0;for(let c=0;c0){const c=this.rules.SamplingUnit;let d=new PointF2D(u.x,u.y),g=new PointF2D(a[0]/c+u.x,u.y);this.drawLine(d,g,o);let m,y;e[0]>=0&&(m=new PointF2D(a[0]/c+u.x,u.y),y=new PointF2D(a[0]/c+u.x,u.y+e[a[0]]),this.drawLine(m,y,o));for(let b=1;b0)for(const r of e.FingeringEntries)r.SVGNode=this.drawLabel(r,GraphicalLayers.Notes);if(e.graphicalChordContainers!==void 0&&e.graphicalChordContainers.length>0)for(const r of e.graphicalChordContainers){const s=r.GraphicalLabel;s.SVGNode=this.drawLabel(s,GraphicalLayers.Notes)}this.rules.RenderLyrics&&e.LyricsEntries.length>0&&this.drawLyrics(e.LyricsEntries,GraphicalLayers.Notes)}drawLyrics(e,r){e.forEach(s=>{const o=s.GraphicalLabel;o.Label.colorDefault=this.rules.DefaultColorLyrics,o.SVGNode=this.drawLabel(o,r)})}drawInstrumentBrace(e,r){e.draw(this.backend.getContext())}drawGroupBracket(e,r){e.draw(this.backend.getContext())}drawOctaveShifts(e){for(const r of e.OctaveShifts)if(r){const s=r,o=this.backend.getContext(),a=s.getTextBracket();this.rules.DefaultColorMusic&&(a.render_options.color=this.rules.DefaultColorMusic),a.setContext(o);try{a.draw()}catch(l){loglevelExports.warn(l)}}}drawPedals(e){for(const r of e.Pedals)if(r){const s=r,o=this.backend.getContext(),a=s.getPedalMarking();a.render_options.color=this.rules.DefaultColorMusic,a.setContext(o),a.draw()}}drawWavyLines(e){for(const r of e.WavyLines)if(r){const s=r,o=this.backend.getContext(),a=s.getVibratoBracket();a.setContext(o),a.draw()}}getMaxExpressionsYAndDots(e){var c,d;const r=[];let s=0;for(const g of e.measures)r.push(g.measureNumber);const o={},a={},l={};for(const g of e.AbstractExpressions)if(g instanceof GraphicalUnknownExpression&&r.includes(g.parentMeasure.MeasureNumber)){const m=this.getDotId(g),y=this.getDotId(g,"x");a[m]||(a[m]=[]),l[y]||(l[y]=[]),this.hasDot(g.Label.PositionAndShape.RelativePosition,a[m],!0)||(a[m].push(g.Label.PositionAndShape.RelativePosition),l[y].push(g.Label.PositionAndShape.RelativePosition)),o[m]=g.Label.PositionAndShape.RelativePosition}let u=0;for(const g of e.AbstractExpressions){const m=(c=g.parentMeasure)==null?void 0:c.MeasureNumber;if(g instanceof GraphicalUnknownExpression&&r.includes(m)){const y=(d=g.parentMeasure.verticalMeasureList[0])==null?void 0:d.stave,b=(y==null?void 0:y.end_x)-(y==null?void 0:y.x),S=this.getDotId(g,"x");if((l[S]||[]).length===1&&u!==m){const A=g.Label.PositionAndShape.AbsolutePosition.y;s=s===0?A:Math.min(s,A)}(l[S]||[]).length!==1&&b/10Number.EPSILON){let o=Math.min(...e.Lines.map(l=>l.Start.x)),a=Math.min(...e.Lines.map(l=>l.Start.y));e.Lines[0].Start.x=o,e.Lines[1].Start.x=o,e.Lines[0].Start.y=a+this.rules.WedgeOpeningLength/2,e.Lines[1].Start.y=a+this.rules.WedgeOpeningLength*2,e.Lines[0].End.y+=this.rules.WedgeOpeningLength/2,e.Lines[1].End.y+=this.rules.WedgeOpeningLength}}catch(o){}const s=this.backend.getContext();s.openGroup("lineGroup");for(const o of e.Lines){const a=new PointF2D(e.ParentStaffLine.PositionAndShape.AbsolutePosition.x+o.Start.x,e.ParentStaffLine.PositionAndShape.AbsolutePosition.y+o.Start.y),l=new PointF2D(e.ParentStaffLine.PositionAndShape.AbsolutePosition.x+o.End.x,e.ParentStaffLine.PositionAndShape.AbsolutePosition.y+o.End.y);this.drawLine(a,l,(r=o.colorHex)!=null?r:"#000000",o.Width)}s.closeGroup()}}renderLabel(e,r,s){return this._renderLabel(e,s)}_renderLabel(e,r){var d,g;if(!e.Label.print)return;const s=e.Label.fontHeight*unitInPixels,{font:o}=e.Label;let a;this.rules.ColoringEnabled&&(a=e.Label.colorDefault,e.ColorXML&&(a=e.ColorXML),e.Label.color&&(a=e.Label.color.toString()),a||(a=this.rules.DefaultColorLabel));let{fontStyle:l,fontFamily:u}=e.Label;l||(l=this.rules.DefaultFontStyle),u||(u=this.rules.DefaultFontFamily);let c;for(let m=0;m<((d=e.TextLines)==null?void 0:d.length);m++){const y=e.TextLines[m],b=this.calculatePixelDistance(y.xOffset),S=new PointF2D(r.ScreenPosition.x+b,r.ScreenPosition.y),A=this.backend.renderText(s,l,o,y.text,r.FontHeightInPixel,S,a,e.Label.fontFamily,(g=e.Label)==null?void 0:g.lyricExtendNoteId);c?c.appendChild(A):c=A,r.ScreenPosition.y=r.ScreenPosition.y+r.FontHeightInPixel,e.TextLines.length>1&&(r.ScreenPosition.y+=this.rules.SpacingBetweenTextLines)}return c}renderRectangle(e,r,s,o,a){return this.backend.renderRectangle(e,s,o,a)}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)}}class TabNote extends Note$1{constructor(e,r,s,o,a,l,u,c){super(e,r,s,o,a),this.stringNumberTab=l,this.fretNumber=u,this.bendArray=c}get StringNumberTab(){return this.stringNumberTab}get FretNumber(){return this.fretNumber}get BendArray(){return this.bendArray}hasTabEffects(){var e;return((e=this.bendArray)==null?void 0:e.length)>0}}const VF$a=Vex.Flow,_VexFlowConverter=class{static durations(i,e){const r=[],s=i.clone();for(;s.RealValue>1e-4;){const o=s.RealValue;if(o>=2)r.push("1/2"),s.Sub(new Fraction$1(2,1));else if(o>=1)r.push("w"),s.Sub(new Fraction$1(1,1));else if(o<1&&o>=.5){if(e&&o>.5)return["w"];r.push("h"),s.Sub(new Fraction$1(1,2))}else if(o<.5&&o>=.25){if(e&&o>.25)return["h"];r.push("q"),s.Sub(new Fraction$1(1,4))}else if(o<.25&&o>=.125){if(e&&o>.125)return["q"];r.push("8"),s.Sub(new Fraction$1(1,8))}else if(o<.125&&o>=.0625){if(e&&o>.0625)return["8"];r.push("16"),s.Sub(new Fraction$1(1,16))}else if(o<.0625&&o>=.03125){if(e&&o>.03125)return["16"];r.push("32"),s.Sub(new Fraction$1(1,32))}else if(o<.03125&&o>=.015625){if(e&&o>.015625)return["32"];r.push("64"),s.Sub(new Fraction$1(1,64))}else{if(e)return["64"];r.push("128"),s.Sub(new Fraction$1(1,128))}}return r}static pitch(i,e,r,s=void 0,o=void 0){let a=o;o===void 0&&(a=3),e&&o===void 0&&(a=0,r.ClefType===ClefEnum.F&&(a=2),r.ClefType===ClefEnum.C&&(a=2));const l=NoteEnum[i.FundamentalNote].toLowerCase(),u=Pitch.accidentalVexflow(i.Accidental),c=i.Octave-r.OctaveOffset+a;let d="";return s&&(d=this.NoteHeadCode(s)),[l+"n/"+c+d,u,r]}static restToNotePitch(i,e){let r=i.Octave;switch(e){case ClefEnum.C:case ClefEnum.F:{r+=2;break}case ClefEnum.G:}return new Pitch(i.FundamentalNote,r,AccidentalEnum.NONE)}static NoteHeadCode(i){const e="/",r=i.Filled?"2":"1";switch(i.Shape){case NoteHeadShape.NORMAL:return"";case NoteHeadShape.DIAMOND:return e+"D"+r;case NoteHeadShape.TRIANGLE:return e+"T"+r;case NoteHeadShape.TRIANGLE_INVERTED:return e+"TI";case NoteHeadShape.X:return e+"X"+r;case NoteHeadShape.CIRCLEX:return e+"X3";case NoteHeadShape.RECTANGLE:return e+"R"+r;case NoteHeadShape.SQUARE:return e+"S"+r;case NoteHeadShape.SLASH:return"";default:return""}}static GhostNotes(i){const e=[],r=_VexFlowConverter.durations(i,!1);for(const s of r)e.push(new VF$a.GhostNote({duration:s}));return e}static StaveNote(i){var B,M,N,I,R,F,k,V,D,$,O,q,G,U,Z,W,K,ye,ae;i.sortForVexflow();const e=i.notes,r=i.parentStaffEntry.parentMeasure.parentSourceMeasure.Rules,s=e[0];let o=[],a;const l=[],u=s.graphicalNoteLength,c=s.sourceNote.NoteTuplet!==void 0;let d=_VexFlowConverter.durations(u,c)[0];_VexFlowConverter.idx+=1,s.sourceNote.TypeLength!==void 0&&s.sourceNote.TypeLength!==u&&s.sourceNote.TypeLength.RealValue!==0&&(d=_VexFlowConverter.durations(s.sourceNote.TypeLength,c)[0],s.numberOfDots=s.sourceNote.DotsXml);let g,m=s.numberOfDots,y=!1,b=0,S=!1,A;for(const Y of e){if(m=1&&Ie.length-1>=oe+1&&(Me=(R=(I=Ie[oe-1])==null?void 0:I.graphicalVoiceEntries[0])==null?void 0:R.parentVoiceEntry,te=(k=(F=Ie[oe+1])==null?void 0:F.graphicalVoiceEntries[0])==null?void 0:k.parentVoiceEntry,Me&&te)){const z=Me.Notes[0],me=te.Notes[0];if((V=z.NoteBeam)!=null&&V.Notes.includes(me)&&me.ParentStaffEntry.ParentStaff.StafflineCount!==1){const pe=Me.Notes.last().Pitch,ee=Y.Clef(),ne=_VexFlowConverter.pitch(_VexFlowConverter.restToNotePitch(pe.getTransposedPitch(-2),ee.ClefType),!1,ee);pe.FundamentalNote===4&&(o=[ne[0]])}}}}if((Y.sourceNote.IsWholeMeasureRest||u.RealValue===Y.sourceNote.SourceMeasure.ActiveTimeSignature.RealValue)&&(o=r.DYMusicScoreType==="staff"?["d/5"]:["R/5"],d="w",m=0,y=!0,b=r.WholeRestXShiftVexflow*unitInPixels),[...Y.sourceNote.ParentStaff.Voices].filter(Se=>(Se==null?void 0:Se.VoiceId)!=1).length){const Se=Y.parentVoiceEntry.parentStaffEntry.graphicalVoiceEntries,Ie=Y.parentVoiceEntry.parentVoiceEntry.ParentVoice.VoiceId;let Me,te;for(const oe of Se)for(const z of oe.notes){if(z===Y||z.sourceNote.isRest()||!z.sourceNote.PrintObject){Y.lineShift=-2;continue}const me=z.parentVoiceEntry.parentVoiceEntry.WantedStemDirection,pe=Ie===1||Ie===5,ee=pe?1:-1,fe=z.sourceNote.Pitch.getHalfTone(),_e=ee===1&&fe>Me,Ae=ee===-1&&fe0){let oe=3;const z=Y.Clef();switch(z.ClefType){case ClefEnum.F:oe=5;break;case ClefEnum.C:oe=4;break}A=Pitch.fromHalftone(Me),o=[_VexFlowConverter.pitch(A,!0,z,void 0,oe)[0]]}}break}Y.sourceNote.Notehead&&(Y.sourceNote.Notehead.Shape,NoteHeadShape.SLASH);const Q=Y.vfpitch;if(($=(D=Q[2])==null?void 0:D.Parent)!=null&&$.Instructions)for(let he=0,ge=Q[2].Parent.Instructions.length;he0&&r.RenderLyrics&&r.LyricsUseXPaddingForLongLyrics){const ge=i.parentStaffEntry.parentMeasure,Se=ge.staffEntries.indexOf(i.parentStaffEntry),Ie=[];for(let oe=Se+1;oe.25){Q=!1;break}if(oe.LyricsEntries.length>0)break;const me=Fraction$1.minus(z,te);he+=me.RealValue*32,te=z}}if(r.RenderLyrics&&r.LyricsUseXPaddingForLongLyrics&&Y.length>0&&Q){let ge=!1,Se=0;for(const Me of e)if(Me.sourceNote.Length.RealValue<=.125){ge=!0;break}let Ie=!1;for(const Me of Y){const te=r.LyricsXPaddingWidthThreshold;let oe=Me.GraphicalLabel.PositionAndShape.Size.width;if(Me.hasDashFromLyricWord()&&(oe+=.5),oe>te){Se+=oe-te;const z=i.parentStaffEntry,me=z.parentMeasure.staffEntries,ee=me.indexOf(z)===me.length-1;ee&&(he+=r.LyricsXPaddingReductionForLastNoteInMeasure),ge||(he+=r.LyricsXPaddingReductionForLongNotes),(r.LyricsXPaddingForLastNoteInMeasure||!ee)&&oe>te+he&&(Ie=!0,Se-=he);break}}Ie&&(E.paddingRight=10*r.LyricsXPaddingFactorForLongLyrics*Se)}}const C=i.notes[0].lineShift;if(C!==0&&(E.getKeyProps()[0].line+=C),e.length>1)for(let Y=0;Y1&&i.notes[0].sourceNote.ParentVoiceEntry.ParentVoice.VoiceId==1&&(E.getKeyProps()[0].line=4.5);const _=(W=window.GYM)==null?void 0:W.customBassDrum;if(_&&E.isRest()&&(E.getDuration()==="q"&&(E.getKeyProps()[0].line=_),E.getDuration()==="h"&&(E.getKeyProps()[0].line=_-1)),E.getKeyProps().forEach(({line:Y},Q)=>i.notes[Q].staffLine=Y),(r.LedgerLineWidth||r.LedgerLineStrokeStyle)&&(E.ledgerLineStyle||(E.ledgerLineStyle={}),r.LedgerLineWidth&&(E.ledgerLineStyle.lineWidth=r.LedgerLineWidth),r.LedgerLineStrokeStyle&&(E.ledgerLineStyle.strokeStyle=r.LedgerLineStrokeStyle)),r.ColoringEnabled){const Y=r.DefaultColorStem;let Q=i.parentVoiceEntry.StemColor;!Q&&Y&&(Q=Y);const he={fillStyle:Q,strokeStyle:Q};Q&&(E.setStemStyle(he),E.flag&&r.ColorFlags&&E.setFlagStyle(he))}if(E.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 Y=i.parentVoiceEntry.WantedStemDirection;const Q=((K=window.GYM)==null?void 0:K.stemDirectionNote)||[],he=Q==null?void 0:Q.find(ge=>ge.id===i.notes[0].sourceNote.NoteToGraphicalNoteObjectId);switch(he&&typeof(he==null?void 0:he.direction)=="number"&&(Y=he.direction),Y){case StemDirectionType.Up:E.setStemDirection(VF$a.Stem.UP),i.parentVoiceEntry.StemDirection=StemDirectionType.Up;break;case StemDirectionType.Down:E.setStemDirection(VF$a.Stem.DOWN),i.parentVoiceEntry.StemDirection=StemDirectionType.Down;break}}for(let Y=0,Q=e.length;Y0&&ge==="single"){const Se=new VF$a.Tremolo(he);Se.extra_stroke_scale=r.TremoloStrokeScale,Se.y_spacing_scale=r.TremoloYSpacingScale,E&&E.duration==="w"&&E.stem.setExtension(-9),E.addModifier(Y,Se)}if(he>0&&ge==="start"&&this.noteTremoloList.push(E),he>0&&ge==="stop"){if(this.noteTremoloList.push(E),this.noteTremoloList.filter(Me=>Me.duration==="w").length===this.noteTremoloList.length)try{this.noteTremoloList[0].keyProps&&this.noteTremoloList[1].keyProps&&((ye=(this.noteTremoloList[0].keyProps[0].line>this.noteTremoloList[1].keyProps[0].line?this.noteTremoloList[1]:this.noteTremoloList[0]).stem)==null||ye.setResetHeight(30))}catch(Me){console.error("设置都是全音符,stem的高度失败")}const Ie=new VF$a.Tremolo(he,[...this.noteTremoloList]);Ie.extra_stroke_scale=1.2,Ie.y_spacing_scale=1.2,Ie.x_shift=-30,E.addModifier(Y,Ie),this.noteTremoloList=[]}this.glissandoList.length&&(E.setVibrato(this.glissandoList[0].vfnote[0]),this.glissandoList=[]),e[Y].sourceNote.glissandoType==="start"&&this.glissandoList.push(e[Y])}if(this.slideNote){try{E.setSlideNote(this.slideNote)}catch(Y){console.error(Y)}this.slideNote=null}if(i.notes[0].sourceNote.slideType==="start"&&(this.slideNote=E),P.Length.RealValue===.25&&P.Notehead&&P.Notehead.Filled===!1){const Y=E.getKeyProps();for(let Q=0;Q1){let Y=E.getKeyProps().filter(he=>!he.code&&he.line>3);!((ae=window.GYM)==null?void 0:ae.stemDirectionNote)&&Y.length===o.length&&E.setStemDirection(-1)}r.DYMusicScoreType==="jianpu"&&window&&window.sett&&window.sett.keySignature&&E.addAccidental(0,new VF$a.Accidental("#"));try{const Y=["b","#","§","º","X"],Q={b:"b","#":"#","§":"n",º:"bb",X:"##"};for(const he of e){const ge=he.sourceNote.voiceEntry.Timestamp;for(const Se of he.sourceNote.SourceMeasure.StaffLinkedExpressions)for(const Ie of Se){const Me=Fraction$1.Equal(ge,Ie.Timestamp),oe=Ie.EntriesList.map(z=>z.label).filter(z=>Y.includes(z)).map(z=>Q[z]);if(Me){for(const z of oe)z&&E.addAnnotation(0,new VF$a.Annotation(z));break}}}}catch(Y){}return E}static generateArticulations(i,e,r){var s,o,a,l,u,c;if(!(!i||i.getAttribute("type")==="GhostNote"))for(const d of e.sourceNote.ParentVoiceEntry.Articulations){let g=VF$a.Modifier.Position.ABOVE;i.getStemDirection()===VF$a.Stem.UP&&(g=VF$a.Modifier.Position.BELOW);let m;const y=d.articulationEnum;switch(r.ArticulationPlacementFromXML&&(d.placement===PlacementEnum.Above?g=VF$a.Modifier.Position.ABOVE:d.placement===PlacementEnum.Below&&(g=VF$a.Modifier.Position.BELOW)),y){case ArticulationEnum.accent:{m=new VF$a.Articulation("a>");const b=e.sourceNote.NoteSlurs;for(const S of b)S.StartNote===e.sourceNote&&(S.PlacementXml===PlacementEnum.Above?m.setYShift(-r.SlurStartArticulationYOffsetOfArticulation*10):S.PlacementXml===PlacementEnum.Below&&m.setYShift(r.SlurStartArticulationYOffsetOfArticulation*10));break}case ArticulationEnum.breathmark:{m=new VF$a.Articulation("abr"),d.placement===PlacementEnum.Above&&(g=VF$a.Modifier.Position.ABOVE),m.breathMarkDistance=r.BreathMarkDistance;break}case ArticulationEnum.downbow:{m=new VF$a.Articulation("am"),d.placement===void 0&&(g=VF$a.Modifier.Position.ABOVE,d.placement=PlacementEnum.Above);break}case ArticulationEnum.fermata:{m=new VF$a.Articulation("a@a"),g=VF$a.Modifier.Position.ABOVE,d.placement=PlacementEnum.Above;break}case ArticulationEnum.marcatodown:{m=new VF$a.Articulation("a|");break}case ArticulationEnum.marcatoup:{m=new VF$a.Articulation("a^"),g=VF$a.Modifier.Position.ABOVE;break}case ArticulationEnum.invertedfermata:{const b=e.sourceNote.ParentVoiceEntry,S=e.sourceNote;if(b!==S.ParentVoiceEntry.ParentSourceStaffEntry.VoiceEntries.last()){b.Articulations=b.Articulations.slice(b.Articulations.indexOf(d)),b.ParentSourceStaffEntry.VoiceEntries.last().Articulations.push(d);continue}m=new VF$a.Articulation("a@u"),g=VF$a.Modifier.Position.BELOW,d.placement=PlacementEnum.Below;break}case ArticulationEnum.lefthandpizzicato:{m=new VF$a.Articulation("a+");break}case ArticulationEnum.naturalharmonic:{m=new VF$a.Articulation("ah");break}case ArticulationEnum.snappizzicato:{m=new VF$a.Articulation("ao");break}case ArticulationEnum.staccatissimo:{m=new VF$a.Articulation("av");break}case ArticulationEnum.staccato:{m=new VF$a.Articulation("a.");break}case ArticulationEnum.tenuto:{m=new VF$a.Articulation("a-");break}case ArticulationEnum.upbow:{m=new VF$a.Articulation("a|"),d.placement===void 0&&(g=VF$a.Modifier.Position.ABOVE,d.placement=PlacementEnum.Above);break}case ArticulationEnum.strongaccent:{m=new VF$a.Articulation("a^");break}}m&&(!i.hasStem()&&!i.isRest()&&y==ArticulationEnum.accent&&i.getLineNumber()>=3&&(g=VF$a.Modifier.Position.ABOVE,(o=(s=i==null?void 0:i.modifiers)==null?void 0:s.filter(A=>["TREMOLO"].includes(A.getCategory().toLocaleUpperCase())))!=null&&o.length&&m.setYShift(-16)),y===ArticulationEnum.strongaccent&&(g=VF$a.Modifier.Position.ABOVE,(a=window.GYM)!=null&&a.customArtPosition&&(i.getStemDirection()===1?g=VF$a.Modifier.Position.ABOVE:(g=VF$a.Modifier.Position.BELOW,m=new VF$a.Articulation("a|")))),(l=window.GYM)!=null&&l.customAccentItem&&y===ArticulationEnum.accent&&(g=VF$a.Modifier.Position.ABOVE),(u=window.GYM)!=null&&u.customLefthandpizzicatoItem&&(y===ArticulationEnum.lefthandpizzicato||y===ArticulationEnum.naturalharmonic)&&(g=VF$a.Modifier.Position.ABOVE),y===ArticulationEnum.tenuto&&i.getDuration()==="w"&&((c=window.GYM)!=null&&c.customTenutoItem)&&(g=VF$a.Modifier.Position.ABOVE),m.setPosition(g),i.addModifier(0,m))}}static generateOrnaments(i,e){let r=VF$a.Modifier.Position.ABOVE;e.placement===PlacementEnum.Below&&(r=VF$a.Modifier.Position.BELOW);let s;switch(e.GetOrnament){case OrnamentEnum.DelayedInvertedTurn:{s=new VF$a.Ornament("turn_inverted"),s.setDelayed(!0);break}case OrnamentEnum.DelayedTurn:{s=new VF$a.Ornament("turn"),s.setDelayed(!0);break}case OrnamentEnum.InvertedMordent:{s=new VF$a.Ornament("mordent"),s.setDelayed(!1);break}case OrnamentEnum.InvertedTurn:{s=new VF$a.Ornament("turn_inverted"),s.setDelayed(!1);break}case OrnamentEnum.Mordent:{s=new VF$a.Ornament("mordent_inverted"),s.setDelayed(!1);break}case OrnamentEnum.Trill:{s=new VF$a.Ornament("tr"),s.setDelayed(!1);break}case OrnamentEnum.Turn:{s=new VF$a.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(r),i.addModifier(0,s))}static StrokeTypeFromArpeggioType(i){switch(i){case ArpeggioType.ARPEGGIO_DIRECTIONLESS:return VF$a.Stroke.Type.ARPEGGIO_DIRECTIONLESS;case ArpeggioType.BRUSH_DOWN:return VF$a.Stroke.Type.BRUSH_UP;case ArpeggioType.BRUSH_UP:return VF$a.Stroke.Type.BRUSH_DOWN;case ArpeggioType.RASQUEDO_DOWN:return VF$a.Stroke.Type.RASQUEDO_UP;case ArpeggioType.RASQUEDO_UP:return VF$a.Stroke.Type.RASQUEDO_DOWN;case ArpeggioType.ROLL_DOWN:return VF$a.Stroke.Type.ROLL_UP;case ArpeggioType.ROLL_UP:return VF$a.Stroke.Type.ROLL_DOWN;default:return VF$a.Stroke.Type.ARPEGGIO_DIRECTIONLESS}}static CreateTabNote(i){const e=[],r=i.notes.reverse(),s=[],o=i.notes[0].graphicalNoteLength,a=i.notes[0].sourceNote.NoteTuplet!==void 0;let l=_VexFlowConverter.durations(o,a)[0],u=0;for(const d of i.notes){const g=d.sourceNote;let m={str:g.StringNumberTab,fret:g.FretNumber};d.sourceNote instanceof TabNote||(loglevelExports.info(`invalid tab note: ${d.sourceNote.Pitch.ToString()} in measure ${i.parentStaffEntry.parentMeasure.MeasureNumber}, likely missing XML string+fret number.`),m={str:1,fret:0}),e.push(m),g.BendArray&&g.BendArray.forEach(function(y){let b;const S=y.bendalter-m.fret;S>1?b="Full":S===1?b="1/2":b="1/4",y.direction==="up"?s.push({type:VF$a.Bend.UP,text:b,width:10}):s.push({type:VF$a.Bend.DOWN,text:b,width:10})}),u(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,r,s,o){super(r),this.label=e,this.staffNumber=s,this.parentMultiTempoExpression=o}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,r){for(const s of e)if(AbstractTempoExpression.stringContainsSeparatedWord(r.toLowerCase().trim(),s.toLowerCase().trim()))return!0;return!1}static stringContainsSeparatedWord(e,r){return e===r||e.indexOf(" "+r)!==-1||e.indexOf(r+" ")!==-1}}const _InstantaneousTempoExpression=class extends AbstractTempoExpression{constructor(i,e,r,s,o,a=!1){super(i,e,r,o),this.isMetronomeMark=a,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","Maestoso"];InstantaneousTempoExpression.listInstantaneousTempoModerato=["Moderato","Mäßig","Modéré","moderately"];InstantaneousTempoExpression.listInstantaneousTempoAllegretto=["Allegretto","Animato","fast"];InstantaneousTempoExpression.listInstantaneousTempoAllegroModerato=["Allegro moderato"];InstantaneousTempoExpression.listInstantaneousTempoAllegro=["Allegro","Rapide","Vite","Rasch","Schnell","Fröhlich"];InstantaneousTempoExpression.listInstantaneousTempoVivace=["Vivace","Allegro Assai","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","rallentando","ritardando","ritard.","rit.","ritard","rall...","accelerando","accel"];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,r){super(e),this.label=i,this.staffNumber=r,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,r,s,o){super(r),this.label=e,this.staffNumber=o,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,r){this.unknownList=[],this.moodList=[],this.expressions=[],this.sourceMeasure=e,this.timestamp=r}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 r;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=(r=this.expressions[0].expression.fontStyle)!=null?r:FontStyles.Regular)),e}addExpression(e,r){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,r)}CompareTo(e){return this.Timestamp.RealValue>e.Timestamp.RealValue?1:this.Timestamp.RealValue=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 r=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)*r))}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","calando","allargando","rallentando","ritardando","ritenuto","ritard.","ritard","rit.","rit","riten.","riten"];class MultiTempoExpression{constructor(e,r){this.expressions=[],this.sourceMeasure=e,this.timestamp=r}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,r){if(this.checkIfAlreadyExists(e))return;e instanceof InstantaneousTempoExpression?this.instantaneousTempo=e:e instanceof ContinuousTempoExpression&&(this.continuousTempo=e);const s=new TempoExpressionEntry;s.prefix=r,s.Expression=e,s.label=e.Label,this.expressions.push(s)}CompareTo(e){return this.Timestamp.RealValue>e.Timestamp.RealValue?1:this.Timestamp.RealValue0){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,r,s,o){for(let a=0,l=e.length;a0&&(u.beginInstructionsWidth=s),o>0&&(u.endInstructionsWidth=o)}}finalizeCurrentAndCreateNewSystem(e,r=!1,s=!0,o=!1){this.finalizeCurrentSystem(e,r,s,o),this.currentSystemParams=new SystemBuildParameters,e!==void 0&&this.measureListIndex=1){const r=this.currentSystemParams.currentSystem.GraphicalMeasures[this.currentSystemParams.currentSystem.GraphicalMeasures.length-1];let s=0;const o=e[e.length-1];o.endLine===SystemLinesEnum.DotsBoldBoldDots&&(o.endLine=SystemLinesEnum.DotsThinBold,s=r[0].getLineWidth(SystemLinesEnum.DotsBoldBoldDots)/2-r[0].getLineWidth(SystemLinesEnum.DotsThinBold)),this.currentSystemParams.currentSystemFixWidth-=s;for(let a=0,l=r.length;a1){l=!0;break}}let u=0;for(let c=0;c=0&&this.measureList[B]){const N=(C=this.measureList[B][0])==null?void 0:C.parentSourceMeasure;N!=null&&N.ImplicitMeasure&&(N!=null&&N.RhythmPrinted)&&(T=!1)}T&&(r.addRhythmAtBegin(d,s),r.parentSourceMeasure.RhythmPrinted=d,b=!0)}return(m||y||b)&&(l+=r.beginInstructionsWidth,b&&(l+=this.rules.RhythmRightMargin)),l}addInstructionsAtMeasureEnd(e,r,s){if(!e||!e.Instructions||e.Instructions.length===0)return 0;for(let o=0,a=e.Instructions.length;o0&&(this.currentSystemParams.systemMeasures.push({beginLine:SystemLinesEnum.None,endLine:SystemLinesEnum.None}),this.currentSystemParams.currentWidth+=o,this.currentSystemParams.currentSystemFixWidth+=o)}addExtraInstructionMeasure(e,r,s){const o=this.currentSystemParams.currentSystem,a=MusicSheetCalculator.symbolFactory.createExtraGraphicalMeasure(o.StaffLines[e]);r&&a.addKeyAtBegin(r,this.activeKeys[e],this.activeClefs[e]),s!==void 0&&s.PrintObject&&a.addRhythmAtBegin(s),a.PositionAndShape.BorderLeft=0,a.PositionAndShape.BorderTop=0,a.PositionAndShape.BorderBottom=this.rules.StaffHeight;const l=this.rules.MeasureLeftMargin+a.beginInstructionsWidth+this.rules.MeasureRightMargin;return a.PositionAndShape.BorderRight=l,o.StaffLines[e].Measures.push(a),l}addStaveMeasuresToSystem(e){if(e[0]){const r=[];for(let o=0;o1){const u=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,e.measureListIndex+e.multipleRestMeasures-1);e=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[u]}}finally{}const r=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures,s=r[this.measureListIndex];let o=!1;return s.allRests&&(o=(l=(a=r[this.measureListIndex+s.multipleRestMeasures-1])==null?void 0:a.endsWithLineRepetition)==null?void 0:l.call(a)),this.nextMeasureBeginsLineRepetition()&&this.thisMeasureEndsLineRepetition()?SystemLinesEnum.DotsBoldBoldDots:this.thisMeasureEndsLineRepetition()||o?SystemLinesEnum.DotsThinBold:this.nextMeasureHasKeyInstructionChange()||this.thisMeasureEndsWordRepetition()||this.nextMeasureBeginsWordRepetition()?SystemLinesEnum.DoubleThin:e&&e.endingBarStyleEnum!==void 0?e.endingBarStyleEnum:SystemLinesEnum.SingleThin}getLineWidth(e,r,s){let o=e.getLineWidth(r);return r===SystemLinesEnum.DotsBoldBoldDots&&(o/=2),s&&r===SystemLinesEnum.BoldThinDots&&(o+=this.rules.DistanceBetweenLastInstructionAndRepetitionBarline),o}previousMeasureEndsLineRepetition(){if(this.measureListIndex===0)return!1;for(let e=0,r=this.measureList[this.measureListIndex-1].length;e=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||!this.measureList[e])return!1;for(let r=0,s=this.measureList[e].length;r=c)l=g,c=g.multipleRestMeasureNumber;else break}return l.endsWithLineRepetition()}}return!1}nextMeasureBeginsWordRepetition(){const e=this.measureListIndex+1;if(e>=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length||e>this.measureList.length-1)return!1;for(let r=0,s=this.measureList[e].length;r1)for(let u=1;ua&&(a=g)}for(let u=0;uthis.rules.PageHeight-this.rules.PageBottomMargin&&(o++,o<=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[u-1],d=c.StaffLines[c.StaffLines.length-1],g=d.PositionAndShape;let m=this.findRequiredDistanceWithSkyBottomLine(c,s);m=Math.max(a,m),m+=this.rules.MinSkyBottomDistBetweenSystems,((l=window==null?void 0:window.appName)==null?void 0:l.toLocaleUpperCase())==="GYM"&&(m=m<16?16:m);const y=this.hasExpressionCounts(s);y.TempoCount>0&&this.rules.MetronomeMarksDrawn&&(m+=2),y.OtherCount>0&&this.rules.MetronomeMarksDrawn&&(m+=2),m=Math.max(m,this.rules.MinimumDistanceBetweenSystems+d.StaffHeight);const b=r+g.RelativePosition.y+m,S=b+s.PositionAndShape.BorderMarginBottom;if(!(this.rules.NewPageAtXMLNewPageAttribute&&c.breaksPage)&&S0&&console.log(`total amount of pages that couldn't fit a single music system: ${o} of ${e.PageNumber}`)}findRequiredDistanceWithSkyBottomLine(e,r){const s=e.StaffLines[e.StaffLines.length-1],o=r.StaffLines[0],a=s.BottomLine,l=o.SkyLine,u=s.PositionAndShape,c=o.PositionAndShape,d=1/this.rules.SamplingUnit;let g=0;for(let m=0;m=l.length)break;const S=Math.max(0,b-6),A=Math.min(l.length-1,b+6);let E=0;for(let P=S;P<=A;P++)E=Math.min(E,l[P]);const x=y-E;g=Math.max(x,g)}return g===0&&(g=u.BorderBottom-c.BorderTop),g}}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,r,s){this.getOpenOctaveShift=e,this.getAbsoluteStartTimestamp=r,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,r){if(!r)return;const s=r.FundamentalNote+r.Octave*12,o=this.currentAlterationsComparedToKeyInstructionList.indexOf(s)>=0;if(this.currentInMeasureNoteAlterationsDict.containsKey(s)){if(o&&this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(s),1),this.currentInMeasureNoteAlterationsDict.getValue(s)!==r.AccidentalHalfTones){this.keySignatureNoteAlterationsDict.containsKey(s)&&this.keySignatureNoteAlterationsDict.getValue(s)!==r.AccidentalHalfTones?(this.currentAlterationsComparedToKeyInstructionList.push(s),this.currentInMeasureNoteAlterationsDict.setValue(s,r.AccidentalHalfTones)):r.Accidental!==AccidentalEnum.NONE&&this.currentInMeasureNoteAlterationsDict.remove(s);const a=this.currentInMeasureNoteAlterationsDict.getValue(s);if(r.Accidental===AccidentalEnum.NONE&&(Math.abs(a)===.5?r=new Pitch(r.FundamentalNote,r.Octave,AccidentalEnum.NONE):r=new Pitch(r.FundamentalNote,r.Octave,AccidentalEnum.NATURAL)),this.isAlterAmbiguousAccidental(r.Accidental)&&!r.AccidentalXml)return;MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,r)}}else if(r.Accidental!==AccidentalEnum.NONE){if(o||this.currentAlterationsComparedToKeyInstructionList.push(s),this.currentInMeasureNoteAlterationsDict.setValue(s,r.AccidentalHalfTones),this.isAlterAmbiguousAccidental(r.Accidental)&&!r.AccidentalXml)return;MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,r)}else o&&(r=new Pitch(r.FundamentalNote,r.Octave,AccidentalEnum.NATURAL),this.currentAlterationsComparedToKeyInstructionList.splice(this.currentAlterationsComparedToKeyInstructionList.indexOf(s),1),MusicSheetCalculator.symbolFactory.addGraphicalAccidental(e,r))}isAlterAmbiguousAccidental(e){return e===AccidentalEnum.SLASHFLAT||e===AccidentalEnum.QUARTERTONEFLAT}reactOnKeyInstructionChange(){const e=this.activeKeyInstruction.AlteratedNotes;let r;this.activeKeyInstruction.Key>0?r=AccidentalEnum.SHARP:r=AccidentalEnum.FLAT,this.keySignatureNoteAlterationsDict.clear(),this.currentAlterationsComparedToKeyInstructionList.length=0;for(let s=-9;s<9;s++)for(let o=0;o0?(s=d-1,e.push({startIndex:r,endIndex:s}),r=d):y.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(s=d,e.push({startIndex:r,endIndex:s}),r=d+1)}r0?Number(F):6,T===F||C+N>S&&T%2===0?(a.push(T),C=M,T=1):T++}else C>S?(a.push(T),C=M,T=1):T++;M>S?I=_+1:I=Math.ceil(I),x===I?P+=1:(o.push(P),x=I,P=1)}o.push(P),a.push(T),a=a.filter(Boolean)}return a.length>1&&a[a.length-1]===1&&(a[a.length-2]=a[a.length-2]-1,a[a.length-1]=a[a.length-1]+1),console.log(a,o),this.buildPreparedMusicSystems(a)}buildPreparedMusicSystems(e){let r=!1;this.currentSystemParams=new SystemBuildParameters,this.currentSystemParams.currentSystem=this.initMusicSystem();for(let s=0,o=this.measureList.length;s0&&this.rules.RenderMultipleRestMeasures){m.isReducedToMultiRest=!0,m.multipleRestMeasureNumber=1;const b=m.multipleRestMeasures-1;d+=b;for(let S=1;S<=b;S++){const A=e.SourceMeasures.indexOf(m)+S;if(A>=e.SourceMeasures.length)break;const E=e.SourceMeasures[A];E.multipleRestMeasureNumber=S+1,E.isReducedToMultiRest=!0,r.push([void 0])}}}if(this.rules.AutoGenerateMultipleRestMeasuresFromRestMeasures&&this.rules.RenderMultipleRestMeasures){let d,g=0;for(let m=0,y=e.SourceMeasures.length;m0){d.isReducedToMultiRest=!0,d.multipleRestMeasureNumber=1,g++,b.multipleRestMeasureNumber=g,b.isReducedToMultiRest=!0;for(let S=0;S1){d.multipleRestMeasures=g;const S=this.createGraphicalMeasuresForSourceMeasure(d,s,a,u,o);r[d.measureListIndex]=S,g=0,d=void 0}else g=0,d=void 0}if(g>1){d.multipleRestMeasures=g,d.isReducedToMultiRest=!0;const m=this.createGraphicalMeasuresForSourceMeasure(d,s,a,u,o);r[d.measureListIndex]=m,g=0,d=void 0}}const c=o.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,r){var s;if(this.graphicalMusicSheet.MeasureList.length>0){let o=0,a;for(let l=0;lo&&(o=u),MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(a,u)}if(this.rules.FixedMeasureWidth){let l=o;this.rules.FixedMeasureWidthFixedValue&&(l=this.rules.FixedMeasureWidthFixedValue);for(let u=0;u1;if(a===1&&r.Measures[0].parentSourceMeasure.ImplicitMeasure&&(u=!1),u)return;(l.MeasureNumber===0||l.MeasureNumber===1)&&(s=l.MeasureNumber),l!==r.Measures[0]&&this.rules.MeasureNumberLabelXOffset?o=this.rules.MeasureNumberLabelXOffset:o=0;const c=this.rules.UseXMLMeasureNumbers&&l.MeasureNumber===1&&l.parentSourceMeasure.getPrintedMeasureNumber()!==1;((l.MeasureNumber===s||l.MeasureNumber>=s+this.rules.MeasureNumberLabelOffset)&&!l.parentSourceMeasure.ImplicitMeasure||c)&&((l.MeasureNumber!==1||l.MeasureNumber===1&&l!==r.Measures[0]||c)&&this.calculateSingleMeasureNumberPlacement(l,r,e,o),s=l.MeasureNumber)}}calculateSingleMeasureNumberPlacement(e,r,s,o=0){const a=e.parentSourceMeasure.getPrintedMeasureNumber().toString(),l=new Label(a),u=new GraphicalLabel(l,this.rules.MeasureNumberLabelHeight,TextAlignmentEnum.LeftBottom,this.rules),c=r.SkyBottomLineCalculator;u.setLabelPositionAndShapeBorders(),u.PositionAndShape.Parent=s.PositionAndShape;const d=r.PositionAndShape.RelativePosition.x+e.PositionAndShape.RelativePosition.x-u.PositionAndShape.BorderMarginLeft+o;let g,m=d,y=d-u.PositionAndShape.BorderLeft+u.PositionAndShape.BorderRight;m-=r.PositionAndShape.RelativePosition.x,y-=r.PositionAndShape.RelativePosition.x;const b=m+.5,S=y-.5,A=c.getSkyLineMinInRange(b,S);if(e===r.Measures[0]){let E=0;if(s.GroupBrackets.length>0)for(const x of s.GroupBrackets)E=Math.min(E,x.PositionAndShape.BorderTop);else e.ParentStaff.ParentInstrument.Parent&&(E=-1);g=Math.min(A,E)}else g=A;g=Math.min(0,g),u.PositionAndShape.RelativePosition=new PointF2D(d,g),s.MeasureNumberLabels.push(u)}calculateMeasureNumberSkyline(e){const r=e.StaffLines[0];for(const s of e.MeasureNumberLabels){let o=s.PositionAndShape.RelativePosition.x,a=o-s.PositionAndShape.BorderLeft+s.PositionAndShape.BorderRight;o-=r.PositionAndShape.RelativePosition.x,a-=r.PositionAndShape.RelativePosition.x,r.SkyBottomLineCalculator.updateSkyLineInRange(o,a,s.PositionAndShape.RelativePosition.y+s.PositionAndShape.BorderMarginTop)}}layoutGraphicalTie(e,r,s){throw new Error(this.abstractNotImplementedErrorMessage)}calculateSingleStaffLineLyricsPosition(e,r){let s=0,o=this.rules.StaffHeight;const a=new Map,l=[],u=e.SkyBottomLineCalculator;let c=e.Measures.length;for(let g=0;g0){l.push(A),s=Math.max(s,A.LyricsEntries.length);const x=A.PositionAndShape.RelativePosition.x+y.x;let P=Number.MAX_VALUE,C=Number.MIN_VALUE;for(let _=0;_0){const g=e.PositionAndShape.Size.width;let m=l[0].PositionAndShape.RelativePosition.x+l[0].PositionAndShape.BorderMarginLeft+l[0].parentMeasure.PositionAndShape.RelativePosition.x;m=m>g?g:m,u.updateBottomLineInRange(m,g,d)}return l}calculateLyricsExtendsAndDashes(e){for(let r=0,s=e.length;r0||e.UnknownList.length>0){let g="";for(let A=0,E=e.EntriesList.length;A-50){let A=u/10;A+=this.rules.PlaceWordsInsideStafflineYOffset,S.PositionAndShape.RelativePosition.y=A}new GraphicalUnknownExpression(m,S,b,(d=a[s])==null?void 0:d.parentSourceMeasure,e)}}clearRecreatedObjects(){for(let e=0,r=this.staffEntriesWithGraphicalTies.length;ee.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 r=[];for(let l=this.rules.MinMeasureToDrawIndex,u=e.length;l0){let x=0;l.staffEntries[0].relInMeasureTimestamp.RealValue===0&&(x=l.staffEntries[0].PositionAndShape.RelativePosition.x,l.MeasureNumber===1&&(x+=this.rules.ChordSymbolWholeMeasureRestXOffsetMeasure1));const P=l.PositionAndShape.Size.width-l.endInstructionsWidth,C=c.relInMeasureTimestamp.RealValue/l.parentSourceMeasure.Duration.RealValue;let T=x+(P-x)*C+g.PositionAndShape.BorderMarginLeft;u&&(T=Math.max(T,u.PositionAndShape.RelativePosition.x+u.GraphicalLabel.PositionAndShape.Size.width+this.rules.ChordSymbolXSpacing)),g.PositionAndShape.RelativePosition.x=T,g.PositionAndShape.Parent=l.staffEntries[0].PositionAndShape.Parent}const m=g.PositionAndShape,y=m.Parent;if(y.DataObject instanceof GraphicalMeasure&&c.relInMeasureTimestamp.RealValue===0&&(m.RelativePosition.x=Math.max(l.beginInstructionsWidth,m.RelativePosition.x),l.MeasureNumber===1&&m.RelativePosition.x>3&&(m.RelativePosition.x+=this.rules.ChordSymbolWholeMeasureRestXOffsetMeasure1)),c.PositionAndShape.RelativePosition.x===0){const x=e.GraphicalMeasures[a];for(const P of x){let C=!1;for(const T of P.staffEntries)if(T.relInMeasureTimestamp===c.relInMeasureTimestamp&&T.PositionAndShape.RelativePosition.x!==0){m.RelativePosition.x=T.PositionAndShape.RelativePosition.x,C=!0;break}if(C)break}}const b=m.BorderMarginLeft+y.AbsolutePosition.x+m.RelativePosition.x,S=m.BorderMarginRight+y.AbsolutePosition.x+m.RelativePosition.x;(!this.rules.ChordSymbolYAlignment||o>0)&&(o=s.getSkyLineMinInRange(b,S));let A=0;d===0?(A+=this.rules.ChordSymbolYOffset,A+=.1):A+=this.rules.ChordSymbolYPadding,A*=-1;const E=g.GraphicalLabel;E.PositionAndShape.RelativePosition.y=o+A,E.setLabelPositionAndShapeBorders(),E.PositionAndShape.calculateBoundingBox(),s.updateSkyLineInRange(b,S,o+E.PositionAndShape.BorderMarginTop),u=g}}}}calculateAlignedChordSymbolsOffset(e,r){let s=Number.MAX_SAFE_INTEGER;for(const o of e)for(const a of o.graphicalChordContainers){const l=a.PositionAndShape,u=l.Parent;let c=l.BorderMarginLeft+u.AbsolutePosition.x,d=l.BorderMarginRight+u.AbsolutePosition.x;u.DataObject instanceof GraphicalMeasure&&(c+=u.DataObject.beginInstructionsWidth,d+=u.DataObject.beginInstructionsWidth),s=Math.min(s,r.getSkyLineMinInRange(c,d))}return s}layoutMeasureWithWholeRest(e,r,s){}layoutBeams(e){}layoutArticulationMarks(e,r,s){}layoutOrnament(e,r,s){}calculateRestNotePlacementWithinGraphicalBeam(e,r,s,o,a){}calculateTupletNumbers(){if(!this.rules.TupletNumberLimitConsecutiveRepetitions)return;let e=-1,r,s=0,o,a;const l={};for(const u of this.graphicalMusicSheet.ParentMusicSheet.Instruments)for(const c of u.Voices){s=0,l[c.VoiceId]={};for(const d of c.VoiceEntries)if(d.Notes.length>0){const g=d.Notes[0];if(!g.NoteTuplet||g.NoteTuplet.shouldBeBracketed(this.rules.TupletsBracketedUseXMLValue,this.rules.TupletsBracketed,this.rules.TripletsBracketed)){e=-1,s=0,o=void 0,r=void 0;continue}if(g.NoteTuplet===a)continue;let m=g.TypeLength;if(m||(loglevelExports.warn("note missing TypeLength"),m=g.NoteTuplet.Fractions[0]),g.NoteTuplet!==o&&l[c.VoiceId][g.NoteTuplet.TupletLabelNumber]&&l[c.VoiceId][g.NoteTuplet.TupletLabelNumber][m.RealValue]){g.NoteTuplet.RenderTupletNumber=!1,a=g.NoteTuplet;continue}(g.NoteTuplet.TupletLabelNumber!==e||!m.Equals(r)||g.NoteTuplet.Bracket)&&(e=g.NoteTuplet.TupletLabelNumber,r=m,s=0),o=g.NoteTuplet,s++,s<=this.rules.TupletNumberMaxConsecutiveRepetitions&&(g.NoteTuplet.RenderTupletNumber=!0),s>this.rules.TupletNumberMaxConsecutiveRepetitions&&(g.NoteTuplet.RenderTupletNumber=!1,this.rules.TupletNumberAlwaysDisableAfterFirstMax&&(l[c.VoiceId][e]||(l[c.VoiceId][e]={}),l[c.VoiceId][e][m.RealValue]=!0)),a=o}}}calculateSlurs(){}calculateGlissandi(){}calculateDynamicExpressionsForMultiExpression(e,r,s){}calculateGraphicalVerbalContinuousDynamic(e,r){const s=e.Label,o=r.x+s.PositionAndShape.BorderMarginLeft,a=r.x+s.PositionAndShape.BorderMarginRight,l=e.ContinuousDynamic.Placement,c=e.ParentStaffLine.SkyBottomLineCalculator;let d;l===PlacementEnum.Below?(d=c.getBottomLineMaxInRange(o,a),s.PositionAndShape.RelativePosition=new PointF2D(r.x,d-s.PositionAndShape.BorderMarginTop)):(d=c.getSkyLineMinInRange(o,a),s.PositionAndShape.RelativePosition=new PointF2D(r.x,d-s.PositionAndShape.BorderMarginBottom))}calculateGraphicalContinuousDynamic(e,r){var Z;const s=e.IsSoftAccent,o=e.ParentStaffLine.ParentStaff.idInMusicSheet,a=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(e.ContinuousDynamic.EndMultiExpression.SourceMeasureParent,o);if(!a){loglevelExports.warn("MusicSheetCalculator.calculateGraphicalContinuousDynamic: No endMeasure found");return}e.EndMeasure=a;const l=e.ParentStaffLine,u=a.ParentStaffLine,c=u&&l===u;let d=!1;u?d=u==null?void 0:u.isPartOfMultiStaffInstrument():l&&(d=l==null?void 0:l.isPartOfMultiStaffInstrument());const g=Fraction$1.createFromFraction(e.ContinuousDynamic.EndMultiExpression.AbsoluteTimestamp),m=this.graphicalMusicSheet.GetVerticalContainerFromTimestamp(g),y=m.getFirstNonNullStaffEntry().parentMeasure,b=y.PositionAndShape.AbsolutePosition.x+y.PositionAndShape.BorderRight;let S=new Fraction$1(0,0,0);for(const W of m.StaffEntries){const K=(Z=W==null?void 0:W.sourceStaffEntry)==null?void 0:Z.calculateMaxNoteLength(!1);K!=null&&K.gt(S)&&(S=K)}const A=!s&&e.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo,E=this.getRelativePositionInStaffLineFromTimestamp(g,o,u,d,0,A),x=Fraction$1.plus(g,S),P=this.getRelativePositionInStaffLineFromTimestamp(x,o,u,d,0,e.ContinuousDynamic.DynamicType===ContDynamicEnum.diminuendo),C=this.rules.SoftAccentWedgePadding,T=m.getFirstNonNullStaffEntry().PositionAndShape.Size.width,_=this.rules.SoftAccentSizeFactor;s?(r.x-=T/2*_+C,E.x=r.x+T/2*_):P.x>E.x&&P.xN){const ae=M.StaffLines[W].PositionAndShape.RelativePosition.y-l.PositionAndShape.RelativePosition.y-this.rules.StaffHeight;G=this.rules.StaffHeight+ae/2}else G=this.rules.WedgePlacementBelowY;G-=this.rules.WedgeOpeningLength/2,c||(U=G);let K=I.getBottomLineMaxInRange(V,$);if(K>G&&(G=K),NU&&(U=K),U+=this.rules.WedgeOpeningLength/2,U+=this.rules.WedgeVerticalMargin),G+=this.rules.WedgeOpeningLength/2,G+=this.rules.WedgeVerticalMargin}else if(R===PlacementEnum.Above){if(l.ParentStaff.ParentInstrument.Staves.length===1)G=this.rules.WedgePlacementAboveY;else{let K=0;N>0&&(K=N-1);const ye=M.StaffLines[K];G=-(l.PositionAndShape.RelativePosition.y-ye.PositionAndShape.RelativePosition.y-this.rules.StaffHeight)/2}G+=this.rules.WedgeOpeningLength/2,c||(U=G);let W=I.getSkyLineMinInRange(V,$);if(W1&&N>0){const K=l.findClosestStaffEntry(V),ye=l.findClosestStaffEntry($);K&&ye&&K.parentVerticalContainer}c||(W=u.SkyBottomLineCalculator.getSkyLineMinInRange(D,O),Wae&&(ae=Y),ae+=this.rules.WedgeOpeningLength/2,ae+=this.rules.WedgeVerticalMargin}else if(R===PlacementEnum.Above){const Y=ye.SkyBottomLineCalculator.getSkyLineMinInRange(D,O);Y-m/2?c=-m/2:c=d-e.PositionAndShape.BorderMarginBottom}else c=d-e.PositionAndShape.BorderMarginBottom;e.PositionAndShape.RelativePosition=new PointF2D(r.x,c)}else if(e.Placement===PlacementEnum.Below){const d=u.getBottomLineMaxInRange(a,l),g=o.ParentStaff.ParentInstrument.Staves[o.ParentStaff.ParentInstrument.Staves.length-1];if(o.isPartOfMultiStaffInstrument()&&o.ParentStaff!==g){const y=o.ParentMusicSystem.StaffLines[o.ParentMusicSystem.StaffLines.indexOf(o)+1].PositionAndShape.RelativePosition.y-o.PositionAndShape.RelativePosition.y-this.rules.StaffHeight,b=e.PositionAndShape.BorderMarginBottom;d+be.PositionAndShape.Size.width&&(b=e.PositionAndShape.Size.width-this.rules.MeasureRightMargin,y=b-g.PositionAndShape.MarginSize.width,r.x=y-g.PositionAndShape.BorderMarginLeft);let S;const A=e.SkyBottomLineCalculator;return a===PlacementEnum.Below?S=A.getBottomLineMaxInRange(y,b)+c:S=A.getSkyLineMinInRange(y,b)-c,g.PositionAndShape.RelativePosition=new PointF2D(r.x,S),a===PlacementEnum.Below?A.updateBottomLineInRange(y,b,g.PositionAndShape.BorderMarginBottom+S):A.updateSkyLineInRange(y,b,g.PositionAndShape.BorderMarginTop+S),g}calculateTempoExpressionsForMultiTempoExpression(e,r,s,o){metronomeMarks={};const a=Fraction$1.plus(e.AbsoluteTimestamp,r.Timestamp),l=this.graphicalMusicSheet.MeasureList[s];let u=new PointF2D;if(r.ContinuousTempo||r.InstantaneousTempo){if(this.rules.MinMeasureToDrawIndex>0||!l[0])return;let c=l[0].ParentStaffLine,d=l[0].PositionAndShape.RelativePosition.x,g=0;for(let m=0;m0){c=l[m].ParentStaffLine,d=l[m].PositionAndShape.RelativePosition.x,g=m;break}if(u=this.getRelativePositionInStaffLineFromTimestamp(a,g,c,c.isPartOfMultiStaffInstrument(),d),r.EntriesList.length>0&&r.EntriesList[0].Expression instanceof InstantaneousTempoExpression){const m=r.EntriesList[0].Expression;if(m.Placement=PlacementEnum.Above,c.Measures[0].staffEntries.length>0&&Math.abs(u.x-c.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x)===0&&c.ParentMusicSystem===this.musicSystems[0]){const y=c.Measures[0].FirstInstructionStaffEntry;if(y){const b=y.GraphicalInstructions.last();u.x=b.PositionAndShape.RelativePosition.x}this.rules.CompactMode&&(u.x=c.PositionAndShape.RelativePosition.x+c.Measures[0].PositionAndShape.RelativePosition.x)}}for(const m of r.EntriesList){let y=TextAlignmentEnum.CenterBottom;this.rules.CompactMode&&(y=TextAlignmentEnum.LeftBottom);const b=this.calculateLabel(c,u,m.label,r.getFontstyleOfFirstEntry(),m.Expression.Placement,this.rules.UnknownTextHeight,y,this.rules.TempoYSpacing);if(m.Expression.ColorXML&&this.rules.ExpressionsUseXMLColor&&(b.ColorXML=m.Expression.ColorXML),m.Expression instanceof InstantaneousTempoExpression){for(const A of c.AbstractExpressions)A instanceof GraphicalInstantaneousTempoExpression&&(A.SourceExpression.Label,m.Expression.Label);new GraphicalInstantaneousTempoExpression(m.Expression,b).ParentStaffLine||loglevelExports.warn("Adding staffline didn't work"),m.Expression.Enum===TempoEnum.metronomeMark&&(metronomeMarks[s]=m.Expression)}else m.Expression instanceof ContinuousTempoExpression;if(o===e.TempoExpressions.length-1)for(const S of Object.values(metronomeMarks))this.createMetronomeMark(S,s);else if(m.Expression instanceof ContinuousTempoExpression){for(const S of c.AbstractExpressions)S instanceof GraphicalInstantaneousTempoExpression&&(S.SourceExpression.Label,m.Expression.Label);c.AbstractExpressions.push(new GraphicalInstantaneousTempoExpression(m.Expression,b))}}}}createMetronomeMark(e,r){throw new Error(this.abstractNotImplementedErrorMessage)}graphicalMeasureCreatedCalculations(e){}clearSystemsAndMeasures(){for(let e=0,r=this.graphicalMusicSheet.MusicPages.length;e-1&&y.PositionAndShape.ChildElements.splice(b,1),y.FirstInstructionStaffEntry=void 0,y.beginInstructionsWidth=0}if(y.LastInstructionStaffEntry){const b=y.PositionAndShape.ChildElements.indexOf(y.LastInstructionStaffEntry.PositionAndShape);b>-1&&y.PositionAndShape.ChildElements.splice(b,1),y.LastInstructionStaffEntry=void 0,y.endInstructionsWidth=0}}d.Measures=[],d.PositionAndShape.ChildElements=[]}l.StaffLines.length=0,l.PositionAndShape.ChildElements=[]}s.MusicSystems=[],s.PositionAndShape.ChildElements=[]}this.graphicalMusicSheet.MusicPages=[]}handleVoiceEntry(e,r,s,o,a,l,u,c,d,g=void 0,m=void 0){e.StemDirectionXml!==StemDirectionType.Undefined&&this.rules.SetWantedStemDirectionByXml&&e.StemDirectionXml!==void 0?e.WantedStemDirection=e.StemDirectionXml:this.calculateStemDirectionFromVoices(e);const y=r.findOrCreateGraphicalVoiceEntry(e);y.octaveShiftValue=c;const b=r.tabStaffEntry;let S;b&&(S=b.findOrCreateGraphicalVoiceEntry(e));for(let A=0,E=e.Notes.length;A-1)continue;let P;if(e.IsGrace?P=MusicSheetCalculator.symbolFactory.createGraceNote(x,y,a,this.rules,c):(P=MusicSheetCalculator.symbolFactory.createNote(x,y,a,c,this.rules,void 0),MusicSheetCalculator.stafflineNoteCalculator.trackNote(P)),x.Pitch&&this.checkNoteForAccidental(P,s,a,c),this.resetYPositionForLeadSheet(P.PositionAndShape),r.addGraphicalNoteToListAtCorrectYPosition(y,P),P.PositionAndShape.calculateBoundingBox(),this.leadSheet||(x.NoteBeam!==void 0&&x.PrintObject&&(!(x instanceof TabNote)||this.rules.TabBeamsRendered)&&this.handleBeam(P,x.NoteBeam,u),x.NoteTuplet!==void 0&&x.PrintObject&&this.handleTuplet(P,x.NoteTuplet,l)),S){const C=MusicSheetCalculator.symbolFactory.createNote(x,S,a,c,this.rules,void 0);b.addGraphicalNoteToListAtCorrectYPosition(S,C),C.PositionAndShape.calculateBoundingBox(),this.leadSheet||x.NoteTuplet&&this.handleTuplet(C,x.NoteTuplet,l)}}return e.Articulations.length>0&&this.handleVoiceEntryArticulations(e.Articulations,e,r),e.TechnicalInstructions.length>0&&this.handleVoiceEntryTechnicalInstructions(e.TechnicalInstructions,e,r),e.LyricsEntries.size()>0&&this.handleVoiceEntryLyrics(e,r,o),e.OrnamentContainer&&this.handleVoiceEntryOrnaments(e.OrnamentContainer,e,r),c}resetYPositionForLeadSheet(e){this.leadSheet&&(e.RelativePosition=new PointF2D(e.RelativePosition.x,0))}layoutVoiceEntries(e,r){if(e.PositionAndShape.RelativePosition=new PointF2D(0,0),!this.leadSheet)for(const s of e.graphicalVoiceEntries){const o=s.notes;if(o.length===0)continue;const a=o[0].sourceNote.ParentVoiceEntry,l=o[0].sourceNote.Pitch!==void 0;this.layoutVoiceEntry(a,o,e,l)}}maxInstrNameLabelLength(){var r;let e=0;for(const s of this.graphicalMusicSheet.ParentMusicSheet.Instruments)if((r=s.NameLabel)!=null&&r.print&&s.Voices.length>0&&s.Voices[0].Visible){let o=s.NameLabel;this.rules.RenderPartNames||(o=new Label("",o.textAlignment,o.font));const a=new GraphicalLabel(o,this.rules.InstrumentLabelTextHeight,TextAlignmentEnum.LeftCenter,this.rules);a.setLabelPositionAndShapeBorders(),e=Math.max(e,a.PositionAndShape.MarginSize.width)}return this.rules.RenderPartNames?e:0}calculateSheetLabelBoundingBoxes(){var o;const e=this.graphicalMusicSheet.ParentMusicSheet,r=this.rules.DefaultColorTitle;if(e.Title!==void 0&&this.rules.RenderTitle){const a=new GraphicalLabel(e.Title,this.rules.SheetTitleHeight,TextAlignmentEnum.CenterBottom,this.rules);a.Label.IsCreditLabel=!0,a.Label.colorDefault=r,this.graphicalMusicSheet.Title=a,a.setLabelPositionAndShapeBorders()}else this.rules.RenderTitle||(this.graphicalMusicSheet.Title=void 0);if(e.Subtitle!==void 0&&this.rules.RenderSubtitle){const a=new GraphicalLabel(e.Subtitle,this.rules.SheetSubtitleHeight,TextAlignmentEnum.CenterCenter,this.rules);a.Label.IsCreditLabel=!0,a.Label.colorDefault=r,this.graphicalMusicSheet.Subtitle=a,a.setLabelPositionAndShapeBorders()}else this.rules.RenderSubtitle||(this.graphicalMusicSheet.Subtitle=void 0);if(e.Composer!==void 0&&this.rules.RenderComposer){const a=new GraphicalLabel(e.Composer,this.rules.SheetComposerHeight,TextAlignmentEnum.RightCenter,this.rules);a.Label.IsCreditLabel=!0,a.Label.colorDefault=r,this.graphicalMusicSheet.Composer=a,a.setLabelPositionAndShapeBorders()}else this.rules.RenderComposer||(this.graphicalMusicSheet.Composer=void 0);if(e.Lyricist!==void 0&&this.rules.RenderLyricist){const a=new GraphicalLabel(e.Lyricist,this.rules.SheetAuthorHeight,TextAlignmentEnum.RightCenter,this.rules);a.Label.IsCreditLabel=!0,a.Label.colorDefault=r,this.graphicalMusicSheet.Lyricist=a,a.setLabelPositionAndShapeBorders()}else this.rules.RenderLyricist||(this.graphicalMusicSheet.Lyricist=void 0);if(e.Copyright!==void 0&&this.rules.RenderCopyright){const a=new GraphicalLabel(e.Copyright,this.rules.SheetCopyrightHeight,TextAlignmentEnum.CenterBottom,this.rules);a.Label.IsCreditLabel=!0,a.Label.colorDefault=r,this.graphicalMusicSheet.Copyright=a,a.setLabelPositionAndShapeBorders()}else this.rules.RenderCopyright||(this.graphicalMusicSheet.Copyright=void 0);const s=(o=this.graphicalMusicSheet.musicSheet.sourceMeasures)==null?void 0:o[0];if(s&&s.FirstInstructionsStaffEntries.length>0){const a=s.FirstInstructionsStaffEntries[0];let l,u;for(let c=0,d=a.Instructions.length;c0&&g.graphicalVoiceEntries[0].notes.length===1){const m=g.graphicalVoiceEntries[0].notes[0];!m.sourceNote.Pitch&&new Fraction$1(1,2).lt(m.sourceNote.Length)&&this.layoutMeasureWithWholeRest(m,g,d)}}}}}}optimizeRestNotePlacement(e,r){if(e.graphicalVoiceEntries.length===0)return;const s=e.graphicalVoiceEntries[0].notes;if(s.length===0)return;const o=s[0],a=o.sourceNote.isRest();if(e.graphicalVoiceEntries.length===2){let l=!1;const u=e.graphicalVoiceEntries[1].notes;u.length>0&&(l=u[0].sourceNote.isRest()),a&&l?this.calculateTwoRestNotesPlacementWithCollisionDetection(e):(a||l)&&this.calculateRestNotePlacementWithCollisionDetectionFromGraphicalNote(e)}else if(a&&e!==r.staffEntries[0]&&e!==r.staffEntries[r.staffEntries.length-1]){const l=r.staffEntries.indexOf(e),u=r.staffEntries[l-1],c=r.staffEntries[l+1];if(u.graphicalVoiceEntries.length===1){const d=u.graphicalVoiceEntries[0].notes[0];if(d.sourceNote.NoteBeam!==void 0&&c.graphicalVoiceEntries.length===1){const g=c.graphicalVoiceEntries[0].notes[0];g.sourceNote.NoteBeam!==void 0&&d.sourceNote.NoteBeam===g.sourceNote.NoteBeam&&(this.calculateRestNotePlacementWithinGraphicalBeam(e,o,d,c,g),e.PositionAndShape.calculateBoundingBox())}}}}getRelativePositionInStaffLineFromTimestamp(e,r,s,o,a=0,l=!1){let u=new PointF2D,c,d;const g=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,m=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(e),y=Math.min(Math.floor(m),g-1),b=Math.min(Math.ceil(m),g-1);if(y<0||r<0)return u;if(c=this.getFirstLeftNotNullStaffEntryFromContainer(y,r,o),d=this.getFirstRightNotNullStaffEntryFromContainer(b,r,o),c&&d){let S=c.parentMeasure.PositionAndShape.RelativePosition.x;a>0&&(S=a);let A=c.PositionAndShape.RelativePosition.x+S,E=d.PositionAndShape.RelativePosition.x+d.parentMeasure.PositionAndShape.RelativePosition.x;const x=e.RealValue>d.getAbsoluteTimestamp().RealValue;a>0?E=d.PositionAndShape.RelativePosition.x+S:l&&(c.getAbsoluteTimestamp().RealValue===e.RealValue||x)&&(A=c.PositionAndShape.RelativePosition.x+c.PositionAndShape.BorderLeft+S,E=A);let P=0;if(c!==d){const C=c.getAbsoluteTimestamp(),T=d.getAbsoluteTimestamp();P=Fraction$1.minus(e,C).RealValue/Fraction$1.minus(T,C).RealValue}c.parentMeasure.ParentStaffLine!==d.parentMeasure.ParentStaffLine&&(c.parentMeasure.ParentStaffLine===s?E=s.PositionAndShape.Size.width:A=s.PositionAndShape.RelativePosition.x),u=new PointF2D(A+(E-A)*P,0)}return u}getRelativeXPositionFromTimestamp(e){const r=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers.length,s=this.graphicalMusicSheet.GetInterpolatedIndexInVerticalContainers(e),o=Math.max(0,Math.min(Math.round(s),r-1)),a=this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[o].getFirstNonNullStaffEntry();return a.PositionAndShape.RelativePosition.x+a.parentMeasure.PositionAndShape.RelativePosition.x}calculatePageLabels(e){var g,m;this.rules.RenderSingleHorizontalStaffline&&(e.PositionAndShape.BorderRight=e.PositionAndShape.Size.width,e.PositionAndShape.calculateBoundingBox(),this.graphicalMusicSheet.ParentMusicSheet.pageWidth=e.PositionAndShape.Size.width);let r=10,s=-1;if(e.MusicSystems.length>0){const y=e.MusicSystems[0];r=y.PositionAndShape.RelativePosition.y+y.PositionAndShape.BorderTop;const b=e.MusicSystems[e.MusicSystems.length-1];s=b.PositionAndShape.RelativePosition.y+b.PositionAndShape.BorderBottom}if(this.graphicalMusicSheet.Title&&this.rules.RenderTitle){const y=this.graphicalMusicSheet.Title;y.PositionAndShape.Parent=e.PositionAndShape;const b=new PointF2D;b.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,b.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight,y.PositionAndShape.RelativePosition=b,e.Labels.push(y)}if(this.graphicalMusicSheet.Subtitle&&this.rules.RenderTitle&&this.rules.RenderSubtitle){const y=this.graphicalMusicSheet.Subtitle;y.PositionAndShape.Parent=e.PositionAndShape;const b=new PointF2D;b.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth/2,b.y=this.rules.TitleTopDistance+this.rules.SheetTitleHeight+this.rules.SheetMinimumDistanceBetweenTitleAndSubtitle;const S=(g=y.TextLines)==null?void 0:g.length;S>1&&(b.y+=y.PositionAndShape.BorderBottom*(S-1)/S),y.PositionAndShape.RelativePosition=b,e.Labels.push(y)}const o=this.graphicalMusicSheet.Composer;let a;const u=this.graphicalMusicSheet.Composer&&this.rules.RenderComposer&&this.graphicalMusicSheet.Lyricist&&this.rules.RenderLyricist?2:0;if(o&&this.rules.RenderComposer){o.PositionAndShape.Parent=e.PositionAndShape,o.setLabelPositionAndShapeBorders();const y=new PointF2D;y.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth-this.rules.PageRightMargin,y.y=r,y.y-=this.rules.SystemComposerDistance;const b=(m=o.TextLines)==null?void 0:m.length;b>1&&(y.y-=o.PositionAndShape.BorderBottom*(b-1)/b),a=y.y,y.y-=u,o.PositionAndShape.RelativePosition=y,e.Labels.push(o)}const c=this.graphicalMusicSheet.Lyricist;if(c&&this.rules.RenderLyricist){c.PositionAndShape.Parent=e.PositionAndShape,c.setLabelPositionAndShapeBorders();const y=new PointF2D;y.x=this.graphicalMusicSheet.ParentMusicSheet.pageWidth-this.rules.PageRightMargin,y.y=r,y.y-=this.rules.SystemLyricistDistance,y.y+=c.PositionAndShape.BorderBottom,y.y=Math.min(y.y,a!=null?a:Number.MAX_SAFE_INTEGER),y.y+=u,c.PositionAndShape.RelativePosition=y,e.Labels.push(c)}const d=this.graphicalMusicSheet.Copyright;if(d&&this.rules.RenderCopyright){d.PositionAndShape.Parent=e.PositionAndShape,d.setLabelPositionAndShapeBorders();const y=new PointF2D;y.x=e.PositionAndShape.Size.width/2,y.y=s+this.rules.SheetCopyrightMargin,y.y-=d.PositionAndShape.BorderTop,d.PositionAndShape.RelativePosition=y,e.Labels.push(d)}}createGraphicalTies(){for(let e=0;e=0&&this.staffEntriesWithGraphicalTies.push(a)}a=u}}setTieDirections(e){if(!e)return;const r=e.ties;if(r.length===1){const s=r[0];if(s.TieDirection===PlacementEnum.NotYetDefined){const o=s.Notes[0].ParentVoiceEntry.ParentVoice.VoiceId;(o===2||o===6)&&(s.TieDirection=PlacementEnum.Below)}}if(r.length>1){let s;for(const o of r){const a=o.Notes[0];(!s||a.Pitch.getHalfTone()>s.Pitch.getHalfTone())&&(s=a)}for(const o of r)o.TieDirection===PlacementEnum.NotYetDefined&&(o.Notes[0]===s?o.TieDirection=PlacementEnum.Above:o.TieDirection=PlacementEnum.Below)}}createAccidentalCalculators(){const e=[],r=this.graphicalMusicSheet.ParentMusicSheet.getFirstSourceMeasure();if(r)for(let s=0;s1)return;m=MusicSheetCalculator.symbolFactory.createGraphicalMeasure(e,g)}if(m.hasError=e.getErrorInMeasure(c),e.FirstInstructionsStaffEntries[c])for(let x=0,P=e.FirstInstructionsStaffEntries[c].Instructions.length;x0){const B=P.Instructions[0];MusicSheetCalculator.symbolFactory.createInStaffClef(C,B)}this.rules.RenderChordSymbols&&((E=P.ChordContainers)==null?void 0:E.length)>0&&(P.ParentStaff.ParentInstrument.HasChordSymbols=!0,MusicSheetCalculator.symbolFactory.createChordSymbols(P,C,o.ActiveKeyInstruction,this.graphicalMusicSheet.ParentMusicSheet.Transpose))}}if(o.doCalculationsAtEndOfMeasure(),e.LastInstructionsStaffEntries[c]){const x=e.LastInstructionsStaffEntries[c];for(let P=0,C=x.Instructions.length;P=1&&m.staffEntries.length===0){const x=new SourceStaffEntry(new VerticalSourceStaffEntryContainer(m.parentSourceMeasure,m.parentSourceMeasure.AbsoluteTimestamp,m.parentSourceMeasure.CompleteNumberOfStaves),g);if(g.Voices.length===0){const N=new Voice(m.ParentStaff.ParentInstrument,-1);g.Voices.push(N)}const P=new VoiceEntry(new Fraction$1(0,1),g.Voices[0],x);let C=e.Duration;C.RealValue===0&&(C=e.ActiveTimeSignature.clone());const T=new Note$1(P,x,C,void 0,e,!0);T.IsWholeMeasureRest=!0,T.PrintObject=this.rules.FillEmptyMeasuresWithWholeRest===FillEmptyMeasuresWithWholeRests.YesVisible,P.addNote(T);const _=MusicSheetCalculator.symbolFactory.createStaffEntry(x,m);m.addGraphicalStaffEntry(_),_.relInMeasureTimestamp=P.Timestamp;const B=MusicSheetCalculator.symbolFactory.createVoiceEntry(P,_);_.graphicalVoiceEntries.push(B);const M=MusicSheetCalculator.symbolFactory.createNote(T,B,new ClefInstruction,OctaveEnum.NONE,this.rules);MusicSheetCalculator.stafflineNoteCalculator.trackNote(M),B.notes.push(M)}m.hasOnlyRests=!0;for(const x of m.staffEntries)if(m.hasOnlyRests=x.hasOnlyRests(),!m.hasOnlyRests)break;return m}checkNoteForAccidental(e,r,s,o){let a=e.sourceNote.Pitch;const l=e.parentVoiceEntry.parentStaffEntry.parentMeasure.getTransposedHalftones();l!==0&&e.sourceNote.ParentStaffEntry.ParentStaff.ParentInstrument.MidiInstrumentId!==MidiInstrument.Percussion&&(a=e.Transpose(r.ActiveKeyInstruction,s,l,o),e.sourceNote.TransposedPitch=a),e.sourceNote.halfTone=a.getHalfTone(),r.checkAccidental(e,a)}handleStaffEntries(e){for(let r=0,s=this.graphicalMusicSheet.MeasureList.length;r0&&!this.rules.PercussionUseCajon2NoteSystem&&e[a]&&(this.rules.PercussionOneLineCutoff===-1||MusicSheetCalculator.stafflineNoteCalculator.getStafflineUniquePositionCount(a)0&&c.graphicalVoiceEntries[0].notes.length>0&&(this.layoutVoiceEntries(c,a),this.layoutStaffEntry(c));this.graphicalMeasureCreatedCalculations(u)}}}}calculateSkyBottomLines(){for(const e of this.musicSystems)for(const r of e.StaffLines)r.SkyBottomLineCalculator.calculateLines()}calculateExpressionAlignements(){}calculateStaffEntryArticulationMarks(){for(let e=0,r=this.musicSystems.length;e0&&this.layoutArticulationMarks(A.Articulations,A,y)}}}}}}calculateOrnaments(){for(let e=0,r=this.musicSystems.length;e0&&o.LyricVersesNumbers.sort()}for(let r=0,s=this.musicSystems.length;r=0&&(o=r.GraphicalLyricsEntries[s+1]),!o)return;const a=e.StaffEntryParent.parentMeasure.ParentStaffLine,l=o.StaffEntryParent.parentMeasure.ParentStaffLine,u=e.StaffEntryParent,c=o.StaffEntryParent;if(e.StaffEntryParent.parentMeasure.ParentStaffLine===o.StaffEntryParent.parentMeasure.ParentStaffLine){const d=u.parentMeasure.PositionAndShape.RelativePosition.x+u.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight-e.GraphicalLabel.CenteringXShift,g=c.parentMeasure.PositionAndShape.RelativePosition.x+c.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.RelativePosition.x+o.GraphicalLabel.PositionAndShape.BorderMarginLeft,m=e.GraphicalLabel.PositionAndShape.RelativePosition.y;let y=1;g-d>this.rules.MinimumDistanceBetweenDashes*3&&(y=Math.floor((g-d)/this.rules.MinimumDistanceBetweenDashes)-1),y===1?this.calculateSingleDashForLyricWord(a,d,g,m):this.calculateDashes(a,d,g,m)}else{const d=u.parentMeasure.PositionAndShape.RelativePosition.x+u.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,g=a.Measures[a.Measures.length-1],m=g.PositionAndShape.RelativePosition.x+g.PositionAndShape.Size.width;let y=e.GraphicalLabel.PositionAndShape.RelativePosition.y;if(this.calculateDashes(a,d,m,y),l&&l.Measures[0]&&c.parentMeasure.ParentStaffLine&&!(c===c.parentMeasure.staffEntries[0]&&c.parentMeasure===c.parentMeasure.ParentStaffLine.Measures[0])){const b=l.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,S=c.parentMeasure.PositionAndShape.RelativePosition.x+c.PositionAndShape.RelativePosition.x+o.GraphicalLabel.PositionAndShape.BorderMarginLeft;y=o.GraphicalLabel.PositionAndShape.RelativePosition.y,this.calculateDashes(l,b,S,y)}}}calculateDashes(e,r,s,o){let a=s-r;if(ar;)a=this.calculateRightAndLeftDashesForLyricWord(e,r,s,o),r+=u,s-=u,c++;a>u*2&&this.calculateSingleDashForLyricWord(e,r,s,o)}}calculateSingleDashForLyricWord(e,r,s,o){const a=new Label("-");a.colorDefault=this.rules.DefaultColorLyrics;let l=this.rules.LyricsHeight;s-r<.8&&(l*=.8,o-=.1*l);const u=new GraphicalLabel(a,l,TextAlignmentEnum.CenterBottom,this.rules);u.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(u),this.staffLinesWithLyricWords.indexOf(e)===-1&&this.staffLinesWithLyricWords.push(e),u.PositionAndShape.Parent=e.PositionAndShape;const c=new PointF2D(r+(s-r)/2,o);u.PositionAndShape.RelativePosition=c}calculateLyricExtend(e){let r=e.GraphicalLabel.PositionAndShape.RelativePosition.y;const s=e.StaffEntryParent,o=s.parentMeasure.ParentStaffLine;let a,l;const u=s.parentMeasure.ParentStaff.idInMusicSheet;for(let c=s.parentVerticalContainer.Index+1;c0)break;a=d,l=a.parentMeasure.ParentStaffLine,l||(l=s.parentMeasure.ParentStaffLine)}}if(!(!a||!l))if(o===l&&a.parentMeasure.ParentStaffLine){const c=s.parentMeasure.PositionAndShape.RelativePosition.x+s.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,d=a.parentMeasure.PositionAndShape.RelativePosition.x+a.PositionAndShape.RelativePosition.x+a.PositionAndShape.BorderMarginRight;r-=e.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(o,c,d,r)}else{const c=o.Measures[o.Measures.length-1].PositionAndShape,d=s.parentMeasure.PositionAndShape.RelativePosition.x+s.PositionAndShape.RelativePosition.x+e.GraphicalLabel.PositionAndShape.BorderMarginRight,g=c.RelativePosition.x+c.Size.width;if(r-=e.GraphicalLabel.PositionAndShape.Size.height/4,this.calculateSingleLyricWordWithUnderscore(o,d,g,r),!a)return;if(a.parentMeasure.ParentStaffLine&&a.parentMeasure.staffEntries&&!(a===a.parentMeasure.staffEntries[0]&&a.parentMeasure===a.parentMeasure.ParentStaffLine.Measures[0])){const m=l.Measures[0].staffEntries[0].PositionAndShape.RelativePosition.x,y=a.parentMeasure.PositionAndShape.RelativePosition.x+a.PositionAndShape.RelativePosition.x+a.PositionAndShape.BorderMarginRight;this.calculateSingleLyricWordWithUnderscore(l,m,y,r)}}}calculateSingleLyricWordWithUnderscore(e,r,s,o){const a=new PointF2D(r,o),l=new PointF2D(s,o),u=new GraphicalLine(a,l,this.rules.LyricUnderscoreLineWidth);u.colorHex=this.rules.DefaultColorLyrics,e.LyricLines.push(u),this.staffLinesWithLyricWords.indexOf(e)===-1&&this.staffLinesWithLyricWords.push(e)}calculateRightAndLeftDashesForLyricWord(e,r,s,o){const a=new Label("-");a.colorDefault=this.rules.DefaultColorLyrics;const l=new GraphicalLabel(a,this.rules.LyricsHeight,TextAlignmentEnum.CenterBottom,this.rules);l.setLabelPositionAndShapeBorders(),e.LyricsDashes.push(l),this.staffLinesWithLyricWords.indexOf(e)===-1&&this.staffLinesWithLyricWords.push(e),l.PositionAndShape.Parent=e.PositionAndShape;const u=new PointF2D(r,o);l.PositionAndShape.RelativePosition=u;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 g=new PointF2D(s,o);return d.PositionAndShape.RelativePosition=g,d.PositionAndShape.RelativePosition.x-l.PositionAndShape.RelativePosition.x}calculateDynamicExpressions(){const e=Math.min(this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length-1,this.rules.MaxMeasureToDrawIndex),r=Math.min(this.rules.MinMeasureToDrawIndex,this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures.length);for(let s=r;s<=e;s++){const o=this.graphicalMusicSheet.ParentMusicSheet.SourceMeasures[s];this.dynamicExpressionMap.clear();for(let a=0;a=0;o--)if(this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[o].StaffEntries[r])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[o].StaffEntries[r]}getFirstRightNotNullStaffEntryFromContainer(e,r,s){if(this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e].StaffEntries[r])return this.graphicalMusicSheet.VerticalGraphicalStaffEntryContainers[e].StaffEntries[r];for(let o=e+1;o0||r.StaffLinkedExpressions[s][o].UnknownList.length>0)&&this.calculateMoodAndUnknownExpression(r.StaffLinkedExpressions[s][o],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 r=e.Notes[0].NoteBeam;if(r){for(const s of r.Notes)if(s.ParentVoiceEntry.WantedStemDirection!==StemDirectionType.Undefined&&s.ParentVoiceEntry.ParentSourceStaffEntry.ParentStaff.Id===e.ParentSourceStaffEntry.ParentStaff.Id){e.WantedStemDirection=s.ParentVoiceEntry.WantedStemDirection;break}}}}class InstrumentalGroup{constructor(e,r,s){this.instrumentalGroups=[],this.name=e,this.musicSheet=r,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,r,s,o){super(void 0,s,o),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=r,this.nameLabel=new Label(r)}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 r=0,s=this.subInstruments.length;r0?this.Voices[0].Visible:!1}set Visible(e){for(let r=0,s=this.Voices.length;r-1&&this.parent.MusicSystems.splice(r,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,r,s){let o=-e/2;s&&(o=this.maxLabelLength+r-e/2);const a=this.staffLines[0].Measures[0];let l;this.staffLines.length>1&&(l=this.staffLines[this.staffLines.length-1].Measures[0]);const u=this.createSystemLine(o,e,SystemLinesEnum.SingleThin,SystemLinePosition.MeasureBegin,this,a,l);this.SystemLines.push(u),u.PositionAndShape.RelativePosition=new PointF2D(o,0),u.PositionAndShape.BorderLeft=0,u.PositionAndShape.BorderRight=e,u.PositionAndShape.BorderTop=u.PositionAndShape.Parent.BorderTop,u.PositionAndShape.BorderBottom=u.PositionAndShape.Parent.BorderBottom,this.createLinesForSystemLine(u)}createVerticalLineForMeasure(e,r,s,o,a,l){const u=l.ParentStaffLine,c=new PointF2D(u.PositionAndShape.RelativePosition.x,u.PositionAndShape.RelativePosition.y),d=u.ParentStaff.ParentInstrument.Staves;if(u.ParentStaff===d[0]){let g;d.length>1&&(g=this.getBottomStaffLine(u).Measures[a]);const m=this.createSystemLine(e,r,s,o,this,l,g),y=c.x+e;m.PositionAndShape.RelativePosition=new PointF2D(y,0),m.PositionAndShape.BorderLeft=0,m.PositionAndShape.BorderRight=r,this.SystemLines.push(m)}}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 r=0,s=e.length;r1){let l,u;for(let c=0,d=this.staffLines.length;cthis.maxLabelLength&&(this.maxLabelLength=g.PositionAndShape.Size.width,r=a)}this.updateMusicSystemStaffLineXPosition(r)}setMusicSystemLabelsYPosition(){this.labels.forEach((e,r)=>{let s=0,o=0;for(let a=0;a0&&(r.PositionAndShape.RelativePosition=new PointF2D(0,s/o+2))})}checkStaffEntriesForStaffEntryLink(){let e=!1,r=!1;for(let s=0;s=0;s--){if(r=e.InstrumentalGroups[s],r instanceof Instrument){if(r.Visible===!0)return r;continue}return this.findLastVisibleInstrumentInInstrumentalGroup(r)}}updateMusicSystemStaffLineXPosition(e){for(let r=0,s=this.StaffLines.length;r0){const a=(o=window.GYM)==null?void 0:o.multitrack;a&&a>1&&(hideTrackTune=!0)}else hideTrackTune=!1;const s=VexFlowConverter.TimeSignature(e);hideTrackTune||this.stave.addModifier(s,VF$7.StaveModifier.Position.BEGIN,{numerator:e.Rhythm.Numerator,denominator:e.Rhythm.Denominator}),(!this.ShowTimeSignature||this.isTabMeasure&&!this.rules.TabTimeSignatureRendered)&&(s.setStyle({fillStyle:"#00000000"}),s.hidden=!0),this.updateInstructionWidth()}addClefAtEnd(e,r=!0){const s=VexFlowConverter.Clef(e,"small");if(!(!r&&this.stave.endClef)){this.stave.setEndClef(s.type,s.size,s.annotation);for(const o of this.stave.getModifiers())if(r){const a=o.originalStrokeStyle,l=o.originalFillStyle;o.getStyle()&&(a&&l?(o.getStyle().strokeStyle=a,o.getStyle().fillStyle=l):(o.getStyle().strokeStyle=null,o.getStyle().fillStyle=null))}else if(o.getCategory()==="clefs"&&o.getPosition()===VF$7.StaveModifier.Position.END&&o.type===s.type){const a="#12345600",l=o.getStyle();l&&(o.originalStrokeStyle=l.strokeStyle,o.originalFillStyle=l.fillStyle),o.setStyle({strokeStyle:a,fillStyle:a})}return this.parentSourceMeasure.hasEndClef=!0,this.updateInstructionWidth()}}addMeasureLine(e,r,s=!0){switch(r){case SystemLinePosition.MeasureBegin:switch(e){case SystemLinesEnum.BoldThinDots:s||(this.stave.modifiers[0].draw=function(o){switch(o.checkContext(),this.setRendered(),this.type){case VF$7.Barline.type.SINGLE:this.drawVerticalBar(o,this.x,!1);break;case VF$7.Barline.type.DOUBLE:this.drawVerticalBar(o,this.x,!0);break;case VF$7.Barline.type.END:this.drawVerticalEndBar(o,this.x);break;case VF$7.Barline.type.REPEAT_BEGIN:this.drawRepeatBar(o,this.x,!0);break;case VF$7.Barline.type.REPEAT_END:this.drawRepeatBar(o,this.x,!1);break;case VF$7.Barline.type.REPEAT_BOTH:this.drawRepeatBar(o,this.x,!1),this.drawRepeatBar(o,this.x,!0);break}}),this.stave.setBegBarType(VF$7.Barline.type.REPEAT_BEGIN);break}break;case SystemLinePosition.MeasureEnd:switch(e){case SystemLinesEnum.DotsBoldBoldDots:this.stave.setEndBarType(VF$7.Barline.type.REPEAT_BOTH);break;case SystemLinesEnum.DotsThinBold:this.stave.setEndBarType(VF$7.Barline.type.REPEAT_END);break;case SystemLinesEnum.DoubleThin:this.stave.setEndBarType(VF$7.Barline.type.DOUBLE);break;case SystemLinesEnum.ThinBold:this.stave.setEndBarType(VF$7.Barline.type.END);break;case SystemLinesEnum.None:this.stave.setEndBarType(VF$7.Barline.type.NONE);break}break}}addMeasureNumber(){const e=this.MeasureNumber.toString(),r=3;this.stave.setText(e,r,{justification:1,shift_x:0,shift_y:0})}addWordRepetition(e){let r,s=VF$7.StaveModifier.Position.END;const o=this.beginInstructionsWidth;switch(e.type){case RepetitionInstructionEnum.Segno:r=VF$7.Repetition.type.SEGNO_LEFT,s=VF$7.StaveModifier.Position.LEFT;break;case RepetitionInstructionEnum.Coda:r=VF$7.Repetition.type.CODA_LEFT,s=VF$7.StaveModifier.Position.LEFT;break;case RepetitionInstructionEnum.DaCapo:r=VF$7.Repetition.type.DC;break;case RepetitionInstructionEnum.DalSegno:r=VF$7.Repetition.type.DS;break;case RepetitionInstructionEnum.Fine:r=VF$7.Repetition.type.FINE;break;case RepetitionInstructionEnum.ToCoda:r=VF$7.Repetition.type.TO_CODA;break;case RepetitionInstructionEnum.DaCapoAlFine:r=VF$7.Repetition.type.DC_AL_FINE;break;case RepetitionInstructionEnum.DaCapoAlCoda:r=VF$7.Repetition.type.DC_AL_CODA;break;case RepetitionInstructionEnum.DalSegnoAlFine:r=VF$7.Repetition.type.DS_AL_FINE;break;case RepetitionInstructionEnum.DalSegnoAlCoda:r=VF$7.Repetition.type.DS_AL_CODA;break}if(r){if(this.stave.getModifiers().find(c=>c.symbol_type===r))return;const u=new VF$7.Repetition(r,o,-this.rules.RepetitionSymbolsYOffset);u.xShiftAsPercentOfStaveWidth=this.rules.RepetitionEndInstructionXShiftAsPercentOfStaveWidth,this.stave.addModifier(u,s);return}this.addVolta(e)}addVolta(e){var s;let r=VF$7.Volta.type.BEGIN;if(e.type===RepetitionInstructionEnum.Ending){switch(e.alignment){case AlignmentType.Begin:this.parentSourceMeasure.endsRepetitionEnding()?r=VF$7.Volta.type.BEGIN_END:r=VF$7.Volta.type.BEGIN;break;case AlignmentType.End:if(this.parentSourceMeasure.beginsRepetitionEnding())return;r=VF$7.Volta.type.END;break}const o=this.ParentStaffLine.SkyBottomLineCalculator,a=this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginLeft+.4,l=Math.max(this.PositionAndShape.AbsolutePosition.x+this.PositionAndShape.BorderMarginRight,a+.4),u=o.getSkyLineMinInRange(a,l)-2;let c=-6.1+this.rules.VoltaOffset,d=this.rules.VoltaOffset;if(u0){loglevelExports.trace(`Ghost Found in between (measure ${this.MeasureNumber})`);const m=this.createGhostGves(g);s.splice(l,0,...m),l+=m.length}}else{const g=Fraction$1.minus(c,this.parentSourceMeasure.AbsoluteTimestamp);if(g.RealValue>0){loglevelExports.trace(`Ghost Found at start (measure ${this.MeasureNumber})`);const m=this.createGhostGves(g);s.splice(0,0,...m),l+=m.length}}r=d}const o=Fraction$1.plus(this.parentSourceMeasure.AbsoluteTimestamp,this.parentSourceMeasure.Duration),a=Fraction$1.minus(o,r);if(a.RealValue>0){loglevelExports.trace(`Ghost Found at end (measure ${this.MeasureNumber})`);const l=this.createGhostGves(a);s=s.concat(l)}return s}createGhostGves(e){const r=VexFlowConverter.GhostNotes(e),s=[];for(const o of r){const a=new VexFlowVoiceEntry(void 0,void 0,this.rules);a.vfStaveNote=o,s.push(a)}return s}handleBeam(e,r){const s=e.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;let o=this.beams[s];o||(o=this.beams[s]=[]);let a;for(const u of o)u[0]===r&&(a=u);a||(a=[r,[]],o.push(a));const l=e.parentVoiceEntry;a[1].indexOf(l)<0&&a[1].push(l)}handleTuplet(e,r){const s=e.sourceNote.ParentVoiceEntry.ParentVoice.VoiceId;r=e.sourceNote.NoteTuplet;let o=this.tuplets[s];o||(o=this.tuplets[s]=[]);let a;for(const u of o)u[0]===r&&(a=u);a||(a=[r,[]],o.push(a));const l=e.parentVoiceEntry;a[1].indexOf(l)<0&&a[1].push(l)}finalizeBeams(){if(this.vfbeams={},this.isTabMeasure&&!this.rules.TabBeamsRendered)return;const e=[];for(const r in this.beams)if(this.beams.hasOwnProperty(r)){let s=this.vfbeams[r];s||(s=this.vfbeams[r]=[]);for(const o of this.beams[r]){let a=!1;for(const b of o[0].Notes)if(b.Length.RealValue>=new Fraction$1(1,4).RealValue&&(!b.TypeLength||b.TypeLength.RealValue>.125)){a=!0;break}if(a){loglevelExports.debug("Beam between note >= quarter, likely tremolo, currently unsupported. continuing.");continue}const l=[],u=o[0],c=o[1];let d=!0;for(const b of c)b.parentVoiceEntry.ParentVoice===u.Notes[0].ParentVoiceEntry.ParentVoice&&(d=b.parentVoiceEntry.WantedStemDirection===StemDirectionType.Undefined);let g=!1,m;const y=[];for(const b of c){const S=b.vfStaveNote;S&&(l.push(S),e.push(S)),b.parentVoiceEntry.IsGrace&&(g=!0),b.parentVoiceEntry.StemColor&&this.rules.ColoringEnabled&&y.push(b.parentVoiceEntry.StemColor)}if(l.length>1){const b=new VF$7.Beam(l,d);if(g&&(b.render_options.beam_width=3,b.render_options.partial_beam_length=4),y.length>=2&&this.rules.ColorBeams){m=y[0];for(const S of y)if(S!==m){m=void 0;break}b.setStyle({fillStyle:m,strokeStyle:m})}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 r=60,s=[],o=[],a,l=[];this.autoTupletVfBeams=[];const u=[];this.autoVfBeams=[];let c=this.parentSourceMeasure.ActiveTimeSignature;c||(c=this.parentSourceMeasure.Duration);for(const m of this.staffEntries)for(const y of m.graphicalVoiceEntries){const b=y.vfStaveNote,S=y.notes[0],A={vfStaveNote:b,sourceNote:S.sourceNote},E=m.relInMeasureTimestamp.isOnBeat(c),x=o.length>=2,P=S.sourceNote.Length.RealValue-new Fraction$1(1,4).RealValue>-Fraction$1.FloatInaccuracyTolerance,C=y.parentVoiceEntry.IsGrace||P||e.contains(b);if(C||E){if(x){for(const _ of o)s.push(_);u.push(s.slice()),s=[]}if(o=[],C)continue}const T=y.notes[0].sourceNote.NoteTuplet;if(T){let _=!1;for(const B of T.Notes){for(const M of B)if(M.NoteTypeXml>=NoteType.QUARTER||M.ParentVoiceEntry.IsGrace||M.isRest()&&!this.rules.AutoBeamOptions.beam_rests){_=!0;break}if(_)break}if(!a)a=T;else if(a!==T){if(l.length>1){const B=[];for(const I of l)B.push(I.vfStaveNote);const M=new VF$7.Beam(B,!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);const N=new Beam(r++);N.AutoGenerated=!0;for(const I of l)N.addNoteToBeam(I.sourceNote)}l=[],a=T}_||l.push(A);continue}else a=void 0;o.push(A)}if(l.length>=2){const m=[];for(const S of l)m.push(S.vfStaveNote);const y=new VF$7.Beam(m,!0);this.rules.FlatBeams&&(y.render_options.flat_beams=!0,y.render_options.flat_beam_offset=this.rules.FlatBeamOffset,y.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoTupletVfBeams.push(y);const b=new Beam(r++);b.AutoGenerated=!0;for(const S of l)b.addNoteToBeam(S.sourceNote)}if(o.length>=2){for(const m of o)s.push(m);u.push(s)}const d=this.rules.AutoBeamOptions,g={beam_middle_only:d.beam_middle_rests_only,beam_rests:d.beam_rests,maintain_stem_directions:d.maintain_stem_directions};if(d.groups&&d.groups.length){const m=[];for(const y of d.groups)m.push(new VF$7.Fraction(y[0],y[1]));g.groups=m}for(const m of u){const y=[];for(const S of m)y.push(S.vfStaveNote);const b=VF$7.Beam.generateBeams(y,g);for(const S of b)this.rules.FlatBeams&&(S.render_options.flat_beams=!0,S.render_options.flat_beam_offset=this.rules.FlatBeamOffset,S.render_options.flat_beam_offset_per_beam=this.rules.FlatBeamOffsetPerBeam),this.autoVfBeams.push(S)}}finalizeTuplets(){this.vftuplets={};for(const e in this.tuplets)if(this.tuplets.hasOwnProperty(e)){let r=this.vftuplets[e];r||(r=this.vftuplets[e]=[]);for(const s of this.tuplets[e]){const o=[],a=s[1];for(const l of a)o.push(l.vfStaveNote);if(o.length>1){const l=s[0],u=l.Notes[0][0].NormalNotes,c=l.shouldBeBracketed(this.rules.TupletsBracketedUseXMLValue,this.rules.TupletsBracketed,this.rules.TripletsBracketed,this.isTabMeasure,this.rules.TabTupletsBracketed);let d=VF$7.Tuplet.LOCATION_TOP;l.tupletLabelNumberPlacement===PlacementEnum.Below&&(d=VF$7.Tuplet.LOCATION_BOTTOM);let g=0;if(this.isTabMeasure&&(g=this.rules.TabTupletYOffsetBottom*10,d===VF$7.Tuplet.LOCATION_TOP)){g=this.rules.TabTupletYOffsetTop*-10;const y=l.Notes[0][0];y!=null&&y.hasTabEffects()&&(g-=this.rules.TabTupletYOffsetEffects*10)}const m=new VF$7.Tuplet(o,{bracketed:c,location:d,notes_occupied:u,num_notes:l.TupletLabelNumber,ratioed:this.rules.TupletsRatioed,y_offset:g});r.push(m)}else loglevelExports.debug("Warning! Tuplet with no notes! Trying to ignore, but this is a serious problem.")}}}layoutStaffEntry(e){}graphicalMeasureCreatedCalculations(){let e,r=[];const s=[];for(const a of this.staffEntries){e=!1,r=[];for(const l of a.graphicalVoiceEntries){if(l.parentVoiceEntry.IsGrace){r.push(l),s.push(l),e||(e=l.parentVoiceEntry.GraceSlur);continue}if(l.vfStaveNote=VexFlowConverter.StaveNote(l),r.length>0){const u=[];for(let d=0;d0&&(g.GraceSlash=!1);const m=VexFlowConverter.StaveNote(g);g.vfStaveNote=m,u.push(m)}const c=new VF$7.GraceNoteGroup(u,e);c.spacing=this.rules.GraceNoteGroupXMargin*10,l.vfStaveNote.addModifier(0,c),r=[]}}}if(r.length>0)for(const a of r)a.vfStaveNote=VexFlowConverter.StaveNote(a),a.parentVoiceEntry.GraceAfterMainNote=!0;this.finalizeBeams(),this.finalizeTuplets();const o=this.getVoicesWithinMeasure();if(this.rules.RenderFingerings)for(const a of this.staffEntries)a.setModifierXOffsets();for(const a of o){if(!a)continue;this.vfVoices[a.VoiceId]=new VF$7.Voice({beat_value:this.parentSourceMeasure.ActiveTimeSignature.Denominator,num_beats:this.parentSourceMeasure.ActiveTimeSignature.Numerator,resolution:VF$7.RESOLUTION}).setMode(VF$7.Voice.Mode.SOFT);const l=this.getRestFilledVexFlowStaveNotesPerVoice(a);for(const u of l){if(u.parentVoiceEntry&&u.parentVoiceEntry.IsGrace&&!u.parentVoiceEntry.GraceAfterMainNote)continue;const c=u;if(c.vfStaveNote.getTicks().denominator===0&&(c.vfStaveNote.getTicks().denominator=1),u.notes.length===0||!u.notes[0]||!u.notes[0].sourceNote.PrintObject){this.vfVoices[a.VoiceId].addTickable(c.vfStaveNote);continue}const d=c.parentStaffEntry;if(d&&d.vfClefBefore){const g=new NoteSubGroup([d.vfClefBefore]);c.vfStaveNote.getCategory&&c.vfStaveNote.getCategory()==="stavenotes"&&c.vfStaveNote.addModifier(0,g)}u.parentVoiceEntry&&this.rules.RenderFingerings&&((this.rules.FingeringPosition===PlacementEnum.Left||this.rules.FingeringPosition===PlacementEnum.Right)&&this.createFingerings(u),this.createStringNumber(u)),this.createArpeggio(u),this.vfVoices[a.VoiceId].addTickable(c.vfStaveNote)}}this.setStemDirectionFromVexFlow();for(const a of s)this.createFingerings(a),this.createStringNumber(a),this.createArpeggio(a);this.createArticulations(),this.createOrnaments()}createArpeggio(e){if(e.parentVoiceEntry&&e.parentVoiceEntry.Arpeggio){const r=e.parentVoiceEntry.Arpeggio;if(e.notes&&e.notes.length>1){const s=VexFlowConverter.StrokeTypeFromArpeggioType(r.type),o=new VF$7.Stroke(s,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&e.vfStaveNote.addStroke(0,o)}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 r of e.graphicalVoiceEntries)for(const s of r.notes){const o=s.vfnote;if(!o||!o[0])continue;switch(o[0].getStemDirection()){case VF$7.Stem.UP:r.parentVoiceEntry.StemDirection=StemDirectionType.Up;break;case VF$7.Stem.DOWN:r.parentVoiceEntry.StemDirection=StemDirectionType.Down;break}}}createArticulations(){for(let e=0,r=this.staffEntries.length;es){for(const l of e.notes)if(!l.sourceNote.Fingering&&(l.sourceNote.Fingering=o.pop(),s++,o.length===0))break}let a=-1;for(const l of e.notes){const u=l.sourceNote.Fingering;if(!u){a++;continue}a++;let c=this.rules.FingeringPosition;this.rules.FingeringPositionGrace===PlacementEnum.AboveOrBelow&&(this.isUpperStaffOfInstrument()?c=PlacementEnum.Above:this.isLowerStaffOfInstrument()&&(c=PlacementEnum.Below)),u.placement!==PlacementEnum.NotYetDefined&&(c=u.placement);let d=this.rules.FingeringOffsetX,g;switch(c){default:case PlacementEnum.Left:g=VF$7.StaveModifier.Position.LEFT,d-=l.baseFingeringXOffset*unitInPixels;break;case PlacementEnum.Right:g=VF$7.StaveModifier.Position.RIGHT,d+=l.baseFingeringXOffset*unitInPixels;break;case PlacementEnum.Above:g=VF$7.StaveModifier.Position.ABOVE;break;case PlacementEnum.Below:g=VF$7.StaveModifier.Position.BELOW;break;case PlacementEnum.NotYetDefined:const y=e.parentStaffEntry.sourceStaffEntry.ParentStaff;e.notes.length>1||e.parentStaffEntry.graphicalVoiceEntries.length>1?g=VF$7.StaveModifier.Position.LEFT:y.idInMusicSheet===0?(g=VF$7.StaveModifier.Position.ABOVE,c=PlacementEnum.Above):(g=VF$7.StaveModifier.Position.BELOW,c=PlacementEnum.Below)}const m=new VF$7.FretHandFinger(u.value);if(m.setPosition(g),m.setOffsetX(d),c===PlacementEnum.Above||c===PlacementEnum.Below){const y=c===PlacementEnum.Above?-1:1,b=c===PlacementEnum.Above?a:s-1-a;if(this.rules.FingeringInsideStafflines&&s>1){const S=m.getWidth()/2,A=s*2.5;m.setOffsetY(y*(b+A)*S)}else if(!this.rules.FingeringInsideStafflines){const S=new VF$7.StringNumber(u.value);S.radius=0,S.setPosition(g),S.setOffsetY(y*b*S.getWidth()*2/3),r.vfStaveNote.addModifier(a,S);continue}}r.vfStaveNote.addModifier(a,m)}}createStringNumber(e){if(!this.rules.RenderStringNumbersClassical)return;const r=e;e.notes.forEach((s,o)=>{const a=s.sourceNote.StringInstruction;if(a){let l=a.value;switch(l){case"1":l="I";break;case"2":l="II";break;case"3":l="III";break;case"4":l="IV";break;case"5":l="V";break;case"6":l="VI";break}const u=new VF$7.StringNumber(l);u.radius=0;const c=-this.rules.StringNumberOffsetY;e.notes.length>1||e.parentStaffEntry.graphicalVoiceEntries.length>1?(u.setOffsetX(s.baseStringNumberXOffset*13),u.setPosition(VF$7.Modifier.Position.RIGHT)):u.setPosition(VF$7.Modifier.Position.ABOVE),u.setOffsetY(c),r.vfStaveNote.addModifier(o,u)}})}lineTo(e,r){const s=new VF$7.StaveConnector(e.getVFStave(),this.stave);s.setType(r),this.connectors.push(s)}getVFStave(){return this.stave}updateInstructionWidth(){let e=0,r=0;const s=this.stave.getModifiers();for(const o of s)o.getPosition()===5?e+=o.getWidth()+o.getPadding(void 0):o.getPosition()===6&&(r+=o.getWidth()+o.getPadding(void 0));this.beginInstructionsWidth=(e!=null?e:0)/unitInPixels,this.endInstructionsWidth=(r!=null?r:0)/unitInPixels}addStaveTie(e,r){this.vfTies.push(e),r.vfTie=e,r.Tie.TieDirection===PlacementEnum.Below&&e.setDirection(1)}}class GraphicalStaffEntry extends GraphicalObject{constructor(e,r=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=r,s?(this.staffEntryParent=s,this.parentVerticalContainer=s.parentVerticalContainer,this.PositionAndShape=new BoundingBox$1(this,s.PositionAndShape)):this.PositionAndShape=new BoundingBox$1(this,e.PositionAndShape),r&&(this.relInMeasureTimestamp=r.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 r=((s=window.GYM)==null?void 0:s.graceCustom)||!1;for(const o of this.graphicalVoiceEntries)for(const a of o.notes){const l=a.sourceNote;if(r){if(e.NoteToGraphicalNoteObjectId==l.NoteToGraphicalNoteObjectId)return a}else if(!l.isRest()&&l.Pitch.FundamentalNote===e.Pitch.FundamentalNote&&l.Pitch.Octave===e.Pitch.Octave&&l.getAbsoluteTimestamp().Equals(e.getAbsoluteTimestamp()))return a}}findEndTieGraphicalNoteFromNoteWithStartingSlur(e,r){if(e){for(const s of this.graphicalVoiceEntries)if(s.parentVoiceEntry===e.ParentVoiceEntry)for(const o of s.notes){const a=o.sourceNote;if(a.NoteTie&&a.NoteSlurs.indexOf(r)!==-1)return o}}}findGraphicalNoteFromGraceNote(e){if(e){for(const r of this.graphicalVoiceEntries)if(r.parentVoiceEntry===e.ParentVoiceEntry){for(const s of r.notes)if(s.sourceNote===e)return s}}}findGraphicalNoteFromNote(e){if(e){for(const r of this.graphicalVoiceEntries)if(r.parentVoiceEntry===e.ParentVoiceEntry){for(const s of r.notes)if(s.sourceNote===e&&this.getAbsoluteTimestamp().Equals(e.getAbsoluteTimestamp()))return s}}}getGraphicalNoteDurationFromVoice(e){for(const r of this.graphicalVoiceEntries)if(r.parentVoiceEntry.ParentVoice===e)return r.notes[0].graphicalNoteLength;return new Fraction$1(0,1)}findVoiceEntryGraphicalNotes(e){for(const r of this.graphicalVoiceEntries)if(r.parentVoiceEntry===e)return r.notes}isVoiceEntryPartOfLinkedVoiceEntry(e){if(this.sourceStaffEntry.Link)for(let r=0,s=this.sourceStaffEntry.Link.LinkStaffEntries.length;r0&&(e=o)}return e}findStaffEntryMaxNoteLength(){let e=new Fraction$1(0,1);for(const r of this.graphicalVoiceEntries)for(const s of r.notes){const o=s.graphicalNoteLength;e.lt(o)&&o.GetExpandedNumerator()>0&&(e=o)}return e}findOrCreateGraphicalVoiceEntry(e){for(const s of this.graphicalVoiceEntries)if(s.parentVoiceEntry===e)return s;const r=MusicSheetCalculator.symbolFactory.createVoiceEntry(e,this);return this.graphicalVoiceEntries.push(r),r}findOrCreateGraphicalVoiceEntryFromGraphicalNote(e){for(const s of this.graphicalVoiceEntries)if(s===e.parentVoiceEntry)return s;const r=MusicSheetCalculator.symbolFactory.createVoiceEntry(e.sourceNote.ParentVoiceEntry,this);return this.graphicalVoiceEntries.push(r),r}addGraphicalNoteToListAtCorrectYPosition(e,r){const s=e.notes;if(s.length===0||r.PositionAndShape.RelativePosition.y=0;o--){if(s[o].PositionAndShape.RelativePosition.y>r.PositionAndShape.RelativePosition.y){s.splice(o+1,0,r);break}if(o===0){s.splice(0,0,r);break}}}hasOnlyRests(){return this.sourceStaffEntry.hasOnlyRests}getSkylineMin(){var o;const e=(o=this.parentMeasure)==null?void 0:o.ParentStaffLine.SkyBottomLineCalculator;if(!e)return;const[r,s]=this.getAbsoluteStartAndEnd();return e.getSkyLineMinInRange(r,s)}getHighestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getSkylineMin()}getLowestYAtEntry(){return this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.y+this.getBottomlineMax()}getBottomlineMax(){var o;const e=(o=this.parentMeasure)==null?void 0:o.ParentStaffLine.SkyBottomLineCalculator;if(!e)return;const[r,s]=this.getAbsoluteStartAndEnd();return e.getBottomLineMaxInRange(r,s)}getAbsoluteStartAndEnd(){let e=this.PositionAndShape.AbsolutePosition.x;e-=this.parentMeasure.ParentStaffLine.PositionAndShape.AbsolutePosition.x;const r=e+this.PositionAndShape.Size.width;return[e,r]}}class VexFlowStaffEntry extends GraphicalStaffEntry{constructor(e,r,s){super(e,r,s)}calculateXPosition(){const e=this.parentMeasure.getVFStave();let r=0;for(const s of this.graphicalVoiceEntries)if(s.vfStaveNote){if(s.vfStaveNote.setStave(e),!s.vfStaveNote.preFormatted)continue;s.applyBordersFromVexflow();let o=!1,a=this.PositionAndShape;s.notes[0].sourceNote.isWholeRest()&&!this.hasOnlyRests()&&(o=!0,a=s.PositionAndShape),this.parentMeasure.ParentStaff.isTab?a.RelativePosition.x=(s.vfStaveNote.getAbsoluteX()+s.vfStaveNote.glyph.getWidth())/unitInPixels:(a.RelativePosition.x=s.vfStaveNote.getBoundingBox().getX()/unitInPixels,o&&(a.RelativePosition.x-=e.getNoteStartX()/unitInPixels,a.RelativePosition.x-=1.3));const l=s.notes[0].sourceNote;l.isRest()&&l.Length.RealValue===this.parentMeasure.parentSourceMeasure.ActiveTimeSignature.RealValue&&(a.RelativePosition.x+=this.parentMeasure.parentSourceMeasure.Rules.WholeRestXShiftVexflow-.1,s.PositionAndShape.BorderLeft=-.7,s.PositionAndShape.BorderRight=.7),s.PositionAndShape.BorderLefta.staffLine),s=this.calculateModifierXOffsets(r,1),o=this.calculateModifierXOffsets(r,.5);e.forEach((a,l)=>{a.baseFingeringXOffset=o[l],a.baseStringNumberXOffset=s[l]})}calculateModifierXOffsets(e,r){const s=[];for(let o=0;o=0;u--){if(Math.abs(e[o]-e[u])<=r&&a===s[u]){a++,l=!0;break}l=!1}s.push(a)}return s}}class VexFlowGraphicalNote extends GraphicalNote{constructor(e,r,s,o=OctaveEnum.NONE,a,l=void 0){if(super(e,r,a,l),this.clef=s,this.octaveShift=o,e.Pitch){const u=e.isRest()?e.Pitch:OctaveShift.getPitchFromOctaveShift(e.Pitch,o);this.vfpitch=VexFlowConverter.pitch(u,e.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0}}setAccidental(e){const r=this.drawPitch(e);this.vfpitch=VexFlowConverter.pitch(r,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.DrawnAccidental=r.Accidental}drawPitch(e){return OctaveShift.getPitchFromOctaveShift(e,this.octaveShift)}Transpose(e,r,s,o){const a=super.Transpose(e,r,s,o),l=OctaveShift.getPitchFromOctaveShift(a,this.octaveShift);return this.vfpitch=VexFlowConverter.pitch(l,this.sourceNote.isRest(),this.clef,this.sourceNote.Notehead),this.vfpitch[1]=void 0,l}setIndex(e,r){this.vfnote=[e,r],this.vfnoteIndex=r}notehead(e=void 0){let r=e;r||(r=this.vfnote[0]);const s=r.note_heads;return s&&s.length>this.vfnoteIndex&&s[this.vfnoteIndex]?r.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 r=0;;r++){const s=document.getElementById(`vf-${this.getSVGId()}-beam${r}`);if(!s)break;e.push(s)}return e}}class GraphicalChordSymbolContainer extends GraphicalObject{constructor(e,r,s,o,a,l){super(),this.chordSymbolContainer=e,this.boundingBox=new BoundingBox$1(this,r),this.rules=l,this.calculateLabel(s,a,o)}get GetChordSymbolContainer(){return this.chordSymbolContainer}get GraphicalLabel(){return this.graphicalLabel}calculateLabel(e,r,s){const o=ChordSymbolContainer.calculateChordText(this.chordSymbolContainer,r,s);this.graphicalLabel=new GraphicalLabel(new Label(o),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$6=Vex.Flow;class VexFlowTabMeasure extends VexFlowMeasure{constructor(e,r=void 0,s=void 0){super(e,r,s),this.isTabMeasure=!0}resetLayout(){var r;const e=(r=this.ParentStaff.StafflineCount)!=null?r:6;this.stave=new VF$6.TabStave(0,0,0,{space_above_staff_ln:0,space_below_staff_ln:0,num_lines:e}),this.updateInstructionWidth()}graphicalMeasureCreatedCalculations(){for(let r=0,s=this.staffEntries.length;r1){const u=VexFlowConverter.StrokeTypeFromArpeggioType(l.type),c=new VF$6.Stroke(u,{all_voices:this.rules.ArpeggiosGoAcrossVoices});this.rules.RenderArpeggios&&a.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.`)}if(a.vfGhostNotes)for(const l of a.vfGhostNotes)this.vfVoices[r.VoiceId].addTickable(l);else this.vfVoices[r.VoiceId].addTickable(a.vfStaveNote)}}}}class StaffLineActivitySymbol extends GraphicalObject{constructor(e){super(),this.parentStaffLine=e;const r=e.PositionAndShape;this.boundingBox=new BoundingBox$1(this,r),this.boundingBox.BorderRight=6,this.boundingBox.BorderBottom=4.5,this.boundingBox.BorderLeft=-1.5,this.boundingBox.BorderTop=-1.5}}class StaffLine extends GraphicalObject{constructor(e,r){super(),this.measures=[],this.staffLines=new Array(5),this.octaveShifts=[],this.lyricLines=[],this.lyricsDashes=[],this.abstractExpressions=[],this.graphicalSlurs=[],this.graphicalGlissandi=[],this.Pedals=[],this.WavyLines=[],this.parentMusicSystem=e,this.parentStaff=r,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}get GraphicalGlissandi(){return this.graphicalGlissandi}addSlurToStaffline(e){this.graphicalSlurs.push(e)}addGlissandoToStaffline(e){this.graphicalGlissandi.push(e),e.StaffLine=this}addActivitySymbolClickArea(){const e=new StaffLineActivitySymbol(this),r=this.PositionAndShape;e.PositionAndShape.RelativePosition=new PointF2D(r.RelativePosition.x+r.BorderRight+.5,r.RelativePosition.y+.5),e.PositionAndShape.Parent=this.parentMusicSystem.PositionAndShape}isPartOfMultiStaffInstrument(){return this.parentStaff.ParentInstrument.Staves.length>1}findClosestStaffEntry(e){let r;for(let s=0,o=this.Measures.length;s0){const c=u.map(y=>y.PositionAndShape.Center.y),d=Math.max(...c),g=((a=window.GYM)==null?void 0:a.noNeedContinuousDynamic)||!1,m=((l=window.GYM)==null?void 0:l.noNeedGraphicalContinuousDynamic)||!1;for(let y=0;y0?u[y-1]:void 0;if(A){const x=this.getOverlap(b.PositionAndShape,A.PositionAndShape);b.squeeze(-(x.x+this.rules.DynamicExpressionSpacer))}if(E){const x=this.getOverlap(E.PositionAndShape,b.PositionAndShape);b.squeeze(x.x+this.rules.DynamicExpressionSpacer)}}}}}getDistance(e,r){const s=e.RelativePosition.x+e.BorderMarginRight,o=r.RelativePosition.x+r.BorderMarginLeft,a=e.RelativePosition.y+e.BorderMarginBottom,l=r.RelativePosition.y+r.BorderMarginTop;return new PointF2D(o-s,l-a)}getOverlap(e,r){return new PointF2D(e.RelativePosition.x+e.BorderMarginRight-(r.RelativePosition.x+r.BorderMarginLeft),e.RelativePosition.y+e.BorderMarginBottom-(r.RelativePosition.y+r.BorderMarginTop))}}class VexFlowStaffLine extends StaffLine{constructor(e,r){super(e,r),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$5=Vex.Flow;class VexFlowMultiRestMeasure extends VexFlowMeasure{constructor(e,r=void 0,s=void 0){super(e,r,s),this.minimumStaffEntriesWidth=-1,s?this.rules=s.ParentMusicSystem.rules:r&&(this.rules=r.Rules),this.resetLayout(),this.multiRestElement=new VF$5.MultiMeasureRest(r.multipleRestMeasures,{})}draw(e){var a,l,u,c,d;const r=e.openGroup();(a=r==null?void 0:r.classList)==null||a.add("vf-measure");const s=e.openGroup();(l=s==null?void 0:s.classList)==null||l.add("vf-stave"),s==null||s.setAttribute("id",(c=(u=this.stave)==null?void 0:u.attrs)==null?void 0:c.id),this.stave.setContext(e).draw(),e.closeGroup();const o=e.openGroup();(d=o==null?void 0:o.classList)==null||d.add("vf-voices"),this.multiRestElement.setStave(this.stave),this.multiRestElement.setContext(e),this.multiRestElement.draw(),e.closeGroup();for(const g of this.connectors)g.setContext(e).draw();return e.closeGroup(),r}format(){}getVoicesWithinMeasure(){return[]}getGraphicalVoiceEntriesPerVoice(e){return[]}getRestFilledVexFlowStaveNotesPerVoice(e){return[]}handleBeam(e,r){}handleTuplet(e,r){}finalizeBeams(){}finalizeTuplets(){}layoutStaffEntry(e){}graphicalMeasureCreatedCalculations(){}createArticulations(){}createOrnaments(){}createFingerings(e){}getVFStave(){return this.stave}}class SkyBottomLineCalculationResult{constructor(e,r){this.skyLine=e,this.bottomLine=r}}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("osmdCanvasPage"+this.graphicalMusicPage.PageNumber))==null?void 0:e.offsetHeight}initialize(e,r){this.zoom=r,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="osmdCanvasPage"+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,r=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=r,this.renderer=new VF$4.Renderer(this.canvas,this.getVexflowBackendType()),this.ctx=this.renderer.getContext()}getContext(){return this.ctx}free(){this.canvas&&(this.canvas.width=0,this.canvas.height=0,this.canvas.remove(),delete this.canvas,this.canvas=null)}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.rules.PageBackgroundColor&&(this.ctx.save(),this.ctx.setFillStyle(this.rules.PageBackgroundColor),this.zoom=1,this.ctx.fillRect(0,0,this.canvas.width/this.zoom,this.canvas.height/this.zoom),this.ctx.restore())}scale(e){this.ctx.scale(e,e)}translate(e,r){this.CanvasRenderingCtx.translate(e,r)}renderText(e,r,s,o,a,l,u=void 0,c=void 0){const d=this.CanvasRenderingCtx.font;this.CanvasRenderingCtx.save(),this.CanvasRenderingCtx.font=VexFlowConverter.font(e,r,s,this.rules,c),this.CanvasRenderingCtx.fillStyle=u,this.CanvasRenderingCtx.strokeStyle=u,this.CanvasRenderingCtx.fillText(o,l.x,l.y+a),this.CanvasRenderingCtx.restore(),this.CanvasRenderingCtx.font=d}renderRectangle(e,r,s,o=1){const a=this.CanvasRenderingCtx.fillStyle;s?this.CanvasRenderingCtx.fillStyle=s:this.CanvasRenderingCtx.fillStyle=VexFlowConverter.style(r),this.CanvasRenderingCtx.globalAlpha=o,this.ctx.fillRect(e.x,e.y,e.width,e.height),this.CanvasRenderingCtx.fillStyle=a,this.CanvasRenderingCtx.globalAlpha=1}renderLine(e,r,s="#FF0000FF",o=2,a){const l=this.CanvasRenderingCtx.strokeStyle;this.CanvasRenderingCtx.strokeStyle=s,this.CanvasRenderingCtx.beginPath(),this.CanvasRenderingCtx.moveTo(e.x,e.y),this.CanvasRenderingCtx.lineTo(r.x,r.y),this.CanvasRenderingCtx.stroke(),this.CanvasRenderingCtx.strokeStyle=l}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()}renderPath(e,r=!0,s){this.ctx.beginPath();let o;for(const a of e){if(!o){this.ctx.moveTo(a.x,a.y),o=a;continue}this.ctx.lineTo(a.x,a.y)}this.ctx.closePath(),r?this.ctx.fill():this.ctx.stroke()}get CanvasRenderingCtx(){return this.ctx.vexFlowCanvasContext}}class SkyBottomLineCalculator{constructor(e){this.mStaffLineParent=e,this.mRules=e.ParentMusicSystem.rules}updateLines(e){const r=this.StaffLineParent.Measures;if(e.length!==r.length)if(loglevelExports.warn("SkyBottomLineCalculator: lengths of calculation result array and measure array do not match"),e.length(d-u)/unitInPixels+this.StaffLineParent.TopLineOffset);const c=Math.min(...this.mBottomLine);this.mBottomLine=this.mBottomLine.map(d=>(d-c)/unitInPixels+this.StaffLineParent.BottomLineOffset)}calculateLines(){const e=Math.max(Math.ceil(this.StaffLineParent.PositionAndShape.Size.width*this.SamplingUnit),1);this.mSkyLine=[],this.mBottomLine=[];const r=new CanvasVexFlowBackend(this.StaffLineParent.ParentMusicSystem.rules);for(const l of this.StaffLineParent.Measures){l.PositionAndShape.calculateAbsolutePositionsRecursive(0,0);const u=l.getVFStave();let c=u.getWidth();if(!(c>0)&&!l.IsExtraGraphicalMeasure&&(loglevelExports.warn("SkyBottomLineCalculator: width not > 0 in measure "+l.MeasureNumber),c=50),!(c>=50)&&l.IsExtraGraphicalMeasure)continue;r.initializeHeadless(c);const d=r.getContext(),g=r.getCanvas();c=g.width;const m=g.height;this.mRules.DYMusicScoreType==="jianpu"||u.setY(u.y+100);const y=u.getWidth();u.setWidth(c),l.format(),u.setWidth(y);try{l.draw(d)}catch(P){loglevelExports.warn("SkyBottomLineCalculator.calculateLines.draw",P)}const b=d.getImageData(0,0,c,m),S=4,A=Math.max(Math.ceil(l.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),E=new Array(A),x=new Array(A);for(let P=0;P0){E[P]=C;break}}for(let C=m;C>0;C--){const _=C*c*S+P*S;if(b.data[_+3]>0){x[P]=C;break}}}for(let P=0;P(l-Math.max(...this.mSkyLine))/unitInPixels+this.StaffLineParent.TopLineOffset),this.mBottomLine=this.mBottomLine.map(l=>(l-Math.min(...this.mBottomLine))/unitInPixels+this.StaffLineParent.BottomLineOffset)}updateSkyLineWithLine(e,r,s){const o=Math.floor(e.x*this.SamplingUnit),a=Math.ceil(r.x*this.SamplingUnit);for(let l=o+1;l=this.BottomLine.length&&(s=this.BottomLine.length-1),o<0&&(o=0),o>=this.BottomLine.length&&(o=this.BottomLine.length),this.SkyLine[s]=e.y;for(let l=s+1;l=this.BottomLine.length&&(s=this.BottomLine.length-1),o<0&&(o=0),o>=this.BottomLine.length&&(o=this.BottomLine.length),this.BottomLine[s]=e.y;for(let l=s+1;le)}setBottomLineWithValue(e){this.BottomLine.forEach(r=>e)}getLeftIndexForPointX(e,r){const s=Math.floor(e*this.SamplingUnit);return s<0?0:s>=r?r-1:s}getRightIndexForPointX(e,r){const s=Math.ceil(e*this.SamplingUnit);return s<0?0:s>=r?r-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 r=Math.round(e*this.SamplingUnit);return this.mSkyLine[r]}getSkyLineMinInRange(e,r){return this.getMinInRange(this.SkyLine,e,r)}getBottomLineMax(){return Math.max(...this.BottomLine.filter(e=>!isNaN(e)))}getBottomLineMaxAtPoint(e){const r=Math.round(e*this.SamplingUnit);return this.mBottomLine[r]}getBottomLineMaxInRange(e,r){return this.getMaxInRange(this.BottomLine,e,r)}getBottomLineMaxInBoundingBox(e){const r=Math.floor(e.AbsolutePosition.x+e.BorderLeft),s=Math.ceil(e.AbsolutePosition.x+e.BorderRight);return this.getMaxInRange(this.mBottomLine,r,s)}updateWithBoundingBoxRecursively(e){if(e.ChildElements&&e.ChildElements.length>0)for(const r of e.ChildElements)this.updateWithBoundingBoxRecursively(r);else{const r=e.BorderTop+e.AbsolutePosition.y,s=e.BorderBottom+e.AbsolutePosition.y;if(r<0){const o=Math.floor(e.AbsolutePosition.x+e.BorderLeft),a=Math.ceil(e.AbsolutePosition.x+e.BorderRight);this.updateInRange(this.mSkyLine,o,a,r)}else if(s>this.StaffLineParent.StaffHeight){const o=Math.floor(e.AbsolutePosition.x+e.BorderLeft),a=Math.ceil(e.AbsolutePosition.x+e.BorderRight);this.updateInRange(this.mBottomLine,o,a,s)}}}findPreviousValidNumber(e,r){for(let s=e;s>=0;s--)if(!isNaN(r[s]))return r[s];return 0}findNextValidNumber(e,r){if(e>=r.length)return r[e-1];for(let s=e;se.length&&(s=e.length);for(let a=r;aMath.abs(e[a])?o:e[a]}setInRange(e,r=0,s=e.length,o=0){if(r=Math.floor(r*this.SamplingUnit),s=Math.ceil(s*this.SamplingUnit),se.length&&(s=e.length);for(let a=r;a=e.length&&(r=e.length-1),s<0&&(s=0),s>=e.length&&(s=e.length),r>=0&&s<=e.length)return Math.min(...e.slice(r,s+1))}getMaxInRange(e,r,s){if(r=Math.floor(r*this.SamplingUnit),s=Math.ceil(s*this.SamplingUnit),!e)return Number.MIN_VALUE;if(r<0&&(r=0),r>=e.length&&(r=e.length-1),s<0&&(s=0),s>=e.length&&(s=e.length),r>=0&&s<=e.length)return Math.max(...e.slice(r,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(r,s){i.exports=s()})(commonjsGlobal,function(){return function(s){for(var o={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(A){return+b("number",A)},"coordinate pair":function(A){var E=b("number",A);if(E===null&&!A)return null;b("comma");var x=b("number",!0);return{x:+E,y:+x}},"arc definition":function(A){var E=a["coordinate pair"](A);if(!E&&!A)return null;b("comma");var x=+b("number",!0);b("comma",!0);var P=!!+b("flag",!0);b("comma");var C=!!+b("flag",!0);b("comma");var T=a["coordinate pair"](!0);return{radii:E,rotation:x,large:P,clockwise:C,end:T}}},l=0,u=[];lr.bottom)switch(e.tagName.toLowerCase()){case"g":for(const y of e.children)this.recursiveUpdate(y,r,s,o);break;case"circle":case"rect":case"line":case"path":let g=Math.floor((a.x-s.x)/unitInPixels*this.mRules.SamplingUnit);const m=g+Math.ceil(a.width/unitInPixels*this.mRules.SamplingUnit);if(e.parentElement.classList.contains("vf-beams")&&e.hasAttribute("d")){const y=parserExports$1(e.getAttribute("d"));if(y.length===5){const b=y[0],S=y[3],A=(S.end.y-b.end.y)/(S.end.x-b.end.x);let E=b.end.y/unitInPixels;for(g;g<=m;g++)Ed[g]&&(d[g]=E),E+=A/this.mRules.SamplingUnit}}else for(g;g<=m;g++)ld[g]&&(d[g]=u);break}}calculateLinesForMeasure(e,r){var B,M,N;const s=r.getBBox(),o=Math.max(Math.round(e.PositionAndShape.Size.width*this.mRules.SamplingUnit),1),a=s.height/unitInPixels,u=r.getElementsByClassName("vf-stave")[0].getBBox();let c=(u==null?void 0:u.height)/unitInPixels,d=(u==null?void 0:u.y)/unitInPixels;const g=e.getVFStave();let m=((B=g.options)!=null&&B.num_lines?g.options.num_lines:5)-1,y=-1,b=0;const S=[m];for(const I of(M=g.options)==null?void 0:M.line_config)I.visible?(y===-1&&(y=b),S.push(b)):m--,b++;const A=S.pop();y===-1&&(y=0),m=A-y;const E=(N=g.options)==null?void 0:N.spacing_between_lines_px,x=m*E/unitInPixels;c-x>.2&&(c=x,d=y*E/unitInPixels);const P=d+c,C=new Array(o).fill(d),T=new Array(o).fill(P),_=[C,T];if(a>c)for(const I of r.children)this.recursiveUpdate(I,{top:d,bottom:P},s,[C,T]);return _}calculateLines(){this.mSkyLine=[],this.mBottomLine=[];const e=document.createElement("div");document.body.append(e);const r=new SvgVexFlowBackend(this.mRules);r.initialize(e,1,"0");const s=r.getContext(),o=s.openGroup();o.classList.add("staffline");for(const a of this.StaffLineParent.Measures){a.PositionAndShape.calculateAbsolutePositionsRecursive(0,0),a.setAbsoluteCoordinates(a.PositionAndShape.AbsolutePosition.x*unitInPixels,a.PositionAndShape.AbsolutePosition.y*unitInPixels);const l=a.draw(s),[u,c]=this.calculateLinesForMeasure(a,l);this.mSkyLine.push(...u),this.mBottomLine.push(...c)}s.closeGroup();for(const a of o.getElementsByClassName("vf-ties"))for(const l of a.childNodes)if(l.nodeName.toLowerCase()==="path"){const u=l.getBBox();let c=Math.floor(u.x/unitInPixels*this.mRules.SamplingUnit);const d=c+Math.ceil(u.width/unitInPixels*this.mRules.SamplingUnit),g=u.y/unitInPixels,m=u.height/unitInPixels+g;for(c;c<=d;c++)gthis.mBottomLine[c]&&(this.mBottomLine[c]=m)}r.clear(),e.remove()}}const VF$3=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,r){return new VexFlowMusicSystem(e,r)}createStaffLine(e,r){return new VexFlowStaffLine(e,r)}createSkyBottomLineCalculator(e){return e.ParentMusicSystem.rules.PerformanceMode&&this.hasBBox?new SkyBottomLineCalculatorSVG(e):new SkyBottomLineCalculator(e)}createGraphicalMeasure(e,r,s=!1){return new VexFlowMeasure(r,e,void 0)}createMultiRestMeasure(e,r,s){return new VexFlowMultiRestMeasure(r,e,s)}createTabStaffMeasure(e,r){return new VexFlowTabMeasure(r,e)}createExtraGraphicalMeasure(e){const r=new VexFlowMeasure(e.ParentStaff,void 0,e);return r.IsExtraGraphicalMeasure=!0,r.ExtraGraphicalMeasurePreviousMeasure=e.Measures.last(),r}createStaffEntry(e,r){return new VexFlowStaffEntry(r,e,void 0)}createVoiceEntry(e,r){return new VexFlowVoiceEntry(e,r)}createNote(e,r,s,o=OctaveEnum.NONE,a,l=void 0){return new VexFlowGraphicalNote(e,r,s,o,a,l)}createGraceNote(e,r,s,o,a=OctaveEnum.NONE){return new VexFlowGraphicalNote(e,r,s,a,o)}addGraphicalAccidental(e,r){e.setAccidental(r)}addFermataAtTiedEndNote(e,r){}createInStaffClef(e,r){const s=e,o=VexFlowConverter.Clef(r,"small");s.vfClefBefore=new VF$3.ClefNote(o.type,o.size,o.annotation)}createChordSymbols(e,r,s,o){const a=r.parentMeasure.parentSourceMeasure.Rules;let l=0;const u=a.ChordSymbolXSpacing;for(const c of e.ChordContainers){let d=r.PositionAndShape;r.graphicalVoiceEntries.length===1&&r.graphicalVoiceEntries[0].notes.length===1&&r.graphicalVoiceEntries[0].notes[0].sourceNote.isWholeRest()&&(d=r.parentMeasure.PositionAndShape,l+=r.parentMeasure.beginInstructionsWidth,l+=a.ChordSymbolWholeMeasureRestXOffset);const g=new GraphicalChordSymbolContainer(c,d,a.ChordSymbolTextHeight,s,o,r.parentMeasure.parentSourceMeasure.Rules),m=g.GraphicalLabel;m.PositionAndShape.RelativePosition.y-=a.ChordSymbolYOffset,m.setLabelPositionAndShapeBorders();let y=0;m.PositionAndShape.Size.width=4&&e.Parent.Notes[0].Length.Denominator>4&&TextAlignmentEnum.LeftBottom;const l=new Label(e.Text);l.isLyricText=!0,l.lyricExtendNoteId=(d=(c=e==null?void 0:e.Parent)==null?void 0:c.Notes[0])==null?void 0:d.NoteToGraphicalNoteObjectId;const u=this.graphicalStaffEntry.parentMeasure.parentSourceMeasure.Rules;this.graphicalLabel=new GraphicalLabel(l,s,a,u,r.PositionAndShape),this.graphicalLabel.Label.colorDefault=u.DefaultColorLyrics,this.graphicalLabel.PositionAndShape.RelativePosition=new PointF2D(0,o),this.graphicalLabel.setLabelPositionAndShapeBorders(),this.graphicalLabel.PositionAndShape.Size.width1&&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 VF$1=Vex.Flow,_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 r=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 r.RealValue>s.RealValue?1:s.RealValue>r.RealValue?-1:0}calculateCurve(i){const e=this.staffEntries[0],r=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 o=r.findGraphicalNoteFromNote(this.slur.EndNote);!o&&this.graceEnd&&(o=r.findGraphicalNoteFromGraceNote(this.slur.EndNote));const a=e.parentMeasure.ParentStaffLine,l=a.SkyBottomLineCalculator;this.calculatePlacement(l,a);const u=this.calculateStartAndEnd(s,o,a,i,l),c=u.startX,d=u.endX;let g=u.startY,m=u.endY;const y=i.SlurTangentMinAngle,b=i.SlurTangentMaxAngle;let S;if(this.placement===PlacementEnum.Above){g-=i.SlurNoteHeadYOffset,m-=i.SlurNoteHeadYOffset;const A=new PointF2D(this.staffEntries[0].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[0].PositionAndShape.RelativePosition.x,g);s?A.x+=this.staffEntries[0].PositionAndShape.BorderRight:A.x=this.staffEntries[0].parentMeasure.beginInstructionsWidth,this.graceStart&&(A.x+=r.PositionAndShape.RelativePosition.x);const E=new PointF2D(this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].PositionAndShape.RelativePosition.x,m);if(o?E.x+=this.staffEntries[this.staffEntries.length-1].PositionAndShape.BorderLeft:E.x=this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.RelativePosition.x+this.staffEntries[this.staffEntries.length-1].parentMeasure.PositionAndShape.Size.width,this.graceEnd&&(E.x+=r.staffEntryParent.PositionAndShape.RelativePosition.x),S=this.calculateTopPoints(A,E,a,l),S.length===0){const Q=new PointF2D((E.x-A.x)/2+A.x,(E.y-A.y)/2+A.y);S.push(Q)}const x=Math.atan((m-g)/(d-c)),P=new PointF2D(0,0);let C=new PointF2D(d-c,-(m-g));const T=Matrix2D.getRotationMatrix(x),_=T.getTransposeMatrix();C=T.vectorMultiplication(C);const B=this.calculateTranslatedAndRotatedPointListAbove(S,c,g,T),M=this.calculateMaxLeftSlope(B,P,C),N=this.calculateMaxRightSlope(B,P,C),I=P.y-P.x*M,R=C.y-C.x*N,F=new PointF2D;let k=!1;Math.abs(Math.abs(M)-Math.abs(N))<1e-4?(F.x=C.x/2,F.y=0,k=!0):(F.x=(R-I)/(M-N),F.y=M*F.x+I);const V=this.calculateHeightWidthRatio(C.x,B),D=0,$=0;let O=y,q=-y;if(!k){const Q=this.calculateAngles(y,M,N,b);O=Q.startAngle,q=Q.endAngle}const G=this.calculateControlPoints(C.x,O,q,B,V,g,m);let U=G.startControlPoint,Z=G.endControlPoint;U=_.vectorMultiplication(U),U.x+=c,U.y=-U.y+g,Z=_.vectorMultiplication(Z),Z.x+=c,Z.y=-Z.y+g,this.bezierStartPt=new PointF2D(c,g-D),this.bezierStartControlPt=new PointF2D(U.x,U.y-D),this.bezierEndControlPt=new PointF2D(Z.x,Z.y-$),this.bezierEndPt=new PointF2D(d,m-$);const W=a.SkyLine.length,K=l.getLeftIndexForPointX(this.bezierStartPt.x,W),ye=l.getLeftIndexForPointX(this.bezierEndPt.x,W),ae=this.bezierEndPt.x-this.bezierStartPt.x,Y=l.SamplingUnit;for(let Q=K;Q=K&&(a.SkyLine[Se]=Math.min(a.SkyLine[Se],ge.y)),Se++,Se=K&&(a.BottomLine[Se]=Math.max(a.BottomLine[Se],ge.y)),Se++,Se0){this.placement=PlacementEnum.Above;return}const r=this.staffEntries[0],s=this.staffEntries[this.staffEntries.length-1],o=r.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection,a=s.graphicalVoiceEntries[0].parentVoiceEntry.StemDirection;if(o===a)this.placement=o===StemDirectionType.Up?PlacementEnum.Below:PlacementEnum.Above,this.rules.SlurPlacementAtStems&&(this.placement=o===StemDirectionType.Up?PlacementEnum.Above:PlacementEnum.Below);else{let l=r.PositionAndShape.BorderLeft+r.PositionAndShape.RelativePosition.x+r.parentMeasure.PositionAndShape.RelativePosition.x,u=s.PositionAndShape.BorderRight+s.PositionAndShape.RelativePosition.x+s.parentMeasure.PositionAndShape.RelativePosition.x;this.graceStart&&(l+=s.PositionAndShape.RelativePosition.x),this.graceEnd&&(u+=s.staffEntryParent.PositionAndShape.RelativePosition.x);const c=i.getSkyLineMinInRange(l,u)*-1;i.getBottomLineMaxInRange(l,u)-e.StaffHeight>c?this.placement=PlacementEnum.Above:this.placement=PlacementEnum.Below}}calculateTopPoints(i,e,r,s){const o=[];let a=s.getRightIndexForPointX(i.x,r.SkyLine.length),l=s.getLeftIndexForPointX(e.x,r.SkyLine.length);a<0&&(a=0),l>=r.SkyLine.length&&(l=r.SkyLine.length-1);for(let u=a;u=r.BottomLine.length&&(l=r.BottomLine.length-1);for(let u=a;ud&&i>g&&(c+=i/70*this.rules.SlurHeightFlattenLongSlursFactorByWidth,c*=1+e/30*this.rules.SlurHeightFlattenLongSlursFactorByAngle,u/=c);const m=Math.min(.5,Math.max(.1,1.7*e/80*u*Math.pow(Math.max(o,.05),.4))),y=Math.min(.5,Math.max(.1,1.7*-r/80*u*Math.pow(Math.max(o,.05),.4))),b=new PointF2D;b.x=i*m*Math.cos(e*_GraphicalSlur.degreesToRadiansFactor),b.y=i*m*Math.sin(e*_GraphicalSlur.degreesToRadiansFactor);const S=new PointF2D;S.x=i-i*y*Math.cos(r*_GraphicalSlur.degreesToRadiansFactor),S.y=-(i*y*Math.sin(r*_GraphicalSlur.degreesToRadiansFactor));let A=b.y-S.y;for(;this.rules.SlurMaximumYControlPointDistance&&Math.abs(A)>this.rules.SlurMaximumYControlPointDistance;)A<0?(b.y+=1,S.y-=1):(b.y-=1,S.y+=1),A=b.y-S.y;return{startControlPoint:b,endControlPoint:S}}calculateAngles(i,e,r,s){let a=Math.atan(e)/_GraphicalSlur.degreesToRadiansFactor;e>0?a+=20:a-=20;let l=Math.atan(r)/_GraphicalSlur.degreesToRadiansFactor;r<0?l-=20:l+=20;const u=Math.min(Math.max(i,a),s),c=Math.max(Math.min(-i,l),-s);return{startAngle:u,endAngle:c}}};let GraphicalSlur=_GraphicalSlur;GraphicalSlur.degreesToRadiansFactor=Math.PI/180;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 r=e.parentVoiceEntry.parentStaffEntry.sourceStaffEntry.ParentStaff.idInMusicSheet;let s;this.staffPitchListMapping.containsKey(r)||this.staffPitchListMapping.setValue(r,new Array),s=this.staffPitchListMapping.getValue(r);const o=e.sourceNote.Pitch;VexflowStafflineNoteCalculator.findOrInsert(s,o)}static PitchIndexOf(e,r,s=0){if(s>e.length-1)return-1;for(let o=s;othis.rules.PercussionOneLineCutoff&&!o&&!this.rules.PercussionUseCajon2NoteSystem)return e;const a=e,l=e.sourceNote.Pitch;let u=this.baseLineNote,c=this.baseLineOctave;if(this.rules.PercussionUseCajon2NoteSystem?l.FundamentalNote===NoteEnum.C&&(u=NoteEnum.G,c=1):this.rules.PercussionUseXMLDisplayStep&&e.sourceNote.displayStepUnpitched!==void 0&&(u=e.sourceNote.displayStepUnpitched,c=e.sourceNote.displayOctaveUnpitched+this.rules.PercussionOneLineXMLDisplayStepOctaveOffset),s.length<=this.rules.PercussionForceVoicesOneLineCutoff)a.setAccidental(new Pitch(u,c,l.Accidental));else{const d=VexflowStafflineNoteCalculator.PitchIndexOf(s,l);if(d>-1){const g=Math.ceil(s.length/2);if(!this.rules.PercussionUseXMLDisplayStep)if(d>=g)switch(c=2,(d-g)%5){case 1:u=NoteEnum.E;break;case 2:u=NoteEnum.G;break;case 3:u=NoteEnum.B;break;case 4:u=NoteEnum.D,c=3;break;default:u=NoteEnum.C;break}else switch(d%5){case 1:u=NoteEnum.F;break;case 2:u=NoteEnum.D;break;case 3:u=NoteEnum.B,c=0;break;case 4:u=NoteEnum.G,c=0;break;default:u=NoteEnum.A;break}const m=new Pitch(u,c,l.Accidental);a.setAccidental(m);const y=a.parentVoiceEntry.parentVoiceEntry;!this.rules.SetWantedStemDirectionByXml&&y.Notes.length<2&&(m.Octave>this.baseLineOctave||m.FundamentalNote===this.baseLineNote&&m.Octave===this.baseLineOctave?a.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=StemDirectionType.Up:a.parentVoiceEntry.parentVoiceEntry.WantedStemDirection=StemDirectionType.Down)}}return a}getStafflineUniquePositionCount(e){return this.staffPitchListMapping.containsKey(e)?this.staffPitchListMapping.getValue(e).length:0}}class GraphicalPedal extends GraphicalObject{constructor(e,r){super(),this.getPedal=e,this.setSymbol(),this.PositionAndShape=new BoundingBox$1(this,r)}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,r,s=!1,o=!1){switch(super(e,r),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,r);break;case MusicSymbol.PEDAL_MIXED:s&&o?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:s?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:o?this.vfStyle=Vex.Flow.PedalMarking.Styles.MIXED_OPEN_END:this.vfStyle=Vex.Flow.PedalMarking.Styles.MIXED;break;case MusicSymbol.PEDAL_BRACKET:default:s&&o?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BOTH:s?this.vfStyle=Vex.Flow.PedalMarking.Styles.BRACKET_OPEN_BEGIN:o?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 r of e.graphicalVoiceEntries){const s=r;if(s!=null&&s.vfStaveNote)return this.startNote=s.vfStaveNote,this.startVfVoiceEntry=s,!0}return!1}setEndNote(e){if(!e)return!1;for(const r of e.graphicalVoiceEntries){const s=r;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(){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),(!this.endVfVoiceEntry||this.getPedal.EndsStave)&&(e.EndsStave=!0),this.getPedal.BeginsStave&&(e.BeginsStave=!0),e.ChangeBegin=this.ChangeBegin,e.ChangeEnd=this.ChangeEnd,e}setEndsStave(e,r){r!=null&&r.gte(e.parentSourceMeasure.Duration)&&(this.getPedal.EndsStave=!0)}setBeginsStave(e,r){e&&r.RealValue===0&&(this.getPedal.BeginsStave=!0)}}class GraphicalGlissando{constructor(e){this.Glissando=e,this.staffEntries=[]}calculateLine(e){const r=this.staffEntries[0],s=this.staffEntries[this.staffEntries.length-1],o=r.findGraphicalNoteFromNote(this.Glissando.StartNote),a=s.findGraphicalNoteFromNote(this.Glissando.EndNote);if(!o&&!a)return;const l=r.parentMeasure.ParentStaffLine;let u,c,d,g;if(o&&r.parentMeasure.ParentStaffLine===this.StaffLine)u=o.PositionAndShape.RelativePosition.x+o.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x+o.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x+e.GlissandoNoteOffset,d=o.PositionAndShape.AbsolutePosition.y;else{u=s.parentMeasure.beginInstructionsWidth-.4;const b=this.Glissando.Direction===ColDirEnum.Down?-1:1;d=a.PositionAndShape.AbsolutePosition.y+b*e.GlissandoStafflineStartYDistanceToNote}if(a&&s.parentMeasure.ParentStaffLine===this.StaffLine)c=a.PositionAndShape.RelativePosition.x+a.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x+a.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x-.5-e.GlissandoNoteOffset,u>c&&(u=c-e.GlissandoStafflineStartMinimumWidth),g=a.PositionAndShape.AbsolutePosition.y;else{if(l.Measures.last().parentSourceMeasure.HasEndLine)return;c=l.PositionAndShape.Size.width,c-u>e.GlissandoStafflineEndOffset&&(u=c-e.GlissandoStafflineEndOffset);const b=this.Glissando.Direction===ColDirEnum.Down?1:-1;g=o.PositionAndShape.AbsolutePosition.y+b*e.GlissandoStafflineStartYDistanceToNote}const m=new PointF2D(u,d),y=new PointF2D(c,g);this.Width===void 0&&(this.Width=e.GlissandoDefaultWidth),this.Line=new GraphicalLine(m,y,this.Width)}}class VexFlowGlissando extends GraphicalGlissando{}class GraphicalWavyLine extends GraphicalObject{constructor(e,r){super(),this.getWavyLine=e,this.PositionAndShape=new BoundingBox$1(this,r)}}class VexflowVibratoBracket extends GraphicalWavyLine{constructor(e,r,s=!1){super(e,r),this.line=1,this.isVibrato=!1,this.toEndOfStopStave=!1,this.isVibrato=s}get ToEndOfStopStave(){return this.toEndOfStopStave}setStartNote(e){for(const r of e.graphicalVoiceEntries){const s=r;if(s!=null&&s.vfStaveNote)return this.startNote=s.vfStaveNote,this.startVfVoiceEntry=s,!0}return!1}setEndNote(e){for(const r of e.graphicalVoiceEntries){const s=r;if(s!=null&&s.vfStaveNote){this.endNote=s.vfStaveNote,this.endVfVoiceEntry=s;const o=this.endVfVoiceEntry.parentStaffEntry.parentMeasure.staffEntries,a=o[o.length-1];return this.toEndOfStopStave=a===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 r,s,o,a,l,u,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),((r=this.rules.DefaultVexFlowNoteFont)==null?void 0:r.toLowerCase())==="gonville"?Vex.Flow.DEFAULT_FONT_STACK=[(s=Vex.Flow.Fonts)==null?void 0:s.Gonville,(o=Vex.Flow.Fonts)==null?void 0:o.Bravura,(a=Vex.Flow.Fonts)==null?void 0:a.Custom]:((l=this.rules.DefaultVexFlowNoteFont)==null?void 0:l.toLowerCase())==="petaluma"&&(Vex.Flow.DEFAULT_FONT_STACK=[(u=Vex.Flow.Fonts)==null?void 0:u.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 r of e)r==null||r.clean()}formatMeasures(){for(const e of this.graphicalMusicSheet.MeasureList){if(!e||!e[0])continue;e.find(s=>s==null?void 0:s.isVisible()).format();for(const s of e){for(const o of s.staffEntries)o.calculateXPosition();s.finalizeBeams()}}this.beamsNeedUpdate=!1}calculateMeasureXLayout(e){const r=[];for(const g of e)g!=null&&g.isVisible()&&r.push(g);if(r.length===0)return 0;e=r;const s=[],o=new VF.Formatter({softmaxFactor:this.rules.SoftmaxFactorVexFlow});let a=e[0].staffEntries.length,l=1;for(const g of e){if(!g)continue;let m=0;for(const S of g.staffEntries)m+=S.setMaxAccidentals();g.parentSourceMeasure.ImplicitMeasure&&(a=Math.max(g.staffEntries.length,a),l=Math.max(g.staffEntries.length+m,l));const y=g.vfVoices,b=[];for(const S in y)if(y.hasOwnProperty(S)){const A=y[S];g.hasOnlyRests&&!A.ticksUsed.equals(A.totalTicks)&&(A.ticksUsed=A.totalTicks),b.push(A),s.push(A)}if(b.length===0){loglevelExports.debug("Found a measure with no voices. Continuing anyway.",y);continue}o.joinVoices(b)}let u=12;const c=e[0].parentSourceMeasure,d=.3;if(s.length>0){if(u=o.preCalculateMinTotalWidth(s)/unitInPixels*this.rules.VoiceSpacingMultiplierVexflow+this.rules.VoiceSpacingAddendVexflow+a*d,c!=null&&c.ImplicitMeasure){u=c.Duration.RealValue/c.ActiveTimeSignature.RealValue*u;let y=0;const b=c.measureListIndex;if(b>1)for(const S of this.graphicalMusicSheet.MeasureList[b-1]){const A=S==null?void 0:S.parentSourceMeasure.endingBarStyleEnum;if(A===SystemLinesEnum.ThinBold||A===SystemLinesEnum.DotsThinBold){y=this.rules.PickupMeasureRepetitionSpacing;break}}u+=y,a>1?u+=l*d*1.5:b>1&&a===1&&(u+=this.rules.PickupMeasureSpacingSingleNoteAddend),u*=this.rules.PickupMeasureWidthMultiplier}MusicSheetCalculator.setMeasuresMinStaffEntriesWidth(e,u);const g=(y,b)=>{o.formatToStave(s,b.getVFStave())},m=(y,b)=>{o.formatToStave(s,b.getVFStave(),{align_rests:!0,context:void 0})};for(const y of e){if(this.rules.AlignRests===AlignRestOption.Never)y.formatVoices=g;else if(this.rules.AlignRests===AlignRestOption.Always)y.formatVoices=m;else if(this.rules.AlignRests===AlignRestOption.Auto){let b=!1;for(const S of y.staffEntries){let A=0,E=0;for(const x of S.graphicalVoiceEntries)if(x.parentVoiceEntry.IsGrace||x&&x.notes&&x.notes[0]&&x.notes[0].sourceNote&&x.notes[0].sourceNote.PrintObject&&A++,x&&x.notes&&x.notes[0]&&x.notes[0].sourceNote&&x.notes[0].sourceNote.isRest()&&x.notes[0].sourceNote.PrintObject&&E++,A>1&&E>=1){b=!0;break}if(b)break}b?y.formatVoices=m:y.formatVoices=g}if(y===e[0]){const b=y;b.formatVoices(u*unitInPixels,b)}}}for(const g of e)if(g)for(const m of g.staffEntries)m.calculateXPosition();for(const g of e){if(!g)continue;const m=g.vfVoices,y=[];for(const b in m)m.hasOwnProperty(b)&&y.push(m[b]);if(y.length===0){loglevelExports.debug("Found a measure with no voices. Continuing anyway.",m);continue}o.joinVoices(y)}return u}calculateElongationFactor(e,r,s,o,a,l,u,c){let d=a,g=0;for(const m of e){const y=m.GraphicalLabel.Label.textAlignment;let b=u,S=c;if(m instanceof GraphicalLyricEntry&&m.ParentLyricWord){m.LyricsEntry.SyllableIndex>0&&(b=this.rules.BetweenSyllableMinimumDistance,TextAlignment.IsCenterAligned(y)&&(b+=1));const V=m.ParentLyricWord.GetLyricWord.Syllables;V.length>1&&m.LyricsEntry.SyllableIndex4&&(F*=1.1)}}else s[g]&&(F=T/_);I=Math.max(R,F),d=Math.max(d,I);let k=Math.max(T-_||0,0);s[g]&&(k+=s[g].cumulativeOverlap),s[g]={cumulativeOverlap:k,extend:m instanceof GraphicalLyricEntry?m.LyricsEntry.extend:!1,labelWidth:E,measureNumber:l,sourceNoteDuration:m instanceof GraphicalLyricEntry?m.LyricsEntry&&m.LyricsEntry.Parent.Notes[0].Length:!1,text:m instanceof GraphicalLyricEntry?m.LyricsEntry.Text:m.GraphicalLabel.Label.text,xPosition:C},g++}return d}calculateElongationFactorFromStaffEntries(e,r,s,o){let a=s;const l={},u={};for(const c of e)c.LyricsEntries.length>0&&this.rules.RenderLyrics&&(a=this.calculateElongationFactor(c.LyricsEntries,c,l,r,a,o,this.rules.HorizontalBetweenLyricsDistance,this.rules.LyricOverlapAllowedIntoNextMeasure)),c.graphicalChordContainers.length>0&&this.rules.RenderChordSymbols&&(a=this.calculateElongationFactor(c.graphicalChordContainers,c,u,r,a,o,this.rules.ChordSymbolXSpacing,this.rules.ChordOverlapAllowedIntoNextMeasure));return a}calculateMeasureWidthFromStaffEntries(e,r){var l;let s=1;if(!((l=window.GYM)==null?void 0:l.multitrack))for(const u of e)!u||u.staffEntries.length===0||(s=this.calculateElongationFactorFromStaffEntries(u.staffEntries,r,s,u.MeasureNumber),s=1);return s=Math.min(s,this.rules.MaximumLyricsElongationFactor),r*s}createGraphicalTie(e,r,s,o,a){return new GraphicalTie(e,o,a)}updateStaffLineBorders(e){e.SkyBottomLineCalculator.updateStaffLineBorders()}graphicalMeasureCreatedCalculations(e){e.rules=this.rules,e.graphicalMeasureCreatedCalculations()}layoutVoiceEntry(e,r,s,o){for(let a=0;a=2&&(l=o.vfnote[0],u=o.vfnote[1]);let c,d=0;if(a&&a.vfnote&&a.vfnote.length>=2&&(c=a.vfnote[0],d=a.vfnote[1]),r){if(l){const E=new VF.StaveTie({first_indices:[u],first_note:l}),x=o.parentVoiceEntry.parentStaffEntry.parentMeasure;if(c){c.getDuration()==="w"&&((m=(g=c.keyProps)==null?void 0:g[0])==null?void 0:m.line)>=3&&c.setStemDirection(-1);let P=((y=window.GYM)==null?void 0:y.tieDirection)||0;Math.abs(P)===1&&(((S=(b=c.keyProps)==null?void 0:b[0])==null?void 0:S.line)>=3?c.setStemDirection(-P):c.setStemDirection(P)),E==null||E.setDirection(c.getStemDirection())}if(x.vfTies.length>0){const P=x.vfTies[0].direction;E==null||E.setDirection(P?-P:1)}x.addStaveTie(E,e)}if(c){const E=new VF.StaveTie({last_indices:[d],last_note:c}),x=a.parentVoiceEntry.parentStaffEntry.parentMeasure;if(x.vfTies.length>0){const P=x.vfTies[0].direction;E==null||E.setDirection(P?-P:1)}x.addStaveTie(E,e)}}else if(l||c){let E;if(s)if(e.Tie.Type==="S"){const C=e.StartNote.sourceNote,T=e.EndNote.sourceNote;let _=1;C.FretNumber>T.FretNumber&&(_=-1),E=new VF.TabSlide({first_indices:[u],first_note:l,last_indices:[d],last_note:c},_)}else E=new VF.TabTie({first_indices:[u],first_note:l,last_indices:[d],last_note:c},e.Tie.Type);else{E=new VF.StaveTie({first_indices:[u],first_note:l,last_indices:[d],last_note:c});const C=e.Tie.getTieDirection(o.sourceNote);C===PlacementEnum.Below?E.setDirection(1):C===PlacementEnum.Above&&E.setDirection(-1)}const x=a.parentVoiceEntry.parentStaffEntry.parentMeasure,P=((A=window.GYM)==null?void 0:A.graceCustom)||!1;P&&E.setDirection(P.direction),x.addStaveTie(E,e)}}calculateDynamicExpressionsForMultiExpression(e,r,s){if(rthis.rules.MaxMeasureToDrawIndex)return;const o=e.AbsoluteTimestamp,a=this.graphicalMusicSheet.MeasureList[r],l=a[s].ParentStaffLine,u=a[s];if(!l)return;const c=e.StartingContinuousDynamic,d=c!==void 0&&!c.IsStartOfSoftAccent,g=this.getRelativePositionInStaffLineFromTimestamp(o,s,l,l==null?void 0:l.isPartOfMultiStaffInstrument(),void 0,d);if(g.x<=0&&(g.x=u.beginInstructionsWidth+this.rules.RhythmRightMargin),e.InstantaneousDynamic){const m=new VexFlowInstantaneousDynamicExpression(e.InstantaneousDynamic,l,u);this.calculateGraphicalInstantaneousDynamicExpression(m,g,o),this.dynamicExpressionMap.set(o.RealValue,m.PositionAndShape)}if(c){const m=new VexFlowContinuousDynamicExpression(c,l,u.parentSourceMeasure);if(m.StartMeasure=u,m.IsSoftAccent=e.StartingContinuousDynamic.IsStartOfSoftAccent,!m.IsVerbal&&c.EndMultiExpression)try{this.calculateGraphicalContinuousDynamic(m,g),m.updateSkyBottomLine()}catch(y){}else m.IsVerbal?this.calculateGraphicalVerbalContinuousDynamic(m,g):loglevelExports.warn("This continuous dynamic is not covered. measure"+e.SourceMeasureParent.MeasureNumber)}}createMetronomeMark(e,r){var P,C,T,_,B,M,N,I,R,F,k;const s=Math.max(e.ParentMultiTempoExpression.SourceMeasureParent.MeasureNumber-1,0),o=r||s,a=Math.max(e.StaffNumber-1,0),l=this.graphicalMusicSheet.MeasureList[o][a].getVFStave();let u="q";if(e.beatUnit){const V=NoteTypeHandler.getNoteDurationFromType(e.beatUnit);u=VexFlowConverter.durations(V,!1)[0]}let c=this.rules.MetronomeMarkYShift,d=!1;const g=[];if(e.parentMeasure){for(const V of e.parentMeasure.StaffLinkedExpressions)for(const D of V)D&&D instanceof UnknownExpression&&g.push(D);for(const V of e.parentMeasure.TempoExpressions){const D=((P=V.InstantaneousTempo)==null?void 0:P.Enum)===TempoEnum.metronomeMark;if(!e.beatUnit&&V.InstantaneousTempo.beatUnit){const $=NoteTypeHandler.getNoteDurationFromType(e.beatUnit);u=VexFlowConverter.durations($,!1)[0]}if(V.getPlacementOfFirstEntry()===PlacementEnum.Above&&!D){d=!0;break}}}d&&(c-=1.4);const m=(C=this.graphicalMusicSheet.MeasureList[0][0].ParentStaffLine)==null?void 0:C.SkyLine;let y=e.TempoInBpm,b="",S="",A="";for(const V of this.graphicalMusicSheet.MeasureList[o][a].parentSourceMeasure.TempoExpressions){if(S=V.CombinedExpressionsText,isSpecialMark(V.CombinedExpressionsText)){b=V.CombinedExpressionsText;break}if(isSpeedKeyword(V.CombinedExpressionsText)||isSpeedHiddenKeyword(V.CombinedExpressionsText)){b=formatSpeedKeyword(V.CombinedExpressionsText),y=V.sourceMeasure.TempoInBPM,isSpeedKeyword(V.CombinedExpressionsText)&&(A=u);break}}const E={bpm:e.TempoInBpm,dots:e.dotted,duration:u,name:b};b&&(E.bpm=y/(E.dots?1.5:1),isSpeedKeyword(S)?E.duration=A:(y===SpeedTag[b]||!SpeedTag[b])&&(E.duration=""));const x=((M=(B=(_=(T=this.graphicalMusicSheet.MeasureList[o][a])==null?void 0:T.vfVoices)==null?void 0:_[1])==null?void 0:B.boundingBox)==null?void 0:M.y)||0;if(this.rules.MetronomeMarksDrawn){if(m){const O=((I=(N=this.graphicalMusicSheet.MeasureList[0])==null?void 0:N[a])==null?void 0:I.ParentStaffLine).Measures.map(q=>q.MeasureNumber-1);if(x&&O.includes(o)&&(isSpeedKeyword(S)||isSpeedHiddenKeyword(S))){const q=m.slice(0,9);let G=Math.min(...q);G=G<0?G-1:G,c+=G}O.includes(o)&&g.length?m[0]=Math.min(m[0],-4.5+c-4):m[0]=Math.min(m[0],-4.5+c)}l.options.line_config.reduce(($,O)=>(O.visible&&$++,$),0)<5&&(c-=2),l.setTempo(E,c*unitInPixels);let D=0;try{const $=(k=(F=(R=this.graphicalMusicSheet.MeasureList[o][a])==null?void 0:R.vfVoices)==null?void 0:F[1])==null?void 0:k.getTickables();D+=$[e.parentMeasure.metronomeNoteIndex].getBoundingBox().getX()-l.getNoteStartX()}catch($){}l.getModifiers()[l.getModifiers().length-1].setShiftX(D)}}calculateRehearsalMark(e){var d,g,m,y,b,S,A,E,x;const r=e.rehearsalExpression;if(!r)return;const s=(m=(g=(d=e.VerticalMeasureList)==null?void 0:d[0])==null?void 0:g.getVFStave)==null?void 0:m.call(g);if(!s)return;const o=-this.rules.RehearsalMarkYOffsetDefault-this.rules.RehearsalMarkYOffset;let a=this.rules.RehearsalMarkXOffsetDefault+this.rules.RehearsalMarkXOffset;e.IsSystemStartMeasure&&(a+=this.rules.RehearsalMarkXOffsetSystemStartMeasure);const l=this.rules.RehearsalMarkFontSize,u=s.getModifiers(),c=u.find(P=>P.getCategory().toLocaleLowerCase()==="repetitions");if(c&&c.setShiftY(c.y_shift-10),s.setSection(r.label,o,a,l),(S=(b=(y=e.VerticalMeasureList)==null?void 0:y[0])==null?void 0:b.ParentStaffLine)!=null&&S.AbstractExpressions){const P=u.find(C=>C.getCategory().toLocaleLowerCase()==="stavesection");for(let C of((x=(E=(A=e==null?void 0:e.VerticalMeasureList)==null?void 0:A[0])==null?void 0:E.ParentStaffLine)==null?void 0:x.AbstractExpressions)||[])C instanceof GraphicalUnknownExpression&&(P&&(C.Label.PositionAndShape.RelativePosition.y-=.5),c&&(C.Label.PositionAndShape.RelativePosition.y-=1.7))}}calculateSingleOctaveShift(e,r,s,o){var S;const a=r.OctaveShiftStart,l=a.ParentStartMultiExpression.Timestamp,u=(S=a.ParentEndMultiExpression)==null?void 0:S.Timestamp,c=this.rules.MinMeasureToDrawIndex,d=this.rules.MaxMeasureToDrawIndex;let g=this.graphicalMusicSheet.MeasureList[s][o].ParentStaffLine;g||(g=this.graphicalMusicSheet.MeasureList[c][o].ParentStaffLine);let m;a.ParentEndMultiExpression?m=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(a.ParentEndMultiExpression.SourceMeasureParent,o):m=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(o,!0),m.MeasureNumber>d+1&&(m=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(o,!0));let y;if(a.ParentEndMultiExpression?y=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(a.ParentStartMultiExpression.SourceMeasureParent,o):y=this.graphicalMusicSheet.MeasureList[c][o],y.MeasureNumberd||m.parentSourceMeasure.measureListIndexd)return;let b=m.ParentStaffLine;if(b||(b=g),m&&g&&b){const A=new VexFlowOctaveShift(a,g.PositionAndShape);if(!A.startNote){let P;for(const C of y.staffEntries)if(C){P=C;break}if(!P||(A.setStartNote(P),!A.startNote))return}if(!A.endNote){let P;for(let C=m.staffEntries.length-1;C>=0;C++)if(m.staffEntries[C]){P=m.staffEntries[C];break}if(!P){A.graphicalEndAtMeasureEnd=!0;return}if(A.setEndNote(P),!A.endNote)return}let E=y.findGraphicalStaffEntryFromTimestamp(l);E||(E=y.staffEntries[0]);let x=m.findGraphicalStaffEntryFromTimestamp(u);if(x||(x=m.staffEntries[m.staffEntries.length-1]),A.setStartNote(E),b!==g){A.endsOnDifferentStaffLine=!0;let P=this.findLastStafflineMeasure(g);P===void 0&&(P=m);const C=P.staffEntries[P.staffEntries.length-1];A.setEndNote(C),A.graphicalEndAtMeasureEnd=!0,A.endMeasure=P;const T=b.ParentMusicSystem.Id-g.ParentMusicSystem.Id;if(T>0)for(let _=g.ParentMusicSystem.Id;_=0;r--){const s=e.Measures[r];if(s.staffEntries.length>0)return s}}calculateSinglePedal(e,r,s,o){var S;const a=r.PedalStart,l=a.ParentStartMultiExpression.Timestamp,u=(S=a.ParentEndMultiExpression)==null?void 0:S.Timestamp,c=this.rules.MinMeasureToDrawIndex,d=this.rules.MaxMeasureToDrawIndex;let g=this.graphicalMusicSheet.MeasureList[s][o].ParentStaffLine;g||(g=this.graphicalMusicSheet.MeasureList[c][o].ParentStaffLine);let m;a.ParentEndMultiExpression?m=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(a.ParentEndMultiExpression.SourceMeasureParent,o):m=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(o,!0),m||(m=a.ParentStartMultiExpression.SourceMeasureParent.VerticalMeasureList[o]),m.MeasureNumber>d+1&&(m=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(o,!0));let y;if(a.ParentEndMultiExpression?y=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(a.ParentStartMultiExpression.SourceMeasureParent,o):(y=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(a.ParentStartMultiExpression.SourceMeasureParent,o),y||(y=this.graphicalMusicSheet.MeasureList[c][o])),y.MeasureNumberd||m.parentSourceMeasure.measureListIndexd)return;let b=m.ParentStaffLine;if(b||(b=g),m&&g&&b){let A=!1;g!==b&&(A=!0);const E=new VexFlowPedal(a,g.PositionAndShape,!1,A);E.setEndsStave(m,u);let x=y.findGraphicalStaffEntryFromTimestamp(l);x||(x=y.staffEntries[0]);let P=m.findGraphicalStaffEntryFromTimestamp(u);if(P||(P=m.staffEntries[m.staffEntries.length-1]),!E.setStartNote(x))return;if(E.setBeginsStave(E.startNote.isRest(),l),b!==g)if(E.pedalSymbol===MusicSymbol.PEDAL_SYMBOL){E.setEndNote(P),E.setEndMeasure(m),E.ReleaseText=" ",E.CalculateBoundingBox(),this.calculatePedalSkyBottomLine(E.startVfVoiceEntry,E.endVfVoiceEntry,E,g);const C=b.Measures[0],T=new VexFlowPedal(a,C.PositionAndShape);E.setEndsStave(m,u);const _=C.staffEntries[0];if(!T.setStartNote(_))return;T.setEndNote(P),T.setEndMeasure(m),E.setEndMeasure(m),b.Pedals.push(T),T.CalculateBoundingBox(),T.DepressText=" ",this.calculatePedalSkyBottomLine(T.startVfVoiceEntry,T.endVfVoiceEntry,T,b)}else{let C=this.findLastStafflineMeasure(g);C===void 0&&(C=m);const T=C.staffEntries[C.staffEntries.length-1];E.setEndNote(T),E.setEndMeasure(m),E.ChangeEnd=!1;const _=b.ParentMusicSystem.Id-g.ParentMusicSystem.Id;if(_>0){let B=1;for(let M=g.ParentMusicSystem.Id;Md+1&&(m=this.graphicalMusicSheet.getLastGraphicalMeasureFromIndex(o,!0));let y;if(a.ParentEndMultiExpression?y=this.graphicalMusicSheet.getGraphicalMeasureFromSourceMeasureAndIndex(a.ParentStartMultiExpression.SourceMeasureParent,o):y=this.graphicalMusicSheet.MeasureList[c][o],y.MeasureNumberd||m.parentSourceMeasure.measureListIndexd)return;let b=m.ParentStaffLine;if(b||(b=g),m&&g&&b){const A=new VexflowVibratoBracket(a,g.PositionAndShape,y.ParentStaff.isTab);let E=y.findGraphicalStaffEntryFromTimestamp(l);E||(E=y.staffEntries[0]);let x=m.findGraphicalStaffEntryFromTimestamp(u);if(x||(x=m.staffEntries[m.staffEntries.length-1]),A.setStartNote(E),b!==g){let P=g.Measures[g.Measures.length-1];P===void 0&&(P=m);const C=P.staffEntries[P.staffEntries.length-1];if(A.setEndNote(C),b.ParentMusicSystem.Id-g.ParentMusicSystem.Id>0)for(let _=g.ParentMusicSystem.Id;_m){const C=m;m=g,g=C}o.SkyBottomLineCalculator.updateBottomLineInRange(g,m,y+x)}for(const x of o.Pedals){const P=x,C=P.getPedalMarking(),T=C.line+3+(o.StaffLines.length-1);if(y>T){const _=C.render_options.text_margin_right/10;let B=P.startVfVoiceEntry.PositionAndShape.AbsolutePosition.x-_,M;P.setLine(y-3-(o.StaffLines.length-1));let N=(S=P.endVfVoiceEntry)==null?void 0:S.PositionAndShape;if(N||(N=P.endMeasure.PositionAndShape),P.EndSymbolPositionAndShape){const I=u.render_options.glyph_point_size/20;M=B+3.4;const R=N.AbsolutePosition.x-_,F=R+1.5;o.SkyBottomLineCalculator.updateBottomLineInRange(B,M,y+I),o.SkyBottomLineCalculator.updateBottomLineInRange(R,F,y+I)}else{const I=C.render_options.bracket_height/10;if(C.EndsStave)M=N.AbsolutePosition.x+N.Size.width-_;else switch(u.style){case l.BRACKET_OPEN_END:case l.BRACKET_OPEN_BOTH:case l.MIXED_OPEN_END:M=N.AbsolutePosition.x+N.BorderRight-_;break;default:M=N.AbsolutePosition.x+N.BorderLeft-_;break}const R=(E=(A=P.endVfVoiceEntry)==null?void 0:A.parentStaffEntry)==null?void 0:E.vfClefBefore;if(R){const F=R.getWidth()/10;M+=F}if(B>M){const F=B;B=M,M=F}o.SkyBottomLineCalculator.updateBottomLineInRange(B,M,y+I)}}}}calculateOctaveShiftSkyBottomLine(e,r,s,o){if(!r){loglevelExports.warn("octaveshift: no endStaffEntry");return}let a=r.PositionAndShape;s.graphicalEndAtMeasureEnd&&(a=r.parentMeasure.PositionAndShape);let l=e.PositionAndShape.Size.width,u=a.Size.width;e.hasOnlyRests()?l=-l:l/=2,s.graphicalEndAtMeasureEnd||(r.hasOnlyRests()?u*=2:u/=2,e===r&&(u*=2));let c=e.PositionAndShape.AbsolutePosition.x-l,d=a.AbsolutePosition.x+u;if(c>d){const y=c;c=d,d=y}s.PositionAndShape.Size.width=d-c;const g=s.getTextBracket(),m=g.font.size/10;if(g.position===VF.TextBracket.Positions.TOP){const y=Math.ceil(o.SkyBottomLineCalculator.getSkyLineMinInRange(c,d));if(y===1/0)return;g.start.getStave().options.top_text_position=Math.abs(y),o.SkyBottomLineCalculator.updateSkyLineInRange(c,d,y-m*2)}else{const y=o.SkyBottomLineCalculator.getBottomLineMaxInRange(c,d);if(y===1/0)return;g.start.getStave().options.bottom_text_position=y,e.parentMeasure!==r.parentMeasure&&(g.stop.getStave().options.bottom_text_position=y),o.SkyBottomLineCalculator.updateBottomLineInRange(c,d,y+m*1.5)}}calculateWordRepetitionInstruction(e,r){let s;const o=this.graphicalMusicSheet.MeasureList[r];for(let a=0,l=o.length;as.StaffLines));let r=0;for(const s of e)for(const o of s.Measures)o&&r++;this.rules.AlwaysSetPreferredSkyBottomLineBackendAutomatically&&this.rules.setPreferredSkyBottomLineBackendAutomatically(r);for(const s of e)s.SkyBottomLineCalculator.calculateLines()}calculateExpressionAlignements(){for(const e of this.musicSystems)for(const r of e.StaffLines)try{r.AlignmentManager.alignDynamicExpressions(),r.AbstractExpressions.forEach(s=>{s.updateSkyBottomLine()})}catch(s){}}handleTiedGraphicalNote(e,r,s,o,a,l,u,c){}handleBeam(e,r,s){e.parentVoiceEntry.parentStaffEntry.parentMeasure.handleBeam(e,r)}handleVoiceEntryLyrics(e,r,s){e.LyricsEntries.forEach((o,a)=>{const l=new GraphicalLyricEntry(a,r,this.rules.LyricsHeight,this.rules.StaffHeight);if(r.LyricsEntries.push(l),l.GraphicalLabel.setLabelPositionAndShapeBorders(),a.Word){const c=a.Word.Syllables.indexOf(a);let d=s.indexOf(a.Word);if(d===-1&&(s.push(a.Word),d=s.indexOf(a.Word)),this.graphicalLyricWords.length===0||d>this.graphicalLyricWords.length-1){const g=new GraphicalLyricWord(a.Word);l.ParentLyricWord=g,g.GraphicalLyricsEntries[c]=l,this.graphicalLyricWords.push(g)}else{const g=this.graphicalLyricWords[d];l.ParentLyricWord=g,g.GraphicalLyricsEntries[c]=l,g.isFilled()&&(s.splice(d,1),this.graphicalLyricWords.splice(this.graphicalLyricWords.indexOf(g),1))}}})}handleVoiceEntryOrnaments(e,r,s){}handleVoiceEntryArticulations(e,r,s){}handleVoiceEntryTechnicalInstructions(e,r,s){}handleTuplet(e,r,s){e.parentVoiceEntry.parentStaffEntry.parentMeasure.handleTuplet(e,r)}findIndexGraphicalSlurFromSlur(e,r){for(let s=0;s=0){const m=o[g];m.staffEntries.indexOf(l)===-1&&m.staffEntries.push(l),o.splice(g,1)}}}for(const u of o)u.staffEntries.indexOf(l)===-1&&u.staffEntries.push(l)}}for(const r of this.musicSystems)for(const s of r.StaffLines){const o=s.GraphicalSlurs.sort(GraphicalSlur.Compare);for(const a of o)a.slur.isCrossed()||a.calculateCurve(this.rules)}}calculateGlissandi(){const e={};for(const r of this.graphicalMusicSheet.MeasureList[0])e[r.ParentStaff.idInMusicSheet]=[];for(const r of this.musicSystems)for(const s of r.StaffLines){const o=e[s.ParentStaff.idInMusicSheet];for(let a=0;a=0){const m=o[g];m.staffEntries.indexOf(l)===-1&&m.staffEntries.push(l),o.splice(g,1)}}}}for(const u of o)u.staffEntries.indexOf(l)===-1&&u.staffEntries.push(l)}}for(const r of this.musicSystems)for(const s of r.StaffLines)for(const o of s.GraphicalGlissandi)if(s.ParentStaff.isTab){const l=o.Glissando.StartNote,u=o.Glissando.EndNote,c=o.staffEntries[0].findGraphicalNoteFromNote(l),d=o.staffEntries.last().findGraphicalNoteFromNote(u);if(!c&&!d)return;let g=1;l.FretNumber>u.FretNumber&&(g=-1);let m,y,b;c&&c.vfnote&&c.vfnote.length>=2&&(b=c.vfnote[0],m=[0]);let S;d&&d.vfnote&&d.vfnote.length>=2&&(S=d.vfnote[0],y=[0]);const A=new VF.TabSlide({first_indices:m,first_note:b,last_indices:y,last_note:S},g),E=c==null?void 0:c.parentVoiceEntry.parentStaffEntry.parentMeasure;E&&(E.vfTies.push(A),o.vfTie=A);const x=d==null?void 0:d.parentVoiceEntry.parentStaffEntry.parentMeasure;x&&(x.vfTies.push(A),o.vfTie=A)}}}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 r;for(let s=this.timestamps.length-1;s>=0;s--)if(r=this.timestamps[s],e.gte(r.from))return r;return this.timestamps[0]}absoluteEnrolledToSheetTimestamp(e){if(this.timestamps.length===0)return e;const r=this.getCurrentRepetitionTimestampTransform(e);return Fraction$1.plus(e,Fraction$1.minus(r.to,r.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,r){this.musicSheet.SelectionStart=e!=null?e:this.sheetStart,this.musicSheet.SelectionEnd=r!=null?r:this.sheetEnd}calcMapping(){this.timestamps=[];const e=this.getIterator();let r=e.CurrentRepetition,s=new TimestampTransform(e.CurrentEnrolledTimestamp.clone(),e.CurrentSourceTimestamp.clone(),void 0,0);for(this.timestamps.push(s);!e.EndReached;){if(e.JumpOccurred||r!==e.CurrentRepetition){if(r=e.CurrentRepetition,e.backJumpOccurred){const o=e.JumpResponsibleRepetition;s.nextBackJump=e.CurrentEnrolledTimestamp,s.curRepetition=o,s.curRepetitionIteration=e.CurrentJumpResponsibleRepetitionIterationBeforeJump;for(let a=this.timestamps.length-2;a>=0&&!(o.AbsoluteTimestamp.gt(this.timestamps[a].to)||this.timestamps[a].curRepetition);a--)this.timestamps[a].nextBackJump=s.nextBackJump,this.timestamps[a].curRepetition=o,this.timestamps[a].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,r,s,o){this.from=e,this.to=r,this.curRepetition=s,this.curRepetitionIteration=o,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,r,s){super(e),this.musicSheet=e,this.startIndex=r,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,r=!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=r}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 r=this.userNumberOfRepetitions-this.NumberOfEndings;for(let s=1;s<=this.userNumberOfRepetitions;s++)s<=r?this.repetitonIterationOrder.push(1):this.repetitonIterationOrder.push(s-r)}getForwardJumpTargetForIteration(e){const r=this.repetitonIterationOrder[e-1];return this.endingIndexDict[r]?this.endingIndexDict[r].part.StartIndex:-1}getBackwardJumpTarget(){return this.startMarker.measureIndex}setEndingsStartIndex(e,r){const s=new RepetitionEndingPart(new SourceMusicPart(this.musicSheet2,r,r));this.endingParts.push(s);for(const o of e)try{this.endingIndexDict[o]=s,s.endingIndices.push(o),this.numberOfEndings0&&(o=1),a.Add(new Fraction$1(o,r)),a}}class MusicSheet{constructor(){this.idString="uninitialized",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.userStartTempoInBPM=100,this.playbackSettings=new PlaybackSettings(new Fraction$1(4,4,0,!1),this.userStartTempoInBPM),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 CopyrightString(){return this.copyright?this.copyright.text:""}set CopyrightString(e){this.Copyright=new Label(e,TextAlignmentEnum.CenterBottom,void 0,!0)}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 Copyright(){return this.copyright}set Copyright(e){this.copyright=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,r=this.instruments.length;e0){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 r=0,s=this.sourceMeasures.length;r0&&o.Voices[0].Visible&&e.push(o)}return e}}MusicSheet.defaultTitle="defaultTitle";class LyricWord{constructor(){this.syllables=[]}get Syllables(){return this.syllables}containsVoiceEntry(e){for(let r=0,s=this.Syllables.length;r=0&&(this.syllableIndex=a)}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}get IsTranslation(){return this.VerseNumber.endsWith("translation")}get IsChorus(){return this.VerseNumber.startsWith("chorus")}get FontStyle(){return this.IsChorus||this.IsTranslation?FontStyles.Italic:FontStyles.Regular}}class LyricsReader{constructor(e){this.openLyricWords={},this.musicSheet=e}addLyricEntry(e,r){var s,o;if(e){const a=e;for(let l=0,u=a.length;l0)for(let C=E;C0){const a=e.elements();for(let l=0,u=a.length;l0&&r.Articulations[0].articulationEnum!==ArticulationEnum.staccato&&r.Articulations.splice(0,0,b);else if(d==="breathmark")m===PlacementEnum.NotYetDefined&&(b.placement=PlacementEnum.Above);else if(d==="strongaccent"){const S=(o=c==null?void 0:c.attribute("type"))==null?void 0:o.value;S==="up"?b.articulationEnum=ArticulationEnum.marcatoup:S==="down"&&(b.articulationEnum=ArticulationEnum.marcatodown)}else if(g===ArticulationEnum.softaccent){const S=r.ParentSourceStaffEntry.ParentStaff.Id-1;m===PlacementEnum.NotYetDefined&&(m=PlacementEnum.Above,S>0&&(m=PlacementEnum.Below));const A=r.ParentSourceStaffEntry.VerticalContainerParent.ParentMeasure,E=new MultiExpression(A,r.Timestamp);E.StartingContinuousDynamic=new ContinuousDynamicExpression(ContDynamicEnum.crescendo,m,S,A,null,-1),E.StartingContinuousDynamic.IsStartOfSoftAccent=!0,E.StartingContinuousDynamic.StartMultiExpression=E,E.StartingContinuousDynamic.EndMultiExpression=E,E.EndingContinuousDynamic=new ContinuousDynamicExpression(ContDynamicEnum.diminuendo,m,S,A,null,-1),E.EndingContinuousDynamic.StartMultiExpression=E,E.EndingContinuousDynamic.EndMultiExpression=E,A.StaffLinkedExpressions[S].push(E)}if(!r.hasArticulation(b))switch(r.Articulations.push(b),b.articulationEnum){case ArticulationEnum.staccato:case ArticulationEnum.staccatissimo:r.DurationModifier=b;break;case ArticulationEnum.accent:case ArticulationEnum.strongaccent:r.VolumeModifier=b;break;default:break}}}catch(g){const m="Invalid note articulation.";loglevelExports.debug("addArticulationExpression",m,g);return}}}}addFermata(e,r){var a;let s=ArticulationEnum.fermata;e.attributes().length>0&&e.attribute("type")&&e.attribute("type").value==="inverted"&&(s=ArticulationEnum.invertedfermata);let o=PlacementEnum.Above;((a=e.attribute("placement"))==null?void 0:a.value)==="below"&&(o=PlacementEnum.Below),r.Articulations.push(new Articulation(s,o))}addTechnicalArticulations(e,r,s){var u,c;const o={bend:ArticulationEnum.bend,"down-bow":ArticulationEnum.downbow,"open-string":ArticulationEnum.naturalharmonic,"snap-pizzicato":ArticulationEnum.snappizzicato,stopped:ArticulationEnum.lefthandpizzicato,"up-bow":ArticulationEnum.upbow,harmonic:ArticulationEnum.naturalharmonic};for(const d in o){if(!o.hasOwnProperty(d))continue;const g=o[d],m=e.element(d);if(m){let y;((u=m.attribute("placement"))==null?void 0:u.value)==="above"&&(y=PlacementEnum.Above),((c=m.attribute("placement"))==null?void 0:c.value)==="below"&&(y=PlacementEnum.Below);const b=new Articulation(g,y);r.hasArticulation(b)||r.Articulations.push(b)}}const a=e.elements("fingering");for(const d of a){const g=this.createTechnicalInstruction(d,s);g.type=TechnicalInstructionType.Fingering,s.Fingering||(s.Fingering=g),r.TechnicalInstructions.push(g)}const l=e.element("string");if(l){const d=this.createTechnicalInstruction(l,s);d.type=TechnicalInstructionType.String,s.StringInstruction=d,r.TechnicalInstructions.push(d)}}createTechnicalInstruction(e,r){const s=new TechnicalInstruction;s.sourceNote=r,s.value=e.value;const o=e.attribute("placement");return this.rules.FingeringPositionFromXML&&(s.placement=this.getPlacement(o)),s}getPlacement(e,r=PlacementEnum.NotYetDefined){if(r!==PlacementEnum.NotYetDefined)return r;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,r){if(e){let s;const o={"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 a in o){if(!o.hasOwnProperty(a))continue;const l=e.element(a);if(l){s=new OrnamentContainer(o[a]);const u=l.attribute("placement");u&&u.value==="below"&&(s.placement=PlacementEnum.Below)}}if(s){const a=e.elements("accidental-mark");if(a){let l=PlacementEnum.Below,u=AccidentalEnum.NONE;const c=a;for(let d=0,g=c.length;d0&&(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,r,s,o,a,l,u,c,d,g,m,y,b,S,A,E,x,P,C,T,_,B,M){this.currentStaffEntry=u,this.currentMeasure=c;try{this.currentNote=l?this.addRestNote(e.element("rest"),r,o,s,a,b,S,C,e):this.addSingleNote(e,r,o,s,a,m,y,b,S,A,E,x,P,C,_,B,M),this.currentNote.DotsXml=T;const N=e.elements("lyric");this.lyricsReader!==void 0&&N&&(this.lyricsReader.addLyricEntry(N,this.currentVoiceEntry),this.voice.Parent.HasLyrics=!0);let I=!1;const R=e.element("notations");if(R){this.articulationReader&&this.readArticulations(R,this.currentVoiceEntry,this.currentNote);const F=R.elements("slur"),k=R.elements("slide"),V=R.elements("glissando");this.slurReader!==void 0&&(F.length>0||k.length>0)&&!this.currentNote.ParentVoiceEntry.IsGrace&&(this.slurReader.addSlur(F,this.currentNote),k.length>0&&this.slurReader.addSlur(k,this.currentNote),V.length>0&&this.slurReader.addSlur(V,this.currentNote));const D=R.elements("tuplet");D.length>0&&(this.openTupletNumber=this.addTuplet(e,D),I=!0);const $=R.element("arpeggiate");if($!==void 0){let G;if(this.currentVoiceEntry.Arpeggio)G=this.currentVoiceEntry.Arpeggio;else{let U=!1;for(const Z of this.currentStaffEntry.VoiceEntries)if(Z.Arpeggio){U=!0,G=Z.Arpeggio;break}if(!U){let Z=ArpeggioType.ARPEGGIO_DIRECTIONLESS;const W=$.attribute("direction");if(W)switch(W.value){case"up":Z=ArpeggioType.ROLL_UP;break;case"down":Z=ArpeggioType.ROLL_DOWN;break;default:Z=ArpeggioType.ARPEGGIO_DIRECTIONLESS}G=new Arpeggio(this.currentVoiceEntry,Z),this.currentVoiceEntry.Arpeggio=G}}G.addNote(this.currentNote)}const O=R.elements("tied");O.length>0&&this.addTie(O,d,g,TieTypes.SIMPLE);const q=R.element("technical");if(q){const G=q.elements("hammer-on");G.length>0&&this.addTie(G,d,g,TieTypes.HAMMERON);const U=q.elements("pull-off");U.length>0&&this.addTie(U,d,g,TieTypes.PULLOFF)}}e.element("time-modification")!==void 0&&!I&&this.handleTimeModificationNode(e)}catch(N){loglevelExports.warn(N);const I=ITextTranslation.translateText("ReaderErrorMessages/NoteError","Ignored erroneous Note.");this.musicSheet.SheetErrors.pushMeasureError(I),this.musicSheet.SheetErrors.pushMeasureError(N)}return this.currentNote}checkForStaffEntryLink(e,r,s,o){const a=new StaffEntryLink(this.currentVoiceEntry);a.LinkStaffEntries.push(s),s.Link=a;const l=this.currentVoiceEntry.Timestamp.clone(),u=o.getVerticalContainerByTimestamp(l);return s=u.StaffEntries[e],s||(s=new SourceStaffEntry(u,r),u.StaffEntries[e]=s),s.VoiceEntries.push(this.currentVoiceEntry),a.LinkStaffEntries.push(s),s.Link=a,s}checkForOpenBeam(){this.openBeams.length>0&&this.currentNote&&this.handleOpenBeam()}checkOpenTies(){const e=this.openTieDict;for(const r in e)if(e.hasOwnProperty(r)){const s=e[r];Fraction$1.plus(s.StartNote.ParentStaffEntry.Timestamp,s.Duration).lt(s.StartNote.SourceMeasure.Duration)&&delete e[r]}}hasVoiceEntry(){return this.currentVoiceEntry!==void 0}readArticulations(e,r,s){const o=e.element("articulations");o&&this.articulationReader.addArticulationExpression(o,r);const a=e.element("fermata");a&&this.articulationReader.addFermata(a,r);const l=e.element("technical");l&&this.articulationReader.addTechnicalArticulations(l,r,s);const u=e.element("ornaments");u&&this.articulationReader.addOrnament(u,r)}addSingleNote(e,r,s,o,a,l,u,c,d,g,m,y,b,S,A,E,x){var ye;let P=0,C,T=AccidentalEnum.NONE,_=NoteEnum.C,B=NoteEnum.C,M=0,N=0,I,R,F;const k=e.elements();for(let ae=0,Y=k.length;ae{const Y=ae.getAttribute("begin"),Q=ae.getAttribute("end");Z.push({begin:Y?Y/1e3:0,end:Q?Q/1e3:0})}),this.addNoteInfo($,s,c,d,a,B,N,S,S,Z),$.TypeLength=o,$.IsGraceNote=g,$.StemDirectionXml=m,$.TremoloInfo=y,$.PlaybackInstrumentId=I,(R!==void 0&&R!=="normal"||F!==void 0)&&($.Notehead=new Notehead($,R,F)),$.NoteheadColorXml=S,$.NoteheadColor=S,$.PlaybackInstrumentId=I,$.TremoloType=A,$.glissandoType=E,$.slideType=x,this.currentVoiceEntry.addNote($),m===StemDirectionType.None&&(b="#00000000"),this.currentVoiceEntry.StemDirectionXml=m,b&&(this.currentVoiceEntry.StemColorXml=b,this.currentVoiceEntry.StemColor=b,$.StemColorXml=b),e.elements("beam")&&!l&&this.createBeam(e,$),$}addRestNote(e,r,s,o,a,l,u,c,d){var T;const g=Fraction$1.createFromFraction(r),m=e.element("display-step"),y=e.element("display-octave");let b,S,A;m&&y&&(b=NoteEnum[m.value.toUpperCase()],S=parseInt(y.value,10),A=new Pitch(b,S,AccidentalEnum.NONE,void 0,!0));const E=new Note$1(this.currentVoiceEntry,this.currentStaffEntry,g,A,this.currentMeasure,!0);let x=[];const P=e.element("times")||d.element("times"),C=(T=P==null?void 0:P.elem)==null?void 0:T.getElementsByTagName("time");return C&&C.length&&Array.from(C).forEach(_=>{const B=_.getAttribute("begin"),M=_.getAttribute("end");x.push({begin:B?B/1e3:0,end:M?M/1e3:0})}),this.addNoteInfo(E,s,l,u,a,b,S,c,c,x),E.TypeLength=o,this.currentVoiceEntry.Notes.push(E),this.openBeams.length>0&&this.openBeams.last().ExtendedNoteList.push(E),E}addNoteInfo(e,r,s,o,a,l,u,c,d,g){e.NoteTypeXml=r,e.PrintObject=s,e.IsCueNote=o,e.NormalNotes=a,e.displayStepUnpitched=l,e.displayOctaveUnpitched=u,e.NoteheadColorXml=c,e.NoteheadColor=c,e.noteTimeInfo=g}createBeam(e,r){var s;try{const o=e.element("beam");let a;if(o!==void 0&&o.hasAttributes&&(a=o.attribute("number")),a){let l=parseInt(a.value,10);const u=e.elements("beam"),c=u[0].value;u&&(c==="begin"?(l===((s=this.openBeams.last())==null?void 0:s.BeamNumber)?(this.beamNumberOffset++,l+=this.beamNumberOffset):this.openBeams.last()&&this.handleOpenBeam(),this.openBeams.push(new Beam(l,this.beamNumberOffset))):l+=this.beamNumberOffset);let d=!1;if(!(l>0&&l<=this.openBeams.length)||!this.openBeams[l-1]){loglevelExports.debug("[OSMD] invalid beamnumber");return}for(let g=0,m=this.openBeams[l-1].Notes.length;g1){let a=e.element("time-modification");a&&(a=a.element("actual-notes"));const l=r;for(let u=0,c=l.length;u1&&this.openTupletNumber--),this.tupletDict[b]=A;const x=[];x.push(this.currentNote),A.Notes.push(x),A.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=A,this.openTupletNumber=b}else if(y.value==="stop"){let b=1;d.attribute("number")&&(b=parseInt(d.attribute("number").value,10));const S=this.tupletDict[b];if(S){const A=d.attribute("placement");A&&(A.value==="below"?S.tupletLabelNumberPlacement=PlacementEnum.Below:S.tupletLabelNumberPlacement=PlacementEnum.Above,S.PlacementFromXml=!0);const E=[];if(E.push(this.currentNote),S.Notes.push(E),!S.PlacementFromXml){let x=!1;for(const P of S.Notes){for(const C of P)if(!C.isRest()){C.StemDirectionXml===StemDirectionType.Down?S.tupletLabelNumberPlacement=PlacementEnum.Below:S.tupletLabelNumberPlacement=PlacementEnum.Above,x=!0;break}if(x)break}}S.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=S,delete this.tupletDict[b],Object.keys(this.tupletDict).length===0?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--}}}}}else if(r[0]){const a=r[0];if(a.hasAttributes){const l=a.attribute("type").value;let u=1;a.attribute("number")&&(u=parseInt(a.attribute("number").value,10));const c=isNaN(u),d=this.readShowNumberNoneGiven(a),g=a.attribute("bracket");if(g&&g.value==="yes"?(s=!0,o=!0):g&&g.value==="no"&&(o=!1),l==="start"){let m=0,y=e.element("time-modification");if(y&&(y=y.element("actual-notes")),y&&(m=parseInt(y.value,10),isNaN(m))){const E=ITextTranslation.translateText("ReaderErrorMessages/TupletNoteDurationError","Invalid tuplet note duration.");throw this.musicSheet.SheetErrors.pushMeasureError(E),new MusicSheetReadingException(E)}c&&(this.openTupletNumber++,u=this.openTupletNumber);let b=this.tupletDict[u];b||(b=this.tupletDict[u]=new Tuplet(m,s),b.BracketedXmlValue=o,b.ShowNumberNoneGivenInXml=d,b.tupletLabelNumberPlacement=PlacementEnum.Above);const S=a.attribute("placement");S&&(S.value==="below"?b.tupletLabelNumberPlacement=PlacementEnum.Below:b.tupletLabelNumberPlacement=PlacementEnum.Above,b.PlacementFromXml=!0);const A=[];A.push(this.currentNote),b.Notes.push(A),b.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=b,this.openTupletNumber=u}else if(l==="stop"){c&&(u=this.openTupletNumber);const m=this.tupletDict[this.openTupletNumber];if(m){const y=a.attribute("placement");y&&(y.value==="below"?m.tupletLabelNumberPlacement=PlacementEnum.Below:m.tupletLabelNumberPlacement=PlacementEnum.Above,m.PlacementFromXml=!0);const b=[];if(b.push(this.currentNote),m.Notes.push(b),!m.PlacementFromXml){let S=!1;for(const A of m.Notes){for(const E of A)if(!E.isRest()){E.StemDirectionXml===StemDirectionType.Down?m.tupletLabelNumberPlacement=PlacementEnum.Below:m.tupletLabelNumberPlacement=PlacementEnum.Above,S=!0;break}if(S)break}}m.Fractions.push(this.getTupletNoteDurationFromType(e)),this.currentNote.NoteTuplet=m,Object.keys(this.tupletDict).length===0?this.openTupletNumber=0:Object.keys(this.tupletDict).length>1&&this.openTupletNumber--,delete this.tupletDict[u]}}}}return this.openTupletNumber}readShowNumberNoneGiven(e){const r=e.attribute("show-number");return!!(r!=null&&r.value&&r.value==="none")}handleTimeModificationNode(e){if(this.tupletDict[this.openTupletNumber])try{const r=this.tupletDict[this.openTupletNumber],s=CollectionUtil.last(r.Notes),o=s[0].ParentVoiceEntry;let a;o.Timestamp.Equals(this.currentVoiceEntry.Timestamp)?a=s:(a=[],r.Notes.push(a),r.Fractions.push(this.getTupletNoteDurationFromType(e))),a.push(this.currentNote),this.currentNote.NoteTuplet=r}catch(r){const s=ITextTranslation.translateText("ReaderErrorMessages/TupletNumberError","Invalid tuplet number.");throw this.musicSheet.SheetErrors.pushMeasureError(s),r}else if(this.currentVoiceEntry.Notes.length>0){const r=this.currentVoiceEntry.Notes[0];if(r.NoteTuplet){const s=r.NoteTuplet;CollectionUtil.last(s.Notes).push(this.currentNote),this.currentNote.NoteTuplet=s}}}addTie(e,r,s,o){if(e){if(e.length===1){const a=e[0];if(a!==void 0&&a.attributes()){const l=this.getTieDirection(a),u=a.attribute("type").value;try{if(u==="start"){const c=this.findCurrentNoteInTieDict(this.currentNote);c<0&&delete this.openTieDict[c];const d=this.getNextAvailableNumberForTie(),g=new Tie(this.currentNote,o);this.openTieDict[d]=g,g.TieNumber=d,g.TieDirection=l}else if(u==="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 a=this.findCurrentNoteInTieDict(this.currentNote);if(a>=0){const l=this.openTieDict[a];l.AddNote(this.currentNote);for(const u of e)if(u.attribute("type").value==="start"){const d=this.getTieDirection(u);l.NoteIndexToTieDirection[l.Notes.length-1]=d}}}}}getTieDirection(e){let r=PlacementEnum.NotYetDefined;const s=e.attribute("placement");s&&(s.value==="above"?r=PlacementEnum.Above:s.value==="below"&&(r=PlacementEnum.Below));const o=e.attribute("orientation");return o&&(o.value==="over"?r=PlacementEnum.Above:o.value==="under"&&(r=PlacementEnum.Below)),r}getNextAvailableNumberForTie(){const e=Object.keys(this.openTieDict);if(e.length===0)return 1;e.sort((r,s)=>+r-+s);for(let r=0;r0?o.RealValue>0?(d=Fraction$1.multiply(Fraction$1.minus(o,a),d),this.directionTimestamp=Fraction$1.plus(d,o)):this.directionTimestamp=Fraction$1.createFromFraction(d):this.offsetDivisions<0&&(o.RealValue>0?(d=Fraction$1.multiply(Fraction$1.minus(o,a),d),this.directionTimestamp=Fraction$1.minus(o,d)):this.directionTimestamp=Fraction$1.createFromFraction(d));let g;const m=e.element("direction-type");let y;if(m&&(y=m.element("wedge"),y)){const S=y.attribute("default-y");S&&(g=this.readPosition(S))}this.WedgeYPosXml=g;const b=e.attribute("placement");if(b)try{const S=b.value;S==="below"?this.placement=PlacementEnum.Below:S==="above"&&(this.placement=PlacementEnum.Above)}catch(S){const A=ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement -> set to default.");loglevelExports.debug("ExpressionReader.readExpressionParameters",A,S),this.musicSheet.SheetErrors.pushMeasureError(A),this.placement=PlacementEnum.Below}if(this.placement===PlacementEnum.NotYetDefined)try{if(m){const S=m.element("dynamics");if(S){const x=S.attribute("default-y");x&&this.readExpressionPlacement(x,"read dynamics y pos")}if(y){const x=y.attribute("default-y");x&&this.readExpressionPlacement(x,"read wedge y pos")}const A=m.element("words");if(A){const x=A.attribute("default-y");x&&this.readExpressionPlacement(x,"read words y pos")}const E=m.element("rehearsal");if(E){const x=E.attribute("default-y");x&&this.readExpressionPlacement(x,"read rehearsal pos")}}}catch(S){const A=ITextTranslation.translateText("ReaderErrorMessages/ExpressionPlacementError","Invalid expression placement. Set to default.");loglevelExports.debug("ExpressionReader.readExpressionParameters",A,S),this.musicSheet.SheetErrors.pushMeasureError(A),this.placement=PlacementEnum.Below}this.placement===PlacementEnum.NotYetDefined&&(r.Staves.length>1?this.placement=PlacementEnum.Below:r.HasLyrics?this.placement=PlacementEnum.Above:this.placement=PlacementEnum.Below)}read(e,r,s,o=void 0,a=0,l){let u=!1,c=!1;const d=e.element("sound");if(d){const y=d.attribute("tempo"),b=d.attribute("dynamics");if(y){const S=y.value.match(/^(\d+)(\.\d+)?$/);(S==null?void 0:S.length)>0?this.soundTempo=Math.round(Number.parseFloat(y.value)):(loglevelExports.info("invalid xml tempo: "+y.value),this.soundTempo=100),r.TempoInBPM=this.soundTempo,this.musicSheet.DefaultStartTempoInBpm===0&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,u=!0}if(b){const S=b.value.match(/\d+/);this.soundDynamic=S!==void 0?parseInt(S[0],10):100,c=!0}}const g=e.element("direction-type");if(!g)return;let m=g.element("metronome");if(m){r.metronomeNoteIndex=a;const y=m.element("beat-unit"),b=m.element("beat-unit-dot")!==void 0,S=m.element("per-minute");if(y!==void 0&&S){m.hasAttributes&&m.attribute("default-x")!==void 0&&(this.directionTimestamp=Fraction$1.createFromFraction(s));const E=parseFloat(S.value);!l&&this.createNewTempoExpressionIfNeeded(r);const x=new InstantaneousTempoExpression(void 0,this.placement,this.staffNumber,E,this.currentMultiTempoExpression,!0);x.parentMeasure=r,this.soundTempo=E,r.TempoInBPM=this.soundTempo*(b?1.5:1),this.musicSheet.DefaultStartTempoInBpm===0&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),r.MeasureNumberXML===1&&this.musicSheet.SourceMeasures.length===0&&(this.musicSheet.DefaultStartTempoInBpm=this.soundTempo),this.musicSheet.HasBPMInfo=!0,x.dotted=b,x.beatUnit=y.value,this.currentMultiTempoExpression.addExpression(x,""),this.currentMultiTempoExpression.CombinedExpressionsText="test"}return}if(m=g.element("dynamics"),m){const y=e.element("notations")!==void 0;this.interpretInstantaneousDynamics(m,r,s,y);return}if(m=g.element("words"),m){const y=g.elements("words");let b="";for(const S of y)b+=S.value;if(m.value=b,u||isSpeedKeyword(m.value)||isSpeedHiddenKeyword(m.value)){this.createNewTempoExpressionIfNeeded(r),this.currentMultiTempoExpression.CombinedExpressionsText=m.value,(isSpeedKeyword(m.value)||isSpeedHiddenKeyword(m.value))&&(m.value=void 0);const S=new InstantaneousTempoExpression(m.value,this.placement,this.staffNumber,this.soundTempo,this.currentMultiTempoExpression);this.currentMultiTempoExpression.addExpression(S,"")}else c||this.interpretWords(m,r,s);return}if(m=g.element("wedge"),m){this.interpretWedge(m,r,o,r.MeasureNumber);return}if(m=g.element("rehearsal"),m){this.interpretRehearsalMark(m,r,s,r.MeasureNumber);return}}closeOpenExpressions(e,r){for(const s of this.openContinuousDynamicExpressions)this.createNewMultiExpressionIfNeeded(e,s.NumberXml,r),this.closeOpenContinuousDynamic(s,e,r);this.openContinuousTempoExpression&&this.closeOpenContinuousTempo(Fraction$1.plus(e.AbsoluteTimestamp,r))}addOctaveShift(e,r,s){var u;let o=1;const a=e.element("staff");if(a)try{o=parseInt(a.value,10)}catch(c){const d=ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftStaffError","Invalid octave shift staff number. Set to default");this.musicSheet.SheetErrors.pushMeasureError(d),o=1,loglevelExports.debug("ExpressionReader.addOctaveShift",d,c)}const l=e.element("direction-type");if(l){const c=l.element("octave-shift"),d=this.readPlacement(e);if(c!==void 0&&c.hasAttributes)try{const g=this.readNumber(c);if(c.attribute("size")){const m=parseInt(c.attribute("size").value,10);let y=0;m===8?y=1:m===15&&(y=2);let b=(u=c.attribute("type"))==null?void 0:u.value;if(b||(d===PlacementEnum.Above?b="down":d===PlacementEnum.Below&&(b="up")),b==="up"||b==="down"){const S=new OctaveShift(b,y);S.StaffNumber=o,this.getMultiExpression=this.createNewMultiExpressionIfNeeded(r,g),this.getMultiExpression.OctaveShiftStart=S,S.ParentStartMultiExpression=this.getMultiExpression,this.openOctaveShift=S}else if(b==="stop"){if(this.openOctaveShift){this.getMultiExpression=this.createNewMultiExpressionIfNeeded(r,this.openOctaveShift.numberXml,s);const S=this.getMultiExpression;S.OctaveShiftEnd=this.openOctaveShift,this.openOctaveShift.ParentEndMultiExpression=this.getMultiExpression,this.openOctaveShift=void 0}}else b||loglevelExports.debug("octave-shift missing type in xml")}}catch(g){const m=ITextTranslation.translateText("ReaderErrorMessages/OctaveShiftError","Error while reading octave shift.");this.musicSheet.SheetErrors.pushMeasureError(m),loglevelExports.debug("ExpressionReader.addOctaveShift",m,g)}}}addPedalMarking(e,r,s){var a,l,u;const o=e.element("direction-type");if(o){const c=o.element("pedal");if(c!==void 0&&c.hasAttributes){let d=!1,g=!1;try{switch(((a=c.attribute("line"))==null?void 0:a.value)==="yes"?g=!0:((l=c.attribute("line"))==null?void 0:l.value)==="no"?(g=!1,d=!0):((u=c.attribute("sign"))==null?void 0:u.value)==="yes"?d=!0:(d=!1,g=!0),c.attribute("type").value){case"start":this.openPedal&&this.openPedal.IsLine&&this.endOpenPedal(r),this.createNewMultiExpressionIfNeeded(r,-1),this.openPedal=new Pedal(g,d),this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openPedal&&this.endOpenPedal(r,s);break;case"change":this.openPedal&&this.openPedal.IsLine&&(this.openPedal.ChangeEnd=!0,this.createNewMultiExpressionIfNeeded(r,-1),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.createNewMultiExpressionIfNeeded(r,-1),this.openPedal=new Pedal(g,d),this.openPedal.ChangeBegin=!0,this.getMultiExpression.PedalStart=this.openPedal,this.openPedal.ParentStartMultiExpression=this.getMultiExpression);break;case"continue":break;default:break}}catch(m){const y=ITextTranslation.translateText("ReaderErrorMessages/PedalError","Error while reading pedal.");this.musicSheet.SheetErrors.pushMeasureError(y),loglevelExports.debug("ExpressionReader.addPedalMarking",y,m)}}}}endOpenPedal(e,r){this.createNewMultiExpressionIfNeeded(e,-1,r),this.getMultiExpression.PedalEnd=this.openPedal,this.openPedal.ParentEndMultiExpression=this.getMultiExpression,this.openPedal=void 0}addWavyLine(e,r,s,o){if(e&&e.hasAttributes)try{switch(e.attribute("type").value){case"start":this.createNewMultiExpressionIfNeeded(r,-1),this.openWavyLine=new WavyLine(this.placement),this.getMultiExpression.WavyLineStart=this.openWavyLine,this.openWavyLine.ParentStartMultiExpression=this.getMultiExpression;break;case"stop":this.openWavyLine&&(this.createNewMultiExpressionIfNeeded(r,-1,s),this.getMultiExpression.WavyLineEnd=this.openWavyLine,this.openWavyLine.ParentEndMultiExpression=this.getMultiExpression,this.openWavyLine=void 0);break;case"continue":break;default:break}}catch(a){const l=ITextTranslation.translateText("ReaderErrorMessages/WavyLineError","Error while reading wavy-line.");this.musicSheet.SheetErrors.pushMeasureError(l),loglevelExports.debug("ExpressionReader.addWavyLine",l,a)}}initialize(){this.placement=PlacementEnum.NotYetDefined,this.soundTempo=0,this.soundDynamic=0,this.offsetDivisions=0}readPlacement(e){var s;const r=(s=e.attribute("placement"))==null?void 0:s.value;return r==="above"?PlacementEnum.Above:r==="below"?PlacementEnum.Below:PlacementEnum.NotYetDefined}readExpressionPlacement(e,r){try{const s=this.readPosition(e);s<0?this.placement=PlacementEnum.Below:s>0&&(this.placement=PlacementEnum.Above)}catch(s){loglevelExports.debug("ExpressionReader.readExpressionParameters",r,s)}}readPosition(e){try{const r=parseInt(e.value,10);return r<0?this.placement=PlacementEnum.Below:r>0&&(this.placement=PlacementEnum.Above),r}catch(r){loglevelExports.debug("ExpressionReader.readExpressionParameters",r)}}interpretInstantaneousDynamics(e,r,s,o){var a,l,u;if(e.hasElements){e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(s));const c=this.readNumber(e);let d=(a=e.elements()[0])==null?void 0:a.name;if(d==="other-dynamics"&&(d=e.elements()[0].value),d){if((l=r.Rules)!=null&&l.IgnoreRepeatedDynamics){let m;try{m=DynamicEnum[d]}catch(y){const b=ITextTranslation.translateText("ReaderErrorMessages/DynamicError","Error while reading dynamic.");this.musicSheet.SheetErrors.pushMeasureError(b);return}if(((u=this.activeInstantaneousDynamic)==null?void 0:u.DynEnum)===m)return}o?this.createNewMultiExpressionIfNeeded(r,c,Fraction$1.createFromFraction(s)):this.createNewMultiExpressionIfNeeded(r,c);const g=new InstantaneousDynamicExpression(d,this.soundDynamic,this.placement,this.staffNumber,r);g.InMeasureTimestamp=s.clone(),this.getMultiExpression.addExpression(g,""),this.initialize(),this.activeInstantaneousDynamic?this.activeInstantaneousDynamic.DynEnum=g.DynEnum:this.activeInstantaneousDynamic=new InstantaneousDynamicExpression(d,0,PlacementEnum.NotYetDefined,1,r)}}}interpretWords(e,r,s){var b;const o=e.value;if(r.Rules.IgnoreBracketsWords&&(/^\(\s*\)$/.test(o)||/^\[\s*\]$/.test(o)))return;let a;const l=e.attribute("font-style");let u,c,d;l&&(u=l.value,u==="italic"&&(a=FontStyles.Italic));const g=e.attribute("font-weight");g&&(c=g.value,c==="bold"&&(a=FontStyles.Bold,u==="italic"&&(a=FontStyles.BoldItalic)));const m=e.attribute("color");m&&(d=m.value);let y;if(r.Rules.PlaceWordsInsideStafflineFromXml){const S=(b=e.attribute("default-y"))==null?void 0:b.value;(S==null?void 0:S.length)>0&&(y=Number.parseInt(S,10))}if(o.length>0){if(e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(s)),this.checkIfWordsNodeIsRepetitionInstruction(o))return;this.fillMultiOrTempoExpression(o,r,s,a,d,y),this.initialize()}}readNumber(e){var o;let r=1;const s=(o=e.attribute("number"))==null?void 0:o.value;return s&&(r=Number.parseInt(s,10)),r}interpretWedge(e,r,s,o){var u,c;e!==void 0&&e.hasAttributes&&e.attribute("default-x")&&(this.directionTimestamp=Fraction$1.createFromFraction(s));const a=this.readNumber(e),l=(c=(u=e.attribute("type"))==null?void 0:u.value)==null?void 0:c.toLowerCase();this.lastWedge&&this.lastWedge.parentMeasure.MeasureNumberXML===r.MeasureNumberXML&&this.lastWedge.StaffNumber===this.staffNumber&&this.placement===this.lastWedge.Placement&&this.WedgeYPosXml!==void 0&&this.lastWedge.YPosXml===this.WedgeYPosXml&&this.lastWedge.StartMultiExpression.Timestamp.Equals(this.directionTimestamp)&&this.lastWedge.DynamicType===ContDynamicEnum[l]||(l==="stop"?this.createNewMultiExpressionIfNeeded(r,a,s):this.createNewMultiExpressionIfNeeded(r,a),this.addWedge(e,r,s),this.initialize())}interpretRehearsalMark(e,r,s,o){r.rehearsalExpression=new RehearsalExpression(e.value,this.placement)}createNewMultiExpressionIfNeeded(e,r,s=void 0){s||(s=this.directionTimestamp);let o=this.getMultiExpression;return(!o||o&&(o.SourceMeasureParent!==e||o.numberXml!==r||o.SourceMeasureParent===e&&o.Timestamp!==s))&&(this.getMultiExpression=o=new MultiExpression(e,Fraction$1.createFromFraction(s)),e.StaffLinkedExpressions[this.globalStaffIndex].push(o)),o}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,r,s){if(e!==void 0&&e.hasAttributes){const o=this.readNumber(e),a=e.attribute("type").value.toLowerCase();try{if(a==="crescendo"||a==="diminuendo"){const l=new ContinuousDynamicExpression(ContDynamicEnum[a],this.placement,this.staffNumber,r,this.activeInstantaneousDynamic,o);this.lastWedge=l,this.lastWedge.YPosXml=this.WedgeYPosXml,this.openContinuousDynamicExpressions.push(l);let u=this.getMultiExpression;u||(u=this.createNewMultiExpressionIfNeeded(r,o)),u.StartingContinuousDynamic=l,l.StartMultiExpression=u,this.activeInstantaneousDynamic!==void 0&&this.activeInstantaneousDynamic.StaffNumber===l.StaffNumber&&(this.activeInstantaneousDynamic=void 0)}else if(a==="stop")for(const l of this.openContinuousDynamicExpressions)l.NumberXml===o&&this.closeOpenContinuousDynamic(l,r,s)}catch(l){const u="ReaderErrorMessages/WedgeError, Error while reading Crescendo / Diminuendo.";this.musicSheet.SheetErrors.pushMeasureError(u),loglevelExports.debug("ExpressionReader.addWedge",u,l)}}}fillMultiOrTempoExpression(e,r,s,o,a,l=void 0){if(!e)return;const u=e.trim();this.createExpressionFromString("",u,r,s,e,o,a,l)}createExpressionFromString(e,r,s,o,a,l,u,c=void 0){if(InstantaneousTempoExpression.isInputStringInstantaneousTempo(r)||ContinuousTempoExpression.isInputStringContinuousTempo(r)){if(s.TempoExpressions.length>0)for(let y=0,b=s.TempoExpressions.length;y0)for(let y=0,b=s.TempoExpressions.length;y0&&!this.hasDigit(r)&&this.globalStaffIndex>0){if(S.EntriesList[0].label.indexOf(r)>=0)return!1;break}}let g=TextAlignmentEnum.CenterBottom;this.musicSheet.Rules.CompactMode&&(g=TextAlignmentEnum.LeftBottom);const m=new UnknownExpression(r,this.placement,g,this.staffNumber);return m.fontStyle=l,m.ColorXML=u,m.defaultYXml=c,d.addExpression(m,e),!1}closeOpenContinuousDynamic(e,r,s){if(!e)return;const o=e.NumberXml;e.EndMultiExpression=this.createNewMultiExpressionIfNeeded(r,o,s),e.StartMultiExpression.EndingContinuousDynamic=e,this.openContinuousDynamicExpressions=this.openContinuousDynamicExpressions.filter(a=>a!==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 SlurReader{constructor(e){this.openSlurDict={},this.musicSheet=e}addSlur(e,r,s){try{if(e){for(const o of e)if(o.attributes().length>0){const a=o.attribute("type").value;let l=1;try{o.attribute("number")&&(l=parseInt(o.attribute("number").value,10))}catch(g){loglevelExports.debug("VoiceGenerator.addSlur number: ",g)}let u=PlacementEnum.NotYetDefined;const c=o.attribute("placement");c&&c.value&&(c.value==="above"?u=PlacementEnum.Above:c.value==="below"&&(u=PlacementEnum.Below));const d=o.attribute("orientation");if(d&&d.value&&(d.value==="over"?u=PlacementEnum.Above:d.value==="under"&&(u=PlacementEnum.Below)),a==="start"){let g=new Slur;this.openSlurDict[l]=g,g.StartNote=r,g.idx=s,g.PlacementXml=u}else if(a==="stop"){const g=this.openSlurDict[l];if(g){const m=o.name;if(m==="slide"||m==="glissando"){const y=g.StartNote,b=new Glissando(y);b.AddNote(r),b.EndNote=r,r.NoteGlissando=b,delete this.openSlurDict[l]}else g.idx=s,g.EndNote=r,r.isDuplicateSlur(g)||(r.NoteSlurs.push(g),g.StartNote.NoteSlurs.push(g)),delete this.openSlurDict[l]}}}}}catch(o){const a=ITextTranslation.translateText("ReaderErrorMessages/SlurError","Error while reading slur.");this.musicSheet.SheetErrors.pushMeasureError(a)}}}class InstrumentReader{constructor(e,r,s,o){this.voiceGeneratorsDict={},this.staffMainVoiceGeneratorDict={},this.divisions=0,this.currentClefNumber=1,this.currentXmlMeasureIndex=0,this.activeKeyHasBeenInitialized=!1,this.abstractInstructions=[],this.soundTempos=new Map,this.xmlNotes=[],this.repetitionInstructionReader=r,this.xmlMeasureList=s,this.musicSheet=o.GetMusicSheet,this.instrument=o,this.activeClefs=new Array(o.Staves.length),this.activeClefsHaveBeenInitialized=new Array(o.Staves.length);for(let a=0;a=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 o=new Fraction$1(0,1),a=new Fraction$1(0,1),l=!1;this.maxTieNoteFraction=new Fraction$1(0,1);let u=!1;const c=[];let d=!1;try{const C=this.xmlMeasureList[this.currentXmlMeasureIndex],T=C.elements();if(e.Rules.UseXMLMeasureNumbers&&!Number.isInteger(e.MeasureNumberXML)){const B=parseInt((g=C.attribute("number"))==null?void 0:g.value,10);Number.isInteger(B)&&(e.MeasureNumberXML=B)}let _;for(let B=0;B0&&(_=T[B-1]),M.name==="print"){const N=M.attribute("new-system");(N==null?void 0:N.value)==="yes"&&(e.printNewSystemXml=!0);const I=M.attribute("new-page");(I==null?void 0:I.value)==="yes"&&(e.printNewPageXml=!0)}else if(M.name==="attributes"){const N=M.element("divisions");if(N&&(this.divisions=parseInt(N.value,10),isNaN(this.divisions))){const F=ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(loglevelExports.debug("InstrumentReader.readNextXmlMeasure",F),this.divisions=this.readDivisionsFromNotes(),this.divisions>0)this.musicSheet.SheetErrors.push(F+this.instrument.Name);else throw l=!0,new MusicSheetReadingException(F+this.instrument.Name)}if(!M.element("divisions")&&this.divisions===0&&this.currentXmlMeasureIndex===0){const F=ITextTranslation.translateText("ReaderErrorMessages/DivisionError","Invalid divisions value at Instrument: ");if(this.divisions=this.readDivisionsFromNotes(),this.divisions>0)this.musicSheet.SheetErrors.push(F+this.instrument.Name);else throw l=!0,new MusicSheetReadingException(F+this.instrument.Name)}this.addAbstractInstruction(M,s,_,o.clone()),o.Equals(new Fraction$1(0,1))&&this.isAttributesNodeAtBeginOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],M)&&this.saveAbstractInstructionList(this.instrument.Staves.length,!0),this.isAttributesNodeAtEndOfMeasure(this.xmlMeasureList[this.currentXmlMeasureIndex],M,o)&&this.saveClefInstructionAtEndOfMeasure();const I=M.elements("staff-details");for(const F of I){const k=F.element("staff-lines");if(k){let V=1;const D=F.attribute("number");D&&(V=parseInt(D.value,10)),this.instrument.Staves[V-1].StafflineCount=parseInt(k.value,10)}}const R=M.element("measure-style");if(R){const F=R.element("multiple-rest");if(F){const k=F.value;let V=0;try{V=Number.parseInt(k,10),e.multipleRestMeasures!==void 0&&V!==e.multipleRestMeasures?e.multipleRestMeasures=0:(e.multipleRestMeasures=V,this.currentMultirestStartMeasure=e,this.followingMultirestMeasures=V+1)}catch(D){console.log("multirest parse error: "+D)}}}}else if(M.name==="note"){let N=!0;((m=M.attribute("print-object"))==null?void 0:m.value)==="no"&&(N=!1);const I=this.getNoteStaff(M);this.currentStaff=this.instrument.Staves[I-1];const R=M.element("chord")!==void 0;if(M.element("voice")){const z=parseInt(M.element("voice").value,10);this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(z,I-1)}else(!R||!this.currentVoiceGenerator)&&(this.currentVoiceGenerator=this.getOrCreateVoiceGenerator(1,I-1));let F=0,k=new Fraction$1(0,1),V=2,D,$=!1;if(M.element("duration")){if(F=parseInt(M.element("duration").value,10),isNaN(F)){const z=ITextTranslation.translateText("ReaderErrorMessages/NoteDurationError","Invalid Note Duration.");this.musicSheet.SheetErrors.pushMeasureError(z),loglevelExports.debug("InstrumentReader.readNextXmlMeasure",z);continue}else if(k=new Fraction$1(F,4*this.divisions),F===0?k=this.getNoteDurationFromTypeNode(M):D=this.getNoteDurationFromTypeNode(M),M.element("time-modification")){k=this.getNoteDurationForTuplet(M);const z=M.element("time-modification");z!=null&&z.element("normal-notes")&&(V=parseInt(z.element("normal-notes").value,10)),$=!0}}const O=M.element("rest")!==void 0,q=M.combinedElement("notations"),G=M.element("grace")!==void 0||F===0||R&&u;let U=!1,Z=!1;if(G){const z=M.element("duration"),me=M.element("grace");me&&me.attributes()&&me.attribute("slash")&&me.attribute("slash").value==="yes"&&(U=!0),z||(k=this.getNoteDurationFromTypeNode(M)),q&&q.element("slur")&&(Z=!0)}const[W,K]=this.getCueNoteAndNoteTypeXml(M),[ye,ae,Y]=this.getStemDirectionAndColors(M);let Q,he=0,ge="",Se="",Ie="";if(q){const z=q.element("ornaments");if(z){Q=this.getTremoloInfo(z),this.getWavyLines(z,M,o,a);const fe=z.element("tremolo");if(fe){const Ae=fe.attribute("type");if(ge=Ae.value,Ae){const Pe=parseInt(fe.value,10);Pe>0&&(he=Pe),(Ae.value==="start"||Ae.value==="stop")&&(k=new Fraction$1(parseInt(M.element("duration").value,10),4*this.divisions))}}const _e=z.elements("wavy-line");if(_e!==void 0)for(const Ae of _e){const Pe=this.expressionReaders[this.readExpressionStaffNumber(M)-1];Pe&&(Pe.readExpressionParameters(Ae,this.instrument,this.divisions,o,a,this.currentMeasure.MeasureNumber,!1),Pe.addWavyLine(Ae,this.currentMeasure,o,a))}}q.elements("glissando").find(fe=>fe.attribute("type").value==="start")&&(Se="start"),q.elements("slide").find(fe=>fe.attribute("type").value==="start")&&(Ie="start")}const Me=R?a.clone():o.clone();this.currentStaffEntry=this.currentMeasure.findOrCreateStaffEntry(Me,this.inSourceMeasureInstrumentIndex+I-1,this.currentStaff).staffEntry,(!this.currentVoiceGenerator.hasVoiceEntry()||!R&&!G&&!u||G&&!u||G&&!R||!G&&u)&&this.currentVoiceGenerator.createVoiceEntry(Me,this.currentStaffEntry,this.activeKey,this.ActiveRhythm,G,U,Z),!G&&!R&&(a=o.clone(),o.Add(k)),R&&this.currentStaffEntry!==void 0&&this.currentStaffEntry.ParentStaff!==this.currentStaff&&(this.currentStaffEntry=this.currentVoiceGenerator.checkForStaffEntryLink(this.inSourceMeasureInstrumentIndex+I-1,this.currentStaff,this.currentStaffEntry,this.currentMeasure));const te=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,te),this.activeRhythm,!$&&!G&&(k=new Fraction$1(F,4*this.divisions));const oe=M.elements("dot").length;if(this.currentVoiceGenerator.read(M,k,D,K,V,O,this.currentStaffEntry,this.currentMeasure,r,this.maxTieNoteFraction,R,s,N,W,G,ye,Q,ae,Y,oe,ge,Se,Ie),q!==void 0&&q.element("dynamics")){const z=this.expressionReaders[this.readExpressionStaffNumber(M)-1];z&&(z.readExpressionParameters(M,this.instrument,this.divisions,o,a,this.currentMeasure.MeasureNumber,!1),z.read(M,this.currentMeasure,a,void 0,c.length))}u=G}else if(M.name==="forward"){const N=parseInt(M.element("duration").value,10);o.Add(new Fraction$1(N,4*this.divisions))}else if(M.name==="backup"){const N=parseInt(M.element("duration").value,10);o.Sub(new Fraction$1(N,4*this.divisions)),o.IsNegative()&&(o=new Fraction$1(0,1)),a.Sub(new Fraction$1(N,4*this.divisions)),a.IsNegative()&&(a=new Fraction$1(0,1))}else if(M.name==="direction"){const N=M.elements("direction-type"),I=M.element("direction-type");let R=Math.min(1,o.RealValue);this.activeRhythm!==void 0&&this.activeRhythm.Rhythm&&(R/=this.activeRhythm.Rhythm.RealValue);let F=!1;if(this.repetitionInstructionReader&&(F=this.repetitionInstructionReader.handleRepetitionInstructionsFromWordsOrSymbols(I,R)),!F){let k=this.expressionReaders[0];const V=this.readExpressionStaffNumber(M)-1;if(VO==null?void 0:O.toLocaleLowerCase()).includes((y=D.value)==null?void 0:y.toLocaleLowerCase())&&(this.currentGradualChangeMeasure=this.currentMeasure,this.currentMeasure.speedInfo={startWord:(b=D.value)==null?void 0:b.toLocaleLowerCase(),startXmlNoteIndex:c.length,endXmlNoteIndex:0,resetXmlNoteIndex:0,startMeasureListIndex:this.currentXmlMeasureIndex,endMeasureListIndex:0,resetMeasureListIndex:0},this.xmlNotes=[]),D.value.startsWith(GRADIENT_SPEED_CLOSE_TAG)&&((S=this.currentGradualChangeMeasure)!=null&&S.speedInfo)&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:this.xmlNotes.length,endMeasureListIndex:this.currentXmlMeasureIndex}),((A=D.value)==null?void 0:A.toLocaleLowerCase())==="a tempo".toLocaleLowerCase()&&((E=this.currentGradualChangeMeasure)!=null&&E.speedInfo)){const{endXmlNoteIndex:O,resetXmlNoteIndex:q,endMeasureListIndex:G}=this.currentGradualChangeMeasure.speedInfo;q===0&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:O||this.xmlNotes.length,endMeasureListIndex:G||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.xmlNotes=[]}D.value&&D.value.toLocaleLowerCase()==="hiddenspeed"?d=!0:d=!1}if(N.find($=>$.element("metronome"))&&((x=this.currentGradualChangeMeasure)!=null&&x.speedInfo)){const{endXmlNoteIndex:$,resetXmlNoteIndex:O,endMeasureListIndex:q}=this.currentGradualChangeMeasure.speedInfo;O===0&&(this.currentGradualChangeMeasure.speedInfo={...this.currentGradualChangeMeasure.speedInfo,endXmlNoteIndex:$||this.xmlNotes.length,endMeasureListIndex:q||this.currentXmlMeasureIndex,resetXmlNoteIndex:this.xmlNotes.length,resetMeasureListIndex:this.currentXmlMeasureIndex}),this.xmlNotes=[]}k.readExpressionParameters(M,this.instrument,this.divisions,o,a,this.currentMeasure.MeasureNumber,!1),k.read(M,this.currentMeasure,o,a.clone(),c.length,d)}}}else if(M.name==="barline"){this.repetitionInstructionReader&&this.repetitionInstructionReader.handleLineRepetitionInstructions(M)&&(this.currentMeasure.HasEndLine=!0);const N=M.attribute("location");if(B===T.length-1||N&&N.value==="right"){const R=(P=M.element("bar-style"))==null?void 0:P.value;R&&(this.currentMeasure.endingBarStyleXml=R,this.currentMeasure.endingBarStyleEnum=SystemLinesEnumHelper.xmlBarlineStyleToSystemLinesEnum(R))}}else if(M.name==="sound")try{if(M.attribute("tempo")){const N=parseFloat(M.attribute("tempo").value);M.element("offset")&&(this.soundTempos.has(this.currentXmlMeasureIndex)||this.soundTempos.set(this.currentXmlMeasureIndex,[]),this.soundTempos.get(this.currentXmlMeasureIndex).push(N)),this.currentXmlMeasureIndex===0&&(this.musicSheet.DefaultStartTempoInBpm=N,this.musicSheet.HasBPMInfo=!0)}}catch(N){loglevelExports.debug("InstrumentReader.readTempoInstruction",N)}else if(M.name==="harmony"){const N=this.getNoteStaff(M);this.currentStaff=this.instrument.Staves[N-1];const I=o.clone();this.currentStaffEntry=this.currentMeasure.findOrCreateStaffEntry(I,this.inSourceMeasureInstrumentIndex+N-1,this.currentStaff).staffEntry,this.currentStaffEntry.ChordContainers.push(ChordSymbolReader.readChordSymbol(M,this.musicSheet,this.activeKey))}}for(const B in this.voiceGeneratorsDict)this.voiceGeneratorsDict.hasOwnProperty(B)&&this.voiceGeneratorsDict[B].checkForOpenBeam();if(this.currentXmlMeasureIndex===this.xmlMeasureList.length-1){for(let B=0;B{this.voiceGeneratorsDict[B].finalizeReadingMeasure()}),this.musicSheet.HasBPMInfo?e.TempoInBPM===0&&this.previousMeasure&&(this.currentMeasure.TempoInBPM=this.previousMeasure.TempoInBPM):this.currentMeasure.TempoInBPM=120}catch(C){if(l)throw new MusicSheetReadingException(C.Message);const T=ITextTranslation.translateText("ReaderErrorMessages/MeasureError","Error while reading Measure.");this.musicSheet.SheetErrors.pushMeasureError(T),loglevelExports.debug("InstrumentReader.readNextXmlMeasure",T,C)}return this.previousMeasure=this.currentMeasure,this.currentXmlMeasureIndex+=1,!0}getStemDirectionAndColors(e){let r=StemDirectionType.Undefined,s;const o=e.element("stem");if(o){r=this.getStemDirectionType(o);const u=o.attribute("color");u&&(s=this.parseXmlColor(u.value))}let a=this.getNoteHeadColorXml(e);const l=this.getNoteColorXml(e);return l&&!a&&(a=l),l&&!s&&(s=l),[r,s,a]}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,r){const s=this.instrument.Staves[r];let o=this.voiceGeneratorsDict[e];if(o)s.Voices.indexOf(o.GetVoice)===-1&&s.Voices.push(o.GetVoice);else{const a=this.staffMainVoiceGeneratorDict[r];a?(o=new VoiceGenerator(this.pluginManager,s,e,this.slurReader,a.GetVoice),s.Voices.push(o.GetVoice),this.voiceGeneratorsDict[e]=o):(o=new VoiceGenerator(this.pluginManager,s,e,this.slurReader),s.Voices.push(o.GetVoice),this.voiceGeneratorsDict[e]=o,this.staffMainVoiceGeneratorDict[r]=o)}return o}createExpressionGenerators(e){this.expressionReaders=new Array(e);for(let r=0;r0?r=this.musicSheet.SourceMeasures[0]:r=this.currentMeasure;const s=new ClefInstruction(ClefEnum.G,0,2);let o;r.FirstInstructionsStaffEntries[e]?(o=r.FirstInstructionsStaffEntries[e],o.removeFirstInstructionOfTypeClefInstruction()):(o=new SourceStaffEntry(void 0,void 0),r.FirstInstructionsStaffEntries[e]=o),s.Parent=o,o.Instructions.splice(0,0,s)}createDefaultKeyInstruction(){let e;this.musicSheet.SourceMeasures.length>0?e=this.musicSheet.SourceMeasures[0]:e=this.currentMeasure;const r=new KeyInstruction(void 0,0,KeyEnum.major);for(let s=this.inSourceMeasureInstrumentIndex;s0&&s[o-1].name==="backup")return!0;let a=-1;for(let l=0;l0||a<0}isAttributesNodeAtEndOfMeasure(e,r,s){var u;if(s.Equals((u=this.ActiveRhythm)==null?void 0:u.Rhythm))return!0;const o=e.elements().slice();let a=0;for(let c=0;cl}getNoteDurationFromTypeNode(e){const r=e.element("type");if(r){const s=r.value;return NoteTypeHandler.getNoteDurationFromType(s)}return new Fraction$1(0,4*this.divisions)}addAbstractInstruction(e,r,s,o){if(e.element("divisions")&&e.elements().length===1)return;const a=e.element("transpose");if(a){const c=a.element("chromatic");c&&(this.instrument.PlaybackTranspose=parseInt(c.value,10))}const l=e.elements("clef");let u;if(l.length>0)for(let c=0,d=l.length;cthis.currentClefNumber&&(b=this.currentClefNumber),this.currentClefNumber=b+1}catch(C){u=ITextTranslation.translateText("ReaderErrorMessages/ClefError","Invalid clef. Using default."),this.musicSheet.SheetErrors.pushMeasureError(u),b=1,this.currentClefNumber=b+1}const P=new ClefInstruction(m,S,y);this.abstractInstructions.push([b,P,o])}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){u=ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key. Set to default."),this.musicSheet.SheetErrors.pushMeasureError(u),c=0,loglevelExports.debug("InstrumentReader.addAbstractInstruction",u,b)}let g=KeyEnum.none,m=e.element("key");if(m&&(m=m.element("mode")),m)try{g=KeyEnum[m.value]}catch(b){u=ITextTranslation.translateText("ReaderErrorMessages/KeyError","Invalid key/mode. Set to default."),this.musicSheet.SheetErrors.pushMeasureError(u),g=KeyEnum.major,loglevelExports.debug("InstrumentReader.addAbstractInstruction",u,b)}const y=new KeyInstruction(void 0,c,g);this.abstractInstructions.push([1,y,o])}if(e.element("time")){const c=e.element("time");let d=RhythmSymbolEnum.NONE,g=!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 P=c.attribute("print-object");P&&P.value==="no"&&(g=!1)}let m=0,y=0;const b=c&&c.element("senza-misura")!==void 0,S=e.elements("time"),A=[],E=[];for(let x=0,P=S.length;x0&&E!==void 0&&A.length===E.length){const P=A.length,C=new Array(P);let T=0;for(let _=0;_=0;s--){const o=this.abstractInstructions[s],a=o[0],l=o[1],u=o[2];if(l instanceof ClefInstruction){const c=l;if(this.currentXmlMeasureIndex===0||a<=this.activeClefs.length&&c!==this.activeClefs[a-1])if(!r&&this.currentStaffEntry!==void 0&&!this.currentStaffEntry.hasNotes()&&a-1===this.instrument.Staves.indexOf(this.currentStaffEntry.ParentStaff)){const d=c,g=this.currentStaffEntry;if(u&&Math.abs(u.RealValue-g.Timestamp.RealValue)>.01)continue;d.Parent=g,g.removeFirstInstructionOfTypeClefInstruction(),g.Instructions.push(d),this.activeClefs[a-1]=c,this.abstractInstructions.splice(s,1)}else if(r){if(u.RealValue!==0)continue;let d;if(this.currentMeasure){const g=c,m=this.inSourceMeasureInstrumentIndex+a-1,y=this.currentMeasure.FirstInstructionsStaffEntries[m];if(this.currentXmlMeasureIndex===0)if(!y)d=new SourceStaffEntry(void 0,void 0),this.currentMeasure.FirstInstructionsStaffEntries[m]=d,g.Parent=d,d.Instructions.push(g),this.activeClefsHaveBeenInitialized[a-1]=!0;else if(this.currentMeasure.FirstInstructionsStaffEntries[m]!==void 0&&!(y.Instructions[0]instanceof ClefInstruction))d=y,g.Parent=d,d.removeFirstInstructionOfTypeClefInstruction(),d.Instructions.splice(0,0,g),this.activeClefsHaveBeenInitialized[a-1]=!0;else{const b=new SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[m]=b,g.Parent=b,b.Instructions.push(g)}else if(this.activeClefsHaveBeenInitialized[a-1]){let b=this.previousMeasure;this.followingMultirestMeasures>0&&this.currentMeasure.Rules.RenderMultipleRestMeasures&&(b=this.currentMultirestStartMeasure);const S=new SourceStaffEntry(void 0,void 0);b.LastInstructionsStaffEntries[m]=S,g.Parent=S,S.Instructions.push(g)}else{const b=this.musicSheet.SourceMeasures[0];b.FirstInstructionsStaffEntries[m]?(d=b.FirstInstructionsStaffEntries[m],d.removeFirstInstructionOfTypeClefInstruction()):d=new SourceStaffEntry(void 0,void 0),g.Parent=d,d.Instructions.splice(0,0,g),this.activeClefsHaveBeenInitialized[a-1]=!0}this.activeClefs[a-1]=c,this.abstractInstructions.splice(s,1)}}else{let d;const g=this.activeRhythm.Rhythm;g.RealValue>0&&u.RealValue/g.RealValue>.9&&g.RealValue!==u.RealValue&&(this.currentMeasure.LastInstructionsStaffEntries[a-1]||(this.currentMeasure.LastInstructionsStaffEntries[a-1]=new SourceStaffEntry(void 0,this.instrument.Staves[a-1])),d=this.currentMeasure.LastInstructionsStaffEntries[a-1]),d&&(c.Parent=d,d.Instructions.push(c),this.activeClefs[a-1]=c,this.abstractInstructions.splice(s,1))}else a<=this.activeClefs.length&&c===this.activeClefs[a-1]&&this.abstractInstructions.splice(s,1)}if(l instanceof KeyInstruction){const c=l;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 g=this.inSourceMeasureInstrumentIndex;g=0;e--){const r=this.abstractInstructions[e][0],s=this.abstractInstructions[e][1];if(s instanceof ClefInstruction){const o=s;if(!this.activeClefs[r-1]||o.ClefType!==this.activeClefs[r-1].ClefType||o.ClefType===this.activeClefs[r-1].ClefType&&o.Line!==this.activeClefs[r-1].Line){const a=new SourceStaffEntry(void 0,void 0);this.currentMeasure.LastInstructionsStaffEntries[this.inSourceMeasureInstrumentIndex+r-1]=a;const l=o;l.Parent=a,a.Instructions.push(l),this.activeClefs[r-1]=o,this.abstractInstructions.splice(e,1)}}}}getNoteDurationForTuplet(e){let r=new Fraction$1(0,1);const s=this.getNoteDurationFromTypeNode(e);if(e.element("time-modification")){const o=e.element("time-modification");if(o&&o.element("actual-notes")!==void 0&&o.element("normal-notes")){const a=o.element("actual-notes"),l=o.element("normal-notes");if(a!==void 0&&l){const u=parseInt(a.value,10),c=parseInt(l.value,10);r=new Fraction$1(c*s.Numerator,u*s.Denominator)}}}return r}readExpressionStaffNumber(e){let r=1;if(e.element("staff")){const s=e.element("staff");if(s)try{r=parseInt(s.value,10)}catch(o){const a=ITextTranslation.translateText("ReaderErrorMessages/ExpressionStaffError","Invalid Expression staff number. Set to default.");this.musicSheet.SheetErrors.pushMeasureError(a),r=1,loglevelExports.debug("InstrumentReader.readExpressionStaffNumber",a,o)}}return r}readDivisionsFromNotes(){let e=0,r=this.currentXmlMeasureIndex,s=!1;for(;!s;){const o=this.xmlMeasureList[r].elements();for(let a=0,l=o.length;a0){s=!0;break}}if(e===0&&(r++,r===this.xmlMeasureList.length)){const a=ITextTranslation.translateText("ReaderErrorMEssages/DivisionsError","Invalid divisions value at Instrument: ");throw new MusicSheetReadingException(a+this.instrument.Name)}}return e}getCueNoteAndNoteTypeXml(e){const r=e.element("cue");let s=!1;r&&(s=!0);const o=e.element("type");let a=NoteType.UNDEFINED;if(o){const l=o.attribute("size");(l==null?void 0:l.value)==="cue"&&(s=!0),a=NoteTypeHandler.StringToNoteType(o.value)}return[s,a]}getStemDirectionType(e){switch(e.value){case"down":return StemDirectionType.Down;case"up":return StemDirectionType.Up;case"double":return StemDirectionType.Double;case"none":return StemDirectionType.None;default:return StemDirectionType.Undefined}}getNoteHeadColorXml(e){const r=e.element("notehead");if(r){const s=r.attribute("color");if(s)return this.parseXmlColor(s.value)}return null}getNoteColorXml(e){const r=e.attribute("color");return r?this.parseXmlColor(r.value):null}getTremoloInfo(e){let r,s;const o=e.element("tremolo");if(o){const a=o.attribute("type");if(a){if(a.value==="single"){const l=parseInt(o.value,10);l>0&&(r=l)}else r=0;a.value==="unmeasured"&&(s=!0)}}return{tremoloStrokes:r,tremoloUnmeasured:s}}getWavyLines(e,r,s,o){const a=e.elements("wavy-line");if(a)for(const l of a){const u=this.expressionReaders[this.readExpressionStaffNumber(r)-1];u&&(u.readExpressionParameters(l,this.instrument,this.divisions,s,o,this.currentMeasure.MeasureNumber,!1),u.addWavyLine(l,this.currentMeasure,s,o))}}getNoteStaff(e){let r=1;return this.instrument.Staves.length>1&&e.element("staff")&&(r=parseInt(e.element("staff").value,10),isNaN(r)&&(loglevelExports.debug("InstrumentReader.readNextXmlMeasure.get staff number"),r=1)),r}}class InstrumentNames{}InstrumentNames.MidiInstrument={banjo:MidiInstrument.Banjo,blockfloete:MidiInstrument.Recorder,brass:MidiInstrument.Trombone,bratsche:MidiInstrument.Viola,cello:MidiInstrument.Cello,clarinet:MidiInstrument.Clarinet,contrabass:MidiInstrument.Contrabass,"steel drum":MidiInstrument.Steel_Drums,drums:MidiInstrument.Percussion,flute:MidiInstrument.Flute,floete: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.Percussion,piano:MidiInstrument.Acoustic_Grand_Piano,piccolo:MidiInstrument.Piccolo,posaune:MidiInstrument.Trombone,recorder:MidiInstrument.Recorder,sax:MidiInstrument.Tenor_Sax,schlagwerk:MidiInstrument.Percussion,schlagzeug:MidiInstrument.Percussion,steeldrum:MidiInstrument.Steel_Drums,streicher:MidiInstrument.String_Ensemble_1,strings:MidiInstrument.String_Ensemble_1,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,alt:MidiInstrument.Synth_Voice,alto:MidiInstrument.Synth_Voice,bariton:MidiInstrument.Synth_Voice,baritone:MidiInstrument.Synth_Voice,bass:MidiInstrument.Synth_Voice,sopran:MidiInstrument.Synth_Voice,tenor:MidiInstrument.Synth_Voice};InstrumentNames.MidiInstrumentSounds={"brass.alphorn":MidiInstrument.French_Horn,"brass.alto-horn":MidiInstrument.French_Horn,"brass.baritone-horn":MidiInstrument.French_Horn,"brass.bugle":MidiInstrument.Trumpet,"brass.bugle.alto":MidiInstrument.Trumpet,"brass.bugle.baritone":MidiInstrument.Trombone,"brass.bugle.contrabass":MidiInstrument.Trombone,"brass.bugle.euphonium-bugle":MidiInstrument.French_Horn,"brass.bugle.mellophone-bugle":MidiInstrument.French_Horn,"brass.bugle.soprano":MidiInstrument.Trumpet,"brass.cimbasso":MidiInstrument.Trombone,"brass.conch-shell":MidiInstrument.Flute,"brass.cornet":MidiInstrument.Trumpet,"brass.cornet.soprano":MidiInstrument.Trumpet,"brass.cornett":MidiInstrument.Trumpet,"brass.cornett.tenor":MidiInstrument.Trumpet,"brass.cornettino":MidiInstrument.Trumpet,"brass.didgeridoo":MidiInstrument.Flute,"brass.euphonium":MidiInstrument.French_Horn,"brass.fiscorn":MidiInstrument.French_Horn,"brass.flugelhorn":MidiInstrument.French_Horn,"brass.french-horn":MidiInstrument.French_Horn,"brass.group":MidiInstrument.Brass_Section,"brass.group.synth":MidiInstrument.Synth_Brass_1,"brass.helicon":MidiInstrument.French_Horn,"brass.horagai":MidiInstrument.Trumpet,"brass.kuhlohorn":MidiInstrument.French_Horn,"brass.mellophone":MidiInstrument.French_Horn,"brass.natural-horn":MidiInstrument.French_Horn,"brass.ophicleide":MidiInstrument.French_Horn,"brass.posthorn":MidiInstrument.French_Horn,"brass.saxhorn":MidiInstrument.French_Horn,"brass.sousaphone":MidiInstrument.Tuba,"brass.trombone":MidiInstrument.Trombone,"brass.trombone.alto":MidiInstrument.Trombone,"brass.trombone.bass":MidiInstrument.Trombone,"brass.trombone.contrabass":MidiInstrument.Trombone,"brass.trombone.tenor":MidiInstrument.Trombone,"brass.trumpet":MidiInstrument.Trumpet,"brass.trumpet.baroque":MidiInstrument.Trumpet,"brass.trumpet.bass":MidiInstrument.Trombone,"brass.trumpet.bflat":MidiInstrument.Trumpet,"brass.trumpet.c":MidiInstrument.Trumpet,"brass.trumpet.d":MidiInstrument.Trumpet,"brass.trumpet.piccolo":MidiInstrument.Trumpet,"brass.trumpet.pocket":MidiInstrument.Trumpet,"brass.trumpet.slide":MidiInstrument.Trumpet,"brass.trumpet.tenor":MidiInstrument.Trumpet,"brass.tuba":MidiInstrument.Tuba,"brass.tuba.bass":MidiInstrument.Tuba,"brass.tuba.subcontrabass":MidiInstrument.Tuba,"brass.vienna-horn":MidiInstrument.French_Horn,"brass.wagner-tuba":MidiInstrument.French_Horn,"drum.ashiko":MidiInstrument.Shakuhachi,"drum.bass-drum":MidiInstrument.Percussion,"drum.bongo":MidiInstrument.Percussion,"drum.bougarabou":MidiInstrument.Percussion,"drum.buffalo-drum":MidiInstrument.Percussion,"drum.cajon":MidiInstrument.Percussion,"drum.chenda":MidiInstrument.Percussion,"drum.chu-daiko":MidiInstrument.Percussion,"drum.conga":MidiInstrument.Percussion,"drum.cuica":MidiInstrument.Percussion,"drum.dabakan":MidiInstrument.Percussion,"drum.daff":MidiInstrument.Percussion,"drum.dafli":MidiInstrument.Percussion,"drum.daibyosi":MidiInstrument.Percussion,"drum.damroo":MidiInstrument.Percussion,"drum.darabuka":MidiInstrument.Percussion,"drum.def":MidiInstrument.Percussion,"drum.dhol":MidiInstrument.Percussion,"drum.dholak":MidiInstrument.Percussion,"drum.djembe":MidiInstrument.Percussion,"drum.doira":MidiInstrument.Percussion,"drum.dondo":MidiInstrument.Percussion,"drum.doun-doun-ba":MidiInstrument.Percussion,"drum.duff":MidiInstrument.Percussion,"drum.dumbek":MidiInstrument.Percussion,"drum.fontomfrom":MidiInstrument.Percussion,"drum.frame-drum":MidiInstrument.Percussion,"drum.frame-drum.arabian":MidiInstrument.Percussion,"drum.geduk":MidiInstrument.Percussion,"drum.ghatam":MidiInstrument.Percussion,"drum.gome":MidiInstrument.Percussion,"drum.group":MidiInstrument.Percussion,"drum.group.chinese":MidiInstrument.Percussion,"drum.group.ewe":MidiInstrument.Percussion,"drum.group.indian":MidiInstrument.Percussion,"drum.group.set":MidiInstrument.Percussion,"drum.hand-drum":MidiInstrument.Percussion,"drum.hira-daiko":MidiInstrument.Percussion,"drum.ibo":MidiInstrument.Percussion,"drum.igihumurizo":MidiInstrument.Percussion,"drum.inyahura":MidiInstrument.Percussion,"drum.ishakwe":MidiInstrument.Percussion,"drum.jang-gu":MidiInstrument.Percussion,"drum.kagan":MidiInstrument.Percussion,"drum.kakko":MidiInstrument.Percussion,"drum.kanjira":MidiInstrument.Percussion,"drum.kendhang":MidiInstrument.Percussion,"drum.kendhang.ageng":MidiInstrument.Percussion,"drum.kendhang.ciblon":MidiInstrument.Percussion,"drum.kenkeni":MidiInstrument.Percussion,"drum.khol":MidiInstrument.Percussion,"drum.kick-drum":MidiInstrument.Percussion,"drum.kidi":MidiInstrument.Percussion,"drum.ko-daiko":MidiInstrument.Percussion,"drum.kpanlogo":MidiInstrument.Percussion,"drum.kudum":MidiInstrument.Percussion,"drum.lambeg":MidiInstrument.Percussion,"drum.lion-drum":MidiInstrument.Percussion,"drum.log-drum":MidiInstrument.Percussion,"drum.log-drum.african":MidiInstrument.Percussion,"drum.log-drum.native":MidiInstrument.Percussion,"drum.log-drum.nigerian":MidiInstrument.Percussion,"drum.madal":MidiInstrument.Percussion,"drum.maddale":MidiInstrument.Percussion,"drum.mridangam":MidiInstrument.Percussion,"drum.naal":MidiInstrument.Percussion,"drum.nagado-daiko":MidiInstrument.Percussion,"drum.nagara":MidiInstrument.Percussion,"drum.naqara":MidiInstrument.Percussion,"drum.o-daiko":MidiInstrument.Percussion,"drum.okawa":MidiInstrument.Percussion,"drum.okedo-daiko":MidiInstrument.Percussion,"drum.pahu-hula":MidiInstrument.Percussion,"drum.pakhawaj":MidiInstrument.Percussion,"drum.pandeiro":MidiInstrument.Percussion,"drum.pandero":MidiInstrument.Percussion,"drum.powwow":MidiInstrument.Percussion,"drum.pueblo":MidiInstrument.Percussion,"drum.repinique":MidiInstrument.Percussion,"drum.riq":MidiInstrument.Percussion,"drum.rototom":MidiInstrument.Percussion,"drum.sabar":MidiInstrument.Percussion,"drum.sakara":MidiInstrument.Percussion,"drum.sampho":MidiInstrument.Percussion,"drum.sangban":MidiInstrument.Percussion,"drum.shime-daiko":MidiInstrument.Percussion,"drum.slit-drum":MidiInstrument.Percussion,"drum.slit-drum.krin":MidiInstrument.Percussion,"drum.snare-drum":MidiInstrument.Percussion,"drum.snare-drum.electric":MidiInstrument.Synth_Drum,"drum.sogo":MidiInstrument.Percussion,"drum.surdo":MidiInstrument.Percussion,"drum.tabla":MidiInstrument.Percussion,"drum.tabla.bayan":MidiInstrument.Percussion,"drum.tabla.dayan":MidiInstrument.Percussion,"drum.tabor":MidiInstrument.Percussion,"drum.taiko":MidiInstrument.Taiko_Drum,"drum.talking":MidiInstrument.Percussion,"drum.tama":MidiInstrument.Percussion,"drum.tamborim":MidiInstrument.Percussion,"drum.tamborita":MidiInstrument.Percussion,"drum.tambourine":MidiInstrument.Percussion,"drum.tamte":MidiInstrument.Percussion,"drum.tangku":MidiInstrument.Percussion,"drum.tan-tan":MidiInstrument.Percussion,"drum.taphon":MidiInstrument.Percussion,"drum.tar":MidiInstrument.Percussion,"drum.tasha":MidiInstrument.Percussion,"drum.tenor-drum":MidiInstrument.Percussion,"drum.teponaxtli":MidiInstrument.Percussion,"drum.thavil":MidiInstrument.Percussion,"drum.the-box":MidiInstrument.Percussion,"drum.timbale":MidiInstrument.Percussion,"drum.timpani":MidiInstrument.Timpani,"drum.tinaja":MidiInstrument.Percussion,"drum.toere":MidiInstrument.Percussion,"drum.tombak":MidiInstrument.Percussion,"drum.tom-tom":MidiInstrument.Melodic_Tom,"drum.tom-tom.synth":MidiInstrument.Melodic_Tom,"drum.tsuzumi":MidiInstrument.Percussion,"drum.tumbak":MidiInstrument.Percussion,"drum.uchiwa-daiko":MidiInstrument.Percussion,"drum.udaku":MidiInstrument.Percussion,"drum.udu":MidiInstrument.Percussion,"drum.zarb":MidiInstrument.Percussion,"effect.applause":MidiInstrument.Applause,"effect.gunshot":MidiInstrument.Gunshot,"effect.helicopter":MidiInstrument.Helicopter,"effect.telephone-ring":MidiInstrument.Telephone_Ring,"keyboard.accordion":MidiInstrument.Accordion,"keyboard.bandoneon":MidiInstrument.Accordion,"keyboard.celesta":MidiInstrument.Celesta,"keyboard.clavichord":MidiInstrument.Harpsichord,"keyboard.clavichord.synth":MidiInstrument.Harpsichord,"keyboard.concertina":MidiInstrument.Accordion,"keyboard.fortepiano":MidiInstrument.Acoustic_Grand_Piano,"keyboard.harmonium":MidiInstrument.Drawbar_Organ,"keyboard.harpsichord":MidiInstrument.Harpsichord,"keyboard.ondes-martenot":MidiInstrument.Pad_3_polysynth,"keyboard.organ":MidiInstrument.Church_Organ,"keyboard.organ.drawbar":MidiInstrument.Percussive_Organ,"keyboard.organ.percussive":MidiInstrument.Rock_Organ,"keyboard.organ.pipe":MidiInstrument.Church_Organ,"keyboard.organ.reed":MidiInstrument.Church_Organ,"keyboard.organ.rotary":MidiInstrument.Rock_Organ,"keyboard.piano":MidiInstrument.Acoustic_Grand_Piano,"keyboard.piano.electric":MidiInstrument.Electric_Grand_Piano,"keyboard.piano.grand":MidiInstrument.Acoustic_Grand_Piano,"keyboard.piano.honky-tonk":MidiInstrument.Honky_tonk_Piano,"keyboard.piano.prepared":MidiInstrument.Acoustic_Grand_Piano,"keyboard.piano.toy":MidiInstrument.Honky_tonk_Piano,"keyboard.piano.upright":MidiInstrument.Acoustic_Grand_Piano,"keyboard.virginal":MidiInstrument.Acoustic_Grand_Piano,"metal.adodo":MidiInstrument.Xylophone,"metal.anvil":MidiInstrument.Xylophone,"metal.babendil":MidiInstrument.Xylophone,"metal.bells.agogo":MidiInstrument.Agogo,"metal.bells.almglocken":MidiInstrument.Tubular_Bells,"metal.bells.bell-plate":MidiInstrument.Tubular_Bells,"metal.bells.bell-tree":MidiInstrument.Tubular_Bells,"metal.bells.carillon":MidiInstrument.Tubular_Bells,"metal.bells.chimes":MidiInstrument.Tinkle_Bell,"metal.bells.chimta":MidiInstrument.Tubular_Bells,"metal.bells.chippli":MidiInstrument.Tubular_Bells,"metal.bells.church":MidiInstrument.Tubular_Bells,"metal.bells.cowbell":MidiInstrument.Percussion,"metal.bells.dawuro":MidiInstrument.Percussion,"metal.bells.gankokwe":MidiInstrument.Percussion,"metal.bells.ghungroo":MidiInstrument.Percussion,"metal.bells.hatheli":MidiInstrument.Percussion,"metal.bells.jingle-bell":MidiInstrument.Percussion,"metal.bells.khartal":MidiInstrument.Percussion,"metal.bells.mark-tree":MidiInstrument.Percussion,"metal.bells.sistrum":MidiInstrument.Percussion,"metal.bells.sleigh-bells":MidiInstrument.Percussion,"metal.bells.temple":MidiInstrument.Percussion,"metal.bells.tibetan":MidiInstrument.Percussion,"metal.bells.tinklebell":MidiInstrument.Percussion,"metal.bells.trychel":MidiInstrument.Percussion,"metal.bells.wind-chimes":MidiInstrument.Percussion,"metal.bells.zills":MidiInstrument.Percussion,"metal.berimbau":MidiInstrument.Flute,"metal.brake-drums":MidiInstrument.Percussion,"metal.crotales":MidiInstrument.Percussion,"metal.cymbal.bo":MidiInstrument.Percussion,"metal.cymbal.ceng-ceng":MidiInstrument.Percussion,"metal.cymbal.chabara":MidiInstrument.Percussion,"metal.cymbal.chinese":MidiInstrument.Percussion,"metal.cymbal.ching":MidiInstrument.Percussion,"metal.cymbal.clash":MidiInstrument.Percussion,"metal.cymbal.crash":MidiInstrument.Percussion,"metal.cymbal.finger":MidiInstrument.Percussion,"metal.cymbal.hand":MidiInstrument.Percussion,"metal.cymbal.kesi":MidiInstrument.Percussion,"metal.cymbal.manjeera":MidiInstrument.Percussion,"metal.cymbal.reverse":MidiInstrument.Percussion,"metal.cymbal.ride":MidiInstrument.Percussion,"metal.cymbal.sizzle":MidiInstrument.Percussion,"metal.cymbal.splash":MidiInstrument.Percussion,"metal.cymbal.suspended":MidiInstrument.Percussion,"metal.cymbal.tebyoshi":MidiInstrument.Percussion,"metal.cymbal.tibetan":MidiInstrument.Percussion,"metal.cymbal.tingsha":MidiInstrument.Percussion,"metal.flexatone":MidiInstrument.Percussion,"metal.gong":MidiInstrument.Percussion,"metal.gong.ageng":MidiInstrument.Percussion,"metal.gong.agung":MidiInstrument.Percussion,"metal.gong.chanchiki":MidiInstrument.Percussion,"metal.gong.chinese":MidiInstrument.Percussion,"metal.gong.gandingan":MidiInstrument.Percussion,"metal.gong.kempul":MidiInstrument.Percussion,"metal.gong.kempyang":MidiInstrument.Percussion,"metal.gong.ketuk":MidiInstrument.Percussion,"metal.gong.kkwenggwari":MidiInstrument.Percussion,"metal.gong.luo":MidiInstrument.Percussion,"metal.gong.singing":MidiInstrument.Percussion,"metal.gong.thai":MidiInstrument.Percussion,"metal.guira":MidiInstrument.Percussion,"metal.hang":MidiInstrument.Percussion,"metal.hi-hat":MidiInstrument.Percussion,"metal.jaw-harp":MidiInstrument.Percussion,"metal.kengong":MidiInstrument.Percussion,"metal.murchang":MidiInstrument.Percussion,"metal.musical-saw":MidiInstrument.Percussion,"metal.singing-bowl":MidiInstrument.Percussion,"metal.spoons":MidiInstrument.Percussion,"metal.steel-drums":MidiInstrument.Percussion,"metal.tamtam":MidiInstrument.Percussion,"metal.thundersheet":MidiInstrument.Percussion,"metal.triangle":MidiInstrument.Percussion,"metal.washboard":MidiInstrument.Percussion,"pitched-percussion.angklung":MidiInstrument.Xylophone,"pitched-percussion.balafon":MidiInstrument.Xylophone,"pitched-percussion.bell-lyre":MidiInstrument.Xylophone,"pitched-percussion.bells":MidiInstrument.Tubular_Bells,"pitched-percussion.bianqing":MidiInstrument.Xylophone,"pitched-percussion.bianzhong":MidiInstrument.Xylophone,"pitched-percussion.bonang":MidiInstrument.Xylophone,"pitched-percussion.cimbalom":MidiInstrument.Xylophone,"pitched-percussion.crystal-glasses":MidiInstrument.Xylophone,"pitched-percussion.dan-tam-thap-luc":MidiInstrument.Xylophone,"pitched-percussion.fangxiang":MidiInstrument.Xylophone,"pitched-percussion.gandingan-a-kayo":MidiInstrument.Xylophone,"pitched-percussion.gangsa":MidiInstrument.Xylophone,"pitched-percussion.gender":MidiInstrument.Xylophone,"pitched-percussion.giying":MidiInstrument.Xylophone,"pitched-percussion.glass-harmonica":MidiInstrument.Xylophone,"pitched-percussion.glockenspiel":MidiInstrument.Glockenspiel,"pitched-percussion.glockenspiel.alto":MidiInstrument.Glockenspiel,"pitched-percussion.glockenspiel.soprano":MidiInstrument.Glockenspiel,"pitched-percussion.gyil":MidiInstrument.Xylophone,"pitched-percussion.hammer-dulcimer":MidiInstrument.Dulcimer,"pitched-percussion.handbells":MidiInstrument.Tubular_Bells,"pitched-percussion.handchimes":MidiInstrument.Tubular_Bells,"pitched-percussion.kalimba":MidiInstrument.Kalimba,"pitched-percussion.kantil":MidiInstrument.Xylophone,"pitched-percussion.khim":MidiInstrument.Xylophone,"pitched-percussion.kulintang":MidiInstrument.Xylophone,"pitched-percussion.kulintang-a-kayo":MidiInstrument.Xylophone,"pitched-percussion.kulintang-a-tiniok":MidiInstrument.Xylophone,"pitched-percussion.likembe":MidiInstrument.Xylophone,"pitched-percussion.luntang":MidiInstrument.Xylophone,"pitched-percussion.marimba":MidiInstrument.Marimba,"pitched-percussion.marimba.bass":MidiInstrument.Marimba,"pitched-percussion.mbira":MidiInstrument.Marimba,"pitched-percussion.mbira.array":MidiInstrument.Marimba,"pitched-percussion.metallophone":MidiInstrument.Xylophone,"pitched-percussion.metallophone.alto":MidiInstrument.Xylophone,"pitched-percussion.metallophone.bass":MidiInstrument.Xylophone,"pitched-percussion.metallophone.soprano":MidiInstrument.Xylophone,"pitched-percussion.music-box":MidiInstrument.Glockenspiel,"pitched-percussion.pelog-panerus":MidiInstrument.Xylophone,"pitched-percussion.pemade":MidiInstrument.Xylophone,"pitched-percussion.penyacah":MidiInstrument.Xylophone,"pitched-percussion.ranat.ek":MidiInstrument.Xylophone,"pitched-percussion.ranat.ek-lek":MidiInstrument.Xylophone,"pitched-percussion.ranat.thum":MidiInstrument.Xylophone,"pitched-percussion.ranat.thum-lek":MidiInstrument.Xylophone,"pitched-percussion.reyong":MidiInstrument.Xylophone,"pitched-percussion.sanza":MidiInstrument.Xylophone,"pitched-percussion.saron-barung":MidiInstrument.Xylophone,"pitched-percussion.saron-demong":MidiInstrument.Xylophone,"pitched-percussion.saron-panerus":MidiInstrument.Xylophone,"pitched-percussion.slendro-panerus":MidiInstrument.Xylophone,"pitched-percussion.slentem":MidiInstrument.Xylophone,"pitched-percussion.tsymbaly":MidiInstrument.Xylophone,"pitched-percussion.tubes":MidiInstrument.Tubular_Bells,"pitched-percussion.tubular-bells":MidiInstrument.Tubular_Bells,"pitched-percussion.vibraphone":MidiInstrument.Vibraphone,"pitched-percussion.xylophone":MidiInstrument.Xylophone,"pitched-percussion.xylophone.alto":MidiInstrument.Xylophone,"pitched-percussion.xylophone.bass":MidiInstrument.Xylophone,"pitched-percussion.xylophone.soprano":MidiInstrument.Xylophone,"pitched-percussion.xylorimba":MidiInstrument.Xylophone,"pitched-percussion.yangqin":MidiInstrument.Xylophone,"pluck.archlute":MidiInstrument.Acoustic_Guitar_nylon,"pluck.autoharp":MidiInstrument.Orchestral_Harp,"pluck.baglama":MidiInstrument.Orchestral_Harp,"pluck.bajo":MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika":MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.alto":MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.bass":MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.contrabass":MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.piccolo":MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.prima":MidiInstrument.Acoustic_Guitar_steel,"pluck.balalaika.secunda":MidiInstrument.Acoustic_Guitar_steel,"pluck.bandola":MidiInstrument.Acoustic_Guitar_steel,"pluck.bandura":MidiInstrument.Acoustic_Guitar_steel,"pluck.bandurria":MidiInstrument.Acoustic_Guitar_steel,"pluck.banjo":MidiInstrument.Banjo,"pluck.banjo.tenor":MidiInstrument.Banjo,"pluck.banjolele":MidiInstrument.Banjo,"pluck.barbat":MidiInstrument.Acoustic_Guitar_steel,"pluck.bass":MidiInstrument.Electric_Bass_finger,"pluck.bass.acoustic":MidiInstrument.Acoustic_Bass,"pluck.bass.bolon":MidiInstrument.Electric_Bass_finger,"pluck.bass.electric":MidiInstrument.Electric_Bass_finger,"pluck.bass.fretless":MidiInstrument.Fretless_Bass,"pluck.bass.guitarron":MidiInstrument.Acoustic_Bass,"pluck.bass.synth":MidiInstrument.Synth_Bass_1,"pluck.bass.synth.lead":MidiInstrument.Synth_Bass_2,"pluck.celtic-harp":MidiInstrument.Orchestral_Harp,"pluck.charango":MidiInstrument.Acoustic_Guitar_nylon,"pluck.chitarra-battente":MidiInstrument.Acoustic_Guitar_nylon,"pluck.cithara":MidiInstrument.Acoustic_Guitar_nylon,"pluck.cittern":MidiInstrument.Acoustic_Guitar_nylon,"pluck.cuatro":MidiInstrument.Acoustic_Guitar_nylon,"pluck.dulcimer":MidiInstrument.Dulcimer,"pluck.dutar":MidiInstrument.Acoustic_Grand_Piano,"pluck.duxianqin":MidiInstrument.Dulcimer,"pluck.ektara":MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar":MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.acoustic":MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.electric":MidiInstrument.Electric_Guitar_clean,"pluck.guitar.nylon-string":MidiInstrument.Electric_Guitar_clean,"pluck.guitar.pedal-steel":MidiInstrument.Electric_Guitar_clean,"pluck.guitar.portuguese":MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.requinto":MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.resonator":MidiInstrument.Acoustic_Guitar_nylon,"pluck.guitar.steel-string":MidiInstrument.Acoustic_Guitar_steel,"pluck.harp":MidiInstrument.Orchestral_Harp,"pluck.harp-guitar":MidiInstrument.Orchestral_Harp,"pluck.huapanguera":MidiInstrument.Orchestral_Harp,"pluck.lute":MidiInstrument.Acoustic_Grand_Piano,"pluck.lyre":MidiInstrument.Orchestral_Harp,"pluck.mandobass":MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandocello":MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandola":MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandolin":MidiInstrument.Acoustic_Guitar_nylon,"pluck.mandolin.octave":MidiInstrument.Acoustic_Guitar_nylon,"pluck.setar":MidiInstrument.Acoustic_Guitar_nylon,"pluck.shamisen":MidiInstrument.Shamisen,"pluck.sitar":MidiInstrument.Sitar,"pluck.synth":MidiInstrument.Electric_Bass_pick,"pluck.synth.charang":MidiInstrument.Electric_Bass_pick,"pluck.synth.chiff":MidiInstrument.Electric_Bass_pick,"pluck.synth.stick":MidiInstrument.Electric_Bass_pick,"pluck.tambura":MidiInstrument.Acoustic_Grand_Piano,"pluck.ukulele":MidiInstrument.Banjo,"pluck.ukulele.tenor":MidiInstrument.Banjo,"strings.arpeggione":MidiInstrument.Cello,"strings.cello":MidiInstrument.Cello,"strings.cello.piccolo":MidiInstrument.Cello,"strings.contrabass":MidiInstrument.Contrabass,"strings.fiddle":MidiInstrument.Fiddle,"strings.fiddle.hardanger":MidiInstrument.Fiddle,"strings.group":MidiInstrument.String_Ensemble_1,"strings.group.synth":MidiInstrument.Synth_Strings_1,"strings.octobass":MidiInstrument.Contrabass,"strings.tromba-marina":MidiInstrument.Contrabass,"strings.vielle":MidiInstrument.Violin,"strings.viol":MidiInstrument.Violin,"strings.viol.alto":MidiInstrument.Violin,"strings.viol.bass":MidiInstrument.Violin,"strings.viol.tenor":MidiInstrument.Violin,"strings.viol.treble":MidiInstrument.Violin,"strings.viol.violone":MidiInstrument.Violin,"strings.viola":MidiInstrument.Viola,"strings.viola-damore":MidiInstrument.Viola,"strings.violin":MidiInstrument.Violin,"strings.violono.piccolo":MidiInstrument.Violin,"strings.violotta":MidiInstrument.Viola,"synth.group":MidiInstrument.Pad_3_polysynth,"synth.group.fifths":MidiInstrument.Pad_3_polysynth,"synth.group.orchestra":MidiInstrument.Orchestra_Hit,"synth.pad":MidiInstrument.Pad_1_new_age,"synth.pad.bowed":MidiInstrument.Pad_1_new_age,"synth.pad.choir":MidiInstrument.Pad_4_choir,"synth.pad.halo":MidiInstrument.Acoustic_Grand_Piano,"synth.pad.polysynth":MidiInstrument.Pad_3_polysynth,"voice.alto":MidiInstrument.Voice_Oohs,"voice.baritone":MidiInstrument.Voice_Oohs,"voice.bass":MidiInstrument.Voice_Oohs,"voice.female":MidiInstrument.Synth_Voice,"voice.kazoo":MidiInstrument.Flute,"voice.male":MidiInstrument.Voice_Oohs,"voice.mezzo-soprano":MidiInstrument.Voice_Oohs,"voice.soprano":MidiInstrument.Voice_Oohs,"voice.synth":MidiInstrument.Synth_Voice,"voice.tenor":MidiInstrument.Voice_Oohs,"voice.vocals":MidiInstrument.Choir_Aahs,"wind.flutes.flute":MidiInstrument.Flute,"wind.flutes.flute.alto":MidiInstrument.Flute,"wind.flutes.flute.bass":MidiInstrument.Flute,"wind.flutes.flute.contra-alto":MidiInstrument.Flute,"wind.flutes.flute.contrabass":MidiInstrument.Flute,"wind.flutes.flute.double-contrabass":MidiInstrument.Flute,"wind.flutes.flute.irish":MidiInstrument.Flute,"wind.flutes.flute.piccolo":MidiInstrument.Piccolo,"wind.flutes.flute.subcontrabass":MidiInstrument.Flute,"wind.flutes.ocarina":MidiInstrument.Ocarina,"wind.flutes.panpipes":MidiInstrument.Pan_Flute,"wind.flutes.recorder":MidiInstrument.Acoustic_Grand_Piano,"wind.flutes.recorder.alto":MidiInstrument.Recorder,"wind.flutes.recorder.bass":MidiInstrument.Recorder,"wind.flutes.recorder.contrabass":MidiInstrument.Recorder,"wind.flutes.recorder.descant":MidiInstrument.Recorder,"wind.flutes.recorder.garklein":MidiInstrument.Recorder,"wind.flutes.recorder.great-bass":MidiInstrument.Recorder,"wind.flutes.recorder.sopranino":MidiInstrument.Recorder,"wind.flutes.recorder.soprano":MidiInstrument.Recorder,"wind.flutes.recorder.tenor":MidiInstrument.Recorder,"wind.flutes.shakuhachi":MidiInstrument.Shakuhachi,"wind.flutes.whistle":MidiInstrument.Whistle,"wind.flutes.whistle.alto":MidiInstrument.Whistle,"wind.flutes.whistle.low-irish":MidiInstrument.Whistle,"wind.flutes.whistle.shiva":MidiInstrument.Whistle,"wind.flutes.whistle.slide":MidiInstrument.Whistle,"wind.flutes.whistle.tin":MidiInstrument.Whistle,"wind.flutes.whistle.tin.bflat":MidiInstrument.Whistle,"wind.flutes.whistle.tin.c":MidiInstrument.Whistle,"wind.flutes.whistle.tin.d":MidiInstrument.Whistle,"wind.group":MidiInstrument.Flute,"wind.pipes.bagpipes":MidiInstrument.Bag_pipe,"wind.reed.basset-horn":MidiInstrument.Bassoon,"wind.reed.bassoon":MidiInstrument.Bassoon,"wind.reed.bombarde":MidiInstrument.Bassoon,"wind.reed.clarinet":MidiInstrument.Clarinet,"wind.reed.clarinet.a":MidiInstrument.Clarinet,"wind.reed.clarinet.alto":MidiInstrument.Clarinet,"wind.reed.clarinet.bass":MidiInstrument.Clarinet,"wind.reed.clarinet.basset":MidiInstrument.Clarinet,"wind.reed.clarinet.bflat":MidiInstrument.Clarinet,"wind.reed.clarinet.contra-alto":MidiInstrument.Clarinet,"wind.reed.clarinet.contrabass":MidiInstrument.Clarinet,"wind.reed.clarinet.d":MidiInstrument.Clarinet,"wind.reed.clarinet.eflat":MidiInstrument.Clarinet,"wind.reed.clarinet.g":MidiInstrument.Clarinet,"wind.reed.clarinet.piccolo":MidiInstrument.Clarinet,"wind.reed.clarinet.piccolo.aflat":MidiInstrument.Clarinet,"wind.reed.clarinette-damour":MidiInstrument.Clarinet,"wind.reed.contrabass":MidiInstrument.Clarinet,"wind.reed.contrabassoon":MidiInstrument.Clarinet,"wind.reed.cornamuse":MidiInstrument.Bag_pipe,"wind.reed.english-horn":MidiInstrument.English_Horn,"wind.reed.harmonica":MidiInstrument.Harmonica,"wind.reed.harmonica.bass":MidiInstrument.Harmonica,"wind.reed.oboe":MidiInstrument.Oboe,"wind.reed.oboe.bass":MidiInstrument.Oboe,"wind.reed.oboe.piccolo":MidiInstrument.Oboe,"wind.reed.oboe-da-caccia":MidiInstrument.Oboe,"wind.reed.oboe-damore":MidiInstrument.Oboe,"wind.reed.saxonette":MidiInstrument.Soprano_Sax,"wind.reed.saxophone":MidiInstrument.Alto_Sax,"wind.reed.saxophone.alto":MidiInstrument.Alto_Sax,"wind.reed.saxophone.aulochrome":MidiInstrument.Alto_Sax,"wind.reed.saxophone.baritone":MidiInstrument.Baritone_Sax,"wind.reed.saxophone.bass":MidiInstrument.Baritone_Sax,"wind.reed.saxophone.contrabass":MidiInstrument.Baritone_Sax,"wind.reed.saxophone.melody":MidiInstrument.Baritone_Sax,"wind.reed.saxophone.mezzo-soprano":MidiInstrument.Alto_Sax,"wind.reed.saxophone.sopranino":MidiInstrument.Soprano_Sax,"wind.reed.saxophone.sopranissimo":MidiInstrument.Soprano_Sax,"wind.reed.saxophone.soprano":MidiInstrument.Soprano_Sax,"wind.reed.saxophone.subcontrabass":MidiInstrument.Baritone_Sax,"wind.reed.saxophone.tenor":MidiInstrument.Tenor_Sax,"wood.bones":MidiInstrument.Woodblock,"wood.castanets":MidiInstrument.Woodblock,"wood.claves":MidiInstrument.Woodblock,"wood.drum-sticks":MidiInstrument.Woodblock,"wood.gourd":MidiInstrument.Woodblock,"wood.granite-block":MidiInstrument.Woodblock,"wood.guban":MidiInstrument.Woodblock,"wood.guiro":MidiInstrument.Woodblock,"wood.hyoushigi":MidiInstrument.Woodblock,"wood.ipu":MidiInstrument.Woodblock,"wood.jam-block":MidiInstrument.Woodblock,"wood.kaekeeke":MidiInstrument.Woodblock,"wood.kagul":MidiInstrument.Woodblock,"wood.kalaau":MidiInstrument.Woodblock,"wood.kashiklar":MidiInstrument.Woodblock,"wood.kubing":MidiInstrument.Woodblock,"wood.pan-clappers":MidiInstrument.Woodblock,"wood.sand-block":MidiInstrument.Woodblock,"wood.slapstick":MidiInstrument.Woodblock,"wood.stir-drum":MidiInstrument.Woodblock,"wood.temple-block":MidiInstrument.Woodblock,"wood.tic-toc-block":MidiInstrument.Woodblock,"wood.tonetang":MidiInstrument.Woodblock,"wood.wood-block":MidiInstrument.Woodblock};class SubInstrument{constructor(e){this.parentInstrument=e,this.fixedKey=-1,this.name=this.parseMidiInstrument(this.parentInstrument.Name),this.midiInstrumentID=InstrumentNames.MidiInstrument[this.name],this.volume=1}get ParentInstrument(){return this.parentInstrument}static isPianoInstrument(e){return e===MidiInstrument.Acoustic_Grand_Piano||e===MidiInstrument.Bright_Acoustic_Piano||e===MidiInstrument.Electric_Grand_Piano||e===MidiInstrument.Electric_Piano_1||e===MidiInstrument.Electric_Piano_2}setMidiInstrumentSound(e){this.midiInstrumentID=InstrumentNames.MidiInstrumentSounds[e]}setMidiInstrument(e){this.midiInstrumentID=InstrumentNames.MidiInstrument[this.parseMidiInstrument(e)]}parseMidiInstrument(e){try{if(e){const r=e.toLowerCase().trim();for(const s in InstrumentNames.MidiInstrument)if(r.indexOf(s)!==-1)return s}if(this.parentInstrument.Name){const r=this.parentInstrument.Name.toLowerCase().trim();for(const s in InstrumentNames.MidiInstrument)if(r.indexOf(s)!==-1)return s}}catch(r){loglevelExports.error("Error parsing MIDI Instrument. Default to Grand Piano.")}return"unnamed"}}class StringUtil{static StringContainsSeparatedWord(e,r,s=!1){return new RegExp("( |^)"+r+"([ .]|$)",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,r){this.currentMeasureIndex=r}handleLineRepetitionInstructions(e){let r=!1;if(e.elements().length>0){let s="",o=!1,a="",l="",u="";const c=[],d=e.element("bar-style");d&&(u=d.value),e.attributes().length>0&&e.attribute("location")?s=e.attribute("location").value:s="right";const g=e.elements();for(let m=0,y=g.length;m0)if(s==="left"){if(l==="start"){const m=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Ending,AlignmentType.Begin,void 0,c);this.addInstruction(this.repetitionInstructions,m)}if(a==="forward"){const m=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.StartLine);this.addInstruction(this.repetitionInstructions,m)}}else{if(l==="stop"){const m=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Ending,AlignmentType.End,void 0,c);this.addInstruction(this.repetitionInstructions,m)}if(a==="backward"){const m=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.BackJumpLine);this.addInstruction(this.repetitionInstructions,m)}}}return r}handleRepetitionInstructionsFromWordsOrSymbols(e,r){const s=e.element("words"),o=this.currentMeasureIndex;if(s){const a="d\\s?\\.s\\.",l=s.value.trim().toLowerCase();if(StringUtil.StringContainsSeparatedWord(l,a+" al fine",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.DalSegnoAlFine);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,a+" al coda",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.DalSegnoAlCoda);return this.addInstruction(this.repetitionInstructions,c),!0}const u="d\\.\\s?c\\.";if(StringUtil.StringContainsSeparatedWord(l,u+" al fine",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.DaCapoAlFine);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,u+" al coda",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.DaCapoAlCoda);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,u)||StringUtil.StringContainsSeparatedWord(l,"da\\s?capo",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.DaCapo);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,a,!0)||StringUtil.StringContainsSeparatedWord(l,"dal\\s?segno",!0)){let c;return StringUtil.StringContainsSeparatedWord(l,"al\\s?coda",!0)?c=new RepetitionInstruction(o,RepetitionInstructionEnum.DalSegnoAlCoda):c=new RepetitionInstruction(o,RepetitionInstructionEnum.DalSegno),this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,"to\\s?coda",!0)||StringUtil.StringContainsSeparatedWord(l,"a (la )?coda",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.ToCoda);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,"fine",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.Fine);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,"coda",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,c),!0}if(StringUtil.StringContainsSeparatedWord(l,"segno",!0)){const c=new RepetitionInstruction(o,RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,c),!0}}else if(e.element("segno")){const a=new RepetitionInstruction(o,RepetitionInstructionEnum.Segno);return this.addInstruction(this.repetitionInstructions,a),!0}else if(e.element("coda")){const a=new RepetitionInstruction(o,RepetitionInstructionEnum.Coda);return this.addInstruction(this.repetitionInstructions,a),!0}return!1}removeRedundantInstructions(){let e=0,r=0,s=0,o=0;for(let a=0;a0&&this.findInstructionInPreviousMeasure(a,l.measureIndex,RepetitionInstructionEnum.ToCoda)&&(l.type=RepetitionInstructionEnum.None),r===0&&s===0&&(l.type=RepetitionInstructionEnum.ToCoda,l.alignment=AlignmentType.End,l.measureIndex--);break;case RepetitionInstructionEnum.Segno:if(e-o>0){let u=!1;for(let c=0,d=this.repetitionInstructions.length;c0?g.type=RepetitionInstructionEnum.DalSegnoAlCoda:g.type=RepetitionInstructionEnum.DalSegno,l.type=RepetitionInstructionEnum.None,u=!0;break;case RepetitionInstructionEnum.DalSegno:case RepetitionInstructionEnum.DalSegnoAlFine:case RepetitionInstructionEnum.DalSegnoAlCoda:l.type=RepetitionInstructionEnum.None,u=!0;break}if(u)break}if(u)break;s-r>0?l.type=RepetitionInstructionEnum.DalSegnoAlCoda:l.type=RepetitionInstructionEnum.DalSegno,l.alignment=AlignmentType.End,l.measureIndex--}break}if(this.backwardSearchForPreviousIdenticalInstruction(a,l)||l.type===RepetitionInstructionEnum.None)this.repetitionInstructions.splice(a,1),a--;else switch(l.type){case RepetitionInstructionEnum.Fine:break;case RepetitionInstructionEnum.ToCoda:s++;break;case RepetitionInstructionEnum.Coda:r++;break;case RepetitionInstructionEnum.Segno:e++;break;case RepetitionInstructionEnum.DalSegnoAlFine:case RepetitionInstructionEnum.DalSegnoAlCoda:o++;break}}this.repetitionInstructions.sort(RepetitionInstructionComparer.Compare)}findInstructionInPreviousMeasure(e,r,s){for(let o=e-1;o>=0;o--){const a=this.repetitionInstructions[o];if(r-a.measureIndex===1&&a.type===s)return!0}return!1}backwardSearchForPreviousIdenticalInstruction(e,r){for(let s=e-1;s>=0;s--)if(this.repetitionInstructions[s].equals(r))return!0;return!1}addInstruction(e,r){let s=!0;for(let o=0,a=e.length;o0;)try{const c=this.openRepetitions.last();if(c.RepetitonUnderConstruction.FromWords){if(c.WaitingForCoda){let d=c.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex+1;d>=this.musicSheet.SourceMeasures.length&&(d=-1),c.RepetitonUnderConstruction.setEndingStartIndex(2,d)}else if(c.RepetitonUnderConstruction.BackwardJumpInstructions.length===0){this.openRepetitions.splice(this.openRepetitions.length-1,1);continue}}else if(c.RepetitonUnderConstruction.BackwardJumpInstructions.length===0){const d=o.length-1,g=new RepetitionInstruction(d,RepetitionInstructionEnum.BackJumpLine,AlignmentType.End,c.RepetitonUnderConstruction);c.RepetitonUnderConstruction.BackwardJumpInstructions.push(g),o[d].LastRepetitionInstructions.push(g)}this.finalizeRepetition(this.openRepetitions.last())}catch(c){try{const d=this.openRepetitions.last().RepetitonUnderConstruction;for(const g of this.repetitionInstructions)g.parentRepetition===d&&(g.parentRepetition=void 0);this.openRepetitions.splice(this.openRepetitions.length-1,1)}catch(d){loglevelExports.error("RepetitionCalculator: calculateRepetitions2",d)}}let a=!1;const l=0,u=this.musicSheet.SourceMeasures.length-1;for(const c of this.musicSheet.Repetitions)if(c.StartIndex===l&&c.EndIndex===u){a=!0;break}if(!a){const c=new Repetition(this.musicSheet,!0);c.FromWords=!0,c.startMarker=new RepetitionInstruction(l,RepetitionInstructionEnum.StartLine),c.startMarker.parentRepetition=c,this.musicSheet.SourceMeasures[l].FirstRepetitionInstructions.push(c.startMarker),c.endMarker=new RepetitionInstruction(u,RepetitionInstructionEnum.BackJumpLine),c.endMarker.parentRepetition=c,c.BackwardJumpInstructions.push(c.endMarker),c.UserNumberOfRepetitions=c.DefaultNumberOfRepetitions,this.musicSheet.Repetitions.push(c)}for(let c=0,d=this.musicSheet.SourceMeasures.length;c1&&g.FirstRepetitionInstructions.sort(RepetitionInstructionComparer.Compare),g.LastRepetitionInstructions.length>1&&g.LastRepetitionInstructions.sort(RepetitionInstructionComparer.Compare)}}handleRepetitionInstructions(e){var s,o,a,l,u,c,d;let r;switch(e.type){case RepetitionInstructionEnum.StartLine:r=this.createNewRepetition(this.currentMeasureIndex),e.parentRepetition=r.RepetitonUnderConstruction,r.RepetitonUnderConstruction.FromWords=!1,r.RepetitonUnderConstruction.startMarker=e,(s=this.currentMeasure)==null||s.FirstRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.BackJumpLine:r=this.getOrCreateCurrentRepetition2(!1),e.parentRepetition=r.RepetitonUnderConstruction,r.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),(o=this.currentMeasure)==null||o.LastRepetitionInstructions.push(e),r.RepetitonUnderConstruction.EndingParts.length===0&&this.finalizeRepetition(r);break;case RepetitionInstructionEnum.Ending:if(r=this.getOrCreateCurrentRepetition(),e.parentRepetition=r.RepetitonUnderConstruction,e.endingIndices.contains(1)&&e.alignment===AlignmentType.Begin){if(r.RepetitonUnderConstruction.BackwardJumpInstructions.length>0||r.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)){r=void 0;for(let m=this.openRepetitions.length-1;m>=0;m--){const y=this.openRepetitions[m];if(y.RepetitonUnderConstruction.BackwardJumpInstructions.length===0)for(r=y;this.openRepetitions.length-1>m;){const b=this.openRepetitions.last();this.finalizeRepetition(b)}}r===void 0&&(r=this.createNewRepetition(0),r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None))}r.RepetitonUnderConstruction.forwardJumpInstruction===void 0&&(r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(this.currentMeasureIndex-1,RepetitionInstructionEnum.ForwardJump,AlignmentType.End,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].LastRepetitionInstructions.push(r.RepetitonUnderConstruction.forwardJumpInstruction))}if(e.alignment===AlignmentType.Begin)r.RepetitonUnderConstruction.setEndingsStartIndex(e.endingIndices,this.currentMeasureIndex),(a=this.currentMeasure)==null||a.FirstRepetitionInstructions.push(e);else for(let m=0,y=e.endingIndices.length;m0&&Math.abs(r.RepetitonUnderConstruction.BackwardJumpInstructions.last().measureIndex-this.currentMeasureIndex)<=1||this.openRepetitions.length&&((d=(c=(u=this.openRepetitions)==null?void 0:u.find(m=>m.RepetitonUnderConstruction.startMarker.type===RepetitionInstructionEnum.StartLine))==null?void 0:c.RepetitonUnderConstruction)==null?void 0:d.StartIndex)===this.currentMeasureIndex)break;r=this.createNewRepetition(this.currentMeasureIndex),e.parentRepetition=r.RepetitonUnderConstruction,r.RepetitonUnderConstruction.FromWords=!0,r.SegnoFound=!0,r.RepetitonUnderConstruction.startMarker=e,this.currentMeasure.FirstRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.Fine:if(this.openRepetitions.length===0||(r=this.getCurrentRepetition(!0),r===void 0))break;e.parentRepetition=r.RepetitonUnderConstruction,r.RepetitonUnderConstruction.FromWords=!0,r.RepetitonUnderConstruction.forwardJumpInstruction===void 0?(r.FineFound=!0,r.RepetitonUnderConstruction.forwardJumpInstruction=e,r.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||(r=this.getCurrentRepetition(!0),r===void 0))break;r.RepetitonUnderConstruction.forwardJumpInstruction===void 0&&(e.parentRepetition=r.RepetitonUnderConstruction,r.RepetitonUnderConstruction.FromWords=!0,r.ToCodaFound=!0,r.RepetitonUnderConstruction.forwardJumpInstruction=e,this.currentMeasure.LastRepetitionInstructions.push(e));break;case RepetitionInstructionEnum.Coda:if(this.openRepetitions.length===0)break;r=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=r.RepetitonUnderConstruction,r.WaitingForCoda?(r.CodaFound=!0,r.RepetitonUnderConstruction.setEndingStartIndex(2,this.currentMeasureIndex),this.currentMeasure.LastRepetitionInstructions.push(e),this.finalizeRepetition(r),this.currentMeasureIndex>0&&(this.musicSheet.SourceMeasures[this.currentMeasureIndex-1].printNewSystemXml=!0)):r.ToCodaFound||(r.RepetitonUnderConstruction.BackwardJumpInstructions.length===0?(r.ToCodaFound=!0,r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.ToCoda,AlignmentType.End,r.RepetitonUnderConstruction),this.currentMeasure.LastRepetitionInstructions.push(r.RepetitonUnderConstruction.forwardJumpInstruction)):this.currentMeasure.LastRepetitionInstructions.push(new RepetitionInstruction(this.currentMeasureIndex,RepetitionInstructionEnum.Coda,AlignmentType.Begin,void 0)));break;case RepetitionInstructionEnum.DaCapo:r=this.getOrCreateCurrentRepetition(),r.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&this.finalizeRepetition(r),r.RepetitonUnderConstruction.StartIndex!==0&&(r=this.createNewRepetition(0)),e.parentRepetition=r.RepetitonUnderConstruction,r.RepetitonUnderConstruction.FromWords=!0,r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,r.RepetitonUnderConstruction),r.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e),r.RepetitonUnderConstruction.EndingParts.length===0&&this.finalizeRepetition(r);break;case RepetitionInstructionEnum.DalSegno:if(r=this.getOrCreateCurrentRepetition2(!0),r.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(r),r=this.createNewRepetition(0),r.RepetitonUnderConstruction.FromWords=!0,r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,r.RepetitonUnderConstruction)),e.parentRepetition=r.RepetitonUnderConstruction,!r.SegnoFound){const m=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);m>=0&&(r.SegnoFound=!0,r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(m,RepetitionInstructionEnum.Segno,AlignmentType.Begin,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[m].FirstRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.startMarker))}r.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)&&r.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),r.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DalSegnoAlFine:if(this.openRepetitions.length===0)break;if(r=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=r.RepetitonUnderConstruction,!r.SegnoFound){const m=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);m>=0&&(r.SegnoFound=!0,r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(m,RepetitionInstructionEnum.Segno,AlignmentType.Begin,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[m].FirstRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.startMarker))}if(!r.FineFound){const m=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Fine,e.measureIndex);m>=0&&(r.FineFound=!0,r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(m,RepetitionInstructionEnum.Fine,AlignmentType.Begin,r.RepetitonUnderConstruction),r.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[m].LastRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.forwardJumpInstruction))}r.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||r.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),r.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DaCapoAlFine:if(r=this.getOrCreateCurrentRepetition(),r.RepetitonUnderConstruction.BackwardJumpInstructions.length>0&&(this.finalizeRepetition(r),r=this.createNewRepetition(0)),r.RepetitonUnderConstruction.startMarker!==void 0&&r.RepetitonUnderConstruction.StartIndex!==0&&(r=this.createNewRepetition(0)),r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,r.RepetitonUnderConstruction),r.RepetitonUnderConstruction.FromWords=!0,e.parentRepetition=r.RepetitonUnderConstruction,!r.FineFound){const m=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Fine,e.measureIndex);m>=0&&(r.FineFound=!0,r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(m,RepetitionInstructionEnum.Fine,AlignmentType.Begin,r.RepetitonUnderConstruction),r.RepetitonUnderConstruction.setEndingStartIndex(2,-2),this.musicSheet.SourceMeasures[m].LastRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.forwardJumpInstruction))}r.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||r.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),r.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DalSegnoAlCoda:if(this.openRepetitions.length===0)break;if(r=this.getOrCreateCurrentRepetition2(!0),e.parentRepetition=r.RepetitonUnderConstruction,!r.SegnoFound){const m=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Segno,e.measureIndex);m>=0&&(r.SegnoFound=!0,r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(m,RepetitionInstructionEnum.Segno,AlignmentType.Begin,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[m].FirstRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.startMarker))}if(!r.ToCodaFound){const m=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.ToCoda,e.measureIndex);if(m>=0)r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(m,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[m].LastRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.forwardJumpInstruction),r.ToCodaFound=!0;else{const y=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Coda,e.measureIndex);y>=0&&(r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(y,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[y].LastRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.forwardJumpInstruction),r.ToCodaFound=!0)}}r.ToCodaFound&&(r.WaitingForCoda=!0),r.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||r.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),r.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.DaCapoAlCoda:if(r=this.getOrCreateCurrentRepetition(),r.RepetitonUnderConstruction.BackwardJumpInstructions.length>0?(this.finalizeRepetition(r),r=this.createNewRepetition(0)):r.RepetitonUnderConstruction.EndingParts.length===0&&(this.finalizeRepetition(r),r=this.createNewRepetition(0)),r.RepetitonUnderConstruction.startMarker!==void 0&&r.RepetitonUnderConstruction.StartIndex!==0&&(r=this.createNewRepetition(0)),r.RepetitonUnderConstruction.startMarker=new RepetitionInstruction(0,RepetitionInstructionEnum.None,AlignmentType.Begin,r.RepetitonUnderConstruction),r.RepetitonUnderConstruction.FromWords=!0,e.parentRepetition=r.RepetitonUnderConstruction,!r.ToCodaFound){const m=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.ToCoda,e.measureIndex);if(m>=0)r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(m,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[m].LastRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.forwardJumpInstruction),r.ToCodaFound=!0;else{const y=this.findInstructionInMainListBackwards(RepetitionInstructionEnum.Coda,e.measureIndex);y>=0&&(r.RepetitonUnderConstruction.forwardJumpInstruction=new RepetitionInstruction(y,RepetitionInstructionEnum.ToCoda,AlignmentType.Begin,r.RepetitonUnderConstruction),this.musicSheet.SourceMeasures[y].LastRepetitionInstructions.splice(0,0,r.RepetitonUnderConstruction.forwardJumpInstruction),r.ToCodaFound=!0)}}r.ToCodaFound&&(r.WaitingForCoda=!0),r.RepetitonUnderConstruction.EndingIndexDict.hasOwnProperty(1)||r.RepetitonUnderConstruction.setEndingEndIndex(1,this.currentMeasureIndex),r.RepetitonUnderConstruction.BackwardJumpInstructions.push(e),this.currentMeasure.LastRepetitionInstructions.push(e);break;case RepetitionInstructionEnum.None:break;default:throw new ArgumentOutOfRangeException("currentRepetitionInstruction")}return!0}findInstructionInMainListBackwards(e,r){for(let s=this.repetitionInstructions.length-1;s>=0;s--){const o=this.repetitionInstructions[s];if(o.measureIndex<=r&&o.type===e)return o.measureIndex}return-1}finalizeRepetition(e){const r=e.RepetitonUnderConstruction;if(r.BackwardJumpInstructions.length>0){let s=!0;const o=this.getLastFinalizedRepetition();if(o!==void 0&&r.coversIdenticalMeasures(o)){if(r.NumberOfEndings>o.NumberOfEndings){const a=this.musicSheet.Repetitions.indexOf(o,0);a>-1&&this.musicSheet.Repetitions.splice(a,1),o.removeFromRepetitionInstructions(),this.musicSheet.Repetitions.push(r)}s=!1,r.removeFromRepetitionInstructions()}else this.musicSheet.Repetitions.push(r);if(s){r.startMarker.type===RepetitionInstructionEnum.None&&this.musicSheet.SourceMeasures[r.StartIndex].FirstRepetitionInstructions.push(r.startMarker),console.log("设置循环次数3",window==null?void 0:window.DYCustomRepeatCount,this.rules.DYCustomRepeatCount,r.DefaultNumberOfRepetitions);const a=(window==null?void 0:window.DYCustomRepeatCount)>r.DefaultNumberOfRepetitions?window==null?void 0:window.DYCustomRepeatCount:r.DefaultNumberOfRepetitions;r.UserNumberOfRepetitions=a||this.rules.DYCustomRepeatCount||r.DefaultNumberOfRepetitions}}this.openRepetitions.splice(this.openRepetitions.length-1,1)}getCurrentRepetition(e){let r;for(let s=this.openRepetitions.length-1;s>=0;s--)if(this.openRepetitions[s].RepetitonUnderConstruction.FromWords===e){for(r=this.openRepetitions[s];s0)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 r;if(this.openRepetitions.length&&this.openRepetitions.last().RepetitonUnderConstruction.EndingParts.length<2){for(let o=this.openRepetitions.length-1;o>=0;o--)if(r=this.openRepetitions[o],r.RepetitonUnderConstruction.FromWords===e){for(;o0){const s=this.openRepetitions.last(),o=s.RepetitonUnderConstruction;if(o.BackwardJumpInstructions.length>0){const a=Object.keys(o.EndingIndexDict);(a.length===0||o.EndingIndexDict[a[a.length-1]].part.EndIndex>=0)&&this.finalizeRepetition(s)}}const r=new RepetitionBuildingContainer(this.musicSheet);return this.lastRepetitionCommonPartStartIndex=e,this.openRepetitions.push(r),r}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,r,s){for(const o of this.voiceMeasureReadPlugins)try{o.measureReadCalculations(e,r,s)}catch(a){loglevelExports.info("VoiceGenerator.addSingleNote: ",a)}}}class MusicSheetReader{constructor(e=void 0,r=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=r}get PluginManager(){return this.pluginManager}get CompleteNumberOfStaves(){return this.completeNumberOfStaves}static doCalculationsAfterDurationHasBeenSet(e){for(const r of e)r.doCalculationsAfterDurationHasBeenSet()}createMusicSheet(e,r){try{return this._createMusicSheet(e,r)}catch(s){loglevelExports.error("MusicSheetReader.CreateMusicSheet",s);return}}_removeFromArray(e,r){const s=e.indexOf(r);s!==-1&&e.splice(s,1)}trimString(e){return e.replace(/^\s+|\s+$/g,"")}_lastElement(e){return e[e.length-1]}_createMusicSheet(e,r){const s=[];let o=0;if(this.musicSheet=new MusicSheet,this.musicSheet.Path=r,this.musicSheet.Rules=this.rules,!e)throw new MusicSheetReadingException("Undefined root element");this.pushSheetLabels(e,r);const a=e.element("part-list");if(!a)throw new MusicSheetReadingException("Undefined partListNode");const l=e.elements("part"),u=a.elements();this.initializeReading(u,l,s);let c=!0;this.currentFraction=new Fraction$1(0,1);let d=!1,g=e.element("identification");for(g&&(g=g.element("encoding")),g&&(g=g.element("software")),g!==void 0&&g.value==="Guitar Pro 5"&&(d=!0);c;){this.currentMeasure!==void 0&&this.currentMeasure.HasEndLine&&this.rules.NewPartAndSystemAfterFinalBarline&&(o=0),this.currentMeasure=new SourceMeasure(this.completeNumberOfStaves,this.musicSheet.Rules);for(const m of s)try{c=c&&m.readNextXmlMeasure(this.currentMeasure,this.currentFraction,d)}catch(y){const b=ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading instruments.");throw new MusicSheetReadingException(b,y)}c&&(this.musicSheet.addMeasure(this.currentMeasure),this.checkIfRhythmInstructionsAreSetAndEqual(s),this.checkSourceMeasureForNullEntries(),o=this.setSourceMeasureDuration(s,o),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.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 m=0,y=this.afterSheetReadingModules.length;ms){if(this.areRhythmInstructionsMixed(r)&&u.SymbolEnum!==RhythmSymbolEnum.NONE)continue;s=u.Rhythm.RealValue,o=r.indexOf(u)}}if(r.length>0&&r.lengthe.Denominator){const s=r.Denominator/e.Denominator;e.expand(s)}}checkIfMeasureIsImplicit(e,r){return!this.previousMeasure&&e.lt(r)?!0:this.previousMeasure?Fraction$1.plus(this.previousMeasure.Duration,e).Equals(r):!1}allInstrumentsHaveSameDuration(e,r){let s=0;for(let o=0,a=e.length;o=0;e--)for(let r=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries.length-1;r>=0;r--){const s=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries[r];if(s)for(let o=s.VoiceEntries.length-1;o>=0;o--){const a=s.VoiceEntries[o];a.Notes.length===0&&(this._removeFromArray(a.ParentVoice.VoiceEntries,a),this._removeFromArray(s.VoiceEntries,a))}s!==void 0&&s.VoiceEntries.length===0&&s.ChordContainers.length===0&&(this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries[r]=void 0)}for(let e=this.currentMeasure.VerticalSourceStaffEntryContainers.length-1;e>=0;e--){let r=0;for(let s=0,o=this.currentMeasure.VerticalSourceStaffEntryContainers[e].StaffEntries.length;s0){const o=r[0].elements("rights");if(o.length>0)for(let a=0,l=o.length;ar||C){if(!s&&!C)s=_;else if(x||B==="right")a?a+=` `+_:a=_;else if(E||B!=="right"&&B!=="left")o?o+=` `+_:o=_;else if(B==="left"){this.musicSheet.Lyricist||(this.musicSheet.Lyricist=new Label(_));break}}}}}}if(!this.musicSheet.Title&&s&&(this.musicSheet.Title=new Label(this.trimString(s))),!this.musicSheet.Subtitle&&o&&(this.musicSheet.Subtitle=new Label(this.trimString(o))),a){let y=!1;if(!this.musicSheet.Composer)y=!0;else{const b=((g=a.match(` `))!=null?g:[]).length+1,S=((m=this.musicSheet.Composer.text.match(` `))!=null?m:[]).length+1;b>=S&&(y=!0)}y&&(this.musicSheet.Composer=new Label(this.trimString(a)))}}readTitleAndComposerFromCreditsLegacy(e){var d,g,m;const r=this.computeSystemYCoordinates(e);if(r===0)return;let s=1,o,a=0,l,u;const c=e.elements("credit");for(let y=0,b=c.length;yr||T){if(!this.musicSheet.Title&&!T){const B=(m=A.attribute("font-size"))==null?void 0:m.value;if(B){const M=parseFloat(B);s0&&g.MidiInstrumentId!==MidiInstrument.Percussion&&(A.midiInstrumentID=Math.max(0,parseInt(C.value,10)-1));else if(C.name==="midi-unpitched")A.fixedKey=Math.max(0,parseInt(C.value,10));else if(C.name==="volume")try{const T=parseFloat(C.value);A.volume=T/127}catch(T){loglevelExports.debug("ExpressionReader.readExpressionParameters","read volume",T)}else if(C.name==="pan")try{const T=parseFloat(C.value);A.pan=T/64}catch(T){loglevelExports.debug("ExpressionReader.readExpressionParameters","read pan",T)}}catch(T){loglevelExports.info("MusicSheetReader.createInstrumentGroups midi settings: ",T)}}}}catch(A){loglevelExports.info("MusicSheetReader.createInstrumentGroups: ",A)}}if(g.SubInstruments.length===0){const y=new SubInstrument(g);g.SubInstruments.push(y)}s[d]=g,o?(o.InstrumentalGroups.push(g),this.musicSheet.Instruments.push(g)):(this.musicSheet.InstrumentalGroups.push(g),this.musicSheet.Instruments.push(g))}else if(c.name==="part-group"&&c.attribute("type").value==="start"){const d=new InstrumentalGroup("group",this.musicSheet,o);o?o.InstrumentalGroups.push(d):this.musicSheet.InstrumentalGroups.push(d),o=d}else if(c.name==="part-group"&&c.attribute("type").value==="stop"&&o){if(o.InstrumentalGroups.length===1){const d=o.InstrumentalGroups[0];o.Parent?(o.Parent.InstrumentalGroups.push(d),this._removeFromArray(o.Parent.InstrumentalGroups,o)):(this.musicSheet.InstrumentalGroups.push(d),this._removeFromArray(this.musicSheet.InstrumentalGroups,o))}o=o.Parent}}}catch(a){const l=ITextTranslation.translateText("ReaderErrorMessages/InstrumentError","Error while reading Instruments");throw new MusicSheetReadingException(l,a)}for(let a=0,l=this.musicSheet.Instruments.length;a0){const a=o[0];if(a){let l=a.element("attributes");l&&(l=l.element("staves")),l?r+=parseInt(l.value,10):r++}}}if(isNaN(r)||r<=0){const s=ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of staves.");throw new MusicSheetReadingException(s)}return r}getInstrumentNumberOfStavesFromXml(e){let r=0;const s=e.element("measure");if(s){const o=s.element("attributes");let a;o&&(a=o.element("staves")),!o||!a?r=1:r=parseInt(a.value,10)}if(isNaN(r)||r<=0){const o=ITextTranslation.translateText("ReaderErrorMessages/StaffError","Invalid number of Staves.");throw new MusicSheetReadingException(o)}return r}}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.10.1 - A JavaScript class for generating and reading zip files (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(i,e){(function(r){i.exports=r()})(function(){return function r(s,o,a){function l(d,g){if(!o[d]){if(!s[d]){var m=typeof commonjsRequire=="function"&&commonjsRequire;if(!g&&m)return m(d,!0);if(u)return u(d,!0);var y=new Error("Cannot find module '"+d+"'");throw y.code="MODULE_NOT_FOUND",y}var b=o[d]={exports:{}};s[d][0].call(b.exports,function(S){var A=s[d][1][S];return l(A||S)},b,b.exports,r,s,o,a)}return o[d].exports}for(var u=typeof commonjsRequire=="function"&&commonjsRequire,c=0;c>2,b=(3&d)<<4|g>>4,S=1>6:64,A=2>4,g=(15&y)<<4|(b=u.indexOf(c.charAt(A++)))>>2,m=(3&b)<<6|(S=u.indexOf(c.charAt(A++))),P[E++]=d,b!==64&&(P[E++]=g),S!==64&&(P[E++]=m);return P}},{"./support":30,"./utils":32}],2:[function(r,s,o){var a=r("./external"),l=r("./stream/DataWorker"),u=r("./stream/Crc32Probe"),c=r("./stream/DataLengthProbe");function d(g,m,y,b,S){this.compressedSize=g,this.uncompressedSize=m,this.crc32=y,this.compression=b,this.compressedContent=S}d.prototype={getContentWorker:function(){var g=new l(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),m=this;return g.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),g},getCompressedWorker:function(){return new l(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(g,m,y){return g.pipe(new u).pipe(new c("uncompressedSize")).pipe(m.compressWorker(y)).pipe(new c("compressedSize")).withStreamInfo("compression",m)},s.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,s,o){var a=r("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},o.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,s,o){var a=r("./utils"),l=function(){for(var u,c=[],d=0;d<256;d++){u=d;for(var g=0;g<8;g++)u=1&u?3988292384^u>>>1:u>>>1;c[d]=u}return c}();s.exports=function(u,c){return u!==void 0&&u.length?a.getTypeOf(u)!=="string"?function(d,g,m,y){var b=l,S=y+m;d^=-1;for(var A=y;A>>8^b[255&(d^g[A])];return-1^d}(0|c,u,u.length,0):function(d,g,m,y){var b=l,S=y+m;d^=-1;for(var A=y;A>>8^b[255&(d^g.charCodeAt(A))];return-1^d}(0|c,u,u.length,0):0}},{"./utils":32}],5:[function(r,s,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(r,s,o){var a=null;a=typeof Promise<"u"?Promise:r("lie"),s.exports={Promise:a}},{lie:37}],7:[function(r,s,o){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",l=r("pako"),u=r("./utils"),c=r("./stream/GenericWorker"),d=a?"uint8array":"array";function g(m,y){c.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=y,this.meta={}}o.magic="\b\0",u.inherits(g,c),g.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(u.transformTo(d,m.data),!1)},g.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},g.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},g.prototype._createPako=function(){this._pako=new l[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(y){m.push({data:y,meta:m.meta})}},o.compressWorker=function(m){return new g("Deflate",m)},o.uncompressWorker=function(){return new g("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,s,o){function a(b,S){var A,E="";for(A=0;A>>=8;return E}function l(b,S,A,E,x,P){var C,T,_=b.file,B=b.compression,M=P!==d.utf8encode,N=u.transformTo("string",P(_.name)),I=u.transformTo("string",d.utf8encode(_.name)),R=_.comment,F=u.transformTo("string",P(R)),k=u.transformTo("string",d.utf8encode(R)),V=I.length!==_.name.length,D=k.length!==R.length,$="",O="",q="",G=_.dir,U=_.date,Z={crc32:0,compressedSize:0,uncompressedSize:0};S&&!A||(Z.crc32=b.crc32,Z.compressedSize=b.compressedSize,Z.uncompressedSize=b.uncompressedSize);var W=0;S&&(W|=8),M||!V&&!D||(W|=2048);var K=0,ye=0;G&&(K|=16),x==="UNIX"?(ye=798,K|=function(Y,Q){var he=Y;return Y||(he=Q?16893:33204),(65535&he)<<16}(_.unixPermissions,G)):(ye=20,K|=function(Y){return 63&(Y||0)}(_.dosPermissions)),C=U.getUTCHours(),C<<=6,C|=U.getUTCMinutes(),C<<=5,C|=U.getUTCSeconds()/2,T=U.getUTCFullYear()-1980,T<<=4,T|=U.getUTCMonth()+1,T<<=5,T|=U.getUTCDate(),V&&(O=a(1,1)+a(g(N),4)+I,$+="up"+a(O.length,2)+O),D&&(q=a(1,1)+a(g(F),4)+k,$+="uc"+a(q.length,2)+q);var ae="";return ae+=` \0`,ae+=a(W,2),ae+=B.magic,ae+=a(C,2),ae+=a(T,2),ae+=a(Z.crc32,4),ae+=a(Z.compressedSize,4),ae+=a(Z.uncompressedSize,4),ae+=a(N.length,2),ae+=a($.length,2),{fileRecord:m.LOCAL_FILE_HEADER+ae+N+$,dirRecord:m.CENTRAL_FILE_HEADER+a(ye,2)+ae+a(F.length,2)+"\0\0\0\0"+a(K,4)+a(E,4)+N+$+F}}var u=r("../utils"),c=r("../stream/GenericWorker"),d=r("../utf8"),g=r("../crc32"),m=r("../signature");function y(b,S,A,E){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=S,this.zipPlatform=A,this.encodeFileName=E,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}u.inherits(y,c),y.prototype.push=function(b){var S=b.meta.percent||0,A=this.entriesCount,E=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:A?(S+100*(A-E-1))/A:100}}))},y.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var S=this.streamFiles&&!b.file.dir;if(S){var A=l(b,S,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:A.fileRecord,meta:{percent:0}})}else this.accumulate=!0},y.prototype.closedSource=function(b){this.accumulate=!1;var S=this.streamFiles&&!b.file.dir,A=l(b,S,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(A.dirRecord),S)this.push({data:function(E){return m.DATA_DESCRIPTOR+a(E.crc32,4)+a(E.compressedSize,4)+a(E.uncompressedSize,4)}(b),meta:{percent:100}});else for(this.push({data:A.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},y.prototype.flush=function(){for(var b=this.bytesWritten,S=0;S=this.index;c--)d=(d<<8)+this.byteAt(c);return this.index+=u,d},readString:function(u){return a.transformTo("string",this.readData(u))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var u=this.readInt(4);return new Date(Date.UTC(1980+(u>>25&127),(u>>21&15)-1,u>>16&31,u>>11&31,u>>5&63,(31&u)<<1))}},s.exports=l},{"../utils":32}],19:[function(r,s,o){var a=r("./Uint8ArrayReader");function l(u){a.call(this,u)}r("../utils").inherits(l,a),l.prototype.readData=function(u){this.checkOffset(u);var c=this.data.slice(this.zero+this.index,this.zero+this.index+u);return this.index+=u,c},s.exports=l},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,s,o){var a=r("./DataReader");function l(u){a.call(this,u)}r("../utils").inherits(l,a),l.prototype.byteAt=function(u){return this.data.charCodeAt(this.zero+u)},l.prototype.lastIndexOfSignature=function(u){return this.data.lastIndexOf(u)-this.zero},l.prototype.readAndCheckSignature=function(u){return u===this.readData(4)},l.prototype.readData=function(u){this.checkOffset(u);var c=this.data.slice(this.zero+this.index,this.zero+this.index+u);return this.index+=u,c},s.exports=l},{"../utils":32,"./DataReader":18}],21:[function(r,s,o){var a=r("./ArrayReader");function l(u){a.call(this,u)}r("../utils").inherits(l,a),l.prototype.readData=function(u){if(this.checkOffset(u),u===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+u);return this.index+=u,c},s.exports=l},{"../utils":32,"./ArrayReader":17}],22:[function(r,s,o){var a=r("../utils"),l=r("../support"),u=r("./ArrayReader"),c=r("./StringReader"),d=r("./NodeBufferReader"),g=r("./Uint8ArrayReader");s.exports=function(m){var y=a.getTypeOf(m);return a.checkSupport(y),y!=="string"||l.uint8array?y==="nodebuffer"?new d(m):l.uint8array?new g(a.transformTo("uint8array",m)):new u(a.transformTo("array",m)):new c(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,s,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,s,o){var a=r("./GenericWorker"),l=r("../utils");function u(c){a.call(this,"ConvertWorker to "+c),this.destType=c}l.inherits(u,a),u.prototype.processChunk=function(c){this.push({data:l.transformTo(this.destType,c.data),meta:c.meta})},s.exports=u},{"../utils":32,"./GenericWorker":28}],25:[function(r,s,o){var a=r("./GenericWorker"),l=r("../crc32");function u(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(u,a),u.prototype.processChunk=function(c){this.streamInfo.crc32=l(c.data,this.streamInfo.crc32||0),this.push(c)},s.exports=u},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,s,o){var a=r("../utils"),l=r("./GenericWorker");function u(c){l.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}a.inherits(u,l),u.prototype.processChunk=function(c){if(c){var d=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=d+c.data.length}l.prototype.processChunk.call(this,c)},s.exports=u},{"../utils":32,"./GenericWorker":28}],27:[function(r,s,o){var a=r("../utils"),l=r("./GenericWorker");function u(c){l.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(g){d.dataIsReady=!0,d.data=g,d.max=g&&g.length||0,d.type=a.getTypeOf(g),d.isPaused||d._tickAndRepeat()},function(g){d.error(g)})}a.inherits(u,l),u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this.data=null},u.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},u.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},u.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=u},{"../utils":32,"./GenericWorker":28}],28:[function(r,s,o){function a(l){this.name=l||"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}a.prototype={push:function(l){this.emit("data",l)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(l){this.emit("error",l)}return!0},error:function(l){return!this.isFinished&&(this.isPaused?this.generatedError=l:(this.isFinished=!0,this.emit("error",l),this.previous&&this.previous.error(l),this.cleanUp()),!0)},on:function(l,u){return this._listeners[l].push(u),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(l,u){if(this._listeners[l])for(var c=0;c "+l:l}},s.exports=a},{}],29:[function(r,s,o){var a=r("../utils"),l=r("./ConvertWorker"),u=r("./GenericWorker"),c=r("../base64"),d=r("../support"),g=r("../external"),m=null;if(d.nodestream)try{m=r("../nodejs/NodejsStreamOutputAdapter")}catch(S){}function y(S,A){return new g.Promise(function(E,x){var P=[],C=S._internalType,T=S._outputType,_=S._mimeType;S.on("data",function(B,M){P.push(B),A&&A(M)}).on("error",function(B){P=[],x(B)}).on("end",function(){try{var B=function(M,N,I){switch(M){case"blob":return a.newBlob(a.transformTo("arraybuffer",N),I);case"base64":return c.encode(N);default:return a.transformTo(M,N)}}(T,function(M,N){var I,R=0,F=null,k=0;for(I=0;I"u")o.blob=!1;else{var a=new ArrayBuffer(0);try{o.blob=new Blob([a],{type:"application/zip"}).size===0}catch(u){try{var l=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);l.append(a),o.blob=l.getBlob("application/zip").size===0}catch(c){o.blob=!1}}}try{o.nodestream=!!r("readable-stream").Readable}catch(u){o.nodestream=!1}},{"readable-stream":16}],31:[function(r,s,o){for(var a=r("./utils"),l=r("./support"),u=r("./nodejsUtils"),c=r("./stream/GenericWorker"),d=new Array(256),g=0;g<256;g++)d[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;d[254]=d[254]=1;function m(){c.call(this,"utf-8 decode"),this.leftOver=null}function y(){c.call(this,"utf-8 encode")}o.utf8encode=function(b){return l.nodebuffer?u.newBufferFrom(b,"utf-8"):function(S){var A,E,x,P,C,T=S.length,_=0;for(P=0;P>>6:(E<65536?A[C++]=224|E>>>12:(A[C++]=240|E>>>18,A[C++]=128|E>>>12&63),A[C++]=128|E>>>6&63),A[C++]=128|63&E);return A}(b)},o.utf8decode=function(b){return l.nodebuffer?a.transformTo("nodebuffer",b).toString("utf-8"):function(S){var A,E,x,P,C=S.length,T=new Array(2*C);for(A=E=0;A>10&1023,T[E++]=56320|1023&x)}return T.length!==E&&(T.subarray?T=T.subarray(0,E):T.length=E),a.applyFromCharCode(T)}(b=a.transformTo(l.uint8array?"uint8array":"array",b))},a.inherits(m,c),m.prototype.processChunk=function(b){var S=a.transformTo(l.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var A=S;(S=new Uint8Array(A.length+this.leftOver.length)).set(this.leftOver,0),S.set(A,this.leftOver.length)}else S=this.leftOver.concat(S);this.leftOver=null}var E=function(P,C){var T;for((C=C||P.length)>P.length&&(C=P.length),T=C-1;0<=T&&(192&P[T])==128;)T--;return T<0||T===0?C:T+d[P[T]]>C?T:C}(S),x=S;E!==S.length&&(l.uint8array?(x=S.subarray(0,E),this.leftOver=S.subarray(E,S.length)):(x=S.slice(0,E),this.leftOver=S.slice(E,S.length))),this.push({data:o.utf8decode(x),meta:b.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=m,a.inherits(y,c),y.prototype.processChunk=function(b){this.push({data:o.utf8encode(b.data),meta:b.meta})},o.Utf8EncodeWorker=y},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,s,o){var a=r("./support"),l=r("./base64"),u=r("./nodejsUtils"),c=r("./external");function d(A){return A}function g(A,E){for(var x=0;x>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(){if(this.extraFields[1]){var b=a(this.extraFields[1].value);this.uncompressedSize===l.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===l.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===l.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===l.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var S,A,E,x=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4>>6:(b<65536?y[E++]=224|b>>>12:(y[E++]=240|b>>>18,y[E++]=128|b>>>12&63),y[E++]=128|b>>>6&63),y[E++]=128|63&b);return y},o.buf2binstring=function(m){return g(m,m.length)},o.binstring2buf=function(m){for(var y=new a.Buf8(m.length),b=0,S=y.length;b>10&1023,P[S++]=56320|1023&A)}return g(P,S)},o.utf8border=function(m,y){var b;for((y=y||m.length)>m.length&&(y=m.length),b=y-1;0<=b&&(192&m[b])==128;)b--;return b<0||b===0?y:b+c[m[b]]>y?b:y}},{"./common":41}],43:[function(r,s,o){s.exports=function(a,l,u,c){for(var d=65535&a|0,g=a>>>16&65535|0,m=0;u!==0;){for(u-=m=2e3>>1:l>>>1;u[c]=l}return u}();s.exports=function(l,u,c,d){var g=a,m=d+c;l^=-1;for(var y=d;y>>8^g[255&(l^u[y])];return-1^l}},{}],46:[function(r,s,o){var a,l=r("../utils/common"),u=r("./trees"),c=r("./adler32"),d=r("./crc32"),g=r("./messages"),m=0,y=4,b=0,S=-2,A=-1,E=4,x=2,P=8,C=9,T=286,_=30,B=19,M=2*T+1,N=15,I=3,R=258,F=R+I+1,k=42,V=113,D=1,$=2,O=3,q=4;function G(z,me){return z.msg=g[me],me}function U(z){return(z<<1)-(4z.avail_out&&(pe=z.avail_out),pe!==0&&(l.arraySet(z.output,me.pending_buf,me.pending_out,pe,z.next_out),z.next_out+=pe,me.pending_out+=pe,z.total_out+=pe,z.avail_out-=pe,me.pending-=pe,me.pending===0&&(me.pending_out=0))}function K(z,me){u._tr_flush_block(z,0<=z.block_start?z.block_start:-1,z.strstart-z.block_start,me),z.block_start=z.strstart,W(z.strm)}function ye(z,me){z.pending_buf[z.pending++]=me}function ae(z,me){z.pending_buf[z.pending++]=me>>>8&255,z.pending_buf[z.pending++]=255&me}function Y(z,me){var pe,ee,ne=z.max_chain_length,fe=z.strstart,_e=z.prev_length,Ae=z.nice_match,Pe=z.strstart>z.w_size-F?z.strstart-(z.w_size-F):0,Be=z.window,Re=z.w_mask,xe=z.prev,ce=z.strstart+R,Ee=Be[fe+_e-1],de=Be[fe+_e];z.prev_length>=z.good_match&&(ne>>=2),Ae>z.lookahead&&(Ae=z.lookahead);do if(Be[(pe=me)+_e]===de&&Be[pe+_e-1]===Ee&&Be[pe]===Be[fe]&&Be[++pe]===Be[fe+1]){fe+=2,pe++;do;while(Be[++fe]===Be[++pe]&&Be[++fe]===Be[++pe]&&Be[++fe]===Be[++pe]&&Be[++fe]===Be[++pe]&&Be[++fe]===Be[++pe]&&Be[++fe]===Be[++pe]&&Be[++fe]===Be[++pe]&&Be[++fe]===Be[++pe]&&fePe&&--ne!=0);return _e<=z.lookahead?_e:z.lookahead}function Q(z){var me,pe,ee,ne,fe,_e,Ae,Pe,Be,Re,xe=z.w_size;do{if(ne=z.window_size-z.lookahead-z.strstart,z.strstart>=xe+(xe-F)){for(l.arraySet(z.window,z.window,xe,xe,0),z.match_start-=xe,z.strstart-=xe,z.block_start-=xe,me=pe=z.hash_size;ee=z.head[--me],z.head[me]=xe<=ee?ee-xe:0,--pe;);for(me=pe=xe;ee=z.prev[--me],z.prev[me]=xe<=ee?ee-xe:0,--pe;);ne+=xe}if(z.strm.avail_in===0)break;if(_e=z.strm,Ae=z.window,Pe=z.strstart+z.lookahead,Be=ne,Re=void 0,Re=_e.avail_in,Be=I)for(fe=z.strstart-z.insert,z.ins_h=z.window[fe],z.ins_h=(z.ins_h<=I&&(z.ins_h=(z.ins_h<=I)if(ee=u._tr_tally(z,z.strstart-z.match_start,z.match_length-I),z.lookahead-=z.match_length,z.match_length<=z.max_lazy_match&&z.lookahead>=I){for(z.match_length--;z.strstart++,z.ins_h=(z.ins_h<=I&&(z.ins_h=(z.ins_h<=I&&z.match_length<=z.prev_length){for(ne=z.strstart+z.lookahead-I,ee=u._tr_tally(z,z.strstart-1-z.prev_match,z.prev_length-I),z.lookahead-=z.prev_length-1,z.prev_length-=2;++z.strstart<=ne&&(z.ins_h=(z.ins_h<z.pending_buf_size-5&&(pe=z.pending_buf_size-5);;){if(z.lookahead<=1){if(Q(z),z.lookahead===0&&me===m)return D;if(z.lookahead===0)break}z.strstart+=z.lookahead,z.lookahead=0;var ee=z.block_start+pe;if((z.strstart===0||z.strstart>=ee)&&(z.lookahead=z.strstart-ee,z.strstart=ee,K(z,!1),z.strm.avail_out===0)||z.strstart-z.block_start>=z.w_size-F&&(K(z,!1),z.strm.avail_out===0))return D}return z.insert=0,me===y?(K(z,!0),z.strm.avail_out===0?O:q):(z.strstart>z.block_start&&(K(z,!1),z.strm.avail_out),D)}),new Se(4,4,8,4,he),new Se(4,5,16,8,he),new Se(4,6,32,32,he),new Se(4,4,16,16,ge),new Se(8,16,32,32,ge),new Se(8,16,128,128,ge),new Se(8,32,128,256,ge),new Se(32,128,258,1024,ge),new Se(32,258,258,4096,ge)],o.deflateInit=function(z,me){return oe(z,me,P,15,8,0)},o.deflateInit2=oe,o.deflateReset=te,o.deflateResetKeep=Me,o.deflateSetHeader=function(z,me){return z&&z.state?z.state.wrap!==2?S:(z.state.gzhead=me,b):S},o.deflate=function(z,me){var pe,ee,ne,fe;if(!z||!z.state||5>8&255),ye(ee,ee.gzhead.time>>16&255),ye(ee,ee.gzhead.time>>24&255),ye(ee,ee.level===9?2:2<=ee.strategy||ee.level<2?4:0),ye(ee,255&ee.gzhead.os),ee.gzhead.extra&&ee.gzhead.extra.length&&(ye(ee,255&ee.gzhead.extra.length),ye(ee,ee.gzhead.extra.length>>8&255)),ee.gzhead.hcrc&&(z.adler=d(z.adler,ee.pending_buf,ee.pending,0)),ee.gzindex=0,ee.status=69):(ye(ee,0),ye(ee,0),ye(ee,0),ye(ee,0),ye(ee,0),ye(ee,ee.level===9?2:2<=ee.strategy||ee.level<2?4:0),ye(ee,3),ee.status=V);else{var _e=P+(ee.w_bits-8<<4)<<8;_e|=(2<=ee.strategy||ee.level<2?0:ee.level<6?1:ee.level===6?2:3)<<6,ee.strstart!==0&&(_e|=32),_e+=31-_e%31,ee.status=V,ae(ee,_e),ee.strstart!==0&&(ae(ee,z.adler>>>16),ae(ee,65535&z.adler)),z.adler=1}if(ee.status===69)if(ee.gzhead.extra){for(ne=ee.pending;ee.gzindex<(65535&ee.gzhead.extra.length)&&(ee.pending!==ee.pending_buf_size||(ee.gzhead.hcrc&&ee.pending>ne&&(z.adler=d(z.adler,ee.pending_buf,ee.pending-ne,ne)),W(z),ne=ee.pending,ee.pending!==ee.pending_buf_size));)ye(ee,255&ee.gzhead.extra[ee.gzindex]),ee.gzindex++;ee.gzhead.hcrc&&ee.pending>ne&&(z.adler=d(z.adler,ee.pending_buf,ee.pending-ne,ne)),ee.gzindex===ee.gzhead.extra.length&&(ee.gzindex=0,ee.status=73)}else ee.status=73;if(ee.status===73)if(ee.gzhead.name){ne=ee.pending;do{if(ee.pending===ee.pending_buf_size&&(ee.gzhead.hcrc&&ee.pending>ne&&(z.adler=d(z.adler,ee.pending_buf,ee.pending-ne,ne)),W(z),ne=ee.pending,ee.pending===ee.pending_buf_size)){fe=1;break}fe=ee.gzindexne&&(z.adler=d(z.adler,ee.pending_buf,ee.pending-ne,ne)),fe===0&&(ee.gzindex=0,ee.status=91)}else ee.status=91;if(ee.status===91)if(ee.gzhead.comment){ne=ee.pending;do{if(ee.pending===ee.pending_buf_size&&(ee.gzhead.hcrc&&ee.pending>ne&&(z.adler=d(z.adler,ee.pending_buf,ee.pending-ne,ne)),W(z),ne=ee.pending,ee.pending===ee.pending_buf_size)){fe=1;break}fe=ee.gzindexne&&(z.adler=d(z.adler,ee.pending_buf,ee.pending-ne,ne)),fe===0&&(ee.status=103)}else ee.status=103;if(ee.status===103&&(ee.gzhead.hcrc?(ee.pending+2>ee.pending_buf_size&&W(z),ee.pending+2<=ee.pending_buf_size&&(ye(ee,255&z.adler),ye(ee,z.adler>>8&255),z.adler=0,ee.status=V)):ee.status=V),ee.pending!==0){if(W(z),z.avail_out===0)return ee.last_flush=-1,b}else if(z.avail_in===0&&U(me)<=U(pe)&&me!==y)return G(z,-5);if(ee.status===666&&z.avail_in!==0)return G(z,-5);if(z.avail_in!==0||ee.lookahead!==0||me!==m&&ee.status!==666){var Ae=ee.strategy===2?function(Pe,Be){for(var Re;;){if(Pe.lookahead===0&&(Q(Pe),Pe.lookahead===0)){if(Be===m)return D;break}if(Pe.match_length=0,Re=u._tr_tally(Pe,0,Pe.window[Pe.strstart]),Pe.lookahead--,Pe.strstart++,Re&&(K(Pe,!1),Pe.strm.avail_out===0))return D}return Pe.insert=0,Be===y?(K(Pe,!0),Pe.strm.avail_out===0?O:q):Pe.last_lit&&(K(Pe,!1),Pe.strm.avail_out===0)?D:$}(ee,me):ee.strategy===3?function(Pe,Be){for(var Re,xe,ce,Ee,de=Pe.window;;){if(Pe.lookahead<=R){if(Q(Pe),Pe.lookahead<=R&&Be===m)return D;if(Pe.lookahead===0)break}if(Pe.match_length=0,Pe.lookahead>=I&&0Pe.lookahead&&(Pe.match_length=Pe.lookahead)}if(Pe.match_length>=I?(Re=u._tr_tally(Pe,1,Pe.match_length-I),Pe.lookahead-=Pe.match_length,Pe.strstart+=Pe.match_length,Pe.match_length=0):(Re=u._tr_tally(Pe,0,Pe.window[Pe.strstart]),Pe.lookahead--,Pe.strstart++),Re&&(K(Pe,!1),Pe.strm.avail_out===0))return D}return Pe.insert=0,Be===y?(K(Pe,!0),Pe.strm.avail_out===0?O:q):Pe.last_lit&&(K(Pe,!1),Pe.strm.avail_out===0)?D:$}(ee,me):a[ee.level].func(ee,me);if(Ae!==O&&Ae!==q||(ee.status=666),Ae===D||Ae===O)return z.avail_out===0&&(ee.last_flush=-1),b;if(Ae===$&&(me===1?u._tr_align(ee):me!==5&&(u._tr_stored_block(ee,0,0,!1),me===3&&(Z(ee.head),ee.lookahead===0&&(ee.strstart=0,ee.block_start=0,ee.insert=0))),W(z),z.avail_out===0))return ee.last_flush=-1,b}return me!==y?b:ee.wrap<=0?1:(ee.wrap===2?(ye(ee,255&z.adler),ye(ee,z.adler>>8&255),ye(ee,z.adler>>16&255),ye(ee,z.adler>>24&255),ye(ee,255&z.total_in),ye(ee,z.total_in>>8&255),ye(ee,z.total_in>>16&255),ye(ee,z.total_in>>24&255)):(ae(ee,z.adler>>>16),ae(ee,65535&z.adler)),W(z),0=pe.w_size&&(fe===0&&(Z(pe.head),pe.strstart=0,pe.block_start=0,pe.insert=0),Be=new l.Buf8(pe.w_size),l.arraySet(Be,me,Re-pe.w_size,pe.w_size,0),me=Be,Re=pe.w_size),_e=z.avail_in,Ae=z.next_in,Pe=z.input,z.avail_in=Re,z.next_in=0,z.input=me,Q(pe);pe.lookahead>=I;){for(ee=pe.strstart,ne=pe.lookahead-(I-1);pe.ins_h=(pe.ins_h<>>=I=N>>>24,C-=I,(I=N>>>16&255)===0)$[g++]=65535&N;else{if(!(16&I)){if(!(64&I)){N=T[(65535&N)+(P&(1<>>=I,C-=I),C<15&&(P+=D[c++]<>>=I=N>>>24,C-=I,!(16&(I=N>>>16&255))){if(!(64&I)){N=_[(65535&N)+(P&(1<>>=I,C-=I,(I=g-m)>3,P&=(1<<(C-=R<<3))-1,a.next_in=c,a.next_out=g,a.avail_in=c>>24&255)+(k>>>8&65280)+((65280&k)<<8)+((255&k)<<24)}function P(){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 a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function C(k){var V;return k&&k.state?(V=k.state,k.total_in=k.total_out=V.total=0,k.msg="",V.wrap&&(k.adler=1&V.wrap),V.mode=S,V.last=0,V.havedict=0,V.dmax=32768,V.head=null,V.hold=0,V.bits=0,V.lencode=V.lendyn=new a.Buf32(A),V.distcode=V.distdyn=new a.Buf32(E),V.sane=1,V.back=-1,y):b}function T(k){var V;return k&&k.state?((V=k.state).wsize=0,V.whave=0,V.wnext=0,C(k)):b}function _(k,V){var D,$;return k&&k.state?($=k.state,V<0?(D=0,V=-V):(D=1+(V>>4),V<48&&(V&=15)),V&&(V<8||15=q.wsize?(a.arraySet(q.window,V,D-q.wsize,q.wsize,0),q.wnext=0,q.whave=q.wsize):($<(O=q.wsize-q.wnext)&&(O=$),a.arraySet(q.window,V,D-$,O,q.wnext),($-=O)?(a.arraySet(q.window,V,D-$,$,0),q.wnext=$,q.whave=q.wsize):(q.wnext+=O,q.wnext===q.wsize&&(q.wnext=0),q.whave>>8&255,D.check=u(D.check,fe,2,0),K=W=0,D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&W)<<8)+(W>>8))%31){k.msg="incorrect header check",D.mode=30;break}if((15&W)!=8){k.msg="unknown compression method",D.mode=30;break}if(K-=4,z=8+(15&(W>>>=4)),D.wbits===0)D.wbits=z;else if(z>D.wbits){k.msg="invalid window size",D.mode=30;break}D.dmax=1<>8&1),512&D.flags&&(fe[0]=255&W,fe[1]=W>>>8&255,D.check=u(D.check,fe,2,0)),K=W=0,D.mode=3;case 3:for(;K<32;){if(U===0)break e;U--,W+=$[q++]<>>8&255,fe[2]=W>>>16&255,fe[3]=W>>>24&255,D.check=u(D.check,fe,4,0)),K=W=0,D.mode=4;case 4:for(;K<16;){if(U===0)break e;U--,W+=$[q++]<>8),512&D.flags&&(fe[0]=255&W,fe[1]=W>>>8&255,D.check=u(D.check,fe,2,0)),K=W=0,D.mode=5;case 5:if(1024&D.flags){for(;K<16;){if(U===0)break e;U--,W+=$[q++]<>>8&255,D.check=u(D.check,fe,2,0)),K=W=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&(U<(Y=D.length)&&(Y=U),Y&&(D.head&&(z=D.head.extra_len-D.length,D.head.extra||(D.head.extra=new Array(D.head.extra_len)),a.arraySet(D.head.extra,$,q,Y,z)),512&D.flags&&(D.check=u(D.check,$,Y,q)),U-=Y,q+=Y,D.length-=Y),D.length))break e;D.length=0,D.mode=7;case 7:if(2048&D.flags){if(U===0)break e;for(Y=0;z=$[q+Y++],D.head&&z&&D.length<65536&&(D.head.name+=String.fromCharCode(z)),z&&Y>9&1,D.head.done=!0),k.adler=D.check=0,D.mode=12;break;case 10:for(;K<32;){if(U===0)break e;U--,W+=$[q++]<>>=7&K,K-=7&K,D.mode=27;break}for(;K<3;){if(U===0)break e;U--,W+=$[q++]<>>=1)){case 0:D.mode=14;break;case 1:if(R(D),D.mode=20,V!==6)break;W>>>=2,K-=2;break e;case 2:D.mode=17;break;case 3:k.msg="invalid block type",D.mode=30}W>>>=2,K-=2;break;case 14:for(W>>>=7&K,K-=7&K;K<32;){if(U===0)break e;U--,W+=$[q++]<>>16^65535)){k.msg="invalid stored block lengths",D.mode=30;break}if(D.length=65535&W,K=W=0,D.mode=15,V===6)break e;case 15:D.mode=16;case 16:if(Y=D.length){if(U>>=5,K-=5,D.ndist=1+(31&W),W>>>=5,K-=5,D.ncode=4+(15&W),W>>>=4,K-=4,286>>=3,K-=3}for(;D.have<19;)D.lens[_e[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,pe={bits:D.lenbits},me=d(0,D.lens,0,19,D.lencode,0,D.work,pe),D.lenbits=pe.bits,me){k.msg="invalid code lengths set",D.mode=30;break}D.have=0,D.mode=19;case 19:for(;D.have>>16&255,Ie=65535&ne,!((ge=ne>>>24)<=K);){if(U===0)break e;U--,W+=$[q++]<>>=ge,K-=ge,D.lens[D.have++]=Ie;else{if(Ie===16){for(ee=ge+2;K>>=ge,K-=ge,D.have===0){k.msg="invalid bit length repeat",D.mode=30;break}z=D.lens[D.have-1],Y=3+(3&W),W>>>=2,K-=2}else if(Ie===17){for(ee=ge+3;K>>=ge)),W>>>=3,K-=3}else{for(ee=ge+7;K>>=ge)),W>>>=7,K-=7}if(D.have+Y>D.nlen+D.ndist){k.msg="invalid bit length repeat",D.mode=30;break}for(;Y--;)D.lens[D.have++]=z}}if(D.mode===30)break;if(D.lens[256]===0){k.msg="invalid code -- missing end-of-block",D.mode=30;break}if(D.lenbits=9,pe={bits:D.lenbits},me=d(g,D.lens,0,D.nlen,D.lencode,0,D.work,pe),D.lenbits=pe.bits,me){k.msg="invalid literal/lengths set",D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,pe={bits:D.distbits},me=d(m,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,pe),D.distbits=pe.bits,me){k.msg="invalid distances set",D.mode=30;break}if(D.mode=20,V===6)break e;case 20:D.mode=21;case 21:if(6<=U&&258<=Z){k.next_out=G,k.avail_out=Z,k.next_in=q,k.avail_in=U,D.hold=W,D.bits=K,c(k,ae),G=k.next_out,O=k.output,Z=k.avail_out,q=k.next_in,$=k.input,U=k.avail_in,W=D.hold,K=D.bits,D.mode===12&&(D.back=-1);break}for(D.back=0;Se=(ne=D.lencode[W&(1<>>16&255,Ie=65535&ne,!((ge=ne>>>24)<=K);){if(U===0)break e;U--,W+=$[q++]<>Me)])>>>16&255,Ie=65535&ne,!(Me+(ge=ne>>>24)<=K);){if(U===0)break e;U--,W+=$[q++]<>>=Me,K-=Me,D.back+=Me}if(W>>>=ge,K-=ge,D.back+=ge,D.length=Ie,Se===0){D.mode=26;break}if(32&Se){D.back=-1,D.mode=12;break}if(64&Se){k.msg="invalid literal/length code",D.mode=30;break}D.extra=15&Se,D.mode=22;case 22:if(D.extra){for(ee=D.extra;K>>=D.extra,K-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=23;case 23:for(;Se=(ne=D.distcode[W&(1<>>16&255,Ie=65535&ne,!((ge=ne>>>24)<=K);){if(U===0)break e;U--,W+=$[q++]<>Me)])>>>16&255,Ie=65535&ne,!(Me+(ge=ne>>>24)<=K);){if(U===0)break e;U--,W+=$[q++]<>>=Me,K-=Me,D.back+=Me}if(W>>>=ge,K-=ge,D.back+=ge,64&Se){k.msg="invalid distance code",D.mode=30;break}D.offset=Ie,D.extra=15&Se,D.mode=24;case 24:if(D.extra){for(ee=D.extra;K>>=D.extra,K-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){k.msg="invalid distance too far back",D.mode=30;break}D.mode=25;case 25:if(Z===0)break e;if(Y=ae-Z,D.offset>Y){if((Y=D.offset-Y)>D.whave&&D.sane){k.msg="invalid distance too far back",D.mode=30;break}Q=Y>D.wnext?(Y-=D.wnext,D.wsize-Y):D.wnext-Y,Y>D.length&&(Y=D.length),he=D.window}else he=O,Q=G-D.offset,Y=D.length;for(ZM?(I=Q[he+E[V]],K[ye+E[V]]):(I=96,0),P=1<>G)+(C-=P)]=N<<24|I<<16|R|0,C!==0;);for(P=1<>=1;if(P!==0?(W&=P-1,W+=P):W=0,V++,--ae[k]==0){if(k===$)break;k=m[y+E[V]]}if(O>>7)]}function ye(ne,fe){ne.pending_buf[ne.pending++]=255&fe,ne.pending_buf[ne.pending++]=fe>>>8&255}function ae(ne,fe,_e){ne.bi_valid>x-_e?(ne.bi_buf|=fe<>x-ne.bi_valid,ne.bi_valid+=_e-x):(ne.bi_buf|=fe<>>=1,_e<<=1,0<--fe;);return _e>>>1}function he(ne,fe,_e){var Ae,Pe,Be=new Array(E+1),Re=0;for(Ae=1;Ae<=E;Ae++)Be[Ae]=Re=Re+_e[Ae-1]<<1;for(Pe=0;Pe<=fe;Pe++){var xe=ne[2*Pe+1];xe!==0&&(ne[2*Pe]=Q(Be[xe]++,xe))}}function ge(ne){var fe;for(fe=0;fe>1;1<=_e;_e--)Me(ne,Be,_e);for(Pe=ce;_e=ne.heap[1],ne.heap[1]=ne.heap[ne.heap_len--],Me(ne,Be,1),Ae=ne.heap[1],ne.heap[--ne.heap_max]=_e,ne.heap[--ne.heap_max]=Ae,Be[2*Pe]=Be[2*_e]+Be[2*Ae],ne.depth[Pe]=(ne.depth[_e]>=ne.depth[Ae]?ne.depth[_e]:ne.depth[Ae])+1,Be[2*_e+1]=Be[2*Ae+1]=Pe,ne.heap[1]=Pe++,Me(ne,Be,1),2<=ne.heap_len;);ne.heap[--ne.heap_max]=ne.heap[1],function(de,De){var Ne,Ue,Ye,$e,Ke,Qe,tt=De.dyn_tree,ct=De.max_code,it=De.stat_desc.static_tree,ot=De.stat_desc.has_stree,bt=De.stat_desc.extra_bits,nt=De.stat_desc.extra_base,ht=De.stat_desc.max_length,ze=0;for($e=0;$e<=E;$e++)de.bl_count[$e]=0;for(tt[2*de.heap[de.heap_max]+1]=0,Ne=de.heap_max+1;Ne>=7;Pe>>=1)if(1&Ee&&xe.dyn_ltree[2*ce]!==0)return l;if(xe.dyn_ltree[18]!==0||xe.dyn_ltree[20]!==0||xe.dyn_ltree[26]!==0)return u;for(ce=32;ce>>3,(Be=ne.static_len+3+7>>>3)<=Pe&&(Pe=Be)):Pe=Be=_e+5,_e+4<=Pe&&fe!==-1?ee(ne,fe,_e,Ae):ne.strategy===4||Be===Pe?(ae(ne,2+(Ae?1:0),3),te(ne,F,k)):(ae(ne,4+(Ae?1:0),3),function(xe,ce,Ee,de){var De;for(ae(xe,ce-257,5),ae(xe,Ee-1,5),ae(xe,de-4,4),De=0;De>>8&255,ne.pending_buf[ne.d_buf+2*ne.last_lit+1]=255&fe,ne.pending_buf[ne.l_buf+ne.last_lit]=255&_e,ne.last_lit++,fe===0?ne.dyn_ltree[2*_e]++:(ne.matches++,fe--,ne.dyn_ltree[2*(D[_e]+m+1)]++,ne.dyn_dtree[2*K(fe)]++),ne.last_lit===ne.lit_bufsize-1},o._tr_align=function(ne){ae(ne,2,3),Y(ne,C,F),function(fe){fe.bi_valid===16?(ye(fe,fe.bi_buf),fe.bi_buf=0,fe.bi_valid=0):8<=fe.bi_valid&&(fe.pending_buf[fe.pending++]=255&fe.bi_buf,fe.bi_buf>>=8,fe.bi_valid-=8)}(ne)}},{"../utils/common":41}],53:[function(r,s,o){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(r,s,o){(function(a){(function(l,u){if(!l.setImmediate){var c,d,g,m,y=1,b={},S=!1,A=l.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(l);E=E&&E.setTimeout?E:l,c={}.toString.call(l.process)==="[object process]"?function(T){process.nextTick(function(){P(T)})}:function(){if(l.postMessage&&!l.importScripts){var T=!0,_=l.onmessage;return l.onmessage=function(){T=!1},l.postMessage("","*"),l.onmessage=_,T}}()?(m="setImmediate$"+Math.random()+"$",l.addEventListener?l.addEventListener("message",C,!1):l.attachEvent("onmessage",C),function(T){l.postMessage(m+T,"*")}):l.MessageChannel?((g=new MessageChannel).port1.onmessage=function(T){P(T.data)},function(T){g.port2.postMessage(T)}):A&&"onreadystatechange"in A.createElement("script")?(d=A.documentElement,function(T){var _=A.createElement("script");_.onreadystatechange=function(){P(T),_.onreadystatechange=null,d.removeChild(_),_=null},d.appendChild(_)}):function(T){setTimeout(P,0,T)},E.setImmediate=function(T){typeof T!="function"&&(T=new Function(""+T));for(var _=new Array(arguments.length-1),B=0;B<_.length;B++)_[B]=arguments[B+1];var M={callback:T,args:_};return b[y]=M,c(y),y++},E.clearImmediate=x}function x(T){delete b[T]}function P(T){if(S)setTimeout(P,0,T);else{var _=b[T];if(_){S=!0;try{(function(B){var M=B.callback,N=B.args;switch(N.length){case 0:M();break;case 1:M(N[0]);break;case 2:M(N[0],N[1]);break;case 3:M(N[0],N[1],N[2]);break;default:M.apply(u,N)}})(_)}finally{x(T),S=!1}}}}function C(T){T.source===l&&typeof T.data=="string"&&T.data.indexOf(m)===0&&P(+T.data.slice(m.length))}})(typeof self>"u"?a===void 0?this:a:self)}).call(this,typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(jszip_min);class MXLHelper{static MXLtoIXmlElement(e){const r=new jszip_minExports;return r.loadAsync(e).then(a=>r.file("META-INF/container.xml").async("text"),a=>{throw a}).then(a=>{const c=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return r.file(c).async("text")},a=>{throw a}).then(a=>{const u=new DOMParser().parseFromString(a,"text/xml"),c=new IXmlElement(u.documentElement);return Promise.resolve(c)},a=>{throw a}).then(a=>a,a=>{throw new Error("extractSheetFromMxl: "+a.message)})}static MXLtoXMLstring(e){const r=new jszip_minExports;return r.loadAsync(e).then(s=>r.file("META-INF/container.xml").async("text"),s=>{throw loglevelExports.error(s),s}).then(s=>{const l=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("rootfile")[0].getAttribute("full-path");return r.file(l).async("text")},s=>{throw s})}}class PlaybackNoteGenerator{calculate(e){const r=new MusicPartManagerIterator(e);for(;!r.EndReached;){const s=r.CurrentEnrolledTimestamp,o=r.CurrentAudibleVoiceEntries();for(const a of o)this.handleVoiceEntry(e,a,s);r.moveToNext()}}handleVoiceEntry(e,r,s){if(r.IsGrace)return;const o=r.ParentVoice;let a;e.PlaybackDataDict.containsKey(o)?a=e.PlaybackDataDict.getValue(o):(a=[],e.PlaybackDataDict.setValue(o,a));for(const l of r.PlaybackEntries)if(l.HasNotes){for(const c of l.Notes)c.setLength();const u=Fraction$1.plus(s,l.TimestampShift);PlaybackNoteGenerator.addEntrySorted(a,l,u)}}static addEntrySorted(e,r,s){if(e.length===0)e.push({enrolledTimestamp:s,playbackEntry:r});else for(let o=e.length-1;o>=0;o--){const a=e[o];if(s.RealValue>a.enrolledTimestamp.RealValue)if(o===e.length-1){e.push({enrolledTimestamp:s,playbackEntry:r});break}else{e.splice(o+1,0,{enrolledTimestamp:s,playbackEntry:r});break}}}}class ScreenViewingRegion{constructor(e,r,s,o){this.psi=new BoundingBox$1(void 0),this.displaySizeInPixel=e,this.RelativeDisplaySize=r,this.RelativeDisplayPosition=s,this.WidthInUnits=o}static createWithRelativeDefaults(e,r){return new ScreenViewingRegion(e,new SizeF2D(1,1),new PointF2D(0,0),r)}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,r){const s=this.psi.collisionDetection(e);return this.psi.liesInsideBorders(e),s}isInsideDisplayArea(e,r){return this.RelativeDisplayPosition.x<=e&&e<=this.RelativeDisplayPosition.x+this.RelativeDisplaySize.width&&this.RelativeDisplayPosition.y<=r&&r<=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,r){if(!this.convertToUnitsReady())return;const s=this.getPositionInUnits(e,r);this.unitPosTouched(s,e,r)}get TouchActive(){return this.displayInteractionManager.TouchActive}get TouchMoving(){return this.displayInteractionManager.TouchMoving}positionDoubleTouched(e,r){if(!this.convertToUnitsReady())return;const s=this.getPositionInUnits(e,r);this.unitPosDoubleTouched(s,e,r)}get UsesManuallyControlledZoomMode(){return this.usesManuallyControlledZoomMode}set UsesManuallyControlledZoomMode(e){this.usesManuallyControlledZoomMode=e}mouseDown(e,r,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 o=this.getPositionInUnits(e,r);this.unitPosTouchDown(o,e,r),this.usesManuallyControlledZoomMode||(s?this.mouseZoomMode=!0:this.mouseZoomMode=!1)}mouseUp(e,r){const s=this.getPositionInUnits(e,r);this.unitPosTouchUp(s,e,r)}mouseMove(e,r,s,o){this.mouseZoomMode?(Math.abs(s-0)>1e-8&&(this.RangeX=Math.abs(this.lastRangeX/(1+s))),!this.lockRanges&&Math.abs(o-0)>1e-8&&(this.RangeY=Math.abs(this.lastRangeY/(1-o)))):(Math.abs(s-0)>1e-8&&(this.OffsetX=this.lastOffsetX-s*this.RangeX),Math.abs(o-0)>1e-8&&(this.OffsetY=this.lastOffsetY-o*this.RangeY));const a=this.getPositionInUnits(e,r);this.unitPosMove(a,e,r)}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 r of this.zoomViews)r.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(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,r,s){var o,a;switch(s){case InteractionType.TouchDown:case InteractionType.SingleTouch:case InteractionType.DoubleTouch:{const l=this.renderingManager.GraphicalMusicSheet.GetNearestVoiceEntry(r);if(l&&l.parentStaffEntry.parentVerticalContainer!==void 0){const u=l.parentStaffEntry.parentVerticalContainer.AbsoluteTimestamp;this.renderingManager.setStartPosition(u),((o=l.notes[0])==null?void 0:o.sourceNote.Pitch)!==void 0&&((a=this.renderingManager.PlaybackManager)==null||a.playVoiceEntry(l.parentVoiceEntry))}break}}}}class SheetRenderingManager extends AbstractZoomView{constructor(e,r){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=r,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,r,s){if(!this.SingleTouchDisabled){const o=new PointF2D(r,s);this.handleUserDisplayInteraction(o,e,InteractionType.SingleTouch)}}unitPosDoubleTouched(e,r,s){if(!this.DoubleTouchDisabled){const o=new PointF2D(r,s);this.handleUserDisplayInteraction(o,e,InteractionType.DoubleTouch)}}unitPosTouchDown(e,r,s){const o=new PointF2D(r,s);this.handleUserDisplayInteraction(o,e,InteractionType.TouchDown),this.yOffsetMouseDown=e.y}unitPosTouchUp(e,r,s){const o=new PointF2D(r,s);this.handleUserDisplayInteraction(o,e,InteractionType.TouchUp),this.displayInteractionManager.WasZoomGestureActive===!1&&this.unlockFromCursorIfNecessary(e),this.yOffsetMouseDown=Number.MIN_VALUE}unitPosMove(e,r,s){const o=new PointF2D(r,s);this.handleUserDisplayInteraction(o,e,InteractionType.Move),this.unlockFromCursorIfNecessary(e)}get MainViewingRegion(){return this.mainViewingRegion}setMusicSheet(e){this.graphicalMusicSheet=e,this.adaptDisplayLimitsToSheet(),this.setYOffset(0,!0)}viewportXChanged(e,r){this.graphicalMusicSheet!==void 0&&this.horizontalViewportChanged(e,r)}viewportYChanged(e,r){this.graphicalMusicSheet!==void 0&&(this.yOffsetMouseDown<=Number.MIN_VALUE+.5&&(this.yOffsetMouseDown=e),this.verticalViewportChanged(e,r))}displaySizeChanged(e,r){super.viewSizeChanged(e,r),!(Math.abs(e-0)<1e-7||Math.abs(r-0)<1e-7)&&(this.graphicalMusicSheet!==void 0&&this.graphicalMusicSheet.EnforceRedrawOfMusicSystems(),this.mainViewingRegion.DisplaySizeInPixel=new SizeF2D(e,r),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,r,s,o,a,l){const u=this.calcDisplayYPosition(o);this.setYPosition(u,l)}setXPosition(e,r){this.LockDisplayToCursor&&this.setXOffset(e,r)}setYPosition(e,r){this.LockDisplayToCursor&&this.setYOffset(e,r)}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,r){return this.mainViewingRegion.transformToUnitCoordinates(new PointF2D(e,r))}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,r){this.mainViewingRegion.WidthInUnits!==r&&(this.mainViewingRegion.WidthInUnits=r)}verticalViewportChanged(e,r){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,r){return this.mainViewingRegion.transformToUnitCoordinates(new PointF2D(e,r))}handleUserDisplayInteraction(e,r,s){switch(s){case InteractionType.TouchDown:case InteractionType.SingleTouch:case InteractionType.DoubleTouch:case InteractionType.TouchUp:case InteractionType.TouchDown:case InteractionType.Move:for(const o of this.listeners)o.userDisplayInteraction(e,r,s);break;default:throw new Error("type")}}setStartPosition(e){var r;this.graphicalMusicSheet!==void 0&&(this.graphicalMusicSheet.ParentMusicSheet.SelectionStart=e,(r=this.PlaybackManager)==null||r.reset())}get GraphicalMusicSheet(){return this.graphicalMusicSheet}}class WebSheetRenderingManager extends SheetRenderingManager{mouseMove(e,r,s,o){const a=this.getPositionInUnits(e,r);this.unitPosMove(a,e,r)}}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,r){this.displayWidth=e,this.displayHeight=r;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,r,s){this.interactionWasZoomGesture=!1;const o=e/this.displayWidth,a=r/this.displayHeight;this.lastRelPosX=o,this.lastRelPosY=a,this.lastPixelX=e,this.lastPixelY=r,this.touchActive=!0,this.touchMoving=!1,this.touchCount=Math.min(this.touchCount+1,this.maxNumerOfFingers);for(const l of this.listeners)l.mouseDown(o,a,!s)}move(e,r){if(this.touchActive&&!this.zoomGestureActive){const s=e/this.displayWidth,o=r/this.displayHeight,a=s-this.lastRelPosX,l=o-this.lastRelPosY;this.touchMoving=!0;for(const u of this.listeners)u.mouseMove(s,o,a,l)}}zoomGestureStarted(){this.zoomGestureActive=!0}zoomGestureCompleted(){this.zoomGestureActive=!1,this.interactionWasZoomGesture=!0}zoomGestureMove(e){this.zoomGestureActive&&this.listeners.forEach(function(r){r.zoom(e)})}touchUp(e,r){this.touchActive=!1,this.touchMoving=!1,this.touchCount=Math.max(0,this.touchCount-1);const s=e/this.displayWidth,o=r/this.displayHeight;for(const a of this.listeners)a.mouseUp(s,o)}click(e,r){if(!this.mouseDidMove(this.lastPixelX,e,this.lastPixelY,r)&&!this.ZoomGestureActive){const s=e/this.displayWidth,o=r/this.displayHeight;for(const a of this.listeners)a.positionTouched(s,o)}}doubleClick(e,r){if(!this.mouseDidMove(this.lastPixelX,e,this.lastPixelY,r)&&!this.ZoomGestureActive){const s=e/this.displayWidth,o=r/this.displayHeight;for(const a of this.listeners)a.positionDoubleTouched(s,o)}}mouseDidMove(e,r,s,o){const a=Math.abs(e-r)/this.displayDpi,l=Math.abs(s-o)/this.displayDpi;return a>this.movementThreshInch||l>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,r){clearTimeout(r.timeout),r.timeout=setTimeout(()=>{r.fullOffsetLeft=0,r.fullOffsetTop=0;let s=r.osmdSheetMusicContainer;for(;s;)r.fullOffsetLeft+=s.offsetLeft,r.fullOffsetTop+=s.offsetTop,s=s.offsetParent;r.resizeEventListener(),r.deregisterScrollOffsets(),r.registerScrollOffsets()},500)}registerScrollOffsets(){let e=this.osmdSheetMusicContainer;this.fullScrollTop=0,this.fullScrollLeft=0;const r=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(o){const a=r.parentScrollMap.get(this),l=a[0],u=a[1];r.fullScrollTop=r.fullScrollTop-l+this.scrollTop,r.fullScrollLeft=r.fullScrollLeft-u+this.scrollLeft,r.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 r=[],s=this;for(window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(o=>{WebDisplayInteractionManager.resizeCallback(o,s)}));e;)this.fullOffsetLeft+=e.offsetLeft,this.fullOffsetTop+=e.offsetTop,this.resizeObserver?this.resizeObserver.observe(e):r.push(e),e=e.offsetParent;if(this.resizeObserver)this.disposeResizeListener=()=>{s.resizeObserver.disconnect(),s.resizeObserver=void 0};else{let o=()=>{WebDisplayInteractionManager.resizeCallback(r,s)};window.addEventListener("resize",o),this.disposeResizeListener=()=>{window.removeEventListener("resize",o),o=void 0}}s.registerScrollOffsets()}dispose(){this.disposeResizeListener();for(const e of this.EventCallbackMap.keys()){const r=this.EventCallbackMap.getValue(e);r[0].removeEventListener(e,r[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 r=["(",["-webkit-","-moz-","-o-","-ms-"].join("touch-enabled),("),"heartz",")"].join("");return window.matchMedia(r).matches}get downEventName(){return this.isTouch()?"touchstart":"mousedown"}get moveEventName(){return this.isTouch()?"touchmove":"mousemove"}listenForInteractions(){const e=this.downEventListener.bind(this),r=this.touchEndEventListener.bind(this),s=this.moveEventListener.bind(this);this.osmdSheetMusicContainer.addEventListener("mousedown",e),this.osmdSheetMusicContainer.addEventListener("touchend",r),document.addEventListener(this.moveEventName,s),this.EventCallbackMap.setValue("mousedown",[this.osmdSheetMusicContainer,e]),this.EventCallbackMap.setValue("touchend",[this.osmdSheetMusicContainer,r]),this.EventCallbackMap.setValue(this.moveEventName,[document,s])}downEventListener(e){const r=new Date().getTime(),s=r-this.lastClick;clearTimeout(this.clickTimeout);let o=0,a=0;this.isTouch()&&e instanceof TouchEvent?(o=e.touches[0].pageX,a=e.touches[0].pageY):e instanceof MouseEvent&&(o=e.pageX,a=e.pageY);const l=this.getOffsetCoordinates(o,a);if(s0)this.doubleClick(l.x,l.y);else{const u=this;this.clickTimeout=setTimeout(function(){clearTimeout(this.clickTimeout),u.isTouch()?u.touchDown(l.x,l.y,void 0):u.click(l.x,l.y)},this.DOUBLE_CLICK_WINDOW)}this.lastClick=r}moveEventListener(e){let r=0,s=0;if(this.isTouch()&&e instanceof TouchEvent){let a;e.touches&&e.touches.length>0?a=e.touches[0]:e.changedTouches&&e.changedTouches.length>0&&(a=e.changedTouches[0]),r=a==null?void 0:a.clientX,s=a==null?void 0:a.clientY}else e instanceof MouseEvent&&(r=e.clientX,s=e.clientY);const o=this.getOffsetCoordinates(r,s);this.move(o.x,o.y)}touchEndEventListener(e){let r;e.touches&&e.touches.length>0?r=e.touches[0]:e.changedTouches&&e.changedTouches.length>0&&(r=e.changedTouches[0]);const s=this.getOffsetCoordinates(r==null?void 0:r.pageX,r==null?void 0:r.pageY);this.touchUp(s.x,s.y)}resizeEventListener(){this.displaySizeChanged(this.osmdSheetMusicContainer.clientWidth,this.osmdSheetMusicContainer.clientHeight)}getOffsetCoordinates(e,r){const s=e-this.fullOffsetLeft+this.fullScrollLeft,o=r-this.fullOffsetTop+this.fullScrollTop;return new PointF2D(s,o)}}class DynamicsCalculator{static fillDynamicsList(e,r,s){for(let o=0;o=0&&s[c].push(new DynamicsContainer(u.InstantaneousDynamic,c))}if(u.StartingContinuousDynamic!==void 0){s[o].push(new DynamicsContainer(u.StartingContinuousDynamic,u.StaffNumber));const c=this.getOtherStaffIndexIfLinkedStavesAreDetected(e,o,u.StartingContinuousDynamic.Placement);c>=0&&s[c].push(new DynamicsContainer(u.StartingContinuousDynamic,c))}}}}static getOtherStaffIndexIfLinkedStavesAreDetected(e,r,s){const o=e.getStaffFromIndex(r),a=o.ParentInstrument.Staves.indexOf(o),l=o.ParentInstrument.Staves.length;return l>1&&a===0&&s===PlacementEnum.Below?r+1:l>1&&a===1&&s===PlacementEnum.Above?r-1:-1}static fillDynamicExpressions(e){const r=e.DynListStaves,s=e.getCompleteNumberOfStaves(),o=e.TimestampSortedDynamicExpressionsList;for(let a=0;a{e(this.processStringXml(s))},s=>{loglevelExports.error(new Error("[OSMD] Invalid MXL file: "+s)),r(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("{r.isMxl(m)?r.processMxl(m,u,c):u(r.processStringXml(m))},m=>{throw c(m),m});else{const m=new Error("[OSMD] osmd.load(string): Could not process string. Did not find {e.init(this.sheet.MusicPartManager,this.graphic)}),this.drawingParameters.DrawingParametersEnum===DrawingParametersEnum.leadsheet&&(this.graphic.LeadSheet=!0),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);for(const r of this.sheet.SourceMeasures)r.WasRendered=!1;this.drawer.drawSheet(this.graphic),this.enableOrDisableCursors(this.drawingParameters.drawCursors),this.drawingParameters.drawCursors&&this.cursors.forEach(r=>{r.update()}),this.zoomUpdated=!1,this.interactionManager.displaySizeChanged(this.container.clientWidth,this.container.clientHeight),this.rules.RenderCount++}createOrRefreshRenderBackend(){if(this.drawer&&this.drawer.Backends){this.drawer.Backends[0]&&this.drawer.Backends[0].removeAllChildrenFromContainer(this.container);for(const s of this.drawer.Backends)s.free();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.EngravingRules.PageLeftMargin+this.graphic.MusicPages[0].PositionAndShape.Size.width+this.EngravingRules.PageRightMargin)*10*this.zoom);let e;const r=32767;for(const s of this.graphic.MusicPages){if(s.PageNumber>this.rules.MaxPageToDrawNumber)break;const o=this.createBackend(this.backendType,s),a=" exceeds CanvasBackend limit of 32767. Cutting off score.";o.getOSMDBackendType()===BackendType.Canvas&&i>r&&(loglevelExports.warn("[OSMD] Warning: width of "+i+a),i=r),this.rules.PageFormat&&!this.rules.PageFormat.IsUndefined?e=i/this.rules.PageFormat.aspectRatio:(e=s.PositionAndShape.Size.height,e+=this.rules.PageBottomMargin,o.getOSMDBackendType()===BackendType.Canvas&&(e+=.1),e+=s.PositionAndShape.BorderTop,this.rules.RenderTitle&&(e+=this.rules.TitleTopDistance),e*=this.zoom*10),o.getOSMDBackendType()===BackendType.Canvas&&e>r&&(loglevelExports.warn("[OSMD] Warning: height of "+e+a),e=Math.min(e,r)),o.resize(i,e),o.clear(),o.getContext().setFillStyle(this.rules.DefaultColorMusic),o.getContext().setStrokeStyle(this.rules.DefaultColorMusic),this.drawer.Backends.push(o),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&&!i.drawingParameters?this.drawingParameters=new DrawingParameters(DrawingParametersEnum.default,this.rules):i.drawingParameters&&(this.drawingParameters?this.drawingParameters.DrawingParametersEnum=DrawingParametersEnum[i.drawingParameters.toLowerCase()]:this.drawingParameters=new DrawingParameters(DrawingParametersEnum[i.drawingParameters],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(o){return o},i.onXMLRead&&(this.OnXMLRead=i.onXMLRead);let r=!this.drawer||!this.drawer.Backends||this.drawer.Backends.length<1;if(i.backend!==void 0){const o=OSMDOptions.BackendTypeFromString(i.backend);r=r||this.backendType!==o,this.backendType=o}this.needBackendUpdate=r,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 o of s.groups)if(o.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.newSystemFromNewPageInXML!==void 0&&(this.rules.NewSystemAtXMLNewPageAttribute=i.newSystemFromNewPageInXML),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.autoGenerateMultipleRestMeasuresFromRestMeasures!==void 0&&(this.rules.AutoGenerateMultipleRestMeasuresFromRestMeasures=i.autoGenerateMultipleRestMeasuresFromRestMeasures),i.cursorsOptions!==void 0?this.cursorsOptions=i.cursorsOptions:this.cursorsOptions=[{type:CursorType.Standard,color:this.EngravingRules.DefaultColorCursor,alpha:.5,follow:!0}],i.preferredSkyBottomLineBatchCalculatorBackend!==void 0&&(this.rules.PreferredSkyBottomLineBatchCalculatorBackend=i.preferredSkyBottomLineBatchCalculatorBackend),i.skyBottomLineBatchMinMeasures!==void 0&&(this.rules.SkyBottomLineBatchMinMeasures=i.skyBottomLineBatchMinMeasures)}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];let r;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 (array) with 8 strings (C to B, rest note).");for(const o of i.coloringSetCustom)if(!/^\#[0-9a-fA-F]{6}$/.test(o))throw new Error(`One of the color strings in options.coloringSetCustom was not a valid HTML Hex color: `+o);r=i.coloringSetCustom}else if(i.coloringMode===ColoringModes.AutoColoring){r=[];const o=Object.keys(AutoColorSet);for(let a=0;a{i.hide()}),this.sheet=void 0,this.graphic=void 0,this.zoom=1,this.rules.RenderCount=0}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 r,s;const a=this;function l(){a.AutoResizeEnabled&&(r=new Date().getTime(),s||(i(),r=new Date().getTime(),s=window.setTimeout(u,200)))}function u(){s=void 0,window.clearTimeout(s),new Date().getTime()-r<200?s=window.setTimeout(u,200):e()}window.attachEvent?window.attachEvent("onresize",l):window.addEventListener("resize",l),this.disposeResizeListener=()=>{window.detachEvent?window.detachEvent("onresize",l):window.removeEventListener("resize",l),this.resizeHandlerAttached=!1},this.resizeHandlerAttached=!0,window.setTimeout(i,0),window.setTimeout(e,1)}enableOrDisableCursors(i){var e,r,s,o,a,l,u,c,d;if(this.drawingParameters.drawCursors=i,i){for(let g=0;g{g.hide()})}createBackend(i,e){let r;return i===void 0||i===BackendType.SVG?r=new SvgVexFlowBackend(this.rules):r=new CanvasVexFlowBackend(this.rules),r.graphicalMusicPage=e,r.initialize(this.container,this.zoom),r}static StringToPageFormat(i){let e=PageFormat.UndefinedPageFormat;if(i.match("^[0-9]+x[0-9]+$")){const r=i.split("x"),s=Number.parseInt(r[0],10),o=Number.parseInt(r[1],10);s>0&&s<32768&&o>0&&o<32768&&(e=new PageFormat(s,o,`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 r=new PageFormat(i,e);this.rules.PageFormat=r}}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;e0?(a.ids&&(a.ids=[a.name]),s.helpers.each(o,a)):l(this);if(a.data&&a.ids){var c=r.createFrame(a.data);c.contextPath=r.appendContextPath(a.data.contextPath,a.name),a={data:c}}return u(o,a)})},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 r(l){return l&&l.__esModule?l:{default:l}}var s=utils,o=exceptionExports,a=r(o);e.default=function(l){l.registerHelper("each",function(u,c){if(!c)throw new a.default("Must pass iterator to #each");var d=c.fn,g=c.inverse,m=0,y="",b=void 0,S=void 0;c.data&&c.ids&&(S=s.appendContextPath(c.data.contextPath,c.ids[0])+"."),s.isFunction(u)&&(u=u.call(this)),c.data&&(b=s.createFrame(c.data));function A(T,_,B){b&&(b.key=T,b.index=_,b.first=_===0,b.last=!!B,S&&(b.contextPath=S+T)),y=y+d(u[T],{data:b,blockParams:s.blockParams([u[T],T],[S+T,null])})}if(u&&typeof u=="object")if(s.isArray(u))for(var E=u.length;m=0?a=l:a=parseInt(a,10)}return a},log:function(a){if(a=s.lookupLevel(a),typeof console<"u"&&s.lookupLevel(s.level)<=a){var l=s.methodMap[a];console[l]||(l="log");for(var u=arguments.length,c=Array(u>1?u-1:0),d=1;d= 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,r){this.helpers=i||{},this.partials=e||{},this.decorators=r||{},_helpers$2.registerDefaultHelpers(this),_decorators.registerDefaultDecorators(this)}HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:_logger2.default,log:_logger2.default.log,registerHelper:function i(e,r){if(_utils$3.toString.call(e)===objectType){if(r)throw new _exception2$3.default("Arg not supported with multiple helpers");_utils$3.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function i(e){delete this.helpers[e]},registerPartial:function i(e,r){if(_utils$3.toString.call(e)===objectType)_utils$3.extend(this.partials,e);else{if(typeof r>"u")throw new _exception2$3.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function i(e){delete this.partials[e]},registerDecorator:function i(e,r){if(_utils$3.toString.call(e)===objectType){if(r)throw new _exception2$3.default("Arg not supported with multiple decorators");_utils$3.extend(this.decorators,e)}else this.decorators[e]=r},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 r(s){this.string=s}r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},e.default=r,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 r=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=e(o),i.apply(this,arguments)};return r}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 r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);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,r=_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[r],o=_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 ("+o+").")}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 r=i.compiler&&i.compiler[0]===7;function s(l,u,c){c.hash&&(u=Utils.extend({},u,c.hash),c.ids&&(c.ids[0]=!0)),l=e.VM.resolvePartial.call(this,l,u,c);var d=Utils.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),g=e.VM.invokePartial.call(this,l,u,d);if(g==null&&e.compile&&(c.partials[c.name]=e.compile(l,i.compilerOptions,e),g=c.partials[c.name](u,d)),g!=null){if(c.indent){for(var m=g.split(` `),y=0,b=m.length;y"u"&&(this.lexer.yylloc={});var E=this.lexer.yylloc;m.push(E);var x=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function P(){var V;return V=c.lexer.lex()||1,typeof V!="number"&&(V=c.symbols_[V]||V),V}for(var C,T,_,B,M={},N,I,R,F;;){if(T=d[d.length-1],this.defaultActions[T]?_=this.defaultActions[T]:((C===null||typeof C>"u")&&(C=P()),_=y[T]&&y[T][C]),typeof _>"u"||!_.length||!_[0]){var k="";{F=[];for(N in y[T])this.terminals_[N]&&N>2&&F.push("'"+this.terminals_[N]+"'");this.lexer.showPosition?k="Parse error on line "+(S+1)+`: `+this.lexer.showPosition()+` Expecting `+F.join(", ")+", got '"+(this.terminals_[C]||C)+"'":k="Parse error on line "+(S+1)+": Unexpected "+(C==1?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[C]||C,line:this.lexer.yylineno,loc:E,expected:F})}}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+C);switch(_[0]){case 1:d.push(C),g.push(this.lexer.yytext),m.push(this.lexer.yylloc),d.push(_[1]),C=null,A=this.lexer.yyleng,b=this.lexer.yytext,S=this.lexer.yylineno,E=this.lexer.yylloc;break;case 2:if(I=this.productions_[_[1]][1],M.$=g[g.length-I],M._$={first_line:m[m.length-(I||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(I||1)].first_column,last_column:m[m.length-1].last_column},x&&(M._$.range=[m[m.length-(I||1)].range[0],m[m.length-1].range[1]]),B=this.performAction.call(M,b,A,S,this.yy,_[1],g,m),typeof B<"u")return B;I&&(d=d.slice(0,-1*I*2),g=g.slice(0,-1*I),m=m.slice(0,-1*I)),d.push(this.productions_[_[1]][0]),g.push(M.$),m.push(M._$),R=y[d[d.length-2]][d[d.length-1]],d.push(R);break;case 3:return!0}}return!0}},o=function(){var l={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,g=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 m=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),g.length-1&&(this.yylineno-=g.length-1);var y=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:g?(g.length===m.length?this.yylloc.first_column:0)+m[m.length-g.length].length-g[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[y[0],y[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,g,m,y;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),S=0;Sd[0].length)&&(d=g,m=S,!this.options.flex)));S++);return d?(y=d[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.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[m],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 l.options={},l.performAction=function(c,d,g,m){function y(b,S){return d.yytext=d.yytext.substring(b,d.yyleng-S+b)}switch(g){case 0:if(d.yytext.slice(-2)==="\\\\"?(y(0,1),this.begin("mu")):d.yytext.slice(-1)==="\\"?(y(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:(y(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=y(1,2).replace(/\\"/g,'"'),80;case 32:return d.yytext=y(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}},l.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],l.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}},l}();s.lexer=o;function a(){this.yy={}}return a.prototype=s,s.Parser=a,new a}();e.default=r,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 r(d){return d&&d.__esModule?d:{default:d}}var s=exceptionExports,o=r(s);function a(){this.parents=[]}a.prototype={constructor:a,mutating:!1,acceptKey:function(g,m){var y=this.accept(g[m]);if(this.mutating){if(y&&!a.prototype[y.type])throw new o.default('Unexpected node type "'+y.type+'" found when accepting '+m+" on "+g.type);g[m]=y}},acceptRequired:function(g,m){if(this.acceptKey(g,m),!g[m])throw new o.default(g.type+" requires "+m)},acceptArray:function(g){for(var m=0,y=g.length;m0)throw new _exception2$1.default("Invalid path: "+s,{loc:r});c===".."&&a++}else o.push(c)}return{type:"PathExpression",data:i,depth:a,parts:o,original:s,loc:r}}function prepareMustache(i,e,r,s,o,a){var l=s.charAt(3)||s.charAt(2),u=l!=="{"&&l!=="&",c=/\*/.test(s);return{type:c?"Decorator":"MustacheStatement",path:i,params:e,hash:r,escaped:u,strip:o,loc:this.locInfo(a)}}function prepareRawBlock(i,e,r,s){validateClose(i,r),s=this.locInfo(s);var o={type:"Program",body:e,strip:{},loc:s};return{type:"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:s}}function prepareBlock(i,e,r,s,o,a){s&&s.path&&validateClose(i,s);var l=/\*/.test(i.open);e.blockParams=i.blockParams;var u=void 0,c=void 0;if(r){if(l)throw new _exception2$1.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=s.strip),c=r.strip,u=r.program}return o&&(o=u,u=e,e=o),{type:l?"DecoratorBlock":"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:e,inverse:u,openStrip:i.strip,inverseStrip:c,closeStrip:s&&s.strip,loc:this.locInfo(a)}}function prepareProgram(i,e){if(!e&&i.length){var r=i[0].loc,s=i[i.length-1].loc;r&&s&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:s.end.line,column:s.end.column}})}return{type:"Program",body:i,strip:{},loc:e}}function preparePartialBlock(i,e,r,s){return validateClose(i,r),{type:"PartialBlockStatement",name:i.path,params:i.params,hash:i.hash,program:e,openStrip:i.strip,closeStrip:r&&r.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 r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);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 r=_parser2.default.parse(i);return r}function parse$2(i,e){var r=parseWithoutProcessing(i,e),s=new _whitespaceControl2.default(e);return s.accept(r)}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 r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var s=0;s1)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 o=e.name.original,a=e.name.type==="SubExpression";a&&this.accept(e.name),this.setupFullMustacheParams(e,r,void 0,!0);var l=e.indent||"";this.options.preventIndent&&l&&(this.opcode("appendContent",l),l=""),this.opcode("invokePartial",a,o,l),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 r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function i(e,r,s){var o=e.path,a=o.parts[0],l=r!=null||s!=null;this.opcode("getContext",o.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",s),o.strict=!0,this.accept(o),this.opcode("invokeAmbiguous",a,l)},simpleSexpr:function i(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function i(e,r,s){var o=this.setupFullMustacheParams(e,r,s),a=e.path,l=a.parts[0];if(this.options.knownHelpers[l])this.opcode("invokeKnownHelper",o.length,l);else{if(this.options.knownHelpersOnly)throw new _exception2.default("You specified knownHelpersOnly, but used the unknown helper "+l,e);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",o.length,a.original,_ast2.default.helpers.simpleId(a))}},PathExpression:function i(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],s=_ast2.default.helpers.scopedId(e),o=!e.depth&&!s&&this.blockParamIndex(r);o?this.opcode("lookupBlockParam",o,e.parts):r?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 r=e.pairs,s=0,o=r.length;for(this.opcode("pushHash");s=0)return[r,a]}}};function precompile(i,e,r){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=r.parse(i,e),o=new r.Compiler().compile(s,e);return new r.JavaScriptCompiler().compile(o,e)}function compile(i,e,r){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 o(){var l=r.parse(i,e),u=new r.Compiler().compile(l,e),c=new r.JavaScriptCompiler().compile(u,e,void 0,!0);return r.template(c)}function a(l,u){return s||(s=o()),s.call(this,l,u)}return a._setup=function(l){return s||(s=o()),s._setup(l)},a._child=function(l,u,c,d){return s||(s=o()),s._child(l,u,c,d)},a}function argEquals(i,e){if(i===e)return!0;if(_utils.isArray(i)&&_utils.isArray(e)&&i.length===e.length){for(var r=0;r>1;return c?-d:d}return base64Vlq.encode=function(c){var d="",g,m=a(c);do g=m&s,m>>>=e,m>0&&(g|=o),d+=i.encode(g);while(m>0);return d},base64Vlq.decode=function(c,d,g){var m=c.length,y=0,b=0,S,A;do{if(d>=m)throw new Error("Expected more digits in base 64 VLQ value.");if(A=i.decode(c.charCodeAt(d++)),A===-1)throw new Error("Invalid base64 digit: "+c.charAt(d-1));S=!!(A&o),A&=s,y=y+(A<=0;F--)I=N[F],I==="."?N.splice(F,1):I===".."?R++:R>0&&(I===""?(N.splice(F+1,R),R=0):(N.splice(F,2),R--));return _=N.join("/"),_===""&&(_=M?"/":"."),B?(B.path=_,a(B)):_}i.normalize=l;function u(T,_){T===""&&(T="."),_===""&&(_=".");var B=o(_),M=o(T);if(M&&(T=M.path||"/"),B&&!B.scheme)return M&&(B.scheme=M.scheme),a(B);if(B||_.match(s))return _;if(M&&!M.host&&!M.path)return M.host=_,a(M);var N=_.charAt(0)==="/"?_:l(T.replace(/\/+$/,"")+"/"+_);return M?(M.path=N,a(M)):N}i.join=u,i.isAbsolute=function(T){return T.charAt(0)==="/"||r.test(T)};function c(T,_){T===""&&(T="."),T=T.replace(/\/$/,"");for(var B=0;_.indexOf(T+"/")!==0;){var M=T.lastIndexOf("/");if(M<0||(T=T.slice(0,M),T.match(/^([^\/]+:\/)?\/*$/)))return _;++B}return Array(B+1).join("../")+_.substr(T.length+1)}i.relative=c;var d=function(){var T=Object.create(null);return!("__proto__"in T)}();function g(T){return T}function m(T){return b(T)?"$"+T:T}i.toSetString=d?g:m;function y(T){return b(T)?T.slice(1):T}i.fromSetString=d?g:y;function b(T){if(!T)return!1;var _=T.length;if(_<9||T.charCodeAt(_-1)!==95||T.charCodeAt(_-2)!==95||T.charCodeAt(_-3)!==111||T.charCodeAt(_-4)!==116||T.charCodeAt(_-5)!==111||T.charCodeAt(_-6)!==114||T.charCodeAt(_-7)!==112||T.charCodeAt(_-8)!==95||T.charCodeAt(_-9)!==95)return!1;for(var B=_-10;B>=0;B--)if(T.charCodeAt(B)!==36)return!1;return!0}function S(T,_,B){var M=E(T.source,_.source);return M!==0||(M=T.originalLine-_.originalLine,M!==0)||(M=T.originalColumn-_.originalColumn,M!==0||B)||(M=T.generatedColumn-_.generatedColumn,M!==0)||(M=T.generatedLine-_.generatedLine,M!==0)?M:E(T.name,_.name)}i.compareByOriginalPositions=S;function A(T,_,B){var M=T.generatedLine-_.generatedLine;return M!==0||(M=T.generatedColumn-_.generatedColumn,M!==0||B)||(M=E(T.source,_.source),M!==0)||(M=T.originalLine-_.originalLine,M!==0)||(M=T.originalColumn-_.originalColumn,M!==0)?M:E(T.name,_.name)}i.compareByGeneratedPositionsDeflated=A;function E(T,_){return T===_?0:T===null?1:_===null?-1:T>_?1:-1}function x(T,_){var B=T.generatedLine-_.generatedLine;return B!==0||(B=T.generatedColumn-_.generatedColumn,B!==0)||(B=E(T.source,_.source),B!==0)||(B=T.originalLine-_.originalLine,B!==0)||(B=T.originalColumn-_.originalColumn,B!==0)?B:E(T.name,_.name)}i.compareByGeneratedPositionsInflated=x;function P(T){return JSON.parse(T.replace(/^\)]}'[^\n]*\n/,""))}i.parseSourceMapInput=P;function C(T,_,B){if(_=_||"",T&&(T[T.length-1]!=="/"&&_[0]!=="/"&&(T+="/"),_=T+_),B){var M=o(B);if(!M)throw new Error("sourceMapURL could not be parsed");if(M.path){var N=M.path.lastIndexOf("/");N>=0&&(M.path=M.path.substring(0,N+1))}_=u(a(M),_)}return l(_)}i.computeSourceURL=C}(util)),util}var arraySet={},hasRequiredArraySet;function requireArraySet(){if(hasRequiredArraySet)return arraySet;hasRequiredArraySet=1;var i=requireUtil(),e=Object.prototype.hasOwnProperty,r=typeof Map<"u";function s(){this._array=[],this._set=r?new Map:Object.create(null)}return s.fromArray=function(a,l){for(var u=new s,c=0,d=a.length;c=0)return l}else{var u=i.toSetString(a);if(e.call(this._set,u))return this._set[u]}throw new Error('"'+a+'" is not in the set.')},s.prototype.at=function(a){if(a>=0&&aa||l==a&&c>=u||i.compareByGeneratedPositionsInflated(s,o)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return r.prototype.unsortedForEach=function(o,a){this._array.forEach(o,a)},r.prototype.add=function(o){e(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},mappingList.MappingList=r,mappingList}var hasRequiredSourceMapGenerator;function requireSourceMapGenerator(){if(hasRequiredSourceMapGenerator)return sourceMapGenerator;hasRequiredSourceMapGenerator=1;var i=requireBase64Vlq(),e=requireUtil(),r=requireArraySet().ArraySet,s=requireMappingList().MappingList;function o(a){a||(a={}),this._file=e.getArg(a,"file",null),this._sourceRoot=e.getArg(a,"sourceRoot",null),this._skipValidation=e.getArg(a,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new s,this._sourcesContents=null}return o.prototype._version=3,o.fromSourceMap=function(l){var u=l.sourceRoot,c=new o({file:l.file,sourceRoot:u});return l.eachMapping(function(d){var g={generated:{line:d.generatedLine,column:d.generatedColumn}};d.source!=null&&(g.source=d.source,u!=null&&(g.source=e.relative(u,g.source)),g.original={line:d.originalLine,column:d.originalColumn},d.name!=null&&(g.name=d.name)),c.addMapping(g)}),l.sources.forEach(function(d){var g=d;u!==null&&(g=e.relative(u,d)),c._sources.has(g)||c._sources.add(g);var m=l.sourceContentFor(d);m!=null&&c.setSourceContent(d,m)}),c},o.prototype.addMapping=function(l){var u=e.getArg(l,"generated"),c=e.getArg(l,"original",null),d=e.getArg(l,"source",null),g=e.getArg(l,"name",null);this._skipValidation||this._validateMapping(u,c,d,g),d!=null&&(d=String(d),this._sources.has(d)||this._sources.add(d)),g!=null&&(g=String(g),this._names.has(g)||this._names.add(g)),this._mappings.add({generatedLine:u.line,generatedColumn:u.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:d,name:g})},o.prototype.setSourceContent=function(l,u){var c=l;this._sourceRoot!=null&&(c=e.relative(this._sourceRoot,c)),u!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(c)]=u):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},o.prototype.applySourceMap=function(l,u,c){var d=u;if(u==null){if(l.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=l.file}var g=this._sourceRoot;g!=null&&(d=e.relative(g,d));var m=new r,y=new r;this._mappings.unsortedForEach(function(b){if(b.source===d&&b.originalLine!=null){var S=l.originalPositionFor({line:b.originalLine,column:b.originalColumn});S.source!=null&&(b.source=S.source,c!=null&&(b.source=e.join(c,b.source)),g!=null&&(b.source=e.relative(g,b.source)),b.originalLine=S.line,b.originalColumn=S.column,S.name!=null&&(b.name=S.name))}var A=b.source;A!=null&&!m.has(A)&&m.add(A);var E=b.name;E!=null&&!y.has(E)&&y.add(E)},this),this._sources=m,this._names=y,l.sources.forEach(function(b){var S=l.sourceContentFor(b);S!=null&&(c!=null&&(b=e.join(c,b)),g!=null&&(b=e.relative(g,b)),this.setSourceContent(b,S))},this)},o.prototype._validateMapping=function(l,u,c,d){if(u&&typeof u.line!="number"&&typeof u.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(!(l&&"line"in l&&"column"in l&&l.line>0&&l.column>=0&&!u&&!c&&!d)){if(l&&"line"in l&&"column"in l&&u&&"line"in u&&"column"in u&&l.line>0&&l.column>=0&&u.line>0&&u.column>=0&&c)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:l,source:c,original:u,name:d}))}},o.prototype._serializeMappings=function(){for(var l=0,u=1,c=0,d=0,g=0,m=0,y="",b,S,A,E,x=this._mappings.toArray(),P=0,C=x.length;P0){if(!e.compareByGeneratedPositionsInflated(S,x[P-1]))continue;b+=","}b+=i.encode(S.generatedColumn-l),l=S.generatedColumn,S.source!=null&&(E=this._sources.indexOf(S.source),b+=i.encode(E-m),m=E,b+=i.encode(S.originalLine-1-d),d=S.originalLine-1,b+=i.encode(S.originalColumn-c),c=S.originalColumn,S.name!=null&&(A=this._names.indexOf(S.name),b+=i.encode(A-g),g=A)),y+=b}return y},o.prototype._generateSourcesContent=function(l,u){return l.map(function(c){if(!this._sourcesContents)return null;u!=null&&(c=e.relative(u,c));var d=e.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,d)?this._sourcesContents[d]:null},this)},o.prototype.toJSON=function(){var l={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(l.file=this._file),this._sourceRoot!=null&&(l.sourceRoot=this._sourceRoot),this._sourcesContents&&(l.sourcesContent=this._generateSourcesContent(l.sources,l.sourceRoot)),l},o.prototype.toString=function(){return JSON.stringify(this.toJSON())},sourceMapGenerator.SourceMapGenerator=o,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(r,s,o,a,l,u){var c=Math.floor((s-r)/2)+r,d=l(o,a[c],!0);return d===0?c:d>0?s-c>1?e(c,s,o,a,l,u):u==i.LEAST_UPPER_BOUND?s1?e(r,c,o,a,l,u):u==i.LEAST_UPPER_BOUND?c:r<0?-1:r}i.search=function(s,o,a,l){if(o.length===0)return-1;var u=e(-1,o.length,s,o,a,l||i.GREATEST_LOWER_BOUND);if(u<0)return-1;for(;u-1>=0&&a(o[u],o[u-1],!0)===0;)--u;return u}}(binarySearch)),binarySearch}var quickSort={},hasRequiredQuickSort;function requireQuickSort(){if(hasRequiredQuickSort)return quickSort;hasRequiredQuickSort=1;function i(s,o,a){var l=s[o];s[o]=s[a],s[a]=l}function e(s,o){return Math.round(s+Math.random()*(o-s))}function r(s,o,a,l){if(a=0){var A=this._originalMappings[S];if(g.column===void 0)for(var E=A.originalLine;A&&A.originalLine===E;)b.push({line:i.getArg(A,"generatedLine",null),column:i.getArg(A,"generatedColumn",null),lastColumn:i.getArg(A,"lastGeneratedColumn",null)}),A=this._originalMappings[++S];else for(var x=A.originalColumn;A&&A.originalLine===m&&A.originalColumn==x;)b.push({line:i.getArg(A,"generatedLine",null),column:i.getArg(A,"generatedColumn",null),lastColumn:i.getArg(A,"lastGeneratedColumn",null)}),A=this._originalMappings[++S]}return b},sourceMapConsumer.SourceMapConsumer=a;function l(d,g){var m=d;typeof d=="string"&&(m=i.parseSourceMapInput(d));var y=i.getArg(m,"version"),b=i.getArg(m,"sources"),S=i.getArg(m,"names",[]),A=i.getArg(m,"sourceRoot",null),E=i.getArg(m,"sourcesContent",null),x=i.getArg(m,"mappings"),P=i.getArg(m,"file",null);if(y!=this._version)throw new Error("Unsupported version: "+y);A&&(A=i.normalize(A)),b=b.map(String).map(i.normalize).map(function(C){return A&&i.isAbsolute(A)&&i.isAbsolute(C)?i.relative(A,C):C}),this._names=r.fromArray(S.map(String),!0),this._sources=r.fromArray(b,!0),this._absoluteSources=this._sources.toArray().map(function(C){return i.computeSourceURL(A,C,g)}),this.sourceRoot=A,this.sourcesContent=E,this._mappings=x,this._sourceMapURL=g,this.file=P}l.prototype=Object.create(a.prototype),l.prototype.consumer=a,l.prototype._findSourceIndex=function(d){var g=d;if(this.sourceRoot!=null&&(g=i.relative(this.sourceRoot,g)),this._sources.has(g))return this._sources.indexOf(g);var m;for(m=0;m1&&(N.source=E+R[1],E+=R[1],N.originalLine=S+R[2],S=N.originalLine,N.originalLine+=1,N.originalColumn=A+R[3],A=N.originalColumn,R.length>4&&(N.name=x+R[4],x+=R[4])),M.push(N),typeof N.originalLine=="number"&&B.push(N)}o(M,i.compareByGeneratedPositionsDeflated),this.__generatedMappings=M,o(B,i.compareByOriginalPositions),this.__originalMappings=B},l.prototype._findMapping=function(g,m,y,b,S,A){if(g[y]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+g[y]);if(g[b]<0)throw new TypeError("Column must be greater than or equal to 0, got "+g[b]);return e.search(g,m,S,A)},l.prototype.computeColumnSpans=function(){for(var g=0;g=0){var b=this._generatedMappings[y];if(b.generatedLine===m.generatedLine){var S=i.getArg(b,"source",null);S!==null&&(S=this._sources.at(S),S=i.computeSourceURL(this.sourceRoot,S,this._sourceMapURL));var A=i.getArg(b,"name",null);return A!==null&&(A=this._names.at(A)),{source:S,line:i.getArg(b,"originalLine",null),column:i.getArg(b,"originalColumn",null),name:A}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(g){return g==null}):!1},l.prototype.sourceContentFor=function(g,m){if(!this.sourcesContent)return null;var y=this._findSourceIndex(g);if(y>=0)return this.sourcesContent[y];var b=g;this.sourceRoot!=null&&(b=i.relative(this.sourceRoot,b));var S;if(this.sourceRoot!=null&&(S=i.urlParse(this.sourceRoot))){var A=b.replace(/^file:\/\//,"");if(S.scheme=="file"&&this._sources.has(A))return this.sourcesContent[this._sources.indexOf(A)];if((!S.path||S.path=="/")&&this._sources.has("/"+b))return this.sourcesContent[this._sources.indexOf("/"+b)]}if(m)return null;throw new Error('"'+b+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(g){var m=i.getArg(g,"source");if(m=this._findSourceIndex(m),m<0)return{line:null,column:null,lastColumn:null};var y={source:m,originalLine:i.getArg(g,"line"),originalColumn:i.getArg(g,"column")},b=this._findMapping(y,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(g,"bias",a.GREATEST_LOWER_BOUND));if(b>=0){var S=this._originalMappings[b];if(S.source===y.source)return{line:i.getArg(S,"generatedLine",null),column:i.getArg(S,"generatedColumn",null),lastColumn:i.getArg(S,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},sourceMapConsumer.BasicSourceMapConsumer=l;function c(d,g){var m=d;typeof d=="string"&&(m=i.parseSourceMapInput(d));var y=i.getArg(m,"version"),b=i.getArg(m,"sections");if(y!=this._version)throw new Error("Unsupported version: "+y);this._sources=new r,this._names=new r;var S={line:-1,column:0};this._sections=b.map(function(A){if(A.url)throw new Error("Support for url field in sections not implemented.");var E=i.getArg(A,"offset"),x=i.getArg(E,"line"),P=i.getArg(E,"column");if(x=0;c--)this.prepend(u[c]);else if(u[o]||typeof u=="string")this.children.unshift(u);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+u);return this},a.prototype.walk=function(u){for(var c,d=0,g=this.children.length;d0){for(c=[],d=0;d0&&(A+=", "+E.join(", "));var x=0;Object.keys(this.aliases).forEach(function(T){var _=S.aliases[T];_.children&&_.referenceCount>1&&(A+=", alias"+ ++x+"="+T,_.children[0]="alias"+x)}),this.lookupPropertyFunctionIsUsed&&(A+=", "+this.lookupPropertyFunctionVarDeclaration());var P=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&P.push("blockParams"),this.useDepths&&P.push("depths");var C=this.mergeSource(A);return b?(P.push(C),Function.apply(this,P)):this.source.wrap(["function(",P.join(","),`) { `,C,"}"])},mergeSource:function(b){var S=this.environment.isSimple,A=!this.forceBuffer,E=void 0,x=void 0,P=void 0,C=void 0;return this.source.each(function(T){T.appendToBuffer?(P?T.prepend(" + "):P=T,C=T):(P&&(x?P.prepend("buffer += "):E=!0,C.add(";"),P=C=void 0),x=!0,S||(A=!1))}),A?P?(P.prepend("return "),C.add(";")):x||this.source.push('return "";'):(b+=", buffer = "+(E?"":this.initializeBuffer()),P?(P.prepend("return buffer + "),C.add(";")):this.source.push("return buffer;")),b&&this.source.prepend("var "+b.substring(2)+(E?"":`; `)),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 S=this.aliasable("container.hooks.blockHelperMissing"),A=[this.contextName(0)];this.setupHelperArgs(b,0,A);var E=this.popStack();A.splice(1,0,E),this.push(this.source.functionCall(S,"call",A))},ambiguousBlockValue:function(){var b=this.aliasable("container.hooks.blockHelperMissing"),S=[this.contextName(0)];this.setupHelperArgs("",0,S,!0),this.flushInline();var A=this.topStack();S.splice(1,0,A),this.pushSource(["if (!",this.lastHelper,") { ",A," = ",this.source.functionCall(b,"call",S),"}"])},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(S){return[" != null ? ",S,' : ""']}),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,S,A,E){var x=0;!E&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(b[x++])):this.pushContext(),this.resolvePath("context",b,x,S,A)},lookupBlockParam:function(b,S){this.useBlockParams=!0,this.push(["blockParams[",b[0],"][",b[1],"]"]),this.resolvePath("context",S,1)},lookupData:function(b,S,A){b?this.pushStackLiteral("container.data(data, "+b+")"):this.pushStackLiteral("data"),this.resolvePath("data",S,0,!0,A)},resolvePath:function(b,S,A,E,x){var P=this;if(this.options.strict||this.options.assumeObjects){this.push(m(this.options.strict&&x,this,S,A,b));return}for(var C=S.length;Athis.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 S=0,A=b.length;S64&&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 r=i.replace(/[^A-Za-z0-9\+\/]/g,""),s=r.length,o=e?Math.ceil((s*3+1>>2)/e)*e:s*3+1>>2,a=new Uint8Array(o),l,u,c=0,d=0,g=0;g>>(16>>>l&24)&255;c=0}return a}var base64={decode},fetch$1=function(i,e){return new Promise(function(r,s){var o=new XMLHttpRequest;e&&(o.responseType=e),o.open("GET",i),o.onload=function(){o.status===200?r(o.response):s(Error(o.statusText))},o.onerror=function(){s(Error("Network Error"))},o.send()})};(function(i){var e=base64,r=fetch$1;function s(M){return function(N){return typeof N=="string"&&M.test(N)}}function o(M,N){return typeof M=="string"?M+N:typeof M=="function"?M(N):N}function a(M,N,I,R){var F=l(N)?u:c(N)?d:g(N)?m:y(N)?b:S(N)?A:E(N)?x:P(N)?C:T(N)?_:null,k=I||{};return F?F(M,N,k):R?Promise.resolve(R):Promise.reject("Source not valid ("+N+")")}a.fetch=r;function l(M){return M instanceof ArrayBuffer}function u(M,N,I){return new Promise(function(R,F){M.decodeAudioData(N,function(k){R(k)},function(){F("Can't decode audio data ("+N.slice(0,30)+"...)")})})}var c=s(/\.(mp3|wav|ogg)(\?.*)?$/i);function d(M,N,I){var R=o(I.from,N);return a(M,a.fetch(R,"arraybuffer"),I)}function g(M){return M&&typeof M.then=="function"}function m(M,N,I){return N.then(function(R){return a(M,R,I)})}var y=Array.isArray;function b(M,N,I){return Promise.all(N.map(function(R){return a(M,R,I,R)}))}function S(M){return M&&typeof M=="object"}function A(M,N,I){var R={},F=Object.keys(N).map(function(k){if(I.only&&I.only.indexOf(k)===-1)return null;var V=N[k];return a(M,V,I,V).then(function(D){R[k]=D})});return Promise.all(F).then(function(){return R})}var E=s(/\.json(\?.*)?$/i);function x(M,N,I){var R=o(I.from,N);return a(M,a.fetch(R,"text").then(JSON.parse),I)}var P=s(/^data:audio/);function C(M,N,I){var R=N.indexOf(",");return a(M,e.decode(N.slice(R+1)).buffer,I)}var T=s(/\.js(\?.*)?$/i);function _(M,N,I){var R=o(I.from,N);return a(M,a.fetch(R,"text").then(B),I)}function B(M){var N=M.indexOf("MIDI.Soundfont.");if(N<0)throw Error("Invalid MIDI.js Soundfont format");N=M.indexOf("=",N)+2;var I=M.lastIndexOf(",");return JSON.parse(M.slice(N,I)+"}")}i.exports&&(i.exports=a),typeof window<"u"&&(window.loadAudio=a)})(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(),r=e._voltage=getVoltage(i),s=scale(r),o=scale(r),a=scale(r);return e._startAmount=scale(o),e._endAmount=scale(a),e._multiplier=scale(s),e._multiplier.connect(e),e._startAmount.connect(e),e._endAmount.connect(e),e.value=s.gain,e.startValue=o.gain,e.endValue=a.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,r=this._startAmount.gain,s=this._endAmount.gain;this._voltage.start(i),this._decayFrom=this._decayFrom=i+this.attack,this._startedAt=i;var o=this.sustain;e.cancelScheduledValues(i),r.cancelScheduledValues(i),s.cancelScheduledValues(i),s.setValueAtTime(0,i),this.attack?(e.setValueAtTime(0,i),e.linearRampToValueAtTime(1,i+this.attack),r.setValueAtTime(1,i),r.linearRampToValueAtTime(0,i+this.attack)):(e.setValueAtTime(1,i),r.setValueAtTime(0,i)),this.decay&&e.setTargetAtTime(o,this._decayFrom,getTimeConstant(this.decay))}},stop:{value:function(i,e){e&&(i=i-this.release);var r=i+this.release;if(this.release){var s=this._multiplier.gain,o=this._startAmount.gain,a=this._endAmount.gain;s.cancelScheduledValues(i),o.cancelScheduledValues(i),a.cancelScheduledValues(i);var l=getTimeConstant(this.release);if(this.attack&&i=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,r){var s=!1,o=0,a={},l=i.createGain();l.gain.value=1;var u=Object.assign({},DEFAULTS,r),c={context:i,out:l,opts:u};return e instanceof AudioBuffer?c.buffer=e:c.buffers=e,c.start=function(m,y,b){if(c.buffer&&m!==null)return c.start(null,m,y);var S=m?c.buffers[m]:c.buffer;if(S){if(!s){console.warn("SamplePlayer not connected to any node.");return}}else{console.warn("Buffer "+m+" not found.");return}var A=b||EMPTY;y=Math.max(i.currentTime,y||0),c.emit("start",y,m,A);var E=g(m,S,A);return E.id=d(m,E),E.env.start(y),E.source.start(y),c.emit("started",y,E.id,E),A.duration&&E.stop(y+A.duration),E},c.play=function(m,y,b){return c.start(m,y,b)},c.stop=function(m,y){var b;return y=y||Object.keys(a),y.map(function(S){return b=a[S],b?(b.stop(m),b.id):null})},c.connect=function(m){return s=!0,l.connect(m),c},c.emit=function(m,y,b,S){c.onevent&&c.onevent(m,y,b,S);var A=c["on"+m];A&&A.forEach(E=>{E(y,b,S)})},c;function d(m,y){return y.id=o++,a[y.id]=y,y.startTime=i.currentTime,y.source.onended=function(){var b=i.currentTime;y.source.disconnect(),y.env.disconnect(),y.disconnect(),c.emit("ended",b,y.id,y)},y.id}function g(m,y,b){var S=i.createGain();return S.gain.value=0,S.connect(l),S.env=envelope(i,b,u),S.env.connect(S.gain),S.source=i.createBufferSource(),S.source.buffer=y,S.source.connect(S),S.source.loop=b.loop||u.loop,S.source.playbackRate.value=centsToRate(b.cents||u.cents),S.source.loopStart=b.loopStart||u.loopStart,S.source.loopEnd=b.loopEnd||u.loopEnd,S.stop=function(A){var E=A||i.currentTime;c.emit("stop",E,m);var x=S.env.stop(E);S.source.stop(x)},S}}function isNum$1(i){return typeof i=="number"}var PARAMS=["attack","decay","sustain","release"];function envelope(i,e,r){var s=ADSR(i),o=e.adsr||r.adsr;return PARAMS.forEach(function(a,l){o?s[a]=o[l]:s[a]=e[a]||r[a]}),s.value.value=isNum$1(e.gain)?e.gain:isNum$1(r.gain)?r.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,r){if(arguments.length===1&&typeof e=="function")return i.on("event",e);var s="on"+e;return i[s]?i[s].push(r):i[s]=[r],i},i},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,r){if(typeof i!="string")return null;var s=REGEX$1.exec(i);if(!s||!e&&s[4])return null;var o={letter:s[1].toUpperCase(),acc:s[2].replace(/x/g,"##")};return o.pc=o.letter+o.acc,o.step=(o.letter.charCodeAt(0)+3)%7,o.alt=o.acc[0]==="b"?-o.acc.length:o.acc.length,o.chroma=SEMITONES$1[o.step]+o.alt,s[3]&&(o.oct=+s[3],o.midi=o.chroma+12*(o.oct+1),o.freq=midiToFreq$1(o.midi,r)),e&&(o.tonicOf=s[4]),o}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 r=parse$1(e);return r&&typeof r[i]<"u"?r[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,r=typeof e=="function"?e:toMidi,s=function(a){return a?r(a)||a:null};i.buffers=mapBuffers(i.buffers,s);var o=i.start;i.start=function(a,l,u){var c=s(a),d=c%1;return d&&(c=Math.floor(c),u=Object.assign(u||{},{cents:Math.floor(d*100)})),o(c,l,u)}}return i};function mapBuffers(i,e){return Object.keys(i).reduce(function(r,s){return r[e(s)]=i[s],r},{})}var isArr=Array.isArray,isObj=function(i){return i&&typeof i=="object"},OPTS={},scheduler=function(i){return i.schedule=function(e,r){var s=i.context.currentTime,o=e"u"?null:i.step?build(i.step,i.alt,i.oct):i<0||i>6?null:LETTERS.charAt(i)+accStr(e)+octStr(r)}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 r=midi(i);return r===null?null:midiToFreq(r,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(o,a){if(console.warn("new Soundfont() is deprected"),console.log("Please use Soundfont.instrument() instead of new Soundfont().instrument()"),!(this instanceof e))return new e(o);this.nameToUrl=a||e.nameToUrl,this.ctx=o,this.instruments={},this.promises=[]}e.prototype.onready=function(o){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(o)},e.prototype.instrument=function(o,a){console.warn("new Soundfont().instrument() is deprecated."),console.log("Please use Soundfont.instrument() instead.");var l=this.ctx;if(o=o||"default",o in this.instruments)return this.instruments[o];var u={name:o,play:s(l,a)};if(this.instruments[o]=u,o!=="default"){var c=e.instrument(l,o,a).then(function(d){return u.play=d.play,u});this.promises.push(c),u.onready=function(d){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),c.then(d)}}else u.onready=function(d){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),d()};return u};function r(o,a,l){return console.warn("Soundfont.loadBuffers is deprecate."),console.log("Use Soundfont.instrument(..) and get buffers properties from the result."),e.instrument(o,a,l).then(function(u){return u.buffers})}e.loadBuffers=r;function s(o,a){return a=a||{},function(l,u,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 g=l>0&&l<129?+l:i.midi(l),m=g?i.midiToFreq(g,440):null;if(m){c=c||.2,d=d||{};var y=d.destination||a.destination||o.destination,b=d.vcoType||a.vcoType||"sine",S=d.gain||a.gain||.4,A=o.createOscillator();A.type=b,A.frequency.value=m;var E=o.createGain();return E.gain.value=S,A.connect(E),E.connect(y),A.start(u),c>0&&A.stop(u+c),A}}}return e.noteToMidi=i.midi,legacy=e,legacy}(function(i){var e=libExports$1,r=libExports;function s(u,c,d){if(arguments.length===1)return function(S,A){return s(u,S,A)};var g=d||{},m=g.isSoundfontURL||o,y=g.nameToUrl||a,b=m(c)?c:y(c,g.soundfont,g.format);return e(u,b,{only:g.only||g.notes}).then(function(S){var A=r(u,S,g).connect(g.destination?g.destination:u.destination);return A.url=b,A.name=c,A})}function o(u){return/\.js(\?.*)?$/i.test(u)}function a(u,c,d){return d=d==="ogg"?d:"mp3",c=c==="FluidR3_GM"?c:"MusyngKite","https://gleitz.github.io/midi-js-soundfonts/"+c+"/"+u+"-"+d+".js"}var l=requireLegacy();l.instrument=s,l.nameToUrl=a,i.exports&&(i.exports=l),typeof window<"u"&&(window.Soundfont=l)})(lib$2);NoteEnum.C,NoteEnum.D,NoteEnum.E,NoteEnum.F,NoteEnum.G,NoteEnum.A,NoteEnum.B;const selectionContainer="_selectionContainer_1khj4_1",position="_position_1khj4_8",note="_note_1khj4_11",staveBox="_staveBox_1khj4_14",leftStaveBox="_leftStaveBox_1khj4_17",rightStaveBox="_rightStaveBox_1khj4_31",centerStaveBox="_centerStaveBox_1khj4_45",prepareStaveBox="_prepareStaveBox_1khj4_70",disable="_disable_1khj4_73",line="_line_1khj4_76",eyeLine="_eyeLine_1khj4_88",lineStaff="_lineStaff_1khj4_91",lineJianPu="_lineJianPu_1khj4_94",scoreItem="_scoreItem_1khj4_100",dotWrap="_dotWrap_1khj4_137",noteFollow="_noteFollow_1khj4_152",linePC="_linePC_1khj4_188",noteDot="_noteDot_1khj4_192",staveBg="_staveBg_1khj4_200",styles$2={selectionContainer,position,note,staveBox,leftStaveBox,rightStaveBox,centerStaveBox,prepareStaveBox,disable,line,eyeLine,lineStaff,lineJianPu,scoreItem,dotWrap,noteFollow,linePC,noteDot,staveBg},noteMove="_noteMove_6dz5a_1",activeModel="_activeModel_6dz5a_14",toolBox="_toolBox_6dz5a_17",moveDisabled="_moveDisabled_6dz5a_33",hideTool="_hideTool_6dz5a_36",rightHideIcon$1="_rightHideIcon_6dz5a_39",styles$1={noteMove,activeModel,toolBox,moveDisabled,hideTool,rightHideIcon:rightHideIcon$1},tooltip="",TooltipSfc="",buttonGroup="",ButtonGroupSfc="",rightHideIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAB4CAYAAACjK+FPAAAAAXNSR0IArs4c6QAAA9hJREFUeF7tnctrE1EUxr+J7wfqRsdCA2okIhMfNCXZVKyKWOzSZVbdCS5KcetON6J/RKEQBKFLwVWpUgvddNFVNkWbGrptSCsVm8otmTDpTDptb+49cx8Xumrn3PM735m5Z5r2HAf86zyAqwAuAjgF4HTr6xi/6Z5Z+Occ0dQZANdbgOeOaEPmZYcGPQHgJoAbAFIyPeXc61CgaQAeAAar2joQKEvv2wAyqtEF/I0FPQ4gD+CKwpDM9X1BmZJFAJcVh4wFZfcje+josLoqyh4893UgbDFEgp4E8AQAuz91WZGgOqWsL1QI9CyAxwCOWjElNQNCoHcAXEuqtxx+hUCftgpyDpuJvLQD9BKAB4l0k9+pDtBbALL8NhNpoQOUVUGql3rdotwB+hDAhUTqwe9UB+gzAKxY0HG1QdlL9KiOhHtLQPYyPWJB1Y9AO3WtouqLuUtgFdVEyDaGVdQqqmgEbOoqKlxXt62iVlFFI2BTV1Hh7MPIpq5NXUUjYFNXUeHsU9emLmnqzszMvCgUCqOO4zgLCwtfhoeHP3M6lDxFl5aWXuZyuecBsJ3Jycn3Y2NjPzhgkwUaAbnLtry8/D2TyXzQArQbJIObm5srDw0NfVIedD/IRqPx23XdV5ubm02lQWMga4ODgxOVSuUPByT9b+olQdKCSoSkA5UMSQNKACkflAhSLighpDxQYkg5oCsrK2/S6XQh6hxsNBq9OifjjlmxtW61Wn3T399PDSle0e3t7elUKhX6S+6NjY1aPp/vRcUTp6T/fbGKNpvNacdxQqD1er3qed7E6urq34N6yvlzYkFrtdrbvr6+e1FO1uv1X57nvZYEKxaUAa6trb1zXfcuMax4UAZYqVTGs9ks+8+L0JKkrBzQBMDKAyWGlQtKCCsflAiWBpQAlg5UMiwtqERYetA42PX19Z+u645vbW3tcJSByQCNg52dnZ3i/PwlOaD7wWr1kYSfllHlYrlc/lgqlb5pkbpBiPn5+dLAwMAI+9hwcXHxa7FYnOKAFP/izelcLy9P1j3aS7I9tiyowOCSmLaKkoRd4KZWUYHBJTFtFSUJu8BNraICg0ti2ipKEnaBm1pFBQaXxLRVlCTsAje1igoMLolpqyhJ2AVuahUVGFwS021FjWncxMJsRCsuBmpMczVj2uUZ0wDRmJaW7D41okkpA821JgqQHHYCN22fo/4erJHwI8WmChwkPiFQdpERraEZqDHNvhmsEe3b/ZzXKYUj71Ef1JgRCwzYiKEZQWW1H4MSPKO0H2wThDViVFEQWPvhU1HlVnCcGBsl5o8US9Q4sf9BGvvA8pV1NwAAAABJRU5ErkJggg==";let extStyleConfigJson={};window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;const showToolBox=ref(!0),moveData=reactive({open:!1,zoom:1,partIndex:"0",hasExtJson:!1,isWeb:!1,modelList:[],activeIndex:-1,sw:0,tool:{isAddAndSub:!1},noteCoords:[]}),initNoteCoord=()=>{const i=Array.from(document.querySelectorAll(".node-dot"));moveData.noteCoords=i.map(e=>{var s;const r=((s=e==null?void 0:e.getBoundingClientRect)==null?void 0:s.call(e))||{x:0,y:0};return{x:r.x,y:r.y}})},computedDistance=(i,e)=>{let r=-1,s=0,o,a,l;return moveData.noteCoords.forEach((u,c)=>{o=Math.abs(u.x-i),a=Math.abs(u.y-e),l=Math.sqrt(o*o+a*a),l=Number(l.toFixed(0)),l!==0&&(r===-1||l{setEleId(m,"temp"+l),l++});let u=1;[...r].forEach(m=>{setEleId(m,"text"+u),u++});let c=1;[...s].forEach(m=>{setEleId(m,"section"+c),c++});let d=1;[...o].forEach(m=>{setEleId(m,"repet"+d),d++});let g=1;[...a].forEach(m=>{setEleId(m,"line"+g),g++})}function setEleId(i,e){if(!i||!e)return;i.getAttribute("id")||i.setAttribute("id",e),createModelBox(i)}function createModelBox(i){var u;const e=((u=document.getElementById("musicAndSelection"))==null?void 0:u.getBoundingClientRect())||{x:0,y:0},r=e.x||0,s=e.y||0,o=i.getBoundingClientRect(),a={left:o.x-r+"px",top:o.y-s+"px",width:o.width+"px",height:o.height+"px"},l=i.getAttribute("class");moveData.modelList.push({id:i.getAttribute("id"),bbox:a,type:l,isMove:!1,left:o.left,top:o.top,width:o.width,height:o.height,x:0,y:0,zoom:state$1.zoom,isDelete:!1,d2:getLineGroupPathDx(i),dx:0})}function getBox(i){var a;if(!i)return{};const e=((a=document.getElementById("musicAndSelection"))==null?void 0:a.getBoundingClientRect())||{x:0,y:0},r=e.x||0,s=e.y||0,o=i.getBoundingClientRect();return{left:o.x-r,top:o.y-s,width:o.width,height:o.height}}const filterMoveData=async()=>{const i=state$1.examSongId;if(i){const e=window.fontSize,r=moveData.modelList.filter(o=>o.isMove).map(o=>{var m,y,b,S;const a=o.left+o.x,l=o.top+o.y,u=computedDistance(a,l),c=a-((m=moveData.noteCoords[u])==null?void 0:m.x),d=l-((y=moveData.noteCoords[u])==null?void 0:y.y);let g={id:o.id,isMove:o.isMove,isDelete:o.isDelete,x:o.x,y:o.y,xRem:Math.abs(o.x/e),yRem:Math.abs(o.y/e),zoom:o.zoom,w:moveData.sw,type:o.type,noteIdx:u,noteRelativeX:c,noteRelativeY:d};if(o.type==="vf-lineGroup"&&(g.dx=o.dx),o.id.includes("text")){const A=((S=(b=document.querySelector("#"+o.id))==null?void 0:b.querySelector("text"))==null?void 0:S.innerHTML)||"";g.textContent=A}return g});extStyleConfigJson[moveData.partIndex]=r,console.log("🚀 ~ extStyleConfigJson",extStyleConfigJson);const s=await request.post("/musicSheet/img",{requestType:"json",data:{id:i,extStyleConfigJson:JSON.stringify(extStyleConfigJson)}});s&&s.code==200&&showToast("保存成功"),clearActiveModel()}},dragData={open:!1,startX:0,startY:0,x:0,y:0,repeatEdit:!1},undoData=reactive({undoList:[],redoList:[],activeItem:null});function onDown(i){const e=i.target,r=moveData.modelList.findIndex(s=>s.id===e.dataset.id);if(r>-1){const s=moveData.modelList[r];moveData.activeIndex=r,dragData.startX=i.clientX,dragData.startY=i.clientY,dragData.x=s.x,dragData.y=s.y,dragData.repeatEdit=s.noteIdx>=0,document.onmousemove=onMove,document.onmouseup=onUp,dragData.open=!0,s.type==="vf-lineGroup"?moveData.tool.isAddAndSub=!0:moveData.tool.isAddAndSub=!1,undoData.activeItem={...s};return}moveData.activeIndex=-1}function onMove(i){if(dragData.open){const e=i.clientX-dragData.startX+dragData.x,r=i.clientY-dragData.startY+dragData.y;setModelPostion(moveData.modelList[moveData.activeIndex],e,r,dragData.repeatEdit)}}function onUp(i){document.onmousemove=null,document.onmouseup=null,dragData.open=!1;const e=i.clientX-dragData.startX+dragData.x,r=i.clientY-dragData.startY+dragData.y;(e||r)&&(moveData.modelList[moveData.activeIndex].isMove=!0,moveData.modelList[moveData.activeIndex].x=e,moveData.modelList[moveData.activeIndex].y=r,undoData.activeItem&&undoData.undoList.push({...undoData.activeItem})),undoData.activeItem=null}const renderSvgItem=i=>{if(setModelPostion(i,i.x,i.y),i.isDelete){const e=document.querySelector("#"+i.id);e&&(e.style.display="none")}else{const e=document.querySelector("#"+i.id);e&&(e.style.display="")}};async function setModelPostion(i,e,r,s){var o;if(i){const a=document.querySelector("#"+i.id),l=document.querySelector(`[data-id=${i.id}]`);if(e===0&&r===0)a&&a.removeAttribute("transform"),l&&(l.style.transform="");else{let u=e,c=r;if(i.noteIdx>=0&&!s){moveData.noteCoords.length||await initNoteCoord();const d=moveData.noteCoords[i.noteIdx].x+i.noteRelativeX,g=moveData.noteCoords[i.noteIdx].y+i.noteRelativeY,m=((o=document.getElementById(i.id))==null?void 0:o.getBoundingClientRect())||{x:0,y:0};u=d-m.x,c=g-m.y,a&&a.setAttribute("transform",`translate(${u/moveData.zoom}, ${c/moveData.zoom})`),l&&(l.style.transform=`translate(${u}px, ${c}px)`)}else a&&a.setAttribute("transform",`translate(${u/moveData.zoom}, ${c/moveData.zoom})`),l&&(l.style.transform=`translate(${u}px, ${c}px)`)}}}const handleDeleteMoveNote=()=>{const i=moveData.modelList[moveData.activeIndex];if(i){moveData.modelList[moveData.activeIndex].isMove=!0,undoData.undoList.push({...moveData.modelList[moveData.activeIndex]}),moveData.modelList[moveData.activeIndex].isDelete=!i.isDelete;const e=document.querySelector("#"+i.id);e&&(e.style.display=moveData.modelList[moveData.activeIndex].isDelete?"none":"")}else showToast("选中需要删除的元素")},resetMoveNote=()=>{for(let i=0;i{if(!["add","sub"].includes(i))return;const e=moveData.modelList[moveData.activeIndex];if(!e||e.type!=="vf-lineGroup")return;e.isMove=!0;const r=i==="add"?10:-10;undoData.undoList.push({...moveData.modelList[moveData.activeIndex]}),moveData.modelList[moveData.activeIndex].dx=e.dx+r,renderLineGroup(moveData.modelList[moveData.activeIndex])};function getLineGroupPathDx(i){var r,s,o,a;if(!i)return 0;const e=i.querySelectorAll("path");if(e!=null&&e.length)for(let l=0;l{const i=undoData.undoList.pop();if(i){const e=moveData.modelList.findIndex(r=>r.id===i.id);e>-1&&(moveData.modelList[e]=i,renderSvgItem(moveData.modelList[e]),i.type==="vf-lineGroup"&&renderLineGroup(i))}},renderForMoveData=()=>{if(state$1.extStyleConfigJson)try{extStyleConfigJson=JSON.parse(state$1.extStyleConfigJson)}catch(e){extStyleConfigJson={}}if(!extStyleConfigJson||!(extStyleConfigJson!=null&&extStyleConfigJson[moveData.partIndex])){initSvgId();return}else initSvgId();const i=extStyleConfigJson==null?void 0:extStyleConfigJson[moveData.partIndex];i&&Array.isArray(i)&&nextTick(()=>{console.log("🚀 ~ list",i),i.forEach(e=>{var s,o,a,l,u,c,d;let r=moveData.modelList.findIndex(g=>g.id===e.id);if(e.type==="vf-text"&&e.textContent){let g=((a=(o=document.querySelector("#"+((s=moveData.modelList[r])==null?void 0:s.id)))==null?void 0:o.querySelector("text"))==null?void 0:a.innerHTML)||"",m=r,y=!1,b=r,S=r;if(g!==e.textContent)for(;!y;){let A=moveData.modelList[b]&&((u=(l=document.querySelector("#"+moveData.modelList[b].id))==null?void 0:l.querySelector("text"))==null?void 0:u.innerHTML)||"",E=moveData.modelList[S]&&((d=(c=document.querySelector("#"+moveData.modelList[S].id))==null?void 0:c.querySelector("text"))==null?void 0:d.innerHTML)||"";A===e.textContent||E===e.textContent?(y=!0,m=A===e.textContent?b:S):(!A&&!E&&(y=!0,m=-1),b=b-1,S=S+1)}r=m,e.id=`text${m+1}`}r>-1&&(moveData.modelList[r]={...moveData.modelList[r],...e},renderSvgItem(moveData.modelList[r]),e.type==="vf-lineGroup"&&renderLineGroup(moveData.modelList[r]))})})},MoveMusicScore=defineComponent({name:"move-music-score",setup(){moveData.zoom=state$1.zoom;const e=getQuery().isMove==="1";return console.log("🚀 ~ isOpen:",e),onMounted(()=>{nextTick(()=>initNoteCoord());const r=document.getElementById("toolBox");r&&document.body.appendChild(r)}),()=>createVNode("div",{class:[moveData.open?"":styles$1.moveDisabled]},[createVNode("div",{id:"toolBox"},[createVNode("div",{class:[styles$1.toolBox,!showToolBox.value&&styles$1.hideTool]},[createVNode(Switch,{modelValue:moveData.open,"onUpdate:modelValue":r=>moveData.open=r},null),moveData.open&&createVNode(Fragment,null,[moveData.tool.isAddAndSub&&createVNode(ButtonGroup,{size:"small",elevation:!1},{default:()=>[createVNode(Button,{onClick:()=>handleAddAndSub("add")},{default:()=>[createTextVNode("加")]}),createVNode(Button,{onClick:()=>handleAddAndSub("sub")},{default:()=>[createTextVNode("减")]})]}),createVNode(Button,{size:"small",onClick:handleUndo,disabled:!undoData.undoList.length},{default:()=>[createVNode(Icon,{name:"arrow-down",style:{transform:"rotate(90deg)"}},null)]}),createVNode(Button,{size:"small",onClick:handleDeleteMoveNote,disabled:!(moveData.activeIndex>-1)},{default:()=>{var r;return[(r=moveData.modelList[moveData.activeIndex])!=null&&r.isDelete?"显示元素":"删除元素"]}}),createVNode(Button,{size:"small",onClick:resetMoveNote},{default:()=>[createTextVNode("重置数据")]}),createVNode(Button,{size:"small",type:"primary",onClick:filterMoveData},{default:()=>[createTextVNode("保存数据")]}),createVNode(Button,{size:"small",type:"primary",onClick:()=>showToolBox.value=!1},{default:()=>[createTextVNode("收起")]})])]),!showToolBox.value&&createVNode("img",{class:[styles$1.rightHideIcon,showToolBox.value?"":styles$1.rightIconShow],src:rightHideIcon,onClick:()=>showToolBox.value=!0},null)]),moveData.modelList.map((r,s)=>createVNode("div",{class:[styles$1.noteMove,moveData.activeIndex===s&&styles$1.activeModel],style:r.bbox,"data-id":r.id,onMousedown:onDown},null))])}}),selectData=reactive({notes:[],staves:[],measureHeight:0}),calcNoteData=()=>{var u,c,d,g,m,y,b,S,A,E,x,P,C;const i=((u=document.getElementById("musicAndSelection"))==null?void 0:u.getBoundingClientRect())||{x:0,y:0},e=i.x||0,r=i.y||0,s=state$1.times,o=[],a=[];let l=0;for(let T=0;TI.id===B.id)||selectData.notes.push(B),o.push(_.noteId)}}if(!a.includes(_.MeasureNumberXML)){if(_.stave){if((P=(x=_.stave)==null?void 0:x.attrs)!=null&&P.id){const M=document.querySelector(`#${_.stave.attrs.id}`),N=[Array.from((M==null?void 0:M.querySelectorAll(".vf-clef"))||[]),Array.from((M==null?void 0:M.querySelectorAll(".vf-keysignature"))||[]),Array.from((M==null?void 0:M.getElementsByTagName("text"))||[])].flat();try{N.length&&N.forEach(F=>{var k;(k=F==null?void 0:F.style)==null||k.setProperty("display","none")})}catch(F){}const I=((C=M==null?void 0:M.getBoundingClientRect)==null?void 0:C.call(M))||{x:0,width:0,y:0,height:0};T===0&&(l=I.height);try{N.length&&N.forEach(F=>{var k;(k=F==null?void 0:F.style)==null||k.removeProperty("display")})}catch(F){}selectData.measureHeight=I.height;let R=I.height-l;R=R>0?R:0,B.staveBox={left:I.x-e+"px",top:I.y-r+R+"px",width:I.width+"px",height:I.height-R+"px"},selectData.staves.push(B)}a.push(_.MeasureNumberXML)}else if(_.multipleRestMeasures){const M=selectData.staves.find(N=>N.MeasureNumberXML===_.MeasureNumberXML-1);M!=null&&M.staveBox&&(B.staveBox={left:M.staveBox.left,top:M.staveBox.top,width:M.staveBox.width},selectData.staves.push(B),a.push(_.MeasureNumberXML))}}}console.log("🚀 ~ selectData.notes:",selectData.notes,selectData.staves)},Selection=defineComponent({name:"selection",setup(){const i=useRoute$1(),e={...getQuery(),...i.query},r=computed(()=>state$1.sectionStatus||state$1.modeType!=="practise"),s=computed(()=>o=>{var a;if(state$1.sectionStatus){if(state$1.section.length===1&&o.MeasureNumberXML==state$1.section[0].MeasureNumberXML)return styles$2.leftStaveBox;if(state$1.section.length===2){const l=state$1.userChooseEndIndex>state$1.section[1].MeasureNumberXML?state$1.userChooseEndIndex:state$1.section[1].MeasureNumberXML;if(state$1.sectionFirst&&o.MeasureNumberXML===state$1.sectionFirst.MeasureNumberXML)return o.staveBox.height=selectData.measureHeight+"px",styles$2.prepareStaveBox;if(o.MeasureNumberXML>=state$1.section[0].MeasureNumberXML&&o.MeasureNumberXML<=l)return o.MeasureNumberXML==state$1.section[0].MeasureNumberXML&&o.MeasureNumberXML==l?styles$2.centerStaveBox:o.MeasureNumberXML==state$1.section[0].MeasureNumberXML?styles$2.leftStaveBox:o.MeasureNumberXML==l?((a=o.staveBox)!=null&&a.height||(o.staveBox.height=selectData.measureHeight+"px"),styles$2.rightStaveBox):styles$2.staveBox+" staveBox"}}else if(state$1.activeMeasureIndex==o.MeasureNumberXML&&!state$1.isReport)return o.staveBox.height=selectData.measureHeight+"px",styles$2.staveBox+" staveBox"});return onMounted(()=>{calcNoteData();try{moveData.partIndex=state$1.partIndex+"",nextTick(()=>renderForMoveData())}catch(o){}}),()=>createVNode("div",{id:"selectionBox",class:[styles$2.selectionContainer],onClick:o=>o.stopPropagation()},[selectData.staves.map(o=>{var u;const a=o.id&&evaluatingData.evaluatings[o.measureListIndex],l=!state$1.isReport&&metronomeData.cursorMode===2&&o.MeasureNumberXML===((u=metronomeData.activeMetro)==null?void 0:u.measureNumberXML)&&state$1.times[state$1.activeNoteIndex].MeasureNumberXML===o.MeasureNumberXML;return createVNode(Fragment,null,[o.staveBox&&createVNode("div",{class:[styles$2.position,s.value(o),a?`scoreItemLeve${a.leve}`:"",o.multipleRestMeasures<=1?styles$2.staveBg:"",state$1.platform===IPlatform.PC&&state$1.zoom>.8?styles$2.linePC:""],style:o.staveBox,onClick:()=>handleSelection(o)},[l&&createVNode("div",{style:{height:selectData.measureHeight+"px",position:"relative"}},[createVNode("div",{class:[styles$2.line,state$1.setting.eyeProtection?styles$2.eyeLine:"",state$1.musicRenderType==EnumMusicRenderType.staff?styles$2.lineStaff:styles$2.lineJianPu],style:{left:metronomeData.activeMetro.left}},null)]),!state$1.isReport&&!!o.multipleRestMeasures&&state$1.activeMeasureIndex==o.MeasureNumberXML&&createVNode("div",{class:styles$2.dotWrap},[o.multipleRestMeasures]),createVNode(Transition,{name:"centerTop",onAfterEnter:()=>{a.show=!1}},{default:()=>{var c,d;return[(a==null?void 0:a.show)&&createVNode("div",{class:styles$2.scoreItem,style:{color:((c=leveByScoreMeasureIcons[a.leve])==null?void 0:c.color)||""}},[createVNode("img",{src:(d=leveByScoreMeasureIcons[a.leve])==null?void 0:d.icon},null),createVNode("span",null,[a.score])])]}})])])}),selectData.notes.map(o=>createVNode("div",{class:[styles$2.position,r.value&&styles$2.disable,styles$2.note,`noteIndex_${o.index}`],style:o.bbox,onClick:()=>skipNotePlay(o.index)},[createVNode("div",{class:styles$2.noteFollow,"data-vf":"vf"+o.id},[createVNode(Icon$1,{name:"success"},null),createVNode(Icon$1,{name:"cross"},null)]),createVNode("div",{class:[styles$2.noteDot,"node-dot"]},null)])),e.isMove=="1"&&createVNode(MoveMusicScore,null,null)])}}),styles={},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 u;let r=0;const s=i.closest(e);let o=s;const a=s==null?void 0:s.closest("measure");let l=null;for(;!l&&r<((a==null?void 0:a.childNodes.length)||50);)r++,((u=o==null?void 0:o.nextElementSibling)==null?void 0:u.tagName)==="note"&&(l=o==null?void 0:o.nextElementSibling),o=o==null?void 0:o.nextElementSibling;return l},getGradualLengthByXml=i=>{var d,g,m,y;const e=new DOMParser().parseFromString(i,"text/xml"),r=Array.from(e.querySelectorAll("measure")),s=Array.from(e.querySelectorAll("note")),o=Array.from(e.querySelectorAll("words")),a=Array.from(e.querySelectorAll("metronome")),l=[];for(const b of[...o,...a]){const S=getNextNote(b,"direction");if(S){const A=S==null?void 0:S.closest("measure"),E=Array.from(A.querySelectorAll("note")),x=Array.from(A.childNodes).filter(T=>T.nodeName==="note").findIndex(T=>T===S);let P=0,C=0;for(let T=0;Tb.index-S.index);const c=Object.keys(speedInfo).map(b=>b.toLocaleLowerCase());for(const b of l){let S=!1,A=0;const E=(g=b.textContent)==null?void 0:g.toLocaleLowerCase().trim();b===l[l.length-1]&&((m=u[u.length-1])==null?void 0:m.length)===1&&(S=!0);const x=c.find(P=>{const C=P.split(" ");return E&&C.includes(E)});if(b.type==="metronome"||b.type==="words"&&(E.startsWith("a tempo")||x)||S){const P=u.findIndex(C=>C.length===1);P>-1&&b.index>((y=u[P])==null?void 0:y[0].start)&&(A=-1,u[P][1]={start:b.index,measureIndex:b.measureIndex,closedMeasureIndex:b.measureIndex,noteInMeasureIndex:b.noteInMeasureIndex,allDuration:b.allDuration,leftDuration:b.leftDuration,type:E})}b.type==="words"&&x&&u.push([{start:b.index,measureIndex:b.measureIndex,closedMeasureIndex:b.measureIndex+A,noteInMeasureIndex:b.noteInMeasureIndex,allDuration:b.allDuration,leftDuration:b.leftDuration,type:E}])}return u};getQuery();const container=ref(),resetGivenFormate=()=>{var r,s;const e={12200:[{parts:["0","1"],tieId:["1483"]},{parts:["2"],tieId:["1463"]},{parts:["10"],tieId:["1246"]},{parts:["11"],tieId:["2455"]},{parts:["13"],tieId:["1488","1688"]},{parts:["14","15"],tieId:["1272"]},{parts:["16"],tieId:["1264","1368"],staveSection:[{id:"section-0",y:-10}]}],12420:[{parts:["0"],tieId:["1298","1405","1998","2598","3229","2731","2617"]}],7729:[{parts:["3"],tieId:["1498","1660"]}],7439:[{parts:["23"],vfmodifiers:[{id:"modifiers-130",y:-18,isLast:!0}]}],12711:[{parts:["0"],voltas:-12},{parts:["4"],voltas:-8}],3581:[{parts:["0"],voltas:-8}],6244:[{parts:["15"],stavenote:[{id:"vf-auto1608",y:-15}]}],7473:[{parts:["0"],voltas:-8}]}[state$1.cbsExamSongId];if(e){const o=state$1.partIndex+"",a=e.find(l=>l.parts.includes(o));if(!a)return;if(a.tieId&&a.tieId.length)for(let l=0;l{u.classList.add(`section-${c}`)});for(let u=0;u{u.classList.add(`modifiers-${c}`)});for(let u=0;u{u.style.transform=`translateY(${a.voltas}px)`}),a.stavenote&&a.stavenote.length)for(let l=0;l{var r,s,o,a,l,u,c,d,g,m,y,b,S;if(["1788850864767643649","1788502467554750466","1789839575249596417","1788501975122489346","1796006876341813249"].includes(state$1.cbsExamSongId)||i){const A=(r=Array.from(document.getElementsByClassName("vf-curve")))==null?void 0:r.last();if(A&&(A.style.display="none"),state$1.musicRenderType!=="staff"){const E=document.getElementById("auto2670"),x=document.getElementById("auto2710"),P=document.getElementById("auto3099"),C=document.getElementById("auto3339"),T=state$1.cbsExamSongId=="1789839575249596417"&&((o=(s=document.getElementById("vf-auto1554"))==null?void 0:s.getElementsByClassName("vf-modifier"))==null?void 0:o[0]),_=state$1.cbsExamSongId=="1789839575249596417"&&document.getElementById("vf-auto1554-lines"),B=state$1.cbsExamSongId=="1788501975122489346"&&((l=(a=document.getElementById("vf-auto2116"))==null?void 0:a.getElementsByClassName("vf-modifier"))==null?void 0:l[0]),M=state$1.cbsExamSongId=="1788501975122489346"&&document.getElementById("vf-auto2116-lines"),N=state$1.cbsExamSongId=="1788502467554750466"&&((c=(u=document.getElementById("vf-auto2122"))==null?void 0:u.getElementsByClassName("vf-modifier"))==null?void 0:c[0]),I=state$1.cbsExamSongId=="1788502467554750466"&&document.getElementById("vf-auto2122-lines");if(E&&(E.style.display="none"),x&&(x.style.display="none"),P&&(P.style.display="none"),C&&(C.style.display="none"),T&&(T.style.transform="translateX(-0.65rem)"),B&&(B.style.transform="translateX(-0.65rem)"),N&&(N.style.transform="translateX(-0.65rem)"),_&&(_.style.transform="translateX(-0.65rem)"),M&&(M.style.transform="translateX(-0.65rem)"),I&&(I.style.transform="translateX(-0.65rem)"),_||M||I){const R=_?_.querySelector("path"):M?M.querySelector("path"):I?I.querySelector("path"):null;let F=R==null?void 0:R.getAttribute("d");if(F){const k=(m=(g=(d=F.split("L"))==null?void 0:d.last())==null?void 0:g.split(" "))==null?void 0:m[0];let V=((b=(y=F.split("M"))==null?void 0:y[1])==null?void 0:b.split(" ")[0])||0;V=V?Number(V):0;let D=((S=F.split("L"))==null?void 0:S.last().split(" ")[0])||0;D=D?Number(D):0;const $=D-V,O=V-$;F=F.replace(`L${k}`,`L${O}`),R.setAttribute("d",F)}}}}},resetFormate=()=>{var s,o,a;if(container.value=document.getElementById("scrollContainer"),!container.value)return;moveGracePosition();const i=Array.from(container.value.querySelectorAll(".staffline")),e=4,r=28;for(let l=0,u=i.length;l .vf-voices")),S=Array.from(c.querySelectorAll(".vf-measure > .vf-beams")),A=Array.from(c.querySelectorAll(".vf-ties")),E=Array.from(c.querySelectorAll(".vf-line")),x=Array.from(c.querySelectorAll(".vf-measure > .vf-stave text"));Array.from(c.querySelectorAll(".vf-measure > .vf-stave rect[fill=none]"));const P=Array.from(c.querySelectorAll(".vf-measure .vf-staveSection")),C=Array.from(c.querySelectorAll(".vf-measure > .vf-stave path")),T=Array.from(c.querySelectorAll(".vf-measure .vf-stopDot")),_=Array.from(c.querySelectorAll(".vf-measure > .vf-stave")),B=((s=C[0])==null?void 0:s.getBBox().y)||0,M=["To Coda","D.S. al Coda","Coda"];x.filter(O=>M.includes(O.textContent||"")).forEach(O=>{S.forEach(q=>{var Z;const G=collisionDetection(O,q),U=O==null?void 0:O.previousSibling;if(G.isCollision){const W=Number(O.getAttribute("y"))-(G.b1-G.t2)-e+"";O.setAttribute("y",W),U&&U.getAttribute("stroke-width")==="0.3"&&U.getAttribute("stroke")==="none"&&(((Z=U.getAttribute("d"))==null?void 0:Z.length)||0)>3e3&&(U.style.transform=`translateY(${-(G.b1-G.t2+e)}px)`)}}),b.forEach(q=>{var Z;const G=collisionDetection(O,q),U=O==null?void 0:O.previousSibling;if(G.isCollision){const W=Number(O.getAttribute("y"))-(G.b1-G.t2)-e+"";O.setAttribute("y",W),U&&U.getAttribute("stroke-width")==="0.3"&&U.getAttribute("stroke")==="none"&&(((Z=U.getAttribute("d"))==null?void 0:Z.length)||0)>3e3&&(U.style.transform=`translateY(${-(G.b1-G.t2+e)}px)`)}})}),P.forEach(O=>{let q=0;[...y,...A,...b].forEach(G=>{const U=collisionDetection(O,G);U.isCollision&&(q=Math.min(q,U.t2-U.b1-e))}),O.style.transform=`translateY(${q}px)`});let N=Array.from(c.querySelectorAll(".vf-text > text")).filter(O=>O.getBBox().y text")).filter(O=>O.getBBox().y{const q=O.getBBox();q.y1&&R.forEach(O=>{O.setAttribute("y",I+"")}),N.forEach(O=>{[...y,...m,...E].forEach(q=>{let G=collisionDetection(O,q);if(G.isCollision&&G.b1{N.forEach(q=>{if(O.parentNode!==q.parentNode&&!["marcato","legato"].includes(O.textContent))if(["marcato","legato"].includes(q.textContent)){if(collisionDetection(O,q,30,30).isCollision){const U=O.getBBox();q.setAttribute("x",U.x+U.width+5+""),q.setAttribute("y",U.y+U.height-5+"")}}else{const G=collisionDetection(O,q);if(G.isCollision){const U=Number(O.getAttribute("y")),Z=G.b2-G.t2<24?24:G.b2-G.t2;q.setAttribute("y",U-Z-.5+"")}}})});const F=["C","G","D","A","E","B","F#","C#","G#","F","Bb","Eb","Ab","Db","Gb","Cb","Fb","D#","A#","E#"],k=["Bb","Eb","Ab","Db","Gb","Cb","Fb"],V=["F#","C#","G#","D#","A#","E#","B#"];N.forEach(O=>{const q=O.textContent;if(F.includes(q)){const G=Number(O.getAttribute("y")),U=B?B-r:G;O.setAttribute("y",U)}k.includes(q)&&(O.textContent=q.replace("b","♭")),V.includes(q)&&(O.textContent=q.replace("#","♯"))}),T.forEach(O=>{state$1.musicRenderType==="fixedTone"?O.setAttribute("transform","translate(3,-12)"):O.setAttribute("transform","translate(3,-7)")});const D=Array.from(c.querySelectorAll(".vf-text > text")).filter(O=>O.getBBox().y>g),$=Array.from(c.querySelectorAll(".vf-line")).filter(O=>O.getBBox().y>g);for(let O=0;O{[...m].forEach(q=>{let G=collisionDetection(O,q);G.isCollision&&O.setAttribute("y",G.b2+Math.abs(G.t1-Number(O.getAttribute("y")))+"")})}),$.forEach(O=>{var G;const q=[];if((G=O.nextElementSibling)!=null&&G.classList.contains("vf-line")&&D.forEach(U=>{let Z=collisionDetection(O,U,20,20);Z.isCollision&&q.push({text:U,result:Z})}),q.length===1){const U=q[0].result,Z=q[0].text;U.x2+U.w2U.x1+U.w1?Math.abs(U.y2-U.y1)>10&&Z.setAttribute("y",U.y1+U.h2/2+""):Math.abs(U.x2-U.x1)10&&Z.setAttribute("y",U.y1+U.h2/2+"")):(Z.setAttribute("x",U.x1+U.w1+5+""),Math.abs(U.y2-U.y1)>10&&Z.setAttribute("y",U.y1+U.h2/2+""))}else if(q.length===2){const U=q[0].result,Z=q[0].text,W=q[1].result,K=q[1].text;Z.setAttribute("x",U.x1-U.w2-5+""),Math.abs(U.y2-U.y1)>10&&Z.setAttribute("y",U.y1+U.h2/2+""),K.setAttribute("x",W.x1+W.w1+5+""),Math.abs(W.y2-W.y1)>10&&K.setAttribute("y",W.y1+W.h2/2+"")}}),D.forEach(O=>{D.forEach(q=>{if(O.parentNode!==q.parentNode&&!["marcato","legato","cresc.","Cantabile"].includes(O.textContent))if(["marcato","legato","cresc.","Cantabile"].includes(q.textContent)){if(collisionDetection(O,q,30,30).isCollision){const U=O.getBBox();q.setAttribute("x",U.x+U.width+5+""),q.setAttribute("y",U.y+U.height-5+"")}}else{const G=collisionDetection(O,q);G.isCollision&&q.setAttribute("y",G.y1+G.h1+G.h2+"")}})});for(let O=0;O{const q=[Array.from((O==null?void 0:O.querySelectorAll(".vf-clef"))||[]),Array.from((O==null?void 0:O.querySelectorAll(".vf-keysignature"))||[]),Array.from((O==null?void 0:O.getElementsByTagName("text"))||[]),Array.from((O==null?void 0:O.querySelectorAll(".vf-StaveSection"))||[])].flat();try{q.length&&q.forEach(K=>{var ye;O==null||O.removeChild(K),(ye=K==null?void 0:K.style)==null||ye.setProperty("display","none")})}catch(K){}const G=(O==null?void 0:O.getBBox())||{},U=``,Z=``,W=`${U}${Z}`;try{q.length&&q.forEach(K=>{var ye;O==null||O.appendChild(K),(ye=K==null?void 0:K.style)==null||ye.removeProperty("display")})}catch(K){}O.innerHTML=W+O.innerHTML}),state$1.vfmeasures=state$1.vfmeasures.concat(m)}},collisionDetection=(i,e,r=0,s=0)=>{const o=i.getBBox(),a=e.getBBox();let l=o.y-s,u=o.x-r,c=o.x+o.width+r,d=o.y+o.height+s,g=a.y,m=a.x,y=a.x+a.width,b=a.y+a.height;return dy||l>b||c{const i=state$1.partIndex+"",r=[{id:"12644",part_index:"25",direction:1}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i);setGlobalData("tieDirection",r?r.direction:void 0);const o=[{id:"3509",part_index:"16",direction:1}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i);o&&setGlobalData("graceCustom",{direction:o.direction});const l=[{id:"3030",part_index:"17",line:4},{id:"12704",part_index:"23",line:3}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i);l&&setGlobalData("customBassDrum",l.line);const c=[{id:"11654",part_index:"16",stemNotes:[{id:124,direction:0},{id:125,direction:0},{id:126,direction:0},{id:127,direction:0},{id:128,direction:0}]},{id:"3581",part_index:"4",stemNotes:[{id:380,direction:1}]},{id:"3470",part_index:"0",stemNotes:[{id:36,direction:1},{id:37,direction:1}]},{id:"3470",part_index:"11",stemNotes:[{id:33,direction:1},{id:56,direction:1}]},{id:"12644",part_index:"22",stemNotes:[{id:22,direction:1},{id:26,direction:1},{id:135,direction:1},{id:163,direction:1},{id:199,direction:1},{id:204,direction:1},{id:206,direction:1},{id:208,direction:1},{id:210,direction:1},{id:213,direction:1}]},{id:"12303",part_index:"18",stemNotes:[{id:1,direction:1},{id:4,direction:1},{id:6,direction:1},{id:9,direction:1},{id:12,direction:1},{id:14,direction:1}]},{id:"12669",part_index:"24",stemNotes:[{id:65,direction:1},{id:296,direction:1},{id:298,direction:1},{id:300,direction:1},{id:338,direction:1}]},{id:"12420",part_index:"21",stemNotes:[{id:614,direction:0},{id:617,direction:0},{id:619,direction:0},{id:621,direction:0}]},{id:"12711",part_index:"22",stemNotes:[]},{id:"12973",part_index:"21",stemNotes:[{id:619,direction:1},{id:622,direction:1},{id:745,direction:1}]}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i);c&&setGlobalData("stemDirectionNote",c.stemNotes);const g=[{id:"12711",part_index:"4",vfcurve:[{MeasureNumberXML:25,index:1,bezierEndControlPt:{y:-2}},{MeasureNumberXML:33,index:1,bezierEndControlPt:{y:-2}}]},{id:"12059",part_index:"0",vfcurve:[{MeasureNumberXML:15,bezierEndControlPt:{y:2.8},bezierEndPt:{y:1.1}},{MeasureNumberXML:16,bezierEndControlPt:{y:-1}},{MeasureNumberXML:19,index:1,bezierEndControlPt:{y:2}},{MeasureNumberXML:20,bezierEndControlPt:{y:-1}},{MeasureNumberXML:42,index:1,bezierEndControlPt:{y:-1.5},bezierStartControlPt:{y:-1.5}},{MeasureNumberXML:46,index:3,bezierEndControlPt:{y:-1.5},bezierStartControlPt:{y:-1.5}}]},{id:"12668",part_index:"11",vfcurve:[{MeasureNumberXML:8,index:2,bezierEndControlPt:{y:-3},bezierStartControlPt:{y:-3},bezierEndPt:{y:-1}}]},{id:"11976",part_index:"0",vfcurve:[{MeasureNumberXML:14,index:4,bezierEndControlPt:{y:-3}},{MeasureNumberXML:14,index:1,bezierEndPt:{y:1.5},bezierEndControlPt:{y:1}}]}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i);g&&setGlobalData("vfcurveItem",g.vfcurve),[{id:"12644",part_index:"25"}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i)&&setGlobalData("customArtPosition",!0),[{id:"12645",part_index:"5"}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i)&&setGlobalData("customTenutoItem",!0),([{id:"12711",part_index:"22"},{id:"12711",part_index:"25"}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i)||state$1.isEvxml)&&setGlobalData("customAccentItem",!0),[{id:"12711",part_index:"25"},{id:"7755",part_index:"10"},{id:"6226",part_index:"16"}].find(({id:C,part_index:T})=>C==state$1.cbsExamSongId&&T==i)&&setGlobalData("customLefthandpizzicatoItem",!0)},setCustomGradual=()=>{if(state$1.gradualTimes){const i=state$1.cbsExamSongId+"",e=state$1.partIndex+"";["12280"].includes(i)&&["24"].includes(e)&&(state$1.gradualTimes[8]="00:26:10",state$1.gradualTimes[66]="01:53:35",state$1.gradualTimes[90]="02:41:40")}},setCustomNoteRealValue=()=>{const i=state$1.cbsExamSongId+"",e=state$1.partIndex+"";["2670"].includes(i)&&(customData.customNoteRealValue={0:.03125}),["12673"].includes(i)&&["22"].includes(e)&&(customData.customNoteRealValue={208:.125}),["12667","12673"].includes(i)&&(customData.customNoteCurrentTime=!0)},musicRenderTypeKey="musicRenderType";let osmd=null;const musicData=reactive({showSelection:!1,isRenderLoading:!0,score:"",containerWidth:0}),resetRenderMusicScore=i=>{const e=queryString.parse(location.search),r=queryString.stringify({...e,_t:Date.now(),musicRenderType:i});location.search="?"+r},downloadXmlStr=ref(""),MusicScore=defineComponent({name:"music-score",emits:["rendered"],props:{showSelection:{type:Boolean,default:!0},renderTypeKey:{type:String,default:""},musicColor:{type:String,default:""},showPartNames:{type:Boolean,default:!1}},setup(i,{emit:e,slots:r}){const s=()=>{const c=sessionStorage.getItem(i.renderTypeKey||musicRenderTypeKey);c in EnumMusicRenderType&&(state$1.musicRenderType=c)},o=async()=>{const c=downloadXmlStr.value||await fetch(state$1.xmlUrl).then(g=>g.text());downloadXmlStr.value="";const d=formatXML(c);musicData.score=state$1.isCombineRender?d:onlyVisible(d,state$1.partIndex),state$1.gradualTimes&&(state$1.gradual=getGradualLengthByXml(d))},a=async()=>{const c=document.getElementById("musicAndSelection");!c||!musicData.score||(setGlobalMusicSheet(),osmd=new OpenSheetMusicDisplay(c,{drawTitle:!1,drawSubtitle:!1,autoResize:!1,followCursor:!1,drawPartNames:i.showPartNames,drawLyricist:!1,drawComposer:!1,defaultColorMusic:i.musicColor,renderSingleHorizontalStaffline:!!state$1.isSingleLine,autoGenerateMultipleRestMeasuresFromRestMeasures:!state$1.isSingleLine,colorStemsLikeNoteheads:!0}),osmd.EngravingRules.PageTopMargin=0,osmd.EngravingRules.PageTopMarginNarrow=3,osmd.EngravingRules.PageLeftMargin=2,osmd.EngravingRules.BreathMarkDistance=.1,osmd.EngravingRules.PageBottomMargin=state$1.isSingleLine?2:18,osmd.EngravingRules.DYMusicScoreType=state$1.musicRenderType===EnumMusicRenderType.staff?"staff":"jianpu",state$1.musicRenderType===EnumMusicRenderType.fixedTone&&(window.sett={keySignature:!0}),osmd.EngravingRules.DYMusicScoreId=state$1.examSongId||"",osmd.EngravingRules.DYCustomRepeatCount=state$1.maxLyricNum||0,await osmd.load(musicData.score),osmd.zoom=state$1.zoom,osmd.render(),console.log("🚀 ~ osmd:",osmd),e("rendered",osmd),resetFormate(),resetGivenFormate(),musicData.showSelection=!0)},l=()=>{var c;musicData.containerWidth=((c=document.getElementById("musicAndSelection"))==null?void 0:c.offsetWidth)||625};onMounted(async()=>{l(),s(),await o(),await a(),musicData.isRenderLoading=!1});const u=computed(()=>{var g;let c=!1;const d=((g=state$1.times[state$1.activeNoteIndex])==null?void 0:g.measureListIndex)||-1;for(const[m,y]of state$1.gradual)if(m&&y&&(c=m.measureIndex<=d&&d{var c;return createVNode("div",{id:"musicAndSelection",style:{"--music-zoom":state$1.musicZoom},class:[u.value&&styles.inGradualRange,state$1.musicRenderType==EnumMusicRenderType.staff?"staff":"jianpuTone",state$1.isSingleLine&&"singleLineMusicBox"]},[(c=r.default)==null?void 0:c.call(r),i.showSelection&&musicData.showSelection&&!state$1.isPreView&&!state$1.isEvaluatReport&&createVNode(Selection,null,null)])}}}),query=getQuery();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 classids=[1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,30,31,35,36,38,108,150,151,152,153,154,155,156,157,158,178,179,180,181,182],musicalInstrumentCodeInfo=[{name:"长笛",code:"Flute",id:1},{name:"短笛",code:"Piccolo",id:2},{name:"单簧管",code:"Clarinet",id:3},{name:"低音单簧管",code:"Bass Clarinet",id:4},{name:"中音萨克斯",code:"Alto Saxophone",id:5},{name:"次中音萨克斯",code:"Tenor Saxophone",id:6},{name:"高音萨克斯",code:"Soprano Saxophone",id:7},{name:"上低音萨克斯",code:"Baritone Saxophone",id:8},{name:"双簧管",code:"Oboe",id:9},{name:"大管",code:"Bassoon",id:10},{name:"小号",code:"Trumpet",id:11},{name:"圆号",code:"Horn",id:12},{name:"长号",code:"Trombone",id:13},{name:"上低音号",code:"Baritone",id:14},{name:"次中音号",code:"Euphonium",id:15},{name:"大号",code:"Tuba",id:16},{name:"钢琴",code:"Piano",id:17},{name:"电钢琴",code:"Electronical Piano",id:18},{name:"钢片琴",code:"Glockenspiel",id:19},{name:"小提琴",code:"Violin",id:20},{name:"中提琴",code:"Viola",id:21},{name:"大提琴",code:"Violoncello",id:22},{name:"低音提琴",code:"Contrabass",id:23},{name:"架子鼓",code:"Drum Set",id:24},{name:"小鼓",code:"Snare Drum",id:25},{name:"马林巴",code:"Marimba",id:26},{name:"颤音琴",code:"Vibraphone",id:27},{name:"钟琴",code:"Chimes",id:28},{name:"木琴",code:"Xylophone",id:29},{name:"管钟",code:"Tubular Bells",id:30},{name:"定音鼓",code:"Timpani",id:31},{name:"键盘",code:"Mallets",id:32},{name:"排箫",code:"Panpipes",id:33},{name:"陶笛",code:"Ocarina",id:34},{name:"葫芦丝",code:"Woodwind",id:35},{name:"口风琴",code:"Nai",id:36},{name:"德式竖笛",code:"Tenor Recorder",id:37},{name:"英式竖笛",code:"Baroque Recorder",id:38},{name:"高音陶笛",code:"Whistling",id:39}],state=reactive({platform:"",appName:"",musicRenderType:"staff",musicRendered:!1,detailId:"",xmlUrl:"",subjectId:0,trackId:0,categoriesId:0,categoriesName:"",enableEvaluation:!0,enableNotation:!1,examSongId:"",cbsExamSongId:"",examSongName:"",coverImg:"",extConfigJson:{},extStyleConfigJson:{},isOpenMetronome:!1,isSingOpenMetronome:!1,isShowFingering:!1,music:"",accompany:"",fanSong:"",banSong:"",mingSong:"",beatSong:{music:"",accompany:"",fanSong:"",banSong:"",mingSong:""},midiUrl:"",parentCategoriesId:0,musicSheetCategoriesId:0,bizMusicCategoryId:0,playMode:"MP3",speed:0,originSpeed:0,playIngSpeed:0,track:"",partIndex:0,needTick:!1,needSingTick:!1,osmd:null,isSpecialBookCategory:!1,playState:"paused",playEnd:!1,playType:"play",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:0,evaluationDifficulty:"BEGINNER",saveToAlbum:!0,enableAccompaniment:!0,reactionTimeMs:0,beatVolume:50},baseFrequency:440,fixtime:0,evXmlBeginTime:0,secondEvXmlBeginTime:0,evXmlBeginArr:[],fingeringInfo:{},scrollContainer:"musicAndSelection",isPercussion:!1,evaluationStandard:"",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:[],canSelectTracks:[],subjectCodeId:0,musicalCodeId:0,musicalCode:"",isCombineRender:!1,measureTime:0,beatStartTime:0,isPreView:!1,isEvaluatReport:!1,midiPlayIniting:!1,songs:{},isAppPlay:!1,audiosInstance:null,durationNum:0,midiSectionStart:0,audioDone:!1,isSingleLine:!1,isEvxml:!1,noTimes:[],playBtnDirection:"left",musicScoreBtnDirection:"right",isAttendClass:!1,guideInfo:null,noteCoords:[],specialPosInit:!1,paymentType:null,defaultModeType:1,maxLyricNum:0,vfmeasures:[],musicComposer:"",musicLyricist:""});browser();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("开始播放","音频总时长:",getAudioDuration()),state.playEnd=!1,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 r=getNote(i);if(r&&state.modeType==="practise"&&state.playState==="play"&&r.measureSpeed&&r.measureSpeed!==state.playIngSpeed){const o=state.speed/state.originSpeed;state.playIngSpeed=Math.ceil(o*r.measureSpeed)||state.speed}else state.modeType==="practise"&&state.playState==="play"&&r&&!r.measureSpeed&&(state.playIngSpeed=state.speed);if(state.playIngSpeed=state.playIngSpeed||state.speed,r){if(state.sectionStatus&&state.section.length===2){const o=state.sectionFirst?state.sectionFirst:state.section[0],a=state.section[1];if(state.repeatInfo.length){const l=verifyCanRepeat(state.section[0].MeasureNumberXML,state.section[1].MeasureNumberXML),u=l.repeatIdx==-1?0:l.repeatIdx;if(state.modeType==="practise"&&!l.canRepeat&&state.section[1].MeasureNumberXML>state.repeatInfo[u].end){const c=state.times[r.i-1];if(c&&c.MeasureNumberXML>r.MeasureNumberXML){const d=state.times.find(g=>g.MeasureNumberXML===c.MeasureNumberXML+1);if(d){setAudioCurrentTime(d.time,d.i),gotoNext(d);return}}}}if(i-a.endtime>=0){if(console.log("选段播放结束",state.setting.repeatAutoPlay),state.modeType==="evaluating"&&state.isSelectMeasureMode){onEnded();return}if(state.modeType==="practise"&&state.sectionStatus){onEnded(),resetPlaybackToStart();return}r=o,setAudioCurrentTime(o.time,o.i)}}gotoNext(r)}(s=metronomeData.metro)==null||s.sound(i),state.isSingleLine&&moveSmoothAnimationByPlayTime()},skipNotePlay=async(i,e=!1)=>{var o;const r=state.times[i];let s=r.time;e&&(s=0),r&&(setAudioCurrentTime(s,i),gotoNext(r,!0),(o=metronomeData.metro)==null||o.sound(s),state.isAppPlay&&(await api_cloudSetCurrentTime({currentTime:s*1e3,songID:state.examSongId}),audioData$1.progress=s,state.midiSectionStart=s))},togglePlay=async(i,e)=>{if(!state.isAppPlay&&!state.audioDone){e!=="courseware"&&showToast("音频资源加载中,请稍后");return}if((i||(state.playState==="paused"?"play":"paused"))==="play"&&state.modeType==="practise"&&state.playMode!=="MIDI"&&(console.log("设置音源"),changeSongSourceByBate(metronomeData.disable)),state.isAppPlay){if(i==="paused"){await api_cloudSuspend({songID:state.examSongId}),state.playState="paused";return}skipNotePlay(state.activeNoteIndex,!1),await api_cloudChangeSpeed({speed:state.modeType==="evaluating"?state.originSpeed:state.speed,originalSpeed:state.originSpeed,songID:state.examSongId});const r=await api_cloudGetMediaStatus(),s=(r==null?void 0:r.content.status)==="suspend"?"play":"paused";state.playState=s}else state.playState=i||(state.playState==="paused"?"play":"paused");if(state.playState==="play"&&state.sectionStatus&&state.section.length==2&&state.playProgress===0&&resetPlaybackToStart(),state.playState==="paused"&&closeTick(),state.playState==="play"&&getAudioCurrentTime()===0&&(state.playType==="play"&&state.needTick||state.playType==="sing"&&state.needSingTick))if(state.playType==="play"&&!state.isOpenMetronome||state.playType==="sing"&&!state.isSingOpenMetronome){if(!await handleStartTick())return state.playState="paused",!1}else handleStartTick();return state.playState=="play"&&state.sectionStatus&&state.section.length<2&&clearSelection(),audioListStart(state.playState),!0},handleStopPlay=()=>{state.playState="paused",audioListStart(state.playState)},resetPlaybackToStart=()=>{var i;if(state.sectionStatus&&state.section.length===2){state.section=formateSelectMearure(state.section);return}else metronomeData.activeMetro=((i=metronomeData.metroMeasure[0])==null?void 0:i[0])||{};skipNotePlay(0,!0)},gotoCustomNote=i=>{try{state.osmd.cursor.reset()}catch(e){}for(let e=0;e{var s,o,a;if(state.musicRenderType==="firstTone"||state.musicRenderType==="fixedTone"){if(state.sectionStatus&&state.playState==="paused"&&state.sectionFirst&&(i.multipleRestMeasures||i.MeasureNumberXML!==((s=state.sectionFirst)==null?void 0:s.MeasureNumberXML)))return;if(["1788850864767643649","1788502467554750466","1788501975122489346"].includes(state.cbsExamSongId)&&i.multipleRestMeasures===0){const u=(a=(o=e==null?void 0:e.cursorElement)==null?void 0:o.style)!=null&&a.left?parseFloat(e.cursorElement.style.left):0;let c=0;state.cbsExamSongId=="1788502467554750466"?(state.musicRenderType==="firstTone"&&(c=i.i==0||i.i==60?21:i.i==1||i.i==7||i.i==23||i.i==38||i.i==44||i.i==52||i.i==58?-6:i.i>=2||i.i<=6||i.i>=8||i.i<=22||i.i>=24||i.i<=37||i.i>=39||i.i<=43||i.i>=45||i.i<=51||i.i>=53||i.i<=57||i.i==59?6:0),state.musicRenderType==="fixedTone"&&(c=i.i==0?31:i.i==8||i.i==14||i.i==30||i.i==45||i.i==51||i.i==59||i.i==65?-10:i.i==67?31:0)):state.cbsExamSongId=="1788501975122489346"&&(state.musicRenderType==="firstTone"&&(c=i.i==0?21:i.i==1||i.i==7||i.i==23||i.i==38||i.i==44||i.i==52||i.i==58?-6:i.i==9||i.i==10||i.i==12||i.i==13?3:i.i==14||i.i==30||i.i==45||i.i==51||i.i==59?6:i.i==45?-8:i.i>=15||i.i<=29||i.i>=31||i.i<=36||i.i>=38||i.i<=44||i.i>=46||i.i<=50||i.i>=52||i.i<=58||i.i>=60||i.i<=64||i.i==66?4:0),state.musicRenderType==="fixedTone"&&(c=i.i==0?31:i.i==8||i.i==14||i.i==30||i.i==45||i.i==51||i.i==59||i.i==65?-10:i.i==67?31:0)),(r==="refresh"||r==="init"&&!state.specialPosInit)&&(e.cursorElement.style.left=u+c+"px",state.specialPosInit=!0)}else nextTick(()=>{var g,m,y,b;let u=i.bbox;if(!u){const A=(((g=document.getElementById("musicAndSelection"))==null?void 0:g.getBoundingClientRect())||{x:0,y:0}).x||0,E=document.querySelector(`#vf-${(y=(m=i.svgElement)==null?void 0:m.attrs)==null?void 0:y.id}`);if(E){const x=E.querySelector(".vf-numbered-note-head"),P=(b=x==null?void 0:x.getBoundingClientRect)==null?void 0:b.call(x);P&&(i.bbox={left:P.x-A-P.width/4,width:P.width*1.5},u=i.bbox)}}if(!u)return;const c=state.platform==="PC"?29:18,d=(u.width-c)/3;e.cursorElement.style.left=u.left+"px",e.cursorElement.style.transform=`translateX(${d}px)`})}},gotoNext=(i,e)=>{const r=i.i;if(state.activeNoteIndex===i.i){try{setCursorPosition(i,state.osmd.cursor,"init")}catch(a){console.log(a)}state.isSingleLine&&state.playState==="paused"&&moveSvgDom(e);return}const s=state.osmd;let o=state.activeNoteIndex;if(state.activeNoteIndex=r,state.activeMeasureIndex=i.MeasureNumberXML,o&&r-o===1)s.cursor.next();else if(o&&r-o>0)for(;r-o>0;)o++,s.cursor.next();else gotoCustomNote(r);try{setCursorPosition(i,state.osmd.cursor,"refresh")}catch(a){console.log(a)}state.isSingleLine&&moveSvgDom(e),scrollViewNote()},getNote=i=>{const e=state.times,r=state.times.length;if(i>e[r-1].endtime+2&&!state.isAppPlay){onEnded();return}let s=null;for(let o=state.activeNoteIndex;o=a.time)(!l||a.time!=l.time)&&(s=a);else break}return s},handleResetPlay=()=>{state.isAppPlay&&(audioData$1.progress=0),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"),clearSelection(),skipNotePlay(0,!0),state.sectionFirst=null;return}state.sectionStatus=!0,state.sectionStatus&&togglePlay("paused"),showToast({message:"请选择开始小节",duration:0,position:"top",className:"selectionToast"})},formateSelectMearure=i=>{var u,c;if(!i.length)return[];const e=i.sort((d,g)=>d.time-g.time),r=(u=e[0])==null?void 0:u.measureOpenIndex,s=(c=e.last())==null?void 0:c.measureOpenIndex,o=state.times.filter(d=>r===d.measureOpenIndex)||[],a=state.times.filter(d=>s===d.measureOpenIndex)||[];if(!o.length||!a.length)return clearSelection(),[];e[0]=o[0],e[1]=a.last();let l=e[0].i;if(state.isOpenPrepare){const d=e[0].MeasureNumberXML;state.sectionFirst=state.times.find(g=>d-g.MeasureNumberXML===1),l=state.sectionFirst?state.sectionFirst.i:l}return skipNotePlay(l,l===0),e},handleSelection=i=>{!state.sectionStatus||state.section.length>1||(state.section.length!==2&&i&&(state.section.push(i),state.section.length===2&&(setSection(state.section[0].MeasureNumberXML,state.section[1].MeasureNumberXML),closeToast())),state.section.length===1&&showToast({message:"请选择结束小节",duration:0,position:"top",className:"selectionToast"}))},setSection=(i,e,r)=>{var A,E,x,P;const s=state.times.filter(C=>C.noteElement.sourceMeasure.MeasureNumberXML==i),o=state.times.filter(C=>C.noteElement.sourceMeasure.MeasureNumberXML==e);state.userChooseEndIndex=e;const a=o[o.length-1].noteId;let l=o.filter(C=>C.noteId===a);const u=verifyCanRepeat(i,e);console.log("能否重播",u);const c=u.canRepeat;let d=!1;l.length===1&&(d=(x=(E=(A=l[0])==null?void 0:A.stave)==null?void 0:E.modifiers)==null?void 0:x.some(C=>C.getAttribute("type")==="Volta"));let g=e;const m=((P=state.repeatInfo[u.repeatIdx])==null?void 0:P.end)||0;for(;c&&l.length===1&&l[0].MeasureNumberXML<=m&&!d;){g=g-1;const C=state.times.filter(_=>_.noteElement.sourceMeasure.MeasureNumberXML==g),T=C[C.length-1].noteId;l=C.filter(_=>_.noteId===T)}const y=c&&u.repeatIdx==state.repeatInfo.length-1?l.length-1:0,b=s[0],S=l[y];b&&S&&(state.isSelectMeasureMode=!0,hanldeDirectSelection([b,S]),r&&handleSetSpeed(r))},hanldeDirectSelection=i=>{!Array.isArray(i)||i.length!==2||(state.sectionStatus=!0,setTimeout(()=>{state.section=formateSelectMearure(i),console.log("选段小节",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=()=>{clearSelection(),skipNotePlay(0,!0),state.isAppPlay&&(audioData$1.progress=0),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"}),getMusicDetail=async i=>{const e=await getMusicSheetDetail(i);(e==null?void 0:e.code)===200&&await getMusicInfo(e)},getMusicInfo=async i=>{const e=await fetch(i.data.xmlFileUrl).then(l=>l.text());downloadXmlStr.value=e;const r=xmlToTracks(e);let s=query["part-index"]?parseInt(query["part-index"]):0;const o=initMusicSource(i.data,r[s]);s=r.findIndex(l=>l===(o==null?void 0:o.track)),s=s>=0?s:0;const a={...i.data,track:o==null?void 0:o.track};console.log("🚀 ~ musicInfo:",a),setState(a,s)};function xmlToTracks(i){const e=new DOMParser().parseFromString(i,"text/xml");return Array.from(e.getElementsByTagName("part-name")).reduce((s,o)=>{var l;const a=(l=o==null?void 0:o.textContent)==null?void 0:l.trim();return a!=="COMMON"&&a&&s.push(a),s},[])}function initMusicSource(i,e){const{instrumentId:r}=storeData.user;let{musicSheetType:s,isAllSubject:o,musicSheetSoundList:a,musicSheetAccompanimentList:l}=i;a||(a=[]),l||(l=[]);let u,c,d,g;return s==="SINGLE"?(u=a.find(m=>o||!r?m.audioPlayType==="PLAY":m.audioPlayType==="PLAY"&&m.musicalInstrumentId==r),d=a.find(m=>m.audioPlayType==="SING"),g=l.find(m=>m.audioPlayType==="SING")):u=e?a.find(m=>m.track===e):a[0],c=l.find(m=>m.audioPlayType==="PLAY"),Object.assign(state,{music:u==null?void 0:u.audioFileUrl,accompany:c==null?void 0:c.audioFileUrl,fanSong:d==null?void 0:d.audioFileUrl,banSong:g==null?void 0:g.audioFileUrl,mingSong:d==null?void 0:d.solmizationFileUrl}),Object.assign(state.beatSong,{music:u==null?void 0:u.audioBeatMixUrl,accompany:c==null?void 0:c.audioBeatMixUrl,fanSong:d==null?void 0:d.audioBeatMixUrl,banSong:g==null?void 0:g.audioBeatMixUrl,mingSong:d==null?void 0:d.solmizationBeatUrl}),u}const setState=(i,e)=>{var g,m,y,b,S,A,E,x,P,C,T,_,B,M;state.appName="COLEXIU",state.detailId=i.bizId,state.xmlUrl=i.xmlFileUrl,state.paymentType=i.paymentType,state.partIndex=e,state.trackId=i.track,state.subjectId=i.subjectIds?(g=i.subjectIds.split(","))==null?void 0:g[0]:0;const r=i.subjectCodes?(m=i.subjectCodes.split(","))==null?void 0:m[0]:"";let s=i.musicalInstrumentIdCodes?(y=i.musicalInstrumentIdCodes.split(","))==null?void 0:y[0]:"";const o=musicalInstrumentCodeInfo.find(N=>N.code.toLocaleLowerCase()===r.toLocaleLowerCase()),a=musicalInstrumentCodeInfo.find(N=>N.code.toLocaleLowerCase()===s.toLocaleLowerCase());if(state.subjectCodeId=o?o.id:0,state.musicalCodeId=a?a.id:0,state.categoriesId=i.musicCategoryId,state.categoriesName=i.musicTagNames,state.examSongId=i.bizId+"",state.cbsExamSongId=i.id+"",state.examSongName=i.name,state.coverImg=(b=i.musicCover)!=null?b:"",state.isCombineRender=i.musicSheetType==="SINGLE"&&((S=i.musicSheetSoundList)==null?void 0:S.length)>1,setCustom(state.isCombineRender?(A=i.musicSheetSoundList)==null?void 0:A.length:0),i.extConfigJson)try{state.extConfigJson=JSON.parse(i.extConfigJson)}catch(N){console.error("解析扩展字段错误:",N)}state.gradualTimes=state.extConfigJson.gradualTimes,state.repeatedBeats=state.extConfigJson.repeatedBeats||0,state.isEvxml=state.extConfigJson.isEvxml==1,state.needTick=!!i.isPlayBeat,state.needSingTick=!!i.isPlaySingBeat,state.isOpenMetronome=!!(i.isPlayBeat&&!i.isUseSystemBeat),state.isSingOpenMetronome=!!(i.isPlaySingBeat&&!i.isUseSingSystemBeat),state.isShowFingering=!!i.isShowFingering,state.isAppPlay=i.playMode==="MIDI",state.midiUrl=i.midiFileUrl,state.parentCategoriesId=i.musicTag,state.musicSheetCategoriesId=i.musicCategoryId,state.bizMusicCategoryId=i.bizMusicCategoryId,state.playMode=i.playMode==="MP3"?"MP3":"MIDI",state.originSpeed=state.speed=parseFloat(i.playSpeed)||0;const l=i.code||i.track;state.track=l?l.replace(/ /g,"").toLocaleLowerCase():"",state.isAppPlay?state.enableEvaluation=!!state.midiUrl:state.enableEvaluation=!!state.accompany,state.isConcert=i.musicSheetType==="CONCERT",state.canSelectTracks=i.multiTracksSelection==="null"||i.multiTracksSelection===""||i.multiTracksSelection===null?[]:(E=i.multiTracksSelection)==null?void 0:E.split(","),state.isOpenPrepare=!0,state.extStyleConfigJson=i.extStyleConfigJson||{},state.isPercussion=i.evaluationStandard==="AMPLITUDE"||i.evaluationStandard==="DECIBELS",state.evaluationStandard=((x=i.evaluationStandard)==null?void 0:x.toLocaleLowerCase())||"",state.isSpecialBookCategory=!classids.includes(Number(i.musicCategoryId));const u=state.isConcert?matchVoicePart(state.trackId,"CONCERT"):matchVoicePart(state.musicalCodeId,"SINGLE");state.fingeringInfo=subjectFingering(u),console.log("🚀 ~ state.fingeringInfo:",u,state.fingeringInfo,state.trackId,state.track),state.musicalCodeId=((P=state.fingeringInfo)==null?void 0:P.id)||0,state.musicalCode=((C=musicalInstrumentCodeInfo.find(N=>N.id===state.musicalCodeId))==null?void 0:C.code)||state.trackId,window.DYSubjectId=state.musicalCodeId,window.customSectionAmount=!0,window.DYProjectName="musicScore",!state.fingeringInfo.name&&state.setting.displayFingering&&(state.setting.displayFingering=!1),(!state.music||!state.accompany)&&(state.playSource=state.music?"music":"background"),state.platform=((T=query.platform)==null?void 0:T.toLocaleUpperCase())||"",state.platform==="PC"&&(state.zoom=query.zoom||1.5,state.enableEvaluation=!1);let c=null;state.isConcert?(s=(_=musicalInstrumentCodeInfo.find(N=>N.id===state.musicalCodeId))==null?void 0:_.code,c=(B=i.musicalInstruments)==null?void 0:B.find(N=>N.code===s)):c=(M=i.musicalInstruments)==null?void 0:M.find(N=>N.code===s);let d="";c!=null&&c.defaultScore&&(d=(c==null?void 0:c.defaultScore)==="STAVE"?"staff":(c==null?void 0:c.defaultScore)==="JIAN"?"fixedTone":(c==null?void 0:c.defaultScore)==="FIRST"?"firstTone":""),state.musicRenderType=query.musicRenderType||d||"firstTone",["1788501975122489346","1788502467554750466","1789839575249596417"].includes(state.cbsExamSongId)&&state.musicRenderType==="fixedTone"&&(state.musicRenderType="firstTone"),state.enableNotation=c?i.isConvertibleScore&&c.transferFlag:i.isConvertibleScore,console.log("state对象",state),state.baseFrequency=i.evaluationFrequency?i.evaluationFrequency.split(",")[0]:440,state.baseFrequency=Number(state.baseFrequency),Math.abs(state.setting.frequency-state.baseFrequency)>10?state.setting.frequency=state.baseFrequency>=0?state.baseFrequency:440:state.setting.frequency=state.setting.frequency||state.baseFrequency},setCustom=i=>{(i||state.extConfigJson.multitrack)&&(state.multitrack=i||0,setGlobalData("multitrack",i||state.extConfigJson.multitrack))},followBeatPaly=()=>{let i=null;if(!followData.start){clearTimeout(i),i=null;return}const e=state.measureTime*1e3/metronomeData.totalNumerator;requestAnimationFrame(()=>{var s;Date.now()-state.beatStartTime{var o,a,l,u,c,d,g,m,y,b,S,A,E,x,P,C,T;const r=(((o=document.getElementById("musicAndSelection"))==null?void 0:o.getBoundingClientRect())||{x:0,y:0}).x||0;let s=null;for(let _=0;_{var o,a,l,u;state.times.forEach((c,d)=>{var y,b,S,A,E,x;const g=document.getElementById(`vf-${(S=(b=(y=state.times[d])==null?void 0:y.svgElement)==null?void 0:b.attrs)==null?void 0:S.id}`),m=document.getElementById(`vf-${(x=(E=(A=state.times[d])==null?void 0:A.svgElement)==null?void 0:E.attrs)==null?void 0:x.id}-stem`);(c.i===state.activeNoteIndex||c.id===state.times[state.activeNoteIndex].id)&&c.svgElement?(g==null||g.classList.add("noteActive"),m==null||m.classList.add("noteActive")):(g==null||g.classList.remove("noteActive"),m==null||m.classList.remove("noteActive"))});const e=state.times[state.activeNoteIndex];if(Array.from(document.querySelectorAll(".vf-lyric")).forEach(c=>{c==null||c.classList.remove("lyricActive")}),Array.from(document.querySelectorAll(`.lyric${e==null?void 0:e.noteId}`)).forEach((c,d)=>{d===e.repeatIdx&&(c==null||c.classList.add("lyricActive"))}),i){const c=((o=state.times[state.activeNoteIndex].bbox)==null?void 0:o.x)-((a=state.times[0].bbox)==null?void 0:a.x)+((l=state.times[state.activeNoteIndex].bbox)==null?void 0:l.width)/2-((u=state.times[0].bbox)==null?void 0:u.width)/2;smoothAnimationState.translateXNum=0,moveSmoothAnimation(0,state.activeNoteIndex),smoothAnimationState.osdmScrollDom.scrollTo({left:c,behavior:"smooth"})}};watch(()=>state.activeMeasureIndex,()=>{console.log("当前小节",state.activeMeasureIndex),state.vfmeasures.forEach((i,e)=>{var r,s,o,a;e===state.activeMeasureIndex-1?((r=i.querySelector(".vf-custom-bg"))==null||r.setAttribute("fill","#132D4C"),(s=i.querySelector(".vf-custom-bot"))==null||s.setAttribute("fill","#040D1E")):((o=i.querySelector(".vf-custom-bg"))==null||o.setAttribute("fill","#609FCF"),(a=i.querySelector(".vf-custom-bot"))==null||a.setAttribute("fill","#2B70A5"))})});const browserInfo=browser();dayjs.extend(duration);const getFixTime=i=>{const e=getDuration(state$1.osmd);let r=e.numerator||0,s=e.denominator||4;const o=e.beatUnit||"quarter";return state$1.repeatedBeats&&(r=r*2),60/i*formatBeatUnit(o)*(r/s)},retain=i=>Math.ceil(i*1e6)/1e6,formatLyricsEntries=i=>{var s,o;const e=((s=i.parentStaffEntry)==null?void 0:s.voiceEntries)||[],r=[];for(const a of e)if((o=a.lyricsEntries)!=null&&o.table){const l=Object.values(a.lyricsEntries.table);for(const u of l)r.push(u==null?void 0:u.value.text)}return r},createSpeedInfo=(i,e)=>{var r,s;if(i&&speedInfo[(r=i.startWord)==null?void 0:r.toLocaleLowerCase()]){const o=Math.max(i.endXmlNoteIndex,3),a=[],l=e,u=e/speedInfo[(s=i.startWord)==null?void 0:s.toLocaleLowerCase()];for(let c=0;c{let e=i;const r=i.split(":");return r.length===1?e=`00:${r[0]}:00`:r.length===2&&(e=`00:${r[0]}:${r[1]}`),`1970-01-01 00:${e}0`},getDuration=i=>{var r;if(i){const{Duration:s,TempoInBPM:o,ActiveTimeSignature:a,TempoExpressions:l}=(r=i.GraphicSheet.MeasureList[0][0])==null?void 0:r.parentSourceMeasure;if(s){let u="quarter";for(const d of l)u=d.InstantaneousTempo.beatUnit||"quarter";return{...formatDuration(a),TempoInBPM:o,beatUnit:u}}}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,r){return r/formatBeatUnit(i)*e}const setElementNoteBefore=(i,e,r)=>{let s=0;if(e){for(let o=0;o0){let o=0;const a=Array.from(r.childNodes).filter(u=>u.nodeName==="note"),l=a[a.length-1];if(s>=a.length&&l){r.insertBefore(i,r.childNodes[Array.from(r.childNodes).indexOf(l)]);return}for(let u=0;u{if(i){const e=i.toLocaleLowerCase(),r="d\\s?\\.s\\.",s="d\\.\\s?c\\.";return e==="@"||StringUtil.StringContainsSeparatedWord(e,r+" al fine",!0)||StringUtil.StringContainsSeparatedWord(e,r+" 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,r,!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,S,A,E,x,P,C,T,_;if(!i)return"";const r=state$1.examSongId+"",s=new DOMParser().parseFromString(i,"text/xml"),o=((S=(b=s.getElementsByTagName("part-list"))==null?void 0:b[0])==null?void 0:S.getElementsByTagName("score-part"))||[],a=Array.from(o).map(B=>{var M,N,I;return((I=(N=(M=B.getElementsByTagName("part-name"))==null?void 0:M[0])==null?void 0:N.textContent)==null?void 0:I.trim())||""}),l=s.getElementsByTagName("part"),u=[...(A=l[0])==null?void 0:A.getElementsByTagName("measure")],c=[...(E=l[0])==null?void 0:E.getElementsByTagName("metronome")],d=[...(x=l[0])==null?void 0:x.getElementsByTagName("words")],g=[...(P=l[0])==null?void 0:P.getElementsByTagName("coda")],m=[...(C=l[0])==null?void 0:C.getElementsByTagName("rehearsal")];((_=(T=a[0])==null?void 0:T.toLocaleUpperCase)==null?void 0:_.call(T))==="COMMON"&&(e++,a.shift());const y=o[e];if(state$1.partListNames=a,y){const B=y.getAttribute("id");Array.from(l).forEach(M=>{var N,I,R,F,k;if(M&&M.getAttribute("id")!==B)(N=M.parentNode)==null||N.removeChild(M);else if(M&&M.getAttribute("id")!=="P1"){const V={};for(let D=0;D{var U;const $=(U=D.parentElement)==null?void 0:U.parentElement,O=$==null?void 0:$.parentElement,q=[...(O==null?void 0:O.childNodes)||[]],G=$?q.indexOf($):-1;if(O&&G>-1){const Z=u.indexOf(O),W=M.getElementsByTagName("measure")[Z];setElementNoteBefore($,O,W)}}),d.forEach(D=>{var O;let $=D.textContent||"";if($=["cresc."].includes($)?"":$,(isSpecialMark($)||isSpeedKeyword($)||isGradientWords($)||isRepeatWord($)||GRADIENT_SPEED_RESET_TAG)&&$){const q=(O=D.parentElement)==null?void 0:O.parentElement,G=q==null?void 0:q.parentElement,U=[...(G==null?void 0:G.childNodes)||[]],Z=q?U.indexOf(q):-1;if(q&&G&&Z>-1){const W=u.indexOf(G),K=M.getElementsByTagName("measure")[W];Array.from((K==null?void 0:K.getElementsByTagName("words"))||[]).reduce((Y,Q)=>{var he;return(he=Q.textContent)!=null&&he.includes($)&&Y++,Y},0)===0&&(["12280"].includes(r)?K==null||K.insertBefore(q.cloneNode(!0),K==null?void 0:K.childNodes[Z]):setElementNoteBefore(q,G,K))}}}),g.forEach(D=>{var U;const $=(U=D.parentElement)==null?void 0:U.parentElement,O=$==null?void 0:$.parentElement,q=[...(O==null?void 0:O.childNodes)||[]],G=$?q.indexOf($):-1;if($&&O&&G>-1){const Z=u.indexOf(O),W=M.getElementsByTagName("measure")[Z];["12280"].includes(r)?W==null||W.insertBefore($.cloneNode(!0),W==null?void 0:W.childNodes[G]):setElementNoteBefore($,O,W)}}),m.forEach(D=>{var q,G;const $=(q=D.parentElement)==null?void 0:q.parentElement,O=$==null?void 0:$.parentElement;if(O){const U=u.indexOf(O);(G=M.getElementsByTagName("measure")[U])==null||G.appendChild($.cloneNode(!0))}})}else d.forEach((V,D)=>{var O,q,G;const $=V.textContent||"";if(isSpeedKeyword($)&&$){const U=(q=(O=V.parentElement)==null?void 0:O.parentElement)==null?void 0:q.parentElement;if(U&&U.firstElementChild&&U.firstElementChild!==V){const Z=(G=V.parentElement)==null?void 0:G.parentElement,W=U.firstElementChild;U.insertBefore(Z,W)}}});if(M&&M.getAttribute("id")===B){const V=M.getElementsByTagName("barline"),D=(F=V[V.length-1])==null?void 0:F.parentElement;if(((k=D==null?void 0:D.lastElementChild)==null?void 0:k.tagName)!=="barline"){const $=(D==null?void 0:D.children)||[];for(let O of $)if(O.tagName==="barline"){D==null||D.appendChild(O);break}}}}),Array.from(o).forEach(M=>{var N;M&&M.getAttribute("id")!==B&&((N=M.parentNode)==null||N.removeChild(M))})}return new XMLSerializer().serializeToString(appoggianceFormate(s))},appoggianceFormate=i=>{var s,o,a,l;if(!i)return i;const e=i.querySelectorAll("grace");if(!e.length)return i;const r=u=>u.querySelector("grace")?r(u==null?void 0:u.nextElementSibling):u;for(let u of e){const c=(s=u.parentElement)==null?void 0:s.querySelector("notations");if(c&&c.querySelectorAll("slur").length>1){let d=r((o=u.parentElement)==null?void 0:o.nextElementSibling);if(d&&d.querySelectorAll("slur").length>0){const g=Array.from(((a=d.querySelector("notations"))==null?void 0:a.children)||[]).map(y=>y.getAttribute("number")),m=c.querySelectorAll("slur");for(let y of m)g.includes(y.getAttribute("number"))||(l=d.querySelector("notations"))==null||l.appendChild(y)}}}return i},formatXML=(i,e)=>{var c,d,g;if(!i)return"";const r=new DOMParser().parseFromString(i,"text/xml"),s=Array.from(r.getElementsByTagName("measure")),o=Array.from(r.querySelectorAll("repeat"));compatibleXmlPitchVoice(r),getComposer(r),parseXmlToRepeat(o),state$1.isEvxml&&(analyzeEvxml(r),customizationXml(r));let a=-1,l=-1,u=-1;for(const m of s){l===-1&&m.getElementsByTagName("beats").length&&(l=parseInt(m.getElementsByTagName("beats")[0].textContent||"4")),u===-1&&m.getElementsByTagName("beat-type").length&&(u=parseInt(m.getElementsByTagName("beat-type")[0].textContent||"4")),a===-1&&m.getElementsByTagName("per-minute").length&&(a=Number((c=m.getElementsByTagName("per-minute")[0])==null?void 0:c.textContent));const y=parseInt(((d=m.getElementsByTagName("divisions")[0])==null?void 0:d.textContent)||"256");m.getElementsByTagName("note").length&&state$1.isEvxml&&(Array.from(m.getElementsByTagName("note"))||[]).forEach(A=>{var E;A.getElementsByTagName("grace").length||(!A.getElementsByTagName("duration").length||A.getElementsByTagName("duration").length&&((E=A.getElementsByTagName("duration")[0])==null?void 0:E.textContent)==0)&&m.removeChild(A)});const b=new RegExp("[\\u4E00-\\u9FFF]+","g");if(m.getElementsByTagName("words").length&&state$1.isEvxml&&(Array.from(m.getElementsByTagName("words"))||[]).forEach(A=>{var E;A!=null&&A.textContent&&b.test(A==null?void 0:A.textContent)&&((E=A==null?void 0:A.parentNode)!=null&&E.parentNode)&&m.removeChild(A.parentNode.parentNode)}),m.getElementsByTagName("note").length===0){const S=(g=m.getElementsByTagName("forward")[0])==null?void 0:g.getElementsByTagName("duration")[0];S&&(S.textContent="0"),m.innerHTML=m.innerHTML+` ${y*l} 1 whole `}}return(!a||a==-1)&&(a=100),state$1.originSpeed||(state$1.originSpeed=state$1.speed=a||100),new XMLSerializer().serializeToString(r)},formateTimes=i=>{var Z,W,K,ye,ae,Y,Q,he,ge,Se,Ie,Me,te,oe,z,me,pe,ee,ne,fe,_e,Ae,Pe,Be,Re,xe,ce,Ee,de,De,Ne,Ue,Ye,$e,Ke,Qe,tt,ct,it,ot,bt,nt,ht;const e=customData.customNoteRealValue,r=customData.customNoteCurrentTime;state$1.examSongId+"",state$1.partIndex+"";let s=browserInfo.huawei?.08:0;const o=[],a=[],l=[],{originSpeed:u}=state$1;let c=0;const d=(ze,lt)=>{var we,ke,Ve,We,rt,mt;return["906"].includes(state$1.cbsExamSongId)?((we=lt.measures[0])==null?void 0:we.realKey)||ze:["782","784"].includes(state$1.cbsExamSongId)&&[14,16,30,32].includes((ke=lt.firstVerticalMeasure)==null?void 0:ke.measureNumber)?((Ve=o[o.length-1])==null?void 0:Ve.realKey)||ze:["900","901","640","641","739","740","800","801","773","774","869","872","714","715"].includes(state$1.cbsExamSongId)&&(((We=lt.firstVerticalMeasure)==null?void 0:We.measureNumber)===3||((rt=lt.firstVerticalMeasure)==null?void 0:rt.measureNumber)===9)&&((mt=lt.measures[0])==null?void 0:mt.realKey)||ze};if(!i.cursor)return[];const g=i.cursor.Iterator;console.time("音符跑完时间");let m=0,y=0,b=[],S=[],A=0,E=0,x=0,P="quarter",C,T,_=0,B=0,M=0,N=0,I=0,R=0;const F=[];state$1.gradualTimes&&console.log("后台设置的渐慢小节时间",state$1.gradual,state$1.gradualTimes);let k=g.currentTimeStamp.RealValue;const V=[];let D=!1,$=0,O=0;for(;!g.EndReached;){const ze=(Z=g.CurrentVoiceEntries)!=null&&Z[0]?[(W=g.CurrentVoiceEntries)==null?void 0:W[0]]:[];let lt=[],At=0;At=((K=g.currentMeasure)==null?void 0:K.verticalSourceStaffEntryContainers.length)||0,state$1.multitrack>0?lt=[...g.CurrentVoiceEntries]:lt=[...g.CurrentVoiceEntries].filter(ke=>{var Ve;return ke&&((Ve=ke==null?void 0:ke.ParentVoice)==null?void 0:Ve.VoiceId)!=1});let ie=0,le=!1,we=!1;if(lt.length&&!D){le=!0;let ke=[...g.CurrentVoiceEntries].reduce((Ve,We)=>(Ve.push(...We.Notes),Ve),[]);if(ke=ke.sort((Ve,We)=>{var rt,mt;return((rt=Ve==null?void 0:Ve.length)==null?void 0:rt.realValue)-((mt=We==null?void 0:We.length)==null?void 0:mt.realValue)}),ie=((ae=(ye=ke==null?void 0:ke[0])==null?void 0:ye.length)==null?void 0:ae.realValue)||0,state$1.multitrack>0&<.length===2){const Ve=((Q=(Y=ke[0])==null?void 0:Y.length)==null?void 0:Q.realValue)||0;$=(((ge=(he=ke[ke.length-1])==null?void 0:he.length)==null?void 0:ge.realValue)||0)-Ve,D=$!==0}}(Se=F[F.length-1])!=null&&Se.isDouble&&!lt.length&&(we=!0),state$1.multitrack>0&&!le&&D&&(le=!0,ie=$,D=!1,$=0),V.push(g.currentTimeStamp.realValue-k),k=g.currentTimeStamp.realValue;for(const ke of ze){let Ve=ke.notes[0];if(Ve.IsGraceNote&&(Ve=Ve.parentStaffEntry.voiceEntries.find(rt=>!rt.isGrace).notes[0]),Ve.fixedKey=Ve.ParentVoiceEntry.ParentVoice.Parent.SubInstruments[0].fixedKey||0,(Ie=Ve==null?void 0:Ve.voiceEntry)!=null&&Ie.isGrace){le=!0;let We=[...g.currentVoiceEntries].reduce((rt,mt)=>(rt.push(...mt.notes),rt),[]);We=We.sort((rt,mt)=>{var He,Et;return((He=mt==null?void 0:mt.length)==null?void 0:He.realValue)-((Et=rt==null?void 0:rt.length)==null?void 0:Et.realValue)}),ie=ie!=0?Math.min((te=(Me=We==null?void 0:We[0])==null?void 0:Me.length)==null?void 0:te.realValue,ie):(z=(oe=We==null?void 0:We[0])==null?void 0:oe.length)==null?void 0:z.realValue}state$1.multitrack>0&&ie>Ve.length.realValue&&(ie=Ve.length.realValue),Ve.maxNoteNum=At,F.push({note:Ve,iterator:{...g},currentTime:ie,isDouble:le,isMutileSubject:we,measuresTempoInBPM:(me=Ve==null?void 0:Ve.sourceMeasure)==null?void 0:me.tempoInBPM})}g.moveToNextVisibleVoiceEntry(!1),g.backJumpOccurred&&(O+=1),g.repeatIdx=O}const q=F.some(ze=>ze.measuresTempoInBPM!==F[0].measuresTempoInBPM);console.log("变速曲子",q,F);let G=[];for(let{note:ze,iterator:lt,currentTime:At,isDouble:ie,isMutileSubject:le}of F){if(ze){if(c!=((pe=ze==null?void 0:ze.sourceMeasure)==null?void 0:pe.MeasureNumberXML)&&(y=0),y===0&&c!=((ee=ze==null?void 0:ze.sourceMeasure)==null?void 0:ee.MeasureNumberXML)&&(c=(ne=ze==null?void 0:ze.sourceMeasure)==null?void 0:ne.MeasureNumberXML,l.push(ze.sourceMeasure)),y===0&&state$1.isSpecialBookCategory)for(const pt of(fe=ze.sourceMeasure)==null?void 0:fe.TempoExpressions)(_e=pt==null?void 0:pt.InstantaneousTempo)!=null&&_e.beatUnit&&(P=pt.InstantaneousTempo.beatUnit);I==((Ae=ze.sourceMeasure)==null?void 0:Ae.MeasureNumberXML)&&m!==0?N++:(I=(Pe=ze.sourceMeasure)==null?void 0:Pe.MeasureNumberXML,N=0);let we=ze.sourceMeasure.tempoInBPM;const{metronomeNoteIndex:ke}=lt.currentMeasure;ke!==0&&ke>y&&(we=((Be=o[o.length-1])==null?void 0:Be.speed)||100);let Ve=[];Ve=[(xe=(Re=ze.sourceMeasure)==null?void 0:Re.verticalMeasureList)==null?void 0:xe[0]];const{realValue:We}=lt.currentTimeStamp,{RealValue:rt,Denominator:mt}=formatDuration(lt.currentMeasure.activeTimeSignature,lt.currentMeasure.duration);let{wholeValue:He,numerator:Et,denominator:Ct,realValue:wt}=ze.length;e[m]&&(wt=e[m]),ie&&At>0&&At!=wt&&(wt=At),r&&le&&V[m+1]>0&&wt>V[m+1]&&(wt=V[m+1]);let H=E;state$1.isEvxml&&H0){const pt=state$1.gradual.find((et,Xe)=>{var Lt;const ft=state$1.gradual[Xe+1];return et[0].measureIndex<=be&&((Lt=et[1])==null?void 0:Lt.measureIndex)>=be&&(!ft||(ft==null?void 0:ft[0].measureIndex)!==be)}),[gt,st]=pt||[];if(gt&&st){const et=st.measureIndex-gt.measureIndex,Xe=gt.closedMeasureIndex==be&&y>=gt.noteInMeasureIndex,ft=st.closedMeasureIndex===be&&y0)){const pt=C[0]-(C[1]-C[0]),{resetXmlNoteIndex:gt,endXmlNoteIndex:st}=T,et=st;let Xe=(C[C.length-1]-pt)/et;if(Xe=ze.DotsXml?Xe/1.5:Xe,__&&(se=(Ee=o[m-1])==null?void 0:Ee.speed);ue=(state$1.isSpecialBookCategory?getTimeByBeatUnit(P,se,lt.currentMeasure.activeTimeSignature.Denominator):u)||1;const ft=!(__);_++,ft&&(_=0,T=void 0,C=void 0,S=[])}const ve=wt;let Ce=J||Math.min(rt,wt)*formatBeatUnit(P)*(60/ue);const Le=rt*mt*(60/ue);["1788501975122489346","1788502467554750466"].includes(state$1.cbsExamSongId)&&(m==13&&(Ce=Ce/2),m==44&&(Ce=Ce*6),m==56&&(Ce=Ce*4)),E+=Ce,x+=Ce;let Oe=Ce+H;const Ze=ze.fixedKey||0,je=(De=(de=Ve[0])==null?void 0:de.vfVoices["1"])==null?void 0:De.tickables[N];if(o.length&&o[o.length-1].relativeTime===H)continue;if(m===0&&!state$1.isAppPlay){let pt=0;(((Ue=(Ne=ze.sourceMeasure.verticalMeasureList)==null?void 0:Ne[0])==null?void 0:Ue.staffEntries)||[]).forEach(st=>{var et,Xe,ft,Lt,kt,Tt;(Tt=(kt=(Lt=(ft=(Xe=(et=st==null?void 0:st.sourceStaffEntry)==null?void 0:et.voiceEntries)==null?void 0:Xe[0])==null?void 0:ft.notes)==null?void 0:Lt[0])==null?void 0:kt.length)!=null&&Tt.realValue&&(pt+=st.sourceStaffEntry.voiceEntries[0].notes[0].length.realValue)}),pt0&&(s+=A,state$1.fixtime=s),state$1.isEvxml&&(s=state$1.evXmlBeginTime?state$1.evXmlBeginTime:s,state$1.fixtime=s),console.log("节拍器时间",s,state$1.evXmlBeginTime)}let ut=(Ye=Ve[0])==null?void 0:Ye.stave;ze.sourceMeasure.multipleRestMeasures&&(B=ze.sourceMeasure.multipleRestMeasures,M=0),Mgt===(je==null?void 0:je.attrs.id)))==null?void 0:Ke.length)||0;Ge=(Qe=ze==null?void 0:ze.noteTimeInfo[pt])==null?void 0:Qe.begin,dt=(tt=ze==null?void 0:ze.noteTimeInfo[pt])==null?void 0:tt.end,Ge&&(H=Ge-s)}je!=null&&je.attrs.id&&G.push(je==null?void 0:je.attrs.id);const vt={isStaccato:ze.voiceEntry.isStaccato(),isRestFlag:ze.isRestFlag,noteId:ze.NoteToGraphicalNoteObjectId,measureListIndex:ze.sourceMeasure.measureListIndex,MeasureNumberXML:ze.sourceMeasure.MeasureNumberXML,_noteLength:ve,svgElement:je,frequency:((ct=ze==null?void 0:ze.pitch)==null?void 0:ct.frequency)||-1,nextFrequency:((it=ze==null?void 0:ze.pitch)==null?void 0:it.nextFrequency)||-1,prevFrequency:((ot=ze==null?void 0:ze.pitch)==null?void 0:ot.prevFrequency)||-1,difftime:A,octaveOffset:(bt=Ve[0])==null?void 0:bt.octaveOffset,speed:se,beatSpeed:ue,i:m,si:y,stepSpeeds:S,measureOpenIndex:l.length-1,measures:b,tempoInBPM:ze.sourceMeasure.tempoInBPM,measureLength:Le,relaMeasureLength:x,id:je==null?void 0:je.attrs.id,note:ze.halfTone+12,fixtime:s,relativeTime:retain(H),time:state$1.isEvxml&&Ge?retain(Ge):retain(H+s),endtime:state$1.isEvxml&&dt?retain(dt):retain(Oe+s),relaEndtime:retain(Oe),realValue:We,halfTone:ze.halfTone,noteElement:ze,fixedKey:Ze,realKey:0,duration:0,formatLyricsEntries:formatLyricsEntries(ze),stave:ut,firstVerticalMeasure:Ve[0],noteLength:1,osdmContext:i,speedbeatUnit:P,multipleRestMeasures:M,totalMultipleRestMeasures:B,measureSpeed:we,maxNoteNum:ze.maxNoteNum,repeatIdx:lt.repeatIdx||0};if(state$1.isEvxml&&vt.repeatIdx&&vt.i>0&&vt.MeasureNumberXML===1&&vt.noteId===0){const pt=state$1.evXmlBeginArr[vt.repeatIdx]||0;vt.time=vt.time+pt,vt.endtime=vt.endtime+pt,E=E+pt,H=H+pt}vt.realKey=d(ze.halfTone-Ze*12,vt),vt.duration=vt.endtime-vt.time;let It=((ht=(nt=Ve[0])==null?void 0:nt.vfVoices["1"])==null?void 0:ht.tickables)||[];[121].includes(state$1.subjectId)&&(It=ze.sourceMeasure.verticalSourceStaffEntryContainers),It=It.filter(pt=>{var gt;return((gt=pt.attrs)==null?void 0:gt.type)!=="GhostNote"});const Bt=state$1.isCombineRender&&ze.maxNoteNum?ze.maxNoteNum:It.length;vt.noteLength=Bt||1,o.push(vt),a.push(vt.id),b.push(vt),yze.relativeTime-lt.relativeTime).map((ze,lt)=>({...ze,i:lt}));console.timeEnd("音符跑完时间");try{i.cursor.reset()}catch(ze){}return state$1.activeMeasureIndex=U[0].MeasureNumberXML,U},getNoteByMeasuresSlursStart=i=>{let e=i,r;if(i.noteElement.tie&&i.noteElement.tie.StartNote&&(r=i.noteElement.tie.StartNote),e&&r&&r!==e.noteElement){const s=[];for(const o of state$1.times)r===o.noteElement&&s.push(o);if(s.length)return s.find(o=>o.i===i.i-1)||s[0]}return e},getComposer=i=>{var r,s;const e=Array.from(i.querySelectorAll("creator"));for(const o of e)o&&o.getAttribute("type")==="composer"&&!state$1.musicComposer&&(state$1.musicComposer=((r=o.textContent)==null?void 0:r.trim())||""),o&&o.getAttribute("type")==="lyricist"&&!state$1.musicLyricist&&(state$1.musicLyricist=((s=o.textContent)==null?void 0:s.trim())||"")},parseXmlToRepeat=i=>{if(!i.length)return;let e=[],r=0,s=0;for(let o=0;o{let r=-1;if(state$1.repeatInfo.length){for(let s=state$1.repeatInfo.length-1;s>=0;s--){const{start:o,end:a}=state$1.repeatInfo[s];if(i<=o&&e>=a)return r=s,{repeatIdx:r,canRepeat:!0}}return{repeatIdx:r,canRepeat:!1}}else return{repeatIdx:r,canRepeat:!1}},customizationXml=i=>{var u,c;const e=Array.from(i.querySelectorAll("credit")),r=Array.from(i.querySelectorAll("creator")),s=Array.from(i.querySelectorAll("grace")),o=Array.from(i.getElementsByTagName("measure")),a=Array.from(i.getElementsByTagName("note"));let l=0;if(a&&a.length)for(const d of a)lS.getAttribute("segno")==="segno");!g&&m&&b&&d.parentNode.removeChild(d)}if(l>1&&!(i.querySelectorAll("repeat").length>0)){const g=o.last();if(g.getElementsByTagName("barline").length){const m=g.getElementsByTagName("barline")[0];m.innerHTML=m.innerHTML+''}else g.innerHTML=g.innerHTML+` light-heavy `}},analyzeEvxml=(i,e)=>{var c,d,g,m,y,b,S,A,E,x,P,C,T,_,B,M,N,I,R;const r=(g=(d=(c=i.getElementsByTagName("timegap")[0])==null?void 0:c.getElementsByTagName("values")[0])==null?void 0:d.getElementsByTagName("item")[0])==null?void 0:g.getAttribute("num"),s=(b=(y=(m=i.getElementsByTagName("timegap")[0])==null?void 0:m.getElementsByTagName("values")[0])==null?void 0:y.getElementsByTagName("item")[0])==null?void 0:b.getAttribute("den"),o=(E=(A=(S=i.getElementsByTagName("timegap")[0])==null?void 0:S.getElementsByTagName("values")[0])==null?void 0:A.getElementsByTagName("item")[1])==null?void 0:E.getAttribute("num"),a=(C=(P=(x=i.getElementsByTagName("timegap")[0])==null?void 0:x.getElementsByTagName("values")[0])==null?void 0:P.getElementsByTagName("item")[1])==null?void 0:C.getAttribute("den"),l=(T=i.getElementsByTagName("timegap"))!=null&&T.length?Array.from((N=(M=(B=(_=i.getElementsByTagName("timegap"))==null?void 0:_[0])==null?void 0:B.getElementsByTagName("values"))==null?void 0:M[0])==null?void 0:N.getElementsByTagName("item")):[],u=i.getElementsByTagName("measure")[0];if(u){const F=(R=(I=u.getElementsByTagName("times")[0])==null?void 0:I.getElementsByTagName("time")[0])==null?void 0:R.getAttribute("begin");state$1.evXmlBeginTime=F?F/1e3:r?60/state$1.originSpeed*r*4/s:0,state$1.secondEvXmlBeginTime=F?0:o?60/state$1.originSpeed*o*4/a:0;const k=i.getElementsByTagName("timegap").length>0,V=i.getElementsByTagName("times").length>0;if(l&&l.length&&!F)for(const D of l){const $=D==null?void 0:D.getAttribute("num"),O=D==null?void 0:D.getAttribute("den"),q=$?60/state$1.originSpeed*$*4/O:0;state$1.evXmlBeginArr.push(q)}console.log("🚀 ~ evxml解析","有timegap:",k,"有times:",V,"timegap集合",state$1.evXmlBeginArr,"第一个timegap",state$1.evXmlBeginTime)}},compatibleXmlPitchVoice=i=>{var s,o,a;if(Array.from(i.getElementsByTagName("part-name")).filter(l=>{var u;return((u=l==null?void 0:l.textContent)==null?void 0:u.trim().toLocaleUpperCase())!=="COMMON"}).length==1){const u=((a=(o=(s=(Array.from(i.getElementsByTagName("instrument-name"))||[])[0])==null?void 0:s.textContent)==null?void 0:o.trim())==null?void 0:a.toLocaleLowerCase())||"";let c=!1;switch(state$1.musicalCodeId){case 37:case 38:c=!!(!u||u.includes("solo")||u.includes("tenor recorder"));break;case 33:c=!!(!u||u.includes("solo")||u.includes("panpipes"));break;case 34:c=!!(!u||u.includes("solo")||u.includes("ocarina"));break;case 35:c=!!(!u||u.includes("solo")||u.includes("woodwind"));break;case 39:c=!!(!u||u.includes("solo")||u.includes("whistling"));break;default:c=!!(!u||u.includes("solo"));break}window.xmlNeedAdjustVoice=c}},Notfind=defineComponent({name:"notfund",render(){return createVNode(Empty,{image:"error",description:this.$route.path+" 路径不存在"},{default:()=>[createVNode(Button$1,{type:"primary",onClick:()=>this.$router.replace("/")},{default:()=>[createTextVNode("返回首页")]})]})}});export{store_legacy as $,Swipe as A,SwipeItem as B,Popup as C,handleEndSoundCheck as D,handleViewReport as E,Fragment as F,handleStartEvaluat as G,api_videoUpdate as H,Icon$1 as I,api_proxyServiceMessage as J,connectWebsocket as K,getNoteByMeasuresSlursStart as L,useClickAway as M,NoticeBar as N,Button$1 as O,Progress as P,Slider as Q,RouterView as R,Snackbar$1 as S,TheError as T,handleSetSpeed as U,Tabs as V,Tab as W,Cell as X,Switch$1 as Y,api_openCamera as Z,api_closeCamera as _,setBehaviorId as a,getToken as a$,toRefs as a0,getInstrumentName as a1,Picker as a2,List$1 as a3,isVNode as a4,api_cloudDestroy as a5,postMessage$1 as a6,useRoute$1 as a7,showLoadingToast as a8,request$1$1 as a9,subjectFingering as aA,formateTimes as aB,Metronome as aC,getStorageSpeed as aD,nextTick as aE,api_cloudLoading as aF,addMeasureScore as aG,createRouter as aH,createWebHashHistory as aI,Notfind as aJ,setStoreData as aK,createApp as aL,Vue3Lottie as aM,api_savePicture as aN,musicRenderTypeKey as aO,resetRenderMusicScore as aP,getAudioCurrentTime as aQ,handleRessetState as aR,toggleFollow as aS,handleFollowStart as aT,handleFollowEnd as aU,api_setEventTracking as aV,Tick as aW,FollowPractice as aX,handleInitTick as aY,promisefiyPostMessage as aZ,api_setCache as a_,closeToast as aa,getBehaviorId as ab,getCampId as ac,onUnmounted as ad,handleChangeSection as ae,togglePlay as af,Circle as ag,metronomeData as ah,handleResetPlay as ai,Badge as aj,api_back as ak,useRouter as al,Field as am,getSecondRPM as an,customData as ao,setGlobalData as ap,api_setStatusBarVisibility as aq,onBeforeUnmount as ar,Skeleton as as,Transition as at,MusicScore as au,AudioList as av,Evaluating as aw,isSpecialShapedScreen as ax,mappingVoicePart as ay,isRhythmicExercises as az,setCampId as b,ToggleMusicSheet as b$,followData as b0,api_suspendPlay as b1,hanldeDirectSelection as b2,showDialog as b3,api_openWebView as b4,musicscoresettingKey as b5,createNamespace$1 as b6,useChildren$1 as b7,useCustomFieldValue as b8,numericProp as b9,api_getToken as bA,studentQueryUserInfo as bB,debounce as bC,getAudioDuration as bD,api_musicPracticeRecordSave as bE,defineAsyncComponent as bF,__vitePreload as bG,headTopData as bH,api_getDeviceDelay as bI,checkUseEarphone as bJ,resetPlaybackToStart as bK,api_openAdjustRecording as bL,startCheckDelay as bM,api_musicPracticeRecordVideoUpload as bN,IPlatform as bO,PcEndIcon as bP,getGuidance as bQ,setGuidance as bR,usePageVisibility as bS,toRef as bT,getFingeringConfig as bU,api_subjectList as bV,howler as bW,smoothAnimationState as bX,api_keepScreenLongLight as bY,getMusicDetail as bZ,HeaderTop as b_,unknownProp as ba,withInstall as bb,makeStringProp as bc,extend$2 as bd,makeRequiredProp as be,truthProp as bf,addUnit as bg,useParent$1 as bh,pick$1 as bi,mergeProps as bj,watchEffect as bk,makeArrayProp as bl,inBrowser$2 as bm,BORDER_BOTTOM as bn,defineListenerProp as bo,useZIndex as bp,useTeleport as bq,useLock as br,useRouteListener as bs,Teleport as bt,call as bu,withDirectives as bv,createNamespace as bw,vShow as bx,Comment as by,Text as bz,onMounted as c,WorkIndex as c0,isMusicList as c1,TheMusicList as c2,setCustomGradual as c3,setCustomNoteRealValue as c4,addNoteBBox as c5,initSmoothAnimation as c6,initMidi as c7,evaluatCreateMusicPlayer as c8,api_setRequestedOrientation as c9,commonjsGlobal as ca,EnumMusicRenderType as cb,moveGracePosition as cc,api_musicPracticeRecordDetail as cd,sendResult as ce,addCheckPlayEnd as cf,removeResult as cg,removeCheckPlayEnd as ch,api_toggleTune as ci,getEarphone as cj,defineComponent as d,computed as e,storeData as f,getQuery as g,createVNode 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};