'use strict'; var obsidian = require('obsidian'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var obsidian__default = /*#__PURE__*/_interopDefaultLegacy(obsidian); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } function __spreadArray(to, from) { for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i]; return to; } function createCommonjsModule(fn, basedir, module) { return module = { path: basedir, exports: {}, require: function (path, base) { return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); } }, fn(module, module.exports), module.exports; } function commonjsRequire () { throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); } var main = createCommonjsModule(function (module, exports) { Object.defineProperty(exports, '__esModule', { value: true }); const DEFAULT_DAILY_NOTE_FORMAT = "YYYY-MM-DD"; const DEFAULT_WEEKLY_NOTE_FORMAT = "gggg-[W]ww"; const DEFAULT_MONTHLY_NOTE_FORMAT = "YYYY-MM"; const DEFAULT_QUARTERLY_NOTE_FORMAT = "YYYY-[Q]Q"; const DEFAULT_YEARLY_NOTE_FORMAT = "YYYY"; function shouldUsePeriodicNotesSettings(periodicity) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const periodicNotes = window.app.plugins.getPlugin("periodic-notes"); return periodicNotes && periodicNotes.settings?.[periodicity]?.enabled; } /** * Read the user settings for the `daily-notes` plugin * to keep behavior of creating a new note in-sync. */ function getDailyNoteSettings() { try { // eslint-disable-next-line @typescript-eslint/no-explicit-any const { internalPlugins, plugins } = window.app; if (shouldUsePeriodicNotesSettings("daily")) { const { format, folder, template } = plugins.getPlugin("periodic-notes")?.settings?.daily || {}; return { format: format || DEFAULT_DAILY_NOTE_FORMAT, folder: folder?.trim() || "", template: template?.trim() || "", }; } const { folder, format, template } = internalPlugins.getPluginById("daily-notes")?.instance?.options || {}; return { format: format || DEFAULT_DAILY_NOTE_FORMAT, folder: folder?.trim() || "", template: template?.trim() || "", }; } catch (err) { console.info("No custom daily note settings found!", err); } } /** * Read the user settings for the `weekly-notes` plugin * to keep behavior of creating a new note in-sync. */ function getWeeklyNoteSettings() { try { // eslint-disable-next-line @typescript-eslint/no-explicit-any const pluginManager = window.app.plugins; const calendarSettings = pluginManager.getPlugin("calendar")?.options; const periodicNotesSettings = pluginManager.getPlugin("periodic-notes")?.settings?.weekly; if (shouldUsePeriodicNotesSettings("weekly")) { return { format: periodicNotesSettings.format || DEFAULT_WEEKLY_NOTE_FORMAT, folder: periodicNotesSettings.folder?.trim() || "", template: periodicNotesSettings.template?.trim() || "", }; } const settings = calendarSettings || {}; return { format: settings.weeklyNoteFormat || DEFAULT_WEEKLY_NOTE_FORMAT, folder: settings.weeklyNoteFolder?.trim() || "", template: settings.weeklyNoteTemplate?.trim() || "", }; } catch (err) { console.info("No custom weekly note settings found!", err); } } /** * Read the user settings for the `periodic-notes` plugin * to keep behavior of creating a new note in-sync. */ function getMonthlyNoteSettings() { // eslint-disable-next-line @typescript-eslint/no-explicit-any const pluginManager = window.app.plugins; try { const settings = (shouldUsePeriodicNotesSettings("monthly") && pluginManager.getPlugin("periodic-notes")?.settings?.monthly) || {}; return { format: settings.format || DEFAULT_MONTHLY_NOTE_FORMAT, folder: settings.folder?.trim() || "", template: settings.template?.trim() || "", }; } catch (err) { console.info("No custom monthly note settings found!", err); } } /** * Read the user settings for the `periodic-notes` plugin * to keep behavior of creating a new note in-sync. */ function getQuarterlyNoteSettings() { // eslint-disable-next-line @typescript-eslint/no-explicit-any const pluginManager = window.app.plugins; try { const settings = (shouldUsePeriodicNotesSettings("quarterly") && pluginManager.getPlugin("periodic-notes")?.settings?.quarterly) || {}; return { format: settings.format || DEFAULT_QUARTERLY_NOTE_FORMAT, folder: settings.folder?.trim() || "", template: settings.template?.trim() || "", }; } catch (err) { console.info("No custom quarterly note settings found!", err); } } /** * Read the user settings for the `periodic-notes` plugin * to keep behavior of creating a new note in-sync. */ function getYearlyNoteSettings() { // eslint-disable-next-line @typescript-eslint/no-explicit-any const pluginManager = window.app.plugins; try { const settings = (shouldUsePeriodicNotesSettings("yearly") && pluginManager.getPlugin("periodic-notes")?.settings?.yearly) || {}; return { format: settings.format || DEFAULT_YEARLY_NOTE_FORMAT, folder: settings.folder?.trim() || "", template: settings.template?.trim() || "", }; } catch (err) { console.info("No custom yearly note settings found!", err); } } // Credit: @creationix/path.js function join(...partSegments) { // Split the inputs into a list of path commands. let parts = []; for (let i = 0, l = partSegments.length; i < l; i++) { parts = parts.concat(partSegments[i].split("/")); } // Interpret the path commands to get the new resolved path. const newParts = []; for (let i = 0, l = parts.length; i < l; i++) { const part = parts[i]; // Remove leading and trailing slashes // Also remove "." segments if (!part || part === ".") continue; // Push new path segments. else newParts.push(part); } // Preserve the initial slash if there was one. if (parts[0] === "") newParts.unshift(""); // Turn back into a single string path. return newParts.join("/"); } function basename(fullPath) { let base = fullPath.substring(fullPath.lastIndexOf("/") + 1); if (base.lastIndexOf(".") != -1) base = base.substring(0, base.lastIndexOf(".")); return base; } async function ensureFolderExists(path) { const dirs = path.replace(/\\/g, "/").split("/"); dirs.pop(); // remove basename if (dirs.length) { const dir = join(...dirs); if (!window.app.vault.getAbstractFileByPath(dir)) { await window.app.vault.createFolder(dir); } } } async function getNotePath(directory, filename) { if (!filename.endsWith(".md")) { filename += ".md"; } const path = obsidian__default["default"].normalizePath(join(directory, filename)); await ensureFolderExists(path); return path; } async function getTemplateInfo(template) { const { metadataCache, vault } = window.app; const templatePath = obsidian__default["default"].normalizePath(template); if (templatePath === "/") { return Promise.resolve(["", null]); } try { const templateFile = metadataCache.getFirstLinkpathDest(templatePath, ""); const contents = await vault.cachedRead(templateFile); // eslint-disable-next-line @typescript-eslint/no-explicit-any const IFoldInfo = window.app.foldManager.load(templateFile); return [contents, IFoldInfo]; } catch (err) { console.error(`Failed to read the daily note template '${templatePath}'`, err); new obsidian__default["default"].Notice("Failed to read the daily note template"); return ["", null]; } } /** * dateUID is a way of weekly identifying daily/weekly/monthly notes. * They are prefixed with the granularity to avoid ambiguity. */ function getDateUID(date, granularity = "day") { const ts = date.clone().startOf(granularity).format(); return `${granularity}-${ts}`; } function removeEscapedCharacters(format) { return format.replace(/\[[^\]]*\]/g, ""); // remove everything within brackets } /** * XXX: When parsing dates that contain both week numbers and months, * Moment choses to ignore the week numbers. For the week dateUID, we * want the opposite behavior. Strip the MMM from the format to patch. */ function isFormatAmbiguous(format, granularity) { if (granularity === "week") { const cleanFormat = removeEscapedCharacters(format); return (/w{1,2}/i.test(cleanFormat) && (/M{1,4}/.test(cleanFormat) || /D{1,4}/.test(cleanFormat))); } return false; } function getDateFromFile(file, granularity) { return getDateFromFilename(file.basename, granularity); } function getDateFromPath(path, granularity) { return getDateFromFilename(basename(path), granularity); } function getDateFromFilename(filename, granularity) { const getSettings = { day: getDailyNoteSettings, week: getWeeklyNoteSettings, month: getMonthlyNoteSettings, quarter: getQuarterlyNoteSettings, year: getYearlyNoteSettings, }; const format = getSettings[granularity]().format.split("/").pop(); const noteDate = window.moment(filename, format, true); if (!noteDate.isValid()) { return null; } if (isFormatAmbiguous(format, granularity)) { if (granularity === "week") { const cleanFormat = removeEscapedCharacters(format); if (/w{1,2}/i.test(cleanFormat)) { return window.moment(filename, // If format contains week, remove day & month formatting format.replace(/M{1,4}/g, "").replace(/D{1,4}/g, ""), false); } } } return noteDate; } class DailyNotesFolderMissingError extends Error { } /** * This function mimics the behavior of the daily-notes plugin * so it will replace {{date}}, {{title}}, and {{time}} with the * formatted timestamp. * * Note: it has an added bonus that it's not 'today' specific. */ async function createDailyNote(date) { const app = window.app; const { vault } = app; const moment = window.moment; const { template, format, folder } = getDailyNoteSettings(); const [templateContents, IFoldInfo] = await getTemplateInfo(template); const filename = date.format(format); const normalizedPath = await getNotePath(folder, filename); try { const createdFile = await vault.create(normalizedPath, templateContents .replace(/{{\s*date\s*}}/gi, filename) .replace(/{{\s*time\s*}}/gi, moment().format("HH:mm")) .replace(/{{\s*title\s*}}/gi, filename) .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { const now = moment(); const currentDate = date.clone().set({ hour: now.get("hour"), minute: now.get("minute"), second: now.get("second"), }); if (calc) { currentDate.add(parseInt(timeDelta, 10), unit); } if (momentFormat) { return currentDate.format(momentFormat.substring(1).trim()); } return currentDate.format(format); }) .replace(/{{\s*yesterday\s*}}/gi, date.clone().subtract(1, "day").format(format)) .replace(/{{\s*tomorrow\s*}}/gi, date.clone().add(1, "d").format(format))); // eslint-disable-next-line @typescript-eslint/no-explicit-any app.foldManager.save(createdFile, IFoldInfo); return createdFile; } catch (err) { console.error(`Failed to create file: '${normalizedPath}'`, err); new obsidian__default["default"].Notice("Unable to create new file."); } } function getDailyNote(date, dailyNotes) { return dailyNotes[getDateUID(date, "day")] ?? null; } function getAllDailyNotes() { /** * Find all daily notes in the daily note folder */ const { vault } = window.app; const { folder } = getDailyNoteSettings(); const dailyNotesFolder = vault.getAbstractFileByPath(obsidian__default["default"].normalizePath(folder)); if (!dailyNotesFolder) { throw new DailyNotesFolderMissingError("Failed to find daily notes folder"); } const dailyNotes = {}; obsidian__default["default"].Vault.recurseChildren(dailyNotesFolder, (note) => { if (note instanceof obsidian__default["default"].TFile) { const date = getDateFromFile(note, "day"); if (date) { const dateString = getDateUID(date, "day"); dailyNotes[dateString] = note; } } }); return dailyNotes; } class WeeklyNotesFolderMissingError extends Error { } function getDaysOfWeek() { const { moment } = window; // eslint-disable-next-line @typescript-eslint/no-explicit-any let weekStart = moment.localeData()._week.dow; const daysOfWeek = [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", ]; while (weekStart) { daysOfWeek.push(daysOfWeek.shift()); weekStart--; } return daysOfWeek; } function getDayOfWeekNumericalValue(dayOfWeekName) { return getDaysOfWeek().indexOf(dayOfWeekName.toLowerCase()); } async function createWeeklyNote(date) { const { vault } = window.app; const { template, format, folder } = getWeeklyNoteSettings(); const [templateContents, IFoldInfo] = await getTemplateInfo(template); const filename = date.format(format); const normalizedPath = await getNotePath(folder, filename); try { const createdFile = await vault.create(normalizedPath, templateContents .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { const now = window.moment(); const currentDate = date.clone().set({ hour: now.get("hour"), minute: now.get("minute"), second: now.get("second"), }); if (calc) { currentDate.add(parseInt(timeDelta, 10), unit); } if (momentFormat) { return currentDate.format(momentFormat.substring(1).trim()); } return currentDate.format(format); }) .replace(/{{\s*title\s*}}/gi, filename) .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")) .replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi, (_, dayOfWeek, momentFormat) => { const day = getDayOfWeekNumericalValue(dayOfWeek); return date.weekday(day).format(momentFormat.trim()); })); // eslint-disable-next-line @typescript-eslint/no-explicit-any window.app.foldManager.save(createdFile, IFoldInfo); return createdFile; } catch (err) { console.error(`Failed to create file: '${normalizedPath}'`, err); new obsidian__default["default"].Notice("Unable to create new file."); } } function getWeeklyNote(date, weeklyNotes) { return weeklyNotes[getDateUID(date, "week")] ?? null; } function getAllWeeklyNotes() { const weeklyNotes = {}; if (!appHasWeeklyNotesPluginLoaded()) { return weeklyNotes; } const { vault } = window.app; const { folder } = getWeeklyNoteSettings(); const weeklyNotesFolder = vault.getAbstractFileByPath(obsidian__default["default"].normalizePath(folder)); if (!weeklyNotesFolder) { throw new WeeklyNotesFolderMissingError("Failed to find weekly notes folder"); } obsidian__default["default"].Vault.recurseChildren(weeklyNotesFolder, (note) => { if (note instanceof obsidian__default["default"].TFile) { const date = getDateFromFile(note, "week"); if (date) { const dateString = getDateUID(date, "week"); weeklyNotes[dateString] = note; } } }); return weeklyNotes; } class MonthlyNotesFolderMissingError extends Error { } /** * This function mimics the behavior of the daily-notes plugin * so it will replace {{date}}, {{title}}, and {{time}} with the * formatted timestamp. * * Note: it has an added bonus that it's not 'today' specific. */ async function createMonthlyNote(date) { const { vault } = window.app; const { template, format, folder } = getMonthlyNoteSettings(); const [templateContents, IFoldInfo] = await getTemplateInfo(template); const filename = date.format(format); const normalizedPath = await getNotePath(folder, filename); try { const createdFile = await vault.create(normalizedPath, templateContents .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { const now = window.moment(); const currentDate = date.clone().set({ hour: now.get("hour"), minute: now.get("minute"), second: now.get("second"), }); if (calc) { currentDate.add(parseInt(timeDelta, 10), unit); } if (momentFormat) { return currentDate.format(momentFormat.substring(1).trim()); } return currentDate.format(format); }) .replace(/{{\s*date\s*}}/gi, filename) .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")) .replace(/{{\s*title\s*}}/gi, filename)); // eslint-disable-next-line @typescript-eslint/no-explicit-any window.app.foldManager.save(createdFile, IFoldInfo); return createdFile; } catch (err) { console.error(`Failed to create file: '${normalizedPath}'`, err); new obsidian__default["default"].Notice("Unable to create new file."); } } function getMonthlyNote(date, monthlyNotes) { return monthlyNotes[getDateUID(date, "month")] ?? null; } function getAllMonthlyNotes() { const monthlyNotes = {}; if (!appHasMonthlyNotesPluginLoaded()) { return monthlyNotes; } const { vault } = window.app; const { folder } = getMonthlyNoteSettings(); const monthlyNotesFolder = vault.getAbstractFileByPath(obsidian__default["default"].normalizePath(folder)); if (!monthlyNotesFolder) { throw new MonthlyNotesFolderMissingError("Failed to find monthly notes folder"); } obsidian__default["default"].Vault.recurseChildren(monthlyNotesFolder, (note) => { if (note instanceof obsidian__default["default"].TFile) { const date = getDateFromFile(note, "month"); if (date) { const dateString = getDateUID(date, "month"); monthlyNotes[dateString] = note; } } }); return monthlyNotes; } class QuarterlyNotesFolderMissingError extends Error { } /** * This function mimics the behavior of the daily-notes plugin * so it will replace {{date}}, {{title}}, and {{time}} with the * formatted timestamp. * * Note: it has an added bonus that it's not 'today' specific. */ async function createQuarterlyNote(date) { const { vault } = window.app; const { template, format, folder } = getQuarterlyNoteSettings(); const [templateContents, IFoldInfo] = await getTemplateInfo(template); const filename = date.format(format); const normalizedPath = await getNotePath(folder, filename); try { const createdFile = await vault.create(normalizedPath, templateContents .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { const now = window.moment(); const currentDate = date.clone().set({ hour: now.get("hour"), minute: now.get("minute"), second: now.get("second"), }); if (calc) { currentDate.add(parseInt(timeDelta, 10), unit); } if (momentFormat) { return currentDate.format(momentFormat.substring(1).trim()); } return currentDate.format(format); }) .replace(/{{\s*date\s*}}/gi, filename) .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")) .replace(/{{\s*title\s*}}/gi, filename)); // eslint-disable-next-line @typescript-eslint/no-explicit-any window.app.foldManager.save(createdFile, IFoldInfo); return createdFile; } catch (err) { console.error(`Failed to create file: '${normalizedPath}'`, err); new obsidian__default["default"].Notice("Unable to create new file."); } } function getQuarterlyNote(date, quarterly) { return quarterly[getDateUID(date, "quarter")] ?? null; } function getAllQuarterlyNotes() { const quarterly = {}; if (!appHasQuarterlyNotesPluginLoaded()) { return quarterly; } const { vault } = window.app; const { folder } = getQuarterlyNoteSettings(); const quarterlyFolder = vault.getAbstractFileByPath(obsidian__default["default"].normalizePath(folder)); if (!quarterlyFolder) { throw new QuarterlyNotesFolderMissingError("Failed to find quarterly notes folder"); } obsidian__default["default"].Vault.recurseChildren(quarterlyFolder, (note) => { if (note instanceof obsidian__default["default"].TFile) { const date = getDateFromFile(note, "quarter"); if (date) { const dateString = getDateUID(date, "quarter"); quarterly[dateString] = note; } } }); return quarterly; } class YearlyNotesFolderMissingError extends Error { } /** * This function mimics the behavior of the daily-notes plugin * so it will replace {{date}}, {{title}}, and {{time}} with the * formatted timestamp. * * Note: it has an added bonus that it's not 'today' specific. */ async function createYearlyNote(date) { const { vault } = window.app; const { template, format, folder } = getYearlyNoteSettings(); const [templateContents, IFoldInfo] = await getTemplateInfo(template); const filename = date.format(format); const normalizedPath = await getNotePath(folder, filename); try { const createdFile = await vault.create(normalizedPath, templateContents .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => { const now = window.moment(); const currentDate = date.clone().set({ hour: now.get("hour"), minute: now.get("minute"), second: now.get("second"), }); if (calc) { currentDate.add(parseInt(timeDelta, 10), unit); } if (momentFormat) { return currentDate.format(momentFormat.substring(1).trim()); } return currentDate.format(format); }) .replace(/{{\s*date\s*}}/gi, filename) .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")) .replace(/{{\s*title\s*}}/gi, filename)); // eslint-disable-next-line @typescript-eslint/no-explicit-any window.app.foldManager.save(createdFile, IFoldInfo); return createdFile; } catch (err) { console.error(`Failed to create file: '${normalizedPath}'`, err); new obsidian__default["default"].Notice("Unable to create new file."); } } function getYearlyNote(date, yearlyNotes) { return yearlyNotes[getDateUID(date, "year")] ?? null; } function getAllYearlyNotes() { const yearlyNotes = {}; if (!appHasYearlyNotesPluginLoaded()) { return yearlyNotes; } const { vault } = window.app; const { folder } = getYearlyNoteSettings(); const yearlyNotesFolder = vault.getAbstractFileByPath(obsidian__default["default"].normalizePath(folder)); if (!yearlyNotesFolder) { throw new YearlyNotesFolderMissingError("Failed to find yearly notes folder"); } obsidian__default["default"].Vault.recurseChildren(yearlyNotesFolder, (note) => { if (note instanceof obsidian__default["default"].TFile) { const date = getDateFromFile(note, "year"); if (date) { const dateString = getDateUID(date, "year"); yearlyNotes[dateString] = note; } } }); return yearlyNotes; } function appHasDailyNotesPluginLoaded() { const { app } = window; // eslint-disable-next-line @typescript-eslint/no-explicit-any const dailyNotesPlugin = app.internalPlugins.plugins["daily-notes"]; if (dailyNotesPlugin && dailyNotesPlugin.enabled) { return true; } // eslint-disable-next-line @typescript-eslint/no-explicit-any const periodicNotes = app.plugins.getPlugin("periodic-notes"); return periodicNotes && periodicNotes.settings?.daily?.enabled; } /** * XXX: "Weekly Notes" live in either the Calendar plugin or the periodic-notes plugin. * Check both until the weekly notes feature is removed from the Calendar plugin. */ function appHasWeeklyNotesPluginLoaded() { const { app } = window; // eslint-disable-next-line @typescript-eslint/no-explicit-any if (app.plugins.getPlugin("calendar")) { return true; } // eslint-disable-next-line @typescript-eslint/no-explicit-any const periodicNotes = app.plugins.getPlugin("periodic-notes"); return periodicNotes && periodicNotes.settings?.weekly?.enabled; } function appHasMonthlyNotesPluginLoaded() { const { app } = window; // eslint-disable-next-line @typescript-eslint/no-explicit-any const periodicNotes = app.plugins.getPlugin("periodic-notes"); return periodicNotes && periodicNotes.settings?.monthly?.enabled; } function appHasQuarterlyNotesPluginLoaded() { const { app } = window; // eslint-disable-next-line @typescript-eslint/no-explicit-any const periodicNotes = app.plugins.getPlugin("periodic-notes"); return periodicNotes && periodicNotes.settings?.quarterly?.enabled; } function appHasYearlyNotesPluginLoaded() { const { app } = window; // eslint-disable-next-line @typescript-eslint/no-explicit-any const periodicNotes = app.plugins.getPlugin("periodic-notes"); return periodicNotes && periodicNotes.settings?.yearly?.enabled; } function getPeriodicNoteSettings(granularity) { const getSettings = { day: getDailyNoteSettings, week: getWeeklyNoteSettings, month: getMonthlyNoteSettings, quarter: getQuarterlyNoteSettings, year: getYearlyNoteSettings, }[granularity]; return getSettings(); } function createPeriodicNote(granularity, date) { const createFn = { day: createDailyNote, month: createMonthlyNote, week: createWeeklyNote, }; return createFn[granularity](date); } exports.DEFAULT_DAILY_NOTE_FORMAT = DEFAULT_DAILY_NOTE_FORMAT; exports.DEFAULT_MONTHLY_NOTE_FORMAT = DEFAULT_MONTHLY_NOTE_FORMAT; exports.DEFAULT_QUARTERLY_NOTE_FORMAT = DEFAULT_QUARTERLY_NOTE_FORMAT; exports.DEFAULT_WEEKLY_NOTE_FORMAT = DEFAULT_WEEKLY_NOTE_FORMAT; exports.DEFAULT_YEARLY_NOTE_FORMAT = DEFAULT_YEARLY_NOTE_FORMAT; exports.appHasDailyNotesPluginLoaded = appHasDailyNotesPluginLoaded; exports.appHasMonthlyNotesPluginLoaded = appHasMonthlyNotesPluginLoaded; exports.appHasQuarterlyNotesPluginLoaded = appHasQuarterlyNotesPluginLoaded; exports.appHasWeeklyNotesPluginLoaded = appHasWeeklyNotesPluginLoaded; exports.appHasYearlyNotesPluginLoaded = appHasYearlyNotesPluginLoaded; exports.createDailyNote = createDailyNote; exports.createMonthlyNote = createMonthlyNote; exports.createPeriodicNote = createPeriodicNote; exports.createQuarterlyNote = createQuarterlyNote; exports.createWeeklyNote = createWeeklyNote; exports.createYearlyNote = createYearlyNote; exports.getAllDailyNotes = getAllDailyNotes; exports.getAllMonthlyNotes = getAllMonthlyNotes; exports.getAllQuarterlyNotes = getAllQuarterlyNotes; exports.getAllWeeklyNotes = getAllWeeklyNotes; exports.getAllYearlyNotes = getAllYearlyNotes; exports.getDailyNote = getDailyNote; exports.getDailyNoteSettings = getDailyNoteSettings; exports.getDateFromFile = getDateFromFile; exports.getDateFromPath = getDateFromPath; exports.getDateUID = getDateUID; exports.getMonthlyNote = getMonthlyNote; exports.getMonthlyNoteSettings = getMonthlyNoteSettings; exports.getPeriodicNoteSettings = getPeriodicNoteSettings; exports.getQuarterlyNote = getQuarterlyNote; exports.getQuarterlyNoteSettings = getQuarterlyNoteSettings; exports.getTemplateInfo = getTemplateInfo; exports.getWeeklyNote = getWeeklyNote; exports.getWeeklyNoteSettings = getWeeklyNoteSettings; exports.getYearlyNote = getYearlyNote; exports.getYearlyNoteSettings = getYearlyNoteSettings; }); // Unique ID creation requires a high quality random # generator. In the browser we therefore // require the crypto API and do not support built-in fallback to lower quality random number // generators (like Math.random()). var getRandomValues; var rnds8 = new Uint8Array(16); function rng() { // lazy load so that environments that need to polyfill have a chance to do so if (!getRandomValues) { // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, // find the complete implementation of crypto (msCrypto) on IE11. getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); if (!getRandomValues) { throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); } } return getRandomValues(rnds8); } var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; function validate(uuid) { return typeof uuid === 'string' && REGEX.test(uuid); } /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ var byteToHex = []; for (var i = 0; i < 256; ++i) { byteToHex.push((i + 0x100).toString(16).substr(1)); } function stringify(arr) { var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; // Note: Be careful editing this code! It's been tuned for performance // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one // of the following: // - One or more input array values don't map to a hex octet (leading to // "undefined" in the uuid) // - Invalid input values for the RFC `version` or `variant` fields if (!validate(uuid)) { throw TypeError('Stringified UUID is invalid'); } return uuid; } function v4(options, buf, offset) { options = options || {}; var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided if (buf) { offset = offset || 0; for (var i = 0; i < 16; ++i) { buf[offset + i] = rnds[i]; } return buf; } return stringify(rnds); } //! All of these methods are taken from https://www.npmjs.com/package/obsidian-daily-notes-interface. function join() { var partSegments = []; for (var _i = 0; _i < arguments.length; _i++) { partSegments[_i] = arguments[_i]; } // Split the inputs into a list of path commands. var parts = []; for (var i = 0, l = partSegments.length; i < l; i++) { parts = parts.concat(partSegments[i].split("/")); } // Interpret the path commands to get the new resolved path. var newParts = []; for (var i = 0, l = parts.length; i < l; i++) { var part = parts[i]; // Remove leading and trailing slashes // Also remove "." segments if (!part || part === ".") continue; // Push new path segments. else newParts.push(part); } // Preserve the initial slash if there was one. if (parts[0] === "") newParts.unshift(""); // Turn back into a single string path. return newParts.join("/"); } function getNotePath(directory, filename) { return __awaiter(this, void 0, void 0, function () { var path; return __generator(this, function (_a) { switch (_a.label) { case 0: if (!filename.endsWith(".md")) { filename += ".md"; } path = obsidian.normalizePath(join(directory, filename)); return [4 /*yield*/, ensureFolderExists(path)]; case 1: _a.sent(); return [2 /*return*/, path]; } }); }); } function ensureFolderExists(path) { return __awaiter(this, void 0, void 0, function () { var dirs, dir; return __generator(this, function (_a) { switch (_a.label) { case 0: dirs = path.replace(/\\/g, "/").split("/"); dirs.pop(); // remove basename if (!dirs.length) return [3 /*break*/, 2]; dir = join.apply(void 0, dirs); if (!!window.app.vault.getAbstractFileByPath(dir)) return [3 /*break*/, 2]; return [4 /*yield*/, window.app.vault.createFolder(dir)]; case 1: _a.sent(); _a.label = 2; case 2: return [2 /*return*/]; } }); }); } function getDailyNotePath(date) { return __awaiter(this, void 0, void 0, function () { var _a, format, folder, filename, normalizedPath; return __generator(this, function (_b) { switch (_b.label) { case 0: _a = main.getDailyNoteSettings(), format = _a.format, folder = _a.folder; filename = date.format(format); return [4 /*yield*/, getNotePath(folder, filename)]; case 1: normalizedPath = _b.sent(); return [2 /*return*/, normalizedPath]; } }); }); } var DEFAULT_SETTINGS = { openFileOnWrite: true, openDailyInNewPane: false, openFileOnWriteInNewPane: false, openFileWithoutWriteInNewPane: false, idField: "id", useUID: false, }; var AdvancedURI = /** @class */ (function (_super) { __extends(AdvancedURI, _super); function AdvancedURI() { return _super !== null && _super.apply(this, arguments) || this; } AdvancedURI.prototype.onload = function () { return __awaiter(this, void 0, void 0, function () { var _this = this; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.loadSettings()]; case 1: _a.sent(); this.addSettingTab(new SettingsTab(this.app, this)); this.addCommand({ id: "copy-uri-current-file", name: "copy URI for file", callback: function () { return _this.handleCopyFileURI(); } }); this.addCommand({ id: "copy-uri-daily", name: "copy URI for daily note", callback: function () { return new EnterDataModal(_this).open(); } }); this.addCommand({ id: "copy-uri-search-and-replace", name: "copy URI for search and replace", callback: function () { var fileModal = new FileModal(_this, "Used file for search and replace"); fileModal.open(); fileModal.onChooseItem = function (filePath) { var searchModal = new SearchModal(_this); searchModal.open(); searchModal.onChooseSuggestion = function (item) { new ReplaceModal(_this, item, filePath === null || filePath === void 0 ? void 0 : filePath.source).open(); }; }; }, }); this.addCommand({ id: "copy-uri-command", name: "copy URI for command", callback: function () { var fileModal = new FileModal(_this, "Select a file to be opened before executing the command"); fileModal.open(); fileModal.onChooseItem = function (item) { new CommandModal(_this, item === null || item === void 0 ? void 0 : item.source).open(); }; } }); this.registerObsidianProtocolHandler("advanced-uri", function (e) { return __awaiter(_this, void 0, void 0, function () { var parameters, createdDailyNote, parameter, file, index, extension, moment_1, allDailyNotes, dailyNote, _a; var _this = this; var _b, _c; return __generator(this, function (_d) { switch (_d.label) { case 0: parameters = e; createdDailyNote = false; for (parameter in parameters) { parameters[parameter] = decodeURIComponent(parameters[parameter]); } if (!parameters.uid) return [3 /*break*/, 1]; parameters.filepath = (_b = this.getFileFromUID(parameters.uid)) === null || _b === void 0 ? void 0 : _b.path; return [3 /*break*/, 8]; case 1: if (!parameters.filename) return [3 /*break*/, 2]; file = this.app.metadataCache.getFirstLinkpathDest(parameters.filename, ""); if (!file) { file = this.app.vault.getMarkdownFiles().find(function (file) { var _a; return (_a = obsidian.parseFrontMatterAliases(_this.app.metadataCache.getFileCache(file).frontmatter)) === null || _a === void 0 ? void 0 : _a.includes(parameters.filename); }); } parameters.filepath = (_c = file === null || file === void 0 ? void 0 : file.path) !== null && _c !== void 0 ? _c : obsidian.normalizePath(parameters.filename); return [3 /*break*/, 8]; case 2: if (!parameters.filepath) return [3 /*break*/, 3]; parameters.filepath = obsidian.normalizePath(parameters.filepath); index = parameters.filepath.lastIndexOf("."); extension = parameters.filepath.substring(index < 0 ? parameters.filepath.length : index); if (extension === "") { parameters.filepath = parameters.filepath + ".md"; } return [3 /*break*/, 8]; case 3: if (!(parameters.daily === "true")) return [3 /*break*/, 8]; if (!main.appHasDailyNotesPluginLoaded()) { new obsidian.Notice("Daily notes plugin is not loaded"); return [2 /*return*/]; } moment_1 = window.moment(Date.now()); allDailyNotes = main.getAllDailyNotes(); dailyNote = main.getDailyNote(moment_1, allDailyNotes); if (!!dailyNote) return [3 /*break*/, 7]; if (!(parameters.exists === "true")) return [3 /*break*/, 5]; _a = parameters; return [4 /*yield*/, getDailyNotePath(moment_1)]; case 4: _a.filepath = _d.sent(); return [3 /*break*/, 7]; case 5: return [4 /*yield*/, main.createDailyNote(moment_1)]; case 6: dailyNote = _d.sent(); createdDailyNote = true; _d.label = 7; case 7: if (dailyNote !== undefined) { parameters.filepath = dailyNote.path; } _d.label = 8; case 8: if (parameters.workspace || parameters.saveworkspace == "true") { this.handleWorkspace(parameters); } else if (parameters.commandname || parameters.commandid) { this.handleCommand(parameters); } else if (parameters.filepath && parameters.exists === "true") { this.handleDoesFileExist(parameters); } else if (parameters.filepath && parameters.data) { this.handleWrite(parameters, createdDailyNote); } else if (parameters.filepath && parameters.heading) { this.handleOpen(parameters); } else if (parameters.filepath && parameters.block) { this.handleOpen(parameters); } else if ((parameters.search || parameters.searchregex) && parameters.replace != undefined) { this.handleSearchAndReplace(parameters); } else if (parameters.filepath) { this.handleOpen(parameters); } else if (parameters.settingid) { this.handleOpenSettings(parameters); } else if (parameters.updateplugins) { this.handleUpdatePlugins(parameters); } return [2 /*return*/]; } }); }); }); this.registerEvent(this.app.workspace.on('file-menu', function (menu, _, source) { if (source !== "pane-more-options") { return; } var view = _this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) { return; } menu.addItem(function (item) { item.setTitle("Copy Advanced URI").setIcon('link') .onClick(function (_) { return _this.handleCopyFileURI(); }); }); })); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.success = function (parameters) { if (parameters["x-success"]) obsidian.request({ url: parameters["x-success"], }); }; AdvancedURI.prototype.failure = function (parameters) { if (parameters["x-error"]) obsidian.request({ url: parameters["x-error"] }); }; AdvancedURI.prototype.getFileFromUID = function (uid) { var _this = this; var files = this.app.vault.getFiles(); var idKey = this.settings.idField; return files.find(function (file) { var _a; return obsidian.parseFrontMatterEntry((_a = _this.app.metadataCache.getFileCache(file)) === null || _a === void 0 ? void 0 : _a.frontmatter, idKey) == uid; }); }; AdvancedURI.prototype.handleWorkspace = function (parameters) { var _a, _b, _c; var workspaces = (_c = (_b = (_a = this.app) === null || _a === void 0 ? void 0 : _a.internalPlugins) === null || _b === void 0 ? void 0 : _b.plugins) === null || _c === void 0 ? void 0 : _c.workspaces; if (!workspaces) { new obsidian.Notice("Cannot find Workspaces plugin. Please file an issue."); this.failure(parameters); } else if (workspaces.enabled) { if (parameters.saveworkspace == "true") { var active = workspaces.instance.activeWorkspace; workspaces.instance.saveWorkspace(active); new obsidian.Notice("Saved current workspace to " + active); } if (parameters.workspace != undefined) { workspaces.instance.loadWorkspace(parameters.workspace); } this.success(parameters); } else { new obsidian.Notice("Workspaces plugin is not enabled"); this.failure(parameters); } }; AdvancedURI.prototype.handleCommand = function (parameters) { return __awaiter(this, void 0, void 0, function () { var view, editor, data, lines, rawCommands, command; return __generator(this, function (_a) { switch (_a.label) { case 0: if (!parameters.filepath) return [3 /*break*/, 4]; if (!parameters.mode) return [3 /*break*/, 2]; return [4 /*yield*/, this.app.workspace.openLinkText(parameters.filepath, "/", undefined, { state: { mode: "source" } })]; case 1: _a.sent(); view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (view) { editor = view.editor; data = editor.getValue(); if (parameters.mode === "append") { editor.setValue(data + "\n"); lines = editor.lineCount(); editor.setCursor({ ch: 0, line: lines }); } else if (parameters.mode === "prepend") { editor.setValue("\n" + data); editor.setCursor({ ch: 0, line: 0 }); } else if (parameters.mode === "overwrite") { editor.setValue(""); } } return [3 /*break*/, 4]; case 2: return [4 /*yield*/, this.app.workspace.openLinkText(parameters.filepath, "/", this.settings.openFileWithoutWriteInNewPane, this.getViewStateFromMode(parameters))]; case 3: _a.sent(); _a.label = 4; case 4: if (parameters.commandid) { this.app.commands.executeCommandById(parameters.commandid); } else if (parameters.commandname) { rawCommands = this.app.commands.commands; for (command in rawCommands) { if (rawCommands[command].name === parameters.commandname) { if (rawCommands[command].callback) { rawCommands[command].callback(); } else { rawCommands[command].checkCallback(); } break; } } } this.success(parameters); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.handleDoesFileExist = function (parameters) { return __awaiter(this, void 0, void 0, function () { var exists; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.app.vault.adapter.exists(parameters.filepath)]; case 1: exists = _a.sent(); this.copyText((exists ? 1 : 0).toString()); this.success(parameters); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.handleSearchAndReplace = function (parameters) { return __awaiter(this, void 0, void 0, function () { var file, abstractFile, data, _a, pattern, flags, regex; return __generator(this, function (_b) { switch (_b.label) { case 0: if (parameters.filepath) { abstractFile = this.app.vault.getAbstractFileByPath(parameters.filepath); if (abstractFile instanceof obsidian.TFile) { file = abstractFile; } } else { file = this.app.workspace.getActiveFile(); } if (!file) return [3 /*break*/, 3]; return [4 /*yield*/, this.app.vault.read(file)]; case 1: data = _b.sent(); if (parameters.searchregex) { try { _a = parameters.searchregex.match(/(\/?)(.+)\1([a-z]*)/i), pattern = _a[2], flags = _a[3]; regex = new RegExp(pattern, flags); data = data.replace(regex, parameters.replace); this.success(parameters); } catch (error) { new obsidian.Notice("Can't parse " + parameters.searchregex + " as RegEx"); this.failure(parameters); } } else { data = data.replaceAll(parameters.search, parameters.replace); this.success(parameters); } return [4 /*yield*/, this.writeAndOpenFile(file.path, data, parameters)]; case 2: _b.sent(); return [3 /*break*/, 4]; case 3: new obsidian.Notice("Cannot find file"); this.failure(parameters); _b.label = 4; case 4: return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.handleWrite = function (parameters, createdDailyNote) { if (createdDailyNote === void 0) { createdDailyNote = false; } return __awaiter(this, void 0, void 0, function () { var path, file; return __generator(this, function (_a) { path = parameters.filepath; file = this.app.vault.getAbstractFileByPath(path); if (parameters.mode === "overwrite") { this.writeAndOpenFile(path, parameters.data, parameters); this.success(parameters); } else if (parameters.mode === "prepend") { if (file instanceof obsidian.TFile) { this.prepend(file, parameters); } else { this.prepend(path, parameters); } this.success(parameters); } else if (parameters.mode === "append") { if (file instanceof obsidian.TFile) { this.append(file, parameters); } else { this.append(path, parameters); } this.success(parameters); } else if (!createdDailyNote && file instanceof obsidian.TFile) { new obsidian.Notice("File already exists"); this.failure(parameters); } else { this.writeAndOpenFile(path, parameters.data, parameters); this.success(parameters); } return [2 /*return*/]; }); }); }; AdvancedURI.prototype.handleOpen = function (parameters) { return __awaiter(this, void 0, void 0, function () { var fileIsAlreadyOpened, leaf, viewState, view, cache, heading, view, cache, block, view, line; var _this = this; return __generator(this, function (_a) { switch (_a.label) { case 0: fileIsAlreadyOpened = false; this.app.workspace.iterateAllLeaves(function (leaf) { var _a; if (((_a = leaf.view.file) === null || _a === void 0 ? void 0 : _a.path) === parameters.filepath) { fileIsAlreadyOpened = true; _this.app.workspace.setActiveLeaf(leaf, true, true); } }); if (!fileIsAlreadyOpened) return [3 /*break*/, 2]; leaf = this.app.workspace.activeLeaf; if (!(parameters.viewmode != undefined)) return [3 /*break*/, 2]; viewState = leaf.getViewState(); viewState.state.mode = parameters.viewmode; return [4 /*yield*/, leaf.setViewState(viewState)]; case 1: _a.sent(); _a.label = 2; case 2: if (!(parameters.heading != undefined)) return [3 /*break*/, 4]; return [4 /*yield*/, this.app.workspace.openLinkText(parameters.filepath + "#" + parameters.heading, "", this.settings.openFileWithoutWriteInNewPane, this.getViewStateFromMode(parameters))]; case 3: _a.sent(); view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) return [2 /*return*/]; cache = this.app.metadataCache.getFileCache(view.file); heading = cache.headings.find(function (e) { return e.heading === parameters.heading; }); view.editor.focus(); view.editor.setCursor({ line: heading.position.start.line + 1, ch: 0 }); return [3 /*break*/, 9]; case 4: if (!(parameters.block != undefined)) return [3 /*break*/, 6]; return [4 /*yield*/, this.app.workspace.openLinkText(parameters.filepath + "#^" + parameters.block, "", this.settings.openFileWithoutWriteInNewPane, this.getViewStateFromMode(parameters))]; case 5: _a.sent(); view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) return [2 /*return*/]; cache = this.app.metadataCache.getFileCache(view.file); block = cache.blocks[parameters.block]; view.editor.focus(); view.editor.setCursor({ line: block.position.start.line, ch: 0 }); return [3 /*break*/, 9]; case 6: if (!!fileIsAlreadyOpened) return [3 /*break*/, 8]; return [4 /*yield*/, this.app.workspace.openLinkText(parameters.filepath, "", this.settings.openFileWithoutWriteInNewPane, this.getViewStateFromMode(parameters))]; case 7: _a.sent(); _a.label = 8; case 8: if (parameters.line != undefined) { view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) return [2 /*return*/]; line = Math.min(parameters.line - 1, view.editor.lineCount() - 1); view.editor.focus(); view.editor.setCursor({ line: line, ch: view.editor.getLine(line).length }); } _a.label = 9; case 9: if (!(parameters.mode != undefined)) return [3 /*break*/, 11]; return [4 /*yield*/, this.setCursor(parameters.mode)]; case 10: _a.sent(); _a.label = 11; case 11: this.success(parameters); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.append = function (file, parameters) { var _a; return __awaiter(this, void 0, void 0, function () { var path, dataToWrite, line, data, lines, fileData; return __generator(this, function (_b) { switch (_b.label) { case 0: if (!parameters.heading) return [3 /*break*/, 3]; if (!(file instanceof obsidian.TFile)) return [3 /*break*/, 2]; path = file.path; line = (_a = this.getEndAndBeginningOfHeading(file, parameters.heading)) === null || _a === void 0 ? void 0 : _a.lastLine; if (line === undefined) return [2 /*return*/]; return [4 /*yield*/, this.app.vault.read(file)]; case 1: data = _b.sent(); lines = data.split("\n"); lines.splice.apply(lines, __spreadArray([line, 0], parameters.data.split("\n"))); dataToWrite = lines.join("\n"); _b.label = 2; case 2: return [3 /*break*/, 7]; case 3: fileData = void 0; if (!(file instanceof obsidian.TFile)) return [3 /*break*/, 5]; return [4 /*yield*/, this.app.vault.read(file)]; case 4: fileData = _b.sent(); path = file.path; return [3 /*break*/, 6]; case 5: path = file; fileData = ""; _b.label = 6; case 6: dataToWrite = fileData + "\n" + parameters.data; _b.label = 7; case 7: this.writeAndOpenFile(path, dataToWrite, parameters); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.prepend = function (file, parameters) { var _a; return __awaiter(this, void 0, void 0, function () { var path, dataToWrite, line, data, lines, fileData, cache, line, first, last; return __generator(this, function (_b) { switch (_b.label) { case 0: if (!parameters.heading) return [3 /*break*/, 3]; if (!(file instanceof obsidian.TFile)) return [3 /*break*/, 2]; path = file.path; line = (_a = this.getEndAndBeginningOfHeading(file, parameters.heading)) === null || _a === void 0 ? void 0 : _a.firstLine; if (line === undefined) return [2 /*return*/]; return [4 /*yield*/, this.app.vault.read(file)]; case 1: data = _b.sent(); lines = data.split("\n"); lines.splice.apply(lines, __spreadArray([line, 0], parameters.data.split("\n"))); dataToWrite = lines.join("\n"); _b.label = 2; case 2: return [3 /*break*/, 6]; case 3: if (!(file instanceof obsidian.TFile)) return [3 /*break*/, 5]; return [4 /*yield*/, this.app.vault.read(file)]; case 4: fileData = _b.sent(); cache = this.app.metadataCache.getFileCache(file); console.log(cache); if (cache.frontmatter) { line = cache.frontmatter.position.end.line; first = fileData.split("\n").slice(0, line + 1).join("\n"); last = fileData.split("\n").slice(line + 1).join("\n"); console.log(first); console.log(last); dataToWrite = first + "\n" + parameters.data + "\n" + last; } else { dataToWrite = parameters.data + "\n" + fileData; } path = file.path; return [3 /*break*/, 6]; case 5: path = file; dataToWrite = parameters.data; _b.label = 6; case 6: this.writeAndOpenFile(path, dataToWrite, parameters); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.writeAndOpenFile = function (outputFileName, text, parameters) { return __awaiter(this, void 0, void 0, function () { var fileIsAlreadyOpened_1; var _this = this; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.app.vault.adapter.write(outputFileName, text)]; case 1: _a.sent(); if (this.settings.openFileOnWrite) { fileIsAlreadyOpened_1 = false; this.app.workspace.iterateAllLeaves(function (leaf) { var _a; if (((_a = leaf.view.file) === null || _a === void 0 ? void 0 : _a.path) === outputFileName) { fileIsAlreadyOpened_1 = true; _this.app.workspace.setActiveLeaf(leaf, true, true); } }); if (!fileIsAlreadyOpened_1) this.app.workspace.openLinkText(outputFileName, "", this.settings.openFileOnWriteInNewPane, this.getViewStateFromMode(parameters)); } return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.getEndAndBeginningOfHeading = function (file, heading) { var _a, _b; var cache = this.app.metadataCache.getFileCache(file); var sections = cache.sections; var foundHeading = (_a = cache.headings) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.heading === heading; }); if (foundHeading) { var foundSectionIndex = sections.findIndex(function (section) { return section.type === "heading" && section.position.start.line === foundHeading.position.start.line; }); var restSections = sections.slice(foundSectionIndex + 1); var nextHeadingIndex = restSections === null || restSections === void 0 ? void 0 : restSections.findIndex(function (e) { return e.type === "heading"; }); var lastSection = (_b = restSections[(nextHeadingIndex !== -1 ? nextHeadingIndex : restSections.length) - 1]) !== null && _b !== void 0 ? _b : sections[foundSectionIndex]; var lastLine = lastSection.position.end.line + 1; return { "lastLine": lastLine, "firstLine": sections[foundSectionIndex].position.end.line + 1 }; } else { new obsidian.Notice("Can't find heading"); } }; AdvancedURI.prototype.setCursor = function (mode) { return __awaiter(this, void 0, void 0, function () { var view, editor, viewState, lastLine, lastLineLength; return __generator(this, function (_a) { switch (_a.label) { case 0: view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) return [3 /*break*/, 4]; editor = view.editor; viewState = view.leaf.getViewState(); viewState.state.mode = "source"; if (!(mode === "append")) return [3 /*break*/, 2]; lastLine = editor.lastLine(); lastLineLength = editor.getLine(lastLine).length; return [4 /*yield*/, view.leaf.setViewState(viewState, { focus: true })]; case 1: _a.sent(); editor.setCursor({ ch: lastLineLength, line: lastLine }); return [3 /*break*/, 4]; case 2: if (!(mode === "prepend")) return [3 /*break*/, 4]; return [4 /*yield*/, view.leaf.setViewState(viewState, { focus: true })]; case 3: _a.sent(); editor.setCursor({ ch: 0, line: 0 }); _a.label = 4; case 4: return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.handleCopyFileURI = function () { var _this = this; var view = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) return; var pos = view.editor.getCursor(); var cache = this.app.metadataCache.getFileCache(view.file); if (cache.headings) { for (var _i = 0, _a = cache.headings; _i < _a.length; _i++) { var heading = _a[_i]; if (heading.position.start.line <= pos.line && heading.position.end.line >= pos.line) { this.copyURI({ filepath: view.file.path, heading: heading.heading }); return; } } } if (cache.blocks) { for (var _b = 0, _c = Object.keys(cache.blocks); _b < _c.length; _b++) { var blockID = _c[_b]; var block = cache.blocks[blockID]; if (block.position.start.line <= pos.line && block.position.end.line >= pos.line) { this.copyURI({ filepath: view.file.path, block: blockID }); return; } } } var fileModal = new FileModal(this, "Choose a file", false); fileModal.open(); fileModal.onChooseItem = function (item, _) { new EnterDataModal(_this, item.source).open(); }; }; AdvancedURI.prototype.handleOpenSettings = function (parameters) { if (this.app.setting.containerEl.parentElement === null) { this.app.setting.open(); } if (parameters.settingid == "plugin-browser") { this.app.setting.openTabById("community-plugins"); this.app.setting.activeTab.containerEl.find(".mod-cta").click(); } else if (parameters.settingid == "theme-browser") { this.app.setting.openTabById("appearance"); this.app.setting.activeTab.containerEl.find(".mod-cta").click(); } else { this.app.setting.openTabById(parameters.settingid); } this.success(parameters); }; AdvancedURI.prototype.handleUpdatePlugins = function (parameters) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { switch (_a.label) { case 0: parameters.settingid = "community-plugins"; this.handleOpenSettings(parameters); this.app.setting.activeTab.containerEl.findAll(".mod-cta").last().click(); new obsidian.Notice("Waiting 10 seconds"); return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 10 * 1000); })]; case 1: _a.sent(); if (Object.keys(this.app.plugins.updates).length !== 0) { this.app.setting.activeTab.containerEl.findAll(".mod-cta").last().click(); } this.success(parameters); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.copyURI = function (parameters) { return __awaiter(this, void 0, void 0, function () { var uri, file, _a, parameter; return __generator(this, function (_b) { switch (_b.label) { case 0: uri = "obsidian://advanced-uri?vault=" + this.app.vault.getName(); file = this.app.vault.getAbstractFileByPath(parameters.filepath); if (!(this.settings.useUID && file instanceof obsidian.TFile)) return [3 /*break*/, 2]; parameters.filepath = undefined; _a = parameters; return [4 /*yield*/, this.getURIFromFile(file)]; case 1: _a.uid = _b.sent(); _b.label = 2; case 2: for (parameter in parameters) { if (parameters[parameter] != undefined) { uri = uri + ("&" + parameter + "=" + encodeURIComponent(parameters[parameter])); } } return [4 /*yield*/, this.copyText(encodeURI(uri))]; case 3: _b.sent(); new obsidian.Notice("Advanced URI copied to your clipboard"); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.copyText = function (text) { return navigator.clipboard.writeText(text); }; AdvancedURI.prototype.getURIFromFile = function (file) { return __awaiter(this, void 0, void 0, function () { var fileContent, frontmatter, uid, isYamlEmpty, splitContent, newFileContent; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.app.vault.read(file)]; case 1: fileContent = _a.sent(); frontmatter = this.app.metadataCache.getFileCache(file).frontmatter; uid = obsidian.parseFrontMatterEntry(frontmatter, this.settings.idField); if (uid) return [2 /*return*/, uid]; isYamlEmpty = ((!frontmatter || frontmatter.length === 0) && !fileContent.match(/^-{3}\s*\n*\r*-{3}/)); uid = v4(); splitContent = fileContent.split("\n"); if (isYamlEmpty) { splitContent.unshift("---"); splitContent.unshift(this.settings.idField + ": " + uid); splitContent.unshift("---"); } else { splitContent.splice(1, 0, this.settings.idField + ": " + uid); } newFileContent = splitContent.join("\n"); return [4 /*yield*/, this.app.vault.modify(file, newFileContent)]; case 2: _a.sent(); return [2 /*return*/, uid]; } }); }); }; AdvancedURI.prototype.getViewStateFromMode = function (parameters) { return parameters.viewmode ? { state: { mode: parameters.viewmode } } : undefined; }; AdvancedURI.prototype.loadSettings = function () { return __awaiter(this, void 0, void 0, function () { var _a, _b, _c, _d; return __generator(this, function (_e) { switch (_e.label) { case 0: _a = this; _c = (_b = Object).assign; _d = [DEFAULT_SETTINGS]; return [4 /*yield*/, this.loadData()]; case 1: _a.settings = _c.apply(_b, _d.concat([_e.sent()])); return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.saveSettings = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.saveData(this.settings)]; case 1: _a.sent(); return [2 /*return*/]; } }); }); }; return AdvancedURI; }(obsidian.Plugin)); var SettingsTab = /** @class */ (function (_super) { __extends(SettingsTab, _super); function SettingsTab(app, plugin) { var _this = _super.call(this, app, plugin) || this; _this.plugin = plugin; return _this; } SettingsTab.prototype.display = function () { var _this = this; var containerEl = this.containerEl; containerEl.empty(); containerEl.createEl("h2", { text: this.plugin.manifest.name }); new obsidian.Setting(containerEl) .setName("Open file on write") .addToggle(function (cb) { return cb.onChange(function (value) { _this.plugin.settings.openFileOnWrite = value; _this.plugin.saveSettings(); }).setValue(_this.plugin.settings.openFileOnWrite); }); new obsidian.Setting(containerEl) .setName("Open file on write in a new pane") .setDisabled(this.plugin.settings.openFileOnWrite) .addToggle(function (cb) { return cb.onChange(function (value) { _this.plugin.settings.openFileOnWriteInNewPane = value; _this.plugin.saveSettings(); }).setValue(_this.plugin.settings.openFileOnWriteInNewPane); }); new obsidian.Setting(containerEl) .setName("Open daily note in a new pane") .addToggle(function (cb) { return cb.onChange(function (value) { _this.plugin.settings.openDailyInNewPane = value; _this.plugin.saveSettings(); }).setValue(_this.plugin.settings.openDailyInNewPane); }); new obsidian.Setting(containerEl) .setName("Open file without write in new pane") .addToggle(function (cb) { return cb.onChange(function (value) { _this.plugin.settings.openFileWithoutWriteInNewPane = value; _this.plugin.saveSettings(); }).setValue(_this.plugin.settings.openFileWithoutWriteInNewPane); }); new obsidian.Setting(containerEl) .setName("Use UID instead of file paths") .addToggle(function (cb) { return cb.onChange(function (value) { _this.plugin.settings.useUID = value; _this.plugin.saveSettings(); }).setValue(_this.plugin.settings.useUID); }); new obsidian.Setting(containerEl) .setName("UID field in frontmatter") .addText(function (cb) { return cb.onChange(function (value) { _this.plugin.settings.idField = value; _this.plugin.saveSettings(); }).setValue(_this.plugin.settings.idField); }); }; return SettingsTab; }(obsidian.PluginSettingTab)); var EnterDataModal = /** @class */ (function (_super) { __extends(EnterDataModal, _super); function EnterDataModal(plugin, file) { var _this = _super.call(this, plugin.app) || this; //null if for normal write mode, its not associated with a special mode like "append" or "prepend" _this.modes = [null, "overwrite", "append", "prepend"]; _this.plugin = plugin; _this.setPlaceholder("Type your data to be written to the file or leave it empty to just open it"); _this.file = file; return _this; } EnterDataModal.prototype.getSuggestions = function (query) { var _this = this; if (query == "") query = null; var suggestions = []; var _loop_1 = function (mode) { if (!(mode === "overwrite" && !query)) { var display = void 0; if (query) { if (mode) { display = "Write \"" + query + "\" in " + mode + " mode"; } else { display = "Write \"" + query + "\""; } } else { if (mode) { display = "Open in " + mode + " mode"; } else { display = "Open"; } } suggestions.push({ data: query, display: display, mode: mode, func: function () { if (_this.file) { _this.plugin.copyURI({ filepath: _this.file, data: query, mode: mode }); } else { _this.plugin.copyURI({ daily: "true", data: query, mode: mode }); } } }); } }; for (var _i = 0, _a = this.modes; _i < _a.length; _i++) { var mode = _a[_i]; _loop_1(mode); } return suggestions; }; EnterDataModal.prototype.renderSuggestion = function (value, el) { el.innerText = value.display; }; EnterDataModal.prototype.onChooseSuggestion = function (item, _) { item.func(); }; return EnterDataModal; }(obsidian.SuggestModal)); var FileModal = /** @class */ (function (_super) { __extends(FileModal, _super); function FileModal(plugin, placeHolder, allowNoFile) { if (allowNoFile === void 0) { allowNoFile = true; } var _this = _super.call(this, plugin.app) || this; _this.placeHolder = placeHolder; _this.allowNoFile = allowNoFile; _this.plugin = plugin; _this.setPlaceholder(_this.placeHolder); return _this; } FileModal.prototype.getItems = function () { var specialItems = []; if (this.allowNoFile) { specialItems.push({ display: "", source: undefined }); } var file = this.app.workspace.getActiveFile(); if (file) { specialItems.push({ display: "", source: file.path }); } return __spreadArray(__spreadArray([], specialItems), this.app.vault.getFiles().map(function (e) { return { display: e.path, source: e.path }; })); }; FileModal.prototype.getItemText = function (item) { return item.display; }; FileModal.prototype.onChooseItem = function (item, evt) { }; return FileModal; }(obsidian.FuzzySuggestModal)); var CommandModal = /** @class */ (function (_super) { __extends(CommandModal, _super); function CommandModal(plugin, file) { var _this = _super.call(this, plugin.app) || this; _this.plugin = plugin; _this.file = file; return _this; } CommandModal.prototype.getItems = function () { var rawCommands = this.app.commands.commands; var commands = Object.keys(rawCommands).map(function (e) { return { id: rawCommands[e].id, name: rawCommands[e].name }; }); return commands; }; CommandModal.prototype.getItemText = function (item) { return item.name; }; CommandModal.prototype.onChooseItem = function (item, _) { this.plugin.copyURI({ filepath: this.file, commandid: item.id }); }; return CommandModal; }(obsidian.FuzzySuggestModal)); var SearchModal = /** @class */ (function (_super) { __extends(SearchModal, _super); function SearchModal(plugin) { var _this = _super.call(this, plugin.app) || this; _this.plugin = plugin; _this.setPlaceholder("Searched text. RegEx is supported"); return _this; } SearchModal.prototype.getSuggestions = function (query) { if (query === "") { query = "..."; } var regex; try { regex = new RegExp(query); } catch (error) { } return [ { source: query, isRegEx: false, display: query }, { source: query, display: regex ? "As RegEx: " + query : "Can't parse RegEx", isRegEx: true } ]; }; SearchModal.prototype.renderSuggestion = function (value, el) { el.innerText = value.display; }; SearchModal.prototype.onChooseSuggestion = function (item, _) { }; return SearchModal; }(obsidian.SuggestModal)); var ReplaceModal = /** @class */ (function (_super) { __extends(ReplaceModal, _super); function ReplaceModal(plugin, search, filepath) { var _this = _super.call(this, plugin.app) || this; _this.search = search; _this.filepath = filepath; _this.emptyText = "Empty text (replace with nothing)"; _this.plugin = plugin; _this.setPlaceholder("Replacement text"); return _this; } ReplaceModal.prototype.getSuggestions = function (query) { if (query === "") { query = this.emptyText; } return [query]; }; ReplaceModal.prototype.renderSuggestion = function (value, el) { el.innerText = value; }; ReplaceModal.prototype.onChooseSuggestion = function (item, _) { if (this.search.isRegEx) { this.plugin.copyURI({ filepath: this.filepath, searchregex: this.search.source, replace: item == this.emptyText ? "" : item }); } else { this.plugin.copyURI({ filepath: this.filepath, search: this.search.source, replace: item == this.emptyText ? "" : item }); } }; return ReplaceModal; }(obsidian.SuggestModal)); module.exports = AdvancedURI; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIm5vZGVfbW9kdWxlcy9vYnNpZGlhbi1kYWlseS1ub3Rlcy1pbnRlcmZhY2UvZGlzdC9tYWluLmpzIiwibm9kZV9tb2R1bGVzL3V1aWQvZGlzdC9lc20tYnJvd3Nlci9ybmcuanMiLCJub2RlX21vZHVsZXMvdXVpZC9kaXN0L2VzbS1icm93c2VyL3JlZ2V4LmpzIiwibm9kZV9tb2R1bGVzL3V1aWQvZGlzdC9lc20tYnJvd3Nlci92YWxpZGF0ZS5qcyIsIm5vZGVfbW9kdWxlcy91dWlkL2Rpc3QvZXNtLWJyb3dzZXIvc3RyaW5naWZ5LmpzIiwibm9kZV9tb2R1bGVzL3V1aWQvZGlzdC9lc20tYnJvd3Nlci92NC5qcyIsInNyYy9kYWlseV9ub3RlX3V0aWxzLnRzIiwic3JjL21haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyohICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbkNvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLlxyXG5cclxuUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgY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wIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkpIHRbcF0gPSBzW3BdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdDtcclxuICAgIH1cclxuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19yZXN0KHMsIGUpIHtcclxuICAgIHZhciB0ID0ge307XHJcbiAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkgJiYgZS5pbmRleE9mKHApIDwgMClcclxuICAgICAgICB0W3BdID0gc1twXTtcclxuICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT09IFwiZnVuY3Rpb25cIilcclxuICAgICAgICBmb3IgKHZhciBpID0gMCwgcCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMocyk7IGkgPCBwLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChlLmluZGV4T2YocFtpXSkgPCAwICYmIE9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChzLCBwW2ldKSlcclxuICAgICAgICAgICAgICAgIHRbcFtpXV0gPSBzW3BbaV1dO1xyXG4gICAgICAgIH1cclxuICAgIHJldHVybiB0O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19kZWNvcmF0ZShkZWNvcmF0b3JzLCB0YXJnZXQsIGtleSwgZGVzYykge1xyXG4gICAgdmFyIGMgPSBhcmd1bWVudHMubGVuZ3RoLCByID0gYyA8IDMgPyB0YXJnZXQgOiBkZXNjID09PSBudWxsID8gZGVzYyA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IodGFyZ2V0LCB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A3OiBvcCA9IF8ub3BzLnBvcCgpOyBfLnRyeXMucG9wKCk7IGNvbnRpbnVlO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgICAgICBpZiAoISh0ID0gXy50cnlzLCB0ID0gdC5sZW5ndGggPiAwICYmIHRbdC5sZW5ndGggLSAxXSkgJiYgKG9wWzBdID09PSA2IHx8IG9wWzBdID09PSAyKSkgeyBfID0gMDsgY29udGludWU7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDMgJiYgKCF0IHx8IChvcFsxXSA+IHRbMF0gJiYgb3BbMV0gPCB0WzNdKSkpIHsgXy5sYWJlbCA9IG9wWzFdOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChvcFswXSA9PT0gNiAmJiBfLmxhYmVsIDwgdFsxXSkgeyBfLmxhYmVsID0gdFsxXTsgdCA9IG9wOyBicmVhazsgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0ICYmIF8ubGFiZWwgPCB0WzJdKSB7IF8ubGFiZWwgPSB0WzJdOyBfLm9wcy5wdXNoKG9wKTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodFsyXSkgXy5vcHMucG9wKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBvcCA9IGJvZHkuY2FsbCh0aGlzQXJnLCBfKTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7IG9wID0gWzYsIGVdOyB5ID0gMDsgfSBmaW5hbGx5IHsgZiA9IHQgPSAwOyB9XHJcbiAgICAgICAgaWYgKG9wWzBdICYgNSkgdGhyb3cgb3BbMV07IHJldHVybiB7IHZhbHVlOiBvcFswXSA/IG9wWzFdIDogdm9pZCAwLCBkb25lOiB0cnVlIH07XHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCB2YXI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VtcGxhdGVDb250ZW50c1xuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKmRhdGVcXHMqfX0vZ2ksIGZpbGVuYW1lKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpbWVcXHMqfX0vZ2ksIG1vbWVudCgpLmZvcm1hdChcIkhIOm1tXCIpKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpdGxlXFxzKn19L2dpLCBmaWxlbmFtZSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyooZGF0ZXx0aW1lKVxccyooKFsrLV1cXGQrKShbeXFtd2Roc10pKT9cXHMqKDouKz8pP319L2dpLCAoXywgX3RpbWVPckRhdGUsIGNhbGMsIHRpbWVEZWx0YSwgdW5pdCwgbW9tZW50Rm9ybWF0KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBub3cgPSBtb21lbnQoKTtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gZGF0ZS5jbG9uZSgpLnNldCh7XG4gICAgICAgICAgICAgICAgaG91cjogbm93LmdldChcImhvdXJcIiksXG4gICAgICAgICAgICAgICAgbWludXRlOiBub3cuZ2V0KFwibWludXRlXCIpLFxuICAgICAgICAgICAgICAgIHNlY29uZDogbm93LmdldChcInNlY29uZFwiKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNhbGMpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0ZS5hZGQocGFyc2VJbnQodGltZURlbHRhLCAxMCksIHVuaXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1vbWVudEZvcm1hdCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQobW9tZW50Rm9ybWF0LnN1YnN0cmluZygxKS50cmltKCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChmb3JtYXQpO1xuICA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QgY3JlYXRlZEZpbGUgPSBhd2FpdCB2YXVsdC5jcmVhdGUobm9ybWFsaXplZFBhdGgsIHRlbXBsYXRlQ29udGVudHNcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyooZGF0ZXx0aW1lKVxccyooKFsrLV1cXGQrKShbeXFtd2Roc10pKT9cXHMqKDouKz8pP319L2dpLCAoXywgX3RpbWVPckRhdGUsIGNhbGMsIHRpbWVEZWx0YSwgdW5pdCwgbW9tZW50Rm9ybWF0KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBub3cgPSB3aW5kb3cubW9tZW50KCk7XG4gICAgICAgICAgICBjb25zdCBjdXJyZW50RGF0ZSA9IGRhdGUuY2xvbmUoKS5zZXQoe1xuICAgICAgICAgICAgICAgIGhvdXI6IG5vdy5nZXQoXCJob3VyXCIpLFxuICAgICAgICAgICAgICAgIG1pbnV0ZTogbm93LmdldChcIm1pbnV0ZVwiKSxcbiAgICAgICAgICAgICAgICBzZWNvbmQ6IG5vdy5nZXQoXCJzZWNvbmRcIiksXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmIChjYWxjKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudERhdGUuYWRkKHBhcnNlSW50KHRpbWVEZWx0YSwgMTApLCB1bml0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtb21lbnRGb3JtYXQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY3VycmVudERhdGUuZm9ybWF0KG1vbWVudEZvcm1hdC5zdWJzdHJpbmcoMSkudHJpbSgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQoZm9ybWF0KTtcbiAgICAgICAgfSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyp0aXRsZVxccyp9fS9naSwgZmlsZW5hbWUpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGltZVxccyp9fS9naSwgd2luZG93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dCkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgbm93ID0gd2luZG93Lm1vbWVudCgpO1xuICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBkYXRlLmNsb25lKCkuc2V0KHtcbiAgICAgICAgICAgICAgICBob3VyOiBub3cuZ2V0KFwiaG91clwiKSxcbiAgICAgICAgICAgICAgICBtaW51dGU6IG5vdy5nZXQoXCJtaW51dGVcIiksXG4gICAgICAgICAgICAgICAgc2Vjb25kOiBub3cuZ2V0KFwic2Vjb25kXCIpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAoY2FsYykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRlLmFkZChwYXJzZUludCh0aW1lRGVsdGEsIDEwKSwgdW5pdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobW9tZW50Rm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChtb21lbnRGb3JtYXQuc3Vic3RyaW5nKDEpLnRyaW0oKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY3VycmVudERhdGUuZm9ybWF0KGZvcm1hdCk7XG4gICAgICAgIH0pXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqZGF0ZVxccyp9fS9naSwgZmlsZW5hbWUpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGltZVxccyp9fS9naSwgd2luZG93Lm1vbWVudCgpLmZvcm1hdChcIkhIOm1tXCIpKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpdGxlXFxzKn19L2dpLCBmaWxlbmFtZSkpO1xuICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueVxuICAgICAgICB3aW5kb3cuYXBwLmZvbGRNYW5hZ2VyLnNhdmUoY3JlYXRlZEZpbGUsIElGb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iAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gZGF0ZS5jbG9uZSgpLnNldCh7XG4gICAgICAgICAgICAgICAgaG91cjogbm93LmdldChcImhvdXJcIiksXG4gICAgICAgICAgICAgICAgbWludXRlOiBub3cuZ2V0KFwibWludXRlXCIpLFxuICAgICAgICAgICAgICAgIHNlY29uZDogbm93LmdldChcInNlY29uZFwiKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNhbGMpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0ZS5hZGQocGFyc2VJbnQodGltZURlbHRhLCAxMCksIHVuaXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1vbWVudEZvcm1hdCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQobW9tZW50Rm9ybWF0LnN1YnN0cmluZygxKS50cmltKCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChmb3JtYXQpO1xuICAgICAgICB9KVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKmRhdGVcXHMqfX0vZ2ksIGZpbGVuYW1lKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpbWVcXHMqfX0vZ2ksIHdpbmRvdy5tb21lbnQoKS5mb3JtYXQoXCJISDptbVwiKSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyp0aXRsZVxccyp9fS9naSwgZmlsZW5hbWUpKTtcbiAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbiAgICAgICAgd2luZG93LmFwcC5mb2xkTWFuYWdlci5zYXZlKGNyZWF0ZWRGaWxlLCBJRm9sZEluZm8pO1xuICAgICAgICByZXR1cm4gY3JlYXRlZEZpbGU7XG4gICAgfVxuICAgIGNhdGNo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G4gICAgICAgIHRoaXMuYWRkQ29tbWFuZCh7XG4gICAgICAgICAgICBpZDogXCJjb3B5LXVyaS1kYWlseVwiLFxuICAgICAgICAgICAgbmFtZTogXCJjb3B5IFVSSSBmb3IgZGFpbHkgbm90ZVwiLFxuICAgICAgICAgICAgY2FsbGJhY2s6ICgpID0+IG5ldyBFbnRlckRhdGFNb2RhbCh0aGlzKS5vcGVuKClcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5hZGRDb21tYW5kKHtcbiAgICAgICAgICAgIGlkOiBcImNvcHktdXJpLXNlYXJjaC1hbmQtcmVwbGFjZVwiLFxuICAgICAgICAgICAgbmFtZTogXCJjb3B5IFVSSSBmb3Igc2VhcmNoIGFuZCByZXBsYWNlXCIsXG4gICAgICAgICAgICBjYWxsYmFjazogKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGZpbGVNb2RhbCA9IG5ldyBGaWxlTW9kYWwodGhpcywgXCJVc2VkIGZpbGUgZm9yIHNlYXJjaCBhbmQgcmVwbGFjZVwiKTtcbiAgICAgICAgICAgICAgICBmaWxlTW9kYWwub3BlbigpO1xuICAgICAgICAgICAgICAgIGZpbGVNb2RhbC5vbkNob29zZUl0ZW0gPSAoZmlsZVBhdGg6IEZpbGVNb2RhbERhdGEpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2VhcmNoTW9kYWwgPSBuZXcgU2VhcmNoTW9kYWwodGhpcyk7XG4gICAgICAgICAgICAgICAgICAgIHNlYXJjaE1vZGFsLm9wZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgc2VhcmNoTW9kYWwub25DaG9vc2VTdWdnZXN0aW9uID0gKGl0ZW06IFNlYXJjaE1vZGFsRGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV3IFJlcGxhY2VNb2RhbCh0aGlzLCBpdGVtLCBmaWxlUGF0aD8uc291cmNlKS5vcGVuKCk7XG4gICAgICAgICAgICAgICAgICAgIH07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GggPSBub3JtYWxpemVQYXRoKHBhcmFtZXRlcnMuZmlsZXBhdGgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gcGFyYW1ldGVycy5maWxlcGF0aC5sYXN0SW5kZXhPZihcIi5cIik7XG4gICAgICAgICAgICAgICAgY29uc3QgZXh0ZW5zaW9uID0gcGFyYW1ldGVycy5maWxlcGF0aC5zdWJzdHJpbmcoaW5kZXggPCAwID8gcGFyYW1ldGVycy5maWxlcGF0aC5sZW5ndGggOiBpbmRleCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoZXh0ZW5zaW9uID09PSBcIlwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBwYXJhbWV0ZXJzLmZpbGVwYXRoICsgXCIubWRcIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuZGFpbHkgPT09IFwidHJ1ZVwiKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcHBIYXNEYWlseU5vdGVzUGx1Z2luTG9hZGVkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZShcIkRhaWx5IG5vdGVzIHBsdWdpbiBpcyBub3QgbG9hZGVkXCIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IG1vbWVudCA9ICh3aW5kb3cgYXMgYW55KS5tb21lbnQoRGF0ZS5ub3coKSk7XG4gICAgICAgICAgICAgICAgY29uc3QgYWxsRGFpbHlOb3RlcyA9IGdldEFsbERhaWx5Tm90ZXMoKTtcbiAgICAgICAgICAgICAgICBsZXQgZGFpbHlOb3RlID0gZ2V0RGFpbHlOb3RlKG1vbWVudCwgYWxsRGFpbHlOb3Rlcyk7XG4gICAgICAgICAgICAgICAgaWYgKCFkYWlseU5vdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8vIFByZXZlbnQgZGFpbHkgbm90ZSBmcm9tIGJlaW5nIGNyZWF0ZWQgb24gZXhpc3RpbmcgY2hlY2tcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMuZXhpc3RzID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5maWxlcGF0aCA9IGF3YWl0IGdldERhaWx5Tm90ZVBhdGgobW9tZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhaWx5Tm90ZSA9IGF3YWl0IGNyZWF0ZURhaWx5Tm90ZShtb21lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlZERhaWx5Tm90ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGRhaWx5Tm90ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBkYWlseU5vdGUucGF0aDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwYXJhbWV0ZXJzLndvcmtzcGFjZSB8fCBwYXJhbWV0ZXJzLnNhdmV3b3Jrc3BhY2UgPT0gXCJ0cnVlXCIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZVdvcmtzcGFjZShwYXJhbWV0ZXJzKTtcblxuICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLmNvbW1hbmRuYW1lIHx8IHBhcmFtZXRlcnMuY29tbWFuZGlkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVDb21tYW5kKHBhcmFtZXRlcnMpO1xuXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuZmlsZXBhdGggJiYgcGFyYW1ldGVycy5leG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GFyYW1ldGVycy51cGRhdGVwbHVnaW5zKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVVcGRhdGVQbHVnaW5zKHBhcmFtZXRlcnMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLnJlZ2lzdGVyRXZlbnQoXG4gICAgICAgICAgICB0aGlzLmFwcC53b3Jrc3BhY2Uub24oJ2ZpbGUtbWVudScsIChtZW51LCBfLCBzb3VyY2UpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoc291cmNlICE9PSBcInBhbmUtbW9yZS1vcHRpb25zXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gdGhpcy5hcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgICAgICBpZiAoIXZpZXcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG1lbnUuYWRkSXRlbSgoaXRlbSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpdGVtLnNldFRpdGxlKGBDb3B5IEFkdmFuY2VkIFVSSWApLnNldEljb24oJ2xpbmsnKVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uQ2xpY2soKF8pID0+IHRoaXMuaGFuZGxlQ29weUZpbGVVUkkoKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KSk7XG4gICAgfVxuXG4gICAgc3VjY2VzcyhwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzKSB7XG4gICAgICAgIGlmIChwYXJhbWV0ZXJzW1wieC1zdWNjZXNzXCJdKVxuICAgICAgICAgICAgcmVxdWVzdCh7IHVybDogcGFyYW1ldGVyc1tcIngtc3VjY2Vzc1wiXSwgfSk7XG4gICAgfV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AgICAgICAgY29uc3QgdmlldyA9IHRoaXMuYXBwLndvcmtzcGFjZS5nZXRBY3RpdmVWaWV3T2ZUeXBlKE1hcmtkb3duVmlldyk7XG4gICAgICAgICAgICAgICAgaWYgKHZpZXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWRpdG9yID0gdmlldy5lZGl0b3I7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBlZGl0b3IuZ2V0VmFsdWUoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJhcHBlbmRcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldFZhbHVlKGRhdGEgKyBcIlxcblwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVzID0gZWRpdG9yLmxpbmVDb3VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldEN1cnNvcih7IGNoOiAwLCBsaW5lOiBsaW5lcyB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLm1vZGUgPT09IFwicHJlcGVuZFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0VmFsdWUoXCJcXG5cIiArIGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldEN1cnNvcih7IGNoOiAwLCBsaW5lOiAwIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJvdmVyd3JpdGVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldFZhbHVlKFwiXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLmFwcC53b3Jrc3BhY2Uub3BlbkxpbmtUZXh0KHBhcmFtZXRlcnMuZmlsZXBhdGgsIFwiL1wiLCB0aGlzLnNldHRpbmdzLm9wZW5GaWxlV2l0aG91dFdyaXRlSW5OZXdQYW5lLCB0aGlzLmdldFZpZXdTdGF0ZUZyb21Nb2RlKHBhcmFtZXRlcnMpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAocGFyYW1ldGVycy5jb21tYW5kaWQpIHtcbiAgICAgICAgICAgICh0aGlzLmFwcCBhcyBhbnkpLmNvbW1hbmRzLmV4ZWN1dGVDb21tYW5kQnlJZChwYXJhbWV0ZXJzLmNvbW1hbmRpZCk7XG4gICAgICAgIH0gZWxzZSBpZiAocGFyYW1ldGVycy5jb21tYW5kbmFtZSkge1xuICAgICAgICAgICAgY29uc3QgcmF3Q29tbWFuZHMgPSAodGhpcy5hcHAgYXMgYW55KS5jb21tYW5kcy5jb21tYW5kcztcbiAgICAgICAgICAgIGZvciAoY29uc3QgY29tbWFuZCBpbiByYXdDb21tYW5kcykge1xuICAgICAgICAgICAgICAgIGlmIChyYXdDb21tYW5kc1tjb21tYW5kXS5uYW1lID09PSBwYXJhbWV0ZXJzLmNvbW1hbmRuYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyYXdDb21tYW5kc1tjb21tYW5kXS5jYWxsYmFjaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmF3Q29tbWFuZHNbY29tbWFuZF0uY2FsbGJhY2soKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJhd0NvbW1hbmRzW2NvbW1hbmRdLmNoZWNrQ2FsbGJhY2soKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zdWNjZXNzKHBhcmFtZXRlcnMpO1xuICAgIH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pbGUucGF0aDtcbiAgICAgICAgICAgICAgICBjb25zdCBsaW5lID0gdGhpcy5nZXRFbmRBbmRCZWdpbm5pbmdPZkhlYWRpbmcoZmlsZSwgcGFyYW1ldGVycy5oZWFkaW5nKT8ubGFzdExpbmU7XG4gICAgICAgICAgICAgICAgaWYgKGxpbmUgPT09IHVuZGVmaW5lZCkgcmV0dXJuO1xuXG4gICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IGF3YWl0IHRoaXMuYXBwLnZhdWx0LnJlYWQoZmlsZSk7XG4gICAgICAgICAgICAgICAgY29uc3QgbGluZXMgPSBkYXRhLnNwbGl0KFwiXFxuXCIpO1xuXG4gICAgICAgICAgICAgICAgbGluZXMuc3BsaWNlKGxpbmUsIDAsIC4uLnBhcmFtZXRlcnMuZGF0YS5zcGxpdChcIlxcblwiKSk7XG4gICAgICAgICAgICAgICAgZGF0YVRvV3JpdGUgPSBsaW5lcy5qb2luKFwiXFxuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgbGV0IGZpbGVEYXRhOiBzdHJpbmc7XG4gICAgICAgICAgICBpZiAoZmlsZSBpbnN0YW5jZW9mIFRGaWxlKSB7XG4gICAgICAgICAgICAgICAgZmlsZURhdGEgPSBhd2FpdCB0aGlzLmFwcC52YXVsdC5yZWFkKGZpbGUpO1xuICAgICAgICAgICAgICAgIHBhdGggPSBmaWxlLnBhdGg7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHBhdGggPSBmaWxlO1xuICAgICAgICAgICAgICAgIGZpbGVEYXRhID0gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRhdGFUb1dyaXRlID0gZmlsZURhdGEgKyBcIlxcblwiICsgcGFyYW1ldGVycy5kYXRhO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMud3JpdGVBbmRPcGVuRmlsZShwYXRoLCBkYXRhVG9Xcml0ZSwgcGFyYW1ldGVycyk7XG4gICAgfVxuXG4gICAgYXN5bmMgcHJlcGVuZChmaWxlOiBURmlsZSB8IHN0cmluZywgcGFyYW1ldGVyczogUGFyYW1ldGVycykge1xuICAgICAgICBsZXQgcGF0aDogc3RyaW5nO1xuICAgICAgICBsZXQgZGF0YVRvV3JpdGU6IHN0cmluZztcbiAgICAgICAgaWYgKHBhcmFtZXRlcnMuaGVhZGluZykge1xuICAgICAgICAgICAgaWYgKGZpbGUgaW5zdGFuY2VvZiBURmlsZSkge1xuICAgICAgICAgICAgICAgIHBhdGggPSBmaWxlLnBhdGg7XG4gICAgICAgICAgICAgICAgY29uc3QgbGluZSA9IHRoaXMuZ2V0RW5kQW5kQmVnaW5uaW5nT2ZIZWFkaW5nKGZpbGUsIHBhcmFtZXRlcnMuaGVhZGluZyk/LmZpcnN0TGluZTtcbiAgICAgICAgICAgICAgICBpZiAobGluZSA9PT0gdW5kZWZpbmVkKSByZXR1cm47XG5cbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0gYXdhaXQgdGhpcy5hcHAudmF1bHQucmVhZChmaWxlKTtcbiAgICAgICAgICAgICAgICBjb25zdCBsaW5lcyA9IGRhdGEuc3BsaXQoXCJcXG5cIik7XG5cbiAgICAgICAgICAgICAgICBsaW5lcy5zcGxpY2UobGluZSwgMCwgLi4ucGFyYW1ldGVycy5kYXRhLnNwbGl0KFwiXFxuXCIpKTtcbiAgICAgICAgICAgICAgICBkYXRhVG9Xcml0ZSA9IGxpbmVzLmpvaW4oXCJcXG5cIik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBmaWxlRGF0YSA9IGF3YWl0IHRoaXMuYXBwLnZhdWx0LnJlYWQoZmlsZSk7XG4gICAgICAgICAgICAgICAgY29uc3QgY2FjaGUgPSB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZShmaWxlKTtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjYWNoZSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoY2FjaGUuZnJvbnRtYXR0ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGluZSA9IGNhY2hlLmZyb250bWF0dGVyLnBvc2l0aW9uLmVuZC5saW5lO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBmaXJzdCA9IGZpbGVEYXRhLnNwbGl0KFwiXFxuXCIpLnNsaWNlKDAsIGxpbmUgKyAxKS5qb2luKFwiXFxuXCIpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBsYXN0ID0gZmlsZURhdGEuc3BsaXQoXCJcXG5cIikuc2xpY2UobGluZSArIDEpLmpvaW4oXCJcXG5cIik7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGZpcnN0KTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cobGFzdCk7XG4gICAgICAgICAgICAgICAgICAgIGRhdGFUb1dyaXRlID0gZmlyc3QgKyBcIlxcblwiICsgcGFyYW1ldGVycy5kYXRhICsgXCJcXG5cIiArIGxhc3Q7XG5cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRhVG9Xcml0ZSA9IHBhcmFtZXRlcnMuZGF0YSArIFwiXFxuXCIgKyBmaWxlRGF0YTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcGF0aCA9IGZpbGUucGF0aDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGF0aCA9IGZpbGU7XG4gICAgICAgICAgICAgICAgZGF0YVRvV3JpdGUgPSBwYXJhbWV0ZXJzLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy53cml0ZUFuZE9wZW5GaWxlKHBhdGgsIGRhdGFUb1dya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gICAgICAgfSBlbHNlIGlmIChtb2RlID09PSBcInByZXBlbmRcIikge1xuICAgICAgICAgICAgICAgIGF3YWl0IHZpZXcubGVhZi5zZXRWaWV3U3RhdGUodmlld1N0YXRlLCB7IGZvY3VzOiB0cnVlIH0pO1xuXG4gICAgICAgICAgICAgICAgZWRpdG9yLnNldEN1cnNvcih7IGNoOiAwLCBsaW5lOiAwIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaGFuZGxlQ29weUZpbGVVUkkoKSB7XG4gICAgICAgIGNvbnN0IHZpZXcgPSB0aGlzLmFwcC53b3Jrc3BhY2UuZ2V0QWN0aXZlVmlld09mVHlwZShNYXJrZG93blZpZXcpO1xuICAgICAgICBpZiAoIXZpZXcpIHJldHVybjtcblxuICAgICAgICBjb25zdCBwb3MgPSB2aWV3LmVkaXRvci5nZXRDdXJzb3IoKTtcbiAgICAgICAgY29uc3QgY2FjaGUgPSB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZSh2aWV3LmZpbGUpO1xuICAgICAgICBpZiAoY2FjaGUuaGVhZGluZ3MpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaGVhZGluZyBvZiBjYWNoZS5oZWFkaW5ncykge1xuICAgICAgICAgICAgICAgIGlmIChoZWFkaW5nLnBvc2l0aW9uLnN0YXJ0LmxpbmUgPD0gcG9zLmxpbmUgJiYgaGVhZGluZy5wb3NpdGlvbi5lbmQubGluZSA+PSBwb3MubGluZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvcHlVUkkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHZpZXcuZmlsZS5wYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZzogaGVhZGluZy5oZWFkaW5nXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChjYWNoZS5ibG9ja3MpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgYmxvY2tJRCBvZiBPYmplY3Qua2V5cyhjYWNoZS5ibG9ja3MpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYmxvY2sgPSBjYWNoZS5ibG9ja3NbYmxvY2tJRF07XG4gICAgICAgICAgICAgICAgaWYgKGJsb2NrLnBvc2l0aW9uLnN0YXJ0LmxpbmUgPD0gcG9zLmxpbmUgJiYgYmxvY2sucG9zaXRpb24uZW5kLmxpbmUgPj0gcG9zLmxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jb3B5VVJJKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVwYXRoOiB2aWV3LmZpbGUucGF0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrOiBibG9ja0lEXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGZpbGVNb2RhbCA9IG5ldyBGaWxlTW9kYWwodGhpcywgXCJDaG9vc2UgYSBmaWxlXCIsIGZhbHNlKTtcbiAgICAgICAgZmlsZU1vZGFsLm9wZW4oKTtcbiAgICAgICAgZmlsZU1vZGFsLm9uQ2hvb3NlSXRlbSA9IChpdGVtLCBfKSA9PiB7XG4gICAgICAgICAgICBuZXcgRW50ZXJEYXRhTW9kYWwodGhpcywgaXRlbS5zb3VyY2UpLm9wZW4oKTtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBoYW5kbGVPcGVuU2V0dGluZ3MocGFyYW1ldGVyczogUGFyYW1ldGVycykge1xuICAgICAgICBpZiAoKHRoaXMuYXBwIGFzIGFueSkuc2V0dGluZy5jb250YWluZXJFbC5wYXJlbnRFbGVtZW50ID09PSBudWxsKSB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IGlmICghKG1vZGUgPT09IFwib3ZlcndyaXRlXCIgJiYgIXF1ZXJ5KSkge1xuICAgICAgICAgICAgICAgIGxldCBkaXNwbGF5OiBzdHJpbmc7XG4gICAgICAgICAgICAgICAgaWYgKHF1ZXJ5KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gYFdyaXRlIFwiJHtxdWVyeX1cIiBpbiAke21vZGV9IG1vZGVgO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9IGBXcml0ZSBcIiR7cXVlcnl9XCJgO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXkgPSBgT3BlbiBpbiAke21vZGV9IG1vZGVgO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9IGBPcGVuYDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzdWdnZXN0aW9ucy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGRpc3BsYXksXG4gICAgICAgICAgICAgICAgICAgIG1vZGU6IG1vZGUsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmM6ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5jb3B5VVJJKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHRoaXMuZmlsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGU6IG1vZGUgYXMgUGFyYW1ldGVyc1tcIm1vZGVcIl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uY29weVVSSSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhaWx5OiBcInRydWVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGU6IG1vZGUgYXMgUGFyYW1ldGVyc1tcIm1vZGVcIl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHN1Z2dlc3Rpb25zO1xuICAgIH1cblxuICAgIHJlbmRlclN1Z2dlc3Rpb24odmFsdWU6IEVudGVyRGF0YSwgZWw6IEhUTUxFbGVtZW50KTogdm9pZCB7XG4gICAgICAgIGVsLmlubmVyVGV4dCA9IHZhbHVlLmRpc3BsYXk7XG4gICAgfTtcblxuICAgIG9uQ2hvb3NlU3VnZ2VzdGlvbihpdGVtOiBFbnRlckRhdGEsIF86IE1vdXNlRXZlbnQgfCBLZXlib2FyZEV2ZW50KTogdm9pZCB7XG4gICAgICAgIGl0ZW0uZnVuYygpO1xuICAgIH07XG59XG5cbmludGVyZmFjZSBGaWxlTW9kYWxEYXRhIHtcbiAgICBzb3VyY2U6IHN0cmluZztcbiAgICBkaXNwbGF5OiBzdHJpbmc7XG59XG5cbmNsYXNzIEZpb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