From e38e48d8a54f541c0761b9fc5ede356a93de19d9 Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 9 Jul 2022 18:59:13 -0400 Subject: [PATCH] Compatibility improvements for Obsidian 0.15.5 + HE (Also, experimental support for Obsidian mobile: must be manually enabled via manifest.json!) --- main.js | 100 ++++++++++++++++---------------------- manifest.json | 2 +- src/History.ts | 2 +- src/PerWindowComponent.ts | 4 +- src/maximizing.ts | 84 ++++++++++++++------------------ src/pane-relief.ts | 4 +- versions.json | 2 +- 7 files changed, 86 insertions(+), 112 deletions(-) diff --git a/main.js b/main.js index 811ea49..94ce704 100644 --- a/main.js +++ b/main.js @@ -298,13 +298,13 @@ function installHistory(plugin) { /** * Efficiently update a class on a workspace item, only touching where changes are needed * - * @param item The workspace item to add or remove the class from + * @param el The element to add or remove the class from * @param cls The class to add or remove * @param state Boolean, flag to add or remove, defaults to opposite of current state * @returns boolean for the state of the class afterwards */ -function toggleClass(item, cls, state) { - const el = item.containerEl, had = el.classList.contains(cls); +function toggleClass(el, cls, state) { + const had = el.classList.contains(cls); state = state ?? !had; if (state !== had) { state ? el.classList.add(cls) : el.classList.remove(cls); @@ -331,16 +331,16 @@ class Maximizer extends obsidian.Component { setActiveLeaf(old) { return function setActiveLeaf(leaf, pushHistory, focus) { // We have to do this here so that MarkdownView can be focused in the new pane - const parent = self.parentFor(leaf), oldParent = self.parentFor(app.workspace.activeLeaf); + const parent = self.parentForLeaf(leaf), oldParent = self.parentForLeaf(app.workspace.activeLeaf); if (parent && oldParent && parent !== oldParent && - oldParent.containerEl?.matchParent(".hover-popover.is-active.snap-to-viewport") && - parent.containerEl?.ownerDocument === oldParent.containerEl.ownerDocument && - !parent.containerEl.matchParent(".hover-popover")) { + oldParent.matchParent(".hover-popover.is-active.snap-to-viewport") && + parent.ownerDocument === oldParent.ownerDocument && + !parent.matchParent(".hover-popover")) { // Switching from maximized popover to non-popover; de-maximize it first app.commands.executeCommandById("obsidian-hover-editor:restore-active-popover"); } if (parent) - self.refresh(parent, parent.containerEl.hasClass("should-maximize") ? leaf : null); + self.refresh(parent, parent.hasClass("should-maximize") ? leaf.containerEl : null); return old.call(this, leaf, pushHistory, focus); }; } @@ -352,14 +352,13 @@ class Maximizer extends obsidian.Component { this.refresh(parent, null); } toggleMaximize(leaf = app.workspace.activeLeaf) { - const parent = this.parentFor(leaf); + const parent = this.parentForLeaf(leaf); if (!parent) return; - const popoverEl = parent.containerEl.matchParent(".hover-popover"); + const popoverEl = parent.matchParent(".hover-popover"); if (popoverEl && app.plugins.plugins["obsidian-hover-editor"]) { // Check if single leaf in a popover - let count = 0; - app.workspace.iterateLeaves(() => { count++; }, parent); + let count = popoverEl.findAll(".workspace-leaf").length; if (count === 1) { // Maximize or restore the popover instead of the leaf app.commands.executeCommandById("obsidian-hover-editor:" + (popoverEl.hasClass("snap-to-viewport") ? "restore-active-popover" : "snap-active-popover-to-viewport")); @@ -367,65 +366,47 @@ class Maximizer extends obsidian.Component { } } if (parent) - this.refresh(parent, toggleClass(parent, "should-maximize") ? leaf : null); + this.refresh(parent, toggleClass(parent, "should-maximize") ? leaf.containerEl : null); } lastMaximized(parent) { - let result = null; - app.workspace.iterateLeaves(leaf => { if (leaf.containerEl.hasClass("is-maximized")) - result = leaf; }, parent); - return result || app.workspace.getMostRecentLeaf(); - } - refresh(parent, leaf = parent.containerEl.hasClass("should-maximize") ? this.lastMaximized(parent) : null) { - function walk(parent) { - let haveMatch = false, match = false; - for (const item of parent.children) { - if (item instanceof obsidian.WorkspaceLeaf) { - toggleClass(item, "is-maximized", match = (leaf === item)); - } - else if (item instanceof obsidian.WorkspaceParent) { - match = walk(item); - } - haveMatch || (haveMatch = match); - } - return toggleClass(parent, "has-maximized", haveMatch); - } - const hadMax = parent.containerEl.hasClass("has-maximized"); - if (!walk(parent)) { + return parent.find(".workspace-leaf.is-maximized") || app.workspace.getMostRecentLeaf().containerEl; + } + refresh(parent, leafEl = parent.hasClass("should-maximize") ? this.lastMaximized(parent) : null) { + const hadMax = parent.hasClass("has-maximized"); + parent.findAllSelf(".workspace-split").forEach(split => { + if (split === parent || this.parentFor(split) === parent) + toggleClass(split, "has-maximized", leafEl ? split.contains(leafEl) : false); + }); + parent.findAll(".workspace-leaf").forEach(leaf => { + if (this.parentFor(leaf) === parent) + toggleClass(leaf, "is-maximized", leaf === leafEl); + }); + if (!leafEl || !parent.contains(leafEl)) { toggleClass(parent, "should-maximize", false); if (hadMax) this.fixSlidingPanes(); } } parents() { - const parents = [app.workspace.rootSplit]; - parents.concat(app.workspace.floatingSplit?.children ?? []); + const parents = [app.workspace.rootSplit.containerEl]; + parents.concat((app.workspace.floatingSplit?.children ?? []).map(i => i.containerEl)); const popovers = app.plugins.plugins["obsidian-hover-editor"]?.activePopovers; if (popovers) for (const popover of popovers) { if (popover.rootSplit) - parents.push(popover.rootSplit); + parents.push(popover.rootSplit.containerEl); } return parents; } - parentFor(leaf) { - if (!leaf || leaf.containerEl.matchParent(".workspace-tabs")) - return null; - const container = leaf.getContainer?.(); - if (container && container.containerEl.hasClass("mod-root")) - return container; - const popoverEl = leaf.containerEl.matchParent(".hover-popover"); - if (popoverEl) { - const popovers = app.plugins.plugins["obsidian-hover-editor"]?.activePopovers; - if (popovers) - for (const popover of popovers) { - if (popoverEl.contains(popover.rootSplit.containerEl)) - return popover.rootSplit; - } - } - return app.workspace.rootSplit; + parentForLeaf(leaf) { + return this.parentFor(leaf.containerEl); + } + parentFor(el) { + return el.matchParent(".workspace-split.mod-root, .hover-popover > .popover-content > .workspace-split"); } } +//import { use } from "ophidian"; /** * Component that belongs to a plugin + window. e.g.: * @@ -454,6 +435,11 @@ class PerWindowComponent extends obsidian.Component { this.plugin = plugin; this.win = win; } + /*static [use.me], P extends Plugin>( + key: new (plugin: P, win: Window) => T + ) { + return this.perWindow(use(Plugin)); + }*/ get root() { return containerForWindow(this.win); } @@ -481,9 +467,9 @@ class WindowManager extends obsidian.Component { const { workspace } = app; this.watching = true; this.registerEvent(workspace.on("window-open", (_, win) => { - workspace.onLayoutReady(() => setImmediate(() => this.forWindow(win))); + workspace.onLayoutReady(() => Promise.resolve().then(() => this.forWindow(win))); })); - workspace.onLayoutReady(() => setImmediate(() => this.forAll())); + workspace.onLayoutReady(() => Promise.resolve().then(() => this.forAll())); } return this; } @@ -912,7 +898,7 @@ class PaneRelief extends obsidian.Plugin { [command("put-8th", "Place as 8th pane in the split", "Mod+Alt+8")]() { return () => this.placeLeaf(7, false); }, [command("put-last", "Place as last pane in the split", "Mod+Alt+9")]() { return () => this.placeLeaf(99999999, false); }, [command("maximize", "Maximize active pane (Toggle)", [])]() { - if (this.max.parentFor(app.workspace.activeLeaf)) + if (this.max.parentForLeaf(app.workspace.activeLeaf)) return () => this.max.toggleMaximize(); }, }); @@ -1017,4 +1003,4 @@ function gotoNth(items, current, n, relative) { } module.exports = PaneRelief; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsic3JjL2NvbW1hbmRzLnRzIiwibm9kZV9tb2R1bGVzLy5wbnBtL21vbmtleS1hcm91bmRAMi4zLjAvbm9kZV9tb2R1bGVzL21vbmtleS1hcm91bmQvbWpzL2luZGV4LmpzIiwic3JjL0hpc3RvcnkudHMiLCJzcmMvbWF4aW1pemluZy50cyIsInNyYy9QZXJXaW5kb3dDb21wb25lbnQudHMiLCJzcmMvTmF2aWdhdG9yLnRzIiwic3JjL3BhbmUtcmVsaWVmLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIFNpbXBsaWZpZWQgQ29tbWFuZHMgRnJhbWV3b3JrXG5cbmltcG9ydCB7Q29tbWFuZCwgSG90a2V5LCBNb2RpZmllciwgUGx1Z2lufSBmcm9tIFwib2JzaWRpYW5cIlxuXG50eXBlIEtleURlZiA9IEhvdGtleSB8IHN0cmluZ1xuXG5jb25zdCBjb21tYW5kczogUmVjb3JkPHN5bWJvbCwgQ29tbWFuZD4gPSB7fTsgLy9uZXcgTW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AgICAgICAgICAgICAgICAgcmVzdWx0ID0gYXdhaXQgb2xkLmNhbGwodGhpcywgc3RhdGUsIC4uLmV0Yyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghcmVzdWx0KSByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc3RhdGVbU0VSSUFMX1BST1BdKSByZXN1bHRbSElTVF9BVFRSXSA9IG5ldyBIaXN0b3J5KHJlc3VsdCwgc3RhdGVbU0VSSUFMX1BST1BdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH19LFxuICAgICAgICAvLyBNb25rZXlwYXRjaDoga2VlcCBPYnNpZGlhbiBmcm9tIHB1c2hpbmcgaGlzdG9yeSBpbiBzZXRBY3RpdmVMZWFmXG4gICAgICAgIHNldEFjdGl2ZUxlYWYob2xkKSB7IHJldHVybiBmdW5jdGlvbiBzZXRBY3RpdmVMZWFmKGxlYWYsIC4uLmV0Yykge1xuICAgICAgICAgICAgY29uc3QgdW5zdWIgPSBhcm91bmQodGhpcywge1xuICAgICAgICAgICAgICAgIHJlY29yZEhpc3Rvcnkob2xkKSB7IHJldHVybiBmdW5jdGlvbiAobGVhZjogV29ya3NwYWNlTGVhZiwgX3B1c2g6IGJvb2xlYW4sIC4uLmFyZ3M6IGFueVtdKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEFsd2F5cyB1cGRhdGUgc3RhdGUgaW4gcGxhY2VcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9sZC5jYWxsKHRoaXMsIGxlYWYsIGZhbHNlLCAuLi5hcmdzKTtcbiAgICAgICAgICAgICAgICB9OyB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9sZC5jYWxsKHRoaXMsIGxlYWYsIC4uLmV0Yyk7XG4gICAgICAgICAgICB9IGZpbmFsb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hvdmVyLXBvcG92ZXJcIilcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gU3dpdGNoaW5nIGZyb20gbWF4aW1pemVkIHBvcG92ZXIgdG8gbm9uLXBvcG92ZXI7IGRlLW1heGltaXplIGl0IGZpcnN0XG4gICAgICAgICAgICAgICAgICAgIGFwcC5jb21tYW5kcy5leGVjdXRlQ29tbWFuZEJ5SWQoXCJvYnNpZGlhbi1ob3Zlci1lZGl0b3I6cmVzdG9yZS1hY3RpdmUtcG9wb3ZlclwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHBhcmVudCkgc2VsZi5yZWZyZXNoKHBhcmVudCwgcGFyZW50LmNvbnRhaW5lckVsLmhhc0NsYXNzKFwic2hvdWxkLW1heGltaXplXCIpID8gbGVhZiA6IG51bGwpO1xuICAgICAgICAgICAgICAgIHJldHVybiBvbGQuY2FsbCh0aGlzLCBsZWFmLCBwdXNoSGlzdG9yeSwgZm9jdXMpO1xuICAgICAgICAgICAgfX1cbiAgICAgICAgfSkpO1xuICAgIH1cblxuICAgIG9udW5sb2FkKCkge1xuICAgICAgICAvLyBVbi1tYXhpbWl6ZSBhbGwgcGFuZXNcbiAgICAgICAgZm9yIChjb25zdCBwYXJlbnQgb2YgdGhpcy5wYXJlbnRzKCkpIHRoaXMucmVmcmVzaChwYXJlbnQsIG51bGwpO1xuICAgIH1cblxuICAgIHRvZ2dsZU1heGltaXplKGxlYWYgPSBhcHAud29ya3NwYWNlLmFjdGl2ZUxlYWYpIHtcbiAgICAgICAgY29uc3QgcGFyZW50ID0gdGhpcy5wYXJlbnRGb3IobGVhZik7XG4gICAgICAgIGlmICghcGFyZW50KSByZXR1cm47XG4gICAgICAgIGNvbnN0IHBvcG92ZXJFbCA9IHBhcmVudC5jb250YWluZXJFbC5tYXRjaFBhcmVudChcIi5ob3Zlci1wb3BvdmVyXCIpO1xuICAgICAgICBpZiAocG9wb3ZlckVsICYmIGFwcC5wbHVnaW5zLnBsdWdpbnNbXCJvYnNpZGlhbi1ob3Zlci1lZGl0b3JcIl0pIHtcbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHNpbmdsZSBsZWFmIGluIGEgcG9wb3ZlclxuICAgICAgICAgICAgbGV0IGNvdW50ID0gMDsgYXBwLndvcmtzcGFjZS5pdGVyYXRlTGVhdmVzKCgpID0+IHsgY291bnQrKzsgfSwgcGFyZW50KTtcbiAgICAgICAgICAgIGlmIChjb3VudCA9PT0gMSkge1xuICAgICAgICAgICAgICAgIC8vIE1heGltaXplIG9yIHJlc3RvcmUgdGhlIHBvcG92ZXIgaW5zdGVhZCBvZiB0aGUgbGVhZlxuICAgICAgICAgICAgICAgIGFwcC5jb21tYW5kcy5leGVjdXRlQ29tbWFuZEJ5SWQoXG4gICAgICAgICAgICAgICAgICAgIFwib2JzaWRpYW4taG92ZXItZWRpdG9yOlwiICsgKFxuICAgICAgICAgICAgICAgICAgICAgICAgcG9wb3ZlckVsLmhhc0NsYXNzKFwic25hcC10by12aWV3cG9ydFwiKSA/IFwicmVzdG9yZS1hY3RpdmUtcG9wb3ZlclwiIDogXCJzbmFwLWFjdGl2ZS1wb3BvdmVyLXRvLXZpZXdwb3J0XCJcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChwYXJlbnQpIHRoaXMucmVmcmVzaChwYXJlbnQsIHRvZ2dsZUNsYXNzKHBhcmVudCwgXCJzaG91bGQtbWF4aW1pemVcIikgPyBsZWFmIDogbnVsbCk7XG4gICAgfVxuXG4gICAgbGFzdE1heGltaXplZChwYXJlbnQ6IFdvcmtzcGFjZVBhcmVudCkge1xuICAgICAgICBsZXQgcmVzdWx0OiBXb3Jrc3BhY2VMZWFmID0gbnVsbDtcbiAgICAgICAgYXBwLndvcmtzcGFjZS5pdGVyYXRlTGV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92ZXIgb2YgcG9wb3ZlcnMpIHtcbiAgICAgICAgICAgIGlmIChwb3BvdmVyLnJvb3RTcGxpdCkgcGFyZW50cy5wdXNoKHBvcG92ZXIucm9vdFNwbGl0KVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBwYXJlbnRzO1xuICAgIH1cblxuICAgIHBhcmVudEZvcihsZWFmOiBXb3Jrc3BhY2VMZWFmKTogV29ya3NwYWNlUGFyZW50IHtcbiAgICAgICAgaWYgKCFsZWFmIHx8IGxlYWYuY29udGFpbmVyRWwubWF0Y2hQYXJlbnQoXCIud29ya3NwYWNlLXRhYnNcIikpIHJldHVybiBudWxsO1xuICAgICAgICBjb25zdCBjb250YWluZXIgPSBsZWFmLmdldENvbnRhaW5lcj8uKCk7XG4gICAgICAgIGlmIChjb250YWluZXIgJiYgY29udGFpbmVyLmNvbnRhaW5lckVsLmhhc0NsYXNzKFwibW9kLXJvb3RcIikpIHJldHVybiBjb250YWluZXI7XG4gICAgICAgIGNvbnN0IHBvcG92ZXJFbCA9IGxlYWYuY29udGFpbmVyRWwubWF0Y2hQYXJlbnQoXCIuaG92ZXItcG9wb3ZlclwiKTtcbiAgICAgICAgaWYgKHBvcG92ZXJFbCkge1xuICAgICAgICAgICAgY29uc3QgcG9wb3ZlcnMgPSBhcHAucGx1Z2lucy5wbHVnaW5zW1wib2JzaWRpYW4taG92ZXItZWRpdG9yXCJdPy5hY3RpdmVQb3BvdmVycztcbiAgICAgICAgICAgIGlmIChwb3BvdmVycykgZm9yIChjb25zdCBwb3BvdmVyIG9mIHBvcG92ZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBvcG92ZXJFbC5jb250YWlucyhwb3BvdmVyLnJvb3RTcGxpdC5jb250YWluZXJFbCkpIHJldHVybiBwb3BvdmVyLnJvb3RTcGxpdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXBwLndvcmtzcGFjZS5yb290U3BsaXQ7XG4gICAgfVxufSIs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k6IFQ7XG4gICAgZm9yV2luZG93KHdpbjogV2luZG93KTogVDtcbiAgICBmb3JXaW5kb3cod2luOiBXaW5kb3csIGNyZWF0ZTogdHJ1ZSk6IFQ7XG4gICAgZm9yV2luZG93KHdpbjogV2luZG93LCBjcmVhdGU6IGJvb2xlYW4pOiBUIHwgdW5kZWZpbmVkO1xuXG4gICAgZm9yV2luZG93KHdpbjogV2luZG93ID0gd2luZG93LmFjdGl2ZVdpbmRvdyA/PyB3aW5kb3csIGNyZWF0ZSA9IHRydWUpOiBUIHwgdW5kZWZpbmVkIHtcbiAgICAgICAgbGV0IGluc3QgPSB0aGlzLmluc3RhbmNlcy5nZXQod2luKTtcbiAgICAgICAgaWYgKCFpbnN0ICYmIGNyZWF0ZSkge1xuICAgICAgICAgICAgaW5zdCA9IG5ldyB0aGlzLmZhY3RvcnkodGhpcy5wbHVnaW4sIHdpbik7XG4gICAgICAgICAgICBpZiAoaW5zdCkge1xuICAgICAgICAgICAgICAgIHRoaXMuaW5zdGFuY2VzLnNldCh3aW4sIGluc3QhKTtcbiAgICAgICAgICAgICAgICBpbnN0LnJlZ2lzdGVyRG9tRXZlbnQod2luLCBcImJlZm9yZXVubG9hZFwiLCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlQ2hpbGQoaW5zdCEpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmluc3RhbmNlcy5kZWxldGUod2luKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLmFkZENoaWxkKGluc3QpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpbnN0IHx8IHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICBmb3JEb20oZWw6IEhUTUxFbGVtZW50KTogVDtcbiAgICBmb3JEb20oZWw6IEhUTUxFbGVtZW50LCBjcmVhdGU6IHRydWUpOiBUO1xuICAgIGZvckRvbShlbDogSFRNTEVsZW1lbnQsI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sdCgpOyBlLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgLy8gRG8gdGhlIG5hdmlnYXRpb25cbiAgICAgICAgICAgIHRoaXMuaGlzdG9yeT8uW3RoaXMua2luZF0oKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnJlZ2lzdGVyKCgpID0+IHRoaXMuY29udGFpbmVyRWwucmVtb3ZlRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsIG9uQ2xpY2ssIHRydWUpKTtcbiAgICAgICAgdGhpcy5jb250YWluZXJFbC5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgb25DbGljaywgdHJ1ZSk7XG4gICAgICAgIHRoaXMucmVnaXN0ZXIoXG4gICAgICAgICAgICAvLyBTdXBwb3J0IFwiQ3VzdG9taXphYmxlIFBhZ2UgSGVhZGVyIGFuZCBUaXRsZSBCYXJcIiBidXR0b25zXG4gICAgICAgICAgICBvbkVsZW1lbnQoXG4gICAgICAgICAgICAgICAgdGhpcy5vd25lci53aW4uZG9jdW1lbnQuYm9keSxcbiAgICAgICAgICAgICAgICBcImNvbnRleHRtZW51XCIsXG4gICAgICAgICAgICAgICAgYC52aWV3LWhlYWRlciA+IC52aWV3LWFjdGlvbnMgPiAudmlldy1hY3Rpb25bY2xhc3MqPVwiYXBwOmdvLSR7dGhpcy5raW5kfVwiXWAsXG4gICAgICAgICAgICAgICAgKGV2dCwgdGFyZ2V0KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsID0gdGFyZ2V0Lm1hdGNoUGFyZW50KFwiLndvcmtzcGFjZS1sZWFmXCIpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBsZWFmID0gdGhpcy5vd25lci5sZWF2ZXMoKS5maWx0ZXIobGVhZiA9PiBsZWFmLmNvbnRhaW5lckVsID09PSBlbCkucG9wKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghbGVhZikgcmV0dXJuO1xuICAgICAgICAg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1ZTtcbiAgICAgICAgbWVudS5vbkhpZGUoKCkgPT4geyB0aGlzLm93bmVyLmhpc3RvcnlJc09wZW4gPSBmYWxzZTsgdGhpcy5vd25lci5kaXNwbGF5KCk7IH0pO1xuICAgIH1cblxuICAgIG1lbnVJdGVtKGluZm86IEZpbGVJbmZvLCBpZHg6IG51bWJlciwgbWVudTogTWVudSwgaGlzdG9yeTogSGlzdG9yeSkge1xuICAgICAgICBjb25zdCB7ZGlyLCBraW5kfSA9IHRoaXM7XG4gICAgICAgIG1lbnUuYWRkSXRlbShpID0+IHsgY3JlYXRlSXRlbShpKTsgaWYgKGluZm8uZmlsZSkgc2V0dXBGaWxlRXZlbnRzKGkuZG9tKTsgfSk7XG4gICAgICAgIHJldHVybjtcblxuICAgICAgICBmdW5jdGlvbiBjcmVhdGVJdGVtKGk6IE1lbnVJdGVtLCBwcmVmaXg9XCJcIikge1xuICAgICAgICAgICAgaS5zZXRJY29uKGluZm8uaWNvbikuc2V0VGl0bGUocHJlZml4ICsgaW5mby50aXRsZSkub25DbGljayhlID0+IHtcbiAgICAgICAgICAgICAgICAvLyBDaGVjayBmb3IgY3RybC9jbWQvbWlkZGxlIGJ1dHRvbiBhbmQgc3BsaXQgbGVhZiArIGNvcHkgaGlzdG9yeVxuICAgICAgICAgICAgICAgIGlmIChLZXltYXAuaXNNb2RpZmllcihlLCBcIk1vZFwiKSB8fCAxID09PSAoZSBhcyBNb3VzZUV2ZW50KS5idXR0b24pIHtcbiAgICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IGhpc3RvcnkuY2xvbmVUbyhhcHAud29ya3NwYWNlLnNwbGl0QWN0aXZlTGVhZigpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaGlzdG9yeS5nbygoaWR4KzEpICogZGlyLCB0cnVlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gc2V0dXBGaWxlRXZlbnRzKGRvbTogSFRN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b3ZlclwiKSkpXG4gICAgICAgICAgICAgICAgICAgIG5laWdoYm9yID0gdG9Qb3MgPCAwID8gbmVpZ2hib3IucHJldmlvdXNFbGVtZW50U2libGluZyA6IG5laWdoYm9yLm5leHRFbGVtZW50U2libGluZztcbiAgICAgICAgICAgICAgICBpZiAobmVpZ2hib3IpIHJldHVybiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b1BvcyA8IDApIG5laWdoYm9yLnBhcmVudEVsZW1lbnQuaW5zZXJ0QmVmb3JlKHBvcG92ZXJFbCwgbmVpZ2hib3IpO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIG5laWdoYm9yLnBhcmVudEVsZW1lbnQuaW5zZXJ0QmVmb3JlKG5laWdoYm9yLCBwb3BvdmVyRWwpO1xuICAgICAgICAgICAgICAgICAgICBhcHAud29ya3NwYWNlLm9uTGF5b3V0Q2hhbmdlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHJlbGF0aXZlKSB7XG4gICAgICAgICAgICB0b1BvcyArPSBmcm9tUG9zO1xuICAgICAgICAgICAgaWYgKHRvUG9zIDwgMCB8fCB0b1BvcyA+PSBjaGlsZHJlbi5sZW5ndGgpIHJldHVybiBmYWxzZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICh0b1BvcyA+PSBjaGlsZHJlbi5sZW5ndGgpIHRvUG9zID0gY2hpbGRyZW4ubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgIGlmICh0b1BvcyA8IDApIHRvUG9zID0gMDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmcm9tUG9zID09IHRvUG9zKSByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG90aGVyID0gY2hpbGRyZW5bdG9Qb3NdO1xuICAgICAgICAgICAgY2hpbGRyZW4uc3BsaWNl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O1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgcGFyZW50ICYmIG9sZFBhcmVudCAmJiBwYXJlbnQgIT09IG9sZFBhcmVudCAmJlxuICAgICAgICAgICAgICAgICAgICBvbGRQYXJlbnQubWF0Y2hQYXJlbnQoXCIuaG92ZXItcG9wb3Zlci5pcy1hY3RpdmUuc25hcC10by12aWV3cG9ydFwiKSAmJlxuICAgICAgICAgICAgICAgICAgICBwYXJlbnQub3duZXJEb2N1bWVudCA9PT0gb2xkUGFyZW50Lm93bmVyRG9jdW1lbnQgJiZcbiAgICAgICAgICAgICAgICAgICAgIXBhcmVudC5tYXRjaFBhcmVudChcIi5ob3Zlci1wb3BvdmVyXCIpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFN3aXRjaGluZyBmcm9tIG1heGltaXplZCBwb3BvdmVyIHRvIG5vbi1wb3BvdmVyOyBkZS1tYXhpbWl6ZSBpdCBmaXJzdFxuICAgICAgICAgICAgICAgICAgICBhcHAuY29tbWFuZHMuZXhlY3V0ZUNvbW1hbmRCeUlkKFwib2JzaWRpYW4taG92ZXItZWRpdG9yOnJlc3RvcmUtYWN0aXZlLXBvcG92ZXJcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChwYXJlbnQpIHNlbGYucmVmcmVzaChwYXJlbnQsIHBhcmVudC5oYXNDbGFzcyhcInNob3VsZC1tYXhpbWl6ZVwiKSA/IGxlYWYuY29udGFpbmVyRWwgOiBudWxsKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gb2xkLmNhbGwodGhpcywgbGVhZiwgcHVzaEhpc3RvcnksIGZvY3VzKTtcbiAgICAgICAgICAgIH19XG4gICAgICAgIH0pKTtcbiAgICB9XG5cbiAgICBvbnVubG9hZCgpIHtcbiAgICAgICAgLy8gVW4tbWF4aW1pemUgYWxsIHBhbmVzXG4gICAgICAgIGZvciAoY29uc3QgcGFyZW50I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AgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAocGFyZW50KSB0aGlzLnJlZnJlc2gocGFyZW50LCB0b2dnbGVDbGFzcyhwYXJlbnQsIFwic2hvdWxkLW1heGltaXplXCIpID8gbGVhZi5jb250YWluZXJFbCA6IG51bGwpO1xuICAgIH1cblxuICAgIGxhc3RNYXhpbWl6ZWQocGFyZW50OiBFbGVtZW50KSB7XG4gICAgICAgIHJldHVybiBwYXJlbnQuZmluZChcIi53b3Jrc3BhY2UtbGVhZi5pcy1tYXhpbWl6ZWRcIikgfHwgYXBwLndvcmtzcGFjZS5nZXRNb3N0UmVjZW50TGVhZigpLmNvbnRhaW5lckVsO1xuICAgIH1cblxuICAgIGZpeFNsaWRpbmdQYW5lcyA9IGRlYm91bmNlKCgpID0+IHtcbiAgICAgICAgaWYgKChhcHAucGx1Z2lucy5wbHVnaW5zIGFzIGFueSlbXCJzbGlkaW5nLXBhbmVzLW9ic2lkaWFuXCJdKSB7XG4gICAgICAgICAgICBhcHAud29ya3NwYWNlLm9uTGF5b3V0Q2hhbmdlKCk7XG4gICAgICAgICAgICBhcHAud29ya3NwYWNlLnJlcXVlc3RBY3RpdmVMZWFmRXZlbnRzKCk7XG4gICAgICAgIH1cbiAgICB9LCA1KTtcblxuICAgIHJlZnJlc2goXG4gICAgICAgIHBhcmVudDogRWxlbWVudCxcbiAgICAgICAgbGVhZkVsOiBFbGVtZW50ID1cbiAgICAgICAgICAgIHBhcmVudC5oYXNDbGFzcyhcInNob3VsZC1tYXhpbWl6ZVwiKSA/IHRoaXMubGFzdE1heGltaXplZChwYXJlbnQpIDogbnVsbFxuICAgICkge1xuICAgICAgICBjb25zdCBoYWRNYXggPSBwYXJlbnQuaGFzQ2xhc3MoXCJoYXMtbWF4aW1pemVkXCIpO1xuICAgICAgICBwYXJlbnQuZmluZEFsbFNlbGYoXCIud29ya3NwYWNlLXNwbGl0XCIpLmZvckVhY2goc3Bsa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3aW46IFdpbmRvdykgPT4gVFxuICAgICkge1xuICAgICAgICByZXR1cm4gdGhpcy5wZXJXaW5kb3codXNlKFBsdWdpbikpO1xuICAgIH0qL1xuXG4gICAgZ2V0IHJvb3QoKTogV29ya3NwYWNlUGFyZW50IHtcbiAgICAgICAgcmV0dXJuIGNvbnRhaW5lckZvcldpbmRvdyh0aGlzLndpbik7XG4gICAgfVxuXG4gICAgY29uc3RydWN0b3IocHVibGljIHBsdWdpbjogUCwgcHVibGljIHdpbjogV2luZG93KSB7XG4gICAgICAgIHN1cGVyKCk7XG4gICAgfVxuXG4gICAgc3RhdGljIHBlcldpbmRvdzxUIGV4dGVuZHMgUGVyV2luZG93Q29tcG9uZW50PFA+LCBQIGV4dGVuZHMgUGx1Z2luPihcbiAgICAgICAgdGhpczogbmV3IChwbHVnaW46IFAsIHdpbjogV2luZG93KSA9PiBULFxuICAgICAgICBwbHVnaW46IFBcbiAgICApIHtcbiAgICAgICAgcmV0dXJuIG5ldyBXaW5kb3dNYW5hZ2VyKHBsdWdpbiwgdGhpcyk7XG4gICAgfVxufVxuXG4vKipcbiAqIE1hbmFnZSBwZXItd2luZG93IGNvbXBvbmVudHNcbiAqL1xuZXhwb3J0IGNsYXNzIFdpbmRvd01hbmFnZXI8VCBleHRlbmRzIFBlcldpbmRvd0NvbXBvbmVudDxQPiwgUCBleHRlbmRzIFBsdWdpbj4gZXh0ZW5kcyBDb21wb25lbnQge1xuICAgIGluc3RhbmNlcyA9IG5ldyBXZWFrTWFwPFdpbmRvdywgVD4oKTtcblxuICAgIHdhdGNoaW5nOiBib29sZWFuID0gZmFsc2VcblxuICAgIGNvbnN0cnVjdG9yIChcbiAgICAgICAgcHVibGljIHBsdWdpbjogUCxcbiAgICAgICAgcHVibGljIGZhY3Rvcnk6IG5ldyAocGx1Z2luOiBQLCB3aW46IFdpbmRvdykgPT4gVCwgIC8vIFRoZSBjbGFzcyBvZiB0aGluZyB0byBtYW5hZ2VcbiAgICApIHtcbiAgICAgICAgc3VwZXIoKTtcbiAgICAgICAgcGx1Z2luLmFkZENoaWxkKHRoaXMpO1xuICAgIH1cblxuICAgIHdhdGNoKCk6IHRoaXMge1xuICAgICAgICAvLyBEZWZlciB3YXRjaCB1bnRpbCBwbHVnaW4gaXMgbG9hZGVkXG4gICAgICAgIGlmICghdGhpcy5fbG9hZGVkKSB0aGlzLm9ubG9hZCA9ICgpID0+IHRoaXMud2F0Y2goKTtcbiAgICAgICAgZWxzZSBpZiAoIXRoaXMud2F0Y2hpbmcpIHtcbiAgICAgICAgICAgIGNvbnN0IHt3b3Jrc3BhY2V9ID0gYXBwO1xuICAgICAgICAgICAgdGhpcy53YXRjaGluZyA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLnJlZ2lzdGVyRXZlbnQoXG4gICAgICAgICAgICAgICAgd29ya3NwYWNlLm9uKFwid2luZG93LW9wZW5cIiwgKF8sIHdpbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICB3b3Jrc3BhY2Uub25MYXlvdXRSZWFkeSgoKSA9PiBQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpID0+IHRoaXMuZm9yV2luZG93KHdpbikpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHdvcmtzcGFjZS5vbkxheW91dFJlYWR5KCgpID0+IFByb21pc2UucmVzb2x2ZSgpLnRoZW4oKCkgPT4gdGhpcy5mb3JBbGwoKSkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGZvcldpbmRvdygpOiBUO1xuICAgIGZvcldpbmRvdyh3aW46IFdpbmRvdyk6IFQ7XG4gICAgZm9yV2luZG93KHdpbjogV2luZG93LCBjcmVhdGU6IHRydWUpOiBUO1xuICAgIGZvcldpbmRvdyh3aW46IFdpbmRvdywgY3JlYXRlOiBib29sZWFuKTogVCB8IHVuZGVmaW5lZDtcblxuICAgIGZvcldpbmRvdyh3aW46IFdpbmRvdyA9IH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hcmQudXBkYXRlRGlzcGxheShoaXN0b3J5LCBmd2QpO1xuICAgICAgICBpZiAoYmFjaykgdGhpcy5iYWNrLnVwZGF0ZURpc3BsYXkoaGlzdG9yeSwgYmFjayk7XG4gICAgfVxuXG4gICAgbnVtYmVyUGFuZXMoKSB7XG4gICAgICAgIHRoaXMud2luLnJlcXVlc3RBbmltYXRpb25GcmFtZSgoKSA9PiB7XG4gICAgICAgICAgICAvLyB1bm51bWJlciBzaWRlYmFyIHBhbmVzIGluIG1haW4gd2luZG93LCBpZiBzb21ldGhpbmcgd2FzIG1vdmVkIHRoZXJlXG4gICAgICAgICAgICBpZiAodGhpcy53aW4gPT09IHdpbmRvdykgdGhpcy51bk51bWJlclBhbmVzKFwiLndvcmtzcGFjZS10YWJzID4gLndvcmtzcGFjZS1sZWFmXCIpO1xuICAgICAgICAgICAgbGV0IGNvdW50ID0gMCwgbGFzdExlYWY6IFdvcmtzcGFjZUxlYWYgPSBudWxsO1xuICAgICAgICAgICAgdGhpcy5sZWF2ZXMoKS5mb3JFYWNoKGxlYWYgPT4ge1xuICAgICAgICAgICAgICAgIGxlYWYuY29udGFpbmVyRWwuc3R5bGUuc2V0UHJvcGVydHkoXCItLXBhbmUtcmVsaWVmLWxhYmVsXCIsICsrY291bnQgPCA5ID8gXCJcIitjb3VudCA6IFwiXCIpO1xuICAgICAgICAgICAgICAgIGxlYWYuY29udGFpbmVyRWwudG9nZ2xlQ2xhc3MoXCJoYXMtcGFuZS1yZWxpZWYtbGFiZWxcIiwgY291bnQ8OSk7XG4gICAgICAgICAgICAgICAgbGFzdExlYWYgPSBsZWFmO1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlTGVhZihsZWFmKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNvdW50PjgpIHtcbiAgICAgICAgICAgICAgICBsYXN0TGVhZj8uY29udGFpbmVyRWwuc3R5bGUuc2V0UHJvcGVydHkoXCItLXBhbmUtcmVsaWVmLWxhYm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iAgICAgICAgdGhpcy5yZWdpc3RlcigoKSA9PiB0aGlzLmNvbnRhaW5lckVsLnJlbW92ZUV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCBvbkNsaWNrLCB0cnVlKSk7XG4gICAgICAgIHRoaXMuY29udGFpbmVyRWwuYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsIG9uQ2xpY2ssIHRydWUpO1xuICAgICAgICB0aGlzLnJlZ2lzdGVyKFxuICAgICAgICAgICAgLy8gU3VwcG9ydCBcIkN1c3RvbWl6YWJsZSBQYWdlIEhlYWRlciBhbmQgVGl0bGUgQmFyXCIgYnV0dG9uc1xuICAgICAgICAgICAgb25FbGVtZW50KFxuICAgICAgICAgICAgICAgIHRoaXMub3duZXIud2luLmRvY3VtZW50LmJvZHksXG4gICAgICAgICAgICAgICAgXCJjb250ZXh0bWVudVwiLFxuICAgICAgICAgICAgICAgIGAudmlldy1oZWFkZXIgPiAudmlldy1hY3Rpb25zID4gLnZpZXctYWN0aW9uW2NsYXNzKj1cImFwcDpnby0ke3RoaXMua2luZH1cIl1gLFxuICAgICAgICAgICAgICAgIChldnQsIHRhcmdldCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbCA9IHRhcmdldC5tYXRjaFBhcmVudChcIi53b3Jrc3BhY2UtbGVhZlwiKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGVhZiA9IHRoaXMub3duZXIubGVhdmVzKCkuZmlsdGVyKGxlYWYgPT4gbGVhZi5jb250YWluZXJFbCA9PT0gZWwpLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWxlYWYpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgZXZ0LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgIGV2dC5zdG9wSW1tZWRpYXRlUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcGVuTWVudShldnQsIEhpc3RvcnkuZ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50cmlnZ2VyKCdob3Zlci1saW5rJywge1xuICAgICAgICAgICAgICAgICAgICBldmVudDogZSwgc291cmNlOiBOYXZpZ2F0b3IuaG92ZXJTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgIGhvdmVyUGFyZW50OiBtZW51LmRvbSwgdGFyZ2V0RWw6IGRvbSwgbGlua3RleHQ6IGluZm8uZmlsZS5wYXRoXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gRHJhZyBtZW51IGl0ZW0gdG8gbW92ZSBvciBsaW5rIGZpbGVcbiAgICAgICAgICAgIGRvbS5zZXRBdHRyKCdkcmFnZ2FibGUnLCAndHJ1ZScpO1xuICAgICAgICAgICAgZG9tLmFkZEV2ZW50TGlzdGVuZXIoJ2RyYWdzdGFydCcsIGUgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGRyYWdNYW5hZ2VyID0gYXBwLmRyYWdNYW5hZ2VyO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRyYWdEYXRhID0gZHJhZ01hbmFnZXIuZHJhZ0ZpbGUoZSwgaW5mby5maWxlKTtcbiAgICAgICAgICAgICAgICBkcmFnTWFuYWdlci5vbkRyYWdTdGFydChlLCBkcmFnRGF0YSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGRvbS5hZGRFdmVudExpc3RlbmVyKCdkcmFnZW5kJywgZSA9PiBtZW51LmhpZGUoKSk7XG5cbiAgICAgICAgICAgIC8vIEZpbGUgbWVudVxuICAgICAgICAgICAgZG9tLmFkZEV2ZW50TGlzdGVuZXIoXCJjb250ZXh0bWVudVwiLCBlID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBtZW51ID0gbmV3IE1lbnUoKTtcbiAgICAgICAgICAgICAgICBtZW51LmFkZEl0ZW0oaSA9PiBjcmVhdGVJdGVtKGksIGBHbyAke2tpbmR9IHRvIGApKS5hZGRTZXBhcmF0b3IoKTtcbiAgICAgICAgIC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tcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRvUG9zIDwgMCkgbmVpZ2hib3IucGFyZW50RWxlbWVudC5pbnNlcnRCZWZvcmUocG9wb3ZlckVsLCBuZWlnaGJvcik7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgbmVpZ2hib3IucGFyZW50RWxlbWVudC5pbnNlcnRCZWZvcmUobmVpZ2hib3IsIHBvcG92ZXJFbCk7XG4gICAgICAgICAgICAgICAgICAgIGFwcC53b3Jrc3BhY2Uub25MYXlvdXRDaGFuZ2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocmVsYXRpdmUpIHtcbiAgICAgICAgICAgIHRvUG9zICs9IGZyb21Qb3M7XG4gICAgICAgICAgICBpZiAodG9Qb3MgPCAwIHx8IHRvUG9zID49IGNoaWxkcmVuLmxlbmd0aCkgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHRvUG9zID49IGNoaWxkcmVuLmxlbmd0aCkgdG9Qb3MgPSBjaGlsZHJlbi5sZW5ndGggLSAxO1xuICAgICAgICAgICAgaWYgKHRvUG9zIDwgMCkgdG9Qb3MgPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZyb21Qb3MgPT0gdG9Qb3MpIHJldHVybiBmYWxzZTtcblxuICAgICAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgb3RoZXIgPSBjaGlsZHJlblt0b1Bvc107XG4gICAgICAgICAgICBjaGlsZHJlbi5zcGxpY2UoZnJvbVBvcywgMSk7XG4gICAgICAgICAgICBjaGlsZHJlbi5zcGxpY2UodG9Qb3MsICAgMCwgbGVhZik7XG4gICAgICAgICAgICBpZiAoKHBhcmVudFNwbGl0IGFzIFdvcmtzcGFjZVRhYnMpLnNlbGVjdFRhYikge1xuICAgICAgICAgICAgICAgIChwYXJlbnRTcGxpdCBhcyBXb3Jrc3BhY2VUYWJzKS5zZWxlY3RUYWIobGVhZik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG90aGVyLmNvbnRhaW5lckVsLmluc2VydEFkamFjZW50RWxlbWVudChmcm9tUG9zID4gdG9Qb3MgPyBcImJlZm9yZWJlZ2luXCIgOiBcImFmdGVyZW5kXCIsIGxlYWYuY29udGFpbmVyRWwpO1xuICAgICAgICAgICAgICAgIHBhcmVudFNwbGl0LnJlY29tcHV0ZUNoaWxkcmVuRGltZW5zaW9ucygpO1xuICAgICAgICAgICAgICAgIGxlYWYub25SZXNpemUoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmFwcC53b3Jrc3BhY2Uub25MYXlvdXRDaGFuZ2UoKTtcblxuICAgICAgICAgICAgICAgIC8vIEZvcmNlIGZvY3VzIGJhY2sgdG8gcGFuZTtcbiAgICAgICAgICAgICAgICB0aGlzLmFwcC53b3Jrc3BhY2UuYWN0aXZlTGVhZiA9IG51bGw7XG4gICAgICAgICAgICAgICAgdGhpcy5hcHAud29ya3NwYWNlLnNldEFjdGl2ZUxlYWYobGVhZiwgZmFsc2UsIHRydWUpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpc1N5bnRoZXRpY0hpc3RvcnlFdmVudChidXR0b246IG51bWJlcikge1xuICAgICAgICBjb25zdCB3aW4gPSB0aGlzLm5hdi53aW5kb3dzKCkuZmlsdGVyKHdpbiA9PlxuICAgICAgICAgICAgd2luLmV2ZW50ICYmICh3aW4uZXZlbnQgYXMgTW91c2VFdmVudCkuYnV0dG9uID09PSBidXR0b25cbiAgICAgICAgKS5wb3AoKTtcbiAgICAgICAgaWYgKHdpbiAmJiB3aW4uZXZlbnQudHlwZSA9PT0gXCJtb3VzZWRvd25cIikge1xuICAgICAgICAgICAgd2luLmV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB3aW4uZXZlbnQuc3RvcEltbWVkaWF0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HQUFHLENBQUMsS0FBb0IsQ0FBQyxNQUFNLEtBQUssTUFBTSxDQUMzRCxDQUFDLEdBQUcsRUFBRSxDQUFDO1FBQ1IsSUFBSSxHQUFHLElBQUksR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLEtBQUssV0FBVyxFQUFFO0FBQ3ZDLFlBQUEsR0FBRyxDQUFDLEtBQUssQ0FBQyxjQUFjLEVBQUUsQ0FBQztBQUMzQixZQUFBLEdBQUcsQ0FBQyxLQUFLLENBQUMsd0JBQXdCLEVBQUUsQ0FBQztBQUNyQyxZQUFBLE9BQU8sSUFBSSxDQUFDO0FBQ2YsU0FBQTtBQUNELFFBQUEsT0FBTyxLQUFLLENBQUM7S0FDaEI7QUFDSixDQUFBO0FBRUQsU0FBUyxPQUFPLENBQUksS0FBVSxFQUFFLE9BQVUsRUFBRSxDQUFTLEVBQUUsUUFBaUIsRUFBQTtBQUNwRSxJQUFBLElBQUksUUFBUSxFQUFFO0FBQ1YsUUFBQSxDQUFDLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUM1QixRQUFBLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUMsTUFBTSxJQUFJLEtBQUssQ0FBQyxNQUFNLENBQUM7QUFDekMsS0FBQTtJQUNELE9BQU8sS0FBSyxDQUFDLENBQUMsSUFBSSxLQUFLLENBQUMsTUFBTSxHQUFHLEtBQUssQ0FBQyxNQUFNLEdBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3pEOzs7OyJ9 diff --git a/manifest.json b/manifest.json index 991ccd7..38b91fe 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "pane-relief", "name": "Pane Relief", - "version": "0.1.11", + "version": "0.1.13", "minAppVersion": "0.14.5", "description": "Per-pane history, hotkeys for pane movement + navigation, and more", "author": "PJ Eby", diff --git a/src/History.ts b/src/History.ts index b95c235..3e4ae3b 100644 --- a/src/History.ts +++ b/src/History.ts @@ -107,7 +107,7 @@ export class History { if (leaf) domLeaves.set(leaf.containerEl, leaf); if (leaf) return leaf[HIST_ATTR] instanceof this ? leaf[HIST_ATTR] : - leaf[HIST_ATTR] = new this(leaf, leaf[HIST_ATTR]?.serialize() || undefined); + leaf[HIST_ATTR] = new this(leaf, (leaf[HIST_ATTR]as any)?.serialize() || undefined); } pos: number diff --git a/src/PerWindowComponent.ts b/src/PerWindowComponent.ts index 495aaa4..c54c830 100644 --- a/src/PerWindowComponent.ts +++ b/src/PerWindowComponent.ts @@ -64,10 +64,10 @@ export class WindowManager, P extends Plugin> ex this.watching = true; this.registerEvent( workspace.on("window-open", (_, win) => { - workspace.onLayoutReady(() => setImmediate(() => this.forWindow(win))); + workspace.onLayoutReady(() => Promise.resolve().then(() => this.forWindow(win))); }) ); - workspace.onLayoutReady(() => setImmediate(() => this.forAll())); + workspace.onLayoutReady(() => Promise.resolve().then(() => this.forAll())); } return this; } diff --git a/src/maximizing.ts b/src/maximizing.ts index 3977a9b..47674a4 100644 --- a/src/maximizing.ts +++ b/src/maximizing.ts @@ -19,13 +19,13 @@ declare module "obsidian" { /** * Efficiently update a class on a workspace item, only touching where changes are needed * - * @param item The workspace item to add or remove the class from + * @param el The element to add or remove the class from * @param cls The class to add or remove * @param state Boolean, flag to add or remove, defaults to opposite of current state * @returns boolean for the state of the class afterwards */ -function toggleClass(item: WorkspaceItem, cls: string, state?: boolean): boolean { - const el = item.containerEl, had = el.classList.contains(cls); +function toggleClass(el: Element, cls: string, state?: boolean): boolean { + const had = el.classList.contains(cls); state = state ?? !had; if (state !== had) { state ? el.classList.add(cls) : el.classList.remove(cls); } return state; @@ -42,17 +42,17 @@ export class Maximizer extends Component { this.register(around(app.workspace, { setActiveLeaf(old) { return function setActiveLeaf(leaf, pushHistory, focus) { // We have to do this here so that MarkdownView can be focused in the new pane - const parent = self.parentFor(leaf), oldParent = self.parentFor(app.workspace.activeLeaf); + const parent = self.parentForLeaf(leaf), oldParent = self.parentForLeaf(app.workspace.activeLeaf); if ( parent && oldParent && parent !== oldParent && - oldParent.containerEl?.matchParent(".hover-popover.is-active.snap-to-viewport") && - parent.containerEl?.ownerDocument === oldParent.containerEl.ownerDocument && - !parent.containerEl.matchParent(".hover-popover") + oldParent.matchParent(".hover-popover.is-active.snap-to-viewport") && + parent.ownerDocument === oldParent.ownerDocument && + !parent.matchParent(".hover-popover") ) { // Switching from maximized popover to non-popover; de-maximize it first app.commands.executeCommandById("obsidian-hover-editor:restore-active-popover"); } - if (parent) self.refresh(parent, parent.containerEl.hasClass("should-maximize") ? leaf : null); + if (parent) self.refresh(parent, parent.hasClass("should-maximize") ? leaf.containerEl : null); return old.call(this, leaf, pushHistory, focus); }} })); @@ -64,12 +64,12 @@ export class Maximizer extends Component { } toggleMaximize(leaf = app.workspace.activeLeaf) { - const parent = this.parentFor(leaf); + const parent = this.parentForLeaf(leaf); if (!parent) return; - const popoverEl = parent.containerEl.matchParent(".hover-popover"); + const popoverEl = parent.matchParent(".hover-popover"); if (popoverEl && app.plugins.plugins["obsidian-hover-editor"]) { // Check if single leaf in a popover - let count = 0; app.workspace.iterateLeaves(() => { count++; }, parent); + let count = popoverEl.findAll(".workspace-leaf").length; if (count === 1) { // Maximize or restore the popover instead of the leaf app.commands.executeCommandById( @@ -80,13 +80,11 @@ export class Maximizer extends Component { return; } } - if (parent) this.refresh(parent, toggleClass(parent, "should-maximize") ? leaf : null); + if (parent) this.refresh(parent, toggleClass(parent, "should-maximize") ? leaf.containerEl : null); } - lastMaximized(parent: WorkspaceParent) { - let result: WorkspaceLeaf = null; - app.workspace.iterateLeaves(leaf => { if (leaf.containerEl.hasClass("is-maximized")) result = leaf; }, parent); - return result || app.workspace.getMostRecentLeaf(); + lastMaximized(parent: Element) { + return parent.find(".workspace-leaf.is-maximized") || app.workspace.getMostRecentLeaf().containerEl; } fixSlidingPanes = debounce(() => { @@ -97,50 +95,40 @@ export class Maximizer extends Component { }, 5); refresh( - parent: WorkspaceParent, - leaf: WorkspaceLeaf = - parent.containerEl.hasClass("should-maximize") ? this.lastMaximized(parent) : null + parent: Element, + leafEl: Element = + parent.hasClass("should-maximize") ? this.lastMaximized(parent) : null ) { - function walk(parent: WorkspaceParent) { - let haveMatch = false, match = false; - for (const item of parent.children) { - if (item instanceof WorkspaceLeaf) { - toggleClass(item, "is-maximized", match = (leaf === item)); - } else if (item instanceof WorkspaceParent) { - match = walk(item); - } - haveMatch ||= match; - } - return toggleClass(parent, "has-maximized", haveMatch); - } - const hadMax = parent.containerEl.hasClass("has-maximized"); - if (!walk(parent)) { + const hadMax = parent.hasClass("has-maximized"); + parent.findAllSelf(".workspace-split").forEach(split => { + if (split === parent || this.parentFor(split) === parent) + toggleClass(split, "has-maximized", leafEl ? split.contains(leafEl): false); + }); + parent.findAll(".workspace-leaf").forEach(leaf => { + if (this.parentFor(leaf) === parent) toggleClass(leaf, "is-maximized", leaf === leafEl); + }) + if (!leafEl || !parent.contains(leafEl)) { toggleClass(parent, "should-maximize", false); if (hadMax) this.fixSlidingPanes(); } } parents() { - const parents: WorkspaceParent[] = [app.workspace.rootSplit] - parents.concat(app.workspace.floatingSplit?.children ?? []); + const parents: HTMLDivElement[] = [app.workspace.rootSplit.containerEl] + parents.concat((app.workspace.floatingSplit?.children ?? []).map(i => i.containerEl)); const popovers = app.plugins.plugins["obsidian-hover-editor"]?.activePopovers; if (popovers) for (const popover of popovers) { - if (popover.rootSplit) parents.push(popover.rootSplit) + if (popover.rootSplit) parents.push(popover.rootSplit.containerEl) } return parents; } - parentFor(leaf: WorkspaceLeaf): WorkspaceParent { - if (!leaf || leaf.containerEl.matchParent(".workspace-tabs")) return null; - const container = leaf.getContainer?.(); - if (container && container.containerEl.hasClass("mod-root")) return container; - const popoverEl = leaf.containerEl.matchParent(".hover-popover"); - if (popoverEl) { - const popovers = app.plugins.plugins["obsidian-hover-editor"]?.activePopovers; - if (popovers) for (const popover of popovers) { - if (popoverEl.contains(popover.rootSplit.containerEl)) return popover.rootSplit; - } - } - return app.workspace.rootSplit; + parentForLeaf(leaf: WorkspaceLeaf) { + return this.parentFor(leaf.containerEl); + } + + parentFor(el: Element) { + return el.matchParent(".workspace-split.mod-root, .hover-popover > .popover-content > .workspace-split"); } + } \ No newline at end of file diff --git a/src/pane-relief.ts b/src/pane-relief.ts index d438324..7bb6f2f 100644 --- a/src/pane-relief.ts +++ b/src/pane-relief.ts @@ -107,8 +107,8 @@ export default class PaneRelief extends Plugin { [command("put-8th", "Place as 8th pane in the split", "Mod+Alt+8")] () { return () => this.placeLeaf(7, false); }, [command("put-last", "Place as last pane in the split", "Mod+Alt+9")] () { return () => this.placeLeaf(99999999, false); }, - [command("maximize", "Maximize active pane (Toggle)", [])] () { - if (this.max.parentFor(app.workspace.activeLeaf)) return () => this.max.toggleMaximize(); + [command("maximize", "Maximize active pane (Toggle)", [])] (this: PaneRelief) { + if (this.max.parentForLeaf(app.workspace.activeLeaf)) return () => this.max.toggleMaximize(); }, }); } diff --git a/versions.json b/versions.json index 9ec0a15..bdca376 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,5 @@ { - "0.1.11": "0.14.5", + "0.1.13": "0.14.5", "0.0.26": "0.14.5", "0.0.24": "0.13.31", "0.0.18": "0.12.15",