node-red-contrib-web-worldmap 5.5.6 → 5.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +3 -1
- package/node_modules/@turf/bezier-spline/package.json +4 -4
- package/node_modules/@turf/helpers/package.json +2 -2
- package/node_modules/@turf/invariant/package.json +3 -3
- package/node_modules/body-parser/HISTORY.md +8 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +2 -9
- package/node_modules/body-parser/package.json +9 -10
- package/node_modules/cookie/index.js +2 -1
- package/node_modules/cookie/package.json +1 -1
- package/node_modules/cookie-signature/History.md +5 -1
- package/node_modules/cookie-signature/index.js +6 -6
- package/node_modules/cookie-signature/package.json +2 -2
- package/node_modules/finalhandler/HISTORY.md +6 -0
- package/node_modules/finalhandler/package.json +3 -3
- package/node_modules/http-errors/HISTORY.md +6 -0
- package/node_modules/http-errors/index.js +4 -3
- package/node_modules/http-errors/package.json +12 -8
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/CHANGELOG.md +14 -1
- package/node_modules/qs/README.md +11 -4
- package/node_modules/qs/dist/qs.js +20 -20
- package/node_modules/qs/lib/parse.js +21 -10
- package/node_modules/qs/lib/utils.js +28 -8
- package/node_modules/qs/package.json +1 -1
- package/node_modules/qs/test/parse.js +125 -9
- package/node_modules/qs/test/utils.js +36 -20
- package/node_modules/raw-body/package.json +5 -7
- package/node_modules/send/HISTORY.md +19 -7
- package/node_modules/send/package.json +6 -6
- package/node_modules/serve-static/HISTORY.md +6 -0
- package/node_modules/serve-static/package.json +2 -2
- package/node_modules/statuses/HISTORY.md +5 -0
- package/node_modules/statuses/README.md +3 -0
- package/node_modules/statuses/package.json +7 -7
- package/package.json +5 -3
- package/worldmap/worldmap.js +1 -1
- package/node_modules/body-parser/SECURITY.md +0 -25
- package/node_modules/cookie-signature/.npmignore +0 -4
- package/node_modules/raw-body/HISTORY.md +0 -308
- package/node_modules/raw-body/SECURITY.md +0 -24
- package/node_modules/send/node_modules/encodeurl/HISTORY.md +0 -14
- package/node_modules/send/node_modules/encodeurl/LICENSE +0 -22
- package/node_modules/send/node_modules/encodeurl/README.md +0 -128
- package/node_modules/send/node_modules/encodeurl/index.js +0 -60
- package/node_modules/send/node_modules/encodeurl/package.json +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v5.5.8 - Bump qs dep for CVE
|
|
4
|
+
- v5.5.7 - Fix COG handling for built in icons, bump various libs for CVEs
|
|
3
5
|
- v5.5.4 - slight tweak to geojson property display as table
|
|
4
6
|
- v5.5.3 - ensure SOG gets picked up earlier in chain
|
|
5
7
|
- v5.5.2 - Slight improvement for on/offline choice of map
|
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ A <a href="https://nodered.org" target="mapinfo">Node-RED</a> node to provide a
|
|
|
10
10
|
|
|
11
11
|
### Updates
|
|
12
12
|
|
|
13
|
+
- v5.5.8 - Bump qs dep for CVE
|
|
14
|
+
- v5.5.7 - Fix COG handling for built in icons, bump various libs for CVEs
|
|
13
15
|
- v5.5.4 - slight tweak to geojson property display as table
|
|
14
16
|
- v5.5.3 - ensure SOG gets picked up earlier in chain
|
|
15
17
|
- v5.5.2 - Slight improvement for on/offline choice of map
|
|
@@ -132,7 +134,7 @@ To do this you need to supply a `msg.payload.SIDC` 2525 code instead of an icon,
|
|
|
132
134
|
|
|
133
135
|
SIDC codes can be generated using the built-in unitgenerator tool.
|
|
134
136
|
|
|
135
|
-
There are lots of extra options you can specify as `msg.payload.options` - see the <a href="https://
|
|
137
|
+
There are lots of extra options you can specify as `msg.payload.options` - see the <a href="https://github.com/spatialillusions/milsymbol/blob/master/docs/README.md" target="mapinfo">milsymbol docs here</a>.
|
|
136
138
|
|
|
137
139
|
Note: If the SIDC code is a 2525C 15 characters long, where chars 13 and 14 are a country code - then the country flag emoji is added to the staffComments field of the icon. If it's a 20 char 2525D code then the options:country property will be used to create the flag.
|
|
138
140
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/bezier-spline",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Smooths a line into a curve using Bézier splines, great for visualizing routes.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"write-json-file": "^6.0.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@turf/helpers": "7.3.
|
|
67
|
-
"@turf/invariant": "7.3.
|
|
66
|
+
"@turf/helpers": "7.3.4",
|
|
67
|
+
"@turf/invariant": "7.3.4",
|
|
68
68
|
"@types/geojson": "^7946.0.10",
|
|
69
69
|
"tslib": "^2.8.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a0878648b801443f342aae692c60ab95a1da61a9"
|
|
72
72
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/helpers",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Provides helper functions to create GeoJSON features, like points, lines, or areas on a map.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"@types/geojson": "^7946.0.10",
|
|
71
71
|
"tslib": "^2.8.1"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "a0878648b801443f342aae692c60ab95a1da61a9"
|
|
74
74
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/invariant",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Lightweight utility for input validation and data extraction in Turf.js. Ensures GeoJSON inputs are in the correct format and extracts specific components like coordinates or geometries.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"typescript": "^5.8.3"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@turf/helpers": "7.3.
|
|
67
|
+
"@turf/helpers": "7.3.4",
|
|
68
68
|
"@types/geojson": "^7946.0.10",
|
|
69
69
|
"tslib": "^2.8.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a0878648b801443f342aae692c60ab95a1da61a9"
|
|
72
72
|
}
|
|
@@ -55,9 +55,6 @@ function urlencoded (options) {
|
|
|
55
55
|
: opts.limit
|
|
56
56
|
var type = opts.type || 'application/x-www-form-urlencoded'
|
|
57
57
|
var verify = opts.verify || false
|
|
58
|
-
var depth = typeof opts.depth !== 'number'
|
|
59
|
-
? Number(opts.depth || 32)
|
|
60
|
-
: opts.depth
|
|
61
58
|
|
|
62
59
|
if (verify !== false && typeof verify !== 'function') {
|
|
63
60
|
throw new TypeError('option verify must be function')
|
|
@@ -121,8 +118,7 @@ function urlencoded (options) {
|
|
|
121
118
|
encoding: charset,
|
|
122
119
|
inflate: inflate,
|
|
123
120
|
limit: limit,
|
|
124
|
-
verify: verify
|
|
125
|
-
depth: depth
|
|
121
|
+
verify: verify
|
|
126
122
|
})
|
|
127
123
|
}
|
|
128
124
|
}
|
|
@@ -137,10 +133,7 @@ function extendedparser (options) {
|
|
|
137
133
|
var parameterLimit = options.parameterLimit !== undefined
|
|
138
134
|
? options.parameterLimit
|
|
139
135
|
: 1000
|
|
140
|
-
|
|
141
|
-
var depth = typeof options.depth !== 'number'
|
|
142
|
-
? Number(options.depth || 32)
|
|
143
|
-
: options.depth
|
|
136
|
+
var depth = options.depth !== undefined ? options.depth : 32
|
|
144
137
|
var parse = parser('qs')
|
|
145
138
|
|
|
146
139
|
if (isNaN(parameterLimit) || parameterLimit < 1) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "body-parser",
|
|
3
3
|
"description": "Node.js body parsing middleware",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.4",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": "expressjs/body-parser",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"bytes": "3.1.2",
|
|
12
|
+
"bytes": "~3.1.2",
|
|
13
13
|
"content-type": "~1.0.5",
|
|
14
14
|
"debug": "2.6.9",
|
|
15
15
|
"depd": "2.0.0",
|
|
16
|
-
"destroy": "1.2.0",
|
|
17
|
-
"http-errors": "2.0.
|
|
18
|
-
"iconv-lite": "0.4.24",
|
|
19
|
-
"on-finished": "2.4.1",
|
|
20
|
-
"qs": "6.
|
|
21
|
-
"raw-body": "2.5.
|
|
16
|
+
"destroy": "~1.2.0",
|
|
17
|
+
"http-errors": "~2.0.1",
|
|
18
|
+
"iconv-lite": "~0.4.24",
|
|
19
|
+
"on-finished": "~2.4.1",
|
|
20
|
+
"qs": "~6.14.0",
|
|
21
|
+
"raw-body": "~2.5.3",
|
|
22
22
|
"type-is": "~1.6.18",
|
|
23
|
-
"unpipe": "1.0.0"
|
|
23
|
+
"unpipe": "~1.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"eslint": "8.34.0",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"lib/",
|
|
41
41
|
"LICENSE",
|
|
42
42
|
"HISTORY.md",
|
|
43
|
-
"SECURITY.md",
|
|
44
43
|
"index.js"
|
|
45
44
|
],
|
|
46
45
|
"engines": {
|
|
@@ -21,6 +21,7 @@ exports.serialize = serialize;
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
var __toString = Object.prototype.toString
|
|
24
|
+
var __hasOwnProperty = Object.prototype.hasOwnProperty
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
@@ -130,7 +131,7 @@ function parse(str, opt) {
|
|
|
130
131
|
var key = str.slice(keyStartIdx, keyEndIdx);
|
|
131
132
|
|
|
132
133
|
// only assign once
|
|
133
|
-
if (!
|
|
134
|
+
if (!__hasOwnProperty.call(obj, key)) {
|
|
134
135
|
var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
|
|
135
136
|
var valEndIdx = endIndex(str, endIdx, valStartIdx);
|
|
136
137
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
1.0.7 / 2023-04-12
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* backport the buffer support from the 1.2.x release branch (thanks @FadhiliNjagi!)
|
|
5
|
+
|
|
1
6
|
1.0.6 / 2015-02-03
|
|
2
7
|
==================
|
|
3
8
|
|
|
4
9
|
* use `npm test` instead of `make test` to run tests
|
|
5
10
|
* clearer assertion messages when checking input
|
|
6
11
|
|
|
7
|
-
|
|
8
12
|
1.0.5 / 2014-09-05
|
|
9
13
|
==================
|
|
10
14
|
|
|
@@ -8,14 +8,14 @@ var crypto = require('crypto');
|
|
|
8
8
|
* Sign the given `val` with `secret`.
|
|
9
9
|
*
|
|
10
10
|
* @param {String} val
|
|
11
|
-
* @param {String} secret
|
|
11
|
+
* @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret
|
|
12
12
|
* @return {String}
|
|
13
13
|
* @api private
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
exports.sign = function(val, secret){
|
|
17
|
-
if ('string'
|
|
18
|
-
if (
|
|
17
|
+
if ('string' !== typeof val) throw new TypeError("Cookie value must be provided as a string.");
|
|
18
|
+
if (null == secret) throw new TypeError("Secret key must be provided.");
|
|
19
19
|
return val + '.' + crypto
|
|
20
20
|
.createHmac('sha256', secret)
|
|
21
21
|
.update(val)
|
|
@@ -28,14 +28,14 @@ exports.sign = function(val, secret){
|
|
|
28
28
|
* returning `false` if the signature is invalid.
|
|
29
29
|
*
|
|
30
30
|
* @param {String} val
|
|
31
|
-
* @param {String} secret
|
|
31
|
+
* @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret
|
|
32
32
|
* @return {String|Boolean}
|
|
33
33
|
* @api private
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
exports.unsign = function(val, secret){
|
|
37
|
-
if ('string'
|
|
38
|
-
if (
|
|
37
|
+
if ('string' !== typeof val) throw new TypeError("Signed cookie string must be provided.");
|
|
38
|
+
if (null == secret) throw new TypeError("Secret key must be provided.");
|
|
39
39
|
var str = val.slice(0, val.lastIndexOf('.'))
|
|
40
40
|
, mac = exports.sign(str, secret);
|
|
41
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cookie-signature",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Sign and unsign cookies",
|
|
5
5
|
"keywords": ["cookie", "sign", "unsign"],
|
|
6
6
|
"author": "TJ Holowaychuk <tj@learnboost.com>",
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
"test": "mocha --require should --reporter spec"
|
|
16
16
|
},
|
|
17
17
|
"main": "index"
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finalhandler",
|
|
3
3
|
"description": "Node.js final http responder",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "pillarjs/finalhandler",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"debug": "2.6.9",
|
|
10
10
|
"encodeurl": "~2.0.0",
|
|
11
11
|
"escape-html": "~1.0.3",
|
|
12
|
-
"on-finished": "2.4.1",
|
|
12
|
+
"on-finished": "~2.4.1",
|
|
13
13
|
"parseurl": "~1.3.3",
|
|
14
|
-
"statuses": "2.0.
|
|
14
|
+
"statuses": "~2.0.2",
|
|
15
15
|
"unpipe": "~1.0.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
@@ -279,11 +279,12 @@ function populateConstructorExports (exports, codes, HttpError) {
|
|
|
279
279
|
|
|
280
280
|
/**
|
|
281
281
|
* Get a class name from a name identifier.
|
|
282
|
+
*
|
|
283
|
+
* @param {string} name
|
|
284
|
+
* @returns {string}
|
|
282
285
|
* @private
|
|
283
286
|
*/
|
|
284
287
|
|
|
285
288
|
function toClassName (name) {
|
|
286
|
-
return name.
|
|
287
|
-
? name + 'Error'
|
|
288
|
-
: name
|
|
289
|
+
return name.slice(-5) === 'Error' ? name : name + 'Error'
|
|
289
290
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "http-errors",
|
|
3
3
|
"description": "Create HTTP error objects",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Alan Plum <me@pluma.io>",
|
|
@@ -9,17 +9,21 @@
|
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": "jshttp/http-errors",
|
|
12
|
+
"funding": {
|
|
13
|
+
"type": "opencollective",
|
|
14
|
+
"url": "https://opencollective.com/express"
|
|
15
|
+
},
|
|
12
16
|
"dependencies": {
|
|
13
|
-
"depd": "2.0.0",
|
|
14
|
-
"inherits": "2.0.4",
|
|
15
|
-
"setprototypeof": "1.2.0",
|
|
16
|
-
"statuses": "2.0.
|
|
17
|
-
"toidentifier": "1.0.1"
|
|
17
|
+
"depd": "~2.0.0",
|
|
18
|
+
"inherits": "~2.0.4",
|
|
19
|
+
"setprototypeof": "~1.2.0",
|
|
20
|
+
"statuses": "~2.0.2",
|
|
21
|
+
"toidentifier": "~1.0.1"
|
|
18
22
|
},
|
|
19
23
|
"devDependencies": {
|
|
20
24
|
"eslint": "7.32.0",
|
|
21
25
|
"eslint-config-standard": "14.1.1",
|
|
22
|
-
"eslint-plugin-import": "2.
|
|
26
|
+
"eslint-plugin-import": "2.32.0",
|
|
23
27
|
"eslint-plugin-markdown": "2.2.1",
|
|
24
28
|
"eslint-plugin-node": "11.1.0",
|
|
25
29
|
"eslint-plugin-promise": "5.2.0",
|
|
@@ -32,7 +36,7 @@
|
|
|
32
36
|
},
|
|
33
37
|
"scripts": {
|
|
34
38
|
"lint": "eslint . && node ./scripts/lint-readme-list.js",
|
|
35
|
-
"test": "mocha --reporter spec
|
|
39
|
+
"test": "mocha --reporter spec",
|
|
36
40
|
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
37
41
|
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
38
42
|
"version": "node scripts/version-history.js && git add HISTORY.md"
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
## **6.14.2**
|
|
2
|
+
- [Fix] `parse`: mark overflow objects for indexed notation exceeding `arrayLimit` (#546)
|
|
3
|
+
- [Fix] `arrayLimit` means max count, not max index, in `combine`/`merge`/`parseArrayValue`
|
|
4
|
+
- [Fix] `parse`: throw on `arrayLimit` exceeded with indexed notation when `throwOnLimitExceeded` is true (#529)
|
|
5
|
+
- [Fix] `parse`: enforce `arrayLimit` on `comma`-parsed values
|
|
6
|
+
- [Fix] `parse`: fix error message to reflect arrayLimit as max index; remove extraneous comments (#545)
|
|
7
|
+
- [Robustness] avoid `.push`, use `void`
|
|
8
|
+
- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418)
|
|
9
|
+
- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543)
|
|
10
|
+
- [readme] replace runkit CI badge with shields.io check-runs badge
|
|
11
|
+
- [meta] fix changelog typo (`arrayLength` → `arrayLimit`)
|
|
12
|
+
- [actions] fix rebase workflow permissions
|
|
13
|
+
|
|
1
14
|
## **6.14.1**
|
|
2
|
-
- [Fix] ensure
|
|
15
|
+
- [Fix] ensure `arrayLimit` applies to `[]` notation as well
|
|
3
16
|
- [Fix] `parse`: when a custom decoder returns `null` for a key, ignore that key
|
|
4
17
|
- [Refactor] `parse`: extract key segment splitting helper
|
|
5
18
|
- [meta] add threat model
|
|
@@ -282,8 +282,8 @@ var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c');
|
|
|
282
282
|
assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] });
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
-
**qs** will also limit
|
|
286
|
-
Any array members with an index of
|
|
285
|
+
**qs** will also limit arrays to a maximum of `20` elements.
|
|
286
|
+
Any array members with an index of `20` or greater will instead be converted to an object with the index as the key.
|
|
287
287
|
This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array.
|
|
288
288
|
|
|
289
289
|
```javascript
|
|
@@ -310,7 +310,8 @@ try {
|
|
|
310
310
|
|
|
311
311
|
When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `arrayLimit` and if the limit is exceeded, the array will instead be converted to an object with the index as the key
|
|
312
312
|
|
|
313
|
-
To
|
|
313
|
+
To prevent array syntax (`a[]`, `a[0]`) from being parsed as arrays, set `parseArrays` to `false`.
|
|
314
|
+
Note that duplicate keys (e.g. `a=b&a=c`) may still produce arrays when `duplicates` is `'combine'` (the default).
|
|
314
315
|
|
|
315
316
|
```javascript
|
|
316
317
|
var noParsingArrays = qs.parse('a[]=b', { parseArrays: false });
|
|
@@ -512,6 +513,12 @@ The query string may optionally be prepended with a question mark:
|
|
|
512
513
|
assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d');
|
|
513
514
|
```
|
|
514
515
|
|
|
516
|
+
Note that when the output is an empty string, the prefix will not be added:
|
|
517
|
+
|
|
518
|
+
```javascript
|
|
519
|
+
assert.equal(qs.stringify({}, { addQueryPrefix: true }), '');
|
|
520
|
+
```
|
|
521
|
+
|
|
515
522
|
The delimiter may be overridden with stringify as well:
|
|
516
523
|
|
|
517
524
|
```javascript
|
|
@@ -723,7 +730,7 @@ Save time, reduce risk, and improve code health, while paying the maintainers of
|
|
|
723
730
|
[downloads-url]: https://npm-stat.com/charts.html?package=qs
|
|
724
731
|
[codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg
|
|
725
732
|
[codecov-url]: https://app.codecov.io/gh/ljharb/qs/
|
|
726
|
-
[actions-image]: https://img.shields.io/
|
|
733
|
+
[actions-image]: https://img.shields.io/github/check-runs/ljharb/qs/main
|
|
727
734
|
[actions-url]: https://github.com/ljharb/qs/actions
|
|
728
735
|
|
|
729
736
|
## Acknowledgements
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
"use strict";var stringify=require(4),parse=require(3),formats=require(1);module.exports={formats:formats,parse:parse,stringify:stringify};
|
|
6
6
|
|
|
7
7
|
},{"1":1,"3":3,"4":4}],3:[function(require,module,exports){
|
|
8
|
-
"use strict";var utils=require(5),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)0===o[l].indexOf("utf8=")&&(o[l]===charsetSentinel?s="utf-8":o[l]===isoSentinel&&(s="iso-8859-1"),n=l,l=o.length);for(l=0;l<o.length;++l)if(l!==n){var p,
|
|
8
|
+
"use strict";var utils=require(5),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)0===o[l].indexOf("utf8=")&&(o[l]===charsetSentinel?s="utf-8":o[l]===isoSentinel&&(s="iso-8859-1"),n=l,l=o.length);for(l=0;l<o.length;++l)if(l!==n){var d,p,c=o[l],u=c.indexOf("]="),y=-1===u?c.indexOf("="):u+1;if(-1===y?(d=t.decoder(c,defaults.decoder,s,"key"),p=t.strictNullHandling?null:""):null!==(d=t.decoder(c.slice(0,y),defaults.decoder,s,"key"))&&(p=utils.maybeMap(parseArrayValue(c.slice(y+1),t,isArray(r[d])?r[d].length:0),function(e){return t.decoder(e,defaults.decoder,s,"value")})),p&&t.interpretNumericEntities&&"iso-8859-1"===s&&(p=interpretNumericEntities(String(p))),c.indexOf("[]=")>-1&&(p=isArray(p)?[p]:p),t.comma&&isArray(p)&&p.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");p=utils.combine([],p,t.arrayLimit,t.plainObjects)}if(null!==d){var f=has.call(r,d);f&&"combine"===t.duplicates?r[d]=utils.combine(r[d],p,t.arrayLimit,t.plainObjects):f&&"last"!==t.duplicates||(r[d]=p)}}return r},parseObject=function(e,t,r,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");a=Array.isArray(t)&&t[o]?t[o].length:0}for(var l=i?t:parseArrayValue(t,r,a),n=e.length-1;n>=0;--n){var s,d=e[n];if("[]"===d&&r.parseArrays)s=utils.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:utils.combine([],l,r.arrayLimit,r.plainObjects);else{s=r.plainObjects?{__proto__:null}:{};var p="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,c=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,u=parseInt(c,10),y=!isNaN(u)&&d!==c&&String(u)===c&&u>=0&&r.parseArrays;if(r.parseArrays||""!==c)if(y&&u<r.arrayLimit)(s=[])[u]=l;else{if(y&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");y?(s[u]=l,utils.markOverflow(s,u)):"__proto__"!==c&&(s[c]=l)}else s={0:l}}l=s}return l},splitKeyIntoSegments=function splitKeyIntoSegments(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&has.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),o=a?r.slice(0,a.index):r,l=[];if(o){if(!t.plainObjects&&has.call(Object.prototype,o)&&!t.allowPrototypes)return;l[l.length]=o}for(var n=0;null!==(a=i.exec(r))&&n<t.depth;){n+=1;var s=a[1].slice(1,-1);if(!t.plainObjects&&has.call(Object.prototype,s)&&!t.allowPrototypes)return;l[l.length]=a[1]}if(a){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");l[l.length]="["+r.slice(a.index)+"]"}return l},parseKeys=function parseQueryStringKeys(e,t,r,i){if(e){var a=splitKeyIntoSegments(e,r);if(a)return parseObject(a,t,r,i)}},normalizeParseOptions=function normalizeParseOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?defaults.charset:e.charset,r=void 0===e.duplicates?defaults.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||defaults.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:defaults.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:defaults.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:defaults.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:defaults.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:defaults.decoder,delimiter:"string"==typeof e.delimiter||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:defaults.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:defaults.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:defaults.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:defaults.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};module.exports=function(e,t){var r=normalizeParseOptions(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?parseValues(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),l=0;l<o.length;++l){var n=o[l],s=parseKeys(n,i[n],r,"string"==typeof e);a=utils.merge(a,s,r)}return!0===r.allowSparse?a:utils.compact(a)};
|
|
9
9
|
|
|
10
10
|
},{"5":5}],4:[function(require,module,exports){
|
|
11
11
|
"use strict";var getSideChannel=require(46),utils=require(5),formats=require(1),has=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,r){return e+"["+r+"]"},repeat:function repeat(e){return e}},isArray=Array.isArray,push=Array.prototype.push,pushToArray=function(e,r){push.apply(e,isArray(r)?r:[r])},toISO=Date.prototype.toISOString,defaultFormat=formats.default,defaults={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:utils.encode,encodeValuesOnly:!1,filter:void 0,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:!1,serializeDate:function serializeDate(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},sentinel={},stringify=function stringify(e,r,t,o,a,n,i,l,s,f,u,d,y,c,p,m,h,v){for(var g=e,w=v,b=0,A=!1;void 0!==(w=w.get(sentinel))&&!A;){var D=w.get(e);if(b+=1,void 0!==D){if(D===b)throw new RangeError("Cyclic object value");A=!0}void 0===w.get(sentinel)&&(b=0)}if("function"==typeof f?g=f(r,g):g instanceof Date?g=y(g):"comma"===t&&isArray(g)&&(g=utils.maybeMap(g,function(e){return e instanceof Date?y(e):e})),null===g){if(n)return s&&!m?s(r,defaults.encoder,h,"key",c):r;g=""}if(isNonNullishPrimitive(g)||utils.isBuffer(g))return s?[p(m?r:s(r,defaults.encoder,h,"key",c))+"="+p(s(g,defaults.encoder,h,"value",c))]:[p(r)+"="+p(String(g))];var S,E=[];if(void 0===g)return E;if("comma"===t&&isArray(g))m&&s&&(g=utils.maybeMap(g,s)),S=[{value:g.length>0?g.join(",")||null:void 0}];else if(isArray(f))S=f;else{var N=Object.keys(g);S=u?N.sort(u):N}var T=l?String(r).replace(/\./g,"%2E"):String(r),O=o&&isArray(g)&&1===g.length?T+"[]":T;if(a&&isArray(g)&&0===g.length)return O+"[]";for(var k=0;k<S.length;++k){var I=S[k],P="object"==typeof I&&I&&void 0!==I.value?I.value:g[I];if(!i||null!==P){var x=d&&l?String(I).replace(/\./g,"%2E"):String(I),z=isArray(g)?"function"==typeof t?t(O,x):O:O+(d?"."+x:"["+x+"]");v.set(e,b);var K=getSideChannel();K.set(sentinel,v),pushToArray(E,stringify(P,z,t,o,a,n,i,l,"comma"===t&&m&&isArray(g)?null:s,f,u,d,y,c,p,m,h,K))}}return E},normalizeStringifyOptions=function normalizeStringifyOptions(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var r=e.charset||defaults.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=formats.default;if(void 0!==e.format){if(!has.call(formats.formatters,e.format))throw new TypeError("Unknown format option provided.");t=e.format}var o,a=formats.formatters[t],n=defaults.filter;if(("function"==typeof e.filter||isArray(e.filter))&&(n=e.filter),o=e.arrayFormat in arrayPrefixGenerators?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":defaults.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var i=void 0===e.allowDots?!0===e.encodeDotInKeys||defaults.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:defaults.addQueryPrefix,allowDots:i,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?defaults.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:defaults.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:defaults.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:defaults.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:defaults.encodeValuesOnly,filter:n,format:t,formatter:a,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:defaults.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:defaults.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling}};module.exports=function(e,r){var t,o=e,a=normalizeStringifyOptions(r);"function"==typeof a.filter?o=(0,a.filter)("",o):isArray(a.filter)&&(t=a.filter);var n=[];if("object"!=typeof o||null===o)return"";var i=arrayPrefixGenerators[a.arrayFormat],l="comma"===i&&a.commaRoundTrip;t||(t=Object.keys(o)),a.sort&&t.sort(a.sort);for(var s=getSideChannel(),f=0;f<t.length;++f){var u=t[f],d=o[u];a.skipNulls&&null===d||pushToArray(n,stringify(d,u,i,l,a.allowEmptyArrays,a.strictNullHandling,a.skipNulls,a.encodeDotInKeys,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,s))}var y=n.join(a.delimiter),c=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?c+="utf8=%26%2310003%3B&":c+="utf8=%E2%9C%93&"),y.length>0?c+y:""};
|
|
12
12
|
|
|
13
13
|
},{"1":1,"46":46,"5":5}],5:[function(require,module,exports){
|
|
14
|
-
"use strict";var formats=require(1),getSideChannel=require(46),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,overflowChannel=getSideChannel(),markOverflow=function markOverflow(e,r){return overflowChannel.set(e,r),e},isOverflow=function isOverflow(e){return overflowChannel.has(e)},getMaxIndex=function getMaxIndex(e){return overflowChannel.get(e)},setMaxIndex=function setMaxIndex(e,r){overflowChannel.set(e,r)},hexTable=function(){for(var e=[],r=0;r<256;++r)e.
|
|
14
|
+
"use strict";var formats=require(1),getSideChannel=require(46),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,overflowChannel=getSideChannel(),markOverflow=function markOverflow(e,r){return overflowChannel.set(e,r),e},isOverflow=function isOverflow(e){return overflowChannel.has(e)},getMaxIndex=function getMaxIndex(e){return overflowChannel.get(e)},setMaxIndex=function setMaxIndex(e,r){overflowChannel.set(e,r)},hexTable=function(){for(var e=[],r=0;r<256;++r)e[e.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return e}(),compactQueue=function compactQueue(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(isArray(t)){for(var n=[],o=0;o<t.length;++o)void 0!==t[o]&&(n[n.length]=t[o]);r.obj[r.prop]=n}}},arrayToObject=function arrayToObject(e,r){for(var t=r&&r.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(t[n]=e[n]);return t},merge=function merge(e,r,t){if(!r)return e;if("object"!=typeof r&&"function"!=typeof r){if(isArray(e)){var n=e.length;if(t&&"number"==typeof t.arrayLimit&&n>t.arrayLimit)return markOverflow(arrayToObject(e.concat(r),t),n);e[n]=r}else{if(!e||"object"!=typeof e)return[e,r];if(isOverflow(e)){var o=getMaxIndex(e)+1;e[o]=r,setMaxIndex(e,o)}else(t&&(t.plainObjects||t.allowPrototypes)||!has.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e){if(isOverflow(r)){for(var a=Object.keys(r),i=t&&t.plainObjects?{__proto__:null,0:e}:{0:e},c=0;c<a.length;c++)i[parseInt(a[c],10)+1]=r[a[c]];return markOverflow(i,getMaxIndex(r)+1)}var l=[e].concat(r);return t&&"number"==typeof t.arrayLimit&&l.length>t.arrayLimit?markOverflow(arrayToObject(l,t),l.length-1):l}var f=e;return isArray(e)&&!isArray(r)&&(f=arrayToObject(e,t)),isArray(e)&&isArray(r)?(r.forEach(function(r,n){if(has.call(e,n)){var o=e[n];o&&"object"==typeof o&&r&&"object"==typeof r?e[n]=merge(o,r,t):e[e.length]=r}else e[n]=r}),e):Object.keys(r).reduce(function(e,n){var o=r[n];if(has.call(e,n)?e[n]=merge(e[n],o,t):e[n]=o,isOverflow(r)&&!isOverflow(e)&&markOverflow(e,getMaxIndex(r)),isOverflow(e)){var a=parseInt(n,10);String(a)===n&&a>=0&&a>getMaxIndex(e)&&setMaxIndex(e,a)}return e},f)},assign=function assignSingleSource(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},decode=function(e,r,t){var n=e.replace(/\+/g," ");if("iso-8859-1"===t)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},limit=1024,encode=function encode(e,r,t,n,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===t)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var i="",c=0;c<a.length;c+=limit){for(var l=a.length>=limit?a.slice(c,c+limit):a,f=[],s=0;s<l.length;++s){var u=l.charCodeAt(s);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===formats.RFC1738&&(40===u||41===u)?f[f.length]=l.charAt(s):u<128?f[f.length]=hexTable[u]:u<2048?f[f.length]=hexTable[192|u>>6]+hexTable[128|63&u]:u<55296||u>=57344?f[f.length]=hexTable[224|u>>12]+hexTable[128|u>>6&63]+hexTable[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&l.charCodeAt(s)),f[f.length]=hexTable[240|u>>18]+hexTable[128|u>>12&63]+hexTable[128|u>>6&63]+hexTable[128|63&u])}i+=f.join("")}return i},compact=function compact(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],n=0;n<r.length;++n)for(var o=r[n],a=o.obj[o.prop],i=Object.keys(a),c=0;c<i.length;++c){var l=i[c],f=a[l];"object"==typeof f&&null!==f&&-1===t.indexOf(f)&&(r[r.length]={obj:a,prop:l},t[t.length]=f)}return compactQueue(r),e},isRegExp=function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},isBuffer=function isBuffer(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},combine=function combine(e,r,t,n){if(isOverflow(e)){var o=getMaxIndex(e)+1;return e[o]=r,setMaxIndex(e,o),e}var a=[].concat(e,r);return a.length>t?markOverflow(arrayToObject(a,{plainObjects:n}),a.length-1):a},maybeMap=function maybeMap(e,r){if(isArray(e)){for(var t=[],n=0;n<e.length;n+=1)t[t.length]=r(e[n]);return t}return r(e)};module.exports={/* common-shake removed: arrayToObject:arrayToObject *//* common-shake removed: assign:assign */combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isOverflow:isOverflow,isRegExp:isRegExp,markOverflow:markOverflow,maybeMap:maybeMap,merge:merge};
|
|
15
15
|
|
|
16
16
|
},{"1":1,"46":46}],46:[function(require,module,exports){
|
|
17
17
|
"use strict";var $TypeError=require(20),inspect=require(42),getSideChannelList=require(43),getSideChannelMap=require(44),getSideChannelWeakMap=require(45),makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList;module.exports=function getSideChannel(){var e,n={assert:function(e){if(!n.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,t){e||(e=makeChannel()),e.set(n,t)}};return n};
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
},{}],7:[function(require,module,exports){
|
|
22
22
|
"use strict";var bind=require(24),$apply=require(8),$call=require(9),$reflectApply=require(11);module.exports=$reflectApply||bind.call($call,$apply);
|
|
23
23
|
|
|
24
|
-
},{"11":11,"24":24,"8":8,"9":9}],
|
|
25
|
-
"use strict";module.exports=Function.prototype.apply;
|
|
26
|
-
|
|
27
|
-
},{}],9:[function(require,module,exports){
|
|
24
|
+
},{"11":11,"24":24,"8":8,"9":9}],9:[function(require,module,exports){
|
|
28
25
|
"use strict";module.exports=Function.prototype.call;
|
|
29
26
|
|
|
27
|
+
},{}],8:[function(require,module,exports){
|
|
28
|
+
"use strict";module.exports=Function.prototype.apply;
|
|
29
|
+
|
|
30
30
|
},{}],24:[function(require,module,exports){
|
|
31
31
|
"use strict";var implementation=require(23);module.exports=Function.prototype.bind||implementation;
|
|
32
32
|
|
|
@@ -78,23 +78,23 @@
|
|
|
78
78
|
},{}],23:[function(require,module,exports){
|
|
79
79
|
"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function concatty(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var e=0;e<n.length;e+=1)r[e+t.length]=n[e];return r},slicy=function slicy(t,n){for(var r=[],o=n||0,e=0;o<t.length;o+=1,e+=1)r[e]=t[o];return r},joiny=function(t,n){for(var r="",o=0;o<t.length;o+=1)r+=t[o],o+1<t.length&&(r+=n);return r};module.exports=function bind(t){var n=this;if("function"!=typeof n||toStr.apply(n)!==funcType)throw new TypeError(ERROR_MESSAGE+n);for(var r,o=slicy(arguments,1),e=max(0,n.length-o.length),i=[],c=0;c<e;c++)i[c]="$"+c;if(r=Function("binder","return function ("+joiny(i,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var e=n.apply(this,concatty(o,arguments));return Object(e)===e?e:this}return n.apply(t,concatty(o,arguments))}),n.prototype){var p=function Empty(){};p.prototype=n.prototype,r.prototype=new p,p.prototype=null}return r};
|
|
80
80
|
|
|
81
|
-
},{}],
|
|
82
|
-
"use strict";module.exports=Math.
|
|
83
|
-
|
|
84
|
-
},{}],40:[function(require,module,exports){
|
|
85
|
-
"use strict";module.exports=Math.round;
|
|
81
|
+
},{}],39:[function(require,module,exports){
|
|
82
|
+
"use strict";module.exports=Math.pow;
|
|
86
83
|
|
|
87
84
|
},{}],37:[function(require,module,exports){
|
|
88
85
|
"use strict";module.exports=Math.max;
|
|
89
86
|
|
|
87
|
+
},{}],34:[function(require,module,exports){
|
|
88
|
+
"use strict";module.exports=Math.abs;
|
|
89
|
+
|
|
90
90
|
},{}],38:[function(require,module,exports){
|
|
91
91
|
"use strict";module.exports=Math.min;
|
|
92
92
|
|
|
93
|
-
},{}],
|
|
94
|
-
"use strict";module.exports=Math.
|
|
93
|
+
},{}],35:[function(require,module,exports){
|
|
94
|
+
"use strict";module.exports=Math.floor;
|
|
95
95
|
|
|
96
|
-
},{}],
|
|
97
|
-
"use strict";module.exports=Math.
|
|
96
|
+
},{}],40:[function(require,module,exports){
|
|
97
|
+
"use strict";module.exports=Math.round;
|
|
98
98
|
|
|
99
99
|
},{}],27:[function(require,module,exports){
|
|
100
100
|
"use strict";module.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null;
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
},{}],26:[function(require,module,exports){
|
|
103
103
|
"use strict";var $Object=require(22);module.exports=$Object.getPrototypeOf||null;
|
|
104
104
|
|
|
105
|
-
},{"22":22}],
|
|
106
|
-
"use strict";var call=Function.prototype.call,$hasOwn=Object.prototype.hasOwnProperty,bind=require(24);module.exports=bind.call(call,$hasOwn);
|
|
107
|
-
|
|
108
|
-
},{"24":24}],41:[function(require,module,exports){
|
|
105
|
+
},{"22":22}],41:[function(require,module,exports){
|
|
109
106
|
"use strict";var $isNaN=require(36);module.exports=function sign(i){return $isNaN(i)||0===i?i:i<0?-1:1};
|
|
110
107
|
|
|
111
|
-
},{"36":36}],
|
|
108
|
+
},{"36":36}],33:[function(require,module,exports){
|
|
109
|
+
"use strict";var call=Function.prototype.call,$hasOwn=Object.prototype.hasOwnProperty,bind=require(24);module.exports=bind.call(call,$hasOwn);
|
|
110
|
+
|
|
111
|
+
},{"24":24}],31:[function(require,module,exports){
|
|
112
112
|
"use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=require(32);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&"function"==typeof Symbol&&"symbol"==typeof origSymbol("foo")&&"symbol"==typeof Symbol("bar")&&hasSymbolSham()};
|
|
113
113
|
|
|
114
114
|
},{"32":32}],28:[function(require,module,exports){
|