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. |
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 /** |
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 |
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 |
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 |