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 d0aa8d5..d6f1388 100644 --- a/assets/main.js +++ b/assets/main.js @@ -1,8 +1,8 @@ "use strict"; -"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=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=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_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 Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!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&&(He=!0,F="touchstart",pe="touchmove",B="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(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){D||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!D&&this.active&&n.target.closest(".col-sidebar")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&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(n){super(n);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; } -`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var Z=class extends C{constructor(n){super(n);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 r=Q.getItem(this.key);this.el.open=r?r==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let i=this.summary.querySelector("a");i&&i.addEventListener("click",()=>{location.assign(i.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/style.css b/assets/style.css index 07a385b..778b949 100644 --- a/assets/style.css +++ b/assets/style.css @@ -29,7 +29,7 @@ --light-color-ts-constructor-signature: var(--light-color-ts-constructor); --light-color-ts-parameter: var(--light-color-ts-variable); /* type literal not included as links will never be generated to it */ - --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-type-parameter: #a55c0e; --light-color-ts-accessor: var(--light-color-ts-property); --light-color-ts-get-signature: var(--light-color-ts-accessor); --light-color-ts-set-signature: var(--light-color-ts-accessor); @@ -69,7 +69,7 @@ --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); --dark-color-ts-parameter: var(--dark-color-ts-variable); /* type literal not included as links will never be generated to it */ - --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-type-parameter: #e07d13; --dark-color-ts-accessor: var(--dark-color-ts-property); --dark-color-ts-get-signature: var(--dark-color-ts-accessor); --dark-color-ts-set-signature: var(--dark-color-ts-accessor); @@ -266,12 +266,12 @@ h6 { line-height: 1.2; } -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { +h1 > a:not(.link), +h2 > a:not(.link), +h3 > a:not(.link), +h4 > a:not(.link), +h5 > a:not(.link), +h6 > a:not(.link) { text-decoration: none; color: var(--color-text); } @@ -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); } @@ -649,6 +647,28 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { font-weight: bold; } +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + .tsd-panel-group.tsd-index-group { margin-bottom: 0; } @@ -714,12 +734,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } .tsd-navigation > a, .tsd-navigation .tsd-accordion-summary { - width: calc(100% - 0.5rem); + width: calc(100% - 0.25rem); + display: flex; + align-items: center; } .tsd-navigation a, .tsd-navigation summary > span, .tsd-page-navigation a { - display: inline-flex; + display: flex; + width: calc(100% - 0.25rem); align-items: center; padding: 0.25rem; color: var(--color-text); @@ -759,11 +782,6 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { margin-left: -1.5rem; } -.tsd-nested-navigation > li > a, -.tsd-nested-navigation > li > span { - width: calc(100% - 1.75rem - 0.5rem); -} - .tsd-page-navigation ul { padding-left: 1.75rem; } diff --git a/classes/FSRS.html b/classes/FSRS.html index 7a65a14..8f0ec0f 100644 --- a/classes/FSRS.html +++ b/classes/FSRS.html @@ -1,119 +1,125 @@ -FSRS | ts-fsrs

Class FSRS

Hierarchy

Constructors

Properties

intervalModifier: number
seed?: string

Accessors

  • get interval_modifier(): number
  • Returns number

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    -

    Parameters

    • ivl: number

      The interval to be fuzzed.

      -
    • elapsed_days: number

      t days since the last review

      -
    • Optional enable_fuzz: boolean

      This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

      +FSRS | TS-FSRS

      Class FSRS

      Hierarchy (view full)

      Constructors

      Properties

      intervalModifier: number
      seed?: string

      Accessors

      • get interval_modifier(): number
      • Returns number

      Methods

      • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

        +

        Parameters

        • ivl: number

          The interval to be fuzzed.

          +
        • elapsed_days: number

          t days since the last review

          +
        • Optional enable_fuzz: boolean

          This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

        Returns int

        • The fuzzed interval.
        -
      • Type Parameters

        Parameters

        • card: Card | CardInput

          Card to be processed

          -
        • now: DateInput

          Current time or scheduled time

          -
        • reset_count: boolean = false

          Should the review count information(reps,lapses) be reset. (Optional)

          -
        • Optional afterHandler: ((recordLogItem) => R)

          Convert the result to another type. (Optional)

          -
            • (recordLogItem): R
            • Parameters

              Returns R

        Returns R

        Example

        const now = new Date();
        const f = fsrs();
        const emptyCard = createEmptyCard(now);
        const scheduling_cards = f.repeat(emptyCard, now);
        const { card, log } = scheduling_cards[Rating.Hard];
        const forgetCard = f.forget(card, new Date(), true); +
      • The formula used is : +$$\min \lbrace \max \lbrace D_0,1 \rbrace,10\rbrace$$

        +

        Parameters

        • difficulty: number

          $$D \in [1,10]$$

          +

        Returns number

      • Type Parameters

        Parameters

        • card: Card | CardInput

          Card to be processed

          +
        • now: DateInput

          Current time or scheduled time

          +
        • reset_count: boolean = false

          Should the review count information(reps,lapses) be reset. (Optional)

          +
        • Optional afterHandler: ((recordLogItem) => R)

          Convert the result to another type. (Optional)

          +

        Returns R

        Example

        const now = new Date();
        const f = fsrs();
        const emptyCard = createEmptyCard(now);
        const scheduling_cards = f.repeat(emptyCard, now);
        const { card, log } = scheduling_cards[Rating.Hard];
        const forgetCard = f.forget(card, new Date(), true);

        Example

        interface RepeatRecordLog {
        card: CardUnChecked; //see method: createEmptyCard
        log: RevLogUnchecked; //see method: fsrs.repeat()
        }

        function forgetAfterHandler(recordLogItem: RecordLogItem): RepeatRecordLog {
        return {
        card: {
        ...(recordLogItem.card as Card & { cid: string }),
        due: recordLogItem.card.due.getTime(),
        state: State[recordLogItem.card.state] as StateType,
        last_review: recordLogItem.card.last_review
        ? recordLogItem.card.last_review!.getTime()
        : null,
        },
        log: {
        ...recordLogItem.log,
        cid: (recordLogItem.card as Card & { cid: string }).cid,
        due: recordLogItem.log.due.getTime(),
        review: recordLogItem.log.review.getTime(),
        state: State[recordLogItem.log.state] as StateType,
        rating: Rating[recordLogItem.log.rating] as RatingType,
        },
        };
        }
        const now = new Date();
        const f = fsrs();
        const emptyCardFormAfterHandler = createEmptyCard(now, cardAfterHandler); //see method: createEmptyCard
        const repeatFormAfterHandler = f.repeat(emptyCardFormAfterHandler, now, repeatAfterHandler); //see method: fsrs.repeat()
        const { card } = repeatFormAfterHandler[Rating.Hard];
        const forgetFromAfterHandler = f.forget(card, date_scheduler(now, 1, true), false, forgetAfterHandler);
        -
      • The formula used is : -$$R(t,S) = (1 + FACTOR \times \frac{t}{9 \cdot S})^{DECAY},$$

        -

        Parameters

        • elapsed_days: number

          t days since the last review

          -
        • stability: number

          Stability (interval when R=90%)

          +
      • The formula used is : +$$R(t,S) = (1 + \text{FACTOR} \times \frac{t}{9 \cdot S})^{\text{DECAY}}$$

        +

        Parameters

        • elapsed_days: number

          t days since the last review

          +
        • stability: number

          Stability (interval when R=90%)

        Returns number

        r Retrievability (probability of recall)

        -
      • Parameters

        Returns undefined | string

      • The formula used is : -$$D_0(G) = w_4 - (G-3) \cdot w_5$$ -$$\min {\max {D_0(G),1},10}$$ -where the D_0(3)=w_4 when the first rating is good.

        -

        Parameters

        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          -

        Returns number

        Difficulty D \in [1,10]

        -
      • Parameters

        Returns undefined | string

      • The formula used is : +$$D_0(G) = w_4 - (G-3) \cdot w_5 $$ +$$D_0 = \min \lbrace \max \lbrace D_0(G),1 \rbrace,10 \rbrace$$ +where the $$D_0(3)=w_4$$ when the first rating is good.

        +

        Parameters

        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          +

        Returns number

        Difficulty $$D \in [1,10]$$

        +
      • The formula used is : +$$ S_0(G) = w_{G-1}$$ +$$S_0 = \max \lbrace S_0,0.1\rbrace $$

        +

        Parameters

        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

        Returns number

        Stability (interval when R=90%)

        -
      • The formula used is : -$$w_7 \cdot init +(1 - w_7) \cdot current$$

        -

        Parameters

      • The formula used is : +$$w_7 \cdot \text{init} +(1 - w_7) \cdot \text{current}$$

        +

        Parameters

        • init: number

          $$w_2 : D_0(3) = w_2 + (R-2) \cdot w_3= w_2$$

          +
        • current: number

          $$D - w_6 \cdot (R - 2)$$

        Returns number

        difficulty

        -
      • The formula used is : -$$next_d = D - w_6 \cdot (R - 2)$$ -$$D^\prime(D,R) = w_5 \cdot D_0(2) +(1 - w_5) \cdot next_d$$

        -

        Parameters

        • d: number

          Difficulty D \in [1,10]

          -
        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          -

        Returns number

        next_D

        -
      • Updates the difficulty and stability values of the scheduling card based on the last difficulty, +

      • The formula used is : +$$\text{next}_d = D - w_6 \cdot (R - 2)$$ +$$D^\prime(D,R) = w_5 \cdot D_0(2) +(1 - w_5) \cdot \text{next}_d$$

        +

        Parameters

        • d: number

          Difficulty $$D \in [1,10]$$

          +
        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          +

        Returns number

        $$\text{next}_D$$

        +
      • Updates the difficulty and stability values of the scheduling card based on the last difficulty, last stability, and the current retrievability.

        -

        Parameters

        • s: SchedulingCard

          scheduling Card

          -
        • last_d: number

          Difficulty

          -
        • last_s: number

          Stability

          -
        • retrievability: number

          Retrievability

          -

        Returns void

      • The formula used is : -$$S^\prime_f(D,S,R) = w_11\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}.$$

        -

        Parameters

        • d: number

          Difficulty D \in [1,10]

          -
        • s: number

          Stability (interval when R=90%)

          -
        • r: number

          Retrievability (probability of recall)

          +

          Parameters

          • s: SchedulingCard

            scheduling Card

            +
          • last_d: number

            Difficulty

            +
          • last_s: number

            Stability

            +
          • retrievability: number

            Retrievability

            +

          Returns void

      • The formula used is : +$$S^\prime_f(D,S,R) = w_{11}\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}$$

        +

        Parameters

        • d: number

          Difficulty D \in [1,10]

          +
        • s: number

          Stability (interval when R=90%)

          +
        • r: number

          Retrievability (probability of recall)

        Returns number

        S^\prime_f new stability after forgetting

        -
      • Ref: - constructor(param: Partial) - this.intervalModifier = 9 * (1 / this.param.request_retention - 1);

        -

        Parameters

        • s: number

          Stability (interval when R=90%)

          -
        • elapsed_days: number

          t days since the last review

          -
        • enable_fuzz: boolean = ...

          This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

          -

        Returns int

      • The formula used is : -$$S^\prime_r(D,S,R,G) = S\cdot(e^{w_8}\cdot (11-D)\cdot S^{-w_9}\cdot(e^{w_10\cdot(1-R)}-1)\cdot w_15(if G=2) \cdot w_16(if G=4)+1)$$

        -

        Parameters

      • Parameters

        • s: number

          Stability (interval when R=90%)

          +
        • elapsed_days: number

          t days since the last review

          +
        • enable_fuzz: boolean = ...

          This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

          +

        Returns int

      • The formula used is : +$$S^\prime_r(D,S,R,G) = S\cdot(e^{w_8}\cdot (11-D)\cdot S^{-w_9}\cdot(e^{w_{10}\cdot(1-R)}-1)\cdot w_{15}(\text{if} G=2) \cdot w_{16}(\text{if} G=4)+1)$$

        +

        Parameters

        • d: number

          Difficulty D \in [1,10]

          +
        • s: number

          Stability (interval when R=90%)

          +
        • r: number

          Retrievability (probability of recall)

          +
        • g: Grade

          Grade (Rating[0.again,1.hard,2.good,3.easy])

        Returns number

        S^\prime_r new stability after recall

        -
      • Type Parameters

        Parameters

        • card: Card | CardInput

          Card to be processed

          -
        • now: DateInput

          Current time or scheduled time

          -
        • Optional afterHandler: ((recordLog) => R)

          Convert the result to another type. (Optional)

          -
            • (recordLog): R
            • Parameters

              Returns R

        Returns R

        Example

        const card: Card = createEmptyCard(new Date());
        const f = fsrs();
        const recordLog = f.repeat(card, new Date()); +
      • Type Parameters

        Parameters

        • card: Card | CardInput

          Card to be processed

          +
        • now: DateInput

          Current time or scheduled time

          +
        • Optional afterHandler: ((recordLog) => R)

          Convert the result to another type. (Optional)

          +

        Returns R

        Example

        const card: Card = createEmptyCard(new Date());
        const f = fsrs();
        const recordLog = f.repeat(card, new Date());

        Example

        interface RevLogUnchecked
        extends Omit<ReviewLog, "due" | "review" | "state" | "rating"> {
        cid: string;
        due: Date | number;
        state: StateType;
        review: Date | number;
        rating: RatingType;
        }

        interface RepeatRecordLog {
        card: CardUnChecked; //see method: createEmptyCard
        log: RevLogUnchecked;
        }

        function repeatAfterHandler(recordLog: RecordLog) {
        const record: { [key in Grade]: RepeatRecordLog } = {} as {
        [key in Grade]: RepeatRecordLog;
        };
        for (const grade of Grades) {
        record[grade] = {
        card: {
        ...(recordLog[grade].card as Card & { cid: string }),
        due: recordLog[grade].card.due.getTime(),
        state: State[recordLog[grade].card.state] as StateType,
        last_review: recordLog[grade].card.last_review
        ? recordLog[grade].card.last_review!.getTime()
        : null,
        },
        log: {
        ...recordLog[grade].log,
        cid: (recordLog[grade].card as Card & { cid: string }).cid,
        due: recordLog[grade].log.due.getTime(),
        review: recordLog[grade].log.review.getTime(),
        state: State[recordLog[grade].log.state] as StateType,
        rating: Rating[recordLog[grade].log.rating] as RatingType,
        },
        };
        }
        return record;
        }
        const card: Card = createEmptyCard(new Date(), cardAfterHandler); //see method: createEmptyCard
        const f = fsrs();
        const recordLog = f.repeat(card, new Date(), repeatAfterHandler);
        -
      • Type Parameters

        Parameters

        • cards: T[]

          scheduled card collection

          -
        • options: RescheduleOptions = {}

          Reschedule options,fuzz is enabled by default.If the type of due is not Date, please implement dataHandler.

          -

        Returns T[]

        Example

        type CardType = Card & {
        cid: number;
        };
        const reviewCard: CardType = {
        cid: 1,
        due: new Date("2024-03-17 04:43:02"),
        stability: 48.26139059062234,
        difficulty: 5.67,
        elapsed_days: 18,
        scheduled_days: 51,
        reps: 8,
        lapses: 1,
        state: State.Review,
        last_review: new Date("2024-01-26 04:43:02"),
        };
        const f = fsrs();
        const reschedule_cards = f.reschedule([reviewCard]); +
      • Type Parameters

        Parameters

        • cards: T[]

          scheduled card collection

          +
        • options: RescheduleOptions = {}

          Reschedule options,fuzz is enabled by default.If the type of due is not Date, please implement dataHandler.

          +

        Returns T[]

        Example

        type CardType = Card & {
        cid: number;
        };
        const reviewCard: CardType = {
        cid: 1,
        due: new Date("2024-03-17 04:43:02"),
        stability: 48.26139059062234,
        difficulty: 5.67,
        elapsed_days: 18,
        scheduled_days: 51,
        reps: 8,
        lapses: 1,
        state: State.Review,
        last_review: new Date("2024-01-26 04:43:02"),
        };
        const f = fsrs();
        const reschedule_cards = f.reschedule([reviewCard]);
        -
      • Type Parameters

        Parameters

        • card: Card | CardInput

          Card to be processed

          -
        • log: ReviewLogInput

          last review log

          -
        • Optional afterHandler: ((prevCard) => R)

          Convert the result to another type. (Optional)

          -
            • (prevCard): R
            • Parameters

              Returns R

        Returns R

        Example

        const now = new Date();
        const f = fsrs();
        const emptyCardFormAfterHandler = createEmptyCard(now);
        const repeatFormAfterHandler = f.repeat(emptyCardFormAfterHandler, now);
        const { card, log } = repeatFormAfterHandler[Rating.Hard];
        const rollbackFromAfterHandler = f.rollback(card, log); +
      • Type Parameters

        Parameters

        • card: Card | CardInput

          Card to be processed

          +
        • log: ReviewLogInput

          last review log

          +
        • Optional afterHandler: ((prevCard) => R)

          Convert the result to another type. (Optional)

          +
            • (prevCard): R
            • Parameters

              Returns R

        Returns R

        Example

        const now = new Date();
        const f = fsrs();
        const emptyCardFormAfterHandler = createEmptyCard(now);
        const repeatFormAfterHandler = f.repeat(emptyCardFormAfterHandler, now);
        const { card, log } = repeatFormAfterHandler[Rating.Hard];
        const rollbackFromAfterHandler = f.rollback(card, log);

        Example

        const now = new Date();
        const f = fsrs();
        const emptyCardFormAfterHandler = createEmptyCard(now, cardAfterHandler); //see method: createEmptyCard
        const repeatFormAfterHandler = f.repeat(emptyCardFormAfterHandler, now, repeatAfterHandler); //see method: fsrs.repeat()
        const { card, log } = repeatFormAfterHandler[Rating.Hard];
        const rollbackFromAfterHandler = f.rollback(card, log, cardAfterHandler);
        -

      Generated using TypeDoc

      \ No newline at end of file +
\ No newline at end of file diff --git a/classes/FSRSAlgorithm.html b/classes/FSRSAlgorithm.html index 11492fc..57126a8 100644 --- a/classes/FSRSAlgorithm.html +++ b/classes/FSRSAlgorithm.html @@ -1,87 +1,93 @@ -FSRSAlgorithm | ts-fsrs

Class FSRSAlgorithm

Hierarchy

Constructors

Properties

intervalModifier: number
seed?: string

Accessors

Methods

  • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

    -

    Parameters

    • ivl: number

      The interval to be fuzzed.

      -
    • elapsed_days: number

      t days since the last review

      -
    • Optional enable_fuzz: boolean

      This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

      +FSRSAlgorithm | TS-FSRS

      Class FSRSAlgorithm

      Hierarchy (view full)

      Constructors

      Properties

      intervalModifier: number
      seed?: string

      Accessors

      Methods

      • If fuzzing is disabled or ivl is less than 2.5, it returns the original interval.

        +

        Parameters

        • ivl: number

          The interval to be fuzzed.

          +
        • elapsed_days: number

          t days since the last review

          +
        • Optional enable_fuzz: boolean

          This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

        Returns int

        • The fuzzed interval.
        -
      • The formula used is : -$$\min {\max {D_0,1},10}$$

        -

        Parameters

        • difficulty: number

          D \in [1,10]

          -

        Returns number

      • The formula used is : -$$R(t,S) = (1 + FACTOR \times \frac{t}{9 \cdot S})^{DECAY},$$

        -

        Parameters

        • elapsed_days: number

          t days since the last review

          -
        • stability: number

          Stability (interval when R=90%)

          +
      • The formula used is : +$$\min \lbrace \max \lbrace D_0,1 \rbrace,10\rbrace$$

        +

        Parameters

        • difficulty: number

          $$D \in [1,10]$$

          +

        Returns number

      • The formula used is : +$$R(t,S) = (1 + \text{FACTOR} \times \frac{t}{9 \cdot S})^{\text{DECAY}}$$

        +

        Parameters

        • elapsed_days: number

          t days since the last review

          +
        • stability: number

          Stability (interval when R=90%)

        Returns number

        r Retrievability (probability of recall)

        -
      • The formula used is : -$$D_0(G) = w_4 - (G-3) \cdot w_5$$ -$$\min {\max {D_0(G),1},10}$$ -where the D_0(3)=w_4 when the first rating is good.

        -

        Parameters

        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          -

        Returns number

        Difficulty D \in [1,10]

        -
      • The formula used is : -S_0(G) = w_{G-1} -\max {S_0,0.1}

        -

        Parameters

      • The formula used is : +$$D_0(G) = w_4 - (G-3) \cdot w_5 $$ +$$D_0 = \min \lbrace \max \lbrace D_0(G),1 \rbrace,10 \rbrace$$ +where the $$D_0(3)=w_4$$ when the first rating is good.

        +

        Parameters

        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          +

        Returns number

        Difficulty $$D \in [1,10]$$

        +
      • The formula used is : +$$ S_0(G) = w_{G-1}$$ +$$S_0 = \max \lbrace S_0,0.1\rbrace $$

        +

        Parameters

        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

        Returns number

        Stability (interval when R=90%)

        -
      • The formula used is : -$$w_7 \cdot init +(1 - w_7) \cdot current$$

        -

        Parameters

        • init: number

          $$w_2 : D_0(3) = w_2 + (R-2) \cdot w_3= w_2$$

          -
        • current: number

          $$D - w_6 \cdot (R - 2)$$

          +
      • The formula used is : +$$w_7 \cdot \text{init} +(1 - w_7) \cdot \text{current}$$

        +

        Parameters

        • init: number

          $$w_2 : D_0(3) = w_2 + (R-2) \cdot w_3= w_2$$

          +
        • current: number

          $$D - w_6 \cdot (R - 2)$$

        Returns number

        difficulty

        -
      • The formula used is : -$$next_d = D - w_6 \cdot (R - 2)$$ -$$D^\prime(D,R) = w_5 \cdot D_0(2) +(1 - w_5) \cdot next_d$$

        -

        Parameters

        • d: number

          Difficulty D \in [1,10]

          -
        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          -

        Returns number

        next_D

        -
      • Updates the difficulty and stability values of the scheduling card based on the last difficulty, +

      • The formula used is : +$$\text{next}_d = D - w_6 \cdot (R - 2)$$ +$$D^\prime(D,R) = w_5 \cdot D_0(2) +(1 - w_5) \cdot \text{next}_d$$

        +

        Parameters

        • d: number

          Difficulty $$D \in [1,10]$$

          +
        • g: Grade

          Grade (rating at Anki) [1.again,2.hard,3.good,4.easy]

          +

        Returns number

        $$\text{next}_D$$

        +
      • Updates the difficulty and stability values of the scheduling card based on the last difficulty, last stability, and the current retrievability.

        -

        Parameters

        • s: SchedulingCard

          scheduling Card

          -
        • last_d: number

          Difficulty

          -
        • last_s: number

          Stability

          -
        • retrievability: number

          Retrievability

          -

        Returns void

      • The formula used is : -$$S^\prime_f(D,S,R) = w_11\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}.$$

        -

        Parameters

        • d: number

          Difficulty D \in [1,10]

          -
        • s: number

          Stability (interval when R=90%)

          -
        • r: number

          Retrievability (probability of recall)

          +

          Parameters

          • s: SchedulingCard

            scheduling Card

            +
          • last_d: number

            Difficulty

            +
          • last_s: number

            Stability

            +
          • retrievability: number

            Retrievability

            +

          Returns void

      • The formula used is : +$$S^\prime_f(D,S,R) = w_{11}\cdot D^{-w_{12}}\cdot ((S+1)^{w_{13}}-1) \cdot e^{w_{14}\cdot(1-R)}$$

        +

        Parameters

        • d: number

          Difficulty D \in [1,10]

          +
        • s: number

          Stability (interval when R=90%)

          +
        • r: number

          Retrievability (probability of recall)

        Returns number

        S^\prime_f new stability after forgetting

        -
      • Ref: - constructor(param: Partial) - this.intervalModifier = 9 * (1 / this.param.request_retention - 1);

        -

        Parameters

        • s: number

          Stability (interval when R=90%)

          -
        • elapsed_days: number

          t days since the last review

          -
        • enable_fuzz: boolean = ...

          This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

          -

        Returns int

      • The formula used is : -$$S^\prime_r(D,S,R,G) = S\cdot(e^{w_8}\cdot (11-D)\cdot S^{-w_9}\cdot(e^{w_10\cdot(1-R)}-1)\cdot w_15(if G=2) \cdot w_16(if G=4)+1)$$

        -

        Parameters

        • d: number

          Difficulty D \in [1,10]

          -
        • s: number

          Stability (interval when R=90%)

          -
        • r: number

          Retrievability (probability of recall)

          -
        • g: Grade

          Grade (Rating[0.again,1.hard,2.good,3.easy])

          +
      • Parameters

        • s: number

          Stability (interval when R=90%)

          +
        • elapsed_days: number

          t days since the last review

          +
        • enable_fuzz: boolean = ...

          This adds a small random delay to the new interval time to prevent cards from sticking together and always being reviewed on the same day.

          +

        Returns int

      • The formula used is : +$$S^\prime_r(D,S,R,G) = S\cdot(e^{w_8}\cdot (11-D)\cdot S^{-w_9}\cdot(e^{w_{10}\cdot(1-R)}-1)\cdot w_{15}(\text{if} G=2) \cdot w_{16}(\text{if} G=4)+1)$$

        +

        Parameters

        • d: number

          Difficulty D \in [1,10]

          +
        • s: number

          Stability (interval when R=90%)

          +
        • r: number

          Retrievability (probability of recall)

          +
        • g: Grade

          Grade (Rating[0.again,1.hard,2.good,3.easy])

        Returns number

        S^\prime_r new stability after recall

        -

      Generated using TypeDoc

      \ No newline at end of file +
\ No newline at end of file diff --git a/classes/SchedulingCard.html b/classes/SchedulingCard.html index fd8104e..4fed4fa 100644 --- a/classes/SchedulingCard.html +++ b/classes/SchedulingCard.html @@ -1,12 +1,15 @@ -SchedulingCard | ts-fsrs

Class SchedulingCard

Constructors

Properties

again: Card
easy: Card
good: Card
hard: Card
last_elapsed_days: number
last_review: Date

Methods

Generated using TypeDoc

\ No newline at end of file +SchedulingCard | TS-FSRS

Class SchedulingCard

Constructors

Properties

again: Card
easy: Card
good: Card
hard: Card
last_elapsed_days: number
last_review: Date

Methods

\ No newline at end of file diff --git a/enums/Rating.html b/enums/Rating.html index 5a69276..3d83ebc 100644 --- a/enums/Rating.html +++ b/enums/Rating.html @@ -1,6 +1,9 @@ -Rating | ts-fsrs

Enumeration Rating

Enumeration Members

Enumeration Members

Again: 1
Easy: 4
Good: 3
Hard: 2
Manual: 0

Generated using TypeDoc

\ No newline at end of file +Rating | TS-FSRS

Enumeration Rating

Enumeration Members

Enumeration Members

Again: 1
Easy: 4
Good: 3
Hard: 2
Manual: 0
\ No newline at end of file diff --git a/enums/State.html b/enums/State.html index be9297f..798d183 100644 --- a/enums/State.html +++ b/enums/State.html @@ -1,5 +1,8 @@ -State | ts-fsrs

Enumeration State

Enumeration Members

Enumeration Members

Learning: 1
New: 0
Relearning: 3
Review: 2

Generated using TypeDoc

\ No newline at end of file +State | TS-FSRS

Enumeration State

Enumeration Members

Enumeration Members

Learning: 1
New: 0
Relearning: 3
Review: 2
\ No newline at end of file diff --git a/functions/createEmptyCard.html b/functions/createEmptyCard.html index cec7db7..cd9e41d 100644 --- a/functions/createEmptyCard.html +++ b/functions/createEmptyCard.html @@ -1,8 +1,11 @@ -createEmptyCard | ts-fsrs

Function createEmptyCard

  • Create an empty card

    -

    Type Parameters

    Parameters

    • Optional now: DateInput

      Current time

      -
    • Optional afterHandler: ((card) => R)

      Convert the result to another type. (Optional)

      -
        • (card): R
        • Parameters

          Returns R

    Returns R

    Example

    const card: Card = createEmptyCard(new Date());
    +createEmptyCard | TS-FSRS

    Function createEmptyCard

    • Create an empty card

      +

      Type Parameters

      Parameters

      • Optional now: DateInput

        Current time

        +
      • Optional afterHandler: ((card) => R)

        Convert the result to another type. (Optional)

        +
          • (card): R
          • Parameters

            Returns R

      Returns R

      Example

      const card: Card = createEmptyCard(new Date());
       

      Example

      interface CardUnChecked
      extends Omit<Card, "due" | "last_review" | "state"> {
      cid: string;
      due: Date | number;
      last_review: Date | null | number;
      state: StateType;
      }

      function cardAfterHandler(card: Card) {
      return {
      ...card,
      cid: "test001",
      state: State[card.state],
      last_review: card.last_review ?? null,
      } as CardUnChecked;
      }

      const card: CardUnChecked = createEmptyCard(new Date(), cardAfterHandler);
      -

    Generated using TypeDoc

    \ No newline at end of file +
\ No newline at end of file diff --git a/functions/date_diff.html b/functions/date_diff.html index 2816059..cd00c64 100644 --- a/functions/date_diff.html +++ b/functions/date_diff.html @@ -1 +1,4 @@ -date_diff | ts-fsrs

Function date_diff

Generated using TypeDoc

\ No newline at end of file +date_diff | TS-FSRS

Function date_diff

\ No newline at end of file diff --git a/functions/date_scheduler.html b/functions/date_scheduler.html index 782882d..064d809 100644 --- a/functions/date_scheduler.html +++ b/functions/date_scheduler.html @@ -1,6 +1,9 @@ -date_scheduler | ts-fsrs

Function date_scheduler

  • 计算日期和时间的偏移,并返回一个新的日期对象。

    -

    Parameters

    • now: DateInput

      当前日期和时间

      -
    • t: number

      时间偏移量,当 isDay 为 true 时表示天数,为 false 时表示分钟

      -
    • Optional isDay: boolean

      (可选)是否按天数单位进行偏移,默认为 false,表示按分钟单位计算偏移

      -

    Returns Date

    偏移后的日期和时间对象

    -

Generated using TypeDoc

\ No newline at end of file +date_scheduler | TS-FSRS

Function date_scheduler

  • 计算日期和时间的偏移,并返回一个新的日期对象。

    +

    Parameters

    • now: DateInput

      当前日期和时间

      +
    • t: number

      时间偏移量,当 isDay 为 true 时表示天数,为 false 时表示分钟

      +
    • Optional isDay: boolean

      (可选)是否按天数单位进行偏移,默认为 false,表示按分钟单位计算偏移

      +

    Returns Date

    偏移后的日期和时间对象

    +
\ No newline at end of file diff --git a/functions/fixDate.html b/functions/fixDate.html index 36d6600..69aa456 100644 --- a/functions/fixDate.html +++ b/functions/fixDate.html @@ -1 +1,4 @@ -fixDate | ts-fsrs

Function fixDate

  • Parameters

    • value: unknown

    Returns Date

Generated using TypeDoc

\ No newline at end of file +fixDate | TS-FSRS

Function fixDate

  • Parameters

    • value: unknown

    Returns Date

\ No newline at end of file diff --git a/functions/fixRating.html b/functions/fixRating.html index 30b6c58..905e5a5 100644 --- a/functions/fixRating.html +++ b/functions/fixRating.html @@ -1 +1,4 @@ -fixRating | ts-fsrs

Function fixRating

Generated using TypeDoc

\ No newline at end of file +fixRating | TS-FSRS

Function fixRating

\ No newline at end of file diff --git a/functions/fixState.html b/functions/fixState.html index 458dfa4..de46beb 100644 --- a/functions/fixState.html +++ b/functions/fixState.html @@ -1 +1,4 @@ -fixState | ts-fsrs

Function fixState

Generated using TypeDoc

\ No newline at end of file +fixState | TS-FSRS

Function fixState

\ No newline at end of file diff --git a/functions/formatDate.html b/functions/formatDate.html index 1e1cc6f..e83ab46 100644 --- a/functions/formatDate.html +++ b/functions/formatDate.html @@ -1 +1,4 @@ -formatDate | ts-fsrs

Function formatDate

Generated using TypeDoc

\ No newline at end of file +formatDate | TS-FSRS

Function formatDate

\ No newline at end of file diff --git a/functions/fsrs-1.html b/functions/fsrs-1.html index 6fff9ec..950c858 100644 --- a/functions/fsrs-1.html +++ b/functions/fsrs-1.html @@ -1,9 +1,12 @@ -fsrs | ts-fsrs

Function fsrs

\ No newline at end of file diff --git a/functions/generatorParameters.html b/functions/generatorParameters.html index c3490e1..bd6e7b2 100644 --- a/functions/generatorParameters.html +++ b/functions/generatorParameters.html @@ -1 +1,4 @@ -generatorParameters | ts-fsrs

Function generatorParameters

Generated using TypeDoc

\ No newline at end of file +generatorParameters | TS-FSRS

Function generatorParameters

\ No newline at end of file diff --git a/functions/get_fuzz_range.html b/functions/get_fuzz_range.html index 2b14227..1c146a6 100644 --- a/functions/get_fuzz_range.html +++ b/functions/get_fuzz_range.html @@ -1 +1,4 @@ -get_fuzz_range | ts-fsrs

Function get_fuzz_range

  • Parameters

    • interval: number
    • elapsed_days: number
    • maximum_interval: number

    Returns {
        max_ivl: number;
        min_ivl: number;
    }

    • max_ivl: number
    • min_ivl: number

Generated using TypeDoc

\ No newline at end of file +get_fuzz_range | TS-FSRS

Function get_fuzz_range

  • Parameters

    • interval: number
    • elapsed_days: number
    • maximum_interval: number

    Returns {
        max_ivl: number;
        min_ivl: number;
    }

    • max_ivl: number
    • min_ivl: number
\ No newline at end of file diff --git a/functions/show_diff_message.html b/functions/show_diff_message.html index ecb0392..9b3e9d0 100644 --- a/functions/show_diff_message.html +++ b/functions/show_diff_message.html @@ -1 +1,4 @@ -show_diff_message | ts-fsrs

Function show_diff_message

  • Parameters

    • due: DateInput
    • last_review: DateInput
    • Optional unit: boolean
    • timeUnit: string[] = TIMEUNITFORMAT

    Returns string

Generated using TypeDoc

\ No newline at end of file +show_diff_message | TS-FSRS

Function show_diff_message

  • Parameters

    • due: DateInput
    • last_review: DateInput
    • Optional unit: boolean
    • timeUnit: string[] = TIMEUNITFORMAT

    Returns string

\ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html new file mode 100644 index 0000000..9fcaf5a --- /dev/null +++ b/hierarchy.html @@ -0,0 +1,4 @@ +TS-FSRS

TS-FSRS

Class Hierarchy

\ No newline at end of file diff --git a/index.html b/index.html index 6afbff3..e1c88ff 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,7 @@ -ts-fsrs

ts-fsrs

Introduction | 简体中文はじめに

+TS-FSRS

TS-FSRS

Introduction | 简体中文はじめに


About The

ts-fsrs npm version Downloads @@ -39,4 +42,4 @@

6. Understanding Log Attributes:

Each ReviewLog object contains various attributes that determine the review record information associated with the card, used for analysis, undoing the review, and optimization (WIP).

type ReviewLog = {
rating: Rating; // Rating of the review (Again, Hard, Good, Easy)
state: State; // State of the review (New, Learning, Review, Relearning)
due: Date; // Date of the last scheduling
stability: number; // Stability of the card before the review
difficulty: number; // Difficulty of the card before the review
elapsed_days: number; // Number of days elapsed since the last review
last_elapsed_days: number; // Number of days between the last two reviews
scheduled_days: number; // Number of days until the next review
review: Date; // Date of the review
}
-

Generated using TypeDoc

\ No newline at end of file +
\ No newline at end of file diff --git a/interfaces/Card.html b/interfaces/Card.html index 7609e70..95d63de 100644 --- a/interfaces/Card.html +++ b/interfaces/Card.html @@ -1,10 +1,13 @@ -Card | ts-fsrs

Interface Card

interface Card {
    difficulty: number;
    due: Date;
    elapsed_days: number;
    lapses: number;
    last_review?: Date;
    reps: number;
    scheduled_days: number;
    stability: number;
    state: State;
}

Properties

difficulty: number
due: Date
elapsed_days: number
lapses: number
last_review?: Date
reps: number
scheduled_days: number
stability: number
state: State

Generated using TypeDoc

\ No newline at end of file +Card | TS-FSRS

Interface Card

interface Card {
    difficulty: number;
    due: Date;
    elapsed_days: number;
    lapses: number;
    last_review?: Date;
    reps: number;
    scheduled_days: number;
    stability: number;
    state: State;
}

Properties

difficulty: number
due: Date
elapsed_days: number
lapses: number
last_review?: Date
reps: number
scheduled_days: number
stability: number
state: State
\ No newline at end of file diff --git a/interfaces/CardInput.html b/interfaces/CardInput.html index b9ddeaf..3892de6 100644 --- a/interfaces/CardInput.html +++ b/interfaces/CardInput.html @@ -1,10 +1,13 @@ -CardInput | ts-fsrs

Interface CardInput

interface CardInput {
    difficulty: number;
    due: DateInput;
    elapsed_days: number;
    lapses: number;
    last_review?: null | DateInput;
    reps: number;
    scheduled_days: number;
    stability: number;
    state: StateType | State;
}

Hierarchy

  • Omit<Card, "state" | "due" | "last_review">
    • CardInput

Properties

difficulty: number
elapsed_days: number
lapses: number
last_review?: null | DateInput
reps: number
scheduled_days: number
stability: number
state: StateType | State

Generated using TypeDoc

\ No newline at end of file +CardInput | TS-FSRS

Interface CardInput

interface CardInput {
    difficulty: number;
    due: DateInput;
    elapsed_days: number;
    lapses: number;
    last_review?: null | DateInput;
    reps: number;
    scheduled_days: number;
    stability: number;
    state: StateType | State;
}

Hierarchy

  • Omit<Card, "state" | "due" | "last_review">
    • CardInput

Properties

difficulty: number
elapsed_days: number
lapses: number
last_review?: null | DateInput
reps: number
scheduled_days: number
stability: number
state: StateType | State
\ No newline at end of file diff --git a/interfaces/FSRSParameters.html b/interfaces/FSRSParameters.html index a82317e..12c20f4 100644 --- a/interfaces/FSRSParameters.html +++ b/interfaces/FSRSParameters.html @@ -1,5 +1,8 @@ -FSRSParameters | ts-fsrs

Interface FSRSParameters

interface FSRSParameters {
    enable_fuzz: boolean;
    maximum_interval: number;
    request_retention: number;
    w: number[];
}

Properties

enable_fuzz: boolean
maximum_interval: number
request_retention: number
w: number[]

Generated using TypeDoc

\ No newline at end of file +FSRSParameters | TS-FSRS

Interface FSRSParameters

interface FSRSParameters {
    enable_fuzz: boolean;
    maximum_interval: number;
    request_retention: number;
    w: number[];
}

Properties

enable_fuzz: boolean
maximum_interval: number
request_retention: number
w: number[]
\ No newline at end of file diff --git a/interfaces/ReviewLog.html b/interfaces/ReviewLog.html index 706b84b..2e80b38 100644 --- a/interfaces/ReviewLog.html +++ b/interfaces/ReviewLog.html @@ -1,10 +1,13 @@ -ReviewLog | ts-fsrs

Interface ReviewLog

interface ReviewLog {
    difficulty: number;
    due: Date;
    elapsed_days: number;
    last_elapsed_days: number;
    rating: Rating;
    review: Date;
    scheduled_days: number;
    stability: number;
    state: State;
}

Properties

difficulty: number
due: Date
elapsed_days: number
last_elapsed_days: number
rating: Rating
review: Date
scheduled_days: number
stability: number
state: State

Generated using TypeDoc

\ No newline at end of file +ReviewLog | TS-FSRS

Interface ReviewLog

interface ReviewLog {
    difficulty: number;
    due: Date;
    elapsed_days: number;
    last_elapsed_days: number;
    rating: Rating;
    review: Date;
    scheduled_days: number;
    stability: number;
    state: State;
}

Properties

difficulty: number
due: Date
elapsed_days: number
last_elapsed_days: number
rating: Rating
review: Date
scheduled_days: number
stability: number
state: State
\ No newline at end of file diff --git a/interfaces/ReviewLogInput.html b/interfaces/ReviewLogInput.html index 561f5a2..0e3c5ad 100644 --- a/interfaces/ReviewLogInput.html +++ b/interfaces/ReviewLogInput.html @@ -1,10 +1,13 @@ -ReviewLogInput | ts-fsrs

Interface ReviewLogInput

interface ReviewLogInput {
    difficulty: number;
    due: DateInput;
    elapsed_days: number;
    last_elapsed_days: number;
    rating: RatingType | Rating;
    review: DateInput;
    scheduled_days: number;
    stability: number;
    state: StateType | State;
}

Hierarchy

  • Omit<ReviewLog, "rating" | "state" | "due" | "review">
    • ReviewLogInput

Properties

difficulty: number
elapsed_days: number
last_elapsed_days: number
rating: RatingType | Rating
review: DateInput
scheduled_days: number
stability: number
state: StateType | State

Generated using TypeDoc

\ No newline at end of file +ReviewLogInput | TS-FSRS

Interface ReviewLogInput

interface ReviewLogInput {
    difficulty: number;
    due: DateInput;
    elapsed_days: number;
    last_elapsed_days: number;
    rating: RatingType | Rating;
    review: DateInput;
    scheduled_days: number;
    stability: number;
    state: StateType | State;
}

Hierarchy

  • Omit<ReviewLog, "rating" | "state" | "due" | "review">
    • ReviewLogInput

Properties

difficulty: number
elapsed_days: number
last_elapsed_days: number
rating: RatingType | Rating
review: DateInput
scheduled_days: number
stability: number
state: StateType | State
\ No newline at end of file diff --git a/modules.html b/modules.html index e084603..6045230 100644 --- a/modules.html +++ b/modules.html @@ -1,39 +1,42 @@ -ts-fsrs

Generated using TypeDoc

\ No newline at end of file +TS-FSRS
\ No newline at end of file diff --git a/types/DateInput.html b/types/DateInput.html index 0f34bf3..04c281b 100644 --- a/types/DateInput.html +++ b/types/DateInput.html @@ -1 +1,4 @@ -DateInput | ts-fsrs

Type alias DateInput

DateInput: Date | number | string

Generated using TypeDoc

\ No newline at end of file +DateInput | TS-FSRS

Type alias DateInput

DateInput: Date | number | string
\ No newline at end of file diff --git a/types/Grade.html b/types/Grade.html index 55758d4..ff8cbb7 100644 --- a/types/Grade.html +++ b/types/Grade.html @@ -1 +1,4 @@ -Grade | ts-fsrs

Generated using TypeDoc

\ No newline at end of file +Grade | TS-FSRS

Type alias Grade

Grade: ExcludeManual<Rating>
\ No newline at end of file diff --git a/types/RatingType.html b/types/RatingType.html index f458972..d5b7753 100644 --- a/types/RatingType.html +++ b/types/RatingType.html @@ -1 +1,4 @@ -RatingType | ts-fsrs

Type alias RatingType

RatingType: "Manual" | "Again" | "Hard" | "Good" | "Easy"

Generated using TypeDoc

\ No newline at end of file +RatingType | TS-FSRS

Type alias RatingType

RatingType: "Manual" | "Again" | "Hard" | "Good" | "Easy"
\ No newline at end of file diff --git a/types/RecordLog.html b/types/RecordLog.html index 172200b..f4b2823 100644 --- a/types/RecordLog.html +++ b/types/RecordLog.html @@ -1 +1,4 @@ -RecordLog | ts-fsrs

Generated using TypeDoc

\ No newline at end of file +RecordLog | TS-FSRS

Type alias RecordLog

RecordLog: {
    [key in Grade]: RecordLogItem
}
\ No newline at end of file diff --git a/types/RecordLogItem.html b/types/RecordLogItem.html index 3708943..aa87060 100644 --- a/types/RecordLogItem.html +++ b/types/RecordLogItem.html @@ -1 +1,4 @@ -RecordLogItem | ts-fsrs

Type alias RecordLogItem

RecordLogItem: {
    card: Card;
    log: ReviewLog;
}

Type declaration

Generated using TypeDoc

\ No newline at end of file +RecordLogItem | TS-FSRS

Type alias RecordLogItem

RecordLogItem: {
    card: Card;
    log: ReviewLog;
}

Type declaration

\ No newline at end of file diff --git a/types/StateType.html b/types/StateType.html index de00cbd..f4c38d1 100644 --- a/types/StateType.html +++ b/types/StateType.html @@ -1 +1,4 @@ -StateType | ts-fsrs

Type alias StateType

StateType: "New" | "Learning" | "Review" | "Relearning"

Generated using TypeDoc

\ No newline at end of file +StateType | TS-FSRS

Type alias StateType

StateType: "New" | "Learning" | "Review" | "Relearning"
\ No newline at end of file diff --git a/types/double.html b/types/double.html index f659b43..2d80604 100644 --- a/types/double.html +++ b/types/double.html @@ -1 +1,4 @@ -double | ts-fsrs

Type alias double

double: number & {
    __double__: void;
}

Type declaration

  • __double__: void

Generated using TypeDoc

\ No newline at end of file +double | TS-FSRS

Type alias double

double: number & {
    __double__: void;
}

Type declaration

  • __double__: void
\ No newline at end of file diff --git a/types/int.html b/types/int.html index af9c9ef..c09fb5f 100644 --- a/types/int.html +++ b/types/int.html @@ -1 +1,4 @@ -int | ts-fsrs

Type alias int

int: number & {
    __int__: void;
}

Type declaration

  • __int__: void

Generated using TypeDoc

\ No newline at end of file +int | TS-FSRS

Type alias int

int: number & {
    __int__: void;
}

Type declaration

  • __int__: void
\ No newline at end of file diff --git a/types/unit.html b/types/unit.html index 2622eb4..a664bc5 100644 --- a/types/unit.html +++ b/types/unit.html @@ -1 +1,4 @@ -unit | ts-fsrs

Type alias unit

unit: "days" | "minutes"

Generated using TypeDoc

\ No newline at end of file +unit | TS-FSRS

Type alias unit

unit: "days" | "minutes"
\ No newline at end of file diff --git a/variables/DECAY.html b/variables/DECAY.html index fe531b0..27813b4 100644 --- a/variables/DECAY.html +++ b/variables/DECAY.html @@ -1 +1,6 @@ -DECAY | ts-fsrs

Generated using TypeDoc

\ No newline at end of file +DECAY | TS-FSRS

Variable DECAYConst

DECAY: number = -0.5

Default

DECAY = -0.5
+
+
\ No newline at end of file diff --git a/variables/FACTOR.html b/variables/FACTOR.html index 08a02ed..ebb8010 100644 --- a/variables/FACTOR.html +++ b/variables/FACTOR.html @@ -1 +1,8 @@ -FACTOR | ts-fsrs

Generated using TypeDoc

\ No newline at end of file +FACTOR | TS-FSRS

Variable FACTORConst

FACTOR: number = ...

FACTOR = Math.pow(0.9, 1 / DECAY) - 1= 19 / 81

+

$$\text{FACTOR} = \frac{19}{81}$$

+

Default

FACTOR = 19 / 81
+
+
\ No newline at end of file diff --git a/variables/FSRSVersion.html b/variables/FSRSVersion.html index 443ec15..c964ee8 100644 --- a/variables/FSRSVersion.html +++ b/variables/FSRSVersion.html @@ -1 +1,4 @@ -FSRSVersion | ts-fsrs

Variable FSRSVersionConst

FSRSVersion: string = "3.5.4"

Generated using TypeDoc

\ No newline at end of file +FSRSVersion | TS-FSRS

Variable FSRSVersionConst

FSRSVersion: string = "3.5.4"
\ No newline at end of file diff --git a/variables/Grades.html b/variables/Grades.html index 3a16a79..73ff7e8 100644 --- a/variables/Grades.html +++ b/variables/Grades.html @@ -1 +1,4 @@ -Grades | ts-fsrs

Variable GradesConst

Grades: Readonly<Grade[]> = ...

Generated using TypeDoc

\ No newline at end of file +Grades | TS-FSRS

Variable GradesConst

Grades: Readonly<Grade[]> = ...
\ No newline at end of file diff --git a/variables/default_enable_fuzz.html b/variables/default_enable_fuzz.html index 49d2f04..ac46e2d 100644 --- a/variables/default_enable_fuzz.html +++ b/variables/default_enable_fuzz.html @@ -1 +1,4 @@ -default_enable_fuzz | ts-fsrs

Variable default_enable_fuzzConst

default_enable_fuzz: false = false

Generated using TypeDoc

\ No newline at end of file +default_enable_fuzz | TS-FSRS

Variable default_enable_fuzzConst

default_enable_fuzz: false = false
\ No newline at end of file diff --git a/variables/default_maximum_interval.html b/variables/default_maximum_interval.html index aeb5e4b..ed5a5cc 100644 --- a/variables/default_maximum_interval.html +++ b/variables/default_maximum_interval.html @@ -1 +1,4 @@ -default_maximum_interval | ts-fsrs

Variable default_maximum_intervalConst

default_maximum_interval: 36500 = 36500

Generated using TypeDoc

\ No newline at end of file +default_maximum_interval | TS-FSRS

Variable default_maximum_intervalConst

default_maximum_interval: 36500 = 36500
\ No newline at end of file diff --git a/variables/default_request_retention.html b/variables/default_request_retention.html index 8b36930..7184d56 100644 --- a/variables/default_request_retention.html +++ b/variables/default_request_retention.html @@ -1 +1,4 @@ -default_request_retention | ts-fsrs

Variable default_request_retentionConst

default_request_retention: 0.9 = 0.9

Generated using TypeDoc

\ No newline at end of file +default_request_retention | TS-FSRS

Variable default_request_retentionConst

default_request_retention: 0.9 = 0.9
\ No newline at end of file diff --git a/variables/default_w.html b/variables/default_w.html index ab0bc2f..bdcf1a1 100644 --- a/variables/default_w.html +++ b/variables/default_w.html @@ -1 +1,4 @@ -default_w | ts-fsrs

Variable default_wConst

default_w: number[] = ...

Generated using TypeDoc

\ No newline at end of file +default_w | TS-FSRS

Variable default_wConst

default_w: number[] = ...
\ No newline at end of file