diff --git "a/dist/assets/ScoreEncoder-5776d117.js" "b/dist/assets/ScoreEncoder-5776d117.js" new file mode 100644--- /dev/null +++ "b/dist/assets/ScoreEncoder-5776d117.js" @@ -0,0 +1,35 @@ +import{r as ru,ao as nu,g as iu,k as R,j as D,R as su}from"./umi-9940633e.js";import"./parser-9472c317.js";import{W as lu,a as I,b as ou,E as un,A as We}from"./index-1a249a16.js";const Ol=lu/4,uu=40;var Il={exports:{}},nr={},Cl={exports:{}},F={};/** + * @license React + * scheduler-unstable_mock.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function ni(e,t){var r=e.length;e.push(t);e:for(;0>>1,s=e[n];if(0>>1;nvr(o,r))uvr(f,o)?(e[n]=f,e[u]=r,n=u):(e[n]=o,e[l]=r,n=l);else if(uvr(f,r))e[n]=f,e[u]=r,n=u;else break e}}return t}function vr(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}var Pe=[],He=[],au=1,me=null,te=3,Ir=!1,pt=!1,Jt=!1,ce=0,re=null,Be=null,tt=-1,ye=null,Mt=-1,Pt=!1,he=!1,Kr=!1,ii=!1,ji=!1;function si(e){for(var t=Ee(He);t!==null;){if(t.callback===null)Or(He);else if(t.startTime<=e)Or(He),t.sortIndex=t.expirationTime,ni(Pe,t);else break;t=Ee(He)}}function ki(e){if(Jt=!1,si(e),!pt)if(Ee(Pe)!==null)pt=!0,re=Ri;else{var t=Ee(He);t!==null&&(e=t.startTime-e,Be=ki,tt=ce+e)}}function Ri(e,t){pt=!1,Jt&&(Jt=!1,Be=null,tt=-1),Ir=!0;var r=te;try{for(si(t),me=Ee(Pe);me!==null&&(!(me.expirationTime>t)||e&&!Pl());){var n=me.callback;if(typeof n=="function"){me.callback=null,te=me.priorityLevel;var s=n(me.expirationTime<=t);t=ce,typeof s=="function"?me.callback=s:me===Ee(Pe)&&Or(Pe),si(t)}else Or(Pe);me=Ee(Pe)}if(me!==null)var i=!0;else{var l=Ee(He);if(l!==null){var o=l.startTime-t;Be=ki,tt=ce+o}i=!1}return i}finally{me=null,te=r,Ir=!1}}function Pl(){return Mt===0&&ye===null||Mt!==-1&&ye!==null&&ye.length>=Mt||ii&&Kr?Pt=!0:!1}function jl(){if(he)throw Error("Already flushing work.");if(re!==null){var e=re;he=!0;try{var t=!0;do t=e(!0,ce);while(t);return t||(re=null),!0}finally{he=!1}}else return!1}F.reset=function(){if(he)throw Error("Cannot reset while already flushing work.");ce=0,Be=re=null,tt=-1,ye=null,Mt=-1,Kr=he=Pt=!1};F.unstable_IdlePriority=5;F.unstable_ImmediatePriority=1;F.unstable_LowPriority=4;F.unstable_NormalPriority=3;F.unstable_Profiling=null;F.unstable_UserBlockingPriority=2;F.unstable_advanceTime=function(e){console.log.name==="disabledLog"||ji||(ce+=e,Be!==null&&tt<=ce&&(Be(ce),tt=-1,Be=null))};F.unstable_cancelCallback=function(e){e.callback=null};F.unstable_clearYields=function(){if(ye===null)return[];var e=ye;return ye=null,e};F.unstable_continueExecution=function(){pt||Ir||(pt=!0,re=Ri)};F.unstable_flushAll=function(){if(ye!==null)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");if(jl(),ye!==null)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])")};F.unstable_flushAllWithoutAsserting=jl;F.unstable_flushExpired=function(){if(he)throw Error("Already flushing work.");if(re!==null){he=!0;try{re(!1,ce)||(re=null)}finally{he=!1}}};F.unstable_flushNumberOfYields=function(e){if(he)throw Error("Already flushing work.");if(re!==null){var t=re;Mt=e,he=!0;try{e=!0;do e=t(!0,ce);while(e&&!Pt);e||(re=null)}finally{Mt=-1,he=Pt=!1}}};F.unstable_flushUntilNextPaint=function(){if(he)throw Error("Already flushing work.");if(re!==null){var e=re;ii=!0,Kr=!1,he=!0;try{var t=!0;do t=e(!0,ce);while(t&&!Pt);t||(re=null)}finally{he=Pt=ii=!1}}};F.unstable_forceFrameRate=function(){};F.unstable_getCurrentPriorityLevel=function(){return te};F.unstable_getFirstCallbackNode=function(){return Ee(Pe)};F.unstable_next=function(e){switch(te){case 1:case 2:case 3:var t=3;break;default:t=te}var r=te;te=t;try{return e()}finally{te=r}};F.unstable_now=function(){return ce};F.unstable_pauseExecution=function(){};F.unstable_requestPaint=function(){Kr=!0};F.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=te;te=e;try{return t()}finally{te=r}};F.unstable_scheduleCallback=function(e,t,r){var n=ce;switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0n?(e.sortIndex=r,ni(He,e),Ee(Pe)===null&&e===Ee(He)&&(Jt?(Be=null,tt=-1):Jt=!0,Be=ki,tt=ce+(r-n))):(e.sortIndex=s,ni(Pe,e),pt||Ir||(pt=!0,re=Ri)),e};F.unstable_setDisableYieldValue=function(e){ji=e};F.unstable_shouldYield=Pl;F.unstable_wrapCallback=function(e){var t=te;return function(){var r=te;te=t;try{return e.apply(this,arguments)}finally{te=r}}};F.unstable_yieldValue=function(e){console.log.name==="disabledLog"||ji||(ye===null?ye=[e]:ye.push(e))};Cl.exports=F;var cu=Cl.exports;/** + * @license React + * react-test-renderer.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kl=ru,Rl=cu,be=nu;function Ds(e,t){for(var r=0;r>>=0,e===0?32:31-(vu(e)/wu|0)|0}var ar=64,cr=4194304;function hr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pr(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,l=r&268435455;if(l!==0){var o=l&~s;o!==0?n=hr(o):(i&=l,i!==0&&(n=hr(i)))}else l=r&~s,l!==0?n=hr(l):i!==0&&(n=hr(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Zr(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=r}function Tu(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0o||s[l]!==i[o]){var u=` +`+s[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=o);break}}}finally{hn=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Qt(e):""}var Lu=Object.prototype.hasOwnProperty,fi=[],Et=-1;function it(e){return{current:e}}function B(e){0>Et||(e.current=fi[Et],fi[Et]=null,Et--)}function z(e,t){Et++,fi[Et]=e.current,e.current=t}var rt={},ne=it(rt),de=it(!1),mt=rt;function jt(e,t){var r=e.type.contextTypes;if(!r)return rt;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function fe(e){return e=e.childContextTypes,e!=null}function kr(){B(de),B(ne)}function Os(e,t,r){if(ne.current!==rt)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");z(ne,t),z(de,r)}function Vl(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error((du(e)||"Unknown")+'.getChildContext(): key "'+s+'" is not defined in childContextTypes.');return ct({},r,n)}function Rr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rt,mt=ne.current,z(ne,e),z(de,de.current),!0}function Is(e,t,r){var n=e.stateNode;if(!n)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");r?(e=Vl(e,t,mt),n.__reactInternalMemoizedMergedChildContext=e,B(de),B(ne),z(ne,e)):B(de),z(de,r)}function Mu(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Le=typeof Object.is=="function"?Object.is:Mu,ge=null,Gr=!1,fn=!1;function wt(){if(!fn&&ge!==null){fn=!0;var e=0,t=K;try{var r=ge;for(K=1;eh?(S=T,T=null):S=T.sibling;var E=x(y,T,w[h],a);if(E===null){T===null&&(T=S);break}e&&T&&E.alternate===null&&t(y,T),d=i(E,d,h),m===null?p=E:m.sibling=E,m=E,T=S}if(h===w.length)return r(y,T),p;if(T===null){for(;hh?(S=T,T=null):S=T.sibling;var O=x(y,T,E.value,a);if(O===null){T===null&&(T=S);break}e&&T&&O.alternate===null&&t(y,T),d=i(O,d,h),m===null?p=O:m.sibling=O,m=O,T=S}if(E.done)return r(y,T),p;if(T===null){for(;!E.done;h++,E=w.next())E=v(y,E.value,a),E!==null&&(d=i(E,d,h),m===null?p=E:m.sibling=E,m=E);return p}for(T=n(y,T);!E.done;h++,E=w.next())E=N(T,y,h,E.value,a),E!==null&&(e&&E.alternate!==null&&T.delete(E.key===null?h:E.key),d=i(E,d,h),m===null?p=E:m.sibling=E,m=E);return e&&T.forEach(function(C){return t(y,C)}),p}function P(y,d,w,a){if(typeof w=="object"&&w!==null&&w.type===Dt&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ur:e:{for(var p=w.key,m=d;m!==null;){if(m.key===p){if(p=w.type,p===Dt){if(m.tag===7){r(y,m.sibling),d=s(m,w.props.children),d.return=y,y=d;break e}}else if(m.elementType===p||typeof p=="object"&&p!==null&&p.$$typeof===Ve&&js(p)===m.type){r(y,m.sibling),d=s(m,w.props),d.ref=bt(y,m,w),d.return=y,y=d;break e}r(y,m);break}else t(y,m);m=m.sibling}w.type===Dt?(d=ft(w.props.children,y.mode,a,w.key),d.return=y,y=d):(a=Nr(w.type,w.key,w.props,null,y.mode,a),a.ref=bt(y,d,w),a.return=y,y=a)}return l(y);case Wt:e:{for(m=w.key;d!==null;){if(d.key===m)if(d.tag===4&&d.stateNode.containerInfo===w.containerInfo&&d.stateNode.implementation===w.implementation){r(y,d.sibling),d=s(d,w.children||[]),d.return=y,y=d;break e}else{r(y,d);break}else t(y,d);d=d.sibling}d=Tn(w,y.mode,a),d.return=y,y=d}return l(y);case Ve:return m=w._init,P(y,d,m(w._payload),a)}if(Vt(w))return g(y,d,w,a);if(_t(w))return L(y,d,w,a);pr(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,d!==null&&d.tag===6?(r(y,d.sibling),d=s(d,w),d.return=y,y=d):(r(y,d),d=Sn(w,y.mode,a),d.return=y,y=d),l(y)):r(y,d)}return P}var kt=Ql(!0),Cu=Ql(!1),Fr=it(null),zr=null,Nt=null,bi=null;function Ai(){bi=Nt=zr=null}function Ui(e){var t=Fr.current;B(Fr),e._currentValue2=t}function pi(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ot(e,t){zr=e,bi=Nt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ae=!0),e.firstContext=null)}function xe(e){var t=e._currentValue2;if(bi!==e)if(e={context:e,memoizedValue:t,next:null},Nt===null){if(zr===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Nt=e,zr.dependencies={lanes:0,firstContext:e}}else Nt=Nt.next=e;return t}var ut=null;function qi(e){ut===null?ut=[e]:ut.push(e)}function $l(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,qi(t)):(r.next=s.next,s.next=r),t.interleaved=r,Rt(e,n)}function Rt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Qe=!1;function Wi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ye(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ht(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,X&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Rt(e,r)}return s=n.interleaved,s===null?(t.next=t,qi(n)):(t.next=s.next,s.next=t),n.interleaved=t,Rt(e,r)}function wr(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Al(e,r)}}function ks(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var l={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=l:i=i.next=l,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Br(e,t,r,n){var s=e.updateQueue;Qe=!1;var i=s.firstBaseUpdate,l=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,f=u.next;u.next=null,l===null?i=f:l.next=f,l=u;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==l&&(o===null?c.firstBaseUpdate=f:o.next=f,c.lastBaseUpdate=u))}if(i!==null){var v=s.baseState;l=0,c=f=u=null,o=i;do{var x=o.lane,N=o.eventTime;if((n&x)===x){c!==null&&(c=c.next={eventTime:N,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,L=o;switch(x=t,N=r,L.tag){case 1:if(g=L.payload,typeof g=="function"){v=g.call(N,v,x);break e}v=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=L.payload,x=typeof g=="function"?g.call(N,v,x):g,x==null)break e;v=ct({},v,x);break e;case 2:Qe=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[o]:x.push(o))}else N={eventTime:N,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(f=c=N,u=v):c=c.next=N,l|=x;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;x=o,o=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(1);if(c===null&&(u=v),s.baseState=u,s.firstBaseUpdate=f,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do l|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);yt|=l,e.lanes=l,e.memoizedState=v}}function Rs(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=gn.transition;gn.transition={};try{e(!1),t()}finally{K=r,gn.transition=n}}function ho(){return Se().memoizedState}function ku(e,t,r){var n=It(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},fo(e))po(t,r);else if(r=$l(e,t,r,n),r!==null){var s=Ne();Ge(r,e,n,s),mo(r,t,n)}}function Ru(e,t,r){var n=It(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(fo(e))po(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,r);if(s.hasEagerState=!0,s.eagerState=o,Le(o,l)){var u=t.interleaved;u===null?(s.next=s,qi(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}r=$l(e,t,s,n),r!==null&&(s=Ne(),Ge(r,e,n,s),mo(r,t,n))}}function fo(e){var t=e.alternate;return e===U||t!==null&&t===U}function po(e,t){$t=br=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function mo(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Al(e,r)}}var Ar={readContext:xe,useCallback:G,useContext:G,useEffect:G,useImperativeHandle:G,useInsertionEffect:G,useLayoutEffect:G,useMemo:G,useReducer:G,useRef:G,useState:G,useDebugValue:G,useDeferredValue:G,useTransition:G,useMutableSource:G,useSyncExternalStore:G,useId:G,unstable_isNewReconciler:!1},Xu={readContext:xe,useCallback:function(e,t){return Ce().memoizedState=[e,t===void 0?null:t],e},useContext:xe,useEffect:Fs,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Sr(4,4,lo.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Sr(4,4,e,t)},useInsertionEffect:function(e,t){return Sr(4,2,e,t)},useMemo:function(e,t){var r=Ce();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ce();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=ku.bind(null,U,e),[n.memoizedState,e]},useRef:function(e){var t=Ce();return e={current:e},t.memoizedState=e},useState:Xs,useDebugValue:Yi,useDeferredValue:function(e){return Ce().memoizedState=e},useTransition:function(){var e=Xs(!1),t=e[0];return e=ju.bind(null,e[1]),Ce().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t){var r=U,n=Ce(),s=t();if(Y===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");gt&30||Zl(r,t,s),n.memoizedState=s;var i={value:s,getSnapshot:t};return n.queue=i,Fs(eo.bind(null,r,i,e),[e]),r.flags|=2048,er(9,Gl.bind(null,r,i,s,t),void 0,null),s},useId:function(){var e=Ce(),t=Y.identifierPrefix,r=Pu++;return t=":"+t+"r"+r.toString(32)+":",e.memoizedState=t},unstable_isNewReconciler:!1},Fu={readContext:xe,useCallback:uo,useContext:xe,useEffect:Ji,useImperativeHandle:oo,useInsertionEffect:io,useLayoutEffect:so,useMemo:ao,useReducer:yn,useRef:no,useState:function(){return yn(Gt)},useDebugValue:Yi,useDeferredValue:function(e){var t=Se();return co(t,Q.memoizedState,e)},useTransition:function(){var e=yn(Gt)[0],t=Se().memoizedState;return[e,t]},useMutableSource:Jl,useSyncExternalStore:Yl,useId:ho,unstable_isNewReconciler:!1},zu={readContext:xe,useCallback:uo,useContext:xe,useEffect:Ji,useImperativeHandle:oo,useInsertionEffect:io,useLayoutEffect:so,useMemo:ao,useReducer:vn,useRef:no,useState:function(){return vn(Gt)},useDebugValue:Yi,useDeferredValue:function(e){var t=Se();return Q===null?t.memoizedState=e:co(t,Q.memoizedState,e)},useTransition:function(){var e=vn(Gt)[0],t=Se().memoizedState;return[e,t]},useMutableSource:Jl,useSyncExternalStore:Yl,useId:ho,unstable_isNewReconciler:!1};function De(e,t){if(e&&e.defaultProps){t=ct({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function mi(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ct({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var tn={isMounted:function(e){return(e=e._reactInternals)?Jr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ne(),s=It(e),i=Ye(n,s);i.payload=t,r!=null&&(i.callback=r),t=ht(e,i,s),t!==null&&(Ge(t,e,s,n),wr(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ne(),s=It(e),i=Ye(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=ht(e,i,s),t!==null&&(Ge(t,e,s,n),wr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ne(),n=It(e),s=Ye(r,n);s.tag=2,t!=null&&(s.callback=t),t=ht(e,s,n),t!==null&&(Ge(t,e,n,r),wr(t,e,n))}};function zs(e,t,r,n,s,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,l):t.prototype&&t.prototype.isPureReactComponent?!Xr(r,n)||!Xr(s,i):!0}function go(e,t,r){var n=!1,s=rt,i=t.contextType;return typeof i=="object"&&i!==null?i=xe(i):(s=fe(t)?mt:ne.current,n=t.contextTypes,i=(n=n!=null)?jt(e,s):rt),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=tn,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Bs(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&tn.enqueueReplaceState(t,t.state,null)}function gi(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Wi(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=xe(i):(i=fe(t)?mt:ne.current,s.context=jt(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(mi(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&tn.enqueueReplaceState(s,s.state,null),Br(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4)}function Zi(e,t){try{var r="",n=t;do r+=Iu(n),n=n.return;while(n);var s=r}catch(i){s=` +Error generating stack: `+i.message+` +`+i.stack}return{value:e,source:t,stack:s,digest:null}}function wn(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function yi(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Bu=typeof WeakMap=="function"?WeakMap:Map;function yo(e,t,r){r=Ye(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Vr||(Vr=!0,Li=n),yi(e,t)},r}function vo(e,t,r){r=Ye(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){yi(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){yi(e,t),typeof n!="function"&&(Ze===null?Ze=new Set([this]):Ze.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),r}function _s(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Bu;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=Gu.bind(null,e,t,r),t.then(e,e))}var _u=nt.ReactCurrentOwner,ae=!1;function le(e,t,r,n){t.child=e===null?Cu(t,null,r,n):kt(t,e.child,r,n)}function bs(e,t,r,n,s){r=r.render;var i=t.ref;return Ot(t,s),n=Ki(e,t,r,n,i,s),e!==null&&!ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_e(e,t,s)):(t.flags|=1,le(e,t,n,s),t.child)}function As(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!ls(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,wo(e,t,i,n,s)):(e=Nr(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var l=i.memoizedProps;if(r=r.compare,r=r!==null?r:Xr,r(l,n)&&e.ref===t.ref)return _e(e,t,s)}return t.flags|=1,e=et(i,n),e.ref=t.ref,e.return=t,t.child=e}function wo(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Xr(i,n)&&e.ref===t.ref)if(ae=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(ae=!0);else return t.lanes=e.lanes,_e(e,t,s)}return vi(e,t,r,n,s)}function xo(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},z(Lt,pe),pe|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,z(Lt,pe),pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,z(Lt,pe),pe|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,z(Lt,pe),pe|=n;return le(e,t,s,r),t.child}function So(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512)}function vi(e,t,r,n,s){var i=fe(r)?mt:ne.current;return i=jt(t,i),Ot(t,s),r=Ki(e,t,r,n,i,s),e!==null&&!ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_e(e,t,s)):(t.flags|=1,le(e,t,r,s),t.child)}function Us(e,t,r,n,s){if(fe(r)){var i=!0;Rr(t)}else i=!1;if(Ot(t,s),t.stateNode===null)Tr(e,t),go(t,r,n),gi(t,r,n,s),n=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var u=l.context,f=r.contextType;typeof f=="object"&&f!==null?f=xe(f):(f=fe(r)?mt:ne.current,f=jt(t,f));var c=r.getDerivedStateFromProps,v=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";v||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==n||u!==f)&&Bs(t,l,n,f),Qe=!1;var x=t.memoizedState;l.state=x,Br(t,n,l,s),u=t.memoizedState,o!==n||x!==u||de.current||Qe?(typeof c=="function"&&(mi(t,r,c,n),u=t.memoizedState),(o=Qe||zs(t,r,o,n,x,u,f))?(v||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4)):(typeof l.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=n,t.memoizedState=u),l.props=n,l.state=u,l.context=f,n=o):(typeof l.componentDidMount=="function"&&(t.flags|=4),n=!1)}else{l=t.stateNode,Hl(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:De(t.type,o),l.props=f,v=t.pendingProps,x=l.context,u=r.contextType,typeof u=="object"&&u!==null?u=xe(u):(u=fe(r)?mt:ne.current,u=jt(t,u));var N=r.getDerivedStateFromProps;(c=typeof N=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==v||x!==u)&&Bs(t,l,n,u),Qe=!1,x=t.memoizedState,l.state=x,Br(t,n,l,s);var g=t.memoizedState;o!==v||x!==g||de.current||Qe?(typeof N=="function"&&(mi(t,r,N,n),g=t.memoizedState),(f=Qe||zs(t,r,f,n,x,g,u)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(n,g,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(n,g,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),l.props=n,l.state=g,l.context=u,n=f):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),n=!1)}return wi(e,t,r,n,i,s)}function wi(e,t,r,n,s,i){So(e,t);var l=(t.flags&128)!==0;if(!n&&!l)return s&&Is(t,r,!1),_e(e,t,i);n=t.stateNode,_u.current=t;var o=l&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&l?(t.child=kt(t,e.child,null,i),t.child=kt(t,null,o,i)):le(e,t,o,i),t.memoizedState=n.state,s&&Is(t,r,!0),t.child}function To(e){var t=e.stateNode;t.pendingContext?Os(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Os(e,t.context,!1),Vi(e,t.containerInfo)}var xi={dehydrated:null,treeContext:null,retryLane:0};function Si(e){return{baseLanes:e,cachePool:null,transitions:null}}function Do(e,t,r){var n=t.pendingProps,s=A.current,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),z(A,s&1),e===null)return e=t.memoizedState,e!==null&&e.dehydrated!==null?(t.mode&1?Ke()?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=n.children,e=n.fallback,i?(n=t.mode,i=t.child,l={mode:"hidden",children:l},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=nn(l,n,0,null),e=ft(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Si(r),t.memoizedState=xi,e):Gi(t,l));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return bu(e,t,l,n,o,s,r);if(i){i=n.fallback,l=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:n.children};return!(l&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=et(s,u),n.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=et(o,i):(i=ft(i,l,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,l=e.child.memoizedState,l=l===null?Si(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~r,t.memoizedState=xi,n}return i=e.child,e=i.sibling,n=et(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Gi(e,t){return t=nn({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function mr(e,t,r,n){return n!==null&&(ze===null?ze=[n]:ze.push(n)),kt(t,e.child,null,r),e=Gi(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bu(e,t,r,n,s,i,l){if(r)return t.flags&256?(t.flags&=-257,i=wn(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering.")),mr(e,t,l,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,r=t.mode,n=nn({mode:"visible",children:n.children},r,0,null),i=ft(i,r,l,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&kt(t,e.child,null,l),t.child.memoizedState=Si(l),t.memoizedState=xi,i);if(!(t.mode&1))return mr(e,t,l,null);if(Ke())return i=Ke().digest,i=wn(Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),i,void 0),mr(e,t,l,i);if(r=(l&e.childLanes)!==0,ae||r){if(n=Y,n!==null){switch(l&-l){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(n.suspendedLanes|l)?0:r,r!==0&&r!==i.retryLane&&(i.retryLane=r,Rt(e,r),Ge(n,e,r,-1))}return ss(),i=wn(Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.")),mr(e,t,l,i)}return Ke()?(t.flags|=128,t.child=e.child,ea.bind(null,e),Ke(),null):(e=Gi(t,n.children),e.flags|=4096,e)}function qs(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),pi(e.return,t,r)}function xn(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function Eo(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(le(e,t,n.children,r),n=A.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qs(e,r,t);else if(e.tag===19)qs(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(z(A,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&_r(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),xn(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&_r(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}xn(t,!0,r,null,i);break;case"together":xn(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Tr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _e(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),yt|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,r=et(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=et(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Au(e,t,r){switch(t.tag){case 3:To(t);break;case 5:Kl(t);break;case 1:fe(t.type)&&Rr(t);break;case 4:Vi(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;z(Fr,n._currentValue2),n._currentValue2=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(z(A,A.current&1),t.flags|=128,null):r&t.child.childLanes?Do(e,t,r):(z(A,A.current&1),e=_e(e,t,r),e!==null?e.sibling:null);z(A,A.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Eo(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),z(A,A.current),n)break;return null;case 22:case 23:return t.lanes=0,xo(e,t,r)}return _e(e,t,r)}var No,Ti,Lo,Mo;No=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6){var n=e,s=r.stateNode,i=n.children.indexOf(s);i!==-1&&n.children.splice(i,1),n.children.push(s)}else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ti=function(){};Lo=function(e,t,r,n){e.memoizedProps!==n&&(at(Re.current),t.updateQueue=Du)&&(t.flags|=4)};Mo=function(e,t,r,n){r!==n&&(t.flags|=4)};function At(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ee(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Uu(e,t,r){var n=t.pendingProps;switch(_i(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ee(t),null;case 1:return fe(t.type)&&kr(),ee(t),null;case 3:return r=t.stateNode,Xt(),B(de),B(ne),$i(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),e!==null&&e.child!==null||e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ze!==null&&(Ii(ze),ze=null)),Ti(e,t),ee(t),null;case 5:Qi(t),r=at(Zt.current);var s=t.type;if(e!==null&&t.stateNode!=null)Lo(e,t,s,n,r),e.ref!==t.ref&&(t.flags|=512);else{if(!n){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ee(t),null}at(Re.current),e={type:s,props:n,isHidden:!1,children:[],internalInstanceHandle:t,rootContainerInstance:r,tag:"INSTANCE"},No(e,t,!1,!1),t.stateNode=e,t.ref!==null&&(t.flags|=512)}return ee(t),null;case 6:if(e&&t.stateNode!=null)Mo(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");at(Zt.current),at(Re.current),t.stateNode={text:n,isHidden:!1,tag:"TEXT"}}return ee(t),null;case 13:if(B(A),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n!==null&&n.dehydrated!==null){if(e===null)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");!(t.flags&128)&&(t.memoizedState=null),t.flags|=4,ee(t),s=!1}else ze!==null&&(Ii(ze),ze=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(r=n!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||A.current&1?H===0&&(H=3):ss())),t.updateQueue!==null&&(t.flags|=4),ee(t),null);case 4:return Xt(),Ti(e,t),ee(t),null;case 10:return Ui(t.type._context),ee(t),null;case 17:return fe(t.type)&&kr(),ee(t),null;case 19:if(B(A),s=t.memoizedState,s===null)return ee(t),null;n=(t.flags&128)!==0;var i=s.rendering;if(i===null)if(n)At(s,!1);else{if(H!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=_r(e),i!==null){for(t.flags|=128,At(s,!1),e=i.updateQueue,e!==null&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=r,r=t.child;r!==null;)n=r,s=e,n.flags&=14680066,i=n.alternate,i===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,s=i.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r=r.sibling;return z(A,A.current&1|2),t.child}e=e.sibling}s.tail!==null&&$()>rr&&(t.flags|=128,n=!0,At(s,!1),t.lanes=4194304)}else{if(!n)if(e=_r(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,e!==null&&(t.updateQueue=e,t.flags|=4),At(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate)return ee(t),null}else 2*$()-s.renderingStartTime>rr&&r!==1073741824&&(t.flags|=128,n=!0,At(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$(),t.sibling=null,e=A.current,z(A,n?e&1|2:e&1),t):(ee(t),null);case 22:case 23:return is(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pe&1073741824&&(ee(t),t.subtreeFlags&6&&(t.flags|=8192)):ee(t),null;case 24:return null;case 25:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function qu(e,t){switch(_i(t),t.tag){case 1:return fe(t.type)&&kr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xt(),B(de),B(ne),$i(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Qi(t),null;case 13:if(B(A),e=t.memoizedState,e!==null&&e.dehydrated!==null&&t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(A),null;case 4:return Xt(),null;case 10:return Ui(t.type._context),null;case 22:case 23:return is(),null;case 24:return null;default:return null}}var Wu=typeof WeakSet=="function"?WeakSet:Set,j=null;function Ur(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ue(e,t,n)}else r.current=null}function Di(e,t,r){try{r()}catch(n){ue(e,t,n)}}var Ws=!1;function Vu(e,t){for(j=t;j!==null;)if(e=j,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,j=t;else for(;j!==null;){e=j;try{var r=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(r!==null){var n=r.memoizedProps,s=r.memoizedState,i=e.stateNode,l=i.getSnapshotBeforeUpdate(e.elementType===e.type?n:De(e.type,n),s);i.__reactInternalSnapshotBeforeUpdate=l}break;case 3:e.stateNode.containerInfo.children.splice(0);break;case 5:case 6:case 4:case 17:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}catch(o){ue(e,e.return,o)}if(t=e.sibling,t!==null){t.return=e.return,j=t;break}j=e.return}return r=Ws,Ws=!1,r}function qr(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Di(t,r,i)}s=s.next}while(s!==n)}}function es(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Oo(e){var t=e.alternate;t!==null&&(e.alternate=null,Oo(t)),e.child=null,e.deletions=null,e.sibling=null,e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Io(e){return e.tag===5||e.tag===3||e.tag===4}function Vs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Io(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ei(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?Wl(r,e,t):ql(r,e);else if(n!==4&&(e=e.child,e!==null))for(Ei(e,t,r),e=e.sibling;e!==null;)Ei(e,t,r),e=e.sibling}function Ni(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?Wl(r,e,t):ql(r,e);else if(n!==4&&(e=e.child,e!==null))for(Ni(e,t,r),e=e.sibling;e!==null;)Ni(e,t,r),e=e.sibling}var se=null;function lt(e,t,r){for(r=r.child;r!==null;)Co(e,t,r),r=r.sibling}function Co(e,t,r){if(ke&&typeof ke.onCommitFiberUnmount=="function")try{ke.onCommitFiberUnmount(Yr,r)}catch{}switch(r.tag){case 5:Ur(r,t);case 6:var n=se;se=null,lt(e,t,r),se=n,se!==null&&(e=se,r=e.children.indexOf(r.stateNode),e.children.splice(r,1));break;case 18:se!==null&&Ke(se,r.stateNode);break;case 4:n=se,se=r.stateNode.containerInfo,lt(e,t,r),se=n;break;case 0:case 11:case 14:case 15:if(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null)){var s=n=n.next;do{var i=s,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Di(r,t,l),s=s.next}while(s!==n)}lt(e,t,r);break;case 1:if(Ur(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function")try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){ue(r,t,o)}lt(e,t,r);break;case 21:lt(e,t,r);break;case 22:lt(e,t,r);break;default:lt(e,t,r)}}function Qs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Wu),t.forEach(function(n){var s=ta.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Oe(e,t){var r=t.deletions;if(r!==null)for(var n=0;ns&&(s=l),n&=~i}if(n=s,n=$()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*$u(n/1960))-n,10e?16:e,Je===null)var n=!1;else{if(e=Je,Je=null,Qr=0,X&6)throw Error("Cannot flush passive effects while already rendering.");var s=X;for(X|=4,j=e.current;j!==null;){var i=j,l=i.child;if(j.flags&16){var o=i.deletions;if(o!==null){for(var u=0;u$()-ns?dt(e,0):rs|=r),we(e,t)}function zo(e,t){t===0&&(e.mode&1?(t=cr,cr<<=1,!(cr&130023424)&&(cr=4194304)):t=1);var r=Ne();e=Rt(e,t),e!==null&&(Zr(e,t,r),we(e,r))}function ea(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),zo(e,r)}function ta(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}n!==null&&n.delete(t),zo(e,r)}var Bo;Bo=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||de.current)ae=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ae=!1,Au(e,t,r);ae=!!(e.flags&131072)}else ae=!1;switch(t.lanes=0,t.tag){case 2:var n=t.type;Tr(e,t),e=t.pendingProps;var s=jt(t,ne.current);if(Ot(t,r),s=Ki(null,t,n,e,s,r),t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,fe(n)){var i=!0;Rr(t)}else i=!1;t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Wi(t),s.updater=tn,t.stateNode=s,s._reactInternals=t,gi(t,n,e,r),t=wi(null,t,n,!0,i,r)}else t.tag=0,le(null,t,s,r),t=t.child;return t;case 16:n=t.elementType;e:{switch(Tr(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=na(n),e=De(n,e),s){case 0:t=vi(null,t,n,e,r);break e;case 1:t=Us(null,t,n,e,r);break e;case 11:t=bs(null,t,n,e,r);break e;case 14:t=As(null,t,n,De(n.type,e),r);break e}throw Error("Element type is invalid. Received a promise that resolves to: "+n+". Lazy element type must resolve to a class or function.")}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:De(n,s),vi(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:De(n,s),Us(e,t,n,s,r);case 3:if(To(t),e===null)throw Error("Should have a current fiber. This is a bug in React.");return s=t.pendingProps,n=t.memoizedState.element,Hl(e,t),Br(t,s,null,r),s=t.memoizedState.element,s===n?t=_e(e,t,r):(le(e,t,s,r),t=t.child),t;case 5:return Kl(t),n=t.pendingProps.children,So(e,t),le(e,t,n,r),t.child;case 6:return null;case 13:return Do(e,t,r);case 4:return Vi(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=kt(t,null,n,r):le(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:De(n,s),bs(e,t,n,s,r);case 7:return le(e,t,t.pendingProps,r),t.child;case 8:return le(e,t,t.pendingProps.children,r),t.child;case 12:return le(e,t,t.pendingProps.children,r),t.child;case 10:e:{n=t.type._context,s=t.pendingProps,i=t.memoizedProps;var l=s.value;if(z(Fr,n._currentValue2),n._currentValue2=l,i!==null)if(Le(i.value,l)){if(i.children===s.children&&!de.current){t=_e(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var u=o.firstContext;u!==null;){if(u.context===n){if(i.tag===1){u=Ye(-1,r&-r),u.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var c=f.pending;c===null?u.next=u:(u.next=c.next,c.next=u),f.pending=u}}i.lanes|=r,u=i.alternate,u!==null&&(u.lanes|=r),pi(i.return,r,t),o.lanes|=r;break}u=u.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");l.lanes|=r,o=l.alternate,o!==null&&(o.lanes|=r),pi(l,r,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}le(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ot(t,r),s=xe(s),n=n(s),t.flags|=1,le(e,t,n,r),t.child;case 14:return n=t.type,s=De(n,t.pendingProps),s=De(n.type,s),As(e,t,n,s,r);case 15:return wo(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:De(n,s),Tr(e,t),t.tag=1,fe(n)?(e=!0,Rr(t)):e=!1,Ot(t,r),go(t,n,s),gi(t,n,s,r),wi(null,t,n,!0,e,r);case 19:return Eo(e,t,r);case 22:return xo(e,t,r)}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")};function _o(e,t){return Bi(e,t)}function ra(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function je(e,t,r,n){return new ra(e,t,r,n)}function ls(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e){if(typeof e=="function")return ls(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fi)return 11;if(e===zi)return 14}return 2}function et(e,t){var r=e.alternate;return r===null?(r=je(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Nr(e,t,r,n,s,i){var l=2;if(n=e,typeof e=="function")ls(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Dt:return ft(r.children,s,i,t);case Xi:l=8,s|=8;break;case li:return e=je(12,r,t,s|2),e.elementType=li,e.lanes=i,e;case oi:return e=je(13,r,t,s),e.elementType=oi,e.lanes=i,e;case ui:return e=je(19,r,t,s),e.elementType=ui,e.lanes=i,e;case zl:return nn(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xl:l=10;break e;case Fl:l=9;break e;case Fi:l=11;break e;case zi:l=14;break e;case Ve:l=16,n=null;break e}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((e==null?e:typeof e)+"."))}return t=je(l,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function ft(e,t,r,n){return e=je(7,e,n,t),e.lanes=r,e}function nn(e,t,r,n){return e=je(22,e,n,t),e.elementType=zl,e.lanes=r,e.stateNode={isHidden:!1},e}function Sn(e,t,r){return e=je(6,e,null,t),e.lanes=r,e}function Tn(e,t,r){return t=je(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ia(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=an(0),this.expirationTimes=an(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.identifierPrefix=n,this.onRecoverableError=s}function sa(e,t,r,n,s,i,l){return e=new ia(e,t,!1,i,l),t===1?(t=1,n===!0&&(t|=8)):t=0,n=je(3,null,null,t),e.current=n,n.stateNode=e,n.memoizedState={element:null,isDehydrated:!1,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wi(n),e}function Dn(e,t,r,n){var s=t.current,i=Ne(),l=It(s);e:if(r){r=r._reactInternals;t:{if(Jr(r)!==r||r.tag!==1)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break t;case 1:if(fe(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break t}}o=o.return}while(o!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag===1){var u=r.type;if(fe(u)){r=Vl(r,u,o);break e}}r=o}else r=rt;return t.context===null?t.context=r:t.pendingContext=r,t=Ye(i,l),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ht(s,t,l),e!==null&&(Ge(e,s,l,i),wr(e,s,l)),l}function la(){return null}var oa=kl.unstable_act,ua={createNodeMock:function(){return null}};function Lr(e){if(e.isHidden)return null;switch(e.tag){case"TEXT":return e.text;case"INSTANCE":var t=e.props,r=["children"];if(t==null)t={};else{var n={},s=Object.keys(t),i;for(i=0;iPi(r).length)break;return os(r)}r=r.return}return null}},{key:"children",get:function(){return Pi(this._currentFiber())}}]),e}();function Mr(e,t,r){var n=r?r.deep:!0,s=[];return t(e)&&(s.push(e),!n)||e.children.forEach(function(i){typeof i!="string"&&s.push.apply(s,Mr(i,t,r))}),s}function En(e,t){if(e.length===1)return e[0];throw Error((e.length===0?"No instances found ":"Expected 1 but found "+e.length+" instances ")+t)}function ca(e){console.error(e)}var Nn=new WeakMap;function os(e){var t=Nn.get(e);return t===void 0&&e.alternate!==null&&(t=Nn.get(e.alternate)),t===void 0&&(t=new aa(e),Nn.set(e,t)),t}var qt={findFiberByHostInstance:function(){throw Error("TestRenderer does not support findFiberByHostInstance()")},bundleType:0,version:"18.3.1",rendererPackageName:"react-test-renderer"},ha={bundleType:qt.bundleType,version:qt.version,rendererPackageName:qt.rendererPackageName,rendererConfig:qt.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Bl(e),e=e!==null?_l(e):null,e===null?null:e.stateNode},findFiberByHostInstance:qt.findFiberByHostInstance||la,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yr.isDisabled&&yr.supportsFiber)try{Yr=yr.inject(ha),ke=yr}catch{}}nr._Scheduler=Rl;nr.act=oa;nr.create=function(e,t){var r=ua.createNodeMock,n=!1,s=!1;typeof t=="object"&&t!==null&&(typeof t.createNodeMock=="function"&&(r=t.createNodeMock),t.unstable_isConcurrent===!0&&(n=!0),t.unstable_strictMode===!0&&(s=!0));var i={children:[],createNodeMock:r,tag:"CONTAINER"},l=sa(i,n?1:0,null,s,null,"",ca);if(l==null)throw Error("something went wrong");return Dn(e,l,null,null),e={_Scheduler:Rl,root:void 0,toJSON:function(){if(l==null||l.current==null||i==null||i.children.length===0)return null;if(i.children.length===1)return Lr(i.children[0]);if(i.children.length===2&&i.children[0].isHidden===!0&&i.children[1].isHidden===!1)return Lr(i.children[1]);var o=null;if(i.children&&i.children.length)for(var u=0;u":"attribute: {"+n+"}, parent: <"+this.parent.name+">"}isEqualNode(n){return!(n.namespaceURI!==this.namespaceURI||n.prefix!==this.prefix||n.localName!==this.localName||n.value!==this.value)}}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t}.call(this)}.call(R)),Rn.exports}var Xn={exports:{}},rl;function us(){return rl||(rl=1,function(){Xn.exports=function(){class e{constructor(r){this.nodes=r}clone(){return this.nodes=null}getNamedItem(r){return this.nodes[r]}setNamedItem(r){var n;return n=this.nodes[r.nodeName],this.nodes[r.nodeName]=r,n||null}removeNamedItem(r){var n;return n=this.nodes[r],delete this.nodes[r],n||null}item(r){return this.nodes[Object.keys(this.nodes)[r]]||null}getNamedItemNS(r,n){throw new Error("This DOM method is not implemented.")}setNamedItemNS(r){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(r,n){throw new Error("This DOM method is not implemented.")}}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e}.call(this)}.call(R)),Xn.exports}var nl;function as(){return nl||(nl=1,function(){var e,t,r,n,s,i,l,o={}.hasOwnProperty;({isObject:l,isFunction:i,getValue:s}=Ae()),n=Te(),e=V(),t=qo(),r=us(),jn.exports=function(){class u extends n{constructor(c,v,x){var N,g,L,P;if(super(c),v==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(v),this.type=e.Element,this.attribs={},this.schemaTypeInfo=null,x!=null&&this.attribute(x),c.type===e.Document&&(this.isRoot=!0,this.documentObject=c,c.rootObject=this,c.children)){for(P=c.children,g=0,L=P.length;g=N;v=0<=N?++x:--x)if(!this.attribs[v].isEqualNode(c.attribs[v]))return!1;return!0}}return Object.defineProperty(u.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(u.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(u.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new r(this.attribs)),this.attributeMap}}),u}.call(this)}.call(R)),jn.exports}var Fn={exports:{}},zn={exports:{}},il;function sn(){return il||(il=1,function(){var e;e=Te(),zn.exports=function(){class t extends e{constructor(n){super(n),this.value=""}clone(){return Object.create(this)}substringData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendData(n){throw new Error("This DOM method is not implemented."+this.debugInfo())}insertData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}deleteData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceData(n,s,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(n){return!(!super.isEqualNode(n)||n.data!==this.data)}}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),t}.call(this)}.call(R)),zn.exports}var sl;function cs(){return sl||(sl=1,function(){var e,t;e=V(),t=sn(),Fn.exports=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))}}}.call(R)),Fn.exports}var Bn={exports:{}},ll;function hs(){return ll||(ll=1,function(){var e,t;e=V(),t=sn(),Bn.exports=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))}}}.call(R)),Bn.exports}var _n={exports:{}},ol;function ds(){return ol||(ol=1,function(){var e,t,r;({isObject:r}=Ae()),t=Te(),e=V(),_n.exports=class extends t{constructor(s,i,l,o){super(s),r(i)&&({version:i,encoding:l,standalone:o}=i),i||(i="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(i),l!=null&&(this.encoding=this.stringify.xmlEncoding(l)),o!=null&&(this.standalone=this.stringify.xmlStandalone(o))}toString(s){return this.options.writer.declaration(this,this.options.writer.filterOptions(s))}}}.call(R)),_n.exports}var bn={exports:{}},An={exports:{}},ul;function fs(){return ul||(ul=1,function(){var e,t;t=Te(),e=V(),An.exports=class extends t{constructor(n,s,i,l,o,u){if(super(n),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(s));if(!l)throw new Error("Missing DTD attribute type. "+this.debugInfo(s));if(!o)throw new Error("Missing DTD attribute default. "+this.debugInfo(s));if(o.indexOf("#")!==0&&(o="#"+o),!o.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(s));if(u&&!o.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(s));this.elementName=this.stringify.name(s),this.type=e.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(l),u&&(this.defaultValue=this.stringify.dtdAttDefault(u)),this.defaultValueType=o}toString(n){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(n))}}}.call(R)),An.exports}var Un={exports:{}},al;function ps(){return al||(al=1,function(){var e,t,r;({isObject:r}=Ae()),t=Te(),e=V(),Un.exports=function(){class n extends t{constructor(i,l,o,u){if(super(i),o==null)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(u==null)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!l,this.name=this.stringify.name(o),this.type=e.EntityDeclaration,!r(u))this.value=this.stringify.dtdEntityValue(u),this.internal=!0;else{if(!u.pubID&&!u.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(u.pubID&&!u.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID)),u.nData!=null&&(this.nData=this.stringify.dtdNData(u.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}}toString(i){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(i))}}return Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlVersion",{get:function(){return null}}),n}.call(this)}.call(R)),Un.exports}var qn={exports:{}},cl;function ms(){return cl||(cl=1,function(){var e,t;t=Te(),e=V(),qn.exports=class extends t{constructor(n,s,i){if(super(n),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(s),this.type=e.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}toString(n){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(n))}}}.call(R)),qn.exports}var Wn={exports:{}},hl;function gs(){return hl||(hl=1,function(){var e,t;t=Te(),e=V(),Wn.exports=function(){class r extends t{constructor(s,i,l){if(super(s),i==null)throw new Error("Missing DTD notation name. "+this.debugInfo(i));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i));this.name=this.stringify.name(i),this.type=e.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}toString(s){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(s))}}return Object.defineProperty(r.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(r.prototype,"systemId",{get:function(){return this.sysID}}),r}.call(this)}.call(R)),Wn.exports}var dl;function ys(){return dl||(dl=1,function(){var e,t,r,n,s,i,l,o;({isObject:o}=Ae()),l=Te(),e=V(),t=fs(),n=ps(),r=ms(),s=gs(),i=us(),bn.exports=function(){class u extends l{constructor(c,v,x){var N,g,L,P;if(super(c),this.type=e.DocType,c.children){for(P=c.children,g=0,L=P.length;g":(m=this.parent)!=null&&m.name?"node: <"+a+">, parent: <"+this.parent.name+">":"node: <"+a+">"}ele(a,p,m){return this.element(a,p,m)}nod(a,p,m){return this.node(a,p,m)}txt(a){return this.text(a)}dat(a){return this.cdata(a)}com(a){return this.comment(a)}ins(a,p){return this.instruction(a,p)}doc(){return this.document()}dec(a,p,m){return this.declaration(a,p,m)}e(a,p,m){return this.element(a,p,m)}n(a,p,m){return this.node(a,p,m)}t(a){return this.text(a)}d(a){return this.cdata(a)}c(a){return this.comment(a)}r(a){return this.raw(a)}i(a,p){return this.instruction(a,p)}u(){return this.up()}importXMLBuilder(a){return this.importDocument(a)}attribute(a,p){throw new Error("attribute() applies to element nodes only.")}att(a,p){return this.attribute(a,p)}a(a,p){return this.attribute(a,p)}removeAttribute(a){throw new Error("attribute() applies to element nodes only.")}replaceChild(a,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(a,p){return!0}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(a){var p,m;return p=this,p===a?0:this.document()!==a.document()?(m=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?m|=e.Preceding:m|=e.Following,m):p.isAncestor(a)?e.Contains|e.Preceding:p.isDescendant(a)?e.Contains|e.Following:p.isPreceding(a)?e.Preceding:e.Following}isSameNode(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(a){var p,m,T;if(a.nodeType!==this.nodeType||a.children.length!==this.children.length)return!1;for(p=m=0,T=this.children.length-1;0<=T?m<=T:m>=T;p=0<=T?++m:--m)if(!this.children[p].isEqualNode(a.children[p]))return!1;return!0}getFeature(a,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(a,p,m){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(a){return a?a===this||this.isDescendant(a):!1}isDescendant(a){var p,m,T,h,S;for(S=this.children,T=0,h=S.length;Tm}treePosition(a){var p,m;return m=0,p=!1,this.foreachTreeNode(this.document(),function(T){if(m++,!p&&T===a)return p=!0}),p?m:-1}foreachTreeNode(a,p){var m,T,h,S,E;for(a||(a=this.document()),S=a.children,T=0,h=S.length;T","]]]]>"),this.assertLegalChar(n))}comment(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)}raw(n){return this.options.noValidation?n:""+n||""}attValue(n){return this.options.noValidation?n:this.assertLegalChar(this.attEscape(n=""+n||""))}insTarget(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}insValue(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return this.assertLegalChar(n)}xmlVersion(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n}xmlEncoding(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return this.assertLegalChar(n)}xmlStandalone(n){return this.options.noValidation?n:n?"yes":"no"}dtdPubID(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdSysID(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdElementValue(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdAttType(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdAttDefault(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdEntityValue(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdNData(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}assertLegalChar(n){var s,i;if(this.options.noValidation)return n;if(this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)n=n.replace(s,this.options.invalidCharReplacement);else if(i=n.match(s))throw new Error(`Invalid character in string: ${n} at index ${i.index}`)}else if(this.options.version==="1.1"){if(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)n=n.replace(s,this.options.invalidCharReplacement);else if(i=n.match(s))throw new Error(`Invalid character in string: ${n} at index ${i.index}`)}return n}assertLegalName(n){var s;if(this.options.noValidation)return n;if(n=this.assertLegalChar(n),s=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!n.match(s))throw new Error(`Invalid character in name: ${n}`);return n}textEscape(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,n.replace(s,"&").replace(//g,">").replace(/\r/g," "))}attEscape(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,n.replace(s,"&").replace(/0)?new Array(u).join(l.indent):""}endline(i,l,o){return!l.pretty||l.suppressPrettyCount?"":l.newline}attribute(i,l,o){var u;return this.openAttribute(i,l,o),l.pretty&&l.width>0?u=i.name+'="'+i.value+'"':u=" "+i.name+'="'+i.value+'"',this.closeAttribute(i,l,o),u}cdata(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+""+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}comment(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+""+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}declaration(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"",u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}docType(i,l,o){var u,f,c,v,x;if(o||(o=0),this.openNode(i,l,o),l.state=t.OpenTag,v=this.indent(i,l,o),v+="0){for(v+=" [",v+=this.endline(i,l,o),l.state=t.InsideTag,x=i.children,f=0,c=x.length;f",v+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),v}element(i,l,o){var u,f,c,v,x,N,g,L,P,y,d,w,a,p,m,T,h,S,E;if(o||(o=0),w=!1,this.openNode(i,l,o),l.state=t.OpenTag,a=this.indent(i,l,o)+"<"+i.name,l.pretty&&l.width>0){L=a.length,m=i.attribs;for(d in m)n.call(m,d)&&(u=m[d],p=this.attribute(u,l,o),f=p.length,L+f>l.width?(E=this.indent(i,l,o+1)+p,a+=this.endline(i,l,o)+E,L=E.length):(E=" "+p,a+=E,L+=E.length))}else{T=i.attribs;for(d in T)n.call(T,d)&&(u=T[d],a+=this.attribute(u,l,o))}if(v=i.children.length,x=v===0?null:i.children[0],v===0||i.children.every(function(O){return(O.type===e.Text||O.type===e.Raw||O.type===e.CData)&&O.value===""}))l.allowEmpty?(a+=">",l.state=t.CloseTag,a+=""+this.endline(i,l,o)):(l.state=t.CloseTag,a+=l.spaceBeforeSlash+"/>"+this.endline(i,l,o));else if(l.pretty&&v===1&&(x.type===e.Text||x.type===e.Raw||x.type===e.CData)&&x.value!=null)a+=">",l.state=t.InsideTag,l.suppressPrettyCount++,w=!0,a+=this.writeChildNode(x,l,o+1),l.suppressPrettyCount--,w=!1,l.state=t.CloseTag,a+=""+this.endline(i,l,o);else{if(l.dontPrettyTextNodes){for(h=i.children,N=0,P=h.length;N"+this.endline(i,l,o),l.state=t.InsideTag,S=i.children,g=0,y=S.length;g",w&&l.suppressPrettyCount--,a+=this.endline(i,l,o),l.state=t.None}return this.closeNode(i,l,o),a}writeChildNode(i,l,o){switch(i.type){case e.CData:return this.cdata(i,l,o);case e.Comment:return this.comment(i,l,o);case e.Element:return this.element(i,l,o);case e.Raw:return this.raw(i,l,o);case e.Text:return this.text(i,l,o);case e.ProcessingInstruction:return this.processingInstruction(i,l,o);case e.Dummy:return"";case e.Declaration:return this.declaration(i,l,o);case e.DocType:return this.docType(i,l,o);case e.AttributeDeclaration:return this.dtdAttList(i,l,o);case e.ElementDeclaration:return this.dtdElement(i,l,o);case e.EntityDeclaration:return this.dtdEntity(i,l,o);case e.NotationDeclaration:return this.dtdNotation(i,l,o);default:throw new Error("Unknown XML node type: "+i.constructor.name)}}processingInstruction(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"",u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}raw(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o),l.state=t.InsideTag,u+=i.value,l.state=t.CloseTag,u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}text(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o),l.state=t.InsideTag,u+=i.value,l.state=t.CloseTag,u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdAttList(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+""+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdElement(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+""+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdEntity(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+""+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdNotation(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+""+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}openNode(i,l,o){}closeNode(i,l,o){}openAttribute(i,l,o){}closeAttribute(i,l,o){}}}.call(R)),Gn.exports}var Dl;function Ss(){return Dl||(Dl=1,function(){var e;e=Qo(),Zn.exports=class extends e{constructor(r){super(r)}document(r,n){var s,i,l,o,u;for(n=this.filterOptions(n),o="",u=r.children,i=0,l=u.length;i=0;)this.up();return this.onEnd()}openCurrent(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)}openNode(h){var S,E,O,C;if(!h.isOpen){if(!this.root&&this.currentLevel===0&&h.type===e.Element&&(this.root=h),E="",h.type===e.Element){this.writerOptions.state=t.OpenTag,E=this.writer.indent(h,this.writerOptions,this.currentLevel)+"<"+h.name,C=h.attribs;for(O in C)m.call(C,O)&&(S=C[O],E+=this.writer.attribute(S,this.writerOptions,this.currentLevel));E+=(h.children?">":"/>")+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=t.InsideTag}else this.writerOptions.state=t.OpenTag,E=this.writer.indent(h,this.writerOptions,this.currentLevel)+""),E+=this.writer.endline(h,this.writerOptions,this.currentLevel);return this.onData(E,this.currentLevel),h.isOpen=!0}}closeNode(h){var S;if(!h.isClosed)return S="",this.writerOptions.state=t.CloseTag,h.type===e.Element?S=this.writer.indent(h,this.writerOptions,this.currentLevel)+""+this.writer.endline(h,this.writerOptions,this.currentLevel):S=this.writer.indent(h,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=t.None,this.onData(S,this.currentLevel),h.isClosed=!0}onData(h,S){return this.documentStarted=!0,this.onDataCallback(h,S+1)}onEnd(){return this.documentCompleted=!0,this.onEndCallback()}debugInfo(h){return h==null?"":"node: <"+h+">"}ele(){return this.element(...arguments)}nod(h,S,E){return this.node(h,S,E)}txt(h){return this.text(h)}dat(h){return this.cdata(h)}com(h){return this.comment(h)}ins(h,S){return this.instruction(h,S)}dec(h,S,E){return this.declaration(h,S,E)}dtd(h,S,E){return this.doctype(h,S,E)}e(h,S,E){return this.element(h,S,E)}n(h,S,E){return this.node(h,S,E)}t(h){return this.text(h)}d(h){return this.cdata(h)}c(h){return this.comment(h)}r(h){return this.raw(h)}i(h,S){return this.instruction(h,S)}att(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}a(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}ent(h,S){return this.entity(h,S)}pent(h,S){return this.pEntity(h,S)}not(h,S){return this.notation(h,S)}}}.call(R)),ti.exports}var ri={exports:{}},Ll;function xa(){return Ll||(Ll=1,function(){var e,t,r,n={}.hasOwnProperty;e=V(),r=Qo(),t=ln(),ri.exports=class extends r{constructor(i,l){super(l),this.stream=i}endline(i,l,o){return i.isLastRootNode&&l.state===t.CloseTag?"":super.endline(i,l,o)}document(i,l){var o,u,f,c,v,x,N,g,L;for(N=i.children,u=f=0,v=N.length;f0){for(this.stream.write(" ["),this.stream.write(this.endline(i,l,o)),l.state=t.InsideTag,v=i.children,f=0,c=v.length;f"),this.stream.write(this.endline(i,l,o)),l.state=t.None,this.closeNode(i,l,o)}element(i,l,o){var u,f,c,v,x,N,g,L,P,y,d,w,a,p,m;if(o||(o=0),this.openNode(i,l,o),l.state=t.OpenTag,y=this.indent(i,l,o)+"<"+i.name,l.pretty&&l.width>0){g=y.length,w=i.attribs;for(P in w)n.call(w,P)&&(u=w[P],d=this.attribute(u,l,o),f=d.length,g+f>l.width?(m=this.indent(i,l,o+1)+d,y+=this.endline(i,l,o)+m,g=m.length):(m=" "+d,y+=m,g+=m.length))}else{a=i.attribs;for(P in a)n.call(a,P)&&(u=a[P],y+=this.attribute(u,l,o))}if(this.stream.write(y),v=i.children.length,x=v===0?null:i.children[0],v===0||i.children.every(function(T){return(T.type===e.Text||T.type===e.Raw||T.type===e.CData)&&T.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=t.CloseTag,this.stream.write("")):(l.state=t.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&v===1&&(x.type===e.Text||x.type===e.Raw||x.type===e.CData)&&x.value!=null)this.stream.write(">"),l.state=t.InsideTag,l.suppressPrettyCount++,this.writeChildNode(x,l,o+1),l.suppressPrettyCount--,l.state=t.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(i,l,o)),l.state=t.InsideTag,p=i.children,N=0,L=p.length;N")}return this.stream.write(this.endline(i,l,o)),l.state=t.None,this.closeNode(i,l,o)}processingInstruction(i,l,o){return this.stream.write(super.processingInstruction(i,l,o))}raw(i,l,o){return this.stream.write(super.raw(i,l,o))}text(i,l,o){return this.stream.write(super.text(i,l,o))}dtdAttList(i,l,o){return this.stream.write(super.dtdAttList(i,l,o))}dtdElement(i,l,o){return this.stream.write(super.dtdElement(i,l,o))}dtdEntity(i,l,o){return this.stream.write(super.dtdEntity(i,l,o))}dtdNotation(i,l,o){return this.stream.write(super.dtdNotation(i,l,o))}}}.call(R)),ri.exports}(function(){var e,t,r,n,s,i,l,o,u;({assign:o,isFunction:u}=Ae()),r=Uo(),n=$o(),s=wa(),l=Ss(),i=xa(),e=V(),t=ln(),qe.create=function(f,c,v,x){var N,g;if(f==null)throw new Error("Root element needs a name.");return x=o({},c,v,x),N=new n(x),g=N.element(f),x.headless||(N.declaration(x),(x.pubID!=null||x.sysID!=null)&&N.dtd(x)),g},qe.begin=function(f,c,v){return u(f)&&([c,v]=[f,c],f={}),c?new s(f,c,v):new n(f)},qe.stringWriter=function(f){return new l(f)},qe.streamWriter=function(f,c){return new i(f,c)},qe.implementation=new r,qe.nodeType=e,qe.writerState=t}).call(R);const Ho=(e,t,r=!1)=>{const{type:n,props:s,children:i}=t,l=i||[],o=l[0];if(l.length===1&&typeof o=="string"){e.ele(n,s,o);return}let u=null;r?Object.keys(s).map(f=>{e.att(f,s[f])}):u=e.ele(n,s),l.forEach(f=>{if(typeof f=="string")throw new Error("Invaild XML");Ho(u||e,f)})},Sa=e=>{const t=fa.create(e).toJSON();if(!t)throw new Error("Element is invalid");const r=qe.create(t.type);return Ho(r,t,!0),r.end({pretty:!0}),r.toString({pretty:!0})};function Ta(e){return{alter:e.alter,step:"CDEFGAB"[(e.note+98)%7],octave:Math.floor(e.note/7)+4}}function Da(e){const t=[I.f,I.p,I.m,I.r,I.s,I.z],r=["p","pp","ppp","pppp","ppppp","pppppp","f","ff","fff","ffff","fffff","ffffff","m","mp","mf","sf","sfp","sfpp","fp","rf","rfz","sfz","sffz","fz","n","pf","sfzp","other-dynamics"],n=e.filter(i=>t.includes(i.type)),s=n.sort((i,l)=>i.x-l.x).map(i=>i.type).join("");if(n&&n.length>0){if(r.includes(s))return{type:s,direction:{"^":"above",_:"below"}[n[0].direction]};console.error("无法识别的力度记号",s)}}function Ea(e){return{10:"1024th",9:"512th",8:"256th",7:"128th",6:"64th",5:"32nd",4:"16th",3:"eighth",2:"quarter",1:"half",0:"whole"}[e]}class Ga{title;pageSize;unitSize;staffLayout;paperOptions;headers;voiceStaves;lyricLanes;score;workTitle="";partBuilders=[];constructor(t){Object.assign(this,t);const r=this.voiceStaves;for(const[n,s]of this.partTemplate.entries()){const i=this.ensurePartBuilder(n,s);for(const l of s.map(o=>r[o]))for(const[o,u]of l.voices.entries())for(const[f,c]of u.measures.entries())i.ensureMeasureBuilder(f).addVoice({...c,voiceIndexOfStaff:o})}}get partTemplate(){return this.staffLayout.partGroups.map(t=>t.range[0]===t.range[1]?[t.range[0]]:t.range)}ensurePartBuilder(t,r){for(;this.partBuilders.length<=t;){const n=new Na({parent:this,template:r});this.partBuilders.push(n)}return this.partBuilders[t]}createPartListElement(){return D.jsx("part-list",{children:this.partBuilders.map(t=>D.jsx("score-part",{id:t.id,children:D.jsx("part-name",{"print-object":"no",children:t.name})}))})}toJSX(){const t=new Date;return`${t.getFullYear()}${String(t.getMonth()+1).padStart(2,"0")}${String(t.getDate()).padStart(2,"0")}`,D.jsxs("score-partwise",{version:"4.0",children:[D.jsx("work",{children:D.jsx("work-title",{children:this.workTitle})}),D.jsx("movement-title",{children:this.workTitle}),D.jsx("defaults",{children:D.jsxs("scaling",{children:[D.jsx("millimeters",{children:"8"}),D.jsx("tenths",{children:uu})]})}),D.jsx("part-list",{children:this.partBuilders.map(r=>D.jsx("score-part",{id:r.id,children:D.jsx("part-name",{"print-object":"no",children:"MusicXML Part"})}))}),this.partBuilders.map(r=>r.toJSX())]})}toString(){return` + +${Sa(this.toJSX())} +`}}class Na{parent;name;measureBuilders=[];staffContexts=[];template;get id(){return`P${this.parent.partBuilders.indexOf(this)+1}`}get stavesCount(){return this.template.length}constructor(t){Object.assign(this,t)}ensureStaffContext(t){for(;this.staffContexts.length<=t;){const r=new Oa({parent:this,index:t});this.staffContexts.push(r)}return this.staffContexts[t]}ensureMeasureBuilder(t){for(;this.measureBuilders.length<=t;){const r=new La({parent:this});this.measureBuilders.push(r)}return this.measureBuilders[t]}toJSX(){return D.jsx("part",{id:this.id,children:this.measureBuilders.map((t,r)=>t.toJSX())})}}class La{parent;voiceBuilders=[];beamCount=0;beamState;get index(){return this.parent.measureBuilders.indexOf(this)}get score(){return this.parent.parent.score}constructor(t){Object.assign(this,t)}addVoice(t){const r=new Ma({parent:this,voice:t});this.voiceBuilders.push(r),t.contextedTerms.filter(i=>i.type===ou.Clef).forEach(i=>{const l={[I.ClefC]:"C",[I.ClefF]:"F",[I.ClefG]:"G"}[i.tokenType];l||console.error("unknown Clef",i.tokenType);const o=this.parent.ensureStaffContext(i.staff);o.addClef(new Ko({parent:o,measureIndex:this.index,tick:i.tick,number:i.staff-this.parent.template[0],sign:l,line:3-i.y})),o.addKey(new Jo({parent:o,measureIndex:this.index,fifths:t.keySignature})),o.addTime(new Yo({parent:o,measureIndex:this.index,beats:t.timeSignature.numerator,beatType:t.timeSignature.denominator,timeSigNumeric:t.timeSigNumeric}))});const n={[I.OctaveShift8va]:8,[I.OctaveShift8vb]:-8,[I.OctaveShift0]:0},s=Object.keys(n);t.contextedTerms.forEach(i=>{s.includes(i.tokenType)&&this.parent.ensureStaffContext(i.staff).addOctaveShiftTerm(i,this.index)})}toJSX(){const t=this.score.pages.reduce((r,n)=>[...r,...n.systems.reduce((s,i)=>[...s,...i.measureBars],[])],[]);return this.beamCount=0,D.jsxs("measure",{number:this.index+1,width:Math.round(t[this.index]*10),children:[this.index===0&&D.jsx(D.Fragment,{children:this.parent.staffContexts.map(r=>{var n;return r.clefBuilders.length>0?D.jsx("attributes",{children:(n=r.clefBuilders)==null?void 0:n[0].toJSX()}):null})}),this.voiceBuilders.reduce((r,n,s)=>{var i,l;return r.push(...n.toJSX()),(l=(i=this.voiceBuilders[s+1])==null?void 0:i.toJSX)!=null&&l.call(i)&&r.push(D.jsx("backup",{children:D.jsx("duration",{children:n.voice.duration})})),r},[])]})}}class Ma{parent;voice;get index(){return this.parent.voiceBuilders.indexOf(this)}constructor(t){Object.assign(this,t)}toJSX(){var v,x;const t=[],r=new Map;for(const N of this.parent.parent.parent.lyricLanes||[])for(const g of N.syllables){const L=`${g.staffIndex}:${g.voiceIndex}:${g.measureIndex}:${g.tick}`,P=r.get(L)||[];P.push(g),r.set(L,P)}const n=new Map;for(const N of this.voice.marks||[])if(((v=N.constructor)==null?void 0:v.className)==="TempoTerm"&&((x=N.isValid)!=null&&x.call(N))){const g=n.get(N.tick)||[];g.push(N),n.set(N.tick,g)}const s={[I.AccNatural]:0,[I.AccSharp]:1,[I.AccDoublesharp]:2,[I.AccFlat]:-1,[I.AccFlatflat]:-1,[I.KeyNatural]:0,[I.KeySharp]:1,[I.KeyFlat]:-1},i=Object.keys(s),l=this.voice.contextedTerms.reduce((N,g)=>{if(i.includes(g.tokenType)){const L=N.findIndex(P=>P.x===g.x&&P.y===g.y);L>-1?N.splice(L,1):N.push(g)}return N},[]),o=Object.entries(this.voice.tickMap).map(([N,g])=>{var L;return[Number(((L=N.match(/-?\d+/))==null?void 0:L[0])??NaN),g]}).sort(([N],[g])=>N-g);o.forEach(([N,g])=>{const L=l.filter(P=>P.tick===N);L.length>0&&L.forEach(P=>{var d;const y=(d=g.ys)==null?void 0:d.findIndex(w=>w===P.y);y>-1&&(g.pitches[y].accidental=s[P.tokenType])})});const u=new Set,f=new Set;let c=!1;return o.forEach(([N,g],L)=>{const P=g instanceof un&&!!g.timeWarp,y=L{var y,d,w,a,p;const P=this.parent.parent.ensureStaffContext(g.staff||0);if(g instanceof un){const m=P.lookupDivisions(this.parent.index),T=P.lookupStaves(this.parent.index),h=P.lookupClef(this.parent.index,+N),S=P.lookupKey(this.parent.index),E=P.lookupTime(this.parent.index),O=[m,S,E,T,h].filter(Boolean).map(M=>M.toJSX());L===0&&this.index===0&&O.length>0&&t.push(D.jsx("attributes",{children:O}));const C=[],b=[];b.push(...new Pa(g.accessories).toJSX()||[]),b.length>0&&C.push(D.jsx("technical",{children:b}));const _=[];g.accessories.some(M=>M.type===I.ScriptStaccato)&&_.push(D.jsx("staccato",{})),g.accessories.some(M=>M.type===I.ScriptSforzato)&&_.push(D.jsx("accent",{})),g.accessories.some(M=>M.type===I.ScriptStaccatissimo)&&_.push(D.jsx("spiccato",{})),g.accessories.some(M=>M.type===I.ScriptMarcato)&&_.push(D.jsx("strong-accent",{})),g.accessories.some(M=>M.type===I.ScriptTenuto)&&_.push(D.jsx("tenuto",{})),g.accessories.some(M=>M.type===I.ScriptPortato)&&_.push(D.jsx("detached-legato",{})),_.length>0&&C.push(D.jsx("articulations",{children:_}));const k=g.accessories.find(M=>M.type===I.ScriptFermata);k&&C.push(D.jsx("fermata",{type:{[We.Up]:"upright",[We.Down]:"inverted"}[k.direction]})),g.accessories.some(M=>M.type===I.SlurBegin)&&g.accessories.filter(M=>M.type===I.SlurBegin).forEach(M=>{C.push(D.jsx("slur",{"default-x":(g.x+M.x).toFixed(2),number:"1",placement:{[We.Up]:"above",[We.Down]:"below"}[M.direction],type:"start"}))}),g.accessories.some(M=>M.type===I.SlurEnd)&&g.accessories.filter(M=>M.type===I.SlurEnd).forEach(M=>{C.push(D.jsx("slur",{"default-x":(g.x+M.x).toFixed(2),number:"1",placement:{[We.Up]:"above",[We.Down]:"below"}[M.direction],type:"stop"}))}),g.accessories.some(M=>M.type===I.TieBegin)&&g.accessories.filter(M=>M.type===I.TieBegin).forEach(M=>{C.push(D.jsx("tied",{type:"start"}))}),g.accessories.some(M=>M.type===I.TieEnd)&&g.accessories.filter(M=>M.type===I.TieEnd).forEach(M=>{C.push(D.jsx("tied",{type:"stop"}))});const ie=[];g.accessories.some(M=>M.type===I.ScriptTurn)&&ie.push(D.jsx("turn",{})),g.accessories.some(M=>M.type===I.ScriptTrill)&&ie.push(D.jsx("trill-mark",{})),g.accessories.some(M=>M.type===I.ScriptMordent)&&ie.push(D.jsx("mordent",{})),g.accessories.some(M=>M.type===I.ScriptPrall)&&ie.push(D.jsx("inverted-mordent",{})),Number.isFinite(g.tremolo)&&ie.push(D.jsx("tremolo",{type:"single",children:g.tremolo})),ie.length>0&&C.push(D.jsx("ornaments",{children:ie})),u.has(g.tick)&&C.push(D.jsx("tuplet",{type:"start"})),f.has(g.tick)&&C.push(D.jsx("tuplet",{type:"stop"})),(g.accessories.some(M=>M.type===I.ScriptArpeggio)||g.arpeggioStyle)&&C.push(D.jsx("arpeggiate",{})),g.glissando&&C.push(D.jsx("glissando",{type:"start",number:"1"}));const Zo=Ea(g.division);if(this.index===0){const M=g.staff-this.parent.parent.template[0]+1;(n.get(g.tick)||[]).forEach(q=>{var or;const xt=(q.duration||"").match(/^(\d+)(\.)?$/),lr=xt?{1:"whole",2:"half",4:"quarter",8:"eighth",16:"16th"}[xt[1]]:"quarter",St=Number(((or=(q.beats||"").match(/\d+/))==null?void 0:or[0])||q.bpm||90);t.push(D.jsxs("direction",{placement:"above",children:[D.jsx("direction-type",{children:D.jsxs("metronome",{children:[D.jsx("beat-unit",{children:lr}),xt&&xt[2]&&D.jsx("beat-unit-dot",{}),D.jsx("per-minute",{children:Math.round(St)})]})}),D.jsx("sound",{tempo:Math.round(q.bpm)})]}))});const st=Da(g.accessories);if(st){const q=st.type;t.push(D.jsxs("direction",{placement:st.direction??"below",children:[D.jsx("direction-type",{children:D.jsx("dynamics",{children:su.createElement(q)})}),D.jsx("staff",{children:M})]}))}const sr=g.accessories.find(q=>q.type===I.WedgeCrescendo),Ft=g.accessories.find(q=>q.type===I.WedgeDiminuendo),zt=g.accessories.find(q=>q.type===I.WedgeClose);sr&&t.push(D.jsxs("direction",{placement:"below",children:[D.jsx("direction-type",{children:D.jsx("wedge",{type:"crescendo"})}),D.jsx("staff",{children:M})]})),Ft&&t.push(D.jsxs("direction",{placement:"below",children:[D.jsx("direction-type",{children:D.jsx("wedge",{type:"diminuendo"})}),D.jsx("staff",{children:M})]})),zt&&t.push(D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("wedge",{type:"stop"})}),D.jsx("staff",{children:M})]})),g.accessories.some(q=>q.type===I.PedalPed)&&t.push(D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("pedal",{type:"start",sign:"yes"})}),D.jsx("staff",{children:M})]})),g.accessories.some(q=>q.type===I.PedalStar)&&t.push(D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("pedal",{type:"stop",sign:"yes"})}),D.jsx("staff",{children:M})]}));const Bt=(d=(y=P.lookupOctaveShift(this.parent.index))==null?void 0:y.getJSX)==null?void 0:d.call(y,g.tick);Bt&&t.push(Bt)}if(g.pitches){const M=g.pitches.length>1;(w=g.pitches)==null||w.forEach((Ue,st)=>{const{alter:sr,step:Ft,octave:zt}=Ta(Ue),Bt={u:"up",d:"down"}[g.stemDirection];if(!this.voice.empty){let q=null;switch(g.beam){case"Open":q=D.jsx("beam",{number:"1",children:"begin"}),this.parent.beamState=g.beam;break;case"Close":q=D.jsx("beam",{number:"1",children:"end"}),this.parent.beamCount+=1,this.parent.beamState=g.beam;break;default:this.parent.beamState==="Open"&&(q=D.jsx("beam",{number:"1",children:"continue"}));break}const xt=g.staff-this.parent.parent.template[0]+1,on=!g.rest&&(M?!!Ue.tying:!!g.tying||g.accessories.some(Me=>Me.type===I.TieBegin)),lr=!g.rest&&(M?!!Ue.tied:!!g.tied||g.accessories.some(Me=>Me.type===I.TieEnd)),St=(st===0?C:[]).slice();on&&St.push(D.jsx("tied",{type:"start"})),lr&&St.push(D.jsx("tied",{type:"stop"}));const or=`${g.staff}:${this.voice.voiceIndexOfStaff}:${this.parent.index}:${g.tick}`,eu=st===0&&!g.rest&&!g.grace?(r.get(or)||[]).slice().sort((Me,tu)=>Me.verse-tu.verse).map(Me=>D.jsxs("lyric",{number:Me.verse+1,children:[D.jsx("syllabic",{children:Me.syllabic||"single"}),D.jsx("text",{children:Me.text}),Me.extend?D.jsx("extend",{}):null]})):[];t.push(D.jsxs("note",{children:[g.grace&&D.jsx("grace",{"steal-time-following":g.duration}),M&&st!==0&&D.jsx("chord",{}),!g.rest&&D.jsxs("pitch",{children:[D.jsx("step",{children:Ft}),sr!==0&&D.jsx("alter",{children:sr}),D.jsx("octave",{children:zt})]}),g.rest==="r"&&D.jsxs("rest",{children:[D.jsx("display-step",{children:Ft}),D.jsx("display-octave",{children:zt})]}),g.rest==="R"&&D.jsxs("rest",{measure:"yes",children:[D.jsx("display-step",{children:Ft}),D.jsx("display-octave",{children:zt})]}),on&&D.jsx("tie",{type:"start"}),lr&&D.jsx("tie",{type:"stop"}),g.grace?null:D.jsx("duration",{children:g.duration}),D.jsx("voice",{children:this.index+1}),D.jsx("type",{children:Zo}),Array(g.dots).fill(null).map(()=>D.jsx("dot",{})),new Ra(Ue.accidental).toJSX(),g.timeWarp&&new ja(g.timeWarp).toJSX(),Bt?D.jsx("stem",{children:Bt}):null,D.jsx("staff",{children:xt}),q,St.length>0&&D.jsx("notations",{children:St}),eu]}))}})}if(this.index===0&&L===o.length-1){const M=P.getCurrentTime(this.parent.index);if(M){const Ue=(p=(a=P.lookupOctaveShift(this.parent.index))==null?void 0:a.getJSX)==null?void 0:p.call(a,Ol*M.beatType/4*M.beats);Ue&&t.push(Ue)}}const Ts=Math.max(...P.clefBuilders.map(M=>M.tick)),Go=Math.max(...Object.keys(this.voice.tickMap).map(M=>+M));if(Ts>=Go){const M=P.lookupClef(this.parent.index,Ts);M&&t.push(D.jsx("attributes",{children:M.toJSX()}))}}}),t}}class Oa{parent;index;divisionsBuilder=new Ia({value:Ol});clefBuilders=[];keyBuilders=[];timeBuilders=[];octave;tied;beamCount=0;octaveShiftBuilders=[];constructor(t){Object.assign(this,t)}lookupDivisions(t){return t===0?this.divisionsBuilder:null}lookupStaves(t){return t===0?new Ca({value:this.parent.stavesCount}):null}addClef(t){this.lookupClef(t.measureIndex,t.tick)||this.clefBuilders.length>0&&Ko.equals(this.clefBuilders[this.clefBuilders.length-1],t)||this.clefBuilders.push(t)}lookupClef(t,r){const n=this.clefBuilders.filter(s=>s.measureIndex===t&&s.tick===r);return n.length>0?n[0]:null}addKey(t){this.lookupKey(t.measureIndex)||this.keyBuilders.length>0&&Jo.equals(this.keyBuilders[this.keyBuilders.length-1],t)||this.keyBuilders.push(t)}lookupKey(t){const r=this.keyBuilders.filter(n=>n.measureIndex===t);return r.length>0?r[0]:null}addTime(t){this.lookupTime(t.measureIndex)||this.timeBuilders.length>0&&Yo.equals(this.timeBuilders[this.timeBuilders.length-1],t)||this.timeBuilders.push(t)}lookupTime(t){const r=this.timeBuilders.filter(n=>n.measureIndex===t);return r.length>0?r[0]:null}getCurrentTime(t){const r=this.timeBuilders.filter(n=>n.measureIndex<=t);return r.sort((n,s)=>n.measureIndex-s.measureIndex),r[r.length-1]}addOctaveShiftTerm(t,r){let n=this.octaveShiftBuilders.find(s=>s.measureIndex===r);n||(n=new Xa({parent:this,measureIndex:r}),this.octaveShiftBuilders.push(n)),n.addTerm(t)}lookupOctaveShift(t){const r=this.octaveShiftBuilders.filter(n=>n.measureIndex===t);return r.length>0?r[0]:null}}class Ko{parent;measureIndex;tick;number;sign;line;size="full";afterBarline=!0;additional=!1;constructor(t){Object.assign(this,t)}static equals(t,r){return t&&r&&t.number===r.number&&t.sign===r.sign&&t.line===r.line&&t.size===r.size}toJSX(){return D.jsxs("clef",{number:this.number+1,size:this.size,additional:this.additional?"yes":"no","after-barline":this.afterBarline?"yes":"no",children:[D.jsx("sign",{children:this.sign}),D.jsx("line",{children:this.line})]})}}class Jo{parent;measureIndex;fifths;mode;constructor(t){Object.assign(this,t)}static equals(t,r){return t&&r&&t.fifths===r.fifths&&t.mode===r.mode}toJSX(){return D.jsxs("key",{children:[D.jsx("fifths",{children:this.fifths}),this.mode?D.jsx("mode",{children:this.mode}):null]})}}class Yo{parent;measureIndex;beats;beatType;timeSigNumeric;constructor(t){Object.assign(this,t)}static equals(t,r){return t&&r&&t.beats===r.beats&&t.beatType===r.beatType}toJSX(){const t={};return this.beats===2&&this.beatType===2&&(t.symbol="cut"),this.beats===4&&this.beatType===4&&(t.symbol="common"),D.jsxs("time",{...t,children:[D.jsx("beats",{children:this.beats}),D.jsx("beat-type",{children:this.beatType})]})}}class Ia{value;constructor(t){Object.assign(this,t)}toJSX(){return D.jsx("divisions",{children:this.value})}}class Ca{value;constructor(t){Object.assign(this,t)}toJSX(){return D.jsx("staves",{children:this.value})}}const Ml={[I.Zero]:0,[I.One]:1,[I.Two]:2,[I.Three]:3,[I.Four]:4,[I.Five]:5,[I.Six]:6,[I.Seven]:7,[I.Eight]:8,[I.Nine]:9};class Pa{value;placement;data;constructor(t){this.data=t}toJSX(){const t=Object.keys(Ml),r=this.data.filter(n=>t.includes(n.type));return r.length>0?r.map(n=>D.jsx("fingering",{placement:{[We.Up]:"above",[We.Down]:"below"}[n.direction],children:Ml[n.type]})):null}}class ja{timeWarp;constructor(t){this.timeWarp=t}toJSX(){return D.jsxs("time-modification",{children:[D.jsx("actual-notes",{children:this.timeWarp.denominator}),D.jsx("normal-notes",{children:this.timeWarp.numerator})]})}}const ka={"-2":"flat-flat","-1":"flat",0:"natural",1:"sharp",2:"double-sharp"};class Ra{alter;constructor(t){this.alter=t}toJSX(){return typeof this.alter=="number"?D.jsx("accidental",{children:ka[this.alter]}):null}}class Xa{parent;measureIndex;number;terms=[];constructor(t){Object.assign(this,t)}addTerm(t){this.terms.find(r=>r.tick===t.tick)||this.terms.push(t)}getJSX(t){const r=this.terms.find(s=>s.tick===t);if(!r)return null;let n="up";switch(r.tokenType){case I.OctaveShift8vb:n="up";break;case I.OctaveShift8va:n="down";break;case I.OctaveShift0:n="stop";break}return D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("octave-shift",{size:"8",type:n,number:"1"})}),D.jsx("staff",{children:this.parent.parent.template.indexOf(this.parent.index)+1})]})}validate(){if(this.terms.length===0)return!0;this.terms.sort((n,s)=>n.tick-s.tick);const t=[],r=[];for(let n of this.terms)[I.OctaveShift8va,I.OctaveShift8vb].includes(n.tokenType)&&r.push(n),I.OctaveShift0===n.tokenType&&(r.push(n),t.push([...r]),r.length=0);return t.some(n=>n.length!==2)||r.length===1?(console.error("八度记号配对错误"),!1):!0}toJSX(){}}export{Ga as S};