keycomfort 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +336 -602
  2. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -1,18 +1,5 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
3
-
4
- var require$$0$1 = require('node:process');
5
- var require$$1 = require('node:child_process');
6
- var require$$3 = require('node:fs');
7
- var require$$5 = require('node:path');
8
- var require$$4$1 = require('node:readline');
9
- var require$$0 = require('node:events');
10
- var require$$2 = require('node:os');
11
- var require$$4 = require('node:fs/promises');
12
- var require$$6$1 = require('node:stream');
13
- var require$$7 = require('node:assert');
14
-
15
- function getDefaultExportFromCjs (x) {
2
+ 'use strict';var require$$0$1=require('node:process'),require$$1=require('node:child_process'),require$$3=require('node:fs'),require$$2=require('node:path'),require$$4$1=require('node:readline'),require$$0=require('node:events'),require$$2$1=require('node:os'),require$$4=require('node:fs/promises'),require$$6$1=require('node:stream'),require$$7=require('node:assert');function getDefaultExportFromCjs (x) {
16
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
17
4
  }
18
5
 
@@ -43,17 +30,7 @@ function getAugmentedNamespace(n) {
43
30
  });
44
31
  });
45
32
  return a;
46
- }
47
-
48
- var main$1 = {};
49
-
50
- var commander = {};
51
-
52
- var argument = {};
53
-
54
- var error = {};
55
-
56
- /**
33
+ }var main$1 = {};var commander = {};var argument = {};var error = {};/**
57
34
  * CommanderError class
58
35
  */
59
36
 
@@ -99,9 +76,7 @@ function requireError () {
99
76
  error.CommanderError = CommanderError;
100
77
  error.InvalidArgumentError = InvalidArgumentError;
101
78
  return error;
102
- }
103
-
104
- var hasRequiredArgument;
79
+ }var hasRequiredArgument;
105
80
 
106
81
  function requireArgument () {
107
82
  if (hasRequiredArgument) return argument;
@@ -257,13 +232,7 @@ function requireArgument () {
257
232
  argument.Argument = Argument;
258
233
  argument.humanReadableArgName = humanReadableArgName;
259
234
  return argument;
260
- }
261
-
262
- var command = {};
263
-
264
- var help = {};
265
-
266
- var hasRequiredHelp;
235
+ }var command = {};var help = {};var hasRequiredHelp;
267
236
 
268
237
  function requireHelp () {
269
238
  if (hasRequiredHelp) return help;
@@ -1016,11 +985,7 @@ function requireHelp () {
1016
985
  help.Help = Help;
1017
986
  help.stripColor = stripColor;
1018
987
  return help;
1019
- }
1020
-
1021
- var option = {};
1022
-
1023
- var hasRequiredOption;
988
+ }var option = {};var hasRequiredOption;
1024
989
 
1025
990
  function requireOption () {
1026
991
  if (hasRequiredOption) return option;
@@ -1406,11 +1371,7 @@ function requireOption () {
1406
1371
  option.Option = Option;
1407
1372
  option.DualOptions = DualOptions;
1408
1373
  return option;
1409
- }
1410
-
1411
- var suggestSimilar = {};
1412
-
1413
- var hasRequiredSuggestSimilar;
1374
+ }var suggestSimilar = {};var hasRequiredSuggestSimilar;
1414
1375
 
1415
1376
  function requireSuggestSimilar () {
1416
1377
  if (hasRequiredSuggestSimilar) return suggestSimilar;
@@ -1517,16 +1478,14 @@ function requireSuggestSimilar () {
1517
1478
 
1518
1479
  suggestSimilar.suggestSimilar = suggestSimilar$1;
1519
1480
  return suggestSimilar;
1520
- }
1521
-
1522
- var hasRequiredCommand;
1481
+ }var hasRequiredCommand;
1523
1482
 
1524
1483
  function requireCommand () {
1525
1484
  if (hasRequiredCommand) return command;
1526
1485
  hasRequiredCommand = 1;
1527
1486
  const EventEmitter = require$$0.EventEmitter;
1528
1487
  const childProcess = require$$1;
1529
- const path = require$$5;
1488
+ const path = require$$2;
1530
1489
  const fs = require$$3;
1531
1490
  const process = require$$0$1;
1532
1491
 
@@ -4300,9 +4259,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
4300
4259
  command.Command = Command;
4301
4260
  command.useColor = useColor; // exporting for tests
4302
4261
  return command;
4303
- }
4304
-
4305
- var hasRequiredCommander;
4262
+ }var hasRequiredCommander;
4306
4263
 
4307
4264
  function requireCommander () {
4308
4265
  if (hasRequiredCommander) return commander;
@@ -4332,9 +4289,7 @@ function requireCommander () {
4332
4289
  commander.InvalidArgumentError = InvalidArgumentError;
4333
4290
  commander.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated
4334
4291
  return commander;
4335
- }
4336
-
4337
- const ALIAS = Symbol.for('yaml.alias');
4292
+ }const ALIAS = Symbol.for('yaml.alias');
4338
4293
  const DOC = Symbol.for('yaml.document');
4339
4294
  const MAP = Symbol.for('yaml.map');
4340
4295
  const PAIR = Symbol.for('yaml.pair');
@@ -4367,9 +4322,7 @@ function isNode(node) {
4367
4322
  }
4368
4323
  return false;
4369
4324
  }
4370
- const hasAnchor = (node) => (isScalar$1(node) || isCollection$1(node)) && !!node.anchor;
4371
-
4372
- const BREAK$1 = Symbol('break visit');
4325
+ const hasAnchor = (node) => (isScalar$1(node) || isCollection$1(node)) && !!node.anchor;const BREAK$1 = Symbol('break visit');
4373
4326
  const SKIP$1 = Symbol('skip children');
4374
4327
  const REMOVE$1 = Symbol('remove node');
4375
4328
  /**
@@ -4597,9 +4550,7 @@ function replaceNode(key, path, node) {
4597
4550
  const pt = isAlias(parent) ? 'alias' : 'scalar';
4598
4551
  throw new Error(`Cannot replace node with ${pt} parent`);
4599
4552
  }
4600
- }
4601
-
4602
- const escapeChars = {
4553
+ }const escapeChars = {
4603
4554
  '!': '%21',
4604
4555
  ',': '%2C',
4605
4556
  '[': '%5B',
@@ -4769,9 +4720,7 @@ class Directives {
4769
4720
  }
4770
4721
  }
4771
4722
  Directives.defaultYaml = { explicit: false, version: '1.2' };
4772
- Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' };
4773
-
4774
- /**
4723
+ Directives.defaultTags = { '!!': 'tag:yaml.org,2002:' };/**
4775
4724
  * Verify that the input string is a valid anchor.
4776
4725
  *
4777
4726
  * Will throw on errors.
@@ -4836,9 +4785,7 @@ function createNodeAnchors(doc, prefix) {
4836
4785
  },
4837
4786
  sourceObjects
4838
4787
  };
4839
- }
4840
-
4841
- /**
4788
+ }/**
4842
4789
  * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
4843
4790
  * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the
4844
4791
  * 2021 edition: https://tc39.es/ecma262/#sec-json.parse
@@ -4890,9 +4837,7 @@ function applyReviver(reviver, obj, key, val) {
4890
4837
  }
4891
4838
  }
4892
4839
  return reviver.call(obj, key, val);
4893
- }
4894
-
4895
- /**
4840
+ }/**
4896
4841
  * Recursively convert any node or its contents to native JavaScript
4897
4842
  *
4898
4843
  * @param value - The input value
@@ -4924,9 +4869,7 @@ function toJS(value, arg, ctx) {
4924
4869
  if (typeof value === 'bigint' && !ctx?.keep)
4925
4870
  return Number(value);
4926
4871
  return value;
4927
- }
4928
-
4929
- class NodeBase {
4872
+ }class NodeBase {
4930
4873
  constructor(type) {
4931
4874
  Object.defineProperty(this, NODE_TYPE, { value: type });
4932
4875
  }
@@ -4957,9 +4900,7 @@ class NodeBase {
4957
4900
  ? applyReviver(reviver, { '': res }, '', res)
4958
4901
  : res;
4959
4902
  }
4960
- }
4961
-
4962
- class Alias extends NodeBase {
4903
+ }class Alias extends NodeBase {
4963
4904
  constructor(source) {
4964
4905
  super(ALIAS);
4965
4906
  this.source = source;
@@ -5064,9 +5005,7 @@ function getAliasCount(doc, node, anchors) {
5064
5005
  return Math.max(kc, vc);
5065
5006
  }
5066
5007
  return 1;
5067
- }
5068
-
5069
- const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
5008
+ }const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
5070
5009
  class Scalar extends NodeBase {
5071
5010
  constructor(value) {
5072
5011
  super(SCALAR$1);
@@ -5083,9 +5022,7 @@ Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED';
5083
5022
  Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL';
5084
5023
  Scalar.PLAIN = 'PLAIN';
5085
5024
  Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';
5086
- Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE';
5087
-
5088
- const defaultTagPrefix = 'tag:yaml.org,2002:';
5025
+ Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE';const defaultTagPrefix = 'tag:yaml.org,2002:';
5089
5026
  function findTagObject(value, tagName, tags) {
5090
5027
  if (tagName) {
5091
5028
  const match = tags.filter(t => t.tag === tagName);
@@ -5166,9 +5103,7 @@ function createNode(value, tagName, ctx) {
5166
5103
  if (ref)
5167
5104
  ref.node = node;
5168
5105
  return node;
5169
- }
5170
-
5171
- function collectionFromPath(schema, path, value) {
5106
+ }function collectionFromPath(schema, path, value) {
5172
5107
  let v = value;
5173
5108
  for (let i = path.length - 1; i >= 0; --i) {
5174
5109
  const k = path[i];
@@ -5308,9 +5243,7 @@ class Collection extends NodeBase {
5308
5243
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
5309
5244
  }
5310
5245
  }
5311
- }
5312
-
5313
- /**
5246
+ }/**
5314
5247
  * Stringifies a comment.
5315
5248
  *
5316
5249
  * Empty comment lines are left empty,
@@ -5327,9 +5260,7 @@ const lineComment = (str, indent, comment) => str.endsWith('\n')
5327
5260
  ? indentComment(comment, indent)
5328
5261
  : comment.includes('\n')
5329
5262
  ? '\n' + indentComment(comment, indent)
5330
- : (str.endsWith(' ') ? '' : ' ') + comment;
5331
-
5332
- const FOLD_FLOW = 'flow';
5263
+ : (str.endsWith(' ') ? '' : ' ') + comment;const FOLD_FLOW = 'flow';
5333
5264
  const FOLD_BLOCK = 'block';
5334
5265
  const FOLD_QUOTED = 'quoted';
5335
5266
  /**
@@ -5472,9 +5403,7 @@ function consumeMoreIndentedLines(text, i, indent) {
5472
5403
  }
5473
5404
  }
5474
5405
  return end;
5475
- }
5476
-
5477
- const getFoldOptions = (ctx, isBlock) => ({
5406
+ }const getFoldOptions = (ctx, isBlock) => ({
5478
5407
  indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
5479
5408
  lineWidth: ctx.options.lineWidth,
5480
5409
  minContentWidth: ctx.options.minContentWidth
@@ -5804,9 +5733,7 @@ function stringifyString(item, ctx, onComment, onChompKeep) {
5804
5733
  throw new Error(`Unsupported default string type ${t}`);
5805
5734
  }
5806
5735
  return res;
5807
- }
5808
-
5809
- function createStringifyContext(doc, options) {
5736
+ }function createStringifyContext(doc, options) {
5810
5737
  const opt = Object.assign({
5811
5738
  blockQuote: true,
5812
5739
  commentString: stringifyComment,
@@ -5926,9 +5853,7 @@ function stringify$2(item, ctx, onComment, onChompKeep) {
5926
5853
  return isScalar$1(node) || str[0] === '{' || str[0] === '['
5927
5854
  ? `${props} ${str}`
5928
5855
  : `${props}\n${ctx.indent}${str}`;
5929
- }
5930
-
5931
- function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
5856
+ }function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
5932
5857
  const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
5933
5858
  let keyComment = (isNode(key) && key.comment) || null;
5934
5859
  if (simpleKeys) {
@@ -6070,15 +5995,11 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
6070
5995
  onChompKeep();
6071
5996
  }
6072
5997
  return str;
6073
- }
6074
-
6075
- function warn(logLevel, warning) {
5998
+ }function warn(logLevel, warning) {
6076
5999
  if (logLevel === 'debug' || logLevel === 'warn') {
6077
6000
  console.warn(warning);
6078
6001
  }
6079
- }
6080
-
6081
- // If the value associated with a merge key is a single mapping node, each of
6002
+ }// If the value associated with a merge key is a single mapping node, each of
6082
6003
  // its key/value pairs is inserted into the current mapping, unless the key
6083
6004
  // already exists in it. If the value associated with the merge key is a
6084
6005
  // sequence, then this sequence is expected to contain mapping nodes and each
@@ -6136,9 +6057,7 @@ function mergeValue(ctx, map, value) {
6136
6057
  }
6137
6058
  }
6138
6059
  return map;
6139
- }
6140
-
6141
- function addPairToJSMap(ctx, map, { key, value }) {
6060
+ }function addPairToJSMap(ctx, map, { key, value }) {
6142
6061
  if (isNode(key) && key.addToJSMap)
6143
6062
  key.addToJSMap(ctx, map, value);
6144
6063
  // TODO: Should drop this special case for bare << handling
@@ -6192,9 +6111,7 @@ function stringifyKey(key, jsKey, ctx) {
6192
6111
  return strKey;
6193
6112
  }
6194
6113
  return JSON.stringify(jsKey);
6195
- }
6196
-
6197
- function createPair(key, value, ctx) {
6114
+ }function createPair(key, value, ctx) {
6198
6115
  const k = createNode(key, undefined, ctx);
6199
6116
  const v = createNode(value, undefined, ctx);
6200
6117
  return new Pair(k, v);
@@ -6222,9 +6139,7 @@ class Pair {
6222
6139
  ? stringifyPair(this, ctx, onComment, onChompKeep)
6223
6140
  : JSON.stringify(this);
6224
6141
  }
6225
- }
6226
-
6227
- function stringifyCollection(collection, ctx, options) {
6142
+ }function stringifyCollection(collection, ctx, options) {
6228
6143
  const flow = ctx.inFlow ?? collection.flow;
6229
6144
  const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
6230
6145
  return stringify(collection, ctx, options);
@@ -6360,9 +6275,7 @@ function addCommentBefore({ indent, options: { commentString } }, lines, comment
6360
6275
  const ic = indentComment(commentString(comment), indent);
6361
6276
  lines.push(ic.trimStart()); // Avoid double indent on first line
6362
6277
  }
6363
- }
6364
-
6365
- function findPair(items, key) {
6278
+ }function findPair(items, key) {
6366
6279
  const k = isScalar$1(key) ? key.value : key;
6367
6280
  for (const it of items) {
6368
6281
  if (isPair(it)) {
@@ -6496,9 +6409,7 @@ class YAMLMap extends Collection {
6496
6409
  onComment
6497
6410
  });
6498
6411
  }
6499
- }
6500
-
6501
- const map = {
6412
+ }const map = {
6502
6413
  collection: 'map',
6503
6414
  default: true,
6504
6415
  nodeClass: YAMLMap,
@@ -6509,9 +6420,7 @@ const map = {
6509
6420
  return map;
6510
6421
  },
6511
6422
  createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx)
6512
- };
6513
-
6514
- class YAMLSeq extends Collection {
6423
+ };class YAMLSeq extends Collection {
6515
6424
  static get tagName() {
6516
6425
  return 'tag:yaml.org,2002:seq';
6517
6426
  }
@@ -6614,9 +6523,7 @@ function asItemIndex(key) {
6614
6523
  return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0
6615
6524
  ? idx
6616
6525
  : null;
6617
- }
6618
-
6619
- const seq = {
6526
+ }const seq = {
6620
6527
  collection: 'seq',
6621
6528
  default: true,
6622
6529
  nodeClass: YAMLSeq,
@@ -6627,9 +6534,7 @@ const seq = {
6627
6534
  return seq;
6628
6535
  },
6629
6536
  createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx)
6630
- };
6631
-
6632
- const string = {
6537
+ };const string = {
6633
6538
  identify: value => typeof value === 'string',
6634
6539
  default: true,
6635
6540
  tag: 'tag:yaml.org,2002:str',
@@ -6638,9 +6543,7 @@ const string = {
6638
6543
  ctx = Object.assign({ actualString: true }, ctx);
6639
6544
  return stringifyString(item, ctx, onComment, onChompKeep);
6640
6545
  }
6641
- };
6642
-
6643
- const nullTag = {
6546
+ };const nullTag = {
6644
6547
  identify: value => value == null,
6645
6548
  createNode: () => new Scalar(null),
6646
6549
  default: true,
@@ -6650,9 +6553,7 @@ const nullTag = {
6650
6553
  stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)
6651
6554
  ? source
6652
6555
  : ctx.options.nullStr
6653
- };
6654
-
6655
- const boolTag = {
6556
+ };const boolTag = {
6656
6557
  identify: value => typeof value === 'boolean',
6657
6558
  default: true,
6658
6559
  tag: 'tag:yaml.org,2002:bool',
@@ -6666,9 +6567,7 @@ const boolTag = {
6666
6567
  }
6667
6568
  return value ? ctx.options.trueStr : ctx.options.falseStr;
6668
6569
  }
6669
- };
6670
-
6671
- function stringifyNumber({ format, minFractionDigits, tag, value }) {
6570
+ };function stringifyNumber({ format, minFractionDigits, tag, value }) {
6672
6571
  if (typeof value === 'bigint')
6673
6572
  return String(value);
6674
6573
  const num = typeof value === 'number' ? value : Number(value);
@@ -6689,9 +6588,7 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
6689
6588
  n += '0';
6690
6589
  }
6691
6590
  return n;
6692
- }
6693
-
6694
- const floatNaN$1 = {
6591
+ }const floatNaN$1 = {
6695
6592
  identify: value => typeof value === 'number',
6696
6593
  default: true,
6697
6594
  tag: 'tag:yaml.org,2002:float',
@@ -6728,9 +6625,7 @@ const float$1 = {
6728
6625
  return node;
6729
6626
  },
6730
6627
  stringify: stringifyNumber
6731
- };
6732
-
6733
- const intIdentify$2 = (value) => typeof value === 'bigint' || Number.isInteger(value);
6628
+ };const intIdentify$2 = (value) => typeof value === 'bigint' || Number.isInteger(value);
6734
6629
  const intResolve$1 = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));
6735
6630
  function intStringify$1(node, radix, prefix) {
6736
6631
  const { value } = node;
@@ -6763,9 +6658,7 @@ const intHex$1 = {
6763
6658
  test: /^0x[0-9a-fA-F]+$/,
6764
6659
  resolve: (str, _onError, opt) => intResolve$1(str, 2, 16, opt),
6765
6660
  stringify: node => intStringify$1(node, 16, '0x')
6766
- };
6767
-
6768
- const schema$2 = [
6661
+ };const schema$2 = [
6769
6662
  map,
6770
6663
  seq,
6771
6664
  string,
@@ -6777,9 +6670,7 @@ const schema$2 = [
6777
6670
  floatNaN$1,
6778
6671
  floatExp$1,
6779
6672
  float$1
6780
- ];
6781
-
6782
- function intIdentify$1(value) {
6673
+ ];function intIdentify$1(value) {
6783
6674
  return typeof value === 'bigint' || Number.isInteger(value);
6784
6675
  }
6785
6676
  const stringifyJSON = ({ value }) => JSON.stringify(value);
@@ -6834,9 +6725,7 @@ const jsonError = {
6834
6725
  return str;
6835
6726
  }
6836
6727
  };
6837
- const schema$1 = [map, seq].concat(jsonScalars, jsonError);
6838
-
6839
- const binary = {
6728
+ const schema$1 = [map, seq].concat(jsonScalars, jsonError);const binary = {
6840
6729
  identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array
6841
6730
  default: false,
6842
6731
  tag: 'tag:yaml.org,2002:binary',
@@ -6888,9 +6777,7 @@ const binary = {
6888
6777
  }
6889
6778
  return stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);
6890
6779
  }
6891
- };
6892
-
6893
- function resolvePairs(seq, onError) {
6780
+ };function resolvePairs(seq, onError) {
6894
6781
  if (isSeq(seq)) {
6895
6782
  for (let i = 0; i < seq.items.length; ++i) {
6896
6783
  let item = seq.items[i];
@@ -6960,9 +6847,7 @@ const pairs = {
6960
6847
  tag: 'tag:yaml.org,2002:pairs',
6961
6848
  resolve: resolvePairs,
6962
6849
  createNode: createPairs
6963
- };
6964
-
6965
- class YAMLOMap extends YAMLSeq {
6850
+ };class YAMLOMap extends YAMLSeq {
6966
6851
  constructor() {
6967
6852
  super();
6968
6853
  this.add = YAMLMap.prototype.add.bind(this);
@@ -7027,9 +6912,7 @@ const omap = {
7027
6912
  return Object.assign(new YAMLOMap(), pairs);
7028
6913
  },
7029
6914
  createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
7030
- };
7031
-
7032
- function boolStringify({ value, source }, ctx) {
6915
+ };function boolStringify({ value, source }, ctx) {
7033
6916
  const boolObj = value ? trueTag : falseTag;
7034
6917
  if (source && boolObj.test.test(source))
7035
6918
  return source;
@@ -7050,9 +6933,7 @@ const falseTag = {
7050
6933
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
7051
6934
  resolve: () => new Scalar(false),
7052
6935
  stringify: boolStringify
7053
- };
7054
-
7055
- const floatNaN = {
6936
+ };const floatNaN = {
7056
6937
  identify: value => typeof value === 'number',
7057
6938
  default: true,
7058
6939
  tag: 'tag:yaml.org,2002:float',
@@ -7092,9 +6973,7 @@ const float = {
7092
6973
  return node;
7093
6974
  },
7094
6975
  stringify: stringifyNumber
7095
- };
7096
-
7097
- const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);
6976
+ };const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);
7098
6977
  function intResolve(str, offset, radix, { intAsBigInt }) {
7099
6978
  const sign = str[0];
7100
6979
  if (sign === '-' || sign === '+')
@@ -7160,9 +7039,7 @@ const intHex = {
7160
7039
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
7161
7040
  resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
7162
7041
  stringify: node => intStringify(node, 16, '0x')
7163
- };
7164
-
7165
- class YAMLSet extends YAMLMap {
7042
+ };class YAMLSet extends YAMLMap {
7166
7043
  constructor(schema) {
7167
7044
  super(schema);
7168
7045
  this.tag = YAMLSet.tag;
@@ -7248,9 +7125,7 @@ const set = {
7248
7125
  onError('Expected a mapping for this tag');
7249
7126
  return map;
7250
7127
  }
7251
- };
7252
-
7253
- /** Internal types handle bigint as number, because TS can't figure it out. */
7128
+ };/** Internal types handle bigint as number, because TS can't figure it out. */
7254
7129
  function parseSexagesimal(str, asBigInt) {
7255
7130
  const sign = str[0];
7256
7131
  const parts = sign === '-' || sign === '+' ? str.substring(1) : str;
@@ -7346,9 +7221,7 @@ const timestamp = {
7346
7221
  return new Date(date);
7347
7222
  },
7348
7223
  stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
7349
- };
7350
-
7351
- const schema = [
7224
+ };const schema = [
7352
7225
  map,
7353
7226
  seq,
7354
7227
  string,
@@ -7370,9 +7243,7 @@ const schema = [
7370
7243
  intTime,
7371
7244
  floatTime,
7372
7245
  timestamp
7373
- ];
7374
-
7375
- const schemas = new Map([
7246
+ ];const schemas = new Map([
7376
7247
  ['core', schema$2],
7377
7248
  ['failsafe', [map, seq, string]],
7378
7249
  ['json', schema$1],
@@ -7448,9 +7319,7 @@ function getTags(customTags, schemaName, addMergeTag) {
7448
7319
  tags.push(tagObj);
7449
7320
  return tags;
7450
7321
  }, []);
7451
- }
7452
-
7453
- const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
7322
+ }const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
7454
7323
  class Schema {
7455
7324
  constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
7456
7325
  this.compat = Array.isArray(compat)
@@ -7478,9 +7347,7 @@ class Schema {
7478
7347
  copy.tags = this.tags.slice();
7479
7348
  return copy;
7480
7349
  }
7481
- }
7482
-
7483
- function stringifyDocument(doc, options) {
7350
+ }function stringifyDocument(doc, options) {
7484
7351
  const lines = [];
7485
7352
  let hasDirectives = options.directives === true;
7486
7353
  if (options.directives !== false && doc.directives) {
@@ -7558,9 +7425,7 @@ function stringifyDocument(doc, options) {
7558
7425
  }
7559
7426
  }
7560
7427
  return lines.join('\n') + '\n';
7561
- }
7562
-
7563
- class Document {
7428
+ }class Document {
7564
7429
  constructor(value, replacer, options) {
7565
7430
  /** A comment before this Document */
7566
7431
  this.commentBefore = null;
@@ -7880,9 +7745,7 @@ function assertCollection(contents) {
7880
7745
  if (isCollection$1(contents))
7881
7746
  return true;
7882
7747
  throw new Error('Expected a YAML collection as document contents');
7883
- }
7884
-
7885
- class YAMLError extends Error {
7748
+ }class YAMLError extends Error {
7886
7749
  constructor(name, pos, code, message) {
7887
7750
  super();
7888
7751
  this.name = name;
@@ -7936,9 +7799,7 @@ const prettifyError = (src, lc) => (error) => {
7936
7799
  const pointer = ' '.repeat(ci) + '^'.repeat(count);
7937
7800
  error.message += `:\n\n${lineStr}\n${pointer}\n`;
7938
7801
  }
7939
- };
7940
-
7941
- function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
7802
+ };function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
7942
7803
  let spaceBefore = false;
7943
7804
  let atNewline = startOnNewline;
7944
7805
  let hasSpace = startOnNewline;
@@ -8081,9 +7942,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
8081
7942
  end,
8082
7943
  start: start ?? end
8083
7944
  };
8084
- }
8085
-
8086
- function containsNewline(key) {
7945
+ }function containsNewline(key) {
8087
7946
  if (!key)
8088
7947
  return null;
8089
7948
  switch (key.type) {
@@ -8114,9 +7973,7 @@ function containsNewline(key) {
8114
7973
  default:
8115
7974
  return true;
8116
7975
  }
8117
- }
8118
-
8119
- function flowIndentCheck(indent, fc, onError) {
7976
+ }function flowIndentCheck(indent, fc, onError) {
8120
7977
  if (fc?.type === 'flow-collection') {
8121
7978
  const end = fc.end[0];
8122
7979
  if (end.indent === indent &&
@@ -8126,9 +7983,7 @@ function flowIndentCheck(indent, fc, onError) {
8126
7983
  onError(end, 'BAD_INDENT', msg, true);
8127
7984
  }
8128
7985
  }
8129
- }
8130
-
8131
- function mapIncludes(ctx, items, search) {
7986
+ }function mapIncludes(ctx, items, search) {
8132
7987
  const { uniqueKeys } = ctx.options;
8133
7988
  if (uniqueKeys === false)
8134
7989
  return false;
@@ -8136,9 +7991,7 @@ function mapIncludes(ctx, items, search) {
8136
7991
  ? uniqueKeys
8137
7992
  : (a, b) => a === b || (isScalar$1(a) && isScalar$1(b) && a.value === b.value);
8138
7993
  return items.some(pair => isEqual(pair.key, search));
8139
- }
8140
-
8141
- const startColMsg = 'All mapping items must start at the same column';
7994
+ }const startColMsg = 'All mapping items must start at the same column';
8142
7995
  function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {
8143
7996
  const NodeClass = tag?.nodeClass ?? YAMLMap;
8144
7997
  const map = new NodeClass(ctx.schema);
@@ -8243,9 +8096,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta
8243
8096
  onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
8244
8097
  map.range = [bm.offset, offset, commentEnd ?? offset];
8245
8098
  return map;
8246
- }
8247
-
8248
- function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
8099
+ }function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
8249
8100
  const NodeClass = tag?.nodeClass ?? YAMLSeq;
8250
8101
  const seq = new NodeClass(ctx.schema);
8251
8102
  if (ctx.atRoot)
@@ -8287,9 +8138,7 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, ta
8287
8138
  }
8288
8139
  seq.range = [bs.offset, offset, commentEnd ?? offset];
8289
8140
  return seq;
8290
- }
8291
-
8292
- function resolveEnd(end, offset, reqSpace, onError) {
8141
+ }function resolveEnd(end, offset, reqSpace, onError) {
8293
8142
  let comment = '';
8294
8143
  if (end) {
8295
8144
  let hasSpace = false;
@@ -8323,9 +8172,7 @@ function resolveEnd(end, offset, reqSpace, onError) {
8323
8172
  }
8324
8173
  }
8325
8174
  return { comment, offset };
8326
- }
8327
-
8328
- const blockMsg = 'Block collections are not allowed within flow collections';
8175
+ }const blockMsg = 'Block collections are not allowed within flow collections';
8329
8176
  const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');
8330
8177
  function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {
8331
8178
  const isMap = fc.start.source === '{';
@@ -8520,9 +8367,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
8520
8367
  coll.range = [fc.offset, cePos, cePos];
8521
8368
  }
8522
8369
  return coll;
8523
- }
8524
-
8525
- function resolveCollection(CN, ctx, token, onError, tagName, tag) {
8370
+ }function resolveCollection(CN, ctx, token, onError, tagName, tag) {
8526
8371
  const coll = token.type === 'block-map'
8527
8372
  ? resolveBlockMap(CN, ctx, token, onError, tag)
8528
8373
  : token.type === 'block-seq'
@@ -8599,9 +8444,7 @@ function composeCollection(CN, ctx, token, props, onError) {
8599
8444
  if (tag?.format)
8600
8445
  node.format = tag.format;
8601
8446
  return node;
8602
- }
8603
-
8604
- function resolveBlockScalar(ctx, scalar, onError) {
8447
+ }function resolveBlockScalar(ctx, scalar, onError) {
8605
8448
  const start = scalar.offset;
8606
8449
  const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
8607
8450
  if (!header)
@@ -8794,9 +8637,7 @@ function splitLines(source) {
8794
8637
  for (let i = 1; i < split.length; i += 2)
8795
8638
  lines.push([split[i], split[i + 1]]);
8796
8639
  return lines;
8797
- }
8798
-
8799
- function resolveFlowScalar(scalar, strict, onError) {
8640
+ }function resolveFlowScalar(scalar, strict, onError) {
8800
8641
  const { offset, type, source, end } = scalar;
8801
8642
  let _type;
8802
8643
  let value;
@@ -9013,9 +8854,7 @@ function parseCharCode(source, offset, length, onError) {
9013
8854
  return raw;
9014
8855
  }
9015
8856
  return String.fromCodePoint(code);
9016
- }
9017
-
9018
- function composeScalar(ctx, token, tagToken, onError) {
8857
+ }function composeScalar(ctx, token, tagToken, onError) {
9019
8858
  const { value, type, comment, range } = token.type === 'block-scalar'
9020
8859
  ? resolveBlockScalar(ctx, token, onError)
9021
8860
  : resolveFlowScalar(token, ctx.options.strict, onError);
@@ -9093,9 +8932,7 @@ function findScalarTagByTest({ atKey, directives, schema }, value, token, onErro
9093
8932
  }
9094
8933
  }
9095
8934
  return tag;
9096
- }
9097
-
9098
- function emptyScalarPosition(offset, before, pos) {
8935
+ }function emptyScalarPosition(offset, before, pos) {
9099
8936
  if (before) {
9100
8937
  pos ?? (pos = before.length);
9101
8938
  for (let i = pos - 1; i >= 0; --i) {
@@ -9118,9 +8955,7 @@ function emptyScalarPosition(offset, before, pos) {
9118
8955
  }
9119
8956
  }
9120
8957
  return offset;
9121
- }
9122
-
9123
- const CN = { composeNode, composeEmptyNode };
8958
+ }const CN = { composeNode, composeEmptyNode };
9124
8959
  function composeNode(ctx, token, props, onError) {
9125
8960
  const atKey = ctx.atKey;
9126
8961
  const { spaceBefore, comment, anchor, tag } = props;
@@ -9212,9 +9047,7 @@ function composeAlias({ options }, { offset, source, end }, onError) {
9212
9047
  if (re.comment)
9213
9048
  alias.comment = re.comment;
9214
9049
  return alias;
9215
- }
9216
-
9217
- function composeDoc(options, directives, { offset, start, value, end }, onError) {
9050
+ }function composeDoc(options, directives, { offset, start, value, end }, onError) {
9218
9051
  const opts = Object.assign({ _directives: directives }, options);
9219
9052
  const doc = new Document(undefined, opts);
9220
9053
  const ctx = {
@@ -9249,9 +9082,7 @@ function composeDoc(options, directives, { offset, start, value, end }, onError)
9249
9082
  doc.comment = re.comment;
9250
9083
  doc.range = [offset, contentEnd, re.offset];
9251
9084
  return doc;
9252
- }
9253
-
9254
- function getErrorPos(src) {
9085
+ }function getErrorPos(src) {
9255
9086
  if (typeof src === 'number')
9256
9087
  return [src, src + 1];
9257
9088
  if (Array.isArray(src))
@@ -9458,9 +9289,7 @@ class Composer {
9458
9289
  yield doc;
9459
9290
  }
9460
9291
  }
9461
- }
9462
-
9463
- function resolveAsScalar(token, strict = true, onError) {
9292
+ }function resolveAsScalar(token, strict = true, onError) {
9464
9293
  if (token) {
9465
9294
  const _onError = (pos, code, message) => {
9466
9295
  const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;
@@ -9666,9 +9495,7 @@ function setFlowScalarValue(token, source, type) {
9666
9495
  Object.assign(token, { type, indent, source, end });
9667
9496
  }
9668
9497
  }
9669
- }
9670
-
9671
- /**
9498
+ }/**
9672
9499
  * Stringify a CST document, token, or collection item
9673
9500
  *
9674
9501
  * Fair warning: This applies no validation whatsoever, and
@@ -9726,9 +9553,7 @@ function stringifyItem({ start, key, sep, value }) {
9726
9553
  if (value)
9727
9554
  res += stringifyToken(value);
9728
9555
  return res;
9729
- }
9730
-
9731
- const BREAK = Symbol('break visit');
9556
+ }const BREAK = Symbol('break visit');
9732
9557
  const SKIP = Symbol('skip children');
9733
9558
  const REMOVE = Symbol('remove item');
9734
9559
  /**
@@ -9822,9 +9647,7 @@ function _visit(path, item, visitor) {
9822
9647
  }
9823
9648
  }
9824
9649
  return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;
9825
- }
9826
-
9827
- /** The byte order mark */
9650
+ }/** The byte order mark */
9828
9651
  const BOM = '\u{FEFF}';
9829
9652
  /** Start of doc-mode */
9830
9653
  const DOCUMENT = '\x02'; // C0: Start of Text
@@ -9915,26 +9738,7 @@ function tokenType(source) {
9915
9738
  return 'block-scalar-header';
9916
9739
  }
9917
9740
  return null;
9918
- }
9919
-
9920
- var cst = /*#__PURE__*/Object.freeze({
9921
- __proto__: null,
9922
- BOM: BOM,
9923
- DOCUMENT: DOCUMENT,
9924
- FLOW_END: FLOW_END,
9925
- SCALAR: SCALAR,
9926
- createScalarToken: createScalarToken,
9927
- isCollection: isCollection,
9928
- isScalar: isScalar,
9929
- prettyToken: prettyToken,
9930
- resolveAsScalar: resolveAsScalar,
9931
- setScalarValue: setScalarValue,
9932
- stringify: stringify$1,
9933
- tokenType: tokenType,
9934
- visit: visit
9935
- });
9936
-
9937
- /*
9741
+ }var cst=/*#__PURE__*/Object.freeze({__proto__:null,BOM:BOM,DOCUMENT:DOCUMENT,FLOW_END:FLOW_END,SCALAR:SCALAR,createScalarToken:createScalarToken,isCollection:isCollection,isScalar:isScalar,prettyToken:prettyToken,resolveAsScalar:resolveAsScalar,setScalarValue:setScalarValue,stringify:stringify$1,tokenType:tokenType,visit:visit});/*
9938
9742
  START -> stream
9939
9743
 
9940
9744
  stream
@@ -10646,9 +10450,7 @@ class Lexer {
10646
10450
  ch = this.buffer[++i];
10647
10451
  return yield* this.pushToIndex(i, false);
10648
10452
  }
10649
- }
10650
-
10651
- /**
10453
+ }/**
10652
10454
  * Tracks newlines during parsing in order to provide an efficient API for
10653
10455
  * determining the one-indexed `{ line, col }` position for any offset
10654
10456
  * within the input.
@@ -10684,9 +10486,7 @@ class LineCounter {
10684
10486
  return { line: low, col: offset - start + 1 };
10685
10487
  };
10686
10488
  }
10687
- }
10688
-
10689
- function includesToken(list, type) {
10489
+ }function includesToken(list, type) {
10690
10490
  for (let i = 0; i < list.length; ++i)
10691
10491
  if (list[i].type === type)
10692
10492
  return true;
@@ -11647,9 +11447,7 @@ class Parser {
11647
11447
  yield* this.pop();
11648
11448
  }
11649
11449
  }
11650
- }
11651
-
11652
- function parseOptions(options) {
11450
+ }function parseOptions(options) {
11653
11451
  const prettyErrors = options.prettyErrors !== false;
11654
11452
  const lineCounter = options.lineCounter || (prettyErrors && new LineCounter()) || null;
11655
11453
  return { lineCounter, prettyErrors };
@@ -11740,83 +11538,9 @@ function stringify(value, replacer, options) {
11740
11538
  if (isDocument(value) && !_replacer)
11741
11539
  return value.toString(options);
11742
11540
  return new Document(value, _replacer, options).toString(options);
11743
- }
11744
-
11745
- var YAML = /*#__PURE__*/Object.freeze({
11746
- __proto__: null,
11747
- Alias: Alias,
11748
- CST: cst,
11749
- Composer: Composer,
11750
- Document: Document,
11751
- Lexer: Lexer,
11752
- LineCounter: LineCounter,
11753
- Pair: Pair,
11754
- Parser: Parser,
11755
- Scalar: Scalar,
11756
- Schema: Schema,
11757
- YAMLError: YAMLError,
11758
- YAMLMap: YAMLMap,
11759
- YAMLParseError: YAMLParseError,
11760
- YAMLSeq: YAMLSeq,
11761
- YAMLWarning: YAMLWarning,
11762
- isAlias: isAlias,
11763
- isCollection: isCollection$1,
11764
- isDocument: isDocument,
11765
- isMap: isMap,
11766
- isNode: isNode,
11767
- isPair: isPair,
11768
- isScalar: isScalar$1,
11769
- isSeq: isSeq,
11770
- parse: parse,
11771
- parseAllDocuments: parseAllDocuments,
11772
- parseDocument: parseDocument,
11773
- stringify: stringify,
11774
- visit: visit$1,
11775
- visitAsync: visitAsync
11776
- });
11777
-
11778
- // `export * as default from ...` fails on Webpack v4
11541
+ }var YAML=/*#__PURE__*/Object.freeze({__proto__:null,Alias:Alias,CST:cst,Composer:Composer,Document:Document,Lexer:Lexer,LineCounter:LineCounter,Pair:Pair,Parser:Parser,Scalar:Scalar,Schema:Schema,YAMLError:YAMLError,YAMLMap:YAMLMap,YAMLParseError:YAMLParseError,YAMLSeq:YAMLSeq,YAMLWarning:YAMLWarning,isAlias:isAlias,isCollection:isCollection$1,isDocument:isDocument,isMap:isMap,isNode:isNode,isPair:isPair,isScalar:isScalar$1,isSeq:isSeq,parse:parse,parseAllDocuments:parseAllDocuments,parseDocument:parseDocument,stringify:stringify,visit:visit$1,visitAsync:visitAsync});// `export * as default from ...` fails on Webpack v4
11779
11542
  // https://github.com/eemeli/yaml/issues/228
11780
-
11781
- var browser = /*#__PURE__*/Object.freeze({
11782
- __proto__: null,
11783
- Alias: Alias,
11784
- CST: cst,
11785
- Composer: Composer,
11786
- Document: Document,
11787
- Lexer: Lexer,
11788
- LineCounter: LineCounter,
11789
- Pair: Pair,
11790
- Parser: Parser,
11791
- Scalar: Scalar,
11792
- Schema: Schema,
11793
- YAMLError: YAMLError,
11794
- YAMLMap: YAMLMap,
11795
- YAMLParseError: YAMLParseError,
11796
- YAMLSeq: YAMLSeq,
11797
- YAMLWarning: YAMLWarning,
11798
- default: YAML,
11799
- isAlias: isAlias,
11800
- isCollection: isCollection$1,
11801
- isDocument: isDocument,
11802
- isMap: isMap,
11803
- isNode: isNode,
11804
- isPair: isPair,
11805
- isScalar: isScalar$1,
11806
- isSeq: isSeq,
11807
- parse: parse,
11808
- parseAllDocuments: parseAllDocuments,
11809
- parseDocument: parseDocument,
11810
- stringify: stringify,
11811
- visit: visit$1,
11812
- visitAsync: visitAsync
11813
- });
11814
-
11815
- var require$$6 = /*@__PURE__*/getAugmentedNamespace(browser);
11816
-
11817
- var bundle$2 = {};
11818
-
11819
- var hasRequiredBundle$2;
11543
+ var browser=/*#__PURE__*/Object.freeze({__proto__:null,Alias:Alias,CST:cst,Composer:Composer,Document:Document,Lexer:Lexer,LineCounter:LineCounter,Pair:Pair,Parser:Parser,Scalar:Scalar,Schema:Schema,YAMLError:YAMLError,YAMLMap:YAMLMap,YAMLParseError:YAMLParseError,YAMLSeq:YAMLSeq,YAMLWarning:YAMLWarning,default:YAML,isAlias:isAlias,isCollection:isCollection$1,isDocument:isDocument,isMap:isMap,isNode:isNode,isPair:isPair,isScalar:isScalar$1,isSeq:isSeq,parse:parse,parseAllDocuments:parseAllDocuments,parseDocument:parseDocument,stringify:stringify,visit:visit$1,visitAsync:visitAsync});var require$$6 = /*@__PURE__*/getAugmentedNamespace(browser);var bundle$2 = {};var hasRequiredBundle$2;
11820
11544
 
11821
11545
  function requireBundle$2 () {
11822
11546
  if (hasRequiredBundle$2) return bundle$2;
@@ -12228,11 +11952,7 @@ function requireBundle$2 () {
12228
11952
  bundle$2.time = time;
12229
11953
  bundle$2.web = web;
12230
11954
  return bundle$2;
12231
- }
12232
-
12233
- var bundle$1 = {};
12234
-
12235
- var hasRequiredBundle$1;
11955
+ }var bundle$1 = {};var hasRequiredBundle$1;
12236
11956
 
12237
11957
  function requireBundle$1 () {
12238
11958
  if (hasRequiredBundle$1) return bundle$1;
@@ -12240,10 +11960,10 @@ function requireBundle$1 () {
12240
11960
 
12241
11961
  var node_process = require$$0$1;
12242
11962
  var node_child_process = require$$1;
12243
- var os = require$$2;
11963
+ var os = require$$2$1;
12244
11964
  var fs = require$$3;
12245
11965
  var fsp = require$$4;
12246
- var path = require$$5;
11966
+ var path = require$$2;
12247
11967
  var node_stream = require$$6$1;
12248
11968
  var assert = require$$7;
12249
11969
 
@@ -12732,22 +12452,18 @@ function requireBundle$1 () {
12732
12452
  bundle$1.sh = sh;
12733
12453
  bundle$1.test = test;
12734
12454
  return bundle$1;
12735
- }
12736
-
12737
- var bundle = {};
12738
-
12739
- var hasRequiredBundle;
12455
+ }var bundle = {};var hasRequiredBundle;
12740
12456
 
12741
12457
  function requireBundle () {
12742
12458
  if (hasRequiredBundle) return bundle;
12743
12459
  hasRequiredBundle = 1;
12744
12460
 
12745
12461
  var node_process = require$$0$1;
12746
- var fs = require$$3;
12462
+ var path = require$$2;
12747
12463
  var node_child_process = require$$1;
12748
- var os = require$$2;
12464
+ var os = require$$2$1;
12465
+ var fs = require$$3;
12749
12466
  var fsp = require$$4;
12750
- var path = require$$5;
12751
12467
  var node_stream = require$$6$1;
12752
12468
 
12753
12469
 
@@ -12771,48 +12487,211 @@ function requireBundle () {
12771
12487
  var fsp__namespace = /*#__PURE__*/_interopNamespaceDefault(fsp);
12772
12488
 
12773
12489
  /*!
12774
- * === @amekusa/util.js/web === *
12775
- * MIT License
12776
- *
12777
- * Copyright (c) 2024 Satoshi Soma
12778
- *
12779
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12780
- * of this software and associated documentation files (the "Software"), to deal
12781
- * in the Software without restriction, including without limitation the rights
12782
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12783
- * copies of the Software, and to permit persons to whom the Software is
12784
- * furnished to do so, subject to the following conditions:
12785
- *
12786
- * The above copyright notice and this permission notice shall be included in all
12787
- * copies or substantial portions of the Software.
12788
- *
12789
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12790
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12791
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
12792
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
12793
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
12794
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
12795
- * SOFTWARE.
12490
+ * Shell Utils
12491
+ * @author amekusa
12796
12492
  */
12797
12493
 
12494
+ /**
12495
+ * Executes the given shell command, and returns a Promise that resolves the stdout
12496
+ * @param {string} cmd
12497
+ * @param {object} [opts]
12498
+ * @return {Promise}
12499
+ */
12500
+ function exec(cmd, opts = {}) {
12501
+ opts = Object.assign({
12502
+ dryRun: false,
12503
+ }, opts);
12504
+ return new Promise((resolve, reject) => {
12505
+ if (opts.dryRun) {
12506
+ console.log(`[DRYRUN] ${cmd}`);
12507
+ return resolve();
12508
+ }
12509
+ node_child_process.exec(cmd, (err, stdout) => {
12510
+ return err ? reject(err) : resolve(stdout);
12511
+ });
12512
+ });
12513
+ }
12798
12514
 
12799
- const escHTML_map = {
12800
- '&': 'amp',
12801
- '"': 'quot',
12802
- "'": 'apos',
12803
- '<': 'lt',
12804
- '>': 'gt'
12805
- };
12515
+ /*!
12516
+ * I/O Utils
12517
+ * @author amekusa
12518
+ */
12806
12519
 
12807
- new RegExp(`["'<>]|(&(?!${Object.values(escHTML_map).join('|')};))`, 'g');
12520
+ /**
12521
+ * Alias of `os.homedir()`.
12522
+ * @type {string}
12523
+ */
12524
+ const home = os.homedir();
12808
12525
 
12809
- /*!
12810
- * === @amekusa/util.js/time === *
12811
- * MIT License
12812
- *
12813
- * Copyright (c) 2024 Satoshi Soma
12814
- *
12815
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12526
+ /**
12527
+ * Searchs the given file path in the given directories.
12528
+ * @param {string} file - File to find
12529
+ * @param {string[]} dirs - Array of directories to search
12530
+ * @param {object} [opts] - Options
12531
+ * @return {string|boolean} found file path, or false if not found
12532
+ */
12533
+ function find(file, dirs = [], opts = {}) {
12534
+ let {allowAbsolute = true} = opts;
12535
+ if (allowAbsolute && path.isAbsolute(file)) return fs.existsSync(file) ? file : false;
12536
+ for (let i = 0; i < dirs.length; i++) {
12537
+ let find = path.join(dirs[i], file);
12538
+ if (fs.existsSync(find)) return find;
12539
+ }
12540
+ return false;
12541
+ }
12542
+
12543
+ /**
12544
+ * Replaces the beginning `~` character with `os.homedir()`.
12545
+ * @param {string} file - File path
12546
+ * @param {string} [replace=os.homedir()] - Replacement
12547
+ * @return {string} modified `file`
12548
+ */
12549
+ function untilde(file, replace = home) {
12550
+ if (!file.startsWith('~')) return file;
12551
+ if (file.length == 1) return replace;
12552
+ if (file.startsWith(path.sep, 1)) return replace + file.substring(1);
12553
+ return file;
12554
+ }
12555
+
12556
+ /**
12557
+ * Deletes the contents of the given directory.
12558
+ * @return {Promise}
12559
+ */
12560
+ function clean$1(dir, pattern, depth = 1) {
12561
+ return exec(`find '${dir}' -type f -name '${pattern}' -maxdepth ${depth} -delete`);
12562
+ }
12563
+
12564
+ /**
12565
+ * Deletes the given file or directory.
12566
+ * @param {string} file
12567
+ * @return {Promise}
12568
+ */
12569
+ function rm(file) {
12570
+ return fsp__namespace.rm(file, {recursive: true, force: true});
12571
+ }
12572
+
12573
+ /**
12574
+ * Deletes the given file or directory synchronously.
12575
+ * @param {string} file
12576
+ */
12577
+ function rmSync(file) {
12578
+ return fs.rmSync(file, {recursive: true, force: true});
12579
+ }
12580
+
12581
+ /**
12582
+ * Copies the given file(s) to another directory
12583
+ * @param {string|object|string[]|object[]} src
12584
+ * @param {string} dst Base destination directory
12585
+ * @return {Promise}
12586
+ */
12587
+ function copy(src, dst) {
12588
+ return Promise.all((Array.isArray(src) ? src : [src]).map(item => {
12589
+ let _src, _dst;
12590
+ switch (typeof item) {
12591
+ case 'object':
12592
+ _src = item.src;
12593
+ _dst = item.dst;
12594
+ break;
12595
+ case 'string':
12596
+ _src = item;
12597
+ break;
12598
+ default:
12599
+ throw 'invalid type';
12600
+ }
12601
+ _dst = path.join(dst, _dst || path.basename(_src));
12602
+ return fsp__namespace.mkdir(path.dirname(_dst), {recursive: true}).then(fsp__namespace.copyFile(_src, _dst));
12603
+ }));
12604
+ }
12605
+
12606
+ /**
12607
+ * Returns a Transform stream object with the given function as its transform() method.
12608
+ * `fn` must return a string which is to be the new content, or a Promise which resolves a string.
12609
+ *
12610
+ * @example
12611
+ * return gulp.src(src)
12612
+ * .pipe(modify((data, enc) => {
12613
+ * // do stuff
12614
+ * return newData;
12615
+ * }));
12616
+ *
12617
+ * @param {function} fn
12618
+ * @return {Transform}
12619
+ */
12620
+ function modifyStream(fn) {
12621
+ return new node_stream.Transform({
12622
+ objectMode: true,
12623
+ transform(file, enc, done) {
12624
+ let r = fn(file.contents.toString(enc), enc);
12625
+ if (r instanceof Promise) {
12626
+ r.then(modified => {
12627
+ file.contents = Buffer.from(modified, enc);
12628
+ this.push(file);
12629
+ done();
12630
+ });
12631
+ } else {
12632
+ file.contents = Buffer.from(r, enc);
12633
+ this.push(file);
12634
+ done();
12635
+ }
12636
+ }
12637
+ });
12638
+ }
12639
+
12640
+ var io = /*#__PURE__*/Object.freeze({
12641
+ __proto__: null,
12642
+ clean: clean$1,
12643
+ copy: copy,
12644
+ find: find,
12645
+ home: home,
12646
+ modifyStream: modifyStream,
12647
+ rm: rm,
12648
+ rmSync: rmSync,
12649
+ untilde: untilde
12650
+ });
12651
+
12652
+ /*!
12653
+ * === @amekusa/util.js/web === *
12654
+ * MIT License
12655
+ *
12656
+ * Copyright (c) 2024 Satoshi Soma
12657
+ *
12658
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
12659
+ * of this software and associated documentation files (the "Software"), to deal
12660
+ * in the Software without restriction, including without limitation the rights
12661
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12662
+ * copies of the Software, and to permit persons to whom the Software is
12663
+ * furnished to do so, subject to the following conditions:
12664
+ *
12665
+ * The above copyright notice and this permission notice shall be included in all
12666
+ * copies or substantial portions of the Software.
12667
+ *
12668
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12669
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12670
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
12671
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
12672
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
12673
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
12674
+ * SOFTWARE.
12675
+ */
12676
+
12677
+
12678
+ const escHTML_map = {
12679
+ '&': 'amp',
12680
+ '"': 'quot',
12681
+ "'": 'apos',
12682
+ '<': 'lt',
12683
+ '>': 'gt'
12684
+ };
12685
+
12686
+ new RegExp(`["'<>]|(&(?!${Object.values(escHTML_map).join('|')};))`, 'g');
12687
+
12688
+ /*!
12689
+ * === @amekusa/util.js/time === *
12690
+ * MIT License
12691
+ *
12692
+ * Copyright (c) 2024 Satoshi Soma
12693
+ *
12694
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
12816
12695
  * of this software and associated documentation files (the "Software"), to deal
12817
12696
  * in the Software without restriction, including without limitation the rights
12818
12697
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -13052,12 +12931,12 @@ function requireBundle () {
13052
12931
  * @param {number} recurse - Recursion limit
13053
12932
  * @return {object|any[]} modified `x`
13054
12933
  */
13055
- function clean$1(x, recurse = 8) {
12934
+ function clean(x, recurse = 8) {
13056
12935
  if (recurse) {
13057
12936
  if (Array.isArray(x)) {
13058
12937
  let r = [];
13059
12938
  for (let i = 0; i < x.length; i++) {
13060
- let I = clean$1(x[i], recurse - 1);
12939
+ let I = clean(x[i], recurse - 1);
13061
12940
  if (!isEmpty(I)) r.push(I);
13062
12941
  }
13063
12942
  return r;
@@ -13065,7 +12944,7 @@ function requireBundle () {
13065
12944
  if (typeof x == 'object') {
13066
12945
  let r = {};
13067
12946
  for (let k in x) {
13068
- let v = clean$1(x[k], recurse - 1);
12947
+ let v = clean(x[k], recurse - 1);
13069
12948
  if (!isEmpty(v)) r[k] = v;
13070
12949
  }
13071
12950
  return r;
@@ -13116,169 +12995,6 @@ function requireBundle () {
13116
12995
  return y;
13117
12996
  }
13118
12997
 
13119
- /*!
13120
- * Shell Utils
13121
- * @author amekusa
13122
- */
13123
-
13124
- /**
13125
- * Executes the given shell command, and returns a Promise that resolves the stdout
13126
- * @param {string} cmd
13127
- * @param {object} [opts]
13128
- * @return {Promise}
13129
- */
13130
- function exec(cmd, opts = {}) {
13131
- opts = Object.assign({
13132
- dryRun: false,
13133
- }, opts);
13134
- return new Promise((resolve, reject) => {
13135
- if (opts.dryRun) {
13136
- console.log(`[DRYRUN] ${cmd}`);
13137
- return resolve();
13138
- }
13139
- node_child_process.exec(cmd, (err, stdout) => {
13140
- return err ? reject(err) : resolve(stdout);
13141
- });
13142
- });
13143
- }
13144
-
13145
- /*!
13146
- * I/O Utils
13147
- * @author amekusa
13148
- */
13149
-
13150
- /**
13151
- * Alias of `os.homedir()`.
13152
- * @type {string}
13153
- */
13154
- const home = os.homedir();
13155
-
13156
- /**
13157
- * Searchs the given file path in the given directories.
13158
- * @param {string} file - File to find
13159
- * @param {string[]} dirs - Array of directories to search
13160
- * @param {object} [opts] - Options
13161
- * @return {string|boolean} found file path, or false if not found
13162
- */
13163
- function find(file, dirs = [], opts = {}) {
13164
- let {allowAbsolute = true} = opts;
13165
- if (allowAbsolute && path.isAbsolute(file)) return fs.existsSync(file) ? file : false;
13166
- for (let i = 0; i < dirs.length; i++) {
13167
- let find = path.join(dirs[i], file);
13168
- if (fs.existsSync(find)) return find;
13169
- }
13170
- return false;
13171
- }
13172
-
13173
- /**
13174
- * Replaces the beginning `~` character with `os.homedir()`.
13175
- * @param {string} file - File path
13176
- * @param {string} [replace=os.homedir()] - Replacement
13177
- * @return {string} modified `file`
13178
- */
13179
- function untilde(file, replace = home) {
13180
- if (!file.startsWith('~')) return file;
13181
- if (file.length == 1) return replace;
13182
- if (file.startsWith(path.sep, 1)) return replace + file.substring(1);
13183
- return file;
13184
- }
13185
-
13186
- /**
13187
- * Deletes the contents of the given directory.
13188
- * @return {Promise}
13189
- */
13190
- function clean(dir, pattern, depth = 1) {
13191
- return exec(`find '${dir}' -type f -name '${pattern}' -maxdepth ${depth} -delete`);
13192
- }
13193
-
13194
- /**
13195
- * Deletes the given file or directory.
13196
- * @param {string} file
13197
- * @return {Promise}
13198
- */
13199
- function rm(file) {
13200
- return fsp__namespace.rm(file, {recursive: true, force: true});
13201
- }
13202
-
13203
- /**
13204
- * Deletes the given file or directory synchronously.
13205
- * @param {string} file
13206
- */
13207
- function rmSync(file) {
13208
- return fs.rmSync(file, {recursive: true, force: true});
13209
- }
13210
-
13211
- /**
13212
- * Copies the given file(s) to another directory
13213
- * @param {string|object|string[]|object[]} src
13214
- * @param {string} dst Base destination directory
13215
- * @return {Promise}
13216
- */
13217
- function copy(src, dst) {
13218
- return Promise.all((Array.isArray(src) ? src : [src]).map(item => {
13219
- let _src, _dst;
13220
- switch (typeof item) {
13221
- case 'object':
13222
- _src = item.src;
13223
- _dst = item.dst;
13224
- break;
13225
- case 'string':
13226
- _src = item;
13227
- break;
13228
- default:
13229
- throw 'invalid type';
13230
- }
13231
- _dst = path.join(dst, _dst || path.basename(_src));
13232
- return fsp__namespace.mkdir(path.dirname(_dst), {recursive: true}).then(fsp__namespace.copyFile(_src, _dst));
13233
- }));
13234
- }
13235
-
13236
- /**
13237
- * Returns a Transform stream object with the given function as its transform() method.
13238
- * `fn` must return a string which is to be the new content, or a Promise which resolves a string.
13239
- *
13240
- * @example
13241
- * return gulp.src(src)
13242
- * .pipe(modify((data, enc) => {
13243
- * // do stuff
13244
- * return newData;
13245
- * }));
13246
- *
13247
- * @param {function} fn
13248
- * @return {Transform}
13249
- */
13250
- function modifyStream(fn) {
13251
- return new node_stream.Transform({
13252
- objectMode: true,
13253
- transform(file, enc, done) {
13254
- let r = fn(file.contents.toString(enc), enc);
13255
- if (r instanceof Promise) {
13256
- r.then(modified => {
13257
- file.contents = Buffer.from(modified, enc);
13258
- this.push(file);
13259
- done();
13260
- });
13261
- } else {
13262
- file.contents = Buffer.from(r, enc);
13263
- this.push(file);
13264
- done();
13265
- }
13266
- }
13267
- });
13268
- }
13269
-
13270
- var io = /*#__PURE__*/Object.freeze({
13271
- __proto__: null,
13272
- clean: clean,
13273
- copy: copy,
13274
- find: find,
13275
- home: home,
13276
- modifyStream: modifyStream,
13277
- rm: rm,
13278
- rmSync: rmSync,
13279
- untilde: untilde
13280
- });
13281
-
13282
12998
  /**
13283
12999
  * File I/O manager.
13284
13000
  */
@@ -13564,7 +13280,24 @@ function requireBundle () {
13564
13280
  * @return {object} an object like: `{ key_code: ... }`
13565
13281
  */
13566
13282
  function key(code, mods = null, opts = null) {
13567
- if (Array.isArray(code)) {
13283
+ switch (typeof code) {
13284
+ case 'number':
13285
+ code += '';
13286
+ break;
13287
+ case 'string':
13288
+ code = code.trim();
13289
+ if (code.includes(',')) {
13290
+ let r = [];
13291
+ let codes = code.split(',');
13292
+ for (let i = 0; i < codes.length; i++) {
13293
+ let I = codes[i].trim();
13294
+ if (I) r.push(key(I, mods, opts));
13295
+ }
13296
+ return r;
13297
+ }
13298
+ break;
13299
+ default:
13300
+ if (!Array.isArray(code)) throw `invalid argument (#1)`;
13568
13301
  let r = [];
13569
13302
  for (let i = 0; i < code.length; i++) {
13570
13303
  let I = code[i];
@@ -13586,6 +13319,9 @@ function requireBundle () {
13586
13319
  optional: []
13587
13320
  };
13588
13321
 
13322
+ /**
13323
+ * @param {string} mod - Modifier name
13324
+ */
13589
13325
  function addModifier(mod) {
13590
13326
  mod = mod.trim();
13591
13327
  let m = mod.match(/^\((.+?)\)$/); // is '(optional-key)' ?
@@ -13594,7 +13330,7 @@ function requireBundle () {
13594
13330
  }
13595
13331
 
13596
13332
  // parse 'modifier + keycode' expression
13597
- code = (code + '').split('+');
13333
+ code = code.split('+');
13598
13334
  for (let i = 0; i < code.length - 1; i++) addModifier(code[i]);
13599
13335
  code = code[code.length - 1].trim();
13600
13336
 
@@ -13752,7 +13488,7 @@ function requireBundle () {
13752
13488
  * {@link key} function returns in this format.
13753
13489
  *
13754
13490
  * #### String Format
13755
- * A special expression that is only supported by Karabinerge for user's convenience.
13491
+ * A special expression that is only supported by Karabinerge.
13756
13492
  * Here are some examples:
13757
13493
  *
13758
13494
  * | Expression | Meaning |
@@ -13829,7 +13565,7 @@ function requireBundle () {
13829
13565
  remap(map) {
13830
13566
  if (!map.type) map.type = 'basic';
13831
13567
  if (this.conds.length) map = Object.assign(map, {conditions: this.conds});
13832
- map = clean$1(remapSanitizer.sanitize(map));
13568
+ map = clean(remapSanitizer.sanitize(map));
13833
13569
  if (isEmpty(map)) console.warn(`Rule.remap: empty argument`);
13834
13570
  else this.remaps.push(map);
13835
13571
  return this;
@@ -13851,7 +13587,7 @@ function requireBundle () {
13851
13587
  * .remap( ... );
13852
13588
  */
13853
13589
  cond(cond) {
13854
- cond = clean$1(cond);
13590
+ cond = clean(cond);
13855
13591
  if (isEmpty(cond)) console.warn(`Rule.cond: empty argument`);
13856
13592
  else this.conds.push(cond);
13857
13593
  return this;
@@ -13969,13 +13705,14 @@ function requireBundle () {
13969
13705
  }
13970
13706
  /**
13971
13707
  * Setup {@link IO} object for reading/writing this ruleset from/to a file.
13972
- * Ruleset files are normally located at `~/.config/karabiner/complex_modifications/*.json`.
13973
- * @param {string} file - Ruleset file path
13708
+ * @param {string} file - Ruleset filename or path.
13709
+ * If a filename was passed, it is treated as `~/.config/karabiner/complex_modifications/*`.
13974
13710
  * @param {object} [opts] - IO options
13975
13711
  * @return {RuleSet} Itself
13976
13712
  */
13977
13713
  setIO(file, opts = {}) {
13978
- this.io = new IO(file, opts);
13714
+ if (!file) throw `invalid argument (#1)`;
13715
+ this.io = new IO(file.includes('/') ? file : path.join(io.home, '.config', 'karabiner', 'complex_modifications', file), opts);
13979
13716
  return this;
13980
13717
  }
13981
13718
  /**
@@ -14199,17 +13936,13 @@ function requireBundle () {
14199
13936
  bundle.unless_lang = unless_lang;
14200
13937
  bundle.unless_var = unless_var;
14201
13938
  return bundle;
14202
- }
14203
-
14204
- var name = "keycomfort";
14205
- var version = "0.1.0";
13939
+ }var name = "keycomfort";
13940
+ var version = "0.2.0";
14206
13941
  var description = "Comfortable keyboard remaps for Karabiner/AutoHotKey";
14207
13942
  var require$$10 = {
14208
13943
  name: name,
14209
13944
  version: version,
14210
- description: description};
14211
-
14212
- var rules_1;
13945
+ description: description};var rules_1;
14213
13946
  var hasRequiredRules;
14214
13947
 
14215
13948
  function requireRules () {
@@ -14656,6 +14389,14 @@ function requireRules () {
14656
14389
  });
14657
14390
  },
14658
14391
 
14392
+ 'pipe'(c, r) {
14393
+ r.cond(modding)
14394
+ .remap({
14395
+ from: key(c.from),
14396
+ to: key(c.to)
14397
+ });
14398
+ },
14399
+
14659
14400
  'equal'(c, r) {
14660
14401
  r.cond(modding)
14661
14402
  .remap({
@@ -14745,9 +14486,7 @@ function requireRules () {
14745
14486
 
14746
14487
  rules_1 = rules;
14747
14488
  return rules_1;
14748
- }
14749
-
14750
- var hasRequiredMain;
14489
+ }var hasRequiredMain;
14751
14490
 
14752
14491
  function requireMain () {
14753
14492
  if (hasRequiredMain) return main$1;
@@ -14755,7 +14494,7 @@ function requireMain () {
14755
14494
  const {env, cwd, stdin, stdout} = require$$0$1;
14756
14495
  const {spawnSync: spawn} = require$$1;
14757
14496
  const fs = require$$3;
14758
- const path = require$$5;
14497
+ const path = require$$2;
14759
14498
  const readline = require$$4$1;
14760
14499
 
14761
14500
  const {Command, Argument} = requireCommander();
@@ -15060,10 +14799,5 @@ function requireMain () {
15060
14799
 
15061
14800
  }
15062
14801
  return main$1;
15063
- }
15064
-
15065
- var mainExports = requireMain();
15066
- var main = /*@__PURE__*/getDefaultExportFromCjs(mainExports);
15067
-
15068
- module.exports = main;
15069
- //# sourceMappingURL=bundle.js.map
14802
+ }var mainExports = requireMain();
14803
+ var main = /*@__PURE__*/getDefaultExportFromCjs(mainExports);module.exports=main;