swagger-client 3.33.1 → 3.33.2

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.
@@ -40,12 +40,13 @@ __webpack_require__.r(__webpack_exports__);
40
40
  /* harmony export */ execute: () => (/* binding */ execute),
41
41
  /* harmony export */ self: () => (/* binding */ self)
42
42
  /* harmony export */ });
43
- /* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57427);
44
- /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(43628);
43
+ /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43628);
45
44
  /* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(24955);
46
- /* harmony import */ var openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29646);
45
+ /* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(46455);
46
+ /* harmony import */ var openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29646);
47
+ /* harmony import */ var _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2211);
47
48
  /* harmony import */ var _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(22874);
48
- /* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(96664);
49
+ /* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(96664);
49
50
  /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3832);
50
51
  /* harmony import */ var _http_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51670);
51
52
  /* harmony import */ var _http_serializers_request_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29382);
@@ -318,13 +319,20 @@ function buildRequest(options) {
318
319
  // If the cookie convenience object exists in our request,
319
320
  // serialize its content and then delete the cookie object.
320
321
  if (req.cookies && Object.keys(req.cookies).length) {
321
- const cookieString = Object.keys(req.cookies).reduce((prev, cookieName) => {
322
- const cookieValue = req.cookies[cookieName];
323
- const prefix = prev ? '&' : '';
324
- const stringified = cookie__WEBPACK_IMPORTED_MODULE_0__.serialize(cookieName, cookieValue);
325
- return prev + prefix + stringified;
326
- }, '');
327
- req.headers.Cookie = cookieString;
322
+ const cookieString = (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.serializeCookie)(req.cookies, {
323
+ encoders: {
324
+ value: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.cookieValueLenientEncoder
325
+ },
326
+ validators: {
327
+ name: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.cookieNameLenientValidator,
328
+ value: _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.cookieValueLenientValidator
329
+ }
330
+ });
331
+ if ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_14__["default"])(req.headers.Cookie)) {
332
+ req.headers.Cookie += `; ${cookieString}`;
333
+ } else {
334
+ req.headers.Cookie = cookieString;
335
+ }
328
336
  }
329
337
  if (req.cookies) {
330
338
  // even if no cookies were defined, we need to remove
@@ -377,7 +385,7 @@ function oas3BaseUrl({
377
385
  [selectedServerObj] = servers;
378
386
  selectedServerUrl = selectedServerObj.url;
379
387
  }
380
- if ((0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_1__.test)(selectedServerUrl, {
388
+ if ((0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_0__.test)(selectedServerUrl, {
381
389
  strict: true
382
390
  })) {
383
391
  const selectedServerVariables = Object.entries({
@@ -386,18 +394,18 @@ function oas3BaseUrl({
386
394
  acc[serverVariableName] = serverVariable.default;
387
395
  return acc;
388
396
  }, {});
389
- selectedServerUrl = (0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_1__.substitute)(selectedServerUrl, {
397
+ selectedServerUrl = (0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_0__.substitute)(selectedServerUrl, {
390
398
  ...selectedServerVariables,
391
399
  ...serverVariables
392
400
  }, {
393
- encoder: typeof serverVariableEncoder === 'function' ? serverVariableEncoder : ramda__WEBPACK_IMPORTED_MODULE_14__["default"]
401
+ encoder: typeof serverVariableEncoder === 'function' ? serverVariableEncoder : ramda__WEBPACK_IMPORTED_MODULE_15__["default"]
394
402
  });
395
403
  }
396
404
  return buildOas3UrlWithContext(selectedServerUrl, contextUrl);
397
405
  }
398
406
  function buildOas3UrlWithContext(ourUrl = '', contextUrl = '') {
399
407
  // relative server url should be resolved against contextUrl
400
- const parsedUrl = ourUrl && contextUrl ? parseURIReference(_swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_15__.resolve(contextUrl, ourUrl)) : parseURIReference(ourUrl);
408
+ const parsedUrl = ourUrl && contextUrl ? parseURIReference(_swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_16__.resolve(contextUrl, ourUrl)) : parseURIReference(ourUrl);
401
409
  const parsedContextUrl = parseURIReference(contextUrl);
402
410
  const computedScheme = stripNonAlpha(parsedUrl.protocol) || stripNonAlpha(parsedContextUrl.protocol);
403
411
  const computedHost = parsedUrl.host || parsedContextUrl.host;
@@ -670,8 +678,12 @@ __webpack_require__.r(__webpack_exports__);
670
678
  /* harmony export */ query: () => (/* binding */ query)
671
679
  /* harmony export */ });
672
680
  /* harmony import */ var openapi_path_templating__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61546);
673
- /* harmony import */ var _style_serializer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33838);
674
- /* harmony import */ var _content_serializer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27986);
681
+ /* harmony import */ var _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2211);
682
+ /* harmony import */ var _style_serializer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33838);
683
+ /* harmony import */ var _content_serializer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27986);
684
+ /* harmony import */ var _helpers_cookie_value_encoder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(37499);
685
+
686
+
675
687
 
676
688
 
677
689
 
@@ -695,17 +707,17 @@ function path({
695
707
  resolvedPathname = (0,openapi_path_templating__WEBPACK_IMPORTED_MODULE_0__.resolve)(pathname, {
696
708
  [name]: value
697
709
  }, {
698
- encoder: val => (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_1__.encodeCharacters)((0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(val, effectiveMediaType))
710
+ encoder: val => (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__.encodeCharacters)((0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(val, effectiveMediaType))
699
711
  });
700
712
  } else {
701
713
  resolvedPathname = (0,openapi_path_templating__WEBPACK_IMPORTED_MODULE_0__.resolve)(pathname, {
702
714
  [name]: value
703
715
  }, {
704
- encoder: val => (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_1__["default"])({
716
+ encoder: val => (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
705
717
  key: parameter.name,
706
718
  value: val,
707
719
  style: style || 'simple',
708
- explode: explode || false,
720
+ explode: explode ?? false,
709
721
  escape: 'reserved'
710
722
  })
711
723
  });
@@ -720,7 +732,7 @@ function query({
720
732
  req.query = req.query || {};
721
733
  if (value !== undefined && parameter.content) {
722
734
  const effectiveMediaType = Object.keys(parameter.content)[0];
723
- const serializedValue = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value, effectiveMediaType);
735
+ const serializedValue = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value, effectiveMediaType);
724
736
  if (serializedValue) {
725
737
  req.query[parameter.name] = serializedValue;
726
738
  } else if (parameter.allowEmptyValue) {
@@ -768,11 +780,11 @@ function header({
768
780
  }
769
781
  if (value !== undefined && parameter.content) {
770
782
  const effectiveMediaType = Object.keys(parameter.content)[0];
771
- req.headers[parameter.name] = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value, effectiveMediaType);
783
+ req.headers[parameter.name] = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value, effectiveMediaType);
772
784
  return;
773
785
  }
774
786
  if (value !== undefined && !(Array.isArray(value) && value.length === 0)) {
775
- req.headers[parameter.name] = (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_1__["default"])({
787
+ req.headers[parameter.name] = (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
776
788
  key: parameter.name,
777
789
  value,
778
790
  style: parameter.style || 'simple',
@@ -786,21 +798,37 @@ function cookie({
786
798
  parameter,
787
799
  value
788
800
  }) {
801
+ const {
802
+ name: cookieName
803
+ } = parameter;
789
804
  req.headers = req.headers || {};
790
- const type = typeof value;
791
805
  if (value !== undefined && parameter.content) {
792
806
  const effectiveMediaType = Object.keys(parameter.content)[0];
793
- req.headers.Cookie = `${parameter.name}=${(0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value, effectiveMediaType)}`;
807
+ const cookieValue = (0,_content_serializer_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value, effectiveMediaType);
808
+ req.headers.Cookie = (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.serializeCookie)({
809
+ [cookieName]: cookieValue
810
+ }, {
811
+ encoders: {
812
+ value: _helpers_cookie_value_encoder_js__WEBPACK_IMPORTED_MODULE_2__["default"]
813
+ }
814
+ });
794
815
  return;
795
816
  }
796
817
  if (value !== undefined && !(Array.isArray(value) && value.length === 0)) {
797
- const prefix = type === 'object' && !Array.isArray(value) && parameter.explode ? '' : `${parameter.name}=`;
798
- req.headers.Cookie = prefix + (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_1__["default"])({
818
+ const serializedValue = (0,_style_serializer_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
799
819
  key: parameter.name,
800
820
  value,
801
821
  escape: false,
802
822
  style: parameter.style || 'form',
803
- explode: typeof parameter.explode === 'undefined' ? false : parameter.explode
823
+ explode: parameter.explode ?? false
824
+ });
825
+ const cookieValue = Array.isArray(value) && parameter.explode ? `${cookieName}=${serializedValue}` : serializedValue;
826
+ req.headers.Cookie = (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_1__.serializeCookie)({
827
+ [cookieName]: cookieValue
828
+ }, {
829
+ encoders: {
830
+ value: _helpers_cookie_value_encoder_js__WEBPACK_IMPORTED_MODULE_2__["default"]
831
+ }
804
832
  });
805
833
  }
806
834
  }
@@ -1268,6 +1296,23 @@ const {
1268
1296
 
1269
1297
  /***/ }),
1270
1298
 
1299
+ /***/ 37499:
1300
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1301
+
1302
+ "use strict";
1303
+ __webpack_require__.r(__webpack_exports__);
1304
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1305
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1306
+ /* harmony export */ });
1307
+ /* harmony import */ var _swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2211);
1308
+
1309
+ const eqSignPE = '%3D';
1310
+ const ampersandPE = '%26';
1311
+ const cookieValueEncoder = cookieValue => (0,_swaggerexpert_cookie__WEBPACK_IMPORTED_MODULE_0__.cookieValueStrictEncoder)(cookieValue).replace(/[=&]/gu, match => match === '=' ? eqSignPE : ampersandPE);
1312
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueEncoder);
1313
+
1314
+ /***/ }),
1315
+
1271
1316
  /***/ 28686:
1272
1317
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1273
1318
 
@@ -6163,349 +6208,6 @@ const makeResolveSubtree = defaultOptions => async (obj, path, options = {}) =>
6163
6208
  strategies: [_resolver_strategies_openapi_3_0_index_js__WEBPACK_IMPORTED_MODULE_3__["default"], _resolver_strategies_openapi_2_index_js__WEBPACK_IMPORTED_MODULE_2__["default"], _resolver_strategies_generic_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]]
6164
6209
  }));
6165
6210
 
6166
- /***/ }),
6167
-
6168
- /***/ 57427:
6169
- /***/ ((__unused_webpack_module, exports) => {
6170
-
6171
- "use strict";
6172
- /*!
6173
- * cookie
6174
- * Copyright(c) 2012-2014 Roman Shtylman
6175
- * Copyright(c) 2015 Douglas Christopher Wilson
6176
- * MIT Licensed
6177
- */
6178
-
6179
-
6180
-
6181
- /**
6182
- * Module exports.
6183
- * @public
6184
- */
6185
-
6186
- exports.parse = parse;
6187
- exports.serialize = serialize;
6188
-
6189
- /**
6190
- * Module variables.
6191
- * @private
6192
- */
6193
-
6194
- var __toString = Object.prototype.toString
6195
- var __hasOwnProperty = Object.prototype.hasOwnProperty
6196
-
6197
- /**
6198
- * RegExp to match cookie-name in RFC 6265 sec 4.1.1
6199
- * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
6200
- * which has been replaced by the token definition in RFC 7230 appendix B.
6201
- *
6202
- * cookie-name = token
6203
- * token = 1*tchar
6204
- * tchar = "!" / "#" / "$" / "%" / "&" / "'" /
6205
- * "*" / "+" / "-" / "." / "^" / "_" /
6206
- * "`" / "|" / "~" / DIGIT / ALPHA
6207
- */
6208
-
6209
- var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
6210
-
6211
- /**
6212
- * RegExp to match cookie-value in RFC 6265 sec 4.1.1
6213
- *
6214
- * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
6215
- * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
6216
- * ; US-ASCII characters excluding CTLs,
6217
- * ; whitespace DQUOTE, comma, semicolon,
6218
- * ; and backslash
6219
- */
6220
-
6221
- var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
6222
-
6223
- /**
6224
- * RegExp to match domain-value in RFC 6265 sec 4.1.1
6225
- *
6226
- * domain-value = <subdomain>
6227
- * ; defined in [RFC1034], Section 3.5, as
6228
- * ; enhanced by [RFC1123], Section 2.1
6229
- * <subdomain> = <label> | <subdomain> "." <label>
6230
- * <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
6231
- * Labels must be 63 characters or less.
6232
- * 'let-dig' not 'letter' in the first char, per RFC1123
6233
- * <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
6234
- * <let-dig-hyp> = <let-dig> | "-"
6235
- * <let-dig> = <letter> | <digit>
6236
- * <letter> = any one of the 52 alphabetic characters A through Z in
6237
- * upper case and a through z in lower case
6238
- * <digit> = any one of the ten digits 0 through 9
6239
- *
6240
- * Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
6241
- *
6242
- * > (Note that a leading %x2E ("."), if present, is ignored even though that
6243
- * character is not permitted, but a trailing %x2E ("."), if present, will
6244
- * cause the user agent to ignore the attribute.)
6245
- */
6246
-
6247
- var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
6248
-
6249
- /**
6250
- * RegExp to match path-value in RFC 6265 sec 4.1.1
6251
- *
6252
- * path-value = <any CHAR except CTLs or ";">
6253
- * CHAR = %x01-7F
6254
- * ; defined in RFC 5234 appendix B.1
6255
- */
6256
-
6257
- var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
6258
-
6259
- /**
6260
- * Parse a cookie header.
6261
- *
6262
- * Parse the given cookie header string into an object
6263
- * The object has the various cookies as keys(names) => values
6264
- *
6265
- * @param {string} str
6266
- * @param {object} [opt]
6267
- * @return {object}
6268
- * @public
6269
- */
6270
-
6271
- function parse(str, opt) {
6272
- if (typeof str !== 'string') {
6273
- throw new TypeError('argument str must be a string');
6274
- }
6275
-
6276
- var obj = {};
6277
- var len = str.length;
6278
- // RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
6279
- if (len < 2) return obj;
6280
-
6281
- var dec = (opt && opt.decode) || decode;
6282
- var index = 0;
6283
- var eqIdx = 0;
6284
- var endIdx = 0;
6285
-
6286
- do {
6287
- eqIdx = str.indexOf('=', index);
6288
- if (eqIdx === -1) break; // No more cookie pairs.
6289
-
6290
- endIdx = str.indexOf(';', index);
6291
-
6292
- if (endIdx === -1) {
6293
- endIdx = len;
6294
- } else if (eqIdx > endIdx) {
6295
- // backtrack on prior semicolon
6296
- index = str.lastIndexOf(';', eqIdx - 1) + 1;
6297
- continue;
6298
- }
6299
-
6300
- var keyStartIdx = startIndex(str, index, eqIdx);
6301
- var keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
6302
- var key = str.slice(keyStartIdx, keyEndIdx);
6303
-
6304
- // only assign once
6305
- if (!__hasOwnProperty.call(obj, key)) {
6306
- var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
6307
- var valEndIdx = endIndex(str, endIdx, valStartIdx);
6308
-
6309
- if (str.charCodeAt(valStartIdx) === 0x22 /* " */ && str.charCodeAt(valEndIdx - 1) === 0x22 /* " */) {
6310
- valStartIdx++;
6311
- valEndIdx--;
6312
- }
6313
-
6314
- var val = str.slice(valStartIdx, valEndIdx);
6315
- obj[key] = tryDecode(val, dec);
6316
- }
6317
-
6318
- index = endIdx + 1
6319
- } while (index < len);
6320
-
6321
- return obj;
6322
- }
6323
-
6324
- function startIndex(str, index, max) {
6325
- do {
6326
- var code = str.charCodeAt(index);
6327
- if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index;
6328
- } while (++index < max);
6329
- return max;
6330
- }
6331
-
6332
- function endIndex(str, index, min) {
6333
- while (index > min) {
6334
- var code = str.charCodeAt(--index);
6335
- if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index + 1;
6336
- }
6337
- return min;
6338
- }
6339
-
6340
- /**
6341
- * Serialize data into a cookie header.
6342
- *
6343
- * Serialize a name value pair into a cookie string suitable for
6344
- * http headers. An optional options object specifies cookie parameters.
6345
- *
6346
- * serialize('foo', 'bar', { httpOnly: true })
6347
- * => "foo=bar; httpOnly"
6348
- *
6349
- * @param {string} name
6350
- * @param {string} val
6351
- * @param {object} [opt]
6352
- * @return {string}
6353
- * @public
6354
- */
6355
-
6356
- function serialize(name, val, opt) {
6357
- var enc = (opt && opt.encode) || encodeURIComponent;
6358
-
6359
- if (typeof enc !== 'function') {
6360
- throw new TypeError('option encode is invalid');
6361
- }
6362
-
6363
- if (!cookieNameRegExp.test(name)) {
6364
- throw new TypeError('argument name is invalid');
6365
- }
6366
-
6367
- var value = enc(val);
6368
-
6369
- if (!cookieValueRegExp.test(value)) {
6370
- throw new TypeError('argument val is invalid');
6371
- }
6372
-
6373
- var str = name + '=' + value;
6374
- if (!opt) return str;
6375
-
6376
- if (null != opt.maxAge) {
6377
- var maxAge = Math.floor(opt.maxAge);
6378
-
6379
- if (!isFinite(maxAge)) {
6380
- throw new TypeError('option maxAge is invalid')
6381
- }
6382
-
6383
- str += '; Max-Age=' + maxAge;
6384
- }
6385
-
6386
- if (opt.domain) {
6387
- if (!domainValueRegExp.test(opt.domain)) {
6388
- throw new TypeError('option domain is invalid');
6389
- }
6390
-
6391
- str += '; Domain=' + opt.domain;
6392
- }
6393
-
6394
- if (opt.path) {
6395
- if (!pathValueRegExp.test(opt.path)) {
6396
- throw new TypeError('option path is invalid');
6397
- }
6398
-
6399
- str += '; Path=' + opt.path;
6400
- }
6401
-
6402
- if (opt.expires) {
6403
- var expires = opt.expires
6404
-
6405
- if (!isDate(expires) || isNaN(expires.valueOf())) {
6406
- throw new TypeError('option expires is invalid');
6407
- }
6408
-
6409
- str += '; Expires=' + expires.toUTCString()
6410
- }
6411
-
6412
- if (opt.httpOnly) {
6413
- str += '; HttpOnly';
6414
- }
6415
-
6416
- if (opt.secure) {
6417
- str += '; Secure';
6418
- }
6419
-
6420
- if (opt.partitioned) {
6421
- str += '; Partitioned'
6422
- }
6423
-
6424
- if (opt.priority) {
6425
- var priority = typeof opt.priority === 'string'
6426
- ? opt.priority.toLowerCase() : opt.priority;
6427
-
6428
- switch (priority) {
6429
- case 'low':
6430
- str += '; Priority=Low'
6431
- break
6432
- case 'medium':
6433
- str += '; Priority=Medium'
6434
- break
6435
- case 'high':
6436
- str += '; Priority=High'
6437
- break
6438
- default:
6439
- throw new TypeError('option priority is invalid')
6440
- }
6441
- }
6442
-
6443
- if (opt.sameSite) {
6444
- var sameSite = typeof opt.sameSite === 'string'
6445
- ? opt.sameSite.toLowerCase() : opt.sameSite;
6446
-
6447
- switch (sameSite) {
6448
- case true:
6449
- str += '; SameSite=Strict';
6450
- break;
6451
- case 'lax':
6452
- str += '; SameSite=Lax';
6453
- break;
6454
- case 'strict':
6455
- str += '; SameSite=Strict';
6456
- break;
6457
- case 'none':
6458
- str += '; SameSite=None';
6459
- break;
6460
- default:
6461
- throw new TypeError('option sameSite is invalid');
6462
- }
6463
- }
6464
-
6465
- return str;
6466
- }
6467
-
6468
- /**
6469
- * URL-decode string value. Optimized to skip native call when no %.
6470
- *
6471
- * @param {string} str
6472
- * @returns {string}
6473
- */
6474
-
6475
- function decode (str) {
6476
- return str.indexOf('%') !== -1
6477
- ? decodeURIComponent(str)
6478
- : str
6479
- }
6480
-
6481
- /**
6482
- * Determine if value is a Date.
6483
- *
6484
- * @param {*} val
6485
- * @private
6486
- */
6487
-
6488
- function isDate (val) {
6489
- return __toString.call(val) === '[object Date]';
6490
- }
6491
-
6492
- /**
6493
- * Try decoding a string using a decoding function.
6494
- *
6495
- * @param {string} str
6496
- * @param {function} decode
6497
- * @private
6498
- */
6499
-
6500
- function tryDecode(str, decode) {
6501
- try {
6502
- return decode(str);
6503
- } catch (e) {
6504
- return str;
6505
- }
6506
- }
6507
-
6508
-
6509
6211
  /***/ }),
6510
6212
 
6511
6213
  /***/ 14744:
@@ -38255,6 +37957,1500 @@ const unsanitize = uri => {
38255
37957
 
38256
37958
  /***/ }),
38257
37959
 
37960
+ /***/ 34389:
37961
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
37962
+
37963
+ "use strict";
37964
+ __webpack_require__.r(__webpack_exports__);
37965
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37966
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
37967
+ /* harmony export */ });
37968
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
37969
+
37970
+ const cookieName = (state, chars, phraseIndex, phraseLength, data) => {
37971
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
37972
+ data.push(['cookie-name', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
37973
+ } else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
37974
+ /* not used in this example */
37975
+ }
37976
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
37977
+ };
37978
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieName);
37979
+
37980
+ /***/ }),
37981
+
37982
+ /***/ 36168:
37983
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
37984
+
37985
+ "use strict";
37986
+ __webpack_require__.r(__webpack_exports__);
37987
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
37988
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
37989
+ /* harmony export */ });
37990
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
37991
+
37992
+ const cookiePair = (state, chars, phraseIndex, phraseLength, data) => {
37993
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
37994
+ data.push(['cookie-pair', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
37995
+ } else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
37996
+ /* not used in this example */
37997
+ }
37998
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
37999
+ };
38000
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookiePair);
38001
+
38002
+ /***/ }),
38003
+
38004
+ /***/ 99511:
38005
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38006
+
38007
+ "use strict";
38008
+ __webpack_require__.r(__webpack_exports__);
38009
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38010
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
38011
+ /* harmony export */ });
38012
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
38013
+
38014
+ const cookieString = (state, chars, phraseIndex, phraseLength, data) => {
38015
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
38016
+ if (Array.isArray(data) === false) {
38017
+ throw new Error("parser's user data must be an array");
38018
+ }
38019
+ data.push(['cookie-string', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
38020
+ }
38021
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
38022
+ };
38023
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieString);
38024
+
38025
+ /***/ }),
38026
+
38027
+ /***/ 80935:
38028
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38029
+
38030
+ "use strict";
38031
+ __webpack_require__.r(__webpack_exports__);
38032
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38033
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
38034
+ /* harmony export */ });
38035
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
38036
+
38037
+ const cookieValue = (state, chars, phraseIndex, phraseLength, data) => {
38038
+ if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
38039
+ data.push(['cookie-value', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
38040
+ } else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
38041
+ /* not used in this example */
38042
+ }
38043
+ return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
38044
+ };
38045
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValue);
38046
+
38047
+ /***/ }),
38048
+
38049
+ /***/ 32910:
38050
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38051
+
38052
+ "use strict";
38053
+ __webpack_require__.r(__webpack_exports__);
38054
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38055
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
38056
+ /* harmony export */ });
38057
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
38058
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96552);
38059
+ /* harmony import */ var _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99511);
38060
+ /* harmony import */ var _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36168);
38061
+ /* harmony import */ var _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34389);
38062
+ /* harmony import */ var _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80935);
38063
+
38064
+
38065
+
38066
+
38067
+
38068
+
38069
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]();
38070
+ const parse = (cookieString, {
38071
+ strict = true
38072
+ } = {}) => {
38073
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
38074
+ parser.ast = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Ast();
38075
+ if (strict) {
38076
+ parser.ast.callbacks['cookie-string'] = _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_1__["default"];
38077
+ parser.ast.callbacks['cookie-pair'] = _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
38078
+ parser.ast.callbacks['cookie-name'] = _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
38079
+ parser.ast.callbacks['cookie-value'] = _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
38080
+ } else {
38081
+ parser.ast.callbacks['lenient-cookie-string'] = _callbacks_cookie_string_mjs__WEBPACK_IMPORTED_MODULE_1__["default"];
38082
+ parser.ast.callbacks['lenient-cookie-pair'] = _callbacks_cookie_pair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
38083
+ parser.ast.callbacks['lenient-cookie-name'] = _callbacks_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
38084
+ parser.ast.callbacks['lenient-cookie-value'] = _callbacks_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
38085
+ }
38086
+ const startRule = strict ? 'cookie-string' : 'lenient-cookie-string';
38087
+ const result = parser.parse(grammar, startRule, cookieString);
38088
+ return {
38089
+ result,
38090
+ ast: parser.ast
38091
+ };
38092
+ };
38093
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);
38094
+
38095
+ /***/ }),
38096
+
38097
+ /***/ 90465:
38098
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38099
+
38100
+ "use strict";
38101
+ __webpack_require__.r(__webpack_exports__);
38102
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38103
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
38104
+ /* harmony export */ });
38105
+ /* harmony import */ var _set_cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79080);
38106
+
38107
+ const serialize = (cookiePairs, options = {}) => {
38108
+ const cookiePairEntries = Array.isArray(cookiePairs) ? cookiePairs : typeof cookiePairs === 'object' && cookiePairs !== null ? Object.entries(cookiePairs) : [];
38109
+ return cookiePairEntries.map(([name, value]) => (0,_set_cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(name, value, options)).join('; ');
38110
+ };
38111
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serialize);
38112
+
38113
+ /***/ }),
38114
+
38115
+ /***/ 87561:
38116
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38117
+
38118
+ "use strict";
38119
+ __webpack_require__.r(__webpack_exports__);
38120
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38121
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
38122
+ /* harmony export */ });
38123
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
38124
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
38125
+
38126
+
38127
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
38128
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
38129
+ const testCookieName = (cookieName, {
38130
+ strict = true
38131
+ } = {}) => {
38132
+ try {
38133
+ const startRule = strict ? 'cookie-name' : 'lenient-cookie-name';
38134
+ return parser.parse(grammar, startRule, cookieName).success;
38135
+ } catch {
38136
+ return false;
38137
+ }
38138
+ };
38139
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testCookieName);
38140
+
38141
+ /***/ }),
38142
+
38143
+ /***/ 58571:
38144
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38145
+
38146
+ "use strict";
38147
+ __webpack_require__.r(__webpack_exports__);
38148
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38149
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
38150
+ /* harmony export */ });
38151
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
38152
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
38153
+
38154
+
38155
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
38156
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
38157
+ const testCookieValue = (cookieValue, {
38158
+ strict = true
38159
+ } = {}) => {
38160
+ try {
38161
+ const startRule = strict ? 'cookie-value' : 'lenient-cookie-value';
38162
+ return parser.parse(grammar, startRule, cookieValue).success;
38163
+ } catch {
38164
+ return false;
38165
+ }
38166
+ };
38167
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (testCookieValue);
38168
+
38169
+ /***/ }),
38170
+
38171
+ /***/ 96552:
38172
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38173
+
38174
+ "use strict";
38175
+ __webpack_require__.r(__webpack_exports__);
38176
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38177
+ /* harmony export */ "default": () => (/* binding */ grammar)
38178
+ /* harmony export */ });
38179
+ // copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>
38180
+ // license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>
38181
+ //
38182
+ // Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)
38183
+ function grammar() {
38184
+ // ```
38185
+ // SUMMARY
38186
+ // rules = 30
38187
+ // udts = 0
38188
+ // opcodes = 139
38189
+ // --- ABNF original opcodes
38190
+ // ALT = 12
38191
+ // CAT = 12
38192
+ // REP = 13
38193
+ // RNM = 41
38194
+ // TLS = 35
38195
+ // TBS = 10
38196
+ // TRG = 16
38197
+ // --- SABNF superset opcodes
38198
+ // UDT = 0
38199
+ // AND = 0
38200
+ // NOT = 0
38201
+ // characters = [0 - 127]
38202
+ // ```
38203
+ /* OBJECT IDENTIFIER (for internal parser use) */
38204
+ this.grammarObject = 'grammarObject';
38205
+
38206
+ /* RULES */
38207
+ this.rules = [];
38208
+ this.rules[0] = {
38209
+ name: 'lenient-cookie-string',
38210
+ lower: 'lenient-cookie-string',
38211
+ index: 0,
38212
+ isBkr: false
38213
+ };
38214
+ this.rules[1] = {
38215
+ name: 'lenient-cookie-entry',
38216
+ lower: 'lenient-cookie-entry',
38217
+ index: 1,
38218
+ isBkr: false
38219
+ };
38220
+ this.rules[2] = {
38221
+ name: 'lenient-cookie-pair',
38222
+ lower: 'lenient-cookie-pair',
38223
+ index: 2,
38224
+ isBkr: false
38225
+ };
38226
+ this.rules[3] = {
38227
+ name: 'lenient-cookie-pair-invalid',
38228
+ lower: 'lenient-cookie-pair-invalid',
38229
+ index: 3,
38230
+ isBkr: false
38231
+ };
38232
+ this.rules[4] = {
38233
+ name: 'lenient-cookie-name',
38234
+ lower: 'lenient-cookie-name',
38235
+ index: 4,
38236
+ isBkr: false
38237
+ };
38238
+ this.rules[5] = {
38239
+ name: 'lenient-cookie-value',
38240
+ lower: 'lenient-cookie-value',
38241
+ index: 5,
38242
+ isBkr: false
38243
+ };
38244
+ this.rules[6] = {
38245
+ name: 'lenient-quoted-value',
38246
+ lower: 'lenient-quoted-value',
38247
+ index: 6,
38248
+ isBkr: false
38249
+ };
38250
+ this.rules[7] = {
38251
+ name: 'lenient-quoted-char',
38252
+ lower: 'lenient-quoted-char',
38253
+ index: 7,
38254
+ isBkr: false
38255
+ };
38256
+ this.rules[8] = {
38257
+ name: 'lenient-cookie-octet',
38258
+ lower: 'lenient-cookie-octet',
38259
+ index: 8,
38260
+ isBkr: false
38261
+ };
38262
+ this.rules[9] = {
38263
+ name: 'cookie-string',
38264
+ lower: 'cookie-string',
38265
+ index: 9,
38266
+ isBkr: false
38267
+ };
38268
+ this.rules[10] = {
38269
+ name: 'cookie-pair',
38270
+ lower: 'cookie-pair',
38271
+ index: 10,
38272
+ isBkr: false
38273
+ };
38274
+ this.rules[11] = {
38275
+ name: 'cookie-name',
38276
+ lower: 'cookie-name',
38277
+ index: 11,
38278
+ isBkr: false
38279
+ };
38280
+ this.rules[12] = {
38281
+ name: 'cookie-value',
38282
+ lower: 'cookie-value',
38283
+ index: 12,
38284
+ isBkr: false
38285
+ };
38286
+ this.rules[13] = {
38287
+ name: 'cookie-octet',
38288
+ lower: 'cookie-octet',
38289
+ index: 13,
38290
+ isBkr: false
38291
+ };
38292
+ this.rules[14] = {
38293
+ name: 'OWS',
38294
+ lower: 'ows',
38295
+ index: 14,
38296
+ isBkr: false
38297
+ };
38298
+ this.rules[15] = {
38299
+ name: 'token',
38300
+ lower: 'token',
38301
+ index: 15,
38302
+ isBkr: false
38303
+ };
38304
+ this.rules[16] = {
38305
+ name: 'tchar',
38306
+ lower: 'tchar',
38307
+ index: 16,
38308
+ isBkr: false
38309
+ };
38310
+ this.rules[17] = {
38311
+ name: 'CHAR',
38312
+ lower: 'char',
38313
+ index: 17,
38314
+ isBkr: false
38315
+ };
38316
+ this.rules[18] = {
38317
+ name: 'CTL',
38318
+ lower: 'ctl',
38319
+ index: 18,
38320
+ isBkr: false
38321
+ };
38322
+ this.rules[19] = {
38323
+ name: 'separators',
38324
+ lower: 'separators',
38325
+ index: 19,
38326
+ isBkr: false
38327
+ };
38328
+ this.rules[20] = {
38329
+ name: 'SP',
38330
+ lower: 'sp',
38331
+ index: 20,
38332
+ isBkr: false
38333
+ };
38334
+ this.rules[21] = {
38335
+ name: 'HT',
38336
+ lower: 'ht',
38337
+ index: 21,
38338
+ isBkr: false
38339
+ };
38340
+ this.rules[22] = {
38341
+ name: 'ALPHA',
38342
+ lower: 'alpha',
38343
+ index: 22,
38344
+ isBkr: false
38345
+ };
38346
+ this.rules[23] = {
38347
+ name: 'DIGIT',
38348
+ lower: 'digit',
38349
+ index: 23,
38350
+ isBkr: false
38351
+ };
38352
+ this.rules[24] = {
38353
+ name: 'DQUOTE',
38354
+ lower: 'dquote',
38355
+ index: 24,
38356
+ isBkr: false
38357
+ };
38358
+ this.rules[25] = {
38359
+ name: 'WSP',
38360
+ lower: 'wsp',
38361
+ index: 25,
38362
+ isBkr: false
38363
+ };
38364
+ this.rules[26] = {
38365
+ name: 'HTAB',
38366
+ lower: 'htab',
38367
+ index: 26,
38368
+ isBkr: false
38369
+ };
38370
+ this.rules[27] = {
38371
+ name: 'CRLF',
38372
+ lower: 'crlf',
38373
+ index: 27,
38374
+ isBkr: false
38375
+ };
38376
+ this.rules[28] = {
38377
+ name: 'CR',
38378
+ lower: 'cr',
38379
+ index: 28,
38380
+ isBkr: false
38381
+ };
38382
+ this.rules[29] = {
38383
+ name: 'LF',
38384
+ lower: 'lf',
38385
+ index: 29,
38386
+ isBkr: false
38387
+ };
38388
+
38389
+ /* UDTS */
38390
+ this.udts = [];
38391
+
38392
+ /* OPCODES */
38393
+ /* lenient-cookie-string */
38394
+ this.rules[0].opcodes = [];
38395
+ this.rules[0].opcodes[0] = {
38396
+ type: 2,
38397
+ children: [1, 2]
38398
+ }; // CAT
38399
+ this.rules[0].opcodes[1] = {
38400
+ type: 4,
38401
+ index: 1
38402
+ }; // RNM(lenient-cookie-entry)
38403
+ this.rules[0].opcodes[2] = {
38404
+ type: 3,
38405
+ min: 0,
38406
+ max: Infinity
38407
+ }; // REP
38408
+ this.rules[0].opcodes[3] = {
38409
+ type: 2,
38410
+ children: [4, 5, 6]
38411
+ }; // CAT
38412
+ this.rules[0].opcodes[4] = {
38413
+ type: 7,
38414
+ string: [59]
38415
+ }; // TLS
38416
+ this.rules[0].opcodes[5] = {
38417
+ type: 4,
38418
+ index: 14
38419
+ }; // RNM(OWS)
38420
+ this.rules[0].opcodes[6] = {
38421
+ type: 4,
38422
+ index: 1
38423
+ }; // RNM(lenient-cookie-entry)
38424
+
38425
+ /* lenient-cookie-entry */
38426
+ this.rules[1].opcodes = [];
38427
+ this.rules[1].opcodes[0] = {
38428
+ type: 1,
38429
+ children: [1, 2]
38430
+ }; // ALT
38431
+ this.rules[1].opcodes[1] = {
38432
+ type: 4,
38433
+ index: 2
38434
+ }; // RNM(lenient-cookie-pair)
38435
+ this.rules[1].opcodes[2] = {
38436
+ type: 4,
38437
+ index: 3
38438
+ }; // RNM(lenient-cookie-pair-invalid)
38439
+
38440
+ /* lenient-cookie-pair */
38441
+ this.rules[2].opcodes = [];
38442
+ this.rules[2].opcodes[0] = {
38443
+ type: 2,
38444
+ children: [1, 2, 3, 4, 5, 6, 7]
38445
+ }; // CAT
38446
+ this.rules[2].opcodes[1] = {
38447
+ type: 4,
38448
+ index: 14
38449
+ }; // RNM(OWS)
38450
+ this.rules[2].opcodes[2] = {
38451
+ type: 4,
38452
+ index: 4
38453
+ }; // RNM(lenient-cookie-name)
38454
+ this.rules[2].opcodes[3] = {
38455
+ type: 4,
38456
+ index: 14
38457
+ }; // RNM(OWS)
38458
+ this.rules[2].opcodes[4] = {
38459
+ type: 7,
38460
+ string: [61]
38461
+ }; // TLS
38462
+ this.rules[2].opcodes[5] = {
38463
+ type: 4,
38464
+ index: 14
38465
+ }; // RNM(OWS)
38466
+ this.rules[2].opcodes[6] = {
38467
+ type: 4,
38468
+ index: 5
38469
+ }; // RNM(lenient-cookie-value)
38470
+ this.rules[2].opcodes[7] = {
38471
+ type: 4,
38472
+ index: 14
38473
+ }; // RNM(OWS)
38474
+
38475
+ /* lenient-cookie-pair-invalid */
38476
+ this.rules[3].opcodes = [];
38477
+ this.rules[3].opcodes[0] = {
38478
+ type: 2,
38479
+ children: [1, 2, 4]
38480
+ }; // CAT
38481
+ this.rules[3].opcodes[1] = {
38482
+ type: 4,
38483
+ index: 14
38484
+ }; // RNM(OWS)
38485
+ this.rules[3].opcodes[2] = {
38486
+ type: 3,
38487
+ min: 1,
38488
+ max: Infinity
38489
+ }; // REP
38490
+ this.rules[3].opcodes[3] = {
38491
+ type: 4,
38492
+ index: 16
38493
+ }; // RNM(tchar)
38494
+ this.rules[3].opcodes[4] = {
38495
+ type: 4,
38496
+ index: 14
38497
+ }; // RNM(OWS)
38498
+
38499
+ /* lenient-cookie-name */
38500
+ this.rules[4].opcodes = [];
38501
+ this.rules[4].opcodes[0] = {
38502
+ type: 3,
38503
+ min: 1,
38504
+ max: Infinity
38505
+ }; // REP
38506
+ this.rules[4].opcodes[1] = {
38507
+ type: 1,
38508
+ children: [2, 3, 4]
38509
+ }; // ALT
38510
+ this.rules[4].opcodes[2] = {
38511
+ type: 5,
38512
+ min: 33,
38513
+ max: 58
38514
+ }; // TRG
38515
+ this.rules[4].opcodes[3] = {
38516
+ type: 6,
38517
+ string: [60]
38518
+ }; // TBS
38519
+ this.rules[4].opcodes[4] = {
38520
+ type: 5,
38521
+ min: 62,
38522
+ max: 126
38523
+ }; // TRG
38524
+
38525
+ /* lenient-cookie-value */
38526
+ this.rules[5].opcodes = [];
38527
+ this.rules[5].opcodes[0] = {
38528
+ type: 1,
38529
+ children: [1, 6]
38530
+ }; // ALT
38531
+ this.rules[5].opcodes[1] = {
38532
+ type: 2,
38533
+ children: [2, 3]
38534
+ }; // CAT
38535
+ this.rules[5].opcodes[2] = {
38536
+ type: 4,
38537
+ index: 6
38538
+ }; // RNM(lenient-quoted-value)
38539
+ this.rules[5].opcodes[3] = {
38540
+ type: 3,
38541
+ min: 0,
38542
+ max: 1
38543
+ }; // REP
38544
+ this.rules[5].opcodes[4] = {
38545
+ type: 3,
38546
+ min: 0,
38547
+ max: Infinity
38548
+ }; // REP
38549
+ this.rules[5].opcodes[5] = {
38550
+ type: 4,
38551
+ index: 8
38552
+ }; // RNM(lenient-cookie-octet)
38553
+ this.rules[5].opcodes[6] = {
38554
+ type: 3,
38555
+ min: 0,
38556
+ max: Infinity
38557
+ }; // REP
38558
+ this.rules[5].opcodes[7] = {
38559
+ type: 4,
38560
+ index: 8
38561
+ }; // RNM(lenient-cookie-octet)
38562
+
38563
+ /* lenient-quoted-value */
38564
+ this.rules[6].opcodes = [];
38565
+ this.rules[6].opcodes[0] = {
38566
+ type: 2,
38567
+ children: [1, 2, 4]
38568
+ }; // CAT
38569
+ this.rules[6].opcodes[1] = {
38570
+ type: 4,
38571
+ index: 24
38572
+ }; // RNM(DQUOTE)
38573
+ this.rules[6].opcodes[2] = {
38574
+ type: 3,
38575
+ min: 0,
38576
+ max: Infinity
38577
+ }; // REP
38578
+ this.rules[6].opcodes[3] = {
38579
+ type: 4,
38580
+ index: 7
38581
+ }; // RNM(lenient-quoted-char)
38582
+ this.rules[6].opcodes[4] = {
38583
+ type: 4,
38584
+ index: 24
38585
+ }; // RNM(DQUOTE)
38586
+
38587
+ /* lenient-quoted-char */
38588
+ this.rules[7].opcodes = [];
38589
+ this.rules[7].opcodes[0] = {
38590
+ type: 1,
38591
+ children: [1, 2]
38592
+ }; // ALT
38593
+ this.rules[7].opcodes[1] = {
38594
+ type: 5,
38595
+ min: 32,
38596
+ max: 33
38597
+ }; // TRG
38598
+ this.rules[7].opcodes[2] = {
38599
+ type: 5,
38600
+ min: 35,
38601
+ max: 126
38602
+ }; // TRG
38603
+
38604
+ /* lenient-cookie-octet */
38605
+ this.rules[8].opcodes = [];
38606
+ this.rules[8].opcodes[0] = {
38607
+ type: 1,
38608
+ children: [1, 2, 3]
38609
+ }; // ALT
38610
+ this.rules[8].opcodes[1] = {
38611
+ type: 5,
38612
+ min: 33,
38613
+ max: 43
38614
+ }; // TRG
38615
+ this.rules[8].opcodes[2] = {
38616
+ type: 5,
38617
+ min: 45,
38618
+ max: 58
38619
+ }; // TRG
38620
+ this.rules[8].opcodes[3] = {
38621
+ type: 5,
38622
+ min: 60,
38623
+ max: 126
38624
+ }; // TRG
38625
+
38626
+ /* cookie-string */
38627
+ this.rules[9].opcodes = [];
38628
+ this.rules[9].opcodes[0] = {
38629
+ type: 2,
38630
+ children: [1, 2]
38631
+ }; // CAT
38632
+ this.rules[9].opcodes[1] = {
38633
+ type: 4,
38634
+ index: 10
38635
+ }; // RNM(cookie-pair)
38636
+ this.rules[9].opcodes[2] = {
38637
+ type: 3,
38638
+ min: 0,
38639
+ max: Infinity
38640
+ }; // REP
38641
+ this.rules[9].opcodes[3] = {
38642
+ type: 2,
38643
+ children: [4, 5, 6]
38644
+ }; // CAT
38645
+ this.rules[9].opcodes[4] = {
38646
+ type: 7,
38647
+ string: [59]
38648
+ }; // TLS
38649
+ this.rules[9].opcodes[5] = {
38650
+ type: 4,
38651
+ index: 20
38652
+ }; // RNM(SP)
38653
+ this.rules[9].opcodes[6] = {
38654
+ type: 4,
38655
+ index: 10
38656
+ }; // RNM(cookie-pair)
38657
+
38658
+ /* cookie-pair */
38659
+ this.rules[10].opcodes = [];
38660
+ this.rules[10].opcodes[0] = {
38661
+ type: 2,
38662
+ children: [1, 2, 3]
38663
+ }; // CAT
38664
+ this.rules[10].opcodes[1] = {
38665
+ type: 4,
38666
+ index: 11
38667
+ }; // RNM(cookie-name)
38668
+ this.rules[10].opcodes[2] = {
38669
+ type: 7,
38670
+ string: [61]
38671
+ }; // TLS
38672
+ this.rules[10].opcodes[3] = {
38673
+ type: 4,
38674
+ index: 12
38675
+ }; // RNM(cookie-value)
38676
+
38677
+ /* cookie-name */
38678
+ this.rules[11].opcodes = [];
38679
+ this.rules[11].opcodes[0] = {
38680
+ type: 4,
38681
+ index: 15
38682
+ }; // RNM(token)
38683
+
38684
+ /* cookie-value */
38685
+ this.rules[12].opcodes = [];
38686
+ this.rules[12].opcodes[0] = {
38687
+ type: 1,
38688
+ children: [1, 6]
38689
+ }; // ALT
38690
+ this.rules[12].opcodes[1] = {
38691
+ type: 2,
38692
+ children: [2, 3, 5]
38693
+ }; // CAT
38694
+ this.rules[12].opcodes[2] = {
38695
+ type: 4,
38696
+ index: 24
38697
+ }; // RNM(DQUOTE)
38698
+ this.rules[12].opcodes[3] = {
38699
+ type: 3,
38700
+ min: 0,
38701
+ max: Infinity
38702
+ }; // REP
38703
+ this.rules[12].opcodes[4] = {
38704
+ type: 4,
38705
+ index: 13
38706
+ }; // RNM(cookie-octet)
38707
+ this.rules[12].opcodes[5] = {
38708
+ type: 4,
38709
+ index: 24
38710
+ }; // RNM(DQUOTE)
38711
+ this.rules[12].opcodes[6] = {
38712
+ type: 3,
38713
+ min: 0,
38714
+ max: Infinity
38715
+ }; // REP
38716
+ this.rules[12].opcodes[7] = {
38717
+ type: 4,
38718
+ index: 13
38719
+ }; // RNM(cookie-octet)
38720
+
38721
+ /* cookie-octet */
38722
+ this.rules[13].opcodes = [];
38723
+ this.rules[13].opcodes[0] = {
38724
+ type: 1,
38725
+ children: [1, 2, 3, 4, 5]
38726
+ }; // ALT
38727
+ this.rules[13].opcodes[1] = {
38728
+ type: 6,
38729
+ string: [33]
38730
+ }; // TBS
38731
+ this.rules[13].opcodes[2] = {
38732
+ type: 5,
38733
+ min: 35,
38734
+ max: 43
38735
+ }; // TRG
38736
+ this.rules[13].opcodes[3] = {
38737
+ type: 5,
38738
+ min: 45,
38739
+ max: 58
38740
+ }; // TRG
38741
+ this.rules[13].opcodes[4] = {
38742
+ type: 5,
38743
+ min: 60,
38744
+ max: 91
38745
+ }; // TRG
38746
+ this.rules[13].opcodes[5] = {
38747
+ type: 5,
38748
+ min: 93,
38749
+ max: 126
38750
+ }; // TRG
38751
+
38752
+ /* OWS */
38753
+ this.rules[14].opcodes = [];
38754
+ this.rules[14].opcodes[0] = {
38755
+ type: 3,
38756
+ min: 0,
38757
+ max: Infinity
38758
+ }; // REP
38759
+ this.rules[14].opcodes[1] = {
38760
+ type: 2,
38761
+ children: [2, 4]
38762
+ }; // CAT
38763
+ this.rules[14].opcodes[2] = {
38764
+ type: 3,
38765
+ min: 0,
38766
+ max: 1
38767
+ }; // REP
38768
+ this.rules[14].opcodes[3] = {
38769
+ type: 4,
38770
+ index: 27
38771
+ }; // RNM(CRLF)
38772
+ this.rules[14].opcodes[4] = {
38773
+ type: 4,
38774
+ index: 25
38775
+ }; // RNM(WSP)
38776
+
38777
+ /* token */
38778
+ this.rules[15].opcodes = [];
38779
+ this.rules[15].opcodes[0] = {
38780
+ type: 3,
38781
+ min: 1,
38782
+ max: Infinity
38783
+ }; // REP
38784
+ this.rules[15].opcodes[1] = {
38785
+ type: 4,
38786
+ index: 16
38787
+ }; // RNM(tchar)
38788
+
38789
+ /* tchar */
38790
+ this.rules[16].opcodes = [];
38791
+ this.rules[16].opcodes[0] = {
38792
+ type: 1,
38793
+ children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
38794
+ }; // ALT
38795
+ this.rules[16].opcodes[1] = {
38796
+ type: 7,
38797
+ string: [33]
38798
+ }; // TLS
38799
+ this.rules[16].opcodes[2] = {
38800
+ type: 7,
38801
+ string: [35]
38802
+ }; // TLS
38803
+ this.rules[16].opcodes[3] = {
38804
+ type: 7,
38805
+ string: [36]
38806
+ }; // TLS
38807
+ this.rules[16].opcodes[4] = {
38808
+ type: 7,
38809
+ string: [37]
38810
+ }; // TLS
38811
+ this.rules[16].opcodes[5] = {
38812
+ type: 7,
38813
+ string: [38]
38814
+ }; // TLS
38815
+ this.rules[16].opcodes[6] = {
38816
+ type: 7,
38817
+ string: [39]
38818
+ }; // TLS
38819
+ this.rules[16].opcodes[7] = {
38820
+ type: 7,
38821
+ string: [42]
38822
+ }; // TLS
38823
+ this.rules[16].opcodes[8] = {
38824
+ type: 7,
38825
+ string: [43]
38826
+ }; // TLS
38827
+ this.rules[16].opcodes[9] = {
38828
+ type: 7,
38829
+ string: [45]
38830
+ }; // TLS
38831
+ this.rules[16].opcodes[10] = {
38832
+ type: 7,
38833
+ string: [46]
38834
+ }; // TLS
38835
+ this.rules[16].opcodes[11] = {
38836
+ type: 7,
38837
+ string: [94]
38838
+ }; // TLS
38839
+ this.rules[16].opcodes[12] = {
38840
+ type: 7,
38841
+ string: [95]
38842
+ }; // TLS
38843
+ this.rules[16].opcodes[13] = {
38844
+ type: 7,
38845
+ string: [96]
38846
+ }; // TLS
38847
+ this.rules[16].opcodes[14] = {
38848
+ type: 7,
38849
+ string: [124]
38850
+ }; // TLS
38851
+ this.rules[16].opcodes[15] = {
38852
+ type: 7,
38853
+ string: [126]
38854
+ }; // TLS
38855
+ this.rules[16].opcodes[16] = {
38856
+ type: 4,
38857
+ index: 23
38858
+ }; // RNM(DIGIT)
38859
+ this.rules[16].opcodes[17] = {
38860
+ type: 4,
38861
+ index: 22
38862
+ }; // RNM(ALPHA)
38863
+
38864
+ /* CHAR */
38865
+ this.rules[17].opcodes = [];
38866
+ this.rules[17].opcodes[0] = {
38867
+ type: 5,
38868
+ min: 1,
38869
+ max: 127
38870
+ }; // TRG
38871
+
38872
+ /* CTL */
38873
+ this.rules[18].opcodes = [];
38874
+ this.rules[18].opcodes[0] = {
38875
+ type: 1,
38876
+ children: [1, 2]
38877
+ }; // ALT
38878
+ this.rules[18].opcodes[1] = {
38879
+ type: 5,
38880
+ min: 0,
38881
+ max: 31
38882
+ }; // TRG
38883
+ this.rules[18].opcodes[2] = {
38884
+ type: 6,
38885
+ string: [127]
38886
+ }; // TBS
38887
+
38888
+ /* separators */
38889
+ this.rules[19].opcodes = [];
38890
+ this.rules[19].opcodes[0] = {
38891
+ type: 1,
38892
+ children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
38893
+ }; // ALT
38894
+ this.rules[19].opcodes[1] = {
38895
+ type: 7,
38896
+ string: [40]
38897
+ }; // TLS
38898
+ this.rules[19].opcodes[2] = {
38899
+ type: 7,
38900
+ string: [41]
38901
+ }; // TLS
38902
+ this.rules[19].opcodes[3] = {
38903
+ type: 7,
38904
+ string: [60]
38905
+ }; // TLS
38906
+ this.rules[19].opcodes[4] = {
38907
+ type: 7,
38908
+ string: [62]
38909
+ }; // TLS
38910
+ this.rules[19].opcodes[5] = {
38911
+ type: 7,
38912
+ string: [64]
38913
+ }; // TLS
38914
+ this.rules[19].opcodes[6] = {
38915
+ type: 7,
38916
+ string: [44]
38917
+ }; // TLS
38918
+ this.rules[19].opcodes[7] = {
38919
+ type: 7,
38920
+ string: [59]
38921
+ }; // TLS
38922
+ this.rules[19].opcodes[8] = {
38923
+ type: 7,
38924
+ string: [58]
38925
+ }; // TLS
38926
+ this.rules[19].opcodes[9] = {
38927
+ type: 7,
38928
+ string: [92]
38929
+ }; // TLS
38930
+ this.rules[19].opcodes[10] = {
38931
+ type: 6,
38932
+ string: [34]
38933
+ }; // TBS
38934
+ this.rules[19].opcodes[11] = {
38935
+ type: 7,
38936
+ string: [47]
38937
+ }; // TLS
38938
+ this.rules[19].opcodes[12] = {
38939
+ type: 7,
38940
+ string: [91]
38941
+ }; // TLS
38942
+ this.rules[19].opcodes[13] = {
38943
+ type: 7,
38944
+ string: [93]
38945
+ }; // TLS
38946
+ this.rules[19].opcodes[14] = {
38947
+ type: 7,
38948
+ string: [63]
38949
+ }; // TLS
38950
+ this.rules[19].opcodes[15] = {
38951
+ type: 7,
38952
+ string: [61]
38953
+ }; // TLS
38954
+ this.rules[19].opcodes[16] = {
38955
+ type: 7,
38956
+ string: [123]
38957
+ }; // TLS
38958
+ this.rules[19].opcodes[17] = {
38959
+ type: 7,
38960
+ string: [125]
38961
+ }; // TLS
38962
+ this.rules[19].opcodes[18] = {
38963
+ type: 4,
38964
+ index: 20
38965
+ }; // RNM(SP)
38966
+ this.rules[19].opcodes[19] = {
38967
+ type: 4,
38968
+ index: 21
38969
+ }; // RNM(HT)
38970
+
38971
+ /* SP */
38972
+ this.rules[20].opcodes = [];
38973
+ this.rules[20].opcodes[0] = {
38974
+ type: 6,
38975
+ string: [32]
38976
+ }; // TBS
38977
+
38978
+ /* HT */
38979
+ this.rules[21].opcodes = [];
38980
+ this.rules[21].opcodes[0] = {
38981
+ type: 6,
38982
+ string: [9]
38983
+ }; // TBS
38984
+
38985
+ /* ALPHA */
38986
+ this.rules[22].opcodes = [];
38987
+ this.rules[22].opcodes[0] = {
38988
+ type: 1,
38989
+ children: [1, 2]
38990
+ }; // ALT
38991
+ this.rules[22].opcodes[1] = {
38992
+ type: 5,
38993
+ min: 65,
38994
+ max: 90
38995
+ }; // TRG
38996
+ this.rules[22].opcodes[2] = {
38997
+ type: 5,
38998
+ min: 97,
38999
+ max: 122
39000
+ }; // TRG
39001
+
39002
+ /* DIGIT */
39003
+ this.rules[23].opcodes = [];
39004
+ this.rules[23].opcodes[0] = {
39005
+ type: 5,
39006
+ min: 48,
39007
+ max: 57
39008
+ }; // TRG
39009
+
39010
+ /* DQUOTE */
39011
+ this.rules[24].opcodes = [];
39012
+ this.rules[24].opcodes[0] = {
39013
+ type: 6,
39014
+ string: [34]
39015
+ }; // TBS
39016
+
39017
+ /* WSP */
39018
+ this.rules[25].opcodes = [];
39019
+ this.rules[25].opcodes[0] = {
39020
+ type: 1,
39021
+ children: [1, 2]
39022
+ }; // ALT
39023
+ this.rules[25].opcodes[1] = {
39024
+ type: 4,
39025
+ index: 20
39026
+ }; // RNM(SP)
39027
+ this.rules[25].opcodes[2] = {
39028
+ type: 4,
39029
+ index: 26
39030
+ }; // RNM(HTAB)
39031
+
39032
+ /* HTAB */
39033
+ this.rules[26].opcodes = [];
39034
+ this.rules[26].opcodes[0] = {
39035
+ type: 6,
39036
+ string: [9]
39037
+ }; // TBS
39038
+
39039
+ /* CRLF */
39040
+ this.rules[27].opcodes = [];
39041
+ this.rules[27].opcodes[0] = {
39042
+ type: 2,
39043
+ children: [1, 2]
39044
+ }; // CAT
39045
+ this.rules[27].opcodes[1] = {
39046
+ type: 4,
39047
+ index: 28
39048
+ }; // RNM(CR)
39049
+ this.rules[27].opcodes[2] = {
39050
+ type: 4,
39051
+ index: 29
39052
+ }; // RNM(LF)
39053
+
39054
+ /* CR */
39055
+ this.rules[28].opcodes = [];
39056
+ this.rules[28].opcodes[0] = {
39057
+ type: 6,
39058
+ string: [13]
39059
+ }; // TBS
39060
+
39061
+ /* LF */
39062
+ this.rules[29].opcodes = [];
39063
+ this.rules[29].opcodes[0] = {
39064
+ type: 6,
39065
+ string: [10]
39066
+ }; // TBS
39067
+
39068
+ // The `toString()` function will display the original grammar file(s) that produced these opcodes.
39069
+ this.toString = function toString() {
39070
+ let str = "";
39071
+ str += "; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n";
39072
+ str += "lenient-cookie-string = lenient-cookie-entry *( \";\" OWS lenient-cookie-entry )\n";
39073
+ str += "lenient-cookie-entry = lenient-cookie-pair / lenient-cookie-pair-invalid\n";
39074
+ str += "lenient-cookie-pair = OWS lenient-cookie-name OWS \"=\" OWS lenient-cookie-value OWS\n";
39075
+ str += "lenient-cookie-pair-invalid = OWS 1*tchar OWS ; Allow for standalone entries like \"fizz\" to be ignored\n";
39076
+ str += "lenient-cookie-name = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \"=\"\n";
39077
+ str += "lenient-cookie-value = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\n";
39078
+ str += "lenient-quoted-value = DQUOTE *( lenient-quoted-char ) DQUOTE\n";
39079
+ str += "lenient-quoted-char = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\n";
39080
+ str += "lenient-cookie-octet = %x21-2B / %x2D-3A / %x3C-7E\n";
39081
+ str += " ; Allow all printable characters except CTLs, DQUOTE, semicolon and SP\n";
39082
+ str += "\n";
39083
+ str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n";
39084
+ str += "cookie-string = cookie-pair *( \";\" SP cookie-pair )\n";
39085
+ str += "\n";
39086
+ str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\n";
39087
+ str += "; https://www.rfc-editor.org/errata/eid5518\n";
39088
+ str += "cookie-pair = cookie-name \"=\" cookie-value\n";
39089
+ str += "cookie-name = token\n";
39090
+ str += "cookie-value = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\n";
39091
+ str += " ; https://www.rfc-editor.org/errata/eid8242\n";
39092
+ str += "cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n";
39093
+ str += " ; US-ASCII characters excluding CTLs,\n";
39094
+ str += " ; whitespace, DQUOTE, comma, semicolon,\n";
39095
+ str += " ; and backslash\n";
39096
+ str += "\n";
39097
+ str += "; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\n";
39098
+ str += "OWS = *( [ CRLF ] WSP ) ; \"optional\" whitespace\n";
39099
+ str += "\n";
39100
+ str += "; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\n";
39101
+ str += "token = 1*(tchar)\n";
39102
+ str += "tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n";
39103
+ str += " / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n";
39104
+ str += " / DIGIT / ALPHA\n";
39105
+ str += " ; any VCHAR, except delimiters\n";
39106
+ str += "\n";
39107
+ str += "; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\n";
39108
+ str += "CHAR = %x01-7F ; any US-ASCII character (octets 0 - 127)\n";
39109
+ str += "CTL = %x00-1F / %x7F ; any US-ASCII control character\n";
39110
+ str += "separators = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" / \"\\\" / %x22 / \"/\" / \"[\" / \"]\" / \"?\" / \"=\" / \"{\" / \"}\" / SP / HT\n";
39111
+ str += "SP = %x20 ; US-ASCII SP, space (32)\n";
39112
+ str += "HT = %x09 ; US-ASCII HT, horizontal-tab (9)\n";
39113
+ str += "\n";
39114
+ str += "; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\n";
39115
+ str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n";
39116
+ str += "DIGIT = %x30-39 ; 0-9\n";
39117
+ str += "DQUOTE = %x22 ; \" (Double Quote)\n";
39118
+ str += "WSP = SP / HTAB ; white space\n";
39119
+ str += "HTAB = %x09 ; horizontal tab\n";
39120
+ str += "CRLF = CR LF ; Internet standard newline\n";
39121
+ str += "CR = %x0D ; carriage return\n";
39122
+ str += "LF = %x0A ; linefeed\n";
39123
+ return str;
39124
+ };
39125
+ }
39126
+
39127
+ /***/ }),
39128
+
39129
+ /***/ 2211:
39130
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39131
+
39132
+ "use strict";
39133
+ __webpack_require__.r(__webpack_exports__);
39134
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39135
+ /* harmony export */ Grammar: () => (/* reexport safe */ _grammar_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
39136
+ /* harmony export */ cookieNameLenientEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]),
39137
+ /* harmony export */ cookieNameLenientValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
39138
+ /* harmony export */ cookieNameStrictEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
39139
+ /* harmony export */ cookieNameStrictValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
39140
+ /* harmony export */ cookieValueLenientEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
39141
+ /* harmony export */ cookieValueLenientValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]),
39142
+ /* harmony export */ cookieValueStrictEncoder: () => (/* reexport safe */ _set_cookie_serialize_encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]),
39143
+ /* harmony export */ cookieValueStrictValidator: () => (/* reexport safe */ _set_cookie_serialize_validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
39144
+ /* harmony export */ identity: () => (/* reexport safe */ _utils_mjs__WEBPACK_IMPORTED_MODULE_11__.identity),
39145
+ /* harmony export */ noop: () => (/* reexport safe */ _utils_mjs__WEBPACK_IMPORTED_MODULE_11__.noop),
39146
+ /* harmony export */ parseCookie: () => (/* reexport safe */ _cookie_parse_index_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]),
39147
+ /* harmony export */ serializeCookie: () => (/* reexport safe */ _cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"])
39148
+ /* harmony export */ });
39149
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96552);
39150
+ /* harmony import */ var _cookie_parse_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32910);
39151
+ /* harmony import */ var _cookie_serialize_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90465);
39152
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97558);
39153
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10934);
39154
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11714);
39155
+ /* harmony import */ var _set_cookie_serialize_encoders_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81194);
39156
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68712);
39157
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_name_lenient_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80904);
39158
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27120);
39159
+ /* harmony import */ var _set_cookie_serialize_validators_cookie_value_lenient_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(99504);
39160
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(91176);
39161
+
39162
+
39163
+
39164
+
39165
+
39166
+
39167
+
39168
+
39169
+
39170
+
39171
+
39172
+
39173
+
39174
+ /***/ }),
39175
+
39176
+ /***/ 10934:
39177
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39178
+
39179
+ "use strict";
39180
+ __webpack_require__.r(__webpack_exports__);
39181
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39182
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39183
+ /* harmony export */ });
39184
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
39185
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91176);
39186
+
39187
+
39188
+ const cookieNameLenientEncoder = cookieName => {
39189
+ const value = String(cookieName);
39190
+ let result = '';
39191
+ for (const char of value) {
39192
+ result += (0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(char, {
39193
+ strict: false
39194
+ }) ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.percentEncodeChar)(char);
39195
+ }
39196
+ return result;
39197
+ };
39198
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameLenientEncoder);
39199
+
39200
+ /***/ }),
39201
+
39202
+ /***/ 97558:
39203
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39204
+
39205
+ "use strict";
39206
+ __webpack_require__.r(__webpack_exports__);
39207
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39208
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39209
+ /* harmony export */ });
39210
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
39211
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91176);
39212
+
39213
+
39214
+ const cookieNameStrictEncoder = cookieName => {
39215
+ const value = String(cookieName);
39216
+ let result = '';
39217
+ for (const char of value) {
39218
+ result += (0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(char) ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_1__.percentEncodeChar)(char);
39219
+ }
39220
+ return result;
39221
+ };
39222
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameStrictEncoder);
39223
+
39224
+ /***/ }),
39225
+
39226
+ /***/ 81194:
39227
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39228
+
39229
+ "use strict";
39230
+ __webpack_require__.r(__webpack_exports__);
39231
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39232
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39233
+ /* harmony export */ });
39234
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
39235
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
39236
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91176);
39237
+
39238
+
39239
+
39240
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
39241
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
39242
+ const cookieValueLenientEncoder = cookieValue => {
39243
+ const value = String(cookieValue);
39244
+
39245
+ // detect if the value is quoted
39246
+ const isQuoted = value.length >= 2 && value.startsWith('"') && value.endsWith('"');
39247
+
39248
+ // remove quotes if present for processing
39249
+ const valueToEncode = isQuoted ? value.slice(1, -1) : value;
39250
+ const startRule = isQuoted ? 'lenient-quoted-char' : 'lenient-cookie-octet';
39251
+ let result = '';
39252
+ for (const char of valueToEncode) {
39253
+ result += parser.parse(grammar, startRule, char).success ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.percentEncodeChar)(char);
39254
+ }
39255
+ return isQuoted ? `"${result}"` : result;
39256
+ };
39257
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientEncoder);
39258
+
39259
+ /***/ }),
39260
+
39261
+ /***/ 11714:
39262
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39263
+
39264
+ "use strict";
39265
+ __webpack_require__.r(__webpack_exports__);
39266
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39267
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39268
+ /* harmony export */ });
39269
+ /* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
39270
+ /* harmony import */ var _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96552);
39271
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91176);
39272
+
39273
+
39274
+
39275
+ const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
39276
+ const grammar = new _grammar_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]();
39277
+ const cookieValueStrictEncoder = cookieValue => {
39278
+ const value = String(cookieValue);
39279
+
39280
+ // detect if the value is quoted
39281
+ const isQuoted = value.length >= 2 && value.startsWith('"') && value.endsWith('"');
39282
+
39283
+ // remove quotes if present for processing
39284
+ const valueToEncode = isQuoted ? value.slice(1, -1) : value;
39285
+ let result = '';
39286
+ for (const char of valueToEncode) {
39287
+ result += parser.parse(grammar, 'cookie-octet', char).success ? char : (0,_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.percentEncodeChar)(char);
39288
+ }
39289
+
39290
+ // return quoted if input was quoted, unquoted otherwise
39291
+ return isQuoted ? `"${result}"` : result;
39292
+ };
39293
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictEncoder);
39294
+
39295
+ /***/ }),
39296
+
39297
+ /***/ 79080:
39298
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39299
+
39300
+ "use strict";
39301
+ __webpack_require__.r(__webpack_exports__);
39302
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39303
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39304
+ /* harmony export */ });
39305
+ /* harmony import */ var _encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11714);
39306
+ /* harmony import */ var _validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68712);
39307
+ /* harmony import */ var _validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27120);
39308
+ /* harmony import */ var _utils_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91176);
39309
+
39310
+
39311
+
39312
+
39313
+ const defaultOptions = {
39314
+ encoders: {
39315
+ name: _utils_mjs__WEBPACK_IMPORTED_MODULE_3__.identity,
39316
+ value: _encoders_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]
39317
+ },
39318
+ validators: {
39319
+ name: _validators_cookie_name_strict_mjs__WEBPACK_IMPORTED_MODULE_1__["default"],
39320
+ value: _validators_cookie_value_strict_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]
39321
+ }
39322
+ };
39323
+ const serialize = (name, value, options = {}) => {
39324
+ const mergedOptions = {
39325
+ ...defaultOptions,
39326
+ ...options,
39327
+ encoders: {
39328
+ ...defaultOptions.encoders,
39329
+ ...options.encoders
39330
+ },
39331
+ validators: {
39332
+ ...defaultOptions.validators,
39333
+ ...options.validators
39334
+ }
39335
+ };
39336
+ const encodedName = mergedOptions.encoders.name(name);
39337
+ const encodedValue = mergedOptions.encoders.value(value);
39338
+ mergedOptions.validators.name(encodedName);
39339
+ mergedOptions.validators.value(encodedValue);
39340
+ return `${encodedName}=${encodedValue}`;
39341
+ };
39342
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serialize);
39343
+
39344
+ /***/ }),
39345
+
39346
+ /***/ 80904:
39347
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39348
+
39349
+ "use strict";
39350
+ __webpack_require__.r(__webpack_exports__);
39351
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39352
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39353
+ /* harmony export */ });
39354
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
39355
+
39356
+ const cookieNameLenientValidator = cookieName => {
39357
+ if (!(0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieName, {
39358
+ strict: false
39359
+ })) {
39360
+ throw new TypeError(`Invalid cookie name: ${cookieName}`);
39361
+ }
39362
+ };
39363
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameLenientValidator);
39364
+
39365
+ /***/ }),
39366
+
39367
+ /***/ 68712:
39368
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39369
+
39370
+ "use strict";
39371
+ __webpack_require__.r(__webpack_exports__);
39372
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39373
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39374
+ /* harmony export */ });
39375
+ /* harmony import */ var _cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87561);
39376
+
39377
+ const cookieNameStrictValidator = cookieName => {
39378
+ if (!(0,_cookie_test_cookie_name_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieName)) {
39379
+ throw new TypeError(`Invalid cookie name: ${cookieName}`);
39380
+ }
39381
+ };
39382
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieNameStrictValidator);
39383
+
39384
+ /***/ }),
39385
+
39386
+ /***/ 99504:
39387
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39388
+
39389
+ "use strict";
39390
+ __webpack_require__.r(__webpack_exports__);
39391
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39392
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39393
+ /* harmony export */ });
39394
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58571);
39395
+
39396
+ const cookieValueLenientValidator = cookieValue => {
39397
+ if (!(0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue, {
39398
+ strict: false
39399
+ })) {
39400
+ throw new TypeError(`Invalid cookie value: ${cookieValue}`);
39401
+ }
39402
+ };
39403
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueLenientValidator);
39404
+
39405
+ /***/ }),
39406
+
39407
+ /***/ 27120:
39408
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39409
+
39410
+ "use strict";
39411
+ __webpack_require__.r(__webpack_exports__);
39412
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39413
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
39414
+ /* harmony export */ });
39415
+ /* harmony import */ var _cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58571);
39416
+
39417
+ const cookieValueStrictValidator = cookieValue => {
39418
+ if (!(0,_cookie_test_cookie_value_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(cookieValue)) {
39419
+ throw new TypeError(`Invalid cookie value: ${cookieValue}`);
39420
+ }
39421
+ };
39422
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cookieValueStrictValidator);
39423
+
39424
+ /***/ }),
39425
+
39426
+ /***/ 91176:
39427
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
39428
+
39429
+ "use strict";
39430
+ __webpack_require__.r(__webpack_exports__);
39431
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39432
+ /* harmony export */ identity: () => (/* binding */ identity),
39433
+ /* harmony export */ noop: () => (/* binding */ noop),
39434
+ /* harmony export */ percentEncodeChar: () => (/* binding */ percentEncodeChar)
39435
+ /* harmony export */ });
39436
+ const percentEncodeChar = char => {
39437
+ if (typeof char !== 'string' || [...char].length !== 1) {
39438
+ throw new TypeError('Input must be a single character string.');
39439
+ }
39440
+ const codePoint = char.codePointAt(0);
39441
+ if (codePoint <= 0x7f) {
39442
+ // ASCII range: Encode as %XX
39443
+ return `%${codePoint.toString(16).toUpperCase().padStart(2, '0')}`;
39444
+ } else {
39445
+ // Non-ASCII range: Use encodeURIComponent to handle UTF-8 encoding
39446
+ return encodeURIComponent(char);
39447
+ }
39448
+ };
39449
+ const identity = a => a;
39450
+ const noop = () => {};
39451
+
39452
+ /***/ }),
39453
+
38258
39454
  /***/ 16646:
38259
39455
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
38260
39456