diff --git a/assets/js/search-bar.js b/assets/js/search-bar.js index d5ea45736..84a218427 100644 --- a/assets/js/search-bar.js +++ b/assets/js/search-bar.js @@ -158,7 +158,7 @@ window.addEventListener('scroll', function () { backgroundLayer.classList.add('sm-fixed') } - if (currentScroll == 0) { + if (currentScroll === 0) { // Remove 'fixed' class when at the top topSearch.classList.remove('sm-fixed') sidebarMenu.classList.remove('sm-fixed') diff --git a/assets/js/sidebar/sidebar-drawer.js b/assets/js/sidebar/sidebar-drawer.js index 1c41c9f1d..d327f0b73 100644 --- a/assets/js/sidebar/sidebar-drawer.js +++ b/assets/js/sidebar/sidebar-drawer.js @@ -42,25 +42,25 @@ export function initialize () { addEventListeners() } -function observeResizing() { +function observeResizing () { const sidebarWidth = sessionStorage.getItem('sidebar_width') - if(sidebarWidth) { + if (sidebarWidth) { setSidebarWidth(sidebarWidth) } const resizeObserver = new ResizeObserver((entries) => { for (const entry of entries) { - setSidebarWidth(entry.contentRect.width); + setSidebarWidth(entry.contentRect.width) } - }); + }) - resizeObserver.observe(document.getElementById('sidebar')); + resizeObserver.observe(document.getElementById('sidebar')) } -function setSidebarWidth(width) { +function setSidebarWidth (width) { sessionStorage.setItem('sidebar_width', width) - document.body.style.setProperty('--sidebarWidth', `${width}px`); + document.body.style.setProperty('--sidebarWidth', `${width}px`) } function setDefaultSidebarState () { diff --git a/formatters/html/dist/html-LNXB4R6R.js b/formatters/html/dist/html-L4O5OK2K.js similarity index 72% rename from formatters/html/dist/html-LNXB4R6R.js rename to formatters/html/dist/html-L4O5OK2K.js index 94f652c2c..3dca04197 100644 --- a/formatters/html/dist/html-LNXB4R6R.js +++ b/formatters/html/dist/html-L4O5OK2K.js @@ -1,5 +1,5 @@ (()=>{var $n=Object.create;var it=Object.defineProperty;var Vn=Object.getOwnPropertyDescriptor;var jn=Object.getOwnPropertyNames;var Un=Object.getPrototypeOf,Wn=Object.prototype.hasOwnProperty;var st=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Gn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jn(t))!Wn.call(e,i)&&i!==n&&it(e,i,{get:()=>t[i],enumerable:!(r=Vn(t,i))||r.enumerable});return e};var ot=(e,t,n)=>(n=e!=null?$n(Un(e)):{},Gn(t||!e||!e.__esModule?it(n,"default",{value:e,enumerable:!0}):n,e));var St=st((Ws,vt)=>{var bt="Expected a function",gt=NaN,ir="[object Symbol]",sr=/^\s+|\s+$/g,or=/^[-+]0x[0-9a-f]+$/i,ar=/^0b[01]+$/i,cr=/^0o[0-7]+$/i,lr=parseInt,ur=typeof global=="object"&&global&&global.Object===Object&&global,dr=typeof self=="object"&&self&&self.Object===Object&&self,fr=ur||dr||Function("return this")(),hr=Object.prototype,pr=hr.toString,mr=Math.max,gr=Math.min,Qe=function(){return fr.Date.now()};function yr(e,t,n){var r,i,s,o,a,l,u=0,f=!1,y=!1,g=!0;if(typeof e!="function")throw new TypeError(bt);t=yt(t)||0,ge(n)&&(f=!!n.leading,y="maxWait"in n,s=y?mr(yt(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g);function L(S){var I=r,D=i;return r=i=void 0,u=S,o=e.apply(D,I),o}function v(S){return u=S,a=setTimeout(p,t),f?L(S):o}function T(S){var I=S-l,D=S-u,V=t-I;return y?gr(V,s-D):V}function m(S){var I=S-l,D=S-u;return l===void 0||I>=t||I<0||y&&D>=s}function p(){var S=Qe();if(m(S))return _(S);a=setTimeout(p,T(S))}function _(S){return a=void 0,g&&r?L(S):(r=i=void 0,o)}function w(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function R(){return a===void 0?o:_(Qe())}function H(){var S=Qe(),I=m(S);if(r=arguments,i=this,l=S,I){if(a===void 0)return v(l);if(y)return a=setTimeout(p,t),L(l)}return a===void 0&&(a=setTimeout(p,t)),o}return H.cancel=w,H.flush=R,H}function br(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(bt);return ge(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),yr(e,t,{leading:r,maxWait:t,trailing:i})}function ge(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function vr(e){return!!e&&typeof e=="object"}function Sr(e){return typeof e=="symbol"||vr(e)&&pr.call(e)==ir}function yt(e){if(typeof e=="number")return e;if(Sr(e))return gt;if(ge(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ge(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(sr,"");var n=ar.test(e);return n||cr.test(e)?lr(e.slice(2),n?2:8):or.test(e)?gt:+e}vt.exports=br});var Gt=st((Ut,Wt)=>{(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),r=Object.keys(t),i=0;i0){var f=e.utils.clone(n)||{};f.position=[a,u],f.index=s.length,s.push(new e.Token(r.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(r){var i=e.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),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 r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,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,r=0;r1&&(ot&&(r=s),o!=t);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ol?f+=2:a==l&&(n+=r[u+1]*i[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,r=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),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var 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),i.push({node:g,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return r},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,r=n,i=0,s=t.length;i=t;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};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 r=new e.QueryParser(t,n);r.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var r=t[this._ref],i=Object.keys(this._fields);this._documents[r]=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 r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new e.QueryParseError(r,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 r="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(r,n.start,n.end)}var i=t.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(i.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var r=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new e.QueryParseError(i,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 r=t.peekLexeme();if(r==null){t.nextClause();return}switch(r.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 i="Unexpected lexeme type '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.editDistance=r;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 i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.boost=r;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 i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},function(t,n){typeof define=="function"&&define.amd?define(n):typeof Ut=="object"?Wt.exports=n():t.lunr=n()}(this,function(){return e})})()});Handlebars.registerHelper("groupChanged",function(e,t,n){let r=t||"";if(e.group!==r)return delete e.nestedContext,e.group=r,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 e+".html"===n?t.fn(this):t.inverse(this)});var c=document.querySelector.bind(document),k=document.querySelectorAll.bind(document);function at(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function he(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function z(){return document.body.dataset.type}function ct(e,t){if(e){for(let n of e){let r=n.nodeGroups&&n.nodeGroups.find(i=>i.nodes.some(s=>s.anchor===t));if(r)return r.key}return null}}function pe(){return window.location.hash.replace(/^#/,"")}function lt(e){return new URLSearchParams(window.location.search).get(e)}function ut(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function dt(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function Z(e){return!e||e.trim()===""}function ft(e,t){let n;return function(...i){clearTimeout(n),n=setTimeout(()=>{n=null,e(...i)},t)}}function me(){return document.head.querySelector("meta[name=project][content]").content}var ht="ex_doc:settings",Kn={tooltips:!0,theme:null,livebookUrl:null},Ne=class{constructor(){this._subscribers=[],this._settings=Kn,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(r=>r(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(ht);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(ht,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 Ne;var Yn=".content",pt=".content-inner",Jn=".livebook-badge";function mt(){Xn(),er(),tr(),Zn()}function Xn(){c(Yn).querySelectorAll("a").forEach(e=>{e.querySelector("code, img")&&e.classList.add("no-underline")})}function Zn(){["warning","info","error","neutral","tip"].forEach(t=>{k(`blockquote h3.${t}, blockquote h4.${t}`).forEach(n=>{n.closest("blockquote").classList.add(t)})})}function er(){c(pt).setAttribute("tabindex",-1),c(pt).focus()}function tr(){let t=window.location.pathname.replace(/(\.html)?$/,".livemd"),n=new URL(t,window.location.href).toString();O.getAndSubscribe(r=>{let i=r.livebookUrl?rr(r.livebookUrl,n):nr(n);for(let s of k(Jn))s.href=i})}function nr(e){return`https://livebook.dev/run?url=${encodeURIComponent(e)}`}function rr(e,t){return`${e}/import?url=${encodeURIComponent(t)}`}document.addEventListener("click",function(e){if(window.innerWidth<=768){let t=e.target.closest('a[href^="#"]');if(t){e.preventDefault();let n=t.getAttribute("href").substring(1),r=document.getElementById(n);if(r){let s=r.getBoundingClientRect().top+window.scrollY-45;window.scrollTo({top:s,behavior:"smooth"})}}}});var Et=ot(St());var xr=768,Lt=300,se=".sidebar-toggle",Er=".content",F={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"},Lr=Object.values(N),C={togglingTimeout:null,lastWindowWidth:window.innerWidth,sidebarPreference:F.NO_PREF};function Tt(){wt(),Tr(),wr()}function Tr(){let e=sessionStorage.getItem("sidebar_width");e&&xt(e),new ResizeObserver(n=>{for(let r of n)xt(r.contentRect.width)}).observe(document.getElementById("sidebar"))}function xt(e){sessionStorage.setItem("sidebar_width",e),document.body.style.setProperty("--sidebarWidth",`${e}px`)}function wt(){sessionStorage.getItem("sidebar_state")==="closed"||kt()?($(N.closed),c(se).setAttribute("aria-expanded","false")):($(N.opened),c(se).setAttribute("aria-expanded","true"))}function kt(){return window.matchMedia(`screen and (max-width: ${xr}px)`).matches}function $(...e){document.body.classList.remove(...Lr),document.body.classList.add(...e)}function wr(){c(se).addEventListener("click",e=>{He(),Ir()}),c(Er).addEventListener("click",e=>{Or()}),window.addEventListener("resize",(0,Et.default)(e=>{_r()},100))}function He(){return De()?_t():kr()}function De(){return document.body.classList.contains(N.opened)||document.body.classList.contains(N.opening)}function kr(){Ot(),sessionStorage.setItem("sidebar_state","opened"),c(se).setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{$(N.openingStart),requestAnimationFrame(()=>($(N.opening),new Promise((e,t)=>{C.togglingTimeout=setTimeout(()=>{$(N.opened),e()},Lt)})))})}function _t(){Ot(),sessionStorage.setItem("sidebar_state","closed"),c(se).setAttribute("aria-expanded","false"),requestAnimationFrame(()=>{$(N.closingStart),requestAnimationFrame(()=>($(N.closing),new Promise((e,t)=>{C.togglingTimeout=setTimeout(()=>{$(N.closed),e()},Lt)})))})}function Ot(){C.togglingTimeout&&(clearTimeout(C.togglingTimeout),C.togglingTimeout=null)}function _r(){C.lastWindowWidth!==window.innerWidth&&(C.lastWindowWidth=window.innerWidth,(C.sidebarPreference===F.OPEN||C.sidebarPreference===F.NO_PREF)&&wt())}function Or(){kt()&&De()&&_t()}function Ir(){switch(C.sidebarPreference){case F.OPEN:C.sidebarPreference=F.CLOSED;break;case F.CLOSED:C.sidebarPreference=F.OPEN;break;case F.NO_PREF:De()?C.sidebarPreference=F.OPEN:C.sidebarPreference=F.CLOSED}}function oe(){return window.sidebarNodes||{}}function It(){return window.versionNodes||[]}var Fe={search:"search",extras:"extras",modules:"modules",tasks:"tasks"},Me=[Fe.extras,Fe.modules,Fe.tasks],be=e=>`#${e}-full-list`;function Ct(){Me.forEach(e=>{Cr(oe(),e)}),ye(z()),Pt(),At(),Dr()}function Cr(e,t){let n=e[t]||[],r=c(be(t));if(!r)return;let i=Handlebars.templates["sidebar-items"]({nodes:n,group:""});r.innerHTML=i,r.querySelectorAll("ul").forEach(s=>{if(s.innerHTML.trim()===""){let o=s.previousElementSibling;o.classList.contains("expand")&&o.classList.remove("expand"),s.remove()}}),r.querySelectorAll("li a + button").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li");Pr(l)})}),r.querySelectorAll("li a").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li"),u=r.querySelector(".current-section");u&&Nr(u),s.matches(".expand")&&s.pathname===window.location.pathname&&Be(l)})})}function Be(e){e.classList.add("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","true")}function Ar(e){e.classList.remove("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","false")}function Pr(e){e.classList.contains("open")?Ar(e):Be(e)}function Rr(e){e.classList.add("current-section"),e.querySelector("a").setAttribute("aria-current","true")}function Nr(e){e.classList.remove("current-section"),e.querySelector("a").setAttribute("aria-current","false")}function Qr(e){e.classList.add("current-hash"),e.querySelector("a").setAttribute("aria-current","true")}function Hr(e){e.classList.remove("current-hash"),e.querySelector("a").setAttribute("aria-current","false")}function ye(e){Me.forEach(t=>{let n=c(`#${t}-list-tab-button`);if(n){let r=c(`#${n.getAttribute("aria-controls")}`);t===e?(n.parentElement.classList.add("selected"),n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),r.removeAttribute("hidden")):(n.parentElement.classList.remove("selected"),n.setAttribute("aria-selected","false"),n.setAttribute("tabindex","-1"),r.setAttribute("hidden","hidden"))}})}function At(){let e=c(be(z()));if(!e)return;let t=e.querySelector("li.current-page");t&&(t.scrollIntoView(),e.scrollTop-=40)}function Pt(){let e=pe()||"content",n=oe()[z()]||[],r=ct(n,e),i=c(be(z()));if(!i)return;let s=i.querySelector(`li.current-page a.expand[href$="#${r}"]`);s&&Be(s.closest("li"));let o=i.querySelector(`li.current-page a[href$="#${e}"]`);if(o){let a=o.closest("ul");a.classList.contains("deflist")&&Rr(a.closest("li")),Qr(o.closest("li"))}}function Dr(){Me.forEach(t=>{let n=c(`#${t}-list-tab-button`);n&&n.addEventListener("click",r=>{ye(t),At()})});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(i=>i.dataset.type),r=e.querySelector('[role="tab"][aria-selected="true"]').dataset.type;if(t.key==="ArrowRight"){let i=n.indexOf(r)+1;i>=n.length&&(i=0);let s=n[i];ye(s),c(`#${s}-list-tab-button`).focus()}else if(t.key==="ArrowLeft"){let i=n.indexOf(r)-1;i<0&&(i=n.length-1);let s=n[i];ye(s),c(`#${s}-list-tab-button`).focus()}}),window.addEventListener("hashchange",t=>{let n=c(be(z()));if(!n)return;let r=n.querySelector("li.current-page li.current-hash");r&&Hr(r),Pt()})}var M={module:"module",moduleChild:"module-child",mixTask:"mix-task",extra:"extra",section:"section"};function Nt(e,t=8){if(Z(e))return[];let n=oe(),r=[...qe(n.modules,e,M.module),...Fr(n.modules,e,M.moduleChild),...qe(n.tasks,e,M.mixTask),...qe(n.extras,e,M.extra),...ze(n.modules,e,M.section),...ze(n.tasks,e,M.section),...ze(n.extras,e,M.section)].filter(i=>i!==null);return jr(r).slice(0,t)}function qe(e,t,n){return e.map(r=>Br(r,t,n))}function Fr(e,t,n){return e.filter(r=>r.nodeGroups).flatMap(r=>r.nodeGroups.flatMap(({key:i,nodes:s})=>{let o=Vr(i);return s.map(a=>qr(a,r.id,t,n,o)||$r(a,r.id,t,n,o))}))}function ze(e,t,n){return e.flatMap(r=>Mr(r).map(i=>zr(r,i,t,n)))}function Mr(e){return(e.sections||[]).concat(e.headers||[])}function Br(e,t,n){return Se(e.title,t)?{link:`${e.id}.html`,title:Le(e.title,t),label:null,description:null,matchQuality:xe(e.title,t),deprecated:e.deprecated,category:n}:null}function qr(e,t,n,r,i){return Se(e.id,n)?{link:`${t}.html#${e.anchor}`,title:Le(e.id,n),label:i,description:t,matchQuality:xe(e.id,n),deprecated:e.deprecated,category:r}:null}function zr(e,t,n,r){return Qt(t.id,n)?{link:`${e.id}.html#${t.anchor}`,title:Le(t.id,n),label:null,description:e.title,matchQuality:xe(t.id,n),category:r}:null}function $r(e,t,n,r,i){let s=`${t}.${e.id}`,o=`${t}:${e.id}`,a,l;if(Se(s,n))a=s,l=/\./g;else if(Se(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:Le(e.id,u),label:i,description:t,matchQuality:xe(a,n),deprecated:e.deprecated,category:r}:null}function Vr(e){switch(e){case"callbacks":return"callback";case"types":return"type";default:return"function"}}function jr(e){return e.slice().sort((t,n)=>t.matchQuality!==n.matchQuality?n.matchQuality-t.matchQuality:Rt(t.category)-Rt(n.category))}function Rt(e){switch(e){case M.module:return 1;case M.moduleChild:return 2;case M.mixTask:return 3;default:return 4}}function Qt(e,t){return Ee(t).some(r=>Ht(e,r))}function Se(e,t){return Ee(t).every(r=>Ht(e,r))}function Ht(e,t){return e.toLowerCase().includes(t.toLowerCase())}function xe(e,t){let n=Ee(t),i=n.map(o=>o.length).reduce((o,a)=>o+a,0)/e.length,s=Ur(e,n[0])?1:0;return i+s}function Ur(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function Ee(e){return e.trim().split(/\s+/)}function Le(e,t){let n=Ee(t).sort((r,i)=>i.length-r.length);return ve(e,n)}function ve(e,t){if(t.length===0)return e;let[n,...r]=t,i=e.match(new RegExp(`(.*)(${at(n)})(.*)`,"i"));if(i){let[,s,o,a]=i;return ve(s,t)+""+he(o)+""+ve(a,t)}else return ve(e,r)}var ee=".autocomplete",Wr=".autocomplete-suggestions",Te=".autocomplete-suggestion",B={autocompleteSuggestions:[],selectedIdx:-1};function Gr(){c(ee).classList.add("shown")}function $e(){c(ee).classList.remove("shown")}function Dt(){return c(ee).classList.contains("shown")}function Ve(e){B.autocompleteSuggestions=Nt(e),B.selectedIdx=-1,Z(e)?$e():(Kr({term:e,suggestions:B.autocompleteSuggestions}),we(0),Gr())}function Kr({term:e,suggestions:t}){let n=Handlebars.templates["autocomplete-suggestions"]({suggestions:t,term:e}),r=c(ee);r.innerHTML=n}function Ft(){return B.selectedIdx===-1?null:B.autocompleteSuggestions[B.selectedIdx]}function we(e){B.selectedIdx=Yr(e);let t=c(`${Te}.selected`),n=c(`${Te}[data-index="${B.selectedIdx}"]`);t&&t.classList.remove("selected"),n?(n.classList.add("selected"),n.scrollIntoView({block:"nearest"})):c(Wr).scrollTop=0}function Yr(e){let t=B.autocompleteSuggestions.length+1;return(B.selectedIdx+e+1+t)%t-1}var ae="form.search-bar input",Jr="form.search-bar .search-close-button";function qt(){Xr()}function zt(e){let t=c(ae);t.value=e}function $t(){c(ae).focus()}function Xr(){let e=c(ae);e.addEventListener("keydown",t=>{let n=ei();t.key==="Escape"?(Ie(),e.blur()):t.key==="Enter"?Zr(t):t.key==="ArrowUp"||n&&t.ctrlKey&&t.key==="p"?(we(-1),t.preventDefault()):(t.key==="ArrowDown"||n&&t.ctrlKey&&t.key==="n")&&(we(1),t.preventDefault())}),e.addEventListener("input",t=>{Ve(t.target.value)}),e.addEventListener("focus",t=>{document.body.classList.add("search-focused"),Ve(t.target.value)}),e.addEventListener("blur",t=>{let n=t.relatedTarget;if(n){if(n.matches(Te))return setTimeout(()=>{Dt()&&e.focus()},1e3),null;n.matches(Jr)&&Ie()}je()}),c(ee).addEventListener("click",t=>{t.shiftKey||t.ctrlKey?e.focus():(Ie(),je())})}function Zr(e){let t=c(ae),n=e.shiftKey||e.ctrlKey,r=Ft();e.preventDefault();let i=n?"_blank":"_self",s=document.createElement("a");s.setAttribute("target",i),r?s.setAttribute("href",r.link):s.setAttribute("href",`search.html?q=${encodeURIComponent(t.value)}`),s.click(),n||(Ie(),je())}function Ie(){let e=c(ae);e.value=""}function je(){document.body.classList.remove("search-focused"),$e()}function ei(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}var Mt=window.scrollY,ke=document.querySelector(".top-search"),_e=document.getElementById("sidebar-menu"),Oe=document.querySelector(".background-layer"),Bt=70;window.addEventListener("scroll",function(){let e=window.scrollY;e>Bt*2&&(ke.classList.add("sm-fixed"),_e.classList.add("sm-fixed"),Oe.classList.add("sm-fixed")),e==0&&(ke.classList.remove("sm-fixed"),_e.classList.remove("sm-fixed"),Oe.classList.remove("sm-fixed")),e>Mt&&e>Bt?(ke.classList.add("sm-hidden"),_e.classList.add("sm-hidden"),Oe.classList.add("sm-hidden")):(ke.classList.remove("sm-hidden"),_e.classList.remove("sm-hidden"),Oe.classList.remove("sm-hidden")),Mt=e<=0?0:e},!1);var Vt=".sidebar-projectVersion",ti=".sidebar-projectVersionsDropdown";function jt(){let e=It();if(e.length>0){let n=c(Vt).textContent.trim(),r=ri(e,n);ni({nodes:r})}}function ni({nodes:e}){let t=c(Vt),n=Handlebars.templates["versions-dropdown"]({nodes:e});t.innerHTML=n,c(ti).addEventListener("change",si)}function ri(e,t){return ii(e,t).map(r=>({...r,isCurrentVersion:r.version===t}))}function ii(e,t){return e.some(r=>r.version===t)?e:[{version:t,url:"#"},...e]}function si(e){let t=e.target.value,n=window.location.pathname.split("/").pop()+window.location.hash,r=`${t}/${n}`;ut(r).then(i=>{i?window.location.href=r:window.location.href=t})}var Q=ot(Gt());var Ce=80,oi="#search";function Yt(){if(window.location.pathname.endsWith("/search.html")){let e=lt("q");ai(e)}}async function ai(e){if(Z(e))Ue({value:e});else{zt(e);let t=await ci();try{let n=e.replaceAll(/(\B|\\):/g,"\\:"),r=bi(t.search(n));Ue({value:e,results:r})}catch(n){Ue({value:e,errorMessage:n.message})}}}function Ue({value:e,results:t,errorMessage:n}){let r=c(oi),i=Handlebars.templates["search-results"]({value:e,results:t,errorMessage:n});r.innerHTML=i}async function ci(){Q.default.tokenizer.separator=/\s+/,Q.default.QueryLexer.termSeparator=/\s+/,Q.default.Pipeline.registerFunction(Xt,"docTokenSplitter"),Q.default.Pipeline.registerFunction(Zt,"docTrimmer");let e=await li();if(e)return e;let t=mi();return ui(t),t}async function li(){try{let e=sessionStorage.getItem(Jt());if(e){let t=await fi(e);return Q.default.Index.load(t)}else return null}catch(e){return console.error("Failed to load index: ",e),null}}async function ui(e){try{let t=await di(e);sessionStorage.setItem(Jt(),t)}catch(t){console.error("Failed to save index: ",t)}}async function di(e){let t=new Blob([JSON.stringify(e)],{type:"application/json"}).stream().pipeThrough(new window.CompressionStream("gzip")),r=await(await new Response(t).blob()).arrayBuffer();return hi(r)}async function fi(e){let t=new Blob([pi(e)],{type:"application/json"}).stream().pipeThrough(new window.DecompressionStream("gzip")),n=await new Response(t).text();return JSON.parse(n)}function hi(e){let t="",n=new Uint8Array(e),r=n.byteLength;for(let i=0;i{this.add(e)})})}function gi(e){e.pipeline.before(Q.default.stemmer,Xt)}function Xt(e){let t=e.toString().split(/\:|\.|\/|_|-/).map(n=>e.clone().update(()=>n));return t.length>1?[...t,e]:t}function yi(e){e.pipeline.before(Q.default.stemmer,Zt)}function Zt(e){return e.update(function(t){return t.replace(/^[^@:\w]+/,"").replace(/[^\?\!\w]+$/,"")})}function bi(e){return e.filter(t=>Kt(t.ref)).map(t=>{let n=Kt(t.ref),r=t.matchData.metadata;return{...n,metadata:r,excerpts:vi(n,r)}})}function Kt(e){return searchData.items.find(t=>t.ref===e)||null}function vi(e,t){let{doc:n}=e,i=Object.keys(t).filter(s=>"doc"in t[s]).map(s=>t[s].doc.position.map(([o,a])=>Si(n,o,a))).reduce((s,o)=>s.concat(o),[]);return i.length===0?[n.slice(0,Ce*2)+(Ce*20?"...":"",e.slice(r,t),""+he(e.slice(t,t+n))+"",e.slice(t+n,i),i{clearTimeout(Ae),e.target.classList.remove("show")})}function We(e){G&&(clearTimeout(Ae),G.innerText=e,G.classList.add("show"),Ae=setTimeout(()=>{G.classList.remove("show"),Ae=setTimeout(function(){G.innerText=""},1e3)},5e3))}var tn="dark",Ge=["system","dark","light"];function nn(){O.getAndSubscribe(e=>{document.body.classList.toggle(tn,sn(e))}),Ei()}function rn(){let t=O.get().theme||"system",n=Ge[Ge.indexOf(t)+1]||Ge[0];O.update({theme:n}),We(`Set theme to "${n}"`)}function sn(e){return e.theme==="dark"||xi()&&(e.theme==null||e.theme==="system")}function xi(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function Ei(){window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let t=O.get(),n=sn(t);(t.theme==null||t.theme==="system")&&(document.body.classList.toggle(tn,n),We(`Browser changed theme to "${n?"dark":"light"}"`))})}var Li="hll";function an(){Ti()}function Ti(){k("[data-group-id]").forEach(t=>{let n=t.getAttribute("data-group-id");t.addEventListener("mouseenter",r=>{on(n,!0)}),t.addEventListener("mouseleave",r=>{on(n,!1)})})}function on(e,t){k(`[data-group-id="${e}"]`).forEach(r=>{r.classList.toggle(Li,t)})}var te="#modal",wi="#modal .modal-close",ki="#modal .modal-title",_i="#modal .modal-body",cn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',q={prevFocus:null,lastFocus:null,ignoreFocusChanges:!1};function ln(){Oi()}function Oi(){let e=Handlebars.templates["modal-layout"]();document.body.insertAdjacentHTML("beforeend",e),c(te).addEventListener("keydown",t=>{t.key==="Escape"&&ce()}),c(wi).addEventListener("click",t=>{ce()})}function un(e){if(q.ignoreFocusChanges)return;let t=c(te);if(t.contains(e.target))q.lastFocus=e.target;else{q.ignoreFocusChanges=!0;let n=Ii(t);q.lastFocus===n?Ci(t).focus():n.focus(),q.ignoreFocusChanges=!1,q.lastFocus=document.activeElement}}function Ii(e){return e.querySelector(cn)}function Ci(e){let t=e.querySelectorAll(cn);return t[t.length-1]}function Pe({title:e,body:t}){q.prevFocus=document.activeElement,document.addEventListener("focus",un,!0),c(ki).innerHTML=e,c(_i).innerHTML=t,c(te).classList.add("shown"),c(te).focus()}function ce(){c(te).classList.remove("shown"),document.addEventListener("focus",un,!0),q.prevFocus&&q.prevFocus.focus(),q.prevFocus=null}function dn(){return c(te).classList.contains("shown")}var Ai="https://hexdocs.pm/%%",Pi="https://hex.pm/api/packages?search=name:%%*",Ri=".display-quick-switch",Ke="#quick-switch-input",hn="#quick-switch-results",Ni=".quick-switch-result",Qi=300,Hi=9,Di=["elixir","eex","ex_unit","hex","iex","logger","mix"].map(e=>({name:e})),pn=2,A={autocompleteResults:[],selectedIdx:null};function mn(){Fi()}function Fi(){k(Ri).forEach(e=>{e.addEventListener("click",t=>{Je()})})}function Mi(e){if(e.key==="Enter"){let t=e.target.value;qi(t),e.preventDefault()}else e.key==="ArrowUp"?(fn(-1),e.preventDefault()):e.key==="ArrowDown"&&(fn(1),e.preventDefault())}function Bi(e){let t=e.target.value;if(t.lengthn.json()).then(n=>{Array.isArray(n)&&(A.autocompleteResults=ji(e,n),A.selectedIdx=null,c(Ke).value.length>=pn&&Vi({results:A.autocompleteResults}))})}function Vi({results:e}){let t=c(hn),n=Handlebars.templates["quick-switch-results"]({results:e});t.innerHTML=n,k(Ni).forEach(r=>{r.addEventListener("click",i=>{let s=r.getAttribute("data-index"),o=A.autocompleteResults[s];Ye(o.name)})})}function ji(e,t){return Di.concat(t).filter(n=>n.name.toLowerCase().includes(e.toLowerCase())).filter(n=>n.releases===void 0||n.releases[0].has_docs===!0).slice(0,Hi)}function fn(e){A.selectedIdx=Ui(e);let t=c(".quick-switch-result.selected"),n=c(`.quick-switch-result[data-index="${A.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function Ui(e){let t=A.autocompleteResults.length;if(A.selectedIdx===null){if(e>=0)return 0;if(e<0)return t-1}return(A.selectedIdx+e+t)%t}var Wi=".display-settings",Gi="#settings-modal-content",Xe="#modal-settings-tab",Ze="#modal-keyboard-shortcuts-tab",yn="#settings-content",bn="#keyboard-shortcuts-content",Ki=[{title:"Settings",id:"modal-settings-tab"},{title:"Keyboard shortcuts",id:"modal-keyboard-shortcuts-tab"}];function vn(){Yi()}function Yi(){k(Wi).forEach(e=>{e.addEventListener("click",t=>{et()})})}function gn(){c(Ze).classList.remove("active"),c(Xe).classList.add("active"),c(yn).classList.remove("hidden"),c(bn).classList.add("hidden")}function Ji(){c(Ze).classList.add("active"),c(Xe).classList.remove("active"),c(bn).classList.remove("hidden"),c(yn).classList.add("hidden")}function et(){Pe({title:Ki.map(({id:s,title:o})=>``).join(""),body:Handlebars.templates["settings-modal-body"]({shortcuts:tt})});let e=c(Gi),t=e.querySelector('[name="theme"]'),n=e.querySelector('[name="tooltips"]'),r=e.querySelector('[name="direct_livebook_url"]'),i=e.querySelector('[name="livebook_url"]');O.getAndSubscribe(s=>{t.value=s.theme||"system",n.checked=s.tooltips,s.livebookUrl===null?(r.checked=!1,i.classList.add("hidden"),i.tabIndex=-1):(r.checked=!0,i.classList.remove("hidden"),i.tabIndex=0,i.value=s.livebookUrl)}),t.addEventListener("change",s=>{O.update({theme:s.target.value})}),n.addEventListener("change",s=>{O.update({tooltips:s.target.checked})}),r.addEventListener("change",s=>{let o=s.target.checked?i.value:null;O.update({livebookUrl:o})}),i.addEventListener("input",s=>{O.update({livebookUrl:s.target.value})}),c(Xe).addEventListener("click",s=>{gn()}),c(Ze).addEventListener("click",s=>{Ji()}),gn()}var Xi="#settings-modal-content",tt=[{key:"c",description:"Toggle sidebar",action:He},{key:"n",description:"Cycle themes",action:rn},{key:"s",description:"Focus search bar",displayAs:"/ or s",action:Sn},{key:"/",action:Sn},{key:"g",description:"Search HexDocs package",displayAs:"g",action:Je},{key:"?",displayAs:"?",description:"Bring up this modal",action:ns}],nt={shortcutBeingPressed:null};function xn(){Zi()}function Zi(){document.addEventListener("keydown",es),document.addEventListener("keyup",ts)}function es(e){if(nt.shortcutBeingPressed||e.target.matches("input, textarea")||e.ctrlKey||e.metaKey||e.altKey)return;let t=tt.find(n=>n.key===e.key);t&&(nt.shortcutBeingPressed=t,e.preventDefault(),t.action(e))}function ts(e){nt.shortcutBeingPressed=null}function Sn(e){ce(),$t()}function ns(){rs()?ce():et()}function rs(){return dn()&&c(Xi)}var K={plain:"plain",function:"function",module:"module"},is=[{href:"typespecs.html#basic-types",hint:{kind:K.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:K.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:K.plain,description:"Built-in type"}}],Re={cancelHintFetching:null};function En(e){if(Tn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function Ln(e){let t=Tn(e);return t?Promise.resolve(t):ss(e)}function Tn(e){let t=is.find(n=>e.includes(n.href));return t?t.hint:null}function ss(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,r)=>{let i=document.createElement("iframe");i.setAttribute("sandbox","allow-scripts allow-same-origin"),i.setAttribute("src",t),i.style.display="none";function s(a){let{href:l,hint:u}=a.data;t===l&&(o(),n(u))}Re.cancelHintFetching=()=>{o(),r(new Error("cancelled"))};function o(){i.remove(),window.removeEventListener("message",s),Re.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(i)})}function wn(){Re.cancelHintFetching&&Re.cancelHintFetching()}function kn(e){let n=e.querySelector("h1").textContent,r=e.querySelector(".docstring > p"),i=r?r.innerHTML:"";return{kind:K.function,title:n.trim(),description:i.trim()}}function _n(e){let n=e.querySelector("h1 > span").textContent,r=e.querySelector("#moduledoc p"),i=r?r.innerHTML:"";return{kind:K.module,title:n.trim(),description:i.trim()}}var os=".content a",rt="#tooltip",as="#tooltip .tooltip-body",In="body .content-inner",cs="#content",Cn="tooltip-shown",le=10,ls=le*4,On={height:450,width:768},us=100,ne={currentLinkElement:null,hoverDelayTimeout:null};function An(){ds(),fs()}function ds(){let e=Handlebars.templates["tooltip-layout"]();c(In).insertAdjacentHTML("beforeend",e)}function fs(){k(os).forEach(e=>{hs(e)&&(e.addEventListener("mouseenter",t=>{ms(e)}),e.addEventListener("mouseleave",t=>{vs(e)}))})}function hs(e){return!(e.classList.contains("detail-link")||ps(e.href)||!En(e.href))}function ps(e){let t=e.replace(cs,"");return window.location.href.split("#")[0]===t}function ms(e){gs()&&(ne.currentLinkElement=e,ne.hoverDelayTimeout=setTimeout(()=>{Ln(e.href).then(t=>{ys(t),bs()}).catch(()=>{})},us))}function gs(){let e=window.innerWidthe.firstElementChild&&e.firstElementChild.tagName==="CODE").forEach(e=>e.insertAdjacentHTML("beforeend",Is)),Array.from(k(".copy-button")).forEach(e=>{let t;e.addEventListener("click",()=>{let n=e.querySelector("[aria-live]");t&&clearTimeout(t);let r=Array.from(e.parentElement.querySelector("code").childNodes).filter(i=>!(i.tagName==="SPAN"&&i.classList.contains("unselectable"))).map(i=>i.textContent).join("");navigator.clipboard.writeText(r),e.classList.add("clicked"),n.innerHTML="Copied! ✓",t=setTimeout(()=>{e.classList.remove("clicked"),n.innerHTML=""},3e3)})})}function Hn(){let t=/(Macintosh|iPhone|iPad|iPod)/.test(window.navigator.userAgent)?"apple-os":"non-apple-os";document.documentElement.classList.add(t)}var As="content",Ps="tabs-open",Rs="tabs-close",Ns="H3",Qs="tabset";function Fn(){Hs().map(Ds).forEach(n=>Bs(n))}function Hs(){let e=document.createNodeIterator(document.getElementById(As),NodeFilter.SHOW_COMMENT,{acceptNode(r){return r.nodeValue.trim()===Ps?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),t=[],n;for(;n=e.nextNode();)t.push(n);return t}function Ds(e,t,n){let r=[],i=[],s={label:"",content:[]};for(;e=e.nextSibling;){if(Fs(e)){Dn(s,i,t);break}r.push(e),e.nodeName===Ns?(Dn(s,i,t),s.label=e.innerText,s.content=[]):s.content.push(e.outerHTML)}let o=document.createElement("div");return o.className=Qs,Ms(r,o),o.innerHTML=Handlebars.templates.tabset({tabs:i}),o}function Fs(e){return e.nodeName==="#comment"&&e.nodeValue.trim()===Rs}function Dn(e,t,n){if(e.label===""&&!e.content.length)return!1;let r=e.label,i=e.content;t.push({label:r,content:i,setIndex:n})}function Ms(e,t){if(!e||!e.length)return!1;e[0].parentNode.insertBefore(t,e[0]),e.forEach(n=>t.appendChild(n))}function Bs(e){let t={tabs:e.querySelectorAll(':scope [role="tab"]'),panels:e.querySelectorAll(':scope [role="tabpanel"]'),activeIndex:0};t.tabs.forEach((n,r)=>{n.addEventListener("click",i=>{Y(r,t)}),n.addEventListener("keydown",i=>{let s=t.tabs.length-1;i.code==="ArrowLeft"?(i.preventDefault(),t.activeIndex===0?Y(s,t):Y(t.activeIndex-1,t)):i.code==="ArrowRight"?(i.preventDefault(),t.activeIndex===s?Y(0,t):Y(t.activeIndex+1,t)):i.code==="Home"?(i.preventDefault(),Y(0,t)):i.code==="End"&&(i.preventDefault(),Y(s,t))})})}function Y(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}dt(()=>{nn(),Tt(),Ct(),qt(),jt(),mt(),an(),ln(),xn(),mn(),en(),An(),Nn(),Yt(),Qn(),vn(),Hn(),Fn()});})(); +`,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(r){var i=e.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),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 r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,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,r=0;r1&&(ot&&(r=s),o!=t);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==t||o>t)return s*2;if(ol?f+=2:a==l&&(n+=r[u+1]*i[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,r=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),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var 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),i.push({node:g,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return r},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,r=n,i=0,s=t.length;i=t;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};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 r=new e.QueryParser(t,n);r.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var r=t[this._ref],i=Object.keys(this._fields);this._documents[r]=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 r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new e.QueryParseError(r,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 r="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(r,n.start,n.end)}var i=t.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(i.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var r=t.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.fields=[n.str];var s=t.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new e.QueryParseError(i,n.start,n.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new e.QueryParseError(i,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 r=t.peekLexeme();if(r==null){t.nextClause();return}switch(r.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 i="Unexpected lexeme type '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.editDistance=r;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 i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.boost=r;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 i="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(i,s.start,s.end)}}},function(t,n){typeof define=="function"&&define.amd?define(n):typeof Ut=="object"?Wt.exports=n():t.lunr=n()}(this,function(){return e})})()});Handlebars.registerHelper("groupChanged",function(e,t,n){let r=t||"";if(e.group!==r)return delete e.nestedContext,e.group=r,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 e+".html"===n?t.fn(this):t.inverse(this)});var c=document.querySelector.bind(document),k=document.querySelectorAll.bind(document);function at(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function he(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function z(){return document.body.dataset.type}function ct(e,t){if(e){for(let n of e){let r=n.nodeGroups&&n.nodeGroups.find(i=>i.nodes.some(s=>s.anchor===t));if(r)return r.key}return null}}function pe(){return window.location.hash.replace(/^#/,"")}function lt(e){return new URLSearchParams(window.location.search).get(e)}function ut(e){return fetch(e).then(t=>t.ok).catch(()=>!1)}function dt(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}function Z(e){return!e||e.trim()===""}function ft(e,t){let n;return function(...i){clearTimeout(n),n=setTimeout(()=>{n=null,e(...i)},t)}}function me(){return document.head.querySelector("meta[name=project][content]").content}var ht="ex_doc:settings",Kn={tooltips:!0,theme:null,livebookUrl:null},Ne=class{constructor(){this._subscribers=[],this._settings=Kn,this._loadSettings()}get(){return this._settings}update(t){let n=this._settings;this._settings={...this._settings,...t},this._subscribers.forEach(r=>r(this._settings,n)),this._storeSettings()}getAndSubscribe(t){this._subscribers.push(t),t(this._settings)}_loadSettings(){try{let t=localStorage.getItem(ht);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(ht,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 Ne;var Yn=".content",pt=".content-inner",Jn=".livebook-badge";function mt(){Xn(),er(),tr(),Zn()}function Xn(){c(Yn).querySelectorAll("a").forEach(e=>{e.querySelector("code, img")&&e.classList.add("no-underline")})}function Zn(){["warning","info","error","neutral","tip"].forEach(t=>{k(`blockquote h3.${t}, blockquote h4.${t}`).forEach(n=>{n.closest("blockquote").classList.add(t)})})}function er(){c(pt).setAttribute("tabindex",-1),c(pt).focus()}function tr(){let t=window.location.pathname.replace(/(\.html)?$/,".livemd"),n=new URL(t,window.location.href).toString();O.getAndSubscribe(r=>{let i=r.livebookUrl?rr(r.livebookUrl,n):nr(n);for(let s of k(Jn))s.href=i})}function nr(e){return`https://livebook.dev/run?url=${encodeURIComponent(e)}`}function rr(e,t){return`${e}/import?url=${encodeURIComponent(t)}`}document.addEventListener("click",function(e){if(window.innerWidth<=768){let t=e.target.closest('a[href^="#"]');if(t){e.preventDefault();let n=t.getAttribute("href").substring(1),r=document.getElementById(n);if(r){let s=r.getBoundingClientRect().top+window.scrollY-45;window.scrollTo({top:s,behavior:"smooth"})}}}});var Et=ot(St());var xr=768,Lt=300,se=".sidebar-toggle",Er=".content",F={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"},Lr=Object.values(N),C={togglingTimeout:null,lastWindowWidth:window.innerWidth,sidebarPreference:F.NO_PREF};function Tt(){wt(),Tr(),wr()}function Tr(){let e=sessionStorage.getItem("sidebar_width");e&&xt(e),new ResizeObserver(n=>{for(let r of n)xt(r.contentRect.width)}).observe(document.getElementById("sidebar"))}function xt(e){sessionStorage.setItem("sidebar_width",e),document.body.style.setProperty("--sidebarWidth",`${e}px`)}function wt(){sessionStorage.getItem("sidebar_state")==="closed"||kt()?($(N.closed),c(se).setAttribute("aria-expanded","false")):($(N.opened),c(se).setAttribute("aria-expanded","true"))}function kt(){return window.matchMedia(`screen and (max-width: ${xr}px)`).matches}function $(...e){document.body.classList.remove(...Lr),document.body.classList.add(...e)}function wr(){c(se).addEventListener("click",e=>{He(),Ir()}),c(Er).addEventListener("click",e=>{Or()}),window.addEventListener("resize",(0,Et.default)(e=>{_r()},100))}function He(){return De()?_t():kr()}function De(){return document.body.classList.contains(N.opened)||document.body.classList.contains(N.opening)}function kr(){Ot(),sessionStorage.setItem("sidebar_state","opened"),c(se).setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{$(N.openingStart),requestAnimationFrame(()=>($(N.opening),new Promise((e,t)=>{C.togglingTimeout=setTimeout(()=>{$(N.opened),e()},Lt)})))})}function _t(){Ot(),sessionStorage.setItem("sidebar_state","closed"),c(se).setAttribute("aria-expanded","false"),requestAnimationFrame(()=>{$(N.closingStart),requestAnimationFrame(()=>($(N.closing),new Promise((e,t)=>{C.togglingTimeout=setTimeout(()=>{$(N.closed),e()},Lt)})))})}function Ot(){C.togglingTimeout&&(clearTimeout(C.togglingTimeout),C.togglingTimeout=null)}function _r(){C.lastWindowWidth!==window.innerWidth&&(C.lastWindowWidth=window.innerWidth,(C.sidebarPreference===F.OPEN||C.sidebarPreference===F.NO_PREF)&&wt())}function Or(){kt()&&De()&&_t()}function Ir(){switch(C.sidebarPreference){case F.OPEN:C.sidebarPreference=F.CLOSED;break;case F.CLOSED:C.sidebarPreference=F.OPEN;break;case F.NO_PREF:De()?C.sidebarPreference=F.OPEN:C.sidebarPreference=F.CLOSED}}function oe(){return window.sidebarNodes||{}}function It(){return window.versionNodes||[]}var Fe={search:"search",extras:"extras",modules:"modules",tasks:"tasks"},Me=[Fe.extras,Fe.modules,Fe.tasks],be=e=>`#${e}-full-list`;function Ct(){Me.forEach(e=>{Cr(oe(),e)}),ye(z()),Pt(),At(),Dr()}function Cr(e,t){let n=e[t]||[],r=c(be(t));if(!r)return;let i=Handlebars.templates["sidebar-items"]({nodes:n,group:""});r.innerHTML=i,r.querySelectorAll("ul").forEach(s=>{if(s.innerHTML.trim()===""){let o=s.previousElementSibling;o.classList.contains("expand")&&o.classList.remove("expand"),s.remove()}}),r.querySelectorAll("li a + button").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li");Pr(l)})}),r.querySelectorAll("li a").forEach(s=>{s.addEventListener("click",o=>{let l=o.target.closest("li"),u=r.querySelector(".current-section");u&&Nr(u),s.matches(".expand")&&s.pathname===window.location.pathname&&Be(l)})})}function Be(e){e.classList.add("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","true")}function Ar(e){e.classList.remove("open"),e.querySelector("button[aria-controls]").setAttribute("aria-expanded","false")}function Pr(e){e.classList.contains("open")?Ar(e):Be(e)}function Rr(e){e.classList.add("current-section"),e.querySelector("a").setAttribute("aria-current","true")}function Nr(e){e.classList.remove("current-section"),e.querySelector("a").setAttribute("aria-current","false")}function Qr(e){e.classList.add("current-hash"),e.querySelector("a").setAttribute("aria-current","true")}function Hr(e){e.classList.remove("current-hash"),e.querySelector("a").setAttribute("aria-current","false")}function ye(e){Me.forEach(t=>{let n=c(`#${t}-list-tab-button`);if(n){let r=c(`#${n.getAttribute("aria-controls")}`);t===e?(n.parentElement.classList.add("selected"),n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),r.removeAttribute("hidden")):(n.parentElement.classList.remove("selected"),n.setAttribute("aria-selected","false"),n.setAttribute("tabindex","-1"),r.setAttribute("hidden","hidden"))}})}function At(){let e=c(be(z()));if(!e)return;let t=e.querySelector("li.current-page");t&&(t.scrollIntoView(),e.scrollTop-=40)}function Pt(){let e=pe()||"content",n=oe()[z()]||[],r=ct(n,e),i=c(be(z()));if(!i)return;let s=i.querySelector(`li.current-page a.expand[href$="#${r}"]`);s&&Be(s.closest("li"));let o=i.querySelector(`li.current-page a[href$="#${e}"]`);if(o){let a=o.closest("ul");a.classList.contains("deflist")&&Rr(a.closest("li")),Qr(o.closest("li"))}}function Dr(){Me.forEach(t=>{let n=c(`#${t}-list-tab-button`);n&&n.addEventListener("click",r=>{ye(t),At()})});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(i=>i.dataset.type),r=e.querySelector('[role="tab"][aria-selected="true"]').dataset.type;if(t.key==="ArrowRight"){let i=n.indexOf(r)+1;i>=n.length&&(i=0);let s=n[i];ye(s),c(`#${s}-list-tab-button`).focus()}else if(t.key==="ArrowLeft"){let i=n.indexOf(r)-1;i<0&&(i=n.length-1);let s=n[i];ye(s),c(`#${s}-list-tab-button`).focus()}}),window.addEventListener("hashchange",t=>{let n=c(be(z()));if(!n)return;let r=n.querySelector("li.current-page li.current-hash");r&&Hr(r),Pt()})}var M={module:"module",moduleChild:"module-child",mixTask:"mix-task",extra:"extra",section:"section"};function Nt(e,t=8){if(Z(e))return[];let n=oe(),r=[...qe(n.modules,e,M.module),...Fr(n.modules,e,M.moduleChild),...qe(n.tasks,e,M.mixTask),...qe(n.extras,e,M.extra),...ze(n.modules,e,M.section),...ze(n.tasks,e,M.section),...ze(n.extras,e,M.section)].filter(i=>i!==null);return jr(r).slice(0,t)}function qe(e,t,n){return e.map(r=>Br(r,t,n))}function Fr(e,t,n){return e.filter(r=>r.nodeGroups).flatMap(r=>r.nodeGroups.flatMap(({key:i,nodes:s})=>{let o=Vr(i);return s.map(a=>qr(a,r.id,t,n,o)||$r(a,r.id,t,n,o))}))}function ze(e,t,n){return e.flatMap(r=>Mr(r).map(i=>zr(r,i,t,n)))}function Mr(e){return(e.sections||[]).concat(e.headers||[])}function Br(e,t,n){return Se(e.title,t)?{link:`${e.id}.html`,title:Le(e.title,t),label:null,description:null,matchQuality:xe(e.title,t),deprecated:e.deprecated,category:n}:null}function qr(e,t,n,r,i){return Se(e.id,n)?{link:`${t}.html#${e.anchor}`,title:Le(e.id,n),label:i,description:t,matchQuality:xe(e.id,n),deprecated:e.deprecated,category:r}:null}function zr(e,t,n,r){return Qt(t.id,n)?{link:`${e.id}.html#${t.anchor}`,title:Le(t.id,n),label:null,description:e.title,matchQuality:xe(t.id,n),category:r}:null}function $r(e,t,n,r,i){let s=`${t}.${e.id}`,o=`${t}:${e.id}`,a,l;if(Se(s,n))a=s,l=/\./g;else if(Se(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:Le(e.id,u),label:i,description:t,matchQuality:xe(a,n),deprecated:e.deprecated,category:r}:null}function Vr(e){switch(e){case"callbacks":return"callback";case"types":return"type";default:return"function"}}function jr(e){return e.slice().sort((t,n)=>t.matchQuality!==n.matchQuality?n.matchQuality-t.matchQuality:Rt(t.category)-Rt(n.category))}function Rt(e){switch(e){case M.module:return 1;case M.moduleChild:return 2;case M.mixTask:return 3;default:return 4}}function Qt(e,t){return Ee(t).some(r=>Ht(e,r))}function Se(e,t){return Ee(t).every(r=>Ht(e,r))}function Ht(e,t){return e.toLowerCase().includes(t.toLowerCase())}function xe(e,t){let n=Ee(t),i=n.map(o=>o.length).reduce((o,a)=>o+a,0)/e.length,s=Ur(e,n[0])?1:0;return i+s}function Ur(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function Ee(e){return e.trim().split(/\s+/)}function Le(e,t){let n=Ee(t).sort((r,i)=>i.length-r.length);return ve(e,n)}function ve(e,t){if(t.length===0)return e;let[n,...r]=t,i=e.match(new RegExp(`(.*)(${at(n)})(.*)`,"i"));if(i){let[,s,o,a]=i;return ve(s,t)+""+he(o)+""+ve(a,t)}else return ve(e,r)}var ee=".autocomplete",Wr=".autocomplete-suggestions",Te=".autocomplete-suggestion",B={autocompleteSuggestions:[],selectedIdx:-1};function Gr(){c(ee).classList.add("shown")}function $e(){c(ee).classList.remove("shown")}function Dt(){return c(ee).classList.contains("shown")}function Ve(e){B.autocompleteSuggestions=Nt(e),B.selectedIdx=-1,Z(e)?$e():(Kr({term:e,suggestions:B.autocompleteSuggestions}),we(0),Gr())}function Kr({term:e,suggestions:t}){let n=Handlebars.templates["autocomplete-suggestions"]({suggestions:t,term:e}),r=c(ee);r.innerHTML=n}function Ft(){return B.selectedIdx===-1?null:B.autocompleteSuggestions[B.selectedIdx]}function we(e){B.selectedIdx=Yr(e);let t=c(`${Te}.selected`),n=c(`${Te}[data-index="${B.selectedIdx}"]`);t&&t.classList.remove("selected"),n?(n.classList.add("selected"),n.scrollIntoView({block:"nearest"})):c(Wr).scrollTop=0}function Yr(e){let t=B.autocompleteSuggestions.length+1;return(B.selectedIdx+e+1+t)%t-1}var ae="form.search-bar input",Jr="form.search-bar .search-close-button";function qt(){Xr()}function zt(e){let t=c(ae);t.value=e}function $t(){c(ae).focus()}function Xr(){let e=c(ae);e.addEventListener("keydown",t=>{let n=ei();t.key==="Escape"?(Ie(),e.blur()):t.key==="Enter"?Zr(t):t.key==="ArrowUp"||n&&t.ctrlKey&&t.key==="p"?(we(-1),t.preventDefault()):(t.key==="ArrowDown"||n&&t.ctrlKey&&t.key==="n")&&(we(1),t.preventDefault())}),e.addEventListener("input",t=>{Ve(t.target.value)}),e.addEventListener("focus",t=>{document.body.classList.add("search-focused"),Ve(t.target.value)}),e.addEventListener("blur",t=>{let n=t.relatedTarget;if(n){if(n.matches(Te))return setTimeout(()=>{Dt()&&e.focus()},1e3),null;n.matches(Jr)&&Ie()}je()}),c(ee).addEventListener("click",t=>{t.shiftKey||t.ctrlKey?e.focus():(Ie(),je())})}function Zr(e){let t=c(ae),n=e.shiftKey||e.ctrlKey,r=Ft();e.preventDefault();let i=n?"_blank":"_self",s=document.createElement("a");s.setAttribute("target",i),r?s.setAttribute("href",r.link):s.setAttribute("href",`search.html?q=${encodeURIComponent(t.value)}`),s.click(),n||(Ie(),je())}function Ie(){let e=c(ae);e.value=""}function je(){document.body.classList.remove("search-focused"),$e()}function ei(){return/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}var Mt=window.scrollY,ke=document.querySelector(".top-search"),_e=document.getElementById("sidebar-menu"),Oe=document.querySelector(".background-layer"),Bt=70;window.addEventListener("scroll",function(){let e=window.scrollY;e>Bt*2&&(ke.classList.add("sm-fixed"),_e.classList.add("sm-fixed"),Oe.classList.add("sm-fixed")),e===0&&(ke.classList.remove("sm-fixed"),_e.classList.remove("sm-fixed"),Oe.classList.remove("sm-fixed")),e>Mt&&e>Bt?(ke.classList.add("sm-hidden"),_e.classList.add("sm-hidden"),Oe.classList.add("sm-hidden")):(ke.classList.remove("sm-hidden"),_e.classList.remove("sm-hidden"),Oe.classList.remove("sm-hidden")),Mt=e<=0?0:e},!1);var Vt=".sidebar-projectVersion",ti=".sidebar-projectVersionsDropdown";function jt(){let e=It();if(e.length>0){let n=c(Vt).textContent.trim(),r=ri(e,n);ni({nodes:r})}}function ni({nodes:e}){let t=c(Vt),n=Handlebars.templates["versions-dropdown"]({nodes:e});t.innerHTML=n,c(ti).addEventListener("change",si)}function ri(e,t){return ii(e,t).map(r=>({...r,isCurrentVersion:r.version===t}))}function ii(e,t){return e.some(r=>r.version===t)?e:[{version:t,url:"#"},...e]}function si(e){let t=e.target.value,n=window.location.pathname.split("/").pop()+window.location.hash,r=`${t}/${n}`;ut(r).then(i=>{i?window.location.href=r:window.location.href=t})}var Q=ot(Gt());var Ce=80,oi="#search";function Yt(){if(window.location.pathname.endsWith("/search.html")){let e=lt("q");ai(e)}}async function ai(e){if(Z(e))Ue({value:e});else{zt(e);let t=await ci();try{let n=e.replaceAll(/(\B|\\):/g,"\\:"),r=bi(t.search(n));Ue({value:e,results:r})}catch(n){Ue({value:e,errorMessage:n.message})}}}function Ue({value:e,results:t,errorMessage:n}){let r=c(oi),i=Handlebars.templates["search-results"]({value:e,results:t,errorMessage:n});r.innerHTML=i}async function ci(){Q.default.tokenizer.separator=/\s+/,Q.default.QueryLexer.termSeparator=/\s+/,Q.default.Pipeline.registerFunction(Xt,"docTokenSplitter"),Q.default.Pipeline.registerFunction(Zt,"docTrimmer");let e=await li();if(e)return e;let t=mi();return ui(t),t}async function li(){try{let e=sessionStorage.getItem(Jt());if(e){let t=await fi(e);return Q.default.Index.load(t)}else return null}catch(e){return console.error("Failed to load index: ",e),null}}async function ui(e){try{let t=await di(e);sessionStorage.setItem(Jt(),t)}catch(t){console.error("Failed to save index: ",t)}}async function di(e){let t=new Blob([JSON.stringify(e)],{type:"application/json"}).stream().pipeThrough(new window.CompressionStream("gzip")),r=await(await new Response(t).blob()).arrayBuffer();return hi(r)}async function fi(e){let t=new Blob([pi(e)],{type:"application/json"}).stream().pipeThrough(new window.DecompressionStream("gzip")),n=await new Response(t).text();return JSON.parse(n)}function hi(e){let t="",n=new Uint8Array(e),r=n.byteLength;for(let i=0;i{this.add(e)})})}function gi(e){e.pipeline.before(Q.default.stemmer,Xt)}function Xt(e){let t=e.toString().split(/\:|\.|\/|_|-/).map(n=>e.clone().update(()=>n));return t.length>1?[...t,e]:t}function yi(e){e.pipeline.before(Q.default.stemmer,Zt)}function Zt(e){return e.update(function(t){return t.replace(/^[^@:\w]+/,"").replace(/[^\?\!\w]+$/,"")})}function bi(e){return e.filter(t=>Kt(t.ref)).map(t=>{let n=Kt(t.ref),r=t.matchData.metadata;return{...n,metadata:r,excerpts:vi(n,r)}})}function Kt(e){return searchData.items.find(t=>t.ref===e)||null}function vi(e,t){let{doc:n}=e,i=Object.keys(t).filter(s=>"doc"in t[s]).map(s=>t[s].doc.position.map(([o,a])=>Si(n,o,a))).reduce((s,o)=>s.concat(o),[]);return i.length===0?[n.slice(0,Ce*2)+(Ce*20?"...":"",e.slice(r,t),""+he(e.slice(t,t+n))+"",e.slice(t+n,i),i{clearTimeout(Ae),e.target.classList.remove("show")})}function We(e){G&&(clearTimeout(Ae),G.innerText=e,G.classList.add("show"),Ae=setTimeout(()=>{G.classList.remove("show"),Ae=setTimeout(function(){G.innerText=""},1e3)},5e3))}var tn="dark",Ge=["system","dark","light"];function nn(){O.getAndSubscribe(e=>{document.body.classList.toggle(tn,sn(e))}),Ei()}function rn(){let t=O.get().theme||"system",n=Ge[Ge.indexOf(t)+1]||Ge[0];O.update({theme:n}),We(`Set theme to "${n}"`)}function sn(e){return e.theme==="dark"||xi()&&(e.theme==null||e.theme==="system")}function xi(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function Ei(){window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>{let t=O.get(),n=sn(t);(t.theme==null||t.theme==="system")&&(document.body.classList.toggle(tn,n),We(`Browser changed theme to "${n?"dark":"light"}"`))})}var Li="hll";function an(){Ti()}function Ti(){k("[data-group-id]").forEach(t=>{let n=t.getAttribute("data-group-id");t.addEventListener("mouseenter",r=>{on(n,!0)}),t.addEventListener("mouseleave",r=>{on(n,!1)})})}function on(e,t){k(`[data-group-id="${e}"]`).forEach(r=>{r.classList.toggle(Li,t)})}var te="#modal",wi="#modal .modal-close",ki="#modal .modal-title",_i="#modal .modal-body",cn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',q={prevFocus:null,lastFocus:null,ignoreFocusChanges:!1};function ln(){Oi()}function Oi(){let e=Handlebars.templates["modal-layout"]();document.body.insertAdjacentHTML("beforeend",e),c(te).addEventListener("keydown",t=>{t.key==="Escape"&&ce()}),c(wi).addEventListener("click",t=>{ce()})}function un(e){if(q.ignoreFocusChanges)return;let t=c(te);if(t.contains(e.target))q.lastFocus=e.target;else{q.ignoreFocusChanges=!0;let n=Ii(t);q.lastFocus===n?Ci(t).focus():n.focus(),q.ignoreFocusChanges=!1,q.lastFocus=document.activeElement}}function Ii(e){return e.querySelector(cn)}function Ci(e){let t=e.querySelectorAll(cn);return t[t.length-1]}function Pe({title:e,body:t}){q.prevFocus=document.activeElement,document.addEventListener("focus",un,!0),c(ki).innerHTML=e,c(_i).innerHTML=t,c(te).classList.add("shown"),c(te).focus()}function ce(){c(te).classList.remove("shown"),document.addEventListener("focus",un,!0),q.prevFocus&&q.prevFocus.focus(),q.prevFocus=null}function dn(){return c(te).classList.contains("shown")}var Ai="https://hexdocs.pm/%%",Pi="https://hex.pm/api/packages?search=name:%%*",Ri=".display-quick-switch",Ke="#quick-switch-input",hn="#quick-switch-results",Ni=".quick-switch-result",Qi=300,Hi=9,Di=["elixir","eex","ex_unit","hex","iex","logger","mix"].map(e=>({name:e})),pn=2,A={autocompleteResults:[],selectedIdx:null};function mn(){Fi()}function Fi(){k(Ri).forEach(e=>{e.addEventListener("click",t=>{Je()})})}function Mi(e){if(e.key==="Enter"){let t=e.target.value;qi(t),e.preventDefault()}else e.key==="ArrowUp"?(fn(-1),e.preventDefault()):e.key==="ArrowDown"&&(fn(1),e.preventDefault())}function Bi(e){let t=e.target.value;if(t.lengthn.json()).then(n=>{Array.isArray(n)&&(A.autocompleteResults=ji(e,n),A.selectedIdx=null,c(Ke).value.length>=pn&&Vi({results:A.autocompleteResults}))})}function Vi({results:e}){let t=c(hn),n=Handlebars.templates["quick-switch-results"]({results:e});t.innerHTML=n,k(Ni).forEach(r=>{r.addEventListener("click",i=>{let s=r.getAttribute("data-index"),o=A.autocompleteResults[s];Ye(o.name)})})}function ji(e,t){return Di.concat(t).filter(n=>n.name.toLowerCase().includes(e.toLowerCase())).filter(n=>n.releases===void 0||n.releases[0].has_docs===!0).slice(0,Hi)}function fn(e){A.selectedIdx=Ui(e);let t=c(".quick-switch-result.selected"),n=c(`.quick-switch-result[data-index="${A.selectedIdx}"]`);t&&t.classList.remove("selected"),n&&n.classList.add("selected")}function Ui(e){let t=A.autocompleteResults.length;if(A.selectedIdx===null){if(e>=0)return 0;if(e<0)return t-1}return(A.selectedIdx+e+t)%t}var Wi=".display-settings",Gi="#settings-modal-content",Xe="#modal-settings-tab",Ze="#modal-keyboard-shortcuts-tab",yn="#settings-content",bn="#keyboard-shortcuts-content",Ki=[{title:"Settings",id:"modal-settings-tab"},{title:"Keyboard shortcuts",id:"modal-keyboard-shortcuts-tab"}];function vn(){Yi()}function Yi(){k(Wi).forEach(e=>{e.addEventListener("click",t=>{et()})})}function gn(){c(Ze).classList.remove("active"),c(Xe).classList.add("active"),c(yn).classList.remove("hidden"),c(bn).classList.add("hidden")}function Ji(){c(Ze).classList.add("active"),c(Xe).classList.remove("active"),c(bn).classList.remove("hidden"),c(yn).classList.add("hidden")}function et(){Pe({title:Ki.map(({id:s,title:o})=>``).join(""),body:Handlebars.templates["settings-modal-body"]({shortcuts:tt})});let e=c(Gi),t=e.querySelector('[name="theme"]'),n=e.querySelector('[name="tooltips"]'),r=e.querySelector('[name="direct_livebook_url"]'),i=e.querySelector('[name="livebook_url"]');O.getAndSubscribe(s=>{t.value=s.theme||"system",n.checked=s.tooltips,s.livebookUrl===null?(r.checked=!1,i.classList.add("hidden"),i.tabIndex=-1):(r.checked=!0,i.classList.remove("hidden"),i.tabIndex=0,i.value=s.livebookUrl)}),t.addEventListener("change",s=>{O.update({theme:s.target.value})}),n.addEventListener("change",s=>{O.update({tooltips:s.target.checked})}),r.addEventListener("change",s=>{let o=s.target.checked?i.value:null;O.update({livebookUrl:o})}),i.addEventListener("input",s=>{O.update({livebookUrl:s.target.value})}),c(Xe).addEventListener("click",s=>{gn()}),c(Ze).addEventListener("click",s=>{Ji()}),gn()}var Xi="#settings-modal-content",tt=[{key:"c",description:"Toggle sidebar",action:He},{key:"n",description:"Cycle themes",action:rn},{key:"s",description:"Focus search bar",displayAs:"/ or s",action:Sn},{key:"/",action:Sn},{key:"g",description:"Search HexDocs package",displayAs:"g",action:Je},{key:"?",displayAs:"?",description:"Bring up this modal",action:ns}],nt={shortcutBeingPressed:null};function xn(){Zi()}function Zi(){document.addEventListener("keydown",es),document.addEventListener("keyup",ts)}function es(e){if(nt.shortcutBeingPressed||e.target.matches("input, textarea")||e.ctrlKey||e.metaKey||e.altKey)return;let t=tt.find(n=>n.key===e.key);t&&(nt.shortcutBeingPressed=t,e.preventDefault(),t.action(e))}function ts(e){nt.shortcutBeingPressed=null}function Sn(e){ce(),$t()}function ns(){rs()?ce():et()}function rs(){return dn()&&c(Xi)}var K={plain:"plain",function:"function",module:"module"},is=[{href:"typespecs.html#basic-types",hint:{kind:K.plain,description:"Basic type"}},{href:"typespecs.html#literals",hint:{kind:K.plain,description:"Literal"}},{href:"typespecs.html#built-in-types",hint:{kind:K.plain,description:"Built-in type"}}],Re={cancelHintFetching:null};function En(e){if(Tn(e))return!0;let t=/#.*\//;return e.includes("#")&&!t.test(e)?!1:e.includes(".html")}function Ln(e){let t=Tn(e);return t?Promise.resolve(t):ss(e)}function Tn(e){let t=is.find(n=>e.includes(n.href));return t?t.hint:null}function ss(e){let t=e.replace(".html",".html?hint=true");return new Promise((n,r)=>{let i=document.createElement("iframe");i.setAttribute("sandbox","allow-scripts allow-same-origin"),i.setAttribute("src",t),i.style.display="none";function s(a){let{href:l,hint:u}=a.data;t===l&&(o(),n(u))}Re.cancelHintFetching=()=>{o(),r(new Error("cancelled"))};function o(){i.remove(),window.removeEventListener("message",s),Re.cancelHintFetching=null}window.addEventListener("message",s),document.body.appendChild(i)})}function wn(){Re.cancelHintFetching&&Re.cancelHintFetching()}function kn(e){let n=e.querySelector("h1").textContent,r=e.querySelector(".docstring > p"),i=r?r.innerHTML:"";return{kind:K.function,title:n.trim(),description:i.trim()}}function _n(e){let n=e.querySelector("h1 > span").textContent,r=e.querySelector("#moduledoc p"),i=r?r.innerHTML:"";return{kind:K.module,title:n.trim(),description:i.trim()}}var os=".content a",rt="#tooltip",as="#tooltip .tooltip-body",In="body .content-inner",cs="#content",Cn="tooltip-shown",le=10,ls=le*4,On={height:450,width:768},us=100,ne={currentLinkElement:null,hoverDelayTimeout:null};function An(){ds(),fs()}function ds(){let e=Handlebars.templates["tooltip-layout"]();c(In).insertAdjacentHTML("beforeend",e)}function fs(){k(os).forEach(e=>{hs(e)&&(e.addEventListener("mouseenter",t=>{ms(e)}),e.addEventListener("mouseleave",t=>{vs(e)}))})}function hs(e){return!(e.classList.contains("detail-link")||ps(e.href)||!En(e.href))}function ps(e){let t=e.replace(cs,"");return window.location.href.split("#")[0]===t}function ms(e){gs()&&(ne.currentLinkElement=e,ne.hoverDelayTimeout=setTimeout(()=>{Ln(e.href).then(t=>{ys(t),bs()}).catch(()=>{})},us))}function gs(){let e=window.innerWidthe.firstElementChild&&e.firstElementChild.tagName==="CODE").forEach(e=>e.insertAdjacentHTML("beforeend",Is)),Array.from(k(".copy-button")).forEach(e=>{let t;e.addEventListener("click",()=>{let n=e.querySelector("[aria-live]");t&&clearTimeout(t);let r=Array.from(e.parentElement.querySelector("code").childNodes).filter(i=>!(i.tagName==="SPAN"&&i.classList.contains("unselectable"))).map(i=>i.textContent).join("");navigator.clipboard.writeText(r),e.classList.add("clicked"),n.innerHTML="Copied! ✓",t=setTimeout(()=>{e.classList.remove("clicked"),n.innerHTML=""},3e3)})})}function Hn(){let t=/(Macintosh|iPhone|iPad|iPod)/.test(window.navigator.userAgent)?"apple-os":"non-apple-os";document.documentElement.classList.add(t)}var As="content",Ps="tabs-open",Rs="tabs-close",Ns="H3",Qs="tabset";function Fn(){Hs().map(Ds).forEach(n=>Bs(n))}function Hs(){let e=document.createNodeIterator(document.getElementById(As),NodeFilter.SHOW_COMMENT,{acceptNode(r){return r.nodeValue.trim()===Ps?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),t=[],n;for(;n=e.nextNode();)t.push(n);return t}function Ds(e,t,n){let r=[],i=[],s={label:"",content:[]};for(;e=e.nextSibling;){if(Fs(e)){Dn(s,i,t);break}r.push(e),e.nodeName===Ns?(Dn(s,i,t),s.label=e.innerText,s.content=[]):s.content.push(e.outerHTML)}let o=document.createElement("div");return o.className=Qs,Ms(r,o),o.innerHTML=Handlebars.templates.tabset({tabs:i}),o}function Fs(e){return e.nodeName==="#comment"&&e.nodeValue.trim()===Rs}function Dn(e,t,n){if(e.label===""&&!e.content.length)return!1;let r=e.label,i=e.content;t.push({label:r,content:i,setIndex:n})}function Ms(e,t){if(!e||!e.length)return!1;e[0].parentNode.insertBefore(t,e[0]),e.forEach(n=>t.appendChild(n))}function Bs(e){let t={tabs:e.querySelectorAll(':scope [role="tab"]'),panels:e.querySelectorAll(':scope [role="tabpanel"]'),activeIndex:0};t.tabs.forEach((n,r)=>{n.addEventListener("click",i=>{Y(r,t)}),n.addEventListener("keydown",i=>{let s=t.tabs.length-1;i.code==="ArrowLeft"?(i.preventDefault(),t.activeIndex===0?Y(s,t):Y(t.activeIndex-1,t)):i.code==="ArrowRight"?(i.preventDefault(),t.activeIndex===s?Y(0,t):Y(t.activeIndex+1,t)):i.code==="Home"?(i.preventDefault(),Y(0,t)):i.code==="End"&&(i.preventDefault(),Y(s,t))})})}function Y(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}dt(()=>{nn(),Tt(),Ct(),qt(),jt(),mt(),an(),ln(),xn(),mn(),en(),An(),Nn(),Yt(),Qn(),vn(),Hn(),Fn()});})(); /*! Bundled license information: lunr/lunr.js: