@rebasepro/server-core 0.6.0 → 0.7.0
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/package.json +14 -14
- package/src/api/errors.ts +16 -2
- package/src/api/graphql/graphql-schema-generator.ts +45 -10
- package/src/api/rest/api-generator.ts +19 -2
- package/src/api/server.ts +10 -2
- package/src/api/types.ts +6 -0
- package/src/auth/adapter-middleware.ts +10 -2
- package/src/auth/admin-roles-route.ts +36 -0
- package/src/auth/admin-users-route.ts +302 -0
- package/src/auth/api-keys/api-key-middleware.ts +4 -3
- package/src/auth/api-keys/api-key-routes.ts +12 -2
- package/src/auth/api-keys/api-key-store.ts +83 -66
- package/src/auth/api-keys/api-key-types.ts +8 -0
- package/src/auth/apple-oauth.ts +2 -1
- package/src/auth/auth-hooks.ts +21 -0
- package/src/auth/bitbucket-oauth.ts +2 -1
- package/src/auth/builtin-auth-adapter.ts +28 -4
- package/src/auth/custom-auth-adapter.ts +2 -0
- package/src/auth/discord-oauth.ts +2 -1
- package/src/auth/facebook-oauth.ts +2 -1
- package/src/auth/github-oauth.ts +2 -1
- package/src/auth/gitlab-oauth.ts +2 -1
- package/src/auth/google-oauth.ts +8 -4
- package/src/auth/index.ts +2 -0
- package/src/auth/interfaces.ts +27 -0
- package/src/auth/linkedin-oauth.ts +2 -1
- package/src/auth/magic-link-routes.ts +167 -0
- package/src/auth/mfa-crypto.ts +91 -0
- package/src/auth/mfa-routes.ts +34 -10
- package/src/auth/microsoft-oauth.ts +2 -1
- package/src/auth/middleware.ts +10 -1
- package/src/auth/reset-password-admin.ts +17 -1
- package/src/auth/routes.ts +77 -8
- package/src/auth/session-routes.ts +15 -3
- package/src/auth/slack-oauth.ts +2 -1
- package/src/auth/spotify-oauth.ts +2 -1
- package/src/auth/twitter-oauth.ts +8 -1
- package/src/cron/cron-store.ts +25 -23
- package/src/email/index.ts +3 -2
- package/src/email/templates.ts +82 -0
- package/src/email/types.ts +16 -0
- package/src/init.ts +137 -5
- package/src/services/routed-realtime-service.ts +113 -0
- package/src/storage/routes.ts +4 -0
- package/src/utils/dev-port.ts +13 -7
- package/test/auth-routes.test.ts +54 -4
- package/test/custom-auth-adapter.test.ts +20 -1
- package/test/env.test.ts +9 -19
- package/test/multi-datasource-routing.test.ts +113 -0
- package/test/routed-realtime-service.test.ts +86 -0
- package/test/transform-auth-response.test.ts +305 -0
- package/vite.config.ts +5 -0
- package/build-errors.txt +0 -52
- package/dist/api/ast-schema-editor.d.ts +0 -21
- package/dist/api/collections_for_test/callbacks_test_collection.d.ts +0 -2
- package/dist/api/errors.d.ts +0 -53
- package/dist/api/graphql/graphql-schema-generator.d.ts +0 -35
- package/dist/api/graphql/index.d.ts +0 -1
- package/dist/api/index.d.ts +0 -9
- package/dist/api/logs-routes.d.ts +0 -37
- package/dist/api/openapi-generator.d.ts +0 -16
- package/dist/api/rest/api-generator.d.ts +0 -88
- package/dist/api/rest/index.d.ts +0 -1
- package/dist/api/rest/query-parser.d.ts +0 -11
- package/dist/api/schema-editor-routes.d.ts +0 -3
- package/dist/api/server.d.ts +0 -40
- package/dist/api/types.d.ts +0 -98
- package/dist/auth/adapter-middleware.d.ts +0 -37
- package/dist/auth/admin-user-ops.d.ts +0 -79
- package/dist/auth/api-keys/api-key-middleware.d.ts +0 -39
- package/dist/auth/api-keys/api-key-permission-guard.d.ts +0 -32
- package/dist/auth/api-keys/api-key-routes.d.ts +0 -20
- package/dist/auth/api-keys/api-key-store.d.ts +0 -35
- package/dist/auth/api-keys/api-key-types.d.ts +0 -88
- package/dist/auth/api-keys/index.d.ts +0 -17
- package/dist/auth/apple-oauth.d.ts +0 -30
- package/dist/auth/auth-hooks.d.ts +0 -225
- package/dist/auth/bitbucket-oauth.d.ts +0 -11
- package/dist/auth/builtin-auth-adapter.d.ts +0 -49
- package/dist/auth/crypto-utils.d.ts +0 -16
- package/dist/auth/custom-auth-adapter.d.ts +0 -39
- package/dist/auth/discord-oauth.d.ts +0 -14
- package/dist/auth/facebook-oauth.d.ts +0 -14
- package/dist/auth/github-oauth.d.ts +0 -15
- package/dist/auth/gitlab-oauth.d.ts +0 -13
- package/dist/auth/google-oauth.d.ts +0 -47
- package/dist/auth/index.d.ts +0 -36
- package/dist/auth/interfaces.d.ts +0 -401
- package/dist/auth/jwt.d.ts +0 -55
- package/dist/auth/linkedin-oauth.d.ts +0 -18
- package/dist/auth/mfa-routes.d.ts +0 -6
- package/dist/auth/mfa.d.ts +0 -49
- package/dist/auth/microsoft-oauth.d.ts +0 -16
- package/dist/auth/middleware.d.ts +0 -106
- package/dist/auth/password.d.ts +0 -22
- package/dist/auth/rate-limiter.d.ts +0 -50
- package/dist/auth/reset-password-admin.d.ts +0 -29
- package/dist/auth/rls-scope.d.ts +0 -31
- package/dist/auth/routes.d.ts +0 -33
- package/dist/auth/session-routes.d.ts +0 -25
- package/dist/auth/slack-oauth.d.ts +0 -12
- package/dist/auth/spotify-oauth.d.ts +0 -12
- package/dist/auth/twitter-oauth.d.ts +0 -18
- package/dist/backend-CIxN4FVm.js +0 -15
- package/dist/backend-CIxN4FVm.js.map +0 -1
- package/dist/chunk-Dze3rakg.js +0 -42
- package/dist/collections/BackendCollectionRegistry.d.ts +0 -13
- package/dist/collections/loader.d.ts +0 -5
- package/dist/cron/cron-loader.d.ts +0 -17
- package/dist/cron/cron-routes.d.ts +0 -14
- package/dist/cron/cron-scheduler.d.ts +0 -106
- package/dist/cron/cron-store.d.ts +0 -32
- package/dist/cron/index.d.ts +0 -6
- package/dist/db/interfaces.d.ts +0 -18
- package/dist/dist-CZKP-Xz4.js +0 -832
- package/dist/dist-CZKP-Xz4.js.map +0 -1
- package/dist/email/index.d.ts +0 -6
- package/dist/email/smtp-email-service.d.ts +0 -25
- package/dist/email/templates.d.ts +0 -42
- package/dist/email/types.d.ts +0 -108
- package/dist/env.d.ts +0 -102
- package/dist/from-VbwD7xRf.js +0 -3849
- package/dist/from-VbwD7xRf.js.map +0 -1
- package/dist/functions/function-loader.d.ts +0 -17
- package/dist/functions/function-routes.d.ts +0 -10
- package/dist/functions/index.d.ts +0 -3
- package/dist/history/history-routes.d.ts +0 -23
- package/dist/history/index.d.ts +0 -1
- package/dist/index.d.ts +0 -33
- package/dist/index.es.js +0 -61726
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -73216
- package/dist/index.umd.js.map +0 -1
- package/dist/init/docs.d.ts +0 -4
- package/dist/init/health.d.ts +0 -2
- package/dist/init/middlewares.d.ts +0 -10
- package/dist/init/shutdown.d.ts +0 -11
- package/dist/init/storage.d.ts +0 -5
- package/dist/init.d.ts +0 -258
- package/dist/jwt-DHcQRGC3.js +0 -4168
- package/dist/jwt-DHcQRGC3.js.map +0 -1
- package/dist/logger-BYU66ENZ.js +0 -94
- package/dist/logger-BYU66ENZ.js.map +0 -1
- package/dist/ms-BeBSuOXN.js +0 -125
- package/dist/ms-BeBSuOXN.js.map +0 -1
- package/dist/multipart-parser-CedBDOeC.js +0 -299
- package/dist/multipart-parser-CedBDOeC.js.map +0 -1
- package/dist/serve-spa.d.ts +0 -30
- package/dist/services/driver-registry.d.ts +0 -78
- package/dist/services/webhook-service.d.ts +0 -29
- package/dist/singleton.d.ts +0 -35
- package/dist/src-COaj0G3P.js +0 -1182
- package/dist/src-COaj0G3P.js.map +0 -1
- package/dist/storage/LocalStorageController.d.ts +0 -46
- package/dist/storage/S3StorageController.d.ts +0 -36
- package/dist/storage/image-transform.d.ts +0 -50
- package/dist/storage/index.d.ts +0 -28
- package/dist/storage/routes.d.ts +0 -38
- package/dist/storage/storage-registry.d.ts +0 -78
- package/dist/storage/tus-handler.d.ts +0 -51
- package/dist/storage/types.d.ts +0 -103
- package/dist/types/index.d.ts +0 -11
- package/dist/utils/dev-port.d.ts +0 -35
- package/dist/utils/logger.d.ts +0 -31
- package/dist/utils/logging.d.ts +0 -9
- package/dist/utils/request-id.d.ts +0 -4
- package/dist/utils/request-logger.d.ts +0 -19
- package/dist/utils/sql.d.ts +0 -27
package/dist/jwt-DHcQRGC3.js
DELETED
|
@@ -1,4168 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from "module";
|
|
2
|
-
import process from "process";
|
|
3
|
-
__createRequire(import.meta.url);
|
|
4
|
-
import { i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk-Dze3rakg.js";
|
|
5
|
-
import { t as logger } from "./logger-BYU66ENZ.js";
|
|
6
|
-
import { t as require_ms } from "./ms-BeBSuOXN.js";
|
|
7
|
-
import { createHash, randomBytes } from "crypto";
|
|
8
|
-
//#region ../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js
|
|
9
|
-
var require_safe_buffer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
11
|
-
var buffer = __require("buffer");
|
|
12
|
-
var Buffer = buffer.Buffer;
|
|
13
|
-
function copyProps(src, dst) {
|
|
14
|
-
for (var key in src) dst[key] = src[key];
|
|
15
|
-
}
|
|
16
|
-
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module.exports = buffer;
|
|
17
|
-
else {
|
|
18
|
-
copyProps(buffer, exports);
|
|
19
|
-
exports.Buffer = SafeBuffer;
|
|
20
|
-
}
|
|
21
|
-
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
22
|
-
return Buffer(arg, encodingOrOffset, length);
|
|
23
|
-
}
|
|
24
|
-
SafeBuffer.prototype = Object.create(Buffer.prototype);
|
|
25
|
-
copyProps(Buffer, SafeBuffer);
|
|
26
|
-
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
27
|
-
if (typeof arg === "number") throw new TypeError("Argument must not be a number");
|
|
28
|
-
return Buffer(arg, encodingOrOffset, length);
|
|
29
|
-
};
|
|
30
|
-
SafeBuffer.alloc = function(size, fill, encoding) {
|
|
31
|
-
if (typeof size !== "number") throw new TypeError("Argument must be a number");
|
|
32
|
-
var buf = Buffer(size);
|
|
33
|
-
if (fill !== void 0) if (typeof encoding === "string") buf.fill(fill, encoding);
|
|
34
|
-
else buf.fill(fill);
|
|
35
|
-
else buf.fill(0);
|
|
36
|
-
return buf;
|
|
37
|
-
};
|
|
38
|
-
SafeBuffer.allocUnsafe = function(size) {
|
|
39
|
-
if (typeof size !== "number") throw new TypeError("Argument must be a number");
|
|
40
|
-
return Buffer(size);
|
|
41
|
-
};
|
|
42
|
-
SafeBuffer.allocUnsafeSlow = function(size) {
|
|
43
|
-
if (typeof size !== "number") throw new TypeError("Argument must be a number");
|
|
44
|
-
return buffer.SlowBuffer(size);
|
|
45
|
-
};
|
|
46
|
-
}));
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js
|
|
49
|
-
var require_data_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
50
|
-
var Buffer = require_safe_buffer().Buffer;
|
|
51
|
-
var Stream$2 = __require("stream");
|
|
52
|
-
var util$3 = __require("util");
|
|
53
|
-
function DataStream(data) {
|
|
54
|
-
this.buffer = null;
|
|
55
|
-
this.writable = true;
|
|
56
|
-
this.readable = true;
|
|
57
|
-
if (!data) {
|
|
58
|
-
this.buffer = Buffer.alloc(0);
|
|
59
|
-
return this;
|
|
60
|
-
}
|
|
61
|
-
if (typeof data.pipe === "function") {
|
|
62
|
-
this.buffer = Buffer.alloc(0);
|
|
63
|
-
data.pipe(this);
|
|
64
|
-
return this;
|
|
65
|
-
}
|
|
66
|
-
if (data.length || typeof data === "object") {
|
|
67
|
-
this.buffer = data;
|
|
68
|
-
this.writable = false;
|
|
69
|
-
process.nextTick(function() {
|
|
70
|
-
this.emit("end", data);
|
|
71
|
-
this.readable = false;
|
|
72
|
-
this.emit("close");
|
|
73
|
-
}.bind(this));
|
|
74
|
-
return this;
|
|
75
|
-
}
|
|
76
|
-
throw new TypeError("Unexpected data type (" + typeof data + ")");
|
|
77
|
-
}
|
|
78
|
-
util$3.inherits(DataStream, Stream$2);
|
|
79
|
-
DataStream.prototype.write = function write(data) {
|
|
80
|
-
this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]);
|
|
81
|
-
this.emit("data", data);
|
|
82
|
-
};
|
|
83
|
-
DataStream.prototype.end = function end(data) {
|
|
84
|
-
if (data) this.write(data);
|
|
85
|
-
this.emit("end", data);
|
|
86
|
-
this.emit("close");
|
|
87
|
-
this.writable = false;
|
|
88
|
-
this.readable = false;
|
|
89
|
-
};
|
|
90
|
-
module.exports = DataStream;
|
|
91
|
-
}));
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
|
|
94
|
-
var require_param_bytes_for_alg = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
95
|
-
function getParamSize(keySize) {
|
|
96
|
-
return (keySize / 8 | 0) + (keySize % 8 === 0 ? 0 : 1);
|
|
97
|
-
}
|
|
98
|
-
var paramBytesForAlg = {
|
|
99
|
-
ES256: getParamSize(256),
|
|
100
|
-
ES384: getParamSize(384),
|
|
101
|
-
ES512: getParamSize(521)
|
|
102
|
-
};
|
|
103
|
-
function getParamBytesForAlg(alg) {
|
|
104
|
-
var paramBytes = paramBytesForAlg[alg];
|
|
105
|
-
if (paramBytes) return paramBytes;
|
|
106
|
-
throw new Error("Unknown algorithm \"" + alg + "\"");
|
|
107
|
-
}
|
|
108
|
-
module.exports = getParamBytesForAlg;
|
|
109
|
-
}));
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
|
|
112
|
-
var require_ecdsa_sig_formatter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
113
|
-
var Buffer = require_safe_buffer().Buffer;
|
|
114
|
-
var getParamBytesForAlg = require_param_bytes_for_alg();
|
|
115
|
-
var MAX_OCTET = 128, CLASS_UNIVERSAL = 0, PRIMITIVE_BIT = 32, TAG_SEQ = 16, TAG_INT = 2, ENCODED_TAG_SEQ = TAG_SEQ | PRIMITIVE_BIT | CLASS_UNIVERSAL << 6, ENCODED_TAG_INT = TAG_INT | CLASS_UNIVERSAL << 6;
|
|
116
|
-
function base64Url(base64) {
|
|
117
|
-
return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
118
|
-
}
|
|
119
|
-
function signatureAsBuffer(signature) {
|
|
120
|
-
if (Buffer.isBuffer(signature)) return signature;
|
|
121
|
-
else if ("string" === typeof signature) return Buffer.from(signature, "base64");
|
|
122
|
-
throw new TypeError("ECDSA signature must be a Base64 string or a Buffer");
|
|
123
|
-
}
|
|
124
|
-
function derToJose(signature, alg) {
|
|
125
|
-
signature = signatureAsBuffer(signature);
|
|
126
|
-
var paramBytes = getParamBytesForAlg(alg);
|
|
127
|
-
var maxEncodedParamLength = paramBytes + 1;
|
|
128
|
-
var inputLength = signature.length;
|
|
129
|
-
var offset = 0;
|
|
130
|
-
if (signature[offset++] !== ENCODED_TAG_SEQ) throw new Error("Could not find expected \"seq\"");
|
|
131
|
-
var seqLength = signature[offset++];
|
|
132
|
-
if (seqLength === (MAX_OCTET | 1)) seqLength = signature[offset++];
|
|
133
|
-
if (inputLength - offset < seqLength) throw new Error("\"seq\" specified length of \"" + seqLength + "\", only \"" + (inputLength - offset) + "\" remaining");
|
|
134
|
-
if (signature[offset++] !== ENCODED_TAG_INT) throw new Error("Could not find expected \"int\" for \"r\"");
|
|
135
|
-
var rLength = signature[offset++];
|
|
136
|
-
if (inputLength - offset - 2 < rLength) throw new Error("\"r\" specified length of \"" + rLength + "\", only \"" + (inputLength - offset - 2) + "\" available");
|
|
137
|
-
if (maxEncodedParamLength < rLength) throw new Error("\"r\" specified length of \"" + rLength + "\", max of \"" + maxEncodedParamLength + "\" is acceptable");
|
|
138
|
-
var rOffset = offset;
|
|
139
|
-
offset += rLength;
|
|
140
|
-
if (signature[offset++] !== ENCODED_TAG_INT) throw new Error("Could not find expected \"int\" for \"s\"");
|
|
141
|
-
var sLength = signature[offset++];
|
|
142
|
-
if (inputLength - offset !== sLength) throw new Error("\"s\" specified length of \"" + sLength + "\", expected \"" + (inputLength - offset) + "\"");
|
|
143
|
-
if (maxEncodedParamLength < sLength) throw new Error("\"s\" specified length of \"" + sLength + "\", max of \"" + maxEncodedParamLength + "\" is acceptable");
|
|
144
|
-
var sOffset = offset;
|
|
145
|
-
offset += sLength;
|
|
146
|
-
if (offset !== inputLength) throw new Error("Expected to consume entire buffer, but \"" + (inputLength - offset) + "\" bytes remain");
|
|
147
|
-
var rPadding = paramBytes - rLength, sPadding = paramBytes - sLength;
|
|
148
|
-
var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength);
|
|
149
|
-
for (offset = 0; offset < rPadding; ++offset) dst[offset] = 0;
|
|
150
|
-
signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength);
|
|
151
|
-
offset = paramBytes;
|
|
152
|
-
for (var o = offset; offset < o + sPadding; ++offset) dst[offset] = 0;
|
|
153
|
-
signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength);
|
|
154
|
-
dst = dst.toString("base64");
|
|
155
|
-
dst = base64Url(dst);
|
|
156
|
-
return dst;
|
|
157
|
-
}
|
|
158
|
-
function countPadding(buf, start, stop) {
|
|
159
|
-
var padding = 0;
|
|
160
|
-
while (start + padding < stop && buf[start + padding] === 0) ++padding;
|
|
161
|
-
if (buf[start + padding] >= MAX_OCTET) --padding;
|
|
162
|
-
return padding;
|
|
163
|
-
}
|
|
164
|
-
function joseToDer(signature, alg) {
|
|
165
|
-
signature = signatureAsBuffer(signature);
|
|
166
|
-
var paramBytes = getParamBytesForAlg(alg);
|
|
167
|
-
var signatureBytes = signature.length;
|
|
168
|
-
if (signatureBytes !== paramBytes * 2) throw new TypeError("\"" + alg + "\" signatures must be \"" + paramBytes * 2 + "\" bytes, saw \"" + signatureBytes + "\"");
|
|
169
|
-
var rPadding = countPadding(signature, 0, paramBytes);
|
|
170
|
-
var sPadding = countPadding(signature, paramBytes, signature.length);
|
|
171
|
-
var rLength = paramBytes - rPadding;
|
|
172
|
-
var sLength = paramBytes - sPadding;
|
|
173
|
-
var rsBytes = 2 + rLength + 1 + 1 + sLength;
|
|
174
|
-
var shortLength = rsBytes < MAX_OCTET;
|
|
175
|
-
var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes);
|
|
176
|
-
var offset = 0;
|
|
177
|
-
dst[offset++] = ENCODED_TAG_SEQ;
|
|
178
|
-
if (shortLength) dst[offset++] = rsBytes;
|
|
179
|
-
else {
|
|
180
|
-
dst[offset++] = MAX_OCTET | 1;
|
|
181
|
-
dst[offset++] = rsBytes & 255;
|
|
182
|
-
}
|
|
183
|
-
dst[offset++] = ENCODED_TAG_INT;
|
|
184
|
-
dst[offset++] = rLength;
|
|
185
|
-
if (rPadding < 0) {
|
|
186
|
-
dst[offset++] = 0;
|
|
187
|
-
offset += signature.copy(dst, offset, 0, paramBytes);
|
|
188
|
-
} else offset += signature.copy(dst, offset, rPadding, paramBytes);
|
|
189
|
-
dst[offset++] = ENCODED_TAG_INT;
|
|
190
|
-
dst[offset++] = sLength;
|
|
191
|
-
if (sPadding < 0) {
|
|
192
|
-
dst[offset++] = 0;
|
|
193
|
-
signature.copy(dst, offset, paramBytes);
|
|
194
|
-
} else signature.copy(dst, offset, paramBytes + sPadding);
|
|
195
|
-
return dst;
|
|
196
|
-
}
|
|
197
|
-
module.exports = {
|
|
198
|
-
derToJose,
|
|
199
|
-
joseToDer
|
|
200
|
-
};
|
|
201
|
-
}));
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region ../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js
|
|
204
|
-
var require_buffer_equal_constant_time = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
205
|
-
var Buffer$2 = __require("buffer").Buffer;
|
|
206
|
-
var SlowBuffer = __require("buffer").SlowBuffer;
|
|
207
|
-
module.exports = bufferEq;
|
|
208
|
-
function bufferEq(a, b) {
|
|
209
|
-
if (!Buffer$2.isBuffer(a) || !Buffer$2.isBuffer(b)) return false;
|
|
210
|
-
if (a.length !== b.length) return false;
|
|
211
|
-
var c = 0;
|
|
212
|
-
for (var i = 0; i < a.length; i++) c |= a[i] ^ b[i];
|
|
213
|
-
return c === 0;
|
|
214
|
-
}
|
|
215
|
-
bufferEq.install = function() {
|
|
216
|
-
Buffer$2.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
|
|
217
|
-
return bufferEq(this, that);
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
var origBufEqual = Buffer$2.prototype.equal;
|
|
221
|
-
var origSlowBufEqual = SlowBuffer.prototype.equal;
|
|
222
|
-
bufferEq.restore = function() {
|
|
223
|
-
Buffer$2.prototype.equal = origBufEqual;
|
|
224
|
-
SlowBuffer.prototype.equal = origSlowBufEqual;
|
|
225
|
-
};
|
|
226
|
-
}));
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region ../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js
|
|
229
|
-
var require_jwa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
230
|
-
var Buffer = require_safe_buffer().Buffer;
|
|
231
|
-
var crypto = __require("crypto");
|
|
232
|
-
var formatEcdsa = require_ecdsa_sig_formatter();
|
|
233
|
-
var util$2 = __require("util");
|
|
234
|
-
var MSG_INVALID_ALGORITHM = "\"%s\" is not a valid algorithm.\n Supported algorithms are:\n \"HS256\", \"HS384\", \"HS512\", \"RS256\", \"RS384\", \"RS512\", \"PS256\", \"PS384\", \"PS512\", \"ES256\", \"ES384\", \"ES512\" and \"none\".";
|
|
235
|
-
var MSG_INVALID_SECRET = "secret must be a string or buffer";
|
|
236
|
-
var MSG_INVALID_VERIFIER_KEY = "key must be a string or a buffer";
|
|
237
|
-
var MSG_INVALID_SIGNER_KEY = "key must be a string, a buffer or an object";
|
|
238
|
-
var supportsKeyObjects = typeof crypto.createPublicKey === "function";
|
|
239
|
-
if (supportsKeyObjects) {
|
|
240
|
-
MSG_INVALID_VERIFIER_KEY += " or a KeyObject";
|
|
241
|
-
MSG_INVALID_SECRET += "or a KeyObject";
|
|
242
|
-
}
|
|
243
|
-
function checkIsPublicKey(key) {
|
|
244
|
-
if (Buffer.isBuffer(key)) return;
|
|
245
|
-
if (typeof key === "string") return;
|
|
246
|
-
if (!supportsKeyObjects) throw typeError(MSG_INVALID_VERIFIER_KEY);
|
|
247
|
-
if (typeof key !== "object") throw typeError(MSG_INVALID_VERIFIER_KEY);
|
|
248
|
-
if (typeof key.type !== "string") throw typeError(MSG_INVALID_VERIFIER_KEY);
|
|
249
|
-
if (typeof key.asymmetricKeyType !== "string") throw typeError(MSG_INVALID_VERIFIER_KEY);
|
|
250
|
-
if (typeof key.export !== "function") throw typeError(MSG_INVALID_VERIFIER_KEY);
|
|
251
|
-
}
|
|
252
|
-
function checkIsPrivateKey(key) {
|
|
253
|
-
if (Buffer.isBuffer(key)) return;
|
|
254
|
-
if (typeof key === "string") return;
|
|
255
|
-
if (typeof key === "object") return;
|
|
256
|
-
throw typeError(MSG_INVALID_SIGNER_KEY);
|
|
257
|
-
}
|
|
258
|
-
function checkIsSecretKey(key) {
|
|
259
|
-
if (Buffer.isBuffer(key)) return;
|
|
260
|
-
if (typeof key === "string") return key;
|
|
261
|
-
if (!supportsKeyObjects) throw typeError(MSG_INVALID_SECRET);
|
|
262
|
-
if (typeof key !== "object") throw typeError(MSG_INVALID_SECRET);
|
|
263
|
-
if (key.type !== "secret") throw typeError(MSG_INVALID_SECRET);
|
|
264
|
-
if (typeof key.export !== "function") throw typeError(MSG_INVALID_SECRET);
|
|
265
|
-
}
|
|
266
|
-
function fromBase64(base64) {
|
|
267
|
-
return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
268
|
-
}
|
|
269
|
-
function toBase64(base64url) {
|
|
270
|
-
base64url = base64url.toString();
|
|
271
|
-
var padding = 4 - base64url.length % 4;
|
|
272
|
-
if (padding !== 4) for (var i = 0; i < padding; ++i) base64url += "=";
|
|
273
|
-
return base64url.replace(/\-/g, "+").replace(/_/g, "/");
|
|
274
|
-
}
|
|
275
|
-
function typeError(template) {
|
|
276
|
-
var args = [].slice.call(arguments, 1);
|
|
277
|
-
var errMsg = util$2.format.bind(util$2, template).apply(null, args);
|
|
278
|
-
return new TypeError(errMsg);
|
|
279
|
-
}
|
|
280
|
-
function bufferOrString(obj) {
|
|
281
|
-
return Buffer.isBuffer(obj) || typeof obj === "string";
|
|
282
|
-
}
|
|
283
|
-
function normalizeInput(thing) {
|
|
284
|
-
if (!bufferOrString(thing)) thing = JSON.stringify(thing);
|
|
285
|
-
return thing;
|
|
286
|
-
}
|
|
287
|
-
function createHmacSigner(bits) {
|
|
288
|
-
return function sign(thing, secret) {
|
|
289
|
-
checkIsSecretKey(secret);
|
|
290
|
-
thing = normalizeInput(thing);
|
|
291
|
-
var hmac = crypto.createHmac("sha" + bits, secret);
|
|
292
|
-
return fromBase64((hmac.update(thing), hmac.digest("base64")));
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
var bufferEqual;
|
|
296
|
-
var timingSafeEqual = "timingSafeEqual" in crypto ? function timingSafeEqual(a, b) {
|
|
297
|
-
if (a.byteLength !== b.byteLength) return false;
|
|
298
|
-
return crypto.timingSafeEqual(a, b);
|
|
299
|
-
} : function timingSafeEqual(a, b) {
|
|
300
|
-
if (!bufferEqual) bufferEqual = require_buffer_equal_constant_time();
|
|
301
|
-
return bufferEqual(a, b);
|
|
302
|
-
};
|
|
303
|
-
function createHmacVerifier(bits) {
|
|
304
|
-
return function verify(thing, signature, secret) {
|
|
305
|
-
var computedSig = createHmacSigner(bits)(thing, secret);
|
|
306
|
-
return timingSafeEqual(Buffer.from(signature), Buffer.from(computedSig));
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
function createKeySigner(bits) {
|
|
310
|
-
return function sign(thing, privateKey) {
|
|
311
|
-
checkIsPrivateKey(privateKey);
|
|
312
|
-
thing = normalizeInput(thing);
|
|
313
|
-
var signer = crypto.createSign("RSA-SHA" + bits);
|
|
314
|
-
return fromBase64((signer.update(thing), signer.sign(privateKey, "base64")));
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
function createKeyVerifier(bits) {
|
|
318
|
-
return function verify(thing, signature, publicKey) {
|
|
319
|
-
checkIsPublicKey(publicKey);
|
|
320
|
-
thing = normalizeInput(thing);
|
|
321
|
-
signature = toBase64(signature);
|
|
322
|
-
var verifier = crypto.createVerify("RSA-SHA" + bits);
|
|
323
|
-
verifier.update(thing);
|
|
324
|
-
return verifier.verify(publicKey, signature, "base64");
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
function createPSSKeySigner(bits) {
|
|
328
|
-
return function sign(thing, privateKey) {
|
|
329
|
-
checkIsPrivateKey(privateKey);
|
|
330
|
-
thing = normalizeInput(thing);
|
|
331
|
-
var signer = crypto.createSign("RSA-SHA" + bits);
|
|
332
|
-
return fromBase64((signer.update(thing), signer.sign({
|
|
333
|
-
key: privateKey,
|
|
334
|
-
padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
|
|
335
|
-
saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
|
|
336
|
-
}, "base64")));
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
function createPSSKeyVerifier(bits) {
|
|
340
|
-
return function verify(thing, signature, publicKey) {
|
|
341
|
-
checkIsPublicKey(publicKey);
|
|
342
|
-
thing = normalizeInput(thing);
|
|
343
|
-
signature = toBase64(signature);
|
|
344
|
-
var verifier = crypto.createVerify("RSA-SHA" + bits);
|
|
345
|
-
verifier.update(thing);
|
|
346
|
-
return verifier.verify({
|
|
347
|
-
key: publicKey,
|
|
348
|
-
padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
|
|
349
|
-
saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST
|
|
350
|
-
}, signature, "base64");
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
function createECDSASigner(bits) {
|
|
354
|
-
var inner = createKeySigner(bits);
|
|
355
|
-
return function sign() {
|
|
356
|
-
var signature = inner.apply(null, arguments);
|
|
357
|
-
signature = formatEcdsa.derToJose(signature, "ES" + bits);
|
|
358
|
-
return signature;
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
function createECDSAVerifer(bits) {
|
|
362
|
-
var inner = createKeyVerifier(bits);
|
|
363
|
-
return function verify(thing, signature, publicKey) {
|
|
364
|
-
signature = formatEcdsa.joseToDer(signature, "ES" + bits).toString("base64");
|
|
365
|
-
return inner(thing, signature, publicKey);
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
function createNoneSigner() {
|
|
369
|
-
return function sign() {
|
|
370
|
-
return "";
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
function createNoneVerifier() {
|
|
374
|
-
return function verify(thing, signature) {
|
|
375
|
-
return signature === "";
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
module.exports = function jwa(algorithm) {
|
|
379
|
-
var signerFactories = {
|
|
380
|
-
hs: createHmacSigner,
|
|
381
|
-
rs: createKeySigner,
|
|
382
|
-
ps: createPSSKeySigner,
|
|
383
|
-
es: createECDSASigner,
|
|
384
|
-
none: createNoneSigner
|
|
385
|
-
};
|
|
386
|
-
var verifierFactories = {
|
|
387
|
-
hs: createHmacVerifier,
|
|
388
|
-
rs: createKeyVerifier,
|
|
389
|
-
ps: createPSSKeyVerifier,
|
|
390
|
-
es: createECDSAVerifer,
|
|
391
|
-
none: createNoneVerifier
|
|
392
|
-
};
|
|
393
|
-
var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);
|
|
394
|
-
if (!match) throw typeError(MSG_INVALID_ALGORITHM, algorithm);
|
|
395
|
-
var algo = (match[1] || match[3]).toLowerCase();
|
|
396
|
-
var bits = match[2];
|
|
397
|
-
return {
|
|
398
|
-
sign: signerFactories[algo](bits),
|
|
399
|
-
verify: verifierFactories[algo](bits)
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
}));
|
|
403
|
-
//#endregion
|
|
404
|
-
//#region ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js
|
|
405
|
-
var require_tostring = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
406
|
-
var Buffer$1 = __require("buffer").Buffer;
|
|
407
|
-
module.exports = function toString(obj) {
|
|
408
|
-
if (typeof obj === "string") return obj;
|
|
409
|
-
if (typeof obj === "number" || Buffer$1.isBuffer(obj)) return obj.toString();
|
|
410
|
-
return JSON.stringify(obj);
|
|
411
|
-
};
|
|
412
|
-
}));
|
|
413
|
-
//#endregion
|
|
414
|
-
//#region ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js
|
|
415
|
-
var require_sign_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
416
|
-
var Buffer = require_safe_buffer().Buffer;
|
|
417
|
-
var DataStream = require_data_stream();
|
|
418
|
-
var jwa = require_jwa();
|
|
419
|
-
var Stream$1 = __require("stream");
|
|
420
|
-
var toString = require_tostring();
|
|
421
|
-
var util$1 = __require("util");
|
|
422
|
-
function base64url(string, encoding) {
|
|
423
|
-
return Buffer.from(string, encoding).toString("base64").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
424
|
-
}
|
|
425
|
-
function jwsSecuredInput(header, payload, encoding) {
|
|
426
|
-
encoding = encoding || "utf8";
|
|
427
|
-
var encodedHeader = base64url(toString(header), "binary");
|
|
428
|
-
var encodedPayload = base64url(toString(payload), encoding);
|
|
429
|
-
return util$1.format("%s.%s", encodedHeader, encodedPayload);
|
|
430
|
-
}
|
|
431
|
-
function jwsSign(opts) {
|
|
432
|
-
var header = opts.header;
|
|
433
|
-
var payload = opts.payload;
|
|
434
|
-
var secretOrKey = opts.secret || opts.privateKey;
|
|
435
|
-
var encoding = opts.encoding;
|
|
436
|
-
var algo = jwa(header.alg);
|
|
437
|
-
var securedInput = jwsSecuredInput(header, payload, encoding);
|
|
438
|
-
var signature = algo.sign(securedInput, secretOrKey);
|
|
439
|
-
return util$1.format("%s.%s", securedInput, signature);
|
|
440
|
-
}
|
|
441
|
-
function SignStream(opts) {
|
|
442
|
-
var secret = opts.secret;
|
|
443
|
-
secret = secret == null ? opts.privateKey : secret;
|
|
444
|
-
secret = secret == null ? opts.key : secret;
|
|
445
|
-
if (/^hs/i.test(opts.header.alg) === true && secret == null) throw new TypeError("secret must be a string or buffer or a KeyObject");
|
|
446
|
-
var secretStream = new DataStream(secret);
|
|
447
|
-
this.readable = true;
|
|
448
|
-
this.header = opts.header;
|
|
449
|
-
this.encoding = opts.encoding;
|
|
450
|
-
this.secret = this.privateKey = this.key = secretStream;
|
|
451
|
-
this.payload = new DataStream(opts.payload);
|
|
452
|
-
this.secret.once("close", function() {
|
|
453
|
-
if (!this.payload.writable && this.readable) this.sign();
|
|
454
|
-
}.bind(this));
|
|
455
|
-
this.payload.once("close", function() {
|
|
456
|
-
if (!this.secret.writable && this.readable) this.sign();
|
|
457
|
-
}.bind(this));
|
|
458
|
-
}
|
|
459
|
-
util$1.inherits(SignStream, Stream$1);
|
|
460
|
-
SignStream.prototype.sign = function sign() {
|
|
461
|
-
try {
|
|
462
|
-
var signature = jwsSign({
|
|
463
|
-
header: this.header,
|
|
464
|
-
payload: this.payload.buffer,
|
|
465
|
-
secret: this.secret.buffer,
|
|
466
|
-
encoding: this.encoding
|
|
467
|
-
});
|
|
468
|
-
this.emit("done", signature);
|
|
469
|
-
this.emit("data", signature);
|
|
470
|
-
this.emit("end");
|
|
471
|
-
this.readable = false;
|
|
472
|
-
return signature;
|
|
473
|
-
} catch (e) {
|
|
474
|
-
this.readable = false;
|
|
475
|
-
this.emit("error", e);
|
|
476
|
-
this.emit("close");
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
SignStream.sign = jwsSign;
|
|
480
|
-
module.exports = SignStream;
|
|
481
|
-
}));
|
|
482
|
-
//#endregion
|
|
483
|
-
//#region ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js
|
|
484
|
-
var require_verify_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
485
|
-
var Buffer = require_safe_buffer().Buffer;
|
|
486
|
-
var DataStream = require_data_stream();
|
|
487
|
-
var jwa = require_jwa();
|
|
488
|
-
var Stream = __require("stream");
|
|
489
|
-
var toString = require_tostring();
|
|
490
|
-
var util = __require("util");
|
|
491
|
-
var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
|
|
492
|
-
function isObject(thing) {
|
|
493
|
-
return Object.prototype.toString.call(thing) === "[object Object]";
|
|
494
|
-
}
|
|
495
|
-
function safeJsonParse(thing) {
|
|
496
|
-
if (isObject(thing)) return thing;
|
|
497
|
-
try {
|
|
498
|
-
return JSON.parse(thing);
|
|
499
|
-
} catch (e) {
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function headerFromJWS(jwsSig) {
|
|
504
|
-
var encodedHeader = jwsSig.split(".", 1)[0];
|
|
505
|
-
return safeJsonParse(Buffer.from(encodedHeader, "base64").toString("binary"));
|
|
506
|
-
}
|
|
507
|
-
function securedInputFromJWS(jwsSig) {
|
|
508
|
-
return jwsSig.split(".", 2).join(".");
|
|
509
|
-
}
|
|
510
|
-
function signatureFromJWS(jwsSig) {
|
|
511
|
-
return jwsSig.split(".")[2];
|
|
512
|
-
}
|
|
513
|
-
function payloadFromJWS(jwsSig, encoding) {
|
|
514
|
-
encoding = encoding || "utf8";
|
|
515
|
-
var payload = jwsSig.split(".")[1];
|
|
516
|
-
return Buffer.from(payload, "base64").toString(encoding);
|
|
517
|
-
}
|
|
518
|
-
function isValidJws(string) {
|
|
519
|
-
return JWS_REGEX.test(string) && !!headerFromJWS(string);
|
|
520
|
-
}
|
|
521
|
-
function jwsVerify(jwsSig, algorithm, secretOrKey) {
|
|
522
|
-
if (!algorithm) {
|
|
523
|
-
var err = /* @__PURE__ */ new Error("Missing algorithm parameter for jws.verify");
|
|
524
|
-
err.code = "MISSING_ALGORITHM";
|
|
525
|
-
throw err;
|
|
526
|
-
}
|
|
527
|
-
jwsSig = toString(jwsSig);
|
|
528
|
-
var signature = signatureFromJWS(jwsSig);
|
|
529
|
-
var securedInput = securedInputFromJWS(jwsSig);
|
|
530
|
-
return jwa(algorithm).verify(securedInput, signature, secretOrKey);
|
|
531
|
-
}
|
|
532
|
-
function jwsDecode(jwsSig, opts) {
|
|
533
|
-
opts = opts || {};
|
|
534
|
-
jwsSig = toString(jwsSig);
|
|
535
|
-
if (!isValidJws(jwsSig)) return null;
|
|
536
|
-
var header = headerFromJWS(jwsSig);
|
|
537
|
-
if (!header) return null;
|
|
538
|
-
var payload = payloadFromJWS(jwsSig);
|
|
539
|
-
if (header.typ === "JWT" || opts.json) payload = JSON.parse(payload, opts.encoding);
|
|
540
|
-
return {
|
|
541
|
-
header,
|
|
542
|
-
payload,
|
|
543
|
-
signature: signatureFromJWS(jwsSig)
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
function VerifyStream(opts) {
|
|
547
|
-
opts = opts || {};
|
|
548
|
-
var secretOrKey = opts.secret;
|
|
549
|
-
secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey;
|
|
550
|
-
secretOrKey = secretOrKey == null ? opts.key : secretOrKey;
|
|
551
|
-
if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) throw new TypeError("secret must be a string or buffer or a KeyObject");
|
|
552
|
-
var secretStream = new DataStream(secretOrKey);
|
|
553
|
-
this.readable = true;
|
|
554
|
-
this.algorithm = opts.algorithm;
|
|
555
|
-
this.encoding = opts.encoding;
|
|
556
|
-
this.secret = this.publicKey = this.key = secretStream;
|
|
557
|
-
this.signature = new DataStream(opts.signature);
|
|
558
|
-
this.secret.once("close", function() {
|
|
559
|
-
if (!this.signature.writable && this.readable) this.verify();
|
|
560
|
-
}.bind(this));
|
|
561
|
-
this.signature.once("close", function() {
|
|
562
|
-
if (!this.secret.writable && this.readable) this.verify();
|
|
563
|
-
}.bind(this));
|
|
564
|
-
}
|
|
565
|
-
util.inherits(VerifyStream, Stream);
|
|
566
|
-
VerifyStream.prototype.verify = function verify() {
|
|
567
|
-
try {
|
|
568
|
-
var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
|
|
569
|
-
var obj = jwsDecode(this.signature.buffer, this.encoding);
|
|
570
|
-
this.emit("done", valid, obj);
|
|
571
|
-
this.emit("data", valid);
|
|
572
|
-
this.emit("end");
|
|
573
|
-
this.readable = false;
|
|
574
|
-
return valid;
|
|
575
|
-
} catch (e) {
|
|
576
|
-
this.readable = false;
|
|
577
|
-
this.emit("error", e);
|
|
578
|
-
this.emit("close");
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
VerifyStream.decode = jwsDecode;
|
|
582
|
-
VerifyStream.isValid = isValidJws;
|
|
583
|
-
VerifyStream.verify = jwsVerify;
|
|
584
|
-
module.exports = VerifyStream;
|
|
585
|
-
}));
|
|
586
|
-
//#endregion
|
|
587
|
-
//#region ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js
|
|
588
|
-
var require_jws = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
589
|
-
var SignStream = require_sign_stream();
|
|
590
|
-
var VerifyStream = require_verify_stream();
|
|
591
|
-
exports.ALGORITHMS = [
|
|
592
|
-
"HS256",
|
|
593
|
-
"HS384",
|
|
594
|
-
"HS512",
|
|
595
|
-
"RS256",
|
|
596
|
-
"RS384",
|
|
597
|
-
"RS512",
|
|
598
|
-
"PS256",
|
|
599
|
-
"PS384",
|
|
600
|
-
"PS512",
|
|
601
|
-
"ES256",
|
|
602
|
-
"ES384",
|
|
603
|
-
"ES512"
|
|
604
|
-
];
|
|
605
|
-
exports.sign = SignStream.sign;
|
|
606
|
-
exports.verify = VerifyStream.verify;
|
|
607
|
-
exports.decode = VerifyStream.decode;
|
|
608
|
-
exports.isValid = VerifyStream.isValid;
|
|
609
|
-
exports.createSign = function createSign(opts) {
|
|
610
|
-
return new SignStream(opts);
|
|
611
|
-
};
|
|
612
|
-
exports.createVerify = function createVerify(opts) {
|
|
613
|
-
return new VerifyStream(opts);
|
|
614
|
-
};
|
|
615
|
-
}));
|
|
616
|
-
//#endregion
|
|
617
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/decode.js
|
|
618
|
-
var require_decode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
619
|
-
var jws = require_jws();
|
|
620
|
-
module.exports = function(jwt, options) {
|
|
621
|
-
options = options || {};
|
|
622
|
-
var decoded = jws.decode(jwt, options);
|
|
623
|
-
if (!decoded) return null;
|
|
624
|
-
var payload = decoded.payload;
|
|
625
|
-
if (typeof payload === "string") try {
|
|
626
|
-
var obj = JSON.parse(payload);
|
|
627
|
-
if (obj !== null && typeof obj === "object") payload = obj;
|
|
628
|
-
} catch (e) {}
|
|
629
|
-
if (options.complete === true) return {
|
|
630
|
-
header: decoded.header,
|
|
631
|
-
payload,
|
|
632
|
-
signature: decoded.signature
|
|
633
|
-
};
|
|
634
|
-
return payload;
|
|
635
|
-
};
|
|
636
|
-
}));
|
|
637
|
-
//#endregion
|
|
638
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/JsonWebTokenError.js
|
|
639
|
-
var require_JsonWebTokenError = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
640
|
-
var JsonWebTokenError = function(message, error) {
|
|
641
|
-
Error.call(this, message);
|
|
642
|
-
if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
|
|
643
|
-
this.name = "JsonWebTokenError";
|
|
644
|
-
this.message = message;
|
|
645
|
-
if (error) this.inner = error;
|
|
646
|
-
};
|
|
647
|
-
JsonWebTokenError.prototype = Object.create(Error.prototype);
|
|
648
|
-
JsonWebTokenError.prototype.constructor = JsonWebTokenError;
|
|
649
|
-
module.exports = JsonWebTokenError;
|
|
650
|
-
}));
|
|
651
|
-
//#endregion
|
|
652
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/NotBeforeError.js
|
|
653
|
-
var require_NotBeforeError = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
654
|
-
var JsonWebTokenError = require_JsonWebTokenError();
|
|
655
|
-
var NotBeforeError = function(message, date) {
|
|
656
|
-
JsonWebTokenError.call(this, message);
|
|
657
|
-
this.name = "NotBeforeError";
|
|
658
|
-
this.date = date;
|
|
659
|
-
};
|
|
660
|
-
NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype);
|
|
661
|
-
NotBeforeError.prototype.constructor = NotBeforeError;
|
|
662
|
-
module.exports = NotBeforeError;
|
|
663
|
-
}));
|
|
664
|
-
//#endregion
|
|
665
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/TokenExpiredError.js
|
|
666
|
-
var require_TokenExpiredError = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
667
|
-
var JsonWebTokenError = require_JsonWebTokenError();
|
|
668
|
-
var TokenExpiredError = function(message, expiredAt) {
|
|
669
|
-
JsonWebTokenError.call(this, message);
|
|
670
|
-
this.name = "TokenExpiredError";
|
|
671
|
-
this.expiredAt = expiredAt;
|
|
672
|
-
};
|
|
673
|
-
TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype);
|
|
674
|
-
TokenExpiredError.prototype.constructor = TokenExpiredError;
|
|
675
|
-
module.exports = TokenExpiredError;
|
|
676
|
-
}));
|
|
677
|
-
//#endregion
|
|
678
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/timespan.js
|
|
679
|
-
var require_timespan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
680
|
-
var ms = require_ms();
|
|
681
|
-
module.exports = function(time, iat) {
|
|
682
|
-
var timestamp = iat || Math.floor(Date.now() / 1e3);
|
|
683
|
-
if (typeof time === "string") {
|
|
684
|
-
var milliseconds = ms(time);
|
|
685
|
-
if (typeof milliseconds === "undefined") return;
|
|
686
|
-
return Math.floor(timestamp + milliseconds / 1e3);
|
|
687
|
-
} else if (typeof time === "number") return timestamp + time;
|
|
688
|
-
else return;
|
|
689
|
-
};
|
|
690
|
-
}));
|
|
691
|
-
//#endregion
|
|
692
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/constants.js
|
|
693
|
-
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
694
|
-
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
695
|
-
var MAX_LENGTH = 256;
|
|
696
|
-
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
697
|
-
module.exports = {
|
|
698
|
-
MAX_LENGTH,
|
|
699
|
-
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
700
|
-
MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
|
|
701
|
-
MAX_SAFE_INTEGER,
|
|
702
|
-
RELEASE_TYPES: [
|
|
703
|
-
"major",
|
|
704
|
-
"premajor",
|
|
705
|
-
"minor",
|
|
706
|
-
"preminor",
|
|
707
|
-
"patch",
|
|
708
|
-
"prepatch",
|
|
709
|
-
"prerelease"
|
|
710
|
-
],
|
|
711
|
-
SEMVER_SPEC_VERSION,
|
|
712
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
713
|
-
FLAG_LOOSE: 2
|
|
714
|
-
};
|
|
715
|
-
}));
|
|
716
|
-
//#endregion
|
|
717
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/debug.js
|
|
718
|
-
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
719
|
-
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
720
|
-
}));
|
|
721
|
-
//#endregion
|
|
722
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/re.js
|
|
723
|
-
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
724
|
-
var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
725
|
-
var debug = require_debug();
|
|
726
|
-
exports = module.exports = {};
|
|
727
|
-
var re = exports.re = [];
|
|
728
|
-
var safeRe = exports.safeRe = [];
|
|
729
|
-
var src = exports.src = [];
|
|
730
|
-
var safeSrc = exports.safeSrc = [];
|
|
731
|
-
var t = exports.t = {};
|
|
732
|
-
var R = 0;
|
|
733
|
-
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
734
|
-
var safeRegexReplacements = [
|
|
735
|
-
["\\s", 1],
|
|
736
|
-
["\\d", MAX_LENGTH],
|
|
737
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
738
|
-
];
|
|
739
|
-
var makeSafeRegex = (value) => {
|
|
740
|
-
for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
741
|
-
return value;
|
|
742
|
-
};
|
|
743
|
-
var createToken = (name, value, isGlobal) => {
|
|
744
|
-
const safe = makeSafeRegex(value);
|
|
745
|
-
const index = R++;
|
|
746
|
-
debug(name, index, value);
|
|
747
|
-
t[name] = index;
|
|
748
|
-
src[index] = value;
|
|
749
|
-
safeSrc[index] = safe;
|
|
750
|
-
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
751
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
752
|
-
};
|
|
753
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
754
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
755
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
756
|
-
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
757
|
-
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
758
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
759
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
760
|
-
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
761
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
762
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
763
|
-
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
764
|
-
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
765
|
-
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
766
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
767
|
-
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
768
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
769
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
770
|
-
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
771
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
772
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
773
|
-
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
774
|
-
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
775
|
-
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
776
|
-
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
777
|
-
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
778
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
779
|
-
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
780
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
781
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
782
|
-
exports.tildeTrimReplace = "$1~";
|
|
783
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
784
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
785
|
-
createToken("LONECARET", "(?:\\^)");
|
|
786
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
787
|
-
exports.caretTrimReplace = "$1^";
|
|
788
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
789
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
790
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
791
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
792
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
793
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
794
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
795
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
796
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
797
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
798
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
799
|
-
}));
|
|
800
|
-
//#endregion
|
|
801
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/parse-options.js
|
|
802
|
-
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
803
|
-
var looseOption = Object.freeze({ loose: true });
|
|
804
|
-
var emptyOpts = Object.freeze({});
|
|
805
|
-
var parseOptions = (options) => {
|
|
806
|
-
if (!options) return emptyOpts;
|
|
807
|
-
if (typeof options !== "object") return looseOption;
|
|
808
|
-
return options;
|
|
809
|
-
};
|
|
810
|
-
module.exports = parseOptions;
|
|
811
|
-
}));
|
|
812
|
-
//#endregion
|
|
813
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/identifiers.js
|
|
814
|
-
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
815
|
-
var numeric = /^[0-9]+$/;
|
|
816
|
-
var compareIdentifiers = (a, b) => {
|
|
817
|
-
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
818
|
-
const anum = numeric.test(a);
|
|
819
|
-
const bnum = numeric.test(b);
|
|
820
|
-
if (anum && bnum) {
|
|
821
|
-
a = +a;
|
|
822
|
-
b = +b;
|
|
823
|
-
}
|
|
824
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
825
|
-
};
|
|
826
|
-
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
827
|
-
module.exports = {
|
|
828
|
-
compareIdentifiers,
|
|
829
|
-
rcompareIdentifiers
|
|
830
|
-
};
|
|
831
|
-
}));
|
|
832
|
-
//#endregion
|
|
833
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/semver.js
|
|
834
|
-
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
835
|
-
var debug = require_debug();
|
|
836
|
-
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
837
|
-
var { safeRe: re, t } = require_re();
|
|
838
|
-
var parseOptions = require_parse_options();
|
|
839
|
-
var { compareIdentifiers } = require_identifiers();
|
|
840
|
-
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
841
|
-
const identifiers = identifier.split(".");
|
|
842
|
-
if (identifiers.length > prerelease.length) return false;
|
|
843
|
-
for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
|
|
844
|
-
return true;
|
|
845
|
-
};
|
|
846
|
-
module.exports = class SemVer {
|
|
847
|
-
constructor(version, options) {
|
|
848
|
-
options = parseOptions(options);
|
|
849
|
-
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
850
|
-
else version = version.version;
|
|
851
|
-
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
852
|
-
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
853
|
-
debug("SemVer", version, options);
|
|
854
|
-
this.options = options;
|
|
855
|
-
this.loose = !!options.loose;
|
|
856
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
857
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
858
|
-
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
859
|
-
this.raw = version;
|
|
860
|
-
this.major = +m[1];
|
|
861
|
-
this.minor = +m[2];
|
|
862
|
-
this.patch = +m[3];
|
|
863
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
864
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
865
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
866
|
-
if (!m[4]) this.prerelease = [];
|
|
867
|
-
else this.prerelease = m[4].split(".").map((id) => {
|
|
868
|
-
if (/^[0-9]+$/.test(id)) {
|
|
869
|
-
const num = +id;
|
|
870
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
871
|
-
}
|
|
872
|
-
return id;
|
|
873
|
-
});
|
|
874
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
875
|
-
this.format();
|
|
876
|
-
}
|
|
877
|
-
format() {
|
|
878
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
879
|
-
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
880
|
-
return this.version;
|
|
881
|
-
}
|
|
882
|
-
toString() {
|
|
883
|
-
return this.version;
|
|
884
|
-
}
|
|
885
|
-
compare(other) {
|
|
886
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
887
|
-
if (!(other instanceof SemVer)) {
|
|
888
|
-
if (typeof other === "string" && other === this.version) return 0;
|
|
889
|
-
other = new SemVer(other, this.options);
|
|
890
|
-
}
|
|
891
|
-
if (other.version === this.version) return 0;
|
|
892
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
893
|
-
}
|
|
894
|
-
compareMain(other) {
|
|
895
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
896
|
-
if (this.major < other.major) return -1;
|
|
897
|
-
if (this.major > other.major) return 1;
|
|
898
|
-
if (this.minor < other.minor) return -1;
|
|
899
|
-
if (this.minor > other.minor) return 1;
|
|
900
|
-
if (this.patch < other.patch) return -1;
|
|
901
|
-
if (this.patch > other.patch) return 1;
|
|
902
|
-
return 0;
|
|
903
|
-
}
|
|
904
|
-
comparePre(other) {
|
|
905
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
906
|
-
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
907
|
-
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
908
|
-
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
909
|
-
let i = 0;
|
|
910
|
-
do {
|
|
911
|
-
const a = this.prerelease[i];
|
|
912
|
-
const b = other.prerelease[i];
|
|
913
|
-
debug("prerelease compare", i, a, b);
|
|
914
|
-
if (a === void 0 && b === void 0) return 0;
|
|
915
|
-
else if (b === void 0) return 1;
|
|
916
|
-
else if (a === void 0) return -1;
|
|
917
|
-
else if (a === b) continue;
|
|
918
|
-
else return compareIdentifiers(a, b);
|
|
919
|
-
} while (++i);
|
|
920
|
-
}
|
|
921
|
-
compareBuild(other) {
|
|
922
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
923
|
-
let i = 0;
|
|
924
|
-
do {
|
|
925
|
-
const a = this.build[i];
|
|
926
|
-
const b = other.build[i];
|
|
927
|
-
debug("build compare", i, a, b);
|
|
928
|
-
if (a === void 0 && b === void 0) return 0;
|
|
929
|
-
else if (b === void 0) return 1;
|
|
930
|
-
else if (a === void 0) return -1;
|
|
931
|
-
else if (a === b) continue;
|
|
932
|
-
else return compareIdentifiers(a, b);
|
|
933
|
-
} while (++i);
|
|
934
|
-
}
|
|
935
|
-
inc(release, identifier, identifierBase) {
|
|
936
|
-
if (release.startsWith("pre")) {
|
|
937
|
-
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
938
|
-
if (identifier) {
|
|
939
|
-
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
940
|
-
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
switch (release) {
|
|
944
|
-
case "premajor":
|
|
945
|
-
this.prerelease.length = 0;
|
|
946
|
-
this.patch = 0;
|
|
947
|
-
this.minor = 0;
|
|
948
|
-
this.major++;
|
|
949
|
-
this.inc("pre", identifier, identifierBase);
|
|
950
|
-
break;
|
|
951
|
-
case "preminor":
|
|
952
|
-
this.prerelease.length = 0;
|
|
953
|
-
this.patch = 0;
|
|
954
|
-
this.minor++;
|
|
955
|
-
this.inc("pre", identifier, identifierBase);
|
|
956
|
-
break;
|
|
957
|
-
case "prepatch":
|
|
958
|
-
this.prerelease.length = 0;
|
|
959
|
-
this.inc("patch", identifier, identifierBase);
|
|
960
|
-
this.inc("pre", identifier, identifierBase);
|
|
961
|
-
break;
|
|
962
|
-
case "prerelease":
|
|
963
|
-
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
964
|
-
this.inc("pre", identifier, identifierBase);
|
|
965
|
-
break;
|
|
966
|
-
case "release":
|
|
967
|
-
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
968
|
-
this.prerelease.length = 0;
|
|
969
|
-
break;
|
|
970
|
-
case "major":
|
|
971
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
972
|
-
this.minor = 0;
|
|
973
|
-
this.patch = 0;
|
|
974
|
-
this.prerelease = [];
|
|
975
|
-
break;
|
|
976
|
-
case "minor":
|
|
977
|
-
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
978
|
-
this.patch = 0;
|
|
979
|
-
this.prerelease = [];
|
|
980
|
-
break;
|
|
981
|
-
case "patch":
|
|
982
|
-
if (this.prerelease.length === 0) this.patch++;
|
|
983
|
-
this.prerelease = [];
|
|
984
|
-
break;
|
|
985
|
-
case "pre": {
|
|
986
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
987
|
-
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
988
|
-
else {
|
|
989
|
-
let i = this.prerelease.length;
|
|
990
|
-
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
991
|
-
this.prerelease[i]++;
|
|
992
|
-
i = -2;
|
|
993
|
-
}
|
|
994
|
-
if (i === -1) {
|
|
995
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
996
|
-
this.prerelease.push(base);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
if (identifier) {
|
|
1000
|
-
let prerelease = [identifier, base];
|
|
1001
|
-
if (identifierBase === false) prerelease = [identifier];
|
|
1002
|
-
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
1003
|
-
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
1004
|
-
if (isNaN(prereleaseBase)) this.prerelease = prerelease;
|
|
1005
|
-
} else this.prerelease = prerelease;
|
|
1006
|
-
}
|
|
1007
|
-
break;
|
|
1008
|
-
}
|
|
1009
|
-
default: throw new Error(`invalid increment argument: ${release}`);
|
|
1010
|
-
}
|
|
1011
|
-
this.raw = this.format();
|
|
1012
|
-
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
1013
|
-
return this;
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
}));
|
|
1017
|
-
//#endregion
|
|
1018
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/parse.js
|
|
1019
|
-
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1020
|
-
var SemVer = require_semver$1();
|
|
1021
|
-
var parse = (version, options, throwErrors = false) => {
|
|
1022
|
-
if (version instanceof SemVer) return version;
|
|
1023
|
-
try {
|
|
1024
|
-
return new SemVer(version, options);
|
|
1025
|
-
} catch (er) {
|
|
1026
|
-
if (!throwErrors) return null;
|
|
1027
|
-
throw er;
|
|
1028
|
-
}
|
|
1029
|
-
};
|
|
1030
|
-
module.exports = parse;
|
|
1031
|
-
}));
|
|
1032
|
-
//#endregion
|
|
1033
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/valid.js
|
|
1034
|
-
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1035
|
-
var parse = require_parse();
|
|
1036
|
-
var valid = (version, options) => {
|
|
1037
|
-
const v = parse(version, options);
|
|
1038
|
-
return v ? v.version : null;
|
|
1039
|
-
};
|
|
1040
|
-
module.exports = valid;
|
|
1041
|
-
}));
|
|
1042
|
-
//#endregion
|
|
1043
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/clean.js
|
|
1044
|
-
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1045
|
-
var parse = require_parse();
|
|
1046
|
-
var clean = (version, options) => {
|
|
1047
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
1048
|
-
return s ? s.version : null;
|
|
1049
|
-
};
|
|
1050
|
-
module.exports = clean;
|
|
1051
|
-
}));
|
|
1052
|
-
//#endregion
|
|
1053
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/inc.js
|
|
1054
|
-
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1055
|
-
var SemVer = require_semver$1();
|
|
1056
|
-
var inc = (version, release, options, identifier, identifierBase) => {
|
|
1057
|
-
if (typeof options === "string") {
|
|
1058
|
-
identifierBase = identifier;
|
|
1059
|
-
identifier = options;
|
|
1060
|
-
options = void 0;
|
|
1061
|
-
}
|
|
1062
|
-
try {
|
|
1063
|
-
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
1064
|
-
} catch (er) {
|
|
1065
|
-
return null;
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1068
|
-
module.exports = inc;
|
|
1069
|
-
}));
|
|
1070
|
-
//#endregion
|
|
1071
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/diff.js
|
|
1072
|
-
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1073
|
-
var parse = require_parse();
|
|
1074
|
-
var diff = (version1, version2) => {
|
|
1075
|
-
const v1 = parse(version1, null, true);
|
|
1076
|
-
const v2 = parse(version2, null, true);
|
|
1077
|
-
const comparison = v1.compare(v2);
|
|
1078
|
-
if (comparison === 0) return null;
|
|
1079
|
-
const v1Higher = comparison > 0;
|
|
1080
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
1081
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
1082
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
1083
|
-
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
1084
|
-
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
1085
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
1086
|
-
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
1087
|
-
return "patch";
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
const prefix = highHasPre ? "pre" : "";
|
|
1091
|
-
if (v1.major !== v2.major) return prefix + "major";
|
|
1092
|
-
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
1093
|
-
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
1094
|
-
return "prerelease";
|
|
1095
|
-
};
|
|
1096
|
-
module.exports = diff;
|
|
1097
|
-
}));
|
|
1098
|
-
//#endregion
|
|
1099
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/major.js
|
|
1100
|
-
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1101
|
-
var SemVer = require_semver$1();
|
|
1102
|
-
var major = (a, loose) => new SemVer(a, loose).major;
|
|
1103
|
-
module.exports = major;
|
|
1104
|
-
}));
|
|
1105
|
-
//#endregion
|
|
1106
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/minor.js
|
|
1107
|
-
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1108
|
-
var SemVer = require_semver$1();
|
|
1109
|
-
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
1110
|
-
module.exports = minor;
|
|
1111
|
-
}));
|
|
1112
|
-
//#endregion
|
|
1113
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/patch.js
|
|
1114
|
-
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1115
|
-
var SemVer = require_semver$1();
|
|
1116
|
-
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
1117
|
-
module.exports = patch;
|
|
1118
|
-
}));
|
|
1119
|
-
//#endregion
|
|
1120
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/prerelease.js
|
|
1121
|
-
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1122
|
-
var parse = require_parse();
|
|
1123
|
-
var prerelease = (version, options) => {
|
|
1124
|
-
const parsed = parse(version, options);
|
|
1125
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
1126
|
-
};
|
|
1127
|
-
module.exports = prerelease;
|
|
1128
|
-
}));
|
|
1129
|
-
//#endregion
|
|
1130
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare.js
|
|
1131
|
-
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1132
|
-
var SemVer = require_semver$1();
|
|
1133
|
-
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
1134
|
-
module.exports = compare;
|
|
1135
|
-
}));
|
|
1136
|
-
//#endregion
|
|
1137
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rcompare.js
|
|
1138
|
-
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1139
|
-
var compare = require_compare();
|
|
1140
|
-
var rcompare = (a, b, loose) => compare(b, a, loose);
|
|
1141
|
-
module.exports = rcompare;
|
|
1142
|
-
}));
|
|
1143
|
-
//#endregion
|
|
1144
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-loose.js
|
|
1145
|
-
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1146
|
-
var compare = require_compare();
|
|
1147
|
-
var compareLoose = (a, b) => compare(a, b, true);
|
|
1148
|
-
module.exports = compareLoose;
|
|
1149
|
-
}));
|
|
1150
|
-
//#endregion
|
|
1151
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/compare-build.js
|
|
1152
|
-
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1153
|
-
var SemVer = require_semver$1();
|
|
1154
|
-
var compareBuild = (a, b, loose) => {
|
|
1155
|
-
const versionA = new SemVer(a, loose);
|
|
1156
|
-
const versionB = new SemVer(b, loose);
|
|
1157
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
1158
|
-
};
|
|
1159
|
-
module.exports = compareBuild;
|
|
1160
|
-
}));
|
|
1161
|
-
//#endregion
|
|
1162
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/sort.js
|
|
1163
|
-
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1164
|
-
var compareBuild = require_compare_build();
|
|
1165
|
-
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
1166
|
-
module.exports = sort;
|
|
1167
|
-
}));
|
|
1168
|
-
//#endregion
|
|
1169
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/rsort.js
|
|
1170
|
-
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1171
|
-
var compareBuild = require_compare_build();
|
|
1172
|
-
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
1173
|
-
module.exports = rsort;
|
|
1174
|
-
}));
|
|
1175
|
-
//#endregion
|
|
1176
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gt.js
|
|
1177
|
-
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1178
|
-
var compare = require_compare();
|
|
1179
|
-
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
1180
|
-
module.exports = gt;
|
|
1181
|
-
}));
|
|
1182
|
-
//#endregion
|
|
1183
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lt.js
|
|
1184
|
-
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1185
|
-
var compare = require_compare();
|
|
1186
|
-
var lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
1187
|
-
module.exports = lt;
|
|
1188
|
-
}));
|
|
1189
|
-
//#endregion
|
|
1190
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/eq.js
|
|
1191
|
-
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1192
|
-
var compare = require_compare();
|
|
1193
|
-
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
1194
|
-
module.exports = eq;
|
|
1195
|
-
}));
|
|
1196
|
-
//#endregion
|
|
1197
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/neq.js
|
|
1198
|
-
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1199
|
-
var compare = require_compare();
|
|
1200
|
-
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
1201
|
-
module.exports = neq;
|
|
1202
|
-
}));
|
|
1203
|
-
//#endregion
|
|
1204
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/gte.js
|
|
1205
|
-
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1206
|
-
var compare = require_compare();
|
|
1207
|
-
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
1208
|
-
module.exports = gte;
|
|
1209
|
-
}));
|
|
1210
|
-
//#endregion
|
|
1211
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/lte.js
|
|
1212
|
-
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1213
|
-
var compare = require_compare();
|
|
1214
|
-
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
1215
|
-
module.exports = lte;
|
|
1216
|
-
}));
|
|
1217
|
-
//#endregion
|
|
1218
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/cmp.js
|
|
1219
|
-
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1220
|
-
var eq = require_eq();
|
|
1221
|
-
var neq = require_neq();
|
|
1222
|
-
var gt = require_gt();
|
|
1223
|
-
var gte = require_gte();
|
|
1224
|
-
var lt = require_lt();
|
|
1225
|
-
var lte = require_lte();
|
|
1226
|
-
var cmp = (a, op, b, loose) => {
|
|
1227
|
-
switch (op) {
|
|
1228
|
-
case "===":
|
|
1229
|
-
if (typeof a === "object") a = a.version;
|
|
1230
|
-
if (typeof b === "object") b = b.version;
|
|
1231
|
-
return a === b;
|
|
1232
|
-
case "!==":
|
|
1233
|
-
if (typeof a === "object") a = a.version;
|
|
1234
|
-
if (typeof b === "object") b = b.version;
|
|
1235
|
-
return a !== b;
|
|
1236
|
-
case "":
|
|
1237
|
-
case "=":
|
|
1238
|
-
case "==": return eq(a, b, loose);
|
|
1239
|
-
case "!=": return neq(a, b, loose);
|
|
1240
|
-
case ">": return gt(a, b, loose);
|
|
1241
|
-
case ">=": return gte(a, b, loose);
|
|
1242
|
-
case "<": return lt(a, b, loose);
|
|
1243
|
-
case "<=": return lte(a, b, loose);
|
|
1244
|
-
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
1245
|
-
}
|
|
1246
|
-
};
|
|
1247
|
-
module.exports = cmp;
|
|
1248
|
-
}));
|
|
1249
|
-
//#endregion
|
|
1250
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/coerce.js
|
|
1251
|
-
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1252
|
-
var SemVer = require_semver$1();
|
|
1253
|
-
var parse = require_parse();
|
|
1254
|
-
var { safeRe: re, t } = require_re();
|
|
1255
|
-
var coerce = (version, options) => {
|
|
1256
|
-
if (version instanceof SemVer) return version;
|
|
1257
|
-
if (typeof version === "number") version = String(version);
|
|
1258
|
-
if (typeof version !== "string") return null;
|
|
1259
|
-
options = options || {};
|
|
1260
|
-
let match = null;
|
|
1261
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
1262
|
-
else {
|
|
1263
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
1264
|
-
let next;
|
|
1265
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
1266
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
1267
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
1268
|
-
}
|
|
1269
|
-
coerceRtlRegex.lastIndex = -1;
|
|
1270
|
-
}
|
|
1271
|
-
if (match === null) return null;
|
|
1272
|
-
const major = match[2];
|
|
1273
|
-
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
1274
|
-
};
|
|
1275
|
-
module.exports = coerce;
|
|
1276
|
-
}));
|
|
1277
|
-
//#endregion
|
|
1278
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/truncate.js
|
|
1279
|
-
var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1280
|
-
var parse = require_parse();
|
|
1281
|
-
var constants = require_constants();
|
|
1282
|
-
var SemVer = require_semver$1();
|
|
1283
|
-
var truncate = (version, truncation, options) => {
|
|
1284
|
-
if (!constants.RELEASE_TYPES.includes(truncation)) return null;
|
|
1285
|
-
const clonedVersion = cloneInputVersion(version, options);
|
|
1286
|
-
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
1287
|
-
};
|
|
1288
|
-
var cloneInputVersion = (version, options) => {
|
|
1289
|
-
return parse(version instanceof SemVer ? version.version : version, options);
|
|
1290
|
-
};
|
|
1291
|
-
var doTruncation = (version, truncation) => {
|
|
1292
|
-
if (isPrerelease(truncation)) return version.version;
|
|
1293
|
-
version.prerelease = [];
|
|
1294
|
-
switch (truncation) {
|
|
1295
|
-
case "major":
|
|
1296
|
-
version.minor = 0;
|
|
1297
|
-
version.patch = 0;
|
|
1298
|
-
break;
|
|
1299
|
-
case "minor":
|
|
1300
|
-
version.patch = 0;
|
|
1301
|
-
break;
|
|
1302
|
-
}
|
|
1303
|
-
return version.format();
|
|
1304
|
-
};
|
|
1305
|
-
var isPrerelease = (type) => {
|
|
1306
|
-
return type.startsWith("pre");
|
|
1307
|
-
};
|
|
1308
|
-
module.exports = truncate;
|
|
1309
|
-
}));
|
|
1310
|
-
//#endregion
|
|
1311
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/internal/lrucache.js
|
|
1312
|
-
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1313
|
-
var LRUCache = class {
|
|
1314
|
-
constructor() {
|
|
1315
|
-
this.max = 1e3;
|
|
1316
|
-
this.map = /* @__PURE__ */ new Map();
|
|
1317
|
-
}
|
|
1318
|
-
get(key) {
|
|
1319
|
-
const value = this.map.get(key);
|
|
1320
|
-
if (value === void 0) return;
|
|
1321
|
-
else {
|
|
1322
|
-
this.map.delete(key);
|
|
1323
|
-
this.map.set(key, value);
|
|
1324
|
-
return value;
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
delete(key) {
|
|
1328
|
-
return this.map.delete(key);
|
|
1329
|
-
}
|
|
1330
|
-
set(key, value) {
|
|
1331
|
-
if (!this.delete(key) && value !== void 0) {
|
|
1332
|
-
if (this.map.size >= this.max) {
|
|
1333
|
-
const firstKey = this.map.keys().next().value;
|
|
1334
|
-
this.delete(firstKey);
|
|
1335
|
-
}
|
|
1336
|
-
this.map.set(key, value);
|
|
1337
|
-
}
|
|
1338
|
-
return this;
|
|
1339
|
-
}
|
|
1340
|
-
};
|
|
1341
|
-
module.exports = LRUCache;
|
|
1342
|
-
}));
|
|
1343
|
-
//#endregion
|
|
1344
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/range.js
|
|
1345
|
-
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1346
|
-
var SPACE_CHARACTERS = /\s+/g;
|
|
1347
|
-
module.exports = class Range {
|
|
1348
|
-
constructor(range, options) {
|
|
1349
|
-
options = parseOptions(options);
|
|
1350
|
-
if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
1351
|
-
else return new Range(range.raw, options);
|
|
1352
|
-
if (range instanceof Comparator) {
|
|
1353
|
-
this.raw = range.value;
|
|
1354
|
-
this.set = [[range]];
|
|
1355
|
-
this.formatted = void 0;
|
|
1356
|
-
return this;
|
|
1357
|
-
}
|
|
1358
|
-
this.options = options;
|
|
1359
|
-
this.loose = !!options.loose;
|
|
1360
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
1361
|
-
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
1362
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
1363
|
-
if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
1364
|
-
if (this.set.length > 1) {
|
|
1365
|
-
const first = this.set[0];
|
|
1366
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
1367
|
-
if (this.set.length === 0) this.set = [first];
|
|
1368
|
-
else if (this.set.length > 1) {
|
|
1369
|
-
for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
|
|
1370
|
-
this.set = [c];
|
|
1371
|
-
break;
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
this.formatted = void 0;
|
|
1376
|
-
}
|
|
1377
|
-
get range() {
|
|
1378
|
-
if (this.formatted === void 0) {
|
|
1379
|
-
this.formatted = "";
|
|
1380
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
1381
|
-
if (i > 0) this.formatted += "||";
|
|
1382
|
-
const comps = this.set[i];
|
|
1383
|
-
for (let k = 0; k < comps.length; k++) {
|
|
1384
|
-
if (k > 0) this.formatted += " ";
|
|
1385
|
-
this.formatted += comps[k].toString().trim();
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
return this.formatted;
|
|
1390
|
-
}
|
|
1391
|
-
format() {
|
|
1392
|
-
return this.range;
|
|
1393
|
-
}
|
|
1394
|
-
toString() {
|
|
1395
|
-
return this.range;
|
|
1396
|
-
}
|
|
1397
|
-
parseRange(range) {
|
|
1398
|
-
range = range.replace(BUILDSTRIPRE, "");
|
|
1399
|
-
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
|
|
1400
|
-
const cached = cache.get(memoKey);
|
|
1401
|
-
if (cached) return cached;
|
|
1402
|
-
const loose = this.options.loose;
|
|
1403
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
1404
|
-
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
1405
|
-
debug("hyphen replace", range);
|
|
1406
|
-
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
1407
|
-
debug("comparator trim", range);
|
|
1408
|
-
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
1409
|
-
debug("tilde trim", range);
|
|
1410
|
-
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
1411
|
-
debug("caret trim", range);
|
|
1412
|
-
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
1413
|
-
if (loose) rangeList = rangeList.filter((comp) => {
|
|
1414
|
-
debug("loose invalid filter", comp, this.options);
|
|
1415
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
1416
|
-
});
|
|
1417
|
-
debug("range list", rangeList);
|
|
1418
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
1419
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
1420
|
-
for (const comp of comparators) {
|
|
1421
|
-
if (isNullSet(comp)) return [comp];
|
|
1422
|
-
rangeMap.set(comp.value, comp);
|
|
1423
|
-
}
|
|
1424
|
-
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
1425
|
-
const result = [...rangeMap.values()];
|
|
1426
|
-
cache.set(memoKey, result);
|
|
1427
|
-
return result;
|
|
1428
|
-
}
|
|
1429
|
-
intersects(range, options) {
|
|
1430
|
-
if (!(range instanceof Range)) throw new TypeError("a Range is required");
|
|
1431
|
-
return this.set.some((thisComparators) => {
|
|
1432
|
-
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
1433
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
1434
|
-
return rangeComparators.every((rangeComparator) => {
|
|
1435
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
1436
|
-
});
|
|
1437
|
-
});
|
|
1438
|
-
});
|
|
1439
|
-
});
|
|
1440
|
-
}
|
|
1441
|
-
test(version) {
|
|
1442
|
-
if (!version) return false;
|
|
1443
|
-
if (typeof version === "string") try {
|
|
1444
|
-
version = new SemVer(version, this.options);
|
|
1445
|
-
} catch (er) {
|
|
1446
|
-
return false;
|
|
1447
|
-
}
|
|
1448
|
-
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
|
|
1449
|
-
return false;
|
|
1450
|
-
}
|
|
1451
|
-
};
|
|
1452
|
-
var cache = new (require_lrucache())();
|
|
1453
|
-
var parseOptions = require_parse_options();
|
|
1454
|
-
var Comparator = require_comparator();
|
|
1455
|
-
var debug = require_debug();
|
|
1456
|
-
var SemVer = require_semver$1();
|
|
1457
|
-
var { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
1458
|
-
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
1459
|
-
var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
1460
|
-
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
1461
|
-
var isAny = (c) => c.value === "";
|
|
1462
|
-
var isSatisfiable = (comparators, options) => {
|
|
1463
|
-
let result = true;
|
|
1464
|
-
const remainingComparators = comparators.slice();
|
|
1465
|
-
let testComparator = remainingComparators.pop();
|
|
1466
|
-
while (result && remainingComparators.length) {
|
|
1467
|
-
result = remainingComparators.every((otherComparator) => {
|
|
1468
|
-
return testComparator.intersects(otherComparator, options);
|
|
1469
|
-
});
|
|
1470
|
-
testComparator = remainingComparators.pop();
|
|
1471
|
-
}
|
|
1472
|
-
return result;
|
|
1473
|
-
};
|
|
1474
|
-
var parseComparator = (comp, options) => {
|
|
1475
|
-
comp = comp.replace(re[t.BUILD], "");
|
|
1476
|
-
debug("comp", comp, options);
|
|
1477
|
-
comp = replaceCarets(comp, options);
|
|
1478
|
-
debug("caret", comp);
|
|
1479
|
-
comp = replaceTildes(comp, options);
|
|
1480
|
-
debug("tildes", comp);
|
|
1481
|
-
comp = replaceXRanges(comp, options);
|
|
1482
|
-
debug("xrange", comp);
|
|
1483
|
-
comp = replaceStars(comp, options);
|
|
1484
|
-
debug("stars", comp);
|
|
1485
|
-
return comp;
|
|
1486
|
-
};
|
|
1487
|
-
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
1488
|
-
var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
1489
|
-
var replaceTildes = (comp, options) => {
|
|
1490
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
1491
|
-
};
|
|
1492
|
-
var replaceTilde = (comp, options) => {
|
|
1493
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
1494
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1495
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
1496
|
-
let ret;
|
|
1497
|
-
if (isX(M)) ret = "";
|
|
1498
|
-
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
1499
|
-
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
1500
|
-
else if (pr) {
|
|
1501
|
-
debug("replaceTilde pr", pr);
|
|
1502
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1503
|
-
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
1504
|
-
debug("tilde return", ret);
|
|
1505
|
-
return ret;
|
|
1506
|
-
});
|
|
1507
|
-
};
|
|
1508
|
-
var replaceCarets = (comp, options) => {
|
|
1509
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
1510
|
-
};
|
|
1511
|
-
var replaceCaret = (comp, options) => {
|
|
1512
|
-
debug("caret", comp, options);
|
|
1513
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
1514
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
1515
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
1516
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
1517
|
-
let ret;
|
|
1518
|
-
if (isX(M)) ret = "";
|
|
1519
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
1520
|
-
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
1521
|
-
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
1522
|
-
else if (pr) {
|
|
1523
|
-
debug("replaceCaret pr", pr);
|
|
1524
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
1525
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
1526
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
1527
|
-
} else {
|
|
1528
|
-
debug("no pr");
|
|
1529
|
-
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
1530
|
-
else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
1531
|
-
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
1532
|
-
}
|
|
1533
|
-
debug("caret return", ret);
|
|
1534
|
-
return ret;
|
|
1535
|
-
});
|
|
1536
|
-
};
|
|
1537
|
-
var replaceXRanges = (comp, options) => {
|
|
1538
|
-
debug("replaceXRanges", comp, options);
|
|
1539
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
1540
|
-
};
|
|
1541
|
-
var replaceXRange = (comp, options) => {
|
|
1542
|
-
comp = comp.trim();
|
|
1543
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
1544
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
1545
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
1546
|
-
if (invalidXRangeOrder(M, m, p)) return comp;
|
|
1547
|
-
const xM = isX(M);
|
|
1548
|
-
const xm = xM || isX(m);
|
|
1549
|
-
const xp = xm || isX(p);
|
|
1550
|
-
const anyX = xp;
|
|
1551
|
-
if (gtlt === "=" && anyX) gtlt = "";
|
|
1552
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
1553
|
-
if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
1554
|
-
else ret = "*";
|
|
1555
|
-
else if (gtlt && anyX) {
|
|
1556
|
-
if (xm) m = 0;
|
|
1557
|
-
p = 0;
|
|
1558
|
-
if (gtlt === ">") {
|
|
1559
|
-
gtlt = ">=";
|
|
1560
|
-
if (xm) {
|
|
1561
|
-
M = +M + 1;
|
|
1562
|
-
m = 0;
|
|
1563
|
-
p = 0;
|
|
1564
|
-
} else {
|
|
1565
|
-
m = +m + 1;
|
|
1566
|
-
p = 0;
|
|
1567
|
-
}
|
|
1568
|
-
} else if (gtlt === "<=") {
|
|
1569
|
-
gtlt = "<";
|
|
1570
|
-
if (xm) M = +M + 1;
|
|
1571
|
-
else m = +m + 1;
|
|
1572
|
-
}
|
|
1573
|
-
if (gtlt === "<") pr = "-0";
|
|
1574
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
1575
|
-
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
1576
|
-
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
1577
|
-
debug("xRange return", ret);
|
|
1578
|
-
return ret;
|
|
1579
|
-
});
|
|
1580
|
-
};
|
|
1581
|
-
var replaceStars = (comp, options) => {
|
|
1582
|
-
debug("replaceStars", comp, options);
|
|
1583
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
1584
|
-
};
|
|
1585
|
-
var replaceGTE0 = (comp, options) => {
|
|
1586
|
-
debug("replaceGTE0", comp, options);
|
|
1587
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
1588
|
-
};
|
|
1589
|
-
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
1590
|
-
if (isX(fM)) from = "";
|
|
1591
|
-
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
1592
|
-
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
1593
|
-
else if (fpr) from = `>=${from}`;
|
|
1594
|
-
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
1595
|
-
if (isX(tM)) to = "";
|
|
1596
|
-
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
1597
|
-
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
1598
|
-
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
1599
|
-
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
1600
|
-
else to = `<=${to}`;
|
|
1601
|
-
return `${from} ${to}`.trim();
|
|
1602
|
-
};
|
|
1603
|
-
var testSet = (set, version, options) => {
|
|
1604
|
-
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
1605
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
1606
|
-
for (let i = 0; i < set.length; i++) {
|
|
1607
|
-
debug(set[i].semver);
|
|
1608
|
-
if (set[i].semver === Comparator.ANY) continue;
|
|
1609
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
1610
|
-
const allowed = set[i].semver;
|
|
1611
|
-
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
return false;
|
|
1615
|
-
}
|
|
1616
|
-
return true;
|
|
1617
|
-
};
|
|
1618
|
-
}));
|
|
1619
|
-
//#endregion
|
|
1620
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/classes/comparator.js
|
|
1621
|
-
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1622
|
-
var ANY = Symbol("SemVer ANY");
|
|
1623
|
-
module.exports = class Comparator {
|
|
1624
|
-
static get ANY() {
|
|
1625
|
-
return ANY;
|
|
1626
|
-
}
|
|
1627
|
-
constructor(comp, options) {
|
|
1628
|
-
options = parseOptions(options);
|
|
1629
|
-
if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
|
|
1630
|
-
else comp = comp.value;
|
|
1631
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
1632
|
-
debug("comparator", comp, options);
|
|
1633
|
-
this.options = options;
|
|
1634
|
-
this.loose = !!options.loose;
|
|
1635
|
-
this.parse(comp);
|
|
1636
|
-
if (this.semver === ANY) this.value = "";
|
|
1637
|
-
else this.value = this.operator + this.semver.version;
|
|
1638
|
-
debug("comp", this);
|
|
1639
|
-
}
|
|
1640
|
-
parse(comp) {
|
|
1641
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
1642
|
-
const m = comp.match(r);
|
|
1643
|
-
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
1644
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
1645
|
-
if (this.operator === "=") this.operator = "";
|
|
1646
|
-
if (!m[2]) this.semver = ANY;
|
|
1647
|
-
else this.semver = new SemVer(m[2], this.options.loose);
|
|
1648
|
-
}
|
|
1649
|
-
toString() {
|
|
1650
|
-
return this.value;
|
|
1651
|
-
}
|
|
1652
|
-
test(version) {
|
|
1653
|
-
debug("Comparator.test", version, this.options.loose);
|
|
1654
|
-
if (this.semver === ANY || version === ANY) return true;
|
|
1655
|
-
if (typeof version === "string") try {
|
|
1656
|
-
version = new SemVer(version, this.options);
|
|
1657
|
-
} catch (er) {
|
|
1658
|
-
return false;
|
|
1659
|
-
}
|
|
1660
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
1661
|
-
}
|
|
1662
|
-
intersects(comp, options) {
|
|
1663
|
-
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
1664
|
-
if (this.operator === "") {
|
|
1665
|
-
if (this.value === "") return true;
|
|
1666
|
-
return new Range(comp.value, options).test(this.value);
|
|
1667
|
-
} else if (comp.operator === "") {
|
|
1668
|
-
if (comp.value === "") return true;
|
|
1669
|
-
return new Range(this.value, options).test(comp.semver);
|
|
1670
|
-
}
|
|
1671
|
-
options = parseOptions(options);
|
|
1672
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
1673
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
1674
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
1675
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
1676
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
1677
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
1678
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
1679
|
-
return false;
|
|
1680
|
-
}
|
|
1681
|
-
};
|
|
1682
|
-
var parseOptions = require_parse_options();
|
|
1683
|
-
var { safeRe: re, t } = require_re();
|
|
1684
|
-
var cmp = require_cmp();
|
|
1685
|
-
var debug = require_debug();
|
|
1686
|
-
var SemVer = require_semver$1();
|
|
1687
|
-
var Range = require_range();
|
|
1688
|
-
}));
|
|
1689
|
-
//#endregion
|
|
1690
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/functions/satisfies.js
|
|
1691
|
-
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1692
|
-
var Range = require_range();
|
|
1693
|
-
var satisfies = (version, range, options) => {
|
|
1694
|
-
try {
|
|
1695
|
-
range = new Range(range, options);
|
|
1696
|
-
} catch (er) {
|
|
1697
|
-
return false;
|
|
1698
|
-
}
|
|
1699
|
-
return range.test(version);
|
|
1700
|
-
};
|
|
1701
|
-
module.exports = satisfies;
|
|
1702
|
-
}));
|
|
1703
|
-
//#endregion
|
|
1704
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/to-comparators.js
|
|
1705
|
-
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1706
|
-
var Range = require_range();
|
|
1707
|
-
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
1708
|
-
module.exports = toComparators;
|
|
1709
|
-
}));
|
|
1710
|
-
//#endregion
|
|
1711
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/max-satisfying.js
|
|
1712
|
-
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1713
|
-
var SemVer = require_semver$1();
|
|
1714
|
-
var Range = require_range();
|
|
1715
|
-
var maxSatisfying = (versions, range, options) => {
|
|
1716
|
-
let max = null;
|
|
1717
|
-
let maxSV = null;
|
|
1718
|
-
let rangeObj = null;
|
|
1719
|
-
try {
|
|
1720
|
-
rangeObj = new Range(range, options);
|
|
1721
|
-
} catch (er) {
|
|
1722
|
-
return null;
|
|
1723
|
-
}
|
|
1724
|
-
versions.forEach((v) => {
|
|
1725
|
-
if (rangeObj.test(v)) {
|
|
1726
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
1727
|
-
max = v;
|
|
1728
|
-
maxSV = new SemVer(max, options);
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
});
|
|
1732
|
-
return max;
|
|
1733
|
-
};
|
|
1734
|
-
module.exports = maxSatisfying;
|
|
1735
|
-
}));
|
|
1736
|
-
//#endregion
|
|
1737
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/min-satisfying.js
|
|
1738
|
-
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1739
|
-
var SemVer = require_semver$1();
|
|
1740
|
-
var Range = require_range();
|
|
1741
|
-
var minSatisfying = (versions, range, options) => {
|
|
1742
|
-
let min = null;
|
|
1743
|
-
let minSV = null;
|
|
1744
|
-
let rangeObj = null;
|
|
1745
|
-
try {
|
|
1746
|
-
rangeObj = new Range(range, options);
|
|
1747
|
-
} catch (er) {
|
|
1748
|
-
return null;
|
|
1749
|
-
}
|
|
1750
|
-
versions.forEach((v) => {
|
|
1751
|
-
if (rangeObj.test(v)) {
|
|
1752
|
-
if (!min || minSV.compare(v) === 1) {
|
|
1753
|
-
min = v;
|
|
1754
|
-
minSV = new SemVer(min, options);
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
});
|
|
1758
|
-
return min;
|
|
1759
|
-
};
|
|
1760
|
-
module.exports = minSatisfying;
|
|
1761
|
-
}));
|
|
1762
|
-
//#endregion
|
|
1763
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/min-version.js
|
|
1764
|
-
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1765
|
-
var SemVer = require_semver$1();
|
|
1766
|
-
var Range = require_range();
|
|
1767
|
-
var gt = require_gt();
|
|
1768
|
-
var minVersion = (range, loose) => {
|
|
1769
|
-
range = new Range(range, loose);
|
|
1770
|
-
let minver = new SemVer("0.0.0");
|
|
1771
|
-
if (range.test(minver)) return minver;
|
|
1772
|
-
minver = new SemVer("0.0.0-0");
|
|
1773
|
-
if (range.test(minver)) return minver;
|
|
1774
|
-
minver = null;
|
|
1775
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1776
|
-
const comparators = range.set[i];
|
|
1777
|
-
let setMin = null;
|
|
1778
|
-
comparators.forEach((comparator) => {
|
|
1779
|
-
const compver = new SemVer(comparator.semver.version);
|
|
1780
|
-
switch (comparator.operator) {
|
|
1781
|
-
case ">":
|
|
1782
|
-
if (compver.prerelease.length === 0) compver.patch++;
|
|
1783
|
-
else compver.prerelease.push(0);
|
|
1784
|
-
compver.raw = compver.format();
|
|
1785
|
-
case "":
|
|
1786
|
-
case ">=":
|
|
1787
|
-
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
1788
|
-
break;
|
|
1789
|
-
case "<":
|
|
1790
|
-
case "<=": break;
|
|
1791
|
-
/* istanbul ignore next */
|
|
1792
|
-
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1793
|
-
}
|
|
1794
|
-
});
|
|
1795
|
-
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
1796
|
-
}
|
|
1797
|
-
if (minver && range.test(minver)) return minver;
|
|
1798
|
-
return null;
|
|
1799
|
-
};
|
|
1800
|
-
module.exports = minVersion;
|
|
1801
|
-
}));
|
|
1802
|
-
//#endregion
|
|
1803
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/valid.js
|
|
1804
|
-
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1805
|
-
var Range = require_range();
|
|
1806
|
-
var validRange = (range, options) => {
|
|
1807
|
-
try {
|
|
1808
|
-
return new Range(range, options).range || "*";
|
|
1809
|
-
} catch (er) {
|
|
1810
|
-
return null;
|
|
1811
|
-
}
|
|
1812
|
-
};
|
|
1813
|
-
module.exports = validRange;
|
|
1814
|
-
}));
|
|
1815
|
-
//#endregion
|
|
1816
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/outside.js
|
|
1817
|
-
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1818
|
-
var SemVer = require_semver$1();
|
|
1819
|
-
var Comparator = require_comparator();
|
|
1820
|
-
var { ANY } = Comparator;
|
|
1821
|
-
var Range = require_range();
|
|
1822
|
-
var satisfies = require_satisfies();
|
|
1823
|
-
var gt = require_gt();
|
|
1824
|
-
var lt = require_lt();
|
|
1825
|
-
var lte = require_lte();
|
|
1826
|
-
var gte = require_gte();
|
|
1827
|
-
var outside = (version, range, hilo, options) => {
|
|
1828
|
-
version = new SemVer(version, options);
|
|
1829
|
-
range = new Range(range, options);
|
|
1830
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1831
|
-
switch (hilo) {
|
|
1832
|
-
case ">":
|
|
1833
|
-
gtfn = gt;
|
|
1834
|
-
ltefn = lte;
|
|
1835
|
-
ltfn = lt;
|
|
1836
|
-
comp = ">";
|
|
1837
|
-
ecomp = ">=";
|
|
1838
|
-
break;
|
|
1839
|
-
case "<":
|
|
1840
|
-
gtfn = lt;
|
|
1841
|
-
ltefn = gte;
|
|
1842
|
-
ltfn = gt;
|
|
1843
|
-
comp = "<";
|
|
1844
|
-
ecomp = "<=";
|
|
1845
|
-
break;
|
|
1846
|
-
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1847
|
-
}
|
|
1848
|
-
if (satisfies(version, range, options)) return false;
|
|
1849
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
1850
|
-
const comparators = range.set[i];
|
|
1851
|
-
let high = null;
|
|
1852
|
-
let low = null;
|
|
1853
|
-
comparators.forEach((comparator) => {
|
|
1854
|
-
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
1855
|
-
high = high || comparator;
|
|
1856
|
-
low = low || comparator;
|
|
1857
|
-
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
1858
|
-
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
1859
|
-
});
|
|
1860
|
-
if (high.operator === comp || high.operator === ecomp) return false;
|
|
1861
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
1862
|
-
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
1863
|
-
}
|
|
1864
|
-
return true;
|
|
1865
|
-
};
|
|
1866
|
-
module.exports = outside;
|
|
1867
|
-
}));
|
|
1868
|
-
//#endregion
|
|
1869
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/gtr.js
|
|
1870
|
-
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1871
|
-
var outside = require_outside();
|
|
1872
|
-
var gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1873
|
-
module.exports = gtr;
|
|
1874
|
-
}));
|
|
1875
|
-
//#endregion
|
|
1876
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/ltr.js
|
|
1877
|
-
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1878
|
-
var outside = require_outside();
|
|
1879
|
-
var ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1880
|
-
module.exports = ltr;
|
|
1881
|
-
}));
|
|
1882
|
-
//#endregion
|
|
1883
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/intersects.js
|
|
1884
|
-
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1885
|
-
var Range = require_range();
|
|
1886
|
-
var intersects = (r1, r2, options) => {
|
|
1887
|
-
r1 = new Range(r1, options);
|
|
1888
|
-
r2 = new Range(r2, options);
|
|
1889
|
-
return r1.intersects(r2, options);
|
|
1890
|
-
};
|
|
1891
|
-
module.exports = intersects;
|
|
1892
|
-
}));
|
|
1893
|
-
//#endregion
|
|
1894
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/simplify.js
|
|
1895
|
-
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1896
|
-
var satisfies = require_satisfies();
|
|
1897
|
-
var compare = require_compare();
|
|
1898
|
-
module.exports = (versions, range, options) => {
|
|
1899
|
-
const set = [];
|
|
1900
|
-
let first = null;
|
|
1901
|
-
let prev = null;
|
|
1902
|
-
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1903
|
-
for (const version of v) if (satisfies(version, range, options)) {
|
|
1904
|
-
prev = version;
|
|
1905
|
-
if (!first) first = version;
|
|
1906
|
-
} else {
|
|
1907
|
-
if (prev) set.push([first, prev]);
|
|
1908
|
-
prev = null;
|
|
1909
|
-
first = null;
|
|
1910
|
-
}
|
|
1911
|
-
if (first) set.push([first, null]);
|
|
1912
|
-
const ranges = [];
|
|
1913
|
-
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
1914
|
-
else if (!max && min === v[0]) ranges.push("*");
|
|
1915
|
-
else if (!max) ranges.push(`>=${min}`);
|
|
1916
|
-
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
1917
|
-
else ranges.push(`${min} - ${max}`);
|
|
1918
|
-
const simplified = ranges.join(" || ");
|
|
1919
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1920
|
-
return simplified.length < original.length ? simplified : range;
|
|
1921
|
-
};
|
|
1922
|
-
}));
|
|
1923
|
-
//#endregion
|
|
1924
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/ranges/subset.js
|
|
1925
|
-
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1926
|
-
var Range = require_range();
|
|
1927
|
-
var Comparator = require_comparator();
|
|
1928
|
-
var { ANY } = Comparator;
|
|
1929
|
-
var satisfies = require_satisfies();
|
|
1930
|
-
var compare = require_compare();
|
|
1931
|
-
var subset = (sub, dom, options = {}) => {
|
|
1932
|
-
if (sub === dom) return true;
|
|
1933
|
-
sub = new Range(sub, options);
|
|
1934
|
-
dom = new Range(dom, options);
|
|
1935
|
-
let sawNonNull = false;
|
|
1936
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
1937
|
-
for (const simpleDom of dom.set) {
|
|
1938
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
1939
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
1940
|
-
if (isSub) continue OUTER;
|
|
1941
|
-
}
|
|
1942
|
-
if (sawNonNull) return false;
|
|
1943
|
-
}
|
|
1944
|
-
return true;
|
|
1945
|
-
};
|
|
1946
|
-
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1947
|
-
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
1948
|
-
var simpleSubset = (sub, dom, options) => {
|
|
1949
|
-
if (sub === dom) return true;
|
|
1950
|
-
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
1951
|
-
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
1952
|
-
else sub = minimumVersion;
|
|
1953
|
-
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1954
|
-
else dom = minimumVersion;
|
|
1955
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
1956
|
-
let gt, lt;
|
|
1957
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
1958
|
-
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
1959
|
-
else eqSet.add(c.semver);
|
|
1960
|
-
if (eqSet.size > 1) return null;
|
|
1961
|
-
let gtltComp;
|
|
1962
|
-
if (gt && lt) {
|
|
1963
|
-
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1964
|
-
if (gtltComp > 0) return null;
|
|
1965
|
-
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
1966
|
-
}
|
|
1967
|
-
for (const eq of eqSet) {
|
|
1968
|
-
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
1969
|
-
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
1970
|
-
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
1971
|
-
return true;
|
|
1972
|
-
}
|
|
1973
|
-
let higher, lower;
|
|
1974
|
-
let hasDomLT, hasDomGT;
|
|
1975
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1976
|
-
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1977
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1978
|
-
for (const c of dom) {
|
|
1979
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1980
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1981
|
-
if (gt) {
|
|
1982
|
-
if (needDomGTPre) {
|
|
1983
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
1984
|
-
}
|
|
1985
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
1986
|
-
higher = higherGT(gt, c, options);
|
|
1987
|
-
if (higher === c && higher !== gt) return false;
|
|
1988
|
-
} else if (gt.operator === ">=" && !c.test(gt.semver)) return false;
|
|
1989
|
-
}
|
|
1990
|
-
if (lt) {
|
|
1991
|
-
if (needDomLTPre) {
|
|
1992
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
1993
|
-
}
|
|
1994
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
1995
|
-
lower = lowerLT(lt, c, options);
|
|
1996
|
-
if (lower === c && lower !== lt) return false;
|
|
1997
|
-
} else if (lt.operator === "<=" && !c.test(lt.semver)) return false;
|
|
1998
|
-
}
|
|
1999
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
2000
|
-
}
|
|
2001
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
2002
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
2003
|
-
if (needDomGTPre || needDomLTPre) return false;
|
|
2004
|
-
return true;
|
|
2005
|
-
};
|
|
2006
|
-
var higherGT = (a, b, options) => {
|
|
2007
|
-
if (!a) return b;
|
|
2008
|
-
const comp = compare(a.semver, b.semver, options);
|
|
2009
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
2010
|
-
};
|
|
2011
|
-
var lowerLT = (a, b, options) => {
|
|
2012
|
-
if (!a) return b;
|
|
2013
|
-
const comp = compare(a.semver, b.semver, options);
|
|
2014
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
2015
|
-
};
|
|
2016
|
-
module.exports = subset;
|
|
2017
|
-
}));
|
|
2018
|
-
//#endregion
|
|
2019
|
-
//#region ../../node_modules/.pnpm/semver@7.8.4/node_modules/semver/index.js
|
|
2020
|
-
var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2021
|
-
var internalRe = require_re();
|
|
2022
|
-
var constants = require_constants();
|
|
2023
|
-
var SemVer = require_semver$1();
|
|
2024
|
-
var identifiers = require_identifiers();
|
|
2025
|
-
module.exports = {
|
|
2026
|
-
parse: require_parse(),
|
|
2027
|
-
valid: require_valid$1(),
|
|
2028
|
-
clean: require_clean(),
|
|
2029
|
-
inc: require_inc(),
|
|
2030
|
-
diff: require_diff(),
|
|
2031
|
-
major: require_major(),
|
|
2032
|
-
minor: require_minor(),
|
|
2033
|
-
patch: require_patch(),
|
|
2034
|
-
prerelease: require_prerelease(),
|
|
2035
|
-
compare: require_compare(),
|
|
2036
|
-
rcompare: require_rcompare(),
|
|
2037
|
-
compareLoose: require_compare_loose(),
|
|
2038
|
-
compareBuild: require_compare_build(),
|
|
2039
|
-
sort: require_sort(),
|
|
2040
|
-
rsort: require_rsort(),
|
|
2041
|
-
gt: require_gt(),
|
|
2042
|
-
lt: require_lt(),
|
|
2043
|
-
eq: require_eq(),
|
|
2044
|
-
neq: require_neq(),
|
|
2045
|
-
gte: require_gte(),
|
|
2046
|
-
lte: require_lte(),
|
|
2047
|
-
cmp: require_cmp(),
|
|
2048
|
-
coerce: require_coerce(),
|
|
2049
|
-
truncate: require_truncate(),
|
|
2050
|
-
Comparator: require_comparator(),
|
|
2051
|
-
Range: require_range(),
|
|
2052
|
-
satisfies: require_satisfies(),
|
|
2053
|
-
toComparators: require_to_comparators(),
|
|
2054
|
-
maxSatisfying: require_max_satisfying(),
|
|
2055
|
-
minSatisfying: require_min_satisfying(),
|
|
2056
|
-
minVersion: require_min_version(),
|
|
2057
|
-
validRange: require_valid(),
|
|
2058
|
-
outside: require_outside(),
|
|
2059
|
-
gtr: require_gtr(),
|
|
2060
|
-
ltr: require_ltr(),
|
|
2061
|
-
intersects: require_intersects(),
|
|
2062
|
-
simplifyRange: require_simplify(),
|
|
2063
|
-
subset: require_subset(),
|
|
2064
|
-
SemVer,
|
|
2065
|
-
re: internalRe.re,
|
|
2066
|
-
src: internalRe.src,
|
|
2067
|
-
tokens: internalRe.t,
|
|
2068
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
2069
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
2070
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
2071
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
2072
|
-
};
|
|
2073
|
-
}));
|
|
2074
|
-
//#endregion
|
|
2075
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
|
|
2076
|
-
var require_asymmetricKeyDetailsSupported = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2077
|
-
module.exports = require_semver().satisfies(process.version, ">=15.7.0");
|
|
2078
|
-
}));
|
|
2079
|
-
//#endregion
|
|
2080
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
|
|
2081
|
-
var require_rsaPssKeyDetailsSupported = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2082
|
-
module.exports = require_semver().satisfies(process.version, ">=16.9.0");
|
|
2083
|
-
}));
|
|
2084
|
-
//#endregion
|
|
2085
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js
|
|
2086
|
-
var require_validateAsymmetricKey = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2087
|
-
var ASYMMETRIC_KEY_DETAILS_SUPPORTED = require_asymmetricKeyDetailsSupported();
|
|
2088
|
-
var RSA_PSS_KEY_DETAILS_SUPPORTED = require_rsaPssKeyDetailsSupported();
|
|
2089
|
-
var allowedAlgorithmsForKeys = {
|
|
2090
|
-
"ec": [
|
|
2091
|
-
"ES256",
|
|
2092
|
-
"ES384",
|
|
2093
|
-
"ES512"
|
|
2094
|
-
],
|
|
2095
|
-
"rsa": [
|
|
2096
|
-
"RS256",
|
|
2097
|
-
"PS256",
|
|
2098
|
-
"RS384",
|
|
2099
|
-
"PS384",
|
|
2100
|
-
"RS512",
|
|
2101
|
-
"PS512"
|
|
2102
|
-
],
|
|
2103
|
-
"rsa-pss": [
|
|
2104
|
-
"PS256",
|
|
2105
|
-
"PS384",
|
|
2106
|
-
"PS512"
|
|
2107
|
-
]
|
|
2108
|
-
};
|
|
2109
|
-
var allowedCurves = {
|
|
2110
|
-
ES256: "prime256v1",
|
|
2111
|
-
ES384: "secp384r1",
|
|
2112
|
-
ES512: "secp521r1"
|
|
2113
|
-
};
|
|
2114
|
-
module.exports = function(algorithm, key) {
|
|
2115
|
-
if (!algorithm || !key) return;
|
|
2116
|
-
const keyType = key.asymmetricKeyType;
|
|
2117
|
-
if (!keyType) return;
|
|
2118
|
-
const allowedAlgorithms = allowedAlgorithmsForKeys[keyType];
|
|
2119
|
-
if (!allowedAlgorithms) throw new Error(`Unknown key type "${keyType}".`);
|
|
2120
|
-
if (!allowedAlgorithms.includes(algorithm)) throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(", ")}.`);
|
|
2121
|
-
/* istanbul ignore next */
|
|
2122
|
-
if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) switch (keyType) {
|
|
2123
|
-
case "ec":
|
|
2124
|
-
const keyCurve = key.asymmetricKeyDetails.namedCurve;
|
|
2125
|
-
const allowedCurve = allowedCurves[algorithm];
|
|
2126
|
-
if (keyCurve !== allowedCurve) throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`);
|
|
2127
|
-
break;
|
|
2128
|
-
case "rsa-pss":
|
|
2129
|
-
if (RSA_PSS_KEY_DETAILS_SUPPORTED) {
|
|
2130
|
-
const length = parseInt(algorithm.slice(-3), 10);
|
|
2131
|
-
const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails;
|
|
2132
|
-
if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`);
|
|
2133
|
-
if (saltLength !== void 0 && saltLength > length >> 3) throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`);
|
|
2134
|
-
}
|
|
2135
|
-
break;
|
|
2136
|
-
}
|
|
2137
|
-
};
|
|
2138
|
-
}));
|
|
2139
|
-
//#endregion
|
|
2140
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/psSupported.js
|
|
2141
|
-
var require_psSupported = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2142
|
-
module.exports = require_semver().satisfies(process.version, "^6.12.0 || >=8.0.0");
|
|
2143
|
-
}));
|
|
2144
|
-
//#endregion
|
|
2145
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/verify.js
|
|
2146
|
-
var require_verify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2147
|
-
var JsonWebTokenError = require_JsonWebTokenError();
|
|
2148
|
-
var NotBeforeError = require_NotBeforeError();
|
|
2149
|
-
var TokenExpiredError = require_TokenExpiredError();
|
|
2150
|
-
var decode = require_decode();
|
|
2151
|
-
var timespan = require_timespan();
|
|
2152
|
-
var validateAsymmetricKey = require_validateAsymmetricKey();
|
|
2153
|
-
var PS_SUPPORTED = require_psSupported();
|
|
2154
|
-
var jws = require_jws();
|
|
2155
|
-
var { KeyObject: KeyObject$1, createSecretKey: createSecretKey$1, createPublicKey } = __require("crypto");
|
|
2156
|
-
var PUB_KEY_ALGS = [
|
|
2157
|
-
"RS256",
|
|
2158
|
-
"RS384",
|
|
2159
|
-
"RS512"
|
|
2160
|
-
];
|
|
2161
|
-
var EC_KEY_ALGS = [
|
|
2162
|
-
"ES256",
|
|
2163
|
-
"ES384",
|
|
2164
|
-
"ES512"
|
|
2165
|
-
];
|
|
2166
|
-
var RSA_KEY_ALGS = [
|
|
2167
|
-
"RS256",
|
|
2168
|
-
"RS384",
|
|
2169
|
-
"RS512"
|
|
2170
|
-
];
|
|
2171
|
-
var HS_ALGS = [
|
|
2172
|
-
"HS256",
|
|
2173
|
-
"HS384",
|
|
2174
|
-
"HS512"
|
|
2175
|
-
];
|
|
2176
|
-
if (PS_SUPPORTED) {
|
|
2177
|
-
PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, "PS256", "PS384", "PS512");
|
|
2178
|
-
RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, "PS256", "PS384", "PS512");
|
|
2179
|
-
}
|
|
2180
|
-
module.exports = function(jwtString, secretOrPublicKey, options, callback) {
|
|
2181
|
-
if (typeof options === "function" && !callback) {
|
|
2182
|
-
callback = options;
|
|
2183
|
-
options = {};
|
|
2184
|
-
}
|
|
2185
|
-
if (!options) options = {};
|
|
2186
|
-
options = Object.assign({}, options);
|
|
2187
|
-
let done;
|
|
2188
|
-
if (callback) done = callback;
|
|
2189
|
-
else done = function(err, data) {
|
|
2190
|
-
if (err) throw err;
|
|
2191
|
-
return data;
|
|
2192
|
-
};
|
|
2193
|
-
if (options.clockTimestamp && typeof options.clockTimestamp !== "number") return done(new JsonWebTokenError("clockTimestamp must be a number"));
|
|
2194
|
-
if (options.nonce !== void 0 && (typeof options.nonce !== "string" || options.nonce.trim() === "")) return done(new JsonWebTokenError("nonce must be a non-empty string"));
|
|
2195
|
-
if (options.allowInvalidAsymmetricKeyTypes !== void 0 && typeof options.allowInvalidAsymmetricKeyTypes !== "boolean") return done(new JsonWebTokenError("allowInvalidAsymmetricKeyTypes must be a boolean"));
|
|
2196
|
-
const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1e3);
|
|
2197
|
-
if (!jwtString) return done(new JsonWebTokenError("jwt must be provided"));
|
|
2198
|
-
if (typeof jwtString !== "string") return done(new JsonWebTokenError("jwt must be a string"));
|
|
2199
|
-
const parts = jwtString.split(".");
|
|
2200
|
-
if (parts.length !== 3) return done(new JsonWebTokenError("jwt malformed"));
|
|
2201
|
-
let decodedToken;
|
|
2202
|
-
try {
|
|
2203
|
-
decodedToken = decode(jwtString, { complete: true });
|
|
2204
|
-
} catch (err) {
|
|
2205
|
-
return done(err);
|
|
2206
|
-
}
|
|
2207
|
-
if (!decodedToken) return done(new JsonWebTokenError("invalid token"));
|
|
2208
|
-
const header = decodedToken.header;
|
|
2209
|
-
let getSecret;
|
|
2210
|
-
if (typeof secretOrPublicKey === "function") {
|
|
2211
|
-
if (!callback) return done(new JsonWebTokenError("verify must be called asynchronous if secret or public key is provided as a callback"));
|
|
2212
|
-
getSecret = secretOrPublicKey;
|
|
2213
|
-
} else getSecret = function(header, secretCallback) {
|
|
2214
|
-
return secretCallback(null, secretOrPublicKey);
|
|
2215
|
-
};
|
|
2216
|
-
return getSecret(header, function(err, secretOrPublicKey) {
|
|
2217
|
-
if (err) return done(new JsonWebTokenError("error in secret or public key callback: " + err.message));
|
|
2218
|
-
const hasSignature = parts[2].trim() !== "";
|
|
2219
|
-
if (!hasSignature && secretOrPublicKey) return done(new JsonWebTokenError("jwt signature is required"));
|
|
2220
|
-
if (hasSignature && !secretOrPublicKey) return done(new JsonWebTokenError("secret or public key must be provided"));
|
|
2221
|
-
if (!hasSignature && !options.algorithms) return done(new JsonWebTokenError("please specify \"none\" in \"algorithms\" to verify unsigned tokens"));
|
|
2222
|
-
if (secretOrPublicKey != null && !(secretOrPublicKey instanceof KeyObject$1)) try {
|
|
2223
|
-
secretOrPublicKey = createPublicKey(secretOrPublicKey);
|
|
2224
|
-
} catch (_) {
|
|
2225
|
-
try {
|
|
2226
|
-
secretOrPublicKey = createSecretKey$1(typeof secretOrPublicKey === "string" ? Buffer.from(secretOrPublicKey) : secretOrPublicKey);
|
|
2227
|
-
} catch (_) {
|
|
2228
|
-
return done(new JsonWebTokenError("secretOrPublicKey is not valid key material"));
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
if (!options.algorithms) if (secretOrPublicKey.type === "secret") options.algorithms = HS_ALGS;
|
|
2232
|
-
else if (["rsa", "rsa-pss"].includes(secretOrPublicKey.asymmetricKeyType)) options.algorithms = RSA_KEY_ALGS;
|
|
2233
|
-
else if (secretOrPublicKey.asymmetricKeyType === "ec") options.algorithms = EC_KEY_ALGS;
|
|
2234
|
-
else options.algorithms = PUB_KEY_ALGS;
|
|
2235
|
-
if (options.algorithms.indexOf(decodedToken.header.alg) === -1) return done(new JsonWebTokenError("invalid algorithm"));
|
|
2236
|
-
if (header.alg.startsWith("HS") && secretOrPublicKey.type !== "secret") return done(new JsonWebTokenError(`secretOrPublicKey must be a symmetric key when using ${header.alg}`));
|
|
2237
|
-
else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey.type !== "public") return done(new JsonWebTokenError(`secretOrPublicKey must be an asymmetric key when using ${header.alg}`));
|
|
2238
|
-
if (!options.allowInvalidAsymmetricKeyTypes) try {
|
|
2239
|
-
validateAsymmetricKey(header.alg, secretOrPublicKey);
|
|
2240
|
-
} catch (e) {
|
|
2241
|
-
return done(e);
|
|
2242
|
-
}
|
|
2243
|
-
let valid;
|
|
2244
|
-
try {
|
|
2245
|
-
valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey);
|
|
2246
|
-
} catch (e) {
|
|
2247
|
-
return done(e);
|
|
2248
|
-
}
|
|
2249
|
-
if (!valid) return done(new JsonWebTokenError("invalid signature"));
|
|
2250
|
-
const payload = decodedToken.payload;
|
|
2251
|
-
if (typeof payload.nbf !== "undefined" && !options.ignoreNotBefore) {
|
|
2252
|
-
if (typeof payload.nbf !== "number") return done(new JsonWebTokenError("invalid nbf value"));
|
|
2253
|
-
if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) return done(new NotBeforeError("jwt not active", /* @__PURE__ */ new Date(payload.nbf * 1e3)));
|
|
2254
|
-
}
|
|
2255
|
-
if (typeof payload.exp !== "undefined" && !options.ignoreExpiration) {
|
|
2256
|
-
if (typeof payload.exp !== "number") return done(new JsonWebTokenError("invalid exp value"));
|
|
2257
|
-
if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) return done(new TokenExpiredError("jwt expired", /* @__PURE__ */ new Date(payload.exp * 1e3)));
|
|
2258
|
-
}
|
|
2259
|
-
if (options.audience) {
|
|
2260
|
-
const audiences = Array.isArray(options.audience) ? options.audience : [options.audience];
|
|
2261
|
-
if (!(Array.isArray(payload.aud) ? payload.aud : [payload.aud]).some(function(targetAudience) {
|
|
2262
|
-
return audiences.some(function(audience) {
|
|
2263
|
-
return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience;
|
|
2264
|
-
});
|
|
2265
|
-
})) return done(new JsonWebTokenError("jwt audience invalid. expected: " + audiences.join(" or ")));
|
|
2266
|
-
}
|
|
2267
|
-
if (options.issuer) {
|
|
2268
|
-
if (typeof options.issuer === "string" && payload.iss !== options.issuer || Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1) return done(new JsonWebTokenError("jwt issuer invalid. expected: " + options.issuer));
|
|
2269
|
-
}
|
|
2270
|
-
if (options.subject) {
|
|
2271
|
-
if (payload.sub !== options.subject) return done(new JsonWebTokenError("jwt subject invalid. expected: " + options.subject));
|
|
2272
|
-
}
|
|
2273
|
-
if (options.jwtid) {
|
|
2274
|
-
if (payload.jti !== options.jwtid) return done(new JsonWebTokenError("jwt jwtid invalid. expected: " + options.jwtid));
|
|
2275
|
-
}
|
|
2276
|
-
if (options.nonce) {
|
|
2277
|
-
if (payload.nonce !== options.nonce) return done(new JsonWebTokenError("jwt nonce invalid. expected: " + options.nonce));
|
|
2278
|
-
}
|
|
2279
|
-
if (options.maxAge) {
|
|
2280
|
-
if (typeof payload.iat !== "number") return done(new JsonWebTokenError("iat required when maxAge is specified"));
|
|
2281
|
-
const maxAgeTimestamp = timespan(options.maxAge, payload.iat);
|
|
2282
|
-
if (typeof maxAgeTimestamp === "undefined") return done(new JsonWebTokenError("\"maxAge\" should be a number of seconds or string representing a timespan eg: \"1d\", \"20h\", 60"));
|
|
2283
|
-
if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) return done(new TokenExpiredError("maxAge exceeded", /* @__PURE__ */ new Date(maxAgeTimestamp * 1e3)));
|
|
2284
|
-
}
|
|
2285
|
-
if (options.complete === true) {
|
|
2286
|
-
const signature = decodedToken.signature;
|
|
2287
|
-
return done(null, {
|
|
2288
|
-
header,
|
|
2289
|
-
payload,
|
|
2290
|
-
signature
|
|
2291
|
-
});
|
|
2292
|
-
}
|
|
2293
|
-
return done(null, payload);
|
|
2294
|
-
});
|
|
2295
|
-
};
|
|
2296
|
-
}));
|
|
2297
|
-
//#endregion
|
|
2298
|
-
//#region ../../node_modules/.pnpm/lodash.includes@4.3.0/node_modules/lodash.includes/index.js
|
|
2299
|
-
var require_lodash_includes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2300
|
-
/**
|
|
2301
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
2302
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
2303
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
2304
|
-
* Released under MIT license <https://lodash.com/license>
|
|
2305
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2306
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2307
|
-
*/
|
|
2308
|
-
/** Used as references for various `Number` constants. */
|
|
2309
|
-
var INFINITY = Infinity, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = NaN;
|
|
2310
|
-
/** `Object#toString` result references. */
|
|
2311
|
-
var argsTag = "[object Arguments]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", stringTag = "[object String]", symbolTag = "[object Symbol]";
|
|
2312
|
-
/** Used to match leading and trailing whitespace. */
|
|
2313
|
-
var reTrim = /^\s+|\s+$/g;
|
|
2314
|
-
/** Used to detect bad signed hexadecimal string values. */
|
|
2315
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
2316
|
-
/** Used to detect binary string values. */
|
|
2317
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
2318
|
-
/** Used to detect octal string values. */
|
|
2319
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
2320
|
-
/** Used to detect unsigned integer values. */
|
|
2321
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
2322
|
-
/** Built-in method references without a dependency on `root`. */
|
|
2323
|
-
var freeParseInt = parseInt;
|
|
2324
|
-
/**
|
|
2325
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
2326
|
-
* shorthands.
|
|
2327
|
-
*
|
|
2328
|
-
* @private
|
|
2329
|
-
* @param {Array} [array] The array to iterate over.
|
|
2330
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2331
|
-
* @returns {Array} Returns the new mapped array.
|
|
2332
|
-
*/
|
|
2333
|
-
function arrayMap(array, iteratee) {
|
|
2334
|
-
var index = -1, length = array ? array.length : 0, result = Array(length);
|
|
2335
|
-
while (++index < length) result[index] = iteratee(array[index], index, array);
|
|
2336
|
-
return result;
|
|
2337
|
-
}
|
|
2338
|
-
/**
|
|
2339
|
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
2340
|
-
* support for iteratee shorthands.
|
|
2341
|
-
*
|
|
2342
|
-
* @private
|
|
2343
|
-
* @param {Array} array The array to inspect.
|
|
2344
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
2345
|
-
* @param {number} fromIndex The index to search from.
|
|
2346
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2347
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
2348
|
-
*/
|
|
2349
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
2350
|
-
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
2351
|
-
while (fromRight ? index-- : ++index < length) if (predicate(array[index], index, array)) return index;
|
|
2352
|
-
return -1;
|
|
2353
|
-
}
|
|
2354
|
-
/**
|
|
2355
|
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
2356
|
-
*
|
|
2357
|
-
* @private
|
|
2358
|
-
* @param {Array} array The array to inspect.
|
|
2359
|
-
* @param {*} value The value to search for.
|
|
2360
|
-
* @param {number} fromIndex The index to search from.
|
|
2361
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
2362
|
-
*/
|
|
2363
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
2364
|
-
if (value !== value) return baseFindIndex(array, baseIsNaN, fromIndex);
|
|
2365
|
-
var index = fromIndex - 1, length = array.length;
|
|
2366
|
-
while (++index < length) if (array[index] === value) return index;
|
|
2367
|
-
return -1;
|
|
2368
|
-
}
|
|
2369
|
-
/**
|
|
2370
|
-
* The base implementation of `_.isNaN` without support for number objects.
|
|
2371
|
-
*
|
|
2372
|
-
* @private
|
|
2373
|
-
* @param {*} value The value to check.
|
|
2374
|
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
2375
|
-
*/
|
|
2376
|
-
function baseIsNaN(value) {
|
|
2377
|
-
return value !== value;
|
|
2378
|
-
}
|
|
2379
|
-
/**
|
|
2380
|
-
* The base implementation of `_.times` without support for iteratee shorthands
|
|
2381
|
-
* or max array length checks.
|
|
2382
|
-
*
|
|
2383
|
-
* @private
|
|
2384
|
-
* @param {number} n The number of times to invoke `iteratee`.
|
|
2385
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2386
|
-
* @returns {Array} Returns the array of results.
|
|
2387
|
-
*/
|
|
2388
|
-
function baseTimes(n, iteratee) {
|
|
2389
|
-
var index = -1, result = Array(n);
|
|
2390
|
-
while (++index < n) result[index] = iteratee(index);
|
|
2391
|
-
return result;
|
|
2392
|
-
}
|
|
2393
|
-
/**
|
|
2394
|
-
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
|
2395
|
-
* array of `object` property values corresponding to the property names
|
|
2396
|
-
* of `props`.
|
|
2397
|
-
*
|
|
2398
|
-
* @private
|
|
2399
|
-
* @param {Object} object The object to query.
|
|
2400
|
-
* @param {Array} props The property names to get values for.
|
|
2401
|
-
* @returns {Object} Returns the array of property values.
|
|
2402
|
-
*/
|
|
2403
|
-
function baseValues(object, props) {
|
|
2404
|
-
return arrayMap(props, function(key) {
|
|
2405
|
-
return object[key];
|
|
2406
|
-
});
|
|
2407
|
-
}
|
|
2408
|
-
/**
|
|
2409
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
2410
|
-
*
|
|
2411
|
-
* @private
|
|
2412
|
-
* @param {Function} func The function to wrap.
|
|
2413
|
-
* @param {Function} transform The argument transform.
|
|
2414
|
-
* @returns {Function} Returns the new function.
|
|
2415
|
-
*/
|
|
2416
|
-
function overArg(func, transform) {
|
|
2417
|
-
return function(arg) {
|
|
2418
|
-
return func(transform(arg));
|
|
2419
|
-
};
|
|
2420
|
-
}
|
|
2421
|
-
/** Used for built-in method references. */
|
|
2422
|
-
var objectProto = Object.prototype;
|
|
2423
|
-
/** Used to check objects for own properties. */
|
|
2424
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2425
|
-
/**
|
|
2426
|
-
* Used to resolve the
|
|
2427
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
2428
|
-
* of values.
|
|
2429
|
-
*/
|
|
2430
|
-
var objectToString = objectProto.toString;
|
|
2431
|
-
/** Built-in value references. */
|
|
2432
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
2433
|
-
var nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max;
|
|
2434
|
-
/**
|
|
2435
|
-
* Creates an array of the enumerable property names of the array-like `value`.
|
|
2436
|
-
*
|
|
2437
|
-
* @private
|
|
2438
|
-
* @param {*} value The value to query.
|
|
2439
|
-
* @param {boolean} inherited Specify returning inherited property names.
|
|
2440
|
-
* @returns {Array} Returns the array of property names.
|
|
2441
|
-
*/
|
|
2442
|
-
function arrayLikeKeys(value, inherited) {
|
|
2443
|
-
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
|
|
2444
|
-
var length = result.length, skipIndexes = !!length;
|
|
2445
|
-
for (var key in value) if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) result.push(key);
|
|
2446
|
-
return result;
|
|
2447
|
-
}
|
|
2448
|
-
/**
|
|
2449
|
-
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
2450
|
-
*
|
|
2451
|
-
* @private
|
|
2452
|
-
* @param {Object} object The object to query.
|
|
2453
|
-
* @returns {Array} Returns the array of property names.
|
|
2454
|
-
*/
|
|
2455
|
-
function baseKeys(object) {
|
|
2456
|
-
if (!isPrototype(object)) return nativeKeys(object);
|
|
2457
|
-
var result = [];
|
|
2458
|
-
for (var key in Object(object)) if (hasOwnProperty.call(object, key) && key != "constructor") result.push(key);
|
|
2459
|
-
return result;
|
|
2460
|
-
}
|
|
2461
|
-
/**
|
|
2462
|
-
* Checks if `value` is a valid array-like index.
|
|
2463
|
-
*
|
|
2464
|
-
* @private
|
|
2465
|
-
* @param {*} value The value to check.
|
|
2466
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
2467
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
2468
|
-
*/
|
|
2469
|
-
function isIndex(value, length) {
|
|
2470
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
2471
|
-
return !!length && (typeof value == "number" || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
2472
|
-
}
|
|
2473
|
-
/**
|
|
2474
|
-
* Checks if `value` is likely a prototype object.
|
|
2475
|
-
*
|
|
2476
|
-
* @private
|
|
2477
|
-
* @param {*} value The value to check.
|
|
2478
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
2479
|
-
*/
|
|
2480
|
-
function isPrototype(value) {
|
|
2481
|
-
var Ctor = value && value.constructor;
|
|
2482
|
-
return value === (typeof Ctor == "function" && Ctor.prototype || objectProto);
|
|
2483
|
-
}
|
|
2484
|
-
/**
|
|
2485
|
-
* Checks if `value` is in `collection`. If `collection` is a string, it's
|
|
2486
|
-
* checked for a substring of `value`, otherwise
|
|
2487
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
2488
|
-
* is used for equality comparisons. If `fromIndex` is negative, it's used as
|
|
2489
|
-
* the offset from the end of `collection`.
|
|
2490
|
-
*
|
|
2491
|
-
* @static
|
|
2492
|
-
* @memberOf _
|
|
2493
|
-
* @since 0.1.0
|
|
2494
|
-
* @category Collection
|
|
2495
|
-
* @param {Array|Object|string} collection The collection to inspect.
|
|
2496
|
-
* @param {*} value The value to search for.
|
|
2497
|
-
* @param {number} [fromIndex=0] The index to search from.
|
|
2498
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
|
2499
|
-
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
2500
|
-
* @example
|
|
2501
|
-
*
|
|
2502
|
-
* _.includes([1, 2, 3], 1);
|
|
2503
|
-
* // => true
|
|
2504
|
-
*
|
|
2505
|
-
* _.includes([1, 2, 3], 1, 2);
|
|
2506
|
-
* // => false
|
|
2507
|
-
*
|
|
2508
|
-
* _.includes({ 'a': 1, 'b': 2 }, 1);
|
|
2509
|
-
* // => true
|
|
2510
|
-
*
|
|
2511
|
-
* _.includes('abcd', 'bc');
|
|
2512
|
-
* // => true
|
|
2513
|
-
*/
|
|
2514
|
-
function includes(collection, value, fromIndex, guard) {
|
|
2515
|
-
collection = isArrayLike(collection) ? collection : values(collection);
|
|
2516
|
-
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
|
2517
|
-
var length = collection.length;
|
|
2518
|
-
if (fromIndex < 0) fromIndex = nativeMax(length + fromIndex, 0);
|
|
2519
|
-
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
2520
|
-
}
|
|
2521
|
-
/**
|
|
2522
|
-
* Checks if `value` is likely an `arguments` object.
|
|
2523
|
-
*
|
|
2524
|
-
* @static
|
|
2525
|
-
* @memberOf _
|
|
2526
|
-
* @since 0.1.0
|
|
2527
|
-
* @category Lang
|
|
2528
|
-
* @param {*} value The value to check.
|
|
2529
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
2530
|
-
* else `false`.
|
|
2531
|
-
* @example
|
|
2532
|
-
*
|
|
2533
|
-
* _.isArguments(function() { return arguments; }());
|
|
2534
|
-
* // => true
|
|
2535
|
-
*
|
|
2536
|
-
* _.isArguments([1, 2, 3]);
|
|
2537
|
-
* // => false
|
|
2538
|
-
*/
|
|
2539
|
-
function isArguments(value) {
|
|
2540
|
-
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
|
|
2541
|
-
}
|
|
2542
|
-
/**
|
|
2543
|
-
* Checks if `value` is classified as an `Array` object.
|
|
2544
|
-
*
|
|
2545
|
-
* @static
|
|
2546
|
-
* @memberOf _
|
|
2547
|
-
* @since 0.1.0
|
|
2548
|
-
* @category Lang
|
|
2549
|
-
* @param {*} value The value to check.
|
|
2550
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
2551
|
-
* @example
|
|
2552
|
-
*
|
|
2553
|
-
* _.isArray([1, 2, 3]);
|
|
2554
|
-
* // => true
|
|
2555
|
-
*
|
|
2556
|
-
* _.isArray(document.body.children);
|
|
2557
|
-
* // => false
|
|
2558
|
-
*
|
|
2559
|
-
* _.isArray('abc');
|
|
2560
|
-
* // => false
|
|
2561
|
-
*
|
|
2562
|
-
* _.isArray(_.noop);
|
|
2563
|
-
* // => false
|
|
2564
|
-
*/
|
|
2565
|
-
var isArray = Array.isArray;
|
|
2566
|
-
/**
|
|
2567
|
-
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
2568
|
-
* not a function and has a `value.length` that's an integer greater than or
|
|
2569
|
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
2570
|
-
*
|
|
2571
|
-
* @static
|
|
2572
|
-
* @memberOf _
|
|
2573
|
-
* @since 4.0.0
|
|
2574
|
-
* @category Lang
|
|
2575
|
-
* @param {*} value The value to check.
|
|
2576
|
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
2577
|
-
* @example
|
|
2578
|
-
*
|
|
2579
|
-
* _.isArrayLike([1, 2, 3]);
|
|
2580
|
-
* // => true
|
|
2581
|
-
*
|
|
2582
|
-
* _.isArrayLike(document.body.children);
|
|
2583
|
-
* // => true
|
|
2584
|
-
*
|
|
2585
|
-
* _.isArrayLike('abc');
|
|
2586
|
-
* // => true
|
|
2587
|
-
*
|
|
2588
|
-
* _.isArrayLike(_.noop);
|
|
2589
|
-
* // => false
|
|
2590
|
-
*/
|
|
2591
|
-
function isArrayLike(value) {
|
|
2592
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
2593
|
-
}
|
|
2594
|
-
/**
|
|
2595
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
2596
|
-
* is an object.
|
|
2597
|
-
*
|
|
2598
|
-
* @static
|
|
2599
|
-
* @memberOf _
|
|
2600
|
-
* @since 4.0.0
|
|
2601
|
-
* @category Lang
|
|
2602
|
-
* @param {*} value The value to check.
|
|
2603
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
2604
|
-
* else `false`.
|
|
2605
|
-
* @example
|
|
2606
|
-
*
|
|
2607
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
2608
|
-
* // => true
|
|
2609
|
-
*
|
|
2610
|
-
* _.isArrayLikeObject(document.body.children);
|
|
2611
|
-
* // => true
|
|
2612
|
-
*
|
|
2613
|
-
* _.isArrayLikeObject('abc');
|
|
2614
|
-
* // => false
|
|
2615
|
-
*
|
|
2616
|
-
* _.isArrayLikeObject(_.noop);
|
|
2617
|
-
* // => false
|
|
2618
|
-
*/
|
|
2619
|
-
function isArrayLikeObject(value) {
|
|
2620
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
2621
|
-
}
|
|
2622
|
-
/**
|
|
2623
|
-
* Checks if `value` is classified as a `Function` object.
|
|
2624
|
-
*
|
|
2625
|
-
* @static
|
|
2626
|
-
* @memberOf _
|
|
2627
|
-
* @since 0.1.0
|
|
2628
|
-
* @category Lang
|
|
2629
|
-
* @param {*} value The value to check.
|
|
2630
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
2631
|
-
* @example
|
|
2632
|
-
*
|
|
2633
|
-
* _.isFunction(_);
|
|
2634
|
-
* // => true
|
|
2635
|
-
*
|
|
2636
|
-
* _.isFunction(/abc/);
|
|
2637
|
-
* // => false
|
|
2638
|
-
*/
|
|
2639
|
-
function isFunction(value) {
|
|
2640
|
-
var tag = isObject(value) ? objectToString.call(value) : "";
|
|
2641
|
-
return tag == funcTag || tag == genTag;
|
|
2642
|
-
}
|
|
2643
|
-
/**
|
|
2644
|
-
* Checks if `value` is a valid array-like length.
|
|
2645
|
-
*
|
|
2646
|
-
* **Note:** This method is loosely based on
|
|
2647
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
2648
|
-
*
|
|
2649
|
-
* @static
|
|
2650
|
-
* @memberOf _
|
|
2651
|
-
* @since 4.0.0
|
|
2652
|
-
* @category Lang
|
|
2653
|
-
* @param {*} value The value to check.
|
|
2654
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
2655
|
-
* @example
|
|
2656
|
-
*
|
|
2657
|
-
* _.isLength(3);
|
|
2658
|
-
* // => true
|
|
2659
|
-
*
|
|
2660
|
-
* _.isLength(Number.MIN_VALUE);
|
|
2661
|
-
* // => false
|
|
2662
|
-
*
|
|
2663
|
-
* _.isLength(Infinity);
|
|
2664
|
-
* // => false
|
|
2665
|
-
*
|
|
2666
|
-
* _.isLength('3');
|
|
2667
|
-
* // => false
|
|
2668
|
-
*/
|
|
2669
|
-
function isLength(value) {
|
|
2670
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
2671
|
-
}
|
|
2672
|
-
/**
|
|
2673
|
-
* Checks if `value` is the
|
|
2674
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
2675
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
2676
|
-
*
|
|
2677
|
-
* @static
|
|
2678
|
-
* @memberOf _
|
|
2679
|
-
* @since 0.1.0
|
|
2680
|
-
* @category Lang
|
|
2681
|
-
* @param {*} value The value to check.
|
|
2682
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
2683
|
-
* @example
|
|
2684
|
-
*
|
|
2685
|
-
* _.isObject({});
|
|
2686
|
-
* // => true
|
|
2687
|
-
*
|
|
2688
|
-
* _.isObject([1, 2, 3]);
|
|
2689
|
-
* // => true
|
|
2690
|
-
*
|
|
2691
|
-
* _.isObject(_.noop);
|
|
2692
|
-
* // => true
|
|
2693
|
-
*
|
|
2694
|
-
* _.isObject(null);
|
|
2695
|
-
* // => false
|
|
2696
|
-
*/
|
|
2697
|
-
function isObject(value) {
|
|
2698
|
-
var type = typeof value;
|
|
2699
|
-
return !!value && (type == "object" || type == "function");
|
|
2700
|
-
}
|
|
2701
|
-
/**
|
|
2702
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
2703
|
-
* and has a `typeof` result of "object".
|
|
2704
|
-
*
|
|
2705
|
-
* @static
|
|
2706
|
-
* @memberOf _
|
|
2707
|
-
* @since 4.0.0
|
|
2708
|
-
* @category Lang
|
|
2709
|
-
* @param {*} value The value to check.
|
|
2710
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
2711
|
-
* @example
|
|
2712
|
-
*
|
|
2713
|
-
* _.isObjectLike({});
|
|
2714
|
-
* // => true
|
|
2715
|
-
*
|
|
2716
|
-
* _.isObjectLike([1, 2, 3]);
|
|
2717
|
-
* // => true
|
|
2718
|
-
*
|
|
2719
|
-
* _.isObjectLike(_.noop);
|
|
2720
|
-
* // => false
|
|
2721
|
-
*
|
|
2722
|
-
* _.isObjectLike(null);
|
|
2723
|
-
* // => false
|
|
2724
|
-
*/
|
|
2725
|
-
function isObjectLike(value) {
|
|
2726
|
-
return !!value && typeof value == "object";
|
|
2727
|
-
}
|
|
2728
|
-
/**
|
|
2729
|
-
* Checks if `value` is classified as a `String` primitive or object.
|
|
2730
|
-
*
|
|
2731
|
-
* @static
|
|
2732
|
-
* @since 0.1.0
|
|
2733
|
-
* @memberOf _
|
|
2734
|
-
* @category Lang
|
|
2735
|
-
* @param {*} value The value to check.
|
|
2736
|
-
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
2737
|
-
* @example
|
|
2738
|
-
*
|
|
2739
|
-
* _.isString('abc');
|
|
2740
|
-
* // => true
|
|
2741
|
-
*
|
|
2742
|
-
* _.isString(1);
|
|
2743
|
-
* // => false
|
|
2744
|
-
*/
|
|
2745
|
-
function isString(value) {
|
|
2746
|
-
return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag;
|
|
2747
|
-
}
|
|
2748
|
-
/**
|
|
2749
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
2750
|
-
*
|
|
2751
|
-
* @static
|
|
2752
|
-
* @memberOf _
|
|
2753
|
-
* @since 4.0.0
|
|
2754
|
-
* @category Lang
|
|
2755
|
-
* @param {*} value The value to check.
|
|
2756
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
2757
|
-
* @example
|
|
2758
|
-
*
|
|
2759
|
-
* _.isSymbol(Symbol.iterator);
|
|
2760
|
-
* // => true
|
|
2761
|
-
*
|
|
2762
|
-
* _.isSymbol('abc');
|
|
2763
|
-
* // => false
|
|
2764
|
-
*/
|
|
2765
|
-
function isSymbol(value) {
|
|
2766
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
2767
|
-
}
|
|
2768
|
-
/**
|
|
2769
|
-
* Converts `value` to a finite number.
|
|
2770
|
-
*
|
|
2771
|
-
* @static
|
|
2772
|
-
* @memberOf _
|
|
2773
|
-
* @since 4.12.0
|
|
2774
|
-
* @category Lang
|
|
2775
|
-
* @param {*} value The value to convert.
|
|
2776
|
-
* @returns {number} Returns the converted number.
|
|
2777
|
-
* @example
|
|
2778
|
-
*
|
|
2779
|
-
* _.toFinite(3.2);
|
|
2780
|
-
* // => 3.2
|
|
2781
|
-
*
|
|
2782
|
-
* _.toFinite(Number.MIN_VALUE);
|
|
2783
|
-
* // => 5e-324
|
|
2784
|
-
*
|
|
2785
|
-
* _.toFinite(Infinity);
|
|
2786
|
-
* // => 1.7976931348623157e+308
|
|
2787
|
-
*
|
|
2788
|
-
* _.toFinite('3.2');
|
|
2789
|
-
* // => 3.2
|
|
2790
|
-
*/
|
|
2791
|
-
function toFinite(value) {
|
|
2792
|
-
if (!value) return value === 0 ? value : 0;
|
|
2793
|
-
value = toNumber(value);
|
|
2794
|
-
if (value === INFINITY || value === -INFINITY) return (value < 0 ? -1 : 1) * MAX_INTEGER;
|
|
2795
|
-
return value === value ? value : 0;
|
|
2796
|
-
}
|
|
2797
|
-
/**
|
|
2798
|
-
* Converts `value` to an integer.
|
|
2799
|
-
*
|
|
2800
|
-
* **Note:** This method is loosely based on
|
|
2801
|
-
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
2802
|
-
*
|
|
2803
|
-
* @static
|
|
2804
|
-
* @memberOf _
|
|
2805
|
-
* @since 4.0.0
|
|
2806
|
-
* @category Lang
|
|
2807
|
-
* @param {*} value The value to convert.
|
|
2808
|
-
* @returns {number} Returns the converted integer.
|
|
2809
|
-
* @example
|
|
2810
|
-
*
|
|
2811
|
-
* _.toInteger(3.2);
|
|
2812
|
-
* // => 3
|
|
2813
|
-
*
|
|
2814
|
-
* _.toInteger(Number.MIN_VALUE);
|
|
2815
|
-
* // => 0
|
|
2816
|
-
*
|
|
2817
|
-
* _.toInteger(Infinity);
|
|
2818
|
-
* // => 1.7976931348623157e+308
|
|
2819
|
-
*
|
|
2820
|
-
* _.toInteger('3.2');
|
|
2821
|
-
* // => 3
|
|
2822
|
-
*/
|
|
2823
|
-
function toInteger(value) {
|
|
2824
|
-
var result = toFinite(value), remainder = result % 1;
|
|
2825
|
-
return result === result ? remainder ? result - remainder : result : 0;
|
|
2826
|
-
}
|
|
2827
|
-
/**
|
|
2828
|
-
* Converts `value` to a number.
|
|
2829
|
-
*
|
|
2830
|
-
* @static
|
|
2831
|
-
* @memberOf _
|
|
2832
|
-
* @since 4.0.0
|
|
2833
|
-
* @category Lang
|
|
2834
|
-
* @param {*} value The value to process.
|
|
2835
|
-
* @returns {number} Returns the number.
|
|
2836
|
-
* @example
|
|
2837
|
-
*
|
|
2838
|
-
* _.toNumber(3.2);
|
|
2839
|
-
* // => 3.2
|
|
2840
|
-
*
|
|
2841
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
2842
|
-
* // => 5e-324
|
|
2843
|
-
*
|
|
2844
|
-
* _.toNumber(Infinity);
|
|
2845
|
-
* // => Infinity
|
|
2846
|
-
*
|
|
2847
|
-
* _.toNumber('3.2');
|
|
2848
|
-
* // => 3.2
|
|
2849
|
-
*/
|
|
2850
|
-
function toNumber(value) {
|
|
2851
|
-
if (typeof value == "number") return value;
|
|
2852
|
-
if (isSymbol(value)) return NAN;
|
|
2853
|
-
if (isObject(value)) {
|
|
2854
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
2855
|
-
value = isObject(other) ? other + "" : other;
|
|
2856
|
-
}
|
|
2857
|
-
if (typeof value != "string") return value === 0 ? value : +value;
|
|
2858
|
-
value = value.replace(reTrim, "");
|
|
2859
|
-
var isBinary = reIsBinary.test(value);
|
|
2860
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
2861
|
-
}
|
|
2862
|
-
/**
|
|
2863
|
-
* Creates an array of the own enumerable property names of `object`.
|
|
2864
|
-
*
|
|
2865
|
-
* **Note:** Non-object values are coerced to objects. See the
|
|
2866
|
-
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
2867
|
-
* for more details.
|
|
2868
|
-
*
|
|
2869
|
-
* @static
|
|
2870
|
-
* @since 0.1.0
|
|
2871
|
-
* @memberOf _
|
|
2872
|
-
* @category Object
|
|
2873
|
-
* @param {Object} object The object to query.
|
|
2874
|
-
* @returns {Array} Returns the array of property names.
|
|
2875
|
-
* @example
|
|
2876
|
-
*
|
|
2877
|
-
* function Foo() {
|
|
2878
|
-
* this.a = 1;
|
|
2879
|
-
* this.b = 2;
|
|
2880
|
-
* }
|
|
2881
|
-
*
|
|
2882
|
-
* Foo.prototype.c = 3;
|
|
2883
|
-
*
|
|
2884
|
-
* _.keys(new Foo);
|
|
2885
|
-
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
2886
|
-
*
|
|
2887
|
-
* _.keys('hi');
|
|
2888
|
-
* // => ['0', '1']
|
|
2889
|
-
*/
|
|
2890
|
-
function keys(object) {
|
|
2891
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
2892
|
-
}
|
|
2893
|
-
/**
|
|
2894
|
-
* Creates an array of the own enumerable string keyed property values of `object`.
|
|
2895
|
-
*
|
|
2896
|
-
* **Note:** Non-object values are coerced to objects.
|
|
2897
|
-
*
|
|
2898
|
-
* @static
|
|
2899
|
-
* @since 0.1.0
|
|
2900
|
-
* @memberOf _
|
|
2901
|
-
* @category Object
|
|
2902
|
-
* @param {Object} object The object to query.
|
|
2903
|
-
* @returns {Array} Returns the array of property values.
|
|
2904
|
-
* @example
|
|
2905
|
-
*
|
|
2906
|
-
* function Foo() {
|
|
2907
|
-
* this.a = 1;
|
|
2908
|
-
* this.b = 2;
|
|
2909
|
-
* }
|
|
2910
|
-
*
|
|
2911
|
-
* Foo.prototype.c = 3;
|
|
2912
|
-
*
|
|
2913
|
-
* _.values(new Foo);
|
|
2914
|
-
* // => [1, 2] (iteration order is not guaranteed)
|
|
2915
|
-
*
|
|
2916
|
-
* _.values('hi');
|
|
2917
|
-
* // => ['h', 'i']
|
|
2918
|
-
*/
|
|
2919
|
-
function values(object) {
|
|
2920
|
-
return object ? baseValues(object, keys(object)) : [];
|
|
2921
|
-
}
|
|
2922
|
-
module.exports = includes;
|
|
2923
|
-
}));
|
|
2924
|
-
//#endregion
|
|
2925
|
-
//#region ../../node_modules/.pnpm/lodash.isboolean@3.0.3/node_modules/lodash.isboolean/index.js
|
|
2926
|
-
var require_lodash_isboolean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2927
|
-
/**
|
|
2928
|
-
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
|
2929
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
2930
|
-
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
2931
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2932
|
-
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2933
|
-
* Available under MIT license <https://lodash.com/license>
|
|
2934
|
-
*/
|
|
2935
|
-
/** `Object#toString` result references. */
|
|
2936
|
-
var boolTag = "[object Boolean]";
|
|
2937
|
-
/**
|
|
2938
|
-
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
2939
|
-
* of values.
|
|
2940
|
-
*/
|
|
2941
|
-
var objectToString = Object.prototype.toString;
|
|
2942
|
-
/**
|
|
2943
|
-
* Checks if `value` is classified as a boolean primitive or object.
|
|
2944
|
-
*
|
|
2945
|
-
* @static
|
|
2946
|
-
* @memberOf _
|
|
2947
|
-
* @category Lang
|
|
2948
|
-
* @param {*} value The value to check.
|
|
2949
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
2950
|
-
* @example
|
|
2951
|
-
*
|
|
2952
|
-
* _.isBoolean(false);
|
|
2953
|
-
* // => true
|
|
2954
|
-
*
|
|
2955
|
-
* _.isBoolean(null);
|
|
2956
|
-
* // => false
|
|
2957
|
-
*/
|
|
2958
|
-
function isBoolean(value) {
|
|
2959
|
-
return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag;
|
|
2960
|
-
}
|
|
2961
|
-
/**
|
|
2962
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
2963
|
-
* and has a `typeof` result of "object".
|
|
2964
|
-
*
|
|
2965
|
-
* @static
|
|
2966
|
-
* @memberOf _
|
|
2967
|
-
* @category Lang
|
|
2968
|
-
* @param {*} value The value to check.
|
|
2969
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
2970
|
-
* @example
|
|
2971
|
-
*
|
|
2972
|
-
* _.isObjectLike({});
|
|
2973
|
-
* // => true
|
|
2974
|
-
*
|
|
2975
|
-
* _.isObjectLike([1, 2, 3]);
|
|
2976
|
-
* // => true
|
|
2977
|
-
*
|
|
2978
|
-
* _.isObjectLike(_.noop);
|
|
2979
|
-
* // => false
|
|
2980
|
-
*
|
|
2981
|
-
* _.isObjectLike(null);
|
|
2982
|
-
* // => false
|
|
2983
|
-
*/
|
|
2984
|
-
function isObjectLike(value) {
|
|
2985
|
-
return !!value && typeof value == "object";
|
|
2986
|
-
}
|
|
2987
|
-
module.exports = isBoolean;
|
|
2988
|
-
}));
|
|
2989
|
-
//#endregion
|
|
2990
|
-
//#region ../../node_modules/.pnpm/lodash.isinteger@4.0.4/node_modules/lodash.isinteger/index.js
|
|
2991
|
-
var require_lodash_isinteger = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2992
|
-
/**
|
|
2993
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
2994
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
2995
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
2996
|
-
* Released under MIT license <https://lodash.com/license>
|
|
2997
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2998
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2999
|
-
*/
|
|
3000
|
-
/** Used as references for various `Number` constants. */
|
|
3001
|
-
var INFINITY = Infinity, MAX_INTEGER = 17976931348623157e292, NAN = NaN;
|
|
3002
|
-
/** `Object#toString` result references. */
|
|
3003
|
-
var symbolTag = "[object Symbol]";
|
|
3004
|
-
/** Used to match leading and trailing whitespace. */
|
|
3005
|
-
var reTrim = /^\s+|\s+$/g;
|
|
3006
|
-
/** Used to detect bad signed hexadecimal string values. */
|
|
3007
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
3008
|
-
/** Used to detect binary string values. */
|
|
3009
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
3010
|
-
/** Used to detect octal string values. */
|
|
3011
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
3012
|
-
/** Built-in method references without a dependency on `root`. */
|
|
3013
|
-
var freeParseInt = parseInt;
|
|
3014
|
-
/**
|
|
3015
|
-
* Used to resolve the
|
|
3016
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
3017
|
-
* of values.
|
|
3018
|
-
*/
|
|
3019
|
-
var objectToString = Object.prototype.toString;
|
|
3020
|
-
/**
|
|
3021
|
-
* Checks if `value` is an integer.
|
|
3022
|
-
*
|
|
3023
|
-
* **Note:** This method is based on
|
|
3024
|
-
* [`Number.isInteger`](https://mdn.io/Number/isInteger).
|
|
3025
|
-
*
|
|
3026
|
-
* @static
|
|
3027
|
-
* @memberOf _
|
|
3028
|
-
* @since 4.0.0
|
|
3029
|
-
* @category Lang
|
|
3030
|
-
* @param {*} value The value to check.
|
|
3031
|
-
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
|
|
3032
|
-
* @example
|
|
3033
|
-
*
|
|
3034
|
-
* _.isInteger(3);
|
|
3035
|
-
* // => true
|
|
3036
|
-
*
|
|
3037
|
-
* _.isInteger(Number.MIN_VALUE);
|
|
3038
|
-
* // => false
|
|
3039
|
-
*
|
|
3040
|
-
* _.isInteger(Infinity);
|
|
3041
|
-
* // => false
|
|
3042
|
-
*
|
|
3043
|
-
* _.isInteger('3');
|
|
3044
|
-
* // => false
|
|
3045
|
-
*/
|
|
3046
|
-
function isInteger(value) {
|
|
3047
|
-
return typeof value == "number" && value == toInteger(value);
|
|
3048
|
-
}
|
|
3049
|
-
/**
|
|
3050
|
-
* Checks if `value` is the
|
|
3051
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
3052
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
3053
|
-
*
|
|
3054
|
-
* @static
|
|
3055
|
-
* @memberOf _
|
|
3056
|
-
* @since 0.1.0
|
|
3057
|
-
* @category Lang
|
|
3058
|
-
* @param {*} value The value to check.
|
|
3059
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
3060
|
-
* @example
|
|
3061
|
-
*
|
|
3062
|
-
* _.isObject({});
|
|
3063
|
-
* // => true
|
|
3064
|
-
*
|
|
3065
|
-
* _.isObject([1, 2, 3]);
|
|
3066
|
-
* // => true
|
|
3067
|
-
*
|
|
3068
|
-
* _.isObject(_.noop);
|
|
3069
|
-
* // => true
|
|
3070
|
-
*
|
|
3071
|
-
* _.isObject(null);
|
|
3072
|
-
* // => false
|
|
3073
|
-
*/
|
|
3074
|
-
function isObject(value) {
|
|
3075
|
-
var type = typeof value;
|
|
3076
|
-
return !!value && (type == "object" || type == "function");
|
|
3077
|
-
}
|
|
3078
|
-
/**
|
|
3079
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3080
|
-
* and has a `typeof` result of "object".
|
|
3081
|
-
*
|
|
3082
|
-
* @static
|
|
3083
|
-
* @memberOf _
|
|
3084
|
-
* @since 4.0.0
|
|
3085
|
-
* @category Lang
|
|
3086
|
-
* @param {*} value The value to check.
|
|
3087
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
3088
|
-
* @example
|
|
3089
|
-
*
|
|
3090
|
-
* _.isObjectLike({});
|
|
3091
|
-
* // => true
|
|
3092
|
-
*
|
|
3093
|
-
* _.isObjectLike([1, 2, 3]);
|
|
3094
|
-
* // => true
|
|
3095
|
-
*
|
|
3096
|
-
* _.isObjectLike(_.noop);
|
|
3097
|
-
* // => false
|
|
3098
|
-
*
|
|
3099
|
-
* _.isObjectLike(null);
|
|
3100
|
-
* // => false
|
|
3101
|
-
*/
|
|
3102
|
-
function isObjectLike(value) {
|
|
3103
|
-
return !!value && typeof value == "object";
|
|
3104
|
-
}
|
|
3105
|
-
/**
|
|
3106
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
3107
|
-
*
|
|
3108
|
-
* @static
|
|
3109
|
-
* @memberOf _
|
|
3110
|
-
* @since 4.0.0
|
|
3111
|
-
* @category Lang
|
|
3112
|
-
* @param {*} value The value to check.
|
|
3113
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
3114
|
-
* @example
|
|
3115
|
-
*
|
|
3116
|
-
* _.isSymbol(Symbol.iterator);
|
|
3117
|
-
* // => true
|
|
3118
|
-
*
|
|
3119
|
-
* _.isSymbol('abc');
|
|
3120
|
-
* // => false
|
|
3121
|
-
*/
|
|
3122
|
-
function isSymbol(value) {
|
|
3123
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
3124
|
-
}
|
|
3125
|
-
/**
|
|
3126
|
-
* Converts `value` to a finite number.
|
|
3127
|
-
*
|
|
3128
|
-
* @static
|
|
3129
|
-
* @memberOf _
|
|
3130
|
-
* @since 4.12.0
|
|
3131
|
-
* @category Lang
|
|
3132
|
-
* @param {*} value The value to convert.
|
|
3133
|
-
* @returns {number} Returns the converted number.
|
|
3134
|
-
* @example
|
|
3135
|
-
*
|
|
3136
|
-
* _.toFinite(3.2);
|
|
3137
|
-
* // => 3.2
|
|
3138
|
-
*
|
|
3139
|
-
* _.toFinite(Number.MIN_VALUE);
|
|
3140
|
-
* // => 5e-324
|
|
3141
|
-
*
|
|
3142
|
-
* _.toFinite(Infinity);
|
|
3143
|
-
* // => 1.7976931348623157e+308
|
|
3144
|
-
*
|
|
3145
|
-
* _.toFinite('3.2');
|
|
3146
|
-
* // => 3.2
|
|
3147
|
-
*/
|
|
3148
|
-
function toFinite(value) {
|
|
3149
|
-
if (!value) return value === 0 ? value : 0;
|
|
3150
|
-
value = toNumber(value);
|
|
3151
|
-
if (value === INFINITY || value === -INFINITY) return (value < 0 ? -1 : 1) * MAX_INTEGER;
|
|
3152
|
-
return value === value ? value : 0;
|
|
3153
|
-
}
|
|
3154
|
-
/**
|
|
3155
|
-
* Converts `value` to an integer.
|
|
3156
|
-
*
|
|
3157
|
-
* **Note:** This method is loosely based on
|
|
3158
|
-
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
3159
|
-
*
|
|
3160
|
-
* @static
|
|
3161
|
-
* @memberOf _
|
|
3162
|
-
* @since 4.0.0
|
|
3163
|
-
* @category Lang
|
|
3164
|
-
* @param {*} value The value to convert.
|
|
3165
|
-
* @returns {number} Returns the converted integer.
|
|
3166
|
-
* @example
|
|
3167
|
-
*
|
|
3168
|
-
* _.toInteger(3.2);
|
|
3169
|
-
* // => 3
|
|
3170
|
-
*
|
|
3171
|
-
* _.toInteger(Number.MIN_VALUE);
|
|
3172
|
-
* // => 0
|
|
3173
|
-
*
|
|
3174
|
-
* _.toInteger(Infinity);
|
|
3175
|
-
* // => 1.7976931348623157e+308
|
|
3176
|
-
*
|
|
3177
|
-
* _.toInteger('3.2');
|
|
3178
|
-
* // => 3
|
|
3179
|
-
*/
|
|
3180
|
-
function toInteger(value) {
|
|
3181
|
-
var result = toFinite(value), remainder = result % 1;
|
|
3182
|
-
return result === result ? remainder ? result - remainder : result : 0;
|
|
3183
|
-
}
|
|
3184
|
-
/**
|
|
3185
|
-
* Converts `value` to a number.
|
|
3186
|
-
*
|
|
3187
|
-
* @static
|
|
3188
|
-
* @memberOf _
|
|
3189
|
-
* @since 4.0.0
|
|
3190
|
-
* @category Lang
|
|
3191
|
-
* @param {*} value The value to process.
|
|
3192
|
-
* @returns {number} Returns the number.
|
|
3193
|
-
* @example
|
|
3194
|
-
*
|
|
3195
|
-
* _.toNumber(3.2);
|
|
3196
|
-
* // => 3.2
|
|
3197
|
-
*
|
|
3198
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
3199
|
-
* // => 5e-324
|
|
3200
|
-
*
|
|
3201
|
-
* _.toNumber(Infinity);
|
|
3202
|
-
* // => Infinity
|
|
3203
|
-
*
|
|
3204
|
-
* _.toNumber('3.2');
|
|
3205
|
-
* // => 3.2
|
|
3206
|
-
*/
|
|
3207
|
-
function toNumber(value) {
|
|
3208
|
-
if (typeof value == "number") return value;
|
|
3209
|
-
if (isSymbol(value)) return NAN;
|
|
3210
|
-
if (isObject(value)) {
|
|
3211
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
3212
|
-
value = isObject(other) ? other + "" : other;
|
|
3213
|
-
}
|
|
3214
|
-
if (typeof value != "string") return value === 0 ? value : +value;
|
|
3215
|
-
value = value.replace(reTrim, "");
|
|
3216
|
-
var isBinary = reIsBinary.test(value);
|
|
3217
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
3218
|
-
}
|
|
3219
|
-
module.exports = isInteger;
|
|
3220
|
-
}));
|
|
3221
|
-
//#endregion
|
|
3222
|
-
//#region ../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js
|
|
3223
|
-
var require_lodash_isnumber = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3224
|
-
/**
|
|
3225
|
-
* lodash 3.0.3 (Custom Build) <https://lodash.com/>
|
|
3226
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
3227
|
-
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
3228
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
3229
|
-
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
3230
|
-
* Available under MIT license <https://lodash.com/license>
|
|
3231
|
-
*/
|
|
3232
|
-
/** `Object#toString` result references. */
|
|
3233
|
-
var numberTag = "[object Number]";
|
|
3234
|
-
/**
|
|
3235
|
-
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
3236
|
-
* of values.
|
|
3237
|
-
*/
|
|
3238
|
-
var objectToString = Object.prototype.toString;
|
|
3239
|
-
/**
|
|
3240
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3241
|
-
* and has a `typeof` result of "object".
|
|
3242
|
-
*
|
|
3243
|
-
* @static
|
|
3244
|
-
* @memberOf _
|
|
3245
|
-
* @category Lang
|
|
3246
|
-
* @param {*} value The value to check.
|
|
3247
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
3248
|
-
* @example
|
|
3249
|
-
*
|
|
3250
|
-
* _.isObjectLike({});
|
|
3251
|
-
* // => true
|
|
3252
|
-
*
|
|
3253
|
-
* _.isObjectLike([1, 2, 3]);
|
|
3254
|
-
* // => true
|
|
3255
|
-
*
|
|
3256
|
-
* _.isObjectLike(_.noop);
|
|
3257
|
-
* // => false
|
|
3258
|
-
*
|
|
3259
|
-
* _.isObjectLike(null);
|
|
3260
|
-
* // => false
|
|
3261
|
-
*/
|
|
3262
|
-
function isObjectLike(value) {
|
|
3263
|
-
return !!value && typeof value == "object";
|
|
3264
|
-
}
|
|
3265
|
-
/**
|
|
3266
|
-
* Checks if `value` is classified as a `Number` primitive or object.
|
|
3267
|
-
*
|
|
3268
|
-
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
|
|
3269
|
-
* as numbers, use the `_.isFinite` method.
|
|
3270
|
-
*
|
|
3271
|
-
* @static
|
|
3272
|
-
* @memberOf _
|
|
3273
|
-
* @category Lang
|
|
3274
|
-
* @param {*} value The value to check.
|
|
3275
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
3276
|
-
* @example
|
|
3277
|
-
*
|
|
3278
|
-
* _.isNumber(3);
|
|
3279
|
-
* // => true
|
|
3280
|
-
*
|
|
3281
|
-
* _.isNumber(Number.MIN_VALUE);
|
|
3282
|
-
* // => true
|
|
3283
|
-
*
|
|
3284
|
-
* _.isNumber(Infinity);
|
|
3285
|
-
* // => true
|
|
3286
|
-
*
|
|
3287
|
-
* _.isNumber('3');
|
|
3288
|
-
* // => false
|
|
3289
|
-
*/
|
|
3290
|
-
function isNumber(value) {
|
|
3291
|
-
return typeof value == "number" || isObjectLike(value) && objectToString.call(value) == numberTag;
|
|
3292
|
-
}
|
|
3293
|
-
module.exports = isNumber;
|
|
3294
|
-
}));
|
|
3295
|
-
//#endregion
|
|
3296
|
-
//#region ../../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js
|
|
3297
|
-
var require_lodash_isplainobject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3298
|
-
/**
|
|
3299
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
3300
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
3301
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
3302
|
-
* Released under MIT license <https://lodash.com/license>
|
|
3303
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
3304
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
3305
|
-
*/
|
|
3306
|
-
/** `Object#toString` result references. */
|
|
3307
|
-
var objectTag = "[object Object]";
|
|
3308
|
-
/**
|
|
3309
|
-
* Checks if `value` is a host object in IE < 9.
|
|
3310
|
-
*
|
|
3311
|
-
* @private
|
|
3312
|
-
* @param {*} value The value to check.
|
|
3313
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
3314
|
-
*/
|
|
3315
|
-
function isHostObject(value) {
|
|
3316
|
-
var result = false;
|
|
3317
|
-
if (value != null && typeof value.toString != "function") try {
|
|
3318
|
-
result = !!(value + "");
|
|
3319
|
-
} catch (e) {}
|
|
3320
|
-
return result;
|
|
3321
|
-
}
|
|
3322
|
-
/**
|
|
3323
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
3324
|
-
*
|
|
3325
|
-
* @private
|
|
3326
|
-
* @param {Function} func The function to wrap.
|
|
3327
|
-
* @param {Function} transform The argument transform.
|
|
3328
|
-
* @returns {Function} Returns the new function.
|
|
3329
|
-
*/
|
|
3330
|
-
function overArg(func, transform) {
|
|
3331
|
-
return function(arg) {
|
|
3332
|
-
return func(transform(arg));
|
|
3333
|
-
};
|
|
3334
|
-
}
|
|
3335
|
-
/** Used for built-in method references. */
|
|
3336
|
-
var funcProto = Function.prototype, objectProto = Object.prototype;
|
|
3337
|
-
/** Used to resolve the decompiled source of functions. */
|
|
3338
|
-
var funcToString = funcProto.toString;
|
|
3339
|
-
/** Used to check objects for own properties. */
|
|
3340
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
3341
|
-
/** Used to infer the `Object` constructor. */
|
|
3342
|
-
var objectCtorString = funcToString.call(Object);
|
|
3343
|
-
/**
|
|
3344
|
-
* Used to resolve the
|
|
3345
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
3346
|
-
* of values.
|
|
3347
|
-
*/
|
|
3348
|
-
var objectToString = objectProto.toString;
|
|
3349
|
-
/** Built-in value references. */
|
|
3350
|
-
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
3351
|
-
/**
|
|
3352
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3353
|
-
* and has a `typeof` result of "object".
|
|
3354
|
-
*
|
|
3355
|
-
* @static
|
|
3356
|
-
* @memberOf _
|
|
3357
|
-
* @since 4.0.0
|
|
3358
|
-
* @category Lang
|
|
3359
|
-
* @param {*} value The value to check.
|
|
3360
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
3361
|
-
* @example
|
|
3362
|
-
*
|
|
3363
|
-
* _.isObjectLike({});
|
|
3364
|
-
* // => true
|
|
3365
|
-
*
|
|
3366
|
-
* _.isObjectLike([1, 2, 3]);
|
|
3367
|
-
* // => true
|
|
3368
|
-
*
|
|
3369
|
-
* _.isObjectLike(_.noop);
|
|
3370
|
-
* // => false
|
|
3371
|
-
*
|
|
3372
|
-
* _.isObjectLike(null);
|
|
3373
|
-
* // => false
|
|
3374
|
-
*/
|
|
3375
|
-
function isObjectLike(value) {
|
|
3376
|
-
return !!value && typeof value == "object";
|
|
3377
|
-
}
|
|
3378
|
-
/**
|
|
3379
|
-
* Checks if `value` is a plain object, that is, an object created by the
|
|
3380
|
-
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
3381
|
-
*
|
|
3382
|
-
* @static
|
|
3383
|
-
* @memberOf _
|
|
3384
|
-
* @since 0.8.0
|
|
3385
|
-
* @category Lang
|
|
3386
|
-
* @param {*} value The value to check.
|
|
3387
|
-
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
3388
|
-
* @example
|
|
3389
|
-
*
|
|
3390
|
-
* function Foo() {
|
|
3391
|
-
* this.a = 1;
|
|
3392
|
-
* }
|
|
3393
|
-
*
|
|
3394
|
-
* _.isPlainObject(new Foo);
|
|
3395
|
-
* // => false
|
|
3396
|
-
*
|
|
3397
|
-
* _.isPlainObject([1, 2, 3]);
|
|
3398
|
-
* // => false
|
|
3399
|
-
*
|
|
3400
|
-
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
3401
|
-
* // => true
|
|
3402
|
-
*
|
|
3403
|
-
* _.isPlainObject(Object.create(null));
|
|
3404
|
-
* // => true
|
|
3405
|
-
*/
|
|
3406
|
-
function isPlainObject(value) {
|
|
3407
|
-
if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) return false;
|
|
3408
|
-
var proto = getPrototype(value);
|
|
3409
|
-
if (proto === null) return true;
|
|
3410
|
-
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
3411
|
-
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
3412
|
-
}
|
|
3413
|
-
module.exports = isPlainObject;
|
|
3414
|
-
}));
|
|
3415
|
-
//#endregion
|
|
3416
|
-
//#region ../../node_modules/.pnpm/lodash.isstring@4.0.1/node_modules/lodash.isstring/index.js
|
|
3417
|
-
var require_lodash_isstring = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3418
|
-
/**
|
|
3419
|
-
* lodash 4.0.1 (Custom Build) <https://lodash.com/>
|
|
3420
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
3421
|
-
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
3422
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
3423
|
-
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
3424
|
-
* Available under MIT license <https://lodash.com/license>
|
|
3425
|
-
*/
|
|
3426
|
-
/** `Object#toString` result references. */
|
|
3427
|
-
var stringTag = "[object String]";
|
|
3428
|
-
/**
|
|
3429
|
-
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
|
3430
|
-
* of values.
|
|
3431
|
-
*/
|
|
3432
|
-
var objectToString = Object.prototype.toString;
|
|
3433
|
-
/**
|
|
3434
|
-
* Checks if `value` is classified as an `Array` object.
|
|
3435
|
-
*
|
|
3436
|
-
* @static
|
|
3437
|
-
* @memberOf _
|
|
3438
|
-
* @type Function
|
|
3439
|
-
* @category Lang
|
|
3440
|
-
* @param {*} value The value to check.
|
|
3441
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
3442
|
-
* @example
|
|
3443
|
-
*
|
|
3444
|
-
* _.isArray([1, 2, 3]);
|
|
3445
|
-
* // => true
|
|
3446
|
-
*
|
|
3447
|
-
* _.isArray(document.body.children);
|
|
3448
|
-
* // => false
|
|
3449
|
-
*
|
|
3450
|
-
* _.isArray('abc');
|
|
3451
|
-
* // => false
|
|
3452
|
-
*
|
|
3453
|
-
* _.isArray(_.noop);
|
|
3454
|
-
* // => false
|
|
3455
|
-
*/
|
|
3456
|
-
var isArray = Array.isArray;
|
|
3457
|
-
/**
|
|
3458
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3459
|
-
* and has a `typeof` result of "object".
|
|
3460
|
-
*
|
|
3461
|
-
* @static
|
|
3462
|
-
* @memberOf _
|
|
3463
|
-
* @category Lang
|
|
3464
|
-
* @param {*} value The value to check.
|
|
3465
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
3466
|
-
* @example
|
|
3467
|
-
*
|
|
3468
|
-
* _.isObjectLike({});
|
|
3469
|
-
* // => true
|
|
3470
|
-
*
|
|
3471
|
-
* _.isObjectLike([1, 2, 3]);
|
|
3472
|
-
* // => true
|
|
3473
|
-
*
|
|
3474
|
-
* _.isObjectLike(_.noop);
|
|
3475
|
-
* // => false
|
|
3476
|
-
*
|
|
3477
|
-
* _.isObjectLike(null);
|
|
3478
|
-
* // => false
|
|
3479
|
-
*/
|
|
3480
|
-
function isObjectLike(value) {
|
|
3481
|
-
return !!value && typeof value == "object";
|
|
3482
|
-
}
|
|
3483
|
-
/**
|
|
3484
|
-
* Checks if `value` is classified as a `String` primitive or object.
|
|
3485
|
-
*
|
|
3486
|
-
* @static
|
|
3487
|
-
* @memberOf _
|
|
3488
|
-
* @category Lang
|
|
3489
|
-
* @param {*} value The value to check.
|
|
3490
|
-
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
|
|
3491
|
-
* @example
|
|
3492
|
-
*
|
|
3493
|
-
* _.isString('abc');
|
|
3494
|
-
* // => true
|
|
3495
|
-
*
|
|
3496
|
-
* _.isString(1);
|
|
3497
|
-
* // => false
|
|
3498
|
-
*/
|
|
3499
|
-
function isString(value) {
|
|
3500
|
-
return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag;
|
|
3501
|
-
}
|
|
3502
|
-
module.exports = isString;
|
|
3503
|
-
}));
|
|
3504
|
-
//#endregion
|
|
3505
|
-
//#region ../../node_modules/.pnpm/lodash.once@4.1.1/node_modules/lodash.once/index.js
|
|
3506
|
-
var require_lodash_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3507
|
-
/**
|
|
3508
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
3509
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
3510
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
3511
|
-
* Released under MIT license <https://lodash.com/license>
|
|
3512
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
3513
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
3514
|
-
*/
|
|
3515
|
-
/** Used as the `TypeError` message for "Functions" methods. */
|
|
3516
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
3517
|
-
/** Used as references for various `Number` constants. */
|
|
3518
|
-
var INFINITY = Infinity, MAX_INTEGER = 17976931348623157e292, NAN = NaN;
|
|
3519
|
-
/** `Object#toString` result references. */
|
|
3520
|
-
var symbolTag = "[object Symbol]";
|
|
3521
|
-
/** Used to match leading and trailing whitespace. */
|
|
3522
|
-
var reTrim = /^\s+|\s+$/g;
|
|
3523
|
-
/** Used to detect bad signed hexadecimal string values. */
|
|
3524
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
3525
|
-
/** Used to detect binary string values. */
|
|
3526
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
3527
|
-
/** Used to detect octal string values. */
|
|
3528
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
3529
|
-
/** Built-in method references without a dependency on `root`. */
|
|
3530
|
-
var freeParseInt = parseInt;
|
|
3531
|
-
/**
|
|
3532
|
-
* Used to resolve the
|
|
3533
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
3534
|
-
* of values.
|
|
3535
|
-
*/
|
|
3536
|
-
var objectToString = Object.prototype.toString;
|
|
3537
|
-
/**
|
|
3538
|
-
* Creates a function that invokes `func`, with the `this` binding and arguments
|
|
3539
|
-
* of the created function, while it's called less than `n` times. Subsequent
|
|
3540
|
-
* calls to the created function return the result of the last `func` invocation.
|
|
3541
|
-
*
|
|
3542
|
-
* @static
|
|
3543
|
-
* @memberOf _
|
|
3544
|
-
* @since 3.0.0
|
|
3545
|
-
* @category Function
|
|
3546
|
-
* @param {number} n The number of calls at which `func` is no longer invoked.
|
|
3547
|
-
* @param {Function} func The function to restrict.
|
|
3548
|
-
* @returns {Function} Returns the new restricted function.
|
|
3549
|
-
* @example
|
|
3550
|
-
*
|
|
3551
|
-
* jQuery(element).on('click', _.before(5, addContactToList));
|
|
3552
|
-
* // => Allows adding up to 4 contacts to the list.
|
|
3553
|
-
*/
|
|
3554
|
-
function before(n, func) {
|
|
3555
|
-
var result;
|
|
3556
|
-
if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
|
|
3557
|
-
n = toInteger(n);
|
|
3558
|
-
return function() {
|
|
3559
|
-
if (--n > 0) result = func.apply(this, arguments);
|
|
3560
|
-
if (n <= 1) func = void 0;
|
|
3561
|
-
return result;
|
|
3562
|
-
};
|
|
3563
|
-
}
|
|
3564
|
-
/**
|
|
3565
|
-
* Creates a function that is restricted to invoking `func` once. Repeat calls
|
|
3566
|
-
* to the function return the value of the first invocation. The `func` is
|
|
3567
|
-
* invoked with the `this` binding and arguments of the created function.
|
|
3568
|
-
*
|
|
3569
|
-
* @static
|
|
3570
|
-
* @memberOf _
|
|
3571
|
-
* @since 0.1.0
|
|
3572
|
-
* @category Function
|
|
3573
|
-
* @param {Function} func The function to restrict.
|
|
3574
|
-
* @returns {Function} Returns the new restricted function.
|
|
3575
|
-
* @example
|
|
3576
|
-
*
|
|
3577
|
-
* var initialize = _.once(createApplication);
|
|
3578
|
-
* initialize();
|
|
3579
|
-
* initialize();
|
|
3580
|
-
* // => `createApplication` is invoked once
|
|
3581
|
-
*/
|
|
3582
|
-
function once(func) {
|
|
3583
|
-
return before(2, func);
|
|
3584
|
-
}
|
|
3585
|
-
/**
|
|
3586
|
-
* Checks if `value` is the
|
|
3587
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
3588
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
3589
|
-
*
|
|
3590
|
-
* @static
|
|
3591
|
-
* @memberOf _
|
|
3592
|
-
* @since 0.1.0
|
|
3593
|
-
* @category Lang
|
|
3594
|
-
* @param {*} value The value to check.
|
|
3595
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
3596
|
-
* @example
|
|
3597
|
-
*
|
|
3598
|
-
* _.isObject({});
|
|
3599
|
-
* // => true
|
|
3600
|
-
*
|
|
3601
|
-
* _.isObject([1, 2, 3]);
|
|
3602
|
-
* // => true
|
|
3603
|
-
*
|
|
3604
|
-
* _.isObject(_.noop);
|
|
3605
|
-
* // => true
|
|
3606
|
-
*
|
|
3607
|
-
* _.isObject(null);
|
|
3608
|
-
* // => false
|
|
3609
|
-
*/
|
|
3610
|
-
function isObject(value) {
|
|
3611
|
-
var type = typeof value;
|
|
3612
|
-
return !!value && (type == "object" || type == "function");
|
|
3613
|
-
}
|
|
3614
|
-
/**
|
|
3615
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3616
|
-
* and has a `typeof` result of "object".
|
|
3617
|
-
*
|
|
3618
|
-
* @static
|
|
3619
|
-
* @memberOf _
|
|
3620
|
-
* @since 4.0.0
|
|
3621
|
-
* @category Lang
|
|
3622
|
-
* @param {*} value The value to check.
|
|
3623
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
3624
|
-
* @example
|
|
3625
|
-
*
|
|
3626
|
-
* _.isObjectLike({});
|
|
3627
|
-
* // => true
|
|
3628
|
-
*
|
|
3629
|
-
* _.isObjectLike([1, 2, 3]);
|
|
3630
|
-
* // => true
|
|
3631
|
-
*
|
|
3632
|
-
* _.isObjectLike(_.noop);
|
|
3633
|
-
* // => false
|
|
3634
|
-
*
|
|
3635
|
-
* _.isObjectLike(null);
|
|
3636
|
-
* // => false
|
|
3637
|
-
*/
|
|
3638
|
-
function isObjectLike(value) {
|
|
3639
|
-
return !!value && typeof value == "object";
|
|
3640
|
-
}
|
|
3641
|
-
/**
|
|
3642
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
3643
|
-
*
|
|
3644
|
-
* @static
|
|
3645
|
-
* @memberOf _
|
|
3646
|
-
* @since 4.0.0
|
|
3647
|
-
* @category Lang
|
|
3648
|
-
* @param {*} value The value to check.
|
|
3649
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
3650
|
-
* @example
|
|
3651
|
-
*
|
|
3652
|
-
* _.isSymbol(Symbol.iterator);
|
|
3653
|
-
* // => true
|
|
3654
|
-
*
|
|
3655
|
-
* _.isSymbol('abc');
|
|
3656
|
-
* // => false
|
|
3657
|
-
*/
|
|
3658
|
-
function isSymbol(value) {
|
|
3659
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
3660
|
-
}
|
|
3661
|
-
/**
|
|
3662
|
-
* Converts `value` to a finite number.
|
|
3663
|
-
*
|
|
3664
|
-
* @static
|
|
3665
|
-
* @memberOf _
|
|
3666
|
-
* @since 4.12.0
|
|
3667
|
-
* @category Lang
|
|
3668
|
-
* @param {*} value The value to convert.
|
|
3669
|
-
* @returns {number} Returns the converted number.
|
|
3670
|
-
* @example
|
|
3671
|
-
*
|
|
3672
|
-
* _.toFinite(3.2);
|
|
3673
|
-
* // => 3.2
|
|
3674
|
-
*
|
|
3675
|
-
* _.toFinite(Number.MIN_VALUE);
|
|
3676
|
-
* // => 5e-324
|
|
3677
|
-
*
|
|
3678
|
-
* _.toFinite(Infinity);
|
|
3679
|
-
* // => 1.7976931348623157e+308
|
|
3680
|
-
*
|
|
3681
|
-
* _.toFinite('3.2');
|
|
3682
|
-
* // => 3.2
|
|
3683
|
-
*/
|
|
3684
|
-
function toFinite(value) {
|
|
3685
|
-
if (!value) return value === 0 ? value : 0;
|
|
3686
|
-
value = toNumber(value);
|
|
3687
|
-
if (value === INFINITY || value === -INFINITY) return (value < 0 ? -1 : 1) * MAX_INTEGER;
|
|
3688
|
-
return value === value ? value : 0;
|
|
3689
|
-
}
|
|
3690
|
-
/**
|
|
3691
|
-
* Converts `value` to an integer.
|
|
3692
|
-
*
|
|
3693
|
-
* **Note:** This method is loosely based on
|
|
3694
|
-
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
3695
|
-
*
|
|
3696
|
-
* @static
|
|
3697
|
-
* @memberOf _
|
|
3698
|
-
* @since 4.0.0
|
|
3699
|
-
* @category Lang
|
|
3700
|
-
* @param {*} value The value to convert.
|
|
3701
|
-
* @returns {number} Returns the converted integer.
|
|
3702
|
-
* @example
|
|
3703
|
-
*
|
|
3704
|
-
* _.toInteger(3.2);
|
|
3705
|
-
* // => 3
|
|
3706
|
-
*
|
|
3707
|
-
* _.toInteger(Number.MIN_VALUE);
|
|
3708
|
-
* // => 0
|
|
3709
|
-
*
|
|
3710
|
-
* _.toInteger(Infinity);
|
|
3711
|
-
* // => 1.7976931348623157e+308
|
|
3712
|
-
*
|
|
3713
|
-
* _.toInteger('3.2');
|
|
3714
|
-
* // => 3
|
|
3715
|
-
*/
|
|
3716
|
-
function toInteger(value) {
|
|
3717
|
-
var result = toFinite(value), remainder = result % 1;
|
|
3718
|
-
return result === result ? remainder ? result - remainder : result : 0;
|
|
3719
|
-
}
|
|
3720
|
-
/**
|
|
3721
|
-
* Converts `value` to a number.
|
|
3722
|
-
*
|
|
3723
|
-
* @static
|
|
3724
|
-
* @memberOf _
|
|
3725
|
-
* @since 4.0.0
|
|
3726
|
-
* @category Lang
|
|
3727
|
-
* @param {*} value The value to process.
|
|
3728
|
-
* @returns {number} Returns the number.
|
|
3729
|
-
* @example
|
|
3730
|
-
*
|
|
3731
|
-
* _.toNumber(3.2);
|
|
3732
|
-
* // => 3.2
|
|
3733
|
-
*
|
|
3734
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
3735
|
-
* // => 5e-324
|
|
3736
|
-
*
|
|
3737
|
-
* _.toNumber(Infinity);
|
|
3738
|
-
* // => Infinity
|
|
3739
|
-
*
|
|
3740
|
-
* _.toNumber('3.2');
|
|
3741
|
-
* // => 3.2
|
|
3742
|
-
*/
|
|
3743
|
-
function toNumber(value) {
|
|
3744
|
-
if (typeof value == "number") return value;
|
|
3745
|
-
if (isSymbol(value)) return NAN;
|
|
3746
|
-
if (isObject(value)) {
|
|
3747
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
3748
|
-
value = isObject(other) ? other + "" : other;
|
|
3749
|
-
}
|
|
3750
|
-
if (typeof value != "string") return value === 0 ? value : +value;
|
|
3751
|
-
value = value.replace(reTrim, "");
|
|
3752
|
-
var isBinary = reIsBinary.test(value);
|
|
3753
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
3754
|
-
}
|
|
3755
|
-
module.exports = once;
|
|
3756
|
-
}));
|
|
3757
|
-
//#endregion
|
|
3758
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/sign.js
|
|
3759
|
-
var require_sign = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3760
|
-
var timespan = require_timespan();
|
|
3761
|
-
var PS_SUPPORTED = require_psSupported();
|
|
3762
|
-
var validateAsymmetricKey = require_validateAsymmetricKey();
|
|
3763
|
-
var jws = require_jws();
|
|
3764
|
-
var includes = require_lodash_includes();
|
|
3765
|
-
var isBoolean = require_lodash_isboolean();
|
|
3766
|
-
var isInteger = require_lodash_isinteger();
|
|
3767
|
-
var isNumber = require_lodash_isnumber();
|
|
3768
|
-
var isPlainObject = require_lodash_isplainobject();
|
|
3769
|
-
var isString = require_lodash_isstring();
|
|
3770
|
-
var once = require_lodash_once();
|
|
3771
|
-
var { KeyObject, createSecretKey, createPrivateKey } = __require("crypto");
|
|
3772
|
-
var SUPPORTED_ALGS = [
|
|
3773
|
-
"RS256",
|
|
3774
|
-
"RS384",
|
|
3775
|
-
"RS512",
|
|
3776
|
-
"ES256",
|
|
3777
|
-
"ES384",
|
|
3778
|
-
"ES512",
|
|
3779
|
-
"HS256",
|
|
3780
|
-
"HS384",
|
|
3781
|
-
"HS512",
|
|
3782
|
-
"none"
|
|
3783
|
-
];
|
|
3784
|
-
if (PS_SUPPORTED) SUPPORTED_ALGS.splice(3, 0, "PS256", "PS384", "PS512");
|
|
3785
|
-
var sign_options_schema = {
|
|
3786
|
-
expiresIn: {
|
|
3787
|
-
isValid: function(value) {
|
|
3788
|
-
return isInteger(value) || isString(value) && value;
|
|
3789
|
-
},
|
|
3790
|
-
message: "\"expiresIn\" should be a number of seconds or string representing a timespan"
|
|
3791
|
-
},
|
|
3792
|
-
notBefore: {
|
|
3793
|
-
isValid: function(value) {
|
|
3794
|
-
return isInteger(value) || isString(value) && value;
|
|
3795
|
-
},
|
|
3796
|
-
message: "\"notBefore\" should be a number of seconds or string representing a timespan"
|
|
3797
|
-
},
|
|
3798
|
-
audience: {
|
|
3799
|
-
isValid: function(value) {
|
|
3800
|
-
return isString(value) || Array.isArray(value);
|
|
3801
|
-
},
|
|
3802
|
-
message: "\"audience\" must be a string or array"
|
|
3803
|
-
},
|
|
3804
|
-
algorithm: {
|
|
3805
|
-
isValid: includes.bind(null, SUPPORTED_ALGS),
|
|
3806
|
-
message: "\"algorithm\" must be a valid string enum value"
|
|
3807
|
-
},
|
|
3808
|
-
header: {
|
|
3809
|
-
isValid: isPlainObject,
|
|
3810
|
-
message: "\"header\" must be an object"
|
|
3811
|
-
},
|
|
3812
|
-
encoding: {
|
|
3813
|
-
isValid: isString,
|
|
3814
|
-
message: "\"encoding\" must be a string"
|
|
3815
|
-
},
|
|
3816
|
-
issuer: {
|
|
3817
|
-
isValid: isString,
|
|
3818
|
-
message: "\"issuer\" must be a string"
|
|
3819
|
-
},
|
|
3820
|
-
subject: {
|
|
3821
|
-
isValid: isString,
|
|
3822
|
-
message: "\"subject\" must be a string"
|
|
3823
|
-
},
|
|
3824
|
-
jwtid: {
|
|
3825
|
-
isValid: isString,
|
|
3826
|
-
message: "\"jwtid\" must be a string"
|
|
3827
|
-
},
|
|
3828
|
-
noTimestamp: {
|
|
3829
|
-
isValid: isBoolean,
|
|
3830
|
-
message: "\"noTimestamp\" must be a boolean"
|
|
3831
|
-
},
|
|
3832
|
-
keyid: {
|
|
3833
|
-
isValid: isString,
|
|
3834
|
-
message: "\"keyid\" must be a string"
|
|
3835
|
-
},
|
|
3836
|
-
mutatePayload: {
|
|
3837
|
-
isValid: isBoolean,
|
|
3838
|
-
message: "\"mutatePayload\" must be a boolean"
|
|
3839
|
-
},
|
|
3840
|
-
allowInsecureKeySizes: {
|
|
3841
|
-
isValid: isBoolean,
|
|
3842
|
-
message: "\"allowInsecureKeySizes\" must be a boolean"
|
|
3843
|
-
},
|
|
3844
|
-
allowInvalidAsymmetricKeyTypes: {
|
|
3845
|
-
isValid: isBoolean,
|
|
3846
|
-
message: "\"allowInvalidAsymmetricKeyTypes\" must be a boolean"
|
|
3847
|
-
}
|
|
3848
|
-
};
|
|
3849
|
-
var registered_claims_schema = {
|
|
3850
|
-
iat: {
|
|
3851
|
-
isValid: isNumber,
|
|
3852
|
-
message: "\"iat\" should be a number of seconds"
|
|
3853
|
-
},
|
|
3854
|
-
exp: {
|
|
3855
|
-
isValid: isNumber,
|
|
3856
|
-
message: "\"exp\" should be a number of seconds"
|
|
3857
|
-
},
|
|
3858
|
-
nbf: {
|
|
3859
|
-
isValid: isNumber,
|
|
3860
|
-
message: "\"nbf\" should be a number of seconds"
|
|
3861
|
-
}
|
|
3862
|
-
};
|
|
3863
|
-
function validate(schema, allowUnknown, object, parameterName) {
|
|
3864
|
-
if (!isPlainObject(object)) throw new Error("Expected \"" + parameterName + "\" to be a plain object.");
|
|
3865
|
-
Object.keys(object).forEach(function(key) {
|
|
3866
|
-
const validator = schema[key];
|
|
3867
|
-
if (!validator) {
|
|
3868
|
-
if (!allowUnknown) throw new Error("\"" + key + "\" is not allowed in \"" + parameterName + "\"");
|
|
3869
|
-
return;
|
|
3870
|
-
}
|
|
3871
|
-
if (!validator.isValid(object[key])) throw new Error(validator.message);
|
|
3872
|
-
});
|
|
3873
|
-
}
|
|
3874
|
-
function validateOptions(options) {
|
|
3875
|
-
return validate(sign_options_schema, false, options, "options");
|
|
3876
|
-
}
|
|
3877
|
-
function validatePayload(payload) {
|
|
3878
|
-
return validate(registered_claims_schema, true, payload, "payload");
|
|
3879
|
-
}
|
|
3880
|
-
var options_to_payload = {
|
|
3881
|
-
"audience": "aud",
|
|
3882
|
-
"issuer": "iss",
|
|
3883
|
-
"subject": "sub",
|
|
3884
|
-
"jwtid": "jti"
|
|
3885
|
-
};
|
|
3886
|
-
var options_for_objects = [
|
|
3887
|
-
"expiresIn",
|
|
3888
|
-
"notBefore",
|
|
3889
|
-
"noTimestamp",
|
|
3890
|
-
"audience",
|
|
3891
|
-
"issuer",
|
|
3892
|
-
"subject",
|
|
3893
|
-
"jwtid"
|
|
3894
|
-
];
|
|
3895
|
-
module.exports = function(payload, secretOrPrivateKey, options, callback) {
|
|
3896
|
-
if (typeof options === "function") {
|
|
3897
|
-
callback = options;
|
|
3898
|
-
options = {};
|
|
3899
|
-
} else options = options || {};
|
|
3900
|
-
const isObjectPayload = typeof payload === "object" && !Buffer.isBuffer(payload);
|
|
3901
|
-
const header = Object.assign({
|
|
3902
|
-
alg: options.algorithm || "HS256",
|
|
3903
|
-
typ: isObjectPayload ? "JWT" : void 0,
|
|
3904
|
-
kid: options.keyid
|
|
3905
|
-
}, options.header);
|
|
3906
|
-
function failure(err) {
|
|
3907
|
-
if (callback) return callback(err);
|
|
3908
|
-
throw err;
|
|
3909
|
-
}
|
|
3910
|
-
if (!secretOrPrivateKey && options.algorithm !== "none") return failure(/* @__PURE__ */ new Error("secretOrPrivateKey must have a value"));
|
|
3911
|
-
if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) try {
|
|
3912
|
-
secretOrPrivateKey = createPrivateKey(secretOrPrivateKey);
|
|
3913
|
-
} catch (_) {
|
|
3914
|
-
try {
|
|
3915
|
-
secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === "string" ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey);
|
|
3916
|
-
} catch (_) {
|
|
3917
|
-
return failure(/* @__PURE__ */ new Error("secretOrPrivateKey is not valid key material"));
|
|
3918
|
-
}
|
|
3919
|
-
}
|
|
3920
|
-
if (header.alg.startsWith("HS") && secretOrPrivateKey.type !== "secret") return failure(/* @__PURE__ */ new Error(`secretOrPrivateKey must be a symmetric key when using ${header.alg}`));
|
|
3921
|
-
else if (/^(?:RS|PS|ES)/.test(header.alg)) {
|
|
3922
|
-
if (secretOrPrivateKey.type !== "private") return failure(/* @__PURE__ */ new Error(`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`));
|
|
3923
|
-
if (!options.allowInsecureKeySizes && !header.alg.startsWith("ES") && secretOrPrivateKey.asymmetricKeyDetails !== void 0 && secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) return failure(/* @__PURE__ */ new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`));
|
|
3924
|
-
}
|
|
3925
|
-
if (typeof payload === "undefined") return failure(/* @__PURE__ */ new Error("payload is required"));
|
|
3926
|
-
else if (isObjectPayload) {
|
|
3927
|
-
try {
|
|
3928
|
-
validatePayload(payload);
|
|
3929
|
-
} catch (error) {
|
|
3930
|
-
return failure(error);
|
|
3931
|
-
}
|
|
3932
|
-
if (!options.mutatePayload) payload = Object.assign({}, payload);
|
|
3933
|
-
} else {
|
|
3934
|
-
const invalid_options = options_for_objects.filter(function(opt) {
|
|
3935
|
-
return typeof options[opt] !== "undefined";
|
|
3936
|
-
});
|
|
3937
|
-
if (invalid_options.length > 0) return failure(/* @__PURE__ */ new Error("invalid " + invalid_options.join(",") + " option for " + typeof payload + " payload"));
|
|
3938
|
-
}
|
|
3939
|
-
if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") return failure(/* @__PURE__ */ new Error("Bad \"options.expiresIn\" option the payload already has an \"exp\" property."));
|
|
3940
|
-
if (typeof payload.nbf !== "undefined" && typeof options.notBefore !== "undefined") return failure(/* @__PURE__ */ new Error("Bad \"options.notBefore\" option the payload already has an \"nbf\" property."));
|
|
3941
|
-
try {
|
|
3942
|
-
validateOptions(options);
|
|
3943
|
-
} catch (error) {
|
|
3944
|
-
return failure(error);
|
|
3945
|
-
}
|
|
3946
|
-
if (!options.allowInvalidAsymmetricKeyTypes) try {
|
|
3947
|
-
validateAsymmetricKey(header.alg, secretOrPrivateKey);
|
|
3948
|
-
} catch (error) {
|
|
3949
|
-
return failure(error);
|
|
3950
|
-
}
|
|
3951
|
-
const timestamp = payload.iat || Math.floor(Date.now() / 1e3);
|
|
3952
|
-
if (options.noTimestamp) delete payload.iat;
|
|
3953
|
-
else if (isObjectPayload) payload.iat = timestamp;
|
|
3954
|
-
if (typeof options.notBefore !== "undefined") {
|
|
3955
|
-
try {
|
|
3956
|
-
payload.nbf = timespan(options.notBefore, timestamp);
|
|
3957
|
-
} catch (err) {
|
|
3958
|
-
return failure(err);
|
|
3959
|
-
}
|
|
3960
|
-
if (typeof payload.nbf === "undefined") return failure(/* @__PURE__ */ new Error("\"notBefore\" should be a number of seconds or string representing a timespan eg: \"1d\", \"20h\", 60"));
|
|
3961
|
-
}
|
|
3962
|
-
if (typeof options.expiresIn !== "undefined" && typeof payload === "object") {
|
|
3963
|
-
try {
|
|
3964
|
-
payload.exp = timespan(options.expiresIn, timestamp);
|
|
3965
|
-
} catch (err) {
|
|
3966
|
-
return failure(err);
|
|
3967
|
-
}
|
|
3968
|
-
if (typeof payload.exp === "undefined") return failure(/* @__PURE__ */ new Error("\"expiresIn\" should be a number of seconds or string representing a timespan eg: \"1d\", \"20h\", 60"));
|
|
3969
|
-
}
|
|
3970
|
-
Object.keys(options_to_payload).forEach(function(key) {
|
|
3971
|
-
const claim = options_to_payload[key];
|
|
3972
|
-
if (typeof options[key] !== "undefined") {
|
|
3973
|
-
if (typeof payload[claim] !== "undefined") return failure(/* @__PURE__ */ new Error("Bad \"options." + key + "\" option. The payload already has an \"" + claim + "\" property."));
|
|
3974
|
-
payload[claim] = options[key];
|
|
3975
|
-
}
|
|
3976
|
-
});
|
|
3977
|
-
const encoding = options.encoding || "utf8";
|
|
3978
|
-
if (typeof callback === "function") {
|
|
3979
|
-
callback = callback && once(callback);
|
|
3980
|
-
jws.createSign({
|
|
3981
|
-
header,
|
|
3982
|
-
privateKey: secretOrPrivateKey,
|
|
3983
|
-
payload,
|
|
3984
|
-
encoding
|
|
3985
|
-
}).once("error", callback).once("done", function(signature) {
|
|
3986
|
-
if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) return callback(/* @__PURE__ */ new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`));
|
|
3987
|
-
callback(null, signature);
|
|
3988
|
-
});
|
|
3989
|
-
} else {
|
|
3990
|
-
let signature = jws.sign({
|
|
3991
|
-
header,
|
|
3992
|
-
payload,
|
|
3993
|
-
secret: secretOrPrivateKey,
|
|
3994
|
-
encoding
|
|
3995
|
-
});
|
|
3996
|
-
if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`);
|
|
3997
|
-
return signature;
|
|
3998
|
-
}
|
|
3999
|
-
};
|
|
4000
|
-
}));
|
|
4001
|
-
//#endregion
|
|
4002
|
-
//#region ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/index.js
|
|
4003
|
-
var require_jsonwebtoken = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4004
|
-
module.exports = {
|
|
4005
|
-
decode: require_decode(),
|
|
4006
|
-
verify: require_verify(),
|
|
4007
|
-
sign: require_sign(),
|
|
4008
|
-
JsonWebTokenError: require_JsonWebTokenError(),
|
|
4009
|
-
NotBeforeError: require_NotBeforeError(),
|
|
4010
|
-
TokenExpiredError: require_TokenExpiredError()
|
|
4011
|
-
};
|
|
4012
|
-
}));
|
|
4013
|
-
//#endregion
|
|
4014
|
-
//#region src/auth/jwt.ts
|
|
4015
|
-
var jwt_exports = /* @__PURE__ */ __exportAll({
|
|
4016
|
-
configureJwt: () => configureJwt,
|
|
4017
|
-
generateAccessToken: () => generateAccessToken,
|
|
4018
|
-
generateRefreshToken: () => generateRefreshToken,
|
|
4019
|
-
getAccessTokenExpiry: () => getAccessTokenExpiry,
|
|
4020
|
-
getAccessTokenExpiryMs: () => getAccessTokenExpiryMs,
|
|
4021
|
-
getRefreshTokenExpiry: () => getRefreshTokenExpiry,
|
|
4022
|
-
hashRefreshToken: () => hashRefreshToken,
|
|
4023
|
-
verifyAccessToken: () => verifyAccessToken
|
|
4024
|
-
});
|
|
4025
|
-
var import_jsonwebtoken = /* @__PURE__ */ __toESM(require_jsonwebtoken(), 1);
|
|
4026
|
-
var jwtConfig = {
|
|
4027
|
-
secret: "",
|
|
4028
|
-
accessExpiresIn: "1h",
|
|
4029
|
-
refreshExpiresIn: "30d"
|
|
4030
|
-
};
|
|
4031
|
-
/**
|
|
4032
|
-
* Configure JWT settings - call this during initialization.
|
|
4033
|
-
* Validates the secret strength to prevent deployment with default/weak secrets.
|
|
4034
|
-
*/
|
|
4035
|
-
function configureJwt(config) {
|
|
4036
|
-
const weakSecrets = new Set([
|
|
4037
|
-
"secret",
|
|
4038
|
-
"jwt-secret",
|
|
4039
|
-
"jwt_secret",
|
|
4040
|
-
"your-secret",
|
|
4041
|
-
"your-super-secret-jwt-key-change-in-production",
|
|
4042
|
-
"super-secret-jwt-key-change-in-production",
|
|
4043
|
-
"change-me",
|
|
4044
|
-
"changeme",
|
|
4045
|
-
"password",
|
|
4046
|
-
"test",
|
|
4047
|
-
"mysecret",
|
|
4048
|
-
"my-secret",
|
|
4049
|
-
"my_secret",
|
|
4050
|
-
"example-secret",
|
|
4051
|
-
"please-change-me",
|
|
4052
|
-
"replace-this-with-a-real-secret",
|
|
4053
|
-
"default-secret",
|
|
4054
|
-
"rebase_saas_jwt_secret_must_be_long_long_long_long",
|
|
4055
|
-
"rebase_saas_service_key_must_be_long_long_long_long"
|
|
4056
|
-
]);
|
|
4057
|
-
if (!config.secret || config.secret.length < 32) throw new Error("JWT secret is too short. Must be at least 32 characters. Generate one with: node -e \"logger.info(require('crypto').randomBytes(48).toString('base64'))\"");
|
|
4058
|
-
if (weakSecrets.has(config.secret.toLowerCase())) throw new Error("JWT secret is a known default/weak value. Please use a strong, randomly generated secret. Generate one with: node -e \"logger.info(require('crypto').randomBytes(48).toString('base64'))\"");
|
|
4059
|
-
jwtConfig = {
|
|
4060
|
-
...jwtConfig,
|
|
4061
|
-
...config
|
|
4062
|
-
};
|
|
4063
|
-
}
|
|
4064
|
-
/**
|
|
4065
|
-
* Generate an access token (short-lived, 1 hour by default)
|
|
4066
|
-
*/
|
|
4067
|
-
function generateAccessToken(userId, roles, aal = "aal1", customClaims) {
|
|
4068
|
-
if (!jwtConfig.secret) throw new Error("JWT secret not configured. Call configureJwt() first.");
|
|
4069
|
-
const payload = {
|
|
4070
|
-
userId,
|
|
4071
|
-
roles,
|
|
4072
|
-
aal,
|
|
4073
|
-
...customClaims
|
|
4074
|
-
};
|
|
4075
|
-
return import_jsonwebtoken.default.sign(payload, jwtConfig.secret, {
|
|
4076
|
-
expiresIn: jwtConfig.accessExpiresIn,
|
|
4077
|
-
algorithm: "HS256"
|
|
4078
|
-
});
|
|
4079
|
-
}
|
|
4080
|
-
/**
|
|
4081
|
-
* Get the expiration time of an access token in milliseconds from now
|
|
4082
|
-
*/
|
|
4083
|
-
function getAccessTokenExpiryMs() {
|
|
4084
|
-
const match = (jwtConfig.accessExpiresIn || "1h").match(/^(\d+)([dhms])$/);
|
|
4085
|
-
if (!match) return 3600 * 1e3;
|
|
4086
|
-
const value = parseInt(match[1], 10);
|
|
4087
|
-
switch (match[2]) {
|
|
4088
|
-
case "d": return value * 24 * 60 * 60 * 1e3;
|
|
4089
|
-
case "h": return value * 60 * 60 * 1e3;
|
|
4090
|
-
case "m": return value * 60 * 1e3;
|
|
4091
|
-
case "s": return value * 1e3;
|
|
4092
|
-
default: return 3600 * 1e3;
|
|
4093
|
-
}
|
|
4094
|
-
}
|
|
4095
|
-
/**
|
|
4096
|
-
* Get the expiration timestamp for an access token
|
|
4097
|
-
*/
|
|
4098
|
-
function getAccessTokenExpiry() {
|
|
4099
|
-
return Date.now() + getAccessTokenExpiryMs();
|
|
4100
|
-
}
|
|
4101
|
-
/**
|
|
4102
|
-
* Verify and decode an access token
|
|
4103
|
-
*/
|
|
4104
|
-
function verifyAccessToken(token) {
|
|
4105
|
-
if (!jwtConfig.secret) throw new Error("JWT secret not configured. Call configureJwt() first.");
|
|
4106
|
-
try {
|
|
4107
|
-
const decoded = import_jsonwebtoken.default.verify(token, jwtConfig.secret, { algorithms: ["HS256"] });
|
|
4108
|
-
const id = decoded.userId || decoded.uid || decoded.sub;
|
|
4109
|
-
if (!id) {
|
|
4110
|
-
logger.error("[JWT] Verification failed: missing id in payload", { detail: decoded });
|
|
4111
|
-
return null;
|
|
4112
|
-
}
|
|
4113
|
-
const aal = decoded.aal === "aal1" || decoded.aal === "aal2" ? decoded.aal : "aal1";
|
|
4114
|
-
return {
|
|
4115
|
-
userId: id,
|
|
4116
|
-
roles: decoded.roles || [],
|
|
4117
|
-
aal
|
|
4118
|
-
};
|
|
4119
|
-
} catch (error) {
|
|
4120
|
-
logger.error("[JWT] Verification failed", {
|
|
4121
|
-
error,
|
|
4122
|
-
detail: token.substring(0, 15)
|
|
4123
|
-
});
|
|
4124
|
-
return null;
|
|
4125
|
-
}
|
|
4126
|
-
}
|
|
4127
|
-
/**
|
|
4128
|
-
* Generate a random refresh token (long-lived, 30 days by default)
|
|
4129
|
-
*/
|
|
4130
|
-
function generateRefreshToken() {
|
|
4131
|
-
return randomBytes(40).toString("hex");
|
|
4132
|
-
}
|
|
4133
|
-
/**
|
|
4134
|
-
* Hash a refresh token for database storage (don't store raw tokens)
|
|
4135
|
-
*/
|
|
4136
|
-
function hashRefreshToken(token) {
|
|
4137
|
-
return createHash("sha256").update(token).digest("hex");
|
|
4138
|
-
}
|
|
4139
|
-
/**
|
|
4140
|
-
* Calculate refresh token expiration date
|
|
4141
|
-
*/
|
|
4142
|
-
function getRefreshTokenExpiry() {
|
|
4143
|
-
const match = (jwtConfig.refreshExpiresIn || "30d").match(/^(\d+)([dhms])$/);
|
|
4144
|
-
if (!match) return new Date(Date.now() + 720 * 60 * 60 * 1e3);
|
|
4145
|
-
const value = parseInt(match[1], 10);
|
|
4146
|
-
const unit = match[2];
|
|
4147
|
-
let ms;
|
|
4148
|
-
switch (unit) {
|
|
4149
|
-
case "d":
|
|
4150
|
-
ms = value * 24 * 60 * 60 * 1e3;
|
|
4151
|
-
break;
|
|
4152
|
-
case "h":
|
|
4153
|
-
ms = value * 60 * 60 * 1e3;
|
|
4154
|
-
break;
|
|
4155
|
-
case "m":
|
|
4156
|
-
ms = value * 60 * 1e3;
|
|
4157
|
-
break;
|
|
4158
|
-
case "s":
|
|
4159
|
-
ms = value * 1e3;
|
|
4160
|
-
break;
|
|
4161
|
-
default: ms = 720 * 60 * 60 * 1e3;
|
|
4162
|
-
}
|
|
4163
|
-
return new Date(Date.now() + ms);
|
|
4164
|
-
}
|
|
4165
|
-
//#endregion
|
|
4166
|
-
export { getRefreshTokenExpiry as a, verifyAccessToken as c, require_ecdsa_sig_formatter as d, getAccessTokenExpiry as i, require_jsonwebtoken as l, generateAccessToken as n, hashRefreshToken as o, generateRefreshToken as r, jwt_exports as s, configureJwt as t, require_jws as u };
|
|
4167
|
-
|
|
4168
|
-
//# sourceMappingURL=jwt-DHcQRGC3.js.map
|