diff --git a/formatters/html/dist/html-2ZGC5OEN.js b/formatters/html/dist/html-K6B4O7EW.js
similarity index 68%
rename from formatters/html/dist/html-2ZGC5OEN.js
rename to formatters/html/dist/html-K6B4O7EW.js
index 3372f2184..5a8e2b348 100644
--- a/formatters/html/dist/html-2ZGC5OEN.js
+++ b/formatters/html/dist/html-K6B4O7EW.js
@@ -1,5 +1,5 @@
-(()=>{var ii=Object.create;var pt=Object.defineProperty;var ri=Object.getOwnPropertyDescriptor;var si=Object.getOwnPropertyNames;var oi=Object.getPrototypeOf,ai=Object.prototype.hasOwnProperty;var ht=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ci=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of si(t))!ai.call(e,r)&&r!==n&&pt(e,r,{get:()=>t[r],enumerable:!(i=ri(t,r))||i.enumerable});return e};var mt=(e,t,n)=>(n=e!=null?ii(oi(e)):{},ci(t||!e||!e.__esModule?pt(n,"default",{value:e,enumerable:!0}):n,e));var It=ht((ao,_t)=>{var Ot="Expected a function",wt=NaN,vi="[object Symbol]",bi=/^\s+|\s+$/g,Si=/^[-+]0x[0-9a-f]+$/i,xi=/^0b[01]+$/i,Ei=/^0o[0-7]+$/i,Li=parseInt,Ti=typeof global=="object"&&global&&global.Object===Object&&global,wi=typeof self=="object"&&self&&self.Object===Object&&self,ki=Ti||wi||Function("return this")(),Oi=Object.prototype,_i=Oi.toString,Ii=Math.max,Ci=Math.min,Fe=function(){return ki.Date.now()};function Ai(e,t,n){var i,r,s,o,a,l,u=0,f=!1,y=!1,g=!0;if(typeof e!="function")throw new TypeError(Ot);t=kt(t)||0,ve(n)&&(f=!!n.leading,y="maxWait"in n,s=y?Ii(kt(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g);function L(S){var C=i,D=r;return i=r=void 0,u=S,o=e.apply(D,C),o}function b(S){return u=S,a=setTimeout(h,t),f?L(S):o}function T(S){var C=S-l,D=S-u,q=t-C;return y?Ci(q,s-D):q}function m(S){var C=S-l,D=S-u;return l===void 0||C>=t||C<0||y&&D>=s}function h(){var S=Fe();if(m(S))return k(S);a=setTimeout(h,T(S))}function k(S){return a=void 0,g&&i?L(S):(i=r=void 0,o)}function w(){a!==void 0&&clearTimeout(a),u=0,i=l=r=a=void 0}function Q(){return a===void 0?o:k(Fe())}function F(){var S=Fe(),C=m(S);if(i=arguments,r=this,l=S,C){if(a===void 0)return b(l);if(y)return a=setTimeout(h,t),L(l)}return a===void 0&&(a=setTimeout(h,t)),o}return F.cancel=w,F.flush=Q,F}function Pi(e,t,n){var i=!0,r=!0;if(typeof e!="function")throw new TypeError(Ot);return ve(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Ai(e,t,{leading:i,maxWait:t,trailing:r})}function ve(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ri(e){return!!e&&typeof e=="object"}function Ni(e){return typeof e=="symbol"||Ri(e)&&_i.call(e)==vi}function kt(e){if(typeof e=="number")return e;if(Ni(e))return wt;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(bi,"");var n=xi.test(e);return n||Ei.test(e)?Li(e.slice(2),n?2:8):Si.test(e)?wt:+e}_t.exports=Pi});var pn=ht((dn,fn)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=function(t){return function(n){t.console&&console.warn&&console.warn(n)}}(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),i=Object.keys(t),r=0;r0){var f=e.utils.clone(n)||{};f.position=[a,u],f.index=s.length,s.push(new e.Token(i.slice(a,o),f))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
-`,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(i){var r=e.Pipeline.registeredFunctions[i];if(r)n.add(r);else throw new Error("Cannot load unregistered function: "+i)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(n){e.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i=i+1,this._stack.splice(i,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},e.Pipeline.prototype.remove=function(t){var n=this._stack.indexOf(t);n!=-1&&this._stack.splice(n,1)},e.Pipeline.prototype.run=function(t){for(var n=this._stack.length,i=0;i1&&(ot&&(i=s),o!=t);)r=i-n,s=n+Math.floor(r/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ol?f+=2:a==l&&(n+=i[u+1]*r[f+1],u+=2,f+=2);return n},e.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),n=1,i=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new e.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),r.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 e.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),r.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&r.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 e.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),r.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var f=s.str.charAt(0),y=s.str.charAt(1),g;y in s.node.edges?g=s.node.edges[y]:(g=new e.TokenSet,s.node.edges[y]=g),s.str.length==1&&(g.final=!0),r.push({node:g,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,i=n,r=0,s=t.length;r=t;n--){var i=this.uncheckedNodes[n],r=i.child.toString();r in this.minimizedNodes?i.parent.edges[i.char]=this.minimizedNodes[r]:(i.child._str=r,this.minimizedNodes[r]=i.child),this.uncheckedNodes.pop()}};e.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},e.Index.prototype.search=function(t){return this.query(function(n){var i=new e.QueryParser(t,n);i.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),i=Object.create(null),r=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var i=t[this._ref],r=Object.keys(this._fields);this._documents[i]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,n;do t=this.next(),n=t.charCodeAt(0);while(n>47&&n<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var n=t.next();if(n==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){t.escapeCharacter();continue}if(n==":")return e.QueryLexer.lexField;if(n=="~")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if(n=="^")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(n=="+"&&t.width()===1||n=="-"&&t.width()===1)return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(n.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}},e.QueryParser=function(t,n){this.lexer=new e.QueryLexer(t),this.query=n,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},e.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},e.QueryParser.parseClause=function(t){var n=t.peekLexeme();if(n!=null)switch(n.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(i+=" with value '"+n.str+"'"),new e.QueryParseError(i,n.start,n.end)}},e.QueryParser.parsePresence=function(t){var n=t.consumeLexeme();if(n!=null){switch(n.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(i,n.start,n.end)}var r=t.peekLexeme();if(r==null){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(r.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var i=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),r="unrecognised field '"+n.str+"', possible fields: "+i;throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var r="expecting term, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term, found '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var n=t.consumeLexeme();if(n!=null){t.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(i==null){t.nextClause();return}switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="edit distance must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="boost must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},function(t,n){typeof define=="function"&&define.amd?define(n):typeof dn=="object"?fn.exports=n():t.lunr=n()}(this,function(){return e})})()});Handlebars.registerHelper("groupChanged",function(e,t,n){let i=t||"";if(e.group!==i)return delete e.nestedContext,e.group=i,n.fn(this)});Handlebars.registerHelper("nestingChanged",function(e,t,n){if(t.nested_context&&t.nested_context!==e.nestedContext){if(e.nestedContext=t.nested_context,e.lastModuleSeenInGroup!==t.nested_context)return n.fn(this)}else e.lastModuleSeenInGroup=t.title});Handlebars.registerHelper("showSections",function(e,t){if(e.sections.length>0)return t.fn(this)});Handlebars.registerHelper("showSummary",function(e,t){if(e.nodeGroups)return t.fn(this)});Handlebars.registerHelper("isArray",function(e,t){return Array.isArray(e)?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isNonEmptyArray",function(e,t){return Array.isArray(e)&&e.length>0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isEmptyArray",function(e,t){return Array.isArray(e)&&e.length===0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isLocal",function(e,t){let n=window.location.pathname.split("/").pop();return n===e+".html"||n===e?t.fn(this):t.inverse(this)});var c=document.querySelector.bind(document),O=document.querySelectorAll.bind(document);function gt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function me(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function $(){return document.body.dataset.type}function yt(e,t){if(e){for(let n of e){let i=n.nodeGroups&&n.nodeGroups.find(r=>r.nodes.some(s=>s.anchor===t));if(i)return i.key}return null}}function ge(e,t=!1){if(!e)return t?document.getElementById("top-content"):null;let n=document.getElementById(e);return n?n.matches(".detail")?n:["h1","h2","h3","h4","h5","h6"].includes(n.tagName.toLowerCase())?li(n):null:null}function li(e){let t=[e],n=e.nextElementSibling,i=e.tagName.toLowerCase();for(;n;){let s=n.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6"].includes(s)&&s<=i?n=null:(t.push(n),n=n.nextElementSibling)}let r=document.createElement("div");return r.append(...t),r}function te(){return window.location.hash.replace(/^#/,"")}function vt(e){return new URLSearchParams(window.location.search).get(e)}function bt(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function St(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function ne(e){return!e||e.trim()===""}function xt(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{n=null,e(...r)},t)}}function ye(){return document.head.querySelector("meta[name=project][content]").content}function ie(){return/(Macintosh|iPhone|iPad|iPod)/.test(window.navigator.userAgent)}var Et="ex_doc:settings",ui={tooltips:!0,theme:null,livebookUrl:null},He=class{constructor(){this._subscribers=[],this._settings=ui,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(i=>i(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(Et);if(t){let n=JSON.parse(t);this._settings={...this._settings,...n}}this._loadSettingsLegacy()}catch(t){console.error(`Failed to load settings: ${t}`)}}_storeSettings(){try{this._storeSettingsLegacy(),localStorage.setItem(Et,JSON.stringify(this._settings))}catch(t){console.error(`Failed to persist settings: ${t}`)}}_loadSettingsLegacy(){localStorage.getItem("tooltipsDisabled")!==null&&(this._settings={...this._settings,tooltips:!1}),localStorage.getItem("night-mode")==="true"&&(this._settings={...this._settings,nightMode:!0}),this._settings.nightMode===!0&&(this._settings={...this._settings,theme:"dark"})}_storeSettingsLegacy(){this._settings.tooltips?localStorage.removeItem("tooltipsDisabled"):localStorage.setItem("tooltipsDisabled","true"),this._settings.nightMode!==null?localStorage.setItem("night-mode",this._settings.nightMode===!0?"true":"false"):localStorage.removeItem("night-mode"),this._settings.theme!==null?(localStorage.setItem("night-mode",this._settings.theme==="dark"?"true":"false"),this._settings.nightMode=this._settings.theme==="dark"):(delete this._settings.nightMode,localStorage.removeItem("night-mode"))}},_=new He;var di=".content",Lt=".content-inner",fi=".livebook-badge";function Tt(e){e||hi(),mi(),pi()}function pi(){c(di).querySelectorAll("a").forEach(e=>{e.querySelector("code, img")&&e.classList.add("no-underline")})}function hi(){c(Lt).setAttribute("tabindex",-1),c(Lt).focus()}function mi(){let t=window.location.pathname.replace(/(\.html)?$/,".livemd"),n=new URL(t,window.location.href).toString();_.getAndSubscribe(i=>{let r=i.livebookUrl?yi(i.livebookUrl,n):gi(n);for(let s of O(fi))s.href=r})}function gi(e){return`https://livebook.dev/run?url=${encodeURIComponent(e)}`}function yi(e,t){return`${e}/import?url=${encodeURIComponent(t)}`}var At=mt(It());var Qi=768,De=300,re=".sidebar-toggle",Hi=".content",M={CLOSED:"closed",OPEN:"open",NO_PREF:"no_pref"},N={opened:"sidebar-opened",openingStart:"sidebar-opening-start",opening:"sidebar-opening",closed:"sidebar-closed",closingStart:"sidebar-closing-start",closing:"sidebar-closing"},Fi=Object.values(N),A={togglingTimeout:null,lastWindowWidth:window.innerWidth,sidebarPreference:M.NO_PREF};function Pt(){Rt(),Di(),Mi()}function Di(){let e=sessionStorage.getItem("sidebar_width");e&&Ct(e),new ResizeObserver(n=>{for(let i of n)Ct(i.contentRect.width)}).observe(document.getElementById("sidebar"))}function Ct(e){sessionStorage.setItem("sidebar_width",e),document.body.style.setProperty("--sidebarWidth",`${e}px`)}function Rt(){sessionStorage.getItem("sidebar_state")==="closed"||Nt()?(V(N.closed),c(re).setAttribute("aria-expanded","false")):(V(N.opened),c(re).setAttribute("aria-expanded","true")),setTimeout(()=>c(re).classList.add("sidebar-toggle--animated"),De)}function Nt(){return window.matchMedia(`screen and (max-width: ${Qi}px)`).matches}function V(...e){document.body.classList.remove(...Fi),document.body.classList.add(...e)}function Mi(){c(re).addEventListener("click",e=>{Me(),$i()}),c(Hi).addEventListener("click",e=>{zi()}),window.addEventListener("resize",(0,At.default)(e=>{Bi()},100))}function Me(){return Be()?Ht():ze()}function Be(){return document.body.classList.contains(N.opened)||document.body.classList.contains(N.opening)}function Qt(){return document.body.classList.contains(N.opened)}function ze(){return Ft(),sessionStorage.setItem("sidebar_state","opened"),c(re).setAttribute("aria-expanded","true"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.openingStart),requestAnimationFrame(()=>{V(N.opening),A.togglingTimeout=setTimeout(()=>{V(N.opened),e()},De)})})})}function Ht(){return Ft(),sessionStorage.setItem("sidebar_state","closed"),c(re).setAttribute("aria-expanded","false"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.closingStart),requestAnimationFrame(()=>{V(N.closing),A.togglingTimeout=setTimeout(()=>{V(N.closed),e()},De)})})})}function Ft(){A.togglingTimeout&&(clearTimeout(A.togglingTimeout),A.togglingTimeout=null)}function Bi(){A.lastWindowWidth!==window.innerWidth&&(A.lastWindowWidth=window.innerWidth,(A.sidebarPreference===M.OPEN||A.sidebarPreference===M.NO_PREF)&&Rt())}function zi(){Nt()&&Be()&&Ht()}function $i(){switch(A.sidebarPreference){case M.OPEN:A.sidebarPreference=M.CLOSED;break;case M.CLOSED:A.sidebarPreference=M.OPEN;break;case M.NO_PREF:Be()?A.sidebarPreference=M.OPEN:A.sidebarPreference=M.CLOSED}}function le(){return window.sidebarNodes||{}}function Dt(){return window.versionNodes||[]}var $e={search:"search",extras:"extras",modules:"modules",tasks:"tasks"},Ve=[$e.extras,$e.modules,$e.tasks],Se=e=>`#${e}-full-list`;function Mt(){Ve.forEach(e=>{Vi(le(),e)}),be($()),zt(),Bt(),Yi()}function Vi(e,t){let n=e[t]||[],i=c(Se(t));if(!i)return;let r=Handlebars.templates["sidebar-items"]({nodes:n,group:""});i.innerHTML=r,i.querySelectorAll("ul").forEach(s=>{if(s.innerHTML.trim()===""){let o=s.previousElementSibling;o.classList.contains("expand")&&o.classList.remove("expand"),s.remove()}}),i.querySelectorAll("li a + button").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li");ji(l)})}),i.querySelectorAll("li a").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li"),u=i.querySelector(".current-section");u&&Wi(u),s.matches(".expand")&&(s.pathname===window.location.pathname||s.pathname===window.location.pathname+".html")&&qe(l)})})}function qe(e){e.classList.add("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","true")}function qi(e){e.classList.remove("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","false")}function ji(e){e.classList.contains("open")?qi(e):qe(e)}function Ui(e){e.classList.add("current-section"),e.querySelector("a").setAttribute("aria-current","true")}function Wi(e){e.classList.remove("current-section"),e.querySelector("a").setAttribute("aria-current","false")}function Gi(e){e.classList.add("current-hash"),e.querySelector("a").setAttribute("aria-current","true")}function Ki(e){e.classList.remove("current-hash"),e.querySelector("a").setAttribute("aria-current","false")}function be(e){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);if(n){let i=c(`#${n.getAttribute("aria-controls")}`);t===e?(n.parentElement.classList.add("selected"),n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),i.removeAttribute("hidden")):(n.parentElement.classList.remove("selected"),n.setAttribute("aria-selected","false"),n.setAttribute("tabindex","-1"),i.setAttribute("hidden","hidden"))}})}function Bt(){let e=c(Se($()));if(!e)return;let t=e.querySelector("li.current-page");t&&(t.scrollIntoView(),e.scrollTop-=40)}function zt(){let e=te()||"content",n=le()[$()]||[],i=yt(n,e),r=c(Se($()));if(!r)return;let s=r.querySelector(`li.current-page a.expand[href$="#${i}"]`);s&&qe(s.closest("li"));let o=r.querySelector(`li.current-page a[href$="#${e}"]`);if(o){let a=o.closest("ul");a.classList.contains("deflist")&&Ui(a.closest("li")),Gi(o.closest("li"))}}function Yi(){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);n&&n.addEventListener("click",i=>{be(t),Bt()})});let e=c("#sidebar-listNav");e.addEventListener("keydown",t=>{if(t.key!=="ArrowRight"&&t.key!=="ArrowLeft")return;let n=Array.from(e.querySelectorAll('[role="tab"]')).map(r=>r.dataset.type),i=e.querySelector('[role="tab"][aria-selected="true"]').dataset.type;if(t.key==="ArrowRight"){let r=n.indexOf(i)+1;r>=n.length&&(r=0);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}else if(t.key==="ArrowLeft"){let r=n.indexOf(i)-1;r<0&&(r=n.length-1);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}}),window.addEventListener("hashchange",t=>{let n=c(Se($()));if(!n)return;let i=n.querySelector("li.current-page li.current-hash");i&&Ki(i),zt()})}var B={module:"module",moduleChild:"module-child",mixTask:"mix-task",extra:"extra",section:"section"};function Vt(e,t=8){if(ne(e))return[];let n=le(),i=[...je(n.modules,e,B.module,"module"),...Ji(n.modules,e,B.moduleChild),...je(n.tasks,e,B.mixTask,"mix task"),...je(n.extras,e,B.extra,"page"),...Ue(n.modules,e,B.section,"module"),...Ue(n.tasks,e,B.section,"mix task"),...Ue(n.extras,e,B.section,"page")].filter(r=>r!==null);return rr(i).slice(0,t)}function je(e,t,n,i){return e.map(r=>Zi(r,t,n,i))}function Ji(e,t,n){return e.filter(i=>i.nodeGroups).flatMap(i=>i.nodeGroups.flatMap(({key:r,nodes:s})=>{let o=ir(r);return s.map(a=>er(a,i.id,t,n,o)||nr(a,i.id,t,n,o))}))}function Ue(e,t,n,i){return e.flatMap(r=>Xi(r).map(s=>tr(r,s,t,n,i)))}function Xi(e){return(e.sections||[]).concat(e.headers||[])}function Zi(e,t,n,i){return Ee(e.title,t)?{link:`${e.id}.html`,title:we(e.title,t),description:null,matchQuality:Le(e.title,t),deprecated:e.deprecated,labels:[i],category:n}:null}function er(e,t,n,i,r){return Ee(e.id,n)?{link:`${t}.html#${e.anchor}`,title:we(e.id,n),labels:[r],description:t,matchQuality:Le(e.id,n),deprecated:e.deprecated,category:i}:null}function tr(e,t,n,i,r){return qt(t.id,n)?{link:`${e.id}.html#${t.anchor}`,title:we(t.id,n),description:e.title,matchQuality:Le(t.id,n),labels:[r,"section"],category:i}:null}function nr(e,t,n,i,r){let s=`${t}.${e.id}`,o=`${t}:${e.id}`,a,l;if(Ee(s,n))a=s,l=/\./g;else if(Ee(o,n))a=o,l=/:/g;else return null;let u=n.replace(l," ");return qt(e.id,u)?{link:`${t}.html#${e.anchor}`,title:we(e.id,u),label:r,description:t,matchQuality:Le(a,n),deprecated:e.deprecated,category:i}:null}function ir(e){switch(e){case"callbacks":return"callback";case"types":return"type";default:return"function"}}function rr(e){return e.slice().sort((t,n)=>t.matchQuality!==n.matchQuality?n.matchQuality-t.matchQuality:$t(t.category)-$t(n.category))}function $t(e){switch(e){case B.module:return 1;case B.moduleChild:return 2;case B.mixTask:return 3;default:return 4}}function qt(e,t){return Te(t).some(i=>jt(e,i))}function Ee(e,t){return Te(t).every(i=>jt(e,i))}function jt(e,t){return e.toLowerCase().includes(t.toLowerCase())}function Le(e,t){let n=Te(t),r=n.map(o=>o.length).reduce((o,a)=>o+a,0)/e.length,s=sr(e,n[0])?1:0;return r+s}function sr(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function Te(e){return e.trim().split(/\s+/)}function we(e,t){let n=Te(t).sort((i,r)=>r.length-i.length);return xe(e,n)}function xe(e,t){if(t.length===0)return e;let[n,...i]=t,r=e.match(new RegExp(`(.*)(${gt(n)})(.*)`,"i"));if(r){let[,s,o,a]=r;return xe(s,t)+""+me(o)+""+xe(a,t)}else return xe(e,i)}var ke=null,G=null;function Ut(){G=document.getElementById("toast"),G.addEventListener("click",e=>{clearTimeout(ke),e.target.classList.remove("show")})}function We(e){G&&(clearTimeout(ke),G.innerText=e,G.classList.add("show"),ke=setTimeout(()=>{G.classList.remove("show"),ke=setTimeout(function(){G.innerText=""},1e3)},5e3))}var Wt="dark",Ge=["system","dark","light"];function Gt(e){_.getAndSubscribe(t=>{document.body.classList.toggle(Wt,Yt(e||t.theme))}),ar()}function Kt(){let e=Ge[Ge.indexOf(Ke())+1]||Ge[0];_.update({theme:e}),We(`Set theme to "${e}"`)}function Ke(){return _.get().theme||"system"}function Yt(e){return e==="dark"||or()&&(e==null||e==="system")}function or(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function ar(){window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let t=_.get().theme,n=Yt(t);(t==null||t==="system")&&(document.body.classList.toggle(Wt,n),We(`Browser changed theme to "${n?"dark":"light"}"`))})}var se=".autocomplete",_e=".autocomplete-suggestions",Oe=".autocomplete-suggestion",I={autocompleteSuggestions:[],previewOpen:!1,selectedIdx:-1};function cr(){c(se).classList.add("shown")}function Ye(){c(se).classList.remove("shown")}function Jt(){return c(se).classList.contains("shown")}function Je(e){I.autocompleteSuggestions=Vt(e),I.selectedIdx=-1,ne(e)?Ye():(lr({term:e,suggestions:I.autocompleteSuggestions}),Ie(0),cr())}function lr({term:e,suggestions:t}){let n=Handlebars.templates["autocomplete-suggestions"]({suggestions:t,term:e}),i=c(se);i.innerHTML=n}function Xt(){return I.selectedIdx===-1?null:I.autocompleteSuggestions[I.selectedIdx]}function Ie(e){en(ur(e))}function Zt(e){if(e.data.type==="preview"){let{contentHeight:t}=e.data,n=c(".autocomplete-preview");n&&(n.style.height=`${t+32}px`,n.classList.remove("loading"))}}function en(e){I.selectedIdx=e;let t=c(_e),n=c(`${Oe}.selected`),i=c(`${Oe}[data-index="${I.selectedIdx}"]`);if(n&&n.classList.remove("selected"),i){if(I.previewOpen){nn(),window.addEventListener("message",Zt),t.classList.add("previewing");let r=document.createElement("div");r.classList.add("autocomplete-preview"),r.classList.add("loading");let s=i.href.replace(".html",`.html?preview=true&theme=${Ke()}`),o=document.createElement("iframe");o.setAttribute("src",s),r.appendChild(document.createElement("div")),r.appendChild(document.createElement("span")),r.appendChild(o),i.parentNode.insertBefore(r,i.nextSibling)}i.classList.add("selected"),i.scrollIntoView({block:"nearest"})}else t&&(t.scrollTop=0)}function tn(){I.previewOpen?Ce():Xe()}function Ce(){I.previewOpen=!1;let e=c(_e);e&&e.classList.remove("previewing"),nn()}function Xe(e){I.previewOpen=!0,e?e=e.closest(Oe):e=c(`${Oe}[data-index="${I.selectedIdx}"]`),e&&en(parseInt(e.dataset.index))}function nn(){let e=c(".autocomplete-preview");e&&(e.remove(),window.removeEventListener("message",Zt))}function ur(e){let t=I.autocompleteSuggestions.length+1;return(I.selectedIdx+e+1+t)%t-1}var ue="form.search-bar input",dr="form.search-bar .search-close-button";function on(){fr(),window.onTogglePreviewClick=function(e,t){e.preventDefault(),e.stopImmediatePropagation(),et(),t?Xe(e.target):Ce()}}function an(e){let t=c(ue);t.value=e}function et(){let e=c(ue);document.body.classList.add("search-focused"),e.focus()}function fr(){let e=c(ue);if(document.querySelector('meta[name="exdoc:autocomplete"][content="off"]'))return e.addEventListener("keydown",t=>{t.key==="Enter"&&rn(t)}),!0;e.addEventListener("keydown",t=>{let n=ie();t.key==="Escape"?(Ae(),e.blur()):t.key==="Enter"?rn(t):t.key==="ArrowUp"||n&&t.ctrlKey&&t.key==="p"?(Ie(-1),t.preventDefault()):t.key==="ArrowDown"||n&&t.ctrlKey&&t.key==="n"?(Ie(1),t.preventDefault()):t.key==="Tab"&&(tn(),t.preventDefault())}),e.addEventListener("input",t=>{Je(t.target.value)}),e.addEventListener("focus",t=>{document.body.classList.contains("search-focused")||(document.body.classList.add("search-focused"),Je(t.target.value))}),e.addEventListener("blur",t=>{let n=t.relatedTarget,i=c(_e);if(n&&i&&i.contains(n))return setTimeout(()=>{Jt()&&e.focus()},1e3),null;Pe()}),c(se).addEventListener("click",t=>{t.shiftKey||t.ctrlKey?e.focus():(Ae(),Pe())}),c(dr).addEventListener("click",t=>{Ae(),Pe()})}function rn(e){let t=c(ue),n=e.shiftKey||e.ctrlKey,i=Xt();e.preventDefault();let r=n?"_blank":"_self",s=document.createElement("a");if(s.setAttribute("target",r),i)s.setAttribute("href",i.link);else{let o=document.querySelector('meta[name="exdoc:full-text-search-url"]'),a=o?o.getAttribute("content"):"search.html?q=";s.setAttribute("href",`${a}${encodeURIComponent(t.value)}`)}s.click(),n||(Ae(),Pe())}function Ae(){let e=c(ue);e.value=""}function Pe(){Ce(),document.body.classList.remove("search-focused"),Ye()}var Ze=window.scrollY,pr=70,sn=-2;window.addEventListener("scroll",function(){let e=window.scrollY;e===0||Ze-epr?document.body.classList.remove("scroll-sticky"):Ze-e>Math.abs(sn)&&document.body.classList.add("scroll-sticky"),Ze=e<=0?0:e},!1);var cn=".sidebar-projectVersion",ln=".sidebar-projectVersionsDropdown";function un(){let e=Dt();if(e.length>0){let n=c(cn).textContent.trim(),i=mr(e,n);hr({nodes:i})}}function hr({nodes:e}){let t=c(cn),n=Handlebars.templates["versions-dropdown"]({nodes:e});t.innerHTML=n,c(ln).addEventListener("change",yr)}function mr(e,t){return gr(e,t).map(i=>({...i,isCurrentVersion:i.version===t}))}function gr(e,t){return e.some(i=>i.version===t)?e:[{version:t,url:"#"},...e]}function yr(e){let t=e.target.value,n=window.location.pathname.split("/").pop()+window.location.hash,i=`${t}/${n}`;bt(i).then(r=>{r?window.location.href=i:window.location.href=t})}function tt(){let e=c(ln);e&&(e.focus(),e.addEventListener("keydown",t=>{(t.key==="Escape"||t.key==="v")&&(t.preventDefault(),e.blur())}),navigator.userActivation.isActive&&"showPicker"in HTMLSelectElement.prototype&&e.showPicker())}var H=mt(pn());var Re=80,vr="#search";function mn(){let e=window.location.pathname;if(e.endsWith("/search.html")||e.endsWith("/search")){let t=vt("q");br(t)}}async function br(e){if(ne(e))nt({value:e});else{an(e);let t=await Sr();try{let n=e.replaceAll(/(\B|\\):/g,"\\:"),i=Cr(t.search(n));nt({value:e,results:i})}catch(n){nt({value:e,errorMessage:n.message})}}}function nt({value:e,results:t,errorMessage:n}){let i=c(vr),r=Handlebars.templates["search-results"]({value:e,results:t,errorMessage:n});i.innerHTML=r}async function Sr(){H.default.tokenizer.separator=/\s+/,H.default.QueryLexer.termSeparator=/\s+/,H.default.Pipeline.registerFunction(yn,"docTokenSplitter"),H.default.Pipeline.registerFunction(vn,"docTrimmer");let e=await xr();if(e)return e;let t=Or();return Er(t),t}async function xr(){try{let e=sessionStorage.getItem(gn());if(e){let t=await Tr(e);return H.default.Index.load(t)}else return null}catch(e){return console.error("Failed to load index: ",e),null}}async function Er(e){try{let t=await Lr(e);sessionStorage.setItem(gn(),t)}catch(t){console.error("Failed to save index: ",t)}}async function Lr(e){let t=new Blob([JSON.stringify(e)],{type:"application/json"}).stream().pipeThrough(new window.CompressionStream("gzip")),i=await(await new Response(t).blob()).arrayBuffer();return wr(i)}async function Tr(e){let t=new Blob([kr(e)],{type:"application/json"}).stream().pipeThrough(new window.DecompressionStream("gzip")),n=await new Response(t).text();return JSON.parse(n)}function wr(e){let t="",n=new Uint8Array(e),i=n.byteLength;for(let r=0;r{this.add(e)})})}function _r(e){e.pipeline.before(H.default.stemmer,yn)}function yn(e){let t=[e],n=/\/\d+$/,i=/\:|\./,r=e.toString();if(n.test(r)){let o=e.toString().replace(n,"");t.push(e.clone().update(()=>o));let a=o.split(i);if(a.length>1){for(let u of a)t.push(e.clone().update(()=>u));let l=e.toString().split(i);t.push(e.clone().update(()=>l[l.length-1]))}r=a[a.length-1]}else r.startsWith("@")&&(r=r.substring(1),t.push(e.clone().update(()=>r)));let s=r.split(/\_|\-/);if(s.length>1)for(let o of s)t.push(e.clone().update(()=>o));return t}function Ir(e){e.pipeline.before(H.default.stemmer,vn)}function vn(e){return e.update(function(t){return t.replace(/^[^@:\w]+/,"").replace(/[^\?\!\w]+$/,"")})}function Cr(e){return e.filter(t=>hn(t.ref)).map(t=>{let n=hn(t.ref),i=t.matchData.metadata;return{...n,metadata:i,excerpts:Ar(n,i)}})}function hn(e){return searchData.items.find(t=>t.ref===e)||null}function Ar(e,t){let{doc:n}=e,r=Object.keys(t).filter(s=>"doc"in t[s]).map(s=>t[s].doc.position.map(([o,a])=>Pr(n,o,a))).reduce((s,o)=>s.concat(o),[]);return r.length===0?[n.slice(0,Re*2)+(Re*20?"...":"",e.slice(i,t),""+me(e.slice(t,t+n))+"",e.slice(t+n,r),r{let n=t.getAttribute("data-group-id");t.addEventListener("mouseenter",i=>{bn(n,!0)}),t.addEventListener("mouseleave",i=>{bn(n,!1)})})}function bn(e,t){O(`[data-group-id="${e}"]`).forEach(i=>{i.classList.toggle(Rr,t)})}var Y=".modal",Qr=".modal .modal-close",Hr=".modal .modal-title",Fr=".modal .modal-body",xn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',z={prevFocus:null,lastFocus:null,ignoreFocusChanges:!1};function En(){Dr()}function Dr(){let e=Handlebars.templates["modal-layout"]();document.body.insertAdjacentHTML("beforeend",e),c(Y).addEventListener("keydown",t=>{t.key==="Escape"&&K()}),c(Qr).addEventListener("click",t=>{K()}),c(Y).addEventListener("click",t=>{t.target.classList.contains("modal")&&K()})}function Ln(e){if(z.ignoreFocusChanges)return;let t=c(Y);if(t.contains(e.target))z.lastFocus=e.target;else{z.ignoreFocusChanges=!0;let n=Mr(t);z.lastFocus===n?Br(t).focus():n.focus(),z.ignoreFocusChanges=!1,z.lastFocus=document.activeElement}}function Mr(e){return e.querySelector(xn)}function Br(e){let t=e.querySelectorAll(xn);return t[t.length-1]}function Ne({title:e,body:t}){z.prevFocus=document.activeElement,document.addEventListener("focus",Ln,!0),c(Hr).innerHTML=e,c(Fr).innerHTML=t,c(Y).classList.add("shown"),c(Y).focus()}function K(){c(Y).classList.remove("shown"),document.addEventListener("focus",Ln,!0),z.prevFocus&&z.prevFocus.focus(),z.prevFocus=null}function Tn(){return c(Y).classList.contains("shown")}var zr="https://hexdocs.pm/%%",$r="https://hex.pm/api/packages?search=name:%%*",Vr=".display-quick-switch",it="#quick-switch-input",kn="#quick-switch-results",qr=".quick-switch-result",jr=300,Ur=9,Wr=["elixir","eex","ex_unit","hex","iex","logger","mix"].map(e=>({name:e})),On=2,P={autocompleteResults:[],selectedIdx:null};function _n(){Gr()}function Gr(){O(Vr).forEach(e=>{e.addEventListener("click",t=>{st()})})}function Kr(e){if(e.key==="Enter"){let t=e.target.value;Jr(t),e.preventDefault()}else e.key==="ArrowUp"?(wn(-1),e.preventDefault()):e.key==="ArrowDown"&&(wn(1),e.preventDefault())}function Yr(e){let t=e.target.value;if(t.lengthn.json()).then(n=>{Array.isArray(n)&&(P.autocompleteResults=ts(e,n),P.selectedIdx=null,c(it).value.length>=On&&es({results:P.autocompleteResults}))})}function es({results:e}){let t=c(kn),n=Handlebars.templates["quick-switch-results"]({results:e});t.innerHTML=n,O(qr).forEach(i=>{i.addEventListener("click",r=>{let s=i.getAttribute("data-index"),o=P.autocompleteResults[s];rt(o.name)})})}function ts(e,t){return Wr.concat(t).filter(n=>n.name.toLowerCase().includes(e.toLowerCase())).filter(n=>n.releases===void 0||n.releases[0].has_docs===!0).slice(0,Ur)}function wn(e){P.selectedIdx=ns(e);let t=c(".quick-switch-result.selected"),n=c(`.quick-switch-result[data-index="${P.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function ns(e){let t=P.autocompleteResults.length;if(P.selectedIdx===null){if(e>=0)return 0;if(e<0)return t-1}return(P.selectedIdx+e+t)%t}var is=".display-settings",rs="#settings-modal-content",ot="#modal-settings-tab",at="#modal-keyboard-shortcuts-tab",Cn="#settings-content",An="#keyboard-shortcuts-content",ss=[{title:"Settings",id:"modal-settings-tab"},{title:"Keyboard shortcuts",id:"modal-keyboard-shortcuts-tab"}];function Pn(){os()}function os(){O(is).forEach(e=>{e.addEventListener("click",t=>{ct()})})}function In(){c(at).classList.remove("active"),c(ot).classList.add("active"),c(Cn).classList.remove("hidden"),c(An).classList.add("hidden")}function as(){c(at).classList.add("active"),c(ot).classList.remove("active"),c(An).classList.remove("hidden"),c(Cn).classList.add("hidden")}function ct(){Ne({title:ss.map(({id:s,title:o})=>``).join(""),body:Handlebars.templates["settings-modal-body"]({shortcuts:lt})});let e=c(rs),t=e.querySelector('[name="theme"]'),n=e.querySelector('[name="tooltips"]'),i=e.querySelector('[name="direct_livebook_url"]'),r=e.querySelector('[name="livebook_url"]');_.getAndSubscribe(s=>{t.value=s.theme||"system",n.checked=s.tooltips,s.livebookUrl===null?(i.checked=!1,r.classList.add("hidden"),r.tabIndex=-1):(i.checked=!0,r.classList.remove("hidden"),r.tabIndex=0,r.value=s.livebookUrl)}),t.addEventListener("change",s=>{_.update({theme:s.target.value})}),n.addEventListener("change",s=>{_.update({tooltips:s.target.checked})}),i.addEventListener("change",s=>{let o=s.target.checked?r.value:null;_.update({livebookUrl:o})}),r.addEventListener("input",s=>{_.update({livebookUrl:s.target.value})}),c(ot).addEventListener("click",s=>{In()}),c(at).addEventListener("click",s=>{as()}),In()}var cs="#settings-modal-content",lt=[{key:"c",description:"Toggle sidebar",action:Me},{key:"n",description:"Cycle themes",action:Kt},{key:"s",description:"Focus search bar",displayAs:"/ or s",action:ut},{key:"/",action:ut},{key:"k",hasModifier:!0,action:ut},{key:"v",description:"Open/focus version select",action:fs},{key:"g",description:"Search HexDocs package",displayAs:"g",action:st},{key:"?",displayAs:"?",description:"Bring up this modal",action:ps}],dt={shortcutBeingPressed:null};function Rn(){ls()}function ls(){document.addEventListener("keydown",us),document.addEventListener("keyup",ds)}function us(e){if(dt.shortcutBeingPressed||e.target.matches("input, select, textarea"))return;let t=lt.find(n=>n.hasModifier?ie()&&e.metaKey||e.ctrlKey?n.key===e.key:!1:e.ctrlKey||e.metaKey||e.altKey?!1:n.key===e.key);t&&(dt.shortcutBeingPressed=t,e.preventDefault(),t.action(e))}function ds(e){dt.shortcutBeingPressed=null}function ut(e){K(),et()}function fs(){K(),Qt()?tt():ze().then(tt)}function ps(){hs()?K():ct()}function hs(){return Tn()&&c(cs)}var J={plain:"plain",function:"function",module:"module"},ms=[{href:"typespecs.html#basic-types",hint:{kind:J.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:J.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:J.plain,description:"Built-in type"}}],Qe={cancelHintFetching:null};function Nn(e){if(Hn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function Qn(e){let t=Hn(e);return t?Promise.resolve(t):gs(e)}function Hn(e){let t=ms.find(n=>e.includes(n.href));return t?t.hint:null}function gs(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,i)=>{let r=document.createElement("iframe");r.setAttribute("src",t),r.style.display="none";function s(a){let{href:l,hint:u}=a.data;t===l&&(o(),n(u))}Qe.cancelHintFetching=()=>{o(),i(new Error("cancelled"))};function o(){r.remove(),window.removeEventListener("message",s),Qe.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(r)})}function Fn(){Qe.cancelHintFetching&&Qe.cancelHintFetching()}function Dn(e){let n=e.querySelector("h1").textContent,i=e.querySelector(".docstring > p"),r=i?i.innerHTML:"";return{kind:J.function,title:n.trim(),description:r.trim()}}function Mn(e){let n=e.querySelector("h1 > span").textContent,i=e.querySelector("#moduledoc p"),r=i?i.innerHTML:"";return{kind:J.module,title:n.trim(),description:r.trim()}}var ys=".content a",ft=".tooltip",vs=".tooltip .tooltip-body",zn="body .content-inner",bs="#content",$n="tooltip-shown",de=10,Ss=de*4,Bn={height:450,width:768},xs=100,oe={currentLinkElement:null,hoverDelayTimeout:null};function Vn(){Es(),Ls()}function Es(){let e=Handlebars.templates["tooltip-layout"]();c(zn).insertAdjacentHTML("beforeend",e)}function Ls(){O(ys).forEach(e=>{Ts(e)&&(e.addEventListener("mouseenter",t=>{ks(e)}),e.addEventListener("mouseleave",t=>{Cs(e)}))})}function Ts(e){return!(e.getAttribute("data-no-tooltip")!==null||ws(e.href)||!Nn(e.href))}function ws(e){let t=e.replace(bs,"");return window.location.href.split("#")[0]===t}function ks(e){Os()&&(oe.currentLinkElement=e,oe.hoverDelayTimeout=setTimeout(()=>{Qn(e.href).then(t=>{_s(t),Is()}).catch(()=>{})},xs))}function Os(){let e=window.innerWidthe.firstElementChild&&e.firstElementChild.tagName==="CODE").forEach(e=>e.insertAdjacentHTML("beforeend",Ms)),Array.from(O(".copy-button")).forEach(e=>{let t;e.addEventListener("click",()=>{let n=e.querySelector("[aria-live]");t&&clearTimeout(t);let i=Array.from(e.parentElement.querySelector("code").childNodes).filter(r=>!(r.tagName==="SPAN"&&r.classList.contains("unselectable"))).map(r=>r.textContent).join("");navigator.clipboard.writeText(i),e.classList.add("clicked"),n.innerHTML="Copied! ✓",t=setTimeout(()=>{e.classList.remove("clicked"),n.innerHTML=""},3e3)})})}function Gn(){let e=ie()?"apple-os":"non-apple-os";document.documentElement.classList.add(e)}var zs="content",$s="tabs-open",Vs="tabs-close",qs="H3",js="tabset";function Yn(){Us().map(Ws).forEach(n=>Ys(n))}function Us(){let e=document.createNodeIterator(document.getElementById(zs),NodeFilter.SHOW_COMMENT,{acceptNode(i){return i.nodeValue.trim()===$s?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),t=[],n;for(;n=e.nextNode();)t.push(n);return t}function Ws(e,t,n){let i=[],r=[],s={label:"",content:[]};for(;e=e.nextSibling;){if(Gs(e)){Kn(s,r,t);break}i.push(e),e.nodeName===qs?(Kn(s,r,t),s.label=e.innerText,s.content=[]):s.content.push(e.outerHTML)}let o=document.createElement("div");return o.className=js,Ks(i,o),o.innerHTML=Handlebars.templates.tabset({tabs:r}),o}function Gs(e){return e.nodeName==="#comment"&&e.nodeValue.trim()===Vs}function Kn(e,t,n){if(e.label===""&&!e.content.length)return!1;let i=e.label,r=e.content;t.push({label:i,content:r,setIndex:n})}function Ks(e,t){if(!e||!e.length)return!1;e[0].parentNode.insertBefore(t,e[0]),e.forEach(n=>t.appendChild(n))}function Ys(e){let t={tabs:e.querySelectorAll(':scope [role="tab"]'),panels:e.querySelectorAll(':scope [role="tabpanel"]'),activeIndex:0};t.tabs.forEach((n,i)=>{n.addEventListener("click",r=>{X(i,t)}),n.addEventListener("keydown",r=>{let s=t.tabs.length-1;r.code==="ArrowLeft"?(r.preventDefault(),t.activeIndex===0?X(s,t):X(t.activeIndex-1,t)):r.code==="ArrowRight"?(r.preventDefault(),t.activeIndex===s?X(0,t):X(t.activeIndex+1,t)):r.code==="Home"?(r.preventDefault(),X(0,t)):r.code==="End"&&(r.preventDefault(),X(s,t))})})}function X(e,t){t.tabs[t.activeIndex].setAttribute("aria-selected","false"),t.tabs[t.activeIndex].tabIndex=-1,t.tabs[e].setAttribute("aria-selected","true"),t.tabs[e].tabIndex=0,t.tabs[e].focus(),t.panels[t.activeIndex].setAttribute("hidden",""),t.panels[t.activeIndex].tabIndex=-1,t.panels[e].removeAttribute("hidden"),t.panels[e].tabIndex=0,t.activeIndex=e}function Xn(){let e=ge(te(),!0);e&&Js(e)}function Js(e){eo(e),Xs(),Zs(),Jn(),window.addEventListener("resize",t=>{Jn()})}function Jn(){let e=document.body.scrollHeight,t=document.getElementById("content").parentElement.offsetHeight,n={type:"preview",maxHeight:e,contentHeight:t};window.parent.postMessage(n,"*")}function Xs(){let e=document.getElementsByTagName("a");for(let t of e)t.getAttribute("target")!=="_blank"&&t.setAttribute("target","_parent")}function Zs(){window.scrollTo(0,0)}function eo(e){document.body.classList.add("preview");let t=document.getElementById("content");t.innerHTML=e.innerHTML}St(()=>{let e=new URLSearchParams(window.location.search),t=e.has("preview");Gt(e.get("theme")),Tt(t),Sn(),Vn(),Un(),Wn(),Gn(),Yn(),t?Xn():(un(),Pt(),Mt(),on(),En(),Rn(),_n(),Ut(),mn(),Pn())});})();
+(()=>{var ri=Object.create;var pt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var oi=Object.getOwnPropertyNames;var ai=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var ht=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var li=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of oi(t))!ci.call(e,r)&&r!==n&&pt(e,r,{get:()=>t[r],enumerable:!(i=si(t,r))||i.enumerable});return e};var mt=(e,t,n)=>(n=e!=null?ri(ai(e)):{},li(t||!e||!e.__esModule?pt(n,"default",{value:e,enumerable:!0}):n,e));var It=ht((lo,Ot)=>{var _t="Expected a function",wt=NaN,bi="[object Symbol]",Si=/^\s+|\s+$/g,xi=/^[-+]0x[0-9a-f]+$/i,Ei=/^0b[01]+$/i,Li=/^0o[0-7]+$/i,Ti=parseInt,wi=typeof global=="object"&&global&&global.Object===Object&&global,ki=typeof self=="object"&&self&&self.Object===Object&&self,_i=wi||ki||Function("return this")(),Oi=Object.prototype,Ii=Oi.toString,Ci=Math.max,Ai=Math.min,Fe=function(){return _i.Date.now()};function Pi(e,t,n){var i,r,s,o,a,l,u=0,f=!1,y=!1,g=!0;if(typeof e!="function")throw new TypeError(_t);t=kt(t)||0,ve(n)&&(f=!!n.leading,y="maxWait"in n,s=y?Ci(kt(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g);function L(S){var C=i,D=r;return i=r=void 0,u=S,o=e.apply(D,C),o}function b(S){return u=S,a=setTimeout(h,t),f?L(S):o}function T(S){var C=S-l,D=S-u,q=t-C;return y?Ai(q,s-D):q}function m(S){var C=S-l,D=S-u;return l===void 0||C>=t||C<0||y&&D>=s}function h(){var S=Fe();if(m(S))return k(S);a=setTimeout(h,T(S))}function k(S){return a=void 0,g&&i?L(S):(i=r=void 0,o)}function w(){a!==void 0&&clearTimeout(a),u=0,i=l=r=a=void 0}function Q(){return a===void 0?o:k(Fe())}function F(){var S=Fe(),C=m(S);if(i=arguments,r=this,l=S,C){if(a===void 0)return b(l);if(y)return a=setTimeout(h,t),L(l)}return a===void 0&&(a=setTimeout(h,t)),o}return F.cancel=w,F.flush=Q,F}function Ri(e,t,n){var i=!0,r=!0;if(typeof e!="function")throw new TypeError(_t);return ve(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Pi(e,t,{leading:i,maxWait:t,trailing:r})}function ve(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ni(e){return!!e&&typeof e=="object"}function Qi(e){return typeof e=="symbol"||Ni(e)&&Ii.call(e)==bi}function kt(e){if(typeof e=="number")return e;if(Qi(e))return wt;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Si,"");var n=Ei.test(e);return n||Li.test(e)?Ti(e.slice(2),n?2:8):xi.test(e)?wt:+e}Ot.exports=Ri});var pn=ht((dn,fn)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=function(t){return function(n){t.console&&console.warn&&console.warn(n)}}(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),i=Object.keys(t),r=0;r0){var f=e.utils.clone(n)||{};f.position=[a,u],f.index=s.length,s.push(new e.Token(i.slice(a,o),f))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
+`,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(i){var r=e.Pipeline.registeredFunctions[i];if(r)n.add(r);else throw new Error("Cannot load unregistered function: "+i)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(n){e.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i=i+1,this._stack.splice(i,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},e.Pipeline.prototype.remove=function(t){var n=this._stack.indexOf(t);n!=-1&&this._stack.splice(n,1)},e.Pipeline.prototype.run=function(t){for(var n=this._stack.length,i=0;i1&&(ot&&(i=s),o!=t);)r=i-n,s=n+Math.floor(r/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ol?f+=2:a==l&&(n+=i[u+1]*r[f+1],u+=2,f+=2);return n},e.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),n=1,i=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new e.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),r.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 e.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),r.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&r.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 e.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),r.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var f=s.str.charAt(0),y=s.str.charAt(1),g;y in s.node.edges?g=s.node.edges[y]:(g=new e.TokenSet,s.node.edges[y]=g),s.str.length==1&&(g.final=!0),r.push({node:g,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,i=n,r=0,s=t.length;r=t;n--){var i=this.uncheckedNodes[n],r=i.child.toString();r in this.minimizedNodes?i.parent.edges[i.char]=this.minimizedNodes[r]:(i.child._str=r,this.minimizedNodes[r]=i.child),this.uncheckedNodes.pop()}};e.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},e.Index.prototype.search=function(t){return this.query(function(n){var i=new e.QueryParser(t,n);i.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),i=Object.create(null),r=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var i=t[this._ref],r=Object.keys(this._fields);this._documents[i]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,n;do t=this.next(),n=t.charCodeAt(0);while(n>47&&n<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var n=t.next();if(n==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){t.escapeCharacter();continue}if(n==":")return e.QueryLexer.lexField;if(n=="~")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if(n=="^")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(n=="+"&&t.width()===1||n=="-"&&t.width()===1)return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(n.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}},e.QueryParser=function(t,n){this.lexer=new e.QueryLexer(t),this.query=n,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},e.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},e.QueryParser.parseClause=function(t){var n=t.peekLexeme();if(n!=null)switch(n.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(i+=" with value '"+n.str+"'"),new e.QueryParseError(i,n.start,n.end)}},e.QueryParser.parsePresence=function(t){var n=t.consumeLexeme();if(n!=null){switch(n.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(i,n.start,n.end)}var r=t.peekLexeme();if(r==null){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(r.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var i=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),r="unrecognised field '"+n.str+"', possible fields: "+i;throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var r="expecting term, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term, found '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var n=t.consumeLexeme();if(n!=null){t.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(i==null){t.nextClause();return}switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="edit distance must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var i=parseInt(n.str,10);if(isNaN(i)){var r="boost must be numeric";throw new e.QueryParseError(r,n.start,n.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(s==null){t.nextClause();return}switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(r,s.start,s.end)}}},function(t,n){typeof define=="function"&&define.amd?define(n):typeof dn=="object"?fn.exports=n():t.lunr=n()}(this,function(){return e})})()});Handlebars.registerHelper("groupChanged",function(e,t,n){let i=t||"";if(e.group!==i)return delete e.nestedContext,e.group=i,n.fn(this)});Handlebars.registerHelper("nestingChanged",function(e,t,n){if(t.nested_context&&t.nested_context!==e.nestedContext){if(e.nestedContext=t.nested_context,e.lastModuleSeenInGroup!==t.nested_context)return n.fn(this)}else e.lastModuleSeenInGroup=t.title});Handlebars.registerHelper("showSections",function(e,t){if(e.sections.length>0)return t.fn(this)});Handlebars.registerHelper("showSummary",function(e,t){if(e.nodeGroups)return t.fn(this)});Handlebars.registerHelper("isArray",function(e,t){return Array.isArray(e)?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isNonEmptyArray",function(e,t){return Array.isArray(e)&&e.length>0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isEmptyArray",function(e,t){return Array.isArray(e)&&e.length===0?t.fn(this):t.inverse(this)});Handlebars.registerHelper("isLocal",function(e,t){let n=window.location.pathname.split("/").pop();return n===e+".html"||n===e?t.fn(this):t.inverse(this)});var c=document.querySelector.bind(document),_=document.querySelectorAll.bind(document);function gt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function me(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function $(){return document.body.dataset.type}function yt(e,t){if(e){for(let n of e){let i=n.nodeGroups&&n.nodeGroups.find(r=>r.nodes.some(s=>s.anchor===t));if(i)return i.key}return null}}function ge(e,t=!1){if(!e)return t?document.getElementById("top-content"):null;let n=document.getElementById(e);return n?n.matches(".detail")?n:["h1","h2","h3","h4","h5","h6"].includes(n.tagName.toLowerCase())?ui(n):null:null}function ui(e){let t=[e],n=e.nextElementSibling,i=e.tagName.toLowerCase();for(;n;){let s=n.tagName.toLowerCase();["h1","h2","h3","h4","h5","h6"].includes(s)&&s<=i?n=null:(t.push(n),n=n.nextElementSibling)}let r=document.createElement("div");return r.append(...t),r}function te(){return window.location.hash.replace(/^#/,"")}function vt(e){return new URLSearchParams(window.location.search).get(e)}function bt(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function St(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function ne(e){return!e||e.trim()===""}function xt(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{n=null,e(...r)},t)}}function ye(){return document.head.querySelector("meta[name=project][content]").content}function ie(){return/(Macintosh|iPhone|iPad|iPod)/.test(window.navigator.userAgent)}var Et="ex_doc:settings",di={tooltips:!0,theme:null,livebookUrl:null},He=class{constructor(){this._subscribers=[],this._settings=di,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(i=>i(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(Et);if(t){let n=JSON.parse(t);this._settings={...this._settings,...n}}this._loadSettingsLegacy()}catch(t){console.error(`Failed to load settings: ${t}`)}}_storeSettings(){try{this._storeSettingsLegacy(),localStorage.setItem(Et,JSON.stringify(this._settings))}catch(t){console.error(`Failed to persist settings: ${t}`)}}_loadSettingsLegacy(){localStorage.getItem("tooltipsDisabled")!==null&&(this._settings={...this._settings,tooltips:!1}),localStorage.getItem("night-mode")==="true"&&(this._settings={...this._settings,nightMode:!0}),this._settings.nightMode===!0&&(this._settings={...this._settings,theme:"dark"})}_storeSettingsLegacy(){this._settings.tooltips?localStorage.removeItem("tooltipsDisabled"):localStorage.setItem("tooltipsDisabled","true"),this._settings.nightMode!==null?localStorage.setItem("night-mode",this._settings.nightMode===!0?"true":"false"):localStorage.removeItem("night-mode"),this._settings.theme!==null?(localStorage.setItem("night-mode",this._settings.theme==="dark"?"true":"false"),this._settings.nightMode=this._settings.theme==="dark"):(delete this._settings.nightMode,localStorage.removeItem("night-mode"))}},O=new He;var fi=".content",Lt=".content-inner",pi=".livebook-badge";function Tt(e){e||mi(),gi(),hi()}function hi(){c(fi).querySelectorAll("a").forEach(e=>{e.querySelector("code, img")&&e.classList.add("no-underline")})}function mi(){c(Lt).setAttribute("tabindex",-1),c(Lt).focus()}function gi(){let t=window.location.pathname.replace(/(\.html)?$/,".livemd"),n=new URL(t,window.location.href).toString();O.getAndSubscribe(i=>{let r=i.livebookUrl?vi(i.livebookUrl,n):yi(n);for(let s of _(pi))s.href=r})}function yi(e){return`https://livebook.dev/run?url=${encodeURIComponent(e)}`}function vi(e,t){return`${e}/import?url=${encodeURIComponent(t)}`}var At=mt(It());var Hi=768,De=300,re=".sidebar-toggle",Fi=".content",M={CLOSED:"closed",OPEN:"open",NO_PREF:"no_pref"},N={opened:"sidebar-opened",openingStart:"sidebar-opening-start",opening:"sidebar-opening",closed:"sidebar-closed",closingStart:"sidebar-closing-start",closing:"sidebar-closing"},Di=Object.values(N),A={togglingTimeout:null,lastWindowWidth:window.innerWidth,sidebarPreference:M.NO_PREF};function Pt(){Rt(),Mi(),Bi()}function Mi(){let e=sessionStorage.getItem("sidebar_width");e&&Ct(e),new ResizeObserver(n=>{for(let i of n)Ct(i.contentRect.width)}).observe(document.getElementById("sidebar"))}function Ct(e){sessionStorage.setItem("sidebar_width",e),document.body.style.setProperty("--sidebarWidth",`${e}px`)}function Rt(){sessionStorage.getItem("sidebar_state")==="closed"||Nt()?(V(N.closed),c(re).setAttribute("aria-expanded","false")):(V(N.opened),c(re).setAttribute("aria-expanded","true")),setTimeout(()=>c(re).classList.add("sidebar-toggle--animated"),De)}function Nt(){return window.matchMedia(`screen and (max-width: ${Hi}px)`).matches}function V(...e){document.body.classList.remove(...Di),document.body.classList.add(...e)}function Bi(){c(re).addEventListener("click",e=>{Me(),Vi()}),c(Fi).addEventListener("click",e=>{$i()}),window.addEventListener("resize",(0,At.default)(e=>{zi()},100))}function Me(){return Be()?Ht():ze()}function Be(){return document.body.classList.contains(N.opened)||document.body.classList.contains(N.opening)}function Qt(){return document.body.classList.contains(N.opened)}function ze(){return Ft(),sessionStorage.setItem("sidebar_state","opened"),c(re).setAttribute("aria-expanded","true"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.openingStart),requestAnimationFrame(()=>{V(N.opening),A.togglingTimeout=setTimeout(()=>{V(N.opened),e()},De)})})})}function Ht(){return Ft(),sessionStorage.setItem("sidebar_state","closed"),c(re).setAttribute("aria-expanded","false"),new Promise((e,t)=>{requestAnimationFrame(()=>{V(N.closingStart),requestAnimationFrame(()=>{V(N.closing),A.togglingTimeout=setTimeout(()=>{V(N.closed),e()},De)})})})}function Ft(){A.togglingTimeout&&(clearTimeout(A.togglingTimeout),A.togglingTimeout=null)}function zi(){A.lastWindowWidth!==window.innerWidth&&(A.lastWindowWidth=window.innerWidth,(A.sidebarPreference===M.OPEN||A.sidebarPreference===M.NO_PREF)&&Rt())}function $i(){Nt()&&Be()&&Ht()}function Vi(){switch(A.sidebarPreference){case M.OPEN:A.sidebarPreference=M.CLOSED;break;case M.CLOSED:A.sidebarPreference=M.OPEN;break;case M.NO_PREF:Be()?A.sidebarPreference=M.OPEN:A.sidebarPreference=M.CLOSED}}function le(){return window.sidebarNodes||{}}function Dt(){return window.versionNodes||[]}var $e={search:"search",extras:"extras",modules:"modules",tasks:"tasks"},Ve=[$e.extras,$e.modules,$e.tasks],Se=e=>`#${e}-full-list`;function Mt(){Ve.forEach(e=>{qi(le(),e)}),be($()),zt(),Bt(),Ji()}function qi(e,t){let n=e[t]||[],i=c(Se(t));if(!i)return;let r=Handlebars.templates["sidebar-items"]({nodes:n,group:""});i.innerHTML=r,i.querySelectorAll("ul").forEach(s=>{if(s.innerHTML.trim()===""){let o=s.previousElementSibling;o.classList.contains("expand")&&o.classList.remove("expand"),s.remove()}}),i.querySelectorAll("li a + button").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li");Ui(l)})}),i.querySelectorAll("li a").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li"),u=i.querySelector(".current-section");u&&Gi(u),s.matches(".expand")&&(s.pathname===window.location.pathname||s.pathname===window.location.pathname+".html")&&qe(l)})})}function qe(e){e.classList.add("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","true")}function ji(e){e.classList.remove("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","false")}function Ui(e){e.classList.contains("open")?ji(e):qe(e)}function Wi(e){e.classList.add("current-section"),e.querySelector("a").setAttribute("aria-current","true")}function Gi(e){e.classList.remove("current-section"),e.querySelector("a").setAttribute("aria-current","false")}function Ki(e){e.classList.add("current-hash"),e.querySelector("a").setAttribute("aria-current","true")}function Yi(e){e.classList.remove("current-hash"),e.querySelector("a").setAttribute("aria-current","false")}function be(e){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);if(n){let i=c(`#${n.getAttribute("aria-controls")}`);t===e?(n.parentElement.classList.add("selected"),n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),i.removeAttribute("hidden")):(n.parentElement.classList.remove("selected"),n.setAttribute("aria-selected","false"),n.setAttribute("tabindex","-1"),i.setAttribute("hidden","hidden"))}})}function Bt(){let e=c(Se($()));if(!e)return;let t=e.querySelector("li.current-page");t&&(t.scrollIntoView(),e.scrollTop-=40)}function zt(){let e=te()||"content",n=le()[$()]||[],i=yt(n,e),r=c(Se($()));if(!r)return;let s=r.querySelector(`li.current-page a.expand[href$="#${i}"]`);s&&qe(s.closest("li"));let o=r.querySelector(`li.current-page a[href$="#${e}"]`);if(o){let a=o.closest("ul");a.classList.contains("deflist")&&Wi(a.closest("li")),Ki(o.closest("li"))}}function Ji(){Ve.forEach(t=>{let n=c(`#${t}-list-tab-button`);n&&n.addEventListener("click",i=>{be(t),Bt()})});let e=c("#sidebar-listNav");e.addEventListener("keydown",t=>{if(t.key!=="ArrowRight"&&t.key!=="ArrowLeft")return;let n=Array.from(e.querySelectorAll('[role="tab"]')).map(r=>r.dataset.type),i=e.querySelector('[role="tab"][aria-selected="true"]').dataset.type;if(t.key==="ArrowRight"){let r=n.indexOf(i)+1;r>=n.length&&(r=0);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}else if(t.key==="ArrowLeft"){let r=n.indexOf(i)-1;r<0&&(r=n.length-1);let s=n[r];be(s),c(`#${s}-list-tab-button`).focus()}}),window.addEventListener("hashchange",t=>{let n=c(Se($()));if(!n)return;let i=n.querySelector("li.current-page li.current-hash");i&&Yi(i),zt()})}var B={module:"module",moduleChild:"module-child",mixTask:"mix-task",extra:"extra",section:"section"};function Vt(e,t=8){if(ne(e))return[];let n=le(),i=[...je(n.modules,e,B.module,"module"),...Xi(n.modules,e,B.moduleChild),...je(n.tasks,e,B.mixTask,"mix task"),...je(n.extras,e,B.extra,"page"),...Ue(n.modules,e,B.section,"module"),...Ue(n.tasks,e,B.section,"mix task"),...Ue(n.extras,e,B.section,"page")].filter(r=>r!==null);return sr(i).slice(0,t)}function je(e,t,n,i){return e.map(r=>er(r,t,n,i))}function Xi(e,t,n){return e.filter(i=>i.nodeGroups).flatMap(i=>i.nodeGroups.flatMap(({key:r,nodes:s})=>{let o=rr(r);return s.map(a=>tr(a,i.id,t,n,o)||ir(a,i.id,t,n,o))}))}function Ue(e,t,n,i){return e.flatMap(r=>Zi(r).map(s=>nr(r,s,t,n,i)))}function Zi(e){return(e.sections||[]).concat(e.headers||[])}function er(e,t,n,i){return Ee(e.title,t)?{link:`${e.id}.html`,title:we(e.title,t),description:null,matchQuality:Le(e.title,t),deprecated:e.deprecated,labels:[i],category:n}:null}function tr(e,t,n,i,r){return Ee(e.id,n)?{link:`${t}.html#${e.anchor}`,title:we(e.id,n),labels:[r],description:t,matchQuality:Le(e.id,n),deprecated:e.deprecated,category:i}:null}function nr(e,t,n,i,r){return qt(t.id,n)?{link:`${e.id}.html#${t.anchor}`,title:we(t.id,n),description:e.title,matchQuality:Le(t.id,n),labels:[r,"section"],category:i}:null}function ir(e,t,n,i,r){let s=`${t}.${e.id}`,o=`${t}:${e.id}`,a,l;if(Ee(s,n))a=s,l=/\./g;else if(Ee(o,n))a=o,l=/:/g;else return null;let u=n.replace(l," ");return qt(e.id,u)?{link:`${t}.html#${e.anchor}`,title:we(e.id,u),label:r,description:t,matchQuality:Le(a,n),deprecated:e.deprecated,category:i}:null}function rr(e){switch(e){case"callbacks":return"callback";case"types":return"type";default:return"function"}}function sr(e){return e.slice().sort((t,n)=>t.matchQuality!==n.matchQuality?n.matchQuality-t.matchQuality:$t(t.category)-$t(n.category))}function $t(e){switch(e){case B.module:return 1;case B.moduleChild:return 2;case B.mixTask:return 3;default:return 4}}function qt(e,t){return Te(t).some(i=>jt(e,i))}function Ee(e,t){return Te(t).every(i=>jt(e,i))}function jt(e,t){return e.toLowerCase().includes(t.toLowerCase())}function Le(e,t){let n=Te(t),r=n.map(o=>o.length).reduce((o,a)=>o+a,0)/e.length,s=or(e,n[0])?1:0;return r+s}function or(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function Te(e){return e.trim().split(/\s+/)}function we(e,t){let n=Te(t).sort((i,r)=>r.length-i.length);return xe(e,n)}function xe(e,t){if(t.length===0)return e;let[n,...i]=t,r=e.match(new RegExp(`(.*)(${gt(n)})(.*)`,"i"));if(r){let[,s,o,a]=r;return xe(s,t)+""+me(o)+""+xe(a,t)}else return xe(e,i)}var ke=null,G=null;function Ut(){G=document.getElementById("toast"),G.addEventListener("click",e=>{clearTimeout(ke),e.target.classList.remove("show")})}function We(e){G&&(clearTimeout(ke),G.innerText=e,G.classList.add("show"),ke=setTimeout(()=>{G.classList.remove("show"),ke=setTimeout(function(){G.innerText=""},1e3)},5e3))}var Wt="dark",Ge=["system","dark","light"];function Gt(e){O.getAndSubscribe(t=>{document.body.classList.toggle(Wt,Yt(e||t.theme))}),cr()}function Kt(){let e=Ge[Ge.indexOf(Ke())+1]||Ge[0];O.update({theme:e}),We(`Set theme to "${e}"`)}function Ke(){return O.get().theme||"system"}function Yt(e){return e==="dark"||ar()&&(e==null||e==="system")}function ar(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function cr(){window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let t=O.get().theme,n=Yt(t);(t==null||t==="system")&&(document.body.classList.toggle(Wt,n),We(`Browser changed theme to "${n?"dark":"light"}"`))})}var se=".autocomplete",Oe=".autocomplete-suggestions",_e=".autocomplete-suggestion",I={autocompleteSuggestions:[],previewOpen:!1,selectedIdx:-1};function lr(){c(se).classList.add("shown")}function Ye(){c(se).classList.remove("shown")}function Jt(){return c(se).classList.contains("shown")}function Je(e){I.autocompleteSuggestions=Vt(e),I.selectedIdx=-1,ne(e)?Ye():(ur({term:e,suggestions:I.autocompleteSuggestions}),Ie(0),lr())}function ur({term:e,suggestions:t}){let n=Handlebars.templates["autocomplete-suggestions"]({suggestions:t,term:e}),i=c(se);i.innerHTML=n}function Xt(){return I.selectedIdx===-1?null:I.autocompleteSuggestions[I.selectedIdx]}function Ie(e){en(dr(e))}function Zt(e){if(e.data.type==="preview"){let{contentHeight:t}=e.data,n=c(".autocomplete-preview");n&&(n.style.height=`${t+32}px`,n.classList.remove("loading"))}}function en(e){I.selectedIdx=e;let t=c(Oe),n=c(`${_e}.selected`),i=c(`${_e}[data-index="${I.selectedIdx}"]`);if(n&&n.classList.remove("selected"),i){if(I.previewOpen){nn(),window.addEventListener("message",Zt),t.classList.add("previewing");let r=document.createElement("div");r.classList.add("autocomplete-preview"),r.classList.add("loading");let s=i.href.replace(".html",`.html?preview=true&theme=${Ke()}`),o=document.createElement("iframe");o.setAttribute("src",s),r.appendChild(document.createElement("div")),r.appendChild(document.createElement("span")),r.appendChild(o),i.parentNode.insertBefore(r,i.nextSibling)}i.classList.add("selected"),i.scrollIntoView({block:"nearest"})}else t&&(t.scrollTop=0)}function tn(){I.previewOpen?Ce():Xe()}function Ce(){I.previewOpen=!1;let e=c(Oe);e&&e.classList.remove("previewing"),nn()}function Xe(e){I.previewOpen=!0,e?e=e.closest(_e):e=c(`${_e}[data-index="${I.selectedIdx}"]`),e&&en(parseInt(e.dataset.index))}function nn(){let e=c(".autocomplete-preview");e&&(e.remove(),window.removeEventListener("message",Zt))}function dr(e){let t=I.autocompleteSuggestions.length+1;return(I.selectedIdx+e+1+t)%t-1}var ue="form.search-bar input",fr="form.search-bar .search-close-button";function on(){pr(),window.onTogglePreviewClick=function(e,t){e.preventDefault(),e.stopImmediatePropagation(),et(),t?Xe(e.target):Ce()}}function an(e){let t=c(ue);t.value=e}function et(){let e=c(ue);document.body.classList.add("search-focused"),e.focus()}function pr(){let e=c(ue);if(document.querySelector('meta[name="exdoc:autocomplete"][content="off"]'))return e.addEventListener("keydown",t=>{t.key==="Enter"&&rn(t)}),!0;e.addEventListener("keydown",t=>{let n=ie();t.key==="Escape"?(Ae(),e.blur()):t.key==="Enter"?rn(t):t.key==="ArrowUp"||n&&t.ctrlKey&&t.key==="p"?(Ie(-1),t.preventDefault()):t.key==="ArrowDown"||n&&t.ctrlKey&&t.key==="n"?(Ie(1),t.preventDefault()):t.key==="Tab"&&(tn(),t.preventDefault())}),e.addEventListener("input",t=>{Je(t.target.value)}),e.addEventListener("focus",t=>{document.body.classList.contains("search-focused")||(document.body.classList.add("search-focused"),Je(t.target.value))}),e.addEventListener("blur",t=>{let n=t.relatedTarget,i=c(Oe);if(n&&i&&i.contains(n))return setTimeout(()=>{Jt()&&e.focus()},1e3),null;Pe()}),c(se).addEventListener("click",t=>{t.shiftKey||t.ctrlKey?e.focus():(Ae(),Pe())}),c(fr).addEventListener("click",t=>{Ae(),Pe()})}function rn(e){let t=c(ue),n=e.shiftKey||e.ctrlKey,i=Xt();e.preventDefault();let r=n?"_blank":"_self",s=document.createElement("a");if(s.setAttribute("target",r),i)s.setAttribute("href",i.link);else{let o=document.querySelector('meta[name="exdoc:full-text-search-url"]'),a=o?o.getAttribute("content"):"search.html?q=";s.setAttribute("href",`${a}${encodeURIComponent(t.value)}`)}s.click(),n||(Ae(),Pe())}function Ae(){let e=c(ue);e.value=""}function Pe(){Ce(),document.body.classList.remove("search-focused"),Ye()}var Ze=window.scrollY,hr=70,sn=-2;window.addEventListener("scroll",function(){let e=window.scrollY;e===0||Ze-ehr?document.body.classList.remove("scroll-sticky"):Ze-e>Math.abs(sn)&&document.body.classList.add("scroll-sticky"),Ze=e<=0?0:e},!1);var cn=".sidebar-projectVersion",ln=".sidebar-projectVersionsDropdown";function un(){let e=Dt();if(e.length>0){let n=c(cn).textContent.trim(),i=gr(e,n);mr({nodes:i})}}function mr({nodes:e}){let t=c(cn),n=Handlebars.templates["versions-dropdown"]({nodes:e});t.innerHTML=n,c(ln).addEventListener("change",vr)}function gr(e,t){return yr(e,t).map(i=>({...i,isCurrentVersion:i.version===t}))}function yr(e,t){return e.some(i=>i.version===t)?e:[{version:t,url:"#"},...e]}function vr(e){let t=e.target.value,n=window.location.pathname.split("/").pop()+window.location.hash,i=`${t}/${n}`;bt(i).then(r=>{r?window.location.href=i:window.location.href=t})}function tt(){let e=c(ln);e&&(e.focus(),e.addEventListener("keydown",t=>{(t.key==="Escape"||t.key==="v")&&(t.preventDefault(),e.blur())}),navigator.userActivation.isActive&&"showPicker"in HTMLSelectElement.prototype&&e.showPicker())}var H=mt(pn());var Re=80,br="#search";function mn(){let e=window.location.pathname;if(e.endsWith("/search.html")||e.endsWith("/search")){let t=vt("q");Sr(t)}}async function Sr(e){if(ne(e))nt({value:e});else{an(e);let t=await xr();try{let n=e.replaceAll(/(\B|\\):/g,"\\:"),i=Ar(t.search(n));nt({value:e,results:i})}catch(n){nt({value:e,errorMessage:n.message})}}}function nt({value:e,results:t,errorMessage:n}){let i=c(br),r=Handlebars.templates["search-results"]({value:e,results:t,errorMessage:n});i.innerHTML=r}async function xr(){H.default.tokenizer.separator=/\s+/,H.default.QueryLexer.termSeparator=/\s+/,H.default.Pipeline.registerFunction(yn,"docTokenSplitter"),H.default.Pipeline.registerFunction(vn,"docTrimmer");let e=await Er();if(e)return e;let t=Or();return Lr(t),t}async function Er(){try{let e=sessionStorage.getItem(gn());if(e){let t=await wr(e);return H.default.Index.load(t)}else return null}catch(e){return console.error("Failed to load index: ",e),null}}async function Lr(e){try{let t=await Tr(e);sessionStorage.setItem(gn(),t)}catch(t){console.error("Failed to save index: ",t)}}async function Tr(e){let t=new Blob([JSON.stringify(e)],{type:"application/json"}).stream().pipeThrough(new window.CompressionStream("gzip")),i=await(await new Response(t).blob()).arrayBuffer();return kr(i)}async function wr(e){let t=new Blob([_r(e)],{type:"application/json"}).stream().pipeThrough(new window.DecompressionStream("gzip")),n=await new Response(t).text();return JSON.parse(n)}function kr(e){let t="",n=new Uint8Array(e),i=n.byteLength;for(let r=0;r{this.add(e)})})}function Ir(e){e.pipeline.before(H.default.stemmer,yn)}function yn(e){let t=[e],n=/\/\d+$/,i=/\:|\./,r=e.toString();if(n.test(r)){let o=e.toString().replace(n,"");t.push(e.clone().update(()=>o));let a=o.split(i);if(a.length>1){for(let u of a)t.push(e.clone().update(()=>u));let l=e.toString().split(i);t.push(e.clone().update(()=>l[l.length-1]))}r=a[a.length-1]}else r.startsWith("@")&&(r=r.substring(1),t.push(e.clone().update(()=>r)));let s=r.split(/\_|\-/);if(s.length>1)for(let o of s)t.push(e.clone().update(()=>o));return t}function Cr(e){e.pipeline.before(H.default.stemmer,vn)}function vn(e){return e.update(function(t){return t.replace(/^[^@:\w]+/,"").replace(/[^\?\!\w]+$/,"")})}function Ar(e){return e.filter(t=>hn(t.ref)).map(t=>{let n=hn(t.ref),i=t.matchData.metadata;return{...n,metadata:i,excerpts:Pr(n,i)}})}function hn(e){return searchData.items.find(t=>t.ref===e)||null}function Pr(e,t){let{doc:n}=e,r=Object.keys(t).filter(s=>"doc"in t[s]).map(s=>t[s].doc.position.map(([o,a])=>Rr(n,o,a))).reduce((s,o)=>s.concat(o),[]);return r.length===0?[n.slice(0,Re*2)+(Re*20?"...":"",e.slice(i,t),""+me(e.slice(t,t+n))+"",e.slice(t+n,r),r{let n=t.getAttribute("data-group-id");t.addEventListener("mouseenter",i=>{bn(n,!0)}),t.addEventListener("mouseleave",i=>{bn(n,!1)})})}function bn(e,t){_(`[data-group-id="${e}"]`).forEach(i=>{i.classList.toggle(Nr,t)})}var Y=".modal",Hr=".modal .modal-close",Fr=".modal .modal-title",Dr=".modal .modal-body",xn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',z={prevFocus:null,lastFocus:null,ignoreFocusChanges:!1};function En(){Mr()}function Mr(){let e=Handlebars.templates["modal-layout"]();document.body.insertAdjacentHTML("beforeend",e),c(Y).addEventListener("keydown",t=>{t.key==="Escape"&&K()}),c(Hr).addEventListener("click",t=>{K()}),c(Y).addEventListener("click",t=>{t.target.classList.contains("modal")&&K()})}function Ln(e){if(z.ignoreFocusChanges)return;let t=c(Y);if(t.contains(e.target))z.lastFocus=e.target;else{z.ignoreFocusChanges=!0;let n=Br(t);z.lastFocus===n?zr(t).focus():n.focus(),z.ignoreFocusChanges=!1,z.lastFocus=document.activeElement}}function Br(e){return e.querySelector(xn)}function zr(e){let t=e.querySelectorAll(xn);return t[t.length-1]}function Ne({title:e,body:t}){z.prevFocus=document.activeElement,document.addEventListener("focus",Ln,!0),c(Fr).innerHTML=e,c(Dr).innerHTML=t,c(Y).classList.add("shown"),c(Y).focus()}function K(){c(Y).classList.remove("shown"),document.addEventListener("focus",Ln,!0),z.prevFocus&&z.prevFocus.focus(),z.prevFocus=null}function Tn(){return c(Y).classList.contains("shown")}var $r="https://hexdocs.pm/%%",Vr="https://www.erlang.org/doc/apps/%%",qr="https://hex.pm/api/packages?search=name:%%*",jr=".display-quick-switch",it="#quick-switch-input",kn="#quick-switch-results",Ur=".quick-switch-result",Wr=300,Gr=9,_n=["erts","asn1","common_test","compiler","crypto","debugger","dialyzer","diameter","edoc","eldap","erl_interface","et","eunit","ftp","inets","jinterface","kernel","megaco","mnesia","observer","odbc","os_mon","parsetools","public_key","reltool","runtime_tools","sasl","snmp","ssh","ssl","stdlib","syntax_tools","tftp","tools","wx","xmerl"],Kr=["elixir","eex","ex_unit","hex","iex","logger","mix"].concat(_n).map(e=>({name:e})),On=2,P={autocompleteResults:[],selectedIdx:null};function In(){Yr()}function Yr(){_(jr).forEach(e=>{e.addEventListener("click",t=>{st()})})}function Jr(e){if(e.key==="Enter"){let t=e.target.value;Zr(t),e.preventDefault()}else e.key==="ArrowUp"?(wn(-1),e.preventDefault()):e.key==="ArrowDown"&&(wn(1),e.preventDefault())}function Xr(e){let t=e.target.value;if(t.lengthn.json()).then(n=>{Array.isArray(n)&&(P.autocompleteResults=is(e,n),P.selectedIdx=null,c(it).value.length>=On&&ns({results:P.autocompleteResults}))})}function ns({results:e}){let t=c(kn),n=Handlebars.templates["quick-switch-results"]({results:e});t.innerHTML=n,_(Ur).forEach(i=>{i.addEventListener("click",r=>{let s=i.getAttribute("data-index"),o=P.autocompleteResults[s];rt(o.name)})})}function is(e,t){return Kr.concat(t).filter(n=>n.name.toLowerCase().includes(e.toLowerCase())).filter(n=>n.releases===void 0||n.releases[0].has_docs===!0).slice(0,Gr)}function wn(e){P.selectedIdx=rs(e);let t=c(".quick-switch-result.selected"),n=c(`.quick-switch-result[data-index="${P.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function rs(e){let t=P.autocompleteResults.length;if(P.selectedIdx===null){if(e>=0)return 0;if(e<0)return t-1}return(P.selectedIdx+e+t)%t}var ss=".display-settings",os="#settings-modal-content",ot="#modal-settings-tab",at="#modal-keyboard-shortcuts-tab",An="#settings-content",Pn="#keyboard-shortcuts-content",as=[{title:"Settings",id:"modal-settings-tab"},{title:"Keyboard shortcuts",id:"modal-keyboard-shortcuts-tab"}];function Rn(){cs()}function cs(){_(ss).forEach(e=>{e.addEventListener("click",t=>{ct()})})}function Cn(){c(at).classList.remove("active"),c(ot).classList.add("active"),c(An).classList.remove("hidden"),c(Pn).classList.add("hidden")}function ls(){c(at).classList.add("active"),c(ot).classList.remove("active"),c(Pn).classList.remove("hidden"),c(An).classList.add("hidden")}function ct(){Ne({title:as.map(({id:s,title:o})=>``).join(""),body:Handlebars.templates["settings-modal-body"]({shortcuts:lt})});let e=c(os),t=e.querySelector('[name="theme"]'),n=e.querySelector('[name="tooltips"]'),i=e.querySelector('[name="direct_livebook_url"]'),r=e.querySelector('[name="livebook_url"]');O.getAndSubscribe(s=>{t.value=s.theme||"system",n.checked=s.tooltips,s.livebookUrl===null?(i.checked=!1,r.classList.add("hidden"),r.tabIndex=-1):(i.checked=!0,r.classList.remove("hidden"),r.tabIndex=0,r.value=s.livebookUrl)}),t.addEventListener("change",s=>{O.update({theme:s.target.value})}),n.addEventListener("change",s=>{O.update({tooltips:s.target.checked})}),i.addEventListener("change",s=>{let o=s.target.checked?r.value:null;O.update({livebookUrl:o})}),r.addEventListener("input",s=>{O.update({livebookUrl:s.target.value})}),c(ot).addEventListener("click",s=>{Cn()}),c(at).addEventListener("click",s=>{ls()}),Cn()}var us="#settings-modal-content",lt=[{key:"c",description:"Toggle sidebar",action:Me},{key:"n",description:"Cycle themes",action:Kt},{key:"s",description:"Focus search bar",displayAs:"/ or s",action:ut},{key:"/",action:ut},{key:"k",hasModifier:!0,action:ut},{key:"v",description:"Open/focus version select",action:hs},{key:"g",description:"Go to package docs",displayAs:"g",action:st},{key:"?",displayAs:"?",description:"Bring up this modal",action:ms}],dt={shortcutBeingPressed:null};function Nn(){ds()}function ds(){document.addEventListener("keydown",fs),document.addEventListener("keyup",ps)}function fs(e){if(dt.shortcutBeingPressed||e.target.matches("input, select, textarea"))return;let t=lt.find(n=>n.hasModifier?ie()&&e.metaKey||e.ctrlKey?n.key===e.key:!1:e.ctrlKey||e.metaKey||e.altKey?!1:n.key===e.key);t&&(dt.shortcutBeingPressed=t,e.preventDefault(),t.action(e))}function ps(e){dt.shortcutBeingPressed=null}function ut(e){K(),et()}function hs(){K(),Qt()?tt():ze().then(tt)}function ms(){gs()?K():ct()}function gs(){return Tn()&&c(us)}var J={plain:"plain",function:"function",module:"module"},ys=[{href:"typespecs.html#basic-types",hint:{kind:J.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:J.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:J.plain,description:"Built-in type"}}],Qe={cancelHintFetching:null};function Qn(e){if(Fn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function Hn(e){let t=Fn(e);return t?Promise.resolve(t):vs(e)}function Fn(e){let t=ys.find(n=>e.includes(n.href));return t?t.hint:null}function vs(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,i)=>{let r=document.createElement("iframe");r.setAttribute("src",t),r.style.display="none";function s(a){let{href:l,hint:u}=a.data;t===l&&(o(),n(u))}Qe.cancelHintFetching=()=>{o(),i(new Error("cancelled"))};function o(){r.remove(),window.removeEventListener("message",s),Qe.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(r)})}function Dn(){Qe.cancelHintFetching&&Qe.cancelHintFetching()}function Mn(e){let n=e.querySelector("h1").textContent,i=e.querySelector(".docstring > p"),r=i?i.innerHTML:"";return{kind:J.function,title:n.trim(),description:r.trim()}}function Bn(e){let n=e.querySelector("h1 > span").textContent,i=e.querySelector("#moduledoc p"),r=i?i.innerHTML:"";return{kind:J.module,title:n.trim(),description:r.trim()}}var bs=".content a",ft=".tooltip",Ss=".tooltip .tooltip-body",$n="body .content-inner",xs="#content",Vn="tooltip-shown",de=10,Es=de*4,zn={height:450,width:768},Ls=100,oe={currentLinkElement:null,hoverDelayTimeout:null};function qn(){Ts(),ws()}function Ts(){let e=Handlebars.templates["tooltip-layout"]();c($n).insertAdjacentHTML("beforeend",e)}function ws(){_(bs).forEach(e=>{ks(e)&&(e.addEventListener("mouseenter",t=>{Os(e)}),e.addEventListener("mouseleave",t=>{Ps(e)}))})}function ks(e){return!(e.getAttribute("data-no-tooltip")!==null||_s(e.href)||!Qn(e.href))}function _s(e){let t=e.replace(xs,"");return window.location.href.split("#")[0]===t}function Os(e){Is()&&(oe.currentLinkElement=e,oe.hoverDelayTimeout=setTimeout(()=>{Hn(e.href).then(t=>{Cs(t),As()}).catch(()=>{})},Ls))}function Is(){let e=window.innerWidthe.firstElementChild&&e.firstElementChild.tagName==="CODE").forEach(e=>e.insertAdjacentHTML("beforeend",zs)),Array.from(_(".copy-button")).forEach(e=>{let t;e.addEventListener("click",()=>{let n=e.querySelector("[aria-live]");t&&clearTimeout(t);let i=Array.from(e.parentElement.querySelector("code").childNodes).filter(r=>!(r.tagName==="SPAN"&&r.classList.contains("unselectable"))).map(r=>r.textContent).join("");navigator.clipboard.writeText(i),e.classList.add("clicked"),n.innerHTML="Copied! ✓",t=setTimeout(()=>{e.classList.remove("clicked"),n.innerHTML=""},3e3)})})}function Kn(){let e=ie()?"apple-os":"non-apple-os";document.documentElement.classList.add(e)}var Vs="content",qs="tabs-open",js="tabs-close",Us="H3",Ws="tabset";function Jn(){Gs().map(Ks).forEach(n=>Xs(n))}function Gs(){let e=document.createNodeIterator(document.getElementById(Vs),NodeFilter.SHOW_COMMENT,{acceptNode(i){return i.nodeValue.trim()===qs?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),t=[],n;for(;n=e.nextNode();)t.push(n);return t}function Ks(e,t,n){let i=[],r=[],s={label:"",content:[]};for(;e=e.nextSibling;){if(Ys(e)){Yn(s,r,t);break}i.push(e),e.nodeName===Us?(Yn(s,r,t),s.label=e.innerText,s.content=[]):s.content.push(e.outerHTML)}let o=document.createElement("div");return o.className=Ws,Js(i,o),o.innerHTML=Handlebars.templates.tabset({tabs:r}),o}function Ys(e){return e.nodeName==="#comment"&&e.nodeValue.trim()===js}function Yn(e,t,n){if(e.label===""&&!e.content.length)return!1;let i=e.label,r=e.content;t.push({label:i,content:r,setIndex:n})}function Js(e,t){if(!e||!e.length)return!1;e[0].parentNode.insertBefore(t,e[0]),e.forEach(n=>t.appendChild(n))}function Xs(e){let t={tabs:e.querySelectorAll(':scope [role="tab"]'),panels:e.querySelectorAll(':scope [role="tabpanel"]'),activeIndex:0};t.tabs.forEach((n,i)=>{n.addEventListener("click",r=>{X(i,t)}),n.addEventListener("keydown",r=>{let s=t.tabs.length-1;r.code==="ArrowLeft"?(r.preventDefault(),t.activeIndex===0?X(s,t):X(t.activeIndex-1,t)):r.code==="ArrowRight"?(r.preventDefault(),t.activeIndex===s?X(0,t):X(t.activeIndex+1,t)):r.code==="Home"?(r.preventDefault(),X(0,t)):r.code==="End"&&(r.preventDefault(),X(s,t))})})}function X(e,t){t.tabs[t.activeIndex].setAttribute("aria-selected","false"),t.tabs[t.activeIndex].tabIndex=-1,t.tabs[e].setAttribute("aria-selected","true"),t.tabs[e].tabIndex=0,t.tabs[e].focus(),t.panels[t.activeIndex].setAttribute("hidden",""),t.panels[t.activeIndex].tabIndex=-1,t.panels[e].removeAttribute("hidden"),t.panels[e].tabIndex=0,t.activeIndex=e}function Zn(){let e=ge(te(),!0);e&&Zs(e)}function Zs(e){no(e),eo(),to(),Xn(),window.addEventListener("resize",t=>{Xn()})}function Xn(){let e=document.body.scrollHeight,t=document.getElementById("content").parentElement.offsetHeight,n={type:"preview",maxHeight:e,contentHeight:t};window.parent.postMessage(n,"*")}function eo(){let e=document.getElementsByTagName("a");for(let t of e)t.getAttribute("target")!=="_blank"&&t.setAttribute("target","_parent")}function to(){window.scrollTo(0,0)}function no(e){document.body.classList.add("preview");let t=document.getElementById("content");t.innerHTML=e.innerHTML}St(()=>{let e=new URLSearchParams(window.location.search),t=e.has("preview");Gt(e.get("theme")),Tt(t),Sn(),qn(),Wn(),Gn(),Kn(),Jn(),t?Zn():(un(),Pt(),Mt(),on(),En(),Nn(),In(),Ut(),mn(),Rn())});})();
/*! Bundled license information:
lunr/lunr.js: