diff --git a/.obsidian/plugins/multi-column-markdown/main.js b/.obsidian/plugins/multi-column-markdown/main.js
index 42d8888c..1d16b812 100644
--- a/.obsidian/plugins/multi-column-markdown/main.js
+++ b/.obsidian/plugins/multi-column-markdown/main.js
@@ -516,14 +516,14 @@ function getEndTagData(text) {
endPosition = startPosition + matchLength;
return { found, startPosition, endPosition, matchLength };
}
-const COL_REGEX_STRS = ["=== *column-end *===",
- "=== *end-column *===",
- "=== *column-break *===",
- "=== *break-column *===",
- "--- *column-end *---",
- "--- *end-column *---",
- "--- *column-break *---",
- "--- *break-column *---"];
+const COL_REGEX_STRS = ["^===\\s*?column-end\\s*?===\\s*?$",
+ "^===\\s*?end-column\\s*?===\\s*?$",
+ "^===\\s*?column-break\\s*?===\\s*?$",
+ "^===\\s*?break-column\\s*?===\\s*?$",
+ "^---\\s*?column-end\\s*?---\\s*?$",
+ "^---\\s*?end-column\\s*?---\\s*?$",
+ "^---\\s*?column-break\\s*?---\\s*?$",
+ "^---\\s*?break-column\\s*?---\\s*?$"];
const COL_REGEX_ARR = [];
for (let i = 0; i < COL_REGEX_STRS.length; i++) {
COL_REGEX_ARR.push(new RegExp(COL_REGEX_STRS[i]));
@@ -538,6 +538,25 @@ function containsColEndTag(text) {
}
return found;
}
+const INNER_COL_END_REGEX_ARR = [
+ /^-{3}\s*?column-end\s*?-{3}\s*?$\n?/m,
+ /^-{3}\s*?end-column\s*?-{3}\s*?$\n?/m,
+ /^-{3}\s*?column-break\s*?-{3}\s*?$\n?/m,
+ /^-{3}\s*?break-column\s*?-{3}\s*?$\n?/m,
+ /^={3}\s*?column-end\s*?={3}\s*?$\n?/m,
+ /^={3}\s*?end-column\s*?={3}\s*?$\n?/m,
+ /^={3}\s*?column-break\s*?={3}\s*?$\n?/m,
+ /^={3}\s*?break-column\s*?={3}\s*?$\n?/m
+];
+function checkForParagraphInnerColEndTag(text) {
+ for (let i = 0; i < INNER_COL_END_REGEX_ARR.length; i++) {
+ let regexResult = INNER_COL_END_REGEX_ARR[i].exec(text);
+ if (regexResult) {
+ return regexResult;
+ }
+ }
+ return null;
+}
const COL_ELEMENT_INNER_TEXT_REGEX_STRS = ["= *column-end *=",
"= *end-column *=",
"= *column-break *=",
@@ -1054,7 +1073,7 @@ function hasAdmonitionFold(element) {
return element.getElementsByClassName("callout-fold").length !== 0;
}
function hasDataview(element) {
- let isDataview = element.getElementsByClassName("dataview").length !== 0;
+ let isDataview = element.getElementsByClassName("block-language-dataview").length !== 0;
return isDataview;
}
function hasDataviewJS(element) {
@@ -1091,7 +1110,8 @@ function getHeadingCollapseElement(element) {
*
* Copyright (c) 2022 Cameron Robinson
*/
-const UPDATE_TIMES = [250, 20000];
+const UPDATE_TIMES = [125, 125, 250, 20000];
+const MID_BREAK_ERROR_MESSAGE = "Detected invalid column break syntax.\nPlease make sure column break tags are not in the middle of a paragraph block";
var DOMObjectTag;
(function (DOMObjectTag) {
DOMObjectTag[DOMObjectTag["none"] = 0] = "none";
@@ -1100,9 +1120,17 @@ var DOMObjectTag;
DOMObjectTag[DOMObjectTag["columnBreak"] = 3] = "columnBreak";
DOMObjectTag[DOMObjectTag["endRegion"] = 4] = "endRegion";
})(DOMObjectTag || (DOMObjectTag = {}));
+var ElementColumnBreakType;
+(function (ElementColumnBreakType) {
+ ElementColumnBreakType[ElementColumnBreakType["none"] = 0] = "none";
+ ElementColumnBreakType[ElementColumnBreakType["preBreak"] = 1] = "preBreak";
+ ElementColumnBreakType[ElementColumnBreakType["postBreak"] = 2] = "postBreak";
+ ElementColumnBreakType[ElementColumnBreakType["midBreak"] = 3] = "midBreak";
+})(ElementColumnBreakType || (ElementColumnBreakType = {}));
class DOMObject {
constructor(element, linesOfElement, randomID = getUID(), tag = DOMObjectTag.none) {
this.clonedElement = null;
+ this.elementIsColumnBreak = ElementColumnBreakType.none;
this.elementType = ElementRenderType.undefined;
this.elementContainer = null;
this.elementRenderedHeight = 0;
@@ -1119,6 +1147,11 @@ class DOMObject {
if (this.tag === DOMObjectTag.none) {
this.setDomObjectTag();
}
+ // If our tag is still none here, we now want to check for
+ // an in paragraph column break flag.
+ if (this.tag === DOMObjectTag.none) {
+ this.checkForPrePostColumnBreak();
+ }
}
setMainDOMElement(domElement) {
this.originalElement = domElement;
@@ -1175,24 +1208,92 @@ class DOMObject {
// regionalManager.updateElementTag(currentObject.UID, DOMObjectTag.regionSettings);
}
}
+ checkForPrePostColumnBreak() {
+ let textOfElement = this.originalElement.innerText;
+ let containsColumnBreak = checkForParagraphInnerColEndTag(textOfElement);
+ if (containsColumnBreak !== null) {
+ let text = this.originalElement.innerText;
+ let startIndex = containsColumnBreak.index;
+ let endIndex = startIndex + containsColumnBreak[0].length;
+ let pre = text.slice(0, startIndex);
+ let post = text.slice(endIndex);
+ let paragraph = this.originalElement.children[0];
+ if (this.originalElement.nodeName === "P") {
+ paragraph = this.originalElement;
+ }
+ // console.debug("Checking where column break is", startIndex, endIndex, text.length);
+ if (startIndex === 0) {
+ // console.debug("column break at start of element.")
+ this.elementIsColumnBreak = ElementColumnBreakType.preBreak;
+ }
+ else if (endIndex === text.length) {
+ // console.debug("Column break at end of element.")
+ this.elementIsColumnBreak = ElementColumnBreakType.postBreak;
+ }
+ else {
+ // console.debug("Column break in the middle of element?")
+ this.elementIsColumnBreak = ElementColumnBreakType.midBreak;
+ const ERROR_COLOR_CSS = "mcm-error-message-color";
+ const CENTER_ALIGN_SPAN_CSS = "mcm-span-content-alignment-center";
+ if (paragraph) {
+ paragraph.innerHTML = `${pre}\n${MID_BREAK_ERROR_MESSAGE}\n\n${post}`.split("\n").join("
");
+ }
+ return;
+ }
+ if (paragraph) {
+ paragraph.innerText = `${pre}${post}`;
+ }
+ }
+ }
}
class TaskListDOMObject extends DOMObject {
constructor(baseDOMObject) {
super(baseDOMObject.originalElement, baseDOMObject.linesOfElement, baseDOMObject.UID, DOMObjectTag.none);
this.originalCheckboxes = [];
+ this.checkboxElements = new Map();
}
checkboxClicked(index) {
+ if (this.checkboxElements.has(index)) {
+ this.checkboxElements.get(index).click();
+ }
if (index < this.originalCheckboxes.length) {
- let originalInput = this.originalCheckboxes[index].firstChild;
- originalInput.click();
+ let originalInput = this.originalCheckboxes[index].getElementsByClassName('task-list-item-checkbox');
+ if (originalInput.length === 1) {
+ originalInput[0].click();
+ }
+ else {
+ console.error("Could not find checkbox to click.");
+ }
}
}
+ getCheckboxElement(index) {
+ var _a;
+ if (this.checkboxElements.has(index) === false) {
+ if (index < this.originalCheckboxes.length) {
+ let originalInput = (_a = this.originalCheckboxes[index]) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('task-list-item-checkbox');
+ if ((originalInput === null || originalInput === void 0 ? void 0 : originalInput.length) === 1) {
+ this.checkboxElements.set(index, originalInput[0]);
+ }
+ else {
+ console.error("Could not find checkbox element to return.", this.originalCheckboxes, index);
+ }
+ }
+ }
+ return this.checkboxElements.get(index);
+ }
static checkForTaskListElement(domElement) {
if (domElement.originalElement.getElementsByClassName("task-list-item").length > 0) {
return new TaskListDOMObject(domElement);
}
return domElement;
}
+ static getChildCheckbox(el) {
+ let checkboxElements = el.getElementsByClassName('task-list-item-checkbox');
+ if (checkboxElements.length === 1) {
+ return checkboxElements[0];
+ }
+ return el.children[0];
+ }
}
/*
@@ -1265,6 +1366,9 @@ class RegionManager {
this.regionalSettings = data.regionalSettings;
this.regionKey = data.regionKey;
}
+ get numberOfChildren() {
+ return this.domList.length;
+ }
get regionParent() {
return this._regionParent;
}
@@ -1282,6 +1386,13 @@ class RegionManager {
rootElement: null
};
}
+ /**
+ * Adds a new object to the region by finding where it should be relative to its siblings.
+ * @param siblingsAbove The Markdown text rendered elements for sibilings above this element in the dom
+ * @param siblingsBelow The Markdown text rendered elements for sibilings below this element in the dom
+ * @param obj The object to add.
+ * @returns Returns the index at which the object has been added.
+ */
addObject(siblingsAbove, siblingsBelow, obj) {
let nextObj = siblingsBelow.children[0];
let addAtIndex = siblingsAbove.children.length;
@@ -1332,6 +1443,10 @@ class RegionManager {
// console.log(x);
return addAtIndex;
}
+ addObjectAtIndex(obj, index) {
+ this.domList.splice(index, 0, obj);
+ this.domObjectMap.set(obj.UID, obj);
+ }
removeObject(objectUID) {
// /**
// * Make a copy of the list to log
@@ -1356,10 +1471,7 @@ class RegionManager {
}
updateElementTag(objectUID, newTag) {
let obj = this.domObjectMap.get(objectUID);
- let index = this.domList.indexOf(obj);
- if (index !== -1) {
- this.domList[index].tag = newTag;
- }
+ obj.tag = newTag;
}
setRegionalSettings(regionSettings) {
this.regionalSettings = regionSettings;
@@ -1462,15 +1574,16 @@ class RegionManager {
let clonedListCheckboxes = Array.from(clonedElement.getElementsByClassName("task-list-item"));
let originalListCheckboxes = Array.from(element.getElementsByClassName("task-list-item"));
if (initalizeCheckboxes === true) {
+ domElement.originalCheckboxes = originalListCheckboxes;
// When we initalize we remove the old input checkbox that contains
// the weird callback situation causing the bug. Then we create a new
// checkbox to replace it and set it up to fire the click event on
// the original checkbox so functionality is restored.
for (let i = 0; i < originalListCheckboxes.length; i++) {
const checkbox = createEl('input');
- let originalInput = originalListCheckboxes[i].firstChild;
- checkbox.checked = originalInput.checked;
- clonedListCheckboxes[i].replaceChild(checkbox, clonedListCheckboxes[i].children[0]);
+ let originalInput = domElement.getCheckboxElement(i);
+ checkbox.checked = originalInput === null || originalInput === void 0 ? void 0 : originalInput.checked;
+ clonedListCheckboxes[i].replaceChild(checkbox, TaskListDOMObject.getChildCheckbox(clonedListCheckboxes[i]));
checkbox.addClass('task-list-item-checkbox');
checkbox.type = 'checkbox';
checkbox.onClickEvent(() => {
@@ -1528,7 +1641,7 @@ class RegionManager {
Math.abs(clonedElementHeight - originalElementHeight) > 10 ||
domElement.clonedElementReadyForUpdate() === true) &&
domElement.elementType !== ElementRenderType.canvasRenderElement) {
- // console.log("Updating Cloned Element.", clonedElementHeight, originalElementHeight)
+ // console.log("Updating Cloned Element.", ElementRenderType[domElement.elementType], clonedElementHeight, originalElementHeight)
// Update clone and reference.
cloneElement();
}
@@ -1536,6 +1649,9 @@ class RegionManager {
domElement.canvasReadyForUpdate()) {
// console.log("Updating canvas re-render")
containerElement.appendChild(originalElement);
+ if (clonedElement !== null && clonedElement.parentElement === containerElement) {
+ containerElement.removeChild(clonedElement);
+ }
function cloneCanvas(originalCanvas) {
//create a new canvas
let clonedCanvas = originalCanvas.cloneNode(true);
@@ -1566,6 +1682,7 @@ class RegionManager {
clonedElement.appendChild(cloneCanvas(canvas));
}
containerElement.removeChild(originalElement);
+ containerElement.appendChild(clonedElement);
}
/**
* If the container element has less than 2 children we need to move the
@@ -1825,6 +1942,12 @@ class StandardMultiColumnRegionManager extends RegionManager {
for (let i = 0; i < regionElements.length; i++) {
if (regionElements[i].tag === DOMObjectTag.none ||
regionElements[i].tag === DOMObjectTag.columnBreak) {
+ // If a standard element contains a column break tag and it is set as a pre content break tag we flip our index here.
+ if (regionElements[i].tag === DOMObjectTag.none &&
+ regionElements[i].elementIsColumnBreak === ElementColumnBreakType.preBreak &&
+ (columnIndex + 1) < settings.numberOfColumns) {
+ columnIndex++;
+ }
// We store the elements in a wrapper container until we determine
let element = createDiv({
cls: MultiColumnLayoutCSS.ColumnDualElementContainer,
@@ -1870,6 +1993,12 @@ class StandardMultiColumnRegionManager extends RegionManager {
(columnIndex + 1) < settings.numberOfColumns) {
columnIndex++;
}
+ else if (regionElements[i].tag === DOMObjectTag.none &&
+ regionElements[i].elementIsColumnBreak === ElementColumnBreakType.postBreak &&
+ (columnIndex + 1) < settings.numberOfColumns) {
+ // If a standard element contains a column break tag and it is set as a post content break tag we flip our index here.
+ columnIndex++;
+ }
}
}
}
@@ -1942,6 +2071,21 @@ class SingleColumnRegionManager extends RegionManager {
cls: MultiColumnLayoutCSS.ColumnDualElementContainer,
});
regionElements[i].elementContainer = element;
+ if (settings.contentOverflow === ContentOverflowType.hidden) {
+ element.addClass(MultiColumnLayoutCSS.ContentOverflowHidden);
+ }
+ else {
+ element.addClass(MultiColumnLayoutCSS.ContentOverflowAutoScroll);
+ }
+ if (settings.alignment === AlignmentType.center) {
+ element.addClass(MultiColumnLayoutCSS.AlignmentCenter);
+ }
+ else if (settings.alignment === AlignmentType.right) {
+ element.addClass(MultiColumnLayoutCSS.AlignmentRight);
+ }
+ else {
+ element.addClass(MultiColumnLayoutCSS.AlignmentLeft);
+ }
// Otherwise we just make a copy of the original element to display.
let clonedElement = regionElements[i].originalElement.cloneNode(true);
let headingCollapseElement = getHeadingCollapseElement(clonedElement);
@@ -2119,6 +2263,21 @@ class AutoLayoutRegionManager extends RegionManager {
cls: MultiColumnLayoutCSS.ColumnDualElementContainer,
});
regionElements[i].elementContainer = element;
+ if (settings.contentOverflow === ContentOverflowType.hidden) {
+ element.addClass(MultiColumnLayoutCSS.ContentOverflowHidden);
+ }
+ else {
+ element.addClass(MultiColumnLayoutCSS.ContentOverflowAutoScroll);
+ }
+ if (settings.alignment === AlignmentType.center) {
+ element.addClass(MultiColumnLayoutCSS.AlignmentCenter);
+ }
+ else if (settings.alignment === AlignmentType.right) {
+ element.addClass(MultiColumnLayoutCSS.AlignmentRight);
+ }
+ else {
+ element.addClass(MultiColumnLayoutCSS.AlignmentLeft);
+ }
let clonedElement = regionElements[i].clonedElement;
if (regionElements[i].clonedElement === null) {
clonedElement = regionElements[i].originalElement.cloneNode(true);
@@ -2522,12 +2681,21 @@ class MultiColumnMarkdown_DefinedSettings_LivePreview_Widget extends view.Widget
}
}
function fixImageRender(el) {
+ let embed = null;
let fixedEl = el;
- let items = el.getElementsByClassName("internal-embed");
- if (items.length !== 1) {
- return el;
+ // image embeds can either be a
100) {
@@ -3159,9 +3332,6 @@ ${editor.getDoc().getSelection()}`);
}
};
ctx.addChild(elementMarkdownRenderer);
- let elementTextSpaced = linesOfElement.reduce((prev, curr) => {
- return prev + "\n" + curr;
- });
/**
* Now we check if our current element is a special flag so we can
* properly set the element tag within the regional manager.
@@ -3171,15 +3341,15 @@ ${editor.getDoc().getSelection()}`);
el.addClass(MultiColumnStyleCSS.RegionEndTag);
regionalManager.updateElementTag(currentObject.UID, DOMObjectTag.endRegion);
}
- else if (containsColEndTag(elementTextSpaced) === true) {
+ else if (containsColEndTag(textOfElement) === true) {
currentObject.elementType = ElementRenderType.unRendered;
el.addClass(MultiColumnStyleCSS.ColumnEndTag);
regionalManager.updateElementTag(currentObject.UID, DOMObjectTag.columnBreak);
}
- else if (containsColSettingsTag(elementTextSpaced) === true) {
+ else if (containsColSettingsTag(textOfElement) === true) {
currentObject.elementType = ElementRenderType.unRendered;
el.addClass(MultiColumnStyleCSS.RegionSettings);
- regionalManager = regionalContainer.setRegionSettings(elementTextSpaced);
+ regionalManager = regionalContainer.setRegionSettings(textOfElement);
regionalManager.updateElementTag(currentObject.UID, DOMObjectTag.regionSettings);
}
else {
@@ -3273,7 +3443,8 @@ ${editor.getDoc().getSelection()}`);
cls: MultiColumnLayoutCSS.RegionContentContainerDiv
});
let regionalContainer = fileDOMManager.getRegionalContainer(regionKey);
- if (regionalContainer === null) {
+ if (regionalContainer === null || regionalContainer.getRegion().numberOfChildren === 0) {
+ // If the number of children is 0, we are probably in LivePreview, where the codeblock start regions have been processed by native obsidian live preview but do not have any children linked to them.
renderErrorRegion.innerText = "Error rendering multi-column region.\nPlease close and reopen the file, then make sure you are in reading mode before exporting.";
}
else {
@@ -3449,4 +3620,4 @@ function renderMarkdownFromLines(mdLines, sourcePath) {
}
module.exports = MultiColumnMarkdown;
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9yZWdpb25TZXR0aW5ncy50cyIsInNyYy91dGlsaXRpZXMvc2V0dGluZ3NQYXJzZXIudHMiLCJzcmMvdXRpbGl0aWVzL3RleHRQYXJzZXIudHMiLCJzcmMvdXRpbGl0aWVzL3V0aWxzLnRzIiwic3JjL3V0aWxpdGllcy9lbGVtZW50UmVuZGVyVHlwZVBhcnNlci50cyIsInNyYy9kb21fbWF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9MYXlvdXQ6IGZhbHNlLFxuICAgICAgICBjb2x1bW5TaXplOiBTaW5nbGVDb2x1bW5TaXplLm1lZGl1bSxcbiAgICAgICAgY29sdW1uUG9zaXRpb246IENvbHVtbkxheW91dC5zdGFuZGFyZCxcbiAgICAgICAgY29sdW1uU3BhY2luZzogXCJcIixcbiAgICAgICAgY29udGVudE92ZXJmbG93OiBDb250ZW50T3ZlcmZsb3dUeXBlLnNjcm9sbCxcbiAgICAgICAgYWxpZ25tZW50OiBBbGlnbm1lbnRUeXBlLmxlZnRcbiAgICB9XG59IiwiLyoqXG4gKiBGaWxlOiAvc3JjL3V0aWxpdGllcy9zZXR0aW5nc1BhcnNlci50cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gKiBDcmVhdGVkIERhdGU6IEZyaWRheSwgSnVuZSAzcmQgMjAyMiwgODoxNiBwbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gKiBBdXRob3I6IENhbWVyb24gUm9iaW5zb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjIgQ2FtZXJvbiBSb2JpbnNvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gKi9cblxuaW1wb3J0IHsgTXVsdGlDb2x1bW5TZXR0aW5ncywgQ29sdW1uTGF5b3V0LCBCb3JkZXJPcHRpb24sIFNoYWRvd09wdGlvbiwgZ2V0RGVmYXVsdE11bHRpQ29sdW1uU2V0dGluZ3MsIFNpbmdsZUNvbHVtblNpemUsIENvbnRlbnRPdmVyZmxvd1R5cGUsIEFsaWdubWVudFR5cGUgfSBmcm9tIFwiLi4vcmVnaW9uU2V0dGluZ3NcIjtcblxuLyoqXG4gKiBIZXJl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BwYXJzZWRTZXR0aW5ncy5jb2x1bW5Qb3NpdGlvbiA9IHVzZXJEZWZMYXlvdXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBzZXR0aW5nc0RhdGEgPSBnZXRTZXR0aW5nc0RhdGFGcm9tS2V5cyhzZXR0aW5nc0xpbmUsIERSQVdfQk9SREVSX1JFR0VYX0FSUilcbiAgICAgICAgaWYgKHNldHRpbmdzRGF0YSAhPT0gbnVsbCkge1xuXG4gICAgICAgICAgICBsZXQgaXNCb3JkZXJEcmF3bjogQm9yZGVyT3B0aW9uID0gKDxhbnk+Qm9yZGVyT3B0aW9uKVtzZXR0aW5nc0RhdGFdO1xuICAgICAgICAgICAgaWYgKGlzQm9yZGVyRHJhd24gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoaXNCb3JkZXJEcmF3bikge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIChCb3JkZXJPcHRpb24uZGlzYWJsZWQpOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIChCb3JkZXJPcHRpb24ub2ZmKTpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAoQm9yZGVyT3B0aW9uLmZhbHNlKTpcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlZFNldHRpbmdzLmRyYXdCb3JkZXIgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHNldHRpbmdzRGF0YSA9IGdldFNldHRpbmdzRGF0YUZyb21LZXlzKHNldHRpbmdzTGluZSwgRFJBV19TSEFET1dfUkVHRVhfQVJSKVxuICAgICAgICBpZiAoc2V0dGluZ3NEYXRhICE9PSBudWxsKSB7XG5cbiAgICAgICAgICAgIGxldCBpc1NoYWRvd0RyYXduOiBTaGFkb3dPcHRpb24gPSAoPGFueT5TaGFkb3dPcHRpb24pW3NldHRpbmdzRGF0YV07XG4gICAgICAgICAgICBpZiAoaXNTaGFkb3dEcmF3biAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChpc1NoYWRvd0RyYXduKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgKFNoYWRvd09wdGlvbi5kaXNhYmxlZCk6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgKFNoYWRvd09wdGlvbi5vZmYpOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIChTaGFkb3dPcHRpb24uZmFsc2UpOlxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VkU2V0dGluZ3MuZHJhd1NoYWRvdyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc2V0dGluZ3NEYXRhID0gZ2V0U2V0dGluZ3NEYXRhRnJvbUtleXMoc2V0dGluZ3NMaW5lLCBBVVRPX0xBWU9VVF9SRUdFWF9BUlIpXG4gICAgICAgIGlmIChzZXR0aW5nc0RhdGEgIT09IG51bGwpIHtcblxuICAgICAgICAgICAgaWYoc2V0dGluZ3NEYXRhID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgICAgIHBhcnNlZFNldHRpbmdzLmF1dG9MYXlvdXQgPSB0cnVlXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBzZXR0aW5nc0RhdGEgPSBnZXRTZXR0aW5nc0RhdGFGcm9tS2V5cyhzZXR0aW5nc0xpbmUsIENPTFVNTl9TUEFDSU5HX1JFR0VYX0FSUik7XG4gICAgICAgIGlmKHNldHRpbmdzRGF0YSAhPT0gbnVsbCkge1xuXG4gICAgICAgICAgICBsZXQgcGFyc2VkID0gZ2V0TGVuZ3RoVW5pdChzZXR0aW5nc0RhdGEudHJpbSgpKTtcbiAgICAgICAgICAgIGxldCBzcGFjaW5nU3RyID0gXCJcIjtcblxuICAgICAgICAgICAgaWYocGFyc2VkLmlzVmFsaWQpIHtcblxuICAgICAgICAgICAgICAgIGxldCBub1VuaXRzU3RyID0gc2V0dGluZ3NEYXRhLnJlcGxhY2UocGFyc2VkLnVuaXRTdHIsIFwiXCIpLnRyaW0oKTtcbiAgICAgICAgICAgICAgICBsZXQgbm9Vbml0c051bSA9IHBhcnNlSW50KG5vVW5pdHNTdHIpO1xuICAgICAgICAgICAgICAgIGlmKGlzTmFOKG5vVW5pdHNOdW0pID09PSBmYWxzZSkge1xuXG4gICAgICAgICAgICAgICAgICAgIHNwYWNpbmdTdHIgPSBgJHtub1VuaXRzU3RyfSR7cGFyc2VkLnVuaXRTdHJ9YFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGxldCBub1VuaXRzTnVtID0gcGFyc2VJbnQoc2V0dGluZ3NEYXRhLnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgaWYoaXNOYU4obm9Vbml0c051bSkgPT09IGZhbHNlKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgc3BhY2luZ1N0ciA9IGAke25vVW5pdHNOdW19cHRgXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBwYXJzZWRTZXR0aW5ncy5jb2x1bW5TcGFjaW5nID0gc3BhY2luZ1N0cjtcbiAgICAgICAgfVxuXG4gICAgICAgIHNldHRpbmdzRGF0YSA9IGdldFNldHRpbmdzRGF0YUZyb21LZXlzKHNldHRpbmdzTGluZSwgQ09OVEVOVF9PVkVSRkxPV19SRUdFWF9BUlIpO1xuICAgICAgICBpZihzZXR0aW5nc0RhdGEgIT09IG51bGwpIHtcblxuICAgICAgICAgICAgbGV0IG92ZXJmbG93VHlwZSA9IENvbnRlbnRPdmVyZmxvd1R5cGUuc2Nyb2xsO1xuXG4gICAgICAgICAgICBzZXR0aW5nc0RhdGEgPSBzZXR0aW5nc0RhdGEudG9Mb3dlckNhc2UoKS50cmltKCk7XG4gICAgICAgICAgICBpZihzZXR0aW5nc0RhdGEgPT09IFwiaGlkZGVuXCIpIHtcbiAgICAgICAgICAgICAgICBvdmVyZmxvd1R5cGUgPSBDb250ZW50T3ZlcmZsb3dUeXBlLmhpZGRlbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcGFyc2VkU2V0dGluZ3MuY29udGVudE92ZXJmbG93ID0gb3ZlcmZsb3dUeXBlO1xuICAgICAgICB9XG4gICAgICAgIHNldHRpbmdzRGF0YSA9IGdldFNldHRpbmdzRGF0YUZyb21LZXlzKHNldHRpbmdzTGluZSwgQUxJR05NRU5UX1JFR0VYX0FSUik7XG4gICAgICAgIGlmIChzZXR0aW5nc0RhdGEgIT09IG51bGwpIHtcbiAgICAgICAgICAgIGxldCBhbGlnbm1lbnRUeXBlID0gQWxpZ25tZW50VHlwZS5sZWZ0O1xuICAgICAgICAgICAgc2V0dGluZ3NEYXRhID0gc2V0dGluZ3NEYXRhLnRvTG93ZXJDYXNlKCkudHJpbSgpO1xuICAgICAgICAgICAgaWYgKHNldHRpbmdzRGF0YSA9PT0gXCJjZW50ZXJcIikge1xuICAgICAgICAgICAgICAgIGFsaWdubWVudFR5cGUgPSBBbGlnbm1lbnRUeXBlLmNlbnRlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzZXR0aW5nc0RhdGEgPT09IFwicmlnaHRcIikge1xuICAgICAgICAgICAgICAgIGFsaWdubWVudFR5cGUgPSBBbGlnbm1lbnRUeXBlLnJpZ2h0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcGFyc2VkU2V0dGluZ3MuYWxpZ25tZW50ID0gYWxpZ25tZW50VHlwZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBwYXJzZWRTZXR0aW5ncztcbn1cblxuZnVuY3Rpb24gZ2V0TGVuZ3R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ByZXR1cm4geyBmb3VuZCwgc3RhcnRQb3NpdGlvbiwgZW5kUG9zaXRpb24sIG1hdGNoTGVuZ3RoIH07XG59XG5cbmNvbnN0IENPTF9SRUdFWF9TVFJTOiBzdHJpbmdbXSA9IFtcIj09PSAqY29sdW1uLWVuZCAqPT09XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCI9PT0gKmVuZC1jb2x1bW4gKj09PVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiPT09ICpjb2x1bW4tYnJlYWsgKj09PVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiPT09ICpicmVhay1jb2x1bW4gKj09PVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiLS0tICpjb2x1bW4tZW5kICotLS1cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIi0tLSAqZW5kLWNvbHVtbiAqLS0tXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCItLS0gKmNvbHVtbi1icmVhayAqLS0tXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCItLS0gKmJyZWFrLWNvbHVtbiAqLS0tXCJdO1xuY29uc3QgQ09MX1JFR0VYX0FSUjogUmVnRXhwW10gPSBbXTtcbmZvcihsZXQgaSA9IDA7IGkgPCBDT0xfUkVHRVhfU1RSUy5sZW5ndGg7IGkrKykge1xuICAgIENPTF9SRUdFWF9BUlIucHVzaChuZXcgUmVnRXhwKENPTF9SRUdFWF9TVFJTW2ldKSk7XG59XG5leHBvcnQgZnVuY3Rpb24gY29udGFpbnNDb2xFbmRUYWcodGV4dDogc3RyaW5nKTogYm9vbGVhbiB7XG5cbiAgICBsZXQgZm91bmQgPSBmYWxzZTtcbiAgICBmb3IobGV0IGkgPSAwOyBpPCBDT0xfUkVHRVhfQVJSLmxlbmd0aDsgaSsrKSB7XG5cbiAgICAgICAgaWYoQ09MX1JFR0VYX0FSUltpXS50ZXN0KHRleHQpKSB7XG4gICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBmb3VuZDtcbn1cblxuY29uc3QgQ09MX0VMRU1FTlRfSU5ORVJfVEVYVF9SRUdFWF9TVFJTOiBzdHJpbmdbXSA9IFtcIj0gKmNvbHVtbi1lbmQgKj1cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIj0gKmVuZC1jb2x1bW4gKj1cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIj0gKmNvbHVtbi1icmVhayAqPVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiPSAqYnJlYWstY29sdW1uICo9XCJdXG5jb25zdCBDT0xfRUxFTUVOVF9JTk5FUl9URVhUX1JFR0VYX0FSUjogUmVnRXhwW10gPSBbXTtcbmZvcihsZXQgaSA9IDA7IGkgPCBDT0xfRUxFTUVOVF9JTk5FUl9URVhUX1JFR0VYX1NUUlMubGVuZ3RoOyBpKyspIHtcbiAgICBDT0xfRUxFTUVOVF9JTk5FUl9URVhUX1JFR0VYX0FSUi5wdXNoKG5ldyBSZWdFeHAoQ09MX0VMRU1FTlRfSU5ORVJfVEVYVF9SRUdFWF9TVFJTW2ldKSk7XG59XG5leHBvcnQgZnVuY3Rpb24gZWxJbm5lclRleHRDb250YWluc0NvbEVuZFRhZyh0ZXh0OiBzdHJpbmcpOiBib29sZWFuIHtcblxuICAgIGxldCBmb3VuZCA9IGZhbHNlO1xuICAgIGZvcihsZXQgaSA9IDA7IGk8IENPTF9FTEVNRU5UX0lOTkVSX1RFWFRfUkVHRVhfQVJSLmxlbmd0aDsgaSsrKSB7XG5cbiAgICAgICAgaWYoQ09MX0VMRU1FTlRfSU5ORVJ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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqIEF1dGhvcjogQ2FtZXJvbiBSb2JpbnNvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICogQ29weXJpZ2h0IChjKSAyMDIyIENhbWVyb24gUm9iaW5zb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqL1xuXG5pbXBvcnQgeyBET01PYmplY3QsIERPTU9iamVjdFRhZywgVGFza0xpc3RET01PYmplY3QgfSBmcm9tICcuLi9kb21PYmplY3QnO1xuaW1wb3J0IHsgTXVsdGlDb2x1bW5TZXR0aW5ncywgQ29sdW1uTGF5b3V0LCBnZXREZWZhdWx0TXVsdGlDb2x1bW5TZXR0aW5ncyB9IGZyb20gXCIuLi8uLi9yZWdpb25TZXR0aW5nc1wiO1xuaW1wb3J0IHsgTXVsdGlDb2x1bW5MYXlvdXRDU1MsIE11bHRpQ29sdW1uU3R5bGVDU1MgfSBmcm9tICcuLi8uLi91dGlsaXRpZXMvY3NzRGVmaW5pdGlvbnMnO1xuaW1wb3J0IHsgRmlsZURPTU1hbmFnZXIgfSBmcm9tICcuLi9kb21NYW5hZ2VyJztcbmltcG9ydCB7IEVsZW1lbnRSZW5kZXJUeXBlLCBnZXRFbGVtZW50UmVuZGVyVHlwZSB9IGZyb20gJ3NyYy91dGlsaXRpZXMvZWxlbWVudFJlbmRlclR5cGVQYXJzZXInO1xuaW1wb3J0IHsgUmVnaW9uTWFuYWdlckRhdGEgfSBmcm9tICcuL3JlZ2lvbk1hbmFnZXJDb250YWluZXInO1xuaW1wb3J0IHsgc2VhcmNoQ2hpbGRyZW5Gb3JOb2RlVHlwZSB9IGZyb20gJ3NyYy91dGlsaXRpZXMvdXRpbHMnO1xuXG5leHBvcnQg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BkYXRhLmRvbU9iamVjdE1hcDtcbiAgICAgICAgdGhpcy5yZWdpb25QYXJlbnQgPSBkYXRhLnJlZ2lvblBhcmVudDtcblxuICAgICAgICB0aGlzLmZpbGVNYW5hZ2VyID0gZGF0YS5maWxlTWFuYWdlcjtcbiAgICAgICAgdGhpcy5yZWdpb25hbFNldHRpbmdzID0gZGF0YS5yZWdpb25hbFNldHRpbmdzO1xuXG4gICAgICAgIHRoaXMucmVnaW9uS2V5ID0gZGF0YS5yZWdpb25LZXk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldFJlZ2lvbkRhdGEoKTogUmVnaW9uTWFuYWdlckRhdGEge1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBkb21MaXN0OiB0aGlzLmRvbUxpc3QsXG4gICAgICAgICAgICBkb21PYmplY3RNYXA6IHRoaXMuZG9tT2JqZWN0TWFwLFxuICAgICAgICAgICAgcmVnaW9uUGFyZW50OiB0aGlzLnJlZ2lvblBhcmVudCxcblxuICAgICAgICAgICAgZmlsZU1hbmFnZXI6IHRoaXMuZmlsZU1hbmFnZXIsXG4gICAgICAgICAgICByZWdpb25hbFNldHRpbmdzOiB0aGlzLnJlZ2lvbmFsU2V0dGluZ3MsXG5cbiAgICAgICAgICAgIHJlZ2lvbktleTogdGhpcy5yZWdpb25LZXksXG4gICAgICAgICAgICByb290RWxlbWVudDogbnVsbFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIHB1YmxpYyBhZGRPYmplY3Qoc2libGluZ3NBYm92ZTogSFRNTERpdkVsZW1lbnQsIHNpYmxpbmdzQmVsb3c6IEhUTUxEaXZFbGVtZW50LCBvYmo6IERPTU9iamVjdCk6IG51bWJlciB7XG5cbiAgICAgICAgbGV0IG5leHRPYmogPSBzaWJsaW5nc0JlbG93LmNoaWxkcmVuWzBdIGFzIEhUTUxFbGVtZW50O1xuXG4gICAgICAgIGxldCBhZGRBdEluZGV4ID0gc2libGluZ3NBYm92ZS5jaGlsZHJlbi5sZ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0pIHtcblxuICAgICAgICAgICAgICAgIGxldCBvYmogPSBzaWJsaW5nc0Fib3ZlLmNoaWxkcmVuW2ldIGFzIEhUTUxFbGVtZW50O1xuICAgICAgICAgICAgICAgIGlmKG9iai5pbm5lclRleHQgIT09IFwiXCIpIHtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgcHJldlNpYmxpbmdJbm5lclRleHQgPSBvYmouaW5uZXJUZXh0O1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBwcmV2U2libGluZ09mZnNldCsrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gdGhpcy5kb21MaXN0Lmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZG9tTGlzdFtpXS5ub2RlS2V5ID09PSBwcmV2U2libGluZ0lubmVyVGV4dCkge1xuICAgICAgICAgICAgICAgICAgICBhZGRBdEluZGV4ID0gaSArIDEgKyBwcmV2U2libGluZ09mZnNldDtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGV0IG5leHRFbEluZGV4ID0gYWRkQXRJbmRleDtcbiAgICAgICAgbGV0IG5leHRPYmpUZXh0ID0gXCJcIjtcbiAgICAgICAgaWYgKG5leHRPYmogIT09IHVuZGVmaW5lZCkge1xuXG4gICAgICAgICAgICBsZXQgZm91bmROZXh0ID0gZmFsc2U7XG4gICAgICAgICAgICBuZXh0T2JqVGV4dCA9IG5leHRPYmouaW5uZXJUZXh0O1xuXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gYWRkQXRJbmRleDsgaSA8IHRoaXMuZG9tTGlzdC5sZW5ndGg7IGkrKykge1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZG9tTGlz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uXG4gICAgICAgICAgICAgICAgLy9jcmVhdGUgYSBuZXcgY2FudmFzXG4gICAgICAgICAgICAgICAgbGV0IGNsb25lZENhbnZhczogSFRNTENhbnZhc0VsZW1lbnQgPSBvcmlnaW5hbENhbnZhcy5jbG9uZU5vZGUodHJ1ZSkgYXMgSFRNTENhbnZhc0VsZW1lbnQ7XG4gICAgICAgICAgICAgICAgbGV0IGNvbnRleHQ6IENhbnZhc1JlbmRlcmluZ0NvbnRleHQyRCA9IGNsb25lZENhbnZhcy5nZXRDb250ZXh0KCcyZCcpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgLy9zZXQgZGltZW5zaW9uc1xuICAgICAgICAgICAgICAgIGNsb25lZENhbnZhcy53aWR0aCA9IG9yaWdpbmFsQ2FudmFzLndpZHRoO1xuICAgICAgICAgICAgICAgIGNsb25lZENhbnZhcy5oZWlnaHQgPSBvcmlnaW5hbENhbnZhcy5oZWlnaHQ7XG5cbiAgICAgICAgICAgICAgICBpZihjbG9uZWRDYW52YXMud2lkdGggPT09IDAgfHwgY2xvbmVkQ2FudmFzLmhlaWdodCA9PT0gMCl7XG4gICAgICAgICAgICAgICAgICAgIC8vIERvbnQgd2FudCB0byByZW5kZXIgaWYgdGhlIHdpZHRoIGlzIDAgYXMgaXQgdGhyb3dzIGFuIGVycm9yXG4gICAgICAgICAgICAgICAgICAgIC8vIHdvdWxkIGhhcHBlbiBpZiB0aGUgb2xkIGNhbnZhcyBoYXNudCBiZWVuIHJlbmRlcmVkIHlldC5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNsb25lZENhbnZhcztcbiAgICAgICAgICAgICAgICB9IFxuXG4gICAgICAgICAgICAgICAgLy9hcHBseSB0aGUgb2xkIGNhbnZhcyB0byB0aGUgbmV3IG9uZVxuICAgICAgICAgICAgICAgIGNvbnRleHQuZHJhd0ltYWdlKG9yaWdpbmFsQ2FudmFzLCAwLCAwKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgICAg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nRlcik6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQudGhpcmQpOlxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5Ud29FcXVhbENvbHVtbnN9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlR3b0VxdWFsQ29sdW1uc31gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5sZWZ0KTpcbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5maXJzdCk6XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlR3b0NvbHVtbkxhcmdlfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgbWNtLWNvbHVtbi1zcGFjZXJgLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXR0cjoge1wic3R5bGVcIjogc3R5bGVTdHJ9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5Ud29Db2x1bW5TbWFsbH1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5yaWdodCk6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuc2Vjb25kKTpcbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5sYXN0KTpcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVHdvQ29sdW1uU21hbGx9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlR3b0NvbHVtbkxhcmdlfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmKHNldHRpbmdzLm51bWJlck9mQ29sdW1ucyA9PT0gMykge1xuXG4gICAgICAgICAgICBzd2l0Y2goc2V0dGluZ3MuY29sdW1uTGF5b3V0KSB7XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuc3RhbmRhcmQpOlxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUVxdWFsQ29sdW1uc31gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVFcXVhbENvbHVtbnN9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlRXF1YWxDb2x1bW5zfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmxlZnQpOlxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmZpcnN0KTpcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVDb2x1bW5fTGFyZ2V9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlQ29sdW1uX1NtYWxsfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgbWNtLWNvbHVtbi1zcGFjZXJgLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXR0cjoge1wic3R5bGVcIjogc3R5bGVTdHJ9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUNvbHVtbl9TbWFsbH1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5taWRkbGUpOlxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmNlbnRlcik6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuc2Vjb25kKTpcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVDb2x1bW5fU21hbGx9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlQ29sdW1uX0xhcmdlfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgbWNtLWNvbHVtbi1zcGFjZXJgLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXR0cjoge1wic3R5bGVcIjogc3R5bGVTdHJ9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUNvbHVtbl9TbWFsbH1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5yaWdodCk6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQudGhpcmQpOlxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0Lmxhc3QpOlxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUNvbHVtbl9TbWFsbH1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVDb2x1bW5fU21hbGx9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlQ29sdW1uX0xhcmdlfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBjb2x1bW5Db250ZW50RGl2cztcbiAgICB9XG5cbiAgICBwdWJsaWMgYWJzdHJhY3QgcmVuZGVyUmVnaW9uRWxlbWVudHNUb1NjcmVlbigpOiB2b2lkO1xuICAgIHB1YmxpYyBhYnN0cmFjdCBleHBvcnRSZWdpb25FbGVtZW50c1RvUERGKHBkZlBhcmVudEVsZW1lbnQ6IEhUTUxFbGVtZW50KTogdm9pZDtcbiAgICBwdWJsaWMgYWJzdHJhY3QgcmVuZGVyUmVnaW9uRWxlbWVudHNUb0xpdmVQcmV2aWV3KHBhcmVudEVsZW1lbnQ6IEhUTUxFbGVtZW50KTogdm9pZFxufVxuXG5cbmZ1bmN0aW9uIGdldEVsZW1lbnRDbGllbnRIZWlnaHQoZWxlbWVudDogSFRNTEVsZW1lbnQsIHBhcmVudFJlbmRlckVsZW1lbnQ6IEhUTUxEaXZFbGVtZW50KTogbnVtYmVyIHtcblxuICAgIGxldCBoZWlnaHQgPSBlbGVtZW50LmNsaWVudEhlaWdodDtcbiAgICBpZihoZWlnaHQgPT09IDApIHtcbiAgICAgICAgcGFyZW50UmVuZGVyRWxlbWVudC5hcHBlbmRDaGlsZChlbGVtZW50KTtcbiAgICAgICAgaGVpZ2h0ID0gZWxlbWVudC5jbGllbnRIZWlnaHRcbiAgICAgICAgcGFyZW50UmVuZGVyRWxlbWVudC5yZW1vdmVDaGlsZChlbGVtZW50KTtcbiAgICB9XG4gICAgcmV0dXJuIGhlaWdodFxufSIsIi8qKlxuICogRmlsZTogL3NyYy9kb21fbWFuYWdlci9yZWdpb25hbF9tYW5hZ2Vycy9yZWdpb25ET01NYW5hZ2VyLnRzICAgICAgICAgICAgICAgICpcbiAqIENyZWF0ZWQgRGF0ZTogU3VuZGF5LCBNYXkgMjJuZCAyMDIyLCA3OjQ2IHBtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKiBBdXRob3I6IENhbWVyb24gUm9iaW5zb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqIENvcHlyaWdodCAoYykgMjAyMiBDYW1lcm9uIFJvYmluc29uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKi9cblxuaW1wb3J0IHsgRE9NT2JqZWN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GVuZEVsZW1lbnRzVG9Db2x1bW5zKHJlZ2lvbkVsZW1lbnRzLCBjb2x1bW5Db250ZW50RGl2cywgc2V0dGluZ3MpO1xuICAgIH1cblxuICAgIHByaXZhdGUgYXBwZW5kRWxlbWVudHNUb0NvbHVtbnMocmVnaW9uRWxlbWVudHM6IERPTU9iamVjdFtdLCBjb2x1bW5Db250ZW50RGl2czogSFRNTERpdkVsZW1lbnRbXSwgc2V0dGluZ3M6IE11bHRpQ29sdW1uU2V0dGluZ3MpIHtcblxuICAgICAgICBsZXQgY29sdW1uSW5kZXggPSAwO1xuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHJlZ2lvbkVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XG5cbiAgICAgICAgICAgIGlmIChyZWdpb25FbGVtZW50c1tpXS50YWcgPT09IERPTU9iamVjdFRhZy5ub25lIHx8XG4gICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0udGFnID09PSBET01PYmplY3RUYWcuY29sdW1uQnJlYWspIHtcblxuICAgICAgICAgICAgICAgIC8vIFdlIHN0b3JlIHRoZSBlbGVtZW50cyBpbiBhIHdyYXBwZXIgY29udGFpbmVyIHVudGlsIHdlIGRldGVybWluZVxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50ID0gY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBNdWx0aUNvbHVtbkxheW91dENTUy5Db2x1bW5EdWFsRWxlbWVudENvbnRhaW5lcixcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmKHNldHRpbmdzLmNvbnRlbnRPdmVyZmxvdyA9PT0gQ29udGVudE92ZXJmbG93VHlwZS5oaWRkZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyhNdWx0aUNvbHVtbkxheW91dENTUy5Db250ZW50T3ZlcmZsb3dIaWRkZW4pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkNvbnRlbnRPdmVyZmxvd0F1dG9TY3JvbGwpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYoc2V0dGluZ3MuYWxpZ25tZW50ID09PSBBbGlnbm1lbnRUeXBlLmNlbnRlcikge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkFsaWdubWVudENlbnRlcilcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2V0dGluZ3MuYWxpZ25tZW50ID09PSBBbGlnbm1lbnRUeXBlLnJpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuYWRkQ2xhc3MoTXVsdGlDb2x1bW5MYXlvdXRDU1MuQWxpZ25tZW50UmlnaHQpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkFsaWdubWVudExlZnQpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0uZWxlbWVudENvbnRhaW5lciA9IGVsZW1lbnQ7XG5cbiAgICAgICAgICAgICAgICAvLyBPdGhlcndpc2Ugd2UganVzdCBtYWtlIGEgY29weSBvZiB0aGUgb3JpZ2luYWwgZWxlbWVudCB0byBkaXNwbGF5LlxuICAgICAgICAgICAgICAgIGxldCBjbG9uZWRFbGVtZW50ID0gcmVnaW9uRWxlbWVudHNbaV0ub3JpZ2luYWxFbGVtZW50LmNsb25lTm9kZSh0cnVlKSBhcyBIVE1MRGl2RWxlbWVudDtcbiAgICAgICAgICAgICAgICBsZXQgaGVhZGluZ0NvbGxhcHNlRWxlbWVudCA9IGdldEhlYWRpbmdDb2xsYXBzZUVsZW1lbnQoY2xvbmVkRWxlbWVudCk7XG4gICAgICAgICAgICAgICAgaWYoaGVhZGluZ0NvbGxhcHNlRWxlbWVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHJlbW92ZXMgdGhlIGNvbGxhcHNlIGFycm93IGZyb20gdGhlIHZpZXcgaWYgaXQgZXhpc3RzLlxuICAgICAgICAgICAgICAgICAgICBoZWFkaW5nQ29sbGFwc2VFbGVtZW50LmRldGFjaCgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJlZ2lvbkVsZW1lbnRzW2ldLmNsb25lZEVsZW1lbnQgPSBjbG9uZWRFbGVtZW50O1xuICAgICAgICAgICAgICAgIGVsZW1lbnQuYXBwZW5kQ2hpbGQoY2xvbmVkRWxlbWVudCk7XG5cbiAgICAgICAgICAgICAgICBpZiAocmVnaW9uRWxlbWVudHNbaV0gaW5zdGFuY2VvZiBUYXNrTGlzdERPTU9iamVjdCkge1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZml4Q2xvbmVkQ2hlY2tMaXN0QnV0dG9ucyhyZWdpb25FbGVtZW50c1tpXSBhcyBUYXNrTGlzdERPTU9iamVjdCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQgIT09IG51bGwgJiYgcmVnaW9uRWxlbWVudHNbaV0udGFnICE9PSBET01PYmplY3RUYWcuY29sdW1uQnJlYWspIHtcblxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1tjb2x1bW5JbmRleF0uYXBwZW5kQ2hpbGQoZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICogSWYgdGhlIHRhZyBpcyBhIGNvbHVtbiBicmVhayB3ZSB1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GhlYWRpbmdDb2xsYXBzZUVsZW1lbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyByZW1vdmVzIHRoZSBjb2xsYXBzZSBhcnJvdyBmcm9tIHRoZSB2aWV3IGlmIGl0IGV4aXN0cy5cbiAgICAgICAgICAgICAgICAgICAgaGVhZGluZ0NvbGxhcHNlRWxlbWVudC5kZXRhY2goKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS5jbG9uZWRFbGVtZW50ID0gY2xvbmVkRWxlbWVudDtcbiAgICAgICAgICAgICAgICBlbGVtZW50LmFwcGVuZENoaWxkKGNsb25lZEVsZW1lbnQpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHJlZ2lvbkVsZW1lbnRzW2ldIGluc3RhbmNlb2YgVGFza0xpc3RET01PYmplY3QpIHtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZpeENsb25lZENoZWNrTGlzdEJ1dHRvbnMocmVnaW9uRWxlbWVudHNbaV0gYXMgVGFza0xpc3RET01PYmplY3QsIHRydWUpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChlbGVtZW50ICE9PSBudWxsKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdi5hcHBlbmRDaGlsZChlbGVtZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjcmVhdGVDb2x1bW5Db250ZW50RGl2cyhtdWx0aUNvbHVtblBhcmVudDogSFRNTERpdkVsZW1lbnQpOiBIVE1MRGl2RWxlbWVudCB7XG5cbiAgICAgICAgbGV0IGNvbnRlbnREaXYgPSBtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbn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3V0LmNlbnRlciAgIHx8XG4gICAgICAgbGF5b3V0ID09PSBDb2x1bW5MYXlvdXQuc2Vjb25kICAgICkge1xuXG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cblxuICAgIHJldHVybiBmYWxzZVxufVxuXG5mdW5jdGlvbiBpc0xlZnRMYXlvdXQobGF5b3V0OiBDb2x1bW5MYXlvdXQpOiBib29sZWFuIHtcblxuICAgIGlmKGxheW91dCA9PT0gQ29sdW1uTGF5b3V0LmxlZnQgfHxcbiAgICAgICBsYXlvdXQgPT09IENvbHVtbkxheW91dC5maXJzdCApIHtcbiBcbiAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICB9XG4gXG4gICAgIHJldHVybiBmYWxzZVxufVxuXG5mdW5jdGlvbiBpc1JpZ2h0TGF5b3V0KGxheW91dDogQ29sdW1uTGF5b3V0KTogYm9vbGVhbiB7XG5cbiAgICBpZihsYXlvdXQgPT09IENvbHVtbkxheW91dC5yaWdodCB8fFxuICAgICAgIGxheW91dCA9PT0gQ29sdW1uTGF5b3V0LnRoaXJkIHx8XG4gICAgICAgbGF5b3V0ID09PSBDb2x1bW5MYXlvdXQubGFzdCApIHtcbiBcbiAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICB9XG4gXG4gICAgIHJldHVybiBmYWxzZVxufSIsIi8qKlxuICogRmlsZTogL3NyYy9kb21fbWFuYWdlci9yZWdpb25hbF9tYW5hZ2Vycy9hdXRvTGF5b3V0UmVnaW9uTWFuYWdlci50cyAgICAgICAgICpcbiAqIENyZWF0ZWQgRGF0ZTogU3VuZGF5LCBNYXkgMjJuZCAyMDIyLCAxMDoyMyBwbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKiBBdXRob3I6IENhbWVyb24gUm9iaW5zb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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pZ2h0ID0gMDtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGNoZWNrU2hvdWxkU3dpdGNoQ29sdW1ucyhuZXh0RWxlbWVudEhlaWdodDogbnVtYmVyKSB7XG4gICAgXG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRDb2x1bW5IZWlnaHQgKyBuZXh0RWxlbWVudEhlaWdodCA+IG1heENvbHVtbkNvbnRlbnRIZWlnaHQgJiZcbiAgICAgICAgICAgICAgICAgICAgKGNvbHVtbkluZGV4ICsgMSkgPCBzZXR0aW5ncy5udW1iZXJPZkNvbHVtbnMpIHtcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uSW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudENvbHVtbkhlaWdodCA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHJlZ2lvbkVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XG5cbiAgICAgICAgICAgICAgICBpZiAocmVnaW9uRWxlbWVudHNbaV0udGFnID09PSBET01PYmplY3RUYWcubm9uZSB8fFxuICAgICAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS50YWcgPT09IERPTU9iamVjdFRhZy5jb2x1bW5CcmVhaykge1xuICAgIFxuICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICogSGVyZSB3ZSBjaGVjayBpZiB3ZSBuZWVkIHRvIHN3YXAgdG8gdGhlIG5leHQgY29sdW1uIGZvciB0aGUgY3VycmVudCBlbGVtZW50LlxuICAgICAgICAgICAgICAgICAgICAgKiBJZiB0aGUgdXNlciB3YW50cyB0byBrZWVwIGhlYWRpbmdzIHdpdGggdGhlIGNvbnRlbnQgYmVsb3cgaXQgd2UgYWxzbyBtYWtlIHN1cmVcbiAgICAgICAgICAgICAgICAgICAgICogdGhhdCB0aGUgbGFzdCBpdGVtIGluIGEgY29sdW1uIGlzIG5vdCBhIGhlYWRlciBlbGVtZW50IGJ5IHVzaW5nIHRoZSBoZWFkZXIgYW5kXG4gICAgICAgICAgICAgICAgICAgICAqIHRoZSBuZXh0IGVsZW1lbnQncyBoZWlnaHQgYXMgdGhlIGhlaWdodCB2YWx1ZS4gXG4gICAgICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgICAgICBpZihoYXNIZWFkZXIocmVnaW9uRWxlbWVudHNbaV0ub3JpZ2luYWxFbGVtZW50KSA9PT0gdHJ1ZSkgeyAvLyBUT0RPOiBBZGQgdGhpcyBhcyBzZWxlY3RhYmxlIG9wdGlvbi5cbiAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJBbmROZXh0RWxlbWVudEhlaWdodCA9IHJlZ2lvbkVsZW1lbnRzW2ldLmVsZW1lbnRSZW5kZXJlZEhlaWdodDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGkgPCByZWdpb25FbGVtZW50cy5sZW5ndGggLSAxKSB7XG4gICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyQW5kTmV4dEVsZW1lbnRIZWlnaHQgKz0gcmVnaW9uRWxlbWVudHNbaSArIDFdLmVsZW1lbnRSZW5kZXJlZEhlaWdodDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrU2hvdWxkU3dpdGNoQ29sdW1ucyhoZWFkZXJBbmROZXh0RWxlbWVudEhlaWdodCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGVja1Nob3VsZFN3aXRjaENvbHVtbnMocmVnaW9uRWxlbWVudHNbaV0uZWxlbWVudFJlbmRlcmVkSGVpZ2h0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50Q29sdW1uSGVpZ2h0ICs9IHJlZ2lvbkVsZW1lbnRzW2ldLmVsZW1lbnRSZW5kZXJlZEhlaWdodFxuICAgIFxuICAgIFxuICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICogV2Ugc3RvcmUgdGhlIGVsZW1lbnRzIGluIGEgd3JhcHBlciBjb250YWluZXIgdW50aWwgd2UgZGV0ZXJtaW5lIGlmIHdlIHdhbnQgdG8gXG4gICAgICAgICAgICAgICAgICAgICAqIHVzZSB0aGUgb3JpZ2luYWwgZWxlbWVudCBvciBhIGNsb25lIG9mIHRoZSBlbGVtZW50LiBUaGlzIGhlbHBzIHVzIGJ5IGFsbG93aW5nIFxuICAgICAgICAgICAgICAgICAgICAgKiB1cyB0byBjcmVhdGUgYSB2aXN1YWwgb25seSBjbG9uZSB3aGlsZSB0aGUgdXBkYXRlIGxvb3AgbW92ZXMgdGhlIG9yaWdpbmFsIGVsZW1lbnQgXG4gICAgICAgICAgICAgICAgICAgICAqIGludG8gdGhlIGNvbHVtbnMuXG4gICAgICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgICAgICBsZXQgZWxlbWVudCA9IGNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IE11bHRpQ29sdW1uTGF5b3V0Q1NTLkNvbHVtbkR1YWxFbGVtZW50Q29udGFpbmVyLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0uZWxlbWVudENvbnRhaW5lciA9IGVsZW1lbnQ7XG4gICAgXG4gICAgICAgICAgICAgICAgICAgIGxldCBjbG9uZWRFbGVtZW50ID0gcmVnaW9uRWxlbWVudHNbaV0uY2xvbmVkRWxlbWVudDtcbiAgICAgICAgICAgICAgICAgICAgaWYocmVnaW9uRWxlbWVudHNbaV0uY2xvbmVkRWxlbWVudCA9PT0gbnVsbCkge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjbG9uZWRFbGVtZW50ID0gcmVnaW9uRWxlbWVudHNbaV0ub3JpZ2luYWxFbGVtZW50LmNsb25lTm9kZSh0cnVlKSBhcyBIVE1MRGl2RWxlbWVudDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkaW5nQ29sbGFwc2VFbGVtZW50ID0gZ2V0SGVhZGluZ0NvbGxhcHNlRWxlbWVudChjbG9uZWRFbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhlYWRpbmdDb2xsYXBzZUVsZW1lbnQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHJlbW92ZXMgdGhlIGNvbGxhcHNlIGFycm93IGZyb20gdGhlIHZpZXcgaWYgaXQgZXhpc3RzLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmdDb2xsYXBzZUVsZW1lbnQuZGV0YWNoKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0uY2xvbmVkRWxlbWVudCA9IGNsb25lZEVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hcHBlbmRDaGlsZChjbG9uZWRFbGVtZW50KTtcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlZ2lvbkVsZW1lbnRzW2ldIGluc3RhbmNlb2YgVGFza0xpc3RET01PYmplY3QpIHtcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZml4Q2xvbmVkQ2hlY2tMaXN0QnV0dG9ucyhyZWdpb25FbGVtZW50c1tpXSBhcyBUYXNrTGlzdERPTU9iamVjdCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQgIT09IG51bGwgJiYgXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1tjb2x1bW5JbmRleF0gJiYgXG4gICAgICAgICAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS50YWcgIT09IERPTU9iamVjdFRhZy5jb2x1bW5CcmVhaykge1xuICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnNbY29sdW1uSW5kZXhdLmFwcGVuZENoaWxkKGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0uZWxlbWVudFJlbmRlcmVkSGVpZ2h0ID0gZWxlbWVudC5jbGllbnRIZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICAqIElmIHRoZSB0YWcgaXMgYSBjb2x1bW4gYnJlYWsgd2UgdXBkYXRlIHRoZSBjb2x1bW4gaW5kZXggYWZ0ZXJcbiAgICAgICAgICAgICAgICAgICAgICogYXBwZW5kaW5nIHRoZSBpdGVtIHRvIHRoZSBjb2x1bW4gZGl2LiBUaGlzIGtlZXBzIHRoZSBtYWluIERPTVxuICAgICAgICAgICAgICAgICAgICAgKiBjbGVhbmVyIGJ5IHJlbW92aW5nIG90aGVyIGl0ZW1zIGFuZCBwbGFjaW5nIHRoZW0gYWxsIHdpdGhpblxuICAgICAgICAgICAgICAgICAgICAgKiBhIHJlZ2lvbiBjb250YWluZXIuXG4gICAgICAgICAgICAgICAgICAgICAqIFxuICAgICAgICAgICAgICAgICAgICAgKiBSZW1vdmluZyB0aGUgZW5kIGNvbHVtbiB0YWcgYXMgYW4gb3B0aW9uIGZvciBub3cuXG4gICAgICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgICAgICAvLyBpZiAocmVnaW9uRWxlbWVudHNbaV0udGFnID09PSBET01PYmplY3RUYWcuY29sdW1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ZCB3ZSBjaGVjayBhbGwgb2YgdGhlIGNvbHVtbiBoZWlnaHRzIGFnYWluc3Qgb3VyIGxhc3QgaXRlcmF0aW9uIGFuZCBcbiAgICAgICAgICogaWYgbm90aGluZyBoYXMgY2hhbmdlZCB3ZSBrbm93IHdlIGFyZSBiYWxhbmNlZC5cbiAgICAgICAgICogXG4gICAgICAgICAqIFRoZXJlIGlzIHByb2JhYmx5IGEgYmV0dGVyIHdheSBvZiBhY2NvbXBsaXNoaW5nIHRoaXMgdGFzayBidXQgdGhpcyB3b3JrcyBmb3IgdGhlIHRpbWUgYmVpbmcuXG4gICAgICAgICAqL1xuICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgNTsgaSsrKSB7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGJhbGFuY2VFbGVtZW50cygpXG5cbiAgICAgICAgICAgIGxldCBiYWxhbmNlZCA9IHRydWU7XG4gICAgICAgICAgICBmb3IobGV0IGogPSAwOyBqIDwgY29sdW1uQ29udGVudERpdnMubGVuZ3RoOyBqKyspIHtcblxuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBjb2x1bW4gaGVpZ2h0cyBhcmUgdW5kZWZpbmVkIHdlIHNldCBkZWZhdWx0IHRvIHplcm8gc28gbm90IHRvIGVuY291bnRlciBhbiBlcnJvci5cbiAgICAgICAgICAgICAgICBpZighdGhpcy5wcmV2aW91c0NvbHVtbkhlaWdodHNbal0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wcmV2aW91c0NvbHVtbkhlaWdodHMucHVzaCgwKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGlmIHRoaXMgcmVuZGVyIGhlaWdodCBpcyBub3QgdGhlIHNhbWUgYXMgdGhlIHByZXZpb3VzIGhlaWdodCB3ZSBhcmUgc3RpbGwgYmFsYW5jaW5nLlxuICAgICAgICAgICAgICAgIGlmKHRoaXMucHJldmlvdXNDb2x1bW5IZWlnaHRzW2pdICE9PSBj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iAgICAgICAgICAgICAgICBpZihlbC5lbGVtZW50UmVuZGVyZWRIZWlnaHQgPT09IDAgJiZcbiAgICAgICAgICAgICAgICAgICAgZWwudGFnICE9PSBET01PYmplY3RUYWcuY29sdW1uQnJlYWsgJiZcbiAgICAgICAgICAgICAgICAgICAgZWwudGFnICE9PSBET01PYmplY3RUYWcuZW5kUmVnaW9uICYmXG4gICAgICAgICAgICAgICAgICAgIGVsLnRhZyAhPT0gRE9NT2JqZWN0VGFnLnJlZ2lvblNldHRpbmdzICYmXG4gICAgICAgICAgICAgICAgICAgIGVsLnRhZyAhPT0gRE9NT2JqZWN0VGFnLnN0YXJ0UmVnaW9uKSB7XG4gICAgXG4gICAgICAgICAgICAgICAgICAgIC8vIEFkZCBlbGVtZW50IHRvIHJlbmRlcmVkIGRpdiBzbyB3ZSBjYW4gZXh0cmFjdCB0aGUgcmVuZGVyZWQgaGVpZ2h0LlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbHVtblBhcmVudC5hcHBlbmRDaGlsZChlbC5vcmlnaW5hbEVsZW1lbnQpXG4gICAgICAgICAgICAgICAgICAgIGVsLmVsZW1lbnRSZW5kZXJlZEhlaWdodCA9IGVsLm9yaWdpbmFsRWxlbWVudC5jbGllbnRIZWlnaHRcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jb2x1bW5QYXJlbnQucmVtb3ZlQ2hpbGQoZWwub3JpZ2luYWxFbGVtZW50KVxuICAgICAgICAgICAgICAgIH1cbiAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4gZWwuZWxlbWVudFJlbmRlcmVkSGVpZ2h0IFxuICAgICAgICAgICAgfSkucmVkdWNlKChwcmV2OiBudW1iZXIsIGN1cnI6IG51bWJlcikgPT4geyByZXR1cm4gcHJldiArIGN1cnIgfSwgMCk7XG4gICAgICAgICAgICBsZXQgbWF4Q29sdW1uQ29udGVudEhlaWdodCA9IE1hdGgudHJ1bmModG90YWxIZWlnaHQgLyB0aGlzLnJlZ2lvbmFsU2V0dGluZ3MubnVtYmVyT2ZDb2x1bW5zKTtcblxuICAgICAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IHRoaXMuY29sdW1uRGl2cy5sZW5ndGggLSAxOyBpKyspIHtcblxuICAgICAgICAgICAgICAgIGxldCBjb2x1bW5IZWlnaHQgPSAwXG4gICAgICAgICAgICAgICAgZm9yKGxldCBqID0gMDsgaiA8IHRoaXMuY29sdW1uRGl2c1tpXS5jaGlsZHJlbi5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5IZWlnaHQgKz0gdGhpcy5jb2x1bW5EaXZzW2ldLmNoaWxkcmVuW2pdLmNsaWVudEhlaWdodFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmKGNvbHVtbkhlaWdodCA+IG1heENvbHVtbkNvbnRlbnRIZWlnaHQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsaWRDb2x1bW5zID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmKHZhbGlkQ29sdW1ucyA9PT0gZmFsc2UpIHtcblxuICAgICAgICAgICAgdGhpcy5yZW5kZXJDb2x1bW5NYXJrZG93bih0aGlzLnJlZ2lvblBhcmVudCwgdGhpcy5kb21MaXN0LCB0aGlzLnJlZ2lvbmFsU2V0dGluZ3MpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3VwZXIudXBkYXRlUmVuZGVyZWRNYXJrZG93bigpO1xuICAgIH1cbn1cblxuIiwiLyoqXG4gKiBGaWxlOiAvc3JjL2RvbV9tYW5hZ2VyL3JlZ2lvbmFsX21hbmFnZXJzL3JlZ2lvbk1hbmFnZXJDb250YWluZXIudHMgICAgICAgICAgKlxuICogQ3JlYXRlZCBEYXRlOiBTdW5kYXksIE1heSAyMm5kIDIwMjIsIDc6NTAgcG0gICAgICAgICAgIC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cyA9IGVsLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJleHRlcm5hbC1saW5rXCIpO1xuICAgIGZvcihsZXQgbGlua0VsIG9mIEFycmF5LmZyb20oaXRlbXMpKSB7XG5cbiAgICAgICAgbGV0IGxpbmsgPSBsaW5rRWwgYXMgSFRNTEVsZW1lbnQ7XG4gICAgICAgIGlmKGxpbmsgPT09IHVuZGVmaW5lZCB8fFxuICAgICAgICAgICBsaW5rID09PSBudWxsICkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBSZW1vdmUgdGhlIGhyZWYgZnJvbSB0aGUgbGluayBhbmQgc2V0dXAgYW4gZXZlbnQgbGlzdGVuZXIgdG8gb3BlbiB0aGUgbGluayBpbiB0aGUgZGVmYXVsdCBicm93c2VyLlxuICAgICAgICBsZXQgaHJlZiA9IGxpbmsuZ2V0QXR0cihcImhyZWZcIilcbiAgICAgICAgbGluay5yZW1vdmVBdHRyaWJ1dGUoXCJocmVmXCIpO1xuXG4gICAgICAgIGxpbmsuYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsIChldikgPT4ge1xuXG4gICAgICAgICAgICB3aW5kb3cub3BlbihocmVmKTsgXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGl0ZW1zID0gZWwuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZShcImludGVybmFsLWxpbmtcIik7XG4gICAgZm9yKGxldCBsaW5rRWwgb2YgQXJyYXkuZnJvbShpdGVtcykpIHtcblxuICAgICAgICBsZXQgbGluayA9IGxpbmtFbCBhcyBIVE1MRWxlbWVudDtcbiAgICAgICAgaWYobGluayA9PT0gdW5kZWZpbmVkIHx8XG4gICAgICAgICAgIGxpbmsgPT09IG51bGwgKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFJlbW92aW5nIHRoZSBocmVmIGZyb20gaW50ZXJuYWwgbGlua3MgaXMgYWxsIH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ICAgICAgICAgICAgICAgICBub3RpY2VTdHJpbmcgKz0gYCBQbGVhc2UgcmVsb2FkIGFueSBvcGVuIGZpbGVzIGZvciBjaGFuZ2UgdG8gdGFrZSBlZmZlY3QuYFxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbmV3IE5vdGljZSAobm90aWNlU3RyaW5nKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvL1RPRE86IFNldCB1cCB0aGlzIGFzIGEgbW9kYWwgdG8gc2V0IHNldHRpbmdzIGF1dG9tYXRpY2FsbHlcclxuICAgICAgICB0aGlzLmFkZENvbW1hbmQoeyAgICAgICAgICAgIFxyXG4gICAgICAgICAgICBpZDogYGluc2VydC1tdWx0aS1jb2x1bW4tcmVnaW9uYCxcclxuICAgICAgICAgICAgbmFtZTogYEluc2VydCBNdWx0aS1Db2x1bW4gUmVnaW9uYCxcclxuICAgICAgICAgICAgZWRpdG9yQ2FsbGJhY2s6IChlZGl0b3IsIHZpZXcpID0+IHtcclxuXHJcbiAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjdXJzb3JTdGFydFBvc2l0aW9uID0gZWRpdG9yLmdldEN1cnNvcihcImZyb21cIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGVkaXRvci5nZXREb2MoKS5yZXBsYWNlU2VsZWN0aW9uKFxyXG5gXHJcblxcYFxcYFxcYHN0YXJ0LW11bHRpLWNvbHVtblxyXG5JRDogSURfJHtnZXRVSUQoNCl9XHJcbk51bWJlciBvZiBDb2x1bW5zOiAyXHJcbkxhcmdlc3QgQ29sdW1uOiBzdGFuZGFyZFxyXG5cXGBcXGBcXGBcclxuXHJcblxyXG5cclxuLS0tIGNvbHVtbi1lbmQgLS0tXHJcblxyXG5cclxuXHJcbj09PSBlbmQtbXVsdGktY29sdW1uXHJcblxyXG4ke2VkaXRvci5nZXREb2MoKS5nZXRTZWxlY3Rpb24oKX1gXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICBjdXJzb3JTdGFydFBvc2l0aW9uLmxpbmUgPSBjdXJzb3JTdGFydFBvc2l0aW9uLmxpbmUgKyA3XHJcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yU3RhcnRQb3NpdGlvbi5jaCA9IDA7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGVkaXRvci5zZXRDdXJzb3IoY3Vyc29yU3RhcnRQb3NpdGlvbik7XHJcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgXCJFbmNvdW50ZXJlZCBhbiBlcnJvciBpbnNlcnRpbmcgYSBtdWx0aS1jb2x1bW4gcmVnaW9uLiBQbGVhc2UgdHJ5IGFnYWluIGxhdGVyLlwiXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmFkZENvbW1hbmQoeyAgICAgICAgICAgIFxyXG4gICAgICAgICAgICBpZDogYGFkZC1JRHMtVG8tbXVsdGktY29sdW1uLXJlZ2lvbmAsXHJcbiAgICAgICAgICAgIG5hbWU6IGBGaXggTWlzc2luZyBJRHMgZm9yIE11bHRpLUNvbHVtbiBSZWdpb25zYCxcclxuICAgICAgICAgICAgZWRpdG9yQ2FsbGJhY2s6IChlZGl0b3IsIHZpZXcpID0+IHtcclxuXHJcbiAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgICAgICAgICAqIE5vdCBzdXJlIGlmIHRoZXJlIGlzIGFuIGVhc2llciB3YXkgdG8gZG8gdGhpcy5cclxuICAgICAgICAgICAgICAgICAgICAgKiBcclxuICAgICAgICAgICAgICAgICAgICAgKiBHZXQgYWxsIG9mIHRoZSBsaW5lcyBvZiB0aGUgZG9jdW1lbnQgc3BsaXQgYnkgbmV3bGluZXMuXHJcbiAgICAgICAgICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRvY1RleHQgPSBlZGl0b3IuZ2V0UmFuZ2UoeyBsaW5lOiAwLCBjaDogMCB9LCB7IGxpbmU6IGVkaXRvci5nZXREb2MoKS5saW5lQ291bnQoKSwgY2g6IDB9KTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbGluZXMgPSBkb2NUZXh0LnNwbGl0KFwiXFxuXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgc3RhcnRDb2RlYmxvY2sgPSBtdWx0aUNvbHVtblBhcnNlci5maW5kU3RhcnRDb2RlYmxvY2soZG9jVGV4dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVPZmZzZXQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBudW1Db2RlYmxvY2tzVXBkYXRlZCA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUoc3RhcnRDb2RlYmxvY2suZm91bmQgPT09IHRydWUpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdldCB0aGUgdGV4dCBvZiB0aGUgc2V0dGluZ3MgYmxvY2sgc28gd2UgY2FuIGNoZWNrIGlmIGl0IGNvbnRhaW5zIGFuIElELFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhbHNvIHNvIHdlIGNhbiBnZXQgdGhlIGxlbmd0aCBvZiB0aGUgZmlyc3QgbGluZSwgdXNlZCB0byBjYWxjdWxhdGUgd2hlcmUgdG8gYXBwZW5kIGEgbmV3IElEIGlmIG5lZWRlZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0dGluZ3NUZXh0ID0gZG9jVGV4dC5zbGljZShzdGFydENvZGVibG9jay5zdGFydFBvc2l0aW9uLCBzdGFydENvZGVibG9jay5lbmRQb3NpdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaXJzdExpbmVPZkNvZGVibG9ja0xlbmd0aCA9IHNldHRpbmdzVGV4dC5zcGxpdChcIlxcblwiKVswXS5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBXZSBuZWVkIHRoZSBsaW5lcyBiZWZvcmUgdGhlIGJsb2NrIHRvIGtub3cgd2hlcmUgdG8gc3RhcnQgcmVwbGFjaW5nIHRleHRcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW5kIHRoZSBsaW5lcyBpbmNsdWRpbmcgdGhlIGJsb2NrIHRvIGtub3cgd2hlcmUgdG8gc2V0IG91ciBvZmZzZXQgdG8gYWZ0ZXIgdGhpcyBpdGVyYXRpb24uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5lc0JlZm9yZSA9IGRvY1RleHQuc2xpY2UoMCwgc3RhcnRDb2RlYmxvY2suc3RhcnRQb3NpdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdGFydFJlcGxhY2VtZW50TGluZUluZGV4ID0gKGxpbmVzQmVmb3JlLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCAtIDEpICsgbGluZU9mZnNldDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVzT2YgPSBkb2NUZXh0LnNsaWNlKDAsIHN0YXJ0Q29kZWJsb2NrLmVuZFBvc2l0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVuZFJlcGxhY2VtZW50TGluZUluZGV4ID0gIChsaW5lc09mLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCAtIDEpICsgbGluZU9mZnNldDtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZXR0aW5nc0lEID0gcGFyc2VTdGFydFJlZ2lvbkNvZGVCbG9ja0lEKHNldHRpbmdzVGV4dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldHRpbmdzSUQgPT09IFwiXCIpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjb3B5IHRoZSBmaXJzdCBsaW5lIG9mIHRoZSBjb2RlYmxvY2sgYW5kIGFwcGVuZCBhIG5ldyBJRCwgdGhlbiByZXBsYWNlIHRoZSBmaXJzdCBsaW5lIG9mIHRoZSBibG9ja1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxhY2VtZW50VGV4dCA9IGVkaXRvci5nZXRSYW5nZSh7IGxpbmU6IHN0YXJ0UmVwbGFjZW1lbnRMaW5lSW5kZXgsIGNoOiAwIH0sIHsgbGluZTogc3RhcnRSZXBsYWNlbWVudExpbmVJbmRleCwgY2g6IGZpcnN0TGluZU9mQ29kZWJsb2NrTGVuZ3RofSkgKyBgXFxuSUQ6IElEXyR7Z2V0VUlEKDQpfWBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5yZXBsYWNlUmFuZ2UocmVwbGFjZW1lbnRUZXh0LCB7IGxpbmU6IHN0YXJ0UmVwbGFjZW1lbnRMaW5lSW5kZXgsIGNoOiAwIH0sIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgbGluZTogc3RhcnRSZXBsYWNlbWVudExpbmVJbmRleCwgY2g6IGZpcnN0TGluZU9mQ29kZWJsb2NrTGVuZ3RofSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRSZXBsYWNlbWVudExpbmVJbmRleCArPSAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtQ29kZWJsb2Nrc1VwZGF0ZWQgKz0gMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZU9mZnNldCA9IGVuZFJlcGxhY2VtZW50TGluZUluZGV4XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY1RleHQgPSBkb2NUZXh0LnNsaWNlKHN0YXJ0Q29kZWJsb2NrLmVuZFBvc2l0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRDb2RlYmxvY2sgPSBtdWx0aUNvbHVtblBhcnNlci5maW5kU3RhcnRDb2RlYmxvY2soZG9jVGV4dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICAgICAgICAgKiBMb29wIHRocm91Z2ggYWxsIG9mIHRoZSBsaW5lcyBjaGVja2luZyBpZiB0aGUgbGluZSBpcyBhIFxyXG4gICAgICAgICAgICAgICAgICAgICAqIHN0YXJ0IHRhZyBhbmQgaWYgc28gaXMgaXQgbWlzc2luZyBhbiBJRC5cclxuICAgICAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgICAgICBsZXQgbGluZXNXaXRob3V0SURzID0gW11cclxuICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dFdpdGhvdXRJRHMgPSBbXVxyXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBsaW5lcy5sZW5ndGg7IGkrKykge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBtdWx0aUNvbHVtblBhcnNlci5pc1N0YXJ0VGFnV2l0aElEKGxpbmVzW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5pc1N0YXJ0VGFnID09PSB0cnVlICYmIGRhdGEuaGFzS2V5ID09PSBmYWxzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZXNXaXRob3V0SURzLnB1c2goaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0V2l0aG91dElEcy5wdXNoKGxpbmVzW2ldKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmKGxpbmVzV2l0aG91dElEcy5sZW5ndGggPT09IDAgJiYgbnVtQ29kZWJsb2Nrc1VwZGF0ZWQgPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZSAoXCJGb3VuZCAwIG1pc3NpbmcgSURzIGluIHRoZSBjdXJyZW50IGRvY3VtZW50LlwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAgICAgICAgICogTm93IGxvb3AgdGhyb3VnaCBlYWNoIGxpbmUgdGhhdCBpcyBtaXNzaW5nIGFuIElEIGFuZFxyXG4gICAgICAgICAgICAgICAgICAgICAqIGdlbmVyYXRlIGEgcmFuZG9tIElEIGFuZCByZXBsYWNlIHRoZSBvcmlnaW5hbCB0ZXh0LlxyXG4gICAgICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBsaW5lc1dpdGhvdXRJRHMubGVuZ3RoOyBpKyspIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvcmlnaW5hbFRleHQgPSB0ZXh0V2l0aG91dElEc1tpXVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dCA9IG9yaWdpbmFsVGV4dDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IHRleHQudHJpbUVuZCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZih0ZXh0LmNoYXJBdCh0ZXh0Lmxlbmd0aCAtIDEpID09PSBcIjpcIikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IHRleHQuc2xpY2UoMCwgdGV4dC5sZW5ndGgtMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA9IGAke3RleHR9OiBJRF8ke2dldFVJRCg0KX1gO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnJlcGxhY2VSYW5nZSh0ZXh0LCB7IGxpbmU6IGxpbmVzV2l0aG91dElEc1tpXSwgY2g6IDAgfSwgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBsaW5lOiBsaW5lc1dpdGhvdXRJRHNbaV0sIGNoOiBvcmlnaW5hbFRleHQubGVuZ3RofSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBuZXcgTm90aWNlIChgUmVwbGFjZWQgJHtsaW5lc1dpdGhvdXRJRHMubGVuZ3RoICsgbnVtQ29kZWJsb2Nrc1VwZGF0ZWR9IG1pc3NpbmcgSUQocykgaW4gdGhlIGN1cnJlbnQgZG9jdW1lbnQuYCk7XHJcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgXCJFbmNvdW50ZXJlZCBhbiBlcnJvciBhZGRpZ24gSURzIHRvIG11bHRpLWNvbHVtbiByZWdpb25zLiBQbGVhc2UgdHJ5IGFnYWluIGxhdGVyLlwiXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLnJlZ2lzdGVySW50ZXJ2YWwod2luZG93LnNldEludGVydmFsKCgpID0+IHtcclxuICAgICAg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AgICAgIGxldCBmaWxlRE9NTWFuYWdlciA9IHRoaXMuZ2xvYmFsTWFuYWdlci5nZXRGaWxlTWFuYWdlcihzb3VyY2VQYXRoKTtcclxuICAgICAgICAgICAgaWYoZmlsZURPTU1hbmFnZXIgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiRm91bmQgbnVsbCBET00gbWFuYWdlci4gQ291bGQgbm90IHByb2Nlc3MgbXVsdGktY29sdW1uIG1hcmtkb3duLlwiKVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogSGVyZSB3ZSBjaGVjayBpZiB0aGUgZXhwb3J0IFwicHJpbnRcIiBmbGFnIGlzIGluIHRoZSBET00gc28gd2UgY2FuIGRldGVybWluZSBpZiB3ZVxyXG4gICAgICAgICAgICAgKiBhcmUgZXhwb3J0aW5nIGFuZCBoYW5kbGUgdGhhdCBjYXNlLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgaWYodGhpcy5jaGVja0V4cG9ydGluZyhlbCkpIHtcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmV4cG9ydERvY3VtZW50VG9QREYoZWwsIGZpbGVET01NYW5hZ2VyLCBzb3VyY2VQYXRoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gR2V0IHRoZSBpbmZvIGZvciBvdXIgY3VycmVudCBjb250ZXh0IGFuZCB0aGVuIGNoZWNrXHJcbiAgICAgICAgICAgIC8vIGlmIHRoZSBlbnRpcmUgdGV4dCBjb250YWlucyBhIHN0YXJ0IHRhZy4gSWYgdGhlcmUgaXNcclxuICAgICAgICAgICAgLy8gbm8gc3RhcnQgdGFnIGluIHRoZSBkb2N1bWVudCB3ZSBjYW4ganVzdCByZXR1cm4gYW5kXHJcbiAgICAgICAgICAgIC8vIGlnbm9yZSB0aGUgcmVzdCBvZiB0aGUgcGFyc2luZy5cclxuICAgICAgICAgICAgbGV0IGluZm8gPSBjdHguZ2V0U2VjdGlvbkluZm8oZWwpO1xyXG5cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIFdlIG5lZWQgdGhlIGNvbnRleHQgaW5mbyB0byBwcm9wZXJseSBwYXJzZSBzbyByZXR1cm5pbmcgaGVyZSBcclxuICAgICAgICAgICAgICogaW5mbyBpcyBudWxsLiBUT0RPOiBTZXQgZXJyb3IgaW4gdmlldyBpZiB0aGlzIG9jY3Vycy5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGlmKCFpbmZvKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBsZXQgZG9jU3RyaW5nID0gaW5mby50ZXh0O1xyXG4gICAgICAgICAgICBsZXQgZG9jTGluZXMgPSBkb2NTdHJpbmcuc3BsaXQoXCJcXG5cIik7XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogSWYgd2UgZW5jb3VudGVyIGEgc3RhcnQgdGFnIG9uIHRoZSBkb2N1bWVudCB3ZSBzZXQgdGhlIGZsYWcgdG8gc3RhcnRcclxuICAgICAgICAgICAgICogcGFyc2luZyB0aGUgcmVzdCBvZiB0aGUgZG9jdW1lbnQuXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBpZihtdWx0aUNvbHVtblBhcnNlci5jb250YWluc1N0YXJ0VGFnKGVsLnRleHRDb250ZW50KSB8fCBcclxuICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJzZXIuY29udGFpbnNTdGFydENvZGVCbG9jayhkb2NTdHJpbmcpKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgZmlsZURPTU1hbmFnZXIuc2V0SGFzU3RhcnRUYWcoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLyoqIFxyXG4gICAgICAgICAgICAgKiBJZiB0aGUgZG9jdW1lbnQgZG9lcyBub3QgY29udGFpbiBhbnkgc3RhcnQgdGFncyB3ZSBpZ25vcmUgdGhlXHJcbiAgICAgICAgICAgICAqIHJlc3Qgb2YgdGhlIHBhcnNpbmcuIFRoaXMgaXMgb25seSBzZXQgdG8gdHJ1ZSBvbmNlIHRoZSBmaXJzdFxyXG4gICAgICAgICAgICAgKiBzdGFydCB0YWcgZWxlbWVudCBpcyBwYXJzZWQgYWJvdmUuXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBpZihmaWxlRE9NTWFuYWdlci5nZXRIYXNTdGFydFRhZygpID09PSBmYWxzZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogVGFrZSB0aGUgaW5mbyBwcm92aWRlZCBhbmQgZ2VuZXJhdGUgdGhlIHJlcXVpcmVkIHZhcmlhYmxlcyBmcm9tIFxyXG4gICAgICAgICAgICAgKiB0aGUgbGluZSBzdGFydCBhbmQgZW5kIHZhbHVlcy5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGxldCBsaW5lc0Fib3ZlQXJyYXkgPSBkb2NMaW5lcy5zbGljZSgwLCBpbmZvLmxpbmVTdGFydClcclxuICAgICAgICAgICAgbGV0IGxpbmVzT2ZFbGVtZW50ID0gZG9jTGluZXMuc2xpY2UoaW5mby5saW5lU3RhcnQsIGluZm8ubGluZUVuZCArIDEpO1xyXG4gICAgICAgICAgICBsZXQgdGV4dE9mRWxlbWVudCA9IGxpbmVzT2ZFbGVtZW50LmpvaW4oXCJcXG5cIilcclxuICAgICAgICAgICAgbGV0IGxpbmVzQmVsb3dBcnJheSA9IGRvY0xpbmVzLnNsaWNlKGluZm8ubGluZUVuZCArIDEpXHJcblxyXG4gICAgICAgICAgICAvLyNyZWdpb24gRGVwcmVjaWF0ZWQgU3RhcnQgVGFnXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBJZiB0aGUgY3VycmVudCBsaW5lIGlzIGEgc3RhcnQgdGFnIHdlIHdhbnQgdG8gc2V0IHVwIHRoZVxyXG4gICAgICAgICAgICAgKiByZWdpb24gbWFuYWdlci4gVGhlIHJlZ2lvbmFsIG1hbmFnZXIgdGFrZXMgY2FyZVxyXG4gICAgICAgICAgICAgKiBvZiBhbGwgaXRlbXMgYmV0d2VlbiBpdCdzIHN0YXJ0IGFuZCBlbmQgdGFncyB3aGlsZSB0aGVcclxuICAgICAgICAgICAgICogZmlsZSBtYW5hZ2VyIHdlIGdvdCBhYm92ZSBhYm92ZSB0YWtlcyBjYXJlIG9mIGFsbCByZWdpb25hbCBcclxuICAgICAgICAgICAgICogbWFuYWdlcnMgaW4gZWFjaCBmaWxlLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgaWYobXVsdGlDb2x1bW5QYXJzZXIuY29udGFpbnNTdGFydFRhZyh0ZXh0T2ZFbGVtZW50KSkge1xyXG5cclxuICAgICAgICAgICAgICAgIC8qKiBcclxuICAgICAgICAgICAgICAgICAqIFNldCB1cCB0aGUgY3VycmVudCBlbGVtZW50IHRvIGFjdCBhcyB0aGUgcGFyZW50IGZvciB0aGUgXHJcbiAgICAgICAgICAgICAgICAgKiBtdWx0aS1jb2x1bW4gcmVnaW9uLlxyXG4gICAgICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgICAgICBlbC5jaGlsZHJlblswXS5kZXRhY2goKTtcclxuICAgICAgICAgICAgICAgIGVsLmNsYXNzTGlzdC5hZGQoTXVsdGlDb2x1bW5MYXlvdXRDU1MuUmVnaW9uUm9vdENvbnRhaW5lckRpdilcclxuICAgICAgICAgICAgICAgIGxldCByZW5kZXJFcnJvclJlZ2lvbiA9IGVsLmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtbkxheW91dENTUy5SZWdpb25FcnJvckNvbnRhaW5lckRpdn0gJHtNdWx0aUNvbHVtblN0eWxlQ1NTLlJlZ2lvbkVycm9yTWVzc2FnZX1gLFxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgcmVuZGVyQ29sdW1uUmVnaW9uID0gZWwuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICBjbHM6IE11bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvbkNvbnRlbnRDb250YWluZXJEaXZcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHN0YXJ0QmxvY2tEYXRhID0gbXVsdGlDb2x1bW5QYXJzZXIuZ2V0U3RhcnRCbG9ja0Fib3ZlTGluZShsaW5lc09mRWxlbWVudClcclxuICAgICAgICAgICAgICAgIGlmKHN0YXJ0QmxvY2tEYXRhID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICBsZXQgcmVnaW9uS2V5ID0gc3RhcnRCbG9ja0RhdGEuc3RhcnRCbG9ja0tleTtcclxuICAgICAgICAgICAgICAgIGlmKGZpbGVET01NYW5hZ2VyLmNoZWNrS2V5RXhpc3RzKHJlZ2lvbktleSkgPT09IHRydWUpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHsgbnVtYmVyT2ZUYWdzLCBrZXlzIH0gPSBtdWx0aUNvbHVtblBhcnNlci5jb3VudFN0YXJ0VGFncyhpbmZvLnRleHQpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgbnVtTWF0Y2hlcyA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IG51bWJlck9mVGFnczsgaSsrKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBCZWNhdXNlIHdlIGNoZWNrZWQgaWYga2V5IGV4aXN0cyBvbmUgb2YgdGhlc2UgaGFzIHRvIG1hdGNoLlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihrZXlzW2ldID09PSByZWdpb25LZXkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bU1hdGNoZXMrKztcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gV2Ugb25seSB3YW50IHRvIGRpc3BsYXkgYW4gZXJyb3IgaWYgdGhlcmUgYXJlIG1vcmUgdGhhbiAyIG9mIHRoZSBzYW1lIGlkIGFjcm9zc1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoZSB3aG9sZSBkb2N1bWVudC4gVGhpcyBwcmV2ZW50cyBlcnJvcyB3aGVuIG9ic2lkaWFuIHJlbG9hZHMgdGhlIHdob2xlIGRvY3VtZW50XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gYW5kIHRoZXJlIGFyZSB0d28gb2YgdGhlIHNhbWUga2V5IGluIHRoZSBtYXAuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYobnVtTWF0Y2hlcyA+PSAyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlZ2lvbktleSA9PT0gXCJcIikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVuZGVyRXJyb3JSZWdpb24uaW5uZXJUZXh0ID0gXCJGb3VuZCBtdWx0aXBsZSByZWdpb25zIHdpdGggZW1wdHkgSURzLiBQbGVhc2Ugc2V0IGEgdW5pcXVlIElEIGFmdGVyIGVhY2ggc3RhcnQgdGFnLlxcbkVHOiAnPT09IG11bHRpLWNvbHVtbi1zdGFydDogcmFuZG9tSUQnXFxuT3IgdXNlICdGaXggTWlzc2luZyBJRHMnIGluIHRoZSBjb21tYW5kIHBhbGV0dGUgYW5kIHJlbG9hZCB0aGUgZG9jdW1lbnQuXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbmRlckVycm9yUmVnaW9uLmlubmVyVGV4dCA9IFwiUmVnaW9uIElEIGFscmVhZHkgZXhpc3RzIGluIGRvY3VtZW50LCBwbGVhc2Ugc2V0IGEgdW5pcXVlIElELlxcbkVHOiAnPT09IG11bHRpLWNvbHVtbi1zdGFydDogcmFuZG9tSUQnXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWwuaWQgPSBgTXVsdGlDb2x1bW5JRDoke3JlZ2lvbktleX1gXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGVsZW1lbnRNYXJrZG93blJlbmRlcmVyID0gbmV3IE1hcmtkb3duUmVuZGVyQ2hpbGQoZWwpO1xyXG4gICAgICAgICAgICAgICAgZmlsZURPTU1hbmFnZXIuY3JlYXRlUmVnaW9uYWxNYW5hZ2VyKHJlZ2lvbktleSwgZWwsIHJlbmRlckVycm9yUmVnaW9uLCByZW5kZXJDb2x1bW5SZWdpb24pO1xyXG4gICAgICAgICAgICAgICAgZWxlbWVudE1hcmtkb3duUmVuZGVyZXIub251bmxvYWQgPSAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYoZmlsZURPTU1hbmFnZXIpIHtcclxuICAgIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlRE9NTWFuYWdlci5yZW1vdmVSZWdpb24oc3RhcnRCbG9ja0RhdGEuc3RhcnRCbG9ja0tleSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIGN0eC5hZGRDaGlsZChlbGVtZW50TWFya2Rvd25SZW5kZXJlcik7XHJcblxyXG4gICAgICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAgICAgKiBOb3cgd2UgaGF2ZSBjcmVhdGVkIG91ciByZWdpb25hbCBtYW5hZ2VyIGFuZCBkZWZpbmVkIHdoYXQgZWxlbWVudHMgXHJcbiAgICAgICAgICAgICAgICAgKiBuZWVkIHRvIGJlIHJlbmRlcmVkIGludG8uIFNvIHdlIGNhbiByZXR1cm4gd2l0aG91dCBhbnkgbW9yZSBwcm9jZXNzaW5nLlxyXG4gICAgICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgICAgICByZXR1cm5cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvLyNlbmRyZWdpb24gRGVwcmVjaWF0ZWQgU3RhcnQgVGFnXHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogQ2hlY2sgaWYgYW55IG9mIHRoZSBsaW5lcyBhYm92ZSB1cyBjb250YWluIGEgc3RhcnQgYmxvY2ssIGFuZCBpZlxyXG4gICAgICAgICAgICAgKiBzbyBnZXQgdGhlIGxpbmVzIGZyb20gb3VyIGN1cnJlbnQgZWxlbWVudCB0byB0aGUgc3RhcnQgYmxvY2suXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBsZXQgc3RhcnRCb2NrQWJvdmUgPSBtdWx0aUNvbHVtblBhcnNlci5nZXRTdGFydEJsb2NrT3JDb2RlYmxvY2tBYm92ZUxpbmUobGluZXNBYm92ZUFycmF5KTtcclxuICAgICAgICAgICAgaWYoc3RhcnRCb2NrQWJvdmUgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogV2Ugbm93IGtub3cgd2UncmUgd2l0aGluIGEgbXVsdGktY29sdW1uIHJlZ2lvbiwgc28gd2UgdXBk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IGdvbmUpIHdlIG5vdyB3YW50IGFsbCBvZiB0aGVcclxuICAgICAgICAgICAgICogbGluZXMgYWZ0ZXIgdGhpcyBlbGVtZW50IHVwIHRvIHRoZSBlbmQgdGFnLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgbGluZXNCZWxvd0FycmF5ID0gIG11bHRpQ29sdW1uUGFyc2VyLmdldEVuZEJsb2NrQmVsb3cobGluZXNCZWxvd0FycmF5KTtcclxuXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBOb3cgd2UgdGFrZSB0aGUgbGluZXMgYWJvdmUgb3VyIGN1cnJlbnQgZWxlbWVudCB1cCB1bnRpbCB0aGVcclxuICAgICAgICAgICAgICogc3RhcnQgcmVnaW9uIHRhZyBhbmQgcmVuZGVyIHRoYXQgaW50byBhbiBIVE1MIGVsZW1lbnQuIFdlIHdpbGwgXHJcbiAgICAgICAgICAgICAqIHVzZSB0aGVzZSBlbGVtZW50cyB0byBkZXRlcm1pbmUgd2hlcmUgdG8gcGxhY2Ugb3VyIGN1cnJlbnQgZWxlbWVudC5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGxldCBzaWJsaW5nc0Fib3ZlOiBIVE1MRGl2RWxlbWVudCA9IHJlbmRlck1hcmtkb3duRnJvbUxpbmVzKGxpbmVzQWJvdmVBcnJheSwgc291cmNlUGF0aCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgc2libGluZ3NCZWxvdzogSFRNTERpdkVsZW1lbnQgPSByZW5kZXJNYXJrZG93bkZyb21MaW5lcyhsaW5lc0JlbG93QXJyYXksIHNvdXJjZVBhdGgpO1xyXG5cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIFNldCB1cCBvdXIgZG9tIG9iamVjdCB0byBiZSBhZGRlZCB0byB0aGUgbWFuYWdlci5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGxldCBjdXJyZW50T2JqZWN0OiBET01PYmplY3QgPSBuZXcgRE9NT2JqZWN0KGVsLCBsaW5lc09mRWxlbWVudClcclxuICAgICAgICAgICAgZWwuaWQgPSBjdXJyZW50T2JqZWN0LlVJRDtcclxuXHJcbiAgICAgICAgICAgIGN1cnJlbnRPYmplY3QgPSBUYXNrTGlzdERPTU9iamVjdC5jaGVja0ZvclRhc2tMaXN0RWxlbWVudChjdXJyZW50T2JqZWN0KVxyXG5cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIE5vdyB3ZSBhZGQgdGhlIG9iamVjdCB0byB0aGUgbWFuYWdlciBhbmQgdGhlbiBzZXR1cCB0aGVcclxuICAgICAgICAgICAgICogY2FsbGJhY2sgZm9yIHdoZW4gdGhlIG9iamVjdCBpcyByZW1vdmVkIGZyb20gdmlldyB0aGF0IHdpbGwgcmVtb3ZlIFxyXG4gICAgICAgICAgICAgKiB0aGUgaXRlbSBmcm9tIHRoZSBtYW5hZ2VyLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgcmVnaW9uYWxNYW5hZ2VyLmFkZE9iamVjdChzaWJsaW5nc0Fib3ZlLCBzaWJsaW5nc0JlbG93LCBjdXJyZW50T2JqZWN0KTtcclxuXHJcbiAgICAgICAgICAgIGxldCBlbGVtZW50TWFya2Rvd25SZW5kZXJlciA9IG5ldyBNYXJrZG93blJlbmRlckNoaWxkKGVsKTtcclxuICAgICAgICAgICAgZWxlbWVudE1hcmtkb3duUmVuZGVyZXIub251bmxvYWQgPSAoKSA9PiB7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYocmVnaW9uYWxDb250YWluZXIgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgbGV0IHJlZ2lvbmFsTWFuYWdlcjogUmVnaW9uTWFuYWdlciA9IHJlZ2lvbmFsQ29udGFpbmVyLmdldFJlZ2lvbigpO1xyXG4gICAgICAgICAgICAgICAgaWYocmVnaW9uYWxNYW5hZ2VyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gV2UgY2FuIGF0dGVtcHQgdG8gdXBkYXRlIHRoZSB2aWV3IGhlcmUgYWZ0ZXIgdGhlIGl0ZW0gaXMgcmVtb3ZlZFxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGJ1dCBuZWVkIHRvIGdldCB0aGUgaXRlbSdzIHBhcmVudCBlbGVtZW50IGJlZm9yZSByZW1vdmluZyBvYmplY3QgZnJvbSBtYW5hZ2VyLlxyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWdpb25SZW5kZXJEYXRhOiBNdWx0aUNvbHVtblJlbmRlckRhdGEgPSByZWdpb25hbE1hbmFnZXIuZ2V0UmVnaW9uUmVuZGVyRGF0YSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIucmVtb3ZlT2JqZWN0KGN1cnJlbnRPYmplY3QuVUlEKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAgICAgICAgICogTmVlZCB0byBjaGVjayBoZXJlIGlmIGVsZW1lbnQgaXMgbnVsbCBhcyB0aGlzIGNsb3N1cmUgd2lsbCBiZSBjYWxsZWRcclxuICAgICAgICAgICAgICAgICAgICAgKiByZXBlYXRlZGx5IG9uIGZpbGUgY2hhbmdlLlxyXG4gICAgICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKHJlZ2lvblJlbmRlckRhdGEucGFyZW50UmVuZGVyRWxlbWVudCA9PT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbmFsTWFuYWdlci5yZW5kZXJSZWdpb25FbGVtZW50c1RvU2NyZWVuKClcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgY3R4LmFkZENoaWxkKGVsZW1lbnRNYXJrZG93blJlbmRlcmVyKTtcclxuXHJcbiAgICAgICAgICAgIGxldCBlbGVtZW50VGV4dFNwYWNlZCA9IGxpbmVzT2ZFbGVtZW50LnJlZHVjZSgocHJldiwgY3VycikgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHByZXYgKyBcIlxcblwiICsgY3VycjtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBOb3cgd2UgY2hlY2sgaWYgb3VyIGN1cnJlbnQgZWxlbWVudCBpcyBhIHNwZWNpYWwgZmxhZyBzbyB3ZSBjYW5cclxuICAgICAgICAgICAgICogcHJvcGVybHkgc2V0IHRoZSBlbGVtZW50IHRhZyB3aXRoaW4gdGhlIHJlZ2lvbmFsIG1hbmFnZXIuXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBpZihtdWx0aUNvbHVtblBhcnNlci5jb250YWluc0VuZFRhZyhlbC50ZXh0Q29udGVudCkgPT09IHRydWUpIHtcclxuXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50T2JqZWN0LmVsZW1lbnRUeXBlID0gRWxlbWVudFJlbmRlclR5cGUudW5SZW5kZXJlZFxyXG4gICAgICAgICAgICAgICAgZWwuYWRkQ2xhc3MoTXVsdGlDb2x1bW5TdHlsZUNTUy5SZWdpb25FbmRUYWcpXHJcbiAgICAgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIudXBkYXRlRWxlbWVudFRhZyhjdXJyZW50T2JqZWN0LlVJRCwgRE9NT2JqZWN0VGFnLmVuZFJlZ2lvbik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSBpZihtdWx0aUNvbHVtblBhcnNlci5jb250YWluc0NvbEVuZFRhZyhlbGVtZW50VGV4dFNwYWNlZCkgPT09IHRydWUpIHtcclxuXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50T2JqZWN0LmVsZW1lbnRUeXBlID0gRWxlbWVudFJlbmRlclR5cGUudW5SZW5kZXJlZFxyXG4gICAgICAgICAgICAgICAgZWwuYWRkQ2xhc3MoTXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5FbmRUYWcpXHJcbiAgICAgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIudXBkYXRlRWxlbWVudFRhZyhjdXJyZW50T2JqZWN0LlVJRCwgRE9NT2JqZWN0VGFnLmNvbHVtbkJyZWFrKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIGlmKG11bHRpQ29sdW1uUGFyc2VyLmNvbnRhaW5zQ29sU2V0dGluZ3NUYWcoZWxlbWVudFRleHRTcGFjZWQpID09PSB0cnVlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgY3VycmVudE9iamVjdC5lbGVtZW50VHlwZSA9IEVsZW1lbnRSZW5kZXJUeXBlLnVuUmVuZGVyZWRcclxuICAgICAgICAgICAgICAgIGVsLmFkZENsYXNzKE11bHRpQ29sdW1uU3R5bGVDU1MuUmVnaW9uU2V0dGluZ3MpXHJcbiAgICAgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIgPSByZWdpb25hbENvbnRhaW5lci5zZXRSZWdpb25TZXR0aW5ncyhlbGVtZW50VGV4dFNwYWNlZClcclxuICAgICAgICAgICAgICAgIHJlZ2lvbmFsTWFuYWdlci51cGRhdGVFbGVtZW50VGFnKGN1cnJlbnRPYmplY3QuVUlELCBET01PYmplY3RUYWcucmVnaW9uU2V0dGluZ3MpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgZWwuYWRkQ2xhc3MoTXVsdGlDb2x1bW5TdHlsZUNTUy5SZWdpb25Db250ZW50KVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAg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BhcnNlci5maW5kU3RhcnRDb2RlYmxvY2soZmlsZVRleHQpO1xyXG4gICAgICAgICAgICB3aGlsZShjb2RlQmxvY2tEYXRhLmZvdW5kID09PSB0cnVlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGNvZGVibG9ja1RleHQgPSBmaWxlVGV4dC5zbGljZShjb2RlQmxvY2tEYXRhLnN0YXJ0UG9zaXRpb24sIGNvZGVCbG9ja0RhdGEuZW5kUG9zaXRpb24pO1xyXG4gICAgICAgICAgICAgICAgZmlsZVRleHQgPSBmaWxlVGV4dC5zbGljZShjb2RlQmxvY2tEYXRhLmVuZFBvc2l0aW9uKTtcclxuICAgICAgICAgICAgICAgIGNvZGVibG9ja1N0YXJ0QmxvY2tzLnB1c2goY29kZWJsb2NrVGV4dCk7XHJcblxyXG4gICAgICAgICAgICAgICAgY29kZUJsb2NrRGF0YSA9IG11bHRpQ29sdW1uUGFyc2VyLmZpbmRTdGFydENvZGVibG9jayhmaWxlVGV4dCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoYEVycm9yIGdldHRpbmcgZmlsZSBmcm9tIHNvdXJjZSBwYXRoOiAke3NvdXJjZVBhdGh9YClcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBpbkJsb2NrID0gZmFsc2U7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkb2NDaGlsZHJlbi5sZW5ndGg7IGkrKykge1xyXG5cclxuICAgICAgICAgICAgbGV0IGNoaWxkID0gZG9jQ2hpbGRyZW5baV07XHJcbiAgICAgICAgICAgIGlmIChjaGlsZCBpbnN0YW5jZW9mIEhUTUxFbGVtZW50KSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgY2hpbGRFbCA9IGNoaWxkIGFzIEhUTUxFbGVtZW50O1xyXG4gICAgICAgICAgICAgICAgaWYgKGluQmxvY2sgPT09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGZvdW5kQmxvY2tEYXRhID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlZ2lvbktleSA9IFwiXCI7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBibG9ja0RhdGEgPSBtdWx0aUNvbHVtblBhcnNlci5pc1N0YXJ0VGFnV2l0aElEKGNoaWxkLnRleHRDb250ZW50KTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoYmxvY2tEYXRhLmlzU3RhcnRUYWcgPT09IHRydWUpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIGFuIG9sZC1zdHlsZSBzdGFydCB0YWcuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kQmxvY2tEYXRhID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJsb2NrRGF0YS5oYXNLZXkgPT09IHRydWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZEtleSA9IG11bHRpQ29sdW1uUGFyc2VyLmdldFN0YXJ0VGFnS2V5KGNoaWxkLnRleHRDb250ZW50KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmb3VuZEtleSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lvbktleSA9IGZvdW5kS2V5O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoYmxvY2tEYXRhLmlzU3RhcnRUYWcgPT09IGZhbHNlICYmIHRoaXMuaXNTdGFydENvZGVibG9ja0luRXhwb3J0KGNoaWxkKSkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIHN0YXJ0IHRhZyBmcm9tIHRoZSBvbGQgdmVyc2lvbiBpcyBudWxsIHdlIHRoZW4gY2hlY2sgdG8gc2VlIGlmIHRoZSBlbGVtZW50IGlzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGEgY29kZWJsb2NrIHN0YXJ0LiBJZiBpdCBpcyB3ZSB1c2UgdGhlIG5leHQgYXZhaWxhYmxlIGNvZGVibG9jayBkYXRhIHRvIHJldHJpZXZlIG91ciBJRC5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGVibG9ja1RleHQgPSBjb2RlYmxvY2tTdGFydEJsb2Nrcy5zaGlmdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihjb2RlYmxvY2tUZXh0ID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJGb3VuZCB1bmRlZmluZWQgY29kZWJsb2NrIGRhdGEgd2hlbiBleHBvcnRpbmcuXCIpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IHBhcnNlU3RhcnRSZWdpb25Db2RlQmxvY2tJRChjb2RlYmxvY2tUZXh0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWQgIT09IFwiXCIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kQmxvY2tEYXRhID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lvbktleSA9IGlkO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZihmb3VuZEJsb2NrRGF0YSA9PT0gdHJ1ZSAmJiByZWdpb25LZXkgIT09IFwiXCIpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGluQmxvY2sgPSB0cnVlO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IGNoaWxkLmNoaWxkcmVuLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZC5jaGlsZHJlbltpXS5kZXRhY2goKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGlsZC5pbm5lclRleHQgPSBcIlwiO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGQuY2xhc3NMaXN0LmFkZChNdWx0aUNvbHVtbkxheW91dENTUy5SZWdpb25Sb290Q29udGFpbmVyRGl2KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlbmRlckVycm9yUmVnaW9uID0gY2hpbGQuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuUmVnaW9uRXJyb3JDb250YWluZXJEaXZ9LCAke011bHRpQ29sdW1uU3R5bGVDU1MuUmVnaW9uRXJyb3JNZXNzYWdlfWAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVuZGVyQ29sdW1uUmVnaW9uID0gY2hpbGQuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogTXVsdGlDb2x1bW5MYXlvdXRDU1MuUmVnaW9uQ29udGVudENvbnRhaW5lckRpdlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVnaW9uYWxDb250YWluZXI6IFJlZ2lvbk1hbmFnZXJDb250YWluZXIgPSBmaWxlRE9NTWFuYWdlci5nZXRSZWdpb25hbENvbnRhaW5lcihyZWdpb25LZXkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVnaW9uYWxDb250YWluZXIgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbmRlckVycm9yUmVnaW9uLmlubmVyVGV4dCA9IFwiRXJyb3IgcmVuZGVyaW5nIG11bHRpLWNvbHVtbiByZWdpb24uXFxuUGxlYXNlIGNsb3NlIGFuZCByZW9wZW4gdGhlIGZpbGUsIHRoZW4gbWFrZSBzdXJlIHlvdSBhcmUgaW4gcmVhZGluZyBtb2RlIGJlZm9yZSBleHBvcnRpbmcuXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVnaW9uYWxNYW5hZ2VyOiBSZWdpb25NYW5hZ2VyID0gcmVnaW9uYWxDb250YWluZXIuZ2V0UmVnaW9uKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIuZXhwb3J0UmVnaW9uRWxlbWVudHNUb1BERihyZW5kZXJDb2x1bW5SZWdpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtdWx0aUNvbHVtblBhcnNlci5jb250YWluc0VuZFRhZyhjaGlsZC50ZXh0Q29udGVudCkgPT09IHRydWUpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGluQmxvY2sgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGNoaWxkcmVuVG9SZW1vdmUucHVzaChjaGlsZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGNoaWxkcmVuVG9SZW1vdmUuZm9yRWFjaChjaGlsZCA9PiB7XHJcbiAgICAgICAgICAgIGlmKGNoaWxkLnBhcmVudEVsZW1lbnQgPT09IGVsKSB7XHJcbiAgICAgICAgICAgICAgICBlbC5yZW1vdmVDaGlsZChjaGlsZCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBjaGVja0V4cG9ydGluZyhlbGVtZW50OiBIVE1MRWxlbWVudCk6IGJvb2xlYW4ge1xyXG5cclxuICAgICAgICBpZihlbGVtZW50ID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmKGVsZW1lbnQuY2xhc3NMaXN0LmNvbnRhaW5zKFwicHJpbnRcIikpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZihlbGVtZW50LnBhcmVudE5vZGUgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2hlY2tFeHBvcnRpbmcoZWxlbWVudC5wYXJlbnRFbGVtZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBzZXR1cE1hcmtkb3duQ29kZWJsb2NrUG9zdFByb2Nlc3NvcihzdGFydFN0cjogc3RyaW5nKSB7XHJcblxyXG4gICAgICAgIHRoaXMucmVnaXN0ZXJNYXJrZG93bkNvZGVCbG9ja1Byb2Nlc3NvcihzdGFydFN0ciwgKHNvdXJjZSwgZWwsIGN0eCkgPT4ge1xyXG5cclxuICAgICAgICAgICAgaWYodGhpcy5zZXR0aW5ncy5yZW5kZXJPbk1vY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AgICAgICAgICAgICAgIC8vIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIFxyXG4gICAgICAgICAgICBpZih0aGlzLmdsb2JhbE1hbmFnZXIgPT09IG51bGwgfHwgdGhpcy5nbG9iYWxNYW5hZ2VyID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIC8vIGNvbnNvbGUubG9nKFwiR2xvYmFsIG1hbmFnZXIgaXMgdW5kZWZpbmVkP1wiKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IGZpbGVET01NYW5hZ2VyID0gdGhpcy5nbG9iYWxNYW5hZ2VyLmdldEZpbGVNYW5hZ2VyKHNvdXJjZVBhdGgpO1xyXG4gICAgICAgICAgICBpZihmaWxlRE9NTWFuYWdlciA9PT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAvLyBTZXQgZmlsZSB0byBoYXZlIHN0YXJ0IHRhZy5cclxuICAgICAgICAgICAgZmlsZURPTU1hbmFnZXIuc2V0SGFzU3RhcnRUYWcoKTtcclxuICAgICAgICBcclxuICAgICAgICAgICAgLy8gR2V0IHRoZSBpbmZvIGZvciBvdXIgY3VycmVudCBjb250ZXh0IGFuZCB0aGVuIGNoZWNrXHJcbiAgICAgICAgICAgIC8vIGlmIHRoZSBlbnRpcmUgdGV4dCBjb250YWlucyBhIHN0YXJ0IHRhZy4gSWYgdGhlcmUgaXNcclxuICAgICAgICAgICAgLy8gbm8gc3RhcnQgdGFnIGluIHRoZSBkb2N1bWVudCB3ZSBjYW4ganVzdCByZXR1cm4gYW5kXHJcbiAgICAgICAgICAgIC8vIGlnbm9yZSB0aGUgcmVzdCBvZiB0aGUgcGFyc2luZy5cclxuICAgICAgICAgICAgbGV0IGluZm8gPSBjdHguZ2V0U2VjdGlvbkluZm8oZWwpO1xyXG4gICAgICAgIFxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogV2UgbmVlZCB0aGUgY29udGV4dCBpbmZvIHRvIHByb3Blcmx5IHBhcnNlIHNvIHJldHVybmluZyBoZXJlIFxyXG4gICAgICAgICAgICAgKiBpbmZvIGlzIG51bGwuIFRPRE86IFNldCBlcnJvciBpbiB2aWV3IGlmIHRoaXMgb2NjdXJzLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgaWYoIWluZm8pIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIFxyXG4gICAgICAgICAgICAvKiogXHJcbiAgICAgICAgICAgICAqIFNldCB1cCB0aGUgY3VycmVudCBlbGVtZW50IHRvIGFjdCBhcyB0aGUgcGFyZW50IGZvciB0aGUgXHJcbiAgICAgICAgICAgICAqIG11bHRpLWNvbHVtbiByZWdpb24uXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBlbC5jbGFzc0xpc3QuYWRkKE11bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvblJvb3RDb250YWluZXJEaXYpXHJcbiAgICAgICAgICAgIGxldCByZW5kZXJFcnJvclJlZ2lvbiA9IGVsLmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvbkVycm9yQ29udGFpbmVyRGl2fSAke011bHRpQ29sdW1uU3R5bGVDU1MuUmVnaW9uRXJyb3JNZXNzYWdlfWAsXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBsZXQgcmVuZGVyQ29sdW1uUmVnaW9uID0gZWwuY3JlYXRlRGl2KHtcclxuICAgICAgICAgICAgICAgIGNsczogTXVsdGlDb2x1bW5MYXlvdXRDU1MuUmVnaW9uQ29udGVudENvbnRhaW5lckRpdlxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgIFxyXG4gICAgICAgICAgICBsZXQgcmVnaW9uS2V5ID0gcGFyc2VTdGFydFJlZ2lvbkNvZGVCbG9ja0lEKHNvdXJjZSk7XHJcbiAgICAgICAgXHJcbiAgICAgICAgICAgIGxldCBjcmVhdGVOZXdSZWdpb25NYW5hZ2VyID0gdHJ1ZTtcclxuICAgICAgICAgICAgaWYoZmlsZURPTU1hbmFnZXIuY2hlY2tLZXlFeGlzdHMocmVnaW9uS2V5KSA9PT0gdHJ1ZSkge1xyXG4gICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICBjcmVhdGVOZXdSZWdpb25NYW5hZ2VyID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBsZXQgeyBudW1iZXJPZlRhZ3MsIGtleXMgfSA9IG11bHRpQ29sdW1uUGFyc2VyLmNvdW50U3RhcnRUYWdzKGluZm8udGV4dCk7XHJcbiAgICAgICAgXHJcbiAgICAgICAgICAgICAgICBsZXQgbnVtTWF0Y2hlcyA9IDA7XHJcbiAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgbnVtYmVyT2ZUYWdzOyBpKyspIHtcclxuICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAvLyBCZWNhdXNlIHdlIGNoZWNrZWQgaWYga2V5IGV4aXN0cyBvbmUgb2YgdGhlc2UgaGFzIHRvIG1hdGNoLlxyXG4gICAgICAgICAgICAgICAgICAgIGlmKGtleXNbaV0gPT09IHJlZ2lvbktleSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBudW1NYXRjaGVzKys7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgIFxyXG4gICAgICAgICAgICAgICAgLy8gV2Ugb25seSB3YW50IHRvIGRpc3BsYXkgYW4gZXJyb3IgaWYgdGhlcmUgYXJlIG1vcmUgdGhhbiAyIG9mIHRoZSBzYW1lIGlkIGFjcm9z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2Rvd25SZW5kZXJlci5vbnVubG9hZCA9ICgpID0+IHtcclxuICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICBpZihmaWxlRE9NTWFuYWdlciAmJiBmaWxlU3RpbGxJblZpZXcoc291cmNlUGF0aCkgPT09IGZhbHNlKSB7XHJcbiAgICAgICAgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbnNvbGUuZGVidWcoXCJGaWxlIG5vdCBpbiBhbnkgbWFya2Rvd24gbGVhZi4gUmVtb3ZpbmcgcmVnaW9uIGZyb20gZG9tIG1hbmFnZXIuXCIpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVET01NYW5hZ2VyLnJlbW92ZVJlZ2lvbihyZWdpb25LZXkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICBjdHguYWRkQ2hpbGQoZWxlbWVudE1hcmtkb3duUmVuZGVyZXIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgXHJcbiAgICAgICAgICAgIGxldCByZWdpb25hbE1hbmFnZXJDb250YWluZXIgPSBmaWxlRE9NTWFuYWdlci5nZXRSZWdpb25hbENvbnRhaW5lcihyZWdpb25LZXkpO1xyXG4gICAgICAgICAgICBpZihyZWdpb25hbE1hbmFnZXJDb250YWluZXIgIT09IG51bGwpIHtcclxuICAgICAgICBcclxuICAgICAgICAgICAgICAgIGxldCByZWdpb25hbE1hbmFnZXIgPSByZWdpb25hbE1hbmFnZXJDb250YWluZXIuc2V0UmVnaW9uU2V0dGluZ3Moc291cmNlKTtcclxuICAgICAgICAgICAgICAgIHJlZ2lvbmFsTWFuYWdlci5yZWdpb25QYXJlbnQgPSBlbDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pXHJcbiAgICB9XHJcblxyXG4gICAgYXN5bmMgbG9hZFNldHRpbmdzKCkge1xyXG5cclxuXHRcdHRoaXMuc2V0dGluZ3MgPSBPY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GlzQm9yZGVyRHJhd24gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoaXNCb3JkZXJEcmF3bikge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIChCb3JkZXJPcHRpb24uZGlzYWJsZWQpOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIChCb3JkZXJPcHRpb24ub2ZmKTpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAoQm9yZGVyT3B0aW9uLmZhbHNlKTpcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlZFNldHRpbmdzLmRyYXdCb3JkZXIgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHNldHRpbmdzRGF0YSA9IGdldFNldHRpbmdzRGF0YUZyb21LZXlzKHNldHRpbmdzTGluZSwgRFJBV19TSEFET1dfUkVHRVhfQVJSKVxuICAgICAgICBpZiAoc2V0dGluZ3NEYXRhICE9PSBudWxsKSB7XG5cbiAgICAgICAgICAgIGxldCBpc1NoYWRvd0RyYXduOiBTaGFkb3dPcHRpb24gPSAoPGFueT5TaGFkb3dPcHRpb24pW3NldHRpbmdzRGF0YV07XG4gICAgICAgICAgICBpZiAoaXNTaGFkb3dEcmF3biAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChpc1NoYWRvd0RyYXduKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgKFNoYWRvd09wdGlvbi5kaXNhYmxlZCk6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgKFNoYWRvd09wdGlvbi5vZmYpOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIChTaGFkb3dPcHRpb24uZmFsc2UpOlxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VkU2V0dGluZ3MuZHJhd1NoYWRvdyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc2V0dGluZ3NEYXRhID0gZ2V0U2V0dGluZ3NEYXRhRnJvbUtleXMoc2V0dGluZ3NMaW5lLCBBVVRPX0xBWU9VVF9SRUdFWF9BUlIpXG4gICAgICAgIGlmIChzZXR0aW5nc0RhdGEgIT09IG51bGwpIHtcblxuICAgICAgICAgICAgaWYoc2V0dGluZ3NEYXRhID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgICAgIHBhcnNlZFNldHRpbmdzLmF1dG9MYXlvdXQgPSB0cnVlXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBzZXR0aW5nc0RhdGEgPSBnZXRTZXR0aW5nc0RhdGFGcm9tS2V5cyhzZXR0aW5nc0xpbmUsIENPTFVNTl9TUEFDSU5HX1JFR0VYX0FSUik7XG4gICAgICAgIGlmKHNldHRpbmdzRGF0YSAhPT0gbnVsbCkge1xuXG4gICAgICAgICAgICBsZXQgcGFyc2VkID0gZ2V0TGVuZ3RoVW5pdChzZXR0aW5nc0RhdGEudHJpbSgpKTtcbiAgICAgICAgICAgIGxldCBzcGFjaW5nU3RyID0gXCJcIjtcblxuICAgICAgICAgICAgaWYocGFyc2VkLmlzVmFsaWQpIHtcblxuICAgICAgICAgICAgICAgIGxldCBub1VuaXRzU3RyID0gc2V0dGluZ3NEYXRhLnJlcGxhY2UocGFyc2VkLnVuaXRTdHIsIFwiXCIpLnRyaW0oKTtcbiAgICAgICAgICAgICAgICBsZXQgbm9Vbml0c051bSA9IHBhcnNlSW50KG5vVW5pdHNTdHIpO1xuICAgICAgICAgICAgICAgIGlmKGlzTmFOKG5vVW5pdHNOdW0pID09PSBmYWxzZSkge1xuXG4gICAgICAgICAgICAgICAgICAgIHNwYWNpbmdTdHIgPSBgJHtub1VuaXRzU3RyfSR7cGFyc2VkLnVuaXRTdHJ9YFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGxldCBub1VuaXRzTnVtID0gcGFyc2VJbnQoc2V0dGluZ3NEYXRhLnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgaWYoaXNOYU4obm9Vbml0c051bSkgPT09IGZhbHNlKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgc3BhY2luZ1N0ciA9IGAke25vVW5pdHNOdW19cHRgXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBwYXJzZWRTZXR0aW5ncy5jb2x1bW5TcGFjaW5nID0gc3BhY2luZ1N0cjtcbiAgICAgICAgfVxuXG4gICAgICAgIHNldHRpbmdzRGF0YSA9IGdldFNldHRpbmdzRGF0YUZyb21LZXlzKHNldHRpbmdzTGluZSwgQ09OVEVOVF9PVkVSRkxPV19SRUdFWF9BUlIpO1xuICAgICAgICBpZihzZXR0aW5nc0RhdGEgIT09IG51bGwpIHtcblxuICAgICAgICAgICAgbGV0IG92ZXJmbG93VHlwZSA9IENvbnRlbnRPdmVyZmxvd1R5cGUuc2Nyb2xsO1xuXG4gICAgICAgICAgICBzZXR0aW5nc0RhdGEgPSBzZXR0aW5nc0RhdGEudG9Mb3dlckNhc2UoKS50cmltKCk7XG4gICAgICAgICAgICBpZihzZXR0aW5nc0RhdGEgPT09IFwiaGlkZGVuXCIpIHtcbiAgICAgICAgICAgICAgICBvdmVyZmxvd1R5cGUgPSBDb250ZW50T3ZlcmZsb3dUeXBlLmhpZGRlbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcGFyc2VkU2V0dGluZ3MuY29udGVudE92ZXJmbG93ID0gb3ZlcmZsb3dUeXBlO1xuICAgICAgICB9XG4gICAgICAgIHNldHRpbmdzRGF0YSA9IGdldFNldHRpbmdzRGF0YUZyb21LZXlzKHNldHRpbmdzTGluZSwg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gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXj09PVxcXFxzKj9icmVhay1jb2x1bW5cXFxccyo/PT09XFxcXHMqPyRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIl4tLS1cXFxccyo/Y29sdW1uLWVuZFxcXFxzKj8tLS1cXFxccyo/JFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXi0tLVxcXFxzKj9lbmQtY29sdW1uXFxcXHMqPy0tLVxcXFxzKj8kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJeLS0tXFxcXHMqP2NvbHVtbi1icmVha1xcXFxzKj8tLS1cXFxccyo/JFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXi0tLVxcXFxzKj9icmVhay1jb2x1bW5cXFxccyo/LS0tXFxcXHMqPyRcIl07XG5jb25zdCBDT0xfUkVHRVhfQVJSOiBSZWdFeHBbXSA9IFtdO1xuZm9yKGxldCBpID0gMDsgaSA8IENPTF9SRUdFWF9TVFJTLmxlbmd0aDsgaSsrKSB7XG4gICAgQ09MX1JFR0VYX0FSUi5wdXNoKG5ldyBSZWdFeHAoQ09MX1JFR0VYX1NUUlNbaV0pKTtcbn1cbmV4cG9ydCBmdW5jdGlvbiBjb250YWluc0NvbEVuZFRhZyh0ZXh0OiBzdHJpbmcpOiBib29sZWFuIHtcblxuICAgIGxldCBmb3VuZCA9IGZhbHNlO1xuICAgIGZvcihsZXQgaSA9IDA7IGk8IENPTF9SRUdFWF9BUlIubGVuZ3RoOyBpKyspIHtcblxuICAgICAgICBpZihDT0xfUkVHRVhfQVJSW2ldLnRlc3QodGV4dCkpIHtcbiAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIGZvdW5kO1xufVxuXG5jb25zdCBJTk5FUl9DT0xfRU5EX1JFR0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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIj0gKmVuZC1jb2x1bW4gKj1cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIj0gKmNvbHVtbi1icmVhayAqPVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiPSAqYnJlYWstY29sdW1uICo9XCJdXG5jb25zdCBDT0xfRUxFTUVOVF9JTk5FUl9URVhUX1JFR0VYX0FSUjogUmVnRXhwW10gPSBbXTtcbmZvcihsZXQgaSA9IDA7IGkgPCBDT0xfRUxFTUVOVF9JTk5FUl9URVhUX1JFR0VYX1NUUlMubGVuZ3RoOyBpKyspIHtcbiAgICBDT0xfRUxFTUVOVF9JTk5FUl9URVhUX1JFR0VYX0FSUi5wdXNoKG5ldyBSZWdFeHAoQ09MX0VMRU1FTlRfSU5ORVJfVEVYVF9SRUdFWF9TVFJTW2ldKSk7XG59XG5leHBvcnQgZnVuY3Rpb24gZWxJbm5lclRleHRDb250YWluc0NvbEVuZFRhZyh0ZXh0OiBzdHJpbmcpOiBib29sZWFuIHtcblxuICAgIGxldCBmb3VuZCA9IGZhbHNlO1xuICAgIGZvcihsZXQgaSA9IDA7IGk8IENPTF9FTEVNRU5UX0lOTkVSX1RFWFRfUkVHRVhfQVJSLmxlbmd0aDsgaSsrKSB7XG5cbiAgICAgICAgaWYoQ09MX0VMRU1FTlRfSU5ORVJfVEVYVF9SRUdFWF9BUlJbaV0udGVzdCh0ZXh0KSkge1xuICAgICAgICAgICAgZm91bmQgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gZm91bmQ7XG59XG5cbmNvbnN0IENPTF9TRVRUSU5HU19SRUdFWF9TVFJTID0gW1wiYGBgc2V0dGluZ3NcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAg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mRJbmRleCwgdGV4dC5sZW5ndGgpO1xuICAgICAgICAgICAgaWYoc3RhcnRJbmRleCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIC8vIGNvbnNvbGUuZGVidWcoXCJjb2x1bW4gYnJlYWsgYXQgc3RhcnQgb2YgZWxlbWVudC5cIilcbiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnRJc0NvbHVtbkJyZWFrID0gRWxlbWVudENvbHVtbkJyZWFrVHlwZS5wcmVCcmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYoZW5kSW5kZXggPT09IHRleHQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgLy8gY29uc29sZS5kZWJ1ZyhcIkNvbHVtbiBicmVhayBhdCBlbmQgb2YgZWxlbWVudC5cIilcbiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnRJc0NvbHVtbkJyZWFrID0gRWxlbWVudENvbHVtbkJyZWFrVHlwZS5wb3N0QnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmRlYnVnKFwiQ29sdW1uIGJyZWFrIGluIHRoZSBtaWRkbGUgb2YgZWxlbWVudD9cIilcbiAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnRJc0NvbHVtbkJyZWFrID0gRWxlbWVudENvbHVtbkJyZWFrVHlwZS5taWRCcmVhaztcblxuICAgICAgICAgICAgICAgIGNvbnN0IEVSUk9SX0NPTE9SX0NTUyA9IFwibWNtLWVycm9yLW1lc3NhZ2UtY29sb3JcIjtcbiAgICAgICAgICAgICAgICBjb25zdCBDRU5URVJfQUxJR05fU1BBTl9DU1MgPSBcIm1jbS1zcGFuLWNvbnRlbnQtYWxpZ25tZW50LWNlbnRlclwiO1xuICAgICAgICAgICAgICAgIGlmKHBhcmFncmFwaCkge1xuICAgICAgICAgICAgICAgICAgICBwYXJhZ3JhcGguaW5uZXJIVE1MID0gYCR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uXG4gICAgICAgIGlmKHRoaXMuY2hlY2tib3hFbGVtZW50cy5oYXMoaW5kZXgpID09PSBmYWxzZSkge1xuXG4gICAgICAgICAgICBpZihpbmRleCA8IHRoaXMub3JpZ2luYWxDaGVja2JveGVzLmxlbmd0aCkge1xuXG4gICAgICAgICAgICAgICAgbGV0IG9yaWdpbmFsSW5wdXQgPSB0aGlzLm9yaWdpbmFsQ2hlY2tib3hlc1tpbmRleF0/LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ3Rhc2stbGlzdC1pdGVtLWNoZWNrYm94JylcbiAgICAgICAgICAgICAgICBpZihvcmlnaW5hbElucHV0Py5sZW5ndGggPT09IDEpIHtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNoZWNrYm94RWxlbWVudHMuc2V0KGluZGV4LCAob3JpZ2luYWxJbnB1dFswXSBhcyBIVE1MSW5wdXRFbGVtZW50KSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJDb3VsZCBub3QgZmluZCBjaGVja2JveCBlbGVtZW50IHRvIHJldHVybi5cIiwgdGhpcy5vcmlnaW5hbENoZWNrYm94ZXMsIGluZGV4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXMuY2hlY2tib3hFbGVtZW50cy5nZXQoaW5kZXgpO1xuICAgIH1cblxuICAgIHN0YXRpYyBjaGVja0ZvclRhc2tMaXN0RWxlbWVudChkb21FbGVtZW50OiBET01PYmplY3QpIHtcblxuICAgICAgICBpZihkb21FbGVtZW50Lm9yaWdpbmFsRWxlbWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKFwidGFzay1saXN0LWl0ZW1cIikubGVuZ3RoID4gMCApIHtcblxuICAgICAgICAgICAgcmV0dXJuIG5ldyBUYXNrTGlzdERPTU9iamVjdChkb21Fb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mVnaW9uQ29udGVudCA9IFwibWNtLWNvbHVtbi1jb250ZW50LXdyYXBwZXJcIixcbiAgICBSZWdpb25FbmRUYWcgPSBcIm1jbS1jb2x1bW4tZW5kLXRhZy13cmFwcGVyXCIsXG4gICAgQ29sdW1uRW5kVGFnID0gXCJtY20tY29sdW1uLWJyZWFrLXRhZy13cmFwcGVyXCIsXG4gICAgUmVnaW9uU2hhZG93ID0gXCJtY20tcmVnaW9uLXNoYWRvd1wiLFxuICAgIENvbHVtblNoYWRvdyA9IFwibWNtLWNvbHVtbi1zaGFkb3dcIixcbiAgICBDb2x1bW5Cb3JkZXIgPSBcIm1jbS1jb2x1bW4tYm9yZGVyXCIsXG4gICAgQ29sdW1uQ29udGVudCA9IFwibWNtLWNvbHVtbi1kaXZcIlxufSIsIi8qKlxuICogRmlsZTogL3NyYy9kb21fbWFuYWdlci9yZWdpb25hbF9tYW5hZ2Vycy9SZWdpb25NYW5hZ2VyLnRzICAgICAgICAgICAgICAgICAgICpcbiAqIENyZWF0ZWQgRGF0ZTogU3VuZGF5LCBNYXkgMjJuZCAyMDIyLCA3OjQ5IHBtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKiBBdXRob3I6IENhbWVyb24gUm9iaW5zb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqIENvcHlyaWdodCAoYykgMjAyMiBDYW1lcm9uIFJvYmluc29uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKi9cblxuaW1wb3J0IHsgRE9NT2JqZWN0LCBET01PYmplY3RUYWcsIFRhc2tMaXN0RE9NT2JqZWN0IH0gZnJvbSAnLi4vZG9tT2JqZWN0JztcbmltcG9ydCB7IE11bHRpQ29sdW1uU2V0dGluZ3MsIENvbHVtbk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uZC5cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgbGV0IHByZXZTaWJsaW5nSW5uZXJUZXh0ID0gXCJcIlxuICAgICAgICAgICAgbGV0IHByZXZTaWJsaW5nT2Zmc2V0ID0gMDtcbiAgICAgICAgICAgIGZvcihsZXQgaSA9IHNpYmxpbmdzQWJvdmUuY2hpbGRyZW4ubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcblxuICAgICAgICAgICAgICAgIGxldCBvYmogPSBzaWJsaW5nc0Fib3ZlLmNoaWxkcmVuW2ldIGFzIEhUTUxFbGVtZW50O1xuICAgICAgICAgICAgICAgIGlmKG9iai5pbm5lclRleHQgIT09IFwiXCIpIHtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgcHJldlNpYmxpbmdJbm5lclRleHQgPSBvYmouaW5uZXJUZXh0O1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBwcmV2U2libGluZ09mZnNldCsrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gdGhpcy5kb21MaXN0Lmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZG9tTGlzdFtpXS5ub2RlS2V5ID09PSBwcmV2U2libGluZ0lubmVyVGV4dCkge1xuICAgICAgICAgICAgICAgICAgICBhZGRBdEluZGV4ID0gaSArIDEgKyBwcmV2U2libGluZ09mZnNldDtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGV0IG5leHRFbEluZGV4ID0gYWRkQXRJbmRleDtcbiAgICAgICAgbGV0IG5leHRPYmpUZXh0ID0gXCJcIjtcbiAgICAgICAgaWYgKG5leHRPYmogIT09IHVuZGVmaW5lZCkge1xuXG4gICAg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AgICAgLy8gY2hlY2tib3ggdG8gcmVwbGFjZSBpdCBhbmQgc2V0IGl0IHVwIHRvIGZpcmUgdGhlIGNsaWNrIGV2ZW50IG9uXG4gICAgICAgICAgICAvLyB0aGUgb3JpZ2luYWwgY2hlY2tib3ggc28gZnVuY3Rpb25hbGl0eSBpcyByZXN0b3JlZC5cbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3JpZ2luYWxMaXN0Q2hlY2tib3hlcy5sZW5ndGg7IGkrKykge1xuXG4gICAgICAgICAgICAgICAgY29uc3QgY2hlY2tib3ggPSBjcmVhdGVFbCgnaW5wdXQnKTtcblxuICAgICAgICAgICAgICAgIGxldCBvcmlnaW5hbElucHV0ID0gZG9tRWxlbWVudC5nZXRDaGVja2JveEVsZW1lbnQoaSk7XG4gICAgICAgICAgICAgICAgY2hlY2tib3guY2hlY2tlZCA9IG9yaWdpbmFsSW5wdXQ/LmNoZWNrZWQ7XG4gICAgICAgICAgICAgICAgY2xvbmVkTGlzdENoZWNrYm94ZXNbaV0ucmVwbGFjZUNoaWxkKGNoZWNrYm94LCBUYXNrTGlzdERPTU9iamVjdC5nZXRDaGlsZENoZWNrYm94KGNsb25lZExpc3RDaGVja2JveGVzW2ldKSk7XG5cbiAgICAgICAgICAgICAgICBjaGVja2JveC5hZGRDbGFzcygndGFzay1saXN0LWl0ZW0tY2hlY2tib3gnKTtcbiAgICAgICAgICAgICAgICBjaGVja2JveC50eXBlID0gJ2NoZWNrYm94JztcbiAgICAgICAgICAgICAgICBjaGVja2JveC5vbkNsaWNrRXZlbnQoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBkb21FbGVtZW50LmNoZWNrYm94Q2xpY2tlZChpKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcblxuICAgICAgICAgICAgLy8gV2hlbmV2ZXIgd2UgcmVhY2ggdGhpcyBwb2ludCB3ZSB1cGRh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BpZihkb21FbGVtZW50LmVsZW1lbnRUeXBlID09PSBFbGVtZW50UmVuZGVyVHlwZS5jYW52YXNSZW5kZXJFbGVtZW50ICYmIFxuICAgICAgICAgICBkb21FbGVtZW50LmNhbnZhc1JlYWR5Rm9yVXBkYXRlKCkpIHtcblxuICAgICAgICAgICAgLy8gY29uc29sZS5sb2coXCJVcGRhdGluZyBjYW52YXMgcmUtcmVuZGVyXCIpXG4gICAgICAgICAgICBjb250YWluZXJFbGVtZW50LmFwcGVuZENoaWxkKG9yaWdpbmFsRWxlbWVudCk7XG4gICAgICAgICAgICBpZihjbG9uZWRFbGVtZW50ICE9PSBudWxsICYmIGNsb25lZEVsZW1lbnQucGFyZW50RWxlbWVudCA9PT0gY29udGFpbmVyRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lckVsZW1lbnQucmVtb3ZlQ2hpbGQoY2xvbmVkRWxlbWVudCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNsb25lQ2FudmFzKG9yaWdpbmFsQ2FudmFzOiBIVE1MQ2FudmFzRWxlbWVudCk6IEhUTUxDYW52YXNFbGVtZW50IHtcblxuICAgICAgICAgICAgICAgIC8vY3JlYXRlIGEgbmV3IGNhbnZhc1xuICAgICAgICAgICAgICAgIGxldCBjbG9uZWRDYW52YXM6IEhUTUxDYW52YXNFbGVtZW50ID0gb3JpZ2luYWxDYW52YXMuY2xvbmVOb2RlKHRydWUpIGFzIEhUTUxDYW52YXNFbGVtZW50O1xuICAgICAgICAgICAgICAgIGxldCBjb250ZXh0OiBDYW52YXNSZW5kZXJpbmdDb250ZXh0MkQgPSBjbG9uZWRDYW52YXMuZ2V0Q29udGV4dCgnMmQnKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vc2V0IGRpbWVuc2lvbnNcbiAgICAgICAgICAgICAgICBjbG9uZWRDYW52YXMud2lkdGggPSBvcmlnaW5hbENhbnZhcy53aWR0aDtcbiAgICAgICAgICAgICAgICBjbG9uZWRDYW52YXMuaGVpZ2h0ID0gb3JpZ2luYWxDYW52YXMuaGVpZ2h0O1xuXG4gICAgICAgICAgICAgICAgaWYoY2xvbmVkQ2FudmFzLndpZHRoID09PSAwIHx8IGNsb25lZENhbnZhcy5oZWlnaHQgPT09IDApe1xuICAgICAgICAgICAgICAgICAgICAvLyBEb250IHdhbnQgdG8gcmVuZGVyIGlmIHRoZSB3aWR0aCBpcyAwIGFzIGl0IHRocm93cyBhbiBlcnJvclxuICAgICAgICAgICAgICAgICAgICAvLyB3b3VsZCBoYXBwZW4gaWYgdGhlIG9sZCBjYW52YXMgaGFzbnQgYmVlbiByZW5kZXJlZCB5ZXQuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjbG9uZWRDYW52YXM7XG4gICAgICAgICAgICAgICAgfSBcblxuICAgICAgICAgICAgICAgIC8vYXBwbHkgdGhlIG9sZCBjYW52YXMgdG8gdGhlIG5ldyBvbmVcbiAgICAgICAgICAgICAgICBjb250ZXh0LmRyYXdJbWFnZShvcmlnaW5hbENhbnZhcywgMCwgMCk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAvL3JldHVybiB0aGUgbmV3IGNhbnZhc1xuICAgICAgICAgICAgICAgIHJldHVybiBjbG9uZWRDYW52YXM7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBjYW52YXMgPSBzZWFyY2hDaGlsZHJlbkZvck5vZGVUeXBlKG9yaWdpbmFsRWxlbWVudCwgXCJjYW52YXNcIik7XG4gICAgICAgICAgICBpZihjYW52YXMgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBkb21FbGVtZW50LnVwZGF0ZUNsb25lZEVsZW1lbnQob3JpZ2luYWxFbGVtZW50LmNsb25lTm9kZSh0cnVlKSBhcyBIVE1MRGl2RWxlbWVudCk7XG4gICAgICAgICAgICAgICAgY2xvbmVkRWxlbWVudCA9IGRvbUVsZW1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iAgICAgICAgICAgIGNsb25lZEVsZW1lbnQucmVtb3ZlQ2xhc3NlcyhbTXVsdGlDb2x1bW5TdHlsZUNTUy5SZWdpb25Db250ZW50LCBNdWx0aUNvbHVtbkxheW91dENTUy5PcmlnaW5hbEVsZW1lbnRUeXBlXSk7XG4gICAgXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gY29udGFpbmVyRWxlbWVudC5jaGlsZHJlbi5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lckVsZW1lbnQuY2hpbGRyZW5baV0uZGV0YWNoKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb250YWluZXJFbGVtZW50LmFwcGVuZENoaWxkKG9yaWdpbmFsRWxlbWVudCk7XG4gICAgICAgICAgICBjb250YWluZXJFbGVtZW50LmFwcGVuZENoaWxkKGNsb25lZEVsZW1lbnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gY2xvbmVFbGVtZW50KCkge1xuICAgICAgICAgICAgZG9tRWxlbWVudC51cGRhdGVDbG9uZWRFbGVtZW50KG9yaWdpbmFsRWxlbWVudC5jbG9uZU5vZGUodHJ1ZSkgYXMgSFRNTERpdkVsZW1lbnQpO1xuICAgICAgICAgICAgY2xvbmVkRWxlbWVudCA9IGRvbUVsZW1lbnQuY2xvbmVkRWxlbWVudDtcblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBJZiB3ZSB1cGRhdGVkIHRoZSBjbG9uZWQgZWxlbWVudCwgd2Ugd2FudCB0byBhbHNvIHVwZGF0ZSB0aGVcbiAgICAgICAgICAgICAqIGVsZW1lbnQgcmVuZGVyZWQgaW4gdGhlIHBhcmVudCBjb250YWluZXIuXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIGZvciAobGV0IGkgPSBjb250YWluZXJFbGVtZW50LmNoaWxkcmVuLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAg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gIGdldENvbHVtbkNvbnRlbnREaXZzKHNldHRpbmdzOiBNdWx0aUNvbHVtblNldHRpbmdzLCBtdWx0aUNvbHVtblBhcmVudDogSFRNTERpdkVsZW1lbnQpOiBIVE1MRGl2RWxlbWVudFtdIHtcblxuICAgICAgICBsZXQgY29sdW1uQ29udGVudERpdnM6IEhUTUxEaXZFbGVtZW50W10gPSBbXVxuICAgICAgICBsZXQgc3R5bGVTdHI6IHN0cmluZyA9IFwiXCJcbiAgICAgICAgaWYoc2V0dGluZ3MuY29sdW1uU3BhY2luZyAhPT0gXCJcIikge1xuXG4gICAgICAgICAgICBzdHlsZVN0ciA9IGBtYXJnaW4taW5saW5lOiAke3NldHRpbmdzLmNvbHVtblNwYWNpbmd9O2BcbiAgICAgICAgfVxuXG4gICAgICAgIGlmKHNldHRpbmdzLm51bWJlck9mQ29sdW1ucyA9PT0gMikge1xuXG4gICAgICAgICAgICBzd2l0Y2goc2V0dGluZ3MuY29sdW1uTGF5b3V0KSB7XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuc3RhbmRhcmQpOlxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0Lm1pZGRsZSk6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuY2VudGVyKTpcbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC50aGlyZCk6XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlR3b0VxdWFsQ29sdW1uc31gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVHdvRXF1YWxDb2x1bW5zfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmxlZnQpOlxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LmZpcnN0KTpcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVHdvQ29sdW1uTGFyZ2V9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlR3b0NvbHVtblNtYWxsfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LnJpZ2h0KTpcbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5zZWNvbmQpOlxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0Lmxhc3QpOlxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5Ud29Db2x1bW5TbWFsbH1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVHdvQ29sdW1uTGFyZ2V9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYoc2V0dGluZ3MubnVtYmVyT2ZDb2x1bW5zID09PSAzKSB7XG5cbiAgICAgICAgICAgIHN3aXRjaChzZXR0aW5ncy5jb2x1bW5MYXlvdXQpIHtcbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5zdGFuZGFyZCk6XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlRXF1YWxDb2x1bW5zfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgbWNtLWNvbHVtbi1zcGFjZXJgLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXR0cjoge1wic3R5bGVcIjogc3R5bGVTdHJ9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUVxdWFsQ29sdW1uc31gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVFcXVhbENvbHVtbnN9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQubGVmdCk6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuZmlyc3QpOlxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUNvbHVtbl9MYXJnZX1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVDb2x1bW5fU21hbGx9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlQ29sdW1uX1NtYWxsfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0Lm1pZGRsZSk6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQuY2VudGVyKTpcbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC5zZWNvbmQpOlxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUNvbHVtbl9TbWFsbH1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVDb2x1bW5fTGFyZ2V9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGBtY20tY29sdW1uLXNwYWNlcmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyOiB7XCJzdHlsZVwiOiBzdHlsZVN0cn1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlQ29sdW1uX1NtYWxsfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UoQ29sdW1uTGF5b3V0LnJpZ2h0KTpcbiAgICAgICAgICAgICAgICBjYXNlKENvbHVtbkxheW91dC50aGlyZCk6XG4gICAgICAgICAgICAgICAgY2FzZShDb2x1bW5MYXlvdXQubGFzdCk6XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzLnB1c2gobXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5TdHlsZUNTUy5Db2x1bW5Db250ZW50fSAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlRocmVlQ29sdW1uX1NtYWxsfWBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgbWNtLWNvbHVtbi1zcGFjZXJgLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXR0cjoge1wic3R5bGVcIjogc3R5bGVTdHJ9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2cy5wdXNoKG11bHRpQ29sdW1uUGFyZW50LmNyZWF0ZURpdih7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uU3R5bGVDU1MuQ29sdW1uQ29udGVudH0gJHtNdWx0aUNvbHVtbkxheW91dENTUy5UaHJlZUNvbHVtbl9TbWFsbH1gXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlDb2x1bW5QYXJlbnQuY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogYG1jbS1jb2x1bW4tc3BhY2VyYCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHI6IHtcInN0eWxlXCI6IHN0eWxlU3RyfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uQ29udGVudERpdnMucHVzaChtdWx0aUNvbHVtblBhcmVudC5jcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkNvbnRlbnR9ICR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuVGhyZWVDb2x1bW5fTGFyZ2V9YFxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGNvbHVtbkNvbnRlbnREaXZzO1xuICAgIH1cblxuICAgIHB1YmxpYyBhYnN0cmFjdCByZW5kZXJSZWdpb25FbGVtZW50c1RvU2NyZWVuKCk6IHZvaWQ7XG4gICAgcHVibGljIGFic3RyYWN0IGV4cG9ydFJlZ2lvbkVsZW1lbnRzVG9QREYocGRmUGFyZW50RWxlbWVudDogSFRNTEVsZW1lbnQpOiB2b2lkO1xuICAgIHB1YmxpYyBhYnN0cmFjdCByZW5kZXJSZWdpb25FbGVtZW50c1RvTGl2ZVByZXZpZXcocGFyZW50RWxlbWVudDogSFRNTEVsZW1lbnQpOiB2b2lkXG59XG5cblxuZnVuY3Rpb24gZ2V0RWxlbWVudENsaWVudEhlaWdodChlbGVtZW50OiBIVE1MRWxlbWVudCwgcGFyZW50UmVuZGVyRWxlbWVudDogSFRNTERpdkVsZW1lbnQpOiBudW1iZXIge1xuXG4gICAgbGV0IGhlaWdodCA9IGVsZW1lbnQuY2xpZW50SGVpZ2h0O1xuICAgIGlmKGhlaWdodCA9PT0gMCkge1xuICAgICAgICBwYXJlbnRSZW5kZXJFbGVtZW50LmFwcGVuZENoaWxkKGVsZW1lbnQpO1xuICAgICAgICBoZWlnaHQgPSBlbGVtZW50LmNsaWVudEhlaWdodFxuICAgICAgICBwYXJlbnRSZW5kZXJFbGVtZW50LnJlbW92ZUNoaWxkKGVsZW1lbnQpO1xuICAgIH1cbiAgICByZXR1cm4gaGVpZ2h0XG59IiwiLyoqXG4gKiBGaWxlOiAvc3JjL2RvbV9tYW5hZ2VyL3JlZ2lvbmFsX21hbmFnZXJzL3JlZ2lvbkRPTU1hbmFnZXIudHMgICAgICAgICAgICAgICAgKlxuICogQ3JlYXRlZCBEYXRlOiBTdW5kYXksIE1heSAyMm5kIDIwMjIsIDc6NDYgcG0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqIEF1dGhvcjogQ2FtZXJvbiBSb2JpbnNvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICogQ29weXJpZ2h0IChjKSAyMDIyIENhbWVyb24gUm9iaW5zb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqL1xuXG5pbXBvcnQgeyBET01PYmplY3QsIERPTU9iamVjdFRhZywgRWxlbWVudENvbHVtbkJyZWFrVHlwZSwgVGFza0xpc3RET01PYmplY3QgfSBmcm9tICcuLi9kb21PYmplY3QnO1xuaW1wb3J0IHsgTXVsdGlDb2x1bW5TZXR0aW5ncywgQ29udGVudE92ZXJmbG93VHlwZSwgQWxpZ25tZW50VHlwZSB9IGZyb20gXCIuLi8uLi9yZWdpb25TZXR0aW5nc1wiO1xuaW1wb3J0IHsgTXVsdGlDb2x1bW5MYXlvdXRDU1MsIE11bHRpQ29sdW1uU3R5bGVDU1MgfSBmcm9tICcuLi8uLi91dGlsaXRpZXMvY3NzRGV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1bW5Db250YWluZXJEaXYsXG4gICAgICAgIH0pO1xuXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFBhc3Mgb3VyIHBhcmVudCBkaXYgYW5kIHNldHRpbmdzIHRvIHBhcnNlciB0byBjcmVhdGUgdGhlIHJlcXVpcmVkXG4gICAgICAgICAqIGNvbHVtbiBkaXZzIGFzIGNoaWxkcmVuIG9mIHRoZSBwYXJlbnQuXG4gICAgICAgICAqL1xuICAgICAgICBsZXQgY29sdW1uQ29udGVudERpdnMgPSB0aGlzLmdldENvbHVtbkNvbnRlbnREaXZzKHNldHRpbmdzLCBtdWx0aUNvbHVtblBhcmVudCk7XG4gICAgICAgIGlmKHNldHRpbmdzLmRyYXdTaGFkb3cgPT09IHRydWUpIHtcbiAgICAgICAgICAgIG11bHRpQ29sdW1uUGFyZW50LmFkZENsYXNzKE11bHRpQ29sdW1uU3R5bGVDU1MuUmVnaW9uU2hhZG93KTtcbiAgICAgICAgfVxuICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgY29sdW1uQ29udGVudERpdnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmKHNldHRpbmdzLmRyYXdCb3JkZXIgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1tpXS5hZGRDbGFzcyhNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtbkJvcmRlcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmKHNldHRpbmdzLmRyYXdTaGFkb3cgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1tpXS5hZGRDbGFzcyhNdWx0aUNvbHVtblN0eWxlQ1NTLkNvbHVtblNoYWRvdyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDcmVhdGUgbWFya2Rvd24gcmVuZGVyZXIgdG8gcGFyc2UgdGhlIHBhc3NlZCBtYXJrZG93blxuICAgIC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cmVnaW9uRWxlbWVudHMubGVuZ3RoOyBpKyspIHtcblxuICAgICAgICAgICAgaWYgKHJlZ2lvbkVsZW1lbnRzW2ldLnRhZyA9PT0gRE9NT2JqZWN0VGFnLm5vbmUgfHxcbiAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS50YWcgPT09IERPTU9iamVjdFRhZy5jb2x1bW5CcmVhaykge1xuXG4gICAgICAgICAgICAgICAgLy8gSWYgYSBzdGFuZGFyZCBlbGVtZW50IGNvbnRhaW5zIGEgY29sdW1uIGJyZWFrIHRhZyBhbmQgaXQgaXMgc2V0IGFzIGEgcHJlIGNvbnRlbnQgYnJlYWsgdGFnIHdlIGZsaXAgb3VyIGluZGV4IGhlcmUuXG4gICAgICAgICAgICAgICAgaWYocmVnaW9uRWxlbWVudHNbaV0udGFnID09PSBET01PYmplY3RUYWcubm9uZSAmJiBcbiAgICAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS5lbGVtZW50SXNDb2x1bW5CcmVhayA9PT0gRWxlbWVudENvbHVtbkJyZWFrVHlwZS5wcmVCcmVhayAmJiBcbiAgICAgICAgICAgICAgICAgICAoY29sdW1uSW5kZXggKyAxKSA8IHNldHRpbmdzLm51bWJlck9mQ29sdW1ucykge1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5JbmRleCsrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFdlIHN0b3JlIHRoZSBlbGVtZW50cyBpbiBhIHdyYXBwZXIgY29udGFpbmVyIHVudGlsIHdlIGRldGVybWluZVxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50ID0gY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBNdWx0aUNvbHVtbkxheW91dENTUy5Db2x1bW5EdWFsRWxlbWVudENvbnRhaW5lcixcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmKHNldHRpbmdzLmNvbnRlbnRPdmVyZmxvdyA9PT0gQ29udGVudE92ZXJmbG93VHlwZS5oaWRkZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyhNdWx0aUNvbHVtbkxheW91dENTUy5Db250ZW50T3ZlcmZsb3dIaWRkZW4pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkNvbnRlbnRPdmVyZmxvd0F1dG9TY3JvbGwpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYoc2V0dGluZ3MuYWxpZ25tZW50ID09PSBBbGlnbm1lbnRUeXBlLmNlbnRlcikge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkFsaWdubWVudENlbnRlcilcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2V0dGluZ3MuYWxpZ25tZW50ID09PSBBbGlnbm1lbnRUeXBlLnJpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuYWRkQ2xhc3MoTXVsdGlDb2x1bW5MYXlvdXRDU1MuQWxpZ25tZW50UmlnaHQpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkFsaWdubWVudExlZnQpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0uZWxlbWVudENvbnRhaW5lciA9IGVsZW1lbnQ7XG5cbiAgICAgICAgICAgICAgICAvLyBPdGhlcndpc2Ugd2UganVzdCBtYWtlIGEgY29weSBvZiB0aGUgb3JpZ2luYWwgZWxlbWVudCB0byBkaXNwbGF5LlxuICAgICAgICAgICAgICAgIGxldCBjbG9uZWRFbGVtZW50ID0gcmVnaW9uRWxlbWVudHNbaV0ub3JpZ2luYWxFbGVtZW50LmNsb25lTm9kZSh0cnVlKSBhcyBIVE1MRGl2RWxlbWVudDtcbiAgICAgICAgICAgICAgICBsZXQgaGVhZGluZ0NvbGxhcHNlRWxlbWVudCA9IGdldEhlYWRpbmdDb2xsYXBzZUVsZW1lbnQoY2xvbmVkRWxlbWVudCk7XG4gICAgICAgICAgICAgICAgaWYoaGVhZGluZ0NvbGxhcHNlRWxlbWVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHJlbW92ZXMgdGhlIGNvbGxhcHNlIGFycm93IGZyb20gdGhlIHZpZXcgaWYgaXQgZXhpc3RzLlxuICAgICAgICAgICAgICAgICAgICBoZWFkaW5nQ29sbGFwc2VFbGVtZW50LmRldGFjaCgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJlZ2lvbkVsZW1lbnRzW2ldLmNsb25lZEVsZW1lbnQgPSBjbG9uZWRFbGVtZW50O1xuICAgICAgICAgICAgICAgIGVsZW1lbnQuYXBwZW5kQ2hpbGQoY2xvbmVkRWxlbWVudCk7XG5cbiAgICAgICAgICAgICAgICBpZiAocmVnaW9uRWxlbWVudHNbaV0gaW5zdGFuY2VvZiBUYXNrTGlzdERPTU9iamVjdCkge1xuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZml4Q2xvbmVkQ2hlY2tMaXN0QnV0dG9ucyhyZWdpb25FbGVtZW50c1tpXSBhcyBUYXNrTGlzdERPTU9iamVjdCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQgIT09IG51bGwgJiYgcmVnaW9uRWxlbWVudHNbaV0udGFnICE9PSBET01PYmplY3RUYWcuY29sdW1uQnJlYWspIHtcblxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1tjb2x1bW5JbmRleF0uYXBwZW5kQ2hpbGQoZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICogSWYgdGhlIHRhZyBpcyBhIGNvbHVtbiBicmVhayB3ZSB1cGRhdGUgdGhlIGNvbHVtbiBpbmRleCBhZnRlclxuICAgICAgICAgICAgICAgICAqIGFwcGVuZGluZyB0aGUgaXRlbSB0byB0aGUgY29sdW1uIGRpdi4gVGhpcyBrZWVwcyB0aGUgbWFpbiBET01cbiAgICAgICAgICAgICAgICAgKiBjbGVhbmVyIGJ5IHJlbW92aW5nIG90aGVyIGl0ZW1zIGFuZCBwbGFjaW5nIHRoZW0gYWxsIHdpdGhpblxuICAgICAgICAgICAgICAgICAqIGEgcmVnaW9uIGNvbnRhaW5lci5cbiAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICBpZiAocmVnaW9uRWxlbWVudHNbaV0udGFnID09PSBET01PYmplY3RUYWcuY29sdW1uQnJlYWsgJiZcbiAgICAgICAgICAgICAgICAgICAgKGNvbHVtbkluZGV4ICsgMSkgPCBzZXR0aW5ncy5udW1iZXJPZkNvbHVtbnMpIHtcblxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5JbmRleCsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmKHJlZ2lvbkVsZW1lbnRzW2ldLnRhZyA9PT0gRE9NT2JqZWN0VGFnLm5vbmUgJiYgXG4gICAgICAgICAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS5lbGVtZW50SXNDb2x1bW5CcmVhayA9PT0gRWxlbWVudENvbHVtbkJyZWFrVHlwZS5wb3N0QnJlYWsgJiYgXG4gICAgICAgICAgICAgICAgICAgICAgICAoY29sdW1uSW5kZXggKyAxKSA8IHNldHRpbmdzLm51bWJlck9mQ29sdW1ucykge1xuXG4gICAgICAg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PYmplY3RUYWcuY29sdW1uQnJlYWspIHtcblxuICAgICAgICAgICAgICAgIC8vIFdlIHN0b3JlIHRoZSBlbGVtZW50cyBpbiBhIHdyYXBwZXIgY29udGFpbmVyIHVudGlsIHdlIGRldGVybWluZVxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50ID0gY3JlYXRlRGl2KHtcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBNdWx0aUNvbHVtbkxheW91dENTUy5Db2x1bW5EdWFsRWxlbWVudENvbnRhaW5lcixcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS5lbGVtZW50Q29udGFpbmVyID0gZWxlbWVudDtcblxuICAgICAgICAgICAgICAgIGlmKHNldHRpbmdzLmNvbnRlbnRPdmVyZmxvdyA9PT0gQ29udGVudE92ZXJmbG93VHlwZS5oaWRkZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyhNdWx0aUNvbHVtbkxheW91dENTUy5Db250ZW50T3ZlcmZsb3dIaWRkZW4pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkNvbnRlbnRPdmVyZmxvd0F1dG9TY3JvbGwpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmKHNldHRpbmdzLmFsaWdubWVudCA9PT0gQWxpZ25tZW50VHlwZS5jZW50ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyhNdWx0aUNvbHVtbkxheW91dENTUy5BbGlnbm1lbnRDZW50ZXIpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNldHRpbmdzLmFsaWdubWVudCA9PT0gQWxpZ25tZW50VHlwZS5yaWdodCkge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkFsaWdubWVudFJpZ2h0KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyhNdWx0aUNvbHVtbkxheW91dENTUy5BbGlnbm1lbnRMZWZ0KVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIE90aGVyd2lzZSB3ZSBqdXN0IG1ha2UgYSBjb3B5IG9mIHRoZSBvcmlnaW5hbCBlbGVtZW50IHRvIGRpc3BsYXkuXG4gICAgICAgICAgICAgICAgbGV0IGNsb25lZEVsZW1lbnQgPSByZWdpb25FbGVtZW50c1tpXS5vcmlnaW5hbEVsZW1lbnQuY2xvbmVOb2RlKHRydWUpIGFzIEhUTUxEaXZFbGVtZW50O1xuICAgICAgICAgICAgICAgIGxldCBoZWFkaW5nQ29sbGFwc2VFbGVtZW50ID0gZ2V0SGVhZGluZ0NvbGxhcHNlRWxlbWVudChjbG9uZWRFbGVtZW50KTtcbiAgICAgICAgICAgICAgICBpZihoZWFkaW5nQ29sbGFwc2VFbGVtZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgcmVtb3ZlcyB0aGUgY29sbGFwc2UgYXJyb3cgZnJvbSB0aGUgdmlldyBpZiBpdCBleGlzdHMuXG4gICAgICAgICAgICAgICAgICAgIGhlYWRpbmdDb2xsYXBzZUVsZW1lbnQuZGV0YWNoKCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0uY2xvbmVkRWxlbWVudCA9IGNsb25lZEVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgZWxlbWVudC5hcHBlbmRDaGlsZChjbG9uZWRFbGVtZW50KTtcblxuICAgICAgICAgICAgICAgI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c2Vcbn1cblxuZnVuY3Rpb24gaXNSaWdodExheW91dChsYXlvdXQ6IENvbHVtbkxheW91dCk6IGJvb2xlYW4ge1xuXG4gICAgaWYobGF5b3V0ID09PSBDb2x1bW5MYXlvdXQucmlnaHQgfHxcbiAgICAgICBsYXlvdXQgPT09IENvbHVtbkxheW91dC50aGlyZCB8fFxuICAgICAgIGxheW91dCA9PT0gQ29sdW1uTGF5b3V0Lmxhc3QgKSB7XG4gXG4gICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgfVxuIFxuICAgICByZXR1cm4gZmFsc2Vcbn0iLCIvKipcbiAqIEZpbGU6IC9zcmMvZG9tX21hbmFnZXIvcmVnaW9uYWxfbWFuYWdlcnMvYXV0b0xheW91dFJlZ2lvbk1hbmFnZXIudHMgICAgICAgICAqXG4gKiBDcmVhdGVkIERhdGU6IFN1bmRheSwgTWF5IDIybmQgMjAyMiwgMTA6MjMgcG0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICogQXV0aG9yOiBDYW1lcm9uIFJvYmluc29uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjIgQ2FtZXJvbiBSb2JpbnNvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICovXG5cbmltcG9ydCB7IERPTU9iamVjdCwgRE9NT2JqZWN0VGFnLCBUYXNrTGlzdERPTU9iamVjdCB9IGZyb20gJy4uL2RvbU9iamVjdCc7XG5pbXBvcnQgeyBBbGlnbm1lbnRUeXBlLCBDb250ZW50T3ZlcmZsb3dUeXBlLCBNdWx0aUNvbHVtblNldHRpbmdzIH0gZnJvbSBcIi4uLy4uL3JlZ2lvblNldHRpbmdzXCI7XG5pbXBvcnQgeyB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ICBsZXQgdG90YWxIZWlnaHQgPSByZWdpb25FbGVtZW50cy5tYXAoKGVsOiBET01PYmplY3QsIGluZGV4OiBudW1iZXIpID0+IHsgXG5cbiAgICAgICAgICAgICAgICAvLyBXZSBvbmx5IHdhbnQgdG8gYXR0ZW1wdCB0byB1cGRhdGUgdGhlIGVsZW1lbnRSZW5kZXJlZEhlaWdodCBpZiBpdCBpcyAwIGFuZCBpZiBpdCBpcyBub3QgYW4gdW5yZW5kZXJlZCBlbGVtZW50IHN1Y2ggYXMgYSBlbmRyZWdpb24gdGFnLlxuICAgICAgICAgICAgICAgIGlmKGVsLmVsZW1lbnRSZW5kZXJlZEhlaWdodCA9PT0gMCAmJlxuICAgICAgICAgICAgICAgICAgICBlbC50YWcgIT09IERPTU9iamVjdFRhZy5jb2x1bW5CcmVhayAmJlxuICAgICAgICAgICAgICAgICAgICBlbC50YWcgIT09IERPTU9iamVjdFRhZy5lbmRSZWdpb24gJiZcbiAgICAgICAgICAgICAgICAgICAgZWwudGFnICE9PSBET01PYmplY3RUYWcucmVnaW9uU2V0dGluZ3MgJiZcbiAgICAgICAgICAgICAgICAgICAgZWwudGFnICE9PSBET01PYmplY3RUYWcuc3RhcnRSZWdpb24pIHtcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gQWRkIGVsZW1lbnQgdG8gcmVuZGVyZWQgZGl2IHNvIHdlIGNhbiBleHRyYWN0IHRoZSByZW5kZXJlZCBoZWlnaHQuXG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzWzBdLmFwcGVuZENoaWxkKGVsLm9yaWdpbmFsRWxlbWVudClcbiAgICAgICAgICAgICAgICAgICAgZWwuZWxlbWVudFJlbmRlcmVkSGVpZ2h0ID0gZWwub3JpZ2luYWxFbGVtZW50LmNsaWVudEhlaWdodFxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1swXS5yZW1vdmVDaGlsZChlbC5vcmlnaW5hbEVsZW1lbnQpXG4gICAgICAgICAgICAgICAgfVxuICAgIFxuICAgICAgICAgICAgICAgIHJldHVybiBlbC5lbGVtZW50UmVuZGVyZWRIZWlnaHQgXG4gICAgICAgICAgICB9KS5yZWR1Y2UoKHByZXY6IG51bWJlciwgY3VycjogbnVtYmVyKSA9PiB7IHJldHVybiBwcmV2ICsgY3VyciB9LCAwKTtcbiAgICAgICAgICAgIGxldCBtYXhDb2x1bW5Db250ZW50SGVpZ2h0ID0gTWF0aC50cnVuYyh0b3RhbEhlaWdodCAvIHNldHRpbmdzLm51bWJlck9mQ29sdW1ucyk7XG5cbiAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBjb2x1bW5Db250ZW50RGl2cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSBjb2x1bW5Db250ZW50RGl2c1tpXS5jaGlsZHJlbi5sZW5ndGggLSAxOyBqID49IDA7IGotLSkge1xuICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1tpXS5jaGlsZHJlbltqXS5kZXRhY2goKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBjb2x1bW5JbmRleCA9IDA7XG4gICAgICAgICAgICBsZXQgY3VycmVudENvbHVtbkhlaWdodCA9IDA7XG4gICAgICAgICAgICBmdW5jdGlvbiBjaGVja1Nob3VsZFN3aXRjaENvbHVtbnMobmV4dEVsZW1lbnRIZWlnaHQ6IG51bWJlcikge1xuICAgIFxuICAgICAgICAgICAgICAgIGlmIChjdXJyZW50Q29sdW1uSGVpZ2h0ICsgbmV4dEVsZW1lbnRIZWlnaHQgPiBtYXhDb2x1bW5Db250ZW50SGVpZ2h0ICYmXG4gICAgICAgICAgICAgICAgICAgIChjb2x1bW5JbmRleCArIDEpIDwgc2V0dGluZ3MubnVtYmVyT2ZDb2x1bW5zKSB7XG4gICAgXG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRDb2x1bW5IZWlnaHQgPSAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCByZWdpb25FbGVtZW50cy5sZW5ndGg7IGkrKykge1xuXG4gICAgICAgICAgICAgICAgaWYgKHJlZ2lvbkVsZW1lbnRzW2ldLnRhZyA9PT0gRE9NT2JqZWN0VGFnLm5vbmUgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uRWxlbWVudHNbaV0udGFnID09PSBET01PYmplY3RUYWcuY29sdW1uQnJlYWspIHtcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICAqIEhlcmUgd2UgY2hlY2sgaWYgd2UgbmVlZCB0byBzd2FwIHRvIHRoZSBuZXh0IGNvbHVtbiBmb3IgdGhlIGN1cnJlbnQgZWxlbWVudC5cbiAgICAgICAgICAgICAgICAgICAgICogSWYgdGhlIHVzZXIgd2FudHMgdG8ga2VlcCBoZWFkaW5ncyB3aXRoIHRoZSBjb250ZW50IGJlbG93IGl0IHdlIGFsc28gbWFrZSBzdXJlXG4gICAgICAgICAgICAgICAgICAgICAqIHRoYXQgdGhlIGxhc3QgaXRlbSBpbiBhIGNvbHVtbiBpcyBub3QgYSBoZWFkZXIgZWxlbWVudCBieSB1c2luZyB0aGUgaGVhZGVyIGFuZFxuICAgICAgICAgICAgICAgICAgICAgKiB0aGUgbmV4dCBlbGVtZW50J3MgaGVpZ2h0IGFzIHRoZSBoZWlnaHQgdmFsdWUuIFxuICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgaWYoaGFzSGVhZGVyKHJlZ2lvbkVsZW1lbnRzW2ldLm9yaWdpbmFsRWxlbWVudCkgPT09IHRydWUpIHsgLy8gVE9ETzogQWRkIHRoaXMgYXMgc2VsZWN0YWJsZSBvcHRpb24uXG4gICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVyQW5kTmV4dEVsZW1lbnRIZWlnaHQgPSByZWdpb25FbGVtZW50c1tpXS5lbGVtZW50UmVuZGVyZWRIZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZihpIDwgcmVnaW9uRWxlbWVudHMubGVuZ3RoIC0gMSkge1xuICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlckFuZE5leHRFbGVtZW50SGVpZ2h0ICs9IHJlZ2lvbkVsZW1lbnRzW2kgKyAxXS5lbGVtZW50UmVuZGVyZWRIZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGVja1Nob3VsZFN3aXRjaENvbHVtbnMoaGVhZGVyQW5kTmV4dEVsZW1lbnRIZWlnaHQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tTaG91bGRTd2l0Y2hDb2x1bW5zKHJlZ2lvbkVsZW1lbnRzW2ldLmVsZW1lbnRSZW5kZXJlZEhlaWdodCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY3VycmVudENvbHVtbkhlaWdodCArPSByZWdpb25FbGVtZW50c1tpXS5lbGVtZW50UmVuZGVyZWRIZWlnaHRcbiAgICBcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICAqIFdlIHN0b3JlIHRoZSBlbGVtZW50cyBpbiBhIHdyYXBwZXIgY29udGFpbmVyIHVudGlsIHdlIGRldGVybWluZSBpZiB3ZSB3YW50IHRvIFxuICAgICAgICAgICAgICAgICAgICAgKiB1c2UgdGhlIG9yaWdpbmFsIGVsZW1lbnQgb3IgYSBjbG9uZSBvZiB0aGUgZWxlbWVudC4gVGhpcyBoZWxwcyB1cyBieSBhbGxvd2luZyBcbiAgICAgICAgICAgICAgICAgICAgICogdXMgdG8gY3JlYXRlIGEgdmlzdWFsIG9ubHkgY2xvbmUgd2hpbGUgdGhlIHVwZGF0ZSBsb29wIG1vdmVzIHRoZSBvcmlnaW5hbCBlbGVtZW50IFxuICAgICAgICAgICAgICAgICAgICAgKiBpbnRvIHRoZSBjb2x1bW5zLlxuICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgbGV0IGVsZW1lbnQgPSBjcmVhdGVEaXYoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNdWx0aUNvbHVtbkxheW91dENTUy5Db2x1bW5EdWFsRWxlbWVudENvbnRhaW5lcixcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbkVsZW1lbnRzW2ldLmVsZW1lbnRDb250YWluZXIgPSBlbGVtZW50O1xuICAgIFxuICAgICAgICAgICAgICAgICAgICBpZihzZXR0aW5ncy5jb250ZW50T3ZlcmZsb3cgPT09IENvbnRlbnRPdmVyZmxvd1R5cGUuaGlkZGVuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkNvbnRlbnRPdmVyZmxvd0hpZGRlbilcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuYWRkQ2xhc3MoTXVsdGlDb2x1bW5MYXlvdXRDU1MuQ29udGVudE92ZXJmbG93QXV0b1Njcm9sbClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYoc2V0dGluZ3MuYWxpZ25tZW50ID09PSBBbGlnbm1lbnRUeXBlLmNlbnRlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyhNdWx0aUNvbHVtbkxheW91dENTUy5BbGlnbm1lbnRDZW50ZXIpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoc2V0dGluZ3MuYWxpZ25tZW50ID09PSBBbGlnbm1lbnRUeXBlLnJpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFkZENsYXNzKE11bHRpQ29sdW1uTGF5b3V0Q1NTLkFsaWdubWVudFJpZ2h0KVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5hZGRDbGFzcyhNdWx0aUNvbHVtbkxheW91dENTUy5BbGlnbm1lbnRMZWZ0KVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IGNsb25lZEVsZW1lbnQgPSByZWdpb25FbGVtZW50c1tpXS5jbG9uZWRFbGVtZW50O1xuICAgICAgICAgICAgICAgICAgICBpZihyZWdpb25FbGVtZW50c1tpXS5jbG9uZWRFbGVtZW50ID09PSBudWxsKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNsb25lZEVsZW1lbnQgPSByZWdpb25FbGVtZW50c1tpXS5vcmlnaW5hbEVsZW1lbnQuY2xvbmVOb2RlKHRydWUpIGFzIEhUTUxEaXZFbGVtZW50O1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRpbmdDb2xsYXBzZUVsZW1lbnQgPSBnZXRIZWFkaW5nQ29sbGFwc2VFbGVtZW50KGNsb25lZEVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGVhZGluZ0NvbGxhcHNlRWxlbWVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgcmVtb3ZlcyB0aGUgY29sbGFwc2UgYXJyb3cgZnJvbSB0aGUgdmlldyBpZiBpdCBleGlzdHMuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZ0NvbGxhcHNlRWxlbWVudC5kZXRhY2goKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS5jbG9uZWRFbGVtZW50ID0gY2xvbmVkRWxlbWVudDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LmFwcGVuZENoaWxkKGNsb25lZEVsZW1lbnQpO1xuICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAocmVnaW9uRWxlbWVudHNbaV0gaW5zdGFuY2VvZiBUYXNrTGlzdERPTU9iamVjdCkge1xuICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5maXhDbG9uZWRDaGVja0xpc3RCdXR0b25zKHJlZ2lvbkVsZW1lbnRzW2ldIGFzIFRhc2tMaXN0RE9NT2JqZWN0LCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAoZWxlbWVudCAhPT0gbnVsbCAmJiBcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbkNvbnRlbnREaXZzW2NvbHVtbkluZGV4XSAmJiBcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lvbkVsZW1lbnRzW2ldLnRhZyAhPT0gRE9NT2JqZWN0VGFnLmNvbHVtbkJyZWFrKSB7XG4gICAgXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW5Db250ZW50RGl2c1tjb2x1bW5JbmRleF0uYXBwZW5kQ2hpbGQoZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWdpb25FbGVtZW50c1tpXS5lbGVtZW50UmVuZGVyZWRIZWlnaHQgPSBlbGVtZW50LmNsaWVudEhlaWdodDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgIFxuICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICogSWYgdGhlIHRhZyBpcyBhIGNvbHVtbiBicmVhayB3ZSB1cGRhdGUgdGhlIGNvbHVtbiBpbmRleCBhZnRlclxuICAgICAgICAgICAgICAgICAgICAgKiBhcHBlbmRpbmcgdGhlIGl0ZW0gdG8gdGhlIGNvbHVtbiBkaXYuIFRoaXMga2VlcHMgdGhlIG1haW4gRE9NXG4gICAgICAgICAgICAgICAgICAgICAqIGNsZWFuZXIgYnkgcmVtb3Zpbmcgb3RoZXIgaXRlbXMgYW5kIHBsYWNpbmcgdGhlbSBhbGwgd2l0aGluXG4gICAgICAgICAgICAgICAgICAgICAqIGEgcmVnaW9uIGNvbnRhaW5lci5cbiAgICAgICAgICAgICAgICAgICAgICogXG4gICAgICAgICAgICAgICAgICAgICAqIFJlbW92aW5nIHRoZSBlbmQgY29sdW1uIHRhZyBhcyBhbiBvcHRpb24gZm9yIG5vdy5cbiAgICAgICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIChyZWdpb25FbGVtZW50c1tpXS50YWcgPT09IERPTU9iamVjdFRhZy5jb2x1bW5CcmVhayAmJlxuICAgICAgICAgICAgICAgICAgICAvLyAgICAoY29sdW1uSW5kZXggKyAxKSA8IHNldHRpbmdzLm51bWJlck9mQ29sdW1ucykge1xuICAgIFxuICAgICAgICAgICAgICAgICAgICAvLyAgICAgY29sdW1uSW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgLy8gICAgIGN1cnJlbnRDb2x1bW5IZWlnaHQgPSAwO1xuICAgICAgICAgICAgICAgICAgICAvLyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEF0dGVtcHQgdG8gYmFsYW5jZWQgdGhlIGVsZW1lbnRzLiBXZSBuZWVkIHRvIGl0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gICAgIC8vIHdlJ3JlIGJhbGFuY2VkIHNvIHdlIGNhbiBicmVhayBvdXQgb2YgdGhlIGxvb3AuXG4gICAgICAgICAgICBpZihiYWxhbmNlZCA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIHVwZGF0ZVJlbmRlcmVkTWFya2Rvd24oKSB7XG5cbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLmRvbUxpc3QubGVuZ3RoOyBpKyspIHtcblxuICAgICAgICAgICAgbGV0IGVsID0gdGhpcy5kb21MaXN0W2ldXG4gICAgICAgICAgICBsZXQgb3JpZ2luYWxDbGllbnRIZWlnaHQgPSAwO1xuICAgICAgICAgICAgaWYgKGVsLm9yaWdpbmFsRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIG9yaWdpbmFsQ2xpZW50SGVpZ2h0ID0gZWwub3JpZ2luYWxFbGVtZW50LmNsaWVudEhlaWdodFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGV0IGNsb25lZENsaWVudEhlaWdodCA9IDA7XG4gICAgICAgICAgICBpZiAoZWwuY2xvbmVkRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGNsb25lZENsaWVudEhlaWdodCA9IGVsLmNsb25lZEVsZW1lbnQuY2xpZW50SGVpZ2h0XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChvcmlnaW5hbENsaWVudEhlaWdodCA8IGNsb25lZENsaWVudEhlaWdodCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZG9tTGlzdFtpXS5lbGVtZW50UmVuZGVyZWRIZWlnaHQgPSBjbG9uZWRDbGllbnRIZWlnaHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLmRvbUxpc3RbaV0uZWxlbWVudFJlbmRlcmVkSGVpZ2h0ID0gb3JpZ2luYWxDbGllbnRIZWlnaHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgdmFsaWRDb2x1bW5zID0gdHJ1ZTtcbiAgICAgICAgaWYodGhpcy5jb2x1bW5QYXJlbnQgIT09IG51bGwgJiYgdGhpcy5jb2x1bW5EaXZzICE9PSBudWxsICYmIHRoaXMuY29sdW1uRGl2cyAhPT0gdW5kZWZpbmVkICYmXG4gICAgICAgICAgICB0aGlzLmNvbHVtbkRpdnMubGVuZ3RoID09PSB0aGlzLnJlZ2lvbmFsU2V0dGluZ3MubnVtYmVyT2ZDb2x1bW5zKSB7XG5cbiAgICAgICAgICAgIGxldCB0b3RhbEhlaWdodCA9IHRoaXMuZG9tTGlzdC5tYXAoKGVsOiBET01PYmplY3QsIGluZGV4OiBudW1iZXIpID0+IHsgXG5cbiAgICAgICAgICAgICAgICAvLyBXZSBvbmx5IHdhbnQgdG8gYXR0ZW1wdCB0byB1cGRhdGUgdGhlIGVsZW1lbnRSZW5kZXJlZEhlaWdodCBpZiBpdCBpcyAwIGFuZCBpZiBpdCBpcyBub3QgYW4gdW5yZW5kZXJlZCBlbGVtZW50IHN1Y2ggYXMgYSBlbmRyZWdpb24gdGFnLlxuICAgICAgICAgICAgICAgIGlmKGVsLmVsZW1lbnRSZW5kZXJlZEhlaWdodCA9PT0gMCAmJlxuICAgICAgICAgICAgICAgICAgICBlbC50YWcgIT09IERPTU9iamVjdFRhZy5jb2x1bW5CcmVhayAmJlxuICAgICAgICAgICAgICAgICAgICBlbC50YWcgIT09IERPTU9iamVjdFRhZy5lbmRSZWdpb24gJiZcbiAgICAgICAgICAgICAgICAgICAgZWwudGFnICE9PSBET01PYmplY3RUYWcucmVnaW9uU2V0dGluZ3MgJiZcbiAgICAgICAgICAgICAgICAgICAgZWwudGFnICE9PSBET01PYmplY3RUYWcuc3RhcnRSZWdpb24pIHtcbiAgICBcbiAgICAgICAgICAgICAgICAgICAgLy8gQWRkIGVsZW1lbnQgdG8gcmVuZGVyZWQgZGl2IHNvIHdlIGNhbiBleHRyYWN0IHRoZSByZW5kZXJlZCBoZWlnaHQuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29sdW1uUGFyZW50LmFwcGVuZENoaWxkKGVsLm9yaWdpbmFsRWxlbWVudClcbiAgICAgICAgICAgICAgICAgICAgZWwuZWxlbWVudFJlbmRlcmVkSGVpZ2h0ID0gZWwub3JpZ2luYWxFbGVtZW50LmNsaWVudEhlaWdodFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbHVtblBhcmVudC5yZW1vdmVDaGlsZChlbC5vcmlnaW5hbEVsZW1lbnQpXG4gICAgICAgICAgICAgICAgfVxuICAgIFxuICAgICAgICAgICAgICAgIHJldHVybiBlbC5lbGVtZW50UmVuZGVyZWRIZWlnaHQgXG4gICAgICAgICAgICB9KS5yZWR1Y2UoKHByZXY6IG51bWJlciwgY3VycjogbnVtYmVyKSA9PiB7IHJldHVybiBwcmV2ICsgY3VyciB9LCAwKTtcbiAgICAgICAgICAgIGxldCBtYXhDb2x1bW5Db250ZW50SGVpZ2h0ID0gTWF0aC50cnVuYyh0b3RhbEhlaWdodCAvIHRoaXMucmVnaW9uYWxTZXR0aW5ncy5udW1iZXJPZkNvbHVtbnMpO1xuXG4gICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgdGhpcy5jb2x1bW5EaXZzLmxlbmd0aCAtIDE7IGkrKykge1xuXG4gICAgICAgICAgICAgICAgbGV0IGNvbHVtbkhlaWdodCA9IDBcbiAgICAgICAgICAgICAgICBmb3IobGV0IGogPSAwOyBqIDwgdGhpcy5jb2x1bW5EaXZzW2ldLmNoaWxkcmVuLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbkhlaWdodCArPSB0aGlzLmNvbHVtbkRpdnNbaV0uY2hpbGRyZW5bal0uY2xpZW50SGVpZ2h0XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYoY29sdW1uSGVpZ2h0ID4gbWF4Q29sdW1uQ29udGVudEhlaWdodCkge1xuICAgICAgICAgICAgICAgICAgICB2YWxpZENvbHVtbnMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYodmFsaWRDb2x1bW5zID09PSBmYWxzZSkge1xuXG4gICAgICAgICAgICB0aGlzLnJlbmRlckNvbHVtbk1hcmtkb3duKHRoaXMucmVnaW9uUGFyZW50LCB0aGlzLmRvbUxpc3QsIHRoaXMucmVnaW9uYWxTZXR0aW5ncyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdXBlci51cGRhdGVSZW5kZXJlZE1hcmtkb3duKCk7XG4gICAgfVxufVxuXG4iLCIvKipcbiAqIEZpbGU6IC9zcmMvZG9tX21hbmFnZXIvcmVnaW9uYWxfbWFuYWdlcnMvcmVnaW9uTWFuYWdlckNvbnRhaW5lci50cyAgICAgICAgICAqXG4gKiBDcmVhdGVkIERhdGU6IFN1bmRheSwgTWF5IDIybmQgMjAyMiwgNzo1MCBwbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICogQXV0aG9yOiBDYW1lcm9uIFJvYmluc29uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjIgQ2FtZXJvbiBSb2JpbnNvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICovXG5cbmltcG9ydCB7IHBhcnNlQ29sdW1uU2V0dGluZ3MsIHBhcnNlU2luZ2xlQ29sdW1uU2V0dGluZ3MgfSBmcm9tIFwiLi4vLi4vdXRpbGl0aWVzL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iBpbnN0YW5jZW9mIFNpbmdsZUNvbHVtblJlZ2lvbk1hbmFnZXIgPT09IGZhbHNlKSB7XG5cbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmRlYnVnKFwiQ29udmVydGluZyByZWdpb24gdG8gc2luZ2xlIGNvbHVtbi5cIilcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnZlcnRUb1NpbmdsZUNvbHVtbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYocmVnaW9uYWxTZXR0aW5ncy5hdXRvTGF5b3V0ID09PSB0cnVlKSB7XG5cbiAgICAgICAgICAgIGlmKHRoaXMucmVnaW9uIGluc3RhbmNlb2YgQXV0b0xheW91dFJlZ2lvbk1hbmFnZXIgPT09IGZhbHNlKSB7XG5cbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmRlYnVnKFwiQ29udmVydGluZyByZWdpb24gdG8gYXV0byBsYXlvdXQuXCIpXG4gICAgICAgICAgICAgICAgdGhpcy5jb252ZXJ0VG9BdXRvTGF5b3V0KClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChyZWdpb25hbFNldHRpbmdzLm51bWJlck9mQ29sdW1ucyA+PSAyKSB7XG5cbiAgICAgICAgICAgIGlmKHRoaXMucmVnaW9uIGluc3RhbmNlb2YgU3RhbmRhcmRNdWx0aUNvbHVtblJlZ2lvbk1hbmFnZXIgPT09IGZhbHNlKSB7XG5cbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmRlYnVnKFwiQ29udmVydGluZyByZWdpb24gdG8gc3RhbmRhcmQgbXVsdGktY29sdW1uXCIpXG4gICAgICAgICAgICAgICAgdGhpcy5jb252ZXJ0VG9TdGFuZGFyZE11bHRpQ29sdW1uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5yZWdpb247XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBjb252Z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B9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRDb21tYW5kKHsgICAgICAgICAgICBcclxuICAgICAgICAgICAgaWQ6IGBhZGQtSURzLVRvLW11bHRpLWNvbHVtbi1yZWdpb25gLFxyXG4gICAgICAgICAgICBuYW1lOiBgRml4IE1pc3NpbmcgSURzIGZvciBNdWx0aS1Db2x1bW4gUmVnaW9uc2AsXHJcbiAgICAgICAgICAgIGVkaXRvckNhbGxiYWNrOiAoZWRpdG9yLCB2aWV3KSA9PiB7XHJcblxyXG4gICAgICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICAgICAgICAgKiBOb3Qgc3VyZSBpZiB0aGVyZSBpcyBhbiBlYXNpZXIgd2F5IHRvIGRvIHRoaXMuXHJcbiAgICAgICAgICAgICAgICAgICAgICogXHJcbiAgICAgICAgICAgICAgICAgICAgICogR2V0IGFsbCBvZiB0aGUgbGluZXMgb2YgdGhlIGRvY3VtZW50IHNwbGl0IGJ5IG5ld2xpbmVzLlxyXG4gICAgICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkb2NUZXh0ID0gZWRpdG9yLmdldFJhbmdlKHsgbGluZTogMCwgY2g6IDAgfSwgeyBsaW5lOiBlZGl0b3IuZ2V0RG9jKCkubGluZUNvdW50KCksIGNoOiAwfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVzID0gZG9jVGV4dC5zcGxpdChcIlxcblwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0Q29kZWJsb2NrID0gbXVsdGlDb2x1bW5QYXJzZXIuZmluZFN0YXJ0Q29kZWJsb2NrKGRvY1RleHQpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaW5lT2Zmc2V0ID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbnVtQ29kZWJsb2Nrc1VwZGF0ZWQgPSAwO1x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Q29kZWJsb2NrLnN0YXJ0UG9zaXRpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RhcnRSZXBsYWNlbWVudExpbmVJbmRleCA9IChsaW5lc0JlZm9yZS5zcGxpdChcIlxcblwiKS5sZW5ndGggLSAxKSArIGxpbmVPZmZzZXQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5lc09mID0gZG9jVGV4dC5zbGljZSgwLCBzdGFydENvZGVibG9jay5lbmRQb3NpdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbmRSZXBsYWNlbWVudExpbmVJbmRleCA9ICAobGluZXNPZi5zcGxpdChcIlxcblwiKS5sZW5ndGggLSAxKSArIGxpbmVPZmZzZXQ7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0dGluZ3NJRCA9IHBhcnNlU3RhcnRSZWdpb25Db2RlQmxvY2tJRChzZXR0aW5nc1RleHQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihzZXR0aW5nc0lEID09PSBcIlwiKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29weSB0aGUgZmlyc3QgbGluZSBvZiB0aGUgY29kZWJsb2NrIGFuZCBhcHBlbmQgYSBuZXcgSUQsIHRoZW4gcmVwbGFjZSB0aGUgZmlyc3QgbGluZSBvZiB0aGUgYmxvY2tcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXBsYWNlbWVudFRleHQgPSBlZGl0b3IuZ2V0UmFuZ2UoeyBsaW5lOiBzdGFydFJlcGxhY2VtZW50TGluZUluZGV4LCBjaDogMCB9LCB7IGxpbmU6IHN0YXJ0UmVwbGFjZW1lbnRMaW5lSW5kZXgsIGNoOiBmaXJzdExpbmVPZkNvZGVibG9ja0xlbmd0aH0pICsgYFxcbklEOiBJRF8ke2dldFVJRCg0KX1gXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3IucmVwbGFjZVJhbmdlKHJlcGxhY2VtZW50VGV4dCwgeyBsaW5lOiBzdGFydFJlcGxhY2VtZW50TGluZUluZGV4LCBjaDogMCB9LCBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGxpbmU6IHN0YXJ0UmVwbGFjZW1lbnRMaW5lSW5kZXgsIGNoOiBmaXJzdExpbmVPZkNvZGVibG9ja0xlbmd0aH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kUmVwbGFjZW1lbnRMaW5lSW5kZXggKz0gMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bUNvZGVibG9ja3NVcGRhdGVkICs9IDE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVPZmZzZXQgPSBlbmRSZXBsYWNlbWVudExpbmVJbmRleFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkb2NUZXh0ID0gZG9jVGV4dC5zbGljZShzdGFydENvZGVibG9jay5lbmRQb3NpdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0Q29kZWJsb2NrID0gbXVsdGlDb2x1bW5QYXJzZXIuZmluZFN0YXJ0Q29kZWJsb2NrKGRvY1RleHQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAgICAgICAgICogTG9vcCB0aHJvdWdoIGFsbCBvZiB0aGUgbGluZXMgY2hlY2tpbmcgaWYgdGhlIGxpbmUgaXMgYSBcclxuICAgICAgICAgICAgICAgICAgICAgKiBzdGFydCB0YWcgYW5kIGlmIHNvIGlzIGl0IG1pc3NpbmcgYW4gSUQuXHJcbiAgICAgICAgICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVzV2l0aG91dElEcyA9IFtdXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRleHRXaXRob3V0SURzID0gW11cclxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgbGluZXMubGVuZ3RoOyBpKyspIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gbXVsdGlDb2x1bW5QYXJzZXIuaXNTdGFydFRhZ1dpdGhJRChsaW5lc1tpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEuaXNTdGFydFRhZyA9PT0gdHJ1ZSAmJiBkYXRhLmhhc0tleSA9PT0gZmFsc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVzV2l0aG91dElEcy5wdXNoKGkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFdpdGhvdXRJRHMucHVzaChsaW5lc1tpXSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgIFxyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZihsaW5lc1dpdGhvdXRJRHMubGVuZ3RoID09PSAwICYmIG51bUNvZGVibG9ja3NVcGRhdGVkID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOb3RpY2UgKFwiRm91bmQgMCBtaXNzaW5nIElEcyBpbiB0aGUgY3VycmVudCBkb2N1bWVudC5cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgICAgICAgICAqIE5vdyBsb29wIHRocm91Z2ggZWFjaCBsaW5lIHRoYXQgaXMgbWlzc2luZyBhbiBJRCBhbmRcclxuICAgICAgICAgICAgICAgICAgICAgKiBnZW5lcmF0ZSBhIHJhbmRvbSBJRCBhbmQgcmVwbGFjZSB0aGUgb3JpZ2luYWwgdGV4dC5cclxuICAgICAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgbGluZXNXaXRob3V0SURzLmxlbmd0aDsgaSsrKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3JpZ2luYWxUZXh0ID0gdGV4dFdpdGhvdXRJRHNbaV1cclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHQgPSBvcmlnaW5hbFRleHQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQgPSB0ZXh0LnRyaW1FbmQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYodGV4dC5jaGFyQXQodGV4dC5sZW5ndGggLSAxKSA9PT0gXCI6XCIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQgPSB0ZXh0LnNsaWNlKDAsIHRleHQubGVuZ3RoLTEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQgPSBgJHt0ZXh0fTogSURfJHtnZXRVSUQoNCl9YDtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5yZXBsYWNlUmFuZ2UodGV4dCwgeyBsaW5lOiBsaW5lc1dpdGhvdXRJRHNbaV0sIGNoOiAwIH0sIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgbGluZTogbGluZXNXaXRob3V0SURzW2ldLCBjaDogb3JpZ2luYWxUZXh0Lmxlbmd0aH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZSAoYFJlcGxhY2VkICR7bGluZXNXaXRob3V0SURzLmxlbmd0aCArIG51bUNvZGVibG9ja3NVcGRhdGVkfSBtaXNzaW5nIElEKHMpIGluIHRoZSBjdXJyZW50IGRvY3VtZW50LmApO1xyXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIG5ldyBOb3RpY2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiRW5jb3VudGVyZWQgYW4gZXJyb3IgYWRkaWduIElEcyB0byBtdWx0aS1jb2x1bW4gcmVnaW9ucy4gUGxlYXNlIHRyeSBhZ2FpbiBsYXRlci5cIlxyXG4gICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5yZWdpc3RlckludGVydmFsKHdpbmRvdy5zZXRJbnRlcnZhbCgoKSA9PiB7XHJcbiAgICAgICAgICAgIFxyXG4gICAgICAgICAgICB0aGlzLlVwZGF0ZU9wZW5GaWxlUHJldmlld3MoKTtcclxuICAgICAgICB9LCA1MDApKTtcclxuICAgIH1cclxuXHJcbiAgICBVcGRhdGVPcGVuRmlsZVByZXZpZXdzKCkge1xyXG5cclxuICAgICAgICBsZXQgZmlsZU1hbmFnZXJzID0gdGhpcy5nbG9iYWxNYW5hZ2VyLmdldEFsbEZpbGVNYW5hZ2VycygpO1xyXG4gICAgICAgIGZpbGVNYW5hZ2Vycy5mb3JFYWNoKGVsZW1lbnQgPT4ge1xyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgbGV0IHJlZ2lvbmFsTWFuYWdlcnMgPSBlbGVtZW50LmdldEFsbFJlZ2lvbmFsTWFuYWdlcnMoKTtcclxuICAgICAgICAgICAgcmVnaW9uYWxNYW5hZ2Vycy5mb3JFYWNoKHJlZ2lvbk1hbmFnZXIgPT4ge1xyXG4gICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICByZWdpb25NYW5hZ2VyLnVwZGF0ZVJlbmRlcmVkTWFya2Rvd24oKVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBzZXR1cE1hcmtkb3duUG9zdFByb2Nlc3NvcigpIHtcclxuICAgICAgICB0aGlzLnJlZ2lzdGVyTWFya2Rvd25Qb3N0UHJvY2Vzc29yKGFzeW5jIChlbCwgY3R4KSA9PiB7XHJcblxyXG4gICAgICAgICAgICBpZih0aGlzLnNldHRpbmdzLnJlbmRlck9uTW9iaWxlID09PSBmYWxzZSAmJlxyXG4gICAgICAgICAgICAgICBQbGF0Zm9ybS5pc01vYmlsZSA9PT0gdHJ1ZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBjb25zdCBzb3VyY2VQYXRoID0gY3R4LnNvdXJjZVBhdGg7XHJcblxyXG4gICAgICAgICAgICBsZXQgZmlsZURPTU1hbmFnZXIgPSB0aGlzLmdsb2JhbE1hbmFnZXIuZ2V0RmlsZU1hbmFnZXIoc291cmNlUGF0aCk7XHJcbiAgICAgICAgICAgIGlmKGZpbGVET01NYW5hZ2VyID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkZvdW5kIG51bGwgRE9NIG1hbmFnZXIuIENvdWxkIG5vdCBwcm9jZXNzIG11bHRpLWNvbHVtbiBtYXJrZG93bi5cIilcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIEhlcmUgd2UgY2hlY2sgaWYgdGhlIGV4cG9ydCBcInByaW50XCIgZmxhZyBpcyBpbiB0aGUgRE9NIHNvIHdlIGNhbiBkZXRlcm1pbmUgaWYgd2VcclxuICAgICAgICAgICAgICogYXJlIGV4cG9ydGluZyBhbmQgaGFuZGxlIHRoYXQgY2FzZS5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGlmKHRoaXMuY2hlY2tFeHBvcnRpbmcoZWwpKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5leHBvcnREb2N1bWVudFRvUERGKGVsLCBmaWxlRE9NTWFuYWdlciwgc291cmNlUGF0aCk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIEdldCB0aGUgaW5mbyBmb3Igb3VyIGN1cnJlbnQgY29udGV4dCBhbmQgdGhlbiBjaGVja1xyXG4gICAgICAgICAgICAvLyBpZiB0aGUgZW50aXJlIHRleHQgY29udGFpbnMgYSBzdGFydCB0YWcuIElmIHRoZXJlIGlzXHJcbiAgICAgICAgICAgIC8vIG5vIHN0YXJ0IHRhZyBpbiB0aGUgZG9jdW1lbnQgd2UgY2FuIGp1c3QgcmV0dXJuIGFuZFxyXG4gICAgICAgICAgICAvLyBpZ25vcmUgdGhlIHJlc3Qgb2YgdGhlIHBhcnNpbmcuXHJcbiAgICAgICAgICAgIGxldCBpbmZvID0gY3R4LmdldFNlY3Rpb25JbmZvKGVsKTtcclxuXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBXZSBuZWVkIHRoZSBjb250ZXh0IGluZm8gdG8gcHJvcGVybHkgcGFyc2Ugc28gcmV0dXJuaW5nIGhlcmUgXHJcbiAgICAgICAgICAgICAqIGluZm8gaXMgbnVsbC4gVE9ETzogU2V0IGVycm9yIGluIHZpZXcgaWYgdGhpcyBvY2N1cnMuXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBpZighaW5mbykge1xyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IGRvY1N0cmluZyA9IGluZm8udGV4dDtcclxuICAgICAgICAgICAgbGV0IGRvY0xpbmVzID0gZG9jU3RyaW5nLnNwbGl0KFwiXFxuXCIpO1xyXG5cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIElmIHdlIGVuY291bnRlciBhIHN0YXJ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XHJcbiAgICAgICAgICAgICAgICAgKiBTZXQgdXAgdGhlIGN1cnJlbnQgZWxlbWVudCB0byBhY3QgYXMgdGhlIHBhcmVudCBmb3IgdGhlIFxyXG4gICAgICAgICAgICAgICAgICogbXVsdGktY29sdW1uIHJlZ2lvbi5cclxuICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgZWwuY2hpbGRyZW5bMF0uZGV0YWNoKCk7XHJcbiAgICAgICAgICAgICAgICBlbC5jbGFzc0xpc3QuYWRkKE11bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvblJvb3RDb250YWluZXJEaXYpXHJcbiAgICAgICAgICAgICAgICBsZXQgcmVuZGVyRXJyb3JSZWdpb24gPSBlbC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNsczogYCR7TXVsdGlDb2x1bW5MYXlvdXRDU1MuUmVnaW9uRXJyb3JDb250YWluZXJEaXZ9ICR7TXVsdGlDb2x1bW5TdHlsZUNTUy5SZWdpb25FcnJvck1lc3NhZ2V9YCxcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgbGV0IHJlbmRlckNvbHVtblJlZ2lvbiA9IGVsLmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBNdWx0aUNvbHVtbkxheW91dENTUy5SZWdpb25Db250ZW50Q29udGFpbmVyRGl2XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBzdGFydEJsb2NrRGF0YSA9IG11bHRpQ29sdW1uUGFyc2VyLmdldFN0YXJ0QmxvY2tBYm92ZUxpbmUobGluZXNPZkVsZW1lbnQpXHJcbiAgICAgICAgICAgICAgICBpZihzdGFydEJsb2NrRGF0YSA9PT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgbGV0IHJlZ2lvbktleSA9IHN0YXJ0QmxvY2tEYXRhLnN0YXJ0QmxvY2tLZXk7XHJcbiAgICAgICAgICAgICAgICBpZihmaWxlRE9NTWFuYWdlci5jaGVja0tleUV4aXN0cyhyZWdpb25LZXkpID09PSB0cnVlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCB7IG51bWJlck9mVGFncywga2V5cyB9ID0gbXVsdGlDb2x1bW5QYXJzZXIuY291bnRTdGFydFRhZ3MoaW5mby50ZXh0KTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG51bU1hdGNoZXMgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCBudW1iZXJPZlRhZ3M7IGkrKykge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQmVjYXVzZSB3ZSBjaGVja2VkIGlmIGtleSBleGlzdHMgb25lIG9mIHRoZXNlIGhhcyB0byBtYXRjaC5cclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoa2V5c1tpXSA9PT0gcmVnaW9uS2V5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1NYXRjaGVzKys7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIFdlIG9ubHkgd2FudCB0byBkaXNwbGF5IGFuIGVycm9yIGlmIHRoZXJlIGFyZSBtb3JlIHRoYW4gMiBvZiB0aGUgc2FtZSBpZCBhY3Jvc3NcclxuICAgICAgICAgICAgICAgICAgICAvLyB0aGUgd2hvbGUgZG9jdW1lbnQuIFRoaXMgcHJldmVudHMgZXJyb3Mgd2hlbiBvYnNpZGlhbiByZWxvYWRzIHRoZSB3aG9sZSBkb2N1bWVudFxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGFuZCB0aGVyZSBhcmUgdHdvIG9mIHRoZSBzYW1lIGtleSBpbiB0aGUgbWFwLlxyXG4gICAgICAgICAgICAgICAgICAgIGlmKG51bU1hdGNoZXMgPj0gMikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihyZWdpb25LZXkgPT09IFwiXCIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbmRlckVycm9yUmVnaW9uLmlubmVyVGV4dCA9IFwiRm91bmQgbXVsdGlwbGUgcmVnaW9ucyB3aXRoIGVtcHR5IElEcy4gUGxlYXNlIHNldCBhIHVuaXF1ZSBJRCBhZnRlciBlYWNoIHN0YXJ0IHRhZy5cXG5FRzogJz09PSBtdWx0aS1jb2x1bW4tc3RhcnQ6IHJhbmRvbUlEJ1xcbk9yIHVzZSAnRml4IE1pc3NpbmcgSURzJyBpbiB0aGUgY29tbWFuZCBwYWxldHRlIGFuZCByZWxvYWQgdGhlIGRvY3VtZW50LlwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJFcnJvclJlZ2lvbi5pbm5lclRleHQgPSBcIlJlZ2lvbiBJRCBhbHJlYWR5IGV4aXN0cyBpbiBkb2N1bWVudCwgcGxlYXNlIHNldCBhIHVuaXF1ZSBJRC5cXG5FRzogJz09PSBtdWx0aS1jb2x1bW4tc3RhcnQ6IHJhbmRvbUlEJ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsLmlkID0gYE11bHRpQ29sdW1uSUQ6JHtyZWdpb25LZXl9YFxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50TWFya2Rvd25SZW5kZXJlciA9IG5ldyBNYXJrZG93blJlbmRlckNoaWxkKGVsKTtcclxuICAgICAgICAgICAgICAgIGZpbGVET01NYW5hZ2VyLmNyZWF0ZVJlZ2lvbmFsTWFuYWdlcihyZWdpb25LZXksIGVsLCByZW5kZXJFcnJvclJlZ2lvbiwgcmVuZGVyQ29sdW1uUmVnaW9uKTtcclxuICAgICAgICAgICAgICAgIGVsZW1lbnRNYXJrZG93blJlbmRlcmVyLm9udW5sb2FkID0gKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKGZpbGVET01NYW5hZ2VyKSB7XHJcbiAgICBcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZURPTU1hbmFnZXIucmVtb3ZlUmVnaW9uKHN0YXJ0QmxvY2tEYXRhLnN0YXJ0QmxvY2tLZXkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICBjdHguYWRkQ2hpbGQoZWxlbWVudE1hcmtkb3duUmVuZGVyZXIpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgICAgICogTm93IHdlIGhhdmUgY3JlYXRlZCBvdXIgcmVnaW9uYWwgbWFuYWdlciBhbmQgZGVmaW5lZCB3aGF0IGVsZW1lbnRzIFxyXG4gICAgICAgICAgICAgICAgICogbmVlZCB0byBiZSByZW5kZXJlZCBpbnRvLiBTbyB3ZSBjYW4gcmV0dXJuIHdpdGhvdXQgYW55IG1vcmUgcHJvY2Vzc2luZy5cclxuICAgICAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy8jZW5kcmVnaW9uIERlcHJlY2lhdGVkIFN0YXJ0IFRhZ1xyXG5cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIENoZWNrIGlmIGFueSBvZiB0aGUgbGluZXMgYWJvdmUgdXMgY29udGFpbiBhIHN0YXJ0IGJsb2NrLCBhbmQgaWZcclxuICAgICAgICAgICAgICogc28gZ2V0IHRoZSBsaW5lcyBmcm9tIG91ciBjdXJyZW50IGVsZW1lbnQgdG8gdGhlIHN0YXJ0IGJsb2NrLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgbGV0IHN0YXJ0Qm9ja0Fib3ZlID0gbXVsdGlDb2x1bW5QYXJzZXIuZ2V0U3RhcnRCbG9ja09yQ29kZWJsb2NrQWJvdmVMaW5lKGxpbmVzQWJvdmVBcnJheSk7XHJcbiAgICAgICAgICAgIGlmKHN0YXJ0Qm9ja0Fib3ZlID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIFdlIG5vdyBrbm93IHdlJ3JlIHdpdGhpbiBhIG11bHRpLWNvbHVtbiByZWdpb24sIHNvIHdlIHVwZGF0ZSBvdXJcclxuICAgICAgICAgICAgICogbGlzdCBvZiBsaW5lcyBhYm92ZSB0byBqdXN0IGJlIHRoZSBpdGVtcyB3aXRoaW4gdGhpcyByZWdpb24uXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBsaW5lc0Fib3ZlQXJyYXkgPSBzdGFydEJvY2tBYm92ZS5saW5lc0Fib3ZlQXJyYXk7XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogV2UgdXNlIHRoZSBzdGFydCBibG9jaydzIGtleSB0byBnZXQgb3VyIHJlZ2lvbmFsIG1hbmFnZXIuIElmIHRoaXNcclxuICAgICAgICAgICAgICogbG9va3VwIGZhaWxzIHdlIGNhbiBub3QgY29udGludWUgcHJvY2Vzc2luZyB0aGlzIGVsZW1lbnQuXHJcbiAgICAgICAgICAgICAqL1xyXG4gICAgICAgICAgICBsZXQgcmVnaW9uYWxDb250YWluZXI6IFJlZ2lvbk1hbmFnZXJDb250YWluZXIgPSBmaWxlRE9NTWFuYWdlci5nZXRSZWdpb25hbENvbnRhaW5lcihzdGFydEJvY2tBYm92ZS5zdGFydEJsb2NrS2V5KTtcclxuICAgICAgICAgICAgaWYocmVnaW9uYWxDb250YWluZXIgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVyblxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGxldCByZWdpb25hbE1hbmFnZXI6IFJlZ2lvbk1hbmFnZXIgPSByZWdpb25hbENvbnRhaW5lci5nZXRSZWdpb24oKTtcclxuXHJcbiAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgKiBUbyBtYWtlIHN1cmUgd2UncmUgcGxhY2luZyB0aGUgaXRlbSBpbiB0aGUgcmlnaHQgbG9jYXRpb24gKGFuZCBcclxuICAgICAgICAgICAgICogb3ZlcndyaXRlIGVsZW1lbnRzIHRoYXQgYXJlIG5vdyBnb25lKSB3ZSBub3cgd2FudCBhbGwgb2YgdGhlXHJcbiAgICAgICAgICAgICAqIGxpbmVzIGFmdGVyIHRoaXMgZWxlbWVudCB1cCB0byB0aGUgZW5kIHRhZy5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGxpbmVzQmVsb3dBcnJheSA9ICBtdWx0aUNvbHVtblBhcnNlci5nZXRFbmRCbG9ja0JlbG93KGxpbmVzQmVsb3dBcnJheSk7XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogTm93IHdlIHRha2UgdGhlIGxpbmVzIGFib3ZlIG91ciBjdXJyZW50IGVsZW1lbnQgdXAgdW50aWwgdGhlXHJcbiAgICAgICAgICAgICAqIHN0YXJ0IHJlZ2lvbiB0YWcgYW5kIHJlbmRlciB0aGF0IGludG8gYW4gSFRNTCBlbGVtZW50LiBXZSB3aWxsIFxyXG4gICAgICAgICAgICAgKiB1c2UgdGhlc2UgZWxlbWVudHMgdG8gZGV0ZXJtaW5lIHdoZXJlIHRvIHBsYWNlIG91ciBjdXJyZW50IGVsZW1lbnQuXHJcbiAgICAgIC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PYmplY3Qoc2libGluZ3NBYm92ZSwgc2libGluZ3NCZWxvdywgY3VycmVudE9iamVjdCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgZWxlbWVudE1hcmtkb3duUmVuZGVyZXIgPSBuZXcgTWFya2Rvd25SZW5kZXJDaGlsZChlbCk7XHJcbiAgICAgICAgICAgIGVsZW1lbnRNYXJrZG93blJlbmRlcmVyLm9udW5sb2FkID0gKCkgPT4ge1xyXG5cclxuICAgICAgICAgICAgICAgIGlmKHJlZ2lvbmFsQ29udGFpbmVyID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgIGxldCByZWdpb25hbE1hbmFnZXI6IFJlZ2lvbk1hbmFnZXIgPSByZWdpb25hbENvbnRhaW5lci5nZXRSZWdpb24oKTtcclxuICAgICAgICAgICAgICAgIGlmKHJlZ2lvbmFsTWFuYWdlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgICAgIC8vIFdlIGNhbiBhdHRlbXB0IHRvIHVwZGF0ZSB0aGUgdmlldyBoZXJlIGFmdGVyIHRoZSBpdGVtIGlzIHJlbW92ZWRcclxuICAgICAgICAgICAgICAgICAgICAvLyBidXQgbmVlZCB0byBnZXQgdGhlIGl0ZW0ncyBwYXJlbnQgZWxlbWVudCBiZWZvcmUgcmVtb3Zpbmcgb2JqZWN0IGZyb20gbWFuYWdlci5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVnaW9uUmVuZGVyRGF0YTogTXVsdGlDb2x1bW5SZW5kZXJEYXRhID0gcmVnaW9uYWxNYW5hZ2VyLmdldFJlZ2lvblJlbmRlckRhdGEoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uYWxNYW5hZ2VyLnJlbW92ZU9iamVjdChjdXJyZW50T2JqZWN0LlVJRCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8qKlxyXG4gICAgICAgICAgICAgICAgICAgICAqIE5lZWQgdG8gY2hlY2sgaGVyZSBpZiBlbGVtZW50IGlzIG51bGwgYXMgdGhpcyBjbG9zdXJlIHdpbGwgYmUgY2FsbGVkXHJcbiAgICAgICAgICAgICAgICAgICAgICogcmVwZWF0ZWRseSBvbiBmaWxlIGNoYW5nZS5cclxuICAgICAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgICAgICBpZihyZWdpb25SZW5kZXJEYXRhLnBhcmVudFJlbmRlckVsZW1lbnQgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIucmVuZGVyUmVnaW9uRWxlbWVudHNUb1NjcmVlbigpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGN0eC5hZGRDaGlsZChlbGVtZW50TWFya2Rvd25SZW5kZXJlcik7XHJcblxyXG4gICAgICAgICAgICAvKipcclxuICAgICAgICAgICAgICogTm93IHdlIGNoZWNrIGlmIG91ciBjdXJyZW50IGVsZW1lbnQgaXMgYSBzcGVjaWFsIGZsYWcgc28gd2UgY2FuXHJcbiAgICAgICAgICAgICAqIHByb3Blcmx5IHNldCB0aGUgZWxlbWVudCB0YWcgd2l0aGluIHRoZSByZWdpb25hbCBtYW5hZ2VyLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgaWYobXVsdGlDb2x1bW5QYXJzZXIuY29udGFpbnNFbmRUYWcoZWwudGV4dENvbnRlbnQpID09PSB0cnVlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgY3VycmVudE9iamVjdC5lbGVtZW50VHlwZSA9IEVsZW1lbnRSZW5kZXJUeXBlLnVuUmVuZGVyZWRcclxuICAgICAgICAgICAgICAgIGV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AgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIudXBkYXRlRWxlbWVudFRhZyhjdXJyZW50T2JqZWN0LlVJRCwgRE9NT2JqZWN0VGFnLnJlZ2lvblNldHRpbmdzKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGVsLmFkZENsYXNzKE11bHRpQ29sdW1uU3R5bGVDU1MuUmVnaW9uQ29udGVudClcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgcmVnaW9uYWxNYW5hZ2VyLnJlbmRlclJlZ2lvbkVsZW1lbnRzVG9TY3JlZW4oKVxyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBpc1N0YXJ0Q29kZWJsb2NrSW5FeHBvcnQobm9kZTogSFRNTEVsZW1lbnQpOiBib29sZWFuIHtcclxuXHJcbiAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IENPREVCTE9DS19TVEFSVF9TVFJTLmxlbmd0aDsgaSsrKSB7XHJcblxyXG4gICAgICAgICAgICBpZihub2RlLmhhc0NsYXNzKGBibG9jay1sYW5ndWFnZS0ke0NPREVCTE9DS19TVEFSVF9TVFJTW2ldfWApKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBhc3luYyBleHBvcnREb2N1bWVudFRvUERGKGVsOiBIVE1MRWxlbWVudCwgZmlsZURPTU1hbmFnZXI6IEZpbGVET01NYW5hZ2VyLCBzb3VyY2VQYXRoOiBzdHJpbmcpIHtcclxuXHJcbiAgICAgICAgLy8gQSB0cnVlIGV4cG9ydCB3aWxsIGJlIHBhc3NlZCBhbiBlbGVtZW50IHdpdGggYWxsI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AgIGZvciAobGV0IGkgPSAwOyBpIDwgZG9jQ2hpbGRyZW4ubGVuZ3RoOyBpKyspIHtcclxuXHJcbiAgICAgICAgICAgIGxldCBjaGlsZCA9IGRvY0NoaWxkcmVuW2ldO1xyXG4gICAgICAgICAgICBpZiAoY2hpbGQgaW5zdGFuY2VvZiBIVE1MRWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IGNoaWxkRWwgPSBjaGlsZCBhcyBIVE1MRWxlbWVudDtcclxuICAgICAgICAgICAgICAgIGlmIChpbkJsb2NrID09PSBmYWxzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZEJsb2NrRGF0YSA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWdpb25LZXkgPSBcIlwiO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgYmxvY2tEYXRhID0gbXVsdGlDb2x1bW5QYXJzZXIuaXNTdGFydFRhZ1dpdGhJRChjaGlsZC50ZXh0Q29udGVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJsb2NrRGF0YS5pc1N0YXJ0VGFnID09PSB0cnVlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBhbiBvbGQtc3R5bGUgc3RhcnQgdGFnLlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3VuZEJsb2NrRGF0YSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChibG9ja0RhdGEuaGFzS2V5ID09PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm91bmRLZXkgPSBtdWx0aUNvbHVtblBhcnNlci5nZXRTdGFydFRhZ0tleShjaGlsZC50ZXh0Q29udGVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm91bmRLZXkgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdpb25LZXkgPSBmb3VuZEtleTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKGJsb2NrRGF0YS5pc1N0YXJ0VGFnID09PSBmYWxzZSAmJiB0aGlzLmlzU3RhcnRDb2RlYmxvY2tJbkV4cG9ydChjaGlsZCkpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZSBzdGFydCB0YWcgZnJvbSB0aGUgb2xkIHZlcnNpb24gaXMgbnVsbCB3ZSB0aGVuIGNoZWNrIHRvIHNlZSBpZiB0aGUgZWxlbWVudCBpc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhIGNvZGVibG9jayBzdGFydC4gSWYgaXQgaXMgd2UgdXNlIHRoZSBuZXh0IGF2YWlsYWJsZSBjb2RlYmxvY2sgZGF0YSB0byByZXRyaWV2ZSBvdXIgSUQuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlYmxvY2tUZXh0ID0gY29kZWJsb2NrU3RhcnRCbG9ja3Muc2hpZnQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29kZWJsb2NrVGV4dCA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRm91bmQgdW5kZWZpbmVkIGNvZGVibG9jayBkYXRhIHdoZW4gZXhwb3J0aW5nLlwiKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBwYXJzZVN0YXJ0UmVnaW9uQ29kZUJsb2NrSUQoY29kZWJsb2NrVGV4dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGlkICE9PSBcIlwiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZEJsb2NrRGF0YSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdpb25LZXkgPSBpZDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYoZm91bmRCbG9ja0RhdGEgPT09IHRydWUgJiYgcmVnaW9uS2V5ICE9PSBcIlwiKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbkJsb2NrID0gdHJ1ZTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSBjaGlsZC5jaGlsZHJlbi5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGQuY2hpbGRyZW5baV0uZGV0YWNoKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGQuaW5uZXJUZXh0ID0gXCJcIjtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkLmNsYXNzTGlzdC5hZGQoTXVsdGlDb2x1bW5MYXlvdXRDU1MuUmVnaW9uUm9vdENvbnRhaW5lckRpdik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZW5kZXJFcnJvclJlZ2lvbiA9IGNoaWxkLmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGAke011bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvbkVycm9yQ29udGFpbmVyRGl2fSwgJHtNdWx0aUNvbHVtblN0eWxlQ1NTLlJlZ2lvbkVycm9yTWVzc2FnZX1gLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxu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ZvcmUgZXhwb3J0aW5nLlwiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlZ2lvbmFsTWFuYWdlcjogUmVnaW9uTWFuYWdlciA9IHJlZ2lvbmFsQ29udGFpbmVyLmdldFJlZ2lvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnaW9uYWxNYW5hZ2VyLmV4cG9ydFJlZ2lvbkVsZW1lbnRzVG9QREYocmVuZGVyQ29sdW1uUmVnaW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAobXVsdGlDb2x1bW5QYXJzZXIuY29udGFpbnNFbmRUYWcoY2hpbGQudGV4dENvbnRlbnQpID09PSB0cnVlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbkJsb2NrID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBjaGlsZHJlblRvUmVtb3ZlLnB1c2goY2hpbGQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjaGlsZHJlblRvUmVtb3ZlLmZvckVhY2goY2hpbGQgPT4ge1xyXG4gICAgICAgICAgICBpZihjaGlsZC5wYXJlbnRFbGVtZW50ID09PSBlbCkge1xyXG4gICAgICAgICAgICAgICAgZWwucmVtb3ZlQ2hpbGQoY2hpbGQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgY2hlY2tFeHBvcnRpbmcoZWxlbWVudDogSFRNTEVs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G4gICAgICAgICAgICAvLyBzb3VyY2UvbGl2ZSBwcmV2aWV3IG1vZGUgaXMgaGFuZGxlZCBieSB0aGUgQ002IGltcGxlbWVudGF0aW9uLlxyXG4gICAgICAgICAgICBlbC5wYXJlbnRFbGVtZW50Py5hZGRDbGFzcyhcInByZWl2ZXctbWNtLXN0YXJ0LWJsb2NrXCIpO1xyXG4gICAgICAgIFxyXG4gICAgICAgICAgICAvLyBUbyBkZXRlcm1pbmUgd2hhdCBraW5kIG9mIHZpZXcgd2UgYXJlIHJlbmRlcmluZyBpbiB3ZSBuZWVkIGEgbWFya2Rvd24gbGVhZi5cclxuICAgICAgICAgICAgLy8gUmVhbGx5IHRoaXMgc2hvdWxkIG5ldmVyIHJldHVybiBoZXJlIHNpbmNlIHJlbmRlcmluZyBpcyBvbmx5IGRvbmUgaW4gbWFya2Rvd24gbGVhdmVzLlxyXG4gICAgICAgICAgICBsZXQgbWFya2Rvd25MZWF2ZXMgPSBhcHAud29ya3NwYWNlLmdldExlYXZlc09mVHlwZShcIm1hcmtkb3duXCIpO1xyXG4gICAgICAgICAgICBpZihtYXJrZG93bkxlYXZlcy5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIFxyXG4gICAgICAgICAgICAvLyBDaGVjayB0aGUgdHlwZSBvZiB0aGUgbGVhZlxyXG4gICAgICAgICAgICBsZXQgZm91bmRGaWxlTGVhZiA9IGZhbHNlO1xyXG4gICAgICAgICAgICBmb3IobGV0IGkgPSAwOyBpIDwgbWFya2Rvd25MZWF2ZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICBcclxuICAgICAgICAgICAgICAgIGxldCBmaWxlTGVhZiA9IGdldEZpbGVMZWFmKHNvdXJjZVBhdGgpO1xyXG4gICAgICAgICAgICAgICAgaWYoZmlsZUxlYWYgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGZvdW5kRmlsZUxlYWYgPSB0cnVlO1xyXG4gICAgICAgIFxyXG4gICAgICAgICAgICAgICAgaWYoZ2V0TGVhZlNvdXJjZU1vZGUoZmlsZUxlYWYpID09PSBcInNvdXJjZVwiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyB3YXMgYWRkZWQgd2hlbiBpbXBsZW1lbnRpbmcgbGl2ZSBwcmV2aWV3LCBidXQgdGhlIHJlYXNvbiBpdCB3YXMgb3JpZ2luYWxseSBhZGRlZCBhcHBlYXJzIHRvIG5vIGxvbmdlciBiZSBhbiBpc3N1ZS5cclxuICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmluZyB0aGUgcmV0dXJuIGZyb20gaGVyZSB0byBmaXggYnVnIHdoZXJlIG9wZW5pbmcgbXVsdGlwbGUgY29waWVzIG9mIHRoZSBkb2N1bWVudCBjYXVzZXMgcmVnaW9ucyB0byBub3QgcmVuZGVyLlxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZGVidWcoXCJMZWFmIG9mIGZpbGUgaXMgaW4gc291cmNlIG1vZGUuIFNob3VsZCB3ZSBiZSBpZ25vcmluZyBwb3N0IHByb2Nlc3NpbmcgaGVyZT9cIilcclxuICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICBcclxuICAgICAgICAgICAgaWYodGhpcy5nbG9iYWxNYW5hZ2VyID09PSBudWxsIHx8IHRoaXMuZ2xvYmFsTWFuYWdlciA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZyhcIkdsb2JhbCBtYW5hZ2VyIGlzIHVuZGVmaW5lZD9cIik7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxldCBmaWxlRE9NTWFuYWdlciA9IHRoaXMuZ2xvYmFsTWFuYWdlci5nZXRGaWxlTWFuYWdlcihzb3VyY2VQYXRoKTtcclxuICAgICAgICAgICAgaWYoZmlsZURPTU1hbmFnZXIgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgLy8gU2V0IGZpbGUgdG8gaGF2ZSBzdGFydCB0YWcuXHJcbiAgICAgICAgICAgIGZpbGVET01NYW5hZ2VyLnNldEhhc1N0YXJ0VGFnKCk7XHJcbiAgICAgICAgXHJcbiAgICAgICAgICAgIC8vIEdldCB0aGUgaW5mbyBmb3Igb3VyIGN1cnJlbnQgY29udGV4dCBhbmQgdGhlbiBjaGVja1xyXG4gICAgICAgICAgICAvLyBpZiB0aGUgZW50aXJlIHRleHQgY29udGFpbnMgYSBzdGFydCB0YWcuIElmIHRoZXJlIGlzXHJcbiAgICAgICAgICAgIC8vIG5vIHN0YXJ0IHRhZyBpbiB0aGUgZG9jdW1lbnQgd2UgY2FuIGp1c3QgcmV0dXJuIGFuZFxyXG4gICAgICAgICAgICAvLyBpZ25vcmUgdGhlIHJlc3Qgb2YgdGhlIHBhcnNpbmcuXHJcbiAgICAgICAgICAgIGxldCBpbmZvID0gY3R4LmdldFNlY3Rpb25JbmZvKGVsKTtcclxuICAgICAgICBcclxuICAgICAgICAgICAgLyoqXHJcbiAgICAgICAgICAgICAqIFdlIG5lZWQgdGhlIGNvbnRleHQgaW5mbyB0byBwcm9wZXJseSBwYXJzZSBzbyByZXR1cm5pbmcgaGVyZSBcclxuICAgICAgICAgICAgICogaW5mbyBpcyBudWxsLiBUT0RPOiBTZXQgZXJyb3IgaW4gdmlldyBpZiB0aGlzIG9jY3Vycy5cclxuICAgICAgICAgICAgICovXHJcbiAgICAgICAgICAgIGlmKCFpbmZvKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICBcclxuICAgICAgICAgICAgLyoqIFxyXG4gICAgICAgICAgICAgKiBTZXQgdXAgdGhlIGN1cnJlbnQgZWxlbWVudCB0byBhY3QgYXMgdGhlIHBhcmVudCBmb3IgdGhlIFxyXG4gICAgICAgICAgICAgKiBtdWx0aS1jb2x1bW4gcmVnaW9uLlxyXG4gICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgZWwuY2xhc3NMaXN0LmFkZChNdWx0aUNvbHVtbkxheW91dENTUy5SZWdpb25Sb290Q29udGFpbmVyRGl2KVxyXG4gICAgICAgICAgICBsZXQgcmVuZGVyRXJyb3JSZWdpb24gPSBlbC5jcmVhdGVEaXYoe1xyXG4gICAgICAgICAgICAgICAgY2xzOiBgJHtNdWx0aUNvbHVtbkxheW91dENTUy5SZWdpb25FcnJvckNvbnRhaW5lckRpdn0gJHtNdWx0aUNvbHVtblN0eWxlQ1NTLlJlZ2lvbkVycm9yTWVzc2FnZX1gLFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbGV0IHJlbmRlckNvbHVtblJlZ2lvbiA9IGVsLmNyZWF0ZURpdih7XHJcbiAgICAgICAgICAgICAgICBjbHM6IE11bHRpQ29sdW1uTGF5b3V0Q1NTLlJlZ2lvbkNvbnRlbnRDb250YWluZXJEaXZcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICBcclxuICAgICAgICAgICAgbGV0IHJlZ2lvbktleSA9IHBhcnNlU3RhcnRSZWdpb25Db2RlQmxvY2tJRChzb3VyY2UpO1xyXG4gICAgICAgIFxyXG4gICAgICAgICAgICBsZXQgY3JlYXRlTmV3UmVnaW9uTWFuYWdlciA9IHRydWU7XHJcbiAgICAgICAgICAgIGlmKGZpbGVET01NYW5hZ2VyLmNoZWNrS2V5RXhpc3RzKHJlZ2lvbktleSkgPT09IHRydWUpIHtcclxuICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgY3JlYXRlTmV3UmVnaW9uTWFuYWdlciA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgbGV0IHsgbnVtYmVyT2ZUYWdzLCBrZXlzIH0gPSBtdWx0aUNvbHVtblBhcnNlci5jb3VudFN0YXJ0VGFncyhpbmZvLnRleHQpO1xyXG4gICAgICAgIFxyXG4gICAgICAgICAgICAgICAgbGV0IG51bU1hdGNoZXMgPSAwO1xyXG4gICAgICAgICAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IG51bWJlck9mVGFnczsgaSsrKSB7XHJcbiAgICAgICAgXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gQmVjYXVzZSB3ZSBjaGVja2VkIGlmIGtleSBleGlzdHMgb25lIG9mIHRoZXNlIGhhcyB0byBtYXRjaC5cclxuICAgICAgICAgICAgICAgICAgICBpZihrZXlzW2ldID09PSByZWdpb25LZXkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbnVtTWF0Y2hlcysrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICBcclxuICAgICAgICAgICAgICAgIC8vIFdlIG9ubHkgd2FudCB0byBkaXNwbGF5IGFuIGVycm9yIGlmIHRoZXJlIGFyZSBtb3JlIHRoYW4gMiBvZiB0aGUgc2FtZSBpZCBhY3Jvc3NcclxuICAgICAgICAgICAgICAgIC8vIHRoZSB3aG9sZSBkb2N1bWVudC4gVGhpcyBwcmV2ZW50cyBlcnJvcyB3aGVuIG9ic2lkaWFuIHJlbG9hZHMgdGhlIHdob2xlIGRvY3VtZW50XHJcbiAgICAgICAgICAgICAgICAvLyBhbmQgdGhlcmUgYXJlIHR3byBvZiB0aGUgc2FtZSBrZXkgaW4gdGhlIG1hcC5cclxuICAgICAgICAgICAgICAgIGlmKG51bU1hdGNoZXMgPj0gMikge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKHJlZ2lvbktleSA9PT0gXCJcIikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJFcn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lci5yZW1vdmVSZWdpb24ocmVnaW9uS2V5KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgY3R4LmFkZENoaWxkKGVsZW1lbnRNYXJrZG93blJlbmRlcmVyKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIFxyXG4gICAgICAgICAgICBsZXQgcmVnaW9uYWxNYW5hZ2VyQ29udGFpbmVyID0gZmlsZURPTU1hbmFnZXIuZ2V0UmVnaW9uYWxDb250YWluZXIocmVnaW9uS2V5KTtcclxuICAgICAgICAgICAgaWYocmVnaW9uYWxNYW5hZ2VyQ29udGFpbmVyICE9PSBudWxsKSB7XHJcbiAgICAgICAgXHJcbiAgICAgICAgICAgICAgICBsZXQgcmVnaW9uYWxNYW5hZ2VyID0gcmVnaW9uYWxNYW5hZ2VyQ29udGFpbmVyLnNldFJlZ2lvblNldHRpbmdzKHNvdXJjZSk7XHJcbiAgICAgICAgICAgICAgICByZWdpb25hbE1hbmFnZXIucmVnaW9uUGFyZW50ID0gZWw7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KVxyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGxvYWRTZXR0aW5ncygpIHtcclxuXHJcblx0XHR0aGlzLnNldHRpbmdzID0gT2JqZWN0LmFzc2lnbih7fSwgREVGQVVMVF9TRVRUSU5HUywgYXdhaXQgdGhpcy5sb2FkRGF0YSgpKTtcclxuXHR9XHJcblxyXG5cdGFzeW5jIHNhdmVTZXR0aW5ncygpIHtcclxuXHRcdGF3YWl0IHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcblx0fVxyXG59XHJcblxyXG5cclxuZXhwb3J0IHR5cGUgbmVhcmJ5U2libGluZ3MgPSB7IFxyXG4gICAgc2libGluZ3NBYm92ZTogSFRNTERpdkVsZW1lbnQsXHJcbiAgICBjdXJyZW50T2JqZWN0OiBET01PYmplY3QsIFxyXG59XHJ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1QixDQUFDLE9BQWlCLEVBQUUsVUFBa0IsRUFBQTtBQUVsRTs7Ozs7O0FBTUc7QUFDSCxJQUFBLElBQUksUUFBUSxHQUFHLFNBQVMsRUFBRSxDQUFDO0FBQzNCLElBQUEsSUFBSSxtQkFBbUIsR0FBRyxJQUFJQSw0QkFBbUIsQ0FDN0MsUUFBUSxDQUNYLENBQUM7QUFDRixJQUFBRSx5QkFBZ0IsQ0FBQyxjQUFjLENBQzNCLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQyxJQUFJLEVBQUUsT0FBTyxLQUFJO0FBQzdCLFFBQUEsT0FBTyxJQUFJLEdBQUcsSUFBSSxHQUFJLE9BQU8sQ0FBQztLQUNqQyxFQUFFLEVBQUUsQ0FBQyxFQUNOLFFBQVEsRUFDUixVQUFVLEVBQ1YsbUJBQW1CLENBQ3RCLENBQUM7QUFFRixJQUFBLE9BQU8sUUFBUSxDQUFDO0FBQ3BCOzs7OyJ9
diff --git a/.obsidian/plugins/multi-column-markdown/manifest.json b/.obsidian/plugins/multi-column-markdown/manifest.json
index 52c1bc6e..e1b46226 100644
--- a/.obsidian/plugins/multi-column-markdown/manifest.json
+++ b/.obsidian/plugins/multi-column-markdown/manifest.json
@@ -1,7 +1,7 @@
{
"id": "multi-column-markdown",
"name": "Multi-Column Markdown",
- "version": "0.7.6",
+ "version": "0.7.7",
"minAppVersion": "1.0.3",
"description": "This plugin adds functionality to create markdown documents with multiple columns of content viewable within Obsidian's preview mode",
"author": "Cameron Robinson",
diff --git a/.obsidian/plugins/multi-column-markdown/styles.css b/.obsidian/plugins/multi-column-markdown/styles.css
index c0f2c678..df1ca041 100644
--- a/.obsidian/plugins/multi-column-markdown/styles.css
+++ b/.obsidian/plugins/multi-column-markdown/styles.css
@@ -86,6 +86,10 @@
text-align: center;
}
+.mcm-error-message-color {
+ color: var(--text-error);
+}
+
.mcm-column-root-container {
margin: 1.5625em 0;
}
@@ -163,4 +167,9 @@
.mcm-content-alignment-right {
text-align: right;
+}
+
+.mcm-span-content-alignment-center {
+ display: block;
+ text-align: center;
}
\ No newline at end of file
diff --git a/.obsidian/plugins/podnotes/main.js b/.obsidian/plugins/podnotes/main.js
index 0241002e..8e684a07 100644
--- a/.obsidian/plugins/podnotes/main.js
+++ b/.obsidian/plugins/podnotes/main.js
@@ -8786,6 +8786,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "podnotes-show-leaf",
name: "Show PodNotes",
+ icon: "podcast",
checkCallback(checking) {
if (checking) {
return !app.workspace.getLeavesOfType(VIEW_TYPE).length;
@@ -8798,6 +8799,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "start-playing",
name: "Play Podcast",
+ icon: "play-circle",
checkCallback: (checking) => {
if (checking) {
return !this.api.isPlaying && !!this.api.podcast;
@@ -8808,6 +8810,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "stop-playing",
name: "Stop Podcast",
+ icon: "stop-circle",
checkCallback: (checking) => {
if (checking) {
return this.api.isPlaying && !!this.api.podcast;
@@ -8818,6 +8821,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "skip-backward",
name: "Skip Backward",
+ icon: "skip-back",
checkCallback: (checking) => {
if (checking) {
return this.api.isPlaying && !!this.api.podcast;
@@ -8828,6 +8832,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "skip-forward",
name: "Skip Forward",
+ icon: "skip-forward",
checkCallback: (checking) => {
if (checking) {
return this.api.isPlaying && !!this.api.podcast;
@@ -8838,6 +8843,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "download-playing-episode",
name: "Download Playing Episode",
+ icon: "download",
checkCallback: (checking) => {
if (checking) {
return !!this.api.podcast;
@@ -8857,6 +8863,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "capture-timestamp",
name: "Capture Timestamp",
+ icon: "clock",
editorCheckCallback: (checking, editor, view) => {
if (checking) {
return !!this.api.podcast && !!this.settings.timestamp.template;
@@ -8870,6 +8877,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "create-podcast-note",
name: "Create Podcast Note",
+ icon: "file-plus",
checkCallback: (checking) => {
if (checking) {
return !!this.api.podcast && !!this.settings.note.path && !!this.settings.note.template;
@@ -8880,6 +8888,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "get-share-link-episode",
name: "Copy universal episode link to clipboard",
+ icon: "share",
checkCallback: (checking) => {
if (checking) {
return !!this.api.podcast;
@@ -8890,6 +8899,7 @@ var PodNotes = class extends import_obsidian22.Plugin {
this.addCommand({
id: "podnotes-toggle-playback",
name: "Toggle playback",
+ icon: "play",
checkCallback: (checking) => {
if (checking) {
return !!this.api.podcast;
diff --git a/.obsidian/plugins/podnotes/manifest.json b/.obsidian/plugins/podnotes/manifest.json
index e83dd954..4f125c9f 100644
--- a/.obsidian/plugins/podnotes/manifest.json
+++ b/.obsidian/plugins/podnotes/manifest.json
@@ -1,7 +1,7 @@
{
"id": "podnotes",
"name": "PodNotes",
- "version": "2.10.6",
+ "version": "2.10.7",
"minAppVersion": "0.15.9",
"description": "Helps you write notes on podcasts.",
"author": "Christian B. B. Houmann",
diff --git a/.obsidian/plugins/recent-files-obsidian/data.json b/.obsidian/plugins/recent-files-obsidian/data.json
index 8d48184f..66e15393 100644
--- a/.obsidian/plugins/recent-files-obsidian/data.json
+++ b/.obsidian/plugins/recent-files-obsidian/data.json
@@ -8,6 +8,10 @@
"basename": "2023-03-04",
"path": "00.01 Admin/Calendars/2023-03-04.md"
},
+ {
+ "basename": "2023-03-05",
+ "path": "00.01 Admin/Calendars/2023-03-05.md"
+ },
{
"basename": "Server Tools",
"path": "05.02 Networks/Server Tools.md"
diff --git a/.obsidian/workspace-mobile.json b/.obsidian/workspace-mobile.json
index e06b95c9..1733928c 100644
--- a/.obsidian/workspace-mobile.json
+++ b/.obsidian/workspace-mobile.json
@@ -246,6 +246,7 @@
"active": "017a2190e40afd0b",
"lastOpenFiles": [
"00.01 Admin/Calendars/2023-03-04.md",
+ "00.01 Admin/Calendars/2023-03-05.md",
"01.02 Home/@Main Dashboard.md",
"05.02 Networks/Server Tools.md",
"00.01 Admin/Calendars/Events/2023-03-04 PSG - FC Nantes (4-2).md",
@@ -269,7 +270,6 @@
"05.02 Networks/Configuring UFW.md",
"05.02 Networks/Selfhosting.md",
"02.02 Paris/@Restaurants Paris.md",
- "02.02 Paris/Alluma.md",
- "00.01 Admin/Calendars/2023-03-01.md"
+ "02.02 Paris/Alluma.md"
]
}
\ No newline at end of file
diff --git a/00.01 Admin/Calendars/2023-03-04.md b/00.01 Admin/Calendars/2023-03-04.md
index 82e9e113..580e7de2 100644
--- a/00.01 Admin/Calendars/2023-03-04.md
+++ b/00.01 Admin/Calendars/2023-03-04.md
@@ -18,7 +18,7 @@ EarHeadBar: 35
BackHeadBar: 20
Water: 3.43
Coffee: 0
-Steps:
+Steps: 5690
Weight:
Ski:
IceSkating:
diff --git a/00.01 Admin/Calendars/2023-03-05.md b/00.01 Admin/Calendars/2023-03-05.md
new file mode 100644
index 00000000..15062805
--- /dev/null
+++ b/00.01 Admin/Calendars/2023-03-05.md
@@ -0,0 +1,134 @@
+---
+
+title: "🗒 Daily Note"
+allDay: true
+date: 2023-03-05
+Date: 2023-03-05
+DocType: Note
+Hierarchy:
+TimeStamp:
+location:
+CollapseMetaTable: true
+Sleep: 7
+Happiness: 90
+Gratefulness: 90
+Stress: 27.5
+FrontHeadBar: 5
+EarHeadBar: 35
+BackHeadBar: 20
+Water:
+Coffee:
+Steps:
+Weight:
+Ski:
+IceSkating:
+Riding:
+Racket:
+Football:
+Swim:
+
+---
+
+%% Parent:: [[@Life Admin]] %%
+
+---
+
+[[2023-03-04|<< 🗓 Previous ]] [[@Main Dashboard|Back]] [[2023-03-06|🗓 Next >>]]
+
+---
+
+
+
+```button
+name Record today's health
+type command
+action MetaEdit: Run MetaEdit
+id EditMetaData
+```
+^button-2023-03-05Edit
+
+```button
+name Save
+type command
+action Save current file
+id Save
+```
+^button-2023-03-05NSave
+
+
+
+# 2023-03-05
+
+
+
+> [!summary]+
+> Daily note for 2023-03-05
+
+
+
+```toc
+style: number
+```
+
+
+
+---
+
+
+
+### ✅ Tasks of the day
+
+
+
+```tasks
+not done
+due on 2023-03-05
+path does not include Templates
+hide backlinks
+hide task count
+```
+
+
+
+---
+
+
+
+### 📝 Memos
+
+
+
+This section does serve for quick memos.
+
+
+
+
+%% --- %%
+
+
+---
+
+
+
+### 🗒 Notes
+
+
+
+Loret ipsum
+
+
+
+---
+
+
+
+### :link: Linked activity
+
+
+
+```dataview
+Table from [[2023-03-05]]
+```
+
+
+
\ No newline at end of file
diff --git a/00.01 Admin/Calendars/Events/2023-03-09 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-03-09 🩺 Médecin.md
deleted file mode 100644
index 16e6d8ba..00000000
--- a/00.01 Admin/Calendars/Events/2023-03-09 🩺 Médecin.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: 🩺 Médecin
-allDay: false
-startTime: 12:15
-endTime: 12:45
-date: 2023-03-09
-completed: null
----