1
this["wp"] = this["wp"] || {}; this["wp"]["url"] =
2
/******/ (function(modules) { // webpackBootstrap
3
/******/ // The module cache
4
/******/ var installedModules = {};
6
/******/ // The require function
7
/******/ function __webpack_require__(moduleId) {
9
/******/ // Check if module is in cache
10
/******/ if(installedModules[moduleId]) {
11
/******/ return installedModules[moduleId].exports;
13
/******/ // Create a new module (and put it into the cache)
14
/******/ var module = installedModules[moduleId] = {
20
/******/ // Execute the module function
21
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
23
/******/ // Flag the module as loaded
24
/******/ module.l = true;
26
/******/ // Return the exports of the module
27
/******/ return module.exports;
31
/******/ // expose the modules object (__webpack_modules__)
32
/******/ __webpack_require__.m = modules;
34
/******/ // expose the module cache
35
/******/ __webpack_require__.c = installedModules;
37
/******/ // define getter function for harmony exports
38
/******/ __webpack_require__.d = function(exports, name, getter) {
39
/******/ if(!__webpack_require__.o(exports, name)) {
40
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
44
/******/ // define __esModule on exports
45
/******/ __webpack_require__.r = function(exports) {
46
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
49
/******/ Object.defineProperty(exports, '__esModule', { value: true });
52
/******/ // create a fake namespace object
53
/******/ // mode & 1: value is a module id, require it
54
/******/ // mode & 2: merge all properties of value into the ns
55
/******/ // mode & 4: return value when already ns object
56
/******/ // mode & 8|1: behave like require
57
/******/ __webpack_require__.t = function(value, mode) {
58
/******/ if(mode & 1) value = __webpack_require__(value);
59
/******/ if(mode & 8) return value;
60
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
/******/ var ns = Object.create(null);
62
/******/ __webpack_require__.r(ns);
63
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
68
/******/ // getDefaultExport function for compatibility with non-harmony modules
69
/******/ __webpack_require__.n = function(module) {
70
/******/ var getter = module && module.__esModule ?
71
/******/ function getDefault() { return module['default']; } :
72
/******/ function getModuleExports() { return module; };
73
/******/ __webpack_require__.d(getter, 'a', getter);
74
/******/ return getter;
77
/******/ // Object.prototype.hasOwnProperty.call
78
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
80
/******/ // __webpack_public_path__
81
/******/ __webpack_require__.p = "";
84
/******/ // Load entry module and return exports
85
/******/ return __webpack_require__(__webpack_require__.s = 299);
87
/************************************************************************/
91
/***/ (function(module, __webpack_exports__, __webpack_require__) {
94
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
95
function _defineProperty(obj, key, value) {
97
Object.defineProperty(obj, key, {
113
/***/ (function(module, exports, __webpack_require__) {
118
var has = Object.prototype.hasOwnProperty;
120
var hexTable = (function () {
122
for (var i = 0; i < 256; ++i) {
123
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
129
var compactQueue = function compactQueue(queue) {
132
while (queue.length) {
133
var item = queue.pop();
134
obj = item.obj[item.prop];
136
if (Array.isArray(obj)) {
139
for (var j = 0; j < obj.length; ++j) {
140
if (typeof obj[j] !== 'undefined') {
141
compacted.push(obj[j]);
145
item.obj[item.prop] = compacted;
152
var arrayToObject = function arrayToObject(source, options) {
153
var obj = options && options.plainObjects ? Object.create(null) : {};
154
for (var i = 0; i < source.length; ++i) {
155
if (typeof source[i] !== 'undefined') {
163
var merge = function merge(target, source, options) {
168
if (typeof source !== 'object') {
169
if (Array.isArray(target)) {
171
} else if (typeof target === 'object') {
172
if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
173
target[source] = true;
176
return [target, source];
182
if (typeof target !== 'object') {
183
return [target].concat(source);
186
var mergeTarget = target;
187
if (Array.isArray(target) && !Array.isArray(source)) {
188
mergeTarget = arrayToObject(target, options);
191
if (Array.isArray(target) && Array.isArray(source)) {
192
source.forEach(function (item, i) {
193
if (has.call(target, i)) {
194
if (target[i] && typeof target[i] === 'object') {
195
target[i] = merge(target[i], item, options);
206
return Object.keys(source).reduce(function (acc, key) {
207
var value = source[key];
209
if (has.call(acc, key)) {
210
acc[key] = merge(acc[key], value, options);
218
var assign = function assignSingleSource(target, source) {
219
return Object.keys(source).reduce(function (acc, key) {
220
acc[key] = source[key];
225
var decode = function (str) {
227
return decodeURIComponent(str.replace(/\+/g, ' '));
233
var encode = function encode(str) {
234
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
235
// It has been adapted here for stricter adherence to RFC 3986
236
if (str.length === 0) {
240
var string = typeof str === 'string' ? str : String(str);
243
for (var i = 0; i < string.length; ++i) {
244
var c = string.charCodeAt(i);
251
|| (c >= 0x30 && c <= 0x39) // 0-9
252
|| (c >= 0x41 && c <= 0x5A) // a-z
253
|| (c >= 0x61 && c <= 0x7A) // A-Z
255
out += string.charAt(i);
260
out = out + hexTable[c];
265
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
269
if (c < 0xD800 || c >= 0xE000) {
270
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
275
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
276
out += hexTable[0xF0 | (c >> 18)]
277
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
278
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
279
+ hexTable[0x80 | (c & 0x3F)];
285
var compact = function compact(value) {
286
var queue = [{ obj: { o: value }, prop: 'o' }];
289
for (var i = 0; i < queue.length; ++i) {
291
var obj = item.obj[item.prop];
293
var keys = Object.keys(obj);
294
for (var j = 0; j < keys.length; ++j) {
297
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
298
queue.push({ obj: obj, prop: key });
304
return compactQueue(queue);
307
var isRegExp = function isRegExp(obj) {
308
return Object.prototype.toString.call(obj) === '[object RegExp]';
311
var isBuffer = function isBuffer(obj) {
312
if (obj === null || typeof obj === 'undefined') {
316
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
320
arrayToObject: arrayToObject,
334
/***/ (function(module, exports, __webpack_require__) {
339
var replace = String.prototype.replace;
340
var percentTwenties = /%20/g;
343
'default': 'RFC3986',
345
RFC1738: function (value) {
346
return replace.call(value, percentTwenties, '+');
348
RFC3986: function (value) {
360
/***/ (function(module, __webpack_exports__, __webpack_require__) {
363
__webpack_require__.r(__webpack_exports__);
364
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isURL", function() { return isURL; });
365
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProtocol", function() { return getProtocol; });
366
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidProtocol", function() { return isValidProtocol; });
367
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAuthority", function() { return getAuthority; });
368
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidAuthority", function() { return isValidAuthority; });
369
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPath", function() { return getPath; });
370
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidPath", function() { return isValidPath; });
371
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getQueryString", function() { return getQueryString; });
372
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidQueryString", function() { return isValidQueryString; });
373
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFragment", function() { return getFragment; });
374
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidFragment", function() { return isValidFragment; });
375
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addQueryArgs", function() { return addQueryArgs; });
376
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getQueryArg", function() { return getQueryArg; });
377
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasQueryArg", function() { return hasQueryArg; });
378
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeQueryArgs", function() { return removeQueryArgs; });
379
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prependHTTP", function() { return prependHTTP; });
380
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeDecodeURI", function() { return safeDecodeURI; });
381
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterURLForDisplay", function() { return filterURLForDisplay; });
382
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
383
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76);
384
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
388
* External dependencies
391
var URL_REGEXP = /^(?:https?:)?\/\/\S+$/i;
392
var EMAIL_REGEXP = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
393
var USABLE_HREF_REGEXP = /^(?:[a-z]+:|#|\?|\.|\/)/i;
395
* Determines whether the given string looks like a URL.
397
* @param {string} url The string to scrutinise.
399
* @return {boolean} Whether or not it looks like a URL.
402
function isURL(url) {
403
return URL_REGEXP.test(url);
406
* Returns the protocol part of the URL.
408
* @param {string} url The full URL.
410
* @return {?string} The protocol part of the URL.
413
function getProtocol(url) {
414
var matches = /^([^\s:]+:)/.exec(url);
421
* Tests if a url protocol is valid.
423
* @param {string} protocol The url protocol.
425
* @return {boolean} True if the argument is a valid protocol (e.g. http:, tel:).
428
function isValidProtocol(protocol) {
433
return /^[a-z\-.\+]+[0-9]*:$/i.test(protocol);
436
* Returns the authority part of the URL.
438
* @param {string} url The full URL.
440
* @return {?string} The authority part of the URL.
443
function getAuthority(url) {
444
var matches = /^[^\/\s:]+:(?:\/\/)?\/?([^\/\s#?]+)[\/#?]{0,1}\S*$/.exec(url);
451
* Checks for invalid characters within the provided authority.
453
* @param {string} authority A string containing the URL authority.
455
* @return {boolean} True if the argument contains a valid authority.
458
function isValidAuthority(authority) {
463
return /^[^\s#?]+$/.test(authority);
466
* Returns the path part of the URL.
468
* @param {string} url The full URL.
470
* @return {?string} The path part of the URL.
473
function getPath(url) {
474
var matches = /^[^\/\s:]+:(?:\/\/)?[^\/\s#?]+[\/]([^\s#?]+)[#?]{0,1}\S*$/.exec(url);
481
* Checks for invalid characters within the provided path.
483
* @param {string} path The URL path.
485
* @return {boolean} True if the argument contains a valid path
488
function isValidPath(path) {
493
return /^[^\s#?]+$/.test(path);
496
* Returns the query string part of the URL.
498
* @param {string} url The full URL.
500
* @return {?string} The query string part of the URL.
503
function getQueryString(url) {
504
var matches = /^\S+?\?([^\s#]+)/.exec(url);
511
* Checks for invalid characters within the provided query string.
513
* @param {string} queryString The query string.
515
* @return {boolean} True if the argument contains a valid query string.
518
function isValidQueryString(queryString) {
523
return /^[^\s#?\/]+$/.test(queryString);
526
* Returns the fragment part of the URL.
528
* @param {string} url The full URL
530
* @return {?string} The fragment part of the URL.
533
function getFragment(url) {
534
var matches = /^\S+?(#[^\s\?]*)/.exec(url);
541
* Checks for invalid characters within the provided fragment.
543
* @param {string} fragment The url fragment.
545
* @return {boolean} True if the argument contains a valid fragment.
548
function isValidFragment(fragment) {
553
return /^#[^\s#?\/]*$/.test(fragment);
556
* Appends arguments to the query string of the url
558
* @param {string} url URL
559
* @param {Object} args Query Args
561
* @return {string} Updated URL
564
function addQueryArgs(url, args) {
565
var queryStringIndex = url.indexOf('?');
566
var query = queryStringIndex !== -1 ? Object(qs__WEBPACK_IMPORTED_MODULE_1__["parse"])(url.substr(queryStringIndex + 1)) : {};
567
var baseUrl = queryStringIndex !== -1 ? url.substr(0, queryStringIndex) : url;
568
return baseUrl + '?' + Object(qs__WEBPACK_IMPORTED_MODULE_1__["stringify"])(Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, query, args));
571
* Returns a single query argument of the url
573
* @param {string} url URL
574
* @param {string} arg Query arg name
576
* @return {Array|string} Query arg value.
579
function getQueryArg(url, arg) {
580
var queryStringIndex = url.indexOf('?');
581
var query = queryStringIndex !== -1 ? Object(qs__WEBPACK_IMPORTED_MODULE_1__["parse"])(url.substr(queryStringIndex + 1)) : {};
585
* Determines whether the URL contains a given query arg.
587
* @param {string} url URL
588
* @param {string} arg Query arg name
590
* @return {boolean} Whether or not the URL contains the query aeg.
593
function hasQueryArg(url, arg) {
594
return getQueryArg(url, arg) !== undefined;
597
* Removes arguments from the query string of the url
599
* @param {string} url URL
600
* @param {...string} args Query Args
602
* @return {string} Updated URL
605
function removeQueryArgs(url) {
606
var queryStringIndex = url.indexOf('?');
607
var query = queryStringIndex !== -1 ? Object(qs__WEBPACK_IMPORTED_MODULE_1__["parse"])(url.substr(queryStringIndex + 1)) : {};
608
var baseUrl = queryStringIndex !== -1 ? url.substr(0, queryStringIndex) : url;
610
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
611
args[_key - 1] = arguments[_key];
614
args.forEach(function (arg) {
615
return delete query[arg];
617
return baseUrl + '?' + Object(qs__WEBPACK_IMPORTED_MODULE_1__["stringify"])(query);
620
* Prepends "http://" to a url, if it looks like something that is meant to be a TLD.
622
* @param {string} url The URL to test
624
* @return {string} The updated URL
627
function prependHTTP(url) {
628
if (!USABLE_HREF_REGEXP.test(url) && !EMAIL_REGEXP.test(url)) {
629
return 'http://' + url;
635
* Safely decodes a URI with `decodeURI`. Returns the URI unmodified if
636
* `decodeURI` throws an error.
638
* @param {string} uri URI to decode.
640
* @return {string} Decoded URI if possible.
643
function safeDecodeURI(uri) {
645
return decodeURI(uri);
651
* Returns a URL for display.
653
* @param {string} url Original URL.
655
* @return {string} Displayed URL.
658
function filterURLForDisplay(url) {
659
// Remove protocol and www prefixes.
660
var filteredURL = url.replace(/^(?:https?:)\/\/(?:www\.)?/, ''); // Ends with / and only has that single slash, strip it.
662
if (filteredURL.match(/^[^\/]+\/$/)) {
663
return filteredURL.replace('/', '');
673
/***/ (function(module, exports, __webpack_require__) {
678
var utils = __webpack_require__(179);
679
var formats = __webpack_require__(180);
681
var arrayPrefixGenerators = {
682
brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
683
return prefix + '[]';
685
indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
686
return prefix + '[' + key + ']';
688
repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
693
var toISO = Date.prototype.toISOString;
698
encoder: utils.encode,
699
encodeValuesOnly: false,
700
serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
701
return toISO.call(date);
704
strictNullHandling: false
707
var stringify = function stringify( // eslint-disable-line func-name-matching
722
if (typeof filter === 'function') {
723
obj = filter(prefix, obj);
724
} else if (obj instanceof Date) {
725
obj = serializeDate(obj);
726
} else if (obj === null) {
727
if (strictNullHandling) {
728
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
734
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
736
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
737
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
739
return [formatter(prefix) + '=' + formatter(String(obj))];
744
if (typeof obj === 'undefined') {
749
if (Array.isArray(filter)) {
752
var keys = Object.keys(obj);
753
objKeys = sort ? keys.sort(sort) : keys;
756
for (var i = 0; i < objKeys.length; ++i) {
757
var key = objKeys[i];
759
if (skipNulls && obj[key] === null) {
763
if (Array.isArray(obj)) {
764
values = values.concat(stringify(
766
generateArrayPrefix(prefix, key),
779
values = values.concat(stringify(
781
prefix + (allowDots ? '.' + key : '[' + key + ']'),
799
module.exports = function (object, opts) {
801
var options = opts ? utils.assign({}, opts) : {};
803
if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
804
throw new TypeError('Encoder has to be a function.');
807
var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
808
var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
809
var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
810
var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
811
var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
812
var sort = typeof options.sort === 'function' ? options.sort : null;
813
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
814
var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
815
var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
816
if (typeof options.format === 'undefined') {
817
options.format = formats['default'];
818
} else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
819
throw new TypeError('Unknown format option provided.');
821
var formatter = formats.formatters[options.format];
825
if (typeof options.filter === 'function') {
826
filter = options.filter;
827
obj = filter('', obj);
828
} else if (Array.isArray(options.filter)) {
829
filter = options.filter;
835
if (typeof obj !== 'object' || obj === null) {
840
if (options.arrayFormat in arrayPrefixGenerators) {
841
arrayFormat = options.arrayFormat;
842
} else if ('indices' in options) {
843
arrayFormat = options.indices ? 'indices' : 'repeat';
845
arrayFormat = 'indices';
848
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
851
objKeys = Object.keys(obj);
858
for (var i = 0; i < objKeys.length; ++i) {
859
var key = objKeys[i];
861
if (skipNulls && obj[key] === null) {
865
keys = keys.concat(stringify(
871
encode ? encoder : null,
881
var joined = keys.join(delimiter);
882
var prefix = options.addQueryPrefix === true ? '?' : '';
884
return joined.length > 0 ? prefix + joined : '';
891
/***/ (function(module, exports, __webpack_require__) {
896
var utils = __webpack_require__(179);
898
var has = Object.prototype.hasOwnProperty;
902
allowPrototypes: false,
904
decoder: utils.decode,
907
parameterLimit: 1000,
909
strictNullHandling: false
912
var parseValues = function parseQueryStringValues(str, options) {
914
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
915
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
916
var parts = cleanStr.split(options.delimiter, limit);
918
for (var i = 0; i < parts.length; ++i) {
921
var bracketEqualsPos = part.indexOf(']=');
922
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
926
key = options.decoder(part, defaults.decoder);
927
val = options.strictNullHandling ? null : '';
929
key = options.decoder(part.slice(0, pos), defaults.decoder);
930
val = options.decoder(part.slice(pos + 1), defaults.decoder);
932
if (has.call(obj, key)) {
933
obj[key] = [].concat(obj[key]).concat(val);
942
var parseObject = function (chain, val, options) {
945
for (var i = chain.length - 1; i >= 0; --i) {
951
obj = obj.concat(leaf);
953
obj = options.plainObjects ? Object.create(null) : {};
954
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
955
var index = parseInt(cleanRoot, 10);
958
&& root !== cleanRoot
959
&& String(index) === cleanRoot
961
&& (options.parseArrays && index <= options.arrayLimit)
966
obj[cleanRoot] = leaf;
976
var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
981
// Transform dot notation to bracket notation
982
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
986
var brackets = /(\[[^[\]]*])/;
987
var child = /(\[[^[\]]*])/g;
991
var segment = brackets.exec(key);
992
var parent = segment ? key.slice(0, segment.index) : key;
994
// Stash the parent if it exists
998
// If we aren't using plain objects, optionally prefix keys
999
// that would overwrite object prototype properties
1000
if (!options.plainObjects && has.call(Object.prototype, parent)) {
1001
if (!options.allowPrototypes) {
1009
// Loop through children appending to the array until we hit depth
1012
while ((segment = child.exec(key)) !== null && i < options.depth) {
1014
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
1015
if (!options.allowPrototypes) {
1019
keys.push(segment[1]);
1022
// If there's a remainder, just add whatever is left
1025
keys.push('[' + key.slice(segment.index) + ']');
1028
return parseObject(keys, val, options);
1031
module.exports = function (str, opts) {
1032
var options = opts ? utils.assign({}, opts) : {};
1034
if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
1035
throw new TypeError('Decoder has to be a function.');
1038
options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
1039
options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
1040
options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
1041
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
1042
options.parseArrays = options.parseArrays !== false;
1043
options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
1044
options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
1045
options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
1046
options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
1047
options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
1048
options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
1050
if (str === '' || str === null || typeof str === 'undefined') {
1051
return options.plainObjects ? Object.create(null) : {};
1054
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
1055
var obj = options.plainObjects ? Object.create(null) : {};
1057
// Iterate over the keys and setup the new object
1059
var keys = Object.keys(tempObj);
1060
for (var i = 0; i < keys.length; ++i) {
1062
var newObj = parseKeys(key, tempObj[key], options);
1063
obj = utils.merge(obj, newObj, options);
1066
return utils.compact(obj);
1073
/***/ (function(module, exports, __webpack_require__) {
1078
var stringify = __webpack_require__(300);
1079
var parse = __webpack_require__(301);
1080
var formats = __webpack_require__(180);
1085
stringify: stringify
1092
/***/ (function(module, __webpack_exports__, __webpack_require__) {
1095
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
1096
/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
1098
function _objectSpread(target) {
1099
for (var i = 1; i < arguments.length; i++) {
1100
var source = arguments[i] != null ? arguments[i] : {};
1101
var ownKeys = Object.keys(source);
1103
if (typeof Object.getOwnPropertySymbols === 'function') {
1104
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
1105
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1109
ownKeys.forEach(function (key) {
1110
Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
b'\\ No newline at end of file'