Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
corepack.cjs23740 linesDownload Raw Back to lib
1"use strict";
2var __create = Object.create;
3var __defProp = Object.defineProperty;
4var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5var __getOwnPropNames = Object.getOwnPropertyNames;
6var __getProtoOf = Object.getPrototypeOf;
7var __hasOwnProp = Object.prototype.hasOwnProperty;
8var __esm = (fn2, res) => function __init() {
9  return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
10};
11var __commonJS = (cb, mod) => function __require() {
12  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13};
14var __export = (target, all) => {
15  for (var name2 in all)
16    __defProp(target, name2, { get: all[name2], enumerable: true });
17};
18var __copyProps = (to, from, except, desc2) => {
19  if (from && typeof from === "object" || typeof from === "function") {
20    for (let key of __getOwnPropNames(from))
21      if (!__hasOwnProp.call(to, key) && key !== except)
22        __defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
23  }
24  return to;
25};
26var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27  // If the importer is in node compatibility mode or this is not an ESM
28  // file that has been converted to a CommonJS file using a Babel-
29  // compatible transform (i.e. "__esModule" has not been set), then set
30  // "default" to the CommonJS "module.exports" for node compatibility.
31  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32  mod
33));
34var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
36// .yarn/cache/typanion-npm-3.14.0-8af344c436-8b03b19844.zip/node_modules/typanion/lib/index.mjs
37var lib_exports = {};
38__export(lib_exports, {
39  KeyRelationship: () => KeyRelationship,
40  TypeAssertionError: () => TypeAssertionError,
41  applyCascade: () => applyCascade,
42  as: () => as,
43  assert: () => assert,
44  assertWithErrors: () => assertWithErrors,
45  cascade: () => cascade,
46  fn: () => fn,
47  hasAtLeastOneKey: () => hasAtLeastOneKey,
48  hasExactLength: () => hasExactLength,
49  hasForbiddenKeys: () => hasForbiddenKeys,
50  hasKeyRelationship: () => hasKeyRelationship,
51  hasMaxLength: () => hasMaxLength,
52  hasMinLength: () => hasMinLength,
53  hasMutuallyExclusiveKeys: () => hasMutuallyExclusiveKeys,
54  hasRequiredKeys: () => hasRequiredKeys,
55  hasUniqueItems: () => hasUniqueItems,
56  isArray: () => isArray,
57  isAtLeast: () => isAtLeast,
58  isAtMost: () => isAtMost,
59  isBase64: () => isBase64,
60  isBoolean: () => isBoolean,
61  isDate: () => isDate,
62  isDict: () => isDict,
63  isEnum: () => isEnum,
64  isHexColor: () => isHexColor,
65  isISO8601: () => isISO8601,
66  isInExclusiveRange: () => isInExclusiveRange,
67  isInInclusiveRange: () => isInInclusiveRange,
68  isInstanceOf: () => isInstanceOf,
69  isInteger: () => isInteger,
70  isJSON: () => isJSON,
71  isLiteral: () => isLiteral,
72  isLowerCase: () => isLowerCase,
73  isMap: () => isMap,
74  isNegative: () => isNegative,
75  isNullable: () => isNullable,
76  isNumber: () => isNumber,
77  isObject: () => isObject,
78  isOneOf: () => isOneOf,
79  isOptional: () => isOptional,
80  isPartial: () => isPartial,
81  isPayload: () => isPayload,
82  isPositive: () => isPositive,
83  isRecord: () => isRecord,
84  isSet: () => isSet,
85  isString: () => isString,
86  isTuple: () => isTuple,
87  isUUID4: () => isUUID4,
88  isUnknown: () => isUnknown,
89  isUpperCase: () => isUpperCase,
90  makeTrait: () => makeTrait,
91  makeValidator: () => makeValidator,
92  matchesRegExp: () => matchesRegExp,
93  softAssert: () => softAssert
94});
95function getPrintable(value) {
96  if (value === null)
97    return `null`;
98  if (value === void 0)
99    return `undefined`;
100  if (value === ``)
101    return `an empty string`;
102  if (typeof value === "symbol")
103    return `<${value.toString()}>`;
104  if (Array.isArray(value))
105    return `an array`;
106  return JSON.stringify(value);
107}
108function getPrintableArray(value, conjunction) {
109  if (value.length === 0)
110    return `nothing`;
111  if (value.length === 1)
112    return getPrintable(value[0]);
113  const rest = value.slice(0, -1);
114  const trailing = value[value.length - 1];
115  const separator = value.length > 2 ? `, ${conjunction} ` : ` ${conjunction} `;
116  return `${rest.map((value2) => getPrintable(value2)).join(`, `)}${separator}${getPrintable(trailing)}`;
117}
118function computeKey(state, key) {
119  var _a, _b, _c;
120  if (typeof key === `number`) {
121    return `${(_a = state === null || state === void 0 ? void 0 : state.p) !== null && _a !== void 0 ? _a : `.`}[${key}]`;
122  } else if (simpleKeyRegExp.test(key)) {
123    return `${(_b = state === null || state === void 0 ? void 0 : state.p) !== null && _b !== void 0 ? _b : ``}.${key}`;
124  } else {
125    return `${(_c = state === null || state === void 0 ? void 0 : state.p) !== null && _c !== void 0 ? _c : `.`}[${JSON.stringify(key)}]`;
126  }
127}
128function plural(n, singular, plural2) {
129  return n === 1 ? singular : plural2;
130}
131function pushError({ errors, p } = {}, message) {
132  errors === null || errors === void 0 ? void 0 : errors.push(`${p !== null && p !== void 0 ? p : `.`}: ${message}`);
133  return false;
134}
135function makeSetter(target, key) {
136  return (v) => {
137    target[key] = v;
138  };
139}
140function makeCoercionFn(target, key) {
141  return (v) => {
142    const previous = target[key];
143    target[key] = v;
144    return makeCoercionFn(target, key).bind(null, previous);
145  };
146}
147function makeLazyCoercionFn(fn2, orig, generator) {
148  const commit = () => {
149    fn2(generator());
150    return revert;
151  };
152  const revert = () => {
153    fn2(orig);
154    return commit;
155  };
156  return commit;
157}
158function isUnknown() {
159  return makeValidator({
160    test: (value, state) => {
161      return true;
162    }
163  });
164}
165function isLiteral(expected) {
166  return makeValidator({
167    test: (value, state) => {
168      if (value !== expected)
169        return pushError(state, `Expected ${getPrintable(expected)} (got ${getPrintable(value)})`);
170      return true;
171    }
172  });
173}
174function isString() {
175  return makeValidator({
176    test: (value, state) => {
177      if (typeof value !== `string`)
178        return pushError(state, `Expected a string (got ${getPrintable(value)})`);
179      return true;
180    }
181  });
182}
183function isEnum(enumSpec) {
184  const valuesArray = Array.isArray(enumSpec) ? enumSpec : Object.values(enumSpec);
185  const isAlphaNum = valuesArray.every((item) => typeof item === "string" || typeof item === "number");
186  const values = new Set(valuesArray);
187  if (values.size === 1)
188    return isLiteral([...values][0]);
189  return makeValidator({
190    test: (value, state) => {
191      if (!values.has(value)) {
192        if (isAlphaNum) {
193          return pushError(state, `Expected one of ${getPrintableArray(valuesArray, `or`)} (got ${getPrintable(value)})`);
194        } else {
195          return pushError(state, `Expected a valid enumeration value (got ${getPrintable(value)})`);
196        }
197      }
198      return true;
199    }
200  });
201}
202function isBoolean() {
203  return makeValidator({
204    test: (value, state) => {
205      var _a;
206      if (typeof value !== `boolean`) {
207        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
208          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
209            return pushError(state, `Unbound coercion result`);
210          const coercion = BOOLEAN_COERCIONS.get(value);
211          if (typeof coercion !== `undefined`) {
212            state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]);
213            return true;
214          }
215        }
216        return pushError(state, `Expected a boolean (got ${getPrintable(value)})`);
217      }
218      return true;
219    }
220  });
221}
222function isNumber() {
223  return makeValidator({
224    test: (value, state) => {
225      var _a;
226      if (typeof value !== `number`) {
227        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
228          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
229            return pushError(state, `Unbound coercion result`);
230          let coercion;
231          if (typeof value === `string`) {
232            let val;
233            try {
234              val = JSON.parse(value);
235            } catch (_b) {
236            }
237            if (typeof val === `number`) {
238              if (JSON.stringify(val) === value) {
239                coercion = val;
240              } else {
241                return pushError(state, `Received a number that can't be safely represented by the runtime (${value})`);
242              }
243            }
244          }
245          if (typeof coercion !== `undefined`) {
246            state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]);
247            return true;
248          }
249        }
250        return pushError(state, `Expected a number (got ${getPrintable(value)})`);
251      }
252      return true;
253    }
254  });
255}
256function isPayload(spec) {
257  return makeValidator({
258    test: (value, state) => {
259      var _a;
260      if (typeof (state === null || state === void 0 ? void 0 : state.coercions) === `undefined`)
261        return pushError(state, `The isPayload predicate can only be used with coercion enabled`);
262      if (typeof state.coercion === `undefined`)
263        return pushError(state, `Unbound coercion result`);
264      if (typeof value !== `string`)
265        return pushError(state, `Expected a string (got ${getPrintable(value)})`);
266      let inner;
267      try {
268        inner = JSON.parse(value);
269      } catch (_b) {
270        return pushError(state, `Expected a JSON string (got ${getPrintable(value)})`);
271      }
272      const wrapper = { value: inner };
273      if (!spec(inner, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(wrapper, `value`) })))
274        return false;
275      state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, wrapper.value)]);
276      return true;
277    }
278  });
279}
280function isDate() {
281  return makeValidator({
282    test: (value, state) => {
283      var _a;
284      if (!(value instanceof Date)) {
285        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
286          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
287            return pushError(state, `Unbound coercion result`);
288          let coercion;
289          if (typeof value === `string` && iso8601RegExp.test(value)) {
290            coercion = new Date(value);
291          } else {
292            let timestamp;
293            if (typeof value === `string`) {
294              let val;
295              try {
296                val = JSON.parse(value);
297              } catch (_b) {
298              }
299              if (typeof val === `number`) {
300                timestamp = val;
301              }
302            } else if (typeof value === `number`) {
303              timestamp = value;
304            }
305            if (typeof timestamp !== `undefined`) {
306              if (Number.isSafeInteger(timestamp) || !Number.isSafeInteger(timestamp * 1e3)) {
307                coercion = new Date(timestamp * 1e3);
308              } else {
309                return pushError(state, `Received a timestamp that can't be safely represented by the runtime (${value})`);
310              }
311            }
312          }
313          if (typeof coercion !== `undefined`) {
314            state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]);
315            return true;
316          }
317        }
318        return pushError(state, `Expected a date (got ${getPrintable(value)})`);
319      }
320      return true;
321    }
322  });
323}
324function isArray(spec, { delimiter } = {}) {
325  return makeValidator({
326    test: (value, state) => {
327      var _a;
328      const originalValue = value;
329      if (typeof value === `string` && typeof delimiter !== `undefined`) {
330        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
331          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
332            return pushError(state, `Unbound coercion result`);
333          value = value.split(delimiter);
334        }
335      }
336      if (!Array.isArray(value))
337        return pushError(state, `Expected an array (got ${getPrintable(value)})`);
338      let valid = true;
339      for (let t = 0, T = value.length; t < T; ++t) {
340        valid = spec(value[t], Object.assign(Object.assign({}, state), { p: computeKey(state, t), coercion: makeCoercionFn(value, t) })) && valid;
341        if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) {
342          break;
343        }
344      }
345      if (value !== originalValue)
346        state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]);
347      return valid;
348    }
349  });
350}
351function isSet(spec, { delimiter } = {}) {
352  const isArrayValidator = isArray(spec, { delimiter });
353  return makeValidator({
354    test: (value, state) => {
355      var _a, _b;
356      if (Object.getPrototypeOf(value).toString() === `[object Set]`) {
357        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
358          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
359            return pushError(state, `Unbound coercion result`);
360          const originalValues = [...value];
361          const coercedValues = [...value];
362          if (!isArrayValidator(coercedValues, Object.assign(Object.assign({}, state), { coercion: void 0 })))
363            return false;
364          const updateValue = () => coercedValues.some((val, t) => val !== originalValues[t]) ? new Set(coercedValues) : value;
365          state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, makeLazyCoercionFn(state.coercion, value, updateValue)]);
366          return true;
367        } else {
368          let valid = true;
369          for (const subValue of value) {
370            valid = spec(subValue, Object.assign({}, state)) && valid;
371            if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) {
372              break;
373            }
374          }
375          return valid;
376        }
377      }
378      if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
379        if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
380          return pushError(state, `Unbound coercion result`);
381        const store = { value };
382        if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(store, `value`) })))
383          return false;
384        state.coercions.push([(_b = state.p) !== null && _b !== void 0 ? _b : `.`, makeLazyCoercionFn(state.coercion, value, () => new Set(store.value))]);
385        return true;
386      }
387      return pushError(state, `Expected a set (got ${getPrintable(value)})`);
388    }
389  });
390}
391function isMap(keySpec, valueSpec) {
392  const isArrayValidator = isArray(isTuple([keySpec, valueSpec]));
393  const isRecordValidator = isRecord(valueSpec, { keys: keySpec });
394  return makeValidator({
395    test: (value, state) => {
396      var _a, _b, _c;
397      if (Object.getPrototypeOf(value).toString() === `[object Map]`) {
398        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
399          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
400            return pushError(state, `Unbound coercion result`);
401          const originalValues = [...value];
402          const coercedValues = [...value];
403          if (!isArrayValidator(coercedValues, Object.assign(Object.assign({}, state), { coercion: void 0 })))
404            return false;
405          const updateValue = () => coercedValues.some((val, t) => val[0] !== originalValues[t][0] || val[1] !== originalValues[t][1]) ? new Map(coercedValues) : value;
406          state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, makeLazyCoercionFn(state.coercion, value, updateValue)]);
407          return true;
408        } else {
409          let valid = true;
410          for (const [key, subValue] of value) {
411            valid = keySpec(key, Object.assign({}, state)) && valid;
412            if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) {
413              break;
414            }
415            valid = valueSpec(subValue, Object.assign(Object.assign({}, state), { p: computeKey(state, key) })) && valid;
416            if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) {
417              break;
418            }
419          }
420          return valid;
421        }
422      }
423      if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
424        if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
425          return pushError(state, `Unbound coercion result`);
426        const store = { value };
427        if (Array.isArray(value)) {
428          if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: void 0 })))
429            return false;
430          state.coercions.push([(_b = state.p) !== null && _b !== void 0 ? _b : `.`, makeLazyCoercionFn(state.coercion, value, () => new Map(store.value))]);
431          return true;
432        } else {
433          if (!isRecordValidator(value, Object.assign(Object.assign({}, state), { coercion: makeCoercionFn(store, `value`) })))
434            return false;
435          state.coercions.push([(_c = state.p) !== null && _c !== void 0 ? _c : `.`, makeLazyCoercionFn(state.coercion, value, () => new Map(Object.entries(store.value)))]);
436          return true;
437        }
438      }
439      return pushError(state, `Expected a map (got ${getPrintable(value)})`);
440    }
441  });
442}
443function isTuple(spec, { delimiter } = {}) {
444  const lengthValidator = hasExactLength(spec.length);
445  return makeValidator({
446    test: (value, state) => {
447      var _a;
448      if (typeof value === `string` && typeof delimiter !== `undefined`) {
449        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
450          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
451            return pushError(state, `Unbound coercion result`);
452          value = value.split(delimiter);
453          state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]);
454        }
455      }
456      if (!Array.isArray(value))
457        return pushError(state, `Expected a tuple (got ${getPrintable(value)})`);
458      let valid = lengthValidator(value, Object.assign({}, state));
459      for (let t = 0, T = value.length; t < T && t < spec.length; ++t) {
460        valid = spec[t](value[t], Object.assign(Object.assign({}, state), { p: computeKey(state, t), coercion: makeCoercionFn(value, t) })) && valid;
461        if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) {
462          break;
463        }
464      }
465      return valid;
466    }
467  });
468}
469function isRecord(spec, { keys: keySpec = null } = {}) {
470  const isArrayValidator = isArray(isTuple([keySpec !== null && keySpec !== void 0 ? keySpec : isString(), spec]));
471  return makeValidator({
472    test: (value, state) => {
473      var _a;
474      if (Array.isArray(value)) {
475        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
476          if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
477            return pushError(state, `Unbound coercion result`);
478          if (!isArrayValidator(value, Object.assign(Object.assign({}, state), { coercion: void 0 })))
479            return false;
480          value = Object.fromEntries(value);
481          state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, value)]);
482          return true;
483        }
484      }
485      if (typeof value !== `object` || value === null)
486        return pushError(state, `Expected an object (got ${getPrintable(value)})`);
487      const keys = Object.keys(value);
488      let valid = true;
489      for (let t = 0, T = keys.length; t < T && (valid || (state === null || state === void 0 ? void 0 : state.errors) != null); ++t) {
490        const key = keys[t];
491        const sub = value[key];
492        if (key === `__proto__` || key === `constructor`) {
493          valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Unsafe property name`);
494          continue;
495        }
496        if (keySpec !== null && !keySpec(key, state)) {
497          valid = false;
498          continue;
499        }
500        if (!spec(sub, Object.assign(Object.assign({}, state), { p: computeKey(state, key), coercion: makeCoercionFn(value, key) }))) {
501          valid = false;
502          continue;
503        }
504      }
505      return valid;
506    }
507  });
508}
509function isDict(spec, opts = {}) {
510  return isRecord(spec, opts);
511}
512function isObject(props, { extra: extraSpec = null } = {}) {
513  const specKeys = Object.keys(props);
514  const validator = makeValidator({
515    test: (value, state) => {
516      if (typeof value !== `object` || value === null)
517        return pushError(state, `Expected an object (got ${getPrintable(value)})`);
518      const keys = /* @__PURE__ */ new Set([...specKeys, ...Object.keys(value)]);
519      const extra = {};
520      let valid = true;
521      for (const key of keys) {
522        if (key === `constructor` || key === `__proto__`) {
523          valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Unsafe property name`);
524        } else {
525          const spec = Object.prototype.hasOwnProperty.call(props, key) ? props[key] : void 0;
526          const sub = Object.prototype.hasOwnProperty.call(value, key) ? value[key] : void 0;
527          if (typeof spec !== `undefined`) {
528            valid = spec(sub, Object.assign(Object.assign({}, state), { p: computeKey(state, key), coercion: makeCoercionFn(value, key) })) && valid;
529          } else if (extraSpec === null) {
530            valid = pushError(Object.assign(Object.assign({}, state), { p: computeKey(state, key) }), `Extraneous property (got ${getPrintable(sub)})`);
531          } else {
532            Object.defineProperty(extra, key, {
533              enumerable: true,
534              get: () => sub,
535              set: makeSetter(value, key)
536            });
537          }
538        }
539        if (!valid && (state === null || state === void 0 ? void 0 : state.errors) == null) {
540          break;
541        }
542      }
543      if (extraSpec !== null && (valid || (state === null || state === void 0 ? void 0 : state.errors) != null))
544        valid = extraSpec(extra, state) && valid;
545      return valid;
546    }
547  });
548  return Object.assign(validator, {
549    properties: props
550  });
551}
552function isPartial(props) {
553  return isObject(props, { extra: isRecord(isUnknown()) });
554}
555function makeTrait(value) {
556  return () => {
557    return value;
558  };
559}
560function makeValidator({ test }) {
561  return makeTrait(test)();
562}
563function assert(val, validator) {
564  if (!validator(val)) {
565    throw new TypeAssertionError();
566  }
567}
568function assertWithErrors(val, validator) {
569  const errors = [];
570  if (!validator(val, { errors })) {
571    throw new TypeAssertionError({ errors });
572  }
573}
574function softAssert(val, validator) {
575}
576function as(value, validator, { coerce = false, errors: storeErrors, throw: throws } = {}) {
577  const errors = storeErrors ? [] : void 0;
578  if (!coerce) {
579    if (validator(value, { errors })) {
580      return throws ? value : { value, errors: void 0 };
581    } else if (!throws) {
582      return { value: void 0, errors: errors !== null && errors !== void 0 ? errors : true };
583    } else {
584      throw new TypeAssertionError({ errors });
585    }
586  }
587  const state = { value };
588  const coercion = makeCoercionFn(state, `value`);
589  const coercions = [];
590  if (!validator(value, { errors, coercion, coercions })) {
591    if (!throws) {
592      return { value: void 0, errors: errors !== null && errors !== void 0 ? errors : true };
593    } else {
594      throw new TypeAssertionError({ errors });
595    }
596  }
597  for (const [, apply] of coercions)
598    apply();
599  if (throws) {
600    return state.value;
601  } else {
602    return { value: state.value, errors: void 0 };
603  }
604}
605function fn(validators, fn2) {
606  const isValidArgList = isTuple(validators);
607  return ((...args) => {
608    const check = isValidArgList(args);
609    if (!check)
610      throw new TypeAssertionError();
611    return fn2(...args);
612  });
613}
614function hasMinLength(length) {
615  return makeValidator({
616    test: (value, state) => {
617      if (!(value.length >= length))
618        return pushError(state, `Expected to have a length of at least ${length} elements (got ${value.length})`);
619      return true;
620    }
621  });
622}
623function hasMaxLength(length) {
624  return makeValidator({
625    test: (value, state) => {
626      if (!(value.length <= length))
627        return pushError(state, `Expected to have a length of at most ${length} elements (got ${value.length})`);
628      return true;
629    }
630  });
631}
632function hasExactLength(length) {
633  return makeValidator({
634    test: (value, state) => {
635      if (!(value.length === length))
636        return pushError(state, `Expected to have a length of exactly ${length} elements (got ${value.length})`);
637      return true;
638    }
639  });
640}
641function hasUniqueItems({ map } = {}) {
642  return makeValidator({
643    test: (value, state) => {
644      const set = /* @__PURE__ */ new Set();
645      const dup = /* @__PURE__ */ new Set();
646      for (let t = 0, T = value.length; t < T; ++t) {
647        const sub = value[t];
648        const key = typeof map !== `undefined` ? map(sub) : sub;
649        if (set.has(key)) {
650          if (dup.has(key))
651            continue;
652          pushError(state, `Expected to contain unique elements; got a duplicate with ${getPrintable(value)}`);
653          dup.add(key);
654        } else {
655          set.add(key);
656        }
657      }
658      return dup.size === 0;
659    }
660  });
661}
662function isNegative() {
663  return makeValidator({
664    test: (value, state) => {
665      if (!(value <= 0))
666        return pushError(state, `Expected to be negative (got ${value})`);
667      return true;
668    }
669  });
670}
671function isPositive() {
672  return makeValidator({
673    test: (value, state) => {
674      if (!(value >= 0))
675        return pushError(state, `Expected to be positive (got ${value})`);
676      return true;
677    }
678  });
679}
680function isAtLeast(n) {
681  return makeValidator({
682    test: (value, state) => {
683      if (!(value >= n))
684        return pushError(state, `Expected to be at least ${n} (got ${value})`);
685      return true;
686    }
687  });
688}
689function isAtMost(n) {
690  return makeValidator({
691    test: (value, state) => {
692      if (!(value <= n))
693        return pushError(state, `Expected to be at most ${n} (got ${value})`);
694      return true;
695    }
696  });
697}
698function isInInclusiveRange(a, b) {
699  return makeValidator({
700    test: (value, state) => {
701      if (!(value >= a && value <= b))
702        return pushError(state, `Expected to be in the [${a}; ${b}] range (got ${value})`);
703      return true;
704    }
705  });
706}
707function isInExclusiveRange(a, b) {
708  return makeValidator({
709    test: (value, state) => {
710      if (!(value >= a && value < b))
711        return pushError(state, `Expected to be in the [${a}; ${b}[ range (got ${value})`);
712      return true;
713    }
714  });
715}
716function isInteger({ unsafe = false } = {}) {
717  return makeValidator({
718    test: (value, state) => {
719      if (value !== Math.round(value))
720        return pushError(state, `Expected to be an integer (got ${value})`);
721      if (!unsafe && !Number.isSafeInteger(value))
722        return pushError(state, `Expected to be a safe integer (got ${value})`);
723      return true;
724    }
725  });
726}
727function matchesRegExp(regExp) {
728  return makeValidator({
729    test: (value, state) => {
730      if (!regExp.test(value))
731        return pushError(state, `Expected to match the pattern ${regExp.toString()} (got ${getPrintable(value)})`);
732      return true;
733    }
734  });
735}
736function isLowerCase() {
737  return makeValidator({
738    test: (value, state) => {
739      if (value !== value.toLowerCase())
740        return pushError(state, `Expected to be all-lowercase (got ${value})`);
741      return true;
742    }
743  });
744}
745function isUpperCase() {
746  return makeValidator({
747    test: (value, state) => {
748      if (value !== value.toUpperCase())
749        return pushError(state, `Expected to be all-uppercase (got ${value})`);
750      return true;
751    }
752  });
753}
754function isUUID4() {
755  return makeValidator({
756    test: (value, state) => {
757      if (!uuid4RegExp.test(value))
758        return pushError(state, `Expected to be a valid UUID v4 (got ${getPrintable(value)})`);
759      return true;
760    }
761  });
762}
763function isISO8601() {
764  return makeValidator({
765    test: (value, state) => {
766      if (!iso8601RegExp.test(value))
767        return pushError(state, `Expected to be a valid ISO 8601 date string (got ${getPrintable(value)})`);
768      return true;
769    }
770  });
771}
772function isHexColor({ alpha = false }) {
773  return makeValidator({
774    test: (value, state) => {
775      const res = alpha ? colorStringRegExp.test(value) : colorStringAlphaRegExp.test(value);
776      if (!res)
777        return pushError(state, `Expected to be a valid hexadecimal color string (got ${getPrintable(value)})`);
778      return true;
779    }
780  });
781}
782function isBase64() {
783  return makeValidator({
784    test: (value, state) => {
785      if (!base64RegExp.test(value))
786        return pushError(state, `Expected to be a valid base 64 string (got ${getPrintable(value)})`);
787      return true;
788    }
789  });
790}
791function isJSON(spec = isUnknown()) {
792  return makeValidator({
793    test: (value, state) => {
794      let data;
795      try {
796        data = JSON.parse(value);
797      } catch (_a) {
798        return pushError(state, `Expected to be a valid JSON string (got ${getPrintable(value)})`);
799      }
800      return spec(data, state);
801    }
802  });
803}
804function cascade(spec, ...followups) {
805  const resolvedFollowups = Array.isArray(followups[0]) ? followups[0] : followups;
806  return makeValidator({
807    test: (value, state) => {
808      var _a, _b;
809      const context = { value };
810      const subCoercion = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? makeCoercionFn(context, `value`) : void 0;
811      const subCoercions = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? [] : void 0;
812      if (!spec(value, Object.assign(Object.assign({}, state), { coercion: subCoercion, coercions: subCoercions })))
813        return false;
814      const reverts = [];
815      if (typeof subCoercions !== `undefined`)
816        for (const [, coercion] of subCoercions)
817          reverts.push(coercion());
818      try {
819        if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {
820          if (context.value !== value) {
821            if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)
822              return pushError(state, `Unbound coercion result`);
823            state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, context.value)]);
824          }
825          (_b = state === null || state === void 0 ? void 0 : state.coercions) === null || _b === void 0 ? void 0 : _b.push(...subCoercions);
826        }
827        return resolvedFollowups.every((spec2) => {
828          return spec2(context.value, state);
829        });
830      } finally {
831        for (const revert of reverts) {
832          revert();
833        }
834      }
835    }
836  });
837}
838function applyCascade(spec, ...followups) {
839  const resolvedFollowups = Array.isArray(followups[0]) ? followups[0] : followups;
840  return cascade(spec, resolvedFollowups);
841}
842function isOptional(spec) {
843  return makeValidator({
844    test: (value, state) => {
845      if (typeof value === `undefined`)
846        return true;
847      return spec(value, state);
848    }
849  });
850}
851function isNullable(spec) {
852  return makeValidator({
853    test: (value, state) => {
854      if (value === null)
855        return true;
856      return spec(value, state);
857    }
858  });
859}
860function hasRequiredKeys(requiredKeys, options) {
861  var _a;
862  const requiredSet = new Set(requiredKeys);
863  const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"];
864  return makeValidator({
865    test: (value, state) => {
866      const keys = new Set(Object.keys(value));
867      const problems = [];
868      for (const key of requiredSet)
869        if (!check(keys, key, value))
870          problems.push(key);
871      if (problems.length > 0)
872        return pushError(state, `Missing required ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, `and`)}`);
873      return true;
874    }
875  });
876}
877function hasAtLeastOneKey(requiredKeys, options) {
878  var _a;
879  const requiredSet = new Set(requiredKeys);
880  const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"];
881  return makeValidator({
882    test: (value, state) => {
883      const keys = Object.keys(value);
884      const valid = keys.some((key) => check(requiredSet, key, value));
885      if (!valid)
886        return pushError(state, `Missing at least one property from ${getPrintableArray(Array.from(requiredSet), `or`)}`);
887      return true;
888    }
889  });
890}
891function hasForbiddenKeys(forbiddenKeys, options) {
892  var _a;
893  const forbiddenSet = new Set(forbiddenKeys);
894  const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"];
895  return makeValidator({
896    test: (value, state) => {
897      const keys = new Set(Object.keys(value));
898      const problems = [];
899      for (const key of forbiddenSet)
900        if (check(keys, key, value))
901          problems.push(key);
902      if (problems.length > 0)
903        return pushError(state, `Forbidden ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, `and`)}`);
904      return true;
905    }
906  });
907}
908function hasMutuallyExclusiveKeys(exclusiveKeys, options) {
909  var _a;
910  const exclusiveSet = new Set(exclusiveKeys);
911  const check = checks[(_a = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _a !== void 0 ? _a : "missing"];
912  return makeValidator({
913    test: (value, state) => {
914      const keys = new Set(Object.keys(value));
915      const used = [];
916      for (const key of exclusiveSet)
917        if (check(keys, key, value))
918          used.push(key);
919      if (used.length > 1)
920        return pushError(state, `Mutually exclusive properties ${getPrintableArray(used, `and`)}`);
921      return true;
922    }
923  });
924}
925function hasKeyRelationship(subject, relationship, others, options) {
926  var _a, _b;
927  const skipped = new Set((_a = options === null || options === void 0 ? void 0 : options.ignore) !== null && _a !== void 0 ? _a : []);
928  const check = checks[(_b = options === null || options === void 0 ? void 0 : options.missingIf) !== null && _b !== void 0 ? _b : "missing"];
929  const otherSet = new Set(others);
930  const spec = keyRelationships[relationship];
931  const conjunction = relationship === KeyRelationship.Forbids ? `or` : `and`;
932  return makeValidator({
933    test: (value, state) => {
934      const keys = new Set(Object.keys(value));
935      if (!check(keys, subject, value) || skipped.has(value[subject]))
936        return true;
937      const problems = [];
938      for (const key of otherSet)
939        if ((check(keys, key, value) && !skipped.has(value[key])) !== spec.expect)
940          problems.push(key);
941      if (problems.length >= 1)
942        return pushError(state, `Property "${subject}" ${spec.message} ${plural(problems.length, `property`, `properties`)} ${getPrintableArray(problems, conjunction)}`);
943      return true;
944    }
945  });
946}
947var simpleKeyRegExp, colorStringRegExp, colorStringAlphaRegExp, base64RegExp, uuid4RegExp, iso8601RegExp, BOOLEAN_COERCIONS, isInstanceOf, isOneOf, TypeAssertionError, checks, KeyRelationship, keyRelationships;
948var init_lib = __esm({
949  ".yarn/cache/typanion-npm-3.14.0-8af344c436-8b03b19844.zip/node_modules/typanion/lib/index.mjs"() {
950    simpleKeyRegExp = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
951    colorStringRegExp = /^#[0-9a-f]{6}$/i;
952    colorStringAlphaRegExp = /^#[0-9a-f]{6}([0-9a-f]{2})?$/i;
953    base64RegExp = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
954    uuid4RegExp = /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i;
955    iso8601RegExp = /^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/;
956    BOOLEAN_COERCIONS = /* @__PURE__ */ new Map([
957      [`true`, true],
958      [`True`, true],
959      [`1`, true],
960      [1, true],
961      [`false`, false],
962      [`False`, false],
963      [`0`, false],
964      [0, false]
965    ]);
966    isInstanceOf = (constructor) => makeValidator({
967      test: (value, state) => {
968        if (!(value instanceof constructor))
969          return pushError(state, `Expected an instance of ${constructor.name} (got ${getPrintable(value)})`);
970        return true;
971      }
972    });
973    isOneOf = (specs, { exclusive = false } = {}) => makeValidator({
974      test: (value, state) => {
975        var _a, _b, _c;
976        const matches = [];
977        const errorBuffer = typeof (state === null || state === void 0 ? void 0 : state.errors) !== `undefined` ? [] : void 0;
978        for (let t = 0, T = specs.length; t < T; ++t) {
979          const subErrors = typeof (state === null || state === void 0 ? void 0 : state.errors) !== `undefined` ? [] : void 0;
980          const subCoercions = typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined` ? [] : void 0;
981          if (specs[t](value, Object.assign(Object.assign({}, state), { errors: subErrors, coercions: subCoercions, p: `${(_a = state === null || state === void 0 ? void 0 : state.p) !== null && _a !== void 0 ? _a : `.`}#${t + 1}` }))) {
982            matches.push([`#${t + 1}`, subCoercions]);
983            if (!exclusive) {
984              break;
985            }
986          } else {
987            errorBuffer === null || errorBuffer === void 0 ? void 0 : errorBuffer.push(subErrors[0]);
988          }
989        }
990        if (matches.length === 1) {
991          const [, subCoercions] = matches[0];
992          if (typeof subCoercions !== `undefined`)
993            (_b = state === null || state === void 0 ? void 0 : state.coercions) === null || _b === void 0 ? void 0 : _b.push(...subCoercions);
994          return true;
995        }
996        if (matches.length > 1)
997          pushError(state, `Expected to match exactly a single predicate (matched ${matches.join(`, `)})`);
998        else
999          (_c = state === null || state === void 0 ? void 0 : state.errors) === null || _c === void 0 ? void 0 : _c.push(...errorBuffer);
1000        return false;
1001      }
1002    });
1003    TypeAssertionError = class extends Error {
1004      constructor({ errors } = {}) {
1005        let errorMessage = `Type mismatch`;
1006        if (errors && errors.length > 0) {
1007          errorMessage += `
1008`;
1009          for (const error of errors) {
1010            errorMessage += `
1011- ${error}`;
1012          }
1013        }
1014        super(errorMessage);
1015      }
1016    };
1017    checks = {
1018      missing: (keys, key) => keys.has(key),
1019      undefined: (keys, key, value) => keys.has(key) && typeof value[key] !== `undefined`,
1020      nil: (keys, key, value) => keys.has(key) && value[key] != null,
1021      falsy: (keys, key, value) => keys.has(key) && !!value[key]
1022    };
1023    (function(KeyRelationship2) {
1024      KeyRelationship2["Forbids"] = "Forbids";
1025      KeyRelationship2["Requires"] = "Requires";
1026    })(KeyRelationship || (KeyRelationship = {}));
1027    keyRelationships = {
1028      [KeyRelationship.Forbids]: {
1029        expect: false,
1030        message: `forbids using`
1031      },
1032      [KeyRelationship.Requires]: {
1033        expect: true,
1034        message: `requires using`
1035      }
1036    };
1037  }
1038});
1039
1040// .yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/platform/node.js
1041var require_node = __commonJS({
1042  ".yarn/__virtual__/clipanion-virtual-dbbb3cfe27/0/cache/clipanion-patch-1b1b878e9f-a833a30963.zip/node_modules/clipanion/lib/platform/node.js"(exports2) {
1043    "use strict";
1044    Object.defineProperty(exports2, "__esModule", { value: true });
1045    var tty2 = require("tty");
1046    function _interopDefaultLegacy(e) {
1047      return e && typeof e === "object" && "default" in e ? e : { "default": e };
1048    }
1049    var tty__default = /* @__PURE__ */ _interopDefaultLegacy(tty2);
1050    function getDefaultColorDepth2() {
1051      if (tty__default["default"] && `getColorDepth` in tty__default["default"].WriteStream.prototype)
1052        return tty__default["default"].WriteStream.prototype.getColorDepth();
1053      if (process.env.FORCE_COLOR === `0`)
1054        return 1;
1055      if (process.env.FORCE_COLOR === `1`)
1056        return 8;
1057      if (typeof process.stdout !== `undefined` && process.stdout.isTTY)
1058        return 8;
1059      return 1;
1060    }
1061    var gContextStorage;
1062    function getCaptureActivator2(context) {
1063      let contextStorage = gContextStorage;
1064      if (typeof contextStorage === `undefined`) {
1065        if (context.stdout === process.stdout && context.stderr === process.stderr)
1066          return null;
1067        const { AsyncLocalStorage: LazyAsyncLocalStorage } = require("async_hooks");
1068        contextStorage = gContextStorage = new LazyAsyncLocalStorage();
1069        const origStdoutWrite = process.stdout._write;
1070        process.stdout._write = function(chunk, encoding, cb) {
1071          const context2 = contextStorage.getStore();
1072          if (typeof context2 === `undefined`)
1073            return origStdoutWrite.call(this, chunk, encoding, cb);
1074          return context2.stdout.write(chunk, encoding, cb);
1075        };
1076        const origStderrWrite = process.stderr._write;
1077        process.stderr._write = function(chunk, encoding, cb) {
1078          const context2 = contextStorage.getStore();
1079          if (typeof context2 === `undefined`)
1080            return origStderrWrite.call(this, chunk, encoding, cb);
1081          return context2.stderr.write(chunk, encoding, cb);
1082        };
1083      }
1084      return (fn2) => {
1085        return contextStorage.run(context, fn2);
1086      };
1087    }
1088    exports2.getCaptureActivator = getCaptureActivator2;
1089    exports2.getDefaultColorDepth = getDefaultColorDepth2;
1090  }
1091});
1092
1093// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/debug.js
1094var require_debug = __commonJS({
1095  ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/debug.js"(exports2, module2) {
1096    "use strict";
1097    var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
1098    };
1099    module2.exports = debug2;
1100  }
1101});
1102
1103// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/constants.js
1104var require_constants = __commonJS({
1105  ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/constants.js"(exports2, module2) {
1106    "use strict";
1107    var SEMVER_SPEC_VERSION = "2.0.0";
1108    var MAX_LENGTH = 256;
1109    var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
1110    9007199254740991;
1111    var MAX_SAFE_COMPONENT_LENGTH = 16;
1112    var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
1113    var RELEASE_TYPES = [
1114      "major",
1115      "premajor",
1116      "minor",
1117      "preminor",
1118      "patch",
1119      "prepatch",
1120      "prerelease"
1121    ];
1122    module2.exports = {
1123      MAX_LENGTH,
1124      MAX_SAFE_COMPONENT_LENGTH,
1125      MAX_SAFE_BUILD_LENGTH,
1126      MAX_SAFE_INTEGER,
1127      RELEASE_TYPES,
1128      SEMVER_SPEC_VERSION,
1129      FLAG_INCLUDE_PRERELEASE: 1,
1130      FLAG_LOOSE: 2
1131    };
1132  }
1133});
1134
1135// .yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/re.js
1136var require_re = __commonJS({
1137  ".yarn/cache/semver-npm-7.7.3-9cf7b3b46c-4afe5c9865.zip/node_modules/semver/internal/re.js"(exports2, module2) {
1138    "use strict";
1139    var {
1140      MAX_SAFE_COMPONENT_LENGTH,
1141      MAX_SAFE_BUILD_LENGTH,
1142      MAX_LENGTH
1143    } = require_constants();
1144    var debug2 = require_debug();
1145    exports2 = module2.exports = {};
1146    var re = exports2.re = [];
1147    var safeRe = exports2.safeRe = [];
1148    var src = exports2.src = [];
1149    var safeSrc = exports2.safeSrc = [];
1150    var t = exports2.t = {};
1151    var R = 0;
1152    var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
1153    var safeRegexReplacements = [
1154      ["\\s", 1],
1155      ["\\d", MAX_LENGTH],
1156      [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
1157    ];
1158    var makeSafeRegex = (value) => {
1159      for (const [token, max] of safeRegexReplacements) {
1160        value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
1161      }
1162      return value;
1163    };
1164    var createToken = (name2, value, isGlobal) => {
1165      const safe = makeSafeRegex(value);
1166      const index = R++;
1167      debug2(name2, index, value);
1168      t[name2] = index;
1169      src[index] = value;
1170      safeSrc[index] = safe;
1171      re[index] = new RegExp(value, isGlobal ? "g" : void 0);
1172      safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
1173    };
1174    createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
1175    createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
1176    createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
1177    createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
1178    createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
1179    createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
1180    createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
1181    createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
1182    createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
1183    createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
1184    createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
1185    createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
1186    createToken("FULL", `^${src[t.FULLPLAIN]}$`);
1187    createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
1188    createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
1189    createToken("GTLT", "((?:<|>)?=?)");
1190    createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
1191    createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
1192    createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
1193    createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
1194    createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
1195    createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
1196    createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
1197    createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
1198    createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
1199    createToken("COERCERTL", src[t.COERCE], true);
1200    createToken("COERCERTLFULL", src[t.COERCEFULL], true);

Showing the first 1,200 of 23740 lines. Download the file for the rest.

codekingpro/portable-devtools · Team Ai