url.js 33 KB

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