e=this,t=function(){"use strict";function V(e,s){var t=Object.keys(e),n;return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),s&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),t.push.apply(t,n)),t}function u(n){for(var e=1,t;en.length)&&(e=n.length);for(var t=0,s=new Array(e);t0&&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(i){if(s=i.match(Q).length,e.has(s))return e.get(s);var s,a=1/Math.pow(s,.5*n),o=parseFloat(Math.round(a*t)/t);return e.set(s,o),o},clear:function(){e.clear()}}}v=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=X(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,i(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();i(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(t){this.records.splice(t,1);for(var e=t,n=this.size();e2&&void 0!==arguments[2]?arguments[2]:{},s=n.getFn,a=void 0===s?e.getFn:s,o=n.fieldNormWeight,r=void 0===o?e.fieldNormWeight:o,t=new v({getFn:a,fieldNormWeight:r});return t.setKeys(i.map(k)),t.setSources(c),t.create(),t}function m(f){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.errors,m=void 0===o?0:o,i=t.currentLocation,u=void 0===i?0:i,r=t.expectedLocation,d=void 0===r?0:r,l=t.distance,s=void 0===l?e.distance:l,a=t.ignoreLocation,h=void 0===a?e.ignoreLocation:a,n=m/f.length,c;return h?n:(c=Math.abs(d-u),s?n+c/s:c?1:n)}function G(){for(var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.minMatchCharLength,o=[],t=-1,a=-1,n=0,c=s.length,r;n=i&&o.push([t,a]),t=-1);return s[n-1]&&n-t>=i&&o.push([t,n-1]),o}d=32;function Y(n){for(var t={},e=0,s=n.length,o;e1&&void 0!==arguments[1]?arguments[1]:{},l=n.location,C=void 0===l?e.location:l,c=n.threshold,x=void 0===c?e.threshold:c,u=n.distance,O=void 0===u?e.distance:u,m=n.includeMatches,_=void 0===m?e.includeMatches:m,p=n.findAllMatches,A=void 0===p?e.findAllMatches:p,v=n.minMatchCharLength,y=void 0===v?e.minMatchCharLength:v,r=n.isCaseSensitive,b=void 0===r?e.isCaseSensitive:r,f=n.ignoreLocation,w=void 0===f?e.ignoreLocation:f,a,i,j;if(t(this,s),this.options={location:C,threshold:x,distance:O,includeMatches:_,findAllMatches:A,minMatchCharLength:y,isCaseSensitive:b,ignoreLocation:w},this.pattern=b?g:g.toLowerCase(),this.chunks=[],this.pattern.length)if(a=function(e,t){E.chunks.push({pattern:e,alphabet:Y(e),startIndex:t})},i=this.pattern.length,i>d){for(var o=0,h=i%d,k=i-h;o3&&void 0!==arguments[3]?arguments[3]:{},R=i.location,V=void 0===R?e.location:R,L=i.distance,b=void 0===L?e.distance:L,D=i.threshold,$=void 0===D?e.threshold:D,H=i.findAllMatches,B=void 0===H?e.findAllMatches:H,T=i.minMatchCharLength,F=void 0===T?e.minMatchCharLength:T,M=i.includeMatches,S=void 0===M?e.includeMatches:M,A=i.ignoreLocation,y=void 0===A?e.ignoreLocation:A,I,O,j,s,n,v,z,E,N;if(o.length>d)throw new Error(eo(d));for(var _,u=o.length,h=C.length,t=Math.max(0,Math.min(V,h)),c=$,r=t,p=F>1||S,k=p?Array(h):[];(_=C.indexOf(o,r))>-1;)if(I=m(o,{currentLocation:_,expectedLocation:t,distance:b,ignoreLocation:y}),c=Math.min(I,c),r=_+u,p)for(O=0;O=P;n-=1)if(v=n-1,z=W[C.charAt(v)],p&&(k[v]=+!!z),l[n]=(l[n+1]<<1|1)&z,a&&(l[n]|=(g[n+1]|g[n])<<1|1|g[n+1]),l[n]&U&&(w=m(o,{errors:a,currentLocation:v,expectedLocation:t,distance:b,ignoreLocation:y}))<=c){if(c=w,(r=v)<=t)break;P=Math.max(1,2*t-r)}if(m(o,{errors:a+1,currentLocation:t,expectedLocation:t,distance:b,ignoreLocation:y})>c)break;g=l}return E={isMatch:r>=0,score:Math.max(.001,w)},p&&(N=G(k,F),N.length?S&&(E.indices=N):E.isMatch=!1),E}(n,w,b,{location:v+y,distance:g,threshold:j,findAllMatches:h,minMatchCharLength:f,includeMatches:i,ignoreLocation:p}),u=a.isMatch,_=a.score,c=a.indices;u&&(s=!0),r+=_,u&&c&&(o=[].concat(l(o),l(c)))}),u={isMatch:s,score:s?r/this.chunks.length:1},s&&i&&(u.indices=o),u}}]),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 I(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return I(e,this.singleRegex)}}]),e}();function I(t,n){var e=t.match(n);return e?e[1]:null}var v,d,H,a,e3=function(s){r(e,s);var o=c(e);function e(n){return t(this,e),o.call(this,n)}return n(e,[{key:"search",value:function(t){var e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),e}(a),en=function(s){r(e,s);var o=c(e);function e(n){return t(this,e),o.call(this,n)}return n(e,[{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/^!(.*)$/}}]),e}(a),W=function(s){r(e,s);var o=c(e);function e(n){return t(this,e),o.call(this,n)}return n(e,[{key:"search",value:function(t){var e=t.startsWith(this.pattern);return{isMatch:e,score:e?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/^\^(.*)$/}}]),e}(a),U=function(s){r(e,s);var o=c(e);function e(n){return t(this,e),o.call(this,n)}return n(e,[{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/^!\^(.*)$/}}]),e}(a),K=function(s){r(e,s);var o=c(e);function e(n){return t(this,e),o.call(this,n)}return n(e,[{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/^(.*)\$$/}}]),e}(a),q=function(s){r(e,s);var o=c(e);function e(n){return t(this,e),o.call(this,n)}return n(e,[{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/^!(.*)\$$/}}]),e}(a),P=function(o){r(s,o);var i=c(s);function s(f){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.location,_=void 0===r?e.location:r,l=n.threshold,j=void 0===l?e.threshold:l,u=n.distance,v=void 0===u?e.distance:u,m=n.includeMatches,p=void 0===m?e.includeMatches:m,o=n.findAllMatches,g=void 0===o?e.findAllMatches:o,h=n.minMatchCharLength,b=void 0===h?e.minMatchCharLength:h,d=n.isCaseSensitive,y=void 0===d?e.isCaseSensitive:d,c=n.ignoreLocation,w=void 0===c?e.ignoreLocation:c;return t(this,s),(a=i.call(this,f))._bitapSearch=new H(f,{location:_,threshold:j,distance:v,includeMatches:p,findAllMatches:g,minMatchCharLength:b,isCaseSensitive:y,ignoreLocation:w}),a}return n(s,[{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/^(.*)$/}}]),s}(a),L=function(s){r(e,s);var o=c(e);function e(n){return t(this,e),o.call(this,n)}return n(e,[{key:"search",value:function(o){for(var e,t=0,n=[],i=this.pattern.length,s;(e=o.indexOf(this.pattern,t))>-1;)t=e+i,n.push([e,t-1]);return s=!!n.length,{isMatch:s,score:s?0:1,indices:n}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),e}(a),b=[e3,L,W,U,q,K,en,P],F=b.length,Z=/ +(?=([^"]*"[^"]*")*[^"]*$)/,h;function J(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.split("|").map(function(u){for(var r=u.trim().split(Z).filter(function(e){return e&&!!e.trim()}),s=[],o=0,h=r.length,c,l,i,d;o1&&void 0!==arguments[1]?arguments[1]:{},i=n.isCaseSensitive,a=void 0===i?e.isCaseSensitive:i,r=n.includeMatches,j=void 0===r?e.includeMatches:r,l=n.minMatchCharLength,v=void 0===l?e.minMatchCharLength:l,u=n.ignoreLocation,f=void 0===u?e.ignoreLocation:u,m=n.findAllMatches,p=void 0===m?e.findAllMatches:m,o=n.location,g=void 0===o?e.location:o,d=n.threshold,b=void 0===d?e.threshold:d,c=n.distance,y=void 0===c?e.distance:c;t(this,s),this.query=null,this.options={isCaseSensitive:a,includeMatches:j,minMatchCharLength:v,findAllMatches:p,ignoreLocation:f,location:g,threshold:b,distance:y},this.pattern=a?h:h.toLowerCase(),this.query=J(this.pattern,this.options)}return n(s,[{key:"searchIn",value:function(n){if(o=this.query,!o)return{isMatch:!1,score:1};c=this.options,h=c.includeMatches,n=c.isCaseSensitive?n:n.toLowerCase();for(var o,c,h,t=0,e=[],s=0,i=0,v=o.length,m,a,p,j,f;i-1&&(n.refIndex=t.idx),e.matches.push(n)}})}function e0(e,t){t.score=e.score}function e2(i,c){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n.includeMatches,a=void 0===s?e.includeMatches:s,o=n.includeScore,r=void 0===o?e.includeScore:o,t=[];return a&&t.push(e4),r&&t.push(e0),i.map(function(e){var n=e.idx,s={item:c[n],refIndex:n};return t.length&&t.forEach(function(t){t(e,s)}),s})}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 es(this.options.keys),this.setCollection(n,o)}return n(a,[{key:"setCollection",value:function(t,e){if(this._docs=t,e&&!(e instanceof v))throw new Error("Incorrect 'index' type");this._myIndex=e||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 o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],e=0,n=this._docs.length,s;e1&&void 0!==arguments[1]?arguments[1]:{},o=a.limit,s=void 0===o?-1:o,e=this.options,r=e.includeMatches,c=e.includeScore,l=e.shouldSort,d=e.sortFn,u=e.ignoreFieldNorm,t=i(n)?i(this._docs[0])?this._searchStringList(n):this._searchObjectList(n):this._searchLogical(n);return e1(t,{ignoreFieldNorm:u}),l&&t.sort(d),z(s)&&s>-1&&(t=t.slice(0,s)),e2(t,this._docs,{includeMatches:r,includeScore:c})}},{key:"_searchStringList",value:function(t){var n=C(t,this.options),o=this._myIndex.records,e=[];return o.forEach(function(o){var t=o.v,a=o.i,r=o.n;if(s(t)){var i=n.searchIn(t),c=i.isMatch,l=i.score,d=i.indices;c&&e.push({item:t,idx:a,matches:[{score:l,value:t,norm:r,indices:d}]})}}),e}},{key:"_searchLogical",value:function(d){var t=this,a=function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,s=void 0===t||t,a=function l(e){var t=Object.keys(e),a=el(e),r,c,d,u;if(!a&&t.length>1&&!_(e))return l(N(e));if(ed(e)){if(r=a?e[S]:t[0],c=a?e[er]:e[r],!i(c))throw new Error(ea(r));return d={keyId:x(r),pattern:c},s&&(d.searcher=C(c,n)),d}return u={children:[],operator:t[0]},t.forEach(function(n){var t=e[n];o(t)&&t.forEach(function(e){u.children.push(l(e))})}),u};return _(e)||(e=N(e)),a(e)}(d,this.options),r=function u(e,s,a){if(!e.children){var r=e.keyId,d=e.searcher,n=t._findMatches({key:t._keyStore.get(r),value:t._myIndex.getValueForItemAtKeyId(s,r),searcher:d}),c;return n&&n.length?[{idx:a,item:s,matches:n}]:[]}for(var o=[],i=0,h=e.children.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=s.getFn,a=void 0===i?e.getFn:i,o=s.fieldNormWeight,r=void 0===o?e.fieldNormWeight:o,c=n.keys,l=n.records,t=new v({getFn:a,fieldNormWeight:r});return t.setKeys(c),t.setIndexRecords(l),t},h.config=e,function(){f.push.apply(f,arguments)}(et),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,showButton=document.getElementById("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;showButton.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(n,t){var e=new XMLHttpRequest;e.onreadystatechange=function(){if(e.readyState===4)if(e.status===200){var n=JSON.parse(e.responseText);t&&t(n)}},e.open("GET",n),e.send()}function buildIndex(){var e=wrapper.getAttribute("data-url");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(n){let t=fuse.search(n),e="";t.length>0?(t.forEach(function(t){e=e+`
  • ${t.item.title}
    ${t.item.section}·${t.item.date}
    ${t.item.summary}
  • `}),hasResults=!0):(e="",hasResults=!1),output.innerHTML=e,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(t){const e=document.createElement("button");e.className="copy-button",e.type="button",e.ariaLabel=copyText,e.innerText=copyText,e.addEventListener("click",()=>copyCodeToClipboard(e,t)),addCopyButtonToDom(e,t)}async function copyCodeToClipboard(n,e){const t=e.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(t):copyCodeBlockExecCommand(t,e)}catch(n){copyCodeBlockExecCommand(t,e)}finally{codeWasCopied(n)}}function copyCodeBlockExecCommand(o,t){const e=document.createElement("textArea");e.contentEditable="true",e.readOnly="false",e.className="copy-textarea",e.value=o,t.insertBefore(e,t.firstChild);const n=document.createRange();n.selectNodeContents(e);const s=window.getSelection();s.removeAllRanges(),s.addRange(n),e.setSelectionRange(0,999999),document.execCommand("copy"),t.removeChild(e)}function codeWasCopied(e){e.blur(),e.innerText=copiedText,setTimeout(function(){e.innerText=copyText},2e3)}function addCopyButtonToDom(n,e){e.insertBefore(n,e.firstChild);const t=document.createElement("div");t.className="highlight-wrapper",e.parentNode.insertBefore(t,e),t.appendChild(e)}window.addEventListener("DOMContentLoaded",e=>{document.querySelectorAll(".highlight").forEach(e=>createCopyButton(e))})