e=this,t=function(){"use strict";function P(e,t){var n,s=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,n)),s}function u(e){for(var t,n=1;ne.length)&&(t=e.length);for(var n=0,s=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:1,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,e=new Map,t=Math.pow(10,s);return{get:function(s){if(o=s.match(ge).length,e.has(o))return e.get(o);var o,a=1/Math.pow(o,.5*n),i=parseFloat(Math.round(a*t)/t);return e.set(o,i),i},clear:function(){e.clear()}}}f=function(){function a(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=n.getFn,i=void 0===s?e.getFn:s,o=n.fieldNormWeight,r=void 0===o?e.fieldNormWeight:o;t(this,a),this.norm=ue(r,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return n(a,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=e,this._keysMap={},e.forEach(function(e,n){t._keysMap[e.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,o(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();o(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},i=o.getFn,r=void 0===i?e.getFn:i,a=o.fieldNormWeight,c=void 0===a?e.fieldNormWeight:a,s=new f({getFn:r,fieldNormWeight:c});return s.setKeys(t.map(z)),s.setSources(n),s.create(),s}function g(t){var s,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=n.errors,f=void 0===d?0:d,l=n.currentLocation,u=void 0===l?0:l,a=n.expectedLocation,h=void 0===a?0:a,r=n.distance,c=void 0===r?e.distance:r,i=n.ignoreLocation,m=void 0===i?e.ignoreLocation:i,o=f/t.length;return m?o:(s=Math.abs(h-u),c?o+s/c:s?1:o)}function oe(){for(var i,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.minMatchCharLength,o=[],t=-1,r=-1,n=0,c=s.length;n=a&&o.push([t,r]),t=-1);return s[n-1]&&n-t>=a&&o.push([t,n-1]),o}l=32;function W(e){for(var s,n={},t=0,o=e.length;t1&&void 0!==arguments[1]?arguments[1]:{},h=o.location,C=void 0===h?e.location:h,g=o.threshold,O=void 0===g?e.threshold:g,d=o.distance,A=void 0===d?e.distance:d,m=o.includeMatches,E=void 0===m?e.includeMatches:m,p=o.findAllMatches,x=void 0===p?e.findAllMatches:p,v=o.minMatchCharLength,_=void 0===v?e.minMatchCharLength:v,u=o.isCaseSensitive,j=void 0===u?e.isCaseSensitive:u,b=o.ignoreLocation,w=void 0===b?e.ignoreLocation:b;if(t(this,s),this.options={location:C,threshold:O,distance:A,includeMatches:E,findAllMatches:x,minMatchCharLength:_,isCaseSensitive:j,ignoreLocation:w},this.pattern=j?n:n.toLowerCase(),this.chunks=[],this.pattern.length)if(a=function(e,t){y.chunks.push({pattern:e,alphabet:W(e),startIndex:t})},i=this.pattern.length,i>l){for(var r=0,f=i%l,k=i-f;r3&&void 0!==arguments[3]?arguments[3]:{},B=r.location,V=void 0===B?e.location:B,R=r.distance,C=void 0===R?e.distance:R,N=r.threshold,K=void 0===N?e.threshold:N,F=r.findAllMatches,W=void 0===F?e.findAllMatches:F,D=r.minMatchCharLength,z=void 0===D?e.minMatchCharLength:D,I=r.includeMatches,H=void 0===I?e.includeMatches:I,L=r.ignoreLocation,j=void 0===L?e.ignoreLocation:L;if(n.length>l)throw new Error($(l));for(var y,d=n.length,p=t.length,i=Math.max(0,Math.min(V,p)),m=K,h=i,x=z>1||H,S=x?Array(p):[];(y=t.indexOf(n,h))>-1;)if(P=g(n,{currentLocation:y,expectedLocation:i,distance:C,ignoreLocation:j}),m=Math.min(P,m),h=y+d,x)for(b=0;b=T;o-=1)if(v=o-1,E=s[t.charAt(v)],x&&(S[v]=+!!E),u[o]=(u[o+1]<<1|1)&E,c&&(u[o]|=(w[o+1]|w[o])<<1|1|w[o+1]),u[o]&U&&(A=g(n,{errors:c,currentLocation:v,expectedLocation:i,distance:C,ignoreLocation:j}))<=m){if(m=A,(h=v)<=i)break;T=Math.max(1,2*i-h)}if(g(n,{errors:c+1,currentLocation:i,expectedLocation:i,distance:C,ignoreLocation:j})>m)break;w=u}return _={isMatch:h>=0,score:Math.max(.001,A)},x&&(M=oe(S,z),M.length?H&&(_.indices=M):_.isMatch=!1),_}(t,j,y,{location:b+_,distance:h,threshold:v,findAllMatches:p,minMatchCharLength:m,includeMatches:a,ignoreLocation:f}),r=i.isMatch,w=i.score,c=i.indices;r&&(s=!0),u+=w,r&&c&&(o=[].concat(d(o),d(c)))}),i={isMatch:s,score:s?u/this.chunks.length:1},s&&a&&(i.indices=o),i}}]),s}(),a=function(){function e(n){t(this,e),this.pattern=n}return n(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return B(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return B(e,this.singleRegex)}}]),e}();function B(e,t){var n=e.match(t);return n?n[1]:null}var a,l,h,f,O,G=function(e){r(s,e);var o=c(s);function s(e){return t(this,s),o.call(this,e)}return n(s,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),s}(a),Y=function(e){r(s,e);var o=c(s);function s(e){return t(this,s),o.call(this,e)}return n(s,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),s}(a),ne=function(e){r(s,e);var o=c(s);function s(e){return t(this,s),o.call(this,e)}return n(s,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),s}(a),U=function(e){r(s,e);var o=c(s);function s(e){return t(this,s),o.call(this,e)}return n(s,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),s}(a),K=function(e){r(s,e);var o=c(s);function s(e){return t(this,s),o.call(this,e)}return n(s,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),s}(a),q=function(e){r(s,e);var o=c(s);function s(e){return t(this,s),o.call(this,e)}return n(s,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),s}(a),S=function(s){r(o,s);var i=c(o);function o(n){var f,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=s.location,g=void 0===h?e.location:h,l=s.threshold,p=void 0===l?e.threshold:l,u=s.distance,j=void 0===u?e.distance:u,a=s.includeMatches,_=void 0===a?e.includeMatches:a,d=s.findAllMatches,v=void 0===d?e.findAllMatches:d,m=s.minMatchCharLength,b=void 0===m?e.minMatchCharLength:m,r=s.isCaseSensitive,y=void 0===r?e.isCaseSensitive:r,c=s.ignoreLocation,w=void 0===c?e.ignoreLocation:c;return t(this,o),(f=i.call(this,n))._bitapSearch=new O(n,{location:g,threshold:p,distance:j,includeMatches:_,findAllMatches:v,minMatchCharLength:b,isCaseSensitive:y,ignoreLocation:w}),f}return n(o,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),o}(a),V=function(e){r(s,e);var o=c(s);function s(e){return t(this,s),o.call(this,e)}return n(s,[{key:"search",value:function(e){for(var t,o,n=0,s=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,s.push([t,n-1]);return o=!!s.length,{isMatch:o,score:o?0:1,indices:s}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),s}(a),_=[G,V,ne,U,q,K,Y,S],H=_.length,Z=/ +(?=(?:[^"]*"[^"]*")*[^"]*$)/;function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map(function(e){for(var a,r,c,l,d=e.trim().split(Z).filter(function(e){return e&&!!e.trim()}),s=[],o=0,h=d.length;o1&&void 0!==arguments[1]?arguments[1]:{},a=o.isCaseSensitive,r=void 0===a?e.isCaseSensitive:a,c=o.includeMatches,j=void 0===c?e.includeMatches:c,d=o.minMatchCharLength,v=void 0===d?e.minMatchCharLength:d,h=o.ignoreLocation,f=void 0===h?e.ignoreLocation:h,m=o.findAllMatches,p=void 0===m?e.findAllMatches:m,i=o.location,g=void 0===i?e.location:i,u=o.threshold,b=void 0===u?e.threshold:u,l=o.distance,y=void 0===l?e.distance:l;t(this,s),this.query=null,this.options={isCaseSensitive:r,includeMatches:j,minMatchCharLength:v,findAllMatches:p,ignoreLocation:f,location:g,threshold:b,distance:y},this.pattern=r?n:n.toLowerCase(),this.query=J(this.pattern,this.options)}return n(s,[{key:"searchIn",value:function(e){if(o=this.query,!o)return{isMatch:!1,score:1};u=this.options,l=u.includeMatches,e=u.isCaseSensitive?e:e.toLowerCase();for(var s,o,i,c,l,u,f,g,n=0,t=[],a=0,r=0,j=o.length;r-1&&(n.refIndex=e.idx),t.matches.push(n)}})}function fe(e,t){t.score=e.score}function pe(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.includeMatches,r=void 0===i?e.includeMatches:i,a=o.includeScore,c=void 0===a?e.includeScore:a,s=[];return r&&s.push(me),c&&s.push(fe),t.map(function(e){var t=e.idx,o={item:n[t],refIndex:t};return s.length&&s.forEach(function(t){t(e,o)}),o})}return h=function(){function a(n){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;t(this,a),this.options=u(u({},e),s),this.options.useExtendedSearch,this._keyStore=new ae(this.options.keys),this.setCollection(n,o)}return n(a,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof f))throw new Error("Incorrect 'index' type");this._myIndex=t||D(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){s(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},n=[],e=0,s=this._docs.length;e1&&void 0!==arguments[1]?arguments[1]:{},i=a.limit,s=void 0===i?-1:i,t=this.options,r=t.includeMatches,c=t.includeScore,l=t.shouldSort,d=t.sortFn,u=t.ignoreFieldNorm,n=o(e)?o(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return he(n,{ignoreFieldNorm:u}),l&&n.sort(d),L(s)&&s>-1&&(n=n.slice(0,s)),pe(n,this._docs,{includeMatches:r,includeScore:c})}},{key:"_searchStringList",value:function(e){var n=b(e,this.options),o=this._myIndex.records,t=[];return o.forEach(function(e){var o=e.v,a=e.i,r=e.n;if(s(o)){var i=n.searchIn(o),c=i.isMatch,l=i.score,d=i.indices;c&&t.push({item:o,idx:a,matches:[{score:l,value:o,norm:r,indices:d}]})}}),t}},{key:"_searchLogical",value:function(e){var n=this,r=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,s=void 0===n||n,a=function e(n){var r,c,d,u,a=Object.keys(n),l=le(n);if(!l&&a.length>1&&!E(n))return e(T(n));if(de(n)){if(r=l?n[N]:a[0],c=l?n[re]:n[r],!o(c))throw new Error(X(r));return d={keyId:C(r),pattern:c},s&&(d.searcher=b(c,t)),d}return u={children:[],operator:a[0]},a.forEach(function(t){var s=n[t];i(s)&&s.forEach(function(t){u.children.push(e(t))})}),u};return E(e)||(e=T(e)),a(e)}(e,this.options),c=function e(t,s,o){if(!t.children){var c,l=t.keyId,u=t.searcher,i=n._findMatches({key:n._keyStore.get(l),value:n._myIndex.getValueForItemAtKeyId(s,l),searcher:u});return i&&i.length?[{idx:o,item:s,matches:i}]:[]}for(var a=[],r=0,h=t.children.length;r1&&void 0!==arguments[1]?arguments[1]:{},o=s.getFn,a=void 0===o?e.getFn:o,i=s.fieldNormWeight,r=void 0===i?e.fieldNormWeight:i,c=t.keys,l=t.records,n=new f({getFn:a,fieldNormWeight:r});return n.setKeys(c),n.setIndexRecords(l),n},h.config=e,function(){m.push.apply(m,arguments)}(te),h},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t();var e,t,fuse,showButtons=document.querySelectorAll("[id^='search-button']"),scriptBundle,copyText,copiedText,hideButton=document.getElementById("close-search-button"),wrapper=document.getElementById("search-wrapper"),modal=document.getElementById("search-modal"),input=document.getElementById("search-query"),output=document.getElementById("search-results"),first=output.firstChild,last=output.lastChild,searchVisible=!1,indexed=!1,hasResults=!1;showButtons.forEach(e=>{e.addEventListener("click",displaySearch)}),hideButton.addEventListener("click",hideSearch),wrapper.addEventListener("click",hideSearch),modal.addEventListener("click",function(e){return e.stopPropagation(),e.stopImmediatePropagation(),!1}),document.addEventListener("keydown",function(e){e.key=="/"&&(searchVisible||(e.preventDefault(),displaySearch())),e.key=="Escape"&&hideSearch(),e.key=="ArrowDown"&&searchVisible&&hasResults&&(e.preventDefault(),document.activeElement==input?first.focus():document.activeElement==last?last.focus():document.activeElement.parentElement.nextSibling.firstElementChild.focus()),e.key=="ArrowUp"&&searchVisible&&hasResults&&(e.preventDefault(),document.activeElement==input?input.focus():document.activeElement==first?input.focus():document.activeElement.parentElement.previousSibling.firstElementChild.focus())}),input.onkeyup=function(){executeQuery(this.value)};function displaySearch(){indexed||buildIndex(),searchVisible||(document.body.style.overflow="hidden",wrapper.style.visibility="visible",input.focus(),searchVisible=!0)}function hideSearch(){searchVisible&&(document.body.style.overflow="visible",wrapper.style.visibility="hidden",input.value="",output.innerHTML="",document.activeElement.blur(),searchVisible=!1)}function fetchJSON(e,t){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===4&&n.status===200){var e=JSON.parse(n.responseText);t&&t(e)}},n.open("GET",e),n.send()}function buildIndex(){var e=wrapper.getAttribute("data-url"),e=e.replace(/\/?$/,"/");fetchJSON(e+"index.json",function(e){var t={shouldSort:!0,ignoreLocation:!0,threshold:0,includeMatches:!0,keys:[{name:"title",weight:.8},{name:"section",weight:.2},{name:"summary",weight:.6},{name:"content",weight:.4}]};fuse=new Fuse(e,t),indexed=!0})}function executeQuery(e){let t=fuse.search(e),n="";t.length>0?(n=t.map(function(e){return`
  • ${e.item.title}
    ${e.item.section}${e.item.date==null?"":`·${e.item.date}`}
    ${e.item.summary}
  • `}).join(""),hasResults=!0):(n="",hasResults=!1),output.innerHTML=n,t.length>0&&(first=output.firstChild.firstElementChild,last=output.lastChild.firstElementChild)}scriptBundle=document.getElementById("script-bundle"),copyText=scriptBundle?scriptBundle.getAttribute("data-copy"):"Copy",copiedText=scriptBundle?scriptBundle.getAttribute("data-copied"):"Copied";function createCopyButton(e){const t=document.createElement("button");t.className="copy-button",t.type="button",t.ariaLabel=copyText,t.innerText=copyText,t.addEventListener("click",()=>copyCodeToClipboard(t,e)),addCopyButtonToDom(t,e)}async function copyCodeToClipboard(e,t){const n=t.querySelector(":last-child > .chroma > code").innerText;try{result=await navigator.permissions.query({name:"clipboard-write"}),result.state=="granted"||result.state=="prompt"?await navigator.clipboard.writeText(n):copyCodeBlockExecCommand(n,t)}catch{copyCodeBlockExecCommand(n,t)}finally{codeWasCopied(e)}}function copyCodeBlockExecCommand(e,t){const n=document.createElement("textArea");n.contentEditable="true",n.readOnly="false",n.className="copy-textarea",n.value=e,t.insertBefore(n,t.firstChild);const s=document.createRange();s.selectNodeContents(n);const o=window.getSelection();o.removeAllRanges(),o.addRange(s),n.setSelectionRange(0,999999),document.execCommand("copy"),t.removeChild(n)}function codeWasCopied(e){e.blur(),e.innerText=copiedText,setTimeout(function(){e.innerText=copyText},2e3)}function addCopyButtonToDom(e,t){t.insertBefore(e,t.firstChild);const n=document.createElement("div");n.className="highlight-wrapper",t.parentNode.insertBefore(n,t),n.appendChild(t)}window.addEventListener("DOMContentLoaded",e=>{document.querySelectorAll(".highlight").forEach(e=>createCopyButton(e))})