main.js 203 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283
  1. /*
  2. THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
  3. if you want to view the source visit the plugins github repository
  4. */
  5. 'use strict';
  6. var obsidian = require('obsidian');
  7. var state = require('@codemirror/state');
  8. var view = require('@codemirror/view');
  9. var language = require('@codemirror/language');
  10. /******************************************************************************
  11. Copyright (c) Microsoft Corporation.
  12. Permission to use, copy, modify, and/or distribute this software for any
  13. purpose with or without fee is hereby granted.
  14. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  15. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  16. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  17. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  18. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  19. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20. PERFORMANCE OF THIS SOFTWARE.
  21. ***************************************************************************** */
  22. function __awaiter(thisArg, _arguments, P, generator) {
  23. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  24. return new (P || (P = Promise))(function (resolve, reject) {
  25. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  26. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  27. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  28. step((generator = generator.apply(thisArg, _arguments || [])).next());
  29. });
  30. }
  31. const matchTypes = {
  32. 'exact': "Exact match",
  33. 'contains': "Contains value",
  34. 'whiteSpace': "Value within whitespace separated words",
  35. 'startswith': "Starts with this value",
  36. 'endswith': "Ends with this value"
  37. };
  38. const matchSign = {
  39. 'exact': "",
  40. 'contains': "*",
  41. 'startswith': "^",
  42. 'endswith': "$",
  43. 'whiteSpace': "~"
  44. };
  45. const matchPreview = {
  46. 'exact': "with value",
  47. 'contains': "containing",
  48. 'whiteSpace': "containing",
  49. 'startswith': "starting with",
  50. 'endswith': "ending with"
  51. };
  52. const matchPreviewPath = {
  53. 'exact': "is",
  54. 'contains': "contains",
  55. 'whiteSpace': "contains",
  56. 'startswith': "starts with",
  57. 'endswith': "ends with"
  58. };
  59. const selectorType = {
  60. 'attribute': 'Attribute value',
  61. 'tag': 'Tag',
  62. 'path': 'Note path'
  63. };
  64. class CSSLink {
  65. constructor() {
  66. this.type = 'attribute';
  67. this.name = "";
  68. this.value = "";
  69. this.matchCaseSensitive = false;
  70. this.match = "exact";
  71. let s4 = () => {
  72. return Math.floor((1 + Math.random()) * 0x10000)
  73. .toString(16)
  74. .substring(1);
  75. };
  76. //return id of format 'aaaaaaaa'-'aaaa'-'aaaa'-'aaaa'-'aaaaaaaaaaaa'
  77. this.uid = s4() + "-" + s4();
  78. this.selectText = true;
  79. this.selectAppend = true;
  80. this.selectPrepend = true;
  81. this.selectBackground = true;
  82. }
  83. }
  84. function displayText(link, settings) {
  85. if (link.type === 'tag') {
  86. if (!link.value) {
  87. return "<b>Please choose a tag</b>";
  88. }
  89. return `<span class="data-link-icon data-link-text data-link-icon-after" data-link-tags="${link.value}">Note</span> has tag <a class="tag">#${link.value}</a>`;
  90. }
  91. else if (link.type === 'attribute') {
  92. if (settings.targetAttributes.length === 0) {
  93. return `<b>No attributes added to "Target attributes". Go to plugin settings to add them.</b>`;
  94. }
  95. if (!link.name) {
  96. return "<b>Please choose an attribute name.</b>";
  97. }
  98. if (!link.value) {
  99. return "<b>Please choose an attribute value.</b>";
  100. }
  101. return `<span class="data-link-icon data-link-text data-link-icon-after" data-link-${link.name}="${link.value}">Note</span> has attribute <b>${link.name}</b> ${matchPreview[link.match]} <b>${link.value}</b>.`;
  102. }
  103. if (!link.value) {
  104. return "<b>Please choose a path.</b>";
  105. }
  106. return `The path of the <span class="data-link-icon data-link-text data-link-icon-after" data-link-path="${link.value}">note</span> ${matchPreviewPath[link.match]} <b>${link.value}</b>`;
  107. }
  108. function updateDisplay(textArea, link, settings) {
  109. let toDisplay = displayText(link, settings);
  110. let disabled = false;
  111. if (link.type === 'tag') {
  112. if (!link.value) {
  113. disabled = true;
  114. }
  115. }
  116. else if (link.type === 'attribute') {
  117. if (settings.targetAttributes.length === 0) {
  118. disabled = true;
  119. }
  120. else if (!link.name) {
  121. disabled = true;
  122. }
  123. else if (!link.value) {
  124. disabled = true;
  125. }
  126. }
  127. else {
  128. if (!link.value) {
  129. disabled = true;
  130. }
  131. }
  132. textArea.innerHTML = toDisplay;
  133. return disabled;
  134. }
  135. class CSSBuilderModal extends obsidian.Modal {
  136. constructor(plugin, saveCallback, cssLink = null) {
  137. super(plugin.app);
  138. this.cssLink = cssLink;
  139. if (!cssLink) {
  140. this.cssLink = new CSSLink();
  141. }
  142. this.plugin = plugin;
  143. this.saveCallback = saveCallback;
  144. }
  145. onOpen() {
  146. this.titleEl.setText(`Select what links to style!`);
  147. // is tag
  148. const matchAttrPlaceholder = "Attribute value to match.";
  149. const matchTagPlaceholder = "Note tag to match (without #).";
  150. const matchPathPlaceholder = "File path to match.";
  151. const matchAttrTxt = "Attribute value";
  152. const matchTagTxt = "Tag";
  153. const matchPathTxt = "Path";
  154. const cssLink = this.cssLink;
  155. const plugin = this.plugin;
  156. this.contentEl.addClass("supercharged-modal");
  157. // Type
  158. new obsidian.Setting(this.contentEl)
  159. .setName("Type of selector")
  160. .setDesc("Attributes selects YAML and DataView attributes" +
  161. ", tags chooses the tags of a note, and path considers the name of the note including in what folder it is.")
  162. .addDropdown(dc => {
  163. Object.keys(selectorType).forEach((type) => {
  164. dc.addOption(type, selectorType[type]);
  165. if (type === this.cssLink.type) {
  166. dc.setValue(type);
  167. }
  168. });
  169. dc.onChange((type) => {
  170. cssLink.type = type;
  171. updateContainer(cssLink.type);
  172. saveButton.setDisabled(updateDisplay(preview, this.cssLink, this.plugin.settings));
  173. });
  174. });
  175. // attribute name
  176. const attrName = new obsidian.Setting(this.contentEl)
  177. .setName("Attribute name")
  178. .setDesc("What attribute to target? Make sure to first add target attributes to the settings at the top!")
  179. .addDropdown(dc => {
  180. plugin.settings.targetAttributes.forEach((attribute) => {
  181. dc.addOption(attribute, attribute);
  182. if (attribute === cssLink.name) {
  183. dc.setValue(attribute);
  184. }
  185. });
  186. dc.onChange(name => {
  187. cssLink.name = name;
  188. saveButton.setDisabled(updateDisplay(preview, cssLink, plugin.settings));
  189. });
  190. });
  191. // attribute value
  192. const attrValue = new obsidian.Setting(this.contentEl)
  193. .setName("Value to match")
  194. .setDesc("TODO")
  195. .addText(t => {
  196. t.setValue(cssLink.value);
  197. t.onChange(value => {
  198. cssLink.value = value;
  199. saveButton.setDisabled(updateDisplay(preview, cssLink, plugin.settings));
  200. });
  201. });
  202. this.contentEl.createEl('h4', { text: 'Advanced' });
  203. // matching type
  204. const matchingType = new obsidian.Setting(this.contentEl)
  205. .setName("Matching type")
  206. .setDesc("How to compare the attribute or path with the given value.")
  207. .addDropdown(dc => {
  208. Object.keys(matchTypes).forEach((key) => {
  209. dc.addOption(key, matchTypes[key]);
  210. if (key == cssLink.match) {
  211. dc.setValue(key);
  212. }
  213. });
  214. dc.onChange((value) => {
  215. cssLink.match = value;
  216. saveButton.setDisabled(updateDisplay(preview, cssLink, plugin.settings));
  217. });
  218. });
  219. // case sensitive
  220. const caseSensitiveTogglerContainer = new obsidian.Setting(this.contentEl)
  221. .setName("Case sensitive matching")
  222. .setDesc("Should the matching of the value be case sensitive?")
  223. .addToggle(b => {
  224. b.setValue(cssLink.matchCaseSensitive);
  225. b.onChange(value => {
  226. cssLink.matchCaseSensitive = value;
  227. b.setDisabled(updateDisplay(preview, cssLink, plugin.settings));
  228. });
  229. });
  230. if (!this.cssLink.name && this.plugin.settings.targetAttributes.length > 0) {
  231. this.cssLink.name = this.plugin.settings.targetAttributes[0];
  232. }
  233. const updateContainer = function (type) {
  234. if (type === 'attribute') {
  235. attrName.settingEl.show();
  236. attrValue.nameEl.setText(matchAttrTxt);
  237. attrValue.descEl.setText(matchAttrPlaceholder);
  238. matchingType.settingEl.show();
  239. caseSensitiveTogglerContainer.settingEl.show();
  240. }
  241. else if (type === 'tag') {
  242. attrName.settingEl.hide();
  243. attrValue.nameEl.setText(matchTagTxt);
  244. attrValue.descEl.setText(matchTagPlaceholder);
  245. matchingType.settingEl.hide();
  246. caseSensitiveTogglerContainer.settingEl.hide();
  247. }
  248. else {
  249. attrName.settingEl.hide();
  250. attrValue.nameEl.setText(matchPathTxt);
  251. attrValue.descEl.setText(matchPathPlaceholder);
  252. matchingType.settingEl.show();
  253. caseSensitiveTogglerContainer.settingEl.show();
  254. }
  255. };
  256. new obsidian.Setting(this.contentEl)
  257. .setName("Style options")
  258. .setDesc("What styling options are active? " +
  259. "Disabling options you won't use can improve performance slightly.")
  260. .addToggle(t => {
  261. t.onChange(value => {
  262. cssLink.selectText = value;
  263. });
  264. t.setValue(cssLink.selectText);
  265. t.setTooltip("Style link text");
  266. })
  267. .addToggle(t => {
  268. t.onChange(value => {
  269. cssLink.selectPrepend = value;
  270. });
  271. t.setValue(cssLink.selectPrepend);
  272. t.setTooltip("Add content before link");
  273. })
  274. .addToggle(t => {
  275. t.onChange(value => {
  276. cssLink.selectAppend = value;
  277. });
  278. t.setValue(cssLink.selectAppend);
  279. t.setTooltip("Add content after link");
  280. })
  281. .addToggle(t => {
  282. t.onChange(value => {
  283. cssLink.selectBackground = value;
  284. });
  285. t.setValue(cssLink.selectBackground);
  286. t.setTooltip("Add optional background or underline to link");
  287. });
  288. this.contentEl.createEl('h4', { text: 'Result' });
  289. const modal = this;
  290. const saveButton = new obsidian.Setting(this.contentEl)
  291. .setName("Preview")
  292. .setDesc("")
  293. .addButton(b => {
  294. b.setButtonText("Save");
  295. b.onClick(() => {
  296. modal.saveCallback(cssLink);
  297. modal.close();
  298. });
  299. });
  300. // generate button
  301. const preview = saveButton.nameEl;
  302. updateContainer(cssLink.type);
  303. saveButton.setDisabled(updateDisplay(preview, this.cssLink, this.plugin.settings));
  304. }
  305. }
  306. const colorSet = [[
  307. '#0089BA',
  308. '#2C73D2',
  309. '#008E9B',
  310. '#0081CF',
  311. '#008F7A',
  312. '#008E9B',
  313. ], [
  314. '#D65DB1',
  315. '#0082C1',
  316. '#9270D3',
  317. '#007F93',
  318. '#007ED9',
  319. '#007660',
  320. ], [
  321. '#FF9671',
  322. '#A36AAA',
  323. '#F27D88',
  324. '#6967A9',
  325. '#D26F9D',
  326. '#1b6299',
  327. ], [
  328. '#FFC75F',
  329. '#4C9A52',
  330. '#C3BB4E',
  331. '#00855B',
  332. '#88AC4B',
  333. '#006F61',
  334. ], [
  335. '#FF6F91',
  336. '#6F7F22',
  337. '#E07250',
  338. '#257A3E',
  339. '#AC7C26',
  340. '#006F5F',
  341. ], [
  342. '#d9d867',
  343. '#2FAB63',
  344. '#B8E067',
  345. '#008E63',
  346. '#78C664',
  347. '#007160',
  348. ]];
  349. const colors = [];
  350. for (const i of Array(6).keys()) {
  351. for (const j of Array(6).keys()) {
  352. colors.push(colorSet[j][i]);
  353. }
  354. }
  355. function hash(uid) {
  356. let hash = 0;
  357. for (let i = 0; i < uid.length; i++) {
  358. const char = uid.charCodeAt(i);
  359. hash = ((hash << 5) - hash) + char;
  360. hash = hash & hash; // Convert to 32bit integer
  361. }
  362. hash = Math.abs(hash);
  363. return hash;
  364. }
  365. function buildCSS(selectors, plugin) {
  366. var _a;
  367. return __awaiter(this, void 0, void 0, function* () {
  368. const instructions = [
  369. "/* WARNING: This file will be overwritten by the plugin.",
  370. "Do not edit this file directly! First copy this file and rename it if you want to edit things. */",
  371. "",
  372. ":root {"
  373. ];
  374. selectors.forEach((selector, i) => {
  375. if (selector.selectText) {
  376. instructions.push(` --${selector.uid}-color: ${colors[hash(selector.uid) % 36]};`);
  377. instructions.push(` --${selector.uid}-weight: initial;`);
  378. }
  379. if (selector.selectPrepend) {
  380. instructions.push(` --${selector.uid}-before: '';`);
  381. }
  382. if (selector.selectAppend) {
  383. instructions.push(` --${selector.uid}-after: '';`);
  384. }
  385. if (selector.selectBackground) {
  386. instructions.push(` --${selector.uid}-background-color: #ffffff;`);
  387. instructions.push(` --${selector.uid}-decoration: initial;`);
  388. }
  389. });
  390. instructions.push("}");
  391. selectors.forEach(selector => {
  392. let cssSelector;
  393. if (selector.type === 'attribute') {
  394. cssSelector = `[data-link-${selector.name}${matchSign[selector.match]}="${selector.value}" ${selector.matchCaseSensitive ? "" : " i"}]`;
  395. }
  396. else if (selector.type === 'tag') {
  397. cssSelector = `[data-link-tags*="${selector.value}" i]`;
  398. }
  399. else {
  400. cssSelector = `[data-link-path${matchSign[selector.match]}="${selector.value}" ${selector.matchCaseSensitive ? "" : "i"}]`;
  401. }
  402. if (selector.selectText) {
  403. instructions.push(...[
  404. "",
  405. `div[data-id="${selector.uid}"] div.setting-item-description,`,
  406. cssSelector + " {",
  407. ` color: var(--${selector.uid}-color) !important;`,
  408. ` font-weight: var(--${selector.uid}-weight);`,
  409. "}"
  410. ]);
  411. }
  412. if (selector.selectBackground) {
  413. instructions.push(...["",
  414. `.c-${selector.uid}-use-background div[data-id="${selector.uid}"] div.setting-item-description,`,
  415. `.c-${selector.uid}-use-background .data-link-text${cssSelector} {`,
  416. ` background-color: var(--${selector.uid}-background-color) !important;`,
  417. ` border-radius: 5px;`,
  418. ` padding-left: 2px;`,
  419. ` padding-right: 2px;`,
  420. ` text-decoration: var(--${selector.uid}-decoration) !important;`,
  421. "}"]);
  422. }
  423. if (selector.selectPrepend) {
  424. instructions.push(...["",
  425. `div[data-id="${selector.uid}"] div.setting-item-description::before,`,
  426. `.data-link-icon${cssSelector}::before {`,
  427. ` content: var(--${selector.uid}-before);`,
  428. "}"]);
  429. }
  430. if (selector.selectAppend) {
  431. instructions.push(...["",
  432. `div[data-id="${selector.uid}"] div.setting-item-description::after,`,
  433. `.data-link-icon-after${cssSelector}::after {`,
  434. ` content: var(--${selector.uid}-after);`,
  435. "}"]);
  436. }
  437. });
  438. instructions.push(...[
  439. "/* @settings",
  440. "name: Supercharged Links",
  441. "id: supercharged-links",
  442. "settings:",
  443. ]);
  444. selectors.forEach((selector, i) => {
  445. let name = selector.name;
  446. let value = selector.value;
  447. if (selector.type === 'tag') {
  448. name = 'tag';
  449. // value = "\#" + value;
  450. }
  451. else if (selector.type === 'path') {
  452. name = 'path';
  453. }
  454. instructions.push(...[
  455. " - ",
  456. ` id: ${selector.uid}`,
  457. ` title: ${name} is ${value}`,
  458. ` description: Example note`,
  459. " type: heading",
  460. " collapsed: true",
  461. " level: 3"
  462. ]);
  463. if (selector.selectText) {
  464. instructions.push(...[
  465. " - ",
  466. ` id: ${selector.uid}-color`,
  467. ` title: Link color`,
  468. " type: variable-color",
  469. " format: hex",
  470. ` default: '${colors[hash(selector.uid) % 36]}'`,
  471. " - ",
  472. ` id: ${selector.uid}-weight`,
  473. ` title: Font weight`,
  474. " type: variable-select",
  475. ` default: initial`,
  476. ` options:`,
  477. ` - initial`,
  478. ` - lighter`,
  479. ` - normal`,
  480. ` - bold`,
  481. ` - bolder`,
  482. " - ",
  483. ` id: ${selector.uid}-decoration`,
  484. ` title: Font decoration`,
  485. " type: variable-select",
  486. ` default: initial`,
  487. ` options:`,
  488. ` - initial`,
  489. ` - underline`,
  490. ` - overline`,
  491. ` - line-through`
  492. ]);
  493. }
  494. if (selector.selectPrepend) {
  495. instructions.push(...[" - ",
  496. ` id: ${selector.uid}-before`,
  497. ` title: Prepend text`,
  498. ` description: Add some text, such as an emoji, before the links.`,
  499. " type: variable-text",
  500. ` default: ''`,
  501. ` quotes: true`]);
  502. }
  503. if (selector.selectAppend) {
  504. instructions.push(...[" - ",
  505. ` id: ${selector.uid}-after`,
  506. ` title: Append text`,
  507. ` description: Add some text, such as an emoji, after the links.`,
  508. " type: variable-text",
  509. ` default: ''`,
  510. ` quotes: true`]);
  511. }
  512. if (selector.selectBackground) {
  513. instructions.push(...[" - ",
  514. ` id: c-${selector.uid}-use-background`,
  515. ` title: Use background color`,
  516. ` description: Adds a background color to the link. This can look buggy in live preview.`,
  517. " type: class-toggle",
  518. " - ",
  519. ` id: ${selector.uid}-background-color`,
  520. ` title: Background color`,
  521. " type: variable-color",
  522. " format: hex",
  523. ` default: '#ffffff'`]);
  524. }
  525. });
  526. instructions.push("*/");
  527. const vault = plugin.app.vault;
  528. const configDir = (_a = vault.configDir) !== null && _a !== void 0 ? _a : ".obsidian";
  529. const pathDir = configDir + "/snippets";
  530. yield vault.adapter.mkdir(pathDir);
  531. const path = pathDir + "/supercharged-links-gen.css";
  532. if (yield vault.adapter.exists(path)) {
  533. yield vault.adapter.remove(path);
  534. }
  535. yield plugin.app.vault.create(path, instructions.join('\n'));
  536. // Activate snippet
  537. if (plugin.settings.activateSnippet) {
  538. // @ts-ignore
  539. const customCss = plugin.app.customCss;
  540. customCss.enabledSnippets.add('supercharged-links-gen');
  541. customCss.requestLoadSnippets();
  542. }
  543. // Ensure Style Settings reads changes
  544. plugin.app.workspace.trigger("parse-style-settings");
  545. });
  546. }
  547. function clearExtraAttributes(link) {
  548. Object.values(link.attributes).forEach(attr => {
  549. if (attr.name.includes("data-link")) {
  550. link.removeAttribute(attr.name);
  551. }
  552. });
  553. }
  554. function fetchTargetAttributesSync(app, settings, dest, addDataHref) {
  555. var _a;
  556. let new_props = { tags: "" };
  557. const cache = app.metadataCache.getFileCache(dest);
  558. if (!cache)
  559. return new_props;
  560. const frontmatter = cache.frontmatter;
  561. if (frontmatter) {
  562. settings.targetAttributes.forEach(attribute => {
  563. if (Object.keys(frontmatter).includes(attribute)) {
  564. if (attribute === 'tag' || attribute === 'tags') {
  565. new_props['tags'] += frontmatter[attribute];
  566. }
  567. else {
  568. new_props[attribute] = frontmatter[attribute];
  569. }
  570. }
  571. });
  572. }
  573. if (settings.targetTags) {
  574. new_props["tags"] += obsidian.getAllTags(cache).join(' ');
  575. }
  576. if (addDataHref) {
  577. new_props['data-href'] = dest.basename;
  578. }
  579. new_props['path'] = dest.path;
  580. //@ts-ignore
  581. const getResults = (api) => {
  582. const page = api.page(dest.path);
  583. if (!page) {
  584. return;
  585. }
  586. settings.targetAttributes.forEach((field) => {
  587. const value = page[field];
  588. if (value)
  589. new_props[field] = value;
  590. });
  591. };
  592. if (settings.getFromInlineField && app.plugins.enabledPlugins.has("dataview")) {
  593. const api = (_a = app.plugins.plugins.dataview) === null || _a === void 0 ? void 0 : _a.api;
  594. if (api) {
  595. getResults(api);
  596. }
  597. else
  598. this.plugin.registerEvent(this.app.metadataCache.on("dataview:api-ready", (api) => getResults(api)));
  599. }
  600. return new_props;
  601. }
  602. function setLinkNewProps(link, new_props) {
  603. // @ts-ignore
  604. for (const a of link.attributes) {
  605. if (a.name.includes("data-link") && !(a.name in new_props)) {
  606. link.removeAttribute(a.name);
  607. }
  608. }
  609. Object.keys(new_props).forEach(key => {
  610. const name = "data-link-" + key;
  611. const newValue = new_props[key];
  612. const curValue = link.getAttribute(name);
  613. // Only update if value is different
  614. if (!newValue || curValue != newValue) {
  615. link.setAttribute("data-link-" + key, new_props[key]);
  616. }
  617. });
  618. if (!link.hasClass("data-link-icon")) {
  619. link.addClass("data-link-icon");
  620. }
  621. if (!link.hasClass("data-link-icon-after")) {
  622. link.addClass("data-link-icon-after");
  623. }
  624. if (!link.hasClass("data-link-text")) {
  625. link.addClass("data-link-text");
  626. }
  627. }
  628. function updateLinkExtraAttributes(app, settings, link, destName) {
  629. const linkHref = link.getAttribute('href').split('#')[0];
  630. const dest = app.metadataCache.getFirstLinkpathDest(linkHref, destName);
  631. if (dest) {
  632. const new_props = fetchTargetAttributesSync(app, settings, dest, false);
  633. setLinkNewProps(link, new_props);
  634. }
  635. }
  636. function updateDivExtraAttributes(app, settings, link, destName, linkName) {
  637. if (!linkName) {
  638. linkName = link.textContent;
  639. }
  640. const dest = app.metadataCache.getFirstLinkpathDest(obsidian.getLinkpath(linkName), destName);
  641. if (dest) {
  642. const new_props = fetchTargetAttributesSync(app, settings, dest, true);
  643. setLinkNewProps(link, new_props);
  644. }
  645. }
  646. function updateElLinks(app, plugin, el, ctx) {
  647. const settings = plugin.settings;
  648. const links = el.querySelectorAll('a.internal-link');
  649. const destName = ctx.sourcePath.replace(/(.*).md/, "$1");
  650. links.forEach((link) => {
  651. updateLinkExtraAttributes(app, settings, link, destName);
  652. });
  653. }
  654. function updateVisibleLinks(app, plugin) {
  655. const settings = plugin.settings;
  656. app.workspace.iterateRootLeaves((leaf) => {
  657. if (leaf.view instanceof obsidian.MarkdownView && leaf.view.file) {
  658. const file = leaf.view.file;
  659. const cachedFile = app.metadataCache.getFileCache(file);
  660. //@ts-ignore
  661. const tabHeader = leaf.tabHeaderInnerTitleEl;
  662. if (settings.enableTabHeader) {
  663. // Supercharge tab headers
  664. updateDivExtraAttributes(app, settings, tabHeader, "");
  665. }
  666. else {
  667. clearExtraAttributes(tabHeader);
  668. }
  669. if (cachedFile.links) {
  670. cachedFile.links.forEach((link) => {
  671. const fileName = file.path.replace(/(.*).md/, "$1");
  672. const dest = app.metadataCache.getFirstLinkpathDest(link.link, fileName);
  673. if (dest) {
  674. const new_props = fetchTargetAttributesSync(app, settings, dest, false);
  675. const internalLinks = leaf.view.containerEl.querySelectorAll(`a.internal-link[href="${link.link}"]`);
  676. internalLinks.forEach((internalLink) => setLinkNewProps(internalLink, new_props));
  677. }
  678. });
  679. }
  680. }
  681. });
  682. }
  683. class SuperchargedLinksSettingTab extends obsidian.PluginSettingTab {
  684. constructor(app, plugin) {
  685. super(app, plugin);
  686. this.plugin = plugin;
  687. this.debouncedGenerate = obsidian.debounce(this._generateSnippet, 1000, true);
  688. }
  689. display() {
  690. let { containerEl } = this;
  691. containerEl.empty();
  692. /* Managing extra attirbutes for a.internal-link */
  693. new obsidian.Setting(containerEl)
  694. .setName('Target Attributes for styling')
  695. .setDesc('Frontmatter attributes to target, comma separated')
  696. .addTextArea((text) => {
  697. text
  698. .setPlaceholder('Enter attributes as string, comma separated')
  699. .setValue(this.plugin.settings.targetAttributes.join(', '))
  700. .onChange((value) => __awaiter(this, void 0, void 0, function* () {
  701. this.plugin.settings.targetAttributes = value.replace(/\s/g, '').split(',');
  702. if (this.plugin.settings.targetAttributes.length === 1 && !this.plugin.settings.targetAttributes[0]) {
  703. this.plugin.settings.targetAttributes = [];
  704. }
  705. yield this.plugin.saveSettings();
  706. }));
  707. text.inputEl.rows = 6;
  708. text.inputEl.cols = 25;
  709. });
  710. containerEl.createEl('h4', { text: 'Styling' });
  711. const styleSettingDescription = containerEl.createDiv();
  712. styleSettingDescription.innerHTML = `
  713. Styling can be done using the Style Settings plugin.
  714. <ol>
  715. <li>Create selectors down below.</li>
  716. <li>Go to the Style Settings tab and style your links!</li>
  717. </ol>`;
  718. const selectorDiv = containerEl.createDiv();
  719. this.drawSelectors(selectorDiv);
  720. containerEl.createEl('h4', { text: 'Settings' });
  721. new obsidian.Setting(containerEl)
  722. .setName('Enable in Editor')
  723. .setDesc('If true, this will also supercharge internal links in the editor view of a note.')
  724. .addToggle(toggle => {
  725. toggle.setValue(this.plugin.settings.enableEditor);
  726. toggle.onChange(value => {
  727. this.plugin.settings.enableEditor = value;
  728. this.plugin.saveSettings();
  729. updateVisibleLinks(app, this.plugin);
  730. });
  731. });
  732. new obsidian.Setting(containerEl)
  733. .setName('Enable in tab headers')
  734. .setDesc('If true, this will also supercharge the headers of a tab.')
  735. .addToggle(toggle => {
  736. toggle.setValue(this.plugin.settings.enableTabHeader);
  737. toggle.onChange(value => {
  738. this.plugin.settings.enableTabHeader = value;
  739. this.plugin.saveSettings();
  740. updateVisibleLinks(app, this.plugin);
  741. });
  742. });
  743. new obsidian.Setting(containerEl)
  744. .setName('Enable in File Browser')
  745. .setDesc('If true, this will also supercharge the file browser.')
  746. .addToggle(toggle => {
  747. toggle.setValue(this.plugin.settings.enableFileList);
  748. toggle.onChange(value => {
  749. this.plugin.settings.enableFileList = value;
  750. this.plugin.saveSettings();
  751. });
  752. });
  753. new obsidian.Setting(containerEl)
  754. .setName('Enable in Plugins')
  755. .setDesc('If true, this will also supercharge plugins like the backlinks and forward links panels.')
  756. .addToggle(toggle => {
  757. toggle.setValue(this.plugin.settings.enableBacklinks);
  758. toggle.onChange(value => {
  759. this.plugin.settings.enableBacklinks = value;
  760. this.plugin.saveSettings();
  761. });
  762. });
  763. new obsidian.Setting(containerEl)
  764. .setName('Enable in Quick Switcher')
  765. .setDesc('If true, this will also supercharge the quick switcher.')
  766. .addToggle(toggle => {
  767. toggle.setValue(this.plugin.settings.enableQuickSwitcher);
  768. toggle.onChange(value => {
  769. this.plugin.settings.enableQuickSwitcher = value;
  770. this.plugin.saveSettings();
  771. });
  772. });
  773. new obsidian.Setting(containerEl)
  774. .setName('Enable in Link Autocompleter')
  775. .setDesc('If true, this will also supercharge the link autocompleter.')
  776. .addToggle(toggle => {
  777. toggle.setValue(this.plugin.settings.enableSuggestor);
  778. toggle.onChange(value => {
  779. this.plugin.settings.enableSuggestor = value;
  780. this.plugin.saveSettings();
  781. });
  782. });
  783. containerEl.createEl('h4', { text: 'Advanced' });
  784. // Managing choice wether you want to parse tags both from normal tags and in the frontmatter
  785. new obsidian.Setting(containerEl)
  786. .setName('Parse all tags in the file')
  787. .setDesc('Sets the `data-link-tags`-attribute to look for tags both in the frontmatter and in the file as #tag-name')
  788. .addToggle(toggle => {
  789. toggle.setValue(this.plugin.settings.targetTags);
  790. toggle.onChange((value) => __awaiter(this, void 0, void 0, function* () {
  791. this.plugin.settings.targetTags = value;
  792. yield this.plugin.saveSettings();
  793. }));
  794. });
  795. // Managing choice wether you get attributes from inline fields and frontmatter or only frontmater
  796. new obsidian.Setting(containerEl)
  797. .setName('Search for attribute in Inline fields like <field::>')
  798. .setDesc('Sets the `data-link-<field>`-attribute to the value of inline fields')
  799. .addToggle(toggle => {
  800. toggle.setValue(this.plugin.settings.getFromInlineField);
  801. toggle.onChange((value) => __awaiter(this, void 0, void 0, function* () {
  802. this.plugin.settings.getFromInlineField = value;
  803. yield this.plugin.saveSettings();
  804. }));
  805. });
  806. // Automatically activate snippet
  807. new obsidian.Setting(containerEl)
  808. .setName('Automatically activate snippet')
  809. .setDesc('If true, this will automatically activate the generated CSS snippet "supercharged-links-gen.css". ' +
  810. 'Turn this off if you don\'t want this to happen.')
  811. .addToggle(toggle => {
  812. toggle.setValue(this.plugin.settings.activateSnippet);
  813. toggle.onChange((value) => __awaiter(this, void 0, void 0, function* () {
  814. this.plugin.settings.activateSnippet = value;
  815. yield this.plugin.saveSettings();
  816. }));
  817. });
  818. /* Managing predefined values for properties */
  819. /* Manage menu options display*/
  820. new obsidian.Setting(containerEl)
  821. .setName("Display field options in context menu")
  822. .setDesc("This feature has been migrated to metadata-menu plugin https://github.com/mdelobelle/metadatamenu");
  823. }
  824. generateSnippet() {
  825. this.debouncedGenerate();
  826. }
  827. _generateSnippet() {
  828. return __awaiter(this, void 0, void 0, function* () {
  829. yield buildCSS(this.plugin.settings.selectors, this.plugin);
  830. // new Notice("Generated supercharged-links-gen.css");
  831. });
  832. }
  833. drawSelectors(div) {
  834. div.empty();
  835. this.generateSnippet();
  836. const selectors = this.plugin.settings.selectors;
  837. selectors.forEach((selector, i) => {
  838. const s = new obsidian.Setting(div)
  839. .addButton(button => {
  840. button.onClick(() => {
  841. const oldSelector = selectors[i + 1];
  842. selectors[i + 1] = selector;
  843. selectors[i] = oldSelector;
  844. this.drawSelectors(div);
  845. });
  846. button.setIcon("down-arrow-with-tail");
  847. button.setTooltip("Move selector down");
  848. if (i === selectors.length - 1) {
  849. button.setDisabled(true);
  850. }
  851. })
  852. .addButton(button => {
  853. button.onClick(() => {
  854. const oldSelector = selectors[i - 1];
  855. selectors[i - 1] = selector;
  856. selectors[i] = oldSelector;
  857. this.drawSelectors(div);
  858. });
  859. button.setIcon("up-arrow-with-tail");
  860. button.setTooltip("Move selector up");
  861. if (i === 0) {
  862. button.setDisabled(true);
  863. }
  864. })
  865. .addButton(button => {
  866. button.onClick(() => {
  867. const formModal = new CSSBuilderModal(this.plugin, (newSelector) => {
  868. this.plugin.settings.selectors[i] = newSelector;
  869. this.plugin.saveSettings();
  870. updateDisplay(s.nameEl, selector, this.plugin.settings);
  871. this.generateSnippet();
  872. }, selector);
  873. formModal.open();
  874. });
  875. button.setIcon("pencil");
  876. button.setTooltip("Edit selector");
  877. })
  878. .addButton(button => {
  879. button.onClick(() => {
  880. this.plugin.settings.selectors.remove(selector);
  881. this.plugin.saveSettings();
  882. this.drawSelectors(div);
  883. });
  884. button.setIcon("cross");
  885. button.setTooltip("Remove selector");
  886. });
  887. updateDisplay(s.nameEl, selector, this.plugin.settings);
  888. });
  889. new obsidian.Setting(div)
  890. .setName("New selector")
  891. .setDesc("Create a new selector to style with Style Settings.")
  892. .addButton(button => {
  893. button.onClick(() => {
  894. const formModal = new CSSBuilderModal(this.plugin, (newSelector) => {
  895. this.plugin.settings.selectors.push(newSelector);
  896. this.plugin.saveSettings();
  897. this.drawSelectors(div);
  898. // TODO: Force redraw somehow?
  899. });
  900. formModal.open();
  901. });
  902. button.setButtonText("New");
  903. });
  904. }
  905. }
  906. const DEFAULT_SETTINGS = {
  907. targetAttributes: [],
  908. targetTags: true,
  909. getFromInlineField: true,
  910. enableTabHeader: true,
  911. activateSnippet: true,
  912. enableEditor: true,
  913. enableFileList: true,
  914. enableBacklinks: true,
  915. enableQuickSwitcher: true,
  916. enableSuggestor: true,
  917. selectors: []
  918. };
  919. function buildCMViewPlugin(app, _settings) {
  920. // Implements the live preview supercharging
  921. // Code structure based on https://github.com/nothingislost/obsidian-cm6-attributes/blob/743d71b0aa616407149a0b6ea5ffea28e2154158/src/main.ts
  922. // Code help credits to @NothingIsLost! They have been a great help getting this to work properly.
  923. class HeaderWidget extends view.WidgetType {
  924. constructor(attributes, after) {
  925. super();
  926. this.attributes = attributes;
  927. this.after = after;
  928. }
  929. toDOM() {
  930. let headerEl = document.createElement("span");
  931. headerEl.setAttrs(this.attributes);
  932. if (this.after) {
  933. headerEl.addClass('data-link-icon-after');
  934. }
  935. else {
  936. headerEl.addClass('data-link-icon');
  937. }
  938. // create a naive bread crumb
  939. return headerEl;
  940. }
  941. ignoreEvent() {
  942. return true;
  943. }
  944. }
  945. const settings = _settings;
  946. const viewPlugin = view.ViewPlugin.fromClass(class {
  947. constructor(view) {
  948. this.decorations = this.buildDecorations(view);
  949. }
  950. update(update) {
  951. if (update.docChanged || update.viewportChanged) {
  952. this.decorations = this.buildDecorations(update.view);
  953. }
  954. }
  955. destroy() {
  956. }
  957. buildDecorations(view$1) {
  958. let builder = new state.RangeSetBuilder();
  959. if (!settings.enableEditor) {
  960. return builder.finish();
  961. }
  962. const mdView = view$1.state.field(obsidian.editorViewField);
  963. let lastAttributes = {};
  964. let iconDecoAfter = null;
  965. let iconDecoAfterWhere = null;
  966. let mdAliasFrom = null;
  967. let mdAliasTo = null;
  968. for (let { from, to } of view$1.visibleRanges) {
  969. language.syntaxTree(view$1.state).iterate({
  970. from,
  971. to,
  972. enter: (node) => {
  973. const tokenProps = node.type.prop(language.tokenClassNodeProp);
  974. if (tokenProps) {
  975. const props = new Set(tokenProps.split(" "));
  976. const isLink = props.has("hmd-internal-link");
  977. const isAlias = props.has("link-alias");
  978. const isPipe = props.has("link-alias-pipe");
  979. // The 'alias' of the md link
  980. const isMDLink = props.has('link');
  981. // The 'internal link' of the md link
  982. const isMDUrl = props.has('url');
  983. const isMDFormatting = props.has('formatting-link');
  984. if (isMDLink && !isMDFormatting) {
  985. // Link: The 'alias'
  986. // URL: The internal link
  987. mdAliasFrom = node.from;
  988. mdAliasTo = node.to;
  989. }
  990. if (!isPipe && !isAlias) {
  991. if (iconDecoAfter) {
  992. builder.add(iconDecoAfterWhere, iconDecoAfterWhere, iconDecoAfter);
  993. iconDecoAfter = null;
  994. iconDecoAfterWhere = null;
  995. }
  996. }
  997. if (isLink && !isAlias && !isPipe || isMDUrl) {
  998. let linkText = view$1.state.doc.sliceString(node.from, node.to);
  999. linkText = linkText.split("#")[0];
  1000. let file = app.metadataCache.getFirstLinkpathDest(linkText, mdView.file.basename);
  1001. if (isMDUrl && !file) {
  1002. try {
  1003. file = app.vault.getAbstractFileByPath(decodeURIComponent(linkText));
  1004. }
  1005. catch (e) { }
  1006. }
  1007. if (file) {
  1008. let _attributes = fetchTargetAttributesSync(app, settings, file, true);
  1009. let attributes = {};
  1010. for (let key in _attributes) {
  1011. attributes["data-link-" + key] = _attributes[key];
  1012. }
  1013. let deco = view.Decoration.mark({
  1014. attributes,
  1015. class: "data-link-text"
  1016. });
  1017. let iconDecoBefore = view.Decoration.widget({
  1018. widget: new HeaderWidget(attributes, false),
  1019. });
  1020. iconDecoAfter = view.Decoration.widget({
  1021. widget: new HeaderWidget(attributes, true),
  1022. });
  1023. if (isMDUrl) {
  1024. // Apply retroactively to the alias found before
  1025. let deco = view.Decoration.mark({
  1026. attributes: attributes,
  1027. class: "data-link-text"
  1028. });
  1029. builder.add(mdAliasFrom, mdAliasFrom, iconDecoBefore);
  1030. builder.add(mdAliasFrom, mdAliasTo, deco);
  1031. if (iconDecoAfter) {
  1032. builder.add(mdAliasTo, mdAliasTo, iconDecoAfter);
  1033. iconDecoAfter = null;
  1034. iconDecoAfterWhere = null;
  1035. mdAliasFrom = null;
  1036. mdAliasTo = null;
  1037. }
  1038. }
  1039. else {
  1040. builder.add(node.from, node.from, iconDecoBefore);
  1041. }
  1042. builder.add(node.from, node.to, deco);
  1043. lastAttributes = attributes;
  1044. iconDecoAfterWhere = node.to;
  1045. }
  1046. }
  1047. else if (isLink && isAlias) {
  1048. let deco = view.Decoration.mark({
  1049. attributes: lastAttributes,
  1050. class: "data-link-text"
  1051. });
  1052. builder.add(node.from, node.to, deco);
  1053. if (iconDecoAfter) {
  1054. builder.add(node.to, node.to, iconDecoAfter);
  1055. iconDecoAfter = null;
  1056. iconDecoAfterWhere = null;
  1057. }
  1058. }
  1059. }
  1060. }
  1061. });
  1062. }
  1063. return builder.finish();
  1064. }
  1065. }, {
  1066. decorations: v => v.decorations
  1067. });
  1068. return viewPlugin;
  1069. }
  1070. class SuperchargedLinks extends obsidian.Plugin {
  1071. constructor() {
  1072. super(...arguments);
  1073. this.modalObservers = [];
  1074. }
  1075. onload() {
  1076. return __awaiter(this, void 0, void 0, function* () {
  1077. console.log('Supercharged links loaded');
  1078. yield this.loadSettings();
  1079. this.addSettingTab(new SuperchargedLinksSettingTab(this.app, this));
  1080. this.registerMarkdownPostProcessor((el, ctx) => {
  1081. updateElLinks(this.app, this, el, ctx);
  1082. });
  1083. const plugin = this;
  1084. const updateLinks = function (_file) {
  1085. updateVisibleLinks(plugin.app, plugin);
  1086. plugin.observers.forEach(([observer, type, own_class]) => {
  1087. const leaves = plugin.app.workspace.getLeavesOfType(type);
  1088. leaves.forEach(leaf => {
  1089. plugin.updateContainer(leaf.view.containerEl, plugin, own_class);
  1090. });
  1091. });
  1092. };
  1093. // Live preview
  1094. const ext = state.Prec.lowest(buildCMViewPlugin(this.app, this.settings));
  1095. this.registerEditorExtension(ext);
  1096. this.observers = [];
  1097. this.app.workspace.onLayoutReady(() => {
  1098. this.initViewObservers(this);
  1099. this.initModalObservers(this, document);
  1100. updateVisibleLinks(this.app, this);
  1101. });
  1102. // Initialization
  1103. this.registerEvent(this.app.workspace.on("window-open", (window, win) => this.initModalObservers(this, window.getContainer().doc)));
  1104. // Update when
  1105. // Debounced to prevent lag when writing
  1106. this.registerEvent(this.app.metadataCache.on('changed', obsidian.debounce(updateLinks, 500, true)));
  1107. // Update when layout changes
  1108. // @ts-ignore
  1109. this.registerEvent(this.app.workspace.on("layout-change", obsidian.debounce(updateLinks, 10, true)));
  1110. // Update plugin views when layout changes
  1111. // TODO: This is an expensive operation that seems like it is called fairly frequently. Maybe we can do this more efficiently?
  1112. this.registerEvent(this.app.workspace.on("layout-change", () => this.initViewObservers(this)));
  1113. });
  1114. }
  1115. initViewObservers(plugin) {
  1116. var _a, _b, _c, _d, _e, _f;
  1117. // Reset observers
  1118. plugin.observers.forEach(([observer, type]) => {
  1119. observer.disconnect();
  1120. });
  1121. plugin.observers = [];
  1122. // Register new observers
  1123. plugin.registerViewType('backlink', plugin, ".tree-item-inner", true);
  1124. plugin.registerViewType('outgoing-link', plugin, ".tree-item-inner", true);
  1125. plugin.registerViewType('search', plugin, ".tree-item-inner");
  1126. plugin.registerViewType('BC-matrix', plugin, '.BC-Link');
  1127. plugin.registerViewType('BC-ducks', plugin, '.internal-link');
  1128. plugin.registerViewType('BC-tree', plugin, 'a.internal-link');
  1129. plugin.registerViewType('graph-analysis', plugin, '.internal-link');
  1130. plugin.registerViewType('starred', plugin, '.nav-file-title-content');
  1131. plugin.registerViewType('file-explorer', plugin, '.nav-file-title-content');
  1132. plugin.registerViewType('recent-files', plugin, '.nav-file-title-content');
  1133. // If backlinks in editor is on
  1134. // @ts-ignore
  1135. if ((_f = (_e = (_d = (_c = (_b = (_a = plugin.app) === null || _a === void 0 ? void 0 : _a.internalPlugins) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.backlink) === null || _d === void 0 ? void 0 : _d.instance) === null || _e === void 0 ? void 0 : _e.options) === null || _f === void 0 ? void 0 : _f.backlinkInDocument) {
  1136. plugin.registerViewType('markdown', plugin, '.tree-item-inner', true);
  1137. }
  1138. }
  1139. initModalObservers(plugin, doc) {
  1140. const config = {
  1141. subtree: false,
  1142. childList: true,
  1143. attributes: false
  1144. };
  1145. this.modalObservers.push(new MutationObserver(records => {
  1146. records.forEach((mutation) => {
  1147. if (mutation.type === 'childList') {
  1148. mutation.addedNodes.forEach(n => {
  1149. if ('className' in n &&
  1150. // @ts-ignore
  1151. (n.className.includes('modal-container') && plugin.settings.enableQuickSwitcher
  1152. // @ts-ignore
  1153. || n.className.includes('suggestion-container') && plugin.settings.enableSuggestor)) {
  1154. let selector = ".suggestion-title, .suggestion-note, .another-quick-switcher__item__title, .omnisearch-result__title";
  1155. // @ts-ignore
  1156. if (n.className.includes('suggestion-container')) {
  1157. selector = ".suggestion-title, .suggestion-note";
  1158. }
  1159. plugin.updateContainer(n, plugin, selector);
  1160. plugin._watchContainer(null, n, plugin, selector);
  1161. }
  1162. });
  1163. }
  1164. });
  1165. }));
  1166. this.modalObservers.last().observe(doc.body, config);
  1167. }
  1168. registerViewType(viewTypeName, plugin, selector, updateDynamic = false) {
  1169. const leaves = this.app.workspace.getLeavesOfType(viewTypeName);
  1170. if (leaves.length > 1) {
  1171. for (let i = 0; i < leaves.length; i++) {
  1172. const container = leaves[i].view.containerEl;
  1173. if (updateDynamic) {
  1174. plugin._watchContainerDynamic(viewTypeName + i, container, plugin, selector);
  1175. }
  1176. else {
  1177. plugin._watchContainer(viewTypeName + i, container, plugin, selector);
  1178. }
  1179. }
  1180. }
  1181. else if (leaves.length < 1)
  1182. return;
  1183. else {
  1184. const container = leaves[0].view.containerEl;
  1185. this.updateContainer(container, plugin, selector);
  1186. if (updateDynamic) {
  1187. plugin._watchContainerDynamic(viewTypeName, container, plugin, selector);
  1188. }
  1189. else {
  1190. plugin._watchContainer(viewTypeName, container, plugin, selector);
  1191. }
  1192. }
  1193. }
  1194. updateContainer(container, plugin, selector) {
  1195. if (!plugin.settings.enableBacklinks)
  1196. return;
  1197. const nodes = container.findAll(selector);
  1198. for (let i = 0; i < nodes.length; ++i) {
  1199. const el = nodes[i];
  1200. updateDivExtraAttributes(plugin.app, plugin.settings, el, "");
  1201. }
  1202. }
  1203. removeFromContainer(container, selector) {
  1204. const nodes = container.findAll(selector);
  1205. for (let i = 0; i < nodes.length; ++i) {
  1206. const el = nodes[i];
  1207. clearExtraAttributes(el);
  1208. }
  1209. }
  1210. _watchContainer(viewType, container, plugin, selector) {
  1211. let observer = new MutationObserver((records, _) => {
  1212. plugin.updateContainer(container, plugin, selector);
  1213. });
  1214. observer.observe(container, { subtree: true, childList: true, attributes: false });
  1215. if (viewType) {
  1216. plugin.observers.push([observer, viewType, selector]);
  1217. }
  1218. }
  1219. _watchContainerDynamic(viewType, container, plugin, selector, own_class = 'tree-item-inner', parent_class = 'tree-item') {
  1220. // Used for efficient updating of the backlinks panel
  1221. // Only loops through newly added DOM nodes instead of changing all of them
  1222. let observer = new MutationObserver((records, _) => {
  1223. records.forEach((mutation) => {
  1224. if (mutation.type === 'childList') {
  1225. mutation.addedNodes.forEach((n) => {
  1226. if ('className' in n) {
  1227. // @ts-ignore
  1228. if (n.className.includes && typeof n.className.includes === 'function' && n.className.includes(parent_class)) {
  1229. const fileDivs = n.getElementsByClassName(own_class);
  1230. for (let i = 0; i < fileDivs.length; ++i) {
  1231. const link = fileDivs[i];
  1232. updateDivExtraAttributes(plugin.app, plugin.settings, link, "");
  1233. }
  1234. }
  1235. }
  1236. });
  1237. }
  1238. });
  1239. });
  1240. observer.observe(container, { subtree: true, childList: true, attributes: false });
  1241. plugin.observers.push([observer, viewType, selector]);
  1242. }
  1243. onunload() {
  1244. this.observers.forEach(([observer, type, own_class]) => {
  1245. observer.disconnect();
  1246. const leaves = this.app.workspace.getLeavesOfType(type);
  1247. leaves.forEach(leaf => {
  1248. this.removeFromContainer(leaf.view.containerEl, own_class);
  1249. });
  1250. });
  1251. for (const observer of this.modalObservers) {
  1252. observer.disconnect();
  1253. }
  1254. console.log('Supercharged links unloaded');
  1255. }
  1256. loadSettings() {
  1257. return __awaiter(this, void 0, void 0, function* () {
  1258. this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData());
  1259. });
  1260. }
  1261. saveSettings() {
  1262. return __awaiter(this, void 0, void 0, function* () {
  1263. yield this.saveData(this.settings);
  1264. });
  1265. }
  1266. }
  1267. module.exports = SuperchargedLinks;
  1268. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9jc3NCdWlsZGVyL2Nzc0xpbmsudHMiLCJzcmMvY3NzQnVpbGRlci9jc3NCdWlsZGVyTW9kYWwudHMiLCJzcmMvY3NzQnVpbGRlci9jc3NCdWlsZGVyLnRzIiwic3JjL2xpbmtBdHRyaWJ1dGVzL2xpbmtBdHRyaWJ1dGVzLnRzIiwic3JjL3NldHRpbmdzL1N1cGVyY2hhcmdlZExpbmtzU2V0dGluZ1RhYi50cyIsInNyYy9zZXR0aW5ncy9TdXBlcmNoYXJnZWRMaW5rc1NldHRpbmdzLnRzIiwic3JjL2xpbmtBdHRyaWJ1dGVzL2xpdmVQcmV2aWV3LnRzIiwibWFpbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbkNvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLlxyXG5cclxuUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55XHJcbnB1cnBvc2Ugd2l0aCBvciB3aXRob3V0IGZlZSBpcyBoZXJlYnkgZ3JhbnRlZC5cclxuXHJcblRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEhcclxuUkVHQVJEIFRPIFRISVMgU09GVFdBUkUgSU5DTFVESU5HIEFMTCBJTVBMSU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ENsYXNzKFwic3VwZXJjaGFyZ2VkLW1vZGFsXCIpO1xuXG4gICAgICAgIC8vIFR5cGVcbiAgICAgICAgbmV3IFNldHRpbmcodGhpcy5jb250ZW50RWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIlR5cGUgb2Ygc2VsZWN0b3JcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiQXR0cmlidXRlcyBzZWxlY3RzIFlBTUwgYW5kIERhdGFWaWV3IGF0dHJpYnV0ZXNcIiArXG4gICAgICAgICAgICAgICAgXCIsIHRhZ3MgY2hvb3NlcyB0aGUgdGFncyBvZiBhIG5vdGUsIGFuZCBwYXRoIGNvbnNpZGVycyB0aGUgbmFtZSBvZiB0aGUgbm90ZSBpbmNsdWRpbmcgaW4gd2hhdCBmb2xkZXIgaXQgaXMuXCIpXG4gICAgICAgICAgICAuYWRkRHJvcGRvd24oZGMgPT4ge1xuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHNlbGVjdG9yVHlwZSkuZm9yRWFjaCgodHlwZTogU2VsZWN0b3JUeXBlcykgPT4ge1xuICAgICAgICAgICAgICAgICAgICBkYy5hZGRPcHRpb24odHlwZSwgc2VsZWN0b3JUeXBlW3R5cGVdKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09IHRoaXMuY3NzTGluay50eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYy5zZXRWYWx1ZSh0eXBlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGRjLm9uQ2hhbmdlKCh0eXBlOiBTZWxlY3RvclR5cGVzKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNzc0xpbmsudHlwZSA9IHR5cGU7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUNvbnRhaW5lcihjc3NMaW5rLnR5cGUpO1xuICAgICAgICAgICAgICAgICAgICBzYXZlQnV0dG9uLnNldERpc2FibGVkKHVwZGF0ZURpc3BsYXkocHJldmlldywgdGhpcy5jc3NMaW5rLCB0aGlzLnBsdWdpbi5zZXR0aW5ncykpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gYXR0cmlidXRlIG5hbWVcbiAgICAgICAgY29uc3QgYXR0ck5hbWUgPSBuZXcgU2V0dGluZyh0aGlzLmNvbnRlbnRFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiQXR0cmlidXRlIG5hbWVcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiV2hhdCBhdHRyaWJ1dGUgdG8gdGFyZ2V0PyBNYWtlIHN1cmUgdG8gZmlyc3QgYWRkIHRhcmdldCBhdHRyaWJ1dGVzIHRvIHRoZSBzZXR0aW5ncyBhdCB0aGUgdG9wIVwiKVxuICAgICAgICAgICAgLmFkZERyb3Bkb3duKGRjID0+IHtcbiAgICAgICAgICAgICAgICBwbHVnaW4uc2V0dGluZ3MudGFyZ2V0QXR0cmlidXRlcy5mb3JFYWNoKChhdHRyaWJ1dGU6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgICAgICBkYy5hZGRPcHRpb24oYXR0cmlidXRlLCBhdHRyaWJ1dGUpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYXR0cmlidXRlID09PSBjc3NMaW5rLm5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRjLnNldFZhbHVlKGF0dHJpYnV0ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBkYy5vbkNoYW5nZShuYW1lID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY3NzTGluay5uYW1lID0gbmFtZTtcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUJ1dHRvbi5zZXREaXNhYmxlZCh1cGRhdGVEaXNwbGF5KHByZXZpZXcsIGNzc0xpbmssIHBsdWdpbi5zZXR0aW5ncykpO1xuICA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dlKHZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY3NzTGluay5tYXRjaENhc2VTZW5zaXRpdmUgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgYi5zZXREaXNhYmxlZCh1cGRhdGVEaXNwbGF5KHByZXZpZXcsIGNzc0xpbmssIHBsdWdpbi5zZXR0aW5ncykpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSlcblxuICAgICAgICBpZiAoIXRoaXMuY3NzTGluay5uYW1lICYmIHRoaXMucGx1Z2luLnNldHRpbmdzLnRhcmdldEF0dHJpYnV0ZXMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICB0aGlzLmNzc0xpbmsubmFtZSA9IHRoaXMucGx1Z2luLnNldHRpbmdzLnRhcmdldEF0dHJpYnV0ZXNbMF07XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB1cGRhdGVDb250YWluZXIgPSBmdW5jdGlvbih0eXBlOiBTZWxlY3RvclR5cGVzKSB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gJ2F0dHJpYnV0ZScpIHtcbiAgICAgICAgICAgICAgICBhdHRyTmFtZS5zZXR0aW5nRWwuc2hvdygpO1xuICAgICAgICAgICAgICAgIGF0dHJWYWx1ZS5uYW1lRWwuc2V0VGV4dChtYXRjaEF0dHJUeHQpO1xuICAgICAgICAgICAgICAgIGF0dHJWYWx1ZS5kZXNjRWwuc2V0VGV4dChtYXRjaEF0dHJQbGFjZWhvbGRlcik7XG4gICAgICAgICAgICAgICAgbWF0Y2hpbmdUeXBlLnNldHRpbmdFbC5zaG93KCk7XG4gICAgICAgICAgICAgICAgY2FzZVNlbnNpdGl2ZVRvZ2dsZXJDb250YWluZXIuc2V0dGluZ0VsLnNob3coKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT09ICd0YWcnKSB7XG4gICAgICAgICAgICAgICAgYXR0ck5hbWUuc2V0dGluZ0VsLmhp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cbiAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKHZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY3NzTGluay5zZWxlY3RUZXh0ID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB0LnNldFZhbHVlKGNzc0xpbmsuc2VsZWN0VGV4dCk7XG4gICAgICAgICAgICAgICAgdC5zZXRUb29sdGlwKFwiU3R5bGUgbGluayB0ZXh0XCIpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5hZGRUb2dnbGUodCA9PiB7XG4gICAgICAgICAgICAgICAgdC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNzc0xpbmsuc2VsZWN0UHJlcGVuZCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShjc3NMaW5rLnNlbGVjdFByZXBlbmQpO1xuICAgICAgICAgICAgICAgIHQuc2V0VG9vbHRpcChcIkFkZCBjb250ZW50IGJlZm9yZSBsaW5rXCIpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5hZGRUb2dnbGUodCA9PiB7XG4gICAgICAgICAgICAgICAgdC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNzc0xpbmsuc2VsZWN0QXBwZW5kID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB0LnNldFZhbHVlKGNzc0xpbmsuc2VsZWN0QXBwZW5kKTtcbiAgICAgICAgICAgICAgICB0LnNldFRvb2x0aXAoXCJBZGQgY29udGVudCBhZnRlciBsaW5rXCIpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5hZGRUb2dnbGUodCA9PiB7XG4gICAgICAgICAgICAgICAgdC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNzc0xpbmsuc2VsZWN0QmFja2dyb3VuZCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShjc3NMaW5rLnNlbGVjdEJhY2tncm91bmQpO1xuICAgICAgICAgICAgICAgIHQuc2V0VG9vbHRpcChcIkFkZCBvcHRpb25hbCBiYWNrZ3JvdW5kIG9yIHVuZGVybGluZSB0byBsaW5rXCIpO1xuICAgICAgICAgICAgfSk7XG5cblxuICAgICAgICB0aGlzLmNvbnRlbnRFbC5jcmVhdGVFbCgnaDQnLCB7dGV4dDogJ1Jlc3VsdCd9KTtcbiAgICAgICAgY29uc3QgbW9kYWwgPSB0aGlzO1xuICAgICAgICBjb25zdCBzYXZlQnV0dG9uID0gbmV3IFNldHRpbmcodGhpcy5jb250ZW50RWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIlByZXZpZXdcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiXCIpXG4gICAgICAgICAgICAuYWRkQnV0dG9uKGIgPT4ge1xuICAgICAgICAgICAgICAgIGIuc2V0QnV0dG9uVGV4dChcIlNhdmVcIilcbiAgICAgICAgICAgICAgICBiLm9uQ2xpY2soKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBtb2RhbC5zYXZlQ2FsbGJhY2soY3NzTGluayk7XG4gICAgICAgICAgICAgICAgICAgIG1vZGFsLmNsb3NlKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgLy8gZ2VuZXJhdGUgYnV0dG9uXG5cbiAgICAgICAgY29uc3QgcHJldmlldyA9IHNhdmVCdXR0b24ubmFtZUVsO1xuICAgICAgICB1cGRhdGVDb250YWluZXIoY3NzTGluay50eXBlKTtcbiAgICAgICAgc2F2ZUJ1dHRvbi5zZXREaXNhYmxlZCh1cGRhdGVEaXNwbGF5KHByZXZpZXcsIHRoaXMuY3NzTGluaywgdGhpcy5wbHVnaW4uc2V0dGluZ3MpKTtcbiAg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mUge2AsXG4gICAgICAgICAgICAgICAgYCAgICBjb250ZW50OiB2YXIoLS0ke3NlbGVjdG9yLnVpZH0tYmVmb3JlKTtgLFxuICAgICAgICAgICAgICAgIFwifVwiXSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNlbGVjdG9yLnNlbGVjdEFwcGVuZCkge1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goLi4uW1wiXCIsXG4gICAgICAgICAgICAgICAgYGRpdltkYXRhLWlkPVwiJHtzZWxlY3Rvci51aWR9XCJdIGRpdi5zZXR0aW5nLWl0ZW0tZGVzY3JpcHRpb246OmFmdGVyLGAsXG4gICAgICAgICAgICAgICAgYC5kYXRhLWxpbmstaWNvbi1hZnRlciR7Y3NzU2VsZWN0b3J9OjphZnRlciB7YCxcbiAgICAgICAgICAgICAgICBgICAgIGNvbnRlbnQ6IHZhcigtLSR7c2VsZWN0b3IudWlkfS1hZnRlcik7YCxcbiAgICAgICAgICAgICAgICBcIn1cIl0pO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaCguLi5bXG4gICAgICAgIFwiLyogQHNldHRpbmdzXCIsXG4gICAgICAgIFwibmFtZTogU3VwZXJjaGFyZ2VkIExpbmtzXCIsXG4gICAgICAgIFwiaWQ6IHN1cGVyY2hhcmdlZC1saW5rc1wiLFxuICAgICAgICBcInNldHRpbmdzOlwiLFxuICAgIF0pO1xuXG4gICAgc2VsZWN0b3JzLmZvckVhY2goKHNlbGVjdG9yLCBpKSA9PiB7XG4gICAgICAgIGxldCBuYW1lID0gc2VsZWN0b3IubmFtZTtcbiAgICAgICAgbGV0IHZhbHVlID0gc2VsZWN0b3IudmFsdWU7XG4gICAgICAgIGlmIChzZWxlY3Rvci50eXBlID09PSAndGFnJykge1xuICAgICAgICAgICAgbmFtZSA9ICd0YWcnO1xuICAgICAgICAgICAgLy8gdmFsdWUgPSBcIlxcI1wiICsgdmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoc2VsZWN0b3IudHlwZSA9PT0gJ3BhdGgnKXtcbiAgICAgICAgICAgIG5hbWUgPSAncGF0aCc7XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goLi4uW1xuICAgICAgICAgICAgXCIgICAgLSBcIixcbiAgICAgICAgICAgIGAgICAgICAgIGlkOiAke3NlbGVjdG9yLnVpZH1gLFxuICAgICAgICAgICAgYCAgICAgICAgdGl0bGU6ICR7bmFtZX0gaXMgJHt2YWx1ZX1gLFxuICAgICAgICAgICAgYCAgICAgICAgZGVzY3JpcHRpb246IEV4YW1wbGUgbm90ZWAsXG4gICAgICAgICAgICBcIiAgICAgICAgdHlwZTogaGVhZGluZ1wiLFxuICAgICAgICAgICAgXCIgICAgICAgIGNvbGxhcHNlZDogdHJ1ZVwiLFxuICAgICAgICAgICAgXCIgICAgICAgIGxldmVsOiAzXCJdKTtcbiAgICAgICAgaWYgKHNlbGVjdG9yLnNlbGVjdFRleHQpIHtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKC4uLltcbiAgICAgICAgICAgICAgICBcIiAgICAtIFwiLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIGlkOiAke3NlbGVjdG9yLnVpZH0tY29sb3JgLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIHRpdGxlOiBMaW5rIGNvbG9yYCxcbiAgICAgICAgICAgICAgICBcIiAgICAgICAgdHlwZTogdmFyaWFibGUtY29sb3JcIixcbiAgICAgICAgICAgICAgICBcIiAgICAgICAgZm9ybWF0OiBoZXhcIixcbiAgICAgICAgICAgICAgICBgICAgICAgICBkZWZhdWx0OiAnJHtjb2xvcnNbaGFzaChzZWxlY3Rvci51aWQpICUgMzZdfSdgLFxuICAgICAgICAgICAgICAgIFwiICAgIC0gXCIsXG4gICAgICAgICAgICAgICAgYCAgICAgICAgaWQ6ICR7c2VsZWN0b3IudWlkfS13ZWlnaHRgLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIHRpdGxlOiBGb250IHdlaWdodGAsXG4gICAgICAgICAgICAgICAgXCIgICAgICAgIHR5cGU6IHZhcmlhYmxlLXNlbGVjdFwiLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIGRlZmF1bHQ6IGluaXRpYWxgLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIG9wdGlvbnM6YCxcbiAgICAgICAgICAgICAgICBgICAgICAgICAgICAgLSBpbml0aWFsYCxcbiAgICAgICAgICAgICAgICBgICAgICAgICAgICAgLSBsaWdodGVyYCxcbiAgICAgICAgICAgICAgICBgICAgICAgICAgICAgLSBub3JtYWxgLFxuICAgICAgICAgICAgICAgIGAgICAgICAgICAgICAtIGJvbGRgLFxuICAgICAgICAgICAgICAgIGAgICAgICAgICAgICAtIGJvbGRlcmAsXG4gICAgICAgICAgICAgICAgXCIgICAgLSBcIixcbiAgICAgICAgICAgICAgICBgICAgICAgICBpZDogJHtzZWxlY3Rvci51aWR9LWRlY29yYXRpb25gLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIHRpdGxlOiBGb250IGRlY29yYXRpb25gLFxuICAgICAgICAgICAgICAgIFwiICAgICAgICB0eXBlOiB2YXJpYWJsZS1zZWxlY3RcIixcbiAgICAgICAgICAgICAgICBgICAgICAgICBkZWZhdWx0OiBpbml0aWFsYCxcbiAgICAgICAgICAgICAgICBgICAgICAgICBvcHRpb25zOmAsXG4gICAgICAgICAgICAgICAgYCAgICAgICAgICAgIC0gaW5pdGlhbGAsXG4gICAgICAgICAgICAgICAgYCAgICAgICAgICAgIC0gdW5kZXJsaW5lYCxcbiAgICAgICAgICAgICAgICBgICAgICAgICAgICAgLSBvdmVybGluZWAsXG4gICAgICAgICAgICAgICAgYCAgICAgICAgICAgIC0gbGluZS10aHJvdWdoYF0pXG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNlbGVjdG9yLnNlbGVjdFByZXBlbmQpIHtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKC4uLltcIiAgICAtIFwiLFxuICAgICAgICAgICAgYCAgICAgICAgaWQ6ICR7c2VsZWN0b3IudWlkfS1iZWZvcmVgLFxuICAgICAgICAgICAgYCAgICAgICAgdGl0bGU6IFByZXBlbmQgdGV4dGAsXG4gICAgICAgICAgICBgICAgICAgICBkZXNjcmlwdGlvbjogQWRkIHNvbWUgdGV4dCwgc3VjaCBhcyBhbiBlbW9qaSwgYmVmb3JlIHRoZSBsaW5rcy5gLFxuICAgICAgICAgICAgXCIgICAgICAgIHR5cGU6IHZhcmlhYmxlLXRleHRcIixcbiAgICAgICAgICAgIGAgICAgICAgIGRlZmF1bHQ6ICcnYCxcbiAgICAgICAgICAgIGAgICAgICAgIHF1b3RlczogdHJ1ZWBdKVxuICAgICAgICB9XG4gICAgICAgIGlmIChzZWxlY3Rvci5zZWxlY3RBcHBlbmQpIHtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKC4uLltcIiAgICAtIFwiLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIGlkOiAke3NlbGVjdG9yLnVpZH0tYWZ0ZXJgLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIHRpdGxlOiBBcHBlbmQgdGV4dGAsXG4gICAgICAgICAgICAgICAgYCAgICAgICAgZGVzY3JpcHRpb246IEFkZCBzb21lIHRleHQsIHN1Y2ggYXMgYW4gZW1vamksIGFmdGVyIHRoZSBsaW5rcy5gLFxuICAgICAgICAgICAgICAgIFwiICAgICAgICB0eXBlOiB2YXJpYWJsZS10ZXh0XCIsXG4gICAgICAgICAgICAgICAgYCAgICAgICAgZGVmYXVsdDogJydgLFxuICAgICAgICAgICAgICAgIGAgICAgICAgIHF1b3RlczogdHJ1ZWBdKVxuICAgICAgICB9XG4gICAgICAgIGlmKHNlbGVjdG9yLnNlbGVjdEJhY2tncm91bmQpIHtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKC4uLltcIiAgICAtIFwiLFxuICAgICAgICAgIC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uc3QgYXBpID0gYXBwLnBsdWdpbnMucGx1Z2lucy5kYXRhdmlldz8uYXBpO1xuICAgICAgICBpZiAoYXBpKSB7XG4gICAgICAgICAgICBnZXRSZXN1bHRzKGFwaSlcbiAgICAgICAgfVxuICAgICAgICBlbHNlXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5yZWdpc3RlckV2ZW50KFxuICAgICAgICAgICAgICAgIHRoaXMuYXBwLm1ldGFkYXRhQ2FjaGUub24oXCJkYXRhdmlldzphcGktcmVhZHlcIiwgKGFwaTogYW55KSA9PlxuICAgICAgICAgICAgICAgICAgICBnZXRSZXN1bHRzKGFwaSlcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApO1xuICAgIH1cblxuICAgIHJldHVybiBuZXdfcHJvcHNcbn1cblxuZnVuY3Rpb24gc2V0TGlua05ld1Byb3BzKGxpbms6IEhUTUxFbGVtZW50LCBuZXdfcHJvcHM6IFJlY29yZDxzdHJpbmcsIHN0cmluZz4pIHtcbiAgICAvLyBAdHMtaWdub3JlXG4gICAgZm9yIChjb25zdCBhIG9mIGxpbmsuYXR0cmlidXRlcykge1xuICAgICAgICBpZiAoYS5uYW1lLmluY2x1ZGVzKFwiZGF0YS1saW5rXCIpICYmICEoYS5uYW1lIGluIG5ld19wcm9wcykpIHtcbiAgICAgICAgICAgIGxpbmsucmVtb3ZlQXR0cmlidXRlKGEubmFtZSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgT2JqZWN0LmtleXMobmV3X3Byb3BzKS5mb3JFYWNoKGtleSA9PiB7XG4gICAgICAgIGNvbnN0IG5hbWUgPSBcImRhdGEtbGluay1cIiArIGtleTtcbiAgICAgICAgY29uc3QgbmV3VmFsdWUgPSBuZXdfcHJvcHNba2V5XTtcbiAgICAgICAgY29uc3QgY3VyVmFsdWUgPSBsaW5rLmdldEF0dHJpYnV0ZShuYW1lKTtcblxuICAgICAgICAvLyBPbmx5IHVwZGF0ZSBpZiB2YWx1ZSBpcyBkaWZmZX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cblxuICAgICAgICAgICAgaWYgKGNhY2hlZEZpbGUubGlua3MpIHtcbiAgICAgICAgICAgICAgICBjYWNoZWRGaWxlLmxpbmtzLmZvckVhY2goKGxpbms6IExpbmtDYWNoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBmaWxlTmFtZSA9IGZpbGUucGF0aC5yZXBsYWNlKC8oLiopLm1kLywgXCIkMVwiKVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBkZXN0ID0gYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0Rmlyc3RMaW5rcGF0aERlc3QobGluay5saW5rLCBmaWxlTmFtZSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld19wcm9wcyA9IGZldGNoVGFyZ2V0QXR0cmlidXRlc1N5bmMoYXBwLCBzZXR0aW5ncywgZGVzdCwgZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnRlcm5hbExpbmtzID0gbGVhZi52aWV3LmNvbnRhaW5lckVsLnF1ZXJ5U2VsZWN0b3JBbGwoYGEuaW50ZXJuYWwtbGlua1tocmVmPVwiJHtsaW5rLmxpbmt9XCJdYClcbiAgICAgICAgICAgICAgICAgICAgICAgIGludGVybmFsTGlua3MuZm9yRWFjaCgoaW50ZXJuYWxMaW5rOiBIVE1MRWxlbWVudCkgPT4gc2V0TGlua05ld1Byb3BzKGludGVybmFsTGluaywgbmV3X3Byb3BzKSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KVxufSIsImltcG9ydCB7IEFwcCwgUGx1Z2luU2V0dGluZ1RhYiwgU2V0dGluZywgZGVib3VuY2UgfSBmcm9tIFwib2JzaWRpYW5cIlxuaW1wb3J0IFN1cGVyY2hhcmdlZExpbmtzIGZyb20gXCJtYWluXCJcbmltcG9ydCB7IEN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M6IFJlY29yZDxzdHJpbmcsIHN0cmluZz5cbiAgICAgICAgYWZ0ZXI6IGJvb2xlYW5cblxuICAgICAgICBjb25zdHJ1Y3RvcihhdHRyaWJ1dGVzOiBSZWNvcmQ8c3RyaW5nLCBzdHJpbmc+LCBhZnRlcjogYm9vbGVhbikge1xuICAgICAgICAgICAgc3VwZXIoKTtcbiAgICAgICAgICAgIHRoaXMuYXR0cmlidXRlcyA9IGF0dHJpYnV0ZXNcbiAgICAgICAgICAgIHRoaXMuYWZ0ZXIgPSBhZnRlclxuICAgICAgICB9XG5cbiAgICAgICAgdG9ET00oKSB7XG4gICAgICAgICAgICBsZXQgaGVhZGVyRWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwic3BhblwiKTtcbiAgICAgICAgICAgIGhlYWRlckVsLnNldEF0dHJzKHRoaXMuYXR0cmlidXRlcyk7XG4gICAgICAgICAgICBpZiAodGhpcy5hZnRlcikge1xuICAgICAgICAgICAgICAgIGhlYWRlckVsLmFkZENsYXNzKCdkYXRhLWxpbmstaWNvbi1hZnRlcicpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgaGVhZGVyRWwuYWRkQ2xhc3MoJ2RhdGEtbGluay1pY29uJylcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGNyZWF0ZSBhIG5haXZlIGJyZWFkIGNydW1iXG4gICAgICAgICAgICByZXR1cm4gaGVhZGVyRWw7XG4gICAgICAgIH1cblxuICAgICAgICBpZ25vcmVFdmVudCgpIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29uc3Qgc2V0dGluZ3MgPSBfc2V0dGluZ3M7XG4gICAgY29uc3Qgdmlld1BsdWdpbiA9IFZpZXdQbHVnaW4uZnJvbUNsYXNzKFxuICAgICAgICBjbGFzcyB7XG4gICAgICAgICAgICBkZWNvcmF0aW9uczogRGVjb3JhdGlvblNldDtcblxuICAgICAgICAgICAgY29uc3RydWN0b3IodmlldzogRWRpdG9yVmlldykge1xuICAgICAgICAgICAgICAgIHRoaXMuZGVjb3JhdGlvbnMgPSB0aGlzLmJ1aWxkRGVjb3JhdGlvbnModmlldyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHVwZGF0ZSh1cGRhdGU6IFZpZXdVcGRhdGUpIHtcbiAgICAgICAgICAgICAgICBpZiAodXBkYXRlLmRvY0NoYW5nZWQgfHwgdXBkYXRlLnZpZXdwb3J0Q2hhbmdlZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmRlY29yYXRpb25zID0gdGhpcy5idWlsZERlY29yYXRpb25zKHVwZGF0ZS52aWV3KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGRlc3Ryb3koKSB7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJ1aWxkRGVjb3JhdGlvbnModmlldzogRWRpdG9yVmlldykge1xuICAgICAgICAgICAgICAgIGxldCBidWlsZGVyID0gbmV3IFJhbmdlU2V0QnVpbGRlcjxEZWNvcmF0aW9uPigpO1xuICAgICAgICAgICAgICAgIGlmICghc2V0dGluZ3MuZW5hYmxlRWRpdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBidWlsZGVyLmZpbmlzaCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBtZFZpZXcgPSB2aWV3LnN0YXRlLmZpZWxkKGVkaXRvclZpZXdGaWVsZCkgYXMgTWFya2Rvd25WaWV3O1xuICAgICAgICAgICAgICAgIGxldCBsYXN0QXR0cmlidXRlcyA9IHt9O1xuICAgICAgICAgICAgICAgIGxldCBpY29uRGVjb0FmdGVyOiBEZWNvcmF0aW9uID0gbnVsbDtcbiAgICAgICAgICAgICAgICBsZXQgaWNvbkRlY29BZnRlcldoZXJlOiBudW1iZXIgPSBudWxsO1xuXG4gICAgICAgICAgICAgICAgbGV0IG1kQWxpYXNGcm9tOiBudW1iZXIgPSBudWxsO1xuICAgICAgICAgICAgICAgIGxldCBtZEFsaWFzVG86IG51bWJlciA9IG51bGw7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQge2Zyb20sIHRvfSBvZiB2aWV3LnZpc2libGVSYW5nZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgc3ludGF4VHJlZSh2aWV3LnN0YXRlKS5pdGVyYXRlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyb20sXG4gICAgICAgICAgICAgICAgICAgICAgICB0byxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVudGVyOiAobm9kZSkgPT4ge1xuXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0b2tlblByb3BzID0gbm9kZS50eXBlLnByb3AodG9rZW5DbGFzc05vZGVQcm9wKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW5Qcm9wcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcm9wcyA9IG5ldyBTZXQodG9rZW5Qcm9wcy5zcGxpdChcIiBcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpc0xpbmsgPSBwcm9wcy5oYXMoXCJobWQtaW50ZXJuYWwtbGlua1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaXNBbGlhcyA9IHByb3BzLmhhcyhcImxpbmstYWxpYXNcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGlzUGlwZSA9IHByb3BzLmhhcyhcImxpbmstYWxpYXMtcGlwZVwiKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgJ2FsaWFzJyBvZiB0aGUgbWQgbGlua1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpc01ETGluayA9IHByb3BzLmhhcygnbGluaycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgJ2ludGVybmFsIGxpbmsnIG9mIHRoZSBtZCBsaW5rXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGlzTURVcmwgPSBwcm9wcy5oYXMoJ3VybCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpc01ERm9ybWF0dGluZyA9IHByb3BzLmhhcygnZm9ybWF0dGluZy1saW5rJyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzTURMaW5rICYmICFpc01ERm9ybWF0dGluZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTGluazogVGhlICdhbGlhcydcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVSTDogVGhlIGludGVybmFsIGxpbmtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1kQWxpYXNGcm9tID0gbm9kZS5mcm9tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWRBbGlhc1RvID0gbm9kZS50bztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaXNQaXBlICYmICFpc0FsaWFzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaWNvbkRlY29BZnRlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXIuYWRkKGljb25EZWNvQWZ0ZXJXaGVyZSwgaWNvbkRlY29BZnRlcldoZXJlLCBpY29uRGVjb0FmdGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uRGVjb0FmdGVyID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uRGVjb0FmdGVyV2hlcmUgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc0xpbmsgJiYgIWlzQWxpYXMgJiYgIWlzUGlwZSB8fCBpc01EVXJsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGlua1RleHQgPSB2aWV3LnN0YXRlLmRvYy5zbGljZVN0cmluZyhub2RlLmZyb20sIG5vZGUudG8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlua1RleHQgPSBsaW5rVGV4dC5zcGxpdChcIiNcIilbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZmlsZSA9IGFwcC5tZXRhZGF0YUNhY2hlLmdldEZpcnN0TGlua3BhdGhEZXN0KGxpbmtUZXh0LCBtZFZpZXcuZmlsZS5iYXNlbmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNNRFVybCAmJiAhZmlsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGUgPSBhcHAudmF1bHQuZ2V0QWJzdHJhY3RGaWxlQnlQYXRoKGRlY29kZVVSSUNvbXBvbmVudChsaW5rVGV4dCkpIGFzIFRGaWxlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRjaChlKSB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgX2F0dHJpYnV0ZXMgPSBmZXRjaFRhcmdldEF0dHJpYnV0ZXNTeW5jKGFwcCwgc2V0dGluZ3MsIGZpbGUsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGVzOiBSZWNvcmQ8c3RyaW5nLCBzdHJpbmc+ID0ge307XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQga2V5IGluIF9hdHRyaWJ1dGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXNbXCJkYXRhLWxpbmstXCIgKyBrZXldID0gX2F0dHJpYnV0ZXNba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlY28gPSBEZWNvcmF0aW9uLm1hcmsoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzczogXCJkYXRhLWxpbmstdGV4dFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25EZWNvQmVmb3JlID0gRGVjb3JhdGlvbi53aWRnZXQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWRnZXQ6IG5ldyBIZWFkZXJXaWRnZXQoYXR0cmlidXRlcywgZmFsc2UpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb25EZWNvQWZ0ZXIgPSBEZWNvcmF0aW9uLndpZGdldCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZGdldDogbmV3IEhlYWRlcldpZGdldChhdHRyaWJ1dGVzLCB0cnVlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc01EVXJsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFwcGx5IHJldHJvYWN0aXZlbHkgdG8gdGhlIGFsaWFzIGZvdW5kIGJlZm9yZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVjbyA9IERlY29yYXRpb24ubWFyayh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzOiBhdHRyaWJ1dGVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiZGF0YS1saW5rLXRleHRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVpbGRlci5hZGQobWRBbGlhc0Zyb20sIG1kQWxpYXNGcm9tLCBpY29uRGVjb0JlZm9yZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXIuYWRkKG1kQWxpYXNGcm9tLCBtZEFsaWFzVG8sIGRlY28pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaWNvbkRlY29BZnRlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVpbGRlci5hZGQobWRBbGlhc1RvLCBtZEFsaWFzVG8sIGljb25EZWNvQWZ0ZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbkRlY29BZnRlciA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uRGVjb0FmdGVyV2hlcmUgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWRBbGlhc0Zyb20gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWRBbGlhc1RvID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVpbGRlci5hZGQobm9kZS5mcm9tLCBub2RlLmZyb20sIGljb25EZWNvQmVmb3JlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZGVyLmFkZChub2RlLmZyb20sIG5vZGUudG8sIGRlY28pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RBdHRyaWJ1dGVzID0gYXR0cmlidXRlcztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uRGVjb0FmdGVyV2hlcmUgPSBub2RlLnRvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlzTGluayAmJiBpc0FsaWFzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVjbyA9IERlY29yYXRpb24ubWFyayh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlczogbGFzdEF0dHJpYnV0ZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M6IFwiZGF0YS1saW5rLXRleHRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZGVyLmFkZChub2RlLmZyb20sIG5vZGUudG8sIGRlY28pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGljb25EZWNvQWZ0ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZGVyLmFkZChub2RlLnRvLCBub2RlLnRvLCBpY29uRGVjb0FmdGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uRGVjb0FmdGVyID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uRGVjb0FmdGVyV2hlcmUgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBidWlsZGVyLmZpbmlzaCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICBkZWNvcmF0aW9uczogdiA9PiB2LmRlY29yYXRpb25zXG4gICAgICAgIH1cbiAgICApO1xuICAgIHJldHVybiB2aWV3UGx1Z2luO1xufVxuIiwiaW1wb3J0IHtQbHVnaW4sIGRlYm91bmNlLC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