(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8913,4397,2040],{86507:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IDocumentProviderFactory:()=>s,ProviderMock:()=>r,WebSocketProvider:()=>u});class r{destroy(){}setPath(e){}get renameAck(){return Promise.resolve(!1)}}var o=n(39787);const s=new o.Token("@jupyterlab/docprovider:IDocumentProviderFactory");var i=n(66962),c=n(74833),a=n(90829);class u extends a.WebsocketProvider{constructor(e){super(e.url,e.format+":"+e.contentType+":"+e.path,e.ymodel.ydoc,{awareness:e.ymodel.awareness}),this._path=e.path,this._contentType=e.contentType,this._format=e.format,this._serverUrl=e.url,this.messageHandlers[127]=(e,t,n,r,o)=>{this._renameAck.resolve(!!i.iU(t)[0])};const t=e.ymodel.awareness,n=e.user,r=()=>{const e=""!==n.displayName?n.displayName:n.name;t.setLocalStateField("user",{...n.toJSON(),name:e})};n.isReady&&r(),n.ready.connect(r),n.changed.connect(r)}get renameAck(){return this._renameAck.promise}setPath(e){if(e!==this._path){this._path=e;const t=c.Mf();this._renameAck=new o.PromiseDelegate,c.cW(t,127);const n=unescape(encodeURIComponent(this._format+":"+this._contentType+":"+e));for(let e=0;e<n.length;e++)c.cW(t,n.codePointAt(e));this._sendMessage(c._f(t)),this.disconnectBc(),this.bcChannel=this._serverUrl+"/"+this._format+":"+this._contentType+":"+this._path,this.url=this.bcChannel,this.connectBc()}}_sendMessage(e){const t=()=>{setTimeout((()=>{this.wsconnected?this.ws.send(e):this.once("status",t)}),0)};t()}}},22592:(e,t,n)=>{"use strict";n.d(t,{JG:()=>o,UI:()=>i,Ue:()=>r,Yj:()=>c,Yu:()=>s});const r=()=>new Map,o=e=>{const t=r();return e.forEach(((e,n)=>{t.set(n,e)})),t},s=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},i=(e,t)=>{const n=[];for(const[r,o]of e)n.push(t(o,r));return n},c=(e,t)=>{for(const[n,r]of e)if(t(r,n))return!0;return!1}},11182:(e,t,n)=>{"use strict";n.d(t,{Fp:()=>i,GR:()=>a,GW:()=>r,VV:()=>s,Wn:()=>o,sQ:()=>c});const r=Math.floor,o=(Math.ceil,Math.abs),s=(Math.imul,Math.round,Math.log10,Math.log2,Math.log,Math.sqrt,(e,t)=>e<t?e:t),i=(e,t)=>e>t?e:t,c=(Number.isNaN,Math.pow),a=(Math.sign,e=>0!==e?e<0:1/e<0)},27061:e=>{var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var c,a=[],u=!1,h=-1;function l(){u&&c&&(u=!1,c.length?a=c.concat(a):h=-1,a.length&&f())}function f(){if(!u){var e=i(l);u=!0;for(var t=a.length;t;){for(c=a,a=[];++h<t;)c&&c[h].run();h=-1,t=a.length}c=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new d(e,t)),1!==a.length||u||i(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}}]);