@jsii/runtime 1.100.0 → 1.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/webpack/bin/jsii-runtime.js +62 -633
- package/webpack/lib/program.js +709 -995
package/webpack/lib/program.js
CHANGED
|
@@ -7926,998 +7926,6 @@ var __webpack_modules__ = {
|
|
|
7926
7926
|
});
|
|
7927
7927
|
};
|
|
7928
7928
|
},
|
|
7929
|
-
4661: function(__unused_webpack_module, exports) {
|
|
7930
|
-
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
7931
|
-
(function(global, factory) {
|
|
7932
|
-
true ? factory(exports) : 0;
|
|
7933
|
-
})(this, (function(exports) {
|
|
7934
|
-
"use strict";
|
|
7935
|
-
function merge() {
|
|
7936
|
-
for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
|
|
7937
|
-
sets[_key] = arguments[_key];
|
|
7938
|
-
}
|
|
7939
|
-
if (sets.length > 1) {
|
|
7940
|
-
sets[0] = sets[0].slice(0, -1);
|
|
7941
|
-
var xl = sets.length - 1;
|
|
7942
|
-
for (var x = 1; x < xl; ++x) {
|
|
7943
|
-
sets[x] = sets[x].slice(1, -1);
|
|
7944
|
-
}
|
|
7945
|
-
sets[xl] = sets[xl].slice(1);
|
|
7946
|
-
return sets.join("");
|
|
7947
|
-
} else {
|
|
7948
|
-
return sets[0];
|
|
7949
|
-
}
|
|
7950
|
-
}
|
|
7951
|
-
function subexp(str) {
|
|
7952
|
-
return "(?:" + str + ")";
|
|
7953
|
-
}
|
|
7954
|
-
function typeOf(o) {
|
|
7955
|
-
return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
|
|
7956
|
-
}
|
|
7957
|
-
function toUpperCase(str) {
|
|
7958
|
-
return str.toUpperCase();
|
|
7959
|
-
}
|
|
7960
|
-
function toArray(obj) {
|
|
7961
|
-
return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [ obj ] : Array.prototype.slice.call(obj) : [];
|
|
7962
|
-
}
|
|
7963
|
-
function assign(target, source) {
|
|
7964
|
-
var obj = target;
|
|
7965
|
-
if (source) {
|
|
7966
|
-
for (var key in source) {
|
|
7967
|
-
obj[key] = source[key];
|
|
7968
|
-
}
|
|
7969
|
-
}
|
|
7970
|
-
return obj;
|
|
7971
|
-
}
|
|
7972
|
-
function buildExps(isIRI) {
|
|
7973
|
-
var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([ IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$ ].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
|
7974
|
-
return {
|
|
7975
|
-
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
|
7976
|
-
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
7977
|
-
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
7978
|
-
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
7979
|
-
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
7980
|
-
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
|
|
7981
|
-
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
|
|
7982
|
-
ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
7983
|
-
UNRESERVED: new RegExp(UNRESERVED$$, "g"),
|
|
7984
|
-
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
|
|
7985
|
-
PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
|
|
7986
|
-
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
|
7987
|
-
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
|
|
7988
|
-
};
|
|
7989
|
-
}
|
|
7990
|
-
var URI_PROTOCOL = buildExps(false);
|
|
7991
|
-
var IRI_PROTOCOL = buildExps(true);
|
|
7992
|
-
var slicedToArray = function() {
|
|
7993
|
-
function sliceIterator(arr, i) {
|
|
7994
|
-
var _arr = [];
|
|
7995
|
-
var _n = true;
|
|
7996
|
-
var _d = false;
|
|
7997
|
-
var _e = undefined;
|
|
7998
|
-
try {
|
|
7999
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
8000
|
-
_arr.push(_s.value);
|
|
8001
|
-
if (i && _arr.length === i) break;
|
|
8002
|
-
}
|
|
8003
|
-
} catch (err) {
|
|
8004
|
-
_d = true;
|
|
8005
|
-
_e = err;
|
|
8006
|
-
} finally {
|
|
8007
|
-
try {
|
|
8008
|
-
if (!_n && _i["return"]) _i["return"]();
|
|
8009
|
-
} finally {
|
|
8010
|
-
if (_d) throw _e;
|
|
8011
|
-
}
|
|
8012
|
-
}
|
|
8013
|
-
return _arr;
|
|
8014
|
-
}
|
|
8015
|
-
return function(arr, i) {
|
|
8016
|
-
if (Array.isArray(arr)) {
|
|
8017
|
-
return arr;
|
|
8018
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
8019
|
-
return sliceIterator(arr, i);
|
|
8020
|
-
} else {
|
|
8021
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
8022
|
-
}
|
|
8023
|
-
};
|
|
8024
|
-
}();
|
|
8025
|
-
var toConsumableArray = function(arr) {
|
|
8026
|
-
if (Array.isArray(arr)) {
|
|
8027
|
-
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
|
8028
|
-
return arr2;
|
|
8029
|
-
} else {
|
|
8030
|
-
return Array.from(arr);
|
|
8031
|
-
}
|
|
8032
|
-
};
|
|
8033
|
-
var maxInt = 2147483647;
|
|
8034
|
-
var base = 36;
|
|
8035
|
-
var tMin = 1;
|
|
8036
|
-
var tMax = 26;
|
|
8037
|
-
var skew = 38;
|
|
8038
|
-
var damp = 700;
|
|
8039
|
-
var initialBias = 72;
|
|
8040
|
-
var initialN = 128;
|
|
8041
|
-
var delimiter = "-";
|
|
8042
|
-
var regexPunycode = /^xn--/;
|
|
8043
|
-
var regexNonASCII = /[^\0-\x7E]/;
|
|
8044
|
-
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
8045
|
-
var errors = {
|
|
8046
|
-
overflow: "Overflow: input needs wider integers to process",
|
|
8047
|
-
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
8048
|
-
"invalid-input": "Invalid input"
|
|
8049
|
-
};
|
|
8050
|
-
var baseMinusTMin = base - tMin;
|
|
8051
|
-
var floor = Math.floor;
|
|
8052
|
-
var stringFromCharCode = String.fromCharCode;
|
|
8053
|
-
function error$1(type) {
|
|
8054
|
-
throw new RangeError(errors[type]);
|
|
8055
|
-
}
|
|
8056
|
-
function map(array, fn) {
|
|
8057
|
-
var result = [];
|
|
8058
|
-
var length = array.length;
|
|
8059
|
-
while (length--) {
|
|
8060
|
-
result[length] = fn(array[length]);
|
|
8061
|
-
}
|
|
8062
|
-
return result;
|
|
8063
|
-
}
|
|
8064
|
-
function mapDomain(string, fn) {
|
|
8065
|
-
var parts = string.split("@");
|
|
8066
|
-
var result = "";
|
|
8067
|
-
if (parts.length > 1) {
|
|
8068
|
-
result = parts[0] + "@";
|
|
8069
|
-
string = parts[1];
|
|
8070
|
-
}
|
|
8071
|
-
string = string.replace(regexSeparators, ".");
|
|
8072
|
-
var labels = string.split(".");
|
|
8073
|
-
var encoded = map(labels, fn).join(".");
|
|
8074
|
-
return result + encoded;
|
|
8075
|
-
}
|
|
8076
|
-
function ucs2decode(string) {
|
|
8077
|
-
var output = [];
|
|
8078
|
-
var counter = 0;
|
|
8079
|
-
var length = string.length;
|
|
8080
|
-
while (counter < length) {
|
|
8081
|
-
var value = string.charCodeAt(counter++);
|
|
8082
|
-
if (value >= 55296 && value <= 56319 && counter < length) {
|
|
8083
|
-
var extra = string.charCodeAt(counter++);
|
|
8084
|
-
if ((extra & 64512) == 56320) {
|
|
8085
|
-
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
8086
|
-
} else {
|
|
8087
|
-
output.push(value);
|
|
8088
|
-
counter--;
|
|
8089
|
-
}
|
|
8090
|
-
} else {
|
|
8091
|
-
output.push(value);
|
|
8092
|
-
}
|
|
8093
|
-
}
|
|
8094
|
-
return output;
|
|
8095
|
-
}
|
|
8096
|
-
var ucs2encode = function ucs2encode(array) {
|
|
8097
|
-
return String.fromCodePoint.apply(String, toConsumableArray(array));
|
|
8098
|
-
};
|
|
8099
|
-
var basicToDigit = function basicToDigit(codePoint) {
|
|
8100
|
-
if (codePoint - 48 < 10) {
|
|
8101
|
-
return codePoint - 22;
|
|
8102
|
-
}
|
|
8103
|
-
if (codePoint - 65 < 26) {
|
|
8104
|
-
return codePoint - 65;
|
|
8105
|
-
}
|
|
8106
|
-
if (codePoint - 97 < 26) {
|
|
8107
|
-
return codePoint - 97;
|
|
8108
|
-
}
|
|
8109
|
-
return base;
|
|
8110
|
-
};
|
|
8111
|
-
var digitToBasic = function digitToBasic(digit, flag) {
|
|
8112
|
-
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
8113
|
-
};
|
|
8114
|
-
var adapt = function adapt(delta, numPoints, firstTime) {
|
|
8115
|
-
var k = 0;
|
|
8116
|
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
8117
|
-
delta += floor(delta / numPoints);
|
|
8118
|
-
for (;delta > baseMinusTMin * tMax >> 1; k += base) {
|
|
8119
|
-
delta = floor(delta / baseMinusTMin);
|
|
8120
|
-
}
|
|
8121
|
-
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
8122
|
-
};
|
|
8123
|
-
var decode = function decode(input) {
|
|
8124
|
-
var output = [];
|
|
8125
|
-
var inputLength = input.length;
|
|
8126
|
-
var i = 0;
|
|
8127
|
-
var n = initialN;
|
|
8128
|
-
var bias = initialBias;
|
|
8129
|
-
var basic = input.lastIndexOf(delimiter);
|
|
8130
|
-
if (basic < 0) {
|
|
8131
|
-
basic = 0;
|
|
8132
|
-
}
|
|
8133
|
-
for (var j = 0; j < basic; ++j) {
|
|
8134
|
-
if (input.charCodeAt(j) >= 128) {
|
|
8135
|
-
error$1("not-basic");
|
|
8136
|
-
}
|
|
8137
|
-
output.push(input.charCodeAt(j));
|
|
8138
|
-
}
|
|
8139
|
-
for (var index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
|
|
8140
|
-
var oldi = i;
|
|
8141
|
-
for (var w = 1, k = base; ;k += base) {
|
|
8142
|
-
if (index >= inputLength) {
|
|
8143
|
-
error$1("invalid-input");
|
|
8144
|
-
}
|
|
8145
|
-
var digit = basicToDigit(input.charCodeAt(index++));
|
|
8146
|
-
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
|
8147
|
-
error$1("overflow");
|
|
8148
|
-
}
|
|
8149
|
-
i += digit * w;
|
|
8150
|
-
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
8151
|
-
if (digit < t) {
|
|
8152
|
-
break;
|
|
8153
|
-
}
|
|
8154
|
-
var baseMinusT = base - t;
|
|
8155
|
-
if (w > floor(maxInt / baseMinusT)) {
|
|
8156
|
-
error$1("overflow");
|
|
8157
|
-
}
|
|
8158
|
-
w *= baseMinusT;
|
|
8159
|
-
}
|
|
8160
|
-
var out = output.length + 1;
|
|
8161
|
-
bias = adapt(i - oldi, out, oldi == 0);
|
|
8162
|
-
if (floor(i / out) > maxInt - n) {
|
|
8163
|
-
error$1("overflow");
|
|
8164
|
-
}
|
|
8165
|
-
n += floor(i / out);
|
|
8166
|
-
i %= out;
|
|
8167
|
-
output.splice(i++, 0, n);
|
|
8168
|
-
}
|
|
8169
|
-
return String.fromCodePoint.apply(String, output);
|
|
8170
|
-
};
|
|
8171
|
-
var encode = function encode(input) {
|
|
8172
|
-
var output = [];
|
|
8173
|
-
input = ucs2decode(input);
|
|
8174
|
-
var inputLength = input.length;
|
|
8175
|
-
var n = initialN;
|
|
8176
|
-
var delta = 0;
|
|
8177
|
-
var bias = initialBias;
|
|
8178
|
-
var _iteratorNormalCompletion = true;
|
|
8179
|
-
var _didIteratorError = false;
|
|
8180
|
-
var _iteratorError = undefined;
|
|
8181
|
-
try {
|
|
8182
|
-
for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
8183
|
-
var _currentValue2 = _step.value;
|
|
8184
|
-
if (_currentValue2 < 128) {
|
|
8185
|
-
output.push(stringFromCharCode(_currentValue2));
|
|
8186
|
-
}
|
|
8187
|
-
}
|
|
8188
|
-
} catch (err) {
|
|
8189
|
-
_didIteratorError = true;
|
|
8190
|
-
_iteratorError = err;
|
|
8191
|
-
} finally {
|
|
8192
|
-
try {
|
|
8193
|
-
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
8194
|
-
_iterator.return();
|
|
8195
|
-
}
|
|
8196
|
-
} finally {
|
|
8197
|
-
if (_didIteratorError) {
|
|
8198
|
-
throw _iteratorError;
|
|
8199
|
-
}
|
|
8200
|
-
}
|
|
8201
|
-
}
|
|
8202
|
-
var basicLength = output.length;
|
|
8203
|
-
var handledCPCount = basicLength;
|
|
8204
|
-
if (basicLength) {
|
|
8205
|
-
output.push(delimiter);
|
|
8206
|
-
}
|
|
8207
|
-
while (handledCPCount < inputLength) {
|
|
8208
|
-
var m = maxInt;
|
|
8209
|
-
var _iteratorNormalCompletion2 = true;
|
|
8210
|
-
var _didIteratorError2 = false;
|
|
8211
|
-
var _iteratorError2 = undefined;
|
|
8212
|
-
try {
|
|
8213
|
-
for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
8214
|
-
var currentValue = _step2.value;
|
|
8215
|
-
if (currentValue >= n && currentValue < m) {
|
|
8216
|
-
m = currentValue;
|
|
8217
|
-
}
|
|
8218
|
-
}
|
|
8219
|
-
} catch (err) {
|
|
8220
|
-
_didIteratorError2 = true;
|
|
8221
|
-
_iteratorError2 = err;
|
|
8222
|
-
} finally {
|
|
8223
|
-
try {
|
|
8224
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
8225
|
-
_iterator2.return();
|
|
8226
|
-
}
|
|
8227
|
-
} finally {
|
|
8228
|
-
if (_didIteratorError2) {
|
|
8229
|
-
throw _iteratorError2;
|
|
8230
|
-
}
|
|
8231
|
-
}
|
|
8232
|
-
}
|
|
8233
|
-
var handledCPCountPlusOne = handledCPCount + 1;
|
|
8234
|
-
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
|
8235
|
-
error$1("overflow");
|
|
8236
|
-
}
|
|
8237
|
-
delta += (m - n) * handledCPCountPlusOne;
|
|
8238
|
-
n = m;
|
|
8239
|
-
var _iteratorNormalCompletion3 = true;
|
|
8240
|
-
var _didIteratorError3 = false;
|
|
8241
|
-
var _iteratorError3 = undefined;
|
|
8242
|
-
try {
|
|
8243
|
-
for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
8244
|
-
var _currentValue = _step3.value;
|
|
8245
|
-
if (_currentValue < n && ++delta > maxInt) {
|
|
8246
|
-
error$1("overflow");
|
|
8247
|
-
}
|
|
8248
|
-
if (_currentValue == n) {
|
|
8249
|
-
var q = delta;
|
|
8250
|
-
for (var k = base; ;k += base) {
|
|
8251
|
-
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
8252
|
-
if (q < t) {
|
|
8253
|
-
break;
|
|
8254
|
-
}
|
|
8255
|
-
var qMinusT = q - t;
|
|
8256
|
-
var baseMinusT = base - t;
|
|
8257
|
-
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
|
|
8258
|
-
q = floor(qMinusT / baseMinusT);
|
|
8259
|
-
}
|
|
8260
|
-
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
|
8261
|
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
8262
|
-
delta = 0;
|
|
8263
|
-
++handledCPCount;
|
|
8264
|
-
}
|
|
8265
|
-
}
|
|
8266
|
-
} catch (err) {
|
|
8267
|
-
_didIteratorError3 = true;
|
|
8268
|
-
_iteratorError3 = err;
|
|
8269
|
-
} finally {
|
|
8270
|
-
try {
|
|
8271
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return) {
|
|
8272
|
-
_iterator3.return();
|
|
8273
|
-
}
|
|
8274
|
-
} finally {
|
|
8275
|
-
if (_didIteratorError3) {
|
|
8276
|
-
throw _iteratorError3;
|
|
8277
|
-
}
|
|
8278
|
-
}
|
|
8279
|
-
}
|
|
8280
|
-
++delta;
|
|
8281
|
-
++n;
|
|
8282
|
-
}
|
|
8283
|
-
return output.join("");
|
|
8284
|
-
};
|
|
8285
|
-
var toUnicode = function toUnicode(input) {
|
|
8286
|
-
return mapDomain(input, (function(string) {
|
|
8287
|
-
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
|
8288
|
-
}));
|
|
8289
|
-
};
|
|
8290
|
-
var toASCII = function toASCII(input) {
|
|
8291
|
-
return mapDomain(input, (function(string) {
|
|
8292
|
-
return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
|
|
8293
|
-
}));
|
|
8294
|
-
};
|
|
8295
|
-
var punycode = {
|
|
8296
|
-
version: "2.1.0",
|
|
8297
|
-
ucs2: {
|
|
8298
|
-
decode: ucs2decode,
|
|
8299
|
-
encode: ucs2encode
|
|
8300
|
-
},
|
|
8301
|
-
decode,
|
|
8302
|
-
encode,
|
|
8303
|
-
toASCII,
|
|
8304
|
-
toUnicode
|
|
8305
|
-
};
|
|
8306
|
-
var SCHEMES = {};
|
|
8307
|
-
function pctEncChar(chr) {
|
|
8308
|
-
var c = chr.charCodeAt(0);
|
|
8309
|
-
var e = void 0;
|
|
8310
|
-
if (c < 16) e = "%0" + c.toString(16).toUpperCase(); else if (c < 128) e = "%" + c.toString(16).toUpperCase(); else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
|
|
8311
|
-
return e;
|
|
8312
|
-
}
|
|
8313
|
-
function pctDecChars(str) {
|
|
8314
|
-
var newStr = "";
|
|
8315
|
-
var i = 0;
|
|
8316
|
-
var il = str.length;
|
|
8317
|
-
while (i < il) {
|
|
8318
|
-
var c = parseInt(str.substr(i + 1, 2), 16);
|
|
8319
|
-
if (c < 128) {
|
|
8320
|
-
newStr += String.fromCharCode(c);
|
|
8321
|
-
i += 3;
|
|
8322
|
-
} else if (c >= 194 && c < 224) {
|
|
8323
|
-
if (il - i >= 6) {
|
|
8324
|
-
var c2 = parseInt(str.substr(i + 4, 2), 16);
|
|
8325
|
-
newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
|
|
8326
|
-
} else {
|
|
8327
|
-
newStr += str.substr(i, 6);
|
|
8328
|
-
}
|
|
8329
|
-
i += 6;
|
|
8330
|
-
} else if (c >= 224) {
|
|
8331
|
-
if (il - i >= 9) {
|
|
8332
|
-
var _c = parseInt(str.substr(i + 4, 2), 16);
|
|
8333
|
-
var c3 = parseInt(str.substr(i + 7, 2), 16);
|
|
8334
|
-
newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
|
|
8335
|
-
} else {
|
|
8336
|
-
newStr += str.substr(i, 9);
|
|
8337
|
-
}
|
|
8338
|
-
i += 9;
|
|
8339
|
-
} else {
|
|
8340
|
-
newStr += str.substr(i, 3);
|
|
8341
|
-
i += 3;
|
|
8342
|
-
}
|
|
8343
|
-
}
|
|
8344
|
-
return newStr;
|
|
8345
|
-
}
|
|
8346
|
-
function _normalizeComponentEncoding(components, protocol) {
|
|
8347
|
-
function decodeUnreserved(str) {
|
|
8348
|
-
var decStr = pctDecChars(str);
|
|
8349
|
-
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
|
8350
|
-
}
|
|
8351
|
-
if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
|
8352
|
-
if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
8353
|
-
if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
8354
|
-
if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
8355
|
-
if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
8356
|
-
if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
8357
|
-
return components;
|
|
8358
|
-
}
|
|
8359
|
-
function _stripLeadingZeros(str) {
|
|
8360
|
-
return str.replace(/^0*(.*)/, "$1") || "0";
|
|
8361
|
-
}
|
|
8362
|
-
function _normalizeIPv4(host, protocol) {
|
|
8363
|
-
var matches = host.match(protocol.IPV4ADDRESS) || [];
|
|
8364
|
-
var _matches = slicedToArray(matches, 2), address = _matches[1];
|
|
8365
|
-
if (address) {
|
|
8366
|
-
return address.split(".").map(_stripLeadingZeros).join(".");
|
|
8367
|
-
} else {
|
|
8368
|
-
return host;
|
|
8369
|
-
}
|
|
8370
|
-
}
|
|
8371
|
-
function _normalizeIPv6(host, protocol) {
|
|
8372
|
-
var matches = host.match(protocol.IPV6ADDRESS) || [];
|
|
8373
|
-
var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2];
|
|
8374
|
-
if (address) {
|
|
8375
|
-
var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1];
|
|
8376
|
-
var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
|
|
8377
|
-
var lastFields = last.split(":").map(_stripLeadingZeros);
|
|
8378
|
-
var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
|
|
8379
|
-
var fieldCount = isLastFieldIPv4Address ? 7 : 8;
|
|
8380
|
-
var lastFieldsStart = lastFields.length - fieldCount;
|
|
8381
|
-
var fields = Array(fieldCount);
|
|
8382
|
-
for (var x = 0; x < fieldCount; ++x) {
|
|
8383
|
-
fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || "";
|
|
8384
|
-
}
|
|
8385
|
-
if (isLastFieldIPv4Address) {
|
|
8386
|
-
fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
|
|
8387
|
-
}
|
|
8388
|
-
var allZeroFields = fields.reduce((function(acc, field, index) {
|
|
8389
|
-
if (!field || field === "0") {
|
|
8390
|
-
var lastLongest = acc[acc.length - 1];
|
|
8391
|
-
if (lastLongest && lastLongest.index + lastLongest.length === index) {
|
|
8392
|
-
lastLongest.length++;
|
|
8393
|
-
} else {
|
|
8394
|
-
acc.push({
|
|
8395
|
-
index,
|
|
8396
|
-
length: 1
|
|
8397
|
-
});
|
|
8398
|
-
}
|
|
8399
|
-
}
|
|
8400
|
-
return acc;
|
|
8401
|
-
}), []);
|
|
8402
|
-
var longestZeroFields = allZeroFields.sort((function(a, b) {
|
|
8403
|
-
return b.length - a.length;
|
|
8404
|
-
}))[0];
|
|
8405
|
-
var newHost = void 0;
|
|
8406
|
-
if (longestZeroFields && longestZeroFields.length > 1) {
|
|
8407
|
-
var newFirst = fields.slice(0, longestZeroFields.index);
|
|
8408
|
-
var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
|
|
8409
|
-
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
|
8410
|
-
} else {
|
|
8411
|
-
newHost = fields.join(":");
|
|
8412
|
-
}
|
|
8413
|
-
if (zone) {
|
|
8414
|
-
newHost += "%" + zone;
|
|
8415
|
-
}
|
|
8416
|
-
return newHost;
|
|
8417
|
-
} else {
|
|
8418
|
-
return host;
|
|
8419
|
-
}
|
|
8420
|
-
}
|
|
8421
|
-
var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
|
|
8422
|
-
var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
|
|
8423
|
-
function parse(uriString) {
|
|
8424
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8425
|
-
var components = {};
|
|
8426
|
-
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
8427
|
-
if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
|
|
8428
|
-
var matches = uriString.match(URI_PARSE);
|
|
8429
|
-
if (matches) {
|
|
8430
|
-
if (NO_MATCH_IS_UNDEFINED) {
|
|
8431
|
-
components.scheme = matches[1];
|
|
8432
|
-
components.userinfo = matches[3];
|
|
8433
|
-
components.host = matches[4];
|
|
8434
|
-
components.port = parseInt(matches[5], 10);
|
|
8435
|
-
components.path = matches[6] || "";
|
|
8436
|
-
components.query = matches[7];
|
|
8437
|
-
components.fragment = matches[8];
|
|
8438
|
-
if (isNaN(components.port)) {
|
|
8439
|
-
components.port = matches[5];
|
|
8440
|
-
}
|
|
8441
|
-
} else {
|
|
8442
|
-
components.scheme = matches[1] || undefined;
|
|
8443
|
-
components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
|
|
8444
|
-
components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
|
|
8445
|
-
components.port = parseInt(matches[5], 10);
|
|
8446
|
-
components.path = matches[6] || "";
|
|
8447
|
-
components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
|
|
8448
|
-
components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
|
|
8449
|
-
if (isNaN(components.port)) {
|
|
8450
|
-
components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
|
|
8451
|
-
}
|
|
8452
|
-
}
|
|
8453
|
-
if (components.host) {
|
|
8454
|
-
components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
|
|
8455
|
-
}
|
|
8456
|
-
if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
|
|
8457
|
-
components.reference = "same-document";
|
|
8458
|
-
} else if (components.scheme === undefined) {
|
|
8459
|
-
components.reference = "relative";
|
|
8460
|
-
} else if (components.fragment === undefined) {
|
|
8461
|
-
components.reference = "absolute";
|
|
8462
|
-
} else {
|
|
8463
|
-
components.reference = "uri";
|
|
8464
|
-
}
|
|
8465
|
-
if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
|
|
8466
|
-
components.error = components.error || "URI is not a " + options.reference + " reference.";
|
|
8467
|
-
}
|
|
8468
|
-
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
8469
|
-
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
8470
|
-
if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
|
|
8471
|
-
try {
|
|
8472
|
-
components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
|
|
8473
|
-
} catch (e) {
|
|
8474
|
-
components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
|
|
8475
|
-
}
|
|
8476
|
-
}
|
|
8477
|
-
_normalizeComponentEncoding(components, URI_PROTOCOL);
|
|
8478
|
-
} else {
|
|
8479
|
-
_normalizeComponentEncoding(components, protocol);
|
|
8480
|
-
}
|
|
8481
|
-
if (schemeHandler && schemeHandler.parse) {
|
|
8482
|
-
schemeHandler.parse(components, options);
|
|
8483
|
-
}
|
|
8484
|
-
} else {
|
|
8485
|
-
components.error = components.error || "URI can not be parsed.";
|
|
8486
|
-
}
|
|
8487
|
-
return components;
|
|
8488
|
-
}
|
|
8489
|
-
function _recomposeAuthority(components, options) {
|
|
8490
|
-
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
8491
|
-
var uriTokens = [];
|
|
8492
|
-
if (components.userinfo !== undefined) {
|
|
8493
|
-
uriTokens.push(components.userinfo);
|
|
8494
|
-
uriTokens.push("@");
|
|
8495
|
-
}
|
|
8496
|
-
if (components.host !== undefined) {
|
|
8497
|
-
uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (function(_, $1, $2) {
|
|
8498
|
-
return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
|
|
8499
|
-
})));
|
|
8500
|
-
}
|
|
8501
|
-
if (typeof components.port === "number" || typeof components.port === "string") {
|
|
8502
|
-
uriTokens.push(":");
|
|
8503
|
-
uriTokens.push(String(components.port));
|
|
8504
|
-
}
|
|
8505
|
-
return uriTokens.length ? uriTokens.join("") : undefined;
|
|
8506
|
-
}
|
|
8507
|
-
var RDS1 = /^\.\.?\//;
|
|
8508
|
-
var RDS2 = /^\/\.(\/|$)/;
|
|
8509
|
-
var RDS3 = /^\/\.\.(\/|$)/;
|
|
8510
|
-
var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
|
|
8511
|
-
function removeDotSegments(input) {
|
|
8512
|
-
var output = [];
|
|
8513
|
-
while (input.length) {
|
|
8514
|
-
if (input.match(RDS1)) {
|
|
8515
|
-
input = input.replace(RDS1, "");
|
|
8516
|
-
} else if (input.match(RDS2)) {
|
|
8517
|
-
input = input.replace(RDS2, "/");
|
|
8518
|
-
} else if (input.match(RDS3)) {
|
|
8519
|
-
input = input.replace(RDS3, "/");
|
|
8520
|
-
output.pop();
|
|
8521
|
-
} else if (input === "." || input === "..") {
|
|
8522
|
-
input = "";
|
|
8523
|
-
} else {
|
|
8524
|
-
var im = input.match(RDS5);
|
|
8525
|
-
if (im) {
|
|
8526
|
-
var s = im[0];
|
|
8527
|
-
input = input.slice(s.length);
|
|
8528
|
-
output.push(s);
|
|
8529
|
-
} else {
|
|
8530
|
-
throw new Error("Unexpected dot segment condition");
|
|
8531
|
-
}
|
|
8532
|
-
}
|
|
8533
|
-
}
|
|
8534
|
-
return output.join("");
|
|
8535
|
-
}
|
|
8536
|
-
function serialize(components) {
|
|
8537
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8538
|
-
var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
8539
|
-
var uriTokens = [];
|
|
8540
|
-
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
8541
|
-
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
|
|
8542
|
-
if (components.host) {
|
|
8543
|
-
if (protocol.IPV6ADDRESS.test(components.host)) {} else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
|
|
8544
|
-
try {
|
|
8545
|
-
components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
|
|
8546
|
-
} catch (e) {
|
|
8547
|
-
components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
|
8548
|
-
}
|
|
8549
|
-
}
|
|
8550
|
-
}
|
|
8551
|
-
_normalizeComponentEncoding(components, protocol);
|
|
8552
|
-
if (options.reference !== "suffix" && components.scheme) {
|
|
8553
|
-
uriTokens.push(components.scheme);
|
|
8554
|
-
uriTokens.push(":");
|
|
8555
|
-
}
|
|
8556
|
-
var authority = _recomposeAuthority(components, options);
|
|
8557
|
-
if (authority !== undefined) {
|
|
8558
|
-
if (options.reference !== "suffix") {
|
|
8559
|
-
uriTokens.push("//");
|
|
8560
|
-
}
|
|
8561
|
-
uriTokens.push(authority);
|
|
8562
|
-
if (components.path && components.path.charAt(0) !== "/") {
|
|
8563
|
-
uriTokens.push("/");
|
|
8564
|
-
}
|
|
8565
|
-
}
|
|
8566
|
-
if (components.path !== undefined) {
|
|
8567
|
-
var s = components.path;
|
|
8568
|
-
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
8569
|
-
s = removeDotSegments(s);
|
|
8570
|
-
}
|
|
8571
|
-
if (authority === undefined) {
|
|
8572
|
-
s = s.replace(/^\/\//, "/%2F");
|
|
8573
|
-
}
|
|
8574
|
-
uriTokens.push(s);
|
|
8575
|
-
}
|
|
8576
|
-
if (components.query !== undefined) {
|
|
8577
|
-
uriTokens.push("?");
|
|
8578
|
-
uriTokens.push(components.query);
|
|
8579
|
-
}
|
|
8580
|
-
if (components.fragment !== undefined) {
|
|
8581
|
-
uriTokens.push("#");
|
|
8582
|
-
uriTokens.push(components.fragment);
|
|
8583
|
-
}
|
|
8584
|
-
return uriTokens.join("");
|
|
8585
|
-
}
|
|
8586
|
-
function resolveComponents(base, relative) {
|
|
8587
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8588
|
-
var skipNormalization = arguments[3];
|
|
8589
|
-
var target = {};
|
|
8590
|
-
if (!skipNormalization) {
|
|
8591
|
-
base = parse(serialize(base, options), options);
|
|
8592
|
-
relative = parse(serialize(relative, options), options);
|
|
8593
|
-
}
|
|
8594
|
-
options = options || {};
|
|
8595
|
-
if (!options.tolerant && relative.scheme) {
|
|
8596
|
-
target.scheme = relative.scheme;
|
|
8597
|
-
target.userinfo = relative.userinfo;
|
|
8598
|
-
target.host = relative.host;
|
|
8599
|
-
target.port = relative.port;
|
|
8600
|
-
target.path = removeDotSegments(relative.path || "");
|
|
8601
|
-
target.query = relative.query;
|
|
8602
|
-
} else {
|
|
8603
|
-
if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
|
|
8604
|
-
target.userinfo = relative.userinfo;
|
|
8605
|
-
target.host = relative.host;
|
|
8606
|
-
target.port = relative.port;
|
|
8607
|
-
target.path = removeDotSegments(relative.path || "");
|
|
8608
|
-
target.query = relative.query;
|
|
8609
|
-
} else {
|
|
8610
|
-
if (!relative.path) {
|
|
8611
|
-
target.path = base.path;
|
|
8612
|
-
if (relative.query !== undefined) {
|
|
8613
|
-
target.query = relative.query;
|
|
8614
|
-
} else {
|
|
8615
|
-
target.query = base.query;
|
|
8616
|
-
}
|
|
8617
|
-
} else {
|
|
8618
|
-
if (relative.path.charAt(0) === "/") {
|
|
8619
|
-
target.path = removeDotSegments(relative.path);
|
|
8620
|
-
} else {
|
|
8621
|
-
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
8622
|
-
target.path = "/" + relative.path;
|
|
8623
|
-
} else if (!base.path) {
|
|
8624
|
-
target.path = relative.path;
|
|
8625
|
-
} else {
|
|
8626
|
-
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
8627
|
-
}
|
|
8628
|
-
target.path = removeDotSegments(target.path);
|
|
8629
|
-
}
|
|
8630
|
-
target.query = relative.query;
|
|
8631
|
-
}
|
|
8632
|
-
target.userinfo = base.userinfo;
|
|
8633
|
-
target.host = base.host;
|
|
8634
|
-
target.port = base.port;
|
|
8635
|
-
}
|
|
8636
|
-
target.scheme = base.scheme;
|
|
8637
|
-
}
|
|
8638
|
-
target.fragment = relative.fragment;
|
|
8639
|
-
return target;
|
|
8640
|
-
}
|
|
8641
|
-
function resolve(baseURI, relativeURI, options) {
|
|
8642
|
-
var schemelessOptions = assign({
|
|
8643
|
-
scheme: "null"
|
|
8644
|
-
}, options);
|
|
8645
|
-
return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
|
8646
|
-
}
|
|
8647
|
-
function normalize(uri, options) {
|
|
8648
|
-
if (typeof uri === "string") {
|
|
8649
|
-
uri = serialize(parse(uri, options), options);
|
|
8650
|
-
} else if (typeOf(uri) === "object") {
|
|
8651
|
-
uri = parse(serialize(uri, options), options);
|
|
8652
|
-
}
|
|
8653
|
-
return uri;
|
|
8654
|
-
}
|
|
8655
|
-
function equal(uriA, uriB, options) {
|
|
8656
|
-
if (typeof uriA === "string") {
|
|
8657
|
-
uriA = serialize(parse(uriA, options), options);
|
|
8658
|
-
} else if (typeOf(uriA) === "object") {
|
|
8659
|
-
uriA = serialize(uriA, options);
|
|
8660
|
-
}
|
|
8661
|
-
if (typeof uriB === "string") {
|
|
8662
|
-
uriB = serialize(parse(uriB, options), options);
|
|
8663
|
-
} else if (typeOf(uriB) === "object") {
|
|
8664
|
-
uriB = serialize(uriB, options);
|
|
8665
|
-
}
|
|
8666
|
-
return uriA === uriB;
|
|
8667
|
-
}
|
|
8668
|
-
function escapeComponent(str, options) {
|
|
8669
|
-
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
|
|
8670
|
-
}
|
|
8671
|
-
function unescapeComponent(str, options) {
|
|
8672
|
-
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
|
|
8673
|
-
}
|
|
8674
|
-
var handler = {
|
|
8675
|
-
scheme: "http",
|
|
8676
|
-
domainHost: true,
|
|
8677
|
-
parse: function parse(components, options) {
|
|
8678
|
-
if (!components.host) {
|
|
8679
|
-
components.error = components.error || "HTTP URIs must have a host.";
|
|
8680
|
-
}
|
|
8681
|
-
return components;
|
|
8682
|
-
},
|
|
8683
|
-
serialize: function serialize(components, options) {
|
|
8684
|
-
var secure = String(components.scheme).toLowerCase() === "https";
|
|
8685
|
-
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
8686
|
-
components.port = undefined;
|
|
8687
|
-
}
|
|
8688
|
-
if (!components.path) {
|
|
8689
|
-
components.path = "/";
|
|
8690
|
-
}
|
|
8691
|
-
return components;
|
|
8692
|
-
}
|
|
8693
|
-
};
|
|
8694
|
-
var handler$1 = {
|
|
8695
|
-
scheme: "https",
|
|
8696
|
-
domainHost: handler.domainHost,
|
|
8697
|
-
parse: handler.parse,
|
|
8698
|
-
serialize: handler.serialize
|
|
8699
|
-
};
|
|
8700
|
-
function isSecure(wsComponents) {
|
|
8701
|
-
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
8702
|
-
}
|
|
8703
|
-
var handler$2 = {
|
|
8704
|
-
scheme: "ws",
|
|
8705
|
-
domainHost: true,
|
|
8706
|
-
parse: function parse(components, options) {
|
|
8707
|
-
var wsComponents = components;
|
|
8708
|
-
wsComponents.secure = isSecure(wsComponents);
|
|
8709
|
-
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
8710
|
-
wsComponents.path = undefined;
|
|
8711
|
-
wsComponents.query = undefined;
|
|
8712
|
-
return wsComponents;
|
|
8713
|
-
},
|
|
8714
|
-
serialize: function serialize(wsComponents, options) {
|
|
8715
|
-
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
8716
|
-
wsComponents.port = undefined;
|
|
8717
|
-
}
|
|
8718
|
-
if (typeof wsComponents.secure === "boolean") {
|
|
8719
|
-
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
8720
|
-
wsComponents.secure = undefined;
|
|
8721
|
-
}
|
|
8722
|
-
if (wsComponents.resourceName) {
|
|
8723
|
-
var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
|
|
8724
|
-
wsComponents.path = path && path !== "/" ? path : undefined;
|
|
8725
|
-
wsComponents.query = query;
|
|
8726
|
-
wsComponents.resourceName = undefined;
|
|
8727
|
-
}
|
|
8728
|
-
wsComponents.fragment = undefined;
|
|
8729
|
-
return wsComponents;
|
|
8730
|
-
}
|
|
8731
|
-
};
|
|
8732
|
-
var handler$3 = {
|
|
8733
|
-
scheme: "wss",
|
|
8734
|
-
domainHost: handler$2.domainHost,
|
|
8735
|
-
parse: handler$2.parse,
|
|
8736
|
-
serialize: handler$2.serialize
|
|
8737
|
-
};
|
|
8738
|
-
var O = {};
|
|
8739
|
-
var isIRI = true;
|
|
8740
|
-
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
|
|
8741
|
-
var HEXDIG$$ = "[0-9A-Fa-f]";
|
|
8742
|
-
var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$));
|
|
8743
|
-
var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
|
|
8744
|
-
var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
|
|
8745
|
-
var VCHAR$$ = merge(QTEXT$$, '[\\"\\\\]');
|
|
8746
|
-
var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
|
|
8747
|
-
var UNRESERVED = new RegExp(UNRESERVED$$, "g");
|
|
8748
|
-
var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
|
|
8749
|
-
var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
|
|
8750
|
-
var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
|
|
8751
|
-
var NOT_HFVALUE = NOT_HFNAME;
|
|
8752
|
-
function decodeUnreserved(str) {
|
|
8753
|
-
var decStr = pctDecChars(str);
|
|
8754
|
-
return !decStr.match(UNRESERVED) ? str : decStr;
|
|
8755
|
-
}
|
|
8756
|
-
var handler$4 = {
|
|
8757
|
-
scheme: "mailto",
|
|
8758
|
-
parse: function parse$$1(components, options) {
|
|
8759
|
-
var mailtoComponents = components;
|
|
8760
|
-
var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
|
|
8761
|
-
mailtoComponents.path = undefined;
|
|
8762
|
-
if (mailtoComponents.query) {
|
|
8763
|
-
var unknownHeaders = false;
|
|
8764
|
-
var headers = {};
|
|
8765
|
-
var hfields = mailtoComponents.query.split("&");
|
|
8766
|
-
for (var x = 0, xl = hfields.length; x < xl; ++x) {
|
|
8767
|
-
var hfield = hfields[x].split("=");
|
|
8768
|
-
switch (hfield[0]) {
|
|
8769
|
-
case "to":
|
|
8770
|
-
var toAddrs = hfield[1].split(",");
|
|
8771
|
-
for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
|
|
8772
|
-
to.push(toAddrs[_x]);
|
|
8773
|
-
}
|
|
8774
|
-
break;
|
|
8775
|
-
|
|
8776
|
-
case "subject":
|
|
8777
|
-
mailtoComponents.subject = unescapeComponent(hfield[1], options);
|
|
8778
|
-
break;
|
|
8779
|
-
|
|
8780
|
-
case "body":
|
|
8781
|
-
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
|
8782
|
-
break;
|
|
8783
|
-
|
|
8784
|
-
default:
|
|
8785
|
-
unknownHeaders = true;
|
|
8786
|
-
headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
|
8787
|
-
break;
|
|
8788
|
-
}
|
|
8789
|
-
}
|
|
8790
|
-
if (unknownHeaders) mailtoComponents.headers = headers;
|
|
8791
|
-
}
|
|
8792
|
-
mailtoComponents.query = undefined;
|
|
8793
|
-
for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
|
|
8794
|
-
var addr = to[_x2].split("@");
|
|
8795
|
-
addr[0] = unescapeComponent(addr[0]);
|
|
8796
|
-
if (!options.unicodeSupport) {
|
|
8797
|
-
try {
|
|
8798
|
-
addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
|
|
8799
|
-
} catch (e) {
|
|
8800
|
-
mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
|
8801
|
-
}
|
|
8802
|
-
} else {
|
|
8803
|
-
addr[1] = unescapeComponent(addr[1], options).toLowerCase();
|
|
8804
|
-
}
|
|
8805
|
-
to[_x2] = addr.join("@");
|
|
8806
|
-
}
|
|
8807
|
-
return mailtoComponents;
|
|
8808
|
-
},
|
|
8809
|
-
serialize: function serialize$$1(mailtoComponents, options) {
|
|
8810
|
-
var components = mailtoComponents;
|
|
8811
|
-
var to = toArray(mailtoComponents.to);
|
|
8812
|
-
if (to) {
|
|
8813
|
-
for (var x = 0, xl = to.length; x < xl; ++x) {
|
|
8814
|
-
var toAddr = String(to[x]);
|
|
8815
|
-
var atIdx = toAddr.lastIndexOf("@");
|
|
8816
|
-
var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
|
|
8817
|
-
var domain = toAddr.slice(atIdx + 1);
|
|
8818
|
-
try {
|
|
8819
|
-
domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
|
|
8820
|
-
} catch (e) {
|
|
8821
|
-
components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
|
8822
|
-
}
|
|
8823
|
-
to[x] = localPart + "@" + domain;
|
|
8824
|
-
}
|
|
8825
|
-
components.path = to.join(",");
|
|
8826
|
-
}
|
|
8827
|
-
var headers = mailtoComponents.headers = mailtoComponents.headers || {};
|
|
8828
|
-
if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
|
|
8829
|
-
if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
|
|
8830
|
-
var fields = [];
|
|
8831
|
-
for (var name in headers) {
|
|
8832
|
-
if (headers[name] !== O[name]) {
|
|
8833
|
-
fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
|
|
8834
|
-
}
|
|
8835
|
-
}
|
|
8836
|
-
if (fields.length) {
|
|
8837
|
-
components.query = fields.join("&");
|
|
8838
|
-
}
|
|
8839
|
-
return components;
|
|
8840
|
-
}
|
|
8841
|
-
};
|
|
8842
|
-
var URN_PARSE = /^([^\:]+)\:(.*)/;
|
|
8843
|
-
var handler$5 = {
|
|
8844
|
-
scheme: "urn",
|
|
8845
|
-
parse: function parse$$1(components, options) {
|
|
8846
|
-
var matches = components.path && components.path.match(URN_PARSE);
|
|
8847
|
-
var urnComponents = components;
|
|
8848
|
-
if (matches) {
|
|
8849
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
8850
|
-
var nid = matches[1].toLowerCase();
|
|
8851
|
-
var nss = matches[2];
|
|
8852
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
8853
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
8854
|
-
urnComponents.nid = nid;
|
|
8855
|
-
urnComponents.nss = nss;
|
|
8856
|
-
urnComponents.path = undefined;
|
|
8857
|
-
if (schemeHandler) {
|
|
8858
|
-
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
8859
|
-
}
|
|
8860
|
-
} else {
|
|
8861
|
-
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
8862
|
-
}
|
|
8863
|
-
return urnComponents;
|
|
8864
|
-
},
|
|
8865
|
-
serialize: function serialize$$1(urnComponents, options) {
|
|
8866
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
8867
|
-
var nid = urnComponents.nid;
|
|
8868
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
8869
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
8870
|
-
if (schemeHandler) {
|
|
8871
|
-
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
8872
|
-
}
|
|
8873
|
-
var uriComponents = urnComponents;
|
|
8874
|
-
var nss = urnComponents.nss;
|
|
8875
|
-
uriComponents.path = (nid || options.nid) + ":" + nss;
|
|
8876
|
-
return uriComponents;
|
|
8877
|
-
}
|
|
8878
|
-
};
|
|
8879
|
-
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
|
8880
|
-
var handler$6 = {
|
|
8881
|
-
scheme: "urn:uuid",
|
|
8882
|
-
parse: function parse(urnComponents, options) {
|
|
8883
|
-
var uuidComponents = urnComponents;
|
|
8884
|
-
uuidComponents.uuid = uuidComponents.nss;
|
|
8885
|
-
uuidComponents.nss = undefined;
|
|
8886
|
-
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
|
8887
|
-
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
8888
|
-
}
|
|
8889
|
-
return uuidComponents;
|
|
8890
|
-
},
|
|
8891
|
-
serialize: function serialize(uuidComponents, options) {
|
|
8892
|
-
var urnComponents = uuidComponents;
|
|
8893
|
-
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
8894
|
-
return urnComponents;
|
|
8895
|
-
}
|
|
8896
|
-
};
|
|
8897
|
-
SCHEMES[handler.scheme] = handler;
|
|
8898
|
-
SCHEMES[handler$1.scheme] = handler$1;
|
|
8899
|
-
SCHEMES[handler$2.scheme] = handler$2;
|
|
8900
|
-
SCHEMES[handler$3.scheme] = handler$3;
|
|
8901
|
-
SCHEMES[handler$4.scheme] = handler$4;
|
|
8902
|
-
SCHEMES[handler$5.scheme] = handler$5;
|
|
8903
|
-
SCHEMES[handler$6.scheme] = handler$6;
|
|
8904
|
-
exports.SCHEMES = SCHEMES;
|
|
8905
|
-
exports.pctEncChar = pctEncChar;
|
|
8906
|
-
exports.pctDecChars = pctDecChars;
|
|
8907
|
-
exports.parse = parse;
|
|
8908
|
-
exports.removeDotSegments = removeDotSegments;
|
|
8909
|
-
exports.serialize = serialize;
|
|
8910
|
-
exports.resolveComponents = resolveComponents;
|
|
8911
|
-
exports.resolve = resolve;
|
|
8912
|
-
exports.normalize = normalize;
|
|
8913
|
-
exports.equal = equal;
|
|
8914
|
-
exports.escapeComponent = escapeComponent;
|
|
8915
|
-
exports.unescapeComponent = unescapeComponent;
|
|
8916
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8917
|
-
value: true
|
|
8918
|
-
});
|
|
8919
|
-
}));
|
|
8920
|
-
},
|
|
8921
7929
|
6949: module => {
|
|
8922
7930
|
"use strict";
|
|
8923
7931
|
module.exports = function(Yallist) {
|
|
@@ -15539,7 +14547,7 @@ var __webpack_modules__ = {
|
|
|
15539
14547
|
Object.defineProperty(exports, "__esModule", {
|
|
15540
14548
|
value: true
|
|
15541
14549
|
});
|
|
15542
|
-
const uri = __webpack_require__(
|
|
14550
|
+
const uri = __webpack_require__(4307);
|
|
15543
14551
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
15544
14552
|
exports["default"] = uri;
|
|
15545
14553
|
},
|
|
@@ -16676,6 +15684,7 @@ var __webpack_modules__ = {
|
|
|
16676
15684
|
const codegen_1 = __webpack_require__(7525);
|
|
16677
15685
|
const types_1 = __webpack_require__(5124);
|
|
16678
15686
|
const compile_1 = __webpack_require__(6267);
|
|
15687
|
+
const ref_error_1 = __webpack_require__(8887);
|
|
16679
15688
|
const util_1 = __webpack_require__(3);
|
|
16680
15689
|
const error = {
|
|
16681
15690
|
message: ({params: {discrError, tagName}}) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
@@ -16736,8 +15745,10 @@ var __webpack_modules__ = {
|
|
|
16736
15745
|
for (let i = 0; i < oneOf.length; i++) {
|
|
16737
15746
|
let sch = oneOf[i];
|
|
16738
15747
|
if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
|
|
16739
|
-
|
|
15748
|
+
const ref = sch.$ref;
|
|
15749
|
+
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
|
|
16740
15750
|
if (sch instanceof compile_1.SchemaEnv) sch = sch.schema;
|
|
15751
|
+
if (sch === undefined) throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
16741
15752
|
}
|
|
16742
15753
|
const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
|
|
16743
15754
|
if (typeof propSch != "object") {
|
|
@@ -17475,9 +16486,712 @@ var __webpack_modules__ = {
|
|
|
17475
16486
|
"use strict";
|
|
17476
16487
|
module.exports = require("zlib");
|
|
17477
16488
|
},
|
|
16489
|
+
4307: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
16490
|
+
"use strict";
|
|
16491
|
+
const {normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding} = __webpack_require__(4718);
|
|
16492
|
+
const SCHEMES = __webpack_require__(6163);
|
|
16493
|
+
function normalize(uri, options) {
|
|
16494
|
+
if (typeof uri === "string") {
|
|
16495
|
+
uri = serialize(parse(uri, options), options);
|
|
16496
|
+
} else if (typeof uri === "object") {
|
|
16497
|
+
uri = parse(serialize(uri, options), options);
|
|
16498
|
+
}
|
|
16499
|
+
return uri;
|
|
16500
|
+
}
|
|
16501
|
+
function resolve(baseURI, relativeURI, options) {
|
|
16502
|
+
const schemelessOptions = Object.assign({
|
|
16503
|
+
scheme: "null"
|
|
16504
|
+
}, options);
|
|
16505
|
+
const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
16506
|
+
return serialize(resolved, {
|
|
16507
|
+
...schemelessOptions,
|
|
16508
|
+
skipEscape: true
|
|
16509
|
+
});
|
|
16510
|
+
}
|
|
16511
|
+
function resolveComponents(base, relative, options, skipNormalization) {
|
|
16512
|
+
const target = {};
|
|
16513
|
+
if (!skipNormalization) {
|
|
16514
|
+
base = parse(serialize(base, options), options);
|
|
16515
|
+
relative = parse(serialize(relative, options), options);
|
|
16516
|
+
}
|
|
16517
|
+
options = options || {};
|
|
16518
|
+
if (!options.tolerant && relative.scheme) {
|
|
16519
|
+
target.scheme = relative.scheme;
|
|
16520
|
+
target.userinfo = relative.userinfo;
|
|
16521
|
+
target.host = relative.host;
|
|
16522
|
+
target.port = relative.port;
|
|
16523
|
+
target.path = removeDotSegments(relative.path || "");
|
|
16524
|
+
target.query = relative.query;
|
|
16525
|
+
} else {
|
|
16526
|
+
if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
|
|
16527
|
+
target.userinfo = relative.userinfo;
|
|
16528
|
+
target.host = relative.host;
|
|
16529
|
+
target.port = relative.port;
|
|
16530
|
+
target.path = removeDotSegments(relative.path || "");
|
|
16531
|
+
target.query = relative.query;
|
|
16532
|
+
} else {
|
|
16533
|
+
if (!relative.path) {
|
|
16534
|
+
target.path = base.path;
|
|
16535
|
+
if (relative.query !== undefined) {
|
|
16536
|
+
target.query = relative.query;
|
|
16537
|
+
} else {
|
|
16538
|
+
target.query = base.query;
|
|
16539
|
+
}
|
|
16540
|
+
} else {
|
|
16541
|
+
if (relative.path.charAt(0) === "/") {
|
|
16542
|
+
target.path = removeDotSegments(relative.path);
|
|
16543
|
+
} else {
|
|
16544
|
+
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
16545
|
+
target.path = "/" + relative.path;
|
|
16546
|
+
} else if (!base.path) {
|
|
16547
|
+
target.path = relative.path;
|
|
16548
|
+
} else {
|
|
16549
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
16550
|
+
}
|
|
16551
|
+
target.path = removeDotSegments(target.path);
|
|
16552
|
+
}
|
|
16553
|
+
target.query = relative.query;
|
|
16554
|
+
}
|
|
16555
|
+
target.userinfo = base.userinfo;
|
|
16556
|
+
target.host = base.host;
|
|
16557
|
+
target.port = base.port;
|
|
16558
|
+
}
|
|
16559
|
+
target.scheme = base.scheme;
|
|
16560
|
+
}
|
|
16561
|
+
target.fragment = relative.fragment;
|
|
16562
|
+
return target;
|
|
16563
|
+
}
|
|
16564
|
+
function equal(uriA, uriB, options) {
|
|
16565
|
+
if (typeof uriA === "string") {
|
|
16566
|
+
uriA = unescape(uriA);
|
|
16567
|
+
uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), {
|
|
16568
|
+
...options,
|
|
16569
|
+
skipEscape: true
|
|
16570
|
+
});
|
|
16571
|
+
} else if (typeof uriA === "object") {
|
|
16572
|
+
uriA = serialize(normalizeComponentEncoding(uriA, true), {
|
|
16573
|
+
...options,
|
|
16574
|
+
skipEscape: true
|
|
16575
|
+
});
|
|
16576
|
+
}
|
|
16577
|
+
if (typeof uriB === "string") {
|
|
16578
|
+
uriB = unescape(uriB);
|
|
16579
|
+
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), {
|
|
16580
|
+
...options,
|
|
16581
|
+
skipEscape: true
|
|
16582
|
+
});
|
|
16583
|
+
} else if (typeof uriB === "object") {
|
|
16584
|
+
uriB = serialize(normalizeComponentEncoding(uriB, true), {
|
|
16585
|
+
...options,
|
|
16586
|
+
skipEscape: true
|
|
16587
|
+
});
|
|
16588
|
+
}
|
|
16589
|
+
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
16590
|
+
}
|
|
16591
|
+
function serialize(cmpts, opts) {
|
|
16592
|
+
const components = {
|
|
16593
|
+
host: cmpts.host,
|
|
16594
|
+
scheme: cmpts.scheme,
|
|
16595
|
+
userinfo: cmpts.userinfo,
|
|
16596
|
+
port: cmpts.port,
|
|
16597
|
+
path: cmpts.path,
|
|
16598
|
+
query: cmpts.query,
|
|
16599
|
+
nid: cmpts.nid,
|
|
16600
|
+
nss: cmpts.nss,
|
|
16601
|
+
uuid: cmpts.uuid,
|
|
16602
|
+
fragment: cmpts.fragment,
|
|
16603
|
+
reference: cmpts.reference,
|
|
16604
|
+
resourceName: cmpts.resourceName,
|
|
16605
|
+
secure: cmpts.secure,
|
|
16606
|
+
error: ""
|
|
16607
|
+
};
|
|
16608
|
+
const options = Object.assign({}, opts);
|
|
16609
|
+
const uriTokens = [];
|
|
16610
|
+
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
16611
|
+
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
|
|
16612
|
+
if (components.path !== undefined) {
|
|
16613
|
+
if (!options.skipEscape) {
|
|
16614
|
+
components.path = escape(components.path);
|
|
16615
|
+
if (components.scheme !== undefined) {
|
|
16616
|
+
components.path = components.path.split("%3A").join(":");
|
|
16617
|
+
}
|
|
16618
|
+
} else {
|
|
16619
|
+
components.path = unescape(components.path);
|
|
16620
|
+
}
|
|
16621
|
+
}
|
|
16622
|
+
if (options.reference !== "suffix" && components.scheme) {
|
|
16623
|
+
uriTokens.push(components.scheme);
|
|
16624
|
+
uriTokens.push(":");
|
|
16625
|
+
}
|
|
16626
|
+
const authority = recomposeAuthority(components, options);
|
|
16627
|
+
if (authority !== undefined) {
|
|
16628
|
+
if (options.reference !== "suffix") {
|
|
16629
|
+
uriTokens.push("//");
|
|
16630
|
+
}
|
|
16631
|
+
uriTokens.push(authority);
|
|
16632
|
+
if (components.path && components.path.charAt(0) !== "/") {
|
|
16633
|
+
uriTokens.push("/");
|
|
16634
|
+
}
|
|
16635
|
+
}
|
|
16636
|
+
if (components.path !== undefined) {
|
|
16637
|
+
let s = components.path;
|
|
16638
|
+
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
16639
|
+
s = removeDotSegments(s);
|
|
16640
|
+
}
|
|
16641
|
+
if (authority === undefined) {
|
|
16642
|
+
s = s.replace(/^\/\//u, "/%2F");
|
|
16643
|
+
}
|
|
16644
|
+
uriTokens.push(s);
|
|
16645
|
+
}
|
|
16646
|
+
if (components.query !== undefined) {
|
|
16647
|
+
uriTokens.push("?");
|
|
16648
|
+
uriTokens.push(components.query);
|
|
16649
|
+
}
|
|
16650
|
+
if (components.fragment !== undefined) {
|
|
16651
|
+
uriTokens.push("#");
|
|
16652
|
+
uriTokens.push(components.fragment);
|
|
16653
|
+
}
|
|
16654
|
+
return uriTokens.join("");
|
|
16655
|
+
}
|
|
16656
|
+
const hexLookUp = Array.from({
|
|
16657
|
+
length: 127
|
|
16658
|
+
}, ((v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k))));
|
|
16659
|
+
function nonSimpleDomain(value) {
|
|
16660
|
+
let code = 0;
|
|
16661
|
+
for (let i = 0, len = value.length; i < len; ++i) {
|
|
16662
|
+
code = value.charCodeAt(i);
|
|
16663
|
+
if (code > 126 || hexLookUp[code]) {
|
|
16664
|
+
return true;
|
|
16665
|
+
}
|
|
16666
|
+
}
|
|
16667
|
+
return false;
|
|
16668
|
+
}
|
|
16669
|
+
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
16670
|
+
function parse(uri, opts) {
|
|
16671
|
+
const options = Object.assign({}, opts);
|
|
16672
|
+
const parsed = {
|
|
16673
|
+
scheme: undefined,
|
|
16674
|
+
userinfo: undefined,
|
|
16675
|
+
host: "",
|
|
16676
|
+
port: undefined,
|
|
16677
|
+
path: "",
|
|
16678
|
+
query: undefined,
|
|
16679
|
+
fragment: undefined
|
|
16680
|
+
};
|
|
16681
|
+
const gotEncoding = uri.indexOf("%") !== -1;
|
|
16682
|
+
let isIP = false;
|
|
16683
|
+
if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri;
|
|
16684
|
+
const matches = uri.match(URI_PARSE);
|
|
16685
|
+
if (matches) {
|
|
16686
|
+
parsed.scheme = matches[1];
|
|
16687
|
+
parsed.userinfo = matches[3];
|
|
16688
|
+
parsed.host = matches[4];
|
|
16689
|
+
parsed.port = parseInt(matches[5], 10);
|
|
16690
|
+
parsed.path = matches[6] || "";
|
|
16691
|
+
parsed.query = matches[7];
|
|
16692
|
+
parsed.fragment = matches[8];
|
|
16693
|
+
if (isNaN(parsed.port)) {
|
|
16694
|
+
parsed.port = matches[5];
|
|
16695
|
+
}
|
|
16696
|
+
if (parsed.host) {
|
|
16697
|
+
const ipv4result = normalizeIPv4(parsed.host);
|
|
16698
|
+
if (ipv4result.isIPV4 === false) {
|
|
16699
|
+
const ipv6result = normalizeIPv6(ipv4result.host, {
|
|
16700
|
+
isIPV4: false
|
|
16701
|
+
});
|
|
16702
|
+
parsed.host = ipv6result.host.toLowerCase();
|
|
16703
|
+
isIP = ipv6result.isIPV6;
|
|
16704
|
+
} else {
|
|
16705
|
+
parsed.host = ipv4result.host;
|
|
16706
|
+
isIP = true;
|
|
16707
|
+
}
|
|
16708
|
+
}
|
|
16709
|
+
if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && !parsed.path && parsed.query === undefined) {
|
|
16710
|
+
parsed.reference = "same-document";
|
|
16711
|
+
} else if (parsed.scheme === undefined) {
|
|
16712
|
+
parsed.reference = "relative";
|
|
16713
|
+
} else if (parsed.fragment === undefined) {
|
|
16714
|
+
parsed.reference = "absolute";
|
|
16715
|
+
} else {
|
|
16716
|
+
parsed.reference = "uri";
|
|
16717
|
+
}
|
|
16718
|
+
if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
|
|
16719
|
+
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
16720
|
+
}
|
|
16721
|
+
const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
|
|
16722
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
16723
|
+
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
16724
|
+
try {
|
|
16725
|
+
parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
|
|
16726
|
+
} catch (e) {
|
|
16727
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
16728
|
+
}
|
|
16729
|
+
}
|
|
16730
|
+
}
|
|
16731
|
+
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
16732
|
+
if (gotEncoding && parsed.scheme !== undefined) {
|
|
16733
|
+
parsed.scheme = unescape(parsed.scheme);
|
|
16734
|
+
}
|
|
16735
|
+
if (gotEncoding && parsed.userinfo !== undefined) {
|
|
16736
|
+
parsed.userinfo = unescape(parsed.userinfo);
|
|
16737
|
+
}
|
|
16738
|
+
if (gotEncoding && parsed.host !== undefined) {
|
|
16739
|
+
parsed.host = unescape(parsed.host);
|
|
16740
|
+
}
|
|
16741
|
+
if (parsed.path !== undefined && parsed.path.length) {
|
|
16742
|
+
parsed.path = escape(unescape(parsed.path));
|
|
16743
|
+
}
|
|
16744
|
+
if (parsed.fragment !== undefined && parsed.fragment.length) {
|
|
16745
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
16746
|
+
}
|
|
16747
|
+
}
|
|
16748
|
+
if (schemeHandler && schemeHandler.parse) {
|
|
16749
|
+
schemeHandler.parse(parsed, options);
|
|
16750
|
+
}
|
|
16751
|
+
} else {
|
|
16752
|
+
parsed.error = parsed.error || "URI can not be parsed.";
|
|
16753
|
+
}
|
|
16754
|
+
return parsed;
|
|
16755
|
+
}
|
|
16756
|
+
const fastUri = {
|
|
16757
|
+
SCHEMES,
|
|
16758
|
+
normalize,
|
|
16759
|
+
resolve,
|
|
16760
|
+
resolveComponents,
|
|
16761
|
+
equal,
|
|
16762
|
+
serialize,
|
|
16763
|
+
parse
|
|
16764
|
+
};
|
|
16765
|
+
module.exports = fastUri;
|
|
16766
|
+
module.exports["default"] = fastUri;
|
|
16767
|
+
module.exports.fastUri = fastUri;
|
|
16768
|
+
},
|
|
16769
|
+
6163: module => {
|
|
16770
|
+
"use strict";
|
|
16771
|
+
const UUID_REG = /^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu;
|
|
16772
|
+
const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
16773
|
+
function isSecure(wsComponents) {
|
|
16774
|
+
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
16775
|
+
}
|
|
16776
|
+
function httpParse(components) {
|
|
16777
|
+
if (!components.host) {
|
|
16778
|
+
components.error = components.error || "HTTP URIs must have a host.";
|
|
16779
|
+
}
|
|
16780
|
+
return components;
|
|
16781
|
+
}
|
|
16782
|
+
function httpSerialize(components) {
|
|
16783
|
+
const secure = String(components.scheme).toLowerCase() === "https";
|
|
16784
|
+
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
16785
|
+
components.port = undefined;
|
|
16786
|
+
}
|
|
16787
|
+
if (!components.path) {
|
|
16788
|
+
components.path = "/";
|
|
16789
|
+
}
|
|
16790
|
+
return components;
|
|
16791
|
+
}
|
|
16792
|
+
function wsParse(wsComponents) {
|
|
16793
|
+
wsComponents.secure = isSecure(wsComponents);
|
|
16794
|
+
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
16795
|
+
wsComponents.path = undefined;
|
|
16796
|
+
wsComponents.query = undefined;
|
|
16797
|
+
return wsComponents;
|
|
16798
|
+
}
|
|
16799
|
+
function wsSerialize(wsComponents) {
|
|
16800
|
+
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
16801
|
+
wsComponents.port = undefined;
|
|
16802
|
+
}
|
|
16803
|
+
if (typeof wsComponents.secure === "boolean") {
|
|
16804
|
+
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
16805
|
+
wsComponents.secure = undefined;
|
|
16806
|
+
}
|
|
16807
|
+
if (wsComponents.resourceName) {
|
|
16808
|
+
const [path, query] = wsComponents.resourceName.split("?");
|
|
16809
|
+
wsComponents.path = path && path !== "/" ? path : undefined;
|
|
16810
|
+
wsComponents.query = query;
|
|
16811
|
+
wsComponents.resourceName = undefined;
|
|
16812
|
+
}
|
|
16813
|
+
wsComponents.fragment = undefined;
|
|
16814
|
+
return wsComponents;
|
|
16815
|
+
}
|
|
16816
|
+
function urnParse(urnComponents, options) {
|
|
16817
|
+
if (!urnComponents.path) {
|
|
16818
|
+
urnComponents.error = "URN can not be parsed";
|
|
16819
|
+
return urnComponents;
|
|
16820
|
+
}
|
|
16821
|
+
const matches = urnComponents.path.match(URN_REG);
|
|
16822
|
+
if (matches) {
|
|
16823
|
+
const scheme = options.scheme || urnComponents.scheme || "urn";
|
|
16824
|
+
urnComponents.nid = matches[1].toLowerCase();
|
|
16825
|
+
urnComponents.nss = matches[2];
|
|
16826
|
+
const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`;
|
|
16827
|
+
const schemeHandler = SCHEMES[urnScheme];
|
|
16828
|
+
urnComponents.path = undefined;
|
|
16829
|
+
if (schemeHandler) {
|
|
16830
|
+
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
16831
|
+
}
|
|
16832
|
+
} else {
|
|
16833
|
+
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
16834
|
+
}
|
|
16835
|
+
return urnComponents;
|
|
16836
|
+
}
|
|
16837
|
+
function urnSerialize(urnComponents, options) {
|
|
16838
|
+
const scheme = options.scheme || urnComponents.scheme || "urn";
|
|
16839
|
+
const nid = urnComponents.nid.toLowerCase();
|
|
16840
|
+
const urnScheme = `${scheme}:${options.nid || nid}`;
|
|
16841
|
+
const schemeHandler = SCHEMES[urnScheme];
|
|
16842
|
+
if (schemeHandler) {
|
|
16843
|
+
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
16844
|
+
}
|
|
16845
|
+
const uriComponents = urnComponents;
|
|
16846
|
+
const nss = urnComponents.nss;
|
|
16847
|
+
uriComponents.path = `${nid || options.nid}:${nss}`;
|
|
16848
|
+
options.skipEscape = true;
|
|
16849
|
+
return uriComponents;
|
|
16850
|
+
}
|
|
16851
|
+
function urnuuidParse(urnComponents, options) {
|
|
16852
|
+
const uuidComponents = urnComponents;
|
|
16853
|
+
uuidComponents.uuid = uuidComponents.nss;
|
|
16854
|
+
uuidComponents.nss = undefined;
|
|
16855
|
+
if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
|
|
16856
|
+
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
16857
|
+
}
|
|
16858
|
+
return uuidComponents;
|
|
16859
|
+
}
|
|
16860
|
+
function urnuuidSerialize(uuidComponents) {
|
|
16861
|
+
const urnComponents = uuidComponents;
|
|
16862
|
+
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
16863
|
+
return urnComponents;
|
|
16864
|
+
}
|
|
16865
|
+
const http = {
|
|
16866
|
+
scheme: "http",
|
|
16867
|
+
domainHost: true,
|
|
16868
|
+
parse: httpParse,
|
|
16869
|
+
serialize: httpSerialize
|
|
16870
|
+
};
|
|
16871
|
+
const https = {
|
|
16872
|
+
scheme: "https",
|
|
16873
|
+
domainHost: http.domainHost,
|
|
16874
|
+
parse: httpParse,
|
|
16875
|
+
serialize: httpSerialize
|
|
16876
|
+
};
|
|
16877
|
+
const ws = {
|
|
16878
|
+
scheme: "ws",
|
|
16879
|
+
domainHost: true,
|
|
16880
|
+
parse: wsParse,
|
|
16881
|
+
serialize: wsSerialize
|
|
16882
|
+
};
|
|
16883
|
+
const wss = {
|
|
16884
|
+
scheme: "wss",
|
|
16885
|
+
domainHost: ws.domainHost,
|
|
16886
|
+
parse: ws.parse,
|
|
16887
|
+
serialize: ws.serialize
|
|
16888
|
+
};
|
|
16889
|
+
const urn = {
|
|
16890
|
+
scheme: "urn",
|
|
16891
|
+
parse: urnParse,
|
|
16892
|
+
serialize: urnSerialize,
|
|
16893
|
+
skipNormalize: true
|
|
16894
|
+
};
|
|
16895
|
+
const urnuuid = {
|
|
16896
|
+
scheme: "urn:uuid",
|
|
16897
|
+
parse: urnuuidParse,
|
|
16898
|
+
serialize: urnuuidSerialize,
|
|
16899
|
+
skipNormalize: true
|
|
16900
|
+
};
|
|
16901
|
+
const SCHEMES = {
|
|
16902
|
+
http,
|
|
16903
|
+
https,
|
|
16904
|
+
ws,
|
|
16905
|
+
wss,
|
|
16906
|
+
urn,
|
|
16907
|
+
"urn:uuid": urnuuid
|
|
16908
|
+
};
|
|
16909
|
+
module.exports = SCHEMES;
|
|
16910
|
+
},
|
|
16911
|
+
8622: module => {
|
|
16912
|
+
"use strict";
|
|
16913
|
+
const HEX = {
|
|
16914
|
+
0: 0,
|
|
16915
|
+
1: 1,
|
|
16916
|
+
2: 2,
|
|
16917
|
+
3: 3,
|
|
16918
|
+
4: 4,
|
|
16919
|
+
5: 5,
|
|
16920
|
+
6: 6,
|
|
16921
|
+
7: 7,
|
|
16922
|
+
8: 8,
|
|
16923
|
+
9: 9,
|
|
16924
|
+
a: 10,
|
|
16925
|
+
A: 10,
|
|
16926
|
+
b: 11,
|
|
16927
|
+
B: 11,
|
|
16928
|
+
c: 12,
|
|
16929
|
+
C: 12,
|
|
16930
|
+
d: 13,
|
|
16931
|
+
D: 13,
|
|
16932
|
+
e: 14,
|
|
16933
|
+
E: 14,
|
|
16934
|
+
f: 15,
|
|
16935
|
+
F: 15
|
|
16936
|
+
};
|
|
16937
|
+
module.exports = {
|
|
16938
|
+
HEX
|
|
16939
|
+
};
|
|
16940
|
+
},
|
|
16941
|
+
4718: (module, __unused_webpack_exports, __webpack_require__) => {
|
|
16942
|
+
"use strict";
|
|
16943
|
+
const {HEX} = __webpack_require__(8622);
|
|
16944
|
+
function normalizeIPv4(host) {
|
|
16945
|
+
if (findToken(host, ".") < 3) {
|
|
16946
|
+
return {
|
|
16947
|
+
host,
|
|
16948
|
+
isIPV4: false
|
|
16949
|
+
};
|
|
16950
|
+
}
|
|
16951
|
+
const matches = host.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u) || [];
|
|
16952
|
+
const [address] = matches;
|
|
16953
|
+
if (address) {
|
|
16954
|
+
return {
|
|
16955
|
+
host: stripLeadingZeros(address, "."),
|
|
16956
|
+
isIPV4: true
|
|
16957
|
+
};
|
|
16958
|
+
} else {
|
|
16959
|
+
return {
|
|
16960
|
+
host,
|
|
16961
|
+
isIPV4: false
|
|
16962
|
+
};
|
|
16963
|
+
}
|
|
16964
|
+
}
|
|
16965
|
+
function stringArrayToHexStripped(input, keepZero = false) {
|
|
16966
|
+
let acc = "";
|
|
16967
|
+
let strip = true;
|
|
16968
|
+
for (const c of input) {
|
|
16969
|
+
if (HEX[c] === undefined) return undefined;
|
|
16970
|
+
if (c !== "0" && strip === true) strip = false;
|
|
16971
|
+
if (!strip) acc += c;
|
|
16972
|
+
}
|
|
16973
|
+
if (keepZero && acc.length === 0) acc = "0";
|
|
16974
|
+
return acc;
|
|
16975
|
+
}
|
|
16976
|
+
function getIPV6(input) {
|
|
16977
|
+
let tokenCount = 0;
|
|
16978
|
+
const output = {
|
|
16979
|
+
error: false,
|
|
16980
|
+
address: "",
|
|
16981
|
+
zone: ""
|
|
16982
|
+
};
|
|
16983
|
+
const address = [];
|
|
16984
|
+
const buffer = [];
|
|
16985
|
+
let isZone = false;
|
|
16986
|
+
let endipv6Encountered = false;
|
|
16987
|
+
let endIpv6 = false;
|
|
16988
|
+
function consume() {
|
|
16989
|
+
if (buffer.length) {
|
|
16990
|
+
if (isZone === false) {
|
|
16991
|
+
const hex = stringArrayToHexStripped(buffer);
|
|
16992
|
+
if (hex !== undefined) {
|
|
16993
|
+
address.push(hex);
|
|
16994
|
+
} else {
|
|
16995
|
+
output.error = true;
|
|
16996
|
+
return false;
|
|
16997
|
+
}
|
|
16998
|
+
}
|
|
16999
|
+
buffer.length = 0;
|
|
17000
|
+
}
|
|
17001
|
+
return true;
|
|
17002
|
+
}
|
|
17003
|
+
for (let i = 0; i < input.length; i++) {
|
|
17004
|
+
const cursor = input[i];
|
|
17005
|
+
if (cursor === "[" || cursor === "]") {
|
|
17006
|
+
continue;
|
|
17007
|
+
}
|
|
17008
|
+
if (cursor === ":") {
|
|
17009
|
+
if (endipv6Encountered === true) {
|
|
17010
|
+
endIpv6 = true;
|
|
17011
|
+
}
|
|
17012
|
+
if (!consume()) {
|
|
17013
|
+
break;
|
|
17014
|
+
}
|
|
17015
|
+
tokenCount++;
|
|
17016
|
+
address.push(":");
|
|
17017
|
+
if (tokenCount > 7) {
|
|
17018
|
+
output.error = true;
|
|
17019
|
+
break;
|
|
17020
|
+
}
|
|
17021
|
+
if (i - 1 >= 0 && input[i - 1] === ":") {
|
|
17022
|
+
endipv6Encountered = true;
|
|
17023
|
+
}
|
|
17024
|
+
continue;
|
|
17025
|
+
} else if (cursor === "%") {
|
|
17026
|
+
if (!consume()) {
|
|
17027
|
+
break;
|
|
17028
|
+
}
|
|
17029
|
+
isZone = true;
|
|
17030
|
+
} else {
|
|
17031
|
+
buffer.push(cursor);
|
|
17032
|
+
continue;
|
|
17033
|
+
}
|
|
17034
|
+
}
|
|
17035
|
+
if (buffer.length) {
|
|
17036
|
+
if (isZone) {
|
|
17037
|
+
output.zone = buffer.join("");
|
|
17038
|
+
} else if (endIpv6) {
|
|
17039
|
+
address.push(buffer.join(""));
|
|
17040
|
+
} else {
|
|
17041
|
+
address.push(stringArrayToHexStripped(buffer));
|
|
17042
|
+
}
|
|
17043
|
+
}
|
|
17044
|
+
output.address = address.join("");
|
|
17045
|
+
return output;
|
|
17046
|
+
}
|
|
17047
|
+
function normalizeIPv6(host, opts = {}) {
|
|
17048
|
+
if (findToken(host, ":") < 2) {
|
|
17049
|
+
return {
|
|
17050
|
+
host,
|
|
17051
|
+
isIPV6: false
|
|
17052
|
+
};
|
|
17053
|
+
}
|
|
17054
|
+
const ipv6 = getIPV6(host);
|
|
17055
|
+
if (!ipv6.error) {
|
|
17056
|
+
let newHost = ipv6.address;
|
|
17057
|
+
let escapedHost = ipv6.address;
|
|
17058
|
+
if (ipv6.zone) {
|
|
17059
|
+
newHost += "%" + ipv6.zone;
|
|
17060
|
+
escapedHost += "%25" + ipv6.zone;
|
|
17061
|
+
}
|
|
17062
|
+
return {
|
|
17063
|
+
host: newHost,
|
|
17064
|
+
escapedHost,
|
|
17065
|
+
isIPV6: true
|
|
17066
|
+
};
|
|
17067
|
+
} else {
|
|
17068
|
+
return {
|
|
17069
|
+
host,
|
|
17070
|
+
isIPV6: false
|
|
17071
|
+
};
|
|
17072
|
+
}
|
|
17073
|
+
}
|
|
17074
|
+
function stripLeadingZeros(str, token) {
|
|
17075
|
+
let out = "";
|
|
17076
|
+
let skip = true;
|
|
17077
|
+
const l = str.length;
|
|
17078
|
+
for (let i = 0; i < l; i++) {
|
|
17079
|
+
const c = str[i];
|
|
17080
|
+
if (c === "0" && skip) {
|
|
17081
|
+
if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
|
|
17082
|
+
out += c;
|
|
17083
|
+
skip = false;
|
|
17084
|
+
}
|
|
17085
|
+
} else {
|
|
17086
|
+
if (c === token) {
|
|
17087
|
+
skip = true;
|
|
17088
|
+
} else {
|
|
17089
|
+
skip = false;
|
|
17090
|
+
}
|
|
17091
|
+
out += c;
|
|
17092
|
+
}
|
|
17093
|
+
}
|
|
17094
|
+
return out;
|
|
17095
|
+
}
|
|
17096
|
+
function findToken(str, token) {
|
|
17097
|
+
let ind = 0;
|
|
17098
|
+
for (let i = 0; i < str.length; i++) {
|
|
17099
|
+
if (str[i] === token) ind++;
|
|
17100
|
+
}
|
|
17101
|
+
return ind;
|
|
17102
|
+
}
|
|
17103
|
+
const RDS1 = /^\.\.?\//u;
|
|
17104
|
+
const RDS2 = /^\/\.(?:\/|$)/u;
|
|
17105
|
+
const RDS3 = /^\/\.\.(?:\/|$)/u;
|
|
17106
|
+
const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u;
|
|
17107
|
+
function removeDotSegments(input) {
|
|
17108
|
+
const output = [];
|
|
17109
|
+
while (input.length) {
|
|
17110
|
+
if (input.match(RDS1)) {
|
|
17111
|
+
input = input.replace(RDS1, "");
|
|
17112
|
+
} else if (input.match(RDS2)) {
|
|
17113
|
+
input = input.replace(RDS2, "/");
|
|
17114
|
+
} else if (input.match(RDS3)) {
|
|
17115
|
+
input = input.replace(RDS3, "/");
|
|
17116
|
+
output.pop();
|
|
17117
|
+
} else if (input === "." || input === "..") {
|
|
17118
|
+
input = "";
|
|
17119
|
+
} else {
|
|
17120
|
+
const im = input.match(RDS5);
|
|
17121
|
+
if (im) {
|
|
17122
|
+
const s = im[0];
|
|
17123
|
+
input = input.slice(s.length);
|
|
17124
|
+
output.push(s);
|
|
17125
|
+
} else {
|
|
17126
|
+
throw new Error("Unexpected dot segment condition");
|
|
17127
|
+
}
|
|
17128
|
+
}
|
|
17129
|
+
}
|
|
17130
|
+
return output.join("");
|
|
17131
|
+
}
|
|
17132
|
+
function normalizeComponentEncoding(components, esc) {
|
|
17133
|
+
const func = esc !== true ? escape : unescape;
|
|
17134
|
+
if (components.scheme !== undefined) {
|
|
17135
|
+
components.scheme = func(components.scheme);
|
|
17136
|
+
}
|
|
17137
|
+
if (components.userinfo !== undefined) {
|
|
17138
|
+
components.userinfo = func(components.userinfo);
|
|
17139
|
+
}
|
|
17140
|
+
if (components.host !== undefined) {
|
|
17141
|
+
components.host = func(components.host);
|
|
17142
|
+
}
|
|
17143
|
+
if (components.path !== undefined) {
|
|
17144
|
+
components.path = func(components.path);
|
|
17145
|
+
}
|
|
17146
|
+
if (components.query !== undefined) {
|
|
17147
|
+
components.query = func(components.query);
|
|
17148
|
+
}
|
|
17149
|
+
if (components.fragment !== undefined) {
|
|
17150
|
+
components.fragment = func(components.fragment);
|
|
17151
|
+
}
|
|
17152
|
+
return components;
|
|
17153
|
+
}
|
|
17154
|
+
function recomposeAuthority(components, options) {
|
|
17155
|
+
const uriTokens = [];
|
|
17156
|
+
if (components.userinfo !== undefined) {
|
|
17157
|
+
uriTokens.push(components.userinfo);
|
|
17158
|
+
uriTokens.push("@");
|
|
17159
|
+
}
|
|
17160
|
+
if (components.host !== undefined) {
|
|
17161
|
+
let host = unescape(components.host);
|
|
17162
|
+
const ipV4res = normalizeIPv4(host);
|
|
17163
|
+
if (ipV4res.isIPV4) {
|
|
17164
|
+
host = ipV4res.host;
|
|
17165
|
+
} else {
|
|
17166
|
+
const ipV6res = normalizeIPv6(ipV4res.host, {
|
|
17167
|
+
isIPV4: false
|
|
17168
|
+
});
|
|
17169
|
+
if (ipV6res.isIPV6 === true) {
|
|
17170
|
+
host = `[${ipV6res.escapedHost}]`;
|
|
17171
|
+
} else {
|
|
17172
|
+
host = components.host;
|
|
17173
|
+
}
|
|
17174
|
+
}
|
|
17175
|
+
uriTokens.push(host);
|
|
17176
|
+
}
|
|
17177
|
+
if (typeof components.port === "number" || typeof components.port === "string") {
|
|
17178
|
+
uriTokens.push(":");
|
|
17179
|
+
uriTokens.push(String(components.port));
|
|
17180
|
+
}
|
|
17181
|
+
return uriTokens.length ? uriTokens.join("") : undefined;
|
|
17182
|
+
}
|
|
17183
|
+
module.exports = {
|
|
17184
|
+
recomposeAuthority,
|
|
17185
|
+
normalizeComponentEncoding,
|
|
17186
|
+
removeDotSegments,
|
|
17187
|
+
normalizeIPv4,
|
|
17188
|
+
normalizeIPv6,
|
|
17189
|
+
stringArrayToHexStripped
|
|
17190
|
+
};
|
|
17191
|
+
},
|
|
17478
17192
|
8330: module => {
|
|
17479
17193
|
"use strict";
|
|
17480
|
-
module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.
|
|
17194
|
+
module.exports = JSON.parse('{"name":"@jsii/runtime","version":"1.102.0","description":"jsii runtime kernel process","license":"Apache-2.0","author":{"name":"Amazon Web Services","url":"https://aws.amazon.com"},"homepage":"https://github.com/aws/jsii","bugs":{"url":"https://github.com/aws/jsii/issues"},"repository":{"type":"git","url":"https://github.com/aws/jsii.git","directory":"packages/@jsii/runtime"},"engines":{"node":">= 14.17.0"},"main":"lib/index.js","types":"lib/index.d.ts","bin":{"jsii-runtime":"bin/jsii-runtime"},"scripts":{"build":"tsc --build && chmod +x bin/jsii-runtime && npx webpack-cli && npm run lint","watch":"tsc --build -w","lint":"ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=webpack.config.js","lint:fix":"yarn lint --fix","test":"jest","test:update":"jest -u","package":"package-js"},"dependencies":{"@jsii/kernel":"^1.102.0","@jsii/check-node":"1.102.0","@jsii/spec":"^1.102.0"},"devDependencies":{"@scope/jsii-calc-base":"^1.102.0","@scope/jsii-calc-lib":"^1.102.0","jsii-build-tools":"^1.102.0","jsii-calc":"^3.20.120","source-map-loader":"^5.0.0","webpack":"^5.93.0","webpack-cli":"^5.1.4"}}');
|
|
17481
17195
|
},
|
|
17482
17196
|
9453: module => {
|
|
17483
17197
|
"use strict";
|