mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00

* Updating rebuilt client-side assets that only changed in terms of sourceMappingURL * Updating rebuilt client-side assets that changed functionally * Fixing/simplifying Layout editor toolbox stickyness and height restriction to viewport * Compile workflow: Upgrading actions/checkout and microsoft/setup-msbuild actions to their latest versions * Compile workflow: Adding steps to validate that the client-side assets are up-to-date * Compile workflow: Temporarily disabling MSBuild steps * Moving client-side assets build to a separate job in the compile workflow * Updating client-side compilation job * Temporarily disabling the .NET build * Separating package install from asset rebuild * Adding debug command * Fixing working directory * Debugging * Attempting to get rid of false positives due to line ending changes * Removing debug code * Checking asset validation by modifying Orchard.Resources/Assets/Less/Bootstrap/variables.less, but not its derivatives * Revert "Checking asset validation by modifying Orchard.Resources/Assets/Less/Bootstrap/variables.less, but not its derivatives" This reverts commit3fc9b8362b
. * Revert "Temporarily disabling the .NET build" This reverts commit2a8fef7793
. * Fixing error message when client-side assets are not up-to-date
329 lines
59 KiB
JavaScript
329 lines
59 KiB
JavaScript
/*
|
|
** NOTE: This file is generated by Gulp and should not be edited directly!
|
|
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
|
|
*/
|
|
|
|
/// <reference path="Typings/jquery.d.ts" />
|
|
/// <reference path="Typings/jqueryui.d.ts" />
|
|
/// <reference path="Typings/moment.d.ts" />
|
|
var Orchard;
|
|
(function (Orchard) {
|
|
var Azure;
|
|
(function (Azure) {
|
|
var MediaServices;
|
|
(function (MediaServices) {
|
|
var CloudVideoEdit;
|
|
(function (CloudVideoEdit) {
|
|
var requiredUploads;
|
|
function uploadCompleted(sender, e, data) {
|
|
var scope = $(sender).closest(".async-upload");
|
|
var status = data.errorThrown && data.errorThrown.length > 0 ? data.errorThrown : data.textStatus;
|
|
scope.find(".progress-bar").hide();
|
|
scope.find(".progress-text").hide();
|
|
scope.find(".progress-details").hide();
|
|
scope.find(".status.preparing").hide();
|
|
scope.find(".status.uploading").hide();
|
|
switch (status) {
|
|
case "error":
|
|
cleanup(scope, data);
|
|
alert("The upload of the selected file failed. You may try again after the cleanup has finished.");
|
|
return;
|
|
case "abort":
|
|
cleanup(scope, data);
|
|
return;
|
|
}
|
|
var editedFileName = scope.find("input[name$='.FileName']").val();
|
|
var statusUploaded = scope.find(".status.uploaded").show();
|
|
statusUploaded.text(statusUploaded.data("text-template").replace("{filename}", editedFileName));
|
|
scope.data("upload-isactive", false);
|
|
scope.data("upload-iscompleted", true);
|
|
scope.data("upload-start-time", null);
|
|
}
|
|
function cleanup(scope, data) {
|
|
var wamsAssetInput = scope.find("input[name$='.WamsAssetId']");
|
|
var fileNameInput = scope.find("input[name$='.FileName']");
|
|
var assetId = $.trim(wamsAssetInput.val());
|
|
var fileUploadWrapper = data.fileInput.closest(".file-upload-wrapper");
|
|
if (assetId.length > 0) {
|
|
var url = scope.data("delete-asset-url");
|
|
var antiForgeryToken = scope.closest("form").find("[name='__RequestVerificationToken']").val();
|
|
var cleanupMessage = scope.find(".status.cleanup");
|
|
wamsAssetInput.val("");
|
|
fileNameInput.val("");
|
|
cleanupMessage.show();
|
|
$.ajax({
|
|
url: url,
|
|
type: "DELETE",
|
|
data: {
|
|
id: assetId,
|
|
__RequestVerificationToken: antiForgeryToken
|
|
}
|
|
}).done(function () {
|
|
scope.data("upload-isactive", false);
|
|
scope.data("upload-start-time", null);
|
|
scope.find(".file-upload-wrapper").show();
|
|
cleanupMessage.hide();
|
|
}).fail(function () {
|
|
alert("An error occurred on the server while trying to clean up.");
|
|
});
|
|
}
|
|
fileUploadWrapper.show();
|
|
}
|
|
function pad(value, length) {
|
|
var str = value.toString();
|
|
while (str.length < length) {
|
|
str = "0" + str;
|
|
}
|
|
return str;
|
|
}
|
|
function createBlockId(blockIndex) {
|
|
var blockIdPrefix = "block-";
|
|
return btoa(blockIdPrefix + pad(blockIndex, 6));
|
|
}
|
|
function commitBlockList(scope, data) {
|
|
var deferred = $.Deferred();
|
|
var blockIds = scope.data("block-ids");
|
|
if (blockIds.length == 0) {
|
|
// The file was uploaded as a whole, so no manifest to submit.
|
|
deferred.resolve();
|
|
}
|
|
else {
|
|
// The file was uploaded in chunks.
|
|
var url = scope.data("sas-locator") + "&comp=blocklist";
|
|
var requestData = '<?xml version="1.0" encoding="utf-8"?><BlockList>';
|
|
for (var i = 0; i < blockIds.length; i++) {
|
|
requestData += '<Latest>' + blockIds[i] + '</Latest>';
|
|
}
|
|
requestData += '</BlockList>';
|
|
$.ajax({
|
|
url: url,
|
|
type: "PUT",
|
|
data: requestData,
|
|
contentType: "text/plain; charset=UTF-8",
|
|
crossDomain: true,
|
|
cache: false,
|
|
beforeSend: function (xhr) {
|
|
xhr.setRequestHeader('x-ms-date', new Date().toUTCString());
|
|
xhr.setRequestHeader('x-ms-blob-content-type', data.files[0].type);
|
|
xhr.setRequestHeader('x-ms-version', "2012-02-12");
|
|
xhr.setRequestHeader('Content-Length', requestData.length.toString());
|
|
},
|
|
success: function () {
|
|
deferred.resolve(data);
|
|
},
|
|
error: function (xhr, status, error) {
|
|
data.textStatus = status;
|
|
data.errorThrown = error;
|
|
deferred.fail(data);
|
|
}
|
|
});
|
|
}
|
|
return deferred.promise();
|
|
}
|
|
function hasActiveUploads() {
|
|
var scope = $(".upload-direct");
|
|
var flag = false;
|
|
scope.find(".async-upload").each(function () {
|
|
if ($(this).data("upload-isactive") == true) {
|
|
flag = true;
|
|
return false;
|
|
}
|
|
});
|
|
return flag;
|
|
}
|
|
function hasCompletedUploads() {
|
|
var scope = $(".upload-direct");
|
|
var flag = false;
|
|
scope.find(".async-upload").each(function () {
|
|
if ($(this).data("upload-iscompleted") == true) {
|
|
flag = true;
|
|
return false;
|
|
}
|
|
});
|
|
return flag;
|
|
}
|
|
function isSubmitting() {
|
|
var scope = $(".upload-direct");
|
|
return scope.data("is-submitting") == true;
|
|
}
|
|
;
|
|
function initializeUpload(fileInput) {
|
|
var scope = fileInput.closest(".async-upload");
|
|
var fileUploadWrapper = scope.find(".file-upload-wrapper");
|
|
var acceptFileTypesRegex = new RegExp(scope.data("upload-accept-file-types"));
|
|
var antiForgeryToken = scope.closest("form").find("[name='__RequestVerificationToken']").val();
|
|
var selectedFileWrapper = scope.find(".selected-file-wrapper");
|
|
var filenameInput = scope.find(".filename-input");
|
|
var resetButton = scope.find(".reset-button");
|
|
var uploadButton = scope.find(".upload-button");
|
|
var filenameText = scope.find(".filename-text");
|
|
var validationText = scope.find(".validation-text");
|
|
var preparingText = scope.find(".status.preparing");
|
|
var uploadingContainer = scope.find(".status.uploading");
|
|
var progressBar = scope.find(".progress-bar");
|
|
var progressText = scope.find(".progress-text");
|
|
var progressDetails = scope.find(".progress-details");
|
|
var cancelLink = scope.find(".cancel-link");
|
|
fileInput.fileupload({
|
|
autoUpload: false,
|
|
acceptFileTypes: acceptFileTypesRegex,
|
|
type: "PUT",
|
|
maxChunkSize: 4 * 1024 * 1024,
|
|
beforeSend: function (xhr, data) {
|
|
xhr.setRequestHeader("x-ms-date", new Date().toUTCString());
|
|
xhr.setRequestHeader("x-ms-blob-type", "BlockBlob");
|
|
xhr.setRequestHeader("content-length", data.data.size.toString());
|
|
},
|
|
chunksend: function (e, data) {
|
|
var blockIndex = scope.data("block-index");
|
|
var blockIds = scope.data("block-ids");
|
|
var blockId = createBlockId(blockIndex);
|
|
var url = scope.data("sas-locator") + "&comp=block&blockid=" + blockId;
|
|
data.url = url;
|
|
blockIds.push(blockId);
|
|
scope.data("block-index", blockIndex + 1);
|
|
},
|
|
progressall: function (e, data) {
|
|
var percentComplete = Math.floor((data.loaded / data.total) * 100);
|
|
var startTime = new Date(scope.data("upload-start-time"));
|
|
var elapsedMilliseconds = new Date(Date.now()).getTime() - startTime.getTime();
|
|
var elapsed = moment.duration(elapsedMilliseconds, "ms");
|
|
var remaining = moment.duration(elapsedMilliseconds / Math.max(data.loaded, 1) * (data.total - data.loaded), "ms");
|
|
var kbps = Math.floor(data.bitrate / 8 / 1000);
|
|
var uploaded = Math.floor(data.loaded / 1000);
|
|
var total = Math.floor(data.total / 1000);
|
|
progressBar.show().find(".progress").css("width", percentComplete + "%");
|
|
progressText.text(progressText.data("text-template").replace("{percentage}", percentComplete)).show();
|
|
progressDetails.text(progressDetails.data("text-template").replace("{uploaded}", uploaded).replace("{total}", total).replace("{kbps}", kbps).replace("{elapsed}", elapsed.humanize()).replace("{remaining}", remaining.humanize())).show();
|
|
},
|
|
done: function (e, data) {
|
|
var self = this;
|
|
commitBlockList(scope, data).always(function () {
|
|
uploadCompleted(self, e, data);
|
|
});
|
|
},
|
|
fail: function (e, data) {
|
|
uploadCompleted(this, e, data);
|
|
},
|
|
processdone: function (e, data) {
|
|
var selectedFilename = data.files[0].name;
|
|
scope.data("selected-filename", selectedFilename);
|
|
window.setTimeout(function () {
|
|
fileUploadWrapper.hide();
|
|
validationText.hide();
|
|
selectedFileWrapper.show();
|
|
filenameText.text(filenameText.data("text-template").replace("{filename}", selectedFilename));
|
|
}, 10);
|
|
scope[0].doReset = function () {
|
|
fileUploadWrapper.show();
|
|
filenameInput.val("");
|
|
filenameText.text("");
|
|
selectedFileWrapper.hide();
|
|
validationText.hide();
|
|
};
|
|
scope[0].doUpload = function () {
|
|
var editedFilename = filenameInput.val() || selectedFilename;
|
|
if (!acceptFileTypesRegex.test(editedFilename)) {
|
|
validationText.show();
|
|
return;
|
|
}
|
|
scope.data("upload-isactive", true);
|
|
scope.data("upload-start-time", Date.now());
|
|
var generateAssetUrl = scope.data("generate-asset-url");
|
|
scope.data("block-index", 0);
|
|
scope.data("block-ids", new Array());
|
|
preparingText.show();
|
|
selectedFileWrapper.hide();
|
|
validationText.hide();
|
|
$.ajax({
|
|
url: generateAssetUrl,
|
|
data: {
|
|
filename: editedFilename,
|
|
__RequestVerificationToken: antiForgeryToken
|
|
},
|
|
type: "POST"
|
|
}).done(function (asset) {
|
|
data.url = asset.sasLocator;
|
|
data.multipart = false;
|
|
scope.data("sas-locator", asset.sasLocator);
|
|
scope.find("input[name$='.FileName']").val(editedFilename);
|
|
scope.find("input[name$='.WamsAssetId']").val(asset.assetId);
|
|
preparingText.hide();
|
|
progressText.text(progressText.data("text-template").replace("{percentage}", 0)).show();
|
|
uploadingContainer.show();
|
|
var xhr = data.submit();
|
|
scope.data("xhr", xhr);
|
|
}).fail(function (xhr, status, error) {
|
|
fileUploadWrapper.show();
|
|
selectedFileWrapper.show();
|
|
preparingText.hide();
|
|
uploadingContainer.hide();
|
|
scope.data("upload-isactive", false);
|
|
scope.data("upload-start-time", null);
|
|
alert("An error occurred. Error: " + error);
|
|
});
|
|
};
|
|
},
|
|
processfail: function (e, data) {
|
|
validationText.show();
|
|
filenameInput.val("");
|
|
filenameText.text("");
|
|
selectedFileWrapper.hide();
|
|
},
|
|
change: function (e, data) {
|
|
var prompt = fileInput.data("prompt");
|
|
if (prompt && prompt.length > 0) {
|
|
if (!confirm(prompt)) {
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
cancelLink.on("click", function (e) {
|
|
e.preventDefault();
|
|
if (confirm($(this).data("cancel-prompt"))) {
|
|
var xhr = scope.data("xhr");
|
|
xhr.abort();
|
|
}
|
|
});
|
|
}
|
|
function initializeUploadDirect() {
|
|
var scope = $(".upload-direct").show();
|
|
scope.find(".reset-button").on("click", function (e) {
|
|
var doReset = $(this).closest(".async-upload")[0].doReset;
|
|
if (!!doReset)
|
|
doReset();
|
|
});
|
|
scope.find(".upload-button").on("click", function (e) {
|
|
var doUpload = $(this).closest(".async-upload")[0].doUpload;
|
|
if (!!doUpload)
|
|
doUpload();
|
|
});
|
|
requiredUploads = scope.find(".required-upload");
|
|
scope.find(".async-upload-file-input").each(function () {
|
|
initializeUpload($(this));
|
|
});
|
|
scope.closest("form").on("submit", function (e) {
|
|
if (hasActiveUploads()) {
|
|
alert(scope.data("block-submit-prompt"));
|
|
e.preventDefault();
|
|
return false;
|
|
}
|
|
scope.data("is-submitting", true);
|
|
});
|
|
$(window).on("beforeunload", function (e) {
|
|
if ((hasActiveUploads() || hasCompletedUploads()) && !isSubmitting()) {
|
|
var message = scope.data("navigate-away-prompt");
|
|
e.result = message;
|
|
return message;
|
|
}
|
|
});
|
|
}
|
|
CloudVideoEdit.initializeUploadDirect = initializeUploadDirect;
|
|
})(CloudVideoEdit = MediaServices.CloudVideoEdit || (MediaServices.CloudVideoEdit = {}));
|
|
})(MediaServices = Azure.MediaServices || (Azure.MediaServices = {}));
|
|
})(Azure = Orchard.Azure || (Orchard.Azure = {}));
|
|
})(Orchard || (Orchard = {}));
|
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsb3VkbWVkaWEtZWRpdC1jbG91ZHZpZGVvcGFydC1kaXJlY3QuanMiLCJjbG91ZG1lZGlhLWVkaXQtY2xvdWR2aWRlb3BhcnQtZGlyZWN0LnRzIl0sIm5hbWVzIjpbIk9yY2hhcmQiLCJPcmNoYXJkLkF6dXJlIiwiT3JjaGFyZC5BenVyZS5NZWRpYVNlcnZpY2VzIiwiT3JjaGFyZC5BenVyZS5NZWRpYVNlcnZpY2VzLkNsb3VkVmlkZW9FZGl0IiwiT3JjaGFyZC5BenVyZS5NZWRpYVNlcnZpY2VzLkNsb3VkVmlkZW9FZGl0LnVwbG9hZENvbXBsZXRlZCIsIk9yY2hhcmQuQXp1cmUuTWVkaWFTZXJ2aWNlcy5DbG91ZFZpZGVvRWRpdC5jbGVhbnVwIiwiT3JjaGFyZC5BenVyZS5NZWRpYVNlcnZpY2VzLkNsb3VkVmlkZW9FZGl0LnBhZCIsIk9yY2hhcmQuQXp1cmUuTWVkaWFTZXJ2aWNlcy5DbG91ZFZpZGVvRWRpdC5jcmVhdGVCbG9ja0lkIiwiT3JjaGFyZC5BenVyZS5NZWRpYVNlcnZpY2VzLkNsb3VkVmlkZW9FZGl0LmNvbW1pdEJsb2NrTGlzdCIsIk9yY2hhcmQuQXp1cmUuTWVkaWFTZXJ2aWNlcy5DbG91ZFZpZGVvRWRpdC5oYXNBY3RpdmVVcGxvYWRzIiwiT3JjaGFyZC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IGRhdGEuZmlsZUlucHV0LmNsb3Nlc3QoXCIuZmlsZS11cGxvYWQtd3JhcHBlclwiKTtcclxuXHJcbiAgICAgICAgaWYgKGFzc2V0SWQubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICB2YXIgdXJsID0gc2NvcGUuZGF0YShcImRlbGV0ZS1hc3NldC11cmxcIik7XHJcbiAgICAgICAgICAgIHZhciBhbnRpRm9yZ2VyeVRva2VuID0gc2NvcGUuY2xvc2VzdChcImZvcm1cIikuZmluZChcIltuYW1lPSdfX1JlcXVlc3RWZXJpZmljYXRpb25Ub2tlbiddXCIpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgY2xlYW51cE1lc3NhZ2UgPSBzY29wZS5maW5kKFwiLnN0YXR1cy5jbGVhbnVwXCIpO1xyXG5cclxuICAgICAgICAgICAgd2Ftc0Fzc2V0SW5wdXQudmFsKFwiXCIpO1xyXG4gICAgICAgICAgICBmaWxlTmFtZUlucHV0LnZhbChcIlwiKTtcclxuXHJcbiAgICAgICAgICAgIGNsZWFudXBNZXNzYWdlLnNob3coKTtcclxuXHJcbiAgICAgICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcclxuICAgICAgICAgICAgICAgIHR5cGU6IFwiREVMRVRFXCIsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGFzc2V0SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgX19SZXF1ZXN0VmVyaWZpY2F0aW9uVG9rZW46IGFudGlGb3JnZXJ5VG9rZW5cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSkuZG9uZShmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICBzY29wZS5kYXRhKFwidXBsb2FkLWlzYWN0aXZlXCIsIGZhbHNlKTtcclxuICAgICAgICAgICAgICAgIHNjb3BlLmRhdGEoXCJ1cGxvYWQtc3RhcnQtdGltZ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rSWRzID0gc2NvcGUuZGF0YShcImJsb2NrLWlkc1wiKTtcclxuXHJcbiAgICAgICAgaWYgKGJsb2NrSWRzLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIC8vIFRoZSBmaWxlIHdhcyB1cGxvYWRlZCBhcyBhIHdob2xlLCBzbyBubyBtYW5pZmVzdCB0byBzdWJtaXQuXHJcbiAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUoKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAvLyBUaGUgZmlsZSB3YXMgdXBsb2FkZWQgaW4gY2h1bmtzLlxyXG4gICAgICAgICAgICB2YXIgdXJsID0gc2NvcGUuZGF0YShcInNhcy1sb2NhdG9yXCIpICsgXCImY29tcD1ibG9ja2xpc3RcIjtcclxuICAgICAgICAgICAgdmFyIHJlcXVlc3REYXRhID0gJzw/eG1sIHZlcnNpb249XCIxLjBcIiBlbmNvZGluZz1cInV0Zi04XCI/PjxCbG9ja0xpc3Q+JztcclxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBibG9ja0lkcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgcmVxdWVzdERhdGEgKz0gJzxMYXRlc3Q+JyArIGJsb2NrSWRzW2ldICsgJzwvTGF0ZXN0Pic7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmVxdWVzdERhdGEgKz0gJzwvQmxvY2tMaXN0Pic7XHJcblxyXG4gICAgICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgdXJsOiB1cmwsXHJcbiAgICAgICAgICAgICAgICB0eXBlOiBcIlBVVFwiLFxyXG4gICAgICAgICAgICAgICAgZGF0YTogcmVxdWVzdERhdGEsXHJcbiAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogXCJ0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04XCIsXHJcbiAgICAgICAgICAgICAgICBjcm9zc0RvbWFpbjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIGNhY2hlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGJlZm9yZVNlbmQ6IGZ1bmN0aW9uICh4aHIpIHtcclxuICAgICAgICAgICAgICAgICAgICB4aHIuc2V0UmVxdWVzdEhlYWRlcigneC1tcy1kYXRlJywgbmV3IERhdGUoKS50b1VUQ1N0cmluZygpKTtcclxuICAgICAgICAgICAgICAgICAgICB4aHIuc2V0UmVxdWVzdEhlYWRlcigneC1tcy1ibG9iLWNvbnRlbnQtdHlwZScsIGRhdGEuZmlsZXNbMF0udHlwZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgeGhyLnNldFJlcXVlc3RIZWFkZXIoJ3gtbXMtdmVyc2lvbicsIFwiMjAxMi0wMi0xMlwiKTtcclxuICAgICAgICAgICAgICAgICAgICB4aHIuc2V0UmVxdWVzdEhlYWRlcignQ29udGVudC1MZW5ndGgnLCByZXF1ZXN0RGF0YS5sZW5ndGgudG9TdHJpbmcoKSk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uICh4aHIsIHN0YXR1cywgZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLnRleHRTdGF0dXMgPSBzdGF0dXM7XHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5lcnJvclRocm93biA9IGVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLmZhaWwoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2UoKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBoYXNBY3RpdmVVcGxvYWRzKCkge1xyXG4gICAgICAgIHZhciBzY29wZSA9ICQoXCIudXBsb2FkLWRpcmVjdFwiKTtcclxuICAgICAgICB2YXIgZmxhZyA9IGZhbHNlO1xyXG5cclxuICAgICAgICBzY29wZS5maW5kKFwiLmFzeW5jLXVwbG9hZFwiKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgaWYgKCQodGhpcykuZGF0YShcInVwbG9hZC1pc2FjdGl2ZVwiKSA9PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICBmbGFnID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXR1cm4gZmxhZztcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBoYXNDb21wbGV0ZWRVcGxvYWRzKCkge1xyXG4gICAgICAgIHZhciBzY29wZSA9ICQoXCIudXBsb2FkLWRpcmVjdFwiKTtcclxuICAgICAgICB2YXIgZmxhZyA9IGZhbHNlO1xyXG5cclxuICAgICAgICBzY29wZS5maW5kKFwiLmFzeW5jLXVwbG9hZFwiKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgaWYgKCQodGhpcykuZGF0YShcInVwbG9hZC1pc2NvbXBsZXRlZFwiKSA9PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICBmbGFnID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXR1cm4gZmxhZztcclxuICAgIH0gXHJcblxyXG4gICAgZnVuY3Rpb24gaXNTdWJtaXR0aW5nKCkge1xyXG4gICAgICAgIHZhciBzY29wZSA9ICQoXCIudXBsb2FkLWRpcmVjdFwiKTtcclxuICAgICAg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GEoXCJ0ZXh0LXRlbXBsYXRlXCIpLnJlcGxhY2UoXCJ7dXBsb2FkZWR9XCIsIHVwbG9hZGVkKS5yZXBsYWNlKFwie3RvdGFsfVwiLCB0b3RhbCkucmVwbGFjZShcIntrYnBzfVwiLCBrYnBzKS5yZXBsYWNlKFwie2VsYXBzZWR9XCIsIGVsYXBzZWQuaHVtYW5pemUoKSkucmVwbGFjZShcIntyZW1haW5pbmd9XCIsIHJlbWFpbmluZy5odW1hbml6ZSgpKSkuc2hvdygpO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBkb25lOiBmdW5jdGlvbiAoZTogYW55LCBkYXRhOiBhbnkpIHtcclxuICAgICAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgICAgIGNvbW1pdEJsb2NrTGlzdChzY29wZSwgZGF0YSkuYWx3YXlzKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB1cGxvYWRDb21wbGV0ZWQoc2VsZiwgZSwgZGF0YSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZmFpbDogZnVuY3Rpb24gKGU6IGFueSwgZGF0YTogYW55KSB7XHJcbiAgICAgICAgICAgICAgICB1cGxvYWRDb21wbGV0ZWQodGhpcywgZSwgZGF0YSk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByb2Nlc3Nkb25lOiBmdW5jdGlvbiAoZTogYW55LCBkYXRhOiBhbnkpIHtcclxuICAgICAgICAgICAgICAgIHZhciBzZWxlY3RlZEZpbGVuYW1lID0gZGF0YS5maWxlc1swXS5uYW1lO1xyXG4gICAgICAgICAgICAgICAgc2NvcGUuZGF0YShcInNlbGVjdGVkLWZpbGVuYW1lXCIsIHNlbGVjdGVkRmlsZW5hbWUpO1xyXG4gICAgICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4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XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRpb25UZXh0LnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGF0YShcInVwbG9hZC1pc2FjdGl2ZVwiLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICBzY29wZS5kYXRhKFwidXBsb2FkLXN0YXJ0LXRpbWVcIiwgRGF0ZS5ub3coKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGdlbmVyYXRlQXNzZXRVcmwgPSBzY29wZS5kYXRhKFwiZ2VuZXJhdGUtYXNzZXQtdXJsXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNjb3BlLmRhdGEoXCJibG9jay1pbmRleFwiLCAwKTtcclxuICAgICAgICAgICAgICAgICAgICBzY29wZS5kYXRhKFwiYmxvY2staWRzXCIsIG5ldyBBcnJheSgpKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcHJlcGFyaW5nVGV4dC5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRGaWxlV3JhcHBlci5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFsaWRhdGlvblRleHQuaGlkZSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbmVyYXRlQXNzZXRVcmwsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVuYW1lOiBlZGl0ZWRGaWxlbmFtZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fUmVxdWVzdFZlcmlmaWNhdGlvblRva2VuOiBhbnRpRm9yZ2VyeVRva2VuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiUE9TVFwiXHJcbiAgICAgICAgICAgICAgICAgICAgfSkuZG9uZShmdW5jdGlvbiAoYXNzZXQ6IGFueSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS51cmwgPSBhc3NldC5zYXNMb2NhdG9yO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5tdWx0aXBhcnQgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5kYXRhKFwic2FzLWxvY2F0b3JcIiwgYXNzZXQuc2FzTG9jYXRvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5maW5kKFwiaW5wdXRbbmFtZSQ9Jy5GaWxlTmFtZSddXCIpLnZhbChlZGl0ZWRGaWxlbmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZS5maW5kKFwiaW5wdXRbbmFtZSQ9Jy5XYW1zQXNzZXRJZCddXCIpLnZhbChhc3NldC5hc3NldElkKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVwYXJpbmdUZXh0LmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzVGV4dC50ZXh0KHByb2dyZXNzVGV4dC5kYXRhKFwidGV4dC10ZW1wbGF0ZVwiKS5yZXBsYWNlKFwie3BlcmNlbnRhZ2V9XCIsIDApKS5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGxvYWRpbmdDb250YWluZXIuc2hvdygpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB4aHIgPSBkYXRhLnN1Ym1pdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGF0YShcInhoclwiLCB4aHIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KS5mYWlsKGZ1bmN0aW9uICh4aHI6IGFueSwgc3RhdHVzOiBhbnksIGVycm9yOiBhbnkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVVcGxvYWRXcmFwcGVyLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkRmlsZVdyYXBwZXIuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlcGFyaW5nVGV4dC5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGxvYWRpbmdDb250YWluZXIuaGlkZSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLmRhdGEoXCJ1cGxvYWQtaXNhY3RpdmVcIiwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuZGF0YShcInVwbG9hZC1zdGFydC10aW1lXCIsIG51bGwpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxlcnQoXCJBbiBlcnJvciBvY2N1cnJlZC4gRXJyb3I6IFwiICsgZXJyb3IpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByb2Nlc3NmYWlsOiBmdW5jdGlvbiAoZTogYW55LCBkYXRhOiBhbnkpIHtcclxuICAgICAgICAgICAgICAgIHZhbGlkYXRpb25UZXh0LnNob3coKTtcclxuICAgICAgICAgICAgICAgIGZpbGVuYW1lSW5wdXQudmFsKFwiXCIpO1xyXG4gICAgICAgICAgICAgICAgZmlsZW5hbWVUZXh0LnRleHQoXCJcIik7XHJcbiAgICAgICAgICAgICAgICBzZWxlY3RlZEZpbGVXcmFwcGVyLmhpZGUoKTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY2hhbmdlOiBmdW5jdGlvbiAoZTogYW55LCBkYXRhOiBhbnkpIHtcclxuICAgICAgICAgICAgICAgIHZhciBwcm9tcHQgPSBmaWxlSW5wdXQuZGF0YShcInByb21wdFwiKTtcclxuICAgICAgICAgICAgICAgIGlmIChwcm9tcHQgJiYgcHJvbXB0Lmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbmZpcm0ocHJvbXB0KSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGNhbmNlbExpbmsub24oXCJjbGlja1wiLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICBpZiAoY29uZmlybSgkKHRoaXMpLmRhdGEoXCJjYW5jZWwtcHJvbXB0XCIpKSkge1xyXG4gICAgICAgICAgICAgICAgdmFyIHhociA9IHNjb3BlLmRhdGEoXCJ4aHJcIik7XHJcbiAgICAgICAgICAgICAgICB4aHIuYWJvcnQoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBpbml0aWFsaXplVXBsb2FkRGlyZWN0KCkge1xyXG5cclxuICAgICAgICB2YXIgc2NvcGUgPSAkKFwiLnVwbG9hZC1kaXJlY3RcIikuc2hvdygpO1xyXG5cclxuICAgICAgICBzY29wZS5maW5kKFwiLnJlc2V0LWJ1dHRvblwiKS5vbihcImNsaWNrXCIsIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIHZhciBkb1Jlc2V0ID0gKDxhbnk+JCh0aGlzKS5jbG9zZXN0KFwiLmFzeW5jLXVwbG9hZFwiKVswXSkuZG9SZXNldDtcclxuICAgICAgICAgICAgaWYgKCEhZG9SZXNldClcclxuICAgICAgICAgICAgICAgIGRvUmVzZXQoKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgc2NvcGUuZmluZChcIi51cGxvYWQtYnV0dG9uXCIpLm9uKFwiY2xpY2tcIiwgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgdmFyIGRvVXBsb2FkID0gKDxhbnk+JCh0aGlzKS5jbG9zZXN0KFwiLmFzeW5jLXVwbG9hZFwiKVswXSkuZG9VcGxvYWQ7XHJcbiAgICAgICAgICAgIGlmICghIWRvVXBsb2FkKVxyXG4gICAgICAgICAgICAgICAgZG9VcGxvYWQoKTtcclxuICAgICAgICB9KTsgXHJcbiAgICAgICAgICBcclxuICAgICAgICByZXF1aXJlZFVwbG9hZHMgPSBzY29wZS5maW5kKFwiLnJlcXVpcmVkLXVwbG9hZFwiKTtcclxuXHJcbiAgICAgICAgc2NvcGUuZmluZChcIi5hc3luYy11cGxvYWQtZmlsZS1pbnB1dFwiKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgaW5pdGlhbGl6ZVVwbG9hZCgkKHRoaXMpKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgc2NvcGUuY2xvc2VzdChcImZvcm1cIikub24oXCJzdWJtaXRcIiwgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgaWYgKGhhc0FjdGl2ZVVwbG9hZHMoKSkge1xyXG4gICAgICAgICAgICAgICAgYWxlcnQoc2NvcGUuZGF0YShcImJsb2NrLXN1Ym1pdC1wcm9tcHRcIikpO1xyXG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBzY29wZS5kYXRhKFwiaXMtc3VibWl0dGluZ1wiLCB0cnVlKTtcclxuICAgICAgICB9KTtcclxuICAgICAgICAgXHJcbiAgICAgICAgJCh3aW5kb3cpLm9uKFwiYmVmb3JldW5sb2FkXCIsIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIGlmICgoaGFzQWN0aXZlVXBsb2FkcygpIHx8IGhhc0NvbXBsZXRlZFVwbG9hZHMoKSkgJiYgIWlzU3VibWl0dGluZygpKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbWVzc2FnZSA9IHNjb3BlLmRhdGEoXCJuYXZpZ2F0ZS1hd2F5LXByb21wdFwiKTtcclxuICAgICAgICAgICAgICAgIGUucmVzdWx0ID0gbWVzc2FnZTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbn0iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
|