/*! For license information please see index.js.LICENSE.txt */
define(["react","mobx"],(function(e,r){"use strict";var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e);function n(e){var r={exports:{}};return e(r,r.exports),r.exports}Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()||Object.assign;var o=n((function(e,r){var n=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;n=o("react.element"),r.Fragment=o("react.fragment")}var a=t.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var o,c={},f=null,s=null;for(o in void 0!==t&&(f=""+t),void 0!==r.key&&(f=""+r.key),void 0!==r.ref&&(s=r.ref),r)i.call(r,o)&&!u.hasOwnProperty(o)&&(c[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===c[o]&&(c[o]=r[o]);return{$$typeof:n,type:e,key:f,ref:s,props:c,_owner:a.current}}r.jsx=c,r.jsxs=c})),a=n((function(e){e.exports=o}));return({gpui:t})=>{const n=e.useRef(),o=e.useRef();return e.useEffect((()=>{r.reaction((()=>({url:t.params.url,delay:t.params.delay})),(({url:e,delay:r=0})=>{console.log(e,r),e&&setTimeout((()=>{((e,r,t,n)=>{const o=r=>function(e,r,t,n){return new(t||(t=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(i,u)}c((n=n.apply(e,r||[])).next())}))}(void 0,void 0,void 0,(function*(){n.current||(n.current=r),r-n.current>1e4&&(n.current=r,yield e()),t.current=requestAnimationFrame(o)}));t.current||(t.current=requestAnimationFrame(o))})((()=>t.root.navigate(e)),0,n,o)}),r)}),{fireImmediately:!0})}),[t]),a.jsx("div",{style:{display:"none"}},void 0)}}));