"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6304,3923],{56304:(n,e,t)=>{t.r(e),t.d(e,{ConflatableMessage:()=>c,Message:()=>u,MessageLoop:()=>r});var r,o=t(75112),a=t(27395),i=function(n,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])},i(n,e)},u=function(){function n(n){this.type=n}return Object.defineProperty(n.prototype,"isConflatable",{get:function(){return!1},enumerable:!0,configurable:!0}),n.prototype.conflate=function(n){return!1},n}(),c=function(n){function e(){return null!==n&&n.apply(this,arguments)||this}return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}i(n,e),n.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}(e,n),Object.defineProperty(e.prototype,"isConflatable",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.conflate=function(n){return!0},e}(u);!function(n){function e(n,e){var t=r.get(n);if(t&&0!==t.length){var a=(0,o.every)((0,o.retro)(t),(function(t){return!t||function(n,e,t){var r=!0;try{r="function"==typeof n?n(e,t):n.messageHook(e,t)}catch(n){u(n)}return r}(t,n,e)}));a&&p(n,e)}else p(n,e)}n.sendMessage=e,n.postMessage=function(n,e){e.isConflatable&&(0,o.some)(t,(function(t){return t.handler===n&&!!t.msg&&t.msg.type===e.type&&!!t.msg.isConflatable&&t.msg.conflate(e)}))||function(n,e){t.addLast({handler:n,msg:e}),0===c&&(c=f(g))}(n,e)},n.installMessageHook=function(n,e){var t=r.get(n);t&&-1!==t.indexOf(e)||(t?t.push(e):r.set(n,[e]))},n.removeMessageHook=function(n,e){var t=r.get(n);if(t){var o=t.indexOf(e);-1!==o&&(t[o]=null,m(t))}},n.clearData=function(n){var e=r.get(n);e&&e.length>0&&(o.ArrayExt.fill(e,null),m(e)),(0,o.each)(t,(function(e){e.handler===n&&(e.handler=null,e.msg=null)}))},n.flush=function(){l||0===c||(s(c),l=!0,g(),l=!1)},n.getExceptionHandler=function(){return u},n.setExceptionHandler=function(n){var e=u;return u=n,e};var t=new a.w,r=new WeakMap,i=new Set,u=function(n){console.error(n)},c=0,l=!1,f="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate,s="function"==typeof cancelAnimationFrame?cancelAnimationFrame:clearImmediate;function p(n,e){try{n.processMessage(e)}catch(n){u(n)}}function g(){if(c=0,!t.isEmpty){var n={handler:null,msg:null};for(t.addLast(n);;){var r=t.removeFirst();if(r===n)return;r.handler&&r.msg&&e(r.handler,r.msg)}}}function m(n){0===i.size&&f(y),i.add(n)}function y(){i.forEach(h),i.clear()}function h(n){o.ArrayExt.removeAllWhere(n,d)}function d(n){return null===n}}(r||(r={}))}}]);