var e,n,t={exports:{}},r={};function a(){return n||(n=1,t.exports=(e||(e=1,function(e){function n(e,n){var t=e.length;e.push(n);e:for(;0<t;){var r=t-1>>>1,l=e[r];if(!(0<a(l,n)))break e;e[r]=n,e[t]=l,t=r}}function t(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var n=e[0],t=e.pop();if(t!==n){e[0]=t;e:for(var r=0,l=e.length,i=l>>>1;r<i;){var o=2*(r+1)-1,u=e[o],f=o+1,s=e[f];if(0>a(u,t))f<l&&0>a(s,u)?(e[r]=s,e[f]=t,r=f):(e[r]=u,e[o]=t,r=o);else{if(!(f<l&&0>a(s,t)))break e;e[r]=s,e[f]=t,r=f}}}return n}function a(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l=performance;e.unstable_now=function(){return l.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var u=[],f=[],s=1,c=null,b=3,p=!1,v=!1,y=!1,d=!1,m="function"==typeof setTimeout?setTimeout:null,_="function"==typeof clearTimeout?clearTimeout:null,k="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var a=t(f);null!==a;){if(null===a.callback)r(f);else{if(!(a.startTime<=e))break;r(f),a.sortIndex=a.expirationTime,n(u,a)}a=t(f)}}function h(e){if(y=!1,w(e),!v)if(null!==t(u))v=!0,T||(T=!0,x());else{var n=t(f);null!==n&&q(h,n.startTime-e)}}var x,T=!1,g=-1,I=5,P=-1;function C(){return!(!d&&e.unstable_now()-P<I)}function L(){if(d=!1,T){var n=e.unstable_now();P=n;var a=!0;try{e:{v=!1,y&&(y=!1,_(g),g=-1),p=!0;var l=b;try{n:{for(w(n),c=t(u);null!==c&&!(c.expirationTime>n&&C());){var i=c.callback;if("function"==typeof i){c.callback=null,b=c.priorityLevel;var o=i(c.expirationTime<=n);if(n=e.unstable_now(),"function"==typeof o){c.callback=o,w(n),a=!0;break n}c===t(u)&&r(u),w(n)}else r(u);c=t(u)}if(null!==c)a=!0;else{var s=t(f);null!==s&&q(h,s.startTime-n),a=!1}}break e}finally{c=null,b=l,p=!1}a=void 0}}finally{a?x():T=!1}}}if("function"==typeof k)x=function(){k(L)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,j=M.port2;M.port1.onmessage=L,x=function(){j.postMessage(null)}}else x=function(){m(L,0)};function q(n,t){g=m(function(){n(e.unstable_now())},t)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e||(I=0<e?Math.floor(1e3/e):5)},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(e){switch(b){case 1:case 2:case 3:var n=3;break;default:n=b}var t=b;b=n;try{return e()}finally{b=t}},e.unstable_requestPaint=function(){d=!0},e.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var t=b;b=e;try{return n()}finally{b=t}},e.unstable_scheduleCallback=function(r,a,l){var i=e.unstable_now();switch(l="object"==typeof l&&null!==l&&"number"==typeof(l=l.delay)&&0<l?i+l:i,r){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return r={id:s++,callback:a,priorityLevel:r,startTime:l,expirationTime:o=l+o,sortIndex:-1},l>i?(r.sortIndex=l,n(f,r),null===t(u)&&r===t(f)&&(y?(_(g),g=-1):y=!0,q(h,l-i))):(r.sortIndex=o,n(u,r),v||p||(v=!0,T||(T=!0,x()))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var n=b;return function(){var t=b;b=n;try{return e.apply(this,arguments)}finally{b=t}}}}(r)),r)),t.exports}export{a as r};
