';
+ for (let diagnostic of diagnostics){
+ let stack = diagnostic.frames.length ? diagnostic.frames.reduce((p, frame)=>{
+ return `${p}
+
${frame.location}
+${frame.code}`;
+ }, '') : diagnostic.stack;
+ errorHTML += `
+
+
+ \u{1F6A8} ${diagnostic.message}
+
+
${stack}
+
+ ${diagnostic.hints.map((hint)=>"
\uD83D\uDCA1 " + hint + '
').join('')}
+
+ ${diagnostic.documentation ? `
` : ''}
+
+ `;
+ }
+ errorHTML += '
';
+ overlay.innerHTML = errorHTML;
+ return overlay;
+}
+function fullReload() {
+ if (typeof location !== 'undefined' && 'reload' in location) location.reload();
+ else if (typeof extCtx !== 'undefined' && extCtx && extCtx.runtime && extCtx.runtime.reload) extCtx.runtime.reload();
+ else try {
+ let { workerData, parentPort } = module.bundle.root('node:worker_threads') /*: any*/ ;
+ if (workerData !== null && workerData !== void 0 && workerData.__parcel) parentPort.postMessage('restart');
+ } catch (err) {
+ console.error("[parcel] \u26A0\uFE0F An HMR update was not accepted. Please restart the process.");
+ }
+}
+function getParents(bundle, id) /*: Array<[ParcelRequire, string]> */ {
+ var modules = bundle.modules;
+ if (!modules) return [];
+ var parents = [];
+ var k, d, dep;
+ for(k in modules)for(d in modules[k][1]){
+ dep = modules[k][1][d];
+ if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) parents.push([
+ bundle,
+ k
+ ]);
+ }
+ if (bundle.parent) parents = parents.concat(getParents(bundle.parent, id));
+ return parents;
+}
+function updateLink(link) {
+ var href = link.getAttribute('href');
+ if (!href) return;
+ var newLink = link.cloneNode();
+ newLink.onload = function() {
+ if (link.parentNode !== null) // $FlowFixMe
+ link.parentNode.removeChild(link);
+ };
+ newLink.setAttribute('href', // $FlowFixMe
+ href.split('?')[0] + '?' + Date.now());
+ // $FlowFixMe
+ link.parentNode.insertBefore(newLink, link.nextSibling);
+}
+var cssTimeout = null;
+function reloadCSS() {
+ if (cssTimeout || typeof document === 'undefined') return;
+ cssTimeout = setTimeout(function() {
+ var links = document.querySelectorAll('link[rel="stylesheet"]');
+ for(var i = 0; i < links.length; i++){
+ // $FlowFixMe[incompatible-type]
+ var href /*: string */ = links[i].getAttribute('href');
+ var hostname = getHostname();
+ var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\/\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());
+ var absolute = /^https?:\/\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;
+ if (!absolute) updateLink(links[i]);
+ }
+ cssTimeout = null;
+ }, 50);
+}
+function hmrDownload(asset) {
+ if (asset.type === 'js') {
+ if (typeof document !== 'undefined') {
+ let script = document.createElement('script');
+ script.src = asset.url + '?t=' + Date.now();
+ if (asset.outputFormat === 'esmodule') script.type = 'module';
+ return new Promise((resolve, reject)=>{
+ var _document$head;
+ script.onload = ()=>resolve(script);
+ script.onerror = reject;
+ (_document$head = document.head) === null || _document$head === void 0 || _document$head.appendChild(script);
+ });
+ } else if (typeof importScripts === 'function') {
+ // Worker scripts
+ if (asset.outputFormat === 'esmodule') return import(asset.url + '?t=' + Date.now());
+ else return new Promise((resolve, reject)=>{
+ try {
+ importScripts(asset.url + '?t=' + Date.now());
+ resolve();
+ } catch (err) {
+ reject(err);
+ }
+ });
+ }
+ }
+}
+async function hmrApplyUpdates(assets) {
+ global.parcelHotUpdate = Object.create(null);
+ let scriptsToRemove;
+ try {
+ // If sourceURL comments aren't supported in eval, we need to load
+ // the update from the dev server over HTTP so that stack traces
+ // are correct in errors/logs. This is much slower than eval, so
+ // we only do it if needed (currently just Safari).
+ // https://bugs.webkit.org/show_bug.cgi?id=137297
+ // This path is also taken if a CSP disallows eval.
+ if (!supportsSourceURL) {
+ let promises = assets.map((asset)=>{
+ var _hmrDownload;
+ return (_hmrDownload = hmrDownload(asset)) === null || _hmrDownload === void 0 ? void 0 : _hmrDownload.catch((err)=>{
+ // Web extension fix
+ if (extCtx && extCtx.runtime && extCtx.runtime.getManifest().manifest_version == 3 && typeof ServiceWorkerGlobalScope != 'undefined' && global instanceof ServiceWorkerGlobalScope) {
+ extCtx.runtime.reload();
+ return;
+ }
+ throw err;
+ });
+ });
+ scriptsToRemove = await Promise.all(promises);
+ }
+ assets.forEach(function(asset) {
+ hmrApply(module.bundle.root, asset);
+ });
+ } finally{
+ delete global.parcelHotUpdate;
+ if (scriptsToRemove) scriptsToRemove.forEach((script)=>{
+ if (script) {
+ var _document$head2;
+ (_document$head2 = document.head) === null || _document$head2 === void 0 || _document$head2.removeChild(script);
+ }
+ });
+ }
+}
+function hmrApply(bundle /*: ParcelRequire */ , asset /*: HMRAsset */ ) {
+ var modules = bundle.modules;
+ if (!modules) return;
+ if (asset.type === 'css') reloadCSS();
+ else if (asset.type === 'js') {
+ let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];
+ if (deps) {
+ if (modules[asset.id]) {
+ // Remove dependencies that are removed and will become orphaned.
+ // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.
+ let oldDeps = modules[asset.id][1];
+ for(let dep in oldDeps)if (!deps[dep] || deps[dep] !== oldDeps[dep]) {
+ let id = oldDeps[dep];
+ let parents = getParents(module.bundle.root, id);
+ if (parents.length === 1) hmrDelete(module.bundle.root, id);
+ }
+ }
+ if (supportsSourceURL) // Global eval. We would use `new Function` here but browser
+ // support for source maps is better with eval.
+ (0, eval)(asset.output);
+ // $FlowFixMe
+ let fn = global.parcelHotUpdate[asset.id];
+ modules[asset.id] = [
+ fn,
+ deps
+ ];
+ }
+ // Always traverse to the parent bundle, even if we already replaced the asset in this bundle.
+ // This is required in case modules are duplicated. We need to ensure all instances have the updated code.
+ if (bundle.parent) hmrApply(bundle.parent, asset);
+ }
+}
+function hmrDelete(bundle, id) {
+ let modules = bundle.modules;
+ if (!modules) return;
+ if (modules[id]) {
+ // Collect dependencies that will become orphaned when this module is deleted.
+ let deps = modules[id][1];
+ let orphans = [];
+ for(let dep in deps){
+ let parents = getParents(module.bundle.root, deps[dep]);
+ if (parents.length === 1) orphans.push(deps[dep]);
+ }
+ // Delete the module. This must be done before deleting dependencies in case of circular dependencies.
+ delete modules[id];
+ delete bundle.cache[id];
+ // Now delete the orphans.
+ orphans.forEach((id)=>{
+ hmrDelete(module.bundle.root, id);
+ });
+ } else if (bundle.parent) hmrDelete(bundle.parent, id);
+}
+function hmrAcceptCheck(bundle /*: ParcelRequire */ , id /*: string */ , depsByBundle /*: ?{ [string]: { [string]: string } }*/ ) {
+ checkedAssets = {};
+ if (hmrAcceptCheckOne(bundle, id, depsByBundle)) return true;
+ // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.
+ let parents = getParents(module.bundle.root, id);
+ let accepted = false;
+ while(parents.length > 0){
+ let v = parents.shift();
+ let a = hmrAcceptCheckOne(v[0], v[1], null);
+ if (a) // If this parent accepts, stop traversing upward, but still consider siblings.
+ accepted = true;
+ else if (a !== null) {
+ // Otherwise, queue the parents in the next level upward.
+ let p = getParents(module.bundle.root, v[1]);
+ if (p.length === 0) {
+ // If there are no parents, then we've reached an entry without accepting. Reload.
+ accepted = false;
+ break;
+ }
+ parents.push(...p);
+ }
+ }
+ return accepted;
+}
+function hmrAcceptCheckOne(bundle /*: ParcelRequire */ , id /*: string */ , depsByBundle /*: ?{ [string]: { [string]: string } }*/ ) {
+ var modules = bundle.modules;
+ if (!modules) return;
+ if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {
+ // If we reached the root bundle without finding where the asset should go,
+ // there's nothing to do. Mark as "accepted" so we don't reload the page.
+ if (!bundle.parent) {
+ bundleNotFound = true;
+ return true;
+ }
+ return hmrAcceptCheckOne(bundle.parent, id, depsByBundle);
+ }
+ if (checkedAssets[id]) return null;
+ checkedAssets[id] = true;
+ var cached = bundle.cache[id];
+ if (!cached) return true;
+ assetsToDispose.push([
+ bundle,
+ id
+ ]);
+ if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
+ assetsToAccept.push([
+ bundle,
+ id
+ ]);
+ return true;
+ }
+ return false;
+}
+function hmrDisposeQueue() {
+ // Dispose all old assets.
+ for(let i = 0; i < assetsToDispose.length; i++){
+ let id = assetsToDispose[i][1];
+ if (!disposedAssets[id]) {
+ hmrDispose(assetsToDispose[i][0], id);
+ disposedAssets[id] = true;
+ }
+ }
+ assetsToDispose = [];
+}
+function hmrDispose(bundle /*: ParcelRequire */ , id /*: string */ ) {
+ var cached = bundle.cache[id];
+ bundle.hotData[id] = {};
+ if (cached && cached.hot) cached.hot.data = bundle.hotData[id];
+ if (cached && cached.hot && cached.hot._disposeCallbacks.length) cached.hot._disposeCallbacks.forEach(function(cb) {
+ cb(bundle.hotData[id]);
+ });
+ delete bundle.cache[id];
+}
+function hmrAccept(bundle /*: ParcelRequire */ , id /*: string */ ) {
+ // Execute the module.
+ bundle(id);
+ // Run the accept callbacks in the new version of the module.
+ var cached = bundle.cache[id];
+ if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
+ let assetsToAlsoAccept = [];
+ cached.hot._acceptCallbacks.forEach(function(cb) {
+ let additionalAssets = cb(function() {
+ return getParents(module.bundle.root, id);
+ });
+ if (Array.isArray(additionalAssets) && additionalAssets.length) assetsToAlsoAccept.push(...additionalAssets);
+ });
+ if (assetsToAlsoAccept.length) {
+ let handled = assetsToAlsoAccept.every(function(a) {
+ return hmrAcceptCheck(a[0], a[1]);
+ });
+ if (!handled) return fullReload();
+ hmrDisposeQueue();
+ }
+ }
+}
+
+},{}],"e9rxa":[function(require,module,exports,__globalThis) {
+var _search = require("./modules/search");
+var _utils = require("./modules/utils");
+var _multiTab = require("./modules/multiTab");
+var _feedback = require("./modules/feedback");
+const { mount } = redom;
+document.querySelectorAll('.modal-button').forEach(function(el) {
+ el.addEventListener('click', function() {
+ var target = document.querySelector(el.getAttribute('data-target'));
+ target.classList.add('is-active');
+ target.querySelector('.modal-close').addEventListener('click', function() {
+ target.classList.remove('is-active');
+ });
+ target.querySelector('.modal-background').addEventListener('click', function() {
+ target.classList.remove('is-active');
+ });
+ });
+});
+if (document.body.contains(document.getElementById('blogSlogan'))) (0, _utils.blogAd).init();
+document.addEventListener("DOMContentLoaded", function() {
+ // Initialize after the DOM.
+ (function() {
+ var burger = document.querySelector('.burger');
+ var menu = document.querySelector('#' + burger.dataset.target);
+ burger.addEventListener('click', function() {
+ burger.classList.toggle('is-active');
+ menu.classList.toggle('is-active');
+ });
+ })();
+ (0, _utils.header).init();
+ hljs.highlightAll();
+ if (navigator && navigator.clipboard) (0, _utils.addCopyButtons)(navigator.clipboard);
+ (0, _utils.removeExpiredEvents)();
+ (0, _utils.addAnchorLinks)();
+ (0, _utils.scrollSideMenu)();
+ // changelogFilter()
+ new (0, _multiTab.multiTabContentHandler)();
+ if (window.location.hash.length > 0) {
+ setTimeout(function() {
+ document.querySelector('a[href="' + window.location.hash + '"]').click();
+ }, 150);
+ (0, _utils.header).unpin();
+ }
+ (async function() {
+ try {
+ await (0, _search.setupSearch)();
+ mount(document.getElementById("search-button-container"), (0, _search.searchButton));
+ mount(document.getElementById("search-modal-container"), (0, _search.searchModal));
+ document.onkeydown = function(e) {
+ if (e.key == "Escape") (0, _search.searchModal).close();
+ if ((e.key == "k" || e.key == "K") && (e.metaKey || e.ctrlKey)) {
+ e.preventDefault();
+ e.stopPropagation();
+ (0, _search.searchModal).open();
+ }
+ if (e.key == "s" || e.key == "S") {
+ let searchBar = document.getElementById("hub-search-input");
+ if (searchBar && document.activeElement != searchBar) {
+ e.preventDefault();
+ searchBar.focus();
+ }
+ }
+ };
+ } catch (err) {
+ console.error("Could not setup search");
+ }
+ })();
+ // Init feedback on docs pages
+ let feedback = document.getElementById("feedback-wrapper");
+ if (feedback) (0, _feedback.createFeedbackElement)(feedback);
+});
+//added for the hub
+window.addAnchorLinks = (0, _utils.addAnchorLinks);
+window.addCopyButtons = (0, _utils.addCopyButtons);
+
+},{"./modules/search":"kiRSd","./modules/utils":"hWZf7","./modules/multiTab":"1bdXi","./modules/feedback":"c5ZDr"}],"kiRSd":[function(require,module,exports,__globalThis) {
+var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
+parcelHelpers.defineInteropFlag(exports);
+parcelHelpers.export(exports, "setupSearch", ()=>setupSearch);
+parcelHelpers.export(exports, "searchButton", ()=>searchButton);
+parcelHelpers.export(exports, "searchModal", ()=>searchModal);
+const { el, mount, text, list, setChildren, setStyle, setAttr } = redom;
+const projectList = [
+ "Spin"
+];
+const versionPattern = /^v\d+$/;
+let idx;
+let documents;
+async function getSearchIndex() {
+ try {
+ let res = await fetch("/static/data.json");
+ return await res.json();
+ } catch (err) {
+ console.log("cannot load search module");
+ }
+}
+//
+// This function filters and builds the search index, based on which project is selected (Spin v1, V2, V3, Cloud, Etc.),
+//
+async function setupSearch() {
+ documents = await getSearchIndex();
+ const match = window.location.pathname.match(/^\/(v\d+)\//);
+ const version = match ? match[1] : "v3";
+ documents = documents.filter((doc)=>{
+ if (!doc.url) return false;
+ const urlVersion = doc.url.split("/")[1];
+ return urlVersion === version;
+ });
+ idx = lunr(function() {
+ this.field("title");
+ this.field("subheading");
+ this.field("content");
+ this.field("keywords", {
+ boost: 100
+ });
+ this.field("subsectionKeywords", {
+ boost: 100
+ });
+ this.ref("url");
+ documents.forEach(function(doc) {
+ this.add(doc);
+ }, this);
+ });
+}
+class SearchButton {
+ constructor(modal){
+ this.modal = modal;
+ this.el = el("button.search-button", {
+ onclick: (function(e) {
+ this.modal.open();
+ }).bind(this)
+ }, []);
+ let mobileSearch = document.getElementById("mobile-search");
+ if (mobileSearch) {
+ mobileSearch.classList.add("enable");
+ mobileSearch.addEventListener("click", ()=>{
+ this.modal.open();
+ });
+ }
+ }
+}
+class SearchResultSubHeading {
+ constructor(){
+ this.itemIcon = el("span.result-item-icon", "#");
+ this.link = el("span");
+ this.el = el("a.result-subitem", {
+ onclick: function(e) {
+ searchModal.close();
+ }
+ }, [
+ this.itemIcon,
+ this.link
+ ]);
+ }
+ update(data) {
+ this.link.textContent = data.subheading;
+ this.el.href = data.url;
+ // Hide listing where the subheading is empty
+ if (data.subheading == "") setStyle(this.el, {
+ display: "none"
+ });
+ else setStyle(this.el, {
+ display: "flex"
+ });
+ }
+}
+class SearchResultItem {
+ constructor(){
+ this.subheading = list("div.result-subheading-container", SearchResultSubHeading);
+ this.projectName = el("code.project-name");
+ this.pageTitle = el("span");
+ this.title = el("a", this.pageTitle, this.projectName);
+ this.el = el("div.result-block", [
+ this.title,
+ this.subheading
+ ]);
+ }
+ update(data) {
+ this.pageTitle.textContent = data.title;
+ this.projectName.textContent = data.project;
+ this.title.href = data.url;
+ this.subheading.update(data.data);
+ }
+}
+class ResultFilterItem {
+ constructor(){
+ this.index;
+ this.active = true;
+ this.parentCallback;
+ this.el = el("code.active", {
+ onclick: (function(e) {
+ this.toggle();
+ }).bind(this)
+ });
+ }
+ update(data, index, item, context) {
+ this.parentCallback = context.callback;
+ this.index = index;
+ context.reset && (this.active = true);
+ if (this.active) this.el.classList.add("active");
+ this.el.textContent = data;
+ }
+ toggle() {
+ this.active = !this.active;
+ if (this.active) this.el.classList.add("active");
+ else this.el.classList.remove("active");
+ this.parentCallback(this.index, this.active);
+ }
+}
+class SearchResultFilter {
+ constructor(categories, callback){
+ this.categories = categories;
+ this.parentCallback = callback;
+ this.active = [
+ true,
+ true,
+ true
+ ];
+ this.activefilter = categories.map((k)=>k.toLowerCase());
+ this.filters = list("div.filter-categories", ResultFilterItem);
+ this.filters.update(this.categories, {
+ callback: this.updateFilterSearch.bind(this)
+ });
+ this.resetFilter = el("span.reset-filter", {
+ onclick: (function(e) {
+ this.resetFilters();
+ }).bind(this)
+ }, "Clear filters");
+ this.el = el("div.result-filters", this.filters, this.resetFilter);
+ }
+ updateFilterSearch(index, status) {
+ console.log(this.active, this.active[index]);
+ this.active[index] = status;
+ this.activefilter = this.categories.filter((k, i)=>{
+ return this.active[i];
+ }).map((k)=>{
+ return k.toLowerCase();
+ });
+ this.parentCallback(this.activefilter);
+ }
+ resetFilters() {
+ this.activefilter = this.categories.map((k)=>k.toLowerCase());
+ this.parentCallback(this.activefilter);
+ this.filters.update(this.categories, {
+ callback: this.updateFilterSearch.bind(this),
+ reset: true
+ });
+ }
+}
+class SearchResult {
+ constructor(){
+ this.data;
+ this.projects = projectList;
+ this.resultItems = list("div.result-section", SearchResultItem);
+ this.resultFilters = new SearchResultFilter(this.projects, this.filter.bind(this));
+ this.el = el("div.result-section-container", this.resultFilters, this.resultItems);
+ }
+ update(data) {
+ this.data = data;
+ this.resultItems.update(this.data);
+ }
+ filter(filters) {
+ this.resultItems.update(this.data.filter((k)=>{
+ return filters.includes(k.project);
+ }));
+ }
+}
+class ProjectRecommendations {
+ constructor(){
+ this.link1 = el("a.suggested-project-link");
+ this.link2 = el("a.suggested-project-link");
+ this.link3 = el("a.suggested-project-link");
+ this.link4 = el("a.suggested-project-link");
+ this.projectLinks = el("div.recommended-navs", this.link1, this.link2, this.link3, this.link4);
+ this.projectTitle = el("div.project-title");
+ this.el = el("div.suggested-project", this.projectTitle, this.projectLinks);
+ }
+ update(data) {
+ this.projectTitle.textContent = data.project;
+ this.link1.textContent = data.link1[0];
+ this.link1.href = data.link1[1];
+ this.link2.textContent = data.link2[0];
+ this.link2.href = data.link2[1];
+ this.link3.textContent = data.link3[0];
+ this.link3.href = data.link3[1];
+ this.link4.textContent = data.link4[0];
+ this.link4.href = data.link4[1];
+ }
+}
+// this content shouldn't live in the theme javascript, ideally be managed via the config/site.toml and shortcodes in the template html
+class ModalSuggest {
+ constructor(){
+ this.projectData = [
+ {
+ project: "Spin",
+ link1: [
+ "Install",
+ "/install"
+ ],
+ link2: [
+ "Quickstart",
+ "/quickstart"
+ ],
+ link3: [
+ "Develop",
+ "/writing-apps"
+ ],
+ link4: [
+ "Deploy",
+ "/deploying"
+ ]
+ }
+ ];
+ this.projectRecommendations = list("div.result-section", ProjectRecommendations);
+ this.projectRecommendations.update(this.projectData);
+ this.el = el("div.result-section-container", this.projectRecommendations);
+ }
+}
+class SearchModal {
+ constructor(){
+ this.container = document.getElementById("search-modal-container");
+ this.modalSearchBar = el("input.modal-search-bar", {
+ type: "text",
+ spellcheck: false,
+ placeholder: "Search Spin Docs",
+ oninput: (function(e) {
+ this.updateSearch();
+ }).bind(this)
+ });
+ this.searchResults = new SearchResult();
+ this.modalSuggest = new ModalSuggest();
+ this.modal = el("div.modal-box", {
+ onclick: function(e) {
+ e.stopPropagation();
+ }
+ });
+ this.el = el("div.modal-wrapper", {
+ onclick: (function(e) {
+ this.close();
+ }).bind(this),
+ onkeydown: function(e) {
+ if (e.key != "Escape") e.stopPropagation();
+ }
+ }, this.modal);
+ }
+ open() {
+ setStyle(this.container, {
+ display: "block"
+ });
+ setStyle(document.body, {
+ overflow: "hidden",
+ height: "100%"
+ });
+ this.modalSearchBar.value = "";
+ setChildren(this.modal, [
+ this.modalSearchBar,
+ this.modalSuggest
+ ]);
+ this.modalSearchBar.focus();
+ }
+ close() {
+ setStyle(this.container, {
+ display: "none"
+ });
+ setStyle(document.body, {
+ "overflow-y": "auto",
+ height: "auto"
+ });
+ setChildren(this.modal, []);
+ }
+ updateSearch() {
+ let query = this.modalSearchBar.value;
+ if (query == "") {
+ setChildren(this.modal, [
+ this.modalSearchBar,
+ this.modalSuggest
+ ]);
+ return;
+ }
+ let updatedQuery = query.split(" ").map((word)=>word + "^2 " + word + "* " + word + "~2").join(" ");
+ let result = idx.search(updatedQuery);
+ let matches = {};
+ let data;
+ result.map((k)=>{
+ if (k.score < 0.5) return;
+ data = documents.find((post)=>k.ref === post.url);
+ let key = data.title.replaceAll(" ", "");
+ if (!matches[key]) {
+ matches[key] = {};
+ matches[key].data = [];
+ }
+ if (data.subheading == "") matches[key].url = data.url;
+ else matches[key].url = data.url.slice(0, data.url.indexOf("#"));
+ matches[key].data.push({
+ subheading: data.subheading,
+ url: data.url
+ });
+ matches[key].title = data.title;
+ matches[key].project = data.project;
+ matches[key].score = matches[key].score ? matches[key].score > k.score ? matches[key].score : k.score : k.score;
+ });
+ matches = Object.keys(matches).map((k)=>{
+ return matches[k];
+ }).sort(function(a, b) {
+ return b.score - a.score;
+ }).filter((k)=>{
+ return k.title != undefined;
+ });
+ this.searchResults.update(matches);
+ setChildren(this.modal, [
+ this.modalSearchBar,
+ this.searchResults
+ ]);
+ }
+}
+let searchModal = new SearchModal();
+let searchButton = new SearchButton(searchModal);
+
+},{"@parcel/transformer-js/src/esmodule-helpers.js":"j7FRh"}],"j7FRh":[function(require,module,exports,__globalThis) {
+exports.interopDefault = function(a) {
+ return a && a.__esModule ? a : {
+ default: a
+ };
+};
+exports.defineInteropFlag = function(a) {
+ Object.defineProperty(a, '__esModule', {
+ value: true
+ });
+};
+exports.exportAll = function(source, dest) {
+ Object.keys(source).forEach(function(key) {
+ if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) return;
+ Object.defineProperty(dest, key, {
+ enumerable: true,
+ get: function() {
+ return source[key];
+ }
+ });
+ });
+ return dest;
+};
+exports.export = function(dest, destName, get) {
+ Object.defineProperty(dest, destName, {
+ enumerable: true,
+ get: get
+ });
+};
+
+},{}],"hWZf7":[function(require,module,exports,__globalThis) {
+var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
+parcelHelpers.defineInteropFlag(exports);
+parcelHelpers.export(exports, "scrollSideMenu", ()=>scrollSideMenu);
+parcelHelpers.export(exports, "addCopyButtons", ()=>addCopyButtons);
+parcelHelpers.export(exports, "addAnchorLinks", ()=>addAnchorLinks);
+parcelHelpers.export(exports, "changelogFilter", ()=>changelogFilter);
+parcelHelpers.export(exports, "removeExpiredEvents", ()=>removeExpiredEvents);
+parcelHelpers.export(exports, "header", ()=>header);
+parcelHelpers.export(exports, "blogAd", ()=>blogAd);
+var header = new Headroom(document.querySelector("#topbar"), {
+ tolerance: 5,
+ offset: 80
+});
+var blogAd = new Headroom(document.querySelector("#blogSlogan"), {
+ tolerance: 5,
+ offset: 300
+});
+function scrollSideMenu() {
+ let sidemenu = document.querySelector("aside.menu");
+ if (sidemenu) {
+ let active = sidemenu.querySelector(".active");
+ if (active) {
+ active.parentElement.parentElement.parentElement.firstElementChild.checked = true;
+ active.parentElement.parentElement.classList.add("stay-open");
+ active.parentElement.parentElement.previousElementSibling.classList.add("stay-open");
+ active.scrollIntoView({
+ behavior: 'auto',
+ block: 'center',
+ inline: 'center',
+ behavior: 'smooth'
+ });
+ }
+ }
+}
+const svgCopy = '