wp/wp-includes/js/dist/url.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /******/ (function() { // webpackBootstrap
     1 /******/ (() => { // webpackBootstrap
     2 /******/ 	"use strict";
     2 /******/ 	var __webpack_modules__ = ({
     3 /******/ 	// The require scope
     3 
     4 /******/ 	var __webpack_require__ = {};
     4 /***/ 9681:
       
     5 /***/ ((module) => {
       
     6 
       
     7 var characterMap = {
       
     8 	"À": "A",
       
     9 	"Á": "A",
       
    10 	"Â": "A",
       
    11 	"Ã": "A",
       
    12 	"Ä": "A",
       
    13 	"Å": "A",
       
    14 	"Ấ": "A",
       
    15 	"Ắ": "A",
       
    16 	"Ẳ": "A",
       
    17 	"Ẵ": "A",
       
    18 	"Ặ": "A",
       
    19 	"Æ": "AE",
       
    20 	"Ầ": "A",
       
    21 	"Ằ": "A",
       
    22 	"Ȃ": "A",
       
    23 	"Ả": "A",
       
    24 	"Ạ": "A",
       
    25 	"Ẩ": "A",
       
    26 	"Ẫ": "A",
       
    27 	"Ậ": "A",
       
    28 	"Ç": "C",
       
    29 	"Ḉ": "C",
       
    30 	"È": "E",
       
    31 	"É": "E",
       
    32 	"Ê": "E",
       
    33 	"Ë": "E",
       
    34 	"Ế": "E",
       
    35 	"Ḗ": "E",
       
    36 	"Ề": "E",
       
    37 	"Ḕ": "E",
       
    38 	"Ḝ": "E",
       
    39 	"Ȇ": "E",
       
    40 	"Ẻ": "E",
       
    41 	"Ẽ": "E",
       
    42 	"Ẹ": "E",
       
    43 	"Ể": "E",
       
    44 	"Ễ": "E",
       
    45 	"Ệ": "E",
       
    46 	"Ì": "I",
       
    47 	"Í": "I",
       
    48 	"Î": "I",
       
    49 	"Ï": "I",
       
    50 	"Ḯ": "I",
       
    51 	"Ȋ": "I",
       
    52 	"Ỉ": "I",
       
    53 	"Ị": "I",
       
    54 	"Ð": "D",
       
    55 	"Ñ": "N",
       
    56 	"Ò": "O",
       
    57 	"Ó": "O",
       
    58 	"Ô": "O",
       
    59 	"Õ": "O",
       
    60 	"Ö": "O",
       
    61 	"Ø": "O",
       
    62 	"Ố": "O",
       
    63 	"Ṍ": "O",
       
    64 	"Ṓ": "O",
       
    65 	"Ȏ": "O",
       
    66 	"Ỏ": "O",
       
    67 	"Ọ": "O",
       
    68 	"Ổ": "O",
       
    69 	"Ỗ": "O",
       
    70 	"Ộ": "O",
       
    71 	"Ờ": "O",
       
    72 	"Ở": "O",
       
    73 	"Ỡ": "O",
       
    74 	"Ớ": "O",
       
    75 	"Ợ": "O",
       
    76 	"Ù": "U",
       
    77 	"Ú": "U",
       
    78 	"Û": "U",
       
    79 	"Ü": "U",
       
    80 	"Ủ": "U",
       
    81 	"Ụ": "U",
       
    82 	"Ử": "U",
       
    83 	"Ữ": "U",
       
    84 	"Ự": "U",
       
    85 	"Ý": "Y",
       
    86 	"à": "a",
       
    87 	"á": "a",
       
    88 	"â": "a",
       
    89 	"ã": "a",
       
    90 	"ä": "a",
       
    91 	"å": "a",
       
    92 	"ấ": "a",
       
    93 	"ắ": "a",
       
    94 	"ẳ": "a",
       
    95 	"ẵ": "a",
       
    96 	"ặ": "a",
       
    97 	"æ": "ae",
       
    98 	"ầ": "a",
       
    99 	"ằ": "a",
       
   100 	"ȃ": "a",
       
   101 	"ả": "a",
       
   102 	"ạ": "a",
       
   103 	"ẩ": "a",
       
   104 	"ẫ": "a",
       
   105 	"ậ": "a",
       
   106 	"ç": "c",
       
   107 	"ḉ": "c",
       
   108 	"è": "e",
       
   109 	"é": "e",
       
   110 	"ê": "e",
       
   111 	"ë": "e",
       
   112 	"ế": "e",
       
   113 	"ḗ": "e",
       
   114 	"ề": "e",
       
   115 	"ḕ": "e",
       
   116 	"ḝ": "e",
       
   117 	"ȇ": "e",
       
   118 	"ẻ": "e",
       
   119 	"ẽ": "e",
       
   120 	"ẹ": "e",
       
   121 	"ể": "e",
       
   122 	"ễ": "e",
       
   123 	"ệ": "e",
       
   124 	"ì": "i",
       
   125 	"í": "i",
       
   126 	"î": "i",
       
   127 	"ï": "i",
       
   128 	"ḯ": "i",
       
   129 	"ȋ": "i",
       
   130 	"ỉ": "i",
       
   131 	"ị": "i",
       
   132 	"ð": "d",
       
   133 	"ñ": "n",
       
   134 	"ò": "o",
       
   135 	"ó": "o",
       
   136 	"ô": "o",
       
   137 	"õ": "o",
       
   138 	"ö": "o",
       
   139 	"ø": "o",
       
   140 	"ố": "o",
       
   141 	"ṍ": "o",
       
   142 	"ṓ": "o",
       
   143 	"ȏ": "o",
       
   144 	"ỏ": "o",
       
   145 	"ọ": "o",
       
   146 	"ổ": "o",
       
   147 	"ỗ": "o",
       
   148 	"ộ": "o",
       
   149 	"ờ": "o",
       
   150 	"ở": "o",
       
   151 	"ỡ": "o",
       
   152 	"ớ": "o",
       
   153 	"ợ": "o",
       
   154 	"ù": "u",
       
   155 	"ú": "u",
       
   156 	"û": "u",
       
   157 	"ü": "u",
       
   158 	"ủ": "u",
       
   159 	"ụ": "u",
       
   160 	"ử": "u",
       
   161 	"ữ": "u",
       
   162 	"ự": "u",
       
   163 	"ý": "y",
       
   164 	"ÿ": "y",
       
   165 	"Ā": "A",
       
   166 	"ā": "a",
       
   167 	"Ă": "A",
       
   168 	"ă": "a",
       
   169 	"Ą": "A",
       
   170 	"ą": "a",
       
   171 	"Ć": "C",
       
   172 	"ć": "c",
       
   173 	"Ĉ": "C",
       
   174 	"ĉ": "c",
       
   175 	"Ċ": "C",
       
   176 	"ċ": "c",
       
   177 	"Č": "C",
       
   178 	"č": "c",
       
   179 	"C̆": "C",
       
   180 	"c̆": "c",
       
   181 	"Ď": "D",
       
   182 	"ď": "d",
       
   183 	"Đ": "D",
       
   184 	"đ": "d",
       
   185 	"Ē": "E",
       
   186 	"ē": "e",
       
   187 	"Ĕ": "E",
       
   188 	"ĕ": "e",
       
   189 	"Ė": "E",
       
   190 	"ė": "e",
       
   191 	"Ę": "E",
       
   192 	"ę": "e",
       
   193 	"Ě": "E",
       
   194 	"ě": "e",
       
   195 	"Ĝ": "G",
       
   196 	"Ǵ": "G",
       
   197 	"ĝ": "g",
       
   198 	"ǵ": "g",
       
   199 	"Ğ": "G",
       
   200 	"ğ": "g",
       
   201 	"Ġ": "G",
       
   202 	"ġ": "g",
       
   203 	"Ģ": "G",
       
   204 	"ģ": "g",
       
   205 	"Ĥ": "H",
       
   206 	"ĥ": "h",
       
   207 	"Ħ": "H",
       
   208 	"ħ": "h",
       
   209 	"Ḫ": "H",
       
   210 	"ḫ": "h",
       
   211 	"Ĩ": "I",
       
   212 	"ĩ": "i",
       
   213 	"Ī": "I",
       
   214 	"ī": "i",
       
   215 	"Ĭ": "I",
       
   216 	"ĭ": "i",
       
   217 	"Į": "I",
       
   218 	"į": "i",
       
   219 	"İ": "I",
       
   220 	"ı": "i",
       
   221 	"IJ": "IJ",
       
   222 	"ij": "ij",
       
   223 	"Ĵ": "J",
       
   224 	"ĵ": "j",
       
   225 	"Ķ": "K",
       
   226 	"ķ": "k",
       
   227 	"Ḱ": "K",
       
   228 	"ḱ": "k",
       
   229 	"K̆": "K",
       
   230 	"k̆": "k",
       
   231 	"Ĺ": "L",
       
   232 	"ĺ": "l",
       
   233 	"Ļ": "L",
       
   234 	"ļ": "l",
       
   235 	"Ľ": "L",
       
   236 	"ľ": "l",
       
   237 	"Ŀ": "L",
       
   238 	"ŀ": "l",
       
   239 	"Ł": "l",
       
   240 	"ł": "l",
       
   241 	"Ḿ": "M",
       
   242 	"ḿ": "m",
       
   243 	"M̆": "M",
       
   244 	"m̆": "m",
       
   245 	"Ń": "N",
       
   246 	"ń": "n",
       
   247 	"Ņ": "N",
       
   248 	"ņ": "n",
       
   249 	"Ň": "N",
       
   250 	"ň": "n",
       
   251 	"ʼn": "n",
       
   252 	"N̆": "N",
       
   253 	"n̆": "n",
       
   254 	"Ō": "O",
       
   255 	"ō": "o",
       
   256 	"Ŏ": "O",
       
   257 	"ŏ": "o",
       
   258 	"Ő": "O",
       
   259 	"ő": "o",
       
   260 	"Œ": "OE",
       
   261 	"œ": "oe",
       
   262 	"P̆": "P",
       
   263 	"p̆": "p",
       
   264 	"Ŕ": "R",
       
   265 	"ŕ": "r",
       
   266 	"Ŗ": "R",
       
   267 	"ŗ": "r",
       
   268 	"Ř": "R",
       
   269 	"ř": "r",
       
   270 	"R̆": "R",
       
   271 	"r̆": "r",
       
   272 	"Ȓ": "R",
       
   273 	"ȓ": "r",
       
   274 	"Ś": "S",
       
   275 	"ś": "s",
       
   276 	"Ŝ": "S",
       
   277 	"ŝ": "s",
       
   278 	"Ş": "S",
       
   279 	"Ș": "S",
       
   280 	"ș": "s",
       
   281 	"ş": "s",
       
   282 	"Š": "S",
       
   283 	"š": "s",
       
   284 	"Ţ": "T",
       
   285 	"ţ": "t",
       
   286 	"ț": "t",
       
   287 	"Ț": "T",
       
   288 	"Ť": "T",
       
   289 	"ť": "t",
       
   290 	"Ŧ": "T",
       
   291 	"ŧ": "t",
       
   292 	"T̆": "T",
       
   293 	"t̆": "t",
       
   294 	"Ũ": "U",
       
   295 	"ũ": "u",
       
   296 	"Ū": "U",
       
   297 	"ū": "u",
       
   298 	"Ŭ": "U",
       
   299 	"ŭ": "u",
       
   300 	"Ů": "U",
       
   301 	"ů": "u",
       
   302 	"Ű": "U",
       
   303 	"ű": "u",
       
   304 	"Ų": "U",
       
   305 	"ų": "u",
       
   306 	"Ȗ": "U",
       
   307 	"ȗ": "u",
       
   308 	"V̆": "V",
       
   309 	"v̆": "v",
       
   310 	"Ŵ": "W",
       
   311 	"ŵ": "w",
       
   312 	"Ẃ": "W",
       
   313 	"ẃ": "w",
       
   314 	"X̆": "X",
       
   315 	"x̆": "x",
       
   316 	"Ŷ": "Y",
       
   317 	"ŷ": "y",
       
   318 	"Ÿ": "Y",
       
   319 	"Y̆": "Y",
       
   320 	"y̆": "y",
       
   321 	"Ź": "Z",
       
   322 	"ź": "z",
       
   323 	"Ż": "Z",
       
   324 	"ż": "z",
       
   325 	"Ž": "Z",
       
   326 	"ž": "z",
       
   327 	"ſ": "s",
       
   328 	"ƒ": "f",
       
   329 	"Ơ": "O",
       
   330 	"ơ": "o",
       
   331 	"Ư": "U",
       
   332 	"ư": "u",
       
   333 	"Ǎ": "A",
       
   334 	"ǎ": "a",
       
   335 	"Ǐ": "I",
       
   336 	"ǐ": "i",
       
   337 	"Ǒ": "O",
       
   338 	"ǒ": "o",
       
   339 	"Ǔ": "U",
       
   340 	"ǔ": "u",
       
   341 	"Ǖ": "U",
       
   342 	"ǖ": "u",
       
   343 	"Ǘ": "U",
       
   344 	"ǘ": "u",
       
   345 	"Ǚ": "U",
       
   346 	"ǚ": "u",
       
   347 	"Ǜ": "U",
       
   348 	"ǜ": "u",
       
   349 	"Ứ": "U",
       
   350 	"ứ": "u",
       
   351 	"Ṹ": "U",
       
   352 	"ṹ": "u",
       
   353 	"Ǻ": "A",
       
   354 	"ǻ": "a",
       
   355 	"Ǽ": "AE",
       
   356 	"ǽ": "ae",
       
   357 	"Ǿ": "O",
       
   358 	"ǿ": "o",
       
   359 	"Þ": "TH",
       
   360 	"þ": "th",
       
   361 	"Ṕ": "P",
       
   362 	"ṕ": "p",
       
   363 	"Ṥ": "S",
       
   364 	"ṥ": "s",
       
   365 	"X́": "X",
       
   366 	"x́": "x",
       
   367 	"Ѓ": "Г",
       
   368 	"ѓ": "г",
       
   369 	"Ќ": "К",
       
   370 	"ќ": "к",
       
   371 	"A̋": "A",
       
   372 	"a̋": "a",
       
   373 	"E̋": "E",
       
   374 	"e̋": "e",
       
   375 	"I̋": "I",
       
   376 	"i̋": "i",
       
   377 	"Ǹ": "N",
       
   378 	"ǹ": "n",
       
   379 	"Ồ": "O",
       
   380 	"ồ": "o",
       
   381 	"Ṑ": "O",
       
   382 	"ṑ": "o",
       
   383 	"Ừ": "U",
       
   384 	"ừ": "u",
       
   385 	"Ẁ": "W",
       
   386 	"ẁ": "w",
       
   387 	"Ỳ": "Y",
       
   388 	"ỳ": "y",
       
   389 	"Ȁ": "A",
       
   390 	"ȁ": "a",
       
   391 	"Ȅ": "E",
       
   392 	"ȅ": "e",
       
   393 	"Ȉ": "I",
       
   394 	"ȉ": "i",
       
   395 	"Ȍ": "O",
       
   396 	"ȍ": "o",
       
   397 	"Ȑ": "R",
       
   398 	"ȑ": "r",
       
   399 	"Ȕ": "U",
       
   400 	"ȕ": "u",
       
   401 	"B̌": "B",
       
   402 	"b̌": "b",
       
   403 	"Č̣": "C",
       
   404 	"č̣": "c",
       
   405 	"Ê̌": "E",
       
   406 	"ê̌": "e",
       
   407 	"F̌": "F",
       
   408 	"f̌": "f",
       
   409 	"Ǧ": "G",
       
   410 	"ǧ": "g",
       
   411 	"Ȟ": "H",
       
   412 	"ȟ": "h",
       
   413 	"J̌": "J",
       
   414 	"ǰ": "j",
       
   415 	"Ǩ": "K",
       
   416 	"ǩ": "k",
       
   417 	"M̌": "M",
       
   418 	"m̌": "m",
       
   419 	"P̌": "P",
       
   420 	"p̌": "p",
       
   421 	"Q̌": "Q",
       
   422 	"q̌": "q",
       
   423 	"Ř̩": "R",
       
   424 	"ř̩": "r",
       
   425 	"Ṧ": "S",
       
   426 	"ṧ": "s",
       
   427 	"V̌": "V",
       
   428 	"v̌": "v",
       
   429 	"W̌": "W",
       
   430 	"w̌": "w",
       
   431 	"X̌": "X",
       
   432 	"x̌": "x",
       
   433 	"Y̌": "Y",
       
   434 	"y̌": "y",
       
   435 	"A̧": "A",
       
   436 	"a̧": "a",
       
   437 	"B̧": "B",
       
   438 	"b̧": "b",
       
   439 	"Ḑ": "D",
       
   440 	"ḑ": "d",
       
   441 	"Ȩ": "E",
       
   442 	"ȩ": "e",
       
   443 	"Ɛ̧": "E",
       
   444 	"ɛ̧": "e",
       
   445 	"Ḩ": "H",
       
   446 	"ḩ": "h",
       
   447 	"I̧": "I",
       
   448 	"i̧": "i",
       
   449 	"Ɨ̧": "I",
       
   450 	"ɨ̧": "i",
       
   451 	"M̧": "M",
       
   452 	"m̧": "m",
       
   453 	"O̧": "O",
       
   454 	"o̧": "o",
       
   455 	"Q̧": "Q",
       
   456 	"q̧": "q",
       
   457 	"U̧": "U",
       
   458 	"u̧": "u",
       
   459 	"X̧": "X",
       
   460 	"x̧": "x",
       
   461 	"Z̧": "Z",
       
   462 	"z̧": "z",
       
   463 	"й":"и",
       
   464 	"Й":"И",
       
   465 	"ё":"е",
       
   466 	"Ё":"Е",
       
   467 };
       
   468 
       
   469 var chars = Object.keys(characterMap).join('|');
       
   470 var allAccents = new RegExp(chars, 'g');
       
   471 var firstAccent = new RegExp(chars, '');
       
   472 
       
   473 function matcher(match) {
       
   474 	return characterMap[match];
       
   475 }
       
   476 
       
   477 var removeAccents = function(string) {
       
   478 	return string.replace(allAccents, matcher);
       
   479 };
       
   480 
       
   481 var hasAccents = function(string) {
       
   482 	return !!string.match(firstAccent);
       
   483 };
       
   484 
       
   485 module.exports = removeAccents;
       
   486 module.exports.has = hasAccents;
       
   487 module.exports.remove = removeAccents;
       
   488 
       
   489 
       
   490 /***/ })
       
   491 
       
   492 /******/ 	});
       
   493 /************************************************************************/
       
   494 /******/ 	// The module cache
       
   495 /******/ 	var __webpack_module_cache__ = {};
       
   496 /******/ 	
       
   497 /******/ 	// The require function
       
   498 /******/ 	function __webpack_require__(moduleId) {
       
   499 /******/ 		// Check if module is in cache
       
   500 /******/ 		var cachedModule = __webpack_module_cache__[moduleId];
       
   501 /******/ 		if (cachedModule !== undefined) {
       
   502 /******/ 			return cachedModule.exports;
       
   503 /******/ 		}
       
   504 /******/ 		// Create a new module (and put it into the cache)
       
   505 /******/ 		var module = __webpack_module_cache__[moduleId] = {
       
   506 /******/ 			// no module.id needed
       
   507 /******/ 			// no module.loaded needed
       
   508 /******/ 			exports: {}
       
   509 /******/ 		};
       
   510 /******/ 	
       
   511 /******/ 		// Execute the module function
       
   512 /******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
       
   513 /******/ 	
       
   514 /******/ 		// Return the exports of the module
       
   515 /******/ 		return module.exports;
       
   516 /******/ 	}
     5 /******/ 	
   517 /******/ 	
     6 /************************************************************************/
   518 /************************************************************************/
       
   519 /******/ 	/* webpack/runtime/compat get default export */
       
   520 /******/ 	(() => {
       
   521 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
       
   522 /******/ 		__webpack_require__.n = (module) => {
       
   523 /******/ 			var getter = module && module.__esModule ?
       
   524 /******/ 				() => (module['default']) :
       
   525 /******/ 				() => (module);
       
   526 /******/ 			__webpack_require__.d(getter, { a: getter });
       
   527 /******/ 			return getter;
       
   528 /******/ 		};
       
   529 /******/ 	})();
       
   530 /******/ 	
     7 /******/ 	/* webpack/runtime/define property getters */
   531 /******/ 	/* webpack/runtime/define property getters */
     8 /******/ 	!function() {
   532 /******/ 	(() => {
     9 /******/ 		// define getter functions for harmony exports
   533 /******/ 		// define getter functions for harmony exports
    10 /******/ 		__webpack_require__.d = function(exports, definition) {
   534 /******/ 		__webpack_require__.d = (exports, definition) => {
    11 /******/ 			for(var key in definition) {
   535 /******/ 			for(var key in definition) {
    12 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
   536 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
    13 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
   537 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
    14 /******/ 				}
   538 /******/ 				}
    15 /******/ 			}
   539 /******/ 			}
    16 /******/ 		};
   540 /******/ 		};
    17 /******/ 	}();
   541 /******/ 	})();
    18 /******/ 	
   542 /******/ 	
    19 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
   543 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
    20 /******/ 	!function() {
   544 /******/ 	(() => {
    21 /******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
   545 /******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
    22 /******/ 	}();
   546 /******/ 	})();
    23 /******/ 	
   547 /******/ 	
    24 /******/ 	/* webpack/runtime/make namespace object */
   548 /******/ 	/* webpack/runtime/make namespace object */
    25 /******/ 	!function() {
   549 /******/ 	(() => {
    26 /******/ 		// define __esModule on exports
   550 /******/ 		// define __esModule on exports
    27 /******/ 		__webpack_require__.r = function(exports) {
   551 /******/ 		__webpack_require__.r = (exports) => {
    28 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
   552 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
    29 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
   553 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
    30 /******/ 			}
   554 /******/ 			}
    31 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
   555 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
    32 /******/ 		};
   556 /******/ 		};
    33 /******/ 	}();
   557 /******/ 	})();
    34 /******/ 	
   558 /******/ 	
    35 /************************************************************************/
   559 /************************************************************************/
    36 var __webpack_exports__ = {};
   560 var __webpack_exports__ = {};
       
   561 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
       
   562 (() => {
       
   563 "use strict";
    37 // ESM COMPAT FLAG
   564 // ESM COMPAT FLAG
    38 __webpack_require__.r(__webpack_exports__);
   565 __webpack_require__.r(__webpack_exports__);
    39 
   566 
    40 // EXPORTS
   567 // EXPORTS
    41 __webpack_require__.d(__webpack_exports__, {
   568 __webpack_require__.d(__webpack_exports__, {
    42   "addQueryArgs": function() { return /* reexport */ addQueryArgs; },
   569   addQueryArgs: () => (/* reexport */ addQueryArgs),
    43   "buildQueryString": function() { return /* reexport */ buildQueryString; },
   570   buildQueryString: () => (/* reexport */ buildQueryString),
    44   "cleanForSlug": function() { return /* reexport */ cleanForSlug; },
   571   cleanForSlug: () => (/* reexport */ cleanForSlug),
    45   "filterURLForDisplay": function() { return /* reexport */ filterURLForDisplay; },
   572   filterURLForDisplay: () => (/* reexport */ filterURLForDisplay),
    46   "getAuthority": function() { return /* reexport */ getAuthority; },
   573   getAuthority: () => (/* reexport */ getAuthority),
    47   "getFilename": function() { return /* reexport */ getFilename; },
   574   getFilename: () => (/* reexport */ getFilename),
    48   "getFragment": function() { return /* reexport */ getFragment; },
   575   getFragment: () => (/* reexport */ getFragment),
    49   "getPath": function() { return /* reexport */ getPath; },
   576   getPath: () => (/* reexport */ getPath),
    50   "getPathAndQueryString": function() { return /* reexport */ getPathAndQueryString; },
   577   getPathAndQueryString: () => (/* reexport */ getPathAndQueryString),
    51   "getProtocol": function() { return /* reexport */ getProtocol; },
   578   getProtocol: () => (/* reexport */ getProtocol),
    52   "getQueryArg": function() { return /* reexport */ getQueryArg; },
   579   getQueryArg: () => (/* reexport */ getQueryArg),
    53   "getQueryArgs": function() { return /* reexport */ getQueryArgs; },
   580   getQueryArgs: () => (/* reexport */ getQueryArgs),
    54   "getQueryString": function() { return /* reexport */ getQueryString; },
   581   getQueryString: () => (/* reexport */ getQueryString),
    55   "hasQueryArg": function() { return /* reexport */ hasQueryArg; },
   582   hasQueryArg: () => (/* reexport */ hasQueryArg),
    56   "isEmail": function() { return /* reexport */ isEmail; },
   583   isEmail: () => (/* reexport */ isEmail),
    57   "isURL": function() { return /* reexport */ isURL; },
   584   isURL: () => (/* reexport */ isURL),
    58   "isValidAuthority": function() { return /* reexport */ isValidAuthority; },
   585   isValidAuthority: () => (/* reexport */ isValidAuthority),
    59   "isValidFragment": function() { return /* reexport */ isValidFragment; },
   586   isValidFragment: () => (/* reexport */ isValidFragment),
    60   "isValidPath": function() { return /* reexport */ isValidPath; },
   587   isValidPath: () => (/* reexport */ isValidPath),
    61   "isValidProtocol": function() { return /* reexport */ isValidProtocol; },
   588   isValidProtocol: () => (/* reexport */ isValidProtocol),
    62   "isValidQueryString": function() { return /* reexport */ isValidQueryString; },
   589   isValidQueryString: () => (/* reexport */ isValidQueryString),
    63   "normalizePath": function() { return /* reexport */ normalizePath; },
   590   normalizePath: () => (/* reexport */ normalizePath),
    64   "prependHTTP": function() { return /* reexport */ prependHTTP; },
   591   prependHTTP: () => (/* reexport */ prependHTTP),
    65   "removeQueryArgs": function() { return /* reexport */ removeQueryArgs; },
   592   prependHTTPS: () => (/* reexport */ prependHTTPS),
    66   "safeDecodeURI": function() { return /* reexport */ safeDecodeURI; },
   593   removeQueryArgs: () => (/* reexport */ removeQueryArgs),
    67   "safeDecodeURIComponent": function() { return /* reexport */ safeDecodeURIComponent; }
   594   safeDecodeURI: () => (/* reexport */ safeDecodeURI),
       
   595   safeDecodeURIComponent: () => (/* reexport */ safeDecodeURIComponent)
    68 });
   596 });
    69 
   597 
    70 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-url.js
   598 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-url.js
    71 /**
   599 /**
    72  * Determines whether the given string looks like a URL.
   600  * Determines whether the given string looks like a URL.
    94   }
   622   }
    95 }
   623 }
    96 
   624 
    97 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-email.js
   625 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-email.js
    98 const EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
   626 const EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
       
   627 
    99 /**
   628 /**
   100  * Determines whether the given string looks like an email.
   629  * Determines whether the given string looks like an email.
   101  *
   630  *
   102  * @param {string} email The string to scrutinise.
   631  * @param {string} email The string to scrutinise.
   103  *
   632  *
   106  * const isEmail = isEmail( 'hello@wordpress.org' ); // true
   635  * const isEmail = isEmail( 'hello@wordpress.org' ); // true
   107  * ```
   636  * ```
   108  *
   637  *
   109  * @return {boolean} Whether or not it looks like an email.
   638  * @return {boolean} Whether or not it looks like an email.
   110  */
   639  */
   111 
       
   112 function isEmail(email) {
   640 function isEmail(email) {
   113   return EMAIL_REGEXP.test(email);
   641   return EMAIL_REGEXP.test(email);
   114 }
   642 }
   115 
   643 
   116 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-protocol.js
   644 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-protocol.js
   127  *
   655  *
   128  * @return {string|void} The protocol part of the URL.
   656  * @return {string|void} The protocol part of the URL.
   129  */
   657  */
   130 function getProtocol(url) {
   658 function getProtocol(url) {
   131   const matches = /^([^\s:]+:)/.exec(url);
   659   const matches = /^([^\s:]+:)/.exec(url);
   132 
       
   133   if (matches) {
   660   if (matches) {
   134     return matches[1];
   661     return matches[1];
   135   }
   662   }
   136 }
   663 }
   137 
   664 
   151  */
   678  */
   152 function isValidProtocol(protocol) {
   679 function isValidProtocol(protocol) {
   153   if (!protocol) {
   680   if (!protocol) {
   154     return false;
   681     return false;
   155   }
   682   }
   156 
       
   157   return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
   683   return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
   158 }
   684 }
   159 
   685 
   160 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-authority.js
   686 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-authority.js
   161 /**
   687 /**
   171  *
   697  *
   172  * @return {string|void} The authority part of the URL.
   698  * @return {string|void} The authority part of the URL.
   173  */
   699  */
   174 function getAuthority(url) {
   700 function getAuthority(url) {
   175   const matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url);
   701   const matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url);
   176 
       
   177   if (matches) {
   702   if (matches) {
   178     return matches[1];
   703     return matches[1];
   179   }
   704   }
   180 }
   705 }
   181 
   706 
   195  */
   720  */
   196 function isValidAuthority(authority) {
   721 function isValidAuthority(authority) {
   197   if (!authority) {
   722   if (!authority) {
   198     return false;
   723     return false;
   199   }
   724   }
   200 
       
   201   return /^[^\s#?]+$/.test(authority);
   725   return /^[^\s#?]+$/.test(authority);
   202 }
   726 }
   203 
   727 
   204 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path.js
   728 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path.js
   205 /**
   729 /**
   215  *
   739  *
   216  * @return {string|void} The path part of the URL.
   740  * @return {string|void} The path part of the URL.
   217  */
   741  */
   218 function getPath(url) {
   742 function getPath(url) {
   219   const matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
   743   const matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
   220 
       
   221   if (matches) {
   744   if (matches) {
   222     return matches[1];
   745     return matches[1];
   223   }
   746   }
   224 }
   747 }
   225 
   748 
   239  */
   762  */
   240 function isValidPath(path) {
   763 function isValidPath(path) {
   241   if (!path) {
   764   if (!path) {
   242     return false;
   765     return false;
   243   }
   766   }
   244 
       
   245   return /^[^\s#?]+$/.test(path);
   767   return /^[^\s#?]+$/.test(path);
   246 }
   768 }
   247 
   769 
   248 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-string.js
   770 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-string.js
   249 /**
   771 /**
   258  *
   780  *
   259  * @return {string|void} The query string part of the URL.
   781  * @return {string|void} The query string part of the URL.
   260  */
   782  */
   261 function getQueryString(url) {
   783 function getQueryString(url) {
   262   let query;
   784   let query;
   263 
       
   264   try {
   785   try {
   265     query = new URL(url, 'http://example.com').search.substring(1);
   786     query = new URL(url, 'http://example.com').search.substring(1);
   266   } catch (error) {}
   787   } catch (error) {}
   267 
       
   268   if (query) {
   788   if (query) {
   269     return query;
   789     return query;
   270   }
   790   }
   271 }
   791 }
   272 
   792 
   297  */
   817  */
   298 function buildQueryString(data) {
   818 function buildQueryString(data) {
   299   let string = '';
   819   let string = '';
   300   const stack = Object.entries(data);
   820   const stack = Object.entries(data);
   301   let pair;
   821   let pair;
   302 
       
   303   while (pair = stack.shift()) {
   822   while (pair = stack.shift()) {
   304     let [key, value] = pair; // Support building deeply nested data, from array or object values.
   823     let [key, value] = pair;
   305 
   824 
       
   825     // Support building deeply nested data, from array or object values.
   306     const hasNestedData = Array.isArray(value) || value && value.constructor === Object;
   826     const hasNestedData = Array.isArray(value) || value && value.constructor === Object;
   307 
       
   308     if (hasNestedData) {
   827     if (hasNestedData) {
   309       // Push array or object values onto the stack as composed of their
   828       // Push array or object values onto the stack as composed of their
   310       // original key and nested index or key, retaining order by a
   829       // original key and nested index or key, retaining order by a
   311       // combination of Array#reverse and Array#unshift onto the stack.
   830       // combination of Array#reverse and Array#unshift onto the stack.
   312       const valuePairs = Object.entries(value).reverse();
   831       const valuePairs = Object.entries(value).reverse();
   313 
       
   314       for (const [member, memberValue] of valuePairs) {
   832       for (const [member, memberValue] of valuePairs) {
   315         stack.unshift([`${key}[${member}]`, memberValue]);
   833         stack.unshift([`${key}[${member}]`, memberValue]);
   316       }
   834       }
   317     } else if (value !== undefined) {
   835     } else if (value !== undefined) {
   318       // Null is treated as special case, equivalent to empty string.
   836       // Null is treated as special case, equivalent to empty string.
   319       if (value === null) {
   837       if (value === null) {
   320         value = '';
   838         value = '';
   321       }
   839       }
   322 
       
   323       string += '&' + [key, value].map(encodeURIComponent).join('=');
   840       string += '&' + [key, value].map(encodeURIComponent).join('=');
   324     }
   841     }
   325   } // Loop will concatenate with leading `&`, but it's only expected for all
   842   }
       
   843 
       
   844   // Loop will concatenate with leading `&`, but it's only expected for all
   326   // but the first query parameter. This strips the leading `&`, while still
   845   // but the first query parameter. This strips the leading `&`, while still
   327   // accounting for the case that the string may in-fact be empty.
   846   // accounting for the case that the string may in-fact be empty.
   328 
       
   329 
       
   330   return string.substr(1);
   847   return string.substr(1);
   331 }
   848 }
   332 
   849 
   333 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-query-string.js
   850 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/is-valid-query-string.js
   334 /**
   851 /**
   346  */
   863  */
   347 function isValidQueryString(queryString) {
   864 function isValidQueryString(queryString) {
   348   if (!queryString) {
   865   if (!queryString) {
   349     return false;
   866     return false;
   350   }
   867   }
   351 
       
   352   return /^[^\s#?\/]+$/.test(queryString);
   868   return /^[^\s#?\/]+$/.test(queryString);
   353 }
   869 }
   354 
   870 
   355 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path-and-query-string.js
   871 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-path-and-query-string.js
   356 /**
   872 /**
   357  * Internal dependencies
   873  * Internal dependencies
   358  */
   874  */
       
   875 
   359 
   876 
   360 /**
   877 /**
   361  * Returns the path part and query string part of the URL.
   878  * Returns the path part and query string part of the URL.
   362  *
   879  *
   363  * @param {string} url The full URL.
   880  * @param {string} url The full URL.
   368  * const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq'
   885  * const pathAndQueryString2 = getPathAndQueryString( 'https://wordpress.org/help/faq/' ); // '/help/faq'
   369  * ```
   886  * ```
   370  *
   887  *
   371  * @return {string} The path part and query string part of the URL.
   888  * @return {string} The path part and query string part of the URL.
   372  */
   889  */
   373 
       
   374 function getPathAndQueryString(url) {
   890 function getPathAndQueryString(url) {
   375   const path = getPath(url);
   891   const path = getPath(url);
   376   const queryString = getQueryString(url);
   892   const queryString = getQueryString(url);
   377   let value = '/';
   893   let value = '/';
   378   if (path) value += path;
   894   if (path) {
   379   if (queryString) value += `?${queryString}`;
   895     value += path;
       
   896   }
       
   897   if (queryString) {
       
   898     value += `?${queryString}`;
       
   899   }
   380   return value;
   900   return value;
   381 }
   901 }
   382 
   902 
   383 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-fragment.js
   903 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-fragment.js
   384 /**
   904 /**
   394  *
   914  *
   395  * @return {string|void} The fragment part of the URL.
   915  * @return {string|void} The fragment part of the URL.
   396  */
   916  */
   397 function getFragment(url) {
   917 function getFragment(url) {
   398   const matches = /^\S+?(#[^\s\?]*)/.exec(url);
   918   const matches = /^\S+?(#[^\s\?]*)/.exec(url);
   399 
       
   400   if (matches) {
   919   if (matches) {
   401     return matches[1];
   920     return matches[1];
   402   }
   921   }
   403 }
   922 }
   404 
   923 
   418  */
   937  */
   419 function isValidFragment(fragment) {
   938 function isValidFragment(fragment) {
   420   if (!fragment) {
   939   if (!fragment) {
   421     return false;
   940     return false;
   422   }
   941   }
   423 
       
   424   return /^#[^\s#?\/]*$/.test(fragment);
   942   return /^#[^\s#?\/]*$/.test(fragment);
   425 }
   943 }
   426 
   944 
       
   945 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri-component.js
       
   946 /**
       
   947  * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
       
   948  * `decodeURIComponent` throws an error.
       
   949  *
       
   950  * @param {string} uriComponent URI component to decode.
       
   951  *
       
   952  * @return {string} Decoded URI component if possible.
       
   953  */
       
   954 function safeDecodeURIComponent(uriComponent) {
       
   955   try {
       
   956     return decodeURIComponent(uriComponent);
       
   957   } catch (uriComponentError) {
       
   958     return uriComponent;
       
   959   }
       
   960 }
       
   961 
   427 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-args.js
   962 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-args.js
   428 /**
   963 /**
   429  * Internal dependencies
   964  * Internal dependencies
   430  */
   965  */
       
   966 
       
   967 
   431 
   968 
   432 /** @typedef {import('./get-query-arg').QueryArgParsed} QueryArgParsed */
   969 /** @typedef {import('./get-query-arg').QueryArgParsed} QueryArgParsed */
   433 
   970 
   434 /**
   971 /**
   435  * @typedef {Record<string,QueryArgParsed>} QueryArgs
   972  * @typedef {Record<string,QueryArgParsed>} QueryArgs
   441  *
   978  *
   442  * @param {Record<string,*>} object Object in which to assign.
   979  * @param {Record<string,*>} object Object in which to assign.
   443  * @param {string[]}         path   Path segment at which to set value.
   980  * @param {string[]}         path   Path segment at which to set value.
   444  * @param {*}                value  Value to set.
   981  * @param {*}                value  Value to set.
   445  */
   982  */
   446 
       
   447 function setPath(object, path, value) {
   983 function setPath(object, path, value) {
   448   const length = path.length;
   984   const length = path.length;
   449   const lastIndex = length - 1;
   985   const lastIndex = length - 1;
   450 
       
   451   for (let i = 0; i < length; i++) {
   986   for (let i = 0; i < length; i++) {
   452     let key = path[i];
   987     let key = path[i];
   453 
       
   454     if (!key && Array.isArray(object)) {
   988     if (!key && Array.isArray(object)) {
   455       // If key is empty string and next value is array, derive key from
   989       // If key is empty string and next value is array, derive key from
   456       // the current length of the array.
   990       // the current length of the array.
   457       key = object.length.toString();
   991       key = object.length.toString();
   458     }
   992     }
   459 
   993     key = ['__proto__', 'constructor', 'prototype'].includes(key) ? key.toUpperCase() : key;
   460     key = ['__proto__', 'constructor', 'prototype'].includes(key) ? key.toUpperCase() : key; // If the next key in the path is numeric (or empty string), it will be
   994 
       
   995     // If the next key in the path is numeric (or empty string), it will be
   461     // created as an array. Otherwise, it will be created as an object.
   996     // created as an array. Otherwise, it will be created as an object.
   462 
       
   463     const isNextKeyArrayIndex = !isNaN(Number(path[i + 1]));
   997     const isNextKeyArrayIndex = !isNaN(Number(path[i + 1]));
   464     object[key] = i === lastIndex ? // If at end of path, assign the intended value.
   998     object[key] = i === lastIndex ?
   465     value : // Otherwise, advance to the next object in the path, creating
   999     // If at end of path, assign the intended value.
       
  1000     value :
       
  1001     // Otherwise, advance to the next object in the path, creating
   466     // it if it does not yet exist.
  1002     // it if it does not yet exist.
   467     object[key] || (isNextKeyArrayIndex ? [] : {});
  1003     object[key] || (isNextKeyArrayIndex ? [] : {});
   468 
       
   469     if (Array.isArray(object[key]) && !isNextKeyArrayIndex) {
  1004     if (Array.isArray(object[key]) && !isNextKeyArrayIndex) {
   470       // If we current key is non-numeric, but the next value is an
  1005       // If we current key is non-numeric, but the next value is an
   471       // array, coerce the value to an object.
  1006       // array, coerce the value to an object.
   472       object[key] = { ...object[key]
  1007       object[key] = {
       
  1008         ...object[key]
   473       };
  1009       };
   474     } // Update working reference object to the next in the path.
  1010     }
   475 
  1011 
   476 
  1012     // Update working reference object to the next in the path.
   477     object = object[key];
  1013     object = object[key];
   478   }
  1014   }
   479 }
  1015 }
       
  1016 
   480 /**
  1017 /**
   481  * Returns an object of query arguments of the given URL. If the given URL is
  1018  * Returns an object of query arguments of the given URL. If the given URL is
   482  * invalid or has no querystring, an empty object is returned.
  1019  * invalid or has no querystring, an empty object is returned.
   483  *
  1020  *
   484  * @param {string} url URL.
  1021  * @param {string} url URL.
   489  * // { "foo": "bar", "bar": "baz" }
  1026  * // { "foo": "bar", "bar": "baz" }
   490  * ```
  1027  * ```
   491  *
  1028  *
   492  * @return {QueryArgs} Query args object.
  1029  * @return {QueryArgs} Query args object.
   493  */
  1030  */
   494 
       
   495 
       
   496 function getQueryArgs(url) {
  1031 function getQueryArgs(url) {
   497   return (getQueryString(url) || '' // Normalize space encoding, accounting for PHP URL encoding
  1032   return (getQueryString(url) || ''
       
  1033   // Normalize space encoding, accounting for PHP URL encoding
   498   // corresponding to `application/x-www-form-urlencoded`.
  1034   // corresponding to `application/x-www-form-urlencoded`.
   499   //
  1035   //
   500   // See: https://tools.ietf.org/html/rfc1866#section-8.2.1
  1036   // See: https://tools.ietf.org/html/rfc1866#section-8.2.1
   501   ).replace(/\+/g, '%20').split('&').reduce((accumulator, keyValue) => {
  1037   ).replace(/\+/g, '%20').split('&').reduce((accumulator, keyValue) => {
   502     const [key, value = ''] = keyValue.split('=') // Filtering avoids decoding as `undefined` for value, where
  1038     const [key, value = ''] = keyValue.split('=')
       
  1039     // Filtering avoids decoding as `undefined` for value, where
   503     // default is restored in destructuring assignment.
  1040     // default is restored in destructuring assignment.
   504     .filter(Boolean).map(decodeURIComponent);
  1041     .filter(Boolean).map(safeDecodeURIComponent);
   505 
       
   506     if (key) {
  1042     if (key) {
   507       const segments = key.replace(/\]/g, '').split('[');
  1043       const segments = key.replace(/\]/g, '').split('[');
   508       setPath(accumulator, segments, value);
  1044       setPath(accumulator, segments, value);
   509     }
  1045     }
   510 
       
   511     return accumulator;
  1046     return accumulator;
   512   }, Object.create(null));
  1047   }, Object.create(null));
   513 }
  1048 }
   514 
  1049 
   515 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/add-query-args.js
  1050 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/add-query-args.js
   516 /**
  1051 /**
   517  * Internal dependencies
  1052  * Internal dependencies
   518  */
  1053  */
       
  1054 
   519 
  1055 
   520 
  1056 
   521 /**
  1057 /**
   522  * Appends arguments as querystring to the provided URL. If the URL already
  1058  * Appends arguments as querystring to the provided URL. If the URL already
   523  * includes query arguments, the arguments are merged with (and take precedent
  1059  * includes query arguments, the arguments are merged with (and take precedent
   532  * const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test
  1068  * const newURL = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test
   533  * ```
  1069  * ```
   534  *
  1070  *
   535  * @return {string} URL with arguments applied.
  1071  * @return {string} URL with arguments applied.
   536  */
  1072  */
   537 
  1073 function addQueryArgs(url = '', args) {
   538 function addQueryArgs() {
       
   539   let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
       
   540   let args = arguments.length > 1 ? arguments[1] : undefined;
       
   541 
       
   542   // If no arguments are to be appended, return original URL.
  1074   // If no arguments are to be appended, return original URL.
   543   if (!args || !Object.keys(args).length) {
  1075   if (!args || !Object.keys(args).length) {
   544     return url;
  1076     return url;
   545   }
  1077   }
   546 
  1078   let baseUrl = url;
   547   let baseUrl = url; // Determine whether URL already had query arguments.
  1079 
   548 
  1080   // Determine whether URL already had query arguments.
   549   const queryStringIndex = url.indexOf('?');
  1081   const queryStringIndex = url.indexOf('?');
   550 
       
   551   if (queryStringIndex !== -1) {
  1082   if (queryStringIndex !== -1) {
   552     // Merge into existing query arguments.
  1083     // Merge into existing query arguments.
   553     args = Object.assign(getQueryArgs(url), args); // Change working base URL to omit previous query arguments.
  1084     args = Object.assign(getQueryArgs(url), args);
   554 
  1085 
       
  1086     // Change working base URL to omit previous query arguments.
   555     baseUrl = baseUrl.substr(0, queryStringIndex);
  1087     baseUrl = baseUrl.substr(0, queryStringIndex);
   556   }
  1088   }
   557 
       
   558   return baseUrl + '?' + buildQueryString(args);
  1089   return baseUrl + '?' + buildQueryString(args);
   559 }
  1090 }
   560 
  1091 
   561 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-arg.js
  1092 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-query-arg.js
   562 /**
  1093 /**
   563  * Internal dependencies
  1094  * Internal dependencies
   564  */
  1095  */
       
  1096 
   565 
  1097 
   566 /**
  1098 /**
   567  * @typedef {{[key: string]: QueryArgParsed}} QueryArgObject
  1099  * @typedef {{[key: string]: QueryArgParsed}} QueryArgObject
   568  */
  1100  */
   569 
  1101 
   582  * const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar
  1114  * const foo = getQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'foo' ); // bar
   583  * ```
  1115  * ```
   584  *
  1116  *
   585  * @return {QueryArgParsed|void} Query arg value.
  1117  * @return {QueryArgParsed|void} Query arg value.
   586  */
  1118  */
   587 
       
   588 function getQueryArg(url, arg) {
  1119 function getQueryArg(url, arg) {
   589   return getQueryArgs(url)[arg];
  1120   return getQueryArgs(url)[arg];
   590 }
  1121 }
   591 
  1122 
   592 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/has-query-arg.js
  1123 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/has-query-arg.js
   593 /**
  1124 /**
   594  * Internal dependencies
  1125  * Internal dependencies
   595  */
  1126  */
   596 
  1127 
       
  1128 
   597 /**
  1129 /**
   598  * Determines whether the URL contains a given query arg.
  1130  * Determines whether the URL contains a given query arg.
   599  *
  1131  *
   600  * @param {string} url URL.
  1132  * @param {string} url URL.
   601  * @param {string} arg Query arg name.
  1133  * @param {string} arg Query arg name.
   605  * const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true
  1137  * const hasBar = hasQueryArg( 'https://wordpress.org?foo=bar&bar=baz', 'bar' ); // true
   606  * ```
  1138  * ```
   607  *
  1139  *
   608  * @return {boolean} Whether or not the URL contains the query arg.
  1140  * @return {boolean} Whether or not the URL contains the query arg.
   609  */
  1141  */
   610 
       
   611 function hasQueryArg(url, arg) {
  1142 function hasQueryArg(url, arg) {
   612   return getQueryArg(url, arg) !== undefined;
  1143   return getQueryArg(url, arg) !== undefined;
   613 }
  1144 }
   614 
  1145 
   615 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/remove-query-args.js
  1146 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/remove-query-args.js
   616 /**
  1147 /**
   617  * Internal dependencies
  1148  * Internal dependencies
   618  */
  1149  */
   619 
  1150 
   620 
  1151 
       
  1152 
   621 /**
  1153 /**
   622  * Removes arguments from the query string of the url
  1154  * Removes arguments from the query string of the url
   623  *
  1155  *
   624  * @param {string}    url  URL.
  1156  * @param {string}    url  URL.
   625  * @param {...string} args Query Args.
  1157  * @param {...string} args Query Args.
   629  * const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar
  1161  * const newUrl = removeQueryArgs( 'https://wordpress.org?foo=bar&bar=baz&baz=foobar', 'foo', 'bar' ); // https://wordpress.org?baz=foobar
   630  * ```
  1162  * ```
   631  *
  1163  *
   632  * @return {string} Updated URL.
  1164  * @return {string} Updated URL.
   633  */
  1165  */
   634 
  1166 function removeQueryArgs(url, ...args) {
   635 function removeQueryArgs(url) {
       
   636   const queryStringIndex = url.indexOf('?');
  1167   const queryStringIndex = url.indexOf('?');
   637 
       
   638   if (queryStringIndex === -1) {
  1168   if (queryStringIndex === -1) {
   639     return url;
  1169     return url;
   640   }
  1170   }
   641 
       
   642   const query = getQueryArgs(url);
  1171   const query = getQueryArgs(url);
   643   const baseURL = url.substr(0, queryStringIndex);
  1172   const baseURL = url.substr(0, queryStringIndex);
   644 
       
   645   for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
   646     args[_key - 1] = arguments[_key];
       
   647   }
       
   648 
       
   649   args.forEach(arg => delete query[arg]);
  1173   args.forEach(arg => delete query[arg]);
   650   const queryString = buildQueryString(query);
  1174   const queryString = buildQueryString(query);
   651   return queryString ? baseURL + '?' + queryString : baseURL;
  1175   return queryString ? baseURL + '?' + queryString : baseURL;
   652 }
  1176 }
   653 
  1177 
   655 /**
  1179 /**
   656  * Internal dependencies
  1180  * Internal dependencies
   657  */
  1181  */
   658 
  1182 
   659 const USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
  1183 const USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
       
  1184 
   660 /**
  1185 /**
   661  * Prepends "http://" to a url, if it looks like something that is meant to be a TLD.
  1186  * Prepends "http://" to a url, if it looks like something that is meant to be a TLD.
   662  *
  1187  *
   663  * @param {string} url The URL to test.
  1188  * @param {string} url The URL to test.
   664  *
  1189  *
   667  * const actualURL = prependHTTP( 'wordpress.org' ); // http://wordpress.org
  1192  * const actualURL = prependHTTP( 'wordpress.org' ); // http://wordpress.org
   668  * ```
  1193  * ```
   669  *
  1194  *
   670  * @return {string} The updated URL.
  1195  * @return {string} The updated URL.
   671  */
  1196  */
   672 
       
   673 function prependHTTP(url) {
  1197 function prependHTTP(url) {
   674   if (!url) {
  1198   if (!url) {
   675     return url;
  1199     return url;
   676   }
  1200   }
   677 
       
   678   url = url.trim();
  1201   url = url.trim();
   679 
       
   680   if (!USABLE_HREF_REGEXP.test(url) && !isEmail(url)) {
  1202   if (!USABLE_HREF_REGEXP.test(url) && !isEmail(url)) {
   681     return 'http://' + url;
  1203     return 'http://' + url;
   682   }
  1204   }
   683 
       
   684   return url;
  1205   return url;
   685 }
  1206 }
   686 
  1207 
   687 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri.js
  1208 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri.js
   688 /**
  1209 /**
   704   } catch (uriError) {
  1225   } catch (uriError) {
   705     return uri;
  1226     return uri;
   706   }
  1227   }
   707 }
  1228 }
   708 
  1229 
   709 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/safe-decode-uri-component.js
       
   710 /**
       
   711  * Safely decodes a URI component with `decodeURIComponent`. Returns the URI component unmodified if
       
   712  * `decodeURIComponent` throws an error.
       
   713  *
       
   714  * @param {string} uriComponent URI component to decode.
       
   715  *
       
   716  * @return {string} Decoded URI component if possible.
       
   717  */
       
   718 function safeDecodeURIComponent(uriComponent) {
       
   719   try {
       
   720     return decodeURIComponent(uriComponent);
       
   721   } catch (uriComponentError) {
       
   722     return uriComponent;
       
   723   }
       
   724 }
       
   725 
       
   726 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/filter-url-for-display.js
  1230 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/filter-url-for-display.js
   727 /**
  1231 /**
   728  * Returns a URL for display.
  1232  * Returns a URL for display.
   729  *
  1233  *
   730  * @param {string}      url       Original URL.
  1234  * @param {string}      url       Original URL.
   736  * const imageUrl = filterURLForDisplay( 'https://www.wordpress.org/wp-content/uploads/img.png', 20 ); // …ent/uploads/img.png
  1240  * const imageUrl = filterURLForDisplay( 'https://www.wordpress.org/wp-content/uploads/img.png', 20 ); // …ent/uploads/img.png
   737  * ```
  1241  * ```
   738  *
  1242  *
   739  * @return {string} Displayed URL.
  1243  * @return {string} Displayed URL.
   740  */
  1244  */
   741 function filterURLForDisplay(url) {
  1245 function filterURLForDisplay(url, maxLength = null) {
   742   let maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
       
   743   // Remove protocol and www prefixes.
  1246   // Remove protocol and www prefixes.
   744   let filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, ''); // Ends with / and only has that single slash, strip it.
  1247   let filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, '');
   745 
  1248 
       
  1249   // Ends with / and only has that single slash, strip it.
   746   if (filteredURL.match(/^[^\/]+\/$/)) {
  1250   if (filteredURL.match(/^[^\/]+\/$/)) {
   747     filteredURL = filteredURL.replace('/', '');
  1251     filteredURL = filteredURL.replace('/', '');
   748   }
  1252   }
   749 
  1253 
   750   const mediaRegexp = /([\w|:])*\.(?:jpg|jpeg|gif|png|svg)/;
  1254   // capture file name from URL
   751 
  1255   const fileRegexp = /\/([^\/?]+)\.(?:[\w]+)(?=\?|$)/;
   752   if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(mediaRegexp)) {
  1256   if (!maxLength || filteredURL.length <= maxLength || !filteredURL.match(fileRegexp)) {
   753     return filteredURL;
  1257     return filteredURL;
   754   } // If the file is not greater than max length, return last portion of URL.
  1258   }
   755 
  1259 
   756 
  1260   // If the file is not greater than max length, return last portion of URL.
   757   filteredURL = filteredURL.split('?')[0];
  1261   filteredURL = filteredURL.split('?')[0];
   758   const urlPieces = filteredURL.split('/');
  1262   const urlPieces = filteredURL.split('/');
   759   const file = urlPieces[urlPieces.length - 1];
  1263   const file = urlPieces[urlPieces.length - 1];
   760 
       
   761   if (file.length <= maxLength) {
  1264   if (file.length <= maxLength) {
   762     return '…' + filteredURL.slice(-maxLength);
  1265     return '…' + filteredURL.slice(-maxLength);
   763   } // If the file is greater than max length, truncate the file.
  1266   }
   764 
  1267 
   765 
  1268   // If the file is greater than max length, truncate the file.
   766   const index = file.lastIndexOf('.');
  1269   const index = file.lastIndexOf('.');
   767   const [fileName, extension] = [file.slice(0, index), file.slice(index + 1)];
  1270   const [fileName, extension] = [file.slice(0, index), file.slice(index + 1)];
   768   const truncatedFile = fileName.slice(-3) + '.' + extension;
  1271   const truncatedFile = fileName.slice(-3) + '.' + extension;
   769   return file.slice(0, maxLength - truncatedFile.length - 1) + '…' + truncatedFile;
  1272   return file.slice(0, maxLength - truncatedFile.length - 1) + '…' + truncatedFile;
   770 }
  1273 }
   771 
  1274 
   772 ;// CONCATENATED MODULE: external "lodash"
  1275 // EXTERNAL MODULE: ./node_modules/remove-accents/index.js
   773 var external_lodash_namespaceObject = window["lodash"];
  1276 var remove_accents = __webpack_require__(9681);
       
  1277 var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
   774 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/clean-for-slug.js
  1278 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/clean-for-slug.js
   775 /**
  1279 /**
   776  * External dependencies
  1280  * External dependencies
   777  */
  1281  */
       
  1282 
   778 
  1283 
   779 /**
  1284 /**
   780  * Performs some basic cleanup of a string for use as a post slug.
  1285  * Performs some basic cleanup of a string for use as a post slug.
   781  *
  1286  *
   782  * This replicates some of what `sanitize_title()` does in WordPress core, but
  1287  * This replicates some of what `sanitize_title()` does in WordPress core, but
   790  *
  1295  *
   791  * @param {string} string Title or slug to be processed.
  1296  * @param {string} string Title or slug to be processed.
   792  *
  1297  *
   793  * @return {string} Processed string.
  1298  * @return {string} Processed string.
   794  */
  1299  */
   795 
       
   796 function cleanForSlug(string) {
  1300 function cleanForSlug(string) {
   797   if (!string) {
  1301   if (!string) {
   798     return '';
  1302     return '';
   799   }
  1303   }
   800 
  1304   return remove_accents_default()(string)
   801   return (0,external_lodash_namespaceObject.trim)((0,external_lodash_namespaceObject.deburr)(string).replace(/[\s\./]+/g, '-').replace(/[^\p{L}\p{N}_-]+/gu, '').toLowerCase(), '-');
  1305   // Convert each group of whitespace, periods, and forward slashes to a hyphen.
       
  1306   .replace(/[\s\./]+/g, '-')
       
  1307   // Remove anything that's not a letter, number, underscore or hyphen.
       
  1308   .replace(/[^\p{L}\p{N}_-]+/gu, '')
       
  1309   // Convert to lowercase
       
  1310   .toLowerCase()
       
  1311   // Replace multiple hyphens with a single one.
       
  1312   .replace(/-+/g, '-')
       
  1313   // Remove any remaining leading or trailing hyphens.
       
  1314   .replace(/(^-+)|(-+$)/g, '');
   802 }
  1315 }
   803 
  1316 
   804 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-filename.js
  1317 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/get-filename.js
   805 /**
  1318 /**
   806  * Returns the filename part of the URL.
  1319  * Returns the filename part of the URL.
   815  *
  1328  *
   816  * @return {string|void} The filename part of the URL.
  1329  * @return {string|void} The filename part of the URL.
   817  */
  1330  */
   818 function getFilename(url) {
  1331 function getFilename(url) {
   819   let filename;
  1332   let filename;
   820 
  1333   if (!url) {
       
  1334     return;
       
  1335   }
   821   try {
  1336   try {
   822     filename = new URL(url, 'http://example.com').pathname.split('/').pop();
  1337     filename = new URL(url, 'http://example.com').pathname.split('/').pop();
   823   } catch (error) {}
  1338   } catch (error) {}
   824 
       
   825   if (filename) {
  1339   if (filename) {
   826     return filename;
  1340     return filename;
   827   }
  1341   }
   828 }
  1342 }
   829 
  1343 
   839  */
  1353  */
   840 function normalizePath(path) {
  1354 function normalizePath(path) {
   841   const splitted = path.split('?');
  1355   const splitted = path.split('?');
   842   const query = splitted[1];
  1356   const query = splitted[1];
   843   const base = splitted[0];
  1357   const base = splitted[0];
   844 
       
   845   if (!query) {
  1358   if (!query) {
   846     return base;
  1359     return base;
   847   } // 'b=1%2C2&c=2&a=5'
  1360   }
   848 
  1361 
   849 
  1362   // 'b=1%2C2&c=2&a=5'
   850   return base + '?' + query // [ 'b=1%2C2', 'c=2', 'a=5' ]
  1363   return base + '?' + query
   851   .split('&') // [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ]
  1364   // [ 'b=1%2C2', 'c=2', 'a=5' ]
   852   .map(entry => entry.split('=')) // [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ]
  1365   .split('&')
   853   .map(pair => pair.map(decodeURIComponent)) // [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ]
  1366   // [ [ 'b, '1%2C2' ], [ 'c', '2' ], [ 'a', '5' ] ]
   854   .sort((a, b) => a[0].localeCompare(b[0])) // [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ]
  1367   .map(entry => entry.split('='))
   855   .map(pair => pair.map(encodeURIComponent)) // [ 'a=5', 'b=1%2C2', 'c=2' ]
  1368   // [ [ 'b', '1,2' ], [ 'c', '2' ], [ 'a', '5' ] ]
   856   .map(pair => pair.join('=')) // 'a=5&b=1%2C2&c=2'
  1369   .map(pair => pair.map(decodeURIComponent))
       
  1370   // [ [ 'a', '5' ], [ 'b, '1,2' ], [ 'c', '2' ] ]
       
  1371   .sort((a, b) => a[0].localeCompare(b[0]))
       
  1372   // [ [ 'a', '5' ], [ 'b, '1%2C2' ], [ 'c', '2' ] ]
       
  1373   .map(pair => pair.map(encodeURIComponent))
       
  1374   // [ 'a=5', 'b=1%2C2', 'c=2' ]
       
  1375   .map(pair => pair.join('='))
       
  1376   // 'a=5&b=1%2C2&c=2'
   857   .join('&');
  1377   .join('&');
   858 }
  1378 }
   859 
  1379 
       
  1380 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/prepend-https.js
       
  1381 /**
       
  1382  * Internal dependencies
       
  1383  */
       
  1384 
       
  1385 
       
  1386 /**
       
  1387  * Prepends "https://" to a url, if it looks like something that is meant to be a TLD.
       
  1388  *
       
  1389  * Note: this will not replace "http://" with "https://".
       
  1390  *
       
  1391  * @param {string} url The URL to test.
       
  1392  *
       
  1393  * @example
       
  1394  * ```js
       
  1395  * const actualURL = prependHTTPS( 'wordpress.org' ); // https://wordpress.org
       
  1396  * ```
       
  1397  *
       
  1398  * @return {string} The updated URL.
       
  1399  */
       
  1400 function prependHTTPS(url) {
       
  1401   if (!url) {
       
  1402     return url;
       
  1403   }
       
  1404 
       
  1405   // If url starts with http://, return it as is.
       
  1406   if (url.startsWith('http://')) {
       
  1407     return url;
       
  1408   }
       
  1409   url = prependHTTP(url);
       
  1410   return url.replace(/^http:/, 'https:');
       
  1411 }
       
  1412 
   860 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/index.js
  1413 ;// CONCATENATED MODULE: ./node_modules/@wordpress/url/build-module/index.js
   861 
  1414 
   862 
  1415 
   863 
  1416 
   864 
  1417 
   882 
  1435 
   883 
  1436 
   884 
  1437 
   885 
  1438 
   886 
  1439 
       
  1440 
       
  1441 
       
  1442 })();
   887 
  1443 
   888 (window.wp = window.wp || {}).url = __webpack_exports__;
  1444 (window.wp = window.wp || {}).url = __webpack_exports__;
   889 /******/ })()
  1445 /******/ })()
   890 ;
  1446 ;