tweb/public/85.887945ef5f43bc205112.bun...

2 lines
7.5 KiB
JavaScript
Raw Normal View History

2023-01-16 18:27:55 +01:00
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[85],{1267:(s,e,t)=>{t.d(e,{Z:()=>n});const i={test:location.search.indexOf("test=1")>0,debug:location.search.indexOf("debug=1")>0,http:!1,ssl:!0,multipleConnections:!0,asServiceWorker:!1,transport:"websocket",noSharedWorker:location.search.indexOf("noSharedWorker=1")>0};i.http=location.search.indexOf("http=1")>0,i.http&&(i.transport="https");const n=i},2219:(s,e,t)=>{t.d(e,{Z:()=>i});const i=Date.now()%Math.random()*1e8|0},6761:(s,e,t)=>{t.d(e,{Z:()=>i});const i="undefined"!=typeof window?window:self},4064:(s,e,t)=>{function i(s,e){const t=s.findIndex(e);return-1!==t?s.splice(t,1)[0]:void 0}t.d(e,{Z:()=>i})},1655:(s,e,t)=>{function i(s,e){const t=s.indexOf(e),i=-1===t?void 0:s.splice(t,1);return null==i?void 0:i[0]}t.d(e,{Z:()=>i})},5289:(s,e,t)=>{t.d(e,{Z:()=>n});const i=Date.now();function n(){return"["+((Date.now()-i)/1e3).toFixed(3)+"]"}},3241:(s,e,t)=>{t.d(e,{Z:()=>n});var i=t(4064);class n{constructor(s){this._constructor(s)}_constructor(s){this.reuseResults=s,this.listeners={},this.listenerResults={}}addEventListener(s,e,t){var i,n;(null!==(i=(n=this.listeners)[s])&&void 0!==i?i:n[s]=[]).push({callback:e,options:t}),this.listenerResults.hasOwnProperty(s)&&(e(...this.listenerResults[s]),null==t?void 0:t.once)&&this.listeners[s].pop()}addMultipleEventsListeners(s){for(const e in s)this.addEventListener(e,s[e])}removeEventListener(s,e,t){this.listeners[s]&&(0,i.Z)(this.listeners[s],(s=>s.callback===e))}invokeListenerCallback(s,e,...t){var i;let n,o;try{n=e.callback(...t)}catch(s){o=s}if((null===(i=e.options)||void 0===i?void 0:i.once)&&this.removeEventListener(s,e.callback),o)throw o;return n}_dispatchEvent(s,e,...t){this.reuseResults&&(this.listenerResults[s]=t);const i=e&&[],n=this.listeners[s];return n&&n.slice().forEach((e=>{if(-1===n.findIndex((s=>s.callback===e.callback)))return;const o=this.invokeListenerCallback(s,e,...t);i&&i.push(o)})),i}dispatchResultableEvent(s,...e){return this._dispatchEvent(s,!0,...e)}dispatchEvent(s,...e){this._dispatchEvent(s,!1,...e)}cleanup(){this.listeners={},this.listenerResults={}}}},5471:(s,e,t)=>{t.d(e,{Z:()=>n});const i={};function n(s){var e;return null!==(e=i[s])&&void 0!==e?e:i[s]={type:s}}},153:(s,e,t)=>{t.d(e,{Z:()=>d});var i=t(410),n=t(2219),o=t(6761),r=t(1655),a=t(1352),c=t(3241),h=t(5471),l=t(5003);class d extends c.Z{constructor(s){super(!1),this.logSuffix=s,this.onMessage=s=>{const e=s.data,t=s.source||s.currentTarget;this.processTaskMap[e.type](e,t,s)},this.processResultTask=s=>{const{taskId:e,result:t,error:i}=s.payload,n=this.awaiting[e];n&&(this.debug&&this.log.debug("done",n.taskType,t,i),"error"in s.payload?n.reject(i):n.resolve(t),delete this.awaiting[e])},this.processAckTask=s=>{const e=s.payload,t=this.awaiting[e.taskId];t&&((0,t.resolve)({cached:e.cached,result:e.cached?"result"in e?Promise.resolve(e.result):Promise.reject(e.error):new Promise(((s,e)=>{t.resolve=s,t.reject=e}))}),e.cached&&delete this.awaiting[e.taskId])},this.processPingTask=(s,e,t)=>{this.pushTask(this.createTask("pong",void 0),t.source)},this.processPongTask=(s,e,t)=>{const i=this.pingResolves.get(e);i&&(this.pingResolves.delete(e),i())},this.processCloseTask=(s,e,t)=>{this.detachPort(e)},this.processLockTask=(s,e,t)=>{const i=s.payload;this.requestedLocks.has(i)||(this.requestedLocks.set(i,e),navigator.locks.request(i,(()=>{this.processCloseTask(void 0,e,void 0),this.requestedLocks.delete(i)})))},this.processInvokeTask=(s,e,t)=>{return i=this,n=void 0,r=function*(){const i=s.id,n=s.payload;let o,r,a,c;n.void||(o={taskId:i},r=this.createTask("result",o)),n.withAck&&(a=this.createTask("ack",{taskId:i,cached:!0}));try{const s=this.listeners[n.type];if(!(null==s?void 0:s.length))throw new Error("no listener");const i=s[0];let r=this.invokeListenerCallback(n.type,i,n.payload,e,t);if(n.void)return;if(c=r instanceof Promise,a){const s=!c;if(a.payload.cached=s,s&&(a.payload.result=r),this.pushTask(a,e),s)return}c&&(r=yield r),o.result=r}catch(t){if(this.log.error("worker task error:",t,s),n.void)return;if(a&&a.payload.cache
2023-02-03 13:17:41 +01:00
//# sourceMappingURL=85.887945ef5f43bc205112.bundle.js.map