starry / dist /assets /ScoreEncoder-72da943f.js
k-l-lambda's picture
update: export from starry-refactor 2026-07-24 19:52
3584b5f
Raw
History Blame Contribute Delete
170 kB
import{r as nu,ao as iu,g as su,k as R,j as T,R as lu}from"./umi-a12c8253.js";import"./parser-b66b074b.js";import{W as ou,a as I,b as uu,E as un,A as We}from"./index-43517c6d.js";const Ol=ou/4,au=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<r;){var n=r-1>>>1,s=e[n];if(0<vr(s,t))e[n]=t,e[r]=s,r=n;else break e}}function Ee(e){return e.length===0?null:e[0]}function Or(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,s=e.length,i=s>>>1;n<i;){var l=2*(n+1)-1,o=e[l],u=l+1,f=e[u];if(0>vr(o,r))u<s&&0>vr(f,o)?(e[n]=f,e[u]=r,n=u):(e[n]=o,e[l]=r,n=l);else if(u<s&&0>vr(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=[],cu=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"&&0<r?n+r:n):r=n,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=r+s,e={id:cu++,callback:t,priorityLevel:e,startTime:r,expirationTime:s,sortIndex:-1},r>n?(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 hu=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=nu,Rl=hu,be=iu;function Ds(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function du(e,t,r){return t&&Ds(e.prototype,t),r&&Ds(e,r),e}var ct=Object.assign,nt=kl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ur=Symbol.for("react.element"),Wt=Symbol.for("react.portal"),Dt=Symbol.for("react.fragment"),Xi=Symbol.for("react.strict_mode"),li=Symbol.for("react.profiler"),Xl=Symbol.for("react.provider"),Fl=Symbol.for("react.context"),Fi=Symbol.for("react.forward_ref"),oi=Symbol.for("react.suspense"),ui=Symbol.for("react.suspense_list"),zi=Symbol.for("react.memo"),Ve=Symbol.for("react.lazy"),zl=Symbol.for("react.offscreen"),Es=Symbol.iterator;function _t(e){return e===null||typeof e!="object"?null:(e=Es&&e[Es]||e["@@iterator"],typeof e=="function"?e:null)}function Cr(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dt:return"Fragment";case Wt:return"Portal";case li:return"Profiler";case Xi:return"StrictMode";case oi:return"Suspense";case ui:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fl:return(e.displayName||"Context")+".Consumer";case Xl:return(e._context.displayName||"Context")+".Provider";case Fi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zi:return t=e.displayName||null,t!==null?t:Cr(e.type)||"Memo";case Ve:t=e._payload,e=e._init;try{return Cr(e(t))}catch{}}return null}function fu(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Cr(t);case 8:return t===Xi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Ns(e){if(Jr(e)!==e)throw Error("Unable to find node on an unmounted component.")}function Bl(e){var t=e.alternate;if(!t){if(t=Jr(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Ns(s),e;if(i===n)return Ns(s),t;i=i.sibling}throw Error("Unable to find node on an unmounted component.")}if(r.return!==n.return)r=s,n=i;else{for(var l=!1,o=s.child;o;){if(o===r){l=!0,r=s,n=i;break}if(o===n){l=!0,n=s,r=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===r){l=!0,r=i,n=s;break}if(o===n){l=!0,n=i,r=s;break}o=o.sibling}if(!l)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==n)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag!==3)throw Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?e:t}function _l(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_l(e);if(t!==null)return t;e=e.sibling}return null}var Vt=Array.isArray,Bi=be.unstable_scheduleCallback,Ls=be.unstable_cancelCallback,pu=be.unstable_shouldYield,mu=be.unstable_requestPaint,$=be.unstable_now,ai=be.unstable_ImmediatePriority,gu=be.unstable_UserBlockingPriority,ci=be.unstable_NormalPriority,yu=be.unstable_IdlePriority,Yr=null,ke=null;function vu(e){if(ke&&typeof ke.onCommitFiberRoot=="function")try{ke.onCommitFiberRoot(Yr,e,void 0,(e.current.flags&128)===128)}catch{}}var vt=Math.clz32?Math.clz32:Su,wu=Math.log,xu=Math.LN2;function Su(e){return e>>>=0,e===0?32:31-(wu(e)/xu|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;0<t;)r=31-vt(t),s=1<<r,n|=e[r],t&=~s;return n}function Tu(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bl(){var e=ar;return ar<<=1,!(ar&4194240)&&(ar=64),e}function an(e){for(var t=[],r=0;31>r;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 Du(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;0<r;){var s=31-vt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function Al(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-vt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var K=0;function Ul(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}function Ke(){throw Error("The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.")}var di={},Eu={},Nu=new WeakMap;function jr(e){switch(e.tag){case"INSTANCE":var t=e.rootContainerInstance.createNodeMock;return t=t({type:e.type,props:e.props}),typeof t=="object"&&t!==null&&Nu.set(t,e),t;default:return e}}function ql(e,t){var r=e.children.indexOf(t);r!==-1&&e.children.splice(r,1),e.children.push(t)}function Wl(e,t,r){var n=e.children.indexOf(t);n!==-1&&e.children.splice(n,1),r=e.children.indexOf(r),e.children.splice(r,0,t)}var Ms=setTimeout,Lu=clearTimeout,cn;function Qt(e){if(cn===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);cn=t&&t[1]||""}return`
`+cn+e}var hn=!1;function dn(e,t){if(!e||hn)return"";hn=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var n=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){n=f}e.call(t.prototype)}else{try{throw Error()}catch(f){n=f}e()}}catch(f){if(f&&n&&typeof f.stack=="string"){for(var s=f.stack.split(`
`),i=n.stack.split(`
`),l=s.length-1,o=i.length-1;1<=l&&0<=o&&s[l]!==i[o];)o--;for(;1<=l&&0<=o;l--,o--)if(s[l]!==i[o]){if(l!==1||o!==1)do if(l--,o--,0>o||s[l]!==i[o]){var u=`
`+s[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",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 Mu=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((fu(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 Ou(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Le=typeof Object.is=="function"?Object.is:Ou,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;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ge=null,Gr=!1}catch(s){throw ge!==null&&(ge=ge.slice(e+1)),Bi(ai,wt),s}finally{K=t,fn=!1}}return null}var pn=[],dr=0,Cs=null,fr=[],Tt=0,Ps=null;function _i(e){for(;e===Cs;)Cs=pn[--dr],pn[dr]=null,--dr,pn[dr]=null;for(;e===Ps;)Ps=fr[--Tt],fr[Tt]=null,--Tt,fr[Tt]=null,--Tt,fr[Tt]=null}var ze=null,Iu=nt.ReactCurrentBatchConfig;function Xr(e,t){if(Le(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Mu.call(t,s)||!Le(e[s],t[s]))return!1}return!0}function Cu(e){switch(e.tag){case 5:return Qt(e.type);case 16:return Qt("Lazy");case 13:return Qt("Suspense");case 19:return Qt("SuspenseList");case 0:case 2:case 15:return e=dn(e.type,!1),e;case 11:return e=dn(e.type.render,!1),e;case 1:return e=dn(e.type,!0),e;default:return""}}function bt(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");var n=r.stateNode}if(!n)throw Error("Missing owner for string ref "+e+". This error is likely caused by a bug in React. Please file an issue.");var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var o=s.refs;l===null?delete o[i]:o[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!r._owner)throw Error("Element ref was specified as a string ("+e+`) but no owner was set. This could happen for one of the following reasons:
1. You may be adding a ref to a function component
2. You may be adding a ref to a component that was not created inside a component's render method
3. You have multiple copies of React loaded
See https://reactjs.org/link/refs-must-have-owner for more information.`)}return e}function pr(e,t){throw e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}function js(e){var t=e._init;return t(e._payload)}function Ql(e){function t(y,d){if(e){var w=y.deletions;w===null?(y.deletions=[d],y.flags|=16):w.push(d)}}function r(y,d){if(!e)return null;for(;d!==null;)t(y,d),d=d.sibling;return null}function n(y,d){for(y=new Map;d!==null;)d.key!==null?y.set(d.key,d):y.set(d.index,d),d=d.sibling;return y}function s(y,d){return y=et(y,d),y.index=0,y.sibling=null,y}function i(y,d,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<d?(y.flags|=2,d):w):(y.flags|=2,d)):(y.flags|=1048576,d)}function l(y){return e&&y.alternate===null&&(y.flags|=2),y}function o(y,d,w,a){return d===null||d.tag!==6?(d=Sn(w,y.mode,a),d.return=y,d):(d=s(d,w),d.return=y,d)}function u(y,d,w,a){var p=w.type;return p===Dt?c(y,d,w.props.children,a,w.key):d!==null&&(d.elementType===p||typeof p=="object"&&p!==null&&p.$$typeof===Ve&&js(p)===d.type)?(a=s(d,w.props),a.ref=bt(y,d,w),a.return=y,a):(a=Nr(w.type,w.key,w.props,null,y.mode,a),a.ref=bt(y,d,w),a.return=y,a)}function f(y,d,w,a){return d===null||d.tag!==4||d.stateNode.containerInfo!==w.containerInfo||d.stateNode.implementation!==w.implementation?(d=Tn(w,y.mode,a),d.return=y,d):(d=s(d,w.children||[]),d.return=y,d)}function c(y,d,w,a,p){return d===null||d.tag!==7?(d=ft(w,y.mode,a,p),d.return=y,d):(d=s(d,w),d.return=y,d)}function v(y,d,w){if(typeof d=="string"&&d!==""||typeof d=="number")return d=Sn(""+d,y.mode,w),d.return=y,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case ur:return w=Nr(d.type,d.key,d.props,null,y.mode,w),w.ref=bt(y,null,d),w.return=y,w;case Wt:return d=Tn(d,y.mode,w),d.return=y,d;case Ve:var a=d._init;return v(y,a(d._payload),w)}if(Vt(d)||_t(d))return d=ft(d,y.mode,w,null),d.return=y,d;pr(y,d)}return null}function x(y,d,w,a){var p=d!==null?d.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return p!==null?null:o(y,d,""+w,a);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ur:return w.key===p?u(y,d,w,a):null;case Wt:return w.key===p?f(y,d,w,a):null;case Ve:return p=w._init,x(y,d,p(w._payload),a)}if(Vt(w)||_t(w))return p!==null?null:c(y,d,w,a,null);pr(y,w)}return null}function N(y,d,w,a,p){if(typeof a=="string"&&a!==""||typeof a=="number")return y=y.get(w)||null,o(d,y,""+a,p);if(typeof a=="object"&&a!==null){switch(a.$$typeof){case ur:return y=y.get(a.key===null?w:a.key)||null,u(d,y,a,p);case Wt:return y=y.get(a.key===null?w:a.key)||null,f(d,y,a,p);case Ve:var m=a._init;return N(y,d,w,m(a._payload),p)}if(Vt(a)||_t(a))return y=y.get(w)||null,c(d,y,a,p,null);pr(d,a)}return null}function g(y,d,w,a){for(var p=null,m=null,D=d,h=d=0,S=null;D!==null&&h<w.length;h++){D.index>h?(S=D,D=null):S=D.sibling;var E=x(y,D,w[h],a);if(E===null){D===null&&(D=S);break}e&&D&&E.alternate===null&&t(y,D),d=i(E,d,h),m===null?p=E:m.sibling=E,m=E,D=S}if(h===w.length)return r(y,D),p;if(D===null){for(;h<w.length;h++)D=v(y,w[h],a),D!==null&&(d=i(D,d,h),m===null?p=D:m.sibling=D,m=D);return p}for(D=n(y,D);h<w.length;h++)S=N(D,y,h,w[h],a),S!==null&&(e&&S.alternate!==null&&D.delete(S.key===null?h:S.key),d=i(S,d,h),m===null?p=S:m.sibling=S,m=S);return e&&D.forEach(function(O){return t(y,O)}),p}function L(y,d,w,a){var p=_t(w);if(typeof p!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");if(w=p.call(w),w==null)throw Error("An iterable object provided no iterator.");for(var m=p=null,D=d,h=d=0,S=null,E=w.next();D!==null&&!E.done;h++,E=w.next()){D.index>h?(S=D,D=null):S=D.sibling;var O=x(y,D,E.value,a);if(O===null){D===null&&(D=S);break}e&&D&&O.alternate===null&&t(y,D),d=i(O,d,h),m===null?p=O:m.sibling=O,m=O,D=S}if(E.done)return r(y,D),p;if(D===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(D=n(y,D);!E.done;h++,E=w.next())E=N(D,y,h,E.value,a),E!==null&&(e&&E.alternate!==null&&D.delete(E.key===null?h:E.key),d=i(E,d,h),m===null?p=E:m.sibling=E,m=E);return e&&D.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),Pu=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;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,typeof s!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+s);s.call(r)}}}var ir={},Re=it(ir),Yt=it(ir),Zt=it(ir);function at(e){if(e===ir)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function Vi(e,t){z(Zt,t),z(Yt,e),z(Re,ir),B(Re),z(Re,di)}function Xt(){B(Re),B(Yt),B(Zt)}function Kl(e){at(Zt.current),at(Re.current)!==di&&(z(Yt,e),z(Re,di))}function Qi(e){Yt.current===e&&(B(Re),B(Yt))}var A=it(0);function _r(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r.dehydrated===null||Ke()||Ke()))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=[];function $i(){for(var e=0;e<mn.length;e++)mn[e]._workInProgressVersionSecondary=null;mn.length=0}var xr=nt.ReactCurrentDispatcher,gn=nt.ReactCurrentBatchConfig,gt=0,U=null,Q=null,J=null,br=!1,$t=!1,ju=0;function G(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Hi(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Le(e[r],t[r]))return!1;return!0}function Ki(e,t,r,n,s,i){if(gt=i,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xr.current=e===null||e.memoizedState===null?Fu:zu,e=r(n,s),$t){i=0;do{if($t=!1,25<=i)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");i+=1,J=Q=null,t.updateQueue=null,xr.current=Bu,e=r(n,s)}while($t)}if(xr.current=Ar,t=Q!==null&&Q.next!==null,gt=0,J=Q=U=null,br=!1,t)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return e}function Ce(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return J===null?U.memoizedState=J=e:J=J.next=e,J}function Se(){if(Q===null){var e=U.alternate;e=e!==null?e.memoizedState:null}else e=Q.next;var t=J===null?U.memoizedState:J.next;if(t!==null)J=t,Q=e;else{if(e===null)throw Error("Rendered more hooks than during the previous render.");Q=e,e={memoizedState:Q.memoizedState,baseState:Q.baseState,baseQueue:Q.baseQueue,queue:Q.queue,next:null},J===null?U.memoizedState=J=e:J=J.next=e}return J}function Gt(e,t){return typeof t=="function"?t(e):t}function yn(e){var t=Se(),r=t.queue;if(r===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");r.lastRenderedReducer=e;var n=Q,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var l=s.next;s.next=i.next,i.next=l}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var o=l=null,u=null,f=i;do{var c=f.lane;if((gt&c)===c)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),n=f.hasEagerState?f.eagerState:e(n,f.action);else{var v={lane:c,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(o=u=v,l=n):u=u.next=v,U.lanes|=c,yt|=c}f=f.next}while(f!==null&&f!==i);u===null?l=n:u.next=o,Le(n,t.memoizedState)||(ae=!0),t.memoizedState=n,t.baseState=l,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,U.lanes|=i,yt|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function vn(e){var t=Se(),r=t.queue;if(r===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var l=s=s.next;do i=e(i,l.action),l=l.next;while(l!==s);Le(i,t.memoizedState)||(ae=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Jl(){}function Yl(e,t){var r=U,n=Se(),s=t(),i=!Le(n.memoizedState,s);if(i&&(n.memoizedState=s,ae=!0),n=n.queue,Ji(eo.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||J!==null&&J.memoizedState.tag&1){if(r.flags|=2048,er(9,Gl.bind(null,r,n,s,t),void 0,null),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)}return s}function Zl(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=U.updateQueue,t===null?(t={lastEffect:null,stores:null},U.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Gl(e,t,r,n){t.value=r,t.getSnapshot=n,to(t)&&ro(e)}function eo(e,t,r){return r(function(){to(t)&&ro(e)})}function to(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Le(e,r)}catch{return!0}}function ro(e){var t=Rt(e,1);t!==null&&Ge(t,e,1,-1)}function Xs(e){var t=Ce();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:e},t.queue=e,e=e.dispatch=Xu.bind(null,U,e),[t.memoizedState,e]}function er(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=U.updateQueue,t===null?(t={lastEffect:null,stores:null},U.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function no(){return Se().memoizedState}function Sr(e,t,r,n){var s=Ce();U.flags|=e,s.memoizedState=er(1|t,r,void 0,n===void 0?null:n)}function en(e,t,r,n){var s=Se();n=n===void 0?null:n;var i=void 0;if(Q!==null){var l=Q.memoizedState;if(i=l.destroy,n!==null&&Hi(n,l.deps)){s.memoizedState=er(t,r,i,n);return}}U.flags|=e,s.memoizedState=er(1|t,r,i,n)}function Fs(e,t){return Sr(8390656,8,e,t)}function Ji(e,t){return en(2048,8,e,t)}function io(e,t){return en(4,2,e,t)}function so(e,t){return en(4,4,e,t)}function lo(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function oo(e,t,r){return r=r!=null?r.concat([e]):null,en(4,4,lo.bind(null,t,e),r)}function Yi(){}function uo(e,t){var r=Se();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Hi(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function ao(e,t){var r=Se();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Hi(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function co(e,t,r){return gt&21?(Le(r,t)||(r=bl(),U.lanes|=r,yt|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ae=!0),e.memoizedState=r)}function ku(e,t){var r=K;K=r!==0&&4>r?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 Ru(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 Xu(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},Fu={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=Ru.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=ku.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=ju++;return t=":"+t+"r"+r.toString(32)+":",e.memoizedState=t},unstable_isNewReconciler:!1},zu={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},Bu={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+=Cu(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 _u=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 _u;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=ea.bind(null,e,t,r),t.then(e,e))}var bu=nt.ReactCurrentOwner,ae=!1;function le(e,t,r,n){t.child=e===null?Pu(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,bu.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 Au(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 Au(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,ta.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 Uu(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=Eu)&&(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 qu(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 Wu(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 Vu=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 Qu(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 Vu),t.forEach(function(n){var s=ra.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;n<r.length;n++){var s=r[n];try{var i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:se=o.stateNode;break e;case 3:se=o.stateNode.containerInfo;break e;case 4:se=o.stateNode.containerInfo;break e}o=o.return}if(se===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Co(i,l,s),se=null;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(f){ue(s,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Po(t,e),t=t.sibling}function Po(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Oe(t,e),Ie(e),n&4){try{qr(3,e,e.return),es(3,e)}catch(i){ue(e,e.return,i)}try{qr(5,e,e.return)}catch(i){ue(e,e.return,i)}}break;case 1:Oe(t,e),Ie(e),n&512&&r!==null&&Ur(r,r.return);break;case 5:if(Oe(t,e),Ie(e),n&512&&r!==null&&Ur(r,r.return),n&4){var s=e.stateNode;if(s!=null&&(n=e.memoizedProps,t=e.type,r=e.updateQueue,e.updateQueue=null,r!==null))try{s.type=t,s.props=n}catch(i){ue(e,e.return,i)}}break;case 6:if(Oe(t,e),Ie(e),n&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");s=e.stateNode,n=e.memoizedProps;try{s.text=n}catch(i){ue(e,e.return,i)}}break;case 3:Oe(t,e),Ie(e);break;case 4:Oe(t,e),Ie(e);break;case 13:Oe(t,e),Ie(e),s=e.child,s.flags&8192&&(t=s.memoizedState!==null,s.stateNode.isHidden=t,!t||s.alternate!==null&&s.alternate.memoizedState!==null||(ns=$())),n&4&&Qs(e);break;case 22:if(Oe(t,e),Ie(e),n&8192)e:for(n=e.memoizedState!==null,e.stateNode.isHidden=n,t=null,r=e;;){if(r.tag===5){if(t===null){t=r;try{s=r.stateNode,n?s.isHidden=!0:r.stateNode.isHidden=!1}catch(i){ue(e,e.return,i)}}}else if(r.tag===6){if(t===null)try{r.stateNode.isHidden=!!n}catch(i){ue(e,e.return,i)}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;t===r&&(t=null),r=r.return}t===r&&(t=null),r.sibling.return=r.return,r=r.sibling}break;case 19:Oe(t,e),Ie(e),n&4&&Qs(e);break;case 21:break;default:Oe(t,e),Ie(e)}}function Ie(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Io(r)){var n=r;break e}r=r.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(n.flags&=-33);var i=Vs(e);Ni(e,i,s);break;case 3:case 4:var l=n.stateNode.containerInfo,o=Vs(e);Ei(e,o,l);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}catch(u){ue(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $u(e){for(j=e;j!==null;){var t=j,r=t.child;if(t.subtreeFlags&8772&&r!==null)r.return=t,j=r;else for(t=e;j!==null;){if(r=j,r.flags&8772){var n=r.alternate;try{if(r.flags&8772)switch(r.tag){case 0:case 11:case 15:es(5,r);break;case 1:var s=r.stateNode;if(r.flags&4)if(n===null)s.componentDidMount();else{var i=r.elementType===r.type?n.memoizedProps:De(r.type,n.memoizedProps);s.componentDidUpdate(i,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var l=r.updateQueue;l!==null&&Rs(r,l,s);break;case 3:var o=r.updateQueue;if(o!==null){if(n=null,r.child!==null)switch(r.child.tag){case 5:n=jr(r.child.stateNode);break;case 1:n=r.child.stateNode}Rs(r,o,n)}break;case 5:break;case 6:break;case 4:break;case 12:break;case 13:break;case 19:case 17:case 21:case 22:case 23:case 25: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.")}if(r.flags&512){n=void 0;var u=r.ref;if(u!==null){var f=r.stateNode;switch(r.tag){case 5:n=jr(f);break;default:n=f}typeof u=="function"?u(n):u.current=n}}}catch(c){ue(r,r.return,c)}}if(r===t){j=null;break}if(n=r.sibling,n!==null){n.return=r.return,j=n;break}j=r.return}}}var Hu=Math.ceil,Wr=nt.ReactCurrentDispatcher,ts=nt.ReactCurrentOwner,ve=nt.ReactCurrentBatchConfig,X=0,Y=null,W=null,Z=0,pe=0,Lt=it(0),H=0,tr=null,yt=0,rn=0,rs=0,Ht=null,oe=null,ns=0,rr=1/0,Fe=null,Vr=!1,Li=null,Ze=null,gr=!1,Je=null,Qr=0,Kt=0,Mi=null,Dr=-1,Er=0;function Ne(){return X&6?$():Dr!==-1?Dr:Dr=$()}function It(e){return e.mode&1?X&2&&Z!==0?Z&-Z:Iu.transition!==null?(Er===0&&(Er=bl()),Er):(e=K,e!==0?e:16):1}function Ge(e,t,r,n){if(50<Kt)throw Kt=0,Mi=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Zr(e,r,n),(!(X&2)||e!==Y)&&(e===Y&&(!(X&2)&&(rn|=r),H===4&&$e(e,Z)),we(e,n),r===1&&X===0&&!(t.mode&1)&&(rr=$()+500,Gr&&wt()))}function we(e,t){for(var r=e.callbackNode,n=e.suspendedLanes,s=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var o=31-vt(l),u=1<<o,f=i[o];f===-1?(!(u&n)||u&s)&&(i[o]=Tu(u,t)):f<=t&&(e.expiredLanes|=u),l&=~u}if(n=Pr(e,e===Y?Z:0),n===0)r!==null&&Ls(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Ls(r),t===1)e.tag===0?(r=$s.bind(null,e),Gr=!0,ge===null?ge=[r]:ge.push(r)):(r=$s.bind(null,e),ge===null?ge=[r]:ge.push(r)),Bi(ai,wt),r=null;else{switch(Ul(n)){case 1:r=ai;break;case 4:r=gu;break;case 16:r=ci;break;case 536870912:r=yu;break;default:r=ci}r=_o(r,jo.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function jo(e,t){if(Dr=-1,Er=0,X&6)throw Error("Should not already be working.");var r=e.callbackNode;if(Ct()&&e.callbackNode!==r)return null;var n=Pr(e,e===Y?Z:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=$r(e,n);else{t=n;var s=X;X|=2;var i=Ro();(Y!==e||Z!==t)&&(Fe=null,rr=$()+500,dt(e,t));do try{Zu();break}catch(o){ko(e,o)}while(1);Ai(),Wr.current=i,X=s,W!==null?t=0:(Y=null,Z=0,t=H)}if(t!==0){if(t===2&&(s=hi(e),s!==0&&(n=s,t=Oi(e,s))),t===1)throw r=tr,dt(e,0),$e(e,n),we(e,$()),r;if(t===6)$e(e,n);else{if(s=e.current.alternate,!(n&30)&&!Ku(s)&&(t=$r(e,n),t===2&&(i=hi(e),i!==0&&(n=i,t=Oi(e,i))),t===1))throw r=tr,dt(e,0),$e(e,n),we(e,$()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error("Root did not complete. This is a bug in React.");case 2:ot(e,oe,Fe);break;case 3:if($e(e,n),(n&130023424)===n&&(t=ns+500-$(),10<t)){if(Pr(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ne(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ms(ot.bind(null,e,oe,Fe),t);break}ot(e,oe,Fe);break;case 4:if($e(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var l=31-vt(n);i=1<<l,l=t[l],l>s&&(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*Hu(n/1960))-n,10<n){e.timeoutHandle=Ms(ot.bind(null,e,oe,Fe),n);break}ot(e,oe,Fe);break;case 5:ot(e,oe,Fe);break;default:throw Error("Unknown root exit status.")}}}return we(e,$()),e.callbackNode===r?jo.bind(null,e):null}function Oi(e,t){var r=Ht;return e.current.memoizedState.isDehydrated&&(dt(e,t).flags|=256),e=$r(e,t),e!==2&&(t=oe,oe=r,t!==null&&Ii(t)),e}function Ii(e){oe===null?oe=e:oe.push.apply(oe,e)}function Ku(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Le(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $e(e,t){for(t&=~rs,t&=~rn,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-vt(t),n=1<<r;e[r]=-1,t&=~n}}function $s(e){if(X&6)throw Error("Should not already be working.");Ct();var t=Pr(e,0);if(!(t&1))return we(e,$()),null;var r=$r(e,t);if(e.tag!==0&&r===2){var n=hi(e);n!==0&&(t=n,r=Oi(e,n))}if(r===1)throw r=tr,dt(e,0),$e(e,t),we(e,$()),r;if(r===6)throw Error("Root did not complete. This is a bug in React.");return e.finishedWork=e.current.alternate,e.finishedLanes=t,ot(e,oe,Fe),we(e,$()),null}function Ju(e){Je!==null&&Je.tag===0&&!(X&6)&&Ct();var t=X;X|=1;var r=ve.transition,n=K;try{if(ve.transition=null,K=1,e)return e()}finally{K=n,ve.transition=r,X=t,!(X&6)&&wt()}}function is(){pe=Lt.current,B(Lt)}function dt(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Lu(r)),W!==null)for(r=W.return;r!==null;){var n=r;switch(_i(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&kr();break;case 3:Xt(),B(de),B(ne),$i();break;case 5:Qi(n);break;case 4:Xt();break;case 13:B(A);break;case 19:B(A);break;case 10:Ui(n.type._context);break;case 22:case 23:is()}r=r.return}if(Y=e,W=e=et(e.current,null),Z=pe=t,H=0,tr=null,rs=rn=yt=0,oe=Ht=null,ut!==null){for(t=0;t<ut.length;t++)if(r=ut[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var l=i.next;i.next=s,n.next=l}r.pending=n}ut=null}return e}function ko(e,t){do{var r=W;try{if(Ai(),xr.current=Ar,br){for(var n=U.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}br=!1}if(gt=0,J=Q=U=null,$t=!1,ts.current=null,r===null||r.return===null){H=1,tr=t,W=null;break}e:{var i=e,l=r.return,o=r,u=t;if(t=Z,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,c=o,v=c.tag;if(!(c.mode&1)&&(v===0||v===11||v===15)){var x=c.alternate;x?(c.updateQueue=x.updateQueue,c.memoizedState=x.memoizedState,c.lanes=x.lanes):(c.updateQueue=null,c.memoizedState=null)}t:{c=l;do{var N;if(N=c.tag===13){var g=c.memoizedState;N=g!==null?g.dehydrated!==null:!0}if(N){var L=c;break t}c=c.return}while(c!==null);L=null}if(L!==null){if(L.flags&=-257,u=L,c=t,u.mode&1)u.flags|=65536,u.lanes=c;else if(u===l)u.flags|=65536;else{if(u.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1)if(o.alternate===null)o.tag=17;else{var P=Ye(-1,1);P.tag=2,ht(o,P,1)}o.lanes|=1}L.mode&1&&_s(i,f,t),t=L,i=f;var y=t.updateQueue;if(y===null){var d=new Set;d.add(i),t.updateQueue=d}else y.add(i);break e}else{if(!(t&1)){_s(i,f,t),ss();break e}u=Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.")}}i=u=Zi(u,o),H!==4&&(H=2),Ht===null?Ht=[i]:Ht.push(i),i=l;do{switch(i.tag){case 3:f=u,i.flags|=65536,t&=-t,i.lanes|=t;var w=yo(i,f,t);ks(i,w);break e;case 1:f=u;var a=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof a.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Ze===null||!Ze.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var m=vo(i,f,t);ks(i,m);break e}}i=i.return}while(i!==null)}Fo(r)}catch(D){t=D,W===r&&r!==null&&(W=r=r.return);continue}break}while(1)}function Ro(){var e=Wr.current;return Wr.current=Ar,e===null?Ar:e}function ss(){(H===0||H===3||H===2)&&(H=4),Y===null||!(yt&268435455)&&!(rn&268435455)||$e(Y,Z)}function $r(e,t){var r=X;X|=2;var n=Ro();(Y!==e||Z!==t)&&(Fe=null,dt(e,t));do try{Yu();break}catch(s){ko(e,s)}while(1);if(Ai(),X=r,Wr.current=n,W!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Y=null,Z=0,H}function Yu(){for(;W!==null;)Xo(W)}function Zu(){for(;W!==null&&!pu();)Xo(W)}function Xo(e){var t=Bo(e.alternate,e,pe);e.memoizedProps=e.pendingProps,t===null?Fo(e):W=t,ts.current=null}function Fo(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Wu(r,t),r!==null){r.flags&=32767,W=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{H=6,W=null;return}}else if(r=qu(r,t,pe),r!==null){W=r;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);H===0&&(H=5)}function ot(e,t,r){var n=K,s=ve.transition;try{ve.transition=null,K=1,Gu(e,t,r,n)}finally{ve.transition=s,K=n}return null}function Gu(e,t,r,n){do Ct();while(Je!==null);if(X&6)throw Error("Should not already be working.");r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Du(e,i),e===Y&&(W=Y=null,Z=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||gr||(gr=!0,_o(ci,function(){return Ct(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=ve.transition,ve.transition=null;var l=K;K=1;var o=X;X|=4,ts.current=null,Qu(e,r),Po(r,e),e.current=r,$u(r),mu(),X=o,K=l,ve.transition=i}else e.current=r;if(gr&&(gr=!1,Je=e,Qr=s),i=e.pendingLanes,i===0&&(Ze=null),vu(r.stateNode),we(e,$()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Vr)throw Vr=!1,e=Li,Li=null,e;return Qr&1&&e.tag!==0&&Ct(),i=e.pendingLanes,i&1?e===Mi?Kt++:(Kt=0,Mi=e):Kt=0,wt(),null}function Ct(){if(Je!==null){var e=Ul(Qr),t=ve.transition,r=K;try{if(ve.transition=null,K=16>e?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<o.length;u++){var f=o[u];for(j=f;j!==null;){var c=j;switch(c.tag){case 0:case 11:case 15:qr(8,c,i)}var v=c.child;if(v!==null)v.return=c,j=v;else for(;j!==null;){c=j;var x=c.sibling,N=c.return;if(Oo(c),c===f){j=null;break}if(x!==null){x.return=N,j=x;break}j=N}}}var g=i.alternate;if(g!==null){var L=g.child;if(L!==null){g.child=null;do{var P=L.sibling;L.sibling=null,L=P}while(L!==null)}}j=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,j=l;else e:for(;j!==null;){if(i=j,i.flags&2048)switch(i.tag){case 0:case 11:case 15:qr(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,j=y;break e}j=i.return}}var d=e.current;for(j=d;j!==null;){l=j;var w=l.child;if(l.subtreeFlags&2064&&w!==null)w.return=l,j=w;else e:for(l=d;j!==null;){if(o=j,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:es(9,o)}}catch(p){ue(o,o.return,p)}if(o===l){j=null;break e}var a=o.sibling;if(a!==null){a.return=o.return,j=a;break e}j=o.return}}if(X=s,wt(),ke&&typeof ke.onPostCommitFiberRoot=="function")try{ke.onPostCommitFiberRoot(Yr,e)}catch{}n=!0}return n}finally{K=r,ve.transition=t}}return!1}function Hs(e,t,r){t=Zi(r,t),t=yo(e,t,1),e=ht(e,t,1),t=Ne(),e!==null&&(Zr(e,1,t),we(e,t))}function ue(e,t,r){if(e.tag===3)Hs(e,e,r);else for(t=e.return;t!==null;){if(t.tag===3){Hs(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ze===null||!Ze.has(n))){e=Zi(r,e),e=vo(t,e,1),t=ht(t,e,1),e=Ne(),t!==null&&(Zr(t,1,e),we(t,e));break}}t=t.return}}function ea(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ne(),e.pingedLanes|=e.suspendedLanes&r,Y===e&&(Z&r)===r&&(H===4||H===3&&(Z&130023424)===Z&&500>$()-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 ta(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),zo(e,r)}function ra(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,Uu(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=ia(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 na(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 na(e,t,r,n)}function ls(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ia(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 sa(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 la(e,t,r,n,s,i,l){return e=new sa(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 oa(){return null}var ua=kl.unstable_act,aa={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;i<s.length;i++){var l=s[i];0<=r.indexOf(l)||(n[l]=t[l])}t=n}if(r=null,e.children&&e.children.length)for(n=0;n<e.children.length;n++)s=Lr(e.children[n]),s!==null&&(r===null?r=[s]:r.push(s));return e={type:e.type,props:t,children:r},Object.defineProperty(e,"$$typeof",{value:Symbol.for("react.test.json")}),e;default:throw Error("Unexpected node type in toJSON: "+e.tag)}}function Ut(e){return e?(e=bo(e),e.length===0?null:e.length===1?Hr(e[0]):Ao(e.map(Hr))):null}function bo(e){for(var t=[];e!=null;)t.push(e),e=e.sibling;return t}function Ao(e){var t=[];for(e=[{i:0,array:e}];e.length;)for(var r=e.pop();r.i<r.array.length;){var n=r.array[r.i];if(r.i+=1,Vt(n)){e.push(r),e.push({i:0,array:n});break}t.push(n)}return t}function Hr(e){if(e==null)return null;switch(e.tag){case 3:return Ut(e.child);case 4:return Ut(e.child);case 1:return{nodeType:"component",type:e.type,props:ct({},e.memoizedProps),instance:e.stateNode,rendered:Ut(e.child)};case 0:case 15:return{nodeType:"component",type:e.type,props:ct({},e.memoizedProps),instance:null,rendered:Ut(e.child)};case 5:return{nodeType:"host",type:e.type,props:ct({},e.memoizedProps),instance:null,rendered:Ao(bo(e.child).map(Hr))};case 6:return e.stateNode.text;case 7:case 10:case 9:case 8:case 12:case 11:case 14:case 17:case 21:return Ut(e.child);default:throw Error("toTree() does not yet know how to handle nodes with tag="+e.tag)}}var Ci=new Set([0,1,5,11,14,15,3]);function Pi(e){var t=[],r=e;if(r.child===null)return t;r.child.return=r,r=r.child;e:for(;;){var n=!1;if(Ci.has(r.tag)?t.push(os(r)):r.tag===6?t.push(""+r.memoizedProps):n=!0,n&&r.child!==null)r.child.return=r,r=r.child;else{for(;r.sibling===null;){if(r.return===e)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}}return t}var ca=function(){function e(r){if(!Ci.has(r.tag))throw Error("Unexpected object passed to ReactTestInstance constructor (tag: "+r.tag+"). This is probably a bug in React.");this._fiber=r}var t=e.prototype;return t._currentFiber=function(){var r=Bl(this._fiber);if(r===null)throw Error("Can't read from currently-mounting component. This error is likely caused by a bug in React. Please file an issue.");return r},t.find=function(r){return En(this.findAll(r,{deep:!1}),"matching custom predicate: "+r.toString())},t.findByType=function(r){return En(this.findAllByType(r,{deep:!1}),'with node type: "'+(Cr(r)||"Unknown")+'"')},t.findByProps=function(r){return En(this.findAllByProps(r,{deep:!1}),"with props: "+JSON.stringify(r))},t.findAll=function(r){return Mr(this,r,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)},t.findAllByType=function(r){return Mr(this,function(n){return n.type===r},1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)},t.findAllByProps=function(r){return Mr(this,function(n){var s;if(s=n.props)e:{for(var i in r)if(n.props[i]!==r[i]){s=!1;break e}s=!0}return s},1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)},du(e,[{key:"instance",get:function(){return this._fiber.tag===5?jr(this._fiber.stateNode):this._fiber.stateNode}},{key:"type",get:function(){return this._fiber.type}},{key:"props",get:function(){return this._currentFiber().memoizedProps}},{key:"parent",get:function(){for(var r=this._fiber.return;r!==null;){if(Ci.has(r.tag)){if(r.tag===3&&2>Pi(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 ha(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 ca(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"},da={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||oa,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(da),ke=yr}catch{}}nr._Scheduler=Rl;nr.act=ua;nr.create=function(e,t){var r=aa.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=la(i,n?1:0,null,s,null,"",ha);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<i.children.length;u++){var f=Lr(i.children[u]);f!==null&&(o===null?o=[f]:o.push(f))}return o},toTree:function(){return l==null||l.current==null?null:Hr(l.current)},update:function(o){l!=null&&l.current!=null&&Dn(o,l,null,null)},unmount:function(){l!=null&&l.current!=null&&(Dn(null,l,null,null),l=i=null)},getInstance:function(){if(l==null||l.current==null)return null;e:{var o=l.current;if(o.child)switch(o.child.tag){case 5:o=jr(o.child.stateNode);break e;default:o=o.child.stateNode}else o=null}return o},unstable_flushSync:Ju},Object.defineProperty(e,"root",{configurable:!0,enumerable:!0,get:function(){if(l===null)throw Error("Can't access .root on unmounted test renderer");var o=Pi(l.current);if(o.length===0)throw Error("Can't access .root on unmounted test renderer");return o.length===1?o[0]:os(l.current)}}),e};nr.unstable_batchedUpdates=function(e,t){var r=X;X|=1;try{return e(t)}finally{X=r,X===0&&(rr=$()+500,Gr&&wt())}};Il.exports=nr;var fa=Il.exports;const pa=su(fa);var qe={},Xe={},Ks;function Ae(){return Ks||(Ks=1,function(){var e,t,r,n,s,i,l,o={}.hasOwnProperty;e=function(u,...f){var c,v,x,N;if(s(Object.assign))Object.assign.apply(null,arguments);else for(c=0,x=f.length;c<x;c++)if(N=f[c],N!=null)for(v in N)o.call(N,v)&&(u[v]=N[v]);return u},s=function(u){return!!u&&Object.prototype.toString.call(u)==="[object Function]"},i=function(u){var f;return!!u&&((f=typeof u)=="function"||f==="object")},r=function(u){return s(Array.isArray)?Array.isArray(u):Object.prototype.toString.call(u)==="[object Array]"},n=function(u){var f;if(r(u))return!u.length;for(f in u)if(o.call(u,f))return!1;return!0},l=function(u){var f,c;return i(u)&&(c=Object.getPrototypeOf(u))&&(f=c.constructor)&&typeof f=="function"&&f instanceof f&&Function.prototype.toString.call(f)===Function.prototype.toString.call(Object)},t=function(u){return s(u.valueOf)?u.valueOf():u},Xe.assign=e,Xe.isFunction=s,Xe.isObject=i,Xe.isArray=r,Xe.isEmpty=n,Xe.isPlainObject=l,Xe.getValue=t}.call(R)),Xe}var Ln={exports:{}},Js;function Uo(){return Js||(Js=1,function(){Ln.exports=class{hasFeature(t,r){return!0}createDocumentType(t,r,n){throw new Error("This DOM method is not implemented.")}createDocument(t,r,n){throw new Error("This DOM method is not implemented.")}createHTMLDocument(t){throw new Error("This DOM method is not implemented.")}getFeature(t,r){throw new Error("This DOM method is not implemented.")}}}.call(R)),Ln.exports}var Mn={exports:{}},On={exports:{}},In={exports:{}},Ys;function ma(){return Ys||(Ys=1,function(){In.exports=class{constructor(){}handleError(t){throw new Error(t)}}}.call(R)),In.exports}var Cn={exports:{}},Zs;function ga(){return Zs||(Zs=1,function(){Cn.exports=function(){class e{constructor(r){this.arr=r||[]}item(r){return this.arr[r]||null}contains(r){return this.arr.indexOf(r)!==-1}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e}.call(this)}.call(R)),Cn.exports}var Gs;function ya(){return Gs||(Gs=1,function(){var e,t;e=ma(),t=ga(),On.exports=function(){class r{constructor(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}getParameter(s){return this.params.hasOwnProperty(s)?this.params[s]:null}canSetParameter(s,i){return!0}setParameter(s,i){return i!=null?this.params[s]=i:delete this.params[s]}}return Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new t(Object.keys(this.defaultParams))}}),r}.call(this)}.call(R)),On.exports}var Pn={exports:{}},jn={exports:{}},kn={exports:{}},el;function V(){return el||(el=1,function(){kn.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}.call(R)),kn.exports}var Rn={exports:{}},tl;function qo(){return tl||(tl=1,function(){var e;e=V(),Te(),Rn.exports=function(){class t{constructor(n,s,i){if(this.parent=n,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(i),this.type=e.Attribute,this.isId=!1,this.schemaTypeInfo=null}clone(){return Object.create(this)}toString(n){return this.options.writer.attribute(this,this.options.writer.filterOptions(n))}debugInfo(n){return n=n||this.name,n==null?"parent: <"+this.parent.name+">":"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<L;g++)if(N=P[g],N.type===e.DocType){N.name=this.name;break}}}clone(){var c,v,x,N;x=Object.create(this),x.isRoot&&(x.documentObject=null),x.attribs={},N=this.attribs;for(v in N)o.call(N,v)&&(c=N[v],x.attribs[v]=c.clone());return x.children=[],this.children.forEach(function(g){var L;return L=g.clone(),L.parent=x,x.children.push(L)}),x}attribute(c,v){var x,N;if(c!=null&&(c=s(c)),l(c))for(x in c)o.call(c,x)&&(N=c[x],this.attribute(x,N));else i(v)&&(v=v.apply()),this.options.keepNullAttributes&&v==null?this.attribs[c]=new t(this,c,""):v!=null&&(this.attribs[c]=new t(this,c,v));return this}removeAttribute(c){var v,x,N;if(c==null)throw new Error("Missing attribute name. "+this.debugInfo());if(c=s(c),Array.isArray(c))for(x=0,N=c.length;x<N;x++)v=c[x],delete this.attribs[v];else delete this.attribs[c];return this}toString(c){return this.options.writer.element(this,this.options.writer.filterOptions(c))}att(c,v){return this.attribute(c,v)}a(c,v){return this.attribute(c,v)}getAttribute(c){return this.attribs.hasOwnProperty(c)?this.attribs[c].value:null}setAttribute(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNode(c){return this.attribs.hasOwnProperty(c)?this.attribs[c]:null}setAttributeNode(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNode(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNS(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNS(c,v,x){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNS(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNodeNS(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNodeNS(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasAttribute(c){return this.attribs.hasOwnProperty(c)}hasAttributeNS(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttribute(c,v){return this.attribs.hasOwnProperty(c)?this.attribs[c].isId:v}setIdAttributeNS(c,v,x){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttributeNode(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(c){var v,x,N;if(!super.isEqualNode(c)||c.namespaceURI!==this.namespaceURI||c.prefix!==this.prefix||c.localName!==this.localName||c.attribs.length!==this.attribs.length)return!1;for(v=x=0,N=this.attribs.length-1;0<=N?x<=N:x>=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<L;g++)if(N=P[g],N.type===e.Element){this.name=N.name;break}}this.documentObject=c,o(v)&&({pubID:v,sysID:x}=v),x==null&&([x,v]=[v,x]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),x!=null&&(this.sysID=this.stringify.dtdSysID(x))}element(c,v){var x;return x=new r(this,c,v),this.children.push(x),this}attList(c,v,x,N,g){var L;return L=new t(this,c,v,x,N,g),this.children.push(L),this}entity(c,v){var x;return x=new n(this,!1,c,v),this.children.push(x),this}pEntity(c,v){var x;return x=new n(this,!0,c,v),this.children.push(x),this}notation(c,v){var x;return x=new s(this,c,v),this.children.push(x),this}toString(c){return this.options.writer.docType(this,this.options.writer.filterOptions(c))}ele(c,v){return this.element(c,v)}att(c,v,x,N,g){return this.attList(c,v,x,N,g)}ent(c,v){return this.entity(c,v)}pent(c,v){return this.pEntity(c,v)}not(c,v){return this.notation(c,v)}up(){return this.root()||this.documentObject}isEqualNode(c){return!(!super.isEqualNode(c)||c.name!==this.name||c.publicId!==this.publicId||c.systemId!==this.systemId)}}return Object.defineProperty(u.prototype,"entities",{get:function(){var f,c,v,x,N;for(x={},N=this.children,c=0,v=N.length;c<v;c++)f=N[c],f.type===e.EntityDeclaration&&!f.pe&&(x[f.name]=f);return new i(x)}}),Object.defineProperty(u.prototype,"notations",{get:function(){var f,c,v,x,N;for(x={},N=this.children,c=0,v=N.length;c<v;c++)f=N[c],f.type===e.NotationDeclaration&&(x[f.name]=f);return new i(x)}}),Object.defineProperty(u.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(u.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(u.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),u}.call(this)}.call(R)),bn.exports}var Vn={exports:{}},fl;function vs(){return fl||(fl=1,function(){var e,t;e=V(),t=Te(),Vn.exports=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=e.Raw,this.value=this.stringify.raw(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))}}}.call(R)),Vn.exports}var Qn={exports:{}},pl;function ws(){return pl||(pl=1,function(){var e,t;e=V(),t=sn(),Qn.exports=function(){class r extends t{constructor(s,i){if(super(s),i==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=e.Text,this.value=this.stringify.text(i)}clone(){return Object.create(this)}toString(s){return this.options.writer.text(this,this.options.writer.filterOptions(s))}splitText(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceWholeText(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}return Object.defineProperty(r.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(r.prototype,"wholeText",{get:function(){var n,s,i;for(i="",s=this.previousSibling;s;)i=s.data+i,s=s.previousSibling;for(i+=this.data,n=this.nextSibling;n;)i=i+n.data,n=n.nextSibling;return i}}),r}.call(this)}.call(R)),Qn.exports}var $n={exports:{}},ml;function xs(){return ml||(ml=1,function(){var e,t;e=V(),t=sn(),$n.exports=class extends t{constructor(n,s,i){if(super(n),s==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=e.ProcessingInstruction,this.target=this.stringify.insTarget(s),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}clone(){return Object.create(this)}toString(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))}isEqualNode(n){return!(!super.isEqualNode(n)||n.target!==this.target)}}}.call(R)),$n.exports}var Hn={exports:{}},gl;function Wo(){return gl||(gl=1,function(){var e,t;t=Te(),e=V(),Hn.exports=class extends t{constructor(n){super(n),this.type=e.Dummy}clone(){return Object.create(this)}toString(n){return""}}}.call(R)),Hn.exports}var Kn={exports:{}},yl;function va(){return yl||(yl=1,function(){Kn.exports=function(){class e{constructor(r){this.nodes=r}clone(){return this.nodes=null}item(r){return this.nodes[r]||null}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e}.call(this)}.call(R)),Kn.exports}var Jn={exports:{}},vl;function wa(){return vl||(vl=1,function(){Jn.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}.call(R)),Jn.exports}var wl;function Te(){return wl||(wl=1,function(){var e,t,r,n,s,i,l,o,u,f,c,v,x,N,g,L,P={}.hasOwnProperty,y=[].splice;({isObject:L,isFunction:g,isEmpty:N,getValue:x}=Ae()),o=null,r=null,n=null,s=null,i=null,c=null,v=null,f=null,l=null,t=null,u=null,e=null,Pn.exports=function(){class d{constructor(a){this.parent=a,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,o||(o=as(),r=cs(),n=hs(),s=ds(),i=ys(),c=vs(),v=ws(),f=xs(),l=Wo(),t=V(),u=va(),us(),e=wa())}setParent(a){var p,m,D,h,S;for(this.parent=a,a&&(this.options=a.options,this.stringify=a.stringify),h=this.children,S=[],m=0,D=h.length;m<D;m++)p=h[m],S.push(p.setParent(this));return S}element(a,p,m){var D,h,S,E,O,C,b,_,k;if(C=null,p===null&&m==null&&([p,m]=[{},null]),p==null&&(p={}),p=x(p),L(p)||([m,p]=[p,m]),a!=null&&(a=x(a)),Array.isArray(a))for(S=0,b=a.length;S<b;S++)h=a[S],C=this.element(h);else if(g(a))C=this.element(a.apply());else if(L(a)){for(O in a)if(P.call(a,O))if(k=a[O],g(k)&&(k=k.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&O.indexOf(this.stringify.convertAttKey)===0)C=this.attribute(O.substr(this.stringify.convertAttKey.length),k);else if(!this.options.separateArrayItems&&Array.isArray(k)&&N(k))C=this.dummy();else if(L(k)&&N(k))C=this.element(O);else if(!this.options.keepNullNodes&&k==null)C=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(k))for(E=0,_=k.length;E<_;E++)h=k[E],D={},D[O]=h,C=this.element(D);else L(k)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&O.indexOf(this.stringify.convertTextKey)===0?C=this.element(k):(C=this.element(O),C.element(k)):C=this.element(O,k)}else!this.options.keepNullNodes&&m===null?C=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0?C=this.text(m):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&a.indexOf(this.stringify.convertCDataKey)===0?C=this.cdata(m):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&a.indexOf(this.stringify.convertCommentKey)===0?C=this.comment(m):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&a.indexOf(this.stringify.convertRawKey)===0?C=this.raw(m):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&a.indexOf(this.stringify.convertPIKey)===0?C=this.instruction(a.substr(this.stringify.convertPIKey.length),m):C=this.node(a,p,m);if(C==null)throw new Error("Could not create any elements with: "+a+". "+this.debugInfo());return C}insertBefore(a,p,m){var D,h,S,E,O;if(a!=null&&a.type)return S=a,E=p,S.setParent(this),E?(h=children.indexOf(E),O=children.splice(h),children.push(S),Array.prototype.push.apply(children,O)):children.push(S),S;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return h=this.parent.children.indexOf(this),O=this.parent.children.splice(h),D=this.parent.element(a,p,m),Array.prototype.push.apply(this.parent.children,O),D}insertAfter(a,p,m){var D,h,S;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return h=this.parent.children.indexOf(this),S=this.parent.children.splice(h+1),D=this.parent.element(a,p,m),Array.prototype.push.apply(this.parent.children,S),D}remove(){var a;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return a=this.parent.children.indexOf(this),y.apply(this.parent.children,[a,a-a+1].concat([])),this.parent}node(a,p,m){var D;return a!=null&&(a=x(a)),p||(p={}),p=x(p),L(p)||([m,p]=[p,m]),D=new o(this,a,p),m!=null&&D.text(m),this.children.push(D),D}text(a){var p;return L(a)&&this.element(a),p=new v(this,a),this.children.push(p),this}cdata(a){var p;return p=new r(this,a),this.children.push(p),this}comment(a){var p;return p=new n(this,a),this.children.push(p),this}commentBefore(a){var p,m;return p=this.parent.children.indexOf(this),m=this.parent.children.splice(p),this.parent.comment(a),Array.prototype.push.apply(this.parent.children,m),this}commentAfter(a){var p,m;return p=this.parent.children.indexOf(this),m=this.parent.children.splice(p+1),this.parent.comment(a),Array.prototype.push.apply(this.parent.children,m),this}raw(a){var p;return p=new c(this,a),this.children.push(p),this}dummy(){var a;return a=new l(this),a}instruction(a,p){var m,D,h,S,E;if(a!=null&&(a=x(a)),p!=null&&(p=x(p)),Array.isArray(a))for(S=0,E=a.length;S<E;S++)m=a[S],this.instruction(m);else if(L(a))for(m in a)P.call(a,m)&&(D=a[m],this.instruction(m,D));else g(p)&&(p=p.apply()),h=new f(this,a,p),this.children.push(h);return this}instructionBefore(a,p){var m,D;return m=this.parent.children.indexOf(this),D=this.parent.children.splice(m),this.parent.instruction(a,p),Array.prototype.push.apply(this.parent.children,D),this}instructionAfter(a,p){var m,D;return m=this.parent.children.indexOf(this),D=this.parent.children.splice(m+1),this.parent.instruction(a,p),Array.prototype.push.apply(this.parent.children,D),this}declaration(a,p,m){var D,h;return D=this.document(),h=new s(D,a,p,m),D.children.length===0?D.children.unshift(h):D.children[0].type===t.Declaration?D.children[0]=h:D.children.unshift(h),D.root()||D}dtd(a,p){var m,D,h,S,E,O,C,b,_,k;for(D=this.document(),h=new i(D,a,p),_=D.children,S=E=0,C=_.length;E<C;S=++E)if(m=_[S],m.type===t.DocType)return D.children[S]=h,h;for(k=D.children,S=O=0,b=k.length;O<b;S=++O)if(m=k[S],m.isRoot)return D.children.splice(S,0,h),h;return D.children.push(h),h}up(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent}root(){var a;for(a=this;a;){if(a.type===t.Document)return a.rootObject;if(a.isRoot)return a;a=a.parent}}document(){var a;for(a=this;a;){if(a.type===t.Document)return a;a=a.parent}}end(a){return this.document().end(a)}prev(){var a;if(a=this.parent.children.indexOf(this),a<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[a-1]}next(){var a;if(a=this.parent.children.indexOf(this),a===-1||a===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[a+1]}importDocument(a){var p,m,D,h,S;if(m=a.root().clone(),m.parent=this,m.isRoot=!1,this.children.push(m),this.type===t.Document&&(m.isRoot=!0,m.documentObject=this,this.rootObject=m,this.children)){for(S=this.children,D=0,h=S.length;D<h;D++)if(p=S[D],p.type===t.DocType){p.name=m.name;break}}return this}debugInfo(a){var p,m;return a=a||this.name,a==null&&!((p=this.parent)!=null&&p.name)?"":a==null?"parent: <"+this.parent.name+">":(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,D;if(a.nodeType!==this.nodeType||a.children.length!==this.children.length)return!1;for(p=m=0,D=this.children.length-1;0<=D?m<=D:m>=D;p=0<=D?++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,D,h,S;for(S=this.children,D=0,h=S.length;D<h;D++)if(p=S[D],a===p||(m=p.isDescendant(a),m))return!0;return!1}isAncestor(a){return a.isDescendant(this)}isPreceding(a){var p,m;return p=this.treePosition(a),m=this.treePosition(this),p===-1||m===-1?!1:p<m}isFollowing(a){var p,m;return p=this.treePosition(a),m=this.treePosition(this),p===-1||m===-1?!1:p>m}treePosition(a){var p,m;return m=0,p=!1,this.foreachTreeNode(this.document(),function(D){if(m++,!p&&D===a)return p=!0}),p?m:-1}foreachTreeNode(a,p){var m,D,h,S,E;for(a||(a=this.document()),S=a.children,D=0,h=S.length;D<h;D++){if(m=S[D],E=p(m))return E;if(E=this.foreachTreeNode(m,p),E)return E}}}return Object.defineProperty(d.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(d.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(d.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(d.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new u(this.children)),this.childNodeList}}),Object.defineProperty(d.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(d.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(d.prototype,"previousSibling",{get:function(){var w;return w=this.parent.children.indexOf(this),this.parent.children[w-1]||null}}),Object.defineProperty(d.prototype,"nextSibling",{get:function(){var w;return w=this.parent.children.indexOf(this),this.parent.children[w+1]||null}}),Object.defineProperty(d.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(d.prototype,"textContent",{get:function(){var w,a,p,m,D;if(this.nodeType===t.Element||this.nodeType===t.DocumentFragment){for(D="",m=this.children,a=0,p=m.length;a<p;a++)w=m[a],w.textContent&&(D+=w.textContent);return D}else return null},set:function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),d}.call(this)}.call(R)),Pn.exports}var Yn={exports:{}},xl;function Vo(){return xl||(xl=1,function(){var e={}.hasOwnProperty;Yn.exports=function(){class t{constructor(n){var s,i,l;this.assertLegalChar=this.assertLegalChar.bind(this),this.assertLegalName=this.assertLegalName.bind(this),n||(n={}),this.options=n,this.options.version||(this.options.version="1.0"),i=n.stringify||{};for(s in i)e.call(i,s)&&(l=i[s],this[s]=l)}name(n){return this.options.noValidation?n:this.assertLegalName(""+n||"")}text(n){return this.options.noValidation?n:this.assertLegalChar(this.textEscape(""+n||""))}cdata(n){return this.options.noValidation?n:(n=""+n||"",n=n.replace("]]>","]]]]><![CDATA[>"),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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))}attEscape(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,n.replace(s,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))}}return t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t}.call(this)}.call(R)),Yn.exports}var Zn={exports:{}},Gn={exports:{}},ei={exports:{}},Sl;function ln(){return Sl||(Sl=1,function(){ei.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}.call(R)),ei.exports}var Tl;function Qo(){return Tl||(Tl=1,function(){var e,t,r,n={}.hasOwnProperty;({assign:r}=Ae()),e=V(),ds(),ys(),cs(),hs(),as(),vs(),ws(),xs(),Wo(),fs(),ms(),ps(),gs(),t=ln(),Gn.exports=class{constructor(i){var l,o,u;i||(i={}),this.options=i,o=i.writer||{};for(l in o)n.call(o,l)&&(u=o[l],this["_"+l]=this[l],this[l]=u)}filterOptions(i){var l,o,u,f,c,v,x,N,g;return i||(i={}),i=r({},this.options,i),l={writer:this},l.pretty=i.pretty||!1,l.allowEmpty=i.allowEmpty||!1,l.indent=(o=i.indent)!=null?o:" ",l.newline=(u=i.newline)!=null?u:`
`,l.offset=(f=i.offset)!=null?f:0,l.width=(c=i.width)!=null?c:0,l.dontPrettyTextNodes=(v=(x=i.dontPrettyTextNodes)!=null?x:i.dontprettytextnodes)!=null?v:0,l.spaceBeforeSlash=(N=(g=i.spaceBeforeSlash)!=null?g:i.spacebeforeslash)!=null?N:"",l.spaceBeforeSlash===!0&&(l.spaceBeforeSlash=" "),l.suppressPrettyCount=0,l.user={},l.state=t.None,l}indent(i,l,o){var u;return!l.pretty||l.suppressPrettyCount?"":l.pretty&&(u=(o||0)+l.offset+1,u>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)+"<![CDATA[",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}comment(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}declaration(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<?xml",l.state=t.InsideTag,u+=' version="'+i.version+'"',i.encoding!=null&&(u+=' encoding="'+i.encoding+'"'),i.standalone!=null&&(u+=' standalone="'+i.standalone+'"'),l.state=t.CloseTag,u+=l.spaceBeforeSlash+"?>",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+="<!DOCTYPE "+i.root().name,i.pubID&&i.sysID?v+=' PUBLIC "'+i.pubID+'" "'+i.sysID+'"':i.sysID&&(v+=' SYSTEM "'+i.sysID+'"'),i.children.length>0){for(v+=" [",v+=this.endline(i,l,o),l.state=t.InsideTag,x=i.children,f=0,c=x.length;f<c;f++)u=x[f],v+=this.writeChildNode(u,l,o+1);l.state=t.CloseTag,v+="]"}return l.state=t.CloseTag,v+=l.spaceBeforeSlash+">",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,D,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{D=i.attribs;for(d in D)n.call(D,d)&&(u=D[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+="</"+i.name+">"+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+="</"+i.name+">"+this.endline(i,l,o);else{if(l.dontPrettyTextNodes){for(h=i.children,N=0,P=h.length;N<P;N++)if(c=h[N],(c.type===e.Text||c.type===e.Raw||c.type===e.CData)&&c.value!=null){l.suppressPrettyCount++,w=!0;break}}for(a+=">"+this.endline(i,l,o),l.state=t.InsideTag,S=i.children,g=0,y=S.length;g<y;g++)c=S[g],a+=this.writeChildNode(c,l,o+1);l.state=t.CloseTag,a+=this.indent(i,l,o)+"</"+i.name+">",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)+"<?",l.state=t.InsideTag,u+=i.target,i.value&&(u+=" "+i.value),l.state=t.CloseTag,u+=l.spaceBeforeSlash+"?>",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)+"<!ATTLIST",l.state=t.InsideTag,u+=" "+i.elementName+" "+i.attributeName+" "+i.attributeType,i.defaultValueType!=="#DEFAULT"&&(u+=" "+i.defaultValueType),i.defaultValue&&(u+=' "'+i.defaultValue+'"'),l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+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)+"<!ELEMENT",l.state=t.InsideTag,u+=" "+i.name+" "+i.value,l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+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)+"<!ENTITY",l.state=t.InsideTag,i.pe&&(u+=" %"),u+=" "+i.name,i.value?u+=' "'+i.value+'"':(i.pubID&&i.sysID?u+=' PUBLIC "'+i.pubID+'" "'+i.sysID+'"':i.sysID&&(u+=' SYSTEM "'+i.sysID+'"'),i.nData&&(u+=" NDATA "+i.nData)),l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+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)+"<!NOTATION",l.state=t.InsideTag,u+=" "+i.name,i.pubID&&i.sysID?u+=' PUBLIC "'+i.pubID+'" "'+i.sysID+'"':i.pubID?u+=' PUBLIC "'+i.pubID+'"':i.sysID&&(u+=' SYSTEM "'+i.sysID+'"'),l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+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<l;i++)s=u[i],o+=this.writeChildNode(s,n,0);return n.pretty&&o.slice(-n.newline.length)===n.newline&&(o=o.slice(0,-n.newline.length)),o}}}.call(R)),Zn.exports}var El;function $o(){return El||(El=1,function(){var e,t,r,n,s,i,l;({isPlainObject:l}=Ae()),r=Uo(),t=ya(),n=Te(),e=V(),i=Vo(),s=Ss(),Mn.exports=function(){class o extends n{constructor(f){super(null),this.name="#document",this.type=e.Document,this.documentURI=null,this.domConfig=new t,f||(f={}),f.writer||(f.writer=new s),this.options=f,this.stringify=new i(f)}end(f){var c;return c={},f?l(f)&&(c=f,f=this.options.writer):f=this.options.writer,f.document(this,f.filterOptions(c))}toString(f){return this.options.writer.document(this,this.options.writer.filterOptions(f))}createElement(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}createDocumentFragment(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTextNode(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}createComment(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}createCDATASection(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}createProcessingInstruction(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttribute(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEntityReference(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}importNode(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}createElementNS(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttributeNS(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(f,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementById(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}adoptNode(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalizeDocument(){throw new Error("This DOM method is not implemented."+this.debugInfo())}renameNode(f,c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEvent(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}createRange(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createNodeIterator(f,c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTreeWalker(f,c,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}}return Object.defineProperty(o.prototype,"implementation",{value:new r}),Object.defineProperty(o.prototype,"doctype",{get:function(){var u,f,c,v;for(v=this.children,f=0,c=v.length;f<c;f++)if(u=v[f],u.type===e.DocType)return u;return null}}),Object.defineProperty(o.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(o.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(o.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(o.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].encoding:null}}),Object.defineProperty(o.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(o.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(o.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(o.prototype,"origin",{get:function(){return null}}),Object.defineProperty(o.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(o.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(o.prototype,"contentType",{get:function(){return null}}),o}.call(this)}.call(R)),Mn.exports}var ti={exports:{}},Nl;function xa(){return Nl||(Nl=1,function(){var e,t,r,n,s,i,l,o,u,f,c,v,x,N,g,L,P,y,d,w,a,p,m={}.hasOwnProperty;({isObject:a,isFunction:w,isPlainObject:p,getValue:d}=Ae()),e=V(),v=$o(),x=as(),n=cs(),s=hs(),g=vs(),y=ws(),N=xs(),f=ds(),c=ys(),i=fs(),o=ps(),l=ms(),u=gs(),r=qo(),P=Vo(),L=Ss(),t=ln(),ti.exports=class{constructor(h,S,E){var O;this.name="?xml",this.type=e.Document,h||(h={}),O={},h.writer?p(h.writer)&&(O=h.writer,h.writer=new L):h.writer=new L,this.options=h,this.writer=h.writer,this.writerOptions=this.writer.filterOptions(O),this.stringify=new P(h),this.onDataCallback=S||function(){},this.onEndCallback=E||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}createChildNode(h){var S,E,O,C,b,_,k,ie;switch(h.type){case e.CData:this.cdata(h.value);break;case e.Comment:this.comment(h.value);break;case e.Element:O={},k=h.attribs;for(E in k)m.call(k,E)&&(S=k[E],O[E]=S.value);this.node(h.name,O);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(h.value);break;case e.Text:this.text(h.value);break;case e.ProcessingInstruction:this.instruction(h.target,h.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+h.constructor.name)}for(ie=h.children,b=0,_=ie.length;b<_;b++)C=ie[b],this.createChildNode(C),C.type===e.Element&&this.up();return this}dummy(){return this}node(h,S,E){if(h==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(h));return this.openCurrent(),h=d(h),S==null&&(S={}),S=d(S),a(S)||([E,S]=[S,E]),this.currentNode=new x(this,h,S),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,E!=null&&this.text(E),this}element(h,S,E){var O,C,b,_,k,ie;if(this.currentNode&&this.currentNode.type===e.DocType)this.dtdElement(...arguments);else if(Array.isArray(h)||a(h)||w(h))for(_=this.options.noValidation,this.options.noValidation=!0,ie=new v(this.options).element("TEMP_ROOT"),ie.element(h),this.options.noValidation=_,k=ie.children,C=0,b=k.length;C<b;C++)O=k[C],this.createChildNode(O),O.type===e.Element&&this.up();else this.node(h,S,E);return this}attribute(h,S){var E,O;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(h));if(h!=null&&(h=d(h)),a(h))for(E in h)m.call(h,E)&&(O=h[E],this.attribute(E,O));else w(S)&&(S=S.apply()),this.options.keepNullAttributes&&S==null?this.currentNode.attribs[h]=new r(this,h,""):S!=null&&(this.currentNode.attribs[h]=new r(this,h,S));return this}text(h){var S;return this.openCurrent(),S=new y(this,h),this.onData(this.writer.text(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}cdata(h){var S;return this.openCurrent(),S=new n(this,h),this.onData(this.writer.cdata(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}comment(h){var S;return this.openCurrent(),S=new s(this,h),this.onData(this.writer.comment(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}raw(h){var S;return this.openCurrent(),S=new g(this,h),this.onData(this.writer.raw(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}instruction(h,S){var E,O,C,b,_;if(this.openCurrent(),h!=null&&(h=d(h)),S!=null&&(S=d(S)),Array.isArray(h))for(E=0,b=h.length;E<b;E++)O=h[E],this.instruction(O);else if(a(h))for(O in h)m.call(h,O)&&(C=h[O],this.instruction(O,C));else w(S)&&(S=S.apply()),_=new N(this,h,S),this.onData(this.writer.processingInstruction(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}declaration(h,S,E){var O;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return O=new f(this,h,S,E),this.onData(this.writer.declaration(O,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}doctype(h,S,E){if(this.openCurrent(),h==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new c(this,S,E),this.currentNode.rootNodeName=h,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this}dtdElement(h,S){var E;return this.openCurrent(),E=new l(this,h,S),this.onData(this.writer.dtdElement(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}attList(h,S,E,O,C){var b;return this.openCurrent(),b=new i(this,h,S,E,O,C),this.onData(this.writer.dtdAttList(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}entity(h,S){var E;return this.openCurrent(),E=new o(this,!1,h,S),this.onData(this.writer.dtdEntity(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}pEntity(h,S){var E;return this.openCurrent(),E=new o(this,!0,h,S),this.onData(this.writer.dtdEntity(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}notation(h,S){var E;return this.openCurrent(),E=new u(this,h,S),this.onData(this.writer.dtdNotation(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}up(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this}end(){for(;this.currentLevel>=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)+"<!DOCTYPE "+h.rootNodeName,h.pubID&&h.sysID?E+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(E+=' SYSTEM "'+h.sysID+'"'),h.children?(E+=" [",this.writerOptions.state=t.InsideTag):(this.writerOptions.state=t.CloseTag,E+=">"),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)+"</"+h.name+">"+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 Sa(){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;f<v;u=++f)o=N[u],o.isLastRootNode=u===i.children.length-1;for(l=this.filterOptions(l),g=i.children,L=[],c=0,x=g.length;c<x;c++)o=g[c],L.push(this.writeChildNode(o,l,0));return L}cdata(i,l,o){return this.stream.write(super.cdata(i,l,o))}comment(i,l,o){return this.stream.write(super.comment(i,l,o))}declaration(i,l,o){return this.stream.write(super.declaration(i,l,o))}docType(i,l,o){var u,f,c,v;if(o||(o=0),this.openNode(i,l,o),l.state=t.OpenTag,this.stream.write(this.indent(i,l,o)),this.stream.write("<!DOCTYPE "+i.root().name),i.pubID&&i.sysID?this.stream.write(' PUBLIC "'+i.pubID+'" "'+i.sysID+'"'):i.sysID&&this.stream.write(' SYSTEM "'+i.sysID+'"'),i.children.length>0){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<c;f++)u=v[f],this.writeChildNode(u,l,o+1);l.state=t.CloseTag,this.stream.write("]")}return l.state=t.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),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(D){return(D.type===e.Text||D.type===e.Raw||D.type===e.CData)&&D.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=t.CloseTag,this.stream.write("</"+i.name+">")):(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("</"+i.name+">");else{for(this.stream.write(">"+this.endline(i,l,o)),l.state=t.InsideTag,p=i.children,N=0,L=p.length;N<L;N++)c=p[N],this.writeChildNode(c,l,o+1);l.state=t.CloseTag,this.stream.write(this.indent(i,l,o)+"</"+i.name+">")}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=xa(),l=Ss(),i=Sa(),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)})},Ta=e=>{const t=pa.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 Da(e){return{alter:e.alter,step:"CDEFGAB"[(e.note+98)%7],octave:Math.floor(e.note/7)+4}}function Ea(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 Na(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 ec{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 La({parent:this,template:r});this.partBuilders.push(n)}return this.partBuilders[t]}createPartListElement(){return T.jsx("part-list",{children:this.partBuilders.map(t=>T.jsx("score-part",{id:t.id,children:T.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")}`,T.jsxs("score-partwise",{version:"4.0",children:[T.jsx("work",{children:T.jsx("work-title",{children:this.workTitle})}),T.jsx("movement-title",{children:this.workTitle}),T.jsx("identification",{children:T.jsx("miscellaneous",{children:T.jsx("miscellaneous-field",{name:"lilylet-staves",children:this.score.staffLayoutCode})})}),T.jsx("defaults",{children:T.jsxs("scaling",{children:[T.jsx("millimeters",{children:"8"}),T.jsx("tenths",{children:au})]})}),T.jsx("part-list",{children:this.partBuilders.map(r=>T.jsx("score-part",{id:r.id,children:T.jsx("part-name",{"print-object":"no",children:"MusicXML Part"})}))}),this.partBuilders.map(r=>r.toJSX())]})}toString(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 4.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
${Ta(this.toJSX())}
`}}class La{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 Ia({parent:this,index:t});this.staffContexts.push(r)}return this.staffContexts[t]}ensureMeasureBuilder(t){for(;this.measureBuilders.length<=t;){const r=new Ma({parent:this});this.measureBuilders.push(r)}return this.measureBuilders[t]}toJSX(){return T.jsx("part",{id:this.id,children:this.measureBuilders.map((t,r)=>t.toJSX())})}}class Ma{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 Oa({parent:this,voice:t});this.voiceBuilders.push(r),t.contextedTerms.filter(i=>i.type===uu.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((s,i)=>[...s,...i.systems.reduce((l,o)=>[...l,...o.measureBars],[])],[]);this.beamCount=0;const r=this.voiceBuilders.map(s=>s.voice.bar).find(Boolean),n=r==="|."?"light-heavy":r==="||"?"light-light":void 0;return T.jsxs("measure",{number:this.index+1,width:Math.round(t[this.index]*10),children:[this.index===0&&T.jsx(T.Fragment,{children:this.parent.staffContexts.map(s=>{var i;return s.clefBuilders.length>0?T.jsx("attributes",{children:(i=s.clefBuilders)==null?void 0:i[0].toJSX()}):null})}),this.voiceBuilders.reduce((s,i,l)=>{var o,u;return s.push(...i.toJSX()),(u=(o=this.voiceBuilders[l+1])==null?void 0:o.toJSX)!=null&&u.call(o)&&s.push(T.jsx("backup",{children:T.jsx("duration",{children:i.voice.duration})})),s},[]),n&&T.jsx("barline",{location:"right",children:T.jsx("bar-style",{children:n})})]})}}class Oa{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<o.length-1?o[L+1][1]:null,d=y instanceof un&&!!y.timeWarp;P&&!c&&(u.add(g.tick),c=!0),c&&(!d||L===o.length-1)&&(f.add(g.tick),c=!1),P||(c=!1)}),o.forEach(([N,g],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),D=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,D,h].filter(Boolean).map(M=>M.toJSX());L===0&&this.index===0&&O.length>0&&t.push(T.jsx("attributes",{children:O}));const C=[],b=[];b.push(...new ja(g.accessories).toJSX()||[]),b.length>0&&C.push(T.jsx("technical",{children:b}));const _=[];g.accessories.some(M=>M.type===I.ScriptStaccato)&&_.push(T.jsx("staccato",{})),g.accessories.some(M=>M.type===I.ScriptSforzato)&&_.push(T.jsx("accent",{})),g.accessories.some(M=>M.type===I.ScriptStaccatissimo)&&_.push(T.jsx("spiccato",{})),g.accessories.some(M=>M.type===I.ScriptMarcato)&&_.push(T.jsx("strong-accent",{})),g.accessories.some(M=>M.type===I.ScriptTenuto)&&_.push(T.jsx("tenuto",{})),g.accessories.some(M=>M.type===I.ScriptPortato)&&_.push(T.jsx("detached-legato",{})),_.length>0&&C.push(T.jsx("articulations",{children:_}));const k=g.accessories.find(M=>M.type===I.ScriptFermata);k&&C.push(T.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(T.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(T.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(T.jsx("tied",{type:"start"}))}),g.accessories.some(M=>M.type===I.TieEnd)&&g.accessories.filter(M=>M.type===I.TieEnd).forEach(M=>{C.push(T.jsx("tied",{type:"stop"}))});const ie=[];g.accessories.some(M=>M.type===I.ScriptTurn)&&ie.push(T.jsx("turn",{})),g.accessories.some(M=>M.type===I.ScriptTrill)&&ie.push(T.jsx("trill-mark",{})),g.accessories.some(M=>M.type===I.ScriptMordent)&&ie.push(T.jsx("mordent",{})),g.accessories.some(M=>M.type===I.ScriptPrall)&&ie.push(T.jsx("inverted-mordent",{})),Number.isFinite(g.tremolo)&&ie.push(T.jsx("tremolo",{type:"single",children:g.tremolo})),ie.length>0&&C.push(T.jsx("ornaments",{children:ie})),u.has(g.tick)&&C.push(T.jsx("tuplet",{type:"start"})),f.has(g.tick)&&C.push(T.jsx("tuplet",{type:"stop"}));const Zo=g.accessories.filter(M=>M.type===I.ScriptArpeggio).length+(g.arpeggioStyle?1:0);for(let M=0;M<Zo;M++)C.push(T.jsx("arpeggiate",{}));g.glissando&&C.push(T.jsx("glissando",{type:"start",number:"1"}));const Go=Na(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(T.jsxs("direction",{placement:"above",children:[T.jsx("direction-type",{children:T.jsxs("metronome",{children:[T.jsx("beat-unit",{children:lr}),xt&&xt[2]&&T.jsx("beat-unit-dot",{}),T.jsx("per-minute",{children:Math.round(St)})]})}),T.jsx("sound",{tempo:Math.round(q.bpm)})]}))});const st=Ea(g.accessories);if(st){const q=st.type;t.push(T.jsxs("direction",{placement:st.direction??"below",children:[T.jsx("direction-type",{children:T.jsx("dynamics",{children:lu.createElement(q)})}),T.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(T.jsxs("direction",{placement:"below",children:[T.jsx("direction-type",{children:T.jsx("wedge",{type:"crescendo"})}),T.jsx("staff",{children:M})]})),Ft&&t.push(T.jsxs("direction",{placement:"below",children:[T.jsx("direction-type",{children:T.jsx("wedge",{type:"diminuendo"})}),T.jsx("staff",{children:M})]})),zt&&t.push(T.jsxs("direction",{children:[T.jsx("direction-type",{children:T.jsx("wedge",{type:"stop"})}),T.jsx("staff",{children:M})]})),g.accessories.some(q=>q.type===I.PedalPed)&&t.push(T.jsxs("direction",{children:[T.jsx("direction-type",{children:T.jsx("pedal",{type:"start",sign:"yes"})}),T.jsx("staff",{children:M})]})),g.accessories.some(q=>q.type===I.PedalStar)&&t.push(T.jsxs("direction",{children:[T.jsx("direction-type",{children:T.jsx("pedal",{type:"stop",sign:"yes"})}),T.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}=Da(Ue),Bt={u:"up",d:"down"}[g.stemDirection];if(!this.voice.empty){let q=null;switch(g.beam){case"Open":q=T.jsx("beam",{number:"1",children:"begin"}),this.parent.beamState=g.beam;break;case"Close":q=T.jsx("beam",{number:"1",children:"end"}),this.parent.beamCount+=1,this.parent.beamState=g.beam;break;default:this.parent.beamState==="Open"&&(q=T.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(T.jsx("tied",{type:"start"})),lr&&St.push(T.jsx("tied",{type:"stop"}));const or=`${g.staff}:${this.voice.voiceIndexOfStaff}:${this.parent.index}:${g.tick}`,tu=st===0&&!g.rest&&!g.grace?(r.get(or)||[]).slice().sort((Me,ru)=>Me.verse-ru.verse).map(Me=>T.jsxs("lyric",{number:Me.verse+1,children:[T.jsx("syllabic",{children:Me.syllabic||"single"}),T.jsx("text",{children:Me.text}),Me.extend?T.jsx("extend",{}):null]})):[];t.push(T.jsxs("note",{children:[g.grace&&T.jsx("grace",{"steal-time-following":g.duration}),M&&st!==0&&T.jsx("chord",{}),!g.rest&&T.jsxs("pitch",{children:[T.jsx("step",{children:Ft}),sr!==0&&T.jsx("alter",{children:sr}),T.jsx("octave",{children:zt})]}),g.rest==="r"&&T.jsxs("rest",{children:[T.jsx("display-step",{children:Ft}),T.jsx("display-octave",{children:zt})]}),g.rest==="R"&&T.jsxs("rest",{measure:"yes",children:[T.jsx("display-step",{children:Ft}),T.jsx("display-octave",{children:zt})]}),on&&T.jsx("tie",{type:"start"}),lr&&T.jsx("tie",{type:"stop"}),g.grace?null:T.jsx("duration",{children:g.duration}),T.jsx("voice",{children:this.index+1}),T.jsx("type",{children:Go}),Array(g.dots).fill(null).map(()=>T.jsx("dot",{})),new Xa(Ue.accidental).toJSX(),g.timeWarp&&new ka(g.timeWarp).toJSX(),Bt?T.jsx("stem",{children:Bt}):null,T.jsx("staff",{children:xt}),q,St.length>0&&T.jsx("notations",{children:St}),tu]}))}})}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)),eu=Math.max(...Object.keys(this.voice.tickMap).map(M=>+M));if(Ts>=eu){const M=P.lookupClef(this.parent.index,Ts);M&&t.push(T.jsx("attributes",{children:M.toJSX()}))}}}),t}}class Ia{parent;index;divisionsBuilder=new Ca({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 Pa({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 Fa({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 T.jsxs("clef",{number:this.number+1,size:this.size,additional:this.additional?"yes":"no","after-barline":this.afterBarline?"yes":"no",children:[T.jsx("sign",{children:this.sign}),T.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 T.jsxs("key",{children:[T.jsx("fifths",{children:this.fifths}),this.mode?T.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"),T.jsxs("time",{...t,children:[T.jsx("beats",{children:this.beats}),T.jsx("beat-type",{children:this.beatType})]})}}class Ca{value;constructor(t){Object.assign(this,t)}toJSX(){return T.jsx("divisions",{children:this.value})}}class Pa{value;constructor(t){Object.assign(this,t)}toJSX(){return T.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 ja{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=>T.jsx("fingering",{placement:{[We.Up]:"above",[We.Down]:"below"}[n.direction],children:Ml[n.type]})):null}}class ka{timeWarp;constructor(t){this.timeWarp=t}toJSX(){return T.jsxs("time-modification",{children:[T.jsx("actual-notes",{children:this.timeWarp.denominator}),T.jsx("normal-notes",{children:this.timeWarp.numerator})]})}}const Ra={"-2":"flat-flat","-1":"flat",0:"natural",1:"sharp",2:"double-sharp"};class Xa{alter;constructor(t){this.alter=t}toJSX(){return typeof this.alter=="number"?T.jsx("accidental",{children:Ra[this.alter]}):null}}class Fa{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 T.jsxs("direction",{children:[T.jsx("direction-type",{children:T.jsx("octave-shift",{size:"8",type:n,number:"1"})}),T.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{ec as S};