var U={exports:{}},j={};var E;function W(){return E||(E=1,(function(l){function S(e,a){var n=e.length;e.push(a);e:for(;0<n;){var u=n-1>>>1,r=e[u];if(0<m(r,a))e[u]=a,e[n]=r,n=u;else break e}}function i(e){return e.length===0?null:e[0]}function k(e){if(e.length===0)return null;var a=e[0],n=e.pop();if(n!==a){e[0]=n;e:for(var u=0,r=e.length,P=r>>>1;u<P;){var T=2*(u+1)-1,I=e[T],o=T+1,C=e[o];if(0>m(I,n))o<r&&0>m(C,I)?(e[u]=C,e[o]=n,u=o):(e[u]=I,e[T]=n,u=T);else if(o<r&&0>m(C,n))e[u]=C,e[o]=n,u=o;else break e}}return a}function m(e,a){var n=e.sortIndex-a.sortIndex;return n!==0?n:e.id-a.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var J=performance;l.unstable_now=function(){return J.now()}}else{var F=Date,K=F.now();l.unstable_now=function(){return F.now()-K}}var s=[],c=[],O=1,f=null,t=3,g=!1,d=!1,y=!1,q=!1,Q=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function w(e){for(var a=i(c);a!==null;){if(a.callback===null)k(c);else if(a.startTime<=e)k(c),a.sortIndex=a.expirationTime,S(s,a);else break;a=i(c)}}function R(e){if(y=!1,w(e),!d)if(i(s)!==null)d=!0,b||(b=!0,v());else{var a=i(c);a!==null&&D(R,a.startTime-e)}}var b=!1,_=-1,M=5,N=-1;function z(){return q?!0:!(l.unstable_now()-N<M)}function H(){if(q=!1,b){var e=l.unstable_now();N=e;var a=!0;try{e:{d=!1,y&&(y=!1,Y(_),_=-1),g=!0;var n=t;try{n:{for(w(e),f=i(s);f!==null&&!(f.expirationTime>e&&z());){var u=f.callback;if(typeof u=="function"){f.callback=null,t=f.priorityLevel;var r=u(f.expirationTime<=e);if(e=l.unstable_now(),typeof r=="function"){f.callback=r,w(e),a=!0;break n}f===i(s)&&k(s),w(e)}else k(s);f=i(s)}if(f!==null)a=!0;else{var P=i(c);P!==null&&D(R,P.startTime-e),a=!1}}break e}finally{f=null,t=n,g=!1}a=void 0}}finally{a?v():b=!1}}}var v;if(typeof B=="function")v=function(){B(H)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,V=A.port2;A.port1.onmessage=H,v=function(){V.postMessage(null)}}else v=function(){Q(H,0)};function D(e,a){_=Q(function(){e(l.unstable_now())},a)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(e){e.callback=null},l.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<e?Math.floor(1e3/e):5},l.unstable_getCurrentPriorityLevel=function(){return t},l.unstable_next=function(e){switch(t){case 1:case 2:case 3:var a=3;break;default:a=t}var n=t;t=a;try{return e()}finally{t=n}},l.unstable_requestPaint=function(){q=!0},l.unstable_runWithPriority=function(e,a){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=t;t=e;try{return a()}finally{t=n}},l.unstable_scheduleCallback=function(e,a,n){var u=l.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?u+n:u):n=u,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=n+r,e={id:O++,callback:a,priorityLevel:e,startTime:n,expirationTime:r,sortIndex:-1},n>u?(e.sortIndex=n,S(c,e),i(s)===null&&e===i(c)&&(y?(Y(_),_=-1):y=!0,D(R,n-u))):(e.sortIndex=r,S(s,e),d||g||(d=!0,b||(b=!0,v()))),e},l.unstable_shouldYield=z,l.unstable_wrapCallback=function(e){var a=t;return function(){var n=t;t=a;try{return e.apply(this,arguments)}finally{t=n}}}})(j)),j}var G;function X(){return G||(G=1,U.exports=W()),U.exports}export{X as r};
