UNPKG

cesium

Version:

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.

1,270 lines (1,264 loc) 10.1 MB
/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.133.1 * * Copyright 2011-2022 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod2) => function __require() { return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target, mod2 )); var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2); // node_modules/mersenne-twister/src/mersenne-twister.js var require_mersenne_twister = __commonJS({ "node_modules/mersenne-twister/src/mersenne-twister.js"(exports2, module2) { var MersenneTwister4 = function(seed) { if (seed == void 0) { seed = (/* @__PURE__ */ new Date()).getTime(); } this.N = 624; this.M = 397; this.MATRIX_A = 2567483615; this.UPPER_MASK = 2147483648; this.LOWER_MASK = 2147483647; this.mt = new Array(this.N); this.mti = this.N + 1; if (seed.constructor == Array) { this.init_by_array(seed, seed.length); } else { this.init_seed(seed); } }; MersenneTwister4.prototype.init_seed = function(s) { this.mt[0] = s >>> 0; for (this.mti = 1; this.mti < this.N; this.mti++) { var s = this.mt[this.mti - 1] ^ this.mt[this.mti - 1] >>> 30; this.mt[this.mti] = (((s & 4294901760) >>> 16) * 1812433253 << 16) + (s & 65535) * 1812433253 + this.mti; this.mt[this.mti] >>>= 0; } }; MersenneTwister4.prototype.init_by_array = function(init_key, key_length) { var i, j, k; this.init_seed(19650218); i = 1; j = 0; k = this.N > key_length ? this.N : key_length; for (; k; k--) { var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30; this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1664525 << 16) + (s & 65535) * 1664525) + init_key[j] + j; this.mt[i] >>>= 0; i++; j++; if (i >= this.N) { this.mt[0] = this.mt[this.N - 1]; i = 1; } if (j >= key_length) j = 0; } for (k = this.N - 1; k; k--) { var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30; this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1566083941 << 16) + (s & 65535) * 1566083941) - i; this.mt[i] >>>= 0; i++; if (i >= this.N) { this.mt[0] = this.mt[this.N - 1]; i = 1; } } this.mt[0] = 2147483648; }; MersenneTwister4.prototype.random_int = function() { var y; var mag01 = new Array(0, this.MATRIX_A); if (this.mti >= this.N) { var kk; if (this.mti == this.N + 1) this.init_seed(5489); for (kk = 0; kk < this.N - this.M; kk++) { y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK; this.mt[kk] = this.mt[kk + this.M] ^ y >>> 1 ^ mag01[y & 1]; } for (; kk < this.N - 1; kk++) { y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK; this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ y >>> 1 ^ mag01[y & 1]; } y = this.mt[this.N - 1] & this.UPPER_MASK | this.mt[0] & this.LOWER_MASK; this.mt[this.N - 1] = this.mt[this.M - 1] ^ y >>> 1 ^ mag01[y & 1]; this.mti = 0; } y = this.mt[this.mti++]; y ^= y >>> 11; y ^= y << 7 & 2636928640; y ^= y << 15 & 4022730752; y ^= y >>> 18; return y >>> 0; }; MersenneTwister4.prototype.random_int31 = function() { return this.random_int() >>> 1; }; MersenneTwister4.prototype.random_incl = function() { return this.random_int() * (1 / 4294967295); }; MersenneTwister4.prototype.random = function() { return this.random_int() * (1 / 4294967296); }; MersenneTwister4.prototype.random_excl = function() { return (this.random_int() + 0.5) * (1 / 4294967296); }; MersenneTwister4.prototype.random_long = function() { var a3 = this.random_int() >>> 5, b = this.random_int() >>> 6; return (a3 * 67108864 + b) * (1 / 9007199254740992); }; module2.exports = MersenneTwister4; } }); // node_modules/urijs/src/punycode.js var require_punycode = __commonJS({ "node_modules/urijs/src/punycode.js"(exports2, module2) { /*! https://mths.be/punycode v1.4.0 by @mathias */ (function(root) { var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; var freeModule = typeof module2 == "object" && module2 && !module2.nodeType && module2; var freeGlobal = typeof global == "object" && global; if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) { root = freeGlobal; } var punycode, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = { "overflow": "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, key; function error(type) { throw new RangeError(errors[type]); } function map(array, fn) { var length2 = array.length; var result = []; while (length2--) { result[length2] = fn(array[length2]); } return result; } function mapDomain(string, fn) { var parts = string.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; string = parts[1]; } string = string.replace(regexSeparators, "."); var labels = string.split("."); var encoded = map(labels, fn).join("."); return result + encoded; } function ucs2decode(string) { var output = [], counter = 0, length2 = string.length, value, extra; while (counter < length2) { value = string.charCodeAt(counter++); if (value >= 55296 && value <= 56319 && counter < length2) { extra = string.charCodeAt(counter++); if ((extra & 64512) == 56320) { output.push(((value & 1023) << 10) + (extra & 1023) + 65536); } else { output.push(value); counter--; } } else { output.push(value); } } return output; } function ucs2encode(array) { return map(array, function(value) { var output = ""; if (value > 65535) { value -= 65536; output += stringFromCharCode(value >>> 10 & 1023 | 55296); value = 56320 | value & 1023; } output += stringFromCharCode(value); return output; }).join(""); } function basicToDigit(codePoint) { if (codePoint - 48 < 10) { return codePoint - 22; } if (codePoint - 65 < 26) { return codePoint - 65; } if (codePoint - 97 < 26) { return codePoint - 97; } return base; } function digitToBasic(digit, flag) { return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); } function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); } function decode(input) { var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, baseMinusT; basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } for (j = 0; j < basic; ++j) { if (input.charCodeAt(j) >= 128) { error("not-basic"); } output.push(input.charCodeAt(j)); } for (index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { for (oldi = i, w = 1, k = base; ; k += base) { if (index >= inputLength) { error("invalid-input"); } digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base || digit > floor((maxInt - i) / w)) { error("overflow"); } i += digit * w; t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (digit < t) { break; } baseMinusT = base - t; if (w > floor(maxInt / baseMinusT)) { error("overflow"); } w *= baseMinusT; } out = output.length + 1; bias = adapt(i - oldi, out, oldi == 0); if (floor(i / out) > maxInt - n) { error("overflow"); } n += floor(i / out); i %= out; output.splice(i++, 0, n); } return ucs2encode(output); } function encode(input) { var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], inputLength, handledCPCountPlusOne, baseMinusT, qMinusT; input = ucs2decode(input); inputLength = input.length; n = initialN; delta = 0; bias = initialBias; for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < 128) { output.push(stringFromCharCode(currentValue)); } } handledCPCount = basicLength = output.length; if (basicLength) { output.push(delimiter); } while (handledCPCount < inputLength) { for (m = maxInt, j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue >= n && currentValue < m) { m = currentValue; } } handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { error("overflow"); } delta += (m - n) * handledCPCountPlusOne; n = m; for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < n && ++delta > maxInt) { error("overflow"); } if (currentValue == n) { for (q = delta, k = base; ; k += base) { t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (q < t) { break; } qMinusT = q - t; baseMinusT = base - t; output.push( stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) ); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } ++delta; ++n; } return output.join(""); } function toUnicode(input) { return mapDomain(input, function(string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); } function toASCII(input) { return mapDomain(input, function(string) { return regexNonASCII.test(string) ? "xn--" + encode(string) : string; }); } punycode = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ "version": "1.3.2", /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode * @type Object */ "ucs2": { "decode": ucs2decode, "encode": ucs2encode }, "decode": decode, "encode": encode, "toASCII": toASCII, "toUnicode": toUnicode }; if (typeof define == "function" && typeof define.amd == "object" && define.amd) { define("punycode", function() { return punycode; }); } else if (freeExports && freeModule) { if (module2.exports == freeExports) { freeModule.exports = punycode; } else { for (key in punycode) { punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); } } } else { root.punycode = punycode; } })(exports2); } }); // node_modules/urijs/src/IPv6.js var require_IPv6 = __commonJS({ "node_modules/urijs/src/IPv6.js"(exports2, module2) { /*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.11 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ (function(root, factory) { "use strict"; if (typeof module2 === "object" && module2.exports) { module2.exports = factory(); } else if (typeof define === "function" && define.amd) { define(factory); } else { root.IPv6 = factory(root); } })(exports2, function(root) { "use strict"; var _IPv6 = root && root.IPv6; function bestPresentation(address) { var _address = address.toLowerCase(); var segments = _address.split(":"); var length2 = segments.length; var total = 8; if (segments[0] === "" && segments[1] === "" && segments[2] === "") { segments.shift(); segments.shift(); } else if (segments[0] === "" && segments[1] === "") { segments.shift(); } else if (segments[length2 - 1] === "" && segments[length2 - 2] === "") { segments.pop(); } length2 = segments.length; if (segments[length2 - 1].indexOf(".") !== -1) { total = 7; } var pos; for (pos = 0; pos < length2; pos++) { if (segments[pos] === "") { break; } } if (pos < total) { segments.splice(pos, 1, "0000"); while (segments.length < total) { segments.splice(pos, 0, "0000"); } } var _segments; for (var i = 0; i < total; i++) { _segments = segments[i].split(""); for (var j = 0; j < 3; j++) { if (_segments[0] === "0" && _segments.length > 1) { _segments.splice(0, 1); } else { break; } } segments[i] = _segments.join(""); } var best = -1; var _best = 0; var _current = 0; var current = -1; var inzeroes = false; for (i = 0; i < total; i++) { if (inzeroes) { if (segments[i] === "0") { _current += 1; } else { inzeroes = false; if (_current > _best) { best = current; _best = _current; } } } else { if (segments[i] === "0") { inzeroes = true; current = i; _current = 1; } } } if (_current > _best) { best = current; _best = _current; } if (_best > 1) { segments.splice(best, _best, ""); } length2 = segments.length; var result = ""; if (segments[0] === "") { result = ":"; } for (i = 0; i < length2; i++) { result += segments[i]; if (i === length2 - 1) { break; } result += ":"; } if (segments[length2 - 1] === "") { result += ":"; } return result; } function noConflict() { if (root.IPv6 === this) { root.IPv6 = _IPv6; } return this; } return { best: bestPresentation, noConflict }; }); } }); // node_modules/urijs/src/SecondLevelDomains.js var require_SecondLevelDomains = __commonJS({ "node_modules/urijs/src/SecondLevelDomains.js"(exports2, module2) { /*! * URI.js - Mutating URLs * Second Level Domain (SLD) Support * * Version: 1.19.11 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ (function(root, factory) { "use strict"; if (typeof module2 === "object" && module2.exports) { module2.exports = factory(); } else if (typeof define === "function" && define.amd) { define(factory); } else { root.SecondLevelDomains = factory(root); } })(exports2, function(root) { "use strict"; var _SecondLevelDomains = root && root.SecondLevelDomains; var SLD = { // list of known Second Level Domains // converted list of SLDs from https://github.com/gavingmiller/second-level-domains // ---- // publicsuffix.org is more current and actually used by a couple of browsers internally. // downside is it also contains domains like "dyndns.org" - which is fine for the security // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js // ---- list: { "ac": " com gov mil net org ", "ae": " ac co gov mil name net org pro sch ", "af": " com edu gov net org ", "al": " com edu gov mil net org ", "ao": " co ed gv it og pb ", "ar": " com edu gob gov int mil net org tur ", "at": " ac co gv or ", "au": " asn com csiro edu gov id net org ", "ba": " co com edu gov mil net org rs unbi unmo unsa untz unze ", "bb": " biz co com edu gov info net org store tv ", "bh": " biz cc com edu gov info net org ", "bn": " com edu gov net org ", "bo": " com edu gob gov int mil net org tv ", "br": " adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ", "bs": " com edu gov net org ", "bz": " du et om ov rg ", "ca": " ab bc mb nb nf nl ns nt nu on pe qc sk yk ", "ck": " biz co edu gen gov info net org ", "cn": " ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ", "co": " com edu gov mil net nom org ", "cr": " ac c co ed fi go or sa ", "cy": " ac biz com ekloges gov ltd name net org parliament press pro tm ", "do": " art com edu gob gov mil net org sld web ", "dz": " art asso com edu gov net org pol ", "ec": " com edu fin gov info med mil net org pro ", "eg": " com edu eun gov mil name net org sci ", "er": " com edu gov ind mil net org rochest w ", "es": " com edu gob nom org ", "et": " biz com edu gov info name net org ", "fj": " ac biz com info mil name net org pro ", "fk": " ac co gov net nom org ", "fr": " asso com f gouv nom prd presse tm ", "gg": " co net org ", "gh": " com edu gov mil org ", "gn": " ac com gov net org ", "gr": " com edu gov mil net org ", "gt": " com edu gob ind mil net org ", "gu": " com edu gov net org ", "hk": " com edu gov idv net org ", "hu": " 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ", "id": " ac co go mil net or sch web ", "il": " ac co gov idf k12 muni net org ", "in": " ac co edu ernet firm gen gov i ind mil net nic org res ", "iq": " com edu gov i mil net org ", "ir": " ac co dnssec gov i id net org sch ", "it": " edu gov ", "je": " co net org ", "jo": " com edu gov mil name net org sch ", "jp": " ac ad co ed go gr lg ne or ", "ke": " ac co go info me mobi ne or sc ", "kh": " com edu gov mil net org per ", "ki": " biz com de edu gov info mob net org tel ", "km": " asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ", "kn": " edu gov net org ", "kr": " ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ", "kw": " com edu gov net org ", "ky": " com edu gov net org ", "kz": " com edu gov mil net org ", "lb": " com edu gov net org ", "lk": " assn com edu gov grp hotel int ltd net ngo org sch soc web ", "lr": " com edu gov net org ", "lv": " asn com conf edu gov id mil net org ", "ly": " com edu gov id med net org plc sch ", "ma": " ac co gov m net org press ", "mc": " asso tm ", "me": " ac co edu gov its net org priv ", "mg": " com edu gov mil nom org prd tm ", "mk": " com edu gov inf name net org pro ", "ml": " com edu gov net org presse ", "mn": " edu gov org ", "mo": " com edu gov net org ", "mt": " com edu gov net org ", "mv": " aero biz com coop edu gov info int mil museum name net org pro ", "mw": " ac co com coop edu gov int museum net org ", "mx": " com edu gob net org ", "my": " com edu gov mil name net org sch ", "nf": " arts com firm info net other per rec store web ", "ng": " biz com edu gov mil mobi name net org sch ", "ni": " ac co com edu gob mil net nom org ", "np": " com edu gov mil net org ", "nr": " biz com edu gov info net org ", "om": " ac biz co com edu gov med mil museum net org pro sch ", "pe": " com edu gob mil net nom org sld ", "ph": " com edu gov i mil net ngo org ", "pk": " biz com edu fam gob gok gon gop gos gov net org web ", "pl": " art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ", "pr": " ac biz com edu est gov info isla name net org pro prof ", "ps": " com edu gov net org plo sec ", "pw": " belau co ed go ne or ", "ro": " arts com firm info nom nt org rec store tm www ", "rs": " ac co edu gov in org ", "sb": " com edu gov net org ", "sc": " com edu gov net org ", "sh": " co com edu gov net nom org ", "sl": " com edu gov net org ", "st": " co com consulado edu embaixada gov mil net org principe saotome store ", "sv": " com edu gob org red ", "sz": " ac co org ", "tr": " av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ", "tt": " aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ", "tw": " club com ebiz edu game gov idv mil net org ", "mu": " ac co com gov net or org ", "mz": " ac co edu gov org ", "na": " co com ", "nz": " ac co cri geek gen govt health iwi maori mil net org parliament school ", "pa": " abo ac com edu gob ing med net nom org sld ", "pt": " com edu gov int net nome org publ ", "py": " com edu gov mil net org ", "qa": " com edu gov mil net org ", "re": " asso com nom ", "ru": " ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ", "rw": " ac co com edu gouv gov int mil net ", "sa": " com edu gov med net org pub sch ", "sd": " com edu gov info med net org tv ", "se": " a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ", "sg": " com edu gov idn net org per ", "sn": " art com edu gouv org perso univ ", "sy": " com edu gov mil net news org ", "th": " ac co go in mi net or ", "tj": " ac biz co com edu go gov info int mil name net nic org test web ", "tn": " agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ", "tz": " ac co go ne or ", "ua": " biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ", "ug": " ac co go ne or org sc ", "uk": " ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ", "us": " dni fed isa kids nsn ", "uy": " com edu gub mil net org ", "ve": " co com edu gob info mil net org web ", "vi": " co com k12 net org ", "vn": " ac biz com edu gov health info int name net org pro ", "ye": " co com gov ltd me net org plc ", "yu": " ac co edu gov org ", "za": " ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ", "zm": " ac co com edu gov net org sch ", // https://en.wikipedia.org/wiki/CentralNic#Second-level_domains "com": "ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ", "net": "gb jp se uk ", "org": "ae", "de": "com " }, // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost // in both performance and memory footprint. No initialization required. // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4 // Following methods use lastIndexOf() rather than array.split() in order // to avoid any memory allocations. has: function(domain) { var tldOffset = domain.lastIndexOf("."); if (tldOffset <= 0 || tldOffset >= domain.length - 1) { return false; } var sldOffset = domain.lastIndexOf(".", tldOffset - 1); if (sldOffset <= 0 || sldOffset >= tldOffset - 1) { return false; } var sldList = SLD.list[domain.slice(tldOffset + 1)]; if (!sldList) { return false; } return sldList.indexOf(" " + domain.slice(sldOffset + 1, tldOffset) + " ") >= 0; }, is: function(domain) { var tldOffset = domain.lastIndexOf("."); if (tldOffset <= 0 || tldOffset >= domain.length - 1) { return false; } var sldOffset = domain.lastIndexOf(".", tldOffset - 1); if (sldOffset >= 0) { return false; } var sldList = SLD.list[domain.slice(tldOffset + 1)]; if (!sldList) { return false; } return sldList.indexOf(" " + domain.slice(0, tldOffset) + " ") >= 0; }, get: function(domain) { var tldOffset = domain.lastIndexOf("."); if (tldOffset <= 0 || tldOffset >= domain.length - 1) { return null; } var sldOffset = domain.lastIndexOf(".", tldOffset - 1); if (sldOffset <= 0 || sldOffset >= tldOffset - 1) { return null; } var sldList = SLD.list[domain.slice(tldOffset + 1)]; if (!sldList) { return null; } if (sldList.indexOf(" " + domain.slice(sldOffset + 1, tldOffset) + " ") < 0) { return null; } return domain.slice(sldOffset + 1); }, noConflict: function() { if (root.SecondLevelDomains === this) { root.SecondLevelDomains = _SecondLevelDomains; } return this; } }; return SLD; }); } }); // node_modules/urijs/src/URI.js var require_URI = __commonJS({ "node_modules/urijs/src/URI.js"(exports2, module2) { /*! * URI.js - Mutating URLs * * Version: 1.19.11 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ (function(root, factory) { "use strict"; if (typeof module2 === "object" && module2.exports) { module2.exports = factory(require_punycode(), require_IPv6(), require_SecondLevelDomains()); } else if (typeof define === "function" && define.amd) { define(["./punycode", "./IPv6", "./SecondLevelDomains"], factory); } else { root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains, root); } })(exports2, function(punycode, IPv6, SLD, root) { "use strict"; var _URI = root && root.URI; function URI(url2, base) { var _urlSupplied = arguments.length >= 1; var _baseSupplied = arguments.length >= 2; if (!(this instanceof URI)) { if (_urlSupplied) { if (_baseSupplied) { return new URI(url2, base); } return new URI(url2); } return new URI(); } if (url2 === void 0) { if (_urlSupplied) { throw new TypeError("undefined is not a valid argument for URI"); } if (typeof location !== "undefined") { url2 = location.href + ""; } else { url2 = ""; } } if (url2 === null) { if (_urlSupplied) { throw new TypeError("null is not a valid argument for URI"); } } this.href(url2); if (base !== void 0) { return this.absoluteTo(base); } return this; } function isInteger(value) { return /^[0-9]+$/.test(value); } URI.version = "1.19.11"; var p = URI.prototype; var hasOwn = Object.prototype.hasOwnProperty; function escapeRegEx(string) { return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"); } function getType(value) { if (value === void 0) { return "Undefined"; } return String(Object.prototype.toString.call(value)).slice(8, -1); } function isArray(obj) { return getType(obj) === "Array"; } function filterArrayValues(data, value) { var lookup = {}; var i, length2; if (getType(value) === "RegExp") { lookup = null; } else if (isArray(value)) { for (i = 0, length2 = value.length; i < length2; i++) { lookup[value[i]] = true; } } else { lookup[value] = true; } for (i = 0, length2 = data.length; i < length2; i++) { var _match = lookup && lookup[data[i]] !== void 0 || !lookup && value.test(data[i]); if (_match) { data.splice(i, 1); length2--; i--; } } return data; } function arrayContains(list, value) { var i, length2; if (isArray(value)) { for (i = 0, length2 = value.length; i < length2; i++) { if (!arrayContains(list, value[i])) { return false; } } return true; } var _type = getType(value); for (i = 0, length2 = list.length; i < length2; i++) { if (_type === "RegExp") { if (typeof list[i] === "string" && list[i].match(value)) { return true; } } else if (list[i] === value) { return true; } } return false; } function arraysEqual(one, two) { if (!isArray(one) || !isArray(two)) { return false; } if (one.length !== two.length) { return false; } one.sort(); two.sort(); for (var i = 0, l = one.length; i < l; i++) { if (one[i] !== two[i]) { return false; } } return true; } function trimSlashes(text2) { var trim_expression = /^\/+|\/+$/g; return text2.replace(trim_expression, ""); } URI._parts = function() { return { protocol: null, username: null, password: null, hostname: null, urn: null, port: null, path: null, query: null, fragment: null, // state preventInvalidHostname: URI.preventInvalidHostname, duplicateQueryParameters: URI.duplicateQueryParameters, escapeQuerySpace: URI.escapeQuerySpace }; }; URI.preventInvalidHostname = false; URI.duplicateQueryParameters = false; URI.escapeQuerySpace = true; URI.protocol_expression = /^[a-z][a-z0-9.+-]*$/i; URI.idn_expression = /[^a-z0-9\._-]/i; URI.punycode_expression = /(xn--)/i; URI.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; URI.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/; URI.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig; URI.findUri = { // valid "scheme://" or "www." start: /\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi, // everything up to the next whitespace end: /[\s\r\n]|$/, // trim trailing punctuation captured by end RegExp trim: /[`!()\[\]{};:'".,<>?«»“”„‘’]+$/, // balanced parens inclusion (), [], {}, <> parens: /(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g }; URI.leading_whitespace_expression = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/; URI.ascii_tab_whitespace = /[\u0009\u000A\u000D]+/g; URI.defaultPorts = { http: "80", https: "443", ftp: "21", gopher: "70", ws: "80", wss: "443" }; URI.hostProtocols = [ "http", "https" ]; URI.invalid_hostname_characters = /[^a-zA-Z0-9\.\-:_]/; URI.domAttributes = { "a": "href", "blockquote": "cite", "link": "href", "base": "href", "script": "src", "form": "action", "img": "src", "area": "href", "iframe": "src", "embed": "src", "source": "src", "track": "src", "input": "src", // but only if type="image" "audio": "src", "video": "src" }; URI.getDomAttribute = function(node) { if (!node || !node.nodeName) { return void 0; } var nodeName = node.nodeName.toLowerCase(); if (nodeName === "input" && node.type !== "image") { return void 0; } return URI.domAttributes[nodeName]; }; function escapeForDumbFirefox36(value) { return escape(value); } function strictEncodeURIComponent(string) { return encodeURIComponent(string).replace(/[!'()*]/g, escapeForDumbFirefox36).replace(/\*/g, "%2A"); } URI.encode = strictEncodeURIComponent; URI.decode = decodeURIComponent; URI.iso8859 = function() { URI.encode = escape; URI.decode = unescape; }; URI.unicode = function() { URI.encode = strictEncodeURIComponent; URI.decode = decodeURIComponent; }; URI.characters = { pathname: { encode: { // RFC3986 2.1: For consistency, URI producers and normalizers should // use uppercase hexadecimal digits for all percent-encodings. expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig, map: { // -._~!'()* "%24": "$", "%26": "&", "%2B": "+", "%2C": ",", "%3B": ";", "%3D": "=", "%3A": ":", "%40": "@" } }, decode: { expression: /[\/\?#]/g, map: { "/": "%2F", "?": "%3F", "#": "%23" } } }, reserved: { encode: { // RFC3986 2.1: For consistency, URI producers and normalizers should // use uppercase hexadecimal digits for all percent-encodings. expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig, map: { // gen-delims "%3A": ":", "%2F": "/", "%3F": "?", "%23": "#", "%5B": "[", "%5D": "]", "%40": "@", // sub-delims "%21": "!", "%24": "$", "%26": "&", "%27": "'", "%28": "(", "%29": ")", "%2A": "*", "%2B": "+", "%2C": ",", "%3B": ";", "%3D": "=" } } }, urnpath: { // The characters under `encode` are the characters called out by RFC 2141 as being acceptable // for usage in a URN. RFC2141 also calls out "-", ".", and "_" as acceptable characters, but // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also // note that the colon character is not featured in the encoding map; this is because URI.js // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it // should not appear unencoded in a segment itself. // See also the note above about RFC3986 and capitalalized hex digits. encode: { expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig, map: { "%21": "!", "%24": "$", "%27": "'", "%28": "(", "%29": ")", "%2A": "*", "%2B": "+", "%2C": ",", "%3B": ";", "%3D": "=", "%40": "@" } }, // These characters are the characters called out by RFC2141 as "reserved" characters that // should never appear in a URN, plus the colon character (see note above). decode: { expression: /[\/\?#:]/g, map: { "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" } } } }; URI.encodeQuery = function(string, escapeQuerySpace) { var escaped = URI.encode(string + ""); if (escapeQuerySpace === void 0) { escapeQuerySpace = URI.escapeQuerySpace; } return escapeQuerySpace ? escaped.replace(/%20/g, "+") : escaped; }; URI.decodeQuery = function(string, escapeQuerySpace) { string += ""; if (escapeQuerySpace === void 0) { escapeQuerySpace = URI.escapeQuerySpace; } try { return URI.decode(escapeQuerySpace ? string.replace(/\+/g, "%20") : string); } catch (e) { return string; } }; var _parts = { "encode": "encode", "decode": "decode" }; var _part; var generateAccessor = function(_group, _part2) { return function(string) { try { return URI[_part2](string + "").replace(URI.characters[_group][_part2].expression, function(c) { return URI.characters[_group][_part2].map[c]; }); } catch (e) { return string; } }; }; for (_part in _parts) { URI[_part + "PathSegment"] = generateAccessor("pathname", _parts[_part]); URI[_part + "UrnPathSegment"] = generateAccessor("urnpath", _parts[_part]); } var generateSegmentedPathFunction = function(_sep, _codingFuncName, _innerCodingFuncName) { return function(string) { var actualCodingFunc; if (!_innerCodingFuncName) { actualCodingFunc = URI[_codingFuncName]; } else { actualCodingFunc = function(string2) { return URI[_codingFuncName](URI[_innerCodingFuncName](string2)); }; } var segments = (string + "").split(_sep); for (var i = 0, length2 = segments.length; i < length2; i++) { segments[i] = actualCodingFunc(segments[i]); } return segments.join(_sep); }; }; URI.decodePath = generateSegmentedPathFunction("/", "decodePathSegment"); URI.decodeUrnPath = generateSegmentedPathFunction(":", "decodeUrnPathSegment"); URI.recodePath = generateSegmentedPathFunction("/", "encodePathSegment", "decode"); URI.recodeUrnPath = generateSegmentedPathFunction(":", "encodeUrnPathSegment", "decode"); URI.encodeReserved = generateAccessor("reserved", "encode"); URI.parse = function(string, parts) { var pos; if (!parts) { parts = { preventInvalidHostname: URI.preventInvalidHostname }; } string = string.replace(URI.leading_whitespace_expression, ""); string = string.replace(URI.ascii_tab_whitespace, ""); pos = string.indexOf("#"); if (pos > -1) { parts.fragment = string.substring(pos + 1) || null; string = string.substring(0, pos); } pos = string.indexOf("?"); if (pos > -1) { parts.query = string.substring(pos + 1) || null; string = string.substring(0, pos); } string = string.replace(/^(https?|ftp|wss?)?:+[/\\]*/i, "$1://"); string = string.replace(/^[/\\]{2,}/i, "//"); if (string.substring(0, 2) === "//") { parts.protocol = null; string = string.substring(2); string = URI.parseAuthority(string, parts); } else { pos = string.indexOf(":"); if (pos > -1) { parts.protocol = string.substring(0, pos) || null; if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) { parts.protocol = void 0; } else if (string.substring(pos + 1, pos + 3).replace(/\\/g, "/") === "//") { string = string.substring(pos + 3); string = URI.parseAuthority(string, parts); } else { string = string.substring(pos + 1); parts.urn = true; } } } parts.path = string; return parts; }; URI.parseHost = function(string, parts) { if (!string) { string = ""; } string = string.replace(/\\/g, "/"); var pos = string.indexOf("/"); var bracketPos; var t; if (pos === -1) { pos = string.length; } if (string.charAt(0) === "[") { bracketPos = string.indexOf("]"); parts.hostname = string.substring(1, bracketPos) || null; parts.port = string.substring(bracketPos + 2, pos) || null; if (parts.port === "/") { parts.port = null; } } else { var firstColon = string.indexOf(":"); var firstSlash = string.indexOf("/"); var nextColon = string.indexOf(":", firstColon + 1); if (nextColon !== -1 && (firstSlash === -1 || nextColon < firstSlash)) { parts.hostname = string.substring(0, pos) || null; parts.port = null; } else { t = string.substring(0, pos).split(":"); parts.hostname = t[0] || null; parts.port = t[1] || null; } } if (parts.hostname && string.substring(pos).charAt(0) !== "/") { pos++; string = "/" + string; } if (parts.preventInvalidHostname) { URI.ensureValidHostname(parts.hostname, parts.protocol); } if (parts.port) { URI.ensureValidPort(parts.port); } return string.substring(pos) || "/"; }; URI.parseAuthority = function(string, parts) { string = URI.parseUserinfo(string, parts); return URI.parseHost(string, parts); }; URI.parseUserinfo = function(string, parts) { var _string = string; var firstBackSlash = string.indexOf("\\"); if (firstBackSlash !== -1) { string = string.replace(/\\/g, "/"); } var firstSlash = string.indexOf("/"); var pos = string.lastIndexOf("@", firstSlash > -1 ? firstSlash : string.length - 1); var t; if (pos > -1 && (firstSlash === -1 || pos < fir