Changeset 2703739
- Timestamp:
- 04/02/2022 03:36:56 PM (4 years ago)
- Location:
- turbo-admin
- Files:
-
- 2 added
- 18 edited
- 1 copied
-
tags/1.9.0 (copied) (copied from turbo-admin/trunk)
-
tags/1.9.0/dist/main.min.js (modified) (8 diffs)
-
tags/1.9.0/dist/main.min.js.map (modified) (1 diff)
-
tags/1.9.0/readme.txt (modified) (4 diffs)
-
tags/1.9.0/src/class-turbo-admin-barkeeper.js (added)
-
tags/1.9.0/src/class-turbo-admin-palette.js (modified) (4 diffs)
-
tags/1.9.0/src/class-turbo-admin-wp-notices.js (modified) (3 diffs)
-
tags/1.9.0/src/class-turbo-admin.js (modified) (4 diffs)
-
tags/1.9.0/src/main.js (modified) (2 diffs)
-
tags/1.9.0/turbo-admin.css (modified) (2 diffs)
-
tags/1.9.0/turbo-admin.php (modified) (7 diffs)
-
trunk/dist/main.min.js (modified) (8 diffs)
-
trunk/dist/main.min.js.map (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/src/class-turbo-admin-barkeeper.js (added)
-
trunk/src/class-turbo-admin-palette.js (modified) (4 diffs)
-
trunk/src/class-turbo-admin-wp-notices.js (modified) (3 diffs)
-
trunk/src/class-turbo-admin.js (modified) (4 diffs)
-
trunk/src/main.js (modified) (2 diffs)
-
trunk/turbo-admin.css (modified) (2 diffs)
-
trunk/turbo-admin.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
turbo-admin/tags/1.9.0/dist/main.min.js
r2702218 r2703739 1072 1072 contentItems.forEach((item) => { 1073 1073 const itemTitle = item.title; 1074 const itemType = item. type;1074 const itemType = item.subtype; 1075 1075 const itemUrl = item.url; 1076 1076 if (this.contentItemExists(itemUrl)) { … … 1199 1199 showPalette() { 1200 1200 this.paletteInputElement.value = ""; 1201 this.paletteItemsElement.scrollTop = 0; 1201 1202 this.paletteElement?.classList.add("active"); 1202 1203 this.paletteInputElement?.focus(); … … 1205 1206 this.navigating = false; 1206 1207 this.paletteElement?.classList.remove("active"); 1208 this.paletteInputElement.value = ""; 1209 this.paletteInputElement.blur(); 1207 1210 if (this.isSubMenuOpen()) { 1208 1211 this.closeSubMenu(); … … 1301 1304 this.paletteItemsElement.style.minHeight = subMenuHeight + "px"; 1302 1305 subMenuElement.classList.add("active"); 1303 this.paletteInputElement.disabled = true;1304 this.paletteInputElement.blur();1305 1306 this.selectedSubItem = subMenuElement.querySelector("li"); 1306 1307 this.openedSubMenu = subMenuElement; 1307 1308 this.setSelectedElement(); 1309 this.paletteInputElement.disabled = true; 1310 this.paletteInputElement.blur(); 1308 1311 } 1309 1312 closeSubMenu(subMenuElement = null) { … … 1740 1743 var class_list_table_shortcuts_default = ListTableShortcuts; 1741 1744 1745 // src/class-turbo-admin-barkeeper.js 1746 var TurboAdminBarkeeper = class { 1747 constructor(barkeeperState) { 1748 if (!document.getElementById("wpadminbar")) { 1749 return; 1750 } 1751 this.exclusionIds = [ 1752 "wp-admin-bar-menu-toggle", 1753 "wp-admin-bar-wp-logo", 1754 "wp-admin-bar-site-name", 1755 "wp-admin-bar-updates" 1756 ]; 1757 this.barkeeperState = barkeeperState; 1758 this.root = document.getElementById("wp-admin-bar-root-default"); 1759 this.itemsToHide = document.querySelectorAll("#wp-admin-bar-root-default > li"); 1760 Array.from(this.itemsToHide).forEach((element) => { 1761 if (this.exclusionIds.includes(element.id)) { 1762 return; 1763 } 1764 element.classList.add("ta-barkeeper-collapsable"); 1765 }); 1766 if (this.barkeeperState === "closed") { 1767 this.root.classList.toggle("ta-barkeeper-closed"); 1768 } 1769 this.button = document.createElement("button"); 1770 this.button.id = "ta-barkeeper-toggle"; 1771 this.button.innerText = "<"; 1772 this.button.addEventListener("click", (e) => { 1773 this.root.classList.toggle("ta-barkeeper-closed"); 1774 this.barkeeperState = this.barkeeperState === "open" ? "closed" : "open"; 1775 if (typeof browser === "object") { 1776 browser.runtime.sendMessage({ 1777 action: "barkeeperSetState", 1778 barkeeperState: this.barkeeperState 1779 }); 1780 } else { 1781 window.localStorage.setItem("turboAdminBarkeeperState", this.barkeeperState); 1782 } 1783 }); 1784 this.root.insertAdjacentElement("afterend", this.button); 1785 } 1786 }; 1787 var class_turbo_admin_barkeeper_default = TurboAdminBarkeeper; 1788 1742 1789 // src/class-turbo-admin.js 1743 1790 var TurboAdmin = class { … … 1779 1826 if (this.options["list-table-keyboard-shortcuts"] === true) { 1780 1827 this.turboAdminListTableShortcuts = new class_list_table_shortcuts_default(); 1828 } 1829 if (this.options["barkeeper"] === true) { 1830 if (typeof browser !== "object") { 1831 this.options["barkeeper-state"] = window.localStorage.getItem("turboAdminBarkeeperState"); 1832 } 1833 this.turboAdminBarkeeper = new class_turbo_admin_barkeeper_default(this.options["barkeeper-state"]); 1781 1834 } 1782 1835 if (globalThis.contentApi.userLoggedIn()) { … … 1962 2015 palette.appendChild(input); 1963 2016 palette.appendChild(list); 1964 document.querySelector(this.options.appendToElement ?? "body").appendChild(container); 2017 if (document.getElementById("wpadminbar") && this.options["admin-bar-search"] === true) { 2018 const paletteLi = document.createElement("li"); 2019 paletteLi.appendChild(container); 2020 const adminBar = document.getElementById("wp-admin-bar-top-secondary"); 2021 adminBar.appendChild(paletteLi); 2022 input.addEventListener("focus", (e) => this.turboAdminPalette.showPalette()); 2023 const placeholder = document.createElement("div"); 2024 placeholder.id = "ta-shortcut-key-placeholder"; 2025 placeholder.innerText = this.buildShortcutKeysString(); 2026 placeholder.addEventListener("click", (e) => input.focus()); 2027 palette.insertBefore(placeholder, list); 2028 } else { 2029 document.querySelector(this.options.appendToElement ?? "body").appendChild(container); 2030 } 2031 } 2032 buildShortcutKeysString() { 2033 let keysString = ""; 2034 let shortcut = this.options.shortcutKeys[0]; 2035 if (shortcut.meta) { 2036 keysString += "Cmd-"; 2037 } 2038 if (shortcut.ctrl) { 2039 keysString += "Ctrl-"; 2040 } 2041 if (shortcut.alt) { 2042 keysString += "Alt-"; 2043 } 2044 if (shortcut.shift) { 2045 keysString += "Shift-"; 2046 } 2047 keysString += shortcut.key.toUpperCase(); 2048 return keysString; 1965 2049 } 1966 2050 }; … … 2119 2203 "list-table-keyboard-shortcuts": globalThis.wpTurboAdmin["listTableShortcuts"] === "1", 2120 2204 "hide-notices": globalThis.wpTurboAdmin["hideNotices"] === "1", 2121 rememberedNoticeIds: JSON.parse(window.localStorage.getItem("rememberedNoticeIds")) ?? new Array() 2205 rememberedNoticeIds: JSON.parse(window.localStorage.getItem("rememberedNoticeIds")) ?? new Array(), 2206 barkeeper: globalThis.wpTurboAdmin["barkeeper"] === "1", 2207 "admin-bar-search": globalThis.wpTurboAdmin["adminBarSearch"] === "1" 2122 2208 }; 2123 2209 await taInit(globalThis.turboAdminOptions); -
turbo-admin/tags/1.9.0/dist/main.min.js.map
r2702218 r2703739 1 1 { 2 2 "version": 3, 3 "sources": ["../src/fuse-6.4.6.js", "../src/class-turbo-admin-palette.js", "../src/class-turbo-admin-menu-item.js", "../src/class-storage.js", "../src/class-content-api.js", "../src/class-turbo-admin-wp-block-editor-fullscreen-kill.js", "../src/class-turbo-admin-wp-block-editor-welcome-guide-kill.js", "../src/class-turbo-admin-wp-notices.js", "../src/class-list-table-shortcuts.js", "../src/class-turbo-admin .js", "../src/class-wp.js", "../src/main.js"],4 "sourcesContent": ["/**\n * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2021 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\nvar e, t; e = this, t = function () { \"use strict\"; function e(t) { return (e = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e })(t) } function t(e, t) { if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\") } function n(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } function r(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e } function i(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function o(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function c(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? o(Object(n), !0).forEach((function (t) { i(e, t, n[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach((function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) })) } return e } function a(e, t) { if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && u(e, t) } function s(e) { return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) { return e.__proto__ || Object.getPrototypeOf(e) })(e) } function u(e, t) { return (u = Object.setPrototypeOf || function (e, t) { return e.__proto__ = t, e })(e, t) } function h(e, t) { return !t || \"object\" != typeof t && \"function\" != typeof t ? function (e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e }(e) : t } function f(e) { var t = function () { if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if (\"function\" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], (function () { }))), !0 } catch (e) { return !1 } }(); return function () { var n, r = s(e); if (t) { var i = s(this).constructor; n = Reflect.construct(r, arguments, i) } else n = r.apply(this, arguments); return h(this, n) } } function l(e) { return function (e) { if (Array.isArray(e)) return d(e) }(e) || function (e) { if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) }(e) || function (e, t) { if (e) { if (\"string\" == typeof e) return d(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return \"Object\" === n && e.constructor && (n = e.constructor.name), \"Map\" === n || \"Set\" === n ? Array.from(e) : \"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? d(e, t) : void 0 } }(e) || function () { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\") }() } function d(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++)r[n] = e[n]; return r } function v(e) { return Array.isArray ? Array.isArray(e) : \"[object Array]\" === b(e) } function g(e) { return \"string\" == typeof e } function y(e) { return \"number\" == typeof e } function p(e) { return !0 === e || !1 === e || function (e) { return m(e) && null !== e }(e) && \"[object Boolean]\" == b(e) } function m(t) { return \"object\" === e(t) } function k(e) { return null != e } function M(e) { return !e.trim().length } function b(e) { return null == e ? void 0 === e ? \"[object Undefined]\" : \"[object Null]\" : Object.prototype.toString.call(e) } var x = function (e) { return \"Invalid value for key \".concat(e) }, L = function (e) { return \"Pattern length exceeds max of \".concat(e, \".\") }, S = Object.prototype.hasOwnProperty, w = function () { function e(n) { var r = this; t(this, e), this._keys = [], this._keyMap = {}; var i = 0; n.forEach((function (e) { var t = _(e); i += t.weight, r._keys.push(t), r._keyMap[t.id] = t, i += t.weight })), this._keys.forEach((function (e) { e.weight /= i })) } return r(e, [{ key: \"get\", value: function (e) { return this._keyMap[e] } }, { key: \"keys\", value: function () { return this._keys } }, { key: \"toJSON\", value: function () { return JSON.stringify(this._keys) } }]), e }(); function _(e) { var t = null, n = null, r = null, i = 1; if (g(e) || v(e)) r = e, t = O(e), n = j(e); else { if (!S.call(e, \"name\")) throw new Error(function (e) { return \"Missing \".concat(e, \" property in key\") }(\"name\")); var o = e.name; if (r = o, S.call(e, \"weight\") && (i = e.weight) <= 0) throw new Error(function (e) { return \"Property 'weight' in key '\".concat(e, \"' must be a positive integer\") }(o)); t = O(o), n = j(o) } return { path: t, id: n, weight: i, src: r } } function O(e) { return v(e) ? e : e.split(\".\") } function j(e) { return v(e) ? e.join(\".\") : e } var A = c({}, { isCaseSensitive: !1, includeScore: !1, keys: [], shouldSort: !0, sortFn: function (e, t) { return e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1 } }, {}, { includeMatches: !1, findAllMatches: !1, minMatchCharLength: 1 }, {}, { location: 0, threshold: .6, distance: 100 }, {}, { useExtendedSearch: !1, getFn: function (e, t) { var n = [], r = !1; return function e(t, i, o) { if (k(t)) if (i[o]) { var c = t[i[o]]; if (!k(c)) return; if (o === i.length - 1 && (g(c) || y(c) || p(c))) n.push(function (e) { return null == e ? \"\" : function (e) { if (\"string\" == typeof e) return e; var t = e + \"\"; return \"0\" == t && 1 / e == -1 / 0 ? \"-0\" : t }(e) }(c)); else if (v(c)) { r = !0; for (var a = 0, s = c.length; a < s; a += 1)e(c[a], i, o + 1) } else i.length && e(c, i, o + 1) } else n.push(t) }(e, g(t) ? t.split(\".\") : t, 0), r ? n : n[0] }, ignoreLocation: !1, ignoreFieldNorm: !1 }), I = /[^ ]+/g; function C() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 3, t = new Map, n = Math.pow(10, e); return { get: function (e) { var r = e.match(I).length; if (t.has(r)) return t.get(r); var i = 1 / Math.sqrt(r), o = parseFloat(Math.round(i * n) / n); return t.set(r, o), o }, clear: function () { t.clear() } } } var E = function () { function e() { var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r; t(this, e), this.norm = C(3), this.getFn = i, this.isCreated = !1, this.setIndexRecords() } return r(e, [{ 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 e = this, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; this.keys = t, this._keysMap = {}, t.forEach((function (t, n) { e._keysMap[t.id] = n })) } }, { key: \"create\", value: function () { var e = this; !this.isCreated && this.docs.length && (this.isCreated = !0, g(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(); g(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(); t < n; t += 1)this.records[t].i -= 1 } }, { key: \"getValueForItemAtKeyId\", value: function (e, t) { return e[this._keysMap[t]] } }, { key: \"size\", value: function () { return this.records.length } }, { key: \"_addString\", value: function (e, t) { if (k(e) && !M(e)) { var n = { v: e, i: t, n: this.norm.get(e) }; this.records.push(n) } } }, { key: \"_addObject\", value: function (e, t) { var n = this, r = { i: t, $: {} }; this.keys.forEach((function (t, i) { var o = n.getFn(e, t.path); if (k(o)) if (v(o)) !function () { for (var e = [], t = [{ nestedArrIndex: -1, value: o }]; t.length;) { var c = t.pop(), a = c.nestedArrIndex, s = c.value; if (k(s)) if (g(s) && !M(s)) { var u = { v: s, i: a, n: n.norm.get(s) }; e.push(u) } else v(s) && s.forEach((function (e, n) { t.push({ nestedArrIndex: n, value: e }) })) } r.$[i] = e }(); else if (!M(o)) { var c = { v: o, n: n.norm.get(o) }; r.$[i] = c } })), this.records.push(r) } }, { key: \"toJSON\", value: function () { return { keys: this.keys, records: this.records } } }]), e }(); function $(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r, o = new E({ getFn: i }); return o.setKeys(e.map(_)), o.setSources(t), o.create(), o } function R(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.errors, r = void 0 === n ? 0 : n, i = t.currentLocation, o = void 0 === i ? 0 : i, c = t.expectedLocation, a = void 0 === c ? 0 : c, s = t.distance, u = void 0 === s ? A.distance : s, h = t.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r / e.length; if (f) return l; var d = Math.abs(a - o); return u ? l + d / u : d ? 1 : l } function F() { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : A.minMatchCharLength, n = [], r = -1, i = -1, o = 0, c = e.length; o < c; o += 1) { var a = e[o]; a && -1 === r ? r = o : a || -1 === r || ((i = o - 1) - r + 1 >= t && n.push([r, i]), r = -1) } return e[o - 1] && o - r >= t && n.push([r, o - 1]), n } function P(e) { for (var t = {}, n = 0, r = e.length; n < r; n += 1) { var i = e.charAt(n); t[i] = (t[i] || 0) | 1 << r - n - 1 } return t } var N = function () { function e(n) { var r = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, o = i.location, c = void 0 === o ? A.location : o, a = i.threshold, s = void 0 === a ? A.threshold : a, u = i.distance, h = void 0 === u ? A.distance : u, f = i.includeMatches, l = void 0 === f ? A.includeMatches : f, d = i.findAllMatches, v = void 0 === d ? A.findAllMatches : d, g = i.minMatchCharLength, y = void 0 === g ? A.minMatchCharLength : g, p = i.isCaseSensitive, m = void 0 === p ? A.isCaseSensitive : p, k = i.ignoreLocation, M = void 0 === k ? A.ignoreLocation : k; if (t(this, e), this.options = { location: c, threshold: s, distance: h, includeMatches: l, findAllMatches: v, minMatchCharLength: y, isCaseSensitive: m, ignoreLocation: M }, this.pattern = m ? n : n.toLowerCase(), this.chunks = [], this.pattern.length) { var b = function (e, t) { r.chunks.push({ pattern: e, alphabet: P(e), startIndex: t }) }, x = this.pattern.length; if (x > 32) { for (var L = 0, S = x % 32, w = x - S; L < w;)b(this.pattern.substr(L, 32), L), L += 32; if (S) { var _ = x - 32; b(this.pattern.substr(_), _) } } else b(this.pattern, 0) } } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.options, n = t.isCaseSensitive, r = t.includeMatches; if (n || (e = e.toLowerCase()), this.pattern === e) { var i = { isMatch: !0, score: 0 }; return r && (i.indices = [[0, e.length - 1]]), i } var o = this.options, c = o.location, a = o.distance, s = o.threshold, u = o.findAllMatches, h = o.minMatchCharLength, f = o.ignoreLocation, d = [], v = 0, g = !1; this.chunks.forEach((function (t) { var n = t.pattern, i = t.alphabet, o = t.startIndex, y = function (e, t, n) { var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, i = r.location, o = void 0 === i ? A.location : i, c = r.distance, a = void 0 === c ? A.distance : c, s = r.threshold, u = void 0 === s ? A.threshold : s, h = r.findAllMatches, f = void 0 === h ? A.findAllMatches : h, l = r.minMatchCharLength, d = void 0 === l ? A.minMatchCharLength : l, v = r.includeMatches, g = void 0 === v ? A.includeMatches : v, y = r.ignoreLocation, p = void 0 === y ? A.ignoreLocation : y; if (t.length > 32) throw new Error(L(32)); for (var m, k = t.length, M = e.length, b = Math.max(0, Math.min(o, M)), x = u, S = b, w = d > 1 || g, _ = w ? Array(M) : []; (m = e.indexOf(t, S)) > -1;) { var O = R(t, { currentLocation: m, expectedLocation: b, distance: a, ignoreLocation: p }); if (x = Math.min(O, x), S = m + k, w) for (var j = 0; j < k;)_[m + j] = 1, j += 1 } S = -1; for (var I = [], C = 1, E = k + M, $ = 1 << k - 1, P = 0; P < k; P += 1) { for (var N = 0, D = E; N < D;) { var z = R(t, { errors: P, currentLocation: b + D, expectedLocation: b, distance: a, ignoreLocation: p }); z <= x ? N = D : E = D, D = Math.floor((E - N) / 2 + N) } E = D; var K = Math.max(1, b - D + 1), q = f ? M : Math.min(b + D, M) + k, W = Array(q + 2); W[q + 1] = (1 << P) - 1; for (var J = q; J >= K; J -= 1) { var T = J - 1, U = n[e.charAt(T)]; if (w && (_[T] = +!!U), W[J] = (W[J + 1] << 1 | 1) & U, P && (W[J] |= (I[J + 1] | I[J]) << 1 | 1 | I[J + 1]), W[J] & $ && (C = R(t, { errors: P, currentLocation: T, expectedLocation: b, distance: a, ignoreLocation: p })) <= x) { if (x = C, (S = T) <= b) break; K = Math.max(1, 2 * b - S) } } var V = R(t, { errors: P + 1, currentLocation: b, expectedLocation: b, distance: a, ignoreLocation: p }); if (V > x) break; I = W } var B = { isMatch: S >= 0, score: Math.max(.001, C) }; if (w) { var G = F(_, d); G.length ? g && (B.indices = G) : B.isMatch = !1 } return B }(e, n, i, { location: c + o, distance: a, threshold: s, findAllMatches: u, minMatchCharLength: h, includeMatches: r, ignoreLocation: f }), p = y.isMatch, m = y.score, k = y.indices; p && (g = !0), v += m, p && k && (d = [].concat(l(d), l(k))) })); var y = { isMatch: g, score: g ? v / this.chunks.length : 1 }; return g && r && (y.indices = d), y } }]), e }(), D = function () { function e(n) { t(this, e), this.pattern = n } return r(e, [{ key: \"search\", value: function () { } }], [{ key: \"isMultiMatch\", value: function (e) { return z(e, this.multiRegex) } }, { key: \"isSingleMatch\", value: function (e) { return z(e, this.singleRegex) } }]), e }(); function z(e, t) { var n = e.match(t); return n ? n[1] : null } var K = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^=(.*)$/ } }]), i }(D), q = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)$/ } }]), i }(D), W = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^\\^(.*)$/ } }]), i }(D), J = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!\\^(.*)$/ } }]), i }(D), T = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^(.*)\\$$/ } }]), i }(D), U = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)\\$$/ } }]), i }(D), V = function (e) { a(i, e); var n = f(i); function i(e) { var r, o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, c = o.location, a = void 0 === c ? A.location : c, s = o.threshold, u = void 0 === s ? A.threshold : s, h = o.distance, f = void 0 === h ? A.distance : h, l = o.includeMatches, d = void 0 === l ? A.includeMatches : l, v = o.findAllMatches, g = void 0 === v ? A.findAllMatches : v, y = o.minMatchCharLength, p = void 0 === y ? A.minMatchCharLength : y, m = o.isCaseSensitive, k = void 0 === m ? A.isCaseSensitive : m, M = o.ignoreLocation, b = void 0 === M ? A.ignoreLocation : M; return t(this, i), (r = n.call(this, e))._bitapSearch = new N(e, { location: a, threshold: u, distance: f, includeMatches: d, findAllMatches: g, minMatchCharLength: p, isCaseSensitive: k, ignoreLocation: b }), r } return r(i, [{ 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 /^(.*)$/ } }]), i }(D), B = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ key: \"search\", value: function (e) { for (var t, n = 0, r = [], i = this.pattern.length; (t = e.indexOf(this.pattern, n)) > -1;)n = t + i, r.push([t, n - 1]); var o = !!r.length; return { isMatch: o, score: o ? 0 : 1, indices: r } } }], [{ key: \"type\", get: function () { return \"include\" } }, { key: \"multiRegex\", get: function () { return /^'\"(.*)\"$/ } }, { key: \"singleRegex\", get: function () { return /^'(.*)$/ } }]), i }(D), G = [K, B, W, J, U, T, q, V], H = G.length, Q = / +(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/; function X(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return e.split(\"|\").map((function (e) { for (var n = e.trim().split(Q).filter((function (e) { return e && !!e.trim() })), r = [], i = 0, o = n.length; i < o; i += 1) { for (var c = n[i], a = !1, s = -1; !a && ++s < H;) { var u = G[s], h = u.isMultiMatch(c); h && (r.push(new u(h, t)), a = !0) } if (!a) for (s = -1; ++s < H;) { var f = G[s], l = f.isSingleMatch(c); if (l) { r.push(new f(l, t)); break } } } return r })) } var Y = new Set([V.type, B.type]), Z = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = r.isCaseSensitive, o = void 0 === i ? A.isCaseSensitive : i, c = r.includeMatches, a = void 0 === c ? A.includeMatches : c, s = r.minMatchCharLength, u = void 0 === s ? A.minMatchCharLength : s, h = r.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r.findAllMatches, d = void 0 === l ? A.findAllMatches : l, v = r.location, g = void 0 === v ? A.location : v, y = r.threshold, p = void 0 === y ? A.threshold : y, m = r.distance, k = void 0 === m ? A.distance : m; t(this, e), this.query = null, this.options = { isCaseSensitive: o, includeMatches: a, minMatchCharLength: u, findAllMatches: d, ignoreLocation: f, location: g, threshold: p, distance: k }, this.pattern = o ? n : n.toLowerCase(), this.query = X(this.pattern, this.options) } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.query; if (!t) return { isMatch: !1, score: 1 }; var n = this.options, r = n.includeMatches; e = n.isCaseSensitive ? e : e.toLowerCase(); for (var i = 0, o = [], c = 0, a = 0, s = t.length; a < s; a += 1) { var u = t[a]; o.length = 0, i = 0; for (var h = 0, f = u.length; h < f; h += 1) { var d = u[h], v = d.search(e), g = v.isMatch, y = v.indices, p = v.score; if (!g) { c = 0, i = 0, o.length = 0; break } if (i += 1, c += p, r) { var m = d.constructor.type; Y.has(m) ? o = [].concat(l(o), l(y)) : o.push(y) } } if (i) { var k = { isMatch: !0, score: c / i }; return r && (k.indices = o), k } } return { isMatch: !1, score: 1 } } }], [{ key: \"condition\", value: function (e, t) { return t.useExtendedSearch } }]), e }(), ee = []; function te(e, t) { for (var n = 0, r = ee.length; n < r; n += 1) { var i = ee[n]; if (i.condition(e, t)) return new i(e, t) } return new N(e, t) } var ne = \"$and\", re = \"$or\", ie = \"$path\", oe = \"$val\", ce = function (e) { return !(!e[ne] && !e[re]) }, ae = function (e) { return !!e[ie] }, se = function (e) { return !v(e) && m(e) && !ce(e) }, ue = function (e) { return i({}, ne, Object.keys(e).map((function (t) { return i({}, t, e[t]) }))) }; function he(e, t) { var n = t.ignoreFieldNorm, r = void 0 === n ? A.ignoreFieldNorm : n; e.forEach((function (e) { var t = 1; e.matches.forEach((function (e) { var n = e.key, i = e.norm, o = e.score, c = n ? n.weight : null; t *= Math.pow(0 === o && c ? Number.EPSILON : o, (c || 1) * (r ? 1 : i)) })), e.score = t })) } function fe(e, t) { var n = e.matches; t.matches = [], k(n) && n.forEach((function (e) { if (k(e.indices) && e.indices.length) { var n = { indices: e.indices, value: e.value }; e.key && (n.key = e.key.src), e.idx > -1 && (n.refIndex = e.idx), t.matches.push(n) } })) } function le(e, t) { t.score = e.score } function de(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.includeMatches, i = void 0 === r ? A.includeMatches : r, o = n.includeScore, c = void 0 === o ? A.includeScore : o, a = []; return i && a.push(fe), c && a.push(le), e.map((function (e) { var n = e.idx, r = { item: t[n], refIndex: n }; return a.length && a.forEach((function (t) { t(e, r) })), r })) } var ve = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = arguments.length > 2 ? arguments[2] : void 0; t(this, e), this.options = c({}, A, {}, r), this.options.useExtendedSearch, this._keyStore = new w(this.options.keys), this.setCollection(n, i) } return r(e, [{ key: \"setCollection\", value: function (e, t) { if (this._docs = e, t && !(t instanceof E)) throw new Error(\"Incorrect 'index' type\"); this._myIndex = t || $(this.options.keys, this._docs, { getFn: this.options.getFn }) } }, { key: \"add\", value: function (e) { k(e) && (this._docs.push(e), this._myIndex.add(e)) } }, { key: \"remove\", value: function () { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () { return !1 }, t = [], n = 0, r = this._docs.length; n < r; n += 1) { var i = this._docs[n]; e(i, n) && (this.removeAt(n), n -= 1, r -= 1, t.push(i)) } return t } }, { key: \"removeAt\", value: function (e) { this._docs.splice(e, 1), this._myIndex.removeAt(e) } }, { key: \"getIndex\", value: function () { return this._myIndex } }, { key: \"search\", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.limit, r = void 0 === n ? -1 : n, i = this.options, o = i.includeMatches, c = i.includeScore, a = i.shouldSort, s = i.sortFn, u = i.ignoreFieldNorm, h = g(e) ? g(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e); return he(h, { ignoreFieldNorm: u }), a && h.sort(s), y(r) && r > -1 && (h = h.slice(0, r)), de(h, this._docs, { includeMatches: o, includeScore: c }) } }, { key: \"_searchStringList\", value: function (e) { var t = te(e, this.options), n = this._myIndex.records, r = []; return n.forEach((function (e) { var n = e.v, i = e.i, o = e.n; if (k(n)) { var c = t.searchIn(n), a = c.isMatch, s = c.score, u = c.indices; a && r.push({ item: n, idx: i, matches: [{ score: s, value: n, norm: o, indices: u }] }) } })), r } }, { key: \"_searchLogical\", value: function (e) { var t = this, n = function (e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.auto, i = void 0 === r || r, o = function e(n) { var r = Object.keys(n), o = ae(n); if (!o && r.length > 1 && !ce(n)) return e(ue(n)); if (se(n)) { var c = o ? n[ie] : r[0], a = o ? n[oe] : n[c]; if (!g(a)) throw new Error(x(c)); var s = { keyId: j(c), pattern: a }; return i && (s.searcher = te(a, t)), s } var u = { children: [], operator: r[0] }; return r.forEach((function (t) { var r = n[t]; v(r) && r.forEach((function (t) { u.children.push(e(t)) })) })), u }; return ce(e) || (e = ue(e)), o(e) }(e, this.options), r = this._myIndex.records, i = {}, o = []; return r.forEach((function (e) { var r = e.$, c = e.i; if (k(r)) { var a = function e(n, r, i) { if (!n.children) { var o = n.keyId, c = n.searcher, a = t._findMatches({ key: t._keyStore.get(o), value: t._myIndex.getValueForItemAtKeyId(r, o), searcher: c }); return a && a.length ? [{ idx: i, item: r, matches: a }] : [] } switch (n.operator) { case ne: for (var s = [], u = 0, h = n.children.length; u < h; u += 1) { var f = e(n.children[u], r, i); if (!f.length) return []; s.push.apply(s, l(f)) } return s; case re: for (var d = [], v = 0, g = n.children.length; v < g; v += 1) { var y = e(n.children[v], r, i); if (y.length) { d.push.apply(d, l(y)); break } } return d } }(n, r, c); a.length && (i[c] || (i[c] = { idx: c, item: r, matches: [] }, o.push(i[c])), a.forEach((function (e) { var t, n = e.matches; (t = i[c].matches).push.apply(t, l(n)) }))) } })), o } }, { key: \"_searchObjectList\", value: function (e) { var t = this, n = te(e, this.options), r = this._myIndex, i = r.keys, o = r.records, c = []; return o.forEach((function (e) { var r = e.$, o = e.i; if (k(r)) { var a = []; i.forEach((function (e, i) { a.push.apply(a, l(t._findMatches({ key: e, value: r[i], searcher: n }))) })), a.length && c.push({ idx: o, item: r, matches: a }) } })), c } }, { key: \"_findMatches\", value: function (e) { var t = e.key, n = e.value, r = e.searcher; if (!k(n)) return []; var i = []; if (v(n)) n.forEach((function (e) { var n = e.v, o = e.i, c = e.n; if (k(n)) { var a = r.searchIn(n), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: n, idx: o, norm: c, indices: h }) } })); else { var o = n.v, c = n.n, a = r.searchIn(o), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: o, norm: c, indices: h }) } return i } }]), e }(); return ve.version = \"6.4.6\", ve.createIndex = $, ve.parseIndex = function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.getFn, r = void 0 === n ? A.getFn : n, i = e.keys, o = e.records, c = new E({ getFn: r }); return c.setKeys(i), c.setIndexRecords(o), c }, ve.config = A, function () { ee.push.apply(ee, arguments) }(Z), ve }, \"object\" == typeof exports && \"undefined\" != typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define(t) : (e = e || self).Fuse = t();\n", "/*\n * Some notes on how this works...\n *\n * paletteData is passed into the constructor and is the initial list of items\n * these are TurboAdminMenuItem objects\n *\n * At any point, buildPaletteItems() can be called to turn the paletteData\n * into an array of \"li\" nodes.\n *\n * updatePaletteItems inserts the paletteItems into the \"ul\" list and sets the\n * selectedElement\n *\n * The selectedItem is always one of the paletteItems\n *\n * paletteSearch rebuilds the paletteItems from the paletteData using\n * buildPaletteItems, and then filters the list with FuseJS\n */\n\nimport Fuse from './fuse-6.4.6.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item';\nimport ContentApi from './class-content-api.js';\n\nexport default class TurboAdminPalette {\n\n\tconstructor(paletteData, options) {\n\n\t\tconsole.log('Initialising TurboAdmin');\n\n this.options = options;\n\n /** @type {HTMLDivElement} */\n this.paletteElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette-container'));\n /** @type {HTMLDivElement} */\n this.paletteInnerElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette'));\n\t\t/** @type {HTMLInputElement} */\n this.paletteInputElement = /** @type {HTMLInputElement} */ (document.getElementById('ta-command-palette-input'));\n\t\t/** @type {HTMLUListElement} */\n this.paletteItemsElement = /** @type {HTMLUListElement} */ (document.getElementById('ta-command-palette-items'));\n\n\t\t// Get palette data\n\t\tthis.paletteData = paletteData;\n\n // Get post type data from API\n this.postTypes = [];\n this.fetchPostTypes();\n\n // paletteItems is the list of 'li' elements used to build the palette\n this.paletteItems = [];\n\n // itemIndex is a \"cache\" of URLs used to check if we already\n // have an item in the palette\n this.itemIndex = {};\n\n // Convert into LI elements\n this.buildPaletteItems();\n\n\n\t\tthis.selectedItem = this.paletteItems[0];\n this.openedSubMenu = null;\n this.selectedSubItem = null;\n\n\t\t// Add them to the DOM\n\t\tthis.updatePaletteItems();\n\n // Set state\n this.navigating = false;\n this.debounceTimeout;\n\n\t\tthis.paletteFuseOptions = [];\n\t\tthis.paletteFuse = null;\n\n\t\tif (typeof (Fuse) !== 'function') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.paletteFuseOptions = {\n\t\t\tkeys: ['innerText'],\n\t\t}\n\n\t\tthis.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n\n\t\tdocument.addEventListener('keydown', e => this.handleGlobalKey(e));\n\n\t\tthis.paletteElement.addEventListener('click', e => {\n\t\t\tthis.checkForPaletteItemClick(e);\n this.checkForClickToClose(e);\n\t\t});\n\n this.paletteItemsElement.addEventListener('mouseover', e => {\n this.setHoveredItem(e.target);\n });\n\t}\n\n htmlDecode(input) {\n var doc = new DOMParser().parseFromString(input, \"text/html\");\n return doc.documentElement.textContent;\n }\n\n isMac() {\n return navigator.platform.startsWith('Mac');\n }\n\n metaPressed(e) {\n return this.isMac() ? e.metaKey : e.ctrlKey;\n }\n\n fetchPostTypes() {\n if (! globalThis.contentApi.active) {\n this.postTypes = [];\n return;\n }\n\n globalThis.contentApi.get('types').then(\n response => {\n response.json().then(\n types => {\n this.postTypes = types;\n }\n );\n }\n );\n }\n\n\tbuildPaletteItems() {\n this.paletteItems = [];\n this.itemIndex = {};\n\n\t\tthis.paletteData.forEach(item => {\n\t\t\tconst li = document.createElement('li');\n\t\t\tconst a = document.createElement('a');\n\t\t\tli.appendChild(a);\n\t\t\ta.href = item.action;\n\t\t\tlet title = item.title;\n\t\t\tif (item.parentTitle) {\n\t\t\t\ttitle = item.parentTitle + \": \" + title;\n\t\t\t}\n\t\t\ta.innerHTML = title;\n this.addPaletteListItem(li);\n\t\t});\n\t}\n\n // This takes a 'li' element and adds it to the paletteItems.\n // It also updates any caches and stuff.\n addPaletteListItem(listItem) {\n this.paletteItems.push(listItem);\n\n const link = listItem.querySelector('a');\n if (link) {\n this.itemIndex[link.href] = 1;\n }\n }\n\n contentItemExists(url) {\n return Boolean(this.itemIndex[url]);\n }\n\n injectContentItems(contentItems) {\n console.log('Injecting items');\n\n // We'll need this in the loop below.\n const profileLinkElem = document.getElementById('wp-admin-bar-edit-profile');\n let profileLink = null;\n if (profileLinkElem) {\n profileLink = profileLinkElem.querySelector('a').href;\n }\n\n // TODO: Can we not do this on every content item inject?\n // Check for presence of Oxygen Page builder\n /** @type {HTMLElement|string|Number} */\n let oxygenLinkElem = document.getElementById('toplevel_page_ct_dashboard_page');\n // Also check for a menu bar item\n if (! oxygenLinkElem) {\n oxygenLinkElem = document.getElementById('wp-admin-bar-oxygen_admin_bar_menu');\n }\n // Check to see if Oxygen link is cached\n if (! oxygenLinkElem) {\n oxygenLinkElem = Number(window.localStorage.getItem('ta-has-oxygen-builder'));\n }\n // Save Oxygen builder status\n window.localStorage.setItem('ta-has-oxygen-builder', Boolean(oxygenLinkElem) ? '1' : '0' );\n\n if (contentItems.length > 0) {\n contentItems.forEach(item => {\n const itemTitle = item.title;\n // const itemTitle = item.title.rendered;\n const itemType = item. type;\n const itemUrl = item.url;\n\n // console.log('Adding item: ' + itemTitle);\n\n // // Check if item already exists\n if (this.contentItemExists(itemUrl)) {\n console.log('Not adding duplicate');\n return;\n }\n\n const itemTypeName = this.postTypes[itemType] ? this.postTypes[itemType].name : itemType;\n const title = `${itemTitle} (${itemTypeName})`;\n\n const li = document.createElement('li');\n const a = document.createElement('a');\n const subMenu = document.createElement('div');\n const subMenuTitle = document.createElement('div');\n const subMenuItems = document.createElement('ul');\n subMenu.classList.add('ta-submenu');\n subMenuTitle.classList.add('ta-submenu-title');\n\n subMenuTitle.textContent = this.htmlDecode(itemTitle);\n subMenuItems.classList.add('ta-submenu-items');\n subMenu.appendChild(subMenuTitle);\n subMenu.appendChild(subMenuItems);\n\n const subMenuItem1 = document.createElement('li');\n const subMenuLink1 = document.createElement('a');\n subMenuLink1.innerText = \"View\";\n subMenuLink1.href = itemUrl;\n subMenuItem1.appendChild(subMenuLink1);\n subMenuItems.appendChild(subMenuItem1);\n\n if (profileLink) {\n // Need to get edit URL. This seems like the best way for now.\n const editLink = profileLink.replace('profile.php', `post.php?post=${item.id}&action=edit`);\n\n const subMenuItem2 = document.createElement('li');\n const subMenuLink2 = document.createElement('a');\n subMenuLink2.innerText = \"Edit\";\n subMenuLink2.href = editLink;\n subMenuItem2.appendChild(subMenuLink2);\n subMenuItems.appendChild(subMenuItem2);\n }\n\n if (oxygenLinkElem) {\n // Oxygen Edit Links are like: https://example.com.com/?page_id=26&ct_builder=true&ct_inner=true\n const oxygenLink = globalThis.taWp.home + `?page_id=${item.id}&ct_builder=true&ct_inner=true`;\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Edit with Oxygen\";\n subMenuLink3.href = oxygenLink;\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n }\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Copy link\";\n // Because this is an href we're setting it gets URI encoded!\n subMenuLink3.href = itemUrl;\n subMenuLink3.setAttribute('data-action', 'clipboard');\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n\n\n li.classList.add('ta-has-child-menu');\n\n li.appendChild(a);\n li.appendChild(subMenu);\n\n a.href = itemUrl;\n a.innerHTML = title;\n this.addPaletteListItem(li);\n })\n }\n\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n\n this.updatePaletteItems();\n }\n\n\t/**\n * Handle global keypresses (at document level). Note that other key presses\n * are handled by paletteActions()\n *\n * @param {KeyboardEvent} e\n */\n async handleGlobalKey(e) {\n\t\tif (this.shortcutKeysPressed(e)) {\n e.preventDefault();\n e.stopPropagation();\n\t\t\tif (this.paletteShown()) {\n\t\t\t\tthis.hidePalette();\n\t\t\t} else {\n\t\t\t\tthis.showPalette();\n\t\t\t}\n\t\t}\n\n\t\tif (e.code === 'Escape' && this.paletteShown()) {\n\t\t\tif (this.isSubMenuOpen()){\n this.closeSubMenu();\n } else {\n this.hidePalette();\n }\n\t\t}\n\n if (this.paletteShown()) {\n await this.paletteActions(e);\n\t\t}\n\t}\n\n\tshortcutKeysPressed(keyEvent) {\n // The reduce here works through all the different possible key combos\n // (more than one can be specified in options)\n\t\tconst keysPressed = this.options.shortcutKeys.reduce(\n\t\t\t(keyPressed, combo) => {\n\t\t\t\tif (keyPressed) {\n\t\t\t\t\treturn keyPressed;\n\t\t\t\t}\n return ((!navigator.platform.startsWith('Mac')) || (combo.meta === keyEvent.metaKey))\n && (combo.alt === keyEvent.altKey)\n && (combo.shift === keyEvent.shiftKey)\n && (combo.ctrl === keyEvent.ctrlKey)\n && (\n keyEvent.code === 'Key' + combo.key.toUpperCase()\n || ( combo.key === ' ' && keyEvent.code.toUpperCase() === 'SPACE' )\n );\n }, false);\n\t\treturn keysPressed;\n\t}\n\n async debouncedPaletteSearchAndUpdate() {\n // If search string is not long enough for content search, then\n // run without debounce.\n if (\n ( this.paletteInputElement.value !== '' && this.paletteInputElement.value.length <= 2)\n || this.postTypes === [] ) {\n this.debounceTimeout = null;\n await this.paletteSearchAndUpdate();\n return;\n }\n // If timer is null, reset it to 500ms and run your functions.\n // Otherwise, wait until timer is cleared\n if (!this.debounceTimeout) {\n this.debounceTimeout = setTimeout(async function () {\n // Reset timeout\n this.debounceTimeout = null;\n\n // Run the search function\n await this.paletteSearchAndUpdate();\n }.bind(this), 750);\n }\n }\n\n\t/**\n * Handle (non-global) keypresses on the palette\n *\n * @param {KeyboardEvent} e\n * @returns {Promise}\n */\n async paletteActions(e) {\n\t\tif (e.code === 'ArrowDown' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveDown();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'ArrowUp' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveUp();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'Enter' && this.paletteShown()) {\n this.doAction(this.metaPressed(e));\n return;\n\t\t}\n if (this.isSubMenuOpen()) {\n return;\n }\n\t\tawait this.debouncedPaletteSearchAndUpdate();\n\t}\n\n\tshowPalette() {\n\t\tthis.paletteInputElement.value = '';\n\t\tthis.paletteElement?.classList.add('active');\n\t\tthis.paletteInputElement?.focus();\n\t}\n\n\thidePalette() {\n this.navigating = false;\n\t\tthis.paletteElement?.classList.remove('active');\n if (this.isSubMenuOpen()) {\n this.closeSubMenu();\n }\n\t}\n\n\tpaletteShown() {\n\t\treturn this.paletteElement?.classList.contains('active');\n\t}\n\n checkForPaletteItemClick(e) {\n if (e.target.tagName === 'A') {\n e.preventDefault();\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = e.target.closest('li');\n } else {\n this.selectedItem = e.target.closest('li');\n }\n this.setSelectedElement();\n\n this.doAction(this.metaPressed(e));\n }\n }\n\n\tcheckForClickToClose(e) {\n\t\tif (e.target.id === this.paletteElement.id) {\n\t\t\tthis.hidePalette();\n\t\t}\n\t}\n\n\tsetSelectedElement() {\n if (this.isSubMenuOpen()) {\n this.paletteItemsElement?.querySelectorAll('.ta-submenu.active li.selected')?.forEach(e => e.classList.remove('selected'));\n this.selectedSubItem.classList.add('selected');\n } else {\n this.paletteItemsElement?.querySelectorAll('li.selected')?.forEach(e => e.classList.remove('selected'));\n if (this.selectedItem) {\n this.selectedItem.classList.add('selected');\n this.scrollList();\n }\n }\n\t}\n\n\tscrollList() {\n\t\t// Scrolling up\n\t\tif (this.selectedItem.offsetTop < this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop;\n\t\t}\n\t\t// Scrolling down\n\t\tif (this.selectedItem.offsetTop + this.selectedItem.offsetHeight > this.paletteItemsElement.offsetHeight + this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop + this.selectedItem.offsetHeight - this.paletteItemsElement.offsetHeight;\n\t\t}\n\t}\n\n setHoveredItem(element) {\n // Only do this for li's\n if ('LI' === element.tagName) {\n this.navigating = true;\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = element;\n } else {\n this.selectedItem = element;\n }\n this.setSelectedElement();\n }\n }\n\n\tmoveDown() {\n if (this.isSubMenuOpen()) {\n const nextItem = this.selectedSubItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedSubItem = nextItem;\n this.setSelectedElement();\n }\n } else {\n const nextItem = this.selectedItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedItem = nextItem;\n this.setSelectedElement();\n }\n }\n\t}\n\n\tmoveUp() {\n if (this.isSubMenuOpen()) {\n const prevItem = this.selectedSubItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedSubItem = prevItem;\n this.setSelectedElement();\n }\n } else {\n const prevItem = this.selectedItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedItem = prevItem;\n this.setSelectedElement();\n }\n }\n }\n\n isSubMenuOpen() {\n return null !== this.openedSubMenu;\n }\n\n openSubMenu(subMenuElement) {\n // Set height in case main menu is smaller than sub menu\n const subMenuHeight = subMenuElement.offsetHeight;\n this.paletteItemsElement.style.minHeight = subMenuHeight + \"px\";\n subMenuElement.classList.add('active');\n\n this.paletteInputElement.disabled = true;\n // Blur the input so that keys can continue to be captured\n this.paletteInputElement.blur();\n\n this.selectedSubItem = subMenuElement.querySelector('li');\n this.openedSubMenu = subMenuElement;\n this.setSelectedElement();\n }\n\n closeSubMenu(subMenuElement = null) {\n if (null === subMenuElement) {\n subMenuElement = document.querySelector('.ta-submenu.active');\n }\n subMenuElement.classList.remove('active');\n this.selectedSubItem.classList.remove('active');\n this.paletteItemsElement.style.minHeight = 'auto';\n this.selectedSubItem = null;\n this.openedSubMenu = null;\n this.paletteInputElement.disabled = false;\n this.paletteInputElement.focus();\n }\n\n\tdoAction(metaPressed = false) {\n if (this.isSubMenuOpen()) {\n this.actOnItem(this.selectedSubItem, metaPressed);\n return;\n }\n if (this.selectedItem.classList.contains('ta-has-child-menu')) {\n const subMenu = this.selectedItem.querySelector('.ta-submenu');\n this.openSubMenu(subMenu);\n return;\n }\n\n this.actOnItem(this.selectedItem, metaPressed);\n }\n\n actOnItem(item, metaPressed) {\n this.hidePalette();\n const link = item.querySelector('a');\n const url = link.href;\n\n if ('clipboard' === link.dataset.action) {\n navigator.clipboard.writeText(url);\n return;\n }\n\n if (metaPressed) {\n window.open(url, '_blank');\n } else {\n window.location = url;\n }\n }\n\n\tselectedItemDisplayed() {\n\t\treturn Array.from(this.paletteItemsElement.childNodes).includes(this.selectedItem);\n\t}\n\n\tasync paletteSearchAndUpdate() {\n\t\tawait this.paletteSearch();\n\t\tthis.updatePaletteItems();\n\t}\n\n\tasync paletteSearch() {\n // Get the value...\n // const response = await globalThis.contentApi.get('posts', { search: this.paletteInputElement.value, per_page: 100, status: ['publish', 'future', 'draft', 'pending', 'private'] });\n\n this.buildPaletteItems();\n\n if (this.paletteInputElement.value !== '') {\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n }\n\n // Content search - don't search everything!\n if (globalThis.contentApi.active && this.postTypes !== [] && this.paletteInputElement.value.length > 2) {\n this.paletteInnerElement.classList.add('loading');\n\n globalThis.contentApi.getPosts(this.paletteInputElement.value)\n .then(\n results => {\n this.injectContentItems(results);\n this.paletteInnerElement.classList.remove('loading');\n }\n )\n }\n\t}\n\n\tupdatePaletteItems() {\n\t\tconst newItems = document.createElement('ul');\n\t\tnewItems.id = 'ta-command-palette-items';\n\n\t\tthis.paletteItems.forEach(i => {\n\t\t\tnewItems.appendChild(i);\n\t\t})\n\n\t\tthis.paletteItemsElement.replaceChildren(...newItems.children);\n\n\t\tif (!this.navigating || !this.selectedItemDisplayed()) {\n\t\t\tthis.selectedItem = this.paletteItems[0];\n\t\t}\n\n\t\tthis.setSelectedElement();\n\t}\n\n}\n", "export default class TurboAdminMenuItem {\n\n\tconstructor(title, action, parentTitle, noCache = false) {\n\t\tthis.title = title;\n\t\tthis.action = action;\n\t\tthis.parentTitle = parentTitle;\n this.noCache = noCache;\n\t}\n\n sameAs(item) {\n return item.title === this.title &&\n item.action === this.action &&\n item.parentTitle === this.parentTitle;\n }\n}\n", "/**\n * This class is an abstraction of the browser extension storage API\n * (see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage)\n * but that falls back to using regular localStorage if we're not in a\n * browser extension.\n *\n * This exists so that the same API can be used from both the browser\n * extension AND the plugin version of Turbo Admin.\n *\n * Note that for the extension, data saved is \"global\" to the extension\n * and is NOT site specific.\n */\nexport default class Storage {\n\n /**\n * Constructor - detects where code is running and sets the local\n * store appropriately.\n */\n constructor() {\n /** @type {null|storageStorageArea|WindowLocalStorage} */\n this.store = null;\n\n if ('undefined' === typeof (browser)) {\n this.store = window.localStorage;\n } else {\n this.store = browser.storage.local;\n }\n }\n\n /**\n * Set/save extension data. Must be passed an object with key/value\n * pairs.\n *\n * @param {Object} dataObject\n */\n async set(dataObject) {\n if ('undefined' === typeof (browser)) {\n const keys = Object.keys(dataObject);\n keys.forEach(key => this.store.setItem(key, JSON.stringify(dataObject[key])));\n } else {\n await this.store.set(dataObject);\n }\n }\n\n /**\n * Get data from the extension's storage.\n *\n * Note that fetched data will be a object with the key as a\n * property.\n *\n * @param {String} key\n * @returns {Promise<Object>}\n */\n async get(key) {\n if ('undefined' === typeof (browser)) {\n let returnObj = {};\n let item = this.store.getItem(key);\n if (! item) {\n return returnObj;\n }\n let itemObject = null;\n try {\n itemObject = JSON.parse(this.store.getItem(key));\n } catch (e) {\n itemObject = null;\n }\n returnObj[key] = itemObject;\n return returnObj;\n } else {\n return await this.store.get(key);\n }\n }\n\n}\n", "import Storage from './class-storage.js';\n\nexport default class ContentApi {\n\n constructor() {\n // this.discoverApiRoot().then(e => null);\n // console.log('Discovered API base: ', this.apiBase);\n this.active = false;\n this.store = new Storage();\n\n // This is used to \"cache\" duplicate requests.\n // It's an object because it will have search strings as keys\n this.cache = {};\n }\n\n async discoverApiRoot() {\n let wpApiSettings = null;\n this.storageKey = 'wpApiSettings.' + globalThis.taWp.home;\n\n // Could be in the wp-api-request-js-extra (on wp-admin side)\n const wpApiSettingsScript = document.getElementById('wp-api-request-js-extra');\n if (wpApiSettingsScript) {\n const wpApiSettingsString = wpApiSettingsScript.innerHTML.match(/var\\s+wpApiSettings\\s+=\\s+(.+);/)[1];\n const wpApiSettings = JSON.parse(wpApiSettingsString);\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Getting from extension storage returns a object with the key\n // as the key. Which is weird.\n wpApiSettings = await this.store.get(this.storageKey);\n if (wpApiSettings\n && Object.keys(wpApiSettings).length !== 0\n && wpApiSettings[this.storageKey]\n && 'object' === typeof(wpApiSettings[this.storageKey])) {\n // Get the key'ed item out of the object\n wpApiSettings = wpApiSettings[this.storageKey];\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Could be in <link rel=\"https://api.w.org/\" href=\"https://something/wp-json/\">\n if (globalThis.taWp.apiLinkUrl) {\n this.apiRoot = globalThis.taWp.apiLinkUrl;\n // Just guess this\n this.apiBase = this.apiRoot + 'wp/v2/';\n this.active = true;\n return;\n }\n }\n\n userLoggedIn() {\n return document.body.classList.contains('logged-in') ||\n document.body.classList.contains('wp-admin');\n }\n\n async maybeExpireNonce(wpApiSettings) {\n if (wpApiSettings?.nonce && ! this.userLoggedIn()) {\n // Clear apiSetting nonce\n this.apiNonce = null;\n wpApiSettings.nonce = null;\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n }\n }\n\n makeParamString(data) {\n const params = new URLSearchParams();\n\n Object.keys(data).forEach(paramKey => {\n // Handle arrays\n if (Array.isArray(data[paramKey])) {\n const arrayParamKey = paramKey + '[]';\n data[paramKey].forEach( item => params.append(arrayParamKey, item));\n } else {\n params.append(paramKey, data[paramKey]);\n }\n });\n\n return params.toString();\n }\n\n statuses() {\n if (this.apiNonce) {\n return [\"publish\", \"future\", \"draft\", \"pending\", \"private\"];\n } else {\n return [\"publish\"];\n }\n }\n\n types() {\n return globalThis.turboAdmin.turboAdminPalette.postTypes;\n }\n\n async getPosts(searchString) {\n // Check the cache\n if (undefined !== this.cache[searchString]) {\n return this.cache[searchString];\n }\n\n // Fetch results\n const response = await this.get(\n // \"posts\",\n \"search\",\n {\n search: searchString,\n per_page: 100,\n // status: this.statuses(),\n type: 'post',\n subtype: 'any'\n }\n );\n\n // Decode JSON\n const result = await response.json();\n\n // Store in the cache\n this.cache[searchString] = result;\n\n return result;\n }\n\n async get(path, data = {}) {\n const init = {\n method: 'GET',\n headers: {},\n mode: 'cors',\n cache: 'no-store',\n }\n\n // Add the nonce if there is one\n if (this.apiNonce) {\n data._wpnonce = this.apiNonce;\n }\n\n const params = this.makeParamString(data);\n\n const response = await fetch(`${this.apiBase}${path}/?${params}`);\n\n return response;\n }\n\n}\n", "/**\n * It's impossible to change the setting to off, because the\n * extension's content script runs in a sandbox and can't access\n * the wp object. But we can just toggle the class every time.\n */\nexport default class TurboAdminWpBlockEditorFullscreenKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed fullscreen\n // if (document.body.classList.contains('turbo-admin-killed-fullscreen')) {\n // return;\n // }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (mu.target.classList.contains('is-fullscreen-mode')) {\n this.killFullScreenEditor();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killFullScreenEditor();\n }\n\n killFullScreenEditor() {\n if (! document.body.classList.contains('is-fullscreen-mode')) {\n return;\n }\n\n document.body.classList.remove('is-fullscreen-mode');\n document.body.classList.add('turbo-admin-killed-fullscreen');\n\n const newStyles = document.createElement('style');\n newStyles.innerHTML = \"body.turbo-admin-killed-fullscreen .edit-post-fullscreen-mode-close { display: none; }\";\n document.body.appendChild(newStyles);\n }\n}\n", "/**\n *\n */\nexport default class TurboAdminWpBlockEditorWelcomeGuideKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed the modal\n if (document.body.classList.contains('ta-killed-post-welcome-guide')) {\n return;\n }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (! mu.target.classList.contains('modal-open')) {\n return;\n }\n\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n this.killWelcomeGuide();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killWelcomeGuide();\n }\n\n killWelcomeGuide() {\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n const closeButton = welcomeGuide.querySelector('.components-modal__header button');\n if (closeButton) {\n closeButton.click();\n /*\n * Also add a class to body so we don't do it again - subsequent modals\n * will need to be shown as they will have been user-initiated.\n */\n document.body.classList.add('ta-killed-post-welcome-guide');\n }\n }\n }\n}\n", "export default class TurboAdminWpNotices {\n\n // TODO: Handle empty IDS. Can we identify unique selectors?\n // See spinup!\n // Also need to only show move to panel if we can (i.e. if there's a way\n // to identify it))\n constructor(rememberedNoticeIds) {\n\n // Bail if we aren't in the admin\n if (! document.querySelector('body.wp-admin')) {\n return;\n }\n\n /*\n * These are the global notice selectors - these are always hidden\n */\n this.noticeSelectors = [\n '#wpbody-content > .notice',\n '#wpbody-content > .wrap > .notice',\n '#wpbody-content > .wrap > .updated',\n '#gf_dashboard_message', // Gravity forms\n '.jitm-banner', //\n '.fs-notice', // I get this in Replyable\n '#updraft-dashnotice', // Updraft backups\n '.woocommerce-message', // WooCommerce\n '#akismet_setup_prompt', // Akismet\n '#wf-onboarding-plugin-header', // WordFence onboard\n '.llar-notice-review' // Limit Login Attempts reloaded\n ];\n\n /*\n * These selectors are allowed (unless explicitly denied)\n */\n this.allowedClasses = [\n 'notice-success',\n 'notice-error',\n 'notice-failure',\n 'updated',\n ]\n\n if (rememberedNoticeIds) {\n this.rememberedNoticeIds = rememberedNoticeIds.length > 0 ? rememberedNoticeIds : [];\n } else {\n this.rememberedNoticeIds = [];\n }\n\n const toolbar = document.getElementById('wpadminbar');\n\n if (!toolbar) {\n return;\n }\n\n if (rememberedNoticeIds && rememberedNoticeIds.length > 0) {\n rememberedNoticeIds.forEach(id => {\n if ('string' === typeof(id) && id.length > 0) {\n this.noticeSelectors.push('#' + id);\n }\n });\n }\n\nconsole.log('Notice Selectors', this.noticeSelectors);\n const notices = document.querySelectorAll(this.noticeSelectors.join(','));\nconsole.log('Notices', notices);\n\n // Add buttons to notices that can be moved\n notices.forEach(notice => {\n this.maybeAddIdToNotice(notice)\n\n if (this.keepNotice(notice)) {\n const rememberButton = document.createElement('button');\n rememberButton.classList.add('ta-remember-notice-button');\n rememberButton.innerText = 'Move to panel';\n\n const forgetButton = document.createElement('button');\n forgetButton.classList.add('ta-forget-notice-button');\n forgetButton.innerText = 'Move to dashboard';\n\n notice.classList.add('ta-added-pos-relative');\n\n notice.appendChild(rememberButton);\n notice.appendChild(forgetButton);\n\n rememberButton.addEventListener('click', this.rememberNotice.bind(this), false, true);\n forgetButton.addEventListener('click', this.forgetNotice.bind(this), false, true);\n }\n });\n\n const noticesToHide = Array.from(notices).filter(notice => {\n if (this.rememberedNoticeIds.includes(notice.id)) {\n return true;\n }\n\n if (this.keepNotice(notice)) {\n return false;\n }\n\n // Invisible\n if (\n notice.offsetHeight === 0 ||\n notice.offsetWidth === 0\n ) {\n return false;\n }\n\n return true;\n })\n\n console.log('Notices to hide', noticesToHide)\n\n /**\n * Build the notices wrapper\n */\n /** @type {HTMLDivElement} */\n const noticesLinkWrapper = document.createElement('div');\n noticesLinkWrapper.id = 'ta-notices-link-wrap';\n noticesLinkWrapper.classList.add('hide-if-no-js', 'screen-meta-toggle');\n noticesLinkWrapper.style.margin='0 0 0 6px';\n noticesLinkWrapper.style.float='left';\n if (noticesToHide.length === 0) {\n noticesLinkWrapper.style.display='none';\n }\n\n /**\n * Add button.\n */\n /** @type {HTMLButtonElement} */\n const noticesButton = document.createElement('button');\n noticesButton.type='button';\n noticesButton.id='ta-notices-link';\n noticesButton.classList.add('button', 'show-settings');\n noticesButton.innerHTML='Notices <span id=\"ta-notice-count\">' + noticesToHide.length + '</span>';\n noticesButton.setAttribute('aria-controls', 'ta-notices-wrap');\n\n // This should replicate the functionality from wp-admin/js/common.js\n // as closely as possible. But note that we can't access the common.js\n // functions.\n noticesButton.addEventListener('click', this.toggleNoticesPanel.bind(this), false);\n\n /**\n * Add button to the link wrapper\n */\n noticesLinkWrapper.appendChild(noticesButton);\n\n /**\n * Add the link wrapper to the screen-meta-links section\n */\n const screenMetaLinks = document.getElementById('screen-meta-links');\n screenMetaLinks.appendChild(noticesLinkWrapper);\n\n /**\n * Build the panel\n */\n const noticesPanel = document.createElement('div');\n\n noticesPanel.id='ta-notices-wrap';\n noticesPanel.style.display='none';\n noticesPanel.dataset.open='no';\n\n const noticesPanelInner = document.createElement('div');\n noticesPanelInner.id = 'ta-notices-panel-inner';\n\n noticesToHide.forEach(notice => {\n // Add 'inline' class otherwise WordPress might move them around!\n notice.classList.add('inline');\n // See Toolbelt's implementation: https://github.com/BinaryMoon/wp-toolbelt/blob/dev/modules/tidy-notifications/src/js/script.js\n noticesPanelInner.append(notice);\n });\n\n /**\n * Add wrap to the meta area\n */\n noticesPanel.appendChild(noticesPanelInner);\n const screenMeta = document.getElementById('screen-meta');\n screenMeta.appendChild(noticesPanel);\n\n // Set up events on the new screen-meta item\n // if (window.screenMeta) {\n // window.screenMeta.init();\n // }\n }\n\n // Does the allowedClasses list say that this notice should be shown?\n keepNotice(noticeElem) {\n return this.allowedClasses.reduce( (found, current) => {\n return found || noticeElem.classList.contains(current)\n }, false);\n }\n\n rememberNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panel = document.getElementById('wp-admin-bar-ta-notices');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Remembering ${noticeId}`);\n panelInner.appendChild(notice);\n if (count === 0) {\n noticesLinkWrap.style.display = 'block';\n }\n\n this.updateScreenMetaHeight();\n\n countElem.innerText = parseInt(countElem.innerText, 10) + 1;\n\n this.saveRememberedNotice(noticeId);\n }\n\n saveRememberedNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n forgetNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Forgetting ${noticeId}`);\n\n notice.remove();\n\n const message = document.createElement('div');\n const p = document.createElement('p');\n message.classList.add('notice', 'ta-forget-notice-message');\n p.textContent = 'Notice will be back in dashboard on next page load';\n message.appendChild(p);\n panelInner.appendChild(message);\n\n this.updateScreenMetaHeight();\n\n // I was going to to this, but we need to keep the notice about\n // where the notice has gone.\n // if (count === 1) {\n // noticesLinkWrap.style.display = 'none';\n // }\n\n countElem.innerText = (count - 1).toString();\n this.saveForgottenNotice(noticeId);\n }\n\n saveForgottenNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n this.rememberedNoticeIds = this.rememberedNoticeIds.filter( id => id !== noticeId );\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n\n\n /*\n * For notices without IDs we'll see if we can add an ID that's a hash of their classlist\n */\n maybeAddIdToNotice(notice) {\n if (notice.id && notice.id !== '' && notice.id !=='message') {\n return;\n }\n\n const classes = notice.classList;\n notice.id = Array.from(notice.classList).join('-');\n }\n\n /**\n * Detect if WordPress has already applied event handlers to our new screen meta button.\n *\n * If it has then WordPress/backbone.js will handle the animation and we won't have to.\n *\n * @returns {boolean}\n */\n wordpressScreenMetaEventsExist() {\n return 'object' === typeof(window.screenMeta) && window.screenMeta.toggles.filter('#ta-notices-link').length > 0;\n }\n\n updateScreenMetaHeight() {\n // Don't do this if we're relying on backbone's animation\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n }\n\n toggleNoticesPanel(ev) {\n // We may be in the plugin in which case we don't want to run our handler if there's\n // a backbone handler on the button.\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n // Otherwise we mimic the swipe down animation.\n const animationSeconds = 0.3;\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n if (noticesPanel.dataset.open === 'no') {\n this.toggleOtherScreenMetaTabs();\n // Don't ask... just DON'T ask!\n noticesPanel.dataset.open = 'yes';\n screenMeta.style.transition = `max-height ${animationSeconds.toString(10)}s`;\n screenMeta.style.maxHeight = '0';\n screenMeta.style.overflow = 'hidden';\n screenMeta.style.display = 'block';\n noticesPanel.style.display = 'block';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n // setTimeout(() => {\n // // Nothing to do here.\n // }, animationSeconds * 1000);\n } else {\n noticesPanel.dataset.open = 'no';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = '0';\n setTimeout(() => {\n noticesPanel.style.display = '';\n screenMeta.style.display = '';\n screenMeta.style.transition = '';\n screenMeta.style.overflow = '';\n screenMeta.style.maxHeight = '';\n this.toggleOtherScreenMetaTabs();\n }, animationSeconds * 1000);\n }\n\n }\n\n toggleOtherScreenMetaTabs() {\n const otherTabs = document.querySelectorAll('#screen-meta-links .screen-meta-toggle:not(#ta-notices-link-wrap)');\n otherTabs.forEach( (tab) => {\n if (tab.style.visibility === 'hidden') {\n tab.style.visibility = '';\n } else {\n tab.style.visibility = 'hidden';\n }\n } );\n }\n}\n", "export default class ListTableShortcuts {\n\n constructor() {\n /**\n * @type {ListTableShortcuts}\n */\n const me = this;\n\n /**\n * @type {null|HTMLElement}\n */\n this.currentRow = null;\n\n /**\n * @type {number}\n */\n this.currentRowIndex = 0;\n\n /**\n * @type {HTMLTableElement}\n */\n this.listTable = document.querySelector('.wp-list-table');\n\n if (! this.listTable) {\n return;\n }\n\n /**\n * @type {NodeListOf<HTMLTableRowElement>}\n */\n this.tableRows = this.listTable.querySelectorAll('tbody#the-list > tr');\n\n document.addEventListener('keyup', e => this.handleKeyup(e));\n }\n\n /**\n *\n * @param {KeyboardEvent} ev\n */\n handleKeyup(ev) {\n if (document.activeElement.tagName !== 'BODY') {\n return;\n }\n\n if (ev.key === 'j') {\n this.tableMoveDown();\n } else if (ev.key === 'k') {\n this.tableMoveUp();\n } else if (ev.key.toLowerCase() === 'enter' && this.currentRow !== null) {\n this.openTableRowItem();\n }\n\n }\n\n tableMoveDown() {\n this.preTableChange();\n\n // Move down\n if (this.currentRow === null) {\n this.currentRowIndex = 0;\n } else {\n this.currentRowIndex++;\n }\n this.updateTable();\n }\n\n tableMoveUp() {\n this.preTableChange();\n\n if (this.currentRowIndex > 0) {\n this.currentRowIndex--;\n this.updateTable();\n }\n }\n\n preTableChange() {\n if (this.currentRow !== null) {\n this.tableRows[this.currentRowIndex].classList.remove('ta-active-table-row');\n }\n }\n\n updateTable() {\n this.currentRow = this.tableRows[this.currentRowIndex];\n\n if (! this.tableRows[this.currentRowIndex].classList.contains('ta-active-table-row')) {\n this.tableRows[this.currentRowIndex].classList.add('ta-active-table-row');\n }\n }\n\n openTableRowItem() {\n console.log(this);\n /** @type {HTMLAnchorElement} */\n const link = this.currentRow.querySelector('a.row-title');\n if (link) {\n link.click();\n }\n }\n}\n", "/*\n * This is the common Turbo Admin library.\n *\n * It's (currently) WordPress-specific, but can be loaded by\n * either the Extension OR the Plugin\n *\n * It takes an options object:\n *\n * options: {\n * shortcutKeys: [\n * // Array of shortcut key definitions, like:\n * {\n * {\n * meta: false,\n * alt: true,\n * ctrl: true,\n * shift: true,\n * key: 'p'\n * }\n * }\n * ],\n * appendToElement {\n * // Optional CSS selector to define what to append the palette to\n * 'body'\n * },\n * extraItems: [\n * // Optional array of extra item configs used to generate new item objects\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * ],\n * extraItemsRaw: [\n * // Optional array of raw item objects to be added\n * {\n * 'title': ,\n * 'action': ,\n * 'parentTitle': ,\n * }\n * ]\n * }\n */\nimport TurboAdminPalette from './class-turbo-admin-palette.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item.js';\nimport Acf from './class-acf.js';\nimport TurboAdminWpBlockEditorFullscreenKill from './class-turbo-admin-wp-block-editor-fullscreen-kill.js';\nimport TurboAdminWpBlockEditorWelcomeGuideKill from './class-turbo-admin-wp-block-editor-welcome-guide-kill.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\nimport TurboAdminListTableShortcuts from './class-list-table-shortcuts.js';\n\nexport default class TurboAdmin {\n\n constructor(options) {\n if (document.getElementById('ta-command-palette-container')) {\n console.log('TurboAdmin already initialised - I won\\'t make a second copy!');\n return;\n }\n\n this.options = options;\n }\n\n async init() {\n // Grab the global Wp object instance\n this.wp = globalThis.taWp;\n\n this.menu = [];\n // Check for saved menu when on front-end\n if (! this.wp.isBackend) {\n // Only use the cached items if the current URL matches the last site URL\n // This handles changes of multi-site site!\n // We ONLY need to do this on the front-end as the back-end will always\n // refresh the menu.\n if (! this.wp.siteChanged) {\n // Get from localStorage\n const savedMenu = window.localStorage.getItem('ta-palette-data');\n\n if (null !== savedMenu) {\n // Check for .logged-in class on body\n if (document.body.classList.contains('logged-in')) {\n // If still logged in merge (?) the items\n this.menu = JSON.parse(savedMenu);\n }\n }\n }\n } else {\n // On the back end, get the WordPress dashboard menu items\n this.menu = this.getMenu();\n }\n\n // Add other additional items\n this.addAdditionalMenuItems();\n // Add items passed in using extraItemsRaw\n this.menu = this.menu.concat(this.options.extraItemsRaw ?? []);\n\n // Add ACF items?\n // TODO: Make this better. Possible ASYNC somehow?\n // this.acf = new Acf();\n // if (this.acf.isAcfInstalled()) {\n // const acfLinks = await this.acf.getFieldGroups()\n // // console.table(acfItems);\n // const acfMenuItems = acfLinks.map(\n // item => new TurboAdminMenuItem(\n // item.label + ' (ACF)',\n // item.link,\n // ''\n // )\n // );\n // this.menu = this.menu.concat(acfMenuItems);\n // }\n\n // Sort the menu\n this.menu.sort((a, b) => (a.parentTitle + a.title).localeCompare(b.parentTitle + b.title));\n\n // Filter out no-cache items and save to localStorage.\n const itemsToSave = this.menu.filter(item => (! item.noCache));\n window.localStorage.setItem('ta-palette-data', JSON.stringify(itemsToSave));\n\n // Add palette markup to the DOM\n this.addPalette();\n // Initialise controls on the palette\n this.turboAdminPalette = new TurboAdminPalette(this.menu, this.options);\n\n if (true === this.options['block-editor-fullscreen-disable']) {\n // Initialise fullscreen kill\n this.turboAdminFullscreenKill = new TurboAdminWpBlockEditorFullscreenKill();\n }\n\n if (true === this.options['block-editor-welcome-screen-kill']) {\n this.turboAdminWelcomeKill = new TurboAdminWpBlockEditorWelcomeGuideKill();\n }\n\n if (true === this.options['list-table-keyboard-shortcuts']) {\n this.turboAdminListTableShortcuts = new TurboAdminListTableShortcuts();\n }\n\n // Add other things if we're logged in and have an API nonce\n if (globalThis.contentApi.userLoggedIn()) {\n // What shall we do?\n }\n }\n\n getMenu() {\n const items = [];\n const menuTop = document.getElementById('adminmenu');\n if (menuTop) {\n const topDOMItems = menuTop.querySelectorAll('li.menu-top');\n topDOMItems.forEach(el => {\n const a = el.querySelector('a.menu-top');\n const title = a.querySelector('.wp-menu-name').innerHTML;\n const action = a.href;\n const parentTitle = '';\n const item = new TurboAdminMenuItem(title, action, parentTitle);\n items.push(item);\n\n const subMenu = el.querySelector('.wp-submenu');\n if (!subMenu) {\n return;\n }\n const subItems = subMenu.querySelectorAll('li a');\n if (!subItems) {\n return;\n }\n subItems.forEach(subEl => {\n const parentTitle = title;\n const childTitle = subEl.innerHTML;\n const childAction = subEl.href;\n const item = new TurboAdminMenuItem(childTitle, childAction, parentTitle);\n items.push(item);\n })\n });\n }\n return items;\n }\n\n addAdditionalMenuItems() {\n\n /*\n * I'd LOVE for this to be config driven\n *\n * [\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * {\n * 'detectType': 'dom',\n * 'detectSelector': '#wpadminbar',\n * 'itemTitle': 'Logout',\n * 'itemUrlFunction': () => logoutUrl\n * }\n * Can we add actionTypes as well? To do clicks and navigates?\n * ]\n */\n\n // Get passed-in extraItems\n let extraItems = this.options.extraItems ?? [];\n\n // Merge in defaults\n extraItems = extraItems.concat(\n [\n {\n 'detectType': 'dom',\n 'detectSelector': 'body.wp-admin #wp-admin-bar-view-site a',\n 'itemTitleFunction': () => 'View/visit site',\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-dashboard a',\n 'itemTitleFunction': (element) => element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wpadminbar',\n 'itemTitleFunction': () => 'Logout',\n 'itemUrlFunction': () => document.getElementById('wp-admin-bar-logout')?.querySelector('a')?.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-edit a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-view a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-new-content .ab-submenu a',\n 'itemTitleFunction': (item) => 'New ' + item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-customize a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelectorNone': '#wpadminbar, #loginform',\n 'itemTitleFunction': () => \"Log in\",\n 'itemUrlFunction': () => {\n if (globalThis.taWp.home) {\n return globalThis.taWp.siteUrl;\n }\n // Try getting wp-admin\n return 'javascript:alert(\\'Sorry, could not detect login URL.\\')';\n }\n },\n // This is on the login screen\n {\n 'detectType': 'dom',\n 'detectSelector': '#backtoblog a',\n 'itemTitleFunction': () => \"View/visit site\",\n 'itemUrlFunction': (element) => element.href\n },\n // Multisite items\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin > a',\n 'itemTitleFunction': () => \"Network Admin\",\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin .ab-submenu a',\n 'itemTitleFunction': (element) => 'Network Admin: ' + element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-my-sites-list .ab-submenu a',\n 'itemTitleFunction': (element) => \"Sites: \" + element.closest('.menupop').querySelector('a').innerText + ' - ' + element.innerText,\n 'itemUrlFunction': (element) => element.href\n },\n // Oxygen builder items\n {\n 'detectType': 'dom',\n 'detectSelector': '#ct-edit-template-builder',\n 'itemTitleFunction': () => 'Edit with Oxygen',\n 'itemUrlFunction': (element) => element.href,\n 'noCache': true\n },\n // It's worth noting that the Oxygen Builder doesn't use a /wp-admin URL\n // and so kinda appears to Turbo Admin to be a \"front-end\" page and it\n // doesn't refresh the menu items.\n {\n 'detectType': 'dom',\n 'detectSelector': '.oxygen-back-to-wp-menu .oxygen-toolbar-button-dropdown a:not(:last-of-type)',\n 'itemTitleFunction': (element) => 'Back to WP: ' + element.textContent,\n 'itemUrlFunction': (element) => {\n if (element.href) {\n return element.href;\n } else {\n let url = new URL(window.location.href);\n return url.origin + url.pathname;\n }\n },\n 'noCache': true\n }\n ]\n );\n\n extraItems.forEach(item => {\n let detected = false;\n let elements = null;\n if (item.detectType === 'url') {\n detected = Boolean(window.location.href.includes(item.detectPattern));\n } else if (item.detectType === 'dom') {\n if (item.detectSelector) {\n elements = document.querySelectorAll(item.detectSelector);\n detected = Boolean(elements);\n } else if (item.detectSelectorNone) {\n elements = document.querySelectorAll(item.detectSelectorNone);\n detected = elements.length === 0;\n // Need to pass SOMETHING to the loop below\n elements = document.querySelectorAll('body');\n }\n }\n if (!detected) {\n return;\n }\n\n elements.forEach(element => {\n const newItem = new TurboAdminMenuItem(item.itemTitleFunction(element), item.itemUrlFunction(element), '', item?.noCache);\n // Might already have one so check.\n if (this.menu.some(menuItem => {\n // This must be newItem.sameAs, not menuItem.sameAs because the menuItem\n // may have been loaded from saved menu and may not actually be an instance\n // of a TurboAdminMenuItem.\n return newItem.sameAs(menuItem)\n } )) {\n return;\n }\n // We don't already have one. So add it.\n this.menu.push(newItem);\n });\n })\n }\n\n addPalette() {\n // Container\n const container = document.createElement('div');\n container.id = 'ta-command-palette-container';\n // Palette\n const palette = document.createElement('div');\n palette.id = 'ta-command-palette';\n // Input field\n const input = document.createElement('input');\n input.id = \"ta-command-palette-input\";\n input.name = \"ta-command-palette-input\";\n input.type = \"text\";\n // Set this to stop stuff trying to fill it.\n input.setAttribute('autocomplete', 'off');\n // List\n const list = document.createElement('ul');\n list.id = \"ta-command-palette-items\";\n // Join it all up\n container.appendChild(palette);\n palette.appendChild(input);\n palette.appendChild(list);\n\n document.querySelector(this.options.appendToElement ?? 'body').appendChild(container);\n }\n\n}\n", "export default class Wp {\n\n constructor() {\n\n // Set home and siteUrl\n this.siteUrl = '';\n this.home = '';\n this.loginUrl = '';\n this.apiLinkUrl = '';\n }\n\n async completeInit() {\n // Fetch previously loaded site URL\n this.previousUrl = window.localStorage.getItem('ta-palette-data-site');\n\n // Fetch previously-stored siteUrl and home\n this.siteUrl = window.localStorage.getItem('ta-palette-data-siteurl');\n this.home = window.localStorage.getItem('ta-palette-data-home');\n\n /**\n * Are we in the back-end?\n */\n this.isBackend = this.getIsBackend();\n\n /**\n * Figure out all the WP URLs\n */\n await this.getUrls();\n\n /**\n * Tells you if the best-guess site URL of the current page is different\n * to that of the previously saved site URL.\n */\n this.siteChanged = this.home !== this.previousUrl;\n\n // Save current site URL for next time\n window.localStorage.setItem('ta-palette-data-site', this.home);\n }\n\n getIsBackend() {\n return document.body.classList.contains('wp-admin');\n }\n\n /**\n * Return the URL with a trailing slash if it didn't already have one.\n *\n * @param {String} url The URL to check\n * @return {String} The resulting URL\n */\n ensureTrailingSlash( url ) {\n if (url.endsWith('/')) {\n return url;\n } else {\n return url + '/';\n }\n }\n\n /**\n * Tests if a URL works and, if redirected, that the final URL contains a given\n * string. Returns the final, redirected-to URL if the test passed, or false\n * otherwise.\n *\n * @param {String} url The URL to test.\n * @param {String} responseUrlMustContain The string to test against the final URL\n * @returns {Promise<String|Boolean>} The final URL or false.\n */\n async testUrl(url, responseUrlMustContain='') {\n\n /** @type {RequestInit} */\n const init = {\n method: 'HEAD',\n mode: 'cors',\n cache: 'no-cache',\n credentials: 'same-origin'\n }\n\n const response = await fetch(url, init);\n\n if (response.redirected && !response.url.includes(responseUrlMustContain)) {\n return false;\n }\n\n if ( ! response.ok ) {\n return false;\n }\n\n return response.url;\n }\n\n async findWhichUrlWorks(urls, responseUrlMustContain='') {\n let workingUrl = false;\n let result;\n // This has to be a for loop rather than reduce or forEach as separate\n // async callbacks would be launched asynchronously.\n for (let i=0; i<urls.length; i++) {\n if (workingUrl) continue;\n result = await this.testUrl(urls[i], responseUrlMustContain);\n if (result !== false) {\n workingUrl = result;\n }\n }\n return workingUrl;\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessSiteUrlFromHome( homeUrl ) {\n const homeWithSlash = this.ensureTrailingSlash(homeUrl);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // homeWithSlash + 'wp-admin/',\n // homeWithSlash + 'wp/wp-admin'\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return homeWithSlash + 'wp-admin/';\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessHome() {\n const currentUrl = new URL(window.location);\n const origin = this.ensureTrailingSlash(currentUrl.origin);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // origin\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return origin;\n }\n\n /**\n *\n * @param {String} siteUrl\n * @returns {String}\n */\n guessHomeFromSiteUrl(siteUrl) {\n // Not much we can do here.\n return siteUrl.replace(/wp-admin\\/?/, '');\n }\n\n async getUrls() {\n // See if we can actually find the URL for the API\n /** @type {HTMLLinkElement|null} */\n const apiLink = document.querySelector('link[rel=\"https://api.w.org/\"]');\n\n if (apiLink) {\n this.apiLinkUrl = apiLink.href;\n }\n // Figure out the siteurl and home - this is different on the front and back end\n if (this.isBackend) {\n // This is easy in the back end/Dashboard!\n this.siteUrl = window.location.href.match(/(^.*wp-admin)/)[1];\n this.home = document.getElementById('wp-admin-bar-site-name').querySelector('a').href;\n\n // Always set the siteUrl and home as this is definitive\n window.localStorage.setItem('ta-palette-data-siteurl', this.siteUrl);\n window.localStorage.setItem('ta-palette-data-home', this.home);\n } else if (! this.siteUrl || ! this.home) {\n\n // If we're not in the backend then (in the extension at least) we\n // could be on the front-end and not logged in, so check for an\n // admin bar and grab from that if there is one.\n if (document.getElementById('wpadminbar')) {\n this.siteUrl = document.getElementById('wp-admin-bar-dashboard').querySelector('a').href;\n // Try for the API link\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n } else {\n // We know what the siteUrl is, so guess the home from the siteUrl\n this.home = this.guessHomeFromSiteUrl(this.siteUrl);\n }\n\n } else {\n // Try for the API link\n // TODO: This needs to be async so it doesn't hold things up.\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n // We (probably) know what the home link is now, so guess the wp-admin\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome( this.home );\n } else {\n this.siteUrl = this.guessSiteUrl();\n }\n } else {\n // We got nothing.\n this.home = await this.guessHome();\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome(this.home);\n }\n }\n }\n }\n\n // Always trim the / for comparisons\n if (this.siteUrl) {\n this.siteUrl = this.siteUrl.replace(/(.+)\\/$/, '$1');\n }\n if (this.home) {\n this.home = this.home.replace(/(.+)\\/$/, '$1');\n }\n\n // console.log('siteUrl: ', this.siteUrl);\n // console.log('home: ', this.home);\n }\n\n}\n", "import TurboAdmin from './class-turbo-admin.js';\nimport ContentApi from './class-content-api.js';\nimport Wp from './class-wp.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\n\nconst taStorageKey = 'turbo-admin-settings';\n\n// Note that in the extension, the globalThis is not the browser's global scope,\n// it is sandboxed. So we can't check across the plugin/extension boundary here.\nasync function taInit(settings) {\n\n globalThis.turboAdmin = null;\n\n // Handle empty settings\n if (typeof(settings[taStorageKey]) === 'undefined') {\n console.log('Weird. Turbo Admin could not find any settings');\n return;\n }\n// document.addEventListener('DOMContentLoaded', e => {\n// \tturboAdmin = new TurboAdmin(globalThis.turboAdminOptions);\n// });\n\n globalThis.turboAdminOptions = settings[taStorageKey];\n\n // Get Wp stuff ready\n globalThis.taWp = new Wp();\n\n // Parts of this init are async.\n await globalThis.taWp.completeInit();\n\n console.log('Turbo Admin: WP is initialised');\n\n // Get/set api settings\n globalThis.contentApi = new ContentApi();\n await globalThis.contentApi.discoverApiRoot();\n\n console.log('Turbo Admin: Content API is initialised');\n\n globalThis.turboAdmin = new TurboAdmin(globalThis.turboAdminOptions);\n\n await globalThis.turboAdmin.init();\n\n if (settings[taStorageKey]['hide-notices']) {\n globalThis.turboAdminWpNotices = new TurboAdminWpNotices(settings[taStorageKey].rememberedNoticeIds);\n }\n}\n\n/**\n * This is plugin-specific. It should not be present in the extension code.\n */\ndocument.addEventListener('DOMContentLoaded', async e => {\n\tglobalThis.turboAdminOptions = {};\n\tglobalThis.turboAdminOptions[taStorageKey] = {\n\t\t// wpTurboAdmin is set using wp_localize_script\n\t\tshortcutKeys: globalThis.wpTurboAdmin.keys,\n // These don't apply to the plugin version\n 'block-editor-fullscreen-disable': false,\n 'block-editor-welcome-screen-kill': false,\n // I don't think we'll do this in the plugin as the code would be SO different.\n 'live-dev-notice': false,\n 'list-table-keyboard-shortcuts': globalThis.wpTurboAdmin['listTableShortcuts'] === '1',\n 'hide-notices': globalThis.wpTurboAdmin['hideNotices'] === '1',\n 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array()\n\t}\n\tawait taInit(globalThis.turboAdminOptions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;AAC/B,eAAW,kBAAkB,gBAAgB;AAAA,MAE5C,cAAc,WAAW,aAAa;AAAA,MAEhC,mCAAmC;AAAA,MACnC,oCAAoC;AAAA,MAEpC,mBAAmB;AAAA,MACnB,iCAAiC,WAAW,aAAa,0BAA0B;AAAA,MACnF,gBAAgB,WAAW,aAAa,mBAAmB;AAAA,MAC3D,qBAAuB,KAAK,MAAM,OAAO,aAAa,QAAQ,2BAA2B,IAAI;AAAA;AAEpG,UAAM,OAAO,WAAW;AAAA;",3 "sources": ["../src/fuse-6.4.6.js", "../src/class-turbo-admin-palette.js", "../src/class-turbo-admin-menu-item.js", "../src/class-storage.js", "../src/class-content-api.js", "../src/class-turbo-admin-wp-block-editor-fullscreen-kill.js", "../src/class-turbo-admin-wp-block-editor-welcome-guide-kill.js", "../src/class-turbo-admin-wp-notices.js", "../src/class-list-table-shortcuts.js", "../src/class-turbo-admin-barkeeper.js", "../src/class-turbo-admin.js", "../src/class-wp.js", "../src/main.js"], 4 "sourcesContent": ["/**\n * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2021 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\nvar e, t; e = this, t = function () { \"use strict\"; function e(t) { return (e = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e })(t) } function t(e, t) { if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\") } function n(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } function r(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e } function i(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function o(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function c(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? o(Object(n), !0).forEach((function (t) { i(e, t, n[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach((function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) })) } return e } function a(e, t) { if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && u(e, t) } function s(e) { return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) { return e.__proto__ || Object.getPrototypeOf(e) })(e) } function u(e, t) { return (u = Object.setPrototypeOf || function (e, t) { return e.__proto__ = t, e })(e, t) } function h(e, t) { return !t || \"object\" != typeof t && \"function\" != typeof t ? function (e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e }(e) : t } function f(e) { var t = function () { if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if (\"function\" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], (function () { }))), !0 } catch (e) { return !1 } }(); return function () { var n, r = s(e); if (t) { var i = s(this).constructor; n = Reflect.construct(r, arguments, i) } else n = r.apply(this, arguments); return h(this, n) } } function l(e) { return function (e) { if (Array.isArray(e)) return d(e) }(e) || function (e) { if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) }(e) || function (e, t) { if (e) { if (\"string\" == typeof e) return d(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return \"Object\" === n && e.constructor && (n = e.constructor.name), \"Map\" === n || \"Set\" === n ? Array.from(e) : \"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? d(e, t) : void 0 } }(e) || function () { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\") }() } function d(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++)r[n] = e[n]; return r } function v(e) { return Array.isArray ? Array.isArray(e) : \"[object Array]\" === b(e) } function g(e) { return \"string\" == typeof e } function y(e) { return \"number\" == typeof e } function p(e) { return !0 === e || !1 === e || function (e) { return m(e) && null !== e }(e) && \"[object Boolean]\" == b(e) } function m(t) { return \"object\" === e(t) } function k(e) { return null != e } function M(e) { return !e.trim().length } function b(e) { return null == e ? void 0 === e ? \"[object Undefined]\" : \"[object Null]\" : Object.prototype.toString.call(e) } var x = function (e) { return \"Invalid value for key \".concat(e) }, L = function (e) { return \"Pattern length exceeds max of \".concat(e, \".\") }, S = Object.prototype.hasOwnProperty, w = function () { function e(n) { var r = this; t(this, e), this._keys = [], this._keyMap = {}; var i = 0; n.forEach((function (e) { var t = _(e); i += t.weight, r._keys.push(t), r._keyMap[t.id] = t, i += t.weight })), this._keys.forEach((function (e) { e.weight /= i })) } return r(e, [{ key: \"get\", value: function (e) { return this._keyMap[e] } }, { key: \"keys\", value: function () { return this._keys } }, { key: \"toJSON\", value: function () { return JSON.stringify(this._keys) } }]), e }(); function _(e) { var t = null, n = null, r = null, i = 1; if (g(e) || v(e)) r = e, t = O(e), n = j(e); else { if (!S.call(e, \"name\")) throw new Error(function (e) { return \"Missing \".concat(e, \" property in key\") }(\"name\")); var o = e.name; if (r = o, S.call(e, \"weight\") && (i = e.weight) <= 0) throw new Error(function (e) { return \"Property 'weight' in key '\".concat(e, \"' must be a positive integer\") }(o)); t = O(o), n = j(o) } return { path: t, id: n, weight: i, src: r } } function O(e) { return v(e) ? e : e.split(\".\") } function j(e) { return v(e) ? e.join(\".\") : e } var A = c({}, { isCaseSensitive: !1, includeScore: !1, keys: [], shouldSort: !0, sortFn: function (e, t) { return e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1 } }, {}, { includeMatches: !1, findAllMatches: !1, minMatchCharLength: 1 }, {}, { location: 0, threshold: .6, distance: 100 }, {}, { useExtendedSearch: !1, getFn: function (e, t) { var n = [], r = !1; return function e(t, i, o) { if (k(t)) if (i[o]) { var c = t[i[o]]; if (!k(c)) return; if (o === i.length - 1 && (g(c) || y(c) || p(c))) n.push(function (e) { return null == e ? \"\" : function (e) { if (\"string\" == typeof e) return e; var t = e + \"\"; return \"0\" == t && 1 / e == -1 / 0 ? \"-0\" : t }(e) }(c)); else if (v(c)) { r = !0; for (var a = 0, s = c.length; a < s; a += 1)e(c[a], i, o + 1) } else i.length && e(c, i, o + 1) } else n.push(t) }(e, g(t) ? t.split(\".\") : t, 0), r ? n : n[0] }, ignoreLocation: !1, ignoreFieldNorm: !1 }), I = /[^ ]+/g; function C() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 3, t = new Map, n = Math.pow(10, e); return { get: function (e) { var r = e.match(I).length; if (t.has(r)) return t.get(r); var i = 1 / Math.sqrt(r), o = parseFloat(Math.round(i * n) / n); return t.set(r, o), o }, clear: function () { t.clear() } } } var E = function () { function e() { var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r; t(this, e), this.norm = C(3), this.getFn = i, this.isCreated = !1, this.setIndexRecords() } return r(e, [{ 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 e = this, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; this.keys = t, this._keysMap = {}, t.forEach((function (t, n) { e._keysMap[t.id] = n })) } }, { key: \"create\", value: function () { var e = this; !this.isCreated && this.docs.length && (this.isCreated = !0, g(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(); g(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(); t < n; t += 1)this.records[t].i -= 1 } }, { key: \"getValueForItemAtKeyId\", value: function (e, t) { return e[this._keysMap[t]] } }, { key: \"size\", value: function () { return this.records.length } }, { key: \"_addString\", value: function (e, t) { if (k(e) && !M(e)) { var n = { v: e, i: t, n: this.norm.get(e) }; this.records.push(n) } } }, { key: \"_addObject\", value: function (e, t) { var n = this, r = { i: t, $: {} }; this.keys.forEach((function (t, i) { var o = n.getFn(e, t.path); if (k(o)) if (v(o)) !function () { for (var e = [], t = [{ nestedArrIndex: -1, value: o }]; t.length;) { var c = t.pop(), a = c.nestedArrIndex, s = c.value; if (k(s)) if (g(s) && !M(s)) { var u = { v: s, i: a, n: n.norm.get(s) }; e.push(u) } else v(s) && s.forEach((function (e, n) { t.push({ nestedArrIndex: n, value: e }) })) } r.$[i] = e }(); else if (!M(o)) { var c = { v: o, n: n.norm.get(o) }; r.$[i] = c } })), this.records.push(r) } }, { key: \"toJSON\", value: function () { return { keys: this.keys, records: this.records } } }]), e }(); function $(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r, o = new E({ getFn: i }); return o.setKeys(e.map(_)), o.setSources(t), o.create(), o } function R(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.errors, r = void 0 === n ? 0 : n, i = t.currentLocation, o = void 0 === i ? 0 : i, c = t.expectedLocation, a = void 0 === c ? 0 : c, s = t.distance, u = void 0 === s ? A.distance : s, h = t.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r / e.length; if (f) return l; var d = Math.abs(a - o); return u ? l + d / u : d ? 1 : l } function F() { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : A.minMatchCharLength, n = [], r = -1, i = -1, o = 0, c = e.length; o < c; o += 1) { var a = e[o]; a && -1 === r ? r = o : a || -1 === r || ((i = o - 1) - r + 1 >= t && n.push([r, i]), r = -1) } return e[o - 1] && o - r >= t && n.push([r, o - 1]), n } function P(e) { for (var t = {}, n = 0, r = e.length; n < r; n += 1) { var i = e.charAt(n); t[i] = (t[i] || 0) | 1 << r - n - 1 } return t } var N = function () { function e(n) { var r = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, o = i.location, c = void 0 === o ? A.location : o, a = i.threshold, s = void 0 === a ? A.threshold : a, u = i.distance, h = void 0 === u ? A.distance : u, f = i.includeMatches, l = void 0 === f ? A.includeMatches : f, d = i.findAllMatches, v = void 0 === d ? A.findAllMatches : d, g = i.minMatchCharLength, y = void 0 === g ? A.minMatchCharLength : g, p = i.isCaseSensitive, m = void 0 === p ? A.isCaseSensitive : p, k = i.ignoreLocation, M = void 0 === k ? A.ignoreLocation : k; if (t(this, e), this.options = { location: c, threshold: s, distance: h, includeMatches: l, findAllMatches: v, minMatchCharLength: y, isCaseSensitive: m, ignoreLocation: M }, this.pattern = m ? n : n.toLowerCase(), this.chunks = [], this.pattern.length) { var b = function (e, t) { r.chunks.push({ pattern: e, alphabet: P(e), startIndex: t }) }, x = this.pattern.length; if (x > 32) { for (var L = 0, S = x % 32, w = x - S; L < w;)b(this.pattern.substr(L, 32), L), L += 32; if (S) { var _ = x - 32; b(this.pattern.substr(_), _) } } else b(this.pattern, 0) } } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.options, n = t.isCaseSensitive, r = t.includeMatches; if (n || (e = e.toLowerCase()), this.pattern === e) { var i = { isMatch: !0, score: 0 }; return r && (i.indices = [[0, e.length - 1]]), i } var o = this.options, c = o.location, a = o.distance, s = o.threshold, u = o.findAllMatches, h = o.minMatchCharLength, f = o.ignoreLocation, d = [], v = 0, g = !1; this.chunks.forEach((function (t) { var n = t.pattern, i = t.alphabet, o = t.startIndex, y = function (e, t, n) { var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, i = r.location, o = void 0 === i ? A.location : i, c = r.distance, a = void 0 === c ? A.distance : c, s = r.threshold, u = void 0 === s ? A.threshold : s, h = r.findAllMatches, f = void 0 === h ? A.findAllMatches : h, l = r.minMatchCharLength, d = void 0 === l ? A.minMatchCharLength : l, v = r.includeMatches, g = void 0 === v ? A.includeMatches : v, y = r.ignoreLocation, p = void 0 === y ? A.ignoreLocation : y; if (t.length > 32) throw new Error(L(32)); for (var m, k = t.length, M = e.length, b = Math.max(0, Math.min(o, M)), x = u, S = b, w = d > 1 || g, _ = w ? Array(M) : []; (m = e.indexOf(t, S)) > -1;) { var O = R(t, { currentLocation: m, expectedLocation: b, distance: a, ignoreLocation: p }); if (x = Math.min(O, x), S = m + k, w) for (var j = 0; j < k;)_[m + j] = 1, j += 1 } S = -1; for (var I = [], C = 1, E = k + M, $ = 1 << k - 1, P = 0; P < k; P += 1) { for (var N = 0, D = E; N < D;) { var z = R(t, { errors: P, currentLocation: b + D, expectedLocation: b, distance: a, ignoreLocation: p }); z <= x ? N = D : E = D, D = Math.floor((E - N) / 2 + N) } E = D; var K = Math.max(1, b - D + 1), q = f ? M : Math.min(b + D, M) + k, W = Array(q + 2); W[q + 1] = (1 << P) - 1; for (var J = q; J >= K; J -= 1) { var T = J - 1, U = n[e.charAt(T)]; if (w && (_[T] = +!!U), W[J] = (W[J + 1] << 1 | 1) & U, P && (W[J] |= (I[J + 1] | I[J]) << 1 | 1 | I[J + 1]), W[J] & $ && (C = R(t, { errors: P, currentLocation: T, expectedLocation: b, distance: a, ignoreLocation: p })) <= x) { if (x = C, (S = T) <= b) break; K = Math.max(1, 2 * b - S) } } var V = R(t, { errors: P + 1, currentLocation: b, expectedLocation: b, distance: a, ignoreLocation: p }); if (V > x) break; I = W } var B = { isMatch: S >= 0, score: Math.max(.001, C) }; if (w) { var G = F(_, d); G.length ? g && (B.indices = G) : B.isMatch = !1 } return B }(e, n, i, { location: c + o, distance: a, threshold: s, findAllMatches: u, minMatchCharLength: h, includeMatches: r, ignoreLocation: f }), p = y.isMatch, m = y.score, k = y.indices; p && (g = !0), v += m, p && k && (d = [].concat(l(d), l(k))) })); var y = { isMatch: g, score: g ? v / this.chunks.length : 1 }; return g && r && (y.indices = d), y } }]), e }(), D = function () { function e(n) { t(this, e), this.pattern = n } return r(e, [{ key: \"search\", value: function () { } }], [{ key: \"isMultiMatch\", value: function (e) { return z(e, this.multiRegex) } }, { key: \"isSingleMatch\", value: function (e) { return z(e, this.singleRegex) } }]), e }(); function z(e, t) { var n = e.match(t); return n ? n[1] : null } var K = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^=(.*)$/ } }]), i }(D), q = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)$/ } }]), i }(D), W = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^\\^(.*)$/ } }]), i }(D), J = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!\\^(.*)$/ } }]), i }(D), T = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^(.*)\\$$/ } }]), i }(D), U = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)\\$$/ } }]), i }(D), V = function (e) { a(i, e); var n = f(i); function i(e) { var r, o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, c = o.location, a = void 0 === c ? A.location : c, s = o.threshold, u = void 0 === s ? A.threshold : s, h = o.distance, f = void 0 === h ? A.distance : h, l = o.includeMatches, d = void 0 === l ? A.includeMatches : l, v = o.findAllMatches, g = void 0 === v ? A.findAllMatches : v, y = o.minMatchCharLength, p = void 0 === y ? A.minMatchCharLength : y, m = o.isCaseSensitive, k = void 0 === m ? A.isCaseSensitive : m, M = o.ignoreLocation, b = void 0 === M ? A.ignoreLocation : M; return t(this, i), (r = n.call(this, e))._bitapSearch = new N(e, { location: a, threshold: u, distance: f, includeMatches: d, findAllMatches: g, minMatchCharLength: p, isCaseSensitive: k, ignoreLocation: b }), r } return r(i, [{ 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 /^(.*)$/ } }]), i }(D), B = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ key: \"search\", value: function (e) { for (var t, n = 0, r = [], i = this.pattern.length; (t = e.indexOf(this.pattern, n)) > -1;)n = t + i, r.push([t, n - 1]); var o = !!r.length; return { isMatch: o, score: o ? 0 : 1, indices: r } } }], [{ key: \"type\", get: function () { return \"include\" } }, { key: \"multiRegex\", get: function () { return /^'\"(.*)\"$/ } }, { key: \"singleRegex\", get: function () { return /^'(.*)$/ } }]), i }(D), G = [K, B, W, J, U, T, q, V], H = G.length, Q = / +(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/; function X(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return e.split(\"|\").map((function (e) { for (var n = e.trim().split(Q).filter((function (e) { return e && !!e.trim() })), r = [], i = 0, o = n.length; i < o; i += 1) { for (var c = n[i], a = !1, s = -1; !a && ++s < H;) { var u = G[s], h = u.isMultiMatch(c); h && (r.push(new u(h, t)), a = !0) } if (!a) for (s = -1; ++s < H;) { var f = G[s], l = f.isSingleMatch(c); if (l) { r.push(new f(l, t)); break } } } return r })) } var Y = new Set([V.type, B.type]), Z = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = r.isCaseSensitive, o = void 0 === i ? A.isCaseSensitive : i, c = r.includeMatches, a = void 0 === c ? A.includeMatches : c, s = r.minMatchCharLength, u = void 0 === s ? A.minMatchCharLength : s, h = r.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r.findAllMatches, d = void 0 === l ? A.findAllMatches : l, v = r.location, g = void 0 === v ? A.location : v, y = r.threshold, p = void 0 === y ? A.threshold : y, m = r.distance, k = void 0 === m ? A.distance : m; t(this, e), this.query = null, this.options = { isCaseSensitive: o, includeMatches: a, minMatchCharLength: u, findAllMatches: d, ignoreLocation: f, location: g, threshold: p, distance: k }, this.pattern = o ? n : n.toLowerCase(), this.query = X(this.pattern, this.options) } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.query; if (!t) return { isMatch: !1, score: 1 }; var n = this.options, r = n.includeMatches; e = n.isCaseSensitive ? e : e.toLowerCase(); for (var i = 0, o = [], c = 0, a = 0, s = t.length; a < s; a += 1) { var u = t[a]; o.length = 0, i = 0; for (var h = 0, f = u.length; h < f; h += 1) { var d = u[h], v = d.search(e), g = v.isMatch, y = v.indices, p = v.score; if (!g) { c = 0, i = 0, o.length = 0; break } if (i += 1, c += p, r) { var m = d.constructor.type; Y.has(m) ? o = [].concat(l(o), l(y)) : o.push(y) } } if (i) { var k = { isMatch: !0, score: c / i }; return r && (k.indices = o), k } } return { isMatch: !1, score: 1 } } }], [{ key: \"condition\", value: function (e, t) { return t.useExtendedSearch } }]), e }(), ee = []; function te(e, t) { for (var n = 0, r = ee.length; n < r; n += 1) { var i = ee[n]; if (i.condition(e, t)) return new i(e, t) } return new N(e, t) } var ne = \"$and\", re = \"$or\", ie = \"$path\", oe = \"$val\", ce = function (e) { return !(!e[ne] && !e[re]) }, ae = function (e) { return !!e[ie] }, se = function (e) { return !v(e) && m(e) && !ce(e) }, ue = function (e) { return i({}, ne, Object.keys(e).map((function (t) { return i({}, t, e[t]) }))) }; function he(e, t) { var n = t.ignoreFieldNorm, r = void 0 === n ? A.ignoreFieldNorm : n; e.forEach((function (e) { var t = 1; e.matches.forEach((function (e) { var n = e.key, i = e.norm, o = e.score, c = n ? n.weight : null; t *= Math.pow(0 === o && c ? Number.EPSILON : o, (c || 1) * (r ? 1 : i)) })), e.score = t })) } function fe(e, t) { var n = e.matches; t.matches = [], k(n) && n.forEach((function (e) { if (k(e.indices) && e.indices.length) { var n = { indices: e.indices, value: e.value }; e.key && (n.key = e.key.src), e.idx > -1 && (n.refIndex = e.idx), t.matches.push(n) } })) } function le(e, t) { t.score = e.score } function de(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.includeMatches, i = void 0 === r ? A.includeMatches : r, o = n.includeScore, c = void 0 === o ? A.includeScore : o, a = []; return i && a.push(fe), c && a.push(le), e.map((function (e) { var n = e.idx, r = { item: t[n], refIndex: n }; return a.length && a.forEach((function (t) { t(e, r) })), r })) } var ve = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = arguments.length > 2 ? arguments[2] : void 0; t(this, e), this.options = c({}, A, {}, r), this.options.useExtendedSearch, this._keyStore = new w(this.options.keys), this.setCollection(n, i) } return r(e, [{ key: \"setCollection\", value: function (e, t) { if (this._docs = e, t && !(t instanceof E)) throw new Error(\"Incorrect 'index' type\"); this._myIndex = t || $(this.options.keys, this._docs, { getFn: this.options.getFn }) } }, { key: \"add\", value: function (e) { k(e) && (this._docs.push(e), this._myIndex.add(e)) } }, { key: \"remove\", value: function () { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () { return !1 }, t = [], n = 0, r = this._docs.length; n < r; n += 1) { var i = this._docs[n]; e(i, n) && (this.removeAt(n), n -= 1, r -= 1, t.push(i)) } return t } }, { key: \"removeAt\", value: function (e) { this._docs.splice(e, 1), this._myIndex.removeAt(e) } }, { key: \"getIndex\", value: function () { return this._myIndex } }, { key: \"search\", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.limit, r = void 0 === n ? -1 : n, i = this.options, o = i.includeMatches, c = i.includeScore, a = i.shouldSort, s = i.sortFn, u = i.ignoreFieldNorm, h = g(e) ? g(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e); return he(h, { ignoreFieldNorm: u }), a && h.sort(s), y(r) && r > -1 && (h = h.slice(0, r)), de(h, this._docs, { includeMatches: o, includeScore: c }) } }, { key: \"_searchStringList\", value: function (e) { var t = te(e, this.options), n = this._myIndex.records, r = []; return n.forEach((function (e) { var n = e.v, i = e.i, o = e.n; if (k(n)) { var c = t.searchIn(n), a = c.isMatch, s = c.score, u = c.indices; a && r.push({ item: n, idx: i, matches: [{ score: s, value: n, norm: o, indices: u }] }) } })), r } }, { key: \"_searchLogical\", value: function (e) { var t = this, n = function (e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.auto, i = void 0 === r || r, o = function e(n) { var r = Object.keys(n), o = ae(n); if (!o && r.length > 1 && !ce(n)) return e(ue(n)); if (se(n)) { var c = o ? n[ie] : r[0], a = o ? n[oe] : n[c]; if (!g(a)) throw new Error(x(c)); var s = { keyId: j(c), pattern: a }; return i && (s.searcher = te(a, t)), s } var u = { children: [], operator: r[0] }; return r.forEach((function (t) { var r = n[t]; v(r) && r.forEach((function (t) { u.children.push(e(t)) })) })), u }; return ce(e) || (e = ue(e)), o(e) }(e, this.options), r = this._myIndex.records, i = {}, o = []; return r.forEach((function (e) { var r = e.$, c = e.i; if (k(r)) { var a = function e(n, r, i) { if (!n.children) { var o = n.keyId, c = n.searcher, a = t._findMatches({ key: t._keyStore.get(o), value: t._myIndex.getValueForItemAtKeyId(r, o), searcher: c }); return a && a.length ? [{ idx: i, item: r, matches: a }] : [] } switch (n.operator) { case ne: for (var s = [], u = 0, h = n.children.length; u < h; u += 1) { var f = e(n.children[u], r, i); if (!f.length) return []; s.push.apply(s, l(f)) } return s; case re: for (var d = [], v = 0, g = n.children.length; v < g; v += 1) { var y = e(n.children[v], r, i); if (y.length) { d.push.apply(d, l(y)); break } } return d } }(n, r, c); a.length && (i[c] || (i[c] = { idx: c, item: r, matches: [] }, o.push(i[c])), a.forEach((function (e) { var t, n = e.matches; (t = i[c].matches).push.apply(t, l(n)) }))) } })), o } }, { key: \"_searchObjectList\", value: function (e) { var t = this, n = te(e, this.options), r = this._myIndex, i = r.keys, o = r.records, c = []; return o.forEach((function (e) { var r = e.$, o = e.i; if (k(r)) { var a = []; i.forEach((function (e, i) { a.push.apply(a, l(t._findMatches({ key: e, value: r[i], searcher: n }))) })), a.length && c.push({ idx: o, item: r, matches: a }) } })), c } }, { key: \"_findMatches\", value: function (e) { var t = e.key, n = e.value, r = e.searcher; if (!k(n)) return []; var i = []; if (v(n)) n.forEach((function (e) { var n = e.v, o = e.i, c = e.n; if (k(n)) { var a = r.searchIn(n), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: n, idx: o, norm: c, indices: h }) } })); else { var o = n.v, c = n.n, a = r.searchIn(o), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: o, norm: c, indices: h }) } return i } }]), e }(); return ve.version = \"6.4.6\", ve.createIndex = $, ve.parseIndex = function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.getFn, r = void 0 === n ? A.getFn : n, i = e.keys, o = e.records, c = new E({ getFn: r }); return c.setKeys(i), c.setIndexRecords(o), c }, ve.config = A, function () { ee.push.apply(ee, arguments) }(Z), ve }, \"object\" == typeof exports && \"undefined\" != typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define(t) : (e = e || self).Fuse = t();\n", "/*\n * Some notes on how this works...\n *\n * paletteData is passed into the constructor and is the initial list of items\n * these are TurboAdminMenuItem objects\n *\n * At any point, buildPaletteItems() can be called to turn the paletteData\n * into an array of \"li\" nodes.\n *\n * updatePaletteItems inserts the paletteItems into the \"ul\" list and sets the\n * selectedElement\n *\n * The selectedItem is always one of the paletteItems\n *\n * paletteSearch rebuilds the paletteItems from the paletteData using\n * buildPaletteItems, and then filters the list with FuseJS\n */\n\nimport Fuse from './fuse-6.4.6.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item';\nimport ContentApi from './class-content-api.js';\n\nexport default class TurboAdminPalette {\n\n\tconstructor(paletteData, options) {\n\n\t\tconsole.log('Initialising TurboAdmin');\n\n this.options = options;\n\n /** @type {HTMLDivElement} */\n this.paletteElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette-container'));\n /** @type {HTMLDivElement} */\n this.paletteInnerElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette'));\n\t\t/** @type {HTMLInputElement} */\n this.paletteInputElement = /** @type {HTMLInputElement} */ (document.getElementById('ta-command-palette-input'));\n\t\t/** @type {HTMLUListElement} */\n this.paletteItemsElement = /** @type {HTMLUListElement} */ (document.getElementById('ta-command-palette-items'));\n\n\t\t// Get palette data\n\t\tthis.paletteData = paletteData;\n\n // Get post type data from API\n this.postTypes = [];\n this.fetchPostTypes();\n\n // paletteItems is the list of 'li' elements used to build the palette\n this.paletteItems = [];\n\n // itemIndex is a \"cache\" of URLs used to check if we already\n // have an item in the palette\n this.itemIndex = {};\n\n // Convert into LI elements\n this.buildPaletteItems();\n\n\n\t\tthis.selectedItem = this.paletteItems[0];\n this.openedSubMenu = null;\n this.selectedSubItem = null;\n\n\t\t// Add them to the DOM\n\t\tthis.updatePaletteItems();\n\n // Set state\n this.navigating = false;\n this.debounceTimeout;\n\n\t\tthis.paletteFuseOptions = [];\n\t\tthis.paletteFuse = null;\n\n\t\tif (typeof (Fuse) !== 'function') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.paletteFuseOptions = {\n\t\t\tkeys: ['innerText'],\n\t\t}\n\n\t\tthis.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n\n\t\tdocument.addEventListener('keydown', e => this.handleGlobalKey(e));\n\n\t\tthis.paletteElement.addEventListener('click', e => {\n\t\t\tthis.checkForPaletteItemClick(e);\n this.checkForClickToClose(e);\n\t\t});\n\n this.paletteItemsElement.addEventListener('mouseover', e => {\n this.setHoveredItem(e.target);\n });\n\t}\n\n htmlDecode(input) {\n var doc = new DOMParser().parseFromString(input, \"text/html\");\n return doc.documentElement.textContent;\n }\n\n isMac() {\n return navigator.platform.startsWith('Mac');\n }\n\n metaPressed(e) {\n return this.isMac() ? e.metaKey : e.ctrlKey;\n }\n\n fetchPostTypes() {\n if (! globalThis.contentApi.active) {\n this.postTypes = [];\n return;\n }\n\n globalThis.contentApi.get('types').then(\n response => {\n response.json().then(\n types => {\n this.postTypes = types;\n }\n );\n }\n );\n }\n\n\tbuildPaletteItems() {\n this.paletteItems = [];\n this.itemIndex = {};\n\n\t\tthis.paletteData.forEach(item => {\n\t\t\tconst li = document.createElement('li');\n\t\t\tconst a = document.createElement('a');\n\t\t\tli.appendChild(a);\n\t\t\ta.href = item.action;\n\t\t\tlet title = item.title;\n\t\t\tif (item.parentTitle) {\n\t\t\t\ttitle = item.parentTitle + \": \" + title;\n\t\t\t}\n\t\t\ta.innerHTML = title;\n this.addPaletteListItem(li);\n\t\t});\n\t}\n\n // This takes a 'li' element and adds it to the paletteItems.\n // It also updates any caches and stuff.\n addPaletteListItem(listItem) {\n this.paletteItems.push(listItem);\n\n const link = listItem.querySelector('a');\n if (link) {\n this.itemIndex[link.href] = 1;\n }\n }\n\n contentItemExists(url) {\n return Boolean(this.itemIndex[url]);\n }\n\n injectContentItems(contentItems) {\n console.log('Injecting items');\n\n // We'll need this in the loop below.\n const profileLinkElem = document.getElementById('wp-admin-bar-edit-profile');\n let profileLink = null;\n if (profileLinkElem) {\n profileLink = profileLinkElem.querySelector('a').href;\n }\n\n // TODO: Can we not do this on every content item inject?\n // Check for presence of Oxygen Page builder\n /** @type {HTMLElement|string|Number} */\n let oxygenLinkElem = document.getElementById('toplevel_page_ct_dashboard_page');\n // Also check for a menu bar item\n if (! oxygenLinkElem) {\n oxygenLinkElem = document.getElementById('wp-admin-bar-oxygen_admin_bar_menu');\n }\n // Check to see if Oxygen link is cached\n if (! oxygenLinkElem) {\n oxygenLinkElem = Number(window.localStorage.getItem('ta-has-oxygen-builder'));\n }\n // Save Oxygen builder status\n window.localStorage.setItem('ta-has-oxygen-builder', Boolean(oxygenLinkElem) ? '1' : '0' );\n\n if (contentItems.length > 0) {\n contentItems.forEach(item => {\n const itemTitle = item.title;\n // const itemTitle = item.title.rendered;\n const itemType = item.subtype;\n const itemUrl = item.url;\n\n // console.log('Adding item: ' + itemTitle);\n\n // // Check if item already exists\n if (this.contentItemExists(itemUrl)) {\n console.log('Not adding duplicate');\n return;\n }\n\n const itemTypeName = this.postTypes[itemType] ? this.postTypes[itemType].name : itemType;\n const title = `${itemTitle} (${itemTypeName})`;\n\n const li = document.createElement('li');\n const a = document.createElement('a');\n const subMenu = document.createElement('div');\n const subMenuTitle = document.createElement('div');\n const subMenuItems = document.createElement('ul');\n subMenu.classList.add('ta-submenu');\n subMenuTitle.classList.add('ta-submenu-title');\n\n subMenuTitle.textContent = this.htmlDecode(itemTitle);\n subMenuItems.classList.add('ta-submenu-items');\n subMenu.appendChild(subMenuTitle);\n subMenu.appendChild(subMenuItems);\n\n const subMenuItem1 = document.createElement('li');\n const subMenuLink1 = document.createElement('a');\n subMenuLink1.innerText = \"View\";\n subMenuLink1.href = itemUrl;\n subMenuItem1.appendChild(subMenuLink1);\n subMenuItems.appendChild(subMenuItem1);\n\n if (profileLink) {\n // Need to get edit URL. This seems like the best way for now.\n const editLink = profileLink.replace('profile.php', `post.php?post=${item.id}&action=edit`);\n\n const subMenuItem2 = document.createElement('li');\n const subMenuLink2 = document.createElement('a');\n subMenuLink2.innerText = \"Edit\";\n subMenuLink2.href = editLink;\n subMenuItem2.appendChild(subMenuLink2);\n subMenuItems.appendChild(subMenuItem2);\n }\n\n if (oxygenLinkElem) {\n // Oxygen Edit Links are like: https://example.com.com/?page_id=26&ct_builder=true&ct_inner=true\n const oxygenLink = globalThis.taWp.home + `?page_id=${item.id}&ct_builder=true&ct_inner=true`;\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Edit with Oxygen\";\n subMenuLink3.href = oxygenLink;\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n }\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Copy link\";\n // Because this is an href we're setting it gets URI encoded!\n subMenuLink3.href = itemUrl;\n subMenuLink3.setAttribute('data-action', 'clipboard');\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n\n\n li.classList.add('ta-has-child-menu');\n\n li.appendChild(a);\n li.appendChild(subMenu);\n\n a.href = itemUrl;\n a.innerHTML = title;\n this.addPaletteListItem(li);\n })\n }\n\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n\n this.updatePaletteItems();\n }\n\n\t/**\n * Handle global keypresses (at document level). Note that other key presses\n * are handled by paletteActions()\n *\n * @param {KeyboardEvent} e\n */\n async handleGlobalKey(e) {\n\t\tif (this.shortcutKeysPressed(e)) {\n e.preventDefault();\n e.stopPropagation();\n\t\t\tif (this.paletteShown()) {\n\t\t\t\tthis.hidePalette();\n\t\t\t} else {\n\t\t\t\tthis.showPalette();\n\t\t\t}\n\t\t}\n\n\t\tif (e.code === 'Escape' && this.paletteShown()) {\n\t\t\tif (this.isSubMenuOpen()){\n this.closeSubMenu();\n } else {\n this.hidePalette();\n }\n\t\t}\n\n if (this.paletteShown()) {\n await this.paletteActions(e);\n\t\t}\n\t}\n\n\tshortcutKeysPressed(keyEvent) {\n // The reduce here works through all the different possible key combos\n // (more than one can be specified in options)\n\t\tconst keysPressed = this.options.shortcutKeys.reduce(\n\t\t\t(keyPressed, combo) => {\n\t\t\t\tif (keyPressed) {\n\t\t\t\t\treturn keyPressed;\n\t\t\t\t}\n return ((!navigator.platform.startsWith('Mac')) || (combo.meta === keyEvent.metaKey))\n && (combo.alt === keyEvent.altKey)\n && (combo.shift === keyEvent.shiftKey)\n && (combo.ctrl === keyEvent.ctrlKey)\n && (\n keyEvent.code === 'Key' + combo.key.toUpperCase()\n || ( combo.key === ' ' && keyEvent.code.toUpperCase() === 'SPACE' )\n );\n }, false);\n\t\treturn keysPressed;\n\t}\n\n async debouncedPaletteSearchAndUpdate() {\n // If search string is not long enough for content search, then\n // run without debounce.\n if (\n ( this.paletteInputElement.value !== '' && this.paletteInputElement.value.length <= 2)\n || this.postTypes === [] ) {\n this.debounceTimeout = null;\n await this.paletteSearchAndUpdate();\n return;\n }\n // If timer is null, reset it to 500ms and run your functions.\n // Otherwise, wait until timer is cleared\n if (!this.debounceTimeout) {\n this.debounceTimeout = setTimeout(async function () {\n // Reset timeout\n this.debounceTimeout = null;\n\n // Run the search function\n await this.paletteSearchAndUpdate();\n }.bind(this), 750);\n }\n }\n\n\t/**\n * Handle (non-global) keypresses on the palette\n *\n * @param {KeyboardEvent} e\n * @returns {Promise}\n */\n async paletteActions(e) {\n\t\tif (e.code === 'ArrowDown' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveDown();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'ArrowUp' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveUp();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'Enter' && this.paletteShown()) {\n this.doAction(this.metaPressed(e));\n return;\n\t\t}\n if (this.isSubMenuOpen()) {\n return;\n }\n\t\tawait this.debouncedPaletteSearchAndUpdate();\n\t}\n\n\tshowPalette() {\n\t\tthis.paletteInputElement.value = '';\n this.paletteItemsElement.scrollTop = 0;\n\t\tthis.paletteElement?.classList.add('active');\n\t\tthis.paletteInputElement?.focus();\n\t}\n\n\thidePalette() {\n this.navigating = false;\n\t\tthis.paletteElement?.classList.remove('active');\n this.paletteInputElement.value = '';\n this.paletteInputElement.blur();\n if (this.isSubMenuOpen()) {\n this.closeSubMenu();\n }\n\t}\n\n\tpaletteShown() {\n\t\treturn this.paletteElement?.classList.contains('active');\n\t}\n\n checkForPaletteItemClick(e) {\n if (e.target.tagName === 'A') {\n e.preventDefault();\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = e.target.closest('li');\n } else {\n this.selectedItem = e.target.closest('li');\n }\n this.setSelectedElement();\n\n this.doAction(this.metaPressed(e));\n }\n }\n\n\tcheckForClickToClose(e) {\n\t\tif (e.target.id === this.paletteElement.id) {\n\t\t\tthis.hidePalette();\n\t\t}\n\t}\n\n\tsetSelectedElement() {\n if (this.isSubMenuOpen()) {\n this.paletteItemsElement?.querySelectorAll('.ta-submenu.active li.selected')?.forEach(e => e.classList.remove('selected'));\n this.selectedSubItem.classList.add('selected');\n } else {\n this.paletteItemsElement?.querySelectorAll('li.selected')?.forEach(e => e.classList.remove('selected'));\n if (this.selectedItem) {\n this.selectedItem.classList.add('selected');\n this.scrollList();\n }\n }\n\t}\n\n\tscrollList() {\n\t\t// Scrolling up\n\t\tif (this.selectedItem.offsetTop < this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop;\n\t\t}\n\t\t// Scrolling down\n\t\tif (this.selectedItem.offsetTop + this.selectedItem.offsetHeight > this.paletteItemsElement.offsetHeight + this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop + this.selectedItem.offsetHeight - this.paletteItemsElement.offsetHeight;\n\t\t}\n\t}\n\n setHoveredItem(element) {\n // Only do this for li's\n if ('LI' === element.tagName) {\n this.navigating = true;\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = element;\n } else {\n this.selectedItem = element;\n }\n this.setSelectedElement();\n }\n }\n\n\tmoveDown() {\n if (this.isSubMenuOpen()) {\n const nextItem = this.selectedSubItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedSubItem = nextItem;\n this.setSelectedElement();\n }\n } else {\n const nextItem = this.selectedItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedItem = nextItem;\n this.setSelectedElement();\n }\n }\n\t}\n\n\tmoveUp() {\n if (this.isSubMenuOpen()) {\n const prevItem = this.selectedSubItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedSubItem = prevItem;\n this.setSelectedElement();\n }\n } else {\n const prevItem = this.selectedItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedItem = prevItem;\n this.setSelectedElement();\n }\n }\n }\n\n isSubMenuOpen() {\n return null !== this.openedSubMenu;\n }\n\n openSubMenu(subMenuElement) {\n // Set height in case main menu is smaller than sub menu\n const subMenuHeight = subMenuElement.offsetHeight;\n this.paletteItemsElement.style.minHeight = subMenuHeight + \"px\";\n subMenuElement.classList.add('active');\n\n\n this.selectedSubItem = subMenuElement.querySelector('li');\n this.openedSubMenu = subMenuElement;\n this.setSelectedElement();\n\n this.paletteInputElement.disabled = true;\n // Blur the input so that keys can continue to be captured\n this.paletteInputElement.blur();\n }\n\n closeSubMenu(subMenuElement = null) {\n if (null === subMenuElement) {\n subMenuElement = document.querySelector('.ta-submenu.active');\n }\n subMenuElement.classList.remove('active');\n this.selectedSubItem.classList.remove('active');\n this.paletteItemsElement.style.minHeight = 'auto';\n this.selectedSubItem = null;\n this.openedSubMenu = null;\n this.paletteInputElement.disabled = false;\n this.paletteInputElement.focus();\n }\n\n\tdoAction(metaPressed = false) {\n if (this.isSubMenuOpen()) {\n this.actOnItem(this.selectedSubItem, metaPressed);\n return;\n }\n if (this.selectedItem.classList.contains('ta-has-child-menu')) {\n const subMenu = this.selectedItem.querySelector('.ta-submenu');\n this.openSubMenu(subMenu);\n return;\n }\n\n this.actOnItem(this.selectedItem, metaPressed);\n }\n\n actOnItem(item, metaPressed) {\n this.hidePalette();\n const link = item.querySelector('a');\n const url = link.href;\n\n if ('clipboard' === link.dataset.action) {\n navigator.clipboard.writeText(url);\n return;\n }\n\n if (metaPressed) {\n window.open(url, '_blank');\n } else {\n window.location = url;\n }\n }\n\n\tselectedItemDisplayed() {\n\t\treturn Array.from(this.paletteItemsElement.childNodes).includes(this.selectedItem);\n\t}\n\n\tasync paletteSearchAndUpdate() {\n\t\tawait this.paletteSearch();\n\t\tthis.updatePaletteItems();\n\t}\n\n\tasync paletteSearch() {\n // Get the value...\n // const response = await globalThis.contentApi.get('posts', { search: this.paletteInputElement.value, per_page: 100, status: ['publish', 'future', 'draft', 'pending', 'private'] });\n\n this.buildPaletteItems();\n\n if (this.paletteInputElement.value !== '') {\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n }\n\n // Content search - don't search everything!\n if (globalThis.contentApi.active && this.postTypes !== [] && this.paletteInputElement.value.length > 2) {\n this.paletteInnerElement.classList.add('loading');\n\n globalThis.contentApi.getPosts(this.paletteInputElement.value)\n .then(\n results => {\n this.injectContentItems(results);\n this.paletteInnerElement.classList.remove('loading');\n }\n )\n }\n\t}\n\n\tupdatePaletteItems() {\n\t\tconst newItems = document.createElement('ul');\n\t\tnewItems.id = 'ta-command-palette-items';\n\n\t\tthis.paletteItems.forEach(i => {\n\t\t\tnewItems.appendChild(i);\n\t\t})\n\n\t\tthis.paletteItemsElement.replaceChildren(...newItems.children);\n\n\t\tif (!this.navigating || !this.selectedItemDisplayed()) {\n\t\t\tthis.selectedItem = this.paletteItems[0];\n\t\t}\n\n\t\tthis.setSelectedElement();\n\t}\n\n}\n", "export default class TurboAdminMenuItem {\n\n\tconstructor(title, action, parentTitle, noCache = false) {\n\t\tthis.title = title;\n\t\tthis.action = action;\n\t\tthis.parentTitle = parentTitle;\n this.noCache = noCache;\n\t}\n\n sameAs(item) {\n return item.title === this.title &&\n item.action === this.action &&\n item.parentTitle === this.parentTitle;\n }\n}\n", "/**\n * This class is an abstraction of the browser extension storage API\n * (see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage)\n * but that falls back to using regular localStorage if we're not in a\n * browser extension.\n *\n * This exists so that the same API can be used from both the browser\n * extension AND the plugin version of Turbo Admin.\n *\n * Note that for the extension, data saved is \"global\" to the extension\n * and is NOT site specific.\n */\nexport default class Storage {\n\n /**\n * Constructor - detects where code is running and sets the local\n * store appropriately.\n */\n constructor() {\n /** @type {null|storageStorageArea|WindowLocalStorage} */\n this.store = null;\n\n if ('undefined' === typeof (browser)) {\n this.store = window.localStorage;\n } else {\n this.store = browser.storage.local;\n }\n }\n\n /**\n * Set/save extension data. Must be passed an object with key/value\n * pairs.\n *\n * @param {Object} dataObject\n */\n async set(dataObject) {\n if ('undefined' === typeof (browser)) {\n const keys = Object.keys(dataObject);\n keys.forEach(key => this.store.setItem(key, JSON.stringify(dataObject[key])));\n } else {\n await this.store.set(dataObject);\n }\n }\n\n /**\n * Get data from the extension's storage.\n *\n * Note that fetched data will be a object with the key as a\n * property.\n *\n * @param {String} key\n * @returns {Promise<Object>}\n */\n async get(key) {\n if ('undefined' === typeof (browser)) {\n let returnObj = {};\n let item = this.store.getItem(key);\n if (! item) {\n return returnObj;\n }\n let itemObject = null;\n try {\n itemObject = JSON.parse(this.store.getItem(key));\n } catch (e) {\n itemObject = null;\n }\n returnObj[key] = itemObject;\n return returnObj;\n } else {\n return await this.store.get(key);\n }\n }\n\n}\n", "import Storage from './class-storage.js';\n\nexport default class ContentApi {\n\n constructor() {\n // this.discoverApiRoot().then(e => null);\n // console.log('Discovered API base: ', this.apiBase);\n this.active = false;\n this.store = new Storage();\n\n // This is used to \"cache\" duplicate requests.\n // It's an object because it will have search strings as keys\n this.cache = {};\n }\n\n async discoverApiRoot() {\n let wpApiSettings = null;\n this.storageKey = 'wpApiSettings.' + globalThis.taWp.home;\n\n // Could be in the wp-api-request-js-extra (on wp-admin side)\n const wpApiSettingsScript = document.getElementById('wp-api-request-js-extra');\n if (wpApiSettingsScript) {\n const wpApiSettingsString = wpApiSettingsScript.innerHTML.match(/var\\s+wpApiSettings\\s+=\\s+(.+);/)[1];\n const wpApiSettings = JSON.parse(wpApiSettingsString);\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Getting from extension storage returns a object with the key\n // as the key. Which is weird.\n wpApiSettings = await this.store.get(this.storageKey);\n if (wpApiSettings\n && Object.keys(wpApiSettings).length !== 0\n && wpApiSettings[this.storageKey]\n && 'object' === typeof(wpApiSettings[this.storageKey])) {\n // Get the key'ed item out of the object\n wpApiSettings = wpApiSettings[this.storageKey];\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Could be in <link rel=\"https://api.w.org/\" href=\"https://something/wp-json/\">\n if (globalThis.taWp.apiLinkUrl) {\n this.apiRoot = globalThis.taWp.apiLinkUrl;\n // Just guess this\n this.apiBase = this.apiRoot + 'wp/v2/';\n this.active = true;\n return;\n }\n }\n\n userLoggedIn() {\n return document.body.classList.contains('logged-in') ||\n document.body.classList.contains('wp-admin');\n }\n\n async maybeExpireNonce(wpApiSettings) {\n if (wpApiSettings?.nonce && ! this.userLoggedIn()) {\n // Clear apiSetting nonce\n this.apiNonce = null;\n wpApiSettings.nonce = null;\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n }\n }\n\n makeParamString(data) {\n const params = new URLSearchParams();\n\n Object.keys(data).forEach(paramKey => {\n // Handle arrays\n if (Array.isArray(data[paramKey])) {\n const arrayParamKey = paramKey + '[]';\n data[paramKey].forEach( item => params.append(arrayParamKey, item));\n } else {\n params.append(paramKey, data[paramKey]);\n }\n });\n\n return params.toString();\n }\n\n statuses() {\n if (this.apiNonce) {\n return [\"publish\", \"future\", \"draft\", \"pending\", \"private\"];\n } else {\n return [\"publish\"];\n }\n }\n\n types() {\n return globalThis.turboAdmin.turboAdminPalette.postTypes;\n }\n\n async getPosts(searchString) {\n // Check the cache\n if (undefined !== this.cache[searchString]) {\n return this.cache[searchString];\n }\n\n // Fetch results\n const response = await this.get(\n // \"posts\",\n \"search\",\n {\n search: searchString,\n per_page: 100,\n // status: this.statuses(),\n type: 'post',\n subtype: 'any'\n }\n );\n\n // Decode JSON\n const result = await response.json();\n\n // Store in the cache\n this.cache[searchString] = result;\n\n return result;\n }\n\n async get(path, data = {}) {\n const init = {\n method: 'GET',\n headers: {},\n mode: 'cors',\n cache: 'no-store',\n }\n\n // Add the nonce if there is one\n if (this.apiNonce) {\n data._wpnonce = this.apiNonce;\n }\n\n const params = this.makeParamString(data);\n\n const response = await fetch(`${this.apiBase}${path}/?${params}`);\n\n return response;\n }\n\n}\n", "/**\n * It's impossible to change the setting to off, because the\n * extension's content script runs in a sandbox and can't access\n * the wp object. But we can just toggle the class every time.\n */\nexport default class TurboAdminWpBlockEditorFullscreenKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed fullscreen\n // if (document.body.classList.contains('turbo-admin-killed-fullscreen')) {\n // return;\n // }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (mu.target.classList.contains('is-fullscreen-mode')) {\n this.killFullScreenEditor();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killFullScreenEditor();\n }\n\n killFullScreenEditor() {\n if (! document.body.classList.contains('is-fullscreen-mode')) {\n return;\n }\n\n document.body.classList.remove('is-fullscreen-mode');\n document.body.classList.add('turbo-admin-killed-fullscreen');\n\n const newStyles = document.createElement('style');\n newStyles.innerHTML = \"body.turbo-admin-killed-fullscreen .edit-post-fullscreen-mode-close { display: none; }\";\n document.body.appendChild(newStyles);\n }\n}\n", "/**\n *\n */\nexport default class TurboAdminWpBlockEditorWelcomeGuideKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed the modal\n if (document.body.classList.contains('ta-killed-post-welcome-guide')) {\n return;\n }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (! mu.target.classList.contains('modal-open')) {\n return;\n }\n\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n this.killWelcomeGuide();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killWelcomeGuide();\n }\n\n killWelcomeGuide() {\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n const closeButton = welcomeGuide.querySelector('.components-modal__header button');\n if (closeButton) {\n closeButton.click();\n /*\n * Also add a class to body so we don't do it again - subsequent modals\n * will need to be shown as they will have been user-initiated.\n */\n document.body.classList.add('ta-killed-post-welcome-guide');\n }\n }\n }\n}\n", "export default class TurboAdminWpNotices {\n\n // TODO: Handle empty IDS. Can we identify unique selectors?\n // See spinup!\n // Also need to only show move to panel if we can (i.e. if there's a way\n // to identify it))\n constructor(rememberedNoticeIds) {\n\n // Bail if we aren't in the admin\n if (! document.querySelector('body.wp-admin')) {\n return;\n }\n\n /*\n * These are the global notice selectors\n */\n this.noticeSelectors = [\n '#wpbody-content > .notice',\n '#wpbody-content > .wrap > .notice',\n '#wpbody-content > .wrap > .updated',\n '#gf_dashboard_message', // Gravity forms\n '.jitm-banner', //\n '.fs-notice', // I get this in Replyable\n '#updraft-dashnotice', // Updraft backups\n '.woocommerce-message', // WooCommerce\n '#akismet_setup_prompt', // Akismet\n '#wf-onboarding-plugin-header', // WordFence onboard\n '.llar-notice-review' // Limit Login Attempts reloaded\n ];\n\n /*\n * These selectors are allowed (unless explicitly denied)\n */\n this.allowedClasses = [\n 'notice-success',\n 'notice-error',\n 'notice-failure',\n 'updated',\n ]\n\n if (rememberedNoticeIds) {\n this.rememberedNoticeIds = rememberedNoticeIds.length > 0 ? rememberedNoticeIds : [];\n } else {\n this.rememberedNoticeIds = [];\n }\n\n const toolbar = document.getElementById('wpadminbar');\n\n if (!toolbar) {\n return;\n }\n\n if (rememberedNoticeIds && rememberedNoticeIds.length > 0) {\n rememberedNoticeIds.forEach(id => {\n if ('string' === typeof(id) && id.length > 0) {\n this.noticeSelectors.push('#' + id);\n }\n });\n }\n\nconsole.log('Notice Selectors', this.noticeSelectors);\n const notices = document.querySelectorAll(this.noticeSelectors.join(','));\nconsole.log('Notices', notices);\n\n // Add buttons to notices that can be moved\n notices.forEach(notice => {\n this.maybeAddIdToNotice(notice)\n\n if (this.keepNotice(notice)) {\n const rememberButton = document.createElement('button');\n rememberButton.classList.add('ta-remember-notice-button');\n rememberButton.innerText = 'Move to panel';\n\n const forgetButton = document.createElement('button');\n forgetButton.classList.add('ta-forget-notice-button');\n forgetButton.innerText = 'Move to dashboard';\n\n notice.classList.add('ta-added-pos-relative');\n\n notice.appendChild(rememberButton);\n notice.appendChild(forgetButton);\n\n rememberButton.addEventListener('click', this.rememberNotice.bind(this), false, true);\n forgetButton.addEventListener('click', this.forgetNotice.bind(this), false, true);\n }\n });\n\n const noticesToHide = Array.from(notices).filter(notice => {\n if (this.rememberedNoticeIds.includes(notice.id)) {\n return true;\n }\n\n if (this.keepNotice(notice)) {\n return false;\n }\n\n // Invisible\n if (\n notice.offsetHeight === 0 ||\n notice.offsetWidth === 0\n ) {\n return false;\n }\n\n return true;\n })\n\n console.log('Notices to hide', noticesToHide)\n\n /**\n * Build the notices wrapper\n */\n /** @type {HTMLDivElement} */\n const noticesLinkWrapper = document.createElement('div');\n noticesLinkWrapper.id = 'ta-notices-link-wrap';\n noticesLinkWrapper.classList.add('hide-if-no-js', 'screen-meta-toggle');\n noticesLinkWrapper.style.margin='0 0 0 6px';\n noticesLinkWrapper.style.float='left';\n if (noticesToHide.length === 0) {\n noticesLinkWrapper.style.display='none';\n }\n\n /**\n * Add button\n */\n /** @type {HTMLButtonElement} */\n const noticesButton = document.createElement('button');\n noticesButton.type='button';\n noticesButton.id='ta-notices-link';\n noticesButton.classList.add('button', 'show-settings');\n noticesButton.innerHTML='Notices <span id=\"ta-notice-count\">' + noticesToHide.length + '</span>';\n noticesButton.setAttribute('aria-controls', 'ta-notices-wrap');\n\n // This should replicate the functionality from wp-admin/js/common.js\n // as closely as possible. But note that we can't access the common.js\n // functions.\n noticesButton.addEventListener('click', this.toggleNoticesPanel.bind(this), false);\n\n /**\n * Add button to the link wrapper\n */\n noticesLinkWrapper.appendChild(noticesButton);\n\n /**\n * Add the link wrapper to the screen-meta-links section\n */\n const screenMetaLinks = document.getElementById('screen-meta-links');\n screenMetaLinks.appendChild(noticesLinkWrapper);\n\n /**\n * Build the panel\n */\n const noticesPanel = document.createElement('div');\n\n noticesPanel.id='ta-notices-wrap';\n noticesPanel.style.display='none';\n noticesPanel.dataset.open='no';\n\n const noticesPanelInner = document.createElement('div');\n noticesPanelInner.id = 'ta-notices-panel-inner';\n\n noticesToHide.forEach(notice => {\n // Add 'inline' class otherwise WordPress might move them around!\n notice.classList.add('inline');\n // See Toolbelt's implementation: https://github.com/BinaryMoon/wp-toolbelt/blob/dev/modules/tidy-notifications/src/js/script.js\n noticesPanelInner.append(notice);\n });\n\n /**\n * Add wrap to the meta area\n */\n noticesPanel.appendChild(noticesPanelInner);\n const screenMeta = document.getElementById('screen-meta');\n screenMeta.appendChild(noticesPanel);\n\n // Set up events on the new screen-meta item\n // if (window.screenMeta) {\n // window.screenMeta.init();\n // }\n }\n\n // Does the allowedClasses list say that this notice should be shown?\n keepNotice(noticeElem) {\n return this.allowedClasses.reduce( (found, current) => {\n return found || noticeElem.classList.contains(current)\n }, false);\n }\n\n rememberNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panel = document.getElementById('wp-admin-bar-ta-notices');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Remembering ${noticeId}`);\n panelInner.appendChild(notice);\n if (count === 0) {\n noticesLinkWrap.style.display = 'block';\n }\n\n this.updateScreenMetaHeight();\n\n countElem.innerText = parseInt(countElem.innerText, 10) + 1;\n\n this.saveRememberedNotice(noticeId);\n }\n\n saveRememberedNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n forgetNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Forgetting ${noticeId}`);\n\n notice.remove();\n\n const message = document.createElement('div');\n const p = document.createElement('p');\n message.classList.add('notice', 'ta-forget-notice-message');\n p.textContent = 'Notice will be back in dashboard on next page load';\n message.appendChild(p);\n panelInner.appendChild(message);\n\n this.updateScreenMetaHeight();\n\n // I was going to to this, but we need to keep the notice about\n // where the notice has gone.\n // if (count === 1) {\n // noticesLinkWrap.style.display = 'none';\n // }\n\n countElem.innerText = (count - 1).toString();\n this.saveForgottenNotice(noticeId);\n }\n\n saveForgottenNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n this.rememberedNoticeIds = this.rememberedNoticeIds.filter( id => id !== noticeId );\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n /*\n * For notices without IDs we'll see if we can add an ID that's a hash of their classlist\n */\n maybeAddIdToNotice(notice) {\n if (notice.id && notice.id !== '' && notice.id !=='message') {\n return;\n }\n\n const classes = notice.classList;\n notice.id = Array.from(notice.classList).join('-');\n }\n\n /**\n * Detect if WordPress has already applied event handlers to our new screen meta button.\n *\n * If it has then WordPress/backbone.js will handle the animation and we won't have to.\n *\n * @returns {boolean}\n */\n wordpressScreenMetaEventsExist() {\n return 'object' === typeof(window.screenMeta) && window.screenMeta.toggles.filter('#ta-notices-link').length > 0;\n }\n\n updateScreenMetaHeight() {\n // Don't do this if we're relying on backbone's animation\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n }\n\n toggleNoticesPanel(ev) {\n // We may be in the plugin in which case we don't want to run our handler if there's\n // a backbone handler on the button.\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n // Otherwise we mimic the swipe down animation.\n const animationSeconds = 0.3;\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n if (noticesPanel.dataset.open === 'no') {\n this.toggleOtherScreenMetaTabs();\n // Don't ask... just DON'T ask!\n noticesPanel.dataset.open = 'yes';\n screenMeta.style.transition = `max-height ${animationSeconds.toString(10)}s`;\n screenMeta.style.maxHeight = '0';\n screenMeta.style.overflow = 'hidden';\n screenMeta.style.display = 'block';\n noticesPanel.style.display = 'block';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n // setTimeout(() => {\n // // Nothing to do here.\n // }, animationSeconds * 1000);\n } else {\n noticesPanel.dataset.open = 'no';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = '0';\n setTimeout(() => {\n noticesPanel.style.display = '';\n screenMeta.style.display = '';\n screenMeta.style.transition = '';\n screenMeta.style.overflow = '';\n screenMeta.style.maxHeight = '';\n this.toggleOtherScreenMetaTabs();\n }, animationSeconds * 1000);\n }\n\n }\n\n toggleOtherScreenMetaTabs() {\n const otherTabs = document.querySelectorAll('#screen-meta-links .screen-meta-toggle:not(#ta-notices-link-wrap)');\n otherTabs.forEach( (tab) => {\n if (tab.style.visibility === 'hidden') {\n tab.style.visibility = '';\n } else {\n tab.style.visibility = 'hidden';\n }\n } );\n }\n}\n", "export default class ListTableShortcuts {\n\n constructor() {\n /**\n * @type {ListTableShortcuts}\n */\n const me = this;\n\n /**\n * @type {null|HTMLElement}\n */\n this.currentRow = null;\n\n /**\n * @type {number}\n */\n this.currentRowIndex = 0;\n\n /**\n * @type {HTMLTableElement}\n */\n this.listTable = document.querySelector('.wp-list-table');\n\n if (! this.listTable) {\n return;\n }\n\n /**\n * @type {NodeListOf<HTMLTableRowElement>}\n */\n this.tableRows = this.listTable.querySelectorAll('tbody#the-list > tr');\n\n document.addEventListener('keyup', e => this.handleKeyup(e));\n }\n\n /**\n *\n * @param {KeyboardEvent} ev\n */\n handleKeyup(ev) {\n if (document.activeElement.tagName !== 'BODY') {\n return;\n }\n\n if (ev.key === 'j') {\n this.tableMoveDown();\n } else if (ev.key === 'k') {\n this.tableMoveUp();\n } else if (ev.key.toLowerCase() === 'enter' && this.currentRow !== null) {\n this.openTableRowItem();\n }\n\n }\n\n tableMoveDown() {\n this.preTableChange();\n\n // Move down\n if (this.currentRow === null) {\n this.currentRowIndex = 0;\n } else {\n this.currentRowIndex++;\n }\n this.updateTable();\n }\n\n tableMoveUp() {\n this.preTableChange();\n\n if (this.currentRowIndex > 0) {\n this.currentRowIndex--;\n this.updateTable();\n }\n }\n\n preTableChange() {\n if (this.currentRow !== null) {\n this.tableRows[this.currentRowIndex].classList.remove('ta-active-table-row');\n }\n }\n\n updateTable() {\n this.currentRow = this.tableRows[this.currentRowIndex];\n\n if (! this.tableRows[this.currentRowIndex].classList.contains('ta-active-table-row')) {\n this.tableRows[this.currentRowIndex].classList.add('ta-active-table-row');\n }\n }\n\n openTableRowItem() {\n console.log(this);\n /** @type {HTMLAnchorElement} */\n const link = this.currentRow.querySelector('a.row-title');\n if (link) {\n link.click();\n }\n }\n}\n", "export default class TurboAdminBarkeeper {\n\n constructor(barkeeperState) {\n // Bail if we aren't in the admin\n if (! document.getElementById('wpadminbar')) {\n return;\n }\n\n this.exclusionIds = [\n 'wp-admin-bar-menu-toggle',\n 'wp-admin-bar-wp-logo',\n 'wp-admin-bar-site-name',\n 'wp-admin-bar-updates',\n ];\n\n this.barkeeperState = barkeeperState;\n\n this.root = document.getElementById('wp-admin-bar-root-default');\n this.itemsToHide = document.querySelectorAll( '#wp-admin-bar-root-default > li');\n\n Array.from(this.itemsToHide).forEach( element => {\n if (this.exclusionIds.includes(element.id)) {\n return;\n }\n element.classList.add('ta-barkeeper-collapsable');\n });\n\n if (this.barkeeperState === 'closed') {\n this.root.classList.toggle('ta-barkeeper-closed');\n }\n\n // Add toggle\n this.button = document.createElement('button');\n this.button.id = 'ta-barkeeper-toggle';\n this.button.innerText = '<';\n\n this.button.addEventListener('click', e => {\n this.root.classList.toggle('ta-barkeeper-closed');\n\n this.barkeeperState = this.barkeeperState === 'open' ? 'closed' : 'open';\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'barkeeperSetState',\n 'barkeeperState': this.barkeeperState,\n });\n } else {\n window.localStorage.setItem('turboAdminBarkeeperState', this.barkeeperState);\n }\n });\n\n this.root.insertAdjacentElement('afterend', this.button);\n }\n\n}\n", "/*\n * This is the common Turbo Admin library.\n *\n * It's (currently) WordPress-specific, but can be loaded by\n * either the Extension OR the Plugin\n *\n * It takes an options object:\n *\n * options: {\n * shortcutKeys: [\n * // Array of shortcut key definitions, like:\n * {\n * {\n * meta: false,\n * alt: true,\n * ctrl: true,\n * shift: true,\n * key: 'p'\n * }\n * }\n * ],\n * appendToElement {\n * // Optional CSS selector to define what to append the palette to\n * 'body'\n * },\n * extraItems: [\n * // Optional array of extra item configs used to generate new item objects\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * ],\n * extraItemsRaw: [\n * // Optional array of raw item objects to be added\n * {\n * 'title': ,\n * 'action': ,\n * 'parentTitle': ,\n * }\n * ]\n * }\n */\nimport TurboAdminPalette from './class-turbo-admin-palette.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item.js';\nimport Acf from './class-acf.js';\nimport TurboAdminWpBlockEditorFullscreenKill from './class-turbo-admin-wp-block-editor-fullscreen-kill.js';\nimport TurboAdminWpBlockEditorWelcomeGuideKill from './class-turbo-admin-wp-block-editor-welcome-guide-kill.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\nimport TurboAdminListTableShortcuts from './class-list-table-shortcuts.js';\nimport TurboAdminBarkeeper from './class-turbo-admin-barkeeper.js';\n\nexport default class TurboAdmin {\n\n constructor(options) {\n if (document.getElementById('ta-command-palette-container')) {\n console.log('TurboAdmin already initialised - I won\\'t make a second copy!');\n return;\n }\n\n this.options = options;\n }\n\n async init() {\n // Grab the global Wp object instance\n this.wp = globalThis.taWp;\n\n this.menu = [];\n // Check for saved menu when on front-end\n if (! this.wp.isBackend) {\n // Only use the cached items if the current URL matches the last site URL\n // This handles changes of multi-site site!\n // We ONLY need to do this on the front-end as the back-end will always\n // refresh the menu.\n if (! this.wp.siteChanged) {\n // Get from localStorage\n const savedMenu = window.localStorage.getItem('ta-palette-data');\n\n if (null !== savedMenu) {\n // Check for .logged-in class on body\n if (document.body.classList.contains('logged-in')) {\n // If still logged in merge (?) the items\n this.menu = JSON.parse(savedMenu);\n }\n }\n }\n } else {\n // On the back end, get the WordPress dashboard menu items\n this.menu = this.getMenu();\n }\n\n // Add other additional items\n this.addAdditionalMenuItems();\n // Add items passed in using extraItemsRaw\n this.menu = this.menu.concat(this.options.extraItemsRaw ?? []);\n\n // Add ACF items?\n // TODO: Make this better. Possible ASYNC somehow?\n // this.acf = new Acf();\n // if (this.acf.isAcfInstalled()) {\n // const acfLinks = await this.acf.getFieldGroups()\n // // console.table(acfItems);\n // const acfMenuItems = acfLinks.map(\n // item => new TurboAdminMenuItem(\n // item.label + ' (ACF)',\n // item.link,\n // ''\n // )\n // );\n // this.menu = this.menu.concat(acfMenuItems);\n // }\n\n // Sort the menu\n this.menu.sort((a, b) => (a.parentTitle + a.title).localeCompare(b.parentTitle + b.title));\n\n // Filter out no-cache items and save to localStorage.\n const itemsToSave = this.menu.filter(item => (! item.noCache));\n window.localStorage.setItem('ta-palette-data', JSON.stringify(itemsToSave));\n\n // Add palette markup to the DOM\n this.addPalette();\n // Initialise controls on the palette\n this.turboAdminPalette = new TurboAdminPalette(this.menu, this.options);\n\n if (true === this.options['block-editor-fullscreen-disable']) {\n // Initialise fullscreen kill\n this.turboAdminFullscreenKill = new TurboAdminWpBlockEditorFullscreenKill();\n }\n\n if (true === this.options['block-editor-welcome-screen-kill']) {\n this.turboAdminWelcomeKill = new TurboAdminWpBlockEditorWelcomeGuideKill();\n }\n\n if (true === this.options['list-table-keyboard-shortcuts']) {\n this.turboAdminListTableShortcuts = new TurboAdminListTableShortcuts();\n }\n\n if (true === this.options['barkeeper']) {\n // In the plugin, barkeeper-state will be in... local storage(?)\n if ('object' !== typeof(browser)) {\n this.options['barkeeper-state'] = window.localStorage.getItem('turboAdminBarkeeperState');\n }\n this.turboAdminBarkeeper = new TurboAdminBarkeeper(this.options['barkeeper-state']);\n }\n\n // Add other things if we're logged in and have an API nonce\n if (globalThis.contentApi.userLoggedIn()) {\n // What shall we do?\n }\n }\n\n getMenu() {\n const items = [];\n const menuTop = document.getElementById('adminmenu');\n if (menuTop) {\n const topDOMItems = menuTop.querySelectorAll('li.menu-top');\n topDOMItems.forEach(el => {\n const a = el.querySelector('a.menu-top');\n const title = a.querySelector('.wp-menu-name').innerHTML;\n const action = a.href;\n const parentTitle = '';\n const item = new TurboAdminMenuItem(title, action, parentTitle);\n items.push(item);\n\n const subMenu = el.querySelector('.wp-submenu');\n if (!subMenu) {\n return;\n }\n const subItems = subMenu.querySelectorAll('li a');\n if (!subItems) {\n return;\n }\n subItems.forEach(subEl => {\n const parentTitle = title;\n const childTitle = subEl.innerHTML;\n const childAction = subEl.href;\n const item = new TurboAdminMenuItem(childTitle, childAction, parentTitle);\n items.push(item);\n })\n });\n }\n return items;\n }\n\n addAdditionalMenuItems() {\n\n /*\n * I'd LOVE for this to be config driven\n *\n * [\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * {\n * 'detectType': 'dom',\n * 'detectSelector': '#wpadminbar',\n * 'itemTitle': 'Logout',\n * 'itemUrlFunction': () => logoutUrl\n * }\n * Can we add actionTypes as well? To do clicks and navigates?\n * ]\n */\n\n // Get passed-in extraItems\n let extraItems = this.options.extraItems ?? [];\n\n // Merge in defaults\n extraItems = extraItems.concat(\n [\n {\n 'detectType': 'dom',\n 'detectSelector': 'body.wp-admin #wp-admin-bar-view-site a',\n 'itemTitleFunction': () => 'View/visit site',\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-dashboard a',\n 'itemTitleFunction': (element) => element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wpadminbar',\n 'itemTitleFunction': () => 'Logout',\n 'itemUrlFunction': () => document.getElementById('wp-admin-bar-logout')?.querySelector('a')?.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-edit a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-view a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-new-content .ab-submenu a',\n 'itemTitleFunction': (item) => 'New ' + item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-customize a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelectorNone': '#wpadminbar, #loginform',\n 'itemTitleFunction': () => \"Log in\",\n 'itemUrlFunction': () => {\n if (globalThis.taWp.home) {\n return globalThis.taWp.siteUrl;\n }\n // Try getting wp-admin\n return 'javascript:alert(\\'Sorry, could not detect login URL.\\')';\n }\n },\n // This is on the login screen\n {\n 'detectType': 'dom',\n 'detectSelector': '#backtoblog a',\n 'itemTitleFunction': () => \"View/visit site\",\n 'itemUrlFunction': (element) => element.href\n },\n // Multisite items\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin > a',\n 'itemTitleFunction': () => \"Network Admin\",\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin .ab-submenu a',\n 'itemTitleFunction': (element) => 'Network Admin: ' + element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-my-sites-list .ab-submenu a',\n 'itemTitleFunction': (element) => \"Sites: \" + element.closest('.menupop').querySelector('a').innerText + ' - ' + element.innerText,\n 'itemUrlFunction': (element) => element.href\n },\n // Oxygen builder items\n {\n 'detectType': 'dom',\n 'detectSelector': '#ct-edit-template-builder',\n 'itemTitleFunction': () => 'Edit with Oxygen',\n 'itemUrlFunction': (element) => element.href,\n 'noCache': true\n },\n // It's worth noting that the Oxygen Builder doesn't use a /wp-admin URL\n // and so kinda appears to Turbo Admin to be a \"front-end\" page and it\n // doesn't refresh the menu items.\n {\n 'detectType': 'dom',\n 'detectSelector': '.oxygen-back-to-wp-menu .oxygen-toolbar-button-dropdown a:not(:last-of-type)',\n 'itemTitleFunction': (element) => 'Back to WP: ' + element.textContent,\n 'itemUrlFunction': (element) => {\n if (element.href) {\n return element.href;\n } else {\n let url = new URL(window.location.href);\n return url.origin + url.pathname;\n }\n },\n 'noCache': true\n }\n ]\n );\n\n extraItems.forEach(item => {\n let detected = false;\n let elements = null;\n if (item.detectType === 'url') {\n detected = Boolean(window.location.href.includes(item.detectPattern));\n } else if (item.detectType === 'dom') {\n if (item.detectSelector) {\n elements = document.querySelectorAll(item.detectSelector);\n detected = Boolean(elements);\n } else if (item.detectSelectorNone) {\n elements = document.querySelectorAll(item.detectSelectorNone);\n detected = elements.length === 0;\n // Need to pass SOMETHING to the loop below\n elements = document.querySelectorAll('body');\n }\n }\n if (!detected) {\n return;\n }\n\n elements.forEach(element => {\n const newItem = new TurboAdminMenuItem(item.itemTitleFunction(element), item.itemUrlFunction(element), '', item?.noCache);\n // Might already have one so check.\n if (this.menu.some(menuItem => {\n // This must be newItem.sameAs, not menuItem.sameAs because the menuItem\n // may have been loaded from saved menu and may not actually be an instance\n // of a TurboAdminMenuItem.\n return newItem.sameAs(menuItem)\n } )) {\n return;\n }\n // We don't already have one. So add it.\n this.menu.push(newItem);\n });\n })\n }\n\n addPalette() {\n const container = document.createElement('div');\n container.id = 'ta-command-palette-container';\n // Palette\n const palette = document.createElement('div');\n palette.id = 'ta-command-palette';\n // Input field\n const input = document.createElement('input');\n input.id = \"ta-command-palette-input\";\n input.name = \"ta-command-palette-input\";\n input.type = \"text\";\n // Set this to stop stuff trying to fill it.\n input.setAttribute('autocomplete', 'off');\n // List\n const list = document.createElement('ul');\n list.id = \"ta-command-palette-items\";\n // Join it all up\n container.appendChild(palette);\n palette.appendChild(input);\n palette.appendChild(list);\n\n if (document.getElementById('wpadminbar') && this.options['admin-bar-search'] === true) {\n const paletteLi = document.createElement('li');\n paletteLi.appendChild(container);\n const adminBar = document.getElementById('wp-admin-bar-top-secondary');\n adminBar.appendChild(paletteLi);\n\n // Add focus handler\n input.addEventListener('focus', e => this.turboAdminPalette.showPalette());\n\n // Add placeholder\n const placeholder = document.createElement('div');\n placeholder.id = 'ta-shortcut-key-placeholder';\n placeholder.innerText = this.buildShortcutKeysString();\n placeholder.addEventListener('click', e => input.focus());\n\n palette.insertBefore( placeholder, list );\n } else {\n // Container\n document.querySelector(this.options.appendToElement ?? 'body').appendChild(container);\n }\n }\n\n buildShortcutKeysString () {\n let keysString = '';\n let shortcut = this.options.shortcutKeys[0];\n\n if ( shortcut.meta ) {\n keysString += 'Cmd-';\n }\n if ( shortcut.ctrl ) {\n keysString += 'Ctrl-';\n }\n if ( shortcut.alt ) {\n keysString += 'Alt-';\n }\n if ( shortcut.shift ) {\n keysString += 'Shift-';\n }\n keysString += shortcut.key.toUpperCase();\n return keysString;\n }\n\n}\n", "export default class Wp {\n\n constructor() {\n\n // Set home and siteUrl\n this.siteUrl = '';\n this.home = '';\n this.loginUrl = '';\n this.apiLinkUrl = '';\n }\n\n async completeInit() {\n // Fetch previously loaded site URL\n this.previousUrl = window.localStorage.getItem('ta-palette-data-site');\n\n // Fetch previously-stored siteUrl and home\n this.siteUrl = window.localStorage.getItem('ta-palette-data-siteurl');\n this.home = window.localStorage.getItem('ta-palette-data-home');\n\n /**\n * Are we in the back-end?\n */\n this.isBackend = this.getIsBackend();\n\n /**\n * Figure out all the WP URLs\n */\n await this.getUrls();\n\n /**\n * Tells you if the best-guess site URL of the current page is different\n * to that of the previously saved site URL.\n */\n this.siteChanged = this.home !== this.previousUrl;\n\n // Save current site URL for next time\n window.localStorage.setItem('ta-palette-data-site', this.home);\n }\n\n getIsBackend() {\n return document.body.classList.contains('wp-admin');\n }\n\n /**\n * Return the URL with a trailing slash if it didn't already have one.\n *\n * @param {String} url The URL to check\n * @return {String} The resulting URL\n */\n ensureTrailingSlash( url ) {\n if (url.endsWith('/')) {\n return url;\n } else {\n return url + '/';\n }\n }\n\n /**\n * Tests if a URL works and, if redirected, that the final URL contains a given\n * string. Returns the final, redirected-to URL if the test passed, or false\n * otherwise.\n *\n * @param {String} url The URL to test.\n * @param {String} responseUrlMustContain The string to test against the final URL\n * @returns {Promise<String|Boolean>} The final URL or false.\n */\n async testUrl(url, responseUrlMustContain='') {\n\n /** @type {RequestInit} */\n const init = {\n method: 'HEAD',\n mode: 'cors',\n cache: 'no-cache',\n credentials: 'same-origin'\n }\n\n const response = await fetch(url, init);\n\n if (response.redirected && !response.url.includes(responseUrlMustContain)) {\n return false;\n }\n\n if ( ! response.ok ) {\n return false;\n }\n\n return response.url;\n }\n\n async findWhichUrlWorks(urls, responseUrlMustContain='') {\n let workingUrl = false;\n let result;\n // This has to be a for loop rather than reduce or forEach as separate\n // async callbacks would be launched asynchronously.\n for (let i=0; i<urls.length; i++) {\n if (workingUrl) continue;\n result = await this.testUrl(urls[i], responseUrlMustContain);\n if (result !== false) {\n workingUrl = result;\n }\n }\n return workingUrl;\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessSiteUrlFromHome( homeUrl ) {\n const homeWithSlash = this.ensureTrailingSlash(homeUrl);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // homeWithSlash + 'wp-admin/',\n // homeWithSlash + 'wp/wp-admin'\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return homeWithSlash + 'wp-admin/';\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessHome() {\n const currentUrl = new URL(window.location);\n const origin = this.ensureTrailingSlash(currentUrl.origin);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // origin\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return origin;\n }\n\n /**\n *\n * @param {String} siteUrl\n * @returns {String}\n */\n guessHomeFromSiteUrl(siteUrl) {\n // Not much we can do here.\n return siteUrl.replace(/wp-admin\\/?/, '');\n }\n\n async getUrls() {\n // See if we can actually find the URL for the API\n /** @type {HTMLLinkElement|null} */\n const apiLink = document.querySelector('link[rel=\"https://api.w.org/\"]');\n\n if (apiLink) {\n this.apiLinkUrl = apiLink.href;\n }\n // Figure out the siteurl and home - this is different on the front and back end\n if (this.isBackend) {\n // This is easy in the back end/Dashboard!\n this.siteUrl = window.location.href.match(/(^.*wp-admin)/)[1];\n this.home = document.getElementById('wp-admin-bar-site-name').querySelector('a').href;\n\n // Always set the siteUrl and home as this is definitive\n window.localStorage.setItem('ta-palette-data-siteurl', this.siteUrl);\n window.localStorage.setItem('ta-palette-data-home', this.home);\n } else if (! this.siteUrl || ! this.home) {\n\n // If we're not in the backend then (in the extension at least) we\n // could be on the front-end and not logged in, so check for an\n // admin bar and grab from that if there is one.\n if (document.getElementById('wpadminbar')) {\n this.siteUrl = document.getElementById('wp-admin-bar-dashboard').querySelector('a').href;\n // Try for the API link\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n } else {\n // We know what the siteUrl is, so guess the home from the siteUrl\n this.home = this.guessHomeFromSiteUrl(this.siteUrl);\n }\n\n } else {\n // Try for the API link\n // TODO: This needs to be async so it doesn't hold things up.\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n // We (probably) know what the home link is now, so guess the wp-admin\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome( this.home );\n } else {\n this.siteUrl = this.guessSiteUrl();\n }\n } else {\n // We got nothing.\n this.home = await this.guessHome();\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome(this.home);\n }\n }\n }\n }\n\n // Always trim the / for comparisons\n if (this.siteUrl) {\n this.siteUrl = this.siteUrl.replace(/(.+)\\/$/, '$1');\n }\n if (this.home) {\n this.home = this.home.replace(/(.+)\\/$/, '$1');\n }\n\n // console.log('siteUrl: ', this.siteUrl);\n // console.log('home: ', this.home);\n }\n\n}\n", "import TurboAdmin from './class-turbo-admin.js';\nimport ContentApi from './class-content-api.js';\nimport Wp from './class-wp.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\n\nconst taStorageKey = 'turbo-admin-settings';\n\n// Note that in the extension, the globalThis is not the browser's global scope,\n// it is sandboxed. So we can't check across the plugin/extension boundary here.\nasync function taInit(settings) {\n\n globalThis.turboAdmin = null;\n\n // Handle empty settings\n if (typeof(settings[taStorageKey]) === 'undefined') {\n console.log('Weird. Turbo Admin could not find any settings');\n return;\n }\n\n globalThis.turboAdminOptions = settings[taStorageKey];\n\n // Get Wp stuff ready\n globalThis.taWp = new Wp();\n\n // Parts of this init are async.\n await globalThis.taWp.completeInit();\n\n console.log('Turbo Admin: WP is initialised');\n\n // Get/set api settings\n globalThis.contentApi = new ContentApi();\n await globalThis.contentApi.discoverApiRoot();\n\n console.log('Turbo Admin: Content API is initialised');\n\n globalThis.turboAdmin = new TurboAdmin(globalThis.turboAdminOptions);\n\n await globalThis.turboAdmin.init();\n\n if (settings[taStorageKey]['hide-notices']) {\n globalThis.turboAdminWpNotices = new TurboAdminWpNotices(settings[taStorageKey].rememberedNoticeIds);\n }\n}\n\n/**\n * This is plugin-specific. It should not be present in the extension code.\n */\ndocument.addEventListener('DOMContentLoaded', async e => {\n\tglobalThis.turboAdminOptions = {};\n\tglobalThis.turboAdminOptions[taStorageKey] = {\n\t\t// wpTurboAdmin is set using wp_localize_script\n\t\tshortcutKeys: globalThis.wpTurboAdmin.keys,\n // These don't apply to the plugin version\n 'block-editor-fullscreen-disable': false,\n 'block-editor-welcome-screen-kill': false,\n // I don't think we'll do this in the plugin as the code would be SO different.\n 'live-dev-notice': false,\n 'list-table-keyboard-shortcuts': globalThis.wpTurboAdmin['listTableShortcuts'] === '1',\n 'hide-notices': globalThis.wpTurboAdmin['hideNotices'] === '1',\n 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array(),\n 'barkeeper': globalThis.wpTurboAdmin['barkeeper'] === '1',\n 'admin-bar-search': globalThis.wpTurboAdmin['adminBarSearch'] === '1',\n\t}\n\tawait taInit(globalThis.turboAdminOptions);\n});\n"], 5 "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,QAAI;AAAJ,QAAO;AAAG,QAAI,SAAM,IAAI,WAAY;AAAE;AAAc,kBAAW,IAAG;AAAE,eAAQ,MAAI,AAAc,OAAO,UAArB,cAA+B,AAAY,OAAO,OAAO,YAA1B,WAAqC,SAAU,IAAG;AAAE,iBAAO,OAAO;AAAA,YAAM,SAAU,IAAG;AAAE,iBAAO,MAAK,AAAc,OAAO,UAArB,cAA+B,GAAE,gBAAgB,UAAU,OAAM,OAAO,YAAY,WAAW,OAAO;AAAA,WAAK;AAAA;AAAK,kBAAW,IAAG,IAAG;AAAE,YAAI,CAAE,eAAa;AAAI,gBAAM,IAAI,UAAU;AAAA;AAAuC,iBAAW,IAAG,IAAG;AAAE,iBAAS,KAAI,GAAG,KAAI,GAAE,QAAQ,MAAK;AAAE,cAAI,KAAI,GAAE;AAAI,aAAE,aAAa,GAAE,cAAc,OAAI,GAAE,eAAe,MAAI,WAAW,MAAM,IAAE,WAAW,OAAK,OAAO,eAAe,IAAG,GAAE,KAAK;AAAA;AAAA;AAAO,iBAAW,IAAG,IAAG,IAAG;AAAE,eAAO,MAAK,EAAE,GAAE,WAAW,KAAI,MAAK,EAAE,IAAG,KAAI;AAAA;AAAI,iBAAW,IAAG,IAAG,IAAG;AAAE,eAAO,MAAK,KAAI,OAAO,eAAe,IAAG,IAAG,CAAE,OAAO,IAAG,YAAY,MAAI,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,WAAW,aAAa,iBAAiB;AAAA,MACtD,oBAAoB,WAAW,aAAa,sBAAsB;AAAA;AAEzE,UAAM,OAAO,WAAW;AAAA;", 6 6 "names": [] 7 7 } -
turbo-admin/tags/1.9.0/readme.txt
r2702239 r2703739 6 6 Tested up to: 5.9 7 7 Requires PHP: 7.2 8 Stable tag: 1. 7.08 Stable tag: 1.9.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 27 27 28 28 * A fast-action, keyboard driven command palette: Think Apple Spotlight, or Alfred, but in WordPress! 29 * The command palette is pop-up/modal by default, but has an option to be present in the admin bar. 30 * A "barkeeper" that hides non-critical admin-bar items in a slide-out panel. 29 31 * (Experimental) Notice hiding: Tidy your dashboard by hiding admin notices in a separate, slide-out panel. 30 32 * (Experimental/Beta): List table keyboard shortcuts - use vim-like keys to navigate lsit tables. … … 73 75 74 76 As well as commands, the plugin will also search content that is made available through the REST API (as long as the REST API can be discovered). 77 78 ## Admin bar search mode 79 80 The command palette is pop-up/modal by default. But if you forget it's there then you can opt to have the command palette as an always-displayed search box in the admin bar. 81 82 To use this mode, visit your user profile, find the "Turbo Admin settings" section and check the "Admin bar search" option. Be sure to click "Update Profile" to save the change. 83 84 ## Barkeeper 85 86 The "Barkeeper" hides away non-critical admin-bar items in a slide-out panel. Click the arrow to toggle the panel open and closed. 87 88 The Barkeeper keeps a few items that I've deemed as critical, such as the site name and the updates icon/notification. 89 90 To enable the Barkeeper feature, visit your user profile, find the "Turbo Admin settings" section and check the "Barkeeper" option. Be sure to click "Update Profile" to save the change. 91 92 This feature pairs really well with the admin bar search mode, freeing up space for the admin-bar search box. 75 93 76 94 ## Using the (experimental) Notice Hiding feature … … 151 169 == Changelog == 152 170 171 = 1.9.0 = 172 * [FEATURE] Admin bar search mode 173 * [FEATURE] Barkeeper 174 * [ENHANCEMENT] Better post type detection in the command palette 175 * [FIX] Notice hiding didn't work! Fixed. 176 153 177 = 1.7.0 = 154 178 * [FEATURE] Re-designed notice hiding (still experimental) -
turbo-admin/tags/1.9.0/src/class-turbo-admin-palette.js
r2702218 r2703739 184 184 const itemTitle = item.title; 185 185 // const itemTitle = item.title.rendered; 186 const itemType = item. type;186 const itemType = item.subtype; 187 187 const itemUrl = item.url; 188 188 … … 372 372 showPalette() { 373 373 this.paletteInputElement.value = ''; 374 this.paletteItemsElement.scrollTop = 0; 374 375 this.paletteElement?.classList.add('active'); 375 376 this.paletteInputElement?.focus(); … … 379 380 this.navigating = false; 380 381 this.paletteElement?.classList.remove('active'); 382 this.paletteInputElement.value = ''; 383 this.paletteInputElement.blur(); 381 384 if (this.isSubMenuOpen()) { 382 385 this.closeSubMenu(); … … 491 494 subMenuElement.classList.add('active'); 492 495 496 497 this.selectedSubItem = subMenuElement.querySelector('li'); 498 this.openedSubMenu = subMenuElement; 499 this.setSelectedElement(); 500 493 501 this.paletteInputElement.disabled = true; 494 502 // Blur the input so that keys can continue to be captured 495 503 this.paletteInputElement.blur(); 496 497 this.selectedSubItem = subMenuElement.querySelector('li');498 this.openedSubMenu = subMenuElement;499 this.setSelectedElement();500 504 } 501 505 -
turbo-admin/tags/1.9.0/src/class-turbo-admin-wp-notices.js
r2702218 r2703739 13 13 14 14 /* 15 * These are the global notice selectors - these are always hidden15 * These are the global notice selectors 16 16 */ 17 17 this.noticeSelectors = [ … … 122 122 123 123 /** 124 * Add button .124 * Add button 125 125 */ 126 126 /** @type {HTMLButtonElement} */ … … 264 264 } 265 265 } 266 267 268 266 269 267 /* -
turbo-admin/tags/1.9.0/src/class-turbo-admin.js
r2702218 r2703739 50 50 import TurboAdminWpNotices from './class-turbo-admin-wp-notices.js'; 51 51 import TurboAdminListTableShortcuts from './class-list-table-shortcuts.js'; 52 import TurboAdminBarkeeper from './class-turbo-admin-barkeeper.js'; 52 53 53 54 export default class TurboAdmin { … … 134 135 if (true === this.options['list-table-keyboard-shortcuts']) { 135 136 this.turboAdminListTableShortcuts = new TurboAdminListTableShortcuts(); 137 } 138 139 if (true === this.options['barkeeper']) { 140 // In the plugin, barkeeper-state will be in... local storage(?) 141 if ('object' !== typeof(browser)) { 142 this.options['barkeeper-state'] = window.localStorage.getItem('turboAdminBarkeeperState'); 143 } 144 this.turboAdminBarkeeper = new TurboAdminBarkeeper(this.options['barkeeper-state']); 136 145 } 137 146 … … 351 360 352 361 addPalette() { 353 // Container354 362 const container = document.createElement('div'); 355 363 container.id = 'ta-command-palette-container'; … … 372 380 palette.appendChild(list); 373 381 374 document.querySelector(this.options.appendToElement ?? 'body').appendChild(container); 382 if (document.getElementById('wpadminbar') && this.options['admin-bar-search'] === true) { 383 const paletteLi = document.createElement('li'); 384 paletteLi.appendChild(container); 385 const adminBar = document.getElementById('wp-admin-bar-top-secondary'); 386 adminBar.appendChild(paletteLi); 387 388 // Add focus handler 389 input.addEventListener('focus', e => this.turboAdminPalette.showPalette()); 390 391 // Add placeholder 392 const placeholder = document.createElement('div'); 393 placeholder.id = 'ta-shortcut-key-placeholder'; 394 placeholder.innerText = this.buildShortcutKeysString(); 395 placeholder.addEventListener('click', e => input.focus()); 396 397 palette.insertBefore( placeholder, list ); 398 } else { 399 // Container 400 document.querySelector(this.options.appendToElement ?? 'body').appendChild(container); 401 } 402 } 403 404 buildShortcutKeysString () { 405 let keysString = ''; 406 let shortcut = this.options.shortcutKeys[0]; 407 408 if ( shortcut.meta ) { 409 keysString += 'Cmd-'; 410 } 411 if ( shortcut.ctrl ) { 412 keysString += 'Ctrl-'; 413 } 414 if ( shortcut.alt ) { 415 keysString += 'Alt-'; 416 } 417 if ( shortcut.shift ) { 418 keysString += 'Shift-'; 419 } 420 keysString += shortcut.key.toUpperCase(); 421 return keysString; 375 422 } 376 423 -
turbo-admin/tags/1.9.0/src/main.js
r2702218 r2703739 17 17 return; 18 18 } 19 // document.addEventListener('DOMContentLoaded', e => {20 // turboAdmin = new TurboAdmin(globalThis.turboAdminOptions);21 // });22 19 23 20 globalThis.turboAdminOptions = settings[taStorageKey]; … … 61 58 'list-table-keyboard-shortcuts': globalThis.wpTurboAdmin['listTableShortcuts'] === '1', 62 59 'hide-notices': globalThis.wpTurboAdmin['hideNotices'] === '1', 63 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array() 60 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array(), 61 'barkeeper': globalThis.wpTurboAdmin['barkeeper'] === '1', 62 'admin-bar-search': globalThis.wpTurboAdmin['adminBarSearch'] === '1', 64 63 } 65 64 await taInit(globalThis.turboAdminOptions); -
turbo-admin/tags/1.9.0/turbo-admin.css
r2702218 r2703739 208 208 } 209 209 210 /* 211 * Palette in admin bar 212 */ 213 #wpadminbar #ta-command-palette-container { 214 top: auto; 215 left: auto; 216 width: auto; 217 height: auto; 218 position: relative; 219 background-color: none; 220 transition: none; 221 } 222 223 /* This resets stupid styles in the wpadminbar */ 224 #wpadminbar #ta-command-palette-container * { 225 line-height: 1; 226 box-sizing: border-box; 227 } 228 #wpadminbar #ta-command-palette-container li { 229 float: none; 230 position: static; 231 } 232 233 #wpadminbar #ta-command-palette { 234 width: 250px; 235 position: relative; 236 top: auto; 237 left: auto; 238 transform: none; 239 opacity: 1; 240 transition: none; 241 padding: 3px 5px 3px 5px; 242 background-color: #1d2327; 243 } 244 245 #wpadminbar #ta-command-palette-input { 246 line-height: 1.6; 247 margin-bottom: 0; 248 padding: 2px 8px; 249 min-height: auto; 250 background-color: #444; 251 border-radius: 6px; 252 } 253 254 #wpadminbar #ta-shortcut-key-placeholder { 255 position: absolute; 256 top: 8px; 257 left: 12px; 258 } 259 260 #wpadminbar #ta-command-palette.loading::after { 261 top: 6px; 262 right: 10px; 263 } 264 265 #wpadminbar #ta-command-palette-items { 266 padding-top: 0; 267 max-height: 0; 268 opacity: 0; 269 /* overflow: scroll; */ 270 transition: all 0.3s; 271 background-color: #1d2327; 272 } 273 274 #wpadminbar #ta-command-palette-items li { 275 width: 100%; 276 } 277 278 #wpadminbar #ta-command-palette-items li a { 279 width: 100%; 280 height: auto; 281 } 282 #wpadminbar #ta-command-palette-items .ta-submenu { 283 background-color: #1d2327; 284 } 285 #wpadminbar #ta-command-palette-items .ta-has-child-menu.selected { 286 z-index: 9999999; /* Needs to be higher than #ta-command-palette-container */ 287 } 288 289 #wpadminbar #ta-command-palette-container.active { 290 background-color: transparent; 291 } 292 293 #wpadminbar #ta-command-palette-container.active #ta-command-palette { 294 top: auto; 295 } 296 297 #wpadminbar #ta-command-palette-container.active #ta-command-palette-input { 298 } 299 300 #wpadminbar #ta-command-palette-container.active #ta-shortcut-key-placeholder { 301 display: none; 302 } 303 304 #wpadminbar #ta-command-palette-container.active #ta-command-palette-items { 305 padding-top: 8px; 306 max-height: 400px; 307 opacity: 1; 308 } 309 210 310 /* Notices panel */ 211 311 … … 309 409 background-color: #ddd !important; 310 410 } 411 412 /** 413 * Barkeeper 414 * 415 * Note: adminbar styles are stupidly specific 416 */ 417 #wpadminbar .ta-barkeeper-collapsable { 418 max-width: 100vw; 419 height: 100%; 420 transition: opacity 0.2s 0.5s, max-width 0.5s; 421 422 } 423 #wpadminbar #wp-admin-bar-root-default.ta-barkeeper-closed .ta-barkeeper-collapsable { 424 max-width: 0; 425 overflow: hidden; 426 opacity: 0; 427 transition: opacity 0.2s, max-width 0.5s 0.2s 428 } 429 430 #wpadminbar #ta-barkeeper-toggle { 431 border: 0 none; 432 box-shadow: none; 433 background-color: #444; 434 display: flex; 435 box-sizing: border-box; 436 margin: 3px; 437 padding: 0; 438 height: calc( 32px - 6px ); 439 width: 24px; 440 border-radius: 6px; 441 float: left; 442 color: white; 443 justify-content: center; 444 align-items: center; 445 overflow: hidden; 446 text-indent: 32px; 447 position: relative; 448 } 449 #wpadminbar #ta-barkeeper-toggle:before { 450 display: block; 451 content: ''; 452 background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22h-6%20w-6%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%222%22%3E%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M15%2019l-7-7%207-7%22%20%2F%3E%3C%2Fsvg%3E'); 453 background-size: 20px; 454 background-repeat: no-repeat; 455 background-position: center; 456 transition: transform 0.3s; 457 position: absolute; 458 top: 0; 459 left: 0; 460 width: 100%; 461 height: 100%; 462 text-align: center; 463 line-height: calc( 32px - 6px ); 464 text-indent: 0; 465 } 466 467 #wpadminbar #wp-admin-bar-root-default.ta-barkeeper-closed + #ta-barkeeper-toggle:before { 468 transform: rotate(180deg); 469 } 470 471 /* Mobile admin bar */ 472 @media screen and (max-width: 782px) { 473 #wpadminbar #ta-barkeeper-toggle { 474 height: 40px; 475 width: 32px; 476 text-indent: 50px; 477 } 478 } -
turbo-admin/tags/1.9.0/turbo-admin.php
r2702218 r2703739 9 9 * Text Domain: turbo-admin 10 10 * Domain Path: /languages 11 * Version: 1. 7.011 * Version: 1.9.0 12 12 * 13 13 * @package Turbo_Admin … … 34 34 define('TURBO_ADMIN_SHORTCUT_META_NAME', 'turbo-admin-shortcut'); 35 35 define('TURBO_ADMIN_HIDE_NOTICES_META_NAME', 'turbo-admin-hide-notices'); 36 define('TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME', 'turbo-admin-admin-bar-search'); 37 define('TURBO_ADMIN_BARKEEPER_META_NAME', 'turbo-admin-barkeeper'); 36 38 define('TURBO_ADMIN_LIST_TABLE_SHORTCUTS_NAME', 'turbo-admin-list-table-shortcuts'); 37 39 … … 41 43 $userShortcutKeys = userShortcutKeys(); 42 44 $hideNotices = get_user_meta( get_current_user_id(), TURBO_ADMIN_HIDE_NOTICES_META_NAME, true ); 45 $adminBarSearch = get_user_meta( get_current_user_id(), TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, true ); 46 $barkeeper = get_user_meta( get_current_user_id(), TURBO_ADMIN_BARKEEPER_META_NAME, true ); 43 47 $listTableShortcuts = get_user_meta( get_current_user_id(), TURBO_ADMIN_LIST_TABLE_SHORTCUTS_NAME, true ); 44 48 … … 54 58 'keys' => $shortcutKeys, 55 59 'hideNotices' => intval( $hideNotices ) === 1, 60 'adminBarSearch' => intval( $adminBarSearch ) === 1, 61 'barkeeper' => intval( $barkeeper ) === 1, 56 62 'listTableShortcuts' => intval( $listTableShortcuts ) === 1, 57 63 ] ); … … 119 125 $hideIcon = get_hide_icon($user->ID); 120 126 $hideNotices = get_user_meta( get_current_user_id(), TURBO_ADMIN_HIDE_NOTICES_META_NAME, true ); 127 $adminBarSearch = get_user_meta( get_current_user_id(), TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, true ); 128 $barkeeper = get_user_meta( get_current_user_id(), TURBO_ADMIN_BARKEEPER_META_NAME, true ); 121 129 $listTableShortcuts = get_user_meta( get_current_user_id(), TURBO_ADMIN_LIST_TABLE_SHORTCUTS_NAME, true ); 122 130 ?> … … 170 178 </label> 171 179 <br> 180 <label for="turbo-admin-admin-bar-search"> 181 <input name="turbo-admin-admin-bar-search" type="checkbox" id="turbo-admin-admin-bar-search" value="1" <?php checked($adminBarSearch) ?>> 182 Admin bar search (moves the palette to the admin bar) 183 </label> 184 <br> 185 <label for="turbo-admin-barkeeper"> 186 <input name="turbo-admin-barkeeper" type="checkbox" id="turbo-admin-barkeeper" value="1" <?php checked($barkeeper) ?>> 187 Barkeeper (hides items in the admin bar) 188 </label> 189 <br> 172 190 <label for="turbo-admin-list-table-shortcuts"> 173 191 <input name="turbo-admin-list-table-shortcuts" type="checkbox" id="turbo-admin-list-table-shortcuts" value="1" <?php checked($listTableShortcuts) ?>> … … 208 226 } else { 209 227 update_user_meta($user_id, TURBO_ADMIN_HIDE_NOTICES_META_NAME, 0); 228 } 229 if (isset($_POST['turbo-admin-admin-bar-search']) && in_array(intval($_POST['turbo-admin-admin-bar-search']), [0, 1], true) ) { 230 update_user_meta($user_id, TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, $_POST['turbo-admin-admin-bar-search']); 231 } else { 232 update_user_meta($user_id, TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, 0); 233 } 234 if (isset($_POST['turbo-admin-barkeeper']) && in_array(intval($_POST['turbo-admin-barkeeper']), [0, 1], true) ) { 235 update_user_meta($user_id, TURBO_ADMIN_BARKEEPER_META_NAME, $_POST['turbo-admin-barkeeper']); 236 } else { 237 update_user_meta($user_id, TURBO_ADMIN_BARKEEPER_META_NAME, 0); 210 238 } 211 239 if (isset($_POST['turbo-admin-list-table-shortcuts']) && in_array(intval($_POST['turbo-admin-list-table-shortcuts']), [0, 1], true) ) { -
turbo-admin/trunk/dist/main.min.js
r2702218 r2703739 1072 1072 contentItems.forEach((item) => { 1073 1073 const itemTitle = item.title; 1074 const itemType = item. type;1074 const itemType = item.subtype; 1075 1075 const itemUrl = item.url; 1076 1076 if (this.contentItemExists(itemUrl)) { … … 1199 1199 showPalette() { 1200 1200 this.paletteInputElement.value = ""; 1201 this.paletteItemsElement.scrollTop = 0; 1201 1202 this.paletteElement?.classList.add("active"); 1202 1203 this.paletteInputElement?.focus(); … … 1205 1206 this.navigating = false; 1206 1207 this.paletteElement?.classList.remove("active"); 1208 this.paletteInputElement.value = ""; 1209 this.paletteInputElement.blur(); 1207 1210 if (this.isSubMenuOpen()) { 1208 1211 this.closeSubMenu(); … … 1301 1304 this.paletteItemsElement.style.minHeight = subMenuHeight + "px"; 1302 1305 subMenuElement.classList.add("active"); 1303 this.paletteInputElement.disabled = true;1304 this.paletteInputElement.blur();1305 1306 this.selectedSubItem = subMenuElement.querySelector("li"); 1306 1307 this.openedSubMenu = subMenuElement; 1307 1308 this.setSelectedElement(); 1309 this.paletteInputElement.disabled = true; 1310 this.paletteInputElement.blur(); 1308 1311 } 1309 1312 closeSubMenu(subMenuElement = null) { … … 1740 1743 var class_list_table_shortcuts_default = ListTableShortcuts; 1741 1744 1745 // src/class-turbo-admin-barkeeper.js 1746 var TurboAdminBarkeeper = class { 1747 constructor(barkeeperState) { 1748 if (!document.getElementById("wpadminbar")) { 1749 return; 1750 } 1751 this.exclusionIds = [ 1752 "wp-admin-bar-menu-toggle", 1753 "wp-admin-bar-wp-logo", 1754 "wp-admin-bar-site-name", 1755 "wp-admin-bar-updates" 1756 ]; 1757 this.barkeeperState = barkeeperState; 1758 this.root = document.getElementById("wp-admin-bar-root-default"); 1759 this.itemsToHide = document.querySelectorAll("#wp-admin-bar-root-default > li"); 1760 Array.from(this.itemsToHide).forEach((element) => { 1761 if (this.exclusionIds.includes(element.id)) { 1762 return; 1763 } 1764 element.classList.add("ta-barkeeper-collapsable"); 1765 }); 1766 if (this.barkeeperState === "closed") { 1767 this.root.classList.toggle("ta-barkeeper-closed"); 1768 } 1769 this.button = document.createElement("button"); 1770 this.button.id = "ta-barkeeper-toggle"; 1771 this.button.innerText = "<"; 1772 this.button.addEventListener("click", (e) => { 1773 this.root.classList.toggle("ta-barkeeper-closed"); 1774 this.barkeeperState = this.barkeeperState === "open" ? "closed" : "open"; 1775 if (typeof browser === "object") { 1776 browser.runtime.sendMessage({ 1777 action: "barkeeperSetState", 1778 barkeeperState: this.barkeeperState 1779 }); 1780 } else { 1781 window.localStorage.setItem("turboAdminBarkeeperState", this.barkeeperState); 1782 } 1783 }); 1784 this.root.insertAdjacentElement("afterend", this.button); 1785 } 1786 }; 1787 var class_turbo_admin_barkeeper_default = TurboAdminBarkeeper; 1788 1742 1789 // src/class-turbo-admin.js 1743 1790 var TurboAdmin = class { … … 1779 1826 if (this.options["list-table-keyboard-shortcuts"] === true) { 1780 1827 this.turboAdminListTableShortcuts = new class_list_table_shortcuts_default(); 1828 } 1829 if (this.options["barkeeper"] === true) { 1830 if (typeof browser !== "object") { 1831 this.options["barkeeper-state"] = window.localStorage.getItem("turboAdminBarkeeperState"); 1832 } 1833 this.turboAdminBarkeeper = new class_turbo_admin_barkeeper_default(this.options["barkeeper-state"]); 1781 1834 } 1782 1835 if (globalThis.contentApi.userLoggedIn()) { … … 1962 2015 palette.appendChild(input); 1963 2016 palette.appendChild(list); 1964 document.querySelector(this.options.appendToElement ?? "body").appendChild(container); 2017 if (document.getElementById("wpadminbar") && this.options["admin-bar-search"] === true) { 2018 const paletteLi = document.createElement("li"); 2019 paletteLi.appendChild(container); 2020 const adminBar = document.getElementById("wp-admin-bar-top-secondary"); 2021 adminBar.appendChild(paletteLi); 2022 input.addEventListener("focus", (e) => this.turboAdminPalette.showPalette()); 2023 const placeholder = document.createElement("div"); 2024 placeholder.id = "ta-shortcut-key-placeholder"; 2025 placeholder.innerText = this.buildShortcutKeysString(); 2026 placeholder.addEventListener("click", (e) => input.focus()); 2027 palette.insertBefore(placeholder, list); 2028 } else { 2029 document.querySelector(this.options.appendToElement ?? "body").appendChild(container); 2030 } 2031 } 2032 buildShortcutKeysString() { 2033 let keysString = ""; 2034 let shortcut = this.options.shortcutKeys[0]; 2035 if (shortcut.meta) { 2036 keysString += "Cmd-"; 2037 } 2038 if (shortcut.ctrl) { 2039 keysString += "Ctrl-"; 2040 } 2041 if (shortcut.alt) { 2042 keysString += "Alt-"; 2043 } 2044 if (shortcut.shift) { 2045 keysString += "Shift-"; 2046 } 2047 keysString += shortcut.key.toUpperCase(); 2048 return keysString; 1965 2049 } 1966 2050 }; … … 2119 2203 "list-table-keyboard-shortcuts": globalThis.wpTurboAdmin["listTableShortcuts"] === "1", 2120 2204 "hide-notices": globalThis.wpTurboAdmin["hideNotices"] === "1", 2121 rememberedNoticeIds: JSON.parse(window.localStorage.getItem("rememberedNoticeIds")) ?? new Array() 2205 rememberedNoticeIds: JSON.parse(window.localStorage.getItem("rememberedNoticeIds")) ?? new Array(), 2206 barkeeper: globalThis.wpTurboAdmin["barkeeper"] === "1", 2207 "admin-bar-search": globalThis.wpTurboAdmin["adminBarSearch"] === "1" 2122 2208 }; 2123 2209 await taInit(globalThis.turboAdminOptions); -
turbo-admin/trunk/dist/main.min.js.map
r2702218 r2703739 1 1 { 2 2 "version": 3, 3 "sources": ["../src/fuse-6.4.6.js", "../src/class-turbo-admin-palette.js", "../src/class-turbo-admin-menu-item.js", "../src/class-storage.js", "../src/class-content-api.js", "../src/class-turbo-admin-wp-block-editor-fullscreen-kill.js", "../src/class-turbo-admin-wp-block-editor-welcome-guide-kill.js", "../src/class-turbo-admin-wp-notices.js", "../src/class-list-table-shortcuts.js", "../src/class-turbo-admin .js", "../src/class-wp.js", "../src/main.js"],4 "sourcesContent": ["/**\n * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2021 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\nvar e, t; e = this, t = function () { \"use strict\"; function e(t) { return (e = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e })(t) } function t(e, t) { if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\") } function n(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } function r(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e } function i(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function o(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function c(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? o(Object(n), !0).forEach((function (t) { i(e, t, n[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach((function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) })) } return e } function a(e, t) { if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && u(e, t) } function s(e) { return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) { return e.__proto__ || Object.getPrototypeOf(e) })(e) } function u(e, t) { return (u = Object.setPrototypeOf || function (e, t) { return e.__proto__ = t, e })(e, t) } function h(e, t) { return !t || \"object\" != typeof t && \"function\" != typeof t ? function (e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e }(e) : t } function f(e) { var t = function () { if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if (\"function\" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], (function () { }))), !0 } catch (e) { return !1 } }(); return function () { var n, r = s(e); if (t) { var i = s(this).constructor; n = Reflect.construct(r, arguments, i) } else n = r.apply(this, arguments); return h(this, n) } } function l(e) { return function (e) { if (Array.isArray(e)) return d(e) }(e) || function (e) { if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) }(e) || function (e, t) { if (e) { if (\"string\" == typeof e) return d(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return \"Object\" === n && e.constructor && (n = e.constructor.name), \"Map\" === n || \"Set\" === n ? Array.from(e) : \"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? d(e, t) : void 0 } }(e) || function () { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\") }() } function d(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++)r[n] = e[n]; return r } function v(e) { return Array.isArray ? Array.isArray(e) : \"[object Array]\" === b(e) } function g(e) { return \"string\" == typeof e } function y(e) { return \"number\" == typeof e } function p(e) { return !0 === e || !1 === e || function (e) { return m(e) && null !== e }(e) && \"[object Boolean]\" == b(e) } function m(t) { return \"object\" === e(t) } function k(e) { return null != e } function M(e) { return !e.trim().length } function b(e) { return null == e ? void 0 === e ? \"[object Undefined]\" : \"[object Null]\" : Object.prototype.toString.call(e) } var x = function (e) { return \"Invalid value for key \".concat(e) }, L = function (e) { return \"Pattern length exceeds max of \".concat(e, \".\") }, S = Object.prototype.hasOwnProperty, w = function () { function e(n) { var r = this; t(this, e), this._keys = [], this._keyMap = {}; var i = 0; n.forEach((function (e) { var t = _(e); i += t.weight, r._keys.push(t), r._keyMap[t.id] = t, i += t.weight })), this._keys.forEach((function (e) { e.weight /= i })) } return r(e, [{ key: \"get\", value: function (e) { return this._keyMap[e] } }, { key: \"keys\", value: function () { return this._keys } }, { key: \"toJSON\", value: function () { return JSON.stringify(this._keys) } }]), e }(); function _(e) { var t = null, n = null, r = null, i = 1; if (g(e) || v(e)) r = e, t = O(e), n = j(e); else { if (!S.call(e, \"name\")) throw new Error(function (e) { return \"Missing \".concat(e, \" property in key\") }(\"name\")); var o = e.name; if (r = o, S.call(e, \"weight\") && (i = e.weight) <= 0) throw new Error(function (e) { return \"Property 'weight' in key '\".concat(e, \"' must be a positive integer\") }(o)); t = O(o), n = j(o) } return { path: t, id: n, weight: i, src: r } } function O(e) { return v(e) ? e : e.split(\".\") } function j(e) { return v(e) ? e.join(\".\") : e } var A = c({}, { isCaseSensitive: !1, includeScore: !1, keys: [], shouldSort: !0, sortFn: function (e, t) { return e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1 } }, {}, { includeMatches: !1, findAllMatches: !1, minMatchCharLength: 1 }, {}, { location: 0, threshold: .6, distance: 100 }, {}, { useExtendedSearch: !1, getFn: function (e, t) { var n = [], r = !1; return function e(t, i, o) { if (k(t)) if (i[o]) { var c = t[i[o]]; if (!k(c)) return; if (o === i.length - 1 && (g(c) || y(c) || p(c))) n.push(function (e) { return null == e ? \"\" : function (e) { if (\"string\" == typeof e) return e; var t = e + \"\"; return \"0\" == t && 1 / e == -1 / 0 ? \"-0\" : t }(e) }(c)); else if (v(c)) { r = !0; for (var a = 0, s = c.length; a < s; a += 1)e(c[a], i, o + 1) } else i.length && e(c, i, o + 1) } else n.push(t) }(e, g(t) ? t.split(\".\") : t, 0), r ? n : n[0] }, ignoreLocation: !1, ignoreFieldNorm: !1 }), I = /[^ ]+/g; function C() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 3, t = new Map, n = Math.pow(10, e); return { get: function (e) { var r = e.match(I).length; if (t.has(r)) return t.get(r); var i = 1 / Math.sqrt(r), o = parseFloat(Math.round(i * n) / n); return t.set(r, o), o }, clear: function () { t.clear() } } } var E = function () { function e() { var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r; t(this, e), this.norm = C(3), this.getFn = i, this.isCreated = !1, this.setIndexRecords() } return r(e, [{ 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 e = this, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; this.keys = t, this._keysMap = {}, t.forEach((function (t, n) { e._keysMap[t.id] = n })) } }, { key: \"create\", value: function () { var e = this; !this.isCreated && this.docs.length && (this.isCreated = !0, g(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(); g(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(); t < n; t += 1)this.records[t].i -= 1 } }, { key: \"getValueForItemAtKeyId\", value: function (e, t) { return e[this._keysMap[t]] } }, { key: \"size\", value: function () { return this.records.length } }, { key: \"_addString\", value: function (e, t) { if (k(e) && !M(e)) { var n = { v: e, i: t, n: this.norm.get(e) }; this.records.push(n) } } }, { key: \"_addObject\", value: function (e, t) { var n = this, r = { i: t, $: {} }; this.keys.forEach((function (t, i) { var o = n.getFn(e, t.path); if (k(o)) if (v(o)) !function () { for (var e = [], t = [{ nestedArrIndex: -1, value: o }]; t.length;) { var c = t.pop(), a = c.nestedArrIndex, s = c.value; if (k(s)) if (g(s) && !M(s)) { var u = { v: s, i: a, n: n.norm.get(s) }; e.push(u) } else v(s) && s.forEach((function (e, n) { t.push({ nestedArrIndex: n, value: e }) })) } r.$[i] = e }(); else if (!M(o)) { var c = { v: o, n: n.norm.get(o) }; r.$[i] = c } })), this.records.push(r) } }, { key: \"toJSON\", value: function () { return { keys: this.keys, records: this.records } } }]), e }(); function $(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r, o = new E({ getFn: i }); return o.setKeys(e.map(_)), o.setSources(t), o.create(), o } function R(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.errors, r = void 0 === n ? 0 : n, i = t.currentLocation, o = void 0 === i ? 0 : i, c = t.expectedLocation, a = void 0 === c ? 0 : c, s = t.distance, u = void 0 === s ? A.distance : s, h = t.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r / e.length; if (f) return l; var d = Math.abs(a - o); return u ? l + d / u : d ? 1 : l } function F() { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : A.minMatchCharLength, n = [], r = -1, i = -1, o = 0, c = e.length; o < c; o += 1) { var a = e[o]; a && -1 === r ? r = o : a || -1 === r || ((i = o - 1) - r + 1 >= t && n.push([r, i]), r = -1) } return e[o - 1] && o - r >= t && n.push([r, o - 1]), n } function P(e) { for (var t = {}, n = 0, r = e.length; n < r; n += 1) { var i = e.charAt(n); t[i] = (t[i] || 0) | 1 << r - n - 1 } return t } var N = function () { function e(n) { var r = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, o = i.location, c = void 0 === o ? A.location : o, a = i.threshold, s = void 0 === a ? A.threshold : a, u = i.distance, h = void 0 === u ? A.distance : u, f = i.includeMatches, l = void 0 === f ? A.includeMatches : f, d = i.findAllMatches, v = void 0 === d ? A.findAllMatches : d, g = i.minMatchCharLength, y = void 0 === g ? A.minMatchCharLength : g, p = i.isCaseSensitive, m = void 0 === p ? A.isCaseSensitive : p, k = i.ignoreLocation, M = void 0 === k ? A.ignoreLocation : k; if (t(this, e), this.options = { location: c, threshold: s, distance: h, includeMatches: l, findAllMatches: v, minMatchCharLength: y, isCaseSensitive: m, ignoreLocation: M }, this.pattern = m ? n : n.toLowerCase(), this.chunks = [], this.pattern.length) { var b = function (e, t) { r.chunks.push({ pattern: e, alphabet: P(e), startIndex: t }) }, x = this.pattern.length; if (x > 32) { for (var L = 0, S = x % 32, w = x - S; L < w;)b(this.pattern.substr(L, 32), L), L += 32; if (S) { var _ = x - 32; b(this.pattern.substr(_), _) } } else b(this.pattern, 0) } } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.options, n = t.isCaseSensitive, r = t.includeMatches; if (n || (e = e.toLowerCase()), this.pattern === e) { var i = { isMatch: !0, score: 0 }; return r && (i.indices = [[0, e.length - 1]]), i } var o = this.options, c = o.location, a = o.distance, s = o.threshold, u = o.findAllMatches, h = o.minMatchCharLength, f = o.ignoreLocation, d = [], v = 0, g = !1; this.chunks.forEach((function (t) { var n = t.pattern, i = t.alphabet, o = t.startIndex, y = function (e, t, n) { var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, i = r.location, o = void 0 === i ? A.location : i, c = r.distance, a = void 0 === c ? A.distance : c, s = r.threshold, u = void 0 === s ? A.threshold : s, h = r.findAllMatches, f = void 0 === h ? A.findAllMatches : h, l = r.minMatchCharLength, d = void 0 === l ? A.minMatchCharLength : l, v = r.includeMatches, g = void 0 === v ? A.includeMatches : v, y = r.ignoreLocation, p = void 0 === y ? A.ignoreLocation : y; if (t.length > 32) throw new Error(L(32)); for (var m, k = t.length, M = e.length, b = Math.max(0, Math.min(o, M)), x = u, S = b, w = d > 1 || g, _ = w ? Array(M) : []; (m = e.indexOf(t, S)) > -1;) { var O = R(t, { currentLocation: m, expectedLocation: b, distance: a, ignoreLocation: p }); if (x = Math.min(O, x), S = m + k, w) for (var j = 0; j < k;)_[m + j] = 1, j += 1 } S = -1; for (var I = [], C = 1, E = k + M, $ = 1 << k - 1, P = 0; P < k; P += 1) { for (var N = 0, D = E; N < D;) { var z = R(t, { errors: P, currentLocation: b + D, expectedLocation: b, distance: a, ignoreLocation: p }); z <= x ? N = D : E = D, D = Math.floor((E - N) / 2 + N) } E = D; var K = Math.max(1, b - D + 1), q = f ? M : Math.min(b + D, M) + k, W = Array(q + 2); W[q + 1] = (1 << P) - 1; for (var J = q; J >= K; J -= 1) { var T = J - 1, U = n[e.charAt(T)]; if (w && (_[T] = +!!U), W[J] = (W[J + 1] << 1 | 1) & U, P && (W[J] |= (I[J + 1] | I[J]) << 1 | 1 | I[J + 1]), W[J] & $ && (C = R(t, { errors: P, currentLocation: T, expectedLocation: b, distance: a, ignoreLocation: p })) <= x) { if (x = C, (S = T) <= b) break; K = Math.max(1, 2 * b - S) } } var V = R(t, { errors: P + 1, currentLocation: b, expectedLocation: b, distance: a, ignoreLocation: p }); if (V > x) break; I = W } var B = { isMatch: S >= 0, score: Math.max(.001, C) }; if (w) { var G = F(_, d); G.length ? g && (B.indices = G) : B.isMatch = !1 } return B }(e, n, i, { location: c + o, distance: a, threshold: s, findAllMatches: u, minMatchCharLength: h, includeMatches: r, ignoreLocation: f }), p = y.isMatch, m = y.score, k = y.indices; p && (g = !0), v += m, p && k && (d = [].concat(l(d), l(k))) })); var y = { isMatch: g, score: g ? v / this.chunks.length : 1 }; return g && r && (y.indices = d), y } }]), e }(), D = function () { function e(n) { t(this, e), this.pattern = n } return r(e, [{ key: \"search\", value: function () { } }], [{ key: \"isMultiMatch\", value: function (e) { return z(e, this.multiRegex) } }, { key: \"isSingleMatch\", value: function (e) { return z(e, this.singleRegex) } }]), e }(); function z(e, t) { var n = e.match(t); return n ? n[1] : null } var K = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^=(.*)$/ } }]), i }(D), q = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)$/ } }]), i }(D), W = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^\\^(.*)$/ } }]), i }(D), J = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!\\^(.*)$/ } }]), i }(D), T = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^(.*)\\$$/ } }]), i }(D), U = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)\\$$/ } }]), i }(D), V = function (e) { a(i, e); var n = f(i); function i(e) { var r, o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, c = o.location, a = void 0 === c ? A.location : c, s = o.threshold, u = void 0 === s ? A.threshold : s, h = o.distance, f = void 0 === h ? A.distance : h, l = o.includeMatches, d = void 0 === l ? A.includeMatches : l, v = o.findAllMatches, g = void 0 === v ? A.findAllMatches : v, y = o.minMatchCharLength, p = void 0 === y ? A.minMatchCharLength : y, m = o.isCaseSensitive, k = void 0 === m ? A.isCaseSensitive : m, M = o.ignoreLocation, b = void 0 === M ? A.ignoreLocation : M; return t(this, i), (r = n.call(this, e))._bitapSearch = new N(e, { location: a, threshold: u, distance: f, includeMatches: d, findAllMatches: g, minMatchCharLength: p, isCaseSensitive: k, ignoreLocation: b }), r } return r(i, [{ 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 /^(.*)$/ } }]), i }(D), B = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ key: \"search\", value: function (e) { for (var t, n = 0, r = [], i = this.pattern.length; (t = e.indexOf(this.pattern, n)) > -1;)n = t + i, r.push([t, n - 1]); var o = !!r.length; return { isMatch: o, score: o ? 0 : 1, indices: r } } }], [{ key: \"type\", get: function () { return \"include\" } }, { key: \"multiRegex\", get: function () { return /^'\"(.*)\"$/ } }, { key: \"singleRegex\", get: function () { return /^'(.*)$/ } }]), i }(D), G = [K, B, W, J, U, T, q, V], H = G.length, Q = / +(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/; function X(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return e.split(\"|\").map((function (e) { for (var n = e.trim().split(Q).filter((function (e) { return e && !!e.trim() })), r = [], i = 0, o = n.length; i < o; i += 1) { for (var c = n[i], a = !1, s = -1; !a && ++s < H;) { var u = G[s], h = u.isMultiMatch(c); h && (r.push(new u(h, t)), a = !0) } if (!a) for (s = -1; ++s < H;) { var f = G[s], l = f.isSingleMatch(c); if (l) { r.push(new f(l, t)); break } } } return r })) } var Y = new Set([V.type, B.type]), Z = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = r.isCaseSensitive, o = void 0 === i ? A.isCaseSensitive : i, c = r.includeMatches, a = void 0 === c ? A.includeMatches : c, s = r.minMatchCharLength, u = void 0 === s ? A.minMatchCharLength : s, h = r.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r.findAllMatches, d = void 0 === l ? A.findAllMatches : l, v = r.location, g = void 0 === v ? A.location : v, y = r.threshold, p = void 0 === y ? A.threshold : y, m = r.distance, k = void 0 === m ? A.distance : m; t(this, e), this.query = null, this.options = { isCaseSensitive: o, includeMatches: a, minMatchCharLength: u, findAllMatches: d, ignoreLocation: f, location: g, threshold: p, distance: k }, this.pattern = o ? n : n.toLowerCase(), this.query = X(this.pattern, this.options) } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.query; if (!t) return { isMatch: !1, score: 1 }; var n = this.options, r = n.includeMatches; e = n.isCaseSensitive ? e : e.toLowerCase(); for (var i = 0, o = [], c = 0, a = 0, s = t.length; a < s; a += 1) { var u = t[a]; o.length = 0, i = 0; for (var h = 0, f = u.length; h < f; h += 1) { var d = u[h], v = d.search(e), g = v.isMatch, y = v.indices, p = v.score; if (!g) { c = 0, i = 0, o.length = 0; break } if (i += 1, c += p, r) { var m = d.constructor.type; Y.has(m) ? o = [].concat(l(o), l(y)) : o.push(y) } } if (i) { var k = { isMatch: !0, score: c / i }; return r && (k.indices = o), k } } return { isMatch: !1, score: 1 } } }], [{ key: \"condition\", value: function (e, t) { return t.useExtendedSearch } }]), e }(), ee = []; function te(e, t) { for (var n = 0, r = ee.length; n < r; n += 1) { var i = ee[n]; if (i.condition(e, t)) return new i(e, t) } return new N(e, t) } var ne = \"$and\", re = \"$or\", ie = \"$path\", oe = \"$val\", ce = function (e) { return !(!e[ne] && !e[re]) }, ae = function (e) { return !!e[ie] }, se = function (e) { return !v(e) && m(e) && !ce(e) }, ue = function (e) { return i({}, ne, Object.keys(e).map((function (t) { return i({}, t, e[t]) }))) }; function he(e, t) { var n = t.ignoreFieldNorm, r = void 0 === n ? A.ignoreFieldNorm : n; e.forEach((function (e) { var t = 1; e.matches.forEach((function (e) { var n = e.key, i = e.norm, o = e.score, c = n ? n.weight : null; t *= Math.pow(0 === o && c ? Number.EPSILON : o, (c || 1) * (r ? 1 : i)) })), e.score = t })) } function fe(e, t) { var n = e.matches; t.matches = [], k(n) && n.forEach((function (e) { if (k(e.indices) && e.indices.length) { var n = { indices: e.indices, value: e.value }; e.key && (n.key = e.key.src), e.idx > -1 && (n.refIndex = e.idx), t.matches.push(n) } })) } function le(e, t) { t.score = e.score } function de(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.includeMatches, i = void 0 === r ? A.includeMatches : r, o = n.includeScore, c = void 0 === o ? A.includeScore : o, a = []; return i && a.push(fe), c && a.push(le), e.map((function (e) { var n = e.idx, r = { item: t[n], refIndex: n }; return a.length && a.forEach((function (t) { t(e, r) })), r })) } var ve = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = arguments.length > 2 ? arguments[2] : void 0; t(this, e), this.options = c({}, A, {}, r), this.options.useExtendedSearch, this._keyStore = new w(this.options.keys), this.setCollection(n, i) } return r(e, [{ key: \"setCollection\", value: function (e, t) { if (this._docs = e, t && !(t instanceof E)) throw new Error(\"Incorrect 'index' type\"); this._myIndex = t || $(this.options.keys, this._docs, { getFn: this.options.getFn }) } }, { key: \"add\", value: function (e) { k(e) && (this._docs.push(e), this._myIndex.add(e)) } }, { key: \"remove\", value: function () { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () { return !1 }, t = [], n = 0, r = this._docs.length; n < r; n += 1) { var i = this._docs[n]; e(i, n) && (this.removeAt(n), n -= 1, r -= 1, t.push(i)) } return t } }, { key: \"removeAt\", value: function (e) { this._docs.splice(e, 1), this._myIndex.removeAt(e) } }, { key: \"getIndex\", value: function () { return this._myIndex } }, { key: \"search\", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.limit, r = void 0 === n ? -1 : n, i = this.options, o = i.includeMatches, c = i.includeScore, a = i.shouldSort, s = i.sortFn, u = i.ignoreFieldNorm, h = g(e) ? g(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e); return he(h, { ignoreFieldNorm: u }), a && h.sort(s), y(r) && r > -1 && (h = h.slice(0, r)), de(h, this._docs, { includeMatches: o, includeScore: c }) } }, { key: \"_searchStringList\", value: function (e) { var t = te(e, this.options), n = this._myIndex.records, r = []; return n.forEach((function (e) { var n = e.v, i = e.i, o = e.n; if (k(n)) { var c = t.searchIn(n), a = c.isMatch, s = c.score, u = c.indices; a && r.push({ item: n, idx: i, matches: [{ score: s, value: n, norm: o, indices: u }] }) } })), r } }, { key: \"_searchLogical\", value: function (e) { var t = this, n = function (e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.auto, i = void 0 === r || r, o = function e(n) { var r = Object.keys(n), o = ae(n); if (!o && r.length > 1 && !ce(n)) return e(ue(n)); if (se(n)) { var c = o ? n[ie] : r[0], a = o ? n[oe] : n[c]; if (!g(a)) throw new Error(x(c)); var s = { keyId: j(c), pattern: a }; return i && (s.searcher = te(a, t)), s } var u = { children: [], operator: r[0] }; return r.forEach((function (t) { var r = n[t]; v(r) && r.forEach((function (t) { u.children.push(e(t)) })) })), u }; return ce(e) || (e = ue(e)), o(e) }(e, this.options), r = this._myIndex.records, i = {}, o = []; return r.forEach((function (e) { var r = e.$, c = e.i; if (k(r)) { var a = function e(n, r, i) { if (!n.children) { var o = n.keyId, c = n.searcher, a = t._findMatches({ key: t._keyStore.get(o), value: t._myIndex.getValueForItemAtKeyId(r, o), searcher: c }); return a && a.length ? [{ idx: i, item: r, matches: a }] : [] } switch (n.operator) { case ne: for (var s = [], u = 0, h = n.children.length; u < h; u += 1) { var f = e(n.children[u], r, i); if (!f.length) return []; s.push.apply(s, l(f)) } return s; case re: for (var d = [], v = 0, g = n.children.length; v < g; v += 1) { var y = e(n.children[v], r, i); if (y.length) { d.push.apply(d, l(y)); break } } return d } }(n, r, c); a.length && (i[c] || (i[c] = { idx: c, item: r, matches: [] }, o.push(i[c])), a.forEach((function (e) { var t, n = e.matches; (t = i[c].matches).push.apply(t, l(n)) }))) } })), o } }, { key: \"_searchObjectList\", value: function (e) { var t = this, n = te(e, this.options), r = this._myIndex, i = r.keys, o = r.records, c = []; return o.forEach((function (e) { var r = e.$, o = e.i; if (k(r)) { var a = []; i.forEach((function (e, i) { a.push.apply(a, l(t._findMatches({ key: e, value: r[i], searcher: n }))) })), a.length && c.push({ idx: o, item: r, matches: a }) } })), c } }, { key: \"_findMatches\", value: function (e) { var t = e.key, n = e.value, r = e.searcher; if (!k(n)) return []; var i = []; if (v(n)) n.forEach((function (e) { var n = e.v, o = e.i, c = e.n; if (k(n)) { var a = r.searchIn(n), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: n, idx: o, norm: c, indices: h }) } })); else { var o = n.v, c = n.n, a = r.searchIn(o), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: o, norm: c, indices: h }) } return i } }]), e }(); return ve.version = \"6.4.6\", ve.createIndex = $, ve.parseIndex = function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.getFn, r = void 0 === n ? A.getFn : n, i = e.keys, o = e.records, c = new E({ getFn: r }); return c.setKeys(i), c.setIndexRecords(o), c }, ve.config = A, function () { ee.push.apply(ee, arguments) }(Z), ve }, \"object\" == typeof exports && \"undefined\" != typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define(t) : (e = e || self).Fuse = t();\n", "/*\n * Some notes on how this works...\n *\n * paletteData is passed into the constructor and is the initial list of items\n * these are TurboAdminMenuItem objects\n *\n * At any point, buildPaletteItems() can be called to turn the paletteData\n * into an array of \"li\" nodes.\n *\n * updatePaletteItems inserts the paletteItems into the \"ul\" list and sets the\n * selectedElement\n *\n * The selectedItem is always one of the paletteItems\n *\n * paletteSearch rebuilds the paletteItems from the paletteData using\n * buildPaletteItems, and then filters the list with FuseJS\n */\n\nimport Fuse from './fuse-6.4.6.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item';\nimport ContentApi from './class-content-api.js';\n\nexport default class TurboAdminPalette {\n\n\tconstructor(paletteData, options) {\n\n\t\tconsole.log('Initialising TurboAdmin');\n\n this.options = options;\n\n /** @type {HTMLDivElement} */\n this.paletteElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette-container'));\n /** @type {HTMLDivElement} */\n this.paletteInnerElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette'));\n\t\t/** @type {HTMLInputElement} */\n this.paletteInputElement = /** @type {HTMLInputElement} */ (document.getElementById('ta-command-palette-input'));\n\t\t/** @type {HTMLUListElement} */\n this.paletteItemsElement = /** @type {HTMLUListElement} */ (document.getElementById('ta-command-palette-items'));\n\n\t\t// Get palette data\n\t\tthis.paletteData = paletteData;\n\n // Get post type data from API\n this.postTypes = [];\n this.fetchPostTypes();\n\n // paletteItems is the list of 'li' elements used to build the palette\n this.paletteItems = [];\n\n // itemIndex is a \"cache\" of URLs used to check if we already\n // have an item in the palette\n this.itemIndex = {};\n\n // Convert into LI elements\n this.buildPaletteItems();\n\n\n\t\tthis.selectedItem = this.paletteItems[0];\n this.openedSubMenu = null;\n this.selectedSubItem = null;\n\n\t\t// Add them to the DOM\n\t\tthis.updatePaletteItems();\n\n // Set state\n this.navigating = false;\n this.debounceTimeout;\n\n\t\tthis.paletteFuseOptions = [];\n\t\tthis.paletteFuse = null;\n\n\t\tif (typeof (Fuse) !== 'function') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.paletteFuseOptions = {\n\t\t\tkeys: ['innerText'],\n\t\t}\n\n\t\tthis.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n\n\t\tdocument.addEventListener('keydown', e => this.handleGlobalKey(e));\n\n\t\tthis.paletteElement.addEventListener('click', e => {\n\t\t\tthis.checkForPaletteItemClick(e);\n this.checkForClickToClose(e);\n\t\t});\n\n this.paletteItemsElement.addEventListener('mouseover', e => {\n this.setHoveredItem(e.target);\n });\n\t}\n\n htmlDecode(input) {\n var doc = new DOMParser().parseFromString(input, \"text/html\");\n return doc.documentElement.textContent;\n }\n\n isMac() {\n return navigator.platform.startsWith('Mac');\n }\n\n metaPressed(e) {\n return this.isMac() ? e.metaKey : e.ctrlKey;\n }\n\n fetchPostTypes() {\n if (! globalThis.contentApi.active) {\n this.postTypes = [];\n return;\n }\n\n globalThis.contentApi.get('types').then(\n response => {\n response.json().then(\n types => {\n this.postTypes = types;\n }\n );\n }\n );\n }\n\n\tbuildPaletteItems() {\n this.paletteItems = [];\n this.itemIndex = {};\n\n\t\tthis.paletteData.forEach(item => {\n\t\t\tconst li = document.createElement('li');\n\t\t\tconst a = document.createElement('a');\n\t\t\tli.appendChild(a);\n\t\t\ta.href = item.action;\n\t\t\tlet title = item.title;\n\t\t\tif (item.parentTitle) {\n\t\t\t\ttitle = item.parentTitle + \": \" + title;\n\t\t\t}\n\t\t\ta.innerHTML = title;\n this.addPaletteListItem(li);\n\t\t});\n\t}\n\n // This takes a 'li' element and adds it to the paletteItems.\n // It also updates any caches and stuff.\n addPaletteListItem(listItem) {\n this.paletteItems.push(listItem);\n\n const link = listItem.querySelector('a');\n if (link) {\n this.itemIndex[link.href] = 1;\n }\n }\n\n contentItemExists(url) {\n return Boolean(this.itemIndex[url]);\n }\n\n injectContentItems(contentItems) {\n console.log('Injecting items');\n\n // We'll need this in the loop below.\n const profileLinkElem = document.getElementById('wp-admin-bar-edit-profile');\n let profileLink = null;\n if (profileLinkElem) {\n profileLink = profileLinkElem.querySelector('a').href;\n }\n\n // TODO: Can we not do this on every content item inject?\n // Check for presence of Oxygen Page builder\n /** @type {HTMLElement|string|Number} */\n let oxygenLinkElem = document.getElementById('toplevel_page_ct_dashboard_page');\n // Also check for a menu bar item\n if (! oxygenLinkElem) {\n oxygenLinkElem = document.getElementById('wp-admin-bar-oxygen_admin_bar_menu');\n }\n // Check to see if Oxygen link is cached\n if (! oxygenLinkElem) {\n oxygenLinkElem = Number(window.localStorage.getItem('ta-has-oxygen-builder'));\n }\n // Save Oxygen builder status\n window.localStorage.setItem('ta-has-oxygen-builder', Boolean(oxygenLinkElem) ? '1' : '0' );\n\n if (contentItems.length > 0) {\n contentItems.forEach(item => {\n const itemTitle = item.title;\n // const itemTitle = item.title.rendered;\n const itemType = item. type;\n const itemUrl = item.url;\n\n // console.log('Adding item: ' + itemTitle);\n\n // // Check if item already exists\n if (this.contentItemExists(itemUrl)) {\n console.log('Not adding duplicate');\n return;\n }\n\n const itemTypeName = this.postTypes[itemType] ? this.postTypes[itemType].name : itemType;\n const title = `${itemTitle} (${itemTypeName})`;\n\n const li = document.createElement('li');\n const a = document.createElement('a');\n const subMenu = document.createElement('div');\n const subMenuTitle = document.createElement('div');\n const subMenuItems = document.createElement('ul');\n subMenu.classList.add('ta-submenu');\n subMenuTitle.classList.add('ta-submenu-title');\n\n subMenuTitle.textContent = this.htmlDecode(itemTitle);\n subMenuItems.classList.add('ta-submenu-items');\n subMenu.appendChild(subMenuTitle);\n subMenu.appendChild(subMenuItems);\n\n const subMenuItem1 = document.createElement('li');\n const subMenuLink1 = document.createElement('a');\n subMenuLink1.innerText = \"View\";\n subMenuLink1.href = itemUrl;\n subMenuItem1.appendChild(subMenuLink1);\n subMenuItems.appendChild(subMenuItem1);\n\n if (profileLink) {\n // Need to get edit URL. This seems like the best way for now.\n const editLink = profileLink.replace('profile.php', `post.php?post=${item.id}&action=edit`);\n\n const subMenuItem2 = document.createElement('li');\n const subMenuLink2 = document.createElement('a');\n subMenuLink2.innerText = \"Edit\";\n subMenuLink2.href = editLink;\n subMenuItem2.appendChild(subMenuLink2);\n subMenuItems.appendChild(subMenuItem2);\n }\n\n if (oxygenLinkElem) {\n // Oxygen Edit Links are like: https://example.com.com/?page_id=26&ct_builder=true&ct_inner=true\n const oxygenLink = globalThis.taWp.home + `?page_id=${item.id}&ct_builder=true&ct_inner=true`;\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Edit with Oxygen\";\n subMenuLink3.href = oxygenLink;\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n }\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Copy link\";\n // Because this is an href we're setting it gets URI encoded!\n subMenuLink3.href = itemUrl;\n subMenuLink3.setAttribute('data-action', 'clipboard');\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n\n\n li.classList.add('ta-has-child-menu');\n\n li.appendChild(a);\n li.appendChild(subMenu);\n\n a.href = itemUrl;\n a.innerHTML = title;\n this.addPaletteListItem(li);\n })\n }\n\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n\n this.updatePaletteItems();\n }\n\n\t/**\n * Handle global keypresses (at document level). Note that other key presses\n * are handled by paletteActions()\n *\n * @param {KeyboardEvent} e\n */\n async handleGlobalKey(e) {\n\t\tif (this.shortcutKeysPressed(e)) {\n e.preventDefault();\n e.stopPropagation();\n\t\t\tif (this.paletteShown()) {\n\t\t\t\tthis.hidePalette();\n\t\t\t} else {\n\t\t\t\tthis.showPalette();\n\t\t\t}\n\t\t}\n\n\t\tif (e.code === 'Escape' && this.paletteShown()) {\n\t\t\tif (this.isSubMenuOpen()){\n this.closeSubMenu();\n } else {\n this.hidePalette();\n }\n\t\t}\n\n if (this.paletteShown()) {\n await this.paletteActions(e);\n\t\t}\n\t}\n\n\tshortcutKeysPressed(keyEvent) {\n // The reduce here works through all the different possible key combos\n // (more than one can be specified in options)\n\t\tconst keysPressed = this.options.shortcutKeys.reduce(\n\t\t\t(keyPressed, combo) => {\n\t\t\t\tif (keyPressed) {\n\t\t\t\t\treturn keyPressed;\n\t\t\t\t}\n return ((!navigator.platform.startsWith('Mac')) || (combo.meta === keyEvent.metaKey))\n && (combo.alt === keyEvent.altKey)\n && (combo.shift === keyEvent.shiftKey)\n && (combo.ctrl === keyEvent.ctrlKey)\n && (\n keyEvent.code === 'Key' + combo.key.toUpperCase()\n || ( combo.key === ' ' && keyEvent.code.toUpperCase() === 'SPACE' )\n );\n }, false);\n\t\treturn keysPressed;\n\t}\n\n async debouncedPaletteSearchAndUpdate() {\n // If search string is not long enough for content search, then\n // run without debounce.\n if (\n ( this.paletteInputElement.value !== '' && this.paletteInputElement.value.length <= 2)\n || this.postTypes === [] ) {\n this.debounceTimeout = null;\n await this.paletteSearchAndUpdate();\n return;\n }\n // If timer is null, reset it to 500ms and run your functions.\n // Otherwise, wait until timer is cleared\n if (!this.debounceTimeout) {\n this.debounceTimeout = setTimeout(async function () {\n // Reset timeout\n this.debounceTimeout = null;\n\n // Run the search function\n await this.paletteSearchAndUpdate();\n }.bind(this), 750);\n }\n }\n\n\t/**\n * Handle (non-global) keypresses on the palette\n *\n * @param {KeyboardEvent} e\n * @returns {Promise}\n */\n async paletteActions(e) {\n\t\tif (e.code === 'ArrowDown' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveDown();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'ArrowUp' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveUp();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'Enter' && this.paletteShown()) {\n this.doAction(this.metaPressed(e));\n return;\n\t\t}\n if (this.isSubMenuOpen()) {\n return;\n }\n\t\tawait this.debouncedPaletteSearchAndUpdate();\n\t}\n\n\tshowPalette() {\n\t\tthis.paletteInputElement.value = '';\n\t\tthis.paletteElement?.classList.add('active');\n\t\tthis.paletteInputElement?.focus();\n\t}\n\n\thidePalette() {\n this.navigating = false;\n\t\tthis.paletteElement?.classList.remove('active');\n if (this.isSubMenuOpen()) {\n this.closeSubMenu();\n }\n\t}\n\n\tpaletteShown() {\n\t\treturn this.paletteElement?.classList.contains('active');\n\t}\n\n checkForPaletteItemClick(e) {\n if (e.target.tagName === 'A') {\n e.preventDefault();\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = e.target.closest('li');\n } else {\n this.selectedItem = e.target.closest('li');\n }\n this.setSelectedElement();\n\n this.doAction(this.metaPressed(e));\n }\n }\n\n\tcheckForClickToClose(e) {\n\t\tif (e.target.id === this.paletteElement.id) {\n\t\t\tthis.hidePalette();\n\t\t}\n\t}\n\n\tsetSelectedElement() {\n if (this.isSubMenuOpen()) {\n this.paletteItemsElement?.querySelectorAll('.ta-submenu.active li.selected')?.forEach(e => e.classList.remove('selected'));\n this.selectedSubItem.classList.add('selected');\n } else {\n this.paletteItemsElement?.querySelectorAll('li.selected')?.forEach(e => e.classList.remove('selected'));\n if (this.selectedItem) {\n this.selectedItem.classList.add('selected');\n this.scrollList();\n }\n }\n\t}\n\n\tscrollList() {\n\t\t// Scrolling up\n\t\tif (this.selectedItem.offsetTop < this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop;\n\t\t}\n\t\t// Scrolling down\n\t\tif (this.selectedItem.offsetTop + this.selectedItem.offsetHeight > this.paletteItemsElement.offsetHeight + this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop + this.selectedItem.offsetHeight - this.paletteItemsElement.offsetHeight;\n\t\t}\n\t}\n\n setHoveredItem(element) {\n // Only do this for li's\n if ('LI' === element.tagName) {\n this.navigating = true;\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = element;\n } else {\n this.selectedItem = element;\n }\n this.setSelectedElement();\n }\n }\n\n\tmoveDown() {\n if (this.isSubMenuOpen()) {\n const nextItem = this.selectedSubItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedSubItem = nextItem;\n this.setSelectedElement();\n }\n } else {\n const nextItem = this.selectedItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedItem = nextItem;\n this.setSelectedElement();\n }\n }\n\t}\n\n\tmoveUp() {\n if (this.isSubMenuOpen()) {\n const prevItem = this.selectedSubItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedSubItem = prevItem;\n this.setSelectedElement();\n }\n } else {\n const prevItem = this.selectedItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedItem = prevItem;\n this.setSelectedElement();\n }\n }\n }\n\n isSubMenuOpen() {\n return null !== this.openedSubMenu;\n }\n\n openSubMenu(subMenuElement) {\n // Set height in case main menu is smaller than sub menu\n const subMenuHeight = subMenuElement.offsetHeight;\n this.paletteItemsElement.style.minHeight = subMenuHeight + \"px\";\n subMenuElement.classList.add('active');\n\n this.paletteInputElement.disabled = true;\n // Blur the input so that keys can continue to be captured\n this.paletteInputElement.blur();\n\n this.selectedSubItem = subMenuElement.querySelector('li');\n this.openedSubMenu = subMenuElement;\n this.setSelectedElement();\n }\n\n closeSubMenu(subMenuElement = null) {\n if (null === subMenuElement) {\n subMenuElement = document.querySelector('.ta-submenu.active');\n }\n subMenuElement.classList.remove('active');\n this.selectedSubItem.classList.remove('active');\n this.paletteItemsElement.style.minHeight = 'auto';\n this.selectedSubItem = null;\n this.openedSubMenu = null;\n this.paletteInputElement.disabled = false;\n this.paletteInputElement.focus();\n }\n\n\tdoAction(metaPressed = false) {\n if (this.isSubMenuOpen()) {\n this.actOnItem(this.selectedSubItem, metaPressed);\n return;\n }\n if (this.selectedItem.classList.contains('ta-has-child-menu')) {\n const subMenu = this.selectedItem.querySelector('.ta-submenu');\n this.openSubMenu(subMenu);\n return;\n }\n\n this.actOnItem(this.selectedItem, metaPressed);\n }\n\n actOnItem(item, metaPressed) {\n this.hidePalette();\n const link = item.querySelector('a');\n const url = link.href;\n\n if ('clipboard' === link.dataset.action) {\n navigator.clipboard.writeText(url);\n return;\n }\n\n if (metaPressed) {\n window.open(url, '_blank');\n } else {\n window.location = url;\n }\n }\n\n\tselectedItemDisplayed() {\n\t\treturn Array.from(this.paletteItemsElement.childNodes).includes(this.selectedItem);\n\t}\n\n\tasync paletteSearchAndUpdate() {\n\t\tawait this.paletteSearch();\n\t\tthis.updatePaletteItems();\n\t}\n\n\tasync paletteSearch() {\n // Get the value...\n // const response = await globalThis.contentApi.get('posts', { search: this.paletteInputElement.value, per_page: 100, status: ['publish', 'future', 'draft', 'pending', 'private'] });\n\n this.buildPaletteItems();\n\n if (this.paletteInputElement.value !== '') {\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n }\n\n // Content search - don't search everything!\n if (globalThis.contentApi.active && this.postTypes !== [] && this.paletteInputElement.value.length > 2) {\n this.paletteInnerElement.classList.add('loading');\n\n globalThis.contentApi.getPosts(this.paletteInputElement.value)\n .then(\n results => {\n this.injectContentItems(results);\n this.paletteInnerElement.classList.remove('loading');\n }\n )\n }\n\t}\n\n\tupdatePaletteItems() {\n\t\tconst newItems = document.createElement('ul');\n\t\tnewItems.id = 'ta-command-palette-items';\n\n\t\tthis.paletteItems.forEach(i => {\n\t\t\tnewItems.appendChild(i);\n\t\t})\n\n\t\tthis.paletteItemsElement.replaceChildren(...newItems.children);\n\n\t\tif (!this.navigating || !this.selectedItemDisplayed()) {\n\t\t\tthis.selectedItem = this.paletteItems[0];\n\t\t}\n\n\t\tthis.setSelectedElement();\n\t}\n\n}\n", "export default class TurboAdminMenuItem {\n\n\tconstructor(title, action, parentTitle, noCache = false) {\n\t\tthis.title = title;\n\t\tthis.action = action;\n\t\tthis.parentTitle = parentTitle;\n this.noCache = noCache;\n\t}\n\n sameAs(item) {\n return item.title === this.title &&\n item.action === this.action &&\n item.parentTitle === this.parentTitle;\n }\n}\n", "/**\n * This class is an abstraction of the browser extension storage API\n * (see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage)\n * but that falls back to using regular localStorage if we're not in a\n * browser extension.\n *\n * This exists so that the same API can be used from both the browser\n * extension AND the plugin version of Turbo Admin.\n *\n * Note that for the extension, data saved is \"global\" to the extension\n * and is NOT site specific.\n */\nexport default class Storage {\n\n /**\n * Constructor - detects where code is running and sets the local\n * store appropriately.\n */\n constructor() {\n /** @type {null|storageStorageArea|WindowLocalStorage} */\n this.store = null;\n\n if ('undefined' === typeof (browser)) {\n this.store = window.localStorage;\n } else {\n this.store = browser.storage.local;\n }\n }\n\n /**\n * Set/save extension data. Must be passed an object with key/value\n * pairs.\n *\n * @param {Object} dataObject\n */\n async set(dataObject) {\n if ('undefined' === typeof (browser)) {\n const keys = Object.keys(dataObject);\n keys.forEach(key => this.store.setItem(key, JSON.stringify(dataObject[key])));\n } else {\n await this.store.set(dataObject);\n }\n }\n\n /**\n * Get data from the extension's storage.\n *\n * Note that fetched data will be a object with the key as a\n * property.\n *\n * @param {String} key\n * @returns {Promise<Object>}\n */\n async get(key) {\n if ('undefined' === typeof (browser)) {\n let returnObj = {};\n let item = this.store.getItem(key);\n if (! item) {\n return returnObj;\n }\n let itemObject = null;\n try {\n itemObject = JSON.parse(this.store.getItem(key));\n } catch (e) {\n itemObject = null;\n }\n returnObj[key] = itemObject;\n return returnObj;\n } else {\n return await this.store.get(key);\n }\n }\n\n}\n", "import Storage from './class-storage.js';\n\nexport default class ContentApi {\n\n constructor() {\n // this.discoverApiRoot().then(e => null);\n // console.log('Discovered API base: ', this.apiBase);\n this.active = false;\n this.store = new Storage();\n\n // This is used to \"cache\" duplicate requests.\n // It's an object because it will have search strings as keys\n this.cache = {};\n }\n\n async discoverApiRoot() {\n let wpApiSettings = null;\n this.storageKey = 'wpApiSettings.' + globalThis.taWp.home;\n\n // Could be in the wp-api-request-js-extra (on wp-admin side)\n const wpApiSettingsScript = document.getElementById('wp-api-request-js-extra');\n if (wpApiSettingsScript) {\n const wpApiSettingsString = wpApiSettingsScript.innerHTML.match(/var\\s+wpApiSettings\\s+=\\s+(.+);/)[1];\n const wpApiSettings = JSON.parse(wpApiSettingsString);\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Getting from extension storage returns a object with the key\n // as the key. Which is weird.\n wpApiSettings = await this.store.get(this.storageKey);\n if (wpApiSettings\n && Object.keys(wpApiSettings).length !== 0\n && wpApiSettings[this.storageKey]\n && 'object' === typeof(wpApiSettings[this.storageKey])) {\n // Get the key'ed item out of the object\n wpApiSettings = wpApiSettings[this.storageKey];\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Could be in <link rel=\"https://api.w.org/\" href=\"https://something/wp-json/\">\n if (globalThis.taWp.apiLinkUrl) {\n this.apiRoot = globalThis.taWp.apiLinkUrl;\n // Just guess this\n this.apiBase = this.apiRoot + 'wp/v2/';\n this.active = true;\n return;\n }\n }\n\n userLoggedIn() {\n return document.body.classList.contains('logged-in') ||\n document.body.classList.contains('wp-admin');\n }\n\n async maybeExpireNonce(wpApiSettings) {\n if (wpApiSettings?.nonce && ! this.userLoggedIn()) {\n // Clear apiSetting nonce\n this.apiNonce = null;\n wpApiSettings.nonce = null;\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n }\n }\n\n makeParamString(data) {\n const params = new URLSearchParams();\n\n Object.keys(data).forEach(paramKey => {\n // Handle arrays\n if (Array.isArray(data[paramKey])) {\n const arrayParamKey = paramKey + '[]';\n data[paramKey].forEach( item => params.append(arrayParamKey, item));\n } else {\n params.append(paramKey, data[paramKey]);\n }\n });\n\n return params.toString();\n }\n\n statuses() {\n if (this.apiNonce) {\n return [\"publish\", \"future\", \"draft\", \"pending\", \"private\"];\n } else {\n return [\"publish\"];\n }\n }\n\n types() {\n return globalThis.turboAdmin.turboAdminPalette.postTypes;\n }\n\n async getPosts(searchString) {\n // Check the cache\n if (undefined !== this.cache[searchString]) {\n return this.cache[searchString];\n }\n\n // Fetch results\n const response = await this.get(\n // \"posts\",\n \"search\",\n {\n search: searchString,\n per_page: 100,\n // status: this.statuses(),\n type: 'post',\n subtype: 'any'\n }\n );\n\n // Decode JSON\n const result = await response.json();\n\n // Store in the cache\n this.cache[searchString] = result;\n\n return result;\n }\n\n async get(path, data = {}) {\n const init = {\n method: 'GET',\n headers: {},\n mode: 'cors',\n cache: 'no-store',\n }\n\n // Add the nonce if there is one\n if (this.apiNonce) {\n data._wpnonce = this.apiNonce;\n }\n\n const params = this.makeParamString(data);\n\n const response = await fetch(`${this.apiBase}${path}/?${params}`);\n\n return response;\n }\n\n}\n", "/**\n * It's impossible to change the setting to off, because the\n * extension's content script runs in a sandbox and can't access\n * the wp object. But we can just toggle the class every time.\n */\nexport default class TurboAdminWpBlockEditorFullscreenKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed fullscreen\n // if (document.body.classList.contains('turbo-admin-killed-fullscreen')) {\n // return;\n // }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (mu.target.classList.contains('is-fullscreen-mode')) {\n this.killFullScreenEditor();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killFullScreenEditor();\n }\n\n killFullScreenEditor() {\n if (! document.body.classList.contains('is-fullscreen-mode')) {\n return;\n }\n\n document.body.classList.remove('is-fullscreen-mode');\n document.body.classList.add('turbo-admin-killed-fullscreen');\n\n const newStyles = document.createElement('style');\n newStyles.innerHTML = \"body.turbo-admin-killed-fullscreen .edit-post-fullscreen-mode-close { display: none; }\";\n document.body.appendChild(newStyles);\n }\n}\n", "/**\n *\n */\nexport default class TurboAdminWpBlockEditorWelcomeGuideKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed the modal\n if (document.body.classList.contains('ta-killed-post-welcome-guide')) {\n return;\n }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (! mu.target.classList.contains('modal-open')) {\n return;\n }\n\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n this.killWelcomeGuide();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killWelcomeGuide();\n }\n\n killWelcomeGuide() {\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n const closeButton = welcomeGuide.querySelector('.components-modal__header button');\n if (closeButton) {\n closeButton.click();\n /*\n * Also add a class to body so we don't do it again - subsequent modals\n * will need to be shown as they will have been user-initiated.\n */\n document.body.classList.add('ta-killed-post-welcome-guide');\n }\n }\n }\n}\n", "export default class TurboAdminWpNotices {\n\n // TODO: Handle empty IDS. Can we identify unique selectors?\n // See spinup!\n // Also need to only show move to panel if we can (i.e. if there's a way\n // to identify it))\n constructor(rememberedNoticeIds) {\n\n // Bail if we aren't in the admin\n if (! document.querySelector('body.wp-admin')) {\n return;\n }\n\n /*\n * These are the global notice selectors - these are always hidden\n */\n this.noticeSelectors = [\n '#wpbody-content > .notice',\n '#wpbody-content > .wrap > .notice',\n '#wpbody-content > .wrap > .updated',\n '#gf_dashboard_message', // Gravity forms\n '.jitm-banner', //\n '.fs-notice', // I get this in Replyable\n '#updraft-dashnotice', // Updraft backups\n '.woocommerce-message', // WooCommerce\n '#akismet_setup_prompt', // Akismet\n '#wf-onboarding-plugin-header', // WordFence onboard\n '.llar-notice-review' // Limit Login Attempts reloaded\n ];\n\n /*\n * These selectors are allowed (unless explicitly denied)\n */\n this.allowedClasses = [\n 'notice-success',\n 'notice-error',\n 'notice-failure',\n 'updated',\n ]\n\n if (rememberedNoticeIds) {\n this.rememberedNoticeIds = rememberedNoticeIds.length > 0 ? rememberedNoticeIds : [];\n } else {\n this.rememberedNoticeIds = [];\n }\n\n const toolbar = document.getElementById('wpadminbar');\n\n if (!toolbar) {\n return;\n }\n\n if (rememberedNoticeIds && rememberedNoticeIds.length > 0) {\n rememberedNoticeIds.forEach(id => {\n if ('string' === typeof(id) && id.length > 0) {\n this.noticeSelectors.push('#' + id);\n }\n });\n }\n\nconsole.log('Notice Selectors', this.noticeSelectors);\n const notices = document.querySelectorAll(this.noticeSelectors.join(','));\nconsole.log('Notices', notices);\n\n // Add buttons to notices that can be moved\n notices.forEach(notice => {\n this.maybeAddIdToNotice(notice)\n\n if (this.keepNotice(notice)) {\n const rememberButton = document.createElement('button');\n rememberButton.classList.add('ta-remember-notice-button');\n rememberButton.innerText = 'Move to panel';\n\n const forgetButton = document.createElement('button');\n forgetButton.classList.add('ta-forget-notice-button');\n forgetButton.innerText = 'Move to dashboard';\n\n notice.classList.add('ta-added-pos-relative');\n\n notice.appendChild(rememberButton);\n notice.appendChild(forgetButton);\n\n rememberButton.addEventListener('click', this.rememberNotice.bind(this), false, true);\n forgetButton.addEventListener('click', this.forgetNotice.bind(this), false, true);\n }\n });\n\n const noticesToHide = Array.from(notices).filter(notice => {\n if (this.rememberedNoticeIds.includes(notice.id)) {\n return true;\n }\n\n if (this.keepNotice(notice)) {\n return false;\n }\n\n // Invisible\n if (\n notice.offsetHeight === 0 ||\n notice.offsetWidth === 0\n ) {\n return false;\n }\n\n return true;\n })\n\n console.log('Notices to hide', noticesToHide)\n\n /**\n * Build the notices wrapper\n */\n /** @type {HTMLDivElement} */\n const noticesLinkWrapper = document.createElement('div');\n noticesLinkWrapper.id = 'ta-notices-link-wrap';\n noticesLinkWrapper.classList.add('hide-if-no-js', 'screen-meta-toggle');\n noticesLinkWrapper.style.margin='0 0 0 6px';\n noticesLinkWrapper.style.float='left';\n if (noticesToHide.length === 0) {\n noticesLinkWrapper.style.display='none';\n }\n\n /**\n * Add button.\n */\n /** @type {HTMLButtonElement} */\n const noticesButton = document.createElement('button');\n noticesButton.type='button';\n noticesButton.id='ta-notices-link';\n noticesButton.classList.add('button', 'show-settings');\n noticesButton.innerHTML='Notices <span id=\"ta-notice-count\">' + noticesToHide.length + '</span>';\n noticesButton.setAttribute('aria-controls', 'ta-notices-wrap');\n\n // This should replicate the functionality from wp-admin/js/common.js\n // as closely as possible. But note that we can't access the common.js\n // functions.\n noticesButton.addEventListener('click', this.toggleNoticesPanel.bind(this), false);\n\n /**\n * Add button to the link wrapper\n */\n noticesLinkWrapper.appendChild(noticesButton);\n\n /**\n * Add the link wrapper to the screen-meta-links section\n */\n const screenMetaLinks = document.getElementById('screen-meta-links');\n screenMetaLinks.appendChild(noticesLinkWrapper);\n\n /**\n * Build the panel\n */\n const noticesPanel = document.createElement('div');\n\n noticesPanel.id='ta-notices-wrap';\n noticesPanel.style.display='none';\n noticesPanel.dataset.open='no';\n\n const noticesPanelInner = document.createElement('div');\n noticesPanelInner.id = 'ta-notices-panel-inner';\n\n noticesToHide.forEach(notice => {\n // Add 'inline' class otherwise WordPress might move them around!\n notice.classList.add('inline');\n // See Toolbelt's implementation: https://github.com/BinaryMoon/wp-toolbelt/blob/dev/modules/tidy-notifications/src/js/script.js\n noticesPanelInner.append(notice);\n });\n\n /**\n * Add wrap to the meta area\n */\n noticesPanel.appendChild(noticesPanelInner);\n const screenMeta = document.getElementById('screen-meta');\n screenMeta.appendChild(noticesPanel);\n\n // Set up events on the new screen-meta item\n // if (window.screenMeta) {\n // window.screenMeta.init();\n // }\n }\n\n // Does the allowedClasses list say that this notice should be shown?\n keepNotice(noticeElem) {\n return this.allowedClasses.reduce( (found, current) => {\n return found || noticeElem.classList.contains(current)\n }, false);\n }\n\n rememberNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panel = document.getElementById('wp-admin-bar-ta-notices');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Remembering ${noticeId}`);\n panelInner.appendChild(notice);\n if (count === 0) {\n noticesLinkWrap.style.display = 'block';\n }\n\n this.updateScreenMetaHeight();\n\n countElem.innerText = parseInt(countElem.innerText, 10) + 1;\n\n this.saveRememberedNotice(noticeId);\n }\n\n saveRememberedNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n forgetNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Forgetting ${noticeId}`);\n\n notice.remove();\n\n const message = document.createElement('div');\n const p = document.createElement('p');\n message.classList.add('notice', 'ta-forget-notice-message');\n p.textContent = 'Notice will be back in dashboard on next page load';\n message.appendChild(p);\n panelInner.appendChild(message);\n\n this.updateScreenMetaHeight();\n\n // I was going to to this, but we need to keep the notice about\n // where the notice has gone.\n // if (count === 1) {\n // noticesLinkWrap.style.display = 'none';\n // }\n\n countElem.innerText = (count - 1).toString();\n this.saveForgottenNotice(noticeId);\n }\n\n saveForgottenNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n this.rememberedNoticeIds = this.rememberedNoticeIds.filter( id => id !== noticeId );\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n\n\n /*\n * For notices without IDs we'll see if we can add an ID that's a hash of their classlist\n */\n maybeAddIdToNotice(notice) {\n if (notice.id && notice.id !== '' && notice.id !=='message') {\n return;\n }\n\n const classes = notice.classList;\n notice.id = Array.from(notice.classList).join('-');\n }\n\n /**\n * Detect if WordPress has already applied event handlers to our new screen meta button.\n *\n * If it has then WordPress/backbone.js will handle the animation and we won't have to.\n *\n * @returns {boolean}\n */\n wordpressScreenMetaEventsExist() {\n return 'object' === typeof(window.screenMeta) && window.screenMeta.toggles.filter('#ta-notices-link').length > 0;\n }\n\n updateScreenMetaHeight() {\n // Don't do this if we're relying on backbone's animation\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n }\n\n toggleNoticesPanel(ev) {\n // We may be in the plugin in which case we don't want to run our handler if there's\n // a backbone handler on the button.\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n // Otherwise we mimic the swipe down animation.\n const animationSeconds = 0.3;\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n if (noticesPanel.dataset.open === 'no') {\n this.toggleOtherScreenMetaTabs();\n // Don't ask... just DON'T ask!\n noticesPanel.dataset.open = 'yes';\n screenMeta.style.transition = `max-height ${animationSeconds.toString(10)}s`;\n screenMeta.style.maxHeight = '0';\n screenMeta.style.overflow = 'hidden';\n screenMeta.style.display = 'block';\n noticesPanel.style.display = 'block';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n // setTimeout(() => {\n // // Nothing to do here.\n // }, animationSeconds * 1000);\n } else {\n noticesPanel.dataset.open = 'no';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = '0';\n setTimeout(() => {\n noticesPanel.style.display = '';\n screenMeta.style.display = '';\n screenMeta.style.transition = '';\n screenMeta.style.overflow = '';\n screenMeta.style.maxHeight = '';\n this.toggleOtherScreenMetaTabs();\n }, animationSeconds * 1000);\n }\n\n }\n\n toggleOtherScreenMetaTabs() {\n const otherTabs = document.querySelectorAll('#screen-meta-links .screen-meta-toggle:not(#ta-notices-link-wrap)');\n otherTabs.forEach( (tab) => {\n if (tab.style.visibility === 'hidden') {\n tab.style.visibility = '';\n } else {\n tab.style.visibility = 'hidden';\n }\n } );\n }\n}\n", "export default class ListTableShortcuts {\n\n constructor() {\n /**\n * @type {ListTableShortcuts}\n */\n const me = this;\n\n /**\n * @type {null|HTMLElement}\n */\n this.currentRow = null;\n\n /**\n * @type {number}\n */\n this.currentRowIndex = 0;\n\n /**\n * @type {HTMLTableElement}\n */\n this.listTable = document.querySelector('.wp-list-table');\n\n if (! this.listTable) {\n return;\n }\n\n /**\n * @type {NodeListOf<HTMLTableRowElement>}\n */\n this.tableRows = this.listTable.querySelectorAll('tbody#the-list > tr');\n\n document.addEventListener('keyup', e => this.handleKeyup(e));\n }\n\n /**\n *\n * @param {KeyboardEvent} ev\n */\n handleKeyup(ev) {\n if (document.activeElement.tagName !== 'BODY') {\n return;\n }\n\n if (ev.key === 'j') {\n this.tableMoveDown();\n } else if (ev.key === 'k') {\n this.tableMoveUp();\n } else if (ev.key.toLowerCase() === 'enter' && this.currentRow !== null) {\n this.openTableRowItem();\n }\n\n }\n\n tableMoveDown() {\n this.preTableChange();\n\n // Move down\n if (this.currentRow === null) {\n this.currentRowIndex = 0;\n } else {\n this.currentRowIndex++;\n }\n this.updateTable();\n }\n\n tableMoveUp() {\n this.preTableChange();\n\n if (this.currentRowIndex > 0) {\n this.currentRowIndex--;\n this.updateTable();\n }\n }\n\n preTableChange() {\n if (this.currentRow !== null) {\n this.tableRows[this.currentRowIndex].classList.remove('ta-active-table-row');\n }\n }\n\n updateTable() {\n this.currentRow = this.tableRows[this.currentRowIndex];\n\n if (! this.tableRows[this.currentRowIndex].classList.contains('ta-active-table-row')) {\n this.tableRows[this.currentRowIndex].classList.add('ta-active-table-row');\n }\n }\n\n openTableRowItem() {\n console.log(this);\n /** @type {HTMLAnchorElement} */\n const link = this.currentRow.querySelector('a.row-title');\n if (link) {\n link.click();\n }\n }\n}\n", "/*\n * This is the common Turbo Admin library.\n *\n * It's (currently) WordPress-specific, but can be loaded by\n * either the Extension OR the Plugin\n *\n * It takes an options object:\n *\n * options: {\n * shortcutKeys: [\n * // Array of shortcut key definitions, like:\n * {\n * {\n * meta: false,\n * alt: true,\n * ctrl: true,\n * shift: true,\n * key: 'p'\n * }\n * }\n * ],\n * appendToElement {\n * // Optional CSS selector to define what to append the palette to\n * 'body'\n * },\n * extraItems: [\n * // Optional array of extra item configs used to generate new item objects\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * ],\n * extraItemsRaw: [\n * // Optional array of raw item objects to be added\n * {\n * 'title': ,\n * 'action': ,\n * 'parentTitle': ,\n * }\n * ]\n * }\n */\nimport TurboAdminPalette from './class-turbo-admin-palette.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item.js';\nimport Acf from './class-acf.js';\nimport TurboAdminWpBlockEditorFullscreenKill from './class-turbo-admin-wp-block-editor-fullscreen-kill.js';\nimport TurboAdminWpBlockEditorWelcomeGuideKill from './class-turbo-admin-wp-block-editor-welcome-guide-kill.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\nimport TurboAdminListTableShortcuts from './class-list-table-shortcuts.js';\n\nexport default class TurboAdmin {\n\n constructor(options) {\n if (document.getElementById('ta-command-palette-container')) {\n console.log('TurboAdmin already initialised - I won\\'t make a second copy!');\n return;\n }\n\n this.options = options;\n }\n\n async init() {\n // Grab the global Wp object instance\n this.wp = globalThis.taWp;\n\n this.menu = [];\n // Check for saved menu when on front-end\n if (! this.wp.isBackend) {\n // Only use the cached items if the current URL matches the last site URL\n // This handles changes of multi-site site!\n // We ONLY need to do this on the front-end as the back-end will always\n // refresh the menu.\n if (! this.wp.siteChanged) {\n // Get from localStorage\n const savedMenu = window.localStorage.getItem('ta-palette-data');\n\n if (null !== savedMenu) {\n // Check for .logged-in class on body\n if (document.body.classList.contains('logged-in')) {\n // If still logged in merge (?) the items\n this.menu = JSON.parse(savedMenu);\n }\n }\n }\n } else {\n // On the back end, get the WordPress dashboard menu items\n this.menu = this.getMenu();\n }\n\n // Add other additional items\n this.addAdditionalMenuItems();\n // Add items passed in using extraItemsRaw\n this.menu = this.menu.concat(this.options.extraItemsRaw ?? []);\n\n // Add ACF items?\n // TODO: Make this better. Possible ASYNC somehow?\n // this.acf = new Acf();\n // if (this.acf.isAcfInstalled()) {\n // const acfLinks = await this.acf.getFieldGroups()\n // // console.table(acfItems);\n // const acfMenuItems = acfLinks.map(\n // item => new TurboAdminMenuItem(\n // item.label + ' (ACF)',\n // item.link,\n // ''\n // )\n // );\n // this.menu = this.menu.concat(acfMenuItems);\n // }\n\n // Sort the menu\n this.menu.sort((a, b) => (a.parentTitle + a.title).localeCompare(b.parentTitle + b.title));\n\n // Filter out no-cache items and save to localStorage.\n const itemsToSave = this.menu.filter(item => (! item.noCache));\n window.localStorage.setItem('ta-palette-data', JSON.stringify(itemsToSave));\n\n // Add palette markup to the DOM\n this.addPalette();\n // Initialise controls on the palette\n this.turboAdminPalette = new TurboAdminPalette(this.menu, this.options);\n\n if (true === this.options['block-editor-fullscreen-disable']) {\n // Initialise fullscreen kill\n this.turboAdminFullscreenKill = new TurboAdminWpBlockEditorFullscreenKill();\n }\n\n if (true === this.options['block-editor-welcome-screen-kill']) {\n this.turboAdminWelcomeKill = new TurboAdminWpBlockEditorWelcomeGuideKill();\n }\n\n if (true === this.options['list-table-keyboard-shortcuts']) {\n this.turboAdminListTableShortcuts = new TurboAdminListTableShortcuts();\n }\n\n // Add other things if we're logged in and have an API nonce\n if (globalThis.contentApi.userLoggedIn()) {\n // What shall we do?\n }\n }\n\n getMenu() {\n const items = [];\n const menuTop = document.getElementById('adminmenu');\n if (menuTop) {\n const topDOMItems = menuTop.querySelectorAll('li.menu-top');\n topDOMItems.forEach(el => {\n const a = el.querySelector('a.menu-top');\n const title = a.querySelector('.wp-menu-name').innerHTML;\n const action = a.href;\n const parentTitle = '';\n const item = new TurboAdminMenuItem(title, action, parentTitle);\n items.push(item);\n\n const subMenu = el.querySelector('.wp-submenu');\n if (!subMenu) {\n return;\n }\n const subItems = subMenu.querySelectorAll('li a');\n if (!subItems) {\n return;\n }\n subItems.forEach(subEl => {\n const parentTitle = title;\n const childTitle = subEl.innerHTML;\n const childAction = subEl.href;\n const item = new TurboAdminMenuItem(childTitle, childAction, parentTitle);\n items.push(item);\n })\n });\n }\n return items;\n }\n\n addAdditionalMenuItems() {\n\n /*\n * I'd LOVE for this to be config driven\n *\n * [\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * {\n * 'detectType': 'dom',\n * 'detectSelector': '#wpadminbar',\n * 'itemTitle': 'Logout',\n * 'itemUrlFunction': () => logoutUrl\n * }\n * Can we add actionTypes as well? To do clicks and navigates?\n * ]\n */\n\n // Get passed-in extraItems\n let extraItems = this.options.extraItems ?? [];\n\n // Merge in defaults\n extraItems = extraItems.concat(\n [\n {\n 'detectType': 'dom',\n 'detectSelector': 'body.wp-admin #wp-admin-bar-view-site a',\n 'itemTitleFunction': () => 'View/visit site',\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-dashboard a',\n 'itemTitleFunction': (element) => element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wpadminbar',\n 'itemTitleFunction': () => 'Logout',\n 'itemUrlFunction': () => document.getElementById('wp-admin-bar-logout')?.querySelector('a')?.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-edit a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-view a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-new-content .ab-submenu a',\n 'itemTitleFunction': (item) => 'New ' + item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-customize a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelectorNone': '#wpadminbar, #loginform',\n 'itemTitleFunction': () => \"Log in\",\n 'itemUrlFunction': () => {\n if (globalThis.taWp.home) {\n return globalThis.taWp.siteUrl;\n }\n // Try getting wp-admin\n return 'javascript:alert(\\'Sorry, could not detect login URL.\\')';\n }\n },\n // This is on the login screen\n {\n 'detectType': 'dom',\n 'detectSelector': '#backtoblog a',\n 'itemTitleFunction': () => \"View/visit site\",\n 'itemUrlFunction': (element) => element.href\n },\n // Multisite items\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin > a',\n 'itemTitleFunction': () => \"Network Admin\",\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin .ab-submenu a',\n 'itemTitleFunction': (element) => 'Network Admin: ' + element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-my-sites-list .ab-submenu a',\n 'itemTitleFunction': (element) => \"Sites: \" + element.closest('.menupop').querySelector('a').innerText + ' - ' + element.innerText,\n 'itemUrlFunction': (element) => element.href\n },\n // Oxygen builder items\n {\n 'detectType': 'dom',\n 'detectSelector': '#ct-edit-template-builder',\n 'itemTitleFunction': () => 'Edit with Oxygen',\n 'itemUrlFunction': (element) => element.href,\n 'noCache': true\n },\n // It's worth noting that the Oxygen Builder doesn't use a /wp-admin URL\n // and so kinda appears to Turbo Admin to be a \"front-end\" page and it\n // doesn't refresh the menu items.\n {\n 'detectType': 'dom',\n 'detectSelector': '.oxygen-back-to-wp-menu .oxygen-toolbar-button-dropdown a:not(:last-of-type)',\n 'itemTitleFunction': (element) => 'Back to WP: ' + element.textContent,\n 'itemUrlFunction': (element) => {\n if (element.href) {\n return element.href;\n } else {\n let url = new URL(window.location.href);\n return url.origin + url.pathname;\n }\n },\n 'noCache': true\n }\n ]\n );\n\n extraItems.forEach(item => {\n let detected = false;\n let elements = null;\n if (item.detectType === 'url') {\n detected = Boolean(window.location.href.includes(item.detectPattern));\n } else if (item.detectType === 'dom') {\n if (item.detectSelector) {\n elements = document.querySelectorAll(item.detectSelector);\n detected = Boolean(elements);\n } else if (item.detectSelectorNone) {\n elements = document.querySelectorAll(item.detectSelectorNone);\n detected = elements.length === 0;\n // Need to pass SOMETHING to the loop below\n elements = document.querySelectorAll('body');\n }\n }\n if (!detected) {\n return;\n }\n\n elements.forEach(element => {\n const newItem = new TurboAdminMenuItem(item.itemTitleFunction(element), item.itemUrlFunction(element), '', item?.noCache);\n // Might already have one so check.\n if (this.menu.some(menuItem => {\n // This must be newItem.sameAs, not menuItem.sameAs because the menuItem\n // may have been loaded from saved menu and may not actually be an instance\n // of a TurboAdminMenuItem.\n return newItem.sameAs(menuItem)\n } )) {\n return;\n }\n // We don't already have one. So add it.\n this.menu.push(newItem);\n });\n })\n }\n\n addPalette() {\n // Container\n const container = document.createElement('div');\n container.id = 'ta-command-palette-container';\n // Palette\n const palette = document.createElement('div');\n palette.id = 'ta-command-palette';\n // Input field\n const input = document.createElement('input');\n input.id = \"ta-command-palette-input\";\n input.name = \"ta-command-palette-input\";\n input.type = \"text\";\n // Set this to stop stuff trying to fill it.\n input.setAttribute('autocomplete', 'off');\n // List\n const list = document.createElement('ul');\n list.id = \"ta-command-palette-items\";\n // Join it all up\n container.appendChild(palette);\n palette.appendChild(input);\n palette.appendChild(list);\n\n document.querySelector(this.options.appendToElement ?? 'body').appendChild(container);\n }\n\n}\n", "export default class Wp {\n\n constructor() {\n\n // Set home and siteUrl\n this.siteUrl = '';\n this.home = '';\n this.loginUrl = '';\n this.apiLinkUrl = '';\n }\n\n async completeInit() {\n // Fetch previously loaded site URL\n this.previousUrl = window.localStorage.getItem('ta-palette-data-site');\n\n // Fetch previously-stored siteUrl and home\n this.siteUrl = window.localStorage.getItem('ta-palette-data-siteurl');\n this.home = window.localStorage.getItem('ta-palette-data-home');\n\n /**\n * Are we in the back-end?\n */\n this.isBackend = this.getIsBackend();\n\n /**\n * Figure out all the WP URLs\n */\n await this.getUrls();\n\n /**\n * Tells you if the best-guess site URL of the current page is different\n * to that of the previously saved site URL.\n */\n this.siteChanged = this.home !== this.previousUrl;\n\n // Save current site URL for next time\n window.localStorage.setItem('ta-palette-data-site', this.home);\n }\n\n getIsBackend() {\n return document.body.classList.contains('wp-admin');\n }\n\n /**\n * Return the URL with a trailing slash if it didn't already have one.\n *\n * @param {String} url The URL to check\n * @return {String} The resulting URL\n */\n ensureTrailingSlash( url ) {\n if (url.endsWith('/')) {\n return url;\n } else {\n return url + '/';\n }\n }\n\n /**\n * Tests if a URL works and, if redirected, that the final URL contains a given\n * string. Returns the final, redirected-to URL if the test passed, or false\n * otherwise.\n *\n * @param {String} url The URL to test.\n * @param {String} responseUrlMustContain The string to test against the final URL\n * @returns {Promise<String|Boolean>} The final URL or false.\n */\n async testUrl(url, responseUrlMustContain='') {\n\n /** @type {RequestInit} */\n const init = {\n method: 'HEAD',\n mode: 'cors',\n cache: 'no-cache',\n credentials: 'same-origin'\n }\n\n const response = await fetch(url, init);\n\n if (response.redirected && !response.url.includes(responseUrlMustContain)) {\n return false;\n }\n\n if ( ! response.ok ) {\n return false;\n }\n\n return response.url;\n }\n\n async findWhichUrlWorks(urls, responseUrlMustContain='') {\n let workingUrl = false;\n let result;\n // This has to be a for loop rather than reduce or forEach as separate\n // async callbacks would be launched asynchronously.\n for (let i=0; i<urls.length; i++) {\n if (workingUrl) continue;\n result = await this.testUrl(urls[i], responseUrlMustContain);\n if (result !== false) {\n workingUrl = result;\n }\n }\n return workingUrl;\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessSiteUrlFromHome( homeUrl ) {\n const homeWithSlash = this.ensureTrailingSlash(homeUrl);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // homeWithSlash + 'wp-admin/',\n // homeWithSlash + 'wp/wp-admin'\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return homeWithSlash + 'wp-admin/';\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessHome() {\n const currentUrl = new URL(window.location);\n const origin = this.ensureTrailingSlash(currentUrl.origin);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // origin\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return origin;\n }\n\n /**\n *\n * @param {String} siteUrl\n * @returns {String}\n */\n guessHomeFromSiteUrl(siteUrl) {\n // Not much we can do here.\n return siteUrl.replace(/wp-admin\\/?/, '');\n }\n\n async getUrls() {\n // See if we can actually find the URL for the API\n /** @type {HTMLLinkElement|null} */\n const apiLink = document.querySelector('link[rel=\"https://api.w.org/\"]');\n\n if (apiLink) {\n this.apiLinkUrl = apiLink.href;\n }\n // Figure out the siteurl and home - this is different on the front and back end\n if (this.isBackend) {\n // This is easy in the back end/Dashboard!\n this.siteUrl = window.location.href.match(/(^.*wp-admin)/)[1];\n this.home = document.getElementById('wp-admin-bar-site-name').querySelector('a').href;\n\n // Always set the siteUrl and home as this is definitive\n window.localStorage.setItem('ta-palette-data-siteurl', this.siteUrl);\n window.localStorage.setItem('ta-palette-data-home', this.home);\n } else if (! this.siteUrl || ! this.home) {\n\n // If we're not in the backend then (in the extension at least) we\n // could be on the front-end and not logged in, so check for an\n // admin bar and grab from that if there is one.\n if (document.getElementById('wpadminbar')) {\n this.siteUrl = document.getElementById('wp-admin-bar-dashboard').querySelector('a').href;\n // Try for the API link\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n } else {\n // We know what the siteUrl is, so guess the home from the siteUrl\n this.home = this.guessHomeFromSiteUrl(this.siteUrl);\n }\n\n } else {\n // Try for the API link\n // TODO: This needs to be async so it doesn't hold things up.\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n // We (probably) know what the home link is now, so guess the wp-admin\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome( this.home );\n } else {\n this.siteUrl = this.guessSiteUrl();\n }\n } else {\n // We got nothing.\n this.home = await this.guessHome();\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome(this.home);\n }\n }\n }\n }\n\n // Always trim the / for comparisons\n if (this.siteUrl) {\n this.siteUrl = this.siteUrl.replace(/(.+)\\/$/, '$1');\n }\n if (this.home) {\n this.home = this.home.replace(/(.+)\\/$/, '$1');\n }\n\n // console.log('siteUrl: ', this.siteUrl);\n // console.log('home: ', this.home);\n }\n\n}\n", "import TurboAdmin from './class-turbo-admin.js';\nimport ContentApi from './class-content-api.js';\nimport Wp from './class-wp.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\n\nconst taStorageKey = 'turbo-admin-settings';\n\n// Note that in the extension, the globalThis is not the browser's global scope,\n// it is sandboxed. So we can't check across the plugin/extension boundary here.\nasync function taInit(settings) {\n\n globalThis.turboAdmin = null;\n\n // Handle empty settings\n if (typeof(settings[taStorageKey]) === 'undefined') {\n console.log('Weird. Turbo Admin could not find any settings');\n return;\n }\n// document.addEventListener('DOMContentLoaded', e => {\n// \tturboAdmin = new TurboAdmin(globalThis.turboAdminOptions);\n// });\n\n globalThis.turboAdminOptions = settings[taStorageKey];\n\n // Get Wp stuff ready\n globalThis.taWp = new Wp();\n\n // Parts of this init are async.\n await globalThis.taWp.completeInit();\n\n console.log('Turbo Admin: WP is initialised');\n\n // Get/set api settings\n globalThis.contentApi = new ContentApi();\n await globalThis.contentApi.discoverApiRoot();\n\n console.log('Turbo Admin: Content API is initialised');\n\n globalThis.turboAdmin = new TurboAdmin(globalThis.turboAdminOptions);\n\n await globalThis.turboAdmin.init();\n\n if (settings[taStorageKey]['hide-notices']) {\n globalThis.turboAdminWpNotices = new TurboAdminWpNotices(settings[taStorageKey].rememberedNoticeIds);\n }\n}\n\n/**\n * This is plugin-specific. It should not be present in the extension code.\n */\ndocument.addEventListener('DOMContentLoaded', async e => {\n\tglobalThis.turboAdminOptions = {};\n\tglobalThis.turboAdminOptions[taStorageKey] = {\n\t\t// wpTurboAdmin is set using wp_localize_script\n\t\tshortcutKeys: globalThis.wpTurboAdmin.keys,\n // These don't apply to the plugin version\n 'block-editor-fullscreen-disable': false,\n 'block-editor-welcome-screen-kill': false,\n // I don't think we'll do this in the plugin as the code would be SO different.\n 'live-dev-notice': false,\n 'list-table-keyboard-shortcuts': globalThis.wpTurboAdmin['listTableShortcuts'] === '1',\n 'hide-notices': globalThis.wpTurboAdmin['hideNotices'] === '1',\n 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array()\n\t}\n\tawait taInit(globalThis.turboAdminOptions);\n});\n"],5 "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,QAAI;AAAJ,QAAO;AAAG,QAAI,SAAM,IAAI,WAAY;AAAE;AAAc,kBAAW,IAAG;AAAE,eAAQ,MAAI,AAAc,OAAO,UAArB,cAA+B,AAAY,OAAO,OAAO,YAA1B,WAAqC,SAAU,IAAG;AAAE,iBAAO,OAAO;AAAA,YAAM,SAAU,IAAG;AAAE,iBAAO,MAAK,AAAc,OAAO,UAArB,cAA+B,GAAE,gBAAgB,UAAU,OAAM,OAAO,YAAY,WAAW,OAAO;AAAA,WAAK;AAAA;AAAK,kBAAW,IAAG,IAAG;AAAE,YAAI,CAAE,eAAa;AAAI,gBAAM,IAAI,UAAU;AAAA;AAAuC,iBAAW,IAAG,IAA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AM,KAAK,qBAAqB,KAAK;AAAA;AAAA;AAAA;AAAA;AAOpE,UAAI,KAAK,SAAS;AACd,aAAK,UAAU,KAAK,QAAQ,QAAQ,WAAW;AAAA;AAEnD,UAAI,KAAK,MAAM;AACX,aAAK,OAAO,KAAK,KAAK,QAAQ,WAAW;AAAA;AAAA;AAAA;AA1NrD,MAAO,mBAAP;;;ACKA,MAAM,eAAe;AAIrB,wBAAsB,UAAU;AAE5B,eAAW,aAAa;AAGxB,QAAI,OAAO,SAAS,kBAAmB,aAAa;AAChD,cAAQ,IAAI;AACZ;AAAA;AAMJ,eAAW,oBAAoB,SAAS;AAGxC,eAAW,OAAO,IAAI;AAGtB,UAAM,WAAW,KAAK;AAEtB,YAAQ,IAAI;AAGZ,eAAW,aAAa,IAAI;AAC5B,UAAM,WAAW,WAAW;AAE5B,YAAQ,IAAI;AAEZ,eAAW,aAAa,IAAI,0BAAW,WAAW;AAElD,UAAM,WAAW,WAAW;AAE5B,QAAI,SAAS,cAAc,iBAAiB;AACxC,iBAAW,sBAAsB,IAAI,qCAAoB,SAAS,cAAc;AAAA;AAAA;AAOxF,WAAS,iBAAiB,oBAAoB,OAAM,MAAK;AACxD,eAAW,oBAAoB;AAC/B,eAAW,kBAAkB,gBAAgB;AAAA,MAE5C,cAAc,WAAW,aAAa;AAAA,MAEhC,mCAAmC;AAAA,MACnC,oCAAoC;AAAA,MAEpC,mBAAmB;AAAA,MACnB,iCAAiC,WAAW,aAAa,0BAA0B;AAAA,MACnF,gBAAgB,WAAW,aAAa,mBAAmB;AAAA,MAC3D,qBAAuB,KAAK,MAAM,OAAO,aAAa,QAAQ,2BAA2B,IAAI;AAAA;AAEpG,UAAM,OAAO,WAAW;AAAA;",3 "sources": ["../src/fuse-6.4.6.js", "../src/class-turbo-admin-palette.js", "../src/class-turbo-admin-menu-item.js", "../src/class-storage.js", "../src/class-content-api.js", "../src/class-turbo-admin-wp-block-editor-fullscreen-kill.js", "../src/class-turbo-admin-wp-block-editor-welcome-guide-kill.js", "../src/class-turbo-admin-wp-notices.js", "../src/class-list-table-shortcuts.js", "../src/class-turbo-admin-barkeeper.js", "../src/class-turbo-admin.js", "../src/class-wp.js", "../src/main.js"], 4 "sourcesContent": ["/**\n * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2021 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\nvar e, t; e = this, t = function () { \"use strict\"; function e(t) { return (e = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e })(t) } function t(e, t) { if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\") } function n(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } function r(e, t, r) { return t && n(e.prototype, t), r && n(e, r), e } function i(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function o(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function c(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? o(Object(n), !0).forEach((function (t) { i(e, t, n[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach((function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) })) } return e } function a(e, t) { if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && u(e, t) } function s(e) { return (s = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) { return e.__proto__ || Object.getPrototypeOf(e) })(e) } function u(e, t) { return (u = Object.setPrototypeOf || function (e, t) { return e.__proto__ = t, e })(e, t) } function h(e, t) { return !t || \"object\" != typeof t && \"function\" != typeof t ? function (e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e }(e) : t } function f(e) { var t = function () { if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if (\"function\" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], (function () { }))), !0 } catch (e) { return !1 } }(); return function () { var n, r = s(e); if (t) { var i = s(this).constructor; n = Reflect.construct(r, arguments, i) } else n = r.apply(this, arguments); return h(this, n) } } function l(e) { return function (e) { if (Array.isArray(e)) return d(e) }(e) || function (e) { if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) }(e) || function (e, t) { if (e) { if (\"string\" == typeof e) return d(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return \"Object\" === n && e.constructor && (n = e.constructor.name), \"Map\" === n || \"Set\" === n ? Array.from(e) : \"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? d(e, t) : void 0 } }(e) || function () { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\") }() } function d(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++)r[n] = e[n]; return r } function v(e) { return Array.isArray ? Array.isArray(e) : \"[object Array]\" === b(e) } function g(e) { return \"string\" == typeof e } function y(e) { return \"number\" == typeof e } function p(e) { return !0 === e || !1 === e || function (e) { return m(e) && null !== e }(e) && \"[object Boolean]\" == b(e) } function m(t) { return \"object\" === e(t) } function k(e) { return null != e } function M(e) { return !e.trim().length } function b(e) { return null == e ? void 0 === e ? \"[object Undefined]\" : \"[object Null]\" : Object.prototype.toString.call(e) } var x = function (e) { return \"Invalid value for key \".concat(e) }, L = function (e) { return \"Pattern length exceeds max of \".concat(e, \".\") }, S = Object.prototype.hasOwnProperty, w = function () { function e(n) { var r = this; t(this, e), this._keys = [], this._keyMap = {}; var i = 0; n.forEach((function (e) { var t = _(e); i += t.weight, r._keys.push(t), r._keyMap[t.id] = t, i += t.weight })), this._keys.forEach((function (e) { e.weight /= i })) } return r(e, [{ key: \"get\", value: function (e) { return this._keyMap[e] } }, { key: \"keys\", value: function () { return this._keys } }, { key: \"toJSON\", value: function () { return JSON.stringify(this._keys) } }]), e }(); function _(e) { var t = null, n = null, r = null, i = 1; if (g(e) || v(e)) r = e, t = O(e), n = j(e); else { if (!S.call(e, \"name\")) throw new Error(function (e) { return \"Missing \".concat(e, \" property in key\") }(\"name\")); var o = e.name; if (r = o, S.call(e, \"weight\") && (i = e.weight) <= 0) throw new Error(function (e) { return \"Property 'weight' in key '\".concat(e, \"' must be a positive integer\") }(o)); t = O(o), n = j(o) } return { path: t, id: n, weight: i, src: r } } function O(e) { return v(e) ? e : e.split(\".\") } function j(e) { return v(e) ? e.join(\".\") : e } var A = c({}, { isCaseSensitive: !1, includeScore: !1, keys: [], shouldSort: !0, sortFn: function (e, t) { return e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1 } }, {}, { includeMatches: !1, findAllMatches: !1, minMatchCharLength: 1 }, {}, { location: 0, threshold: .6, distance: 100 }, {}, { useExtendedSearch: !1, getFn: function (e, t) { var n = [], r = !1; return function e(t, i, o) { if (k(t)) if (i[o]) { var c = t[i[o]]; if (!k(c)) return; if (o === i.length - 1 && (g(c) || y(c) || p(c))) n.push(function (e) { return null == e ? \"\" : function (e) { if (\"string\" == typeof e) return e; var t = e + \"\"; return \"0\" == t && 1 / e == -1 / 0 ? \"-0\" : t }(e) }(c)); else if (v(c)) { r = !0; for (var a = 0, s = c.length; a < s; a += 1)e(c[a], i, o + 1) } else i.length && e(c, i, o + 1) } else n.push(t) }(e, g(t) ? t.split(\".\") : t, 0), r ? n : n[0] }, ignoreLocation: !1, ignoreFieldNorm: !1 }), I = /[^ ]+/g; function C() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 3, t = new Map, n = Math.pow(10, e); return { get: function (e) { var r = e.match(I).length; if (t.has(r)) return t.get(r); var i = 1 / Math.sqrt(r), o = parseFloat(Math.round(i * n) / n); return t.set(r, o), o }, clear: function () { t.clear() } } } var E = function () { function e() { var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r; t(this, e), this.norm = C(3), this.getFn = i, this.isCreated = !1, this.setIndexRecords() } return r(e, [{ 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 e = this, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; this.keys = t, this._keysMap = {}, t.forEach((function (t, n) { e._keysMap[t.id] = n })) } }, { key: \"create\", value: function () { var e = this; !this.isCreated && this.docs.length && (this.isCreated = !0, g(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(); g(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(); t < n; t += 1)this.records[t].i -= 1 } }, { key: \"getValueForItemAtKeyId\", value: function (e, t) { return e[this._keysMap[t]] } }, { key: \"size\", value: function () { return this.records.length } }, { key: \"_addString\", value: function (e, t) { if (k(e) && !M(e)) { var n = { v: e, i: t, n: this.norm.get(e) }; this.records.push(n) } } }, { key: \"_addObject\", value: function (e, t) { var n = this, r = { i: t, $: {} }; this.keys.forEach((function (t, i) { var o = n.getFn(e, t.path); if (k(o)) if (v(o)) !function () { for (var e = [], t = [{ nestedArrIndex: -1, value: o }]; t.length;) { var c = t.pop(), a = c.nestedArrIndex, s = c.value; if (k(s)) if (g(s) && !M(s)) { var u = { v: s, i: a, n: n.norm.get(s) }; e.push(u) } else v(s) && s.forEach((function (e, n) { t.push({ nestedArrIndex: n, value: e }) })) } r.$[i] = e }(); else if (!M(o)) { var c = { v: o, n: n.norm.get(o) }; r.$[i] = c } })), this.records.push(r) } }, { key: \"toJSON\", value: function () { return { keys: this.keys, records: this.records } } }]), e }(); function $(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.getFn, i = void 0 === r ? A.getFn : r, o = new E({ getFn: i }); return o.setKeys(e.map(_)), o.setSources(t), o.create(), o } function R(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.errors, r = void 0 === n ? 0 : n, i = t.currentLocation, o = void 0 === i ? 0 : i, c = t.expectedLocation, a = void 0 === c ? 0 : c, s = t.distance, u = void 0 === s ? A.distance : s, h = t.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r / e.length; if (f) return l; var d = Math.abs(a - o); return u ? l + d / u : d ? 1 : l } function F() { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : A.minMatchCharLength, n = [], r = -1, i = -1, o = 0, c = e.length; o < c; o += 1) { var a = e[o]; a && -1 === r ? r = o : a || -1 === r || ((i = o - 1) - r + 1 >= t && n.push([r, i]), r = -1) } return e[o - 1] && o - r >= t && n.push([r, o - 1]), n } function P(e) { for (var t = {}, n = 0, r = e.length; n < r; n += 1) { var i = e.charAt(n); t[i] = (t[i] || 0) | 1 << r - n - 1 } return t } var N = function () { function e(n) { var r = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, o = i.location, c = void 0 === o ? A.location : o, a = i.threshold, s = void 0 === a ? A.threshold : a, u = i.distance, h = void 0 === u ? A.distance : u, f = i.includeMatches, l = void 0 === f ? A.includeMatches : f, d = i.findAllMatches, v = void 0 === d ? A.findAllMatches : d, g = i.minMatchCharLength, y = void 0 === g ? A.minMatchCharLength : g, p = i.isCaseSensitive, m = void 0 === p ? A.isCaseSensitive : p, k = i.ignoreLocation, M = void 0 === k ? A.ignoreLocation : k; if (t(this, e), this.options = { location: c, threshold: s, distance: h, includeMatches: l, findAllMatches: v, minMatchCharLength: y, isCaseSensitive: m, ignoreLocation: M }, this.pattern = m ? n : n.toLowerCase(), this.chunks = [], this.pattern.length) { var b = function (e, t) { r.chunks.push({ pattern: e, alphabet: P(e), startIndex: t }) }, x = this.pattern.length; if (x > 32) { for (var L = 0, S = x % 32, w = x - S; L < w;)b(this.pattern.substr(L, 32), L), L += 32; if (S) { var _ = x - 32; b(this.pattern.substr(_), _) } } else b(this.pattern, 0) } } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.options, n = t.isCaseSensitive, r = t.includeMatches; if (n || (e = e.toLowerCase()), this.pattern === e) { var i = { isMatch: !0, score: 0 }; return r && (i.indices = [[0, e.length - 1]]), i } var o = this.options, c = o.location, a = o.distance, s = o.threshold, u = o.findAllMatches, h = o.minMatchCharLength, f = o.ignoreLocation, d = [], v = 0, g = !1; this.chunks.forEach((function (t) { var n = t.pattern, i = t.alphabet, o = t.startIndex, y = function (e, t, n) { var r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, i = r.location, o = void 0 === i ? A.location : i, c = r.distance, a = void 0 === c ? A.distance : c, s = r.threshold, u = void 0 === s ? A.threshold : s, h = r.findAllMatches, f = void 0 === h ? A.findAllMatches : h, l = r.minMatchCharLength, d = void 0 === l ? A.minMatchCharLength : l, v = r.includeMatches, g = void 0 === v ? A.includeMatches : v, y = r.ignoreLocation, p = void 0 === y ? A.ignoreLocation : y; if (t.length > 32) throw new Error(L(32)); for (var m, k = t.length, M = e.length, b = Math.max(0, Math.min(o, M)), x = u, S = b, w = d > 1 || g, _ = w ? Array(M) : []; (m = e.indexOf(t, S)) > -1;) { var O = R(t, { currentLocation: m, expectedLocation: b, distance: a, ignoreLocation: p }); if (x = Math.min(O, x), S = m + k, w) for (var j = 0; j < k;)_[m + j] = 1, j += 1 } S = -1; for (var I = [], C = 1, E = k + M, $ = 1 << k - 1, P = 0; P < k; P += 1) { for (var N = 0, D = E; N < D;) { var z = R(t, { errors: P, currentLocation: b + D, expectedLocation: b, distance: a, ignoreLocation: p }); z <= x ? N = D : E = D, D = Math.floor((E - N) / 2 + N) } E = D; var K = Math.max(1, b - D + 1), q = f ? M : Math.min(b + D, M) + k, W = Array(q + 2); W[q + 1] = (1 << P) - 1; for (var J = q; J >= K; J -= 1) { var T = J - 1, U = n[e.charAt(T)]; if (w && (_[T] = +!!U), W[J] = (W[J + 1] << 1 | 1) & U, P && (W[J] |= (I[J + 1] | I[J]) << 1 | 1 | I[J + 1]), W[J] & $ && (C = R(t, { errors: P, currentLocation: T, expectedLocation: b, distance: a, ignoreLocation: p })) <= x) { if (x = C, (S = T) <= b) break; K = Math.max(1, 2 * b - S) } } var V = R(t, { errors: P + 1, currentLocation: b, expectedLocation: b, distance: a, ignoreLocation: p }); if (V > x) break; I = W } var B = { isMatch: S >= 0, score: Math.max(.001, C) }; if (w) { var G = F(_, d); G.length ? g && (B.indices = G) : B.isMatch = !1 } return B }(e, n, i, { location: c + o, distance: a, threshold: s, findAllMatches: u, minMatchCharLength: h, includeMatches: r, ignoreLocation: f }), p = y.isMatch, m = y.score, k = y.indices; p && (g = !0), v += m, p && k && (d = [].concat(l(d), l(k))) })); var y = { isMatch: g, score: g ? v / this.chunks.length : 1 }; return g && r && (y.indices = d), y } }]), e }(), D = function () { function e(n) { t(this, e), this.pattern = n } return r(e, [{ key: \"search\", value: function () { } }], [{ key: \"isMultiMatch\", value: function (e) { return z(e, this.multiRegex) } }, { key: \"isSingleMatch\", value: function (e) { return z(e, this.singleRegex) } }]), e }(); function z(e, t) { var n = e.match(t); return n ? n[1] : null } var K = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^=(.*)$/ } }]), i }(D), q = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)$/ } }]), i }(D), W = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^\\^(.*)$/ } }]), i }(D), J = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!\\^(.*)$/ } }]), i }(D), T = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^(.*)\\$$/ } }]), i }(D), U = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ 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 /^!(.*)\\$$/ } }]), i }(D), V = function (e) { a(i, e); var n = f(i); function i(e) { var r, o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, c = o.location, a = void 0 === c ? A.location : c, s = o.threshold, u = void 0 === s ? A.threshold : s, h = o.distance, f = void 0 === h ? A.distance : h, l = o.includeMatches, d = void 0 === l ? A.includeMatches : l, v = o.findAllMatches, g = void 0 === v ? A.findAllMatches : v, y = o.minMatchCharLength, p = void 0 === y ? A.minMatchCharLength : y, m = o.isCaseSensitive, k = void 0 === m ? A.isCaseSensitive : m, M = o.ignoreLocation, b = void 0 === M ? A.ignoreLocation : M; return t(this, i), (r = n.call(this, e))._bitapSearch = new N(e, { location: a, threshold: u, distance: f, includeMatches: d, findAllMatches: g, minMatchCharLength: p, isCaseSensitive: k, ignoreLocation: b }), r } return r(i, [{ 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 /^(.*)$/ } }]), i }(D), B = function (e) { a(i, e); var n = f(i); function i(e) { return t(this, i), n.call(this, e) } return r(i, [{ key: \"search\", value: function (e) { for (var t, n = 0, r = [], i = this.pattern.length; (t = e.indexOf(this.pattern, n)) > -1;)n = t + i, r.push([t, n - 1]); var o = !!r.length; return { isMatch: o, score: o ? 0 : 1, indices: r } } }], [{ key: \"type\", get: function () { return \"include\" } }, { key: \"multiRegex\", get: function () { return /^'\"(.*)\"$/ } }, { key: \"singleRegex\", get: function () { return /^'(.*)$/ } }]), i }(D), G = [K, B, W, J, U, T, q, V], H = G.length, Q = / +(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/; function X(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return e.split(\"|\").map((function (e) { for (var n = e.trim().split(Q).filter((function (e) { return e && !!e.trim() })), r = [], i = 0, o = n.length; i < o; i += 1) { for (var c = n[i], a = !1, s = -1; !a && ++s < H;) { var u = G[s], h = u.isMultiMatch(c); h && (r.push(new u(h, t)), a = !0) } if (!a) for (s = -1; ++s < H;) { var f = G[s], l = f.isSingleMatch(c); if (l) { r.push(new f(l, t)); break } } } return r })) } var Y = new Set([V.type, B.type]), Z = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = r.isCaseSensitive, o = void 0 === i ? A.isCaseSensitive : i, c = r.includeMatches, a = void 0 === c ? A.includeMatches : c, s = r.minMatchCharLength, u = void 0 === s ? A.minMatchCharLength : s, h = r.ignoreLocation, f = void 0 === h ? A.ignoreLocation : h, l = r.findAllMatches, d = void 0 === l ? A.findAllMatches : l, v = r.location, g = void 0 === v ? A.location : v, y = r.threshold, p = void 0 === y ? A.threshold : y, m = r.distance, k = void 0 === m ? A.distance : m; t(this, e), this.query = null, this.options = { isCaseSensitive: o, includeMatches: a, minMatchCharLength: u, findAllMatches: d, ignoreLocation: f, location: g, threshold: p, distance: k }, this.pattern = o ? n : n.toLowerCase(), this.query = X(this.pattern, this.options) } return r(e, [{ key: \"searchIn\", value: function (e) { var t = this.query; if (!t) return { isMatch: !1, score: 1 }; var n = this.options, r = n.includeMatches; e = n.isCaseSensitive ? e : e.toLowerCase(); for (var i = 0, o = [], c = 0, a = 0, s = t.length; a < s; a += 1) { var u = t[a]; o.length = 0, i = 0; for (var h = 0, f = u.length; h < f; h += 1) { var d = u[h], v = d.search(e), g = v.isMatch, y = v.indices, p = v.score; if (!g) { c = 0, i = 0, o.length = 0; break } if (i += 1, c += p, r) { var m = d.constructor.type; Y.has(m) ? o = [].concat(l(o), l(y)) : o.push(y) } } if (i) { var k = { isMatch: !0, score: c / i }; return r && (k.indices = o), k } } return { isMatch: !1, score: 1 } } }], [{ key: \"condition\", value: function (e, t) { return t.useExtendedSearch } }]), e }(), ee = []; function te(e, t) { for (var n = 0, r = ee.length; n < r; n += 1) { var i = ee[n]; if (i.condition(e, t)) return new i(e, t) } return new N(e, t) } var ne = \"$and\", re = \"$or\", ie = \"$path\", oe = \"$val\", ce = function (e) { return !(!e[ne] && !e[re]) }, ae = function (e) { return !!e[ie] }, se = function (e) { return !v(e) && m(e) && !ce(e) }, ue = function (e) { return i({}, ne, Object.keys(e).map((function (t) { return i({}, t, e[t]) }))) }; function he(e, t) { var n = t.ignoreFieldNorm, r = void 0 === n ? A.ignoreFieldNorm : n; e.forEach((function (e) { var t = 1; e.matches.forEach((function (e) { var n = e.key, i = e.norm, o = e.score, c = n ? n.weight : null; t *= Math.pow(0 === o && c ? Number.EPSILON : o, (c || 1) * (r ? 1 : i)) })), e.score = t })) } function fe(e, t) { var n = e.matches; t.matches = [], k(n) && n.forEach((function (e) { if (k(e.indices) && e.indices.length) { var n = { indices: e.indices, value: e.value }; e.key && (n.key = e.key.src), e.idx > -1 && (n.refIndex = e.idx), t.matches.push(n) } })) } function le(e, t) { t.score = e.score } function de(e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.includeMatches, i = void 0 === r ? A.includeMatches : r, o = n.includeScore, c = void 0 === o ? A.includeScore : o, a = []; return i && a.push(fe), c && a.push(le), e.map((function (e) { var n = e.idx, r = { item: t[n], refIndex: n }; return a.length && a.forEach((function (t) { t(e, r) })), r })) } var ve = function () { function e(n) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = arguments.length > 2 ? arguments[2] : void 0; t(this, e), this.options = c({}, A, {}, r), this.options.useExtendedSearch, this._keyStore = new w(this.options.keys), this.setCollection(n, i) } return r(e, [{ key: \"setCollection\", value: function (e, t) { if (this._docs = e, t && !(t instanceof E)) throw new Error(\"Incorrect 'index' type\"); this._myIndex = t || $(this.options.keys, this._docs, { getFn: this.options.getFn }) } }, { key: \"add\", value: function (e) { k(e) && (this._docs.push(e), this._myIndex.add(e)) } }, { key: \"remove\", value: function () { for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () { return !1 }, t = [], n = 0, r = this._docs.length; n < r; n += 1) { var i = this._docs[n]; e(i, n) && (this.removeAt(n), n -= 1, r -= 1, t.push(i)) } return t } }, { key: \"removeAt\", value: function (e) { this._docs.splice(e, 1), this._myIndex.removeAt(e) } }, { key: \"getIndex\", value: function () { return this._myIndex } }, { key: \"search\", value: function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.limit, r = void 0 === n ? -1 : n, i = this.options, o = i.includeMatches, c = i.includeScore, a = i.shouldSort, s = i.sortFn, u = i.ignoreFieldNorm, h = g(e) ? g(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e); return he(h, { ignoreFieldNorm: u }), a && h.sort(s), y(r) && r > -1 && (h = h.slice(0, r)), de(h, this._docs, { includeMatches: o, includeScore: c }) } }, { key: \"_searchStringList\", value: function (e) { var t = te(e, this.options), n = this._myIndex.records, r = []; return n.forEach((function (e) { var n = e.v, i = e.i, o = e.n; if (k(n)) { var c = t.searchIn(n), a = c.isMatch, s = c.score, u = c.indices; a && r.push({ item: n, idx: i, matches: [{ score: s, value: n, norm: o, indices: u }] }) } })), r } }, { key: \"_searchLogical\", value: function (e) { var t = this, n = function (e, t) { var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, r = n.auto, i = void 0 === r || r, o = function e(n) { var r = Object.keys(n), o = ae(n); if (!o && r.length > 1 && !ce(n)) return e(ue(n)); if (se(n)) { var c = o ? n[ie] : r[0], a = o ? n[oe] : n[c]; if (!g(a)) throw new Error(x(c)); var s = { keyId: j(c), pattern: a }; return i && (s.searcher = te(a, t)), s } var u = { children: [], operator: r[0] }; return r.forEach((function (t) { var r = n[t]; v(r) && r.forEach((function (t) { u.children.push(e(t)) })) })), u }; return ce(e) || (e = ue(e)), o(e) }(e, this.options), r = this._myIndex.records, i = {}, o = []; return r.forEach((function (e) { var r = e.$, c = e.i; if (k(r)) { var a = function e(n, r, i) { if (!n.children) { var o = n.keyId, c = n.searcher, a = t._findMatches({ key: t._keyStore.get(o), value: t._myIndex.getValueForItemAtKeyId(r, o), searcher: c }); return a && a.length ? [{ idx: i, item: r, matches: a }] : [] } switch (n.operator) { case ne: for (var s = [], u = 0, h = n.children.length; u < h; u += 1) { var f = e(n.children[u], r, i); if (!f.length) return []; s.push.apply(s, l(f)) } return s; case re: for (var d = [], v = 0, g = n.children.length; v < g; v += 1) { var y = e(n.children[v], r, i); if (y.length) { d.push.apply(d, l(y)); break } } return d } }(n, r, c); a.length && (i[c] || (i[c] = { idx: c, item: r, matches: [] }, o.push(i[c])), a.forEach((function (e) { var t, n = e.matches; (t = i[c].matches).push.apply(t, l(n)) }))) } })), o } }, { key: \"_searchObjectList\", value: function (e) { var t = this, n = te(e, this.options), r = this._myIndex, i = r.keys, o = r.records, c = []; return o.forEach((function (e) { var r = e.$, o = e.i; if (k(r)) { var a = []; i.forEach((function (e, i) { a.push.apply(a, l(t._findMatches({ key: e, value: r[i], searcher: n }))) })), a.length && c.push({ idx: o, item: r, matches: a }) } })), c } }, { key: \"_findMatches\", value: function (e) { var t = e.key, n = e.value, r = e.searcher; if (!k(n)) return []; var i = []; if (v(n)) n.forEach((function (e) { var n = e.v, o = e.i, c = e.n; if (k(n)) { var a = r.searchIn(n), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: n, idx: o, norm: c, indices: h }) } })); else { var o = n.v, c = n.n, a = r.searchIn(o), s = a.isMatch, u = a.score, h = a.indices; s && i.push({ score: u, key: t, value: o, norm: c, indices: h }) } return i } }]), e }(); return ve.version = \"6.4.6\", ve.createIndex = $, ve.parseIndex = function (e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = t.getFn, r = void 0 === n ? A.getFn : n, i = e.keys, o = e.records, c = new E({ getFn: r }); return c.setKeys(i), c.setIndexRecords(o), c }, ve.config = A, function () { ee.push.apply(ee, arguments) }(Z), ve }, \"object\" == typeof exports && \"undefined\" != typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define(t) : (e = e || self).Fuse = t();\n", "/*\n * Some notes on how this works...\n *\n * paletteData is passed into the constructor and is the initial list of items\n * these are TurboAdminMenuItem objects\n *\n * At any point, buildPaletteItems() can be called to turn the paletteData\n * into an array of \"li\" nodes.\n *\n * updatePaletteItems inserts the paletteItems into the \"ul\" list and sets the\n * selectedElement\n *\n * The selectedItem is always one of the paletteItems\n *\n * paletteSearch rebuilds the paletteItems from the paletteData using\n * buildPaletteItems, and then filters the list with FuseJS\n */\n\nimport Fuse from './fuse-6.4.6.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item';\nimport ContentApi from './class-content-api.js';\n\nexport default class TurboAdminPalette {\n\n\tconstructor(paletteData, options) {\n\n\t\tconsole.log('Initialising TurboAdmin');\n\n this.options = options;\n\n /** @type {HTMLDivElement} */\n this.paletteElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette-container'));\n /** @type {HTMLDivElement} */\n this.paletteInnerElement = /** @type {HTMLDivElement} */ (document.getElementById('ta-command-palette'));\n\t\t/** @type {HTMLInputElement} */\n this.paletteInputElement = /** @type {HTMLInputElement} */ (document.getElementById('ta-command-palette-input'));\n\t\t/** @type {HTMLUListElement} */\n this.paletteItemsElement = /** @type {HTMLUListElement} */ (document.getElementById('ta-command-palette-items'));\n\n\t\t// Get palette data\n\t\tthis.paletteData = paletteData;\n\n // Get post type data from API\n this.postTypes = [];\n this.fetchPostTypes();\n\n // paletteItems is the list of 'li' elements used to build the palette\n this.paletteItems = [];\n\n // itemIndex is a \"cache\" of URLs used to check if we already\n // have an item in the palette\n this.itemIndex = {};\n\n // Convert into LI elements\n this.buildPaletteItems();\n\n\n\t\tthis.selectedItem = this.paletteItems[0];\n this.openedSubMenu = null;\n this.selectedSubItem = null;\n\n\t\t// Add them to the DOM\n\t\tthis.updatePaletteItems();\n\n // Set state\n this.navigating = false;\n this.debounceTimeout;\n\n\t\tthis.paletteFuseOptions = [];\n\t\tthis.paletteFuse = null;\n\n\t\tif (typeof (Fuse) !== 'function') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.paletteFuseOptions = {\n\t\t\tkeys: ['innerText'],\n\t\t}\n\n\t\tthis.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n\n\t\tdocument.addEventListener('keydown', e => this.handleGlobalKey(e));\n\n\t\tthis.paletteElement.addEventListener('click', e => {\n\t\t\tthis.checkForPaletteItemClick(e);\n this.checkForClickToClose(e);\n\t\t});\n\n this.paletteItemsElement.addEventListener('mouseover', e => {\n this.setHoveredItem(e.target);\n });\n\t}\n\n htmlDecode(input) {\n var doc = new DOMParser().parseFromString(input, \"text/html\");\n return doc.documentElement.textContent;\n }\n\n isMac() {\n return navigator.platform.startsWith('Mac');\n }\n\n metaPressed(e) {\n return this.isMac() ? e.metaKey : e.ctrlKey;\n }\n\n fetchPostTypes() {\n if (! globalThis.contentApi.active) {\n this.postTypes = [];\n return;\n }\n\n globalThis.contentApi.get('types').then(\n response => {\n response.json().then(\n types => {\n this.postTypes = types;\n }\n );\n }\n );\n }\n\n\tbuildPaletteItems() {\n this.paletteItems = [];\n this.itemIndex = {};\n\n\t\tthis.paletteData.forEach(item => {\n\t\t\tconst li = document.createElement('li');\n\t\t\tconst a = document.createElement('a');\n\t\t\tli.appendChild(a);\n\t\t\ta.href = item.action;\n\t\t\tlet title = item.title;\n\t\t\tif (item.parentTitle) {\n\t\t\t\ttitle = item.parentTitle + \": \" + title;\n\t\t\t}\n\t\t\ta.innerHTML = title;\n this.addPaletteListItem(li);\n\t\t});\n\t}\n\n // This takes a 'li' element and adds it to the paletteItems.\n // It also updates any caches and stuff.\n addPaletteListItem(listItem) {\n this.paletteItems.push(listItem);\n\n const link = listItem.querySelector('a');\n if (link) {\n this.itemIndex[link.href] = 1;\n }\n }\n\n contentItemExists(url) {\n return Boolean(this.itemIndex[url]);\n }\n\n injectContentItems(contentItems) {\n console.log('Injecting items');\n\n // We'll need this in the loop below.\n const profileLinkElem = document.getElementById('wp-admin-bar-edit-profile');\n let profileLink = null;\n if (profileLinkElem) {\n profileLink = profileLinkElem.querySelector('a').href;\n }\n\n // TODO: Can we not do this on every content item inject?\n // Check for presence of Oxygen Page builder\n /** @type {HTMLElement|string|Number} */\n let oxygenLinkElem = document.getElementById('toplevel_page_ct_dashboard_page');\n // Also check for a menu bar item\n if (! oxygenLinkElem) {\n oxygenLinkElem = document.getElementById('wp-admin-bar-oxygen_admin_bar_menu');\n }\n // Check to see if Oxygen link is cached\n if (! oxygenLinkElem) {\n oxygenLinkElem = Number(window.localStorage.getItem('ta-has-oxygen-builder'));\n }\n // Save Oxygen builder status\n window.localStorage.setItem('ta-has-oxygen-builder', Boolean(oxygenLinkElem) ? '1' : '0' );\n\n if (contentItems.length > 0) {\n contentItems.forEach(item => {\n const itemTitle = item.title;\n // const itemTitle = item.title.rendered;\n const itemType = item.subtype;\n const itemUrl = item.url;\n\n // console.log('Adding item: ' + itemTitle);\n\n // // Check if item already exists\n if (this.contentItemExists(itemUrl)) {\n console.log('Not adding duplicate');\n return;\n }\n\n const itemTypeName = this.postTypes[itemType] ? this.postTypes[itemType].name : itemType;\n const title = `${itemTitle} (${itemTypeName})`;\n\n const li = document.createElement('li');\n const a = document.createElement('a');\n const subMenu = document.createElement('div');\n const subMenuTitle = document.createElement('div');\n const subMenuItems = document.createElement('ul');\n subMenu.classList.add('ta-submenu');\n subMenuTitle.classList.add('ta-submenu-title');\n\n subMenuTitle.textContent = this.htmlDecode(itemTitle);\n subMenuItems.classList.add('ta-submenu-items');\n subMenu.appendChild(subMenuTitle);\n subMenu.appendChild(subMenuItems);\n\n const subMenuItem1 = document.createElement('li');\n const subMenuLink1 = document.createElement('a');\n subMenuLink1.innerText = \"View\";\n subMenuLink1.href = itemUrl;\n subMenuItem1.appendChild(subMenuLink1);\n subMenuItems.appendChild(subMenuItem1);\n\n if (profileLink) {\n // Need to get edit URL. This seems like the best way for now.\n const editLink = profileLink.replace('profile.php', `post.php?post=${item.id}&action=edit`);\n\n const subMenuItem2 = document.createElement('li');\n const subMenuLink2 = document.createElement('a');\n subMenuLink2.innerText = \"Edit\";\n subMenuLink2.href = editLink;\n subMenuItem2.appendChild(subMenuLink2);\n subMenuItems.appendChild(subMenuItem2);\n }\n\n if (oxygenLinkElem) {\n // Oxygen Edit Links are like: https://example.com.com/?page_id=26&ct_builder=true&ct_inner=true\n const oxygenLink = globalThis.taWp.home + `?page_id=${item.id}&ct_builder=true&ct_inner=true`;\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Edit with Oxygen\";\n subMenuLink3.href = oxygenLink;\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n }\n\n const subMenuItem3 = document.createElement('li');\n const subMenuLink3 = document.createElement('a');\n subMenuLink3.innerText = \"Copy link\";\n // Because this is an href we're setting it gets URI encoded!\n subMenuLink3.href = itemUrl;\n subMenuLink3.setAttribute('data-action', 'clipboard');\n subMenuItem3.appendChild(subMenuLink3);\n subMenuItems.appendChild(subMenuItem3);\n\n\n li.classList.add('ta-has-child-menu');\n\n li.appendChild(a);\n li.appendChild(subMenu);\n\n a.href = itemUrl;\n a.innerHTML = title;\n this.addPaletteListItem(li);\n })\n }\n\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n\n this.updatePaletteItems();\n }\n\n\t/**\n * Handle global keypresses (at document level). Note that other key presses\n * are handled by paletteActions()\n *\n * @param {KeyboardEvent} e\n */\n async handleGlobalKey(e) {\n\t\tif (this.shortcutKeysPressed(e)) {\n e.preventDefault();\n e.stopPropagation();\n\t\t\tif (this.paletteShown()) {\n\t\t\t\tthis.hidePalette();\n\t\t\t} else {\n\t\t\t\tthis.showPalette();\n\t\t\t}\n\t\t}\n\n\t\tif (e.code === 'Escape' && this.paletteShown()) {\n\t\t\tif (this.isSubMenuOpen()){\n this.closeSubMenu();\n } else {\n this.hidePalette();\n }\n\t\t}\n\n if (this.paletteShown()) {\n await this.paletteActions(e);\n\t\t}\n\t}\n\n\tshortcutKeysPressed(keyEvent) {\n // The reduce here works through all the different possible key combos\n // (more than one can be specified in options)\n\t\tconst keysPressed = this.options.shortcutKeys.reduce(\n\t\t\t(keyPressed, combo) => {\n\t\t\t\tif (keyPressed) {\n\t\t\t\t\treturn keyPressed;\n\t\t\t\t}\n return ((!navigator.platform.startsWith('Mac')) || (combo.meta === keyEvent.metaKey))\n && (combo.alt === keyEvent.altKey)\n && (combo.shift === keyEvent.shiftKey)\n && (combo.ctrl === keyEvent.ctrlKey)\n && (\n keyEvent.code === 'Key' + combo.key.toUpperCase()\n || ( combo.key === ' ' && keyEvent.code.toUpperCase() === 'SPACE' )\n );\n }, false);\n\t\treturn keysPressed;\n\t}\n\n async debouncedPaletteSearchAndUpdate() {\n // If search string is not long enough for content search, then\n // run without debounce.\n if (\n ( this.paletteInputElement.value !== '' && this.paletteInputElement.value.length <= 2)\n || this.postTypes === [] ) {\n this.debounceTimeout = null;\n await this.paletteSearchAndUpdate();\n return;\n }\n // If timer is null, reset it to 500ms and run your functions.\n // Otherwise, wait until timer is cleared\n if (!this.debounceTimeout) {\n this.debounceTimeout = setTimeout(async function () {\n // Reset timeout\n this.debounceTimeout = null;\n\n // Run the search function\n await this.paletteSearchAndUpdate();\n }.bind(this), 750);\n }\n }\n\n\t/**\n * Handle (non-global) keypresses on the palette\n *\n * @param {KeyboardEvent} e\n * @returns {Promise}\n */\n async paletteActions(e) {\n\t\tif (e.code === 'ArrowDown' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveDown();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'ArrowUp' && this.paletteShown()) {\n\t\t\te.preventDefault();\n\t\t\tthis.moveUp();\n\t\t\treturn;\n\t\t}\n\t\tif (e.code === 'Enter' && this.paletteShown()) {\n this.doAction(this.metaPressed(e));\n return;\n\t\t}\n if (this.isSubMenuOpen()) {\n return;\n }\n\t\tawait this.debouncedPaletteSearchAndUpdate();\n\t}\n\n\tshowPalette() {\n\t\tthis.paletteInputElement.value = '';\n this.paletteItemsElement.scrollTop = 0;\n\t\tthis.paletteElement?.classList.add('active');\n\t\tthis.paletteInputElement?.focus();\n\t}\n\n\thidePalette() {\n this.navigating = false;\n\t\tthis.paletteElement?.classList.remove('active');\n this.paletteInputElement.value = '';\n this.paletteInputElement.blur();\n if (this.isSubMenuOpen()) {\n this.closeSubMenu();\n }\n\t}\n\n\tpaletteShown() {\n\t\treturn this.paletteElement?.classList.contains('active');\n\t}\n\n checkForPaletteItemClick(e) {\n if (e.target.tagName === 'A') {\n e.preventDefault();\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = e.target.closest('li');\n } else {\n this.selectedItem = e.target.closest('li');\n }\n this.setSelectedElement();\n\n this.doAction(this.metaPressed(e));\n }\n }\n\n\tcheckForClickToClose(e) {\n\t\tif (e.target.id === this.paletteElement.id) {\n\t\t\tthis.hidePalette();\n\t\t}\n\t}\n\n\tsetSelectedElement() {\n if (this.isSubMenuOpen()) {\n this.paletteItemsElement?.querySelectorAll('.ta-submenu.active li.selected')?.forEach(e => e.classList.remove('selected'));\n this.selectedSubItem.classList.add('selected');\n } else {\n this.paletteItemsElement?.querySelectorAll('li.selected')?.forEach(e => e.classList.remove('selected'));\n if (this.selectedItem) {\n this.selectedItem.classList.add('selected');\n this.scrollList();\n }\n }\n\t}\n\n\tscrollList() {\n\t\t// Scrolling up\n\t\tif (this.selectedItem.offsetTop < this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop;\n\t\t}\n\t\t// Scrolling down\n\t\tif (this.selectedItem.offsetTop + this.selectedItem.offsetHeight > this.paletteItemsElement.offsetHeight + this.paletteItemsElement.scrollTop) {\n\t\t\tthis.paletteItemsElement.scrollTop = this.selectedItem.offsetTop + this.selectedItem.offsetHeight - this.paletteItemsElement.offsetHeight;\n\t\t}\n\t}\n\n setHoveredItem(element) {\n // Only do this for li's\n if ('LI' === element.tagName) {\n this.navigating = true;\n if (this.isSubMenuOpen()) {\n this.selectedSubItem = element;\n } else {\n this.selectedItem = element;\n }\n this.setSelectedElement();\n }\n }\n\n\tmoveDown() {\n if (this.isSubMenuOpen()) {\n const nextItem = this.selectedSubItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedSubItem = nextItem;\n this.setSelectedElement();\n }\n } else {\n const nextItem = this.selectedItem.nextElementSibling;\n this.navigating = true;\n if (nextItem) {\n this.selectedItem = nextItem;\n this.setSelectedElement();\n }\n }\n\t}\n\n\tmoveUp() {\n if (this.isSubMenuOpen()) {\n const prevItem = this.selectedSubItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedSubItem = prevItem;\n this.setSelectedElement();\n }\n } else {\n const prevItem = this.selectedItem.previousElementSibling;\n this.navigating = true;\n if (prevItem) {\n this.selectedItem = prevItem;\n this.setSelectedElement();\n }\n }\n }\n\n isSubMenuOpen() {\n return null !== this.openedSubMenu;\n }\n\n openSubMenu(subMenuElement) {\n // Set height in case main menu is smaller than sub menu\n const subMenuHeight = subMenuElement.offsetHeight;\n this.paletteItemsElement.style.minHeight = subMenuHeight + \"px\";\n subMenuElement.classList.add('active');\n\n\n this.selectedSubItem = subMenuElement.querySelector('li');\n this.openedSubMenu = subMenuElement;\n this.setSelectedElement();\n\n this.paletteInputElement.disabled = true;\n // Blur the input so that keys can continue to be captured\n this.paletteInputElement.blur();\n }\n\n closeSubMenu(subMenuElement = null) {\n if (null === subMenuElement) {\n subMenuElement = document.querySelector('.ta-submenu.active');\n }\n subMenuElement.classList.remove('active');\n this.selectedSubItem.classList.remove('active');\n this.paletteItemsElement.style.minHeight = 'auto';\n this.selectedSubItem = null;\n this.openedSubMenu = null;\n this.paletteInputElement.disabled = false;\n this.paletteInputElement.focus();\n }\n\n\tdoAction(metaPressed = false) {\n if (this.isSubMenuOpen()) {\n this.actOnItem(this.selectedSubItem, metaPressed);\n return;\n }\n if (this.selectedItem.classList.contains('ta-has-child-menu')) {\n const subMenu = this.selectedItem.querySelector('.ta-submenu');\n this.openSubMenu(subMenu);\n return;\n }\n\n this.actOnItem(this.selectedItem, metaPressed);\n }\n\n actOnItem(item, metaPressed) {\n this.hidePalette();\n const link = item.querySelector('a');\n const url = link.href;\n\n if ('clipboard' === link.dataset.action) {\n navigator.clipboard.writeText(url);\n return;\n }\n\n if (metaPressed) {\n window.open(url, '_blank');\n } else {\n window.location = url;\n }\n }\n\n\tselectedItemDisplayed() {\n\t\treturn Array.from(this.paletteItemsElement.childNodes).includes(this.selectedItem);\n\t}\n\n\tasync paletteSearchAndUpdate() {\n\t\tawait this.paletteSearch();\n\t\tthis.updatePaletteItems();\n\t}\n\n\tasync paletteSearch() {\n // Get the value...\n // const response = await globalThis.contentApi.get('posts', { search: this.paletteInputElement.value, per_page: 100, status: ['publish', 'future', 'draft', 'pending', 'private'] });\n\n this.buildPaletteItems();\n\n if (this.paletteInputElement.value !== '') {\n // Reset the search to work on the new items\n this.paletteFuse = new Fuse(this.paletteItems, this.paletteFuseOptions);\n this.paletteItems = this.paletteFuse.search(this.paletteInputElement.value).map(i => i.item);\n }\n\n // Content search - don't search everything!\n if (globalThis.contentApi.active && this.postTypes !== [] && this.paletteInputElement.value.length > 2) {\n this.paletteInnerElement.classList.add('loading');\n\n globalThis.contentApi.getPosts(this.paletteInputElement.value)\n .then(\n results => {\n this.injectContentItems(results);\n this.paletteInnerElement.classList.remove('loading');\n }\n )\n }\n\t}\n\n\tupdatePaletteItems() {\n\t\tconst newItems = document.createElement('ul');\n\t\tnewItems.id = 'ta-command-palette-items';\n\n\t\tthis.paletteItems.forEach(i => {\n\t\t\tnewItems.appendChild(i);\n\t\t})\n\n\t\tthis.paletteItemsElement.replaceChildren(...newItems.children);\n\n\t\tif (!this.navigating || !this.selectedItemDisplayed()) {\n\t\t\tthis.selectedItem = this.paletteItems[0];\n\t\t}\n\n\t\tthis.setSelectedElement();\n\t}\n\n}\n", "export default class TurboAdminMenuItem {\n\n\tconstructor(title, action, parentTitle, noCache = false) {\n\t\tthis.title = title;\n\t\tthis.action = action;\n\t\tthis.parentTitle = parentTitle;\n this.noCache = noCache;\n\t}\n\n sameAs(item) {\n return item.title === this.title &&\n item.action === this.action &&\n item.parentTitle === this.parentTitle;\n }\n}\n", "/**\n * This class is an abstraction of the browser extension storage API\n * (see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage)\n * but that falls back to using regular localStorage if we're not in a\n * browser extension.\n *\n * This exists so that the same API can be used from both the browser\n * extension AND the plugin version of Turbo Admin.\n *\n * Note that for the extension, data saved is \"global\" to the extension\n * and is NOT site specific.\n */\nexport default class Storage {\n\n /**\n * Constructor - detects where code is running and sets the local\n * store appropriately.\n */\n constructor() {\n /** @type {null|storageStorageArea|WindowLocalStorage} */\n this.store = null;\n\n if ('undefined' === typeof (browser)) {\n this.store = window.localStorage;\n } else {\n this.store = browser.storage.local;\n }\n }\n\n /**\n * Set/save extension data. Must be passed an object with key/value\n * pairs.\n *\n * @param {Object} dataObject\n */\n async set(dataObject) {\n if ('undefined' === typeof (browser)) {\n const keys = Object.keys(dataObject);\n keys.forEach(key => this.store.setItem(key, JSON.stringify(dataObject[key])));\n } else {\n await this.store.set(dataObject);\n }\n }\n\n /**\n * Get data from the extension's storage.\n *\n * Note that fetched data will be a object with the key as a\n * property.\n *\n * @param {String} key\n * @returns {Promise<Object>}\n */\n async get(key) {\n if ('undefined' === typeof (browser)) {\n let returnObj = {};\n let item = this.store.getItem(key);\n if (! item) {\n return returnObj;\n }\n let itemObject = null;\n try {\n itemObject = JSON.parse(this.store.getItem(key));\n } catch (e) {\n itemObject = null;\n }\n returnObj[key] = itemObject;\n return returnObj;\n } else {\n return await this.store.get(key);\n }\n }\n\n}\n", "import Storage from './class-storage.js';\n\nexport default class ContentApi {\n\n constructor() {\n // this.discoverApiRoot().then(e => null);\n // console.log('Discovered API base: ', this.apiBase);\n this.active = false;\n this.store = new Storage();\n\n // This is used to \"cache\" duplicate requests.\n // It's an object because it will have search strings as keys\n this.cache = {};\n }\n\n async discoverApiRoot() {\n let wpApiSettings = null;\n this.storageKey = 'wpApiSettings.' + globalThis.taWp.home;\n\n // Could be in the wp-api-request-js-extra (on wp-admin side)\n const wpApiSettingsScript = document.getElementById('wp-api-request-js-extra');\n if (wpApiSettingsScript) {\n const wpApiSettingsString = wpApiSettingsScript.innerHTML.match(/var\\s+wpApiSettings\\s+=\\s+(.+);/)[1];\n const wpApiSettings = JSON.parse(wpApiSettingsString);\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Getting from extension storage returns a object with the key\n // as the key. Which is weird.\n wpApiSettings = await this.store.get(this.storageKey);\n if (wpApiSettings\n && Object.keys(wpApiSettings).length !== 0\n && wpApiSettings[this.storageKey]\n && 'object' === typeof(wpApiSettings[this.storageKey])) {\n // Get the key'ed item out of the object\n wpApiSettings = wpApiSettings[this.storageKey];\n this.apiRoot = wpApiSettings.root;\n this.apiBase = this.apiRoot + wpApiSettings.versionString;\n this.apiNonce = wpApiSettings.nonce;\n // Clear the nonce if one is set and we're not logged in\n this.maybeExpireNonce(wpApiSettings);\n this.active = true;\n return;\n }\n\n // Could be in <link rel=\"https://api.w.org/\" href=\"https://something/wp-json/\">\n if (globalThis.taWp.apiLinkUrl) {\n this.apiRoot = globalThis.taWp.apiLinkUrl;\n // Just guess this\n this.apiBase = this.apiRoot + 'wp/v2/';\n this.active = true;\n return;\n }\n }\n\n userLoggedIn() {\n return document.body.classList.contains('logged-in') ||\n document.body.classList.contains('wp-admin');\n }\n\n async maybeExpireNonce(wpApiSettings) {\n if (wpApiSettings?.nonce && ! this.userLoggedIn()) {\n // Clear apiSetting nonce\n this.apiNonce = null;\n wpApiSettings.nonce = null;\n const objectToSave = {};\n objectToSave[this.storageKey] = wpApiSettings;\n await this.store.set(objectToSave);\n }\n }\n\n makeParamString(data) {\n const params = new URLSearchParams();\n\n Object.keys(data).forEach(paramKey => {\n // Handle arrays\n if (Array.isArray(data[paramKey])) {\n const arrayParamKey = paramKey + '[]';\n data[paramKey].forEach( item => params.append(arrayParamKey, item));\n } else {\n params.append(paramKey, data[paramKey]);\n }\n });\n\n return params.toString();\n }\n\n statuses() {\n if (this.apiNonce) {\n return [\"publish\", \"future\", \"draft\", \"pending\", \"private\"];\n } else {\n return [\"publish\"];\n }\n }\n\n types() {\n return globalThis.turboAdmin.turboAdminPalette.postTypes;\n }\n\n async getPosts(searchString) {\n // Check the cache\n if (undefined !== this.cache[searchString]) {\n return this.cache[searchString];\n }\n\n // Fetch results\n const response = await this.get(\n // \"posts\",\n \"search\",\n {\n search: searchString,\n per_page: 100,\n // status: this.statuses(),\n type: 'post',\n subtype: 'any'\n }\n );\n\n // Decode JSON\n const result = await response.json();\n\n // Store in the cache\n this.cache[searchString] = result;\n\n return result;\n }\n\n async get(path, data = {}) {\n const init = {\n method: 'GET',\n headers: {},\n mode: 'cors',\n cache: 'no-store',\n }\n\n // Add the nonce if there is one\n if (this.apiNonce) {\n data._wpnonce = this.apiNonce;\n }\n\n const params = this.makeParamString(data);\n\n const response = await fetch(`${this.apiBase}${path}/?${params}`);\n\n return response;\n }\n\n}\n", "/**\n * It's impossible to change the setting to off, because the\n * extension's content script runs in a sandbox and can't access\n * the wp object. But we can just toggle the class every time.\n */\nexport default class TurboAdminWpBlockEditorFullscreenKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed fullscreen\n // if (document.body.classList.contains('turbo-admin-killed-fullscreen')) {\n // return;\n // }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (mu.target.classList.contains('is-fullscreen-mode')) {\n this.killFullScreenEditor();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killFullScreenEditor();\n }\n\n killFullScreenEditor() {\n if (! document.body.classList.contains('is-fullscreen-mode')) {\n return;\n }\n\n document.body.classList.remove('is-fullscreen-mode');\n document.body.classList.add('turbo-admin-killed-fullscreen');\n\n const newStyles = document.createElement('style');\n newStyles.innerHTML = \"body.turbo-admin-killed-fullscreen .edit-post-fullscreen-mode-close { display: none; }\";\n document.body.appendChild(newStyles);\n }\n}\n", "/**\n *\n */\nexport default class TurboAdminWpBlockEditorWelcomeGuideKill {\n\n constructor() {\n\n const attrObserver = new MutationObserver((mutations) => {\n mutations.forEach(mu => {\n // Check if we already killed the modal\n if (document.body.classList.contains('ta-killed-post-welcome-guide')) {\n return;\n }\n\n if (mu.type !== \"attributes\" && mu.attributeName !== \"class\") {\n return;\n }\n\n if (! mu.target.classList.contains('modal-open')) {\n return;\n }\n\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n this.killWelcomeGuide();\n }\n });\n });\n\n attrObserver.observe(document.body, { attributes: true });\n\n // Also attempt a kill now in case it's already appeared.\n this.killWelcomeGuide();\n }\n\n killWelcomeGuide() {\n const welcomeGuide = document.querySelector('.edit-post-welcome-guide');\n if (welcomeGuide) {\n const closeButton = welcomeGuide.querySelector('.components-modal__header button');\n if (closeButton) {\n closeButton.click();\n /*\n * Also add a class to body so we don't do it again - subsequent modals\n * will need to be shown as they will have been user-initiated.\n */\n document.body.classList.add('ta-killed-post-welcome-guide');\n }\n }\n }\n}\n", "export default class TurboAdminWpNotices {\n\n // TODO: Handle empty IDS. Can we identify unique selectors?\n // See spinup!\n // Also need to only show move to panel if we can (i.e. if there's a way\n // to identify it))\n constructor(rememberedNoticeIds) {\n\n // Bail if we aren't in the admin\n if (! document.querySelector('body.wp-admin')) {\n return;\n }\n\n /*\n * These are the global notice selectors\n */\n this.noticeSelectors = [\n '#wpbody-content > .notice',\n '#wpbody-content > .wrap > .notice',\n '#wpbody-content > .wrap > .updated',\n '#gf_dashboard_message', // Gravity forms\n '.jitm-banner', //\n '.fs-notice', // I get this in Replyable\n '#updraft-dashnotice', // Updraft backups\n '.woocommerce-message', // WooCommerce\n '#akismet_setup_prompt', // Akismet\n '#wf-onboarding-plugin-header', // WordFence onboard\n '.llar-notice-review' // Limit Login Attempts reloaded\n ];\n\n /*\n * These selectors are allowed (unless explicitly denied)\n */\n this.allowedClasses = [\n 'notice-success',\n 'notice-error',\n 'notice-failure',\n 'updated',\n ]\n\n if (rememberedNoticeIds) {\n this.rememberedNoticeIds = rememberedNoticeIds.length > 0 ? rememberedNoticeIds : [];\n } else {\n this.rememberedNoticeIds = [];\n }\n\n const toolbar = document.getElementById('wpadminbar');\n\n if (!toolbar) {\n return;\n }\n\n if (rememberedNoticeIds && rememberedNoticeIds.length > 0) {\n rememberedNoticeIds.forEach(id => {\n if ('string' === typeof(id) && id.length > 0) {\n this.noticeSelectors.push('#' + id);\n }\n });\n }\n\nconsole.log('Notice Selectors', this.noticeSelectors);\n const notices = document.querySelectorAll(this.noticeSelectors.join(','));\nconsole.log('Notices', notices);\n\n // Add buttons to notices that can be moved\n notices.forEach(notice => {\n this.maybeAddIdToNotice(notice)\n\n if (this.keepNotice(notice)) {\n const rememberButton = document.createElement('button');\n rememberButton.classList.add('ta-remember-notice-button');\n rememberButton.innerText = 'Move to panel';\n\n const forgetButton = document.createElement('button');\n forgetButton.classList.add('ta-forget-notice-button');\n forgetButton.innerText = 'Move to dashboard';\n\n notice.classList.add('ta-added-pos-relative');\n\n notice.appendChild(rememberButton);\n notice.appendChild(forgetButton);\n\n rememberButton.addEventListener('click', this.rememberNotice.bind(this), false, true);\n forgetButton.addEventListener('click', this.forgetNotice.bind(this), false, true);\n }\n });\n\n const noticesToHide = Array.from(notices).filter(notice => {\n if (this.rememberedNoticeIds.includes(notice.id)) {\n return true;\n }\n\n if (this.keepNotice(notice)) {\n return false;\n }\n\n // Invisible\n if (\n notice.offsetHeight === 0 ||\n notice.offsetWidth === 0\n ) {\n return false;\n }\n\n return true;\n })\n\n console.log('Notices to hide', noticesToHide)\n\n /**\n * Build the notices wrapper\n */\n /** @type {HTMLDivElement} */\n const noticesLinkWrapper = document.createElement('div');\n noticesLinkWrapper.id = 'ta-notices-link-wrap';\n noticesLinkWrapper.classList.add('hide-if-no-js', 'screen-meta-toggle');\n noticesLinkWrapper.style.margin='0 0 0 6px';\n noticesLinkWrapper.style.float='left';\n if (noticesToHide.length === 0) {\n noticesLinkWrapper.style.display='none';\n }\n\n /**\n * Add button\n */\n /** @type {HTMLButtonElement} */\n const noticesButton = document.createElement('button');\n noticesButton.type='button';\n noticesButton.id='ta-notices-link';\n noticesButton.classList.add('button', 'show-settings');\n noticesButton.innerHTML='Notices <span id=\"ta-notice-count\">' + noticesToHide.length + '</span>';\n noticesButton.setAttribute('aria-controls', 'ta-notices-wrap');\n\n // This should replicate the functionality from wp-admin/js/common.js\n // as closely as possible. But note that we can't access the common.js\n // functions.\n noticesButton.addEventListener('click', this.toggleNoticesPanel.bind(this), false);\n\n /**\n * Add button to the link wrapper\n */\n noticesLinkWrapper.appendChild(noticesButton);\n\n /**\n * Add the link wrapper to the screen-meta-links section\n */\n const screenMetaLinks = document.getElementById('screen-meta-links');\n screenMetaLinks.appendChild(noticesLinkWrapper);\n\n /**\n * Build the panel\n */\n const noticesPanel = document.createElement('div');\n\n noticesPanel.id='ta-notices-wrap';\n noticesPanel.style.display='none';\n noticesPanel.dataset.open='no';\n\n const noticesPanelInner = document.createElement('div');\n noticesPanelInner.id = 'ta-notices-panel-inner';\n\n noticesToHide.forEach(notice => {\n // Add 'inline' class otherwise WordPress might move them around!\n notice.classList.add('inline');\n // See Toolbelt's implementation: https://github.com/BinaryMoon/wp-toolbelt/blob/dev/modules/tidy-notifications/src/js/script.js\n noticesPanelInner.append(notice);\n });\n\n /**\n * Add wrap to the meta area\n */\n noticesPanel.appendChild(noticesPanelInner);\n const screenMeta = document.getElementById('screen-meta');\n screenMeta.appendChild(noticesPanel);\n\n // Set up events on the new screen-meta item\n // if (window.screenMeta) {\n // window.screenMeta.init();\n // }\n }\n\n // Does the allowedClasses list say that this notice should be shown?\n keepNotice(noticeElem) {\n return this.allowedClasses.reduce( (found, current) => {\n return found || noticeElem.classList.contains(current)\n }, false);\n }\n\n rememberNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panel = document.getElementById('wp-admin-bar-ta-notices');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Remembering ${noticeId}`);\n panelInner.appendChild(notice);\n if (count === 0) {\n noticesLinkWrap.style.display = 'block';\n }\n\n this.updateScreenMetaHeight();\n\n countElem.innerText = parseInt(countElem.innerText, 10) + 1;\n\n this.saveRememberedNotice(noticeId);\n }\n\n saveRememberedNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n forgetNotice(ev) {\n const noticesLinkWrap = document.getElementById('ta-notices-link-wrap');\n const panelInner = document.getElementById('ta-notices-panel-inner');\n const countElem = document.getElementById('ta-notice-count');\n const count = parseInt(countElem.innerText, 10);\n const notice = ev.target.closest(this.noticeSelectors.join(','));\n const noticeId = notice.id;\n console.log(`Forgetting ${noticeId}`);\n\n notice.remove();\n\n const message = document.createElement('div');\n const p = document.createElement('p');\n message.classList.add('notice', 'ta-forget-notice-message');\n p.textContent = 'Notice will be back in dashboard on next page load';\n message.appendChild(p);\n panelInner.appendChild(message);\n\n this.updateScreenMetaHeight();\n\n // I was going to to this, but we need to keep the notice about\n // where the notice has gone.\n // if (count === 1) {\n // noticesLinkWrap.style.display = 'none';\n // }\n\n countElem.innerText = (count - 1).toString();\n this.saveForgottenNotice(noticeId);\n }\n\n saveForgottenNotice(noticeId) {\n this.rememberedNoticeIds.push(noticeId);\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'rememberNotice',\n 'noticeId': noticeId,\n });\n } else {\n this.rememberedNoticeIds = this.rememberedNoticeIds.filter( id => id !== noticeId );\n window.localStorage.setItem('rememberedNoticeIds', JSON.stringify(this.rememberedNoticeIds));\n }\n }\n\n /*\n * For notices without IDs we'll see if we can add an ID that's a hash of their classlist\n */\n maybeAddIdToNotice(notice) {\n if (notice.id && notice.id !== '' && notice.id !=='message') {\n return;\n }\n\n const classes = notice.classList;\n notice.id = Array.from(notice.classList).join('-');\n }\n\n /**\n * Detect if WordPress has already applied event handlers to our new screen meta button.\n *\n * If it has then WordPress/backbone.js will handle the animation and we won't have to.\n *\n * @returns {boolean}\n */\n wordpressScreenMetaEventsExist() {\n return 'object' === typeof(window.screenMeta) && window.screenMeta.toggles.filter('#ta-notices-link').length > 0;\n }\n\n updateScreenMetaHeight() {\n // Don't do this if we're relying on backbone's animation\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n }\n\n toggleNoticesPanel(ev) {\n // We may be in the plugin in which case we don't want to run our handler if there's\n // a backbone handler on the button.\n if (this.wordpressScreenMetaEventsExist()) {\n return;\n }\n // Otherwise we mimic the swipe down animation.\n const animationSeconds = 0.3;\n const screenMeta = document.getElementById('screen-meta');\n const noticesPanel = document.getElementById('ta-notices-wrap');\n if (noticesPanel.dataset.open === 'no') {\n this.toggleOtherScreenMetaTabs();\n // Don't ask... just DON'T ask!\n noticesPanel.dataset.open = 'yes';\n screenMeta.style.transition = `max-height ${animationSeconds.toString(10)}s`;\n screenMeta.style.maxHeight = '0';\n screenMeta.style.overflow = 'hidden';\n screenMeta.style.display = 'block';\n noticesPanel.style.display = 'block';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = height.toString(10) + 'px';\n // setTimeout(() => {\n // // Nothing to do here.\n // }, animationSeconds * 1000);\n } else {\n noticesPanel.dataset.open = 'no';\n const height = noticesPanel.offsetHeight;\n screenMeta.style.maxHeight = '0';\n setTimeout(() => {\n noticesPanel.style.display = '';\n screenMeta.style.display = '';\n screenMeta.style.transition = '';\n screenMeta.style.overflow = '';\n screenMeta.style.maxHeight = '';\n this.toggleOtherScreenMetaTabs();\n }, animationSeconds * 1000);\n }\n\n }\n\n toggleOtherScreenMetaTabs() {\n const otherTabs = document.querySelectorAll('#screen-meta-links .screen-meta-toggle:not(#ta-notices-link-wrap)');\n otherTabs.forEach( (tab) => {\n if (tab.style.visibility === 'hidden') {\n tab.style.visibility = '';\n } else {\n tab.style.visibility = 'hidden';\n }\n } );\n }\n}\n", "export default class ListTableShortcuts {\n\n constructor() {\n /**\n * @type {ListTableShortcuts}\n */\n const me = this;\n\n /**\n * @type {null|HTMLElement}\n */\n this.currentRow = null;\n\n /**\n * @type {number}\n */\n this.currentRowIndex = 0;\n\n /**\n * @type {HTMLTableElement}\n */\n this.listTable = document.querySelector('.wp-list-table');\n\n if (! this.listTable) {\n return;\n }\n\n /**\n * @type {NodeListOf<HTMLTableRowElement>}\n */\n this.tableRows = this.listTable.querySelectorAll('tbody#the-list > tr');\n\n document.addEventListener('keyup', e => this.handleKeyup(e));\n }\n\n /**\n *\n * @param {KeyboardEvent} ev\n */\n handleKeyup(ev) {\n if (document.activeElement.tagName !== 'BODY') {\n return;\n }\n\n if (ev.key === 'j') {\n this.tableMoveDown();\n } else if (ev.key === 'k') {\n this.tableMoveUp();\n } else if (ev.key.toLowerCase() === 'enter' && this.currentRow !== null) {\n this.openTableRowItem();\n }\n\n }\n\n tableMoveDown() {\n this.preTableChange();\n\n // Move down\n if (this.currentRow === null) {\n this.currentRowIndex = 0;\n } else {\n this.currentRowIndex++;\n }\n this.updateTable();\n }\n\n tableMoveUp() {\n this.preTableChange();\n\n if (this.currentRowIndex > 0) {\n this.currentRowIndex--;\n this.updateTable();\n }\n }\n\n preTableChange() {\n if (this.currentRow !== null) {\n this.tableRows[this.currentRowIndex].classList.remove('ta-active-table-row');\n }\n }\n\n updateTable() {\n this.currentRow = this.tableRows[this.currentRowIndex];\n\n if (! this.tableRows[this.currentRowIndex].classList.contains('ta-active-table-row')) {\n this.tableRows[this.currentRowIndex].classList.add('ta-active-table-row');\n }\n }\n\n openTableRowItem() {\n console.log(this);\n /** @type {HTMLAnchorElement} */\n const link = this.currentRow.querySelector('a.row-title');\n if (link) {\n link.click();\n }\n }\n}\n", "export default class TurboAdminBarkeeper {\n\n constructor(barkeeperState) {\n // Bail if we aren't in the admin\n if (! document.getElementById('wpadminbar')) {\n return;\n }\n\n this.exclusionIds = [\n 'wp-admin-bar-menu-toggle',\n 'wp-admin-bar-wp-logo',\n 'wp-admin-bar-site-name',\n 'wp-admin-bar-updates',\n ];\n\n this.barkeeperState = barkeeperState;\n\n this.root = document.getElementById('wp-admin-bar-root-default');\n this.itemsToHide = document.querySelectorAll( '#wp-admin-bar-root-default > li');\n\n Array.from(this.itemsToHide).forEach( element => {\n if (this.exclusionIds.includes(element.id)) {\n return;\n }\n element.classList.add('ta-barkeeper-collapsable');\n });\n\n if (this.barkeeperState === 'closed') {\n this.root.classList.toggle('ta-barkeeper-closed');\n }\n\n // Add toggle\n this.button = document.createElement('button');\n this.button.id = 'ta-barkeeper-toggle';\n this.button.innerText = '<';\n\n this.button.addEventListener('click', e => {\n this.root.classList.toggle('ta-barkeeper-closed');\n\n this.barkeeperState = this.barkeeperState === 'open' ? 'closed' : 'open';\n\n if ('object' === typeof(browser)) {\n browser.runtime.sendMessage({\n 'action': 'barkeeperSetState',\n 'barkeeperState': this.barkeeperState,\n });\n } else {\n window.localStorage.setItem('turboAdminBarkeeperState', this.barkeeperState);\n }\n });\n\n this.root.insertAdjacentElement('afterend', this.button);\n }\n\n}\n", "/*\n * This is the common Turbo Admin library.\n *\n * It's (currently) WordPress-specific, but can be loaded by\n * either the Extension OR the Plugin\n *\n * It takes an options object:\n *\n * options: {\n * shortcutKeys: [\n * // Array of shortcut key definitions, like:\n * {\n * {\n * meta: false,\n * alt: true,\n * ctrl: true,\n * shift: true,\n * key: 'p'\n * }\n * }\n * ],\n * appendToElement {\n * // Optional CSS selector to define what to append the palette to\n * 'body'\n * },\n * extraItems: [\n * // Optional array of extra item configs used to generate new item objects\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * ],\n * extraItemsRaw: [\n * // Optional array of raw item objects to be added\n * {\n * 'title': ,\n * 'action': ,\n * 'parentTitle': ,\n * }\n * ]\n * }\n */\nimport TurboAdminPalette from './class-turbo-admin-palette.js';\nimport TurboAdminMenuItem from './class-turbo-admin-menu-item.js';\nimport Acf from './class-acf.js';\nimport TurboAdminWpBlockEditorFullscreenKill from './class-turbo-admin-wp-block-editor-fullscreen-kill.js';\nimport TurboAdminWpBlockEditorWelcomeGuideKill from './class-turbo-admin-wp-block-editor-welcome-guide-kill.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\nimport TurboAdminListTableShortcuts from './class-list-table-shortcuts.js';\nimport TurboAdminBarkeeper from './class-turbo-admin-barkeeper.js';\n\nexport default class TurboAdmin {\n\n constructor(options) {\n if (document.getElementById('ta-command-palette-container')) {\n console.log('TurboAdmin already initialised - I won\\'t make a second copy!');\n return;\n }\n\n this.options = options;\n }\n\n async init() {\n // Grab the global Wp object instance\n this.wp = globalThis.taWp;\n\n this.menu = [];\n // Check for saved menu when on front-end\n if (! this.wp.isBackend) {\n // Only use the cached items if the current URL matches the last site URL\n // This handles changes of multi-site site!\n // We ONLY need to do this on the front-end as the back-end will always\n // refresh the menu.\n if (! this.wp.siteChanged) {\n // Get from localStorage\n const savedMenu = window.localStorage.getItem('ta-palette-data');\n\n if (null !== savedMenu) {\n // Check for .logged-in class on body\n if (document.body.classList.contains('logged-in')) {\n // If still logged in merge (?) the items\n this.menu = JSON.parse(savedMenu);\n }\n }\n }\n } else {\n // On the back end, get the WordPress dashboard menu items\n this.menu = this.getMenu();\n }\n\n // Add other additional items\n this.addAdditionalMenuItems();\n // Add items passed in using extraItemsRaw\n this.menu = this.menu.concat(this.options.extraItemsRaw ?? []);\n\n // Add ACF items?\n // TODO: Make this better. Possible ASYNC somehow?\n // this.acf = new Acf();\n // if (this.acf.isAcfInstalled()) {\n // const acfLinks = await this.acf.getFieldGroups()\n // // console.table(acfItems);\n // const acfMenuItems = acfLinks.map(\n // item => new TurboAdminMenuItem(\n // item.label + ' (ACF)',\n // item.link,\n // ''\n // )\n // );\n // this.menu = this.menu.concat(acfMenuItems);\n // }\n\n // Sort the menu\n this.menu.sort((a, b) => (a.parentTitle + a.title).localeCompare(b.parentTitle + b.title));\n\n // Filter out no-cache items and save to localStorage.\n const itemsToSave = this.menu.filter(item => (! item.noCache));\n window.localStorage.setItem('ta-palette-data', JSON.stringify(itemsToSave));\n\n // Add palette markup to the DOM\n this.addPalette();\n // Initialise controls on the palette\n this.turboAdminPalette = new TurboAdminPalette(this.menu, this.options);\n\n if (true === this.options['block-editor-fullscreen-disable']) {\n // Initialise fullscreen kill\n this.turboAdminFullscreenKill = new TurboAdminWpBlockEditorFullscreenKill();\n }\n\n if (true === this.options['block-editor-welcome-screen-kill']) {\n this.turboAdminWelcomeKill = new TurboAdminWpBlockEditorWelcomeGuideKill();\n }\n\n if (true === this.options['list-table-keyboard-shortcuts']) {\n this.turboAdminListTableShortcuts = new TurboAdminListTableShortcuts();\n }\n\n if (true === this.options['barkeeper']) {\n // In the plugin, barkeeper-state will be in... local storage(?)\n if ('object' !== typeof(browser)) {\n this.options['barkeeper-state'] = window.localStorage.getItem('turboAdminBarkeeperState');\n }\n this.turboAdminBarkeeper = new TurboAdminBarkeeper(this.options['barkeeper-state']);\n }\n\n // Add other things if we're logged in and have an API nonce\n if (globalThis.contentApi.userLoggedIn()) {\n // What shall we do?\n }\n }\n\n getMenu() {\n const items = [];\n const menuTop = document.getElementById('adminmenu');\n if (menuTop) {\n const topDOMItems = menuTop.querySelectorAll('li.menu-top');\n topDOMItems.forEach(el => {\n const a = el.querySelector('a.menu-top');\n const title = a.querySelector('.wp-menu-name').innerHTML;\n const action = a.href;\n const parentTitle = '';\n const item = new TurboAdminMenuItem(title, action, parentTitle);\n items.push(item);\n\n const subMenu = el.querySelector('.wp-submenu');\n if (!subMenu) {\n return;\n }\n const subItems = subMenu.querySelectorAll('li a');\n if (!subItems) {\n return;\n }\n subItems.forEach(subEl => {\n const parentTitle = title;\n const childTitle = subEl.innerHTML;\n const childAction = subEl.href;\n const item = new TurboAdminMenuItem(childTitle, childAction, parentTitle);\n items.push(item);\n })\n });\n }\n return items;\n }\n\n addAdditionalMenuItems() {\n\n /*\n * I'd LOVE for this to be config driven\n *\n * [\n * {\n * 'detectType': 'url',\n * 'detectPattern': 'wp-login',\n * 'itemTitle': 'View/visit site',\n * 'itemUrlFunction': () => this.home\n * },\n * {\n * 'detectType': 'dom',\n * 'detectSelector': '#wpadminbar',\n * 'itemTitle': 'Logout',\n * 'itemUrlFunction': () => logoutUrl\n * }\n * Can we add actionTypes as well? To do clicks and navigates?\n * ]\n */\n\n // Get passed-in extraItems\n let extraItems = this.options.extraItems ?? [];\n\n // Merge in defaults\n extraItems = extraItems.concat(\n [\n {\n 'detectType': 'dom',\n 'detectSelector': 'body.wp-admin #wp-admin-bar-view-site a',\n 'itemTitleFunction': () => 'View/visit site',\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-dashboard a',\n 'itemTitleFunction': (element) => element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wpadminbar',\n 'itemTitleFunction': () => 'Logout',\n 'itemUrlFunction': () => document.getElementById('wp-admin-bar-logout')?.querySelector('a')?.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-edit a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-view a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href,\n 'noCache': true,\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-new-content .ab-submenu a',\n 'itemTitleFunction': (item) => 'New ' + item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-customize a',\n 'itemTitleFunction': (item) => item.textContent,\n 'itemUrlFunction': (item) => item.href\n },\n {\n 'detectType': 'dom',\n 'detectSelectorNone': '#wpadminbar, #loginform',\n 'itemTitleFunction': () => \"Log in\",\n 'itemUrlFunction': () => {\n if (globalThis.taWp.home) {\n return globalThis.taWp.siteUrl;\n }\n // Try getting wp-admin\n return 'javascript:alert(\\'Sorry, could not detect login URL.\\')';\n }\n },\n // This is on the login screen\n {\n 'detectType': 'dom',\n 'detectSelector': '#backtoblog a',\n 'itemTitleFunction': () => \"View/visit site\",\n 'itemUrlFunction': (element) => element.href\n },\n // Multisite items\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin > a',\n 'itemTitleFunction': () => \"Network Admin\",\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-network-admin .ab-submenu a',\n 'itemTitleFunction': (element) => 'Network Admin: ' + element.textContent,\n 'itemUrlFunction': (element) => element.href\n },\n {\n 'detectType': 'dom',\n 'detectSelector': '#wp-admin-bar-my-sites #wp-admin-bar-my-sites-list .ab-submenu a',\n 'itemTitleFunction': (element) => \"Sites: \" + element.closest('.menupop').querySelector('a').innerText + ' - ' + element.innerText,\n 'itemUrlFunction': (element) => element.href\n },\n // Oxygen builder items\n {\n 'detectType': 'dom',\n 'detectSelector': '#ct-edit-template-builder',\n 'itemTitleFunction': () => 'Edit with Oxygen',\n 'itemUrlFunction': (element) => element.href,\n 'noCache': true\n },\n // It's worth noting that the Oxygen Builder doesn't use a /wp-admin URL\n // and so kinda appears to Turbo Admin to be a \"front-end\" page and it\n // doesn't refresh the menu items.\n {\n 'detectType': 'dom',\n 'detectSelector': '.oxygen-back-to-wp-menu .oxygen-toolbar-button-dropdown a:not(:last-of-type)',\n 'itemTitleFunction': (element) => 'Back to WP: ' + element.textContent,\n 'itemUrlFunction': (element) => {\n if (element.href) {\n return element.href;\n } else {\n let url = new URL(window.location.href);\n return url.origin + url.pathname;\n }\n },\n 'noCache': true\n }\n ]\n );\n\n extraItems.forEach(item => {\n let detected = false;\n let elements = null;\n if (item.detectType === 'url') {\n detected = Boolean(window.location.href.includes(item.detectPattern));\n } else if (item.detectType === 'dom') {\n if (item.detectSelector) {\n elements = document.querySelectorAll(item.detectSelector);\n detected = Boolean(elements);\n } else if (item.detectSelectorNone) {\n elements = document.querySelectorAll(item.detectSelectorNone);\n detected = elements.length === 0;\n // Need to pass SOMETHING to the loop below\n elements = document.querySelectorAll('body');\n }\n }\n if (!detected) {\n return;\n }\n\n elements.forEach(element => {\n const newItem = new TurboAdminMenuItem(item.itemTitleFunction(element), item.itemUrlFunction(element), '', item?.noCache);\n // Might already have one so check.\n if (this.menu.some(menuItem => {\n // This must be newItem.sameAs, not menuItem.sameAs because the menuItem\n // may have been loaded from saved menu and may not actually be an instance\n // of a TurboAdminMenuItem.\n return newItem.sameAs(menuItem)\n } )) {\n return;\n }\n // We don't already have one. So add it.\n this.menu.push(newItem);\n });\n })\n }\n\n addPalette() {\n const container = document.createElement('div');\n container.id = 'ta-command-palette-container';\n // Palette\n const palette = document.createElement('div');\n palette.id = 'ta-command-palette';\n // Input field\n const input = document.createElement('input');\n input.id = \"ta-command-palette-input\";\n input.name = \"ta-command-palette-input\";\n input.type = \"text\";\n // Set this to stop stuff trying to fill it.\n input.setAttribute('autocomplete', 'off');\n // List\n const list = document.createElement('ul');\n list.id = \"ta-command-palette-items\";\n // Join it all up\n container.appendChild(palette);\n palette.appendChild(input);\n palette.appendChild(list);\n\n if (document.getElementById('wpadminbar') && this.options['admin-bar-search'] === true) {\n const paletteLi = document.createElement('li');\n paletteLi.appendChild(container);\n const adminBar = document.getElementById('wp-admin-bar-top-secondary');\n adminBar.appendChild(paletteLi);\n\n // Add focus handler\n input.addEventListener('focus', e => this.turboAdminPalette.showPalette());\n\n // Add placeholder\n const placeholder = document.createElement('div');\n placeholder.id = 'ta-shortcut-key-placeholder';\n placeholder.innerText = this.buildShortcutKeysString();\n placeholder.addEventListener('click', e => input.focus());\n\n palette.insertBefore( placeholder, list );\n } else {\n // Container\n document.querySelector(this.options.appendToElement ?? 'body').appendChild(container);\n }\n }\n\n buildShortcutKeysString () {\n let keysString = '';\n let shortcut = this.options.shortcutKeys[0];\n\n if ( shortcut.meta ) {\n keysString += 'Cmd-';\n }\n if ( shortcut.ctrl ) {\n keysString += 'Ctrl-';\n }\n if ( shortcut.alt ) {\n keysString += 'Alt-';\n }\n if ( shortcut.shift ) {\n keysString += 'Shift-';\n }\n keysString += shortcut.key.toUpperCase();\n return keysString;\n }\n\n}\n", "export default class Wp {\n\n constructor() {\n\n // Set home and siteUrl\n this.siteUrl = '';\n this.home = '';\n this.loginUrl = '';\n this.apiLinkUrl = '';\n }\n\n async completeInit() {\n // Fetch previously loaded site URL\n this.previousUrl = window.localStorage.getItem('ta-palette-data-site');\n\n // Fetch previously-stored siteUrl and home\n this.siteUrl = window.localStorage.getItem('ta-palette-data-siteurl');\n this.home = window.localStorage.getItem('ta-palette-data-home');\n\n /**\n * Are we in the back-end?\n */\n this.isBackend = this.getIsBackend();\n\n /**\n * Figure out all the WP URLs\n */\n await this.getUrls();\n\n /**\n * Tells you if the best-guess site URL of the current page is different\n * to that of the previously saved site URL.\n */\n this.siteChanged = this.home !== this.previousUrl;\n\n // Save current site URL for next time\n window.localStorage.setItem('ta-palette-data-site', this.home);\n }\n\n getIsBackend() {\n return document.body.classList.contains('wp-admin');\n }\n\n /**\n * Return the URL with a trailing slash if it didn't already have one.\n *\n * @param {String} url The URL to check\n * @return {String} The resulting URL\n */\n ensureTrailingSlash( url ) {\n if (url.endsWith('/')) {\n return url;\n } else {\n return url + '/';\n }\n }\n\n /**\n * Tests if a URL works and, if redirected, that the final URL contains a given\n * string. Returns the final, redirected-to URL if the test passed, or false\n * otherwise.\n *\n * @param {String} url The URL to test.\n * @param {String} responseUrlMustContain The string to test against the final URL\n * @returns {Promise<String|Boolean>} The final URL or false.\n */\n async testUrl(url, responseUrlMustContain='') {\n\n /** @type {RequestInit} */\n const init = {\n method: 'HEAD',\n mode: 'cors',\n cache: 'no-cache',\n credentials: 'same-origin'\n }\n\n const response = await fetch(url, init);\n\n if (response.redirected && !response.url.includes(responseUrlMustContain)) {\n return false;\n }\n\n if ( ! response.ok ) {\n return false;\n }\n\n return response.url;\n }\n\n async findWhichUrlWorks(urls, responseUrlMustContain='') {\n let workingUrl = false;\n let result;\n // This has to be a for loop rather than reduce or forEach as separate\n // async callbacks would be launched asynchronously.\n for (let i=0; i<urls.length; i++) {\n if (workingUrl) continue;\n result = await this.testUrl(urls[i], responseUrlMustContain);\n if (result !== false) {\n workingUrl = result;\n }\n }\n return workingUrl;\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessSiteUrlFromHome( homeUrl ) {\n const homeWithSlash = this.ensureTrailingSlash(homeUrl);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // homeWithSlash + 'wp-admin/',\n // homeWithSlash + 'wp/wp-admin'\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return homeWithSlash + 'wp-admin/';\n }\n\n /**\n *\n * @param {String} homeUrl\n */\n async guessHome() {\n const currentUrl = new URL(window.location);\n const origin = this.ensureTrailingSlash(currentUrl.origin);\n\n // NOTE: Backed out of this until I can make it work async.\n // Might not even be a good idea anyway.\n\n // const possibleUrls = [\n // origin\n // ];\n // return this.findWhichUrlWorks(possibleUrls, 'wp-admin');\n return origin;\n }\n\n /**\n *\n * @param {String} siteUrl\n * @returns {String}\n */\n guessHomeFromSiteUrl(siteUrl) {\n // Not much we can do here.\n return siteUrl.replace(/wp-admin\\/?/, '');\n }\n\n async getUrls() {\n // See if we can actually find the URL for the API\n /** @type {HTMLLinkElement|null} */\n const apiLink = document.querySelector('link[rel=\"https://api.w.org/\"]');\n\n if (apiLink) {\n this.apiLinkUrl = apiLink.href;\n }\n // Figure out the siteurl and home - this is different on the front and back end\n if (this.isBackend) {\n // This is easy in the back end/Dashboard!\n this.siteUrl = window.location.href.match(/(^.*wp-admin)/)[1];\n this.home = document.getElementById('wp-admin-bar-site-name').querySelector('a').href;\n\n // Always set the siteUrl and home as this is definitive\n window.localStorage.setItem('ta-palette-data-siteurl', this.siteUrl);\n window.localStorage.setItem('ta-palette-data-home', this.home);\n } else if (! this.siteUrl || ! this.home) {\n\n // If we're not in the backend then (in the extension at least) we\n // could be on the front-end and not logged in, so check for an\n // admin bar and grab from that if there is one.\n if (document.getElementById('wpadminbar')) {\n this.siteUrl = document.getElementById('wp-admin-bar-dashboard').querySelector('a').href;\n // Try for the API link\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n } else {\n // We know what the siteUrl is, so guess the home from the siteUrl\n this.home = this.guessHomeFromSiteUrl(this.siteUrl);\n }\n\n } else {\n // Try for the API link\n // TODO: This needs to be async so it doesn't hold things up.\n if (this.apiLinkUrl) {\n if (this.apiLinkUrl.includes('/wp-json')) {\n this.home = this.apiLinkUrl.replace('wp-json/', '');\n }\n if (this.apiLinkUrl.includes('index.php?rest_route')) {\n this.home = this.apiLinkUrl.replace(/index.php\\?rest_route.*/, '');\n }\n // We (probably) know what the home link is now, so guess the wp-admin\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome( this.home );\n } else {\n this.siteUrl = this.guessSiteUrl();\n }\n } else {\n // We got nothing.\n this.home = await this.guessHome();\n if (this.home) {\n this.siteUrl = await this.guessSiteUrlFromHome(this.home);\n }\n }\n }\n }\n\n // Always trim the / for comparisons\n if (this.siteUrl) {\n this.siteUrl = this.siteUrl.replace(/(.+)\\/$/, '$1');\n }\n if (this.home) {\n this.home = this.home.replace(/(.+)\\/$/, '$1');\n }\n\n // console.log('siteUrl: ', this.siteUrl);\n // console.log('home: ', this.home);\n }\n\n}\n", "import TurboAdmin from './class-turbo-admin.js';\nimport ContentApi from './class-content-api.js';\nimport Wp from './class-wp.js';\nimport TurboAdminWpNotices from './class-turbo-admin-wp-notices.js';\n\nconst taStorageKey = 'turbo-admin-settings';\n\n// Note that in the extension, the globalThis is not the browser's global scope,\n// it is sandboxed. So we can't check across the plugin/extension boundary here.\nasync function taInit(settings) {\n\n globalThis.turboAdmin = null;\n\n // Handle empty settings\n if (typeof(settings[taStorageKey]) === 'undefined') {\n console.log('Weird. Turbo Admin could not find any settings');\n return;\n }\n\n globalThis.turboAdminOptions = settings[taStorageKey];\n\n // Get Wp stuff ready\n globalThis.taWp = new Wp();\n\n // Parts of this init are async.\n await globalThis.taWp.completeInit();\n\n console.log('Turbo Admin: WP is initialised');\n\n // Get/set api settings\n globalThis.contentApi = new ContentApi();\n await globalThis.contentApi.discoverApiRoot();\n\n console.log('Turbo Admin: Content API is initialised');\n\n globalThis.turboAdmin = new TurboAdmin(globalThis.turboAdminOptions);\n\n await globalThis.turboAdmin.init();\n\n if (settings[taStorageKey]['hide-notices']) {\n globalThis.turboAdminWpNotices = new TurboAdminWpNotices(settings[taStorageKey].rememberedNoticeIds);\n }\n}\n\n/**\n * This is plugin-specific. It should not be present in the extension code.\n */\ndocument.addEventListener('DOMContentLoaded', async e => {\n\tglobalThis.turboAdminOptions = {};\n\tglobalThis.turboAdminOptions[taStorageKey] = {\n\t\t// wpTurboAdmin is set using wp_localize_script\n\t\tshortcutKeys: globalThis.wpTurboAdmin.keys,\n // These don't apply to the plugin version\n 'block-editor-fullscreen-disable': false,\n 'block-editor-welcome-screen-kill': false,\n // I don't think we'll do this in the plugin as the code would be SO different.\n 'live-dev-notice': false,\n 'list-table-keyboard-shortcuts': globalThis.wpTurboAdmin['listTableShortcuts'] === '1',\n 'hide-notices': globalThis.wpTurboAdmin['hideNotices'] === '1',\n 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array(),\n 'barkeeper': globalThis.wpTurboAdmin['barkeeper'] === '1',\n 'admin-bar-search': globalThis.wpTurboAdmin['adminBarSearch'] === '1',\n\t}\n\tawait taInit(globalThis.turboAdminOptions);\n});\n"], 5 "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA,QAAI;AAAJ,QAAO;AAAG,QAAI,SAAM,IAAI,WAAY;AAAE;AAAc,kBAAW,IAAG;AAAE,eAAQ,MAA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GxB,QAAI,OAAO,SAAS,kBAAmB,aAAa;AAChD,cAAQ,IAAI;AACZ;AAAA;AAGJ,eAAW,oBAAoB,SAAS;AAGxC,eAAW,OAAO,IAAI;AAGtB,UAAM,WAAW,KAAK;AAEtB,YAAQ,IAAI;AAGZ,eAAW,aAAa,IAAI;AAC5B,UAAM,WAAW,WAAW;AAE5B,YAAQ,IAAI;AAEZ,eAAW,aAAa,IAAI,0BAAW,WAAW;AAElD,UAAM,WAAW,WAAW;AAE5B,QAAI,SAAS,cAAc,iBAAiB;AACxC,iBAAW,sBAAsB,IAAI,qCAAoB,SAAS,cAAc;AAAA;AAAA;AAOxF,WAAS,iBAAiB,oBAAoB,OAAM,MAAK;AACxD,eAAW,oBAAoB;AAC/B,eAAW,kBAAkB,gBAAgB;AAAA,MAE5C,cAAc,WAAW,aAAa;AAAA,MAEhC,mCAAmC;AAAA,MACnC,oCAAoC;AAAA,MAEpC,mBAAmB;AAAA,MACnB,iCAAiC,WAAW,aAAa,0BAA0B;AAAA,MACnF,gBAAgB,WAAW,aAAa,mBAAmB;AAAA,MAC3D,qBAAuB,KAAK,MAAM,OAAO,aAAa,QAAQ,2BAA2B,IAAI;AAAA,MAC7F,WAAa,WAAW,aAAa,iBAAiB;AAAA,MACtD,oBAAoB,WAAW,aAAa,sBAAsB;AAAA;AAEzE,UAAM,OAAO,WAAW;AAAA;", 6 6 "names": [] 7 7 } -
turbo-admin/trunk/readme.txt
r2702239 r2703739 6 6 Tested up to: 5.9 7 7 Requires PHP: 7.2 8 Stable tag: 1. 7.08 Stable tag: 1.9.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 27 27 28 28 * A fast-action, keyboard driven command palette: Think Apple Spotlight, or Alfred, but in WordPress! 29 * The command palette is pop-up/modal by default, but has an option to be present in the admin bar. 30 * A "barkeeper" that hides non-critical admin-bar items in a slide-out panel. 29 31 * (Experimental) Notice hiding: Tidy your dashboard by hiding admin notices in a separate, slide-out panel. 30 32 * (Experimental/Beta): List table keyboard shortcuts - use vim-like keys to navigate lsit tables. … … 73 75 74 76 As well as commands, the plugin will also search content that is made available through the REST API (as long as the REST API can be discovered). 77 78 ## Admin bar search mode 79 80 The command palette is pop-up/modal by default. But if you forget it's there then you can opt to have the command palette as an always-displayed search box in the admin bar. 81 82 To use this mode, visit your user profile, find the "Turbo Admin settings" section and check the "Admin bar search" option. Be sure to click "Update Profile" to save the change. 83 84 ## Barkeeper 85 86 The "Barkeeper" hides away non-critical admin-bar items in a slide-out panel. Click the arrow to toggle the panel open and closed. 87 88 The Barkeeper keeps a few items that I've deemed as critical, such as the site name and the updates icon/notification. 89 90 To enable the Barkeeper feature, visit your user profile, find the "Turbo Admin settings" section and check the "Barkeeper" option. Be sure to click "Update Profile" to save the change. 91 92 This feature pairs really well with the admin bar search mode, freeing up space for the admin-bar search box. 75 93 76 94 ## Using the (experimental) Notice Hiding feature … … 151 169 == Changelog == 152 170 171 = 1.9.0 = 172 * [FEATURE] Admin bar search mode 173 * [FEATURE] Barkeeper 174 * [ENHANCEMENT] Better post type detection in the command palette 175 * [FIX] Notice hiding didn't work! Fixed. 176 153 177 = 1.7.0 = 154 178 * [FEATURE] Re-designed notice hiding (still experimental) -
turbo-admin/trunk/src/class-turbo-admin-palette.js
r2702218 r2703739 184 184 const itemTitle = item.title; 185 185 // const itemTitle = item.title.rendered; 186 const itemType = item. type;186 const itemType = item.subtype; 187 187 const itemUrl = item.url; 188 188 … … 372 372 showPalette() { 373 373 this.paletteInputElement.value = ''; 374 this.paletteItemsElement.scrollTop = 0; 374 375 this.paletteElement?.classList.add('active'); 375 376 this.paletteInputElement?.focus(); … … 379 380 this.navigating = false; 380 381 this.paletteElement?.classList.remove('active'); 382 this.paletteInputElement.value = ''; 383 this.paletteInputElement.blur(); 381 384 if (this.isSubMenuOpen()) { 382 385 this.closeSubMenu(); … … 491 494 subMenuElement.classList.add('active'); 492 495 496 497 this.selectedSubItem = subMenuElement.querySelector('li'); 498 this.openedSubMenu = subMenuElement; 499 this.setSelectedElement(); 500 493 501 this.paletteInputElement.disabled = true; 494 502 // Blur the input so that keys can continue to be captured 495 503 this.paletteInputElement.blur(); 496 497 this.selectedSubItem = subMenuElement.querySelector('li');498 this.openedSubMenu = subMenuElement;499 this.setSelectedElement();500 504 } 501 505 -
turbo-admin/trunk/src/class-turbo-admin-wp-notices.js
r2702218 r2703739 13 13 14 14 /* 15 * These are the global notice selectors - these are always hidden15 * These are the global notice selectors 16 16 */ 17 17 this.noticeSelectors = [ … … 122 122 123 123 /** 124 * Add button .124 * Add button 125 125 */ 126 126 /** @type {HTMLButtonElement} */ … … 264 264 } 265 265 } 266 267 268 266 269 267 /* -
turbo-admin/trunk/src/class-turbo-admin.js
r2702218 r2703739 50 50 import TurboAdminWpNotices from './class-turbo-admin-wp-notices.js'; 51 51 import TurboAdminListTableShortcuts from './class-list-table-shortcuts.js'; 52 import TurboAdminBarkeeper from './class-turbo-admin-barkeeper.js'; 52 53 53 54 export default class TurboAdmin { … … 134 135 if (true === this.options['list-table-keyboard-shortcuts']) { 135 136 this.turboAdminListTableShortcuts = new TurboAdminListTableShortcuts(); 137 } 138 139 if (true === this.options['barkeeper']) { 140 // In the plugin, barkeeper-state will be in... local storage(?) 141 if ('object' !== typeof(browser)) { 142 this.options['barkeeper-state'] = window.localStorage.getItem('turboAdminBarkeeperState'); 143 } 144 this.turboAdminBarkeeper = new TurboAdminBarkeeper(this.options['barkeeper-state']); 136 145 } 137 146 … … 351 360 352 361 addPalette() { 353 // Container354 362 const container = document.createElement('div'); 355 363 container.id = 'ta-command-palette-container'; … … 372 380 palette.appendChild(list); 373 381 374 document.querySelector(this.options.appendToElement ?? 'body').appendChild(container); 382 if (document.getElementById('wpadminbar') && this.options['admin-bar-search'] === true) { 383 const paletteLi = document.createElement('li'); 384 paletteLi.appendChild(container); 385 const adminBar = document.getElementById('wp-admin-bar-top-secondary'); 386 adminBar.appendChild(paletteLi); 387 388 // Add focus handler 389 input.addEventListener('focus', e => this.turboAdminPalette.showPalette()); 390 391 // Add placeholder 392 const placeholder = document.createElement('div'); 393 placeholder.id = 'ta-shortcut-key-placeholder'; 394 placeholder.innerText = this.buildShortcutKeysString(); 395 placeholder.addEventListener('click', e => input.focus()); 396 397 palette.insertBefore( placeholder, list ); 398 } else { 399 // Container 400 document.querySelector(this.options.appendToElement ?? 'body').appendChild(container); 401 } 402 } 403 404 buildShortcutKeysString () { 405 let keysString = ''; 406 let shortcut = this.options.shortcutKeys[0]; 407 408 if ( shortcut.meta ) { 409 keysString += 'Cmd-'; 410 } 411 if ( shortcut.ctrl ) { 412 keysString += 'Ctrl-'; 413 } 414 if ( shortcut.alt ) { 415 keysString += 'Alt-'; 416 } 417 if ( shortcut.shift ) { 418 keysString += 'Shift-'; 419 } 420 keysString += shortcut.key.toUpperCase(); 421 return keysString; 375 422 } 376 423 -
turbo-admin/trunk/src/main.js
r2702218 r2703739 17 17 return; 18 18 } 19 // document.addEventListener('DOMContentLoaded', e => {20 // turboAdmin = new TurboAdmin(globalThis.turboAdminOptions);21 // });22 19 23 20 globalThis.turboAdminOptions = settings[taStorageKey]; … … 61 58 'list-table-keyboard-shortcuts': globalThis.wpTurboAdmin['listTableShortcuts'] === '1', 62 59 'hide-notices': globalThis.wpTurboAdmin['hideNotices'] === '1', 63 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array() 60 'rememberedNoticeIds': JSON.parse(window.localStorage.getItem('rememberedNoticeIds')) ?? new Array(), 61 'barkeeper': globalThis.wpTurboAdmin['barkeeper'] === '1', 62 'admin-bar-search': globalThis.wpTurboAdmin['adminBarSearch'] === '1', 64 63 } 65 64 await taInit(globalThis.turboAdminOptions); -
turbo-admin/trunk/turbo-admin.css
r2702218 r2703739 208 208 } 209 209 210 /* 211 * Palette in admin bar 212 */ 213 #wpadminbar #ta-command-palette-container { 214 top: auto; 215 left: auto; 216 width: auto; 217 height: auto; 218 position: relative; 219 background-color: none; 220 transition: none; 221 } 222 223 /* This resets stupid styles in the wpadminbar */ 224 #wpadminbar #ta-command-palette-container * { 225 line-height: 1; 226 box-sizing: border-box; 227 } 228 #wpadminbar #ta-command-palette-container li { 229 float: none; 230 position: static; 231 } 232 233 #wpadminbar #ta-command-palette { 234 width: 250px; 235 position: relative; 236 top: auto; 237 left: auto; 238 transform: none; 239 opacity: 1; 240 transition: none; 241 padding: 3px 5px 3px 5px; 242 background-color: #1d2327; 243 } 244 245 #wpadminbar #ta-command-palette-input { 246 line-height: 1.6; 247 margin-bottom: 0; 248 padding: 2px 8px; 249 min-height: auto; 250 background-color: #444; 251 border-radius: 6px; 252 } 253 254 #wpadminbar #ta-shortcut-key-placeholder { 255 position: absolute; 256 top: 8px; 257 left: 12px; 258 } 259 260 #wpadminbar #ta-command-palette.loading::after { 261 top: 6px; 262 right: 10px; 263 } 264 265 #wpadminbar #ta-command-palette-items { 266 padding-top: 0; 267 max-height: 0; 268 opacity: 0; 269 /* overflow: scroll; */ 270 transition: all 0.3s; 271 background-color: #1d2327; 272 } 273 274 #wpadminbar #ta-command-palette-items li { 275 width: 100%; 276 } 277 278 #wpadminbar #ta-command-palette-items li a { 279 width: 100%; 280 height: auto; 281 } 282 #wpadminbar #ta-command-palette-items .ta-submenu { 283 background-color: #1d2327; 284 } 285 #wpadminbar #ta-command-palette-items .ta-has-child-menu.selected { 286 z-index: 9999999; /* Needs to be higher than #ta-command-palette-container */ 287 } 288 289 #wpadminbar #ta-command-palette-container.active { 290 background-color: transparent; 291 } 292 293 #wpadminbar #ta-command-palette-container.active #ta-command-palette { 294 top: auto; 295 } 296 297 #wpadminbar #ta-command-palette-container.active #ta-command-palette-input { 298 } 299 300 #wpadminbar #ta-command-palette-container.active #ta-shortcut-key-placeholder { 301 display: none; 302 } 303 304 #wpadminbar #ta-command-palette-container.active #ta-command-palette-items { 305 padding-top: 8px; 306 max-height: 400px; 307 opacity: 1; 308 } 309 210 310 /* Notices panel */ 211 311 … … 309 409 background-color: #ddd !important; 310 410 } 411 412 /** 413 * Barkeeper 414 * 415 * Note: adminbar styles are stupidly specific 416 */ 417 #wpadminbar .ta-barkeeper-collapsable { 418 max-width: 100vw; 419 height: 100%; 420 transition: opacity 0.2s 0.5s, max-width 0.5s; 421 422 } 423 #wpadminbar #wp-admin-bar-root-default.ta-barkeeper-closed .ta-barkeeper-collapsable { 424 max-width: 0; 425 overflow: hidden; 426 opacity: 0; 427 transition: opacity 0.2s, max-width 0.5s 0.2s 428 } 429 430 #wpadminbar #ta-barkeeper-toggle { 431 border: 0 none; 432 box-shadow: none; 433 background-color: #444; 434 display: flex; 435 box-sizing: border-box; 436 margin: 3px; 437 padding: 0; 438 height: calc( 32px - 6px ); 439 width: 24px; 440 border-radius: 6px; 441 float: left; 442 color: white; 443 justify-content: center; 444 align-items: center; 445 overflow: hidden; 446 text-indent: 32px; 447 position: relative; 448 } 449 #wpadminbar #ta-barkeeper-toggle:before { 450 display: block; 451 content: ''; 452 background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22h-6%20w-6%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22%23FFFFFF%22%20stroke-width%3D%222%22%3E%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M15%2019l-7-7%207-7%22%20%2F%3E%3C%2Fsvg%3E'); 453 background-size: 20px; 454 background-repeat: no-repeat; 455 background-position: center; 456 transition: transform 0.3s; 457 position: absolute; 458 top: 0; 459 left: 0; 460 width: 100%; 461 height: 100%; 462 text-align: center; 463 line-height: calc( 32px - 6px ); 464 text-indent: 0; 465 } 466 467 #wpadminbar #wp-admin-bar-root-default.ta-barkeeper-closed + #ta-barkeeper-toggle:before { 468 transform: rotate(180deg); 469 } 470 471 /* Mobile admin bar */ 472 @media screen and (max-width: 782px) { 473 #wpadminbar #ta-barkeeper-toggle { 474 height: 40px; 475 width: 32px; 476 text-indent: 50px; 477 } 478 } -
turbo-admin/trunk/turbo-admin.php
r2702218 r2703739 9 9 * Text Domain: turbo-admin 10 10 * Domain Path: /languages 11 * Version: 1. 7.011 * Version: 1.9.0 12 12 * 13 13 * @package Turbo_Admin … … 34 34 define('TURBO_ADMIN_SHORTCUT_META_NAME', 'turbo-admin-shortcut'); 35 35 define('TURBO_ADMIN_HIDE_NOTICES_META_NAME', 'turbo-admin-hide-notices'); 36 define('TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME', 'turbo-admin-admin-bar-search'); 37 define('TURBO_ADMIN_BARKEEPER_META_NAME', 'turbo-admin-barkeeper'); 36 38 define('TURBO_ADMIN_LIST_TABLE_SHORTCUTS_NAME', 'turbo-admin-list-table-shortcuts'); 37 39 … … 41 43 $userShortcutKeys = userShortcutKeys(); 42 44 $hideNotices = get_user_meta( get_current_user_id(), TURBO_ADMIN_HIDE_NOTICES_META_NAME, true ); 45 $adminBarSearch = get_user_meta( get_current_user_id(), TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, true ); 46 $barkeeper = get_user_meta( get_current_user_id(), TURBO_ADMIN_BARKEEPER_META_NAME, true ); 43 47 $listTableShortcuts = get_user_meta( get_current_user_id(), TURBO_ADMIN_LIST_TABLE_SHORTCUTS_NAME, true ); 44 48 … … 54 58 'keys' => $shortcutKeys, 55 59 'hideNotices' => intval( $hideNotices ) === 1, 60 'adminBarSearch' => intval( $adminBarSearch ) === 1, 61 'barkeeper' => intval( $barkeeper ) === 1, 56 62 'listTableShortcuts' => intval( $listTableShortcuts ) === 1, 57 63 ] ); … … 119 125 $hideIcon = get_hide_icon($user->ID); 120 126 $hideNotices = get_user_meta( get_current_user_id(), TURBO_ADMIN_HIDE_NOTICES_META_NAME, true ); 127 $adminBarSearch = get_user_meta( get_current_user_id(), TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, true ); 128 $barkeeper = get_user_meta( get_current_user_id(), TURBO_ADMIN_BARKEEPER_META_NAME, true ); 121 129 $listTableShortcuts = get_user_meta( get_current_user_id(), TURBO_ADMIN_LIST_TABLE_SHORTCUTS_NAME, true ); 122 130 ?> … … 170 178 </label> 171 179 <br> 180 <label for="turbo-admin-admin-bar-search"> 181 <input name="turbo-admin-admin-bar-search" type="checkbox" id="turbo-admin-admin-bar-search" value="1" <?php checked($adminBarSearch) ?>> 182 Admin bar search (moves the palette to the admin bar) 183 </label> 184 <br> 185 <label for="turbo-admin-barkeeper"> 186 <input name="turbo-admin-barkeeper" type="checkbox" id="turbo-admin-barkeeper" value="1" <?php checked($barkeeper) ?>> 187 Barkeeper (hides items in the admin bar) 188 </label> 189 <br> 172 190 <label for="turbo-admin-list-table-shortcuts"> 173 191 <input name="turbo-admin-list-table-shortcuts" type="checkbox" id="turbo-admin-list-table-shortcuts" value="1" <?php checked($listTableShortcuts) ?>> … … 208 226 } else { 209 227 update_user_meta($user_id, TURBO_ADMIN_HIDE_NOTICES_META_NAME, 0); 228 } 229 if (isset($_POST['turbo-admin-admin-bar-search']) && in_array(intval($_POST['turbo-admin-admin-bar-search']), [0, 1], true) ) { 230 update_user_meta($user_id, TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, $_POST['turbo-admin-admin-bar-search']); 231 } else { 232 update_user_meta($user_id, TURBO_ADMIN_ADMIN_BAR_SEARCH_META_NAME, 0); 233 } 234 if (isset($_POST['turbo-admin-barkeeper']) && in_array(intval($_POST['turbo-admin-barkeeper']), [0, 1], true) ) { 235 update_user_meta($user_id, TURBO_ADMIN_BARKEEPER_META_NAME, $_POST['turbo-admin-barkeeper']); 236 } else { 237 update_user_meta($user_id, TURBO_ADMIN_BARKEEPER_META_NAME, 0); 210 238 } 211 239 if (isset($_POST['turbo-admin-list-table-shortcuts']) && in_array(intval($_POST['turbo-admin-list-table-shortcuts']), [0, 1], true) ) {
Note: See TracChangeset
for help on using the changeset viewer.