From 37ebf6cae7876f21647462322bda35f4d6cca982 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:19:43 +0000 Subject: [PATCH] Updated docs (aac5de6) --- assets/icons.js | 15 +++++++++++++ assets/icons.svg | 1 + assets/main.js | 8 +++---- assets/navigation.js | 2 +- assets/search.js | 2 +- assets/style.css | 12 +++++----- classes/AbortablePromise.html | 19 ++++++++-------- classes/AsyncQueue.html | 26 +++++++++++----------- classes/Blocker.html | 22 ++++++++----------- classes/Deferred.html | 34 ++++++++++------------------- classes/Executor.html | 41 ----------------------------------- classes/Lock.html | 18 ++++++--------- classes/PubSub.html | 17 +++++++++------ classes/WorkPool.html | 24 ++++++++++---------- functions/delay.html | 6 ++--- functions/isPromiseLike.html | 2 -- functions/repeat.html | 16 ++++++++------ functions/retry.html | 10 +++++++++ functions/timeout.html | 4 ++-- functions/waitFor.html | 8 +++---- index.html | 33 ++++++++++++++-------------- types/AbortableCallback.html | 4 ++-- types/Awaitable.html | 4 ++-- types/ValueAck.html | 4 ++-- 24 files changed, 150 insertions(+), 182 deletions(-) create mode 100644 assets/icons.js create mode 100644 assets/icons.svg delete mode 100644 classes/Executor.html delete mode 100644 functions/isPromiseLike.html create mode 100644 functions/retry.html diff --git a/assets/icons.js b/assets/icons.js new file mode 100644 index 0000000..b79c9e8 --- /dev/null +++ b/assets/icons.js @@ -0,0 +1,15 @@ +(function(svg) { + svg.innerHTML = ``; + svg.style.display = 'none'; + if (location.protocol === 'file:') { + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateUseElements); + else updateUseElements() + function updateUseElements() { + document.querySelectorAll('use').forEach(el => { + if (el.getAttribute('href').includes('#icon-')) { + el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#')); + } + }); + } + } +})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))) \ No newline at end of file diff --git a/assets/icons.svg b/assets/icons.svg new file mode 100644 index 0000000..7dead61 --- /dev/null +++ b/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/main.js b/assets/main.js index 3092fea..d6f1388 100644 --- a/assets/main.js +++ b/assets/main.js @@ -1,8 +1,8 @@ "use strict"; -"use strict";(()=>{var Ie=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ie(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",H="mouseup",J={x:0,y:0},fe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",pe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.updateIndexHeadingVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.updateIndexHeadingVisibility()}updateIndexHeadingVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}};var Z=class extends C{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +"use strict";(()=>{var Ce=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ce(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),y=s.str.charAt(1),p;y in s.node.edges?p=s.node.edges[y]:(p=new t.TokenSet,s.node.edges[y]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(console.log("Show page"),document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){console.log("Scorlling");let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!e.checkVisibility()){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ve(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ne(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ve(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let y=document.createElement("li");y.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,y.append(p),e.appendChild(y)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ne(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",fe="mousemove",H="mouseup",J={x:0,y:0},pe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",fe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{pe&&(t.preventDefault(),t.stopImmediatePropagation(),pe=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ye=document.head.appendChild(document.createElement("style"));ye.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ye.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ve(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ve(t.value)})}function ve(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/assets/navigation.js b/assets/navigation.js index a2b932e..eb80278 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA4WSyW7DIBBA/4Wz1TRWV9+SLqccXFVqD1UPgCcKAhuLRY1V9d+rJKbGBU2uvHnPyMPHN3Gwd6QiK6aNo0xBbXQrLJCC9NTtSEW4otaCXfyfuNi5VpGCSNE1pFqWdz/FVLNDx188+Fznj2GFtdJcgkn1EWDuI2zBGGhSORDMftoD905nPh0IZm80l6l5OMWs2rNXz1LvdI6Z79rIWmuVuoGgewo7faBKMRpf3Q19vPQwMK+Vl/e3y+syLn5RcRSSUgDnCm9UeVilVwnn5/wGFB0mees77oTu7OII5vbNVSQKO77sjZCQC8wGkJCBHqjLFU4EUZ1oQfusOyJEPvzh5/jhTvKIEvnzF4yXfqECBAAA" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA4XRPU/DMBAG4P9yc0RpRPnIVkCdGIKQYEAMtnNVrTi5yD4LIsR/R01jmuLIXe/189o6v38D4xdDAWtJloU0WFpqtEPIoBO8gwKUEc6hW/w/cbHjxkAGtW4rKJb57U92bHN9q549+rmevyzVcG9I1WhjPgYp+4hbtBarGIckpZ9I1bHcT1Oq9PLFy9gd5in5RrYuiUxsQ5LcdPiVB2GMFNOnc99Nvy0cOG3LL+9ulqt82vgp9ACiphCca3gVxuM6fkqYn/MVGtEf8da3ijW1bjEEp/r6agItdih4Th6SJGU7e+cQJCDrBsnPXjpGCbzf6IbsHB6jCH/8ArFIYXC0AwAA" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index ad6511d..4d302d7 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA7Va247bNhD9F+ZVccyrL29p0wAFAjRtgPTBWCxkm5uoq7UcSc6li/33gjIlzsgcS3a2T96VZuYMeQ6HFMlHVhbfKrZcPbL7bLdlSy7mCdulD5Yt2et1UdbpOrfvy+IhqyxL2KHM2ZJt8rSqbPWqbzD5XD/kLGnfsyVjT0kbWXPRRd4Uu6ouD5u6KMcFfYE9AEDC9mlpd3Us3wAupiq0K3V2I3Fb259D/JbVnz9kn3ZpPhIWOVyMjUisfuw2fx7sIUJf9+p5iMPhxlEWsgNdZwRXqsOssn8Hc3/hjS5BQZLY7+1uO4jSmV2LU6f3w23xRj+D8XpzPwrmaHct0iqrbZnWRXkzCHbbmt5ehgel/EtebO7tqfD882cRMYw1SsFtUqR8s+pocqouhAXNRiNBMtbu9XmM1uSq+IfdCIRgdBVGdVhXmzJbn44RhALNxuIYraXpgG5v6x/7sSiT7q+XfNJ5ngWeRJwJVb+xd7YsI/JoXzyLrlGwUcLu8gJpT0XQdWmrIv962ocYKViNRhnFVBTFk/NSDMJN2rzIxv1jN6drhD6qN/p/m+ZAhmQH2tXkFJfab9/t5hBTR/viWaSGgo2SWpcXwUZWvT3kd1meR0YJRsOW16L91XTiCDBgeB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n1O45K/45jdIWeNseifDy3R72gi2D95EbEg0fO6VlmaS7JPjy8vv4HVAFVz1wkAAA="; \ No newline at end of file diff --git a/assets/style.css b/assets/style.css index 98a4377..778b949 100644 --- a/assets/style.css +++ b/assets/style.css @@ -327,17 +327,14 @@ dd { } /* Footer */ -.tsd-generator { +footer { border-top: 1px solid var(--color-accent); padding-top: 1rem; padding-bottom: 1rem; max-height: 3.5rem; } - -.tsd-generator > p { - margin-top: 0; - margin-bottom: 0; - padding: 0 1rem; +.tsd-generator { + margin: 0 1em; } .container-main { @@ -405,7 +402,8 @@ dd { } body { background: var(--color-background); - font-family: "Segoe UI", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; color: var(--color-text); } diff --git a/classes/AbortablePromise.html b/classes/AbortablePromise.html index 80cdac5..a160a43 100644 --- a/classes/AbortablePromise.html +++ b/classes/AbortablePromise.html @@ -1,9 +1,10 @@ -AbortablePromise | parallel-universe - v5.0.1

Class AbortablePromise<T>

The promise that can be aborted.

+AbortablePromise | parallel-universe - v6.0.0

Class AbortablePromise<T>

The promise that can be aborted.

Type Parameters

  • T

    The value that the promise is resolved with.

    -

Hierarchy

Constructors

Methods

Constructors

Hierarchy

Constructors

Accessors

Methods

Constructors

  • Creates a new abortable promise.

    Type Parameters

    • T

      The value that the promise is resolved with.

    Parameters

    • executor: ((resolve, reject, signal) => void)

      A callback that initializes the promise.

        • (resolve, reject, signal): void
        • Parameters

          • resolve: ((value) => void)

            The resolve callback used to resolve the promise with a value or the result of another promise.

            @@ -11,10 +12,10 @@
              • (value): void
              • Parameters

                Returns void

          • reject: ((reason?) => void)

            The reject callback used to reject the promise with a provided reason or error.

            Param: reason

            The rejection reason.

              • (reason?): void
              • Parameters

                • Optional reason: any

                Returns void

          • signal: AbortSignal

            The signal that is aborted if abort method is called.

            -

          Returns void

    Returns AbortablePromise<T>

Methods

  • Aborts the signal passed to the executor and instantly rejects the promise with the reason.

    -

    Parameters

    • Optional reason: any

      The abort reason. If not explicitly provided, it defaults to an +

    Returns void

Returns AbortablePromise<T>

Accessors

  • get [species](): PromiseConstructor
  • Returns PromiseConstructor

Methods

  • Aborts the signal passed to the executor and instantly rejects the promise with the reason.

    +

    Parameters

    • Optional reason: unknown

      The abort reason. If not explicitly provided, it defaults to an AbortError.

      -

    Returns void

  • Subscribes this promise to be aborted when the signal is aborted.

    +

Returns void

  • Subscribes this promise to be aborted when the signal is aborted.

    Parameters

    • signal: AbortSignal

      The signal that aborts this promise.

    Returns this

    This promise.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/classes/AsyncQueue.html b/classes/AsyncQueue.html index 9f5018d..75d4e4e 100644 --- a/classes/AsyncQueue.html +++ b/classes/AsyncQueue.html @@ -1,20 +1,20 @@ -AsyncQueue | parallel-universe - v5.0.1

Class AsyncQueue<T>

Asynchronous queue decouples value producers and value consumers.

+AsyncQueue | parallel-universe - v6.0.0

Class AsyncQueue<T>

Asynchronous queue decouples value producers and value consumers.

Type Parameters

  • T = any

    The value stored in the queue.

    -

Constructors

Accessors

Methods

Constructors

Accessors

  • get size(): number
  • Returns the number of values stored in this queue.

    -

    Returns number

Methods

  • Iterates over elements that are available in the queue.

    -

    Returns IterableIterator<T>

  • Appends a new value to the end of the queue.

    +

Constructors

Accessors

Methods

Constructors

Accessors

  • get size(): number
  • Returns the number of values stored in this queue.

    +

    Returns number

Methods

  • Iterates over elements that are available in the queue.

    +

    Returns IterableIterator<T>

  • Appends a new value to the end of the queue.

    Parameters

    • value: T

      The value to append.

      -

    Returns this

  • Returns a promise that is fulfilled with a value when it is available.

    +

Returns this

  • Returns a promise that is fulfilled with a value when it is available.

    Values are taken in the same order they were appended. Taken values are removed from the queue.

    Returns AbortablePromise<T>

    The promise that is fulfilled with a value that was added to the queue. Aborting the returned promise after the value was taken is a no-op.

    -
  • Returns a promise that is fulfilled with a value and an acknowledgement callback.

    The promise is fulfilled when a value is available. Consequent consumers are blocked until the acknowledgement callback is invoked. Invoking acknowledgement callback multiple times is a no-op.

    Note: Be sure to always call an acknowledgement callback. Otherwise, consequent consumers would never be @@ -22,4 +22,4 @@

    Returns AbortablePromise<ValueAck<T>>

    A tuple that contains a value available in the queue, and a callback that acknowledges that the value was processed and should be removed from the queue. Aborting the returned promise after a consumer received an acknowledgement callback is a no-op.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/classes/Blocker.html b/classes/Blocker.html index 7975c6d..c1602f4 100644 --- a/classes/Blocker.html +++ b/classes/Blocker.html @@ -1,15 +1,11 @@ -Blocker | parallel-universe - v5.0.1

Class Blocker<T>

Provides mechanism for blocking async processes and unblocking them from an external context.

+Blocker | parallel-universe - v6.0.0

Class Blocker<T>

Provides mechanism for blocking async processes and unblocking them from an external context.

Type Parameters

  • T = void

    The value that can be passed to unblock to resolve the block promise.

    -

Constructors

Accessors

Methods

Constructors

Accessors

  • get isBlocked(): boolean
  • true if Blocker is blocked and wasn't unblocked yet, or false otherwise.

    -

    Returns boolean

Methods

  • Returns promises that is fulfilled with the result passed to unblock. If blocker is already blocked +

Constructors

Accessors

Methods

Constructors

Accessors

  • get isBlocked(): boolean
  • true if Blocker is blocked and wasn't unblocked yet, or false otherwise.

    +

    Returns boolean

Methods

  • Returns promises that is fulfilled with the result passed to unblock. If blocker is already blocked then the same promise is returned.

    -

    Returns Promise<T>

  • Subscribes a listener to isBlocked status changes.

    -

    Parameters

    • listener: (() => void)

      The listener that would be notified.

      -
        • (): void
        • Returns void

    Returns (() => void)

    The callback to unsubscribe the listener.

    -
      • (): void
      • Returns void

  • Fulfills the promise returned from block. If the blocker isn't blocked then no-op.

    -

    Parameters

    • result: T

    Returns void

\ No newline at end of file +

Returns Promise<T>

  • Fulfills the promise returned from block. If the blocker isn't blocked then no-op.

    +

    Parameters

    • value: T

    Returns void

\ No newline at end of file diff --git a/classes/Deferred.html b/classes/Deferred.html index 0965e95..d7dc329 100644 --- a/classes/Deferred.html +++ b/classes/Deferred.html @@ -1,30 +1,20 @@ -Deferred | parallel-universe - v5.0.1

Class Deferred<T>

The promise that can be resolved externally.

+Deferred | parallel-universe - v6.0.0

Class Deferred<T>

The promise that can be resolved externally.

Type Parameters

  • T

    The value that the promise is fulfilled with.

    -

Hierarchy

Constructors

Properties

Constructors

Hierarchy

Constructors

Properties

Accessors

Constructors

  • Creates a new instance of Deferred.

    Type Parameters

    • T

      The value that the promise is fulfilled with.

      -

    Returns Deferred<T>

Properties

reject: ((reason?) => void)

Rejects the promise with the specified reason. If the promise has already been resolved, either to a value, +

Returns Deferred<T>

Properties

reject: ((reason?) => void)

Rejects the promise with the specified reason. If the promise has already been resolved, either to a value, a rejection, or another promise, this method does nothing.

-

Type declaration

    • (reason?): void
    • Rejects the promise with the specified reason. If the promise has already been resolved, either to a value, -a rejection, or another promise, this method does nothing.

      -

      Parameters

      • Optional reason: any

        The rejection reason for the associated promise. Although the reason can be undefined, it is -generally an Error object, like in exception handling.

        -

        Note: This argument should not be a promise. Specifying a rejected promise would make the rejection reason -equal to the rejected promise itself, and not its rejection reason.

        -

      Returns void

Param: reason

The rejection reason for the associated promise. Although the reason can be undefined, it is -generally an Error object, like in exception handling.

+

Type declaration

    • (reason?): void
    • Parameters

      • Optional reason: any

        The rejection reason for the associated promise. Although the reason can be undefined, it is +generally an Error object, like in exception handling.

        Note: This argument should not be a promise. Specifying a rejected promise would make the rejection reason equal to the rejected promise itself, and not its rejection reason.

        -
resolve: ((value) => void)

Fulfills the promise with the specified value. If the promise has already been resolved, either to a value, +

Returns void

resolve: ((value) => void)

Fulfills the promise with the specified value. If the promise has already been resolved, either to a value, a rejection, or another promise, this method does nothing.

-

Type declaration

    • (value): void
    • Fulfills the promise with the specified value. If the promise has already been resolved, either to a value, -a rejection, or another promise, this method does nothing.

      -

      Parameters

      • value: Awaitable<T>

        If this value is not a promise, including undefined, it becomes the fulfillment value of the -associated promise. If this value is a promise, then the associated promise will be resolved to the passed promise, -and follow the state as the provided promise (including any future transitions).

        -

      Returns void

Param: value

If this value is not a promise, including undefined, it becomes the fulfillment value of the +

Type declaration

    • (value): void
    • Parameters

      • value: Awaitable<T>

        If this value is not a promise, including undefined, it becomes the fulfillment value of the associated promise. If this value is a promise, then the associated promise will be resolved to the passed promise, and follow the state as the provided promise (including any future transitions).

        -
\ No newline at end of file +

Returns void

Accessors

  • get [species](): PromiseConstructor
  • Returns PromiseConstructor

\ No newline at end of file diff --git a/classes/Executor.html b/classes/Executor.html deleted file mode 100644 index 0a629f9..0000000 --- a/classes/Executor.html +++ /dev/null @@ -1,41 +0,0 @@ -Executor | parallel-universe - v5.0.1

Class Executor<T>

Manages async callback execution process and provides ways to access execution results, abort or replace an -execution, and subscribe to its state changes.

-

Type Parameters

  • T = any

    The value stored by the executor.

    -

Constructors

Properties

isFulfilled: boolean = false

true if the result was fulfilled with a value, or false otherwise.

-
isRejected: boolean = false

true if the result was rejected with a reason, or false otherwise.

-
promise: null | AbortablePromise<T> = null

The promise of the pending execution, or null if there's no pending execution.

-
reason: any

The reason of failure.

-
value: undefined | T

The value or undefined if rejected.

-

Accessors

  • get isPending(): boolean
  • true if an execution is currently pending, or false otherwise.

    -

    Returns boolean

  • get isSettled(): boolean
  • true if result was fulfilled or rejected, or false otherwise.

    -

    Returns boolean

Methods

  • Instantly aborts pending execution and preserves available results. Value (or error) returned from pending -callback is ignored. The signal passed to the executed callback is aborted.

    -

    Returns this

  • Clears available results and doesn't affect the pending execution.

    -

    Returns this

  • Instantly aborts pending execution (if any), marks executor as pending and invokes the callback.

    -

    If other execution was started before the promise returned by the callback is fulfilled then the signal is aborted -and the returned result is ignored.

    -

    Parameters

    • cb: AbortableCallback<T>

      The callback that returns the new result for the executor to store.

      -

    Returns AbortablePromise<T>

    The promise that is resolved with the result of the callback execution.

    -
  • Returns a value, or the default value if the value isn't available.

    -

    Parameters

    • defaultValue: T

      The default value.

      -

    Returns T

  • Instantly aborts pending execution and rejects with the reason.

    -

    Parameters

    • reason: any

    Returns this

  • Aborts pending execution and fulfills it with the value.

    -

    Parameters

    Returns this

  • Subscribes a listener to the execution state changes.

    -

    Parameters

    • listener: (() => void)

      The listener that would be notified.

      -
        • (): void
        • Returns void

    Returns (() => void)

    The callback to unsubscribe the listener.

    -
      • (): void
      • Returns void

\ No newline at end of file diff --git a/classes/Lock.html b/classes/Lock.html index 42f1483..6423b0f 100644 --- a/classes/Lock.html +++ b/classes/Lock.html @@ -1,14 +1,10 @@ -Lock | parallel-universe - v5.0.1

Promise-based lock implementation.

+Lock | parallel-universe - v6.0.0

Promise-based lock implementation.

When someone tries to acquire a Lock they receive a promise for a release callback that is fulfilled as soon as previous lock owner invokes their release callback.

Constructors

Accessors

Methods

Constructors

Accessors

  • get isLocked(): boolean
  • true if Lock was acquired and wasn't released yet.

    -

    Returns boolean

Methods

  • Waits for the Lock to become available and fulfills it with the callback that releases the lock.

    -

    Returns Promise<(() => void)>

  • Subscribes a listener to the isLocked status changes.

    -

    Parameters

    • listener: (() => void)

      The listener that would be notified.

      -
        • (): void
        • Returns void

    Returns (() => void)

    The callback to unsubscribe the listener.

    -
      • (): void
      • Returns void

\ No newline at end of file +

Constructors

Accessors

Methods

Constructors

Accessors

  • get isLocked(): boolean
  • true if Lock was acquired and wasn't released yet.

    +

    Returns boolean

Methods

  • Waits for the Lock to become available and fulfills it with the callback that releases the lock.

    +

    Returns Promise<(() => void)>

\ No newline at end of file diff --git a/classes/PubSub.html b/classes/PubSub.html index 327d98d..174a24d 100644 --- a/classes/PubSub.html +++ b/classes/PubSub.html @@ -1,12 +1,15 @@ -PubSub | parallel-universe - v5.0.1

Publish–subscribe pattern implementation that guarantees the delivery of published messages even if any of listeners +PubSub | parallel-universe - v6.0.0

Publish–subscribe pattern implementation that guarantees the delivery of published messages even if any of listeners would throw an error.

Type Parameters

  • T = void

    The published message.

    -

Constructors

Methods

Constructors

Methods

  • Synchronously invokes listeners with the published message.

    +

Constructors

Accessors

Methods

Constructors

Accessors

  • get listenerCount(): number
  • The number of subscribed listeners.

    +

    Returns number

Methods

  • Synchronously invokes listeners with the published message.

    Parameters

    • message: T

      The published message.

      -

    Returns void

  • Adds a listener that would receive all messages published via publish.

    +

Returns void

  • Adds a listener that would receive all messages published via publish.

    Parameters

    • listener: ((message) => any)

      The callback.

        • (message): any
        • Parameters

          • message: T

          Returns any

    Returns (() => void)

    The callback that unsubscribes the listener.

    -
      • (): void
      • Returns void

\ No newline at end of file +
    • (): void
    • Returns void

  • Returns void

\ No newline at end of file diff --git a/classes/WorkPool.html b/classes/WorkPool.html index a0e7850..ea4199b 100644 --- a/classes/WorkPool.html +++ b/classes/WorkPool.html @@ -1,26 +1,26 @@ -WorkPool | parallel-universe - v5.0.1

The callback execution pool that can execute limited number of callbacks in parallel while other submitted callbacks +WorkPool | parallel-universe - v6.0.0

The callback execution pool that can execute limited number of callbacks in parallel while other submitted callbacks wait in the queue.

-

Constructors

Accessors

Methods

Constructors

  • Creates a new WorkPool instance that uses given number of workers.

    +

Constructors

Accessors

Methods

Constructors

  • Creates a new WorkPool instance that uses given number of workers.

    Parameters

    • size: number = 1

      The number of workers in the pool.

      -

    Returns WorkPool

Accessors

  • get size(): number
  • The number of active workers in the pool.

    -

    Returns number

Methods

  • Aborts all pending jobs and returns promise that is fulfilled when all workers are terminated.

    +

Returns WorkPool

Accessors

  • get size(): number
  • The number of active workers in the pool.

    +

    Returns number

Methods

  • Aborts all pending jobs and returns promise that is fulfilled when all workers are terminated.

    This operation preserves the size of the pool intact.

    Parameters

    • Optional reason: any

      The reason that is used to reject all pending job promises.

    Returns Promise<void>

    The promise that is fulfilled when all workers are terminated.

    -
  • Changes the size of the pool by spawning or terminating workers. If the size of the pool is reduced, then +

  • Changes the size of the pool by spawning or terminating workers. If the size of the pool is reduced, then corresponding workers are terminated and if they were processing jobs, those jobs are instantly aborted.

    Parameters

    • size: number

      The new size of the pool.

    • Optional reason: any

      The reason that is used to reject pending job promises that are processed by terminated workers. Only applicable if the pool is downsized.

    Returns Promise<void>

    The promise that is fulfilled when the number of workers matches the requested size: excessive workers were deleted or additional workers were spawned.

    -
  • Submits a new callback that should be executed by the worker in the pool.

    +
  • Submits a new callback that should be executed by the worker in the pool.

    Type Parameters

    • T

      The callback result.

    Parameters

    Returns AbortablePromise<T>

    The promise that is fulfilled with the callback result.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/functions/delay.html b/functions/delay.html index 991c8ea..bd143d1 100644 --- a/functions/delay.html +++ b/functions/delay.html @@ -1,9 +1,9 @@ -delay | parallel-universe - v5.0.1
\ No newline at end of file diff --git a/functions/isPromiseLike.html b/functions/isPromiseLike.html deleted file mode 100644 index 16c25a3..0000000 --- a/functions/isPromiseLike.html +++ /dev/null @@ -1,2 +0,0 @@ -isPromiseLike | parallel-universe - v5.0.1

Function isPromiseLike

  • Returns true is value has then property that is a function.

    -

    Type Parameters

    • T

    Parameters

    • value: any

    Returns value is PromiseLike<T>

\ No newline at end of file diff --git a/functions/repeat.html b/functions/repeat.html index ab7ff43..a5a6ca7 100644 --- a/functions/repeat.html +++ b/functions/repeat.html @@ -1,24 +1,26 @@ -repeat | parallel-universe - v5.0.1
  • Invokes a callback periodically with the given delay between settlements of returned promises until the condition is +repeat | parallel-universe - v6.0.0

    • Invokes a callback periodically with the given delay between fulfillment of returned promises until the condition is met. If callback throws an error or returns a rejected promise, then the promise returned from repeat is rejected.

      Type Parameters

      • I

        The value returned by the callback.

      • O

        The value that fulfills the returned promise.

        -

      Parameters

      • cb: AbortableCallback<I>

        The callback that is periodically invoked.

        -
      • ms: number | ((value, index) => number)

        The number of milliseconds between the settlement of the last promise returned by the callback and the +

    Parameters

    • cb: ((signal, index) => Awaitable<I>)

      The callback that is periodically invoked.

      +
    • ms: undefined | number | ((value, index) => number)

      The number of milliseconds between the settlement of the last promise returned by the callback and the next invocation. Or a callback that receives the latest result and returns the delay. If omitted then delay is 0.

    • until: ((value, index) => value is O)

      The callback that should return true to terminate the loop, or false to proceed to the next iteration. The condition is checked before the next iteration is scheduled. If omitted then loop is repeated indefinitely.

        • (value, index): value is O
        • Parameters

          • value: I
          • index: number

          Returns value is O

    Returns AbortablePromise<O>

    The promise that is fulfilled with the callback result.

    -
  • Invokes a callback periodically with the given delay between settlements of returned promises until the condition is +

    See

    retry

    +
  • Invokes a callback periodically with the given delay between fulfillment of returned promises until the condition is met. If callback throws an error or returns a rejected promise, then the promise returned from repeat is rejected.

    Type Parameters

    • T

      The value returned by the callback.

      -

    Parameters

    • cb: AbortableCallback<T>

      The callback that is periodically invoked.

      -
    • Optional ms: number | ((value, index) => number)

      The number of milliseconds between the settlement of the last promise returned by the callback and the next +

Parameters

  • cb: ((signal, index) => Awaitable<T>)

    The callback that is periodically invoked.

    +
  • Optional ms: number | ((value, index) => number)

    The number of milliseconds between the settlement of the last promise returned by the callback and the next invocation. Or a callback that receives the latest result and returns the delay. If omitted then delay is 0.

  • Optional until: ((value, index) => unknown)

    The callback that should return truthy value to terminate the loop, or falsy to proceed to the next iteration. The condition is checked before the next iteration is scheduled. If omitted then loop is repeated indefinitely.

      • (value, index): unknown
      • Parameters

        • value: T
        • index: number

        Returns unknown

Returns AbortablePromise<T>

The promise that is fulfilled with the callback result.

-
\ No newline at end of file +

See

retry

+
\ No newline at end of file diff --git a/functions/retry.html b/functions/retry.html new file mode 100644 index 0000000..55e538c --- /dev/null +++ b/functions/retry.html @@ -0,0 +1,10 @@ +retry | parallel-universe - v6.0.0
  • Invokes a callback periodically until it successfully returns the result. If a callback throws an error or returns +a promise that is rejected then it is invoked again after a delay.

    +

    Type Parameters

    • T

      The value returned by the callback.

      +

    Parameters

    • cb: ((signal, index) => Awaitable<T>)

      The callback that must return the fulfilled result.

      +
    • Optional ms: number | ((error, index) => number)

      The number of milliseconds between the rejection of the last promise returned by the callback and the next +invocation. Or a callback that receives the latest error and returns the delay. If omitted then delay is 0.

      +
    • Optional maxCount: number

      The maximum number of retries after which the last rejection reason is thrown.

      +

    Returns AbortablePromise<T>

    The promise that is fulfilled with the callback result.

    +

    See

    repeat

    +
\ No newline at end of file diff --git a/functions/timeout.html b/functions/timeout.html index ee5dcbd..0673b27 100644 --- a/functions/timeout.html +++ b/functions/timeout.html @@ -1,7 +1,7 @@ -timeout | parallel-universe - v5.0.1

Function timeout

\ No newline at end of file diff --git a/functions/waitFor.html b/functions/waitFor.html index 5d8043f..892c953 100644 --- a/functions/waitFor.html +++ b/functions/waitFor.html @@ -1,7 +1,7 @@ -waitFor | parallel-universe - v5.0.1

Function waitFor

  • Polls the callback until it returns a truthy value or rejects.

    +waitFor | parallel-universe - v6.0.0

    Function waitFor

    • Polls the callback until it returns a truthy value or rejects.

      Type Parameters

      • T

        The value returned by the callback.

        -

      Parameters

      • cb: AbortableCallback<T>

        The callback that is periodically invoked.

        -
      • Optional ms: number | ((value, index) => number)

        The number of milliseconds between the settlement of the last promise returned by the callback and the next +

    Parameters

    • cb: ((signal, index) => Awaitable<T>)

      The callback that is periodically invoked.

      +
    • Optional ms: number | ((value, index) => number)

      The number of milliseconds between the settlement of the last promise returned by the callback and the next invocation. Or a callback that receives the latest value and returns the delay. If omitted then delay is 0.

    Returns AbortablePromise<Exclude<T, false | 0 | "" | null | undefined>>

    The truthy value.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/index.html b/index.html index 86ac331..a98fd41 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,16 @@ -parallel-universe - v5.0.1
\ No newline at end of file +parallel-universe - v6.0.0

parallel-universe - v6.0.0

Index

Classes

Type Aliases

Functions

\ No newline at end of file diff --git a/types/AbortableCallback.html b/types/AbortableCallback.html index d26b3f5..f7265e4 100644 --- a/types/AbortableCallback.html +++ b/types/AbortableCallback.html @@ -1,3 +1,3 @@ -AbortableCallback | parallel-universe - v5.0.1

Type alias AbortableCallback<T>

AbortableCallback<T>: ((signal) => Awaitable<T>)

The callback that receives a signal that is aborted when execution must be stopped, and returns the execution value.

+AbortableCallback | parallel-universe - v6.0.0

Type alias AbortableCallback<T>

AbortableCallback<T>: ((signal) => Awaitable<T>)

The callback that receives a signal that is aborted when execution must be stopped, and returns the execution value.

Type Parameters

  • T

    The returned value.

    -

Type declaration

\ No newline at end of file +

Type declaration

\ No newline at end of file diff --git a/types/Awaitable.html b/types/Awaitable.html index 89ac681..8a4b5c8 100644 --- a/types/Awaitable.html +++ b/types/Awaitable.html @@ -1,3 +1,3 @@ -Awaitable | parallel-universe - v5.0.1

Type alias Awaitable<T>

Awaitable<T>: PromiseLike<T> | T

The promise-like value that can be settled using await.

+Awaitable | parallel-universe - v6.0.0

Type alias Awaitable<T>

Awaitable<T>: PromiseLike<T> | T

The promise-like value that can be settled using await.

Type Parameters

  • T

    The result value.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/types/ValueAck.html b/types/ValueAck.html index e93581f..68063e1 100644 --- a/types/ValueAck.html +++ b/types/ValueAck.html @@ -1,4 +1,4 @@ -ValueAck | parallel-universe - v5.0.1

Type alias ValueAck<T>

ValueAck<T>: [value: T, ack: ((isTaken) => void)]

The protocol provided to the AsyncQueue consumer, so it can acknowledge that the value was processed and +ValueAck | parallel-universe - v6.0.0

Type alias ValueAck<T>

ValueAck<T>: [value: T, ack: ((isTaken) => void)]

The protocol provided to the AsyncQueue consumer, so it can acknowledge that the value was processed and should be removed from the queue.

Type Parameters

  • T

    The value taken from the queue.

    -
\ No newline at end of file +
\ No newline at end of file