@marko/compiler 5.39.55 → 5.39.57

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.
@@ -75,7 +75,6 @@ let stripTypesVisitor;var _default =
75
75
  parserOpts.allowSuperOutsideMethod =
76
76
  parserOpts.allowUndeclaredExports =
77
77
  parserOpts.allowNewTargetOutsideFunction =
78
- parserOpts.createParenthesizedExpressions =
79
78
  parserOpts.createImportExpressions =
80
79
  true;
81
80
 
@@ -194,6 +194,8 @@ function parseMarko(file) {
194
194
  break;
195
195
  }
196
196
 
197
+ if (!value) return;
198
+
197
199
  const node = _babel.types.markoText(value);
198
200
  pushContent(node);
199
201
  onNext = (next) => {
package/dist/babel.js CHANGED
@@ -29172,12 +29172,28 @@ var require_virtual_types = /* @__PURE__ */ __commonJSMin(((exports) => {
29172
29172
  exports.ForAwaitStatement = ["ForOfStatement"];
29173
29173
  }));
29174
29174
  var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29175
+ /**
29176
+ * Helpers.
29177
+ */
29175
29178
  var s = 1e3;
29176
29179
  var m = s * 60;
29177
29180
  var h = m * 60;
29178
29181
  var d = h * 24;
29179
29182
  var w = d * 7;
29180
29183
  var y = d * 365.25;
29184
+ /**
29185
+ * Parse or format the given `val`.
29186
+ *
29187
+ * Options:
29188
+ *
29189
+ * - `long` verbose formatting [false]
29190
+ *
29191
+ * @param {String|Number} val
29192
+ * @param {Object} [options]
29193
+ * @throws {Error} throw an error if val is not a non-empty string or a number
29194
+ * @return {String|Number}
29195
+ * @api public
29196
+ */
29181
29197
  module.exports = function(val, options) {
29182
29198
  options = options || {};
29183
29199
  var type = typeof val;
@@ -29185,6 +29201,13 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29185
29201
  else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
29186
29202
  throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
29187
29203
  };
29204
+ /**
29205
+ * Parse the given `str` and return milliseconds.
29206
+ *
29207
+ * @param {String} str
29208
+ * @return {Number}
29209
+ * @api private
29210
+ */
29188
29211
  function parse(str) {
29189
29212
  str = String(str);
29190
29213
  if (str.length > 100) return;
@@ -29226,6 +29249,13 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29226
29249
  default: return;
29227
29250
  }
29228
29251
  }
29252
+ /**
29253
+ * Short format for `ms`.
29254
+ *
29255
+ * @param {Number} ms
29256
+ * @return {String}
29257
+ * @api private
29258
+ */
29229
29259
  function fmtShort(ms) {
29230
29260
  var msAbs = Math.abs(ms);
29231
29261
  if (msAbs >= d) return Math.round(ms / d) + "d";
@@ -29234,6 +29264,13 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29234
29264
  if (msAbs >= s) return Math.round(ms / s) + "s";
29235
29265
  return ms + "ms";
29236
29266
  }
29267
+ /**
29268
+ * Long format for `ms`.
29269
+ *
29270
+ * @param {Number} ms
29271
+ * @return {String}
29272
+ * @api private
29273
+ */
29237
29274
  function fmtLong(ms) {
29238
29275
  var msAbs = Math.abs(ms);
29239
29276
  if (msAbs >= d) return plural(ms, msAbs, d, "day");
@@ -29242,12 +29279,19 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29242
29279
  if (msAbs >= s) return plural(ms, msAbs, s, "second");
29243
29280
  return ms + " ms";
29244
29281
  }
29282
+ /**
29283
+ * Pluralization helper.
29284
+ */
29245
29285
  function plural(ms, msAbs, n, name) {
29246
29286
  var isPlural = msAbs >= n * 1.5;
29247
29287
  return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
29248
29288
  }
29249
29289
  }));
29250
29290
  var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29291
+ /**
29292
+ * This is the common logic for both the Node.js and web browser
29293
+ * implementations of `debug()`.
29294
+ */
29251
29295
  function setup(env) {
29252
29296
  createDebug.debug = createDebug;
29253
29297
  createDebug.default = createDebug;
@@ -29260,9 +29304,23 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29260
29304
  Object.keys(env).forEach((key) => {
29261
29305
  createDebug[key] = env[key];
29262
29306
  });
29307
+ /**
29308
+ * The currently active debug mode names, and names to skip.
29309
+ */
29263
29310
  createDebug.names = [];
29264
29311
  createDebug.skips = [];
29312
+ /**
29313
+ * Map of special "%n" handling functions, for the debug "format" argument.
29314
+ *
29315
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
29316
+ */
29265
29317
  createDebug.formatters = {};
29318
+ /**
29319
+ * Selects a color for a debug namespace
29320
+ * @param {String} namespace The namespace string for the debug instance to be colored
29321
+ * @return {Number|String} An ANSI color code for the given namespace
29322
+ * @api private
29323
+ */
29266
29324
  function selectColor(namespace) {
29267
29325
  let hash = 0;
29268
29326
  for (let i = 0; i < namespace.length; i++) {
@@ -29272,6 +29330,13 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29272
29330
  return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
29273
29331
  }
29274
29332
  createDebug.selectColor = selectColor;
29333
+ /**
29334
+ * Create a debugger with the given `namespace`.
29335
+ *
29336
+ * @param {String} namespace
29337
+ * @return {Function}
29338
+ * @api public
29339
+ */
29275
29340
  function createDebug(namespace) {
29276
29341
  let prevTime;
29277
29342
  let enableOverride = null;
@@ -29331,6 +29396,13 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29331
29396
  newDebug.log = this.log;
29332
29397
  return newDebug;
29333
29398
  }
29399
+ /**
29400
+ * Enables a debug mode by namespaces. This can include modes
29401
+ * separated by a colon and wildcards.
29402
+ *
29403
+ * @param {String} namespaces
29404
+ * @api public
29405
+ */
29334
29406
  function enable(namespaces) {
29335
29407
  createDebug.save(namespaces);
29336
29408
  createDebug.namespaces = namespaces;
@@ -29340,6 +29412,14 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29340
29412
  for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1));
29341
29413
  else createDebug.names.push(ns);
29342
29414
  }
29415
+ /**
29416
+ * Checks if the given string matches a namespace template, honoring
29417
+ * asterisks as wildcards.
29418
+ *
29419
+ * @param {String} search
29420
+ * @param {String} template
29421
+ * @return {Boolean}
29422
+ */
29343
29423
  function matchesTemplate(search, template) {
29344
29424
  let searchIndex = 0;
29345
29425
  let templateIndex = 0;
@@ -29361,20 +29441,44 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29361
29441
  while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
29362
29442
  return templateIndex === template.length;
29363
29443
  }
29444
+ /**
29445
+ * Disable debug output.
29446
+ *
29447
+ * @return {String} namespaces
29448
+ * @api public
29449
+ */
29364
29450
  function disable() {
29365
29451
  const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(",");
29366
29452
  createDebug.enable("");
29367
29453
  return namespaces;
29368
29454
  }
29455
+ /**
29456
+ * Returns true if the given mode name is enabled, false otherwise.
29457
+ *
29458
+ * @param {String} name
29459
+ * @return {Boolean}
29460
+ * @api public
29461
+ */
29369
29462
  function enabled(name) {
29370
29463
  for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false;
29371
29464
  for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true;
29372
29465
  return false;
29373
29466
  }
29467
+ /**
29468
+ * Coerce `val`.
29469
+ *
29470
+ * @param {Mixed} val
29471
+ * @return {Mixed}
29472
+ * @api private
29473
+ */
29374
29474
  function coerce(val) {
29375
29475
  if (val instanceof Error) return val.stack || val.message;
29376
29476
  return val;
29377
29477
  }
29478
+ /**
29479
+ * XXX DO NOT USE. This is a temporary stub function.
29480
+ * XXX It WILL be removed in the next major release.
29481
+ */
29378
29482
  function destroy() {
29379
29483
  console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
29380
29484
  }
@@ -29384,6 +29488,9 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29384
29488
  module.exports = setup;
29385
29489
  }));
29386
29490
  var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29491
+ /**
29492
+ * This is the web browser implementation of `debug()`.
29493
+ */
29387
29494
  exports.formatArgs = formatArgs;
29388
29495
  exports.save = save;
29389
29496
  exports.load = load;
@@ -29398,6 +29505,9 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29398
29505
  }
29399
29506
  };
29400
29507
  })();
29508
+ /**
29509
+ * Colors.
29510
+ */
29401
29511
  exports.colors = [
29402
29512
  "#0000CC",
29403
29513
  "#0000FF",
@@ -29476,12 +29586,24 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29476
29586
  "#FFCC00",
29477
29587
  "#FFCC33"
29478
29588
  ];
29589
+ /**
29590
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
29591
+ * and the Firebug extension (any Firefox version) are known
29592
+ * to support "%c" CSS customizations.
29593
+ *
29594
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
29595
+ */
29479
29596
  function useColors() {
29480
29597
  if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true;
29481
29598
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
29482
29599
  let m;
29483
29600
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
29484
29601
  }
29602
+ /**
29603
+ * Colorize log arguments if enabled.
29604
+ *
29605
+ * @api public
29606
+ */
29485
29607
  function formatArgs(args) {
29486
29608
  args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
29487
29609
  if (!this.useColors) return;
@@ -29496,13 +29618,33 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29496
29618
  });
29497
29619
  args.splice(lastC, 0, c);
29498
29620
  }
29621
+ /**
29622
+ * Invokes `console.debug()` when available.
29623
+ * No-op when `console.debug` is not a "function".
29624
+ * If `console.debug` is not available, falls back
29625
+ * to `console.log`.
29626
+ *
29627
+ * @api public
29628
+ */
29499
29629
  exports.log = console.debug || console.log || (() => {});
29630
+ /**
29631
+ * Save `namespaces`.
29632
+ *
29633
+ * @param {String} namespaces
29634
+ * @api private
29635
+ */
29500
29636
  function save(namespaces) {
29501
29637
  try {
29502
29638
  if (namespaces) exports.storage.setItem("debug", namespaces);
29503
29639
  else exports.storage.removeItem("debug");
29504
29640
  } catch (error) {}
29505
29641
  }
29642
+ /**
29643
+ * Load `namespaces`.
29644
+ *
29645
+ * @return {String} returns the previously persisted debug modes
29646
+ * @api private
29647
+ */
29506
29648
  function load() {
29507
29649
  let r;
29508
29650
  try {
@@ -29511,6 +29653,16 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29511
29653
  if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG;
29512
29654
  return r;
29513
29655
  }
29656
+ /**
29657
+ * Localstorage attempts to return the localstorage.
29658
+ *
29659
+ * This is necessary because safari throws
29660
+ * when a user disables cookies/localstorage
29661
+ * and you attempt to access it.
29662
+ *
29663
+ * @return {LocalStorage}
29664
+ * @api private
29665
+ */
29514
29666
  function localstorage() {
29515
29667
  try {
29516
29668
  return localStorage;
@@ -29518,6 +29670,9 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29518
29670
  }
29519
29671
  module.exports = require_common()(exports);
29520
29672
  const { formatters } = module.exports;
29673
+ /**
29674
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
29675
+ */
29521
29676
  formatters.j = function(v) {
29522
29677
  try {
29523
29678
  return JSON.stringify(v);
@@ -29601,8 +29756,14 @@ var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) =>
29601
29756
  };
29602
29757
  }));
29603
29758
  var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29759
+ /**
29760
+ * Module dependencies.
29761
+ */
29604
29762
  const tty = require("tty");
29605
29763
  const util = require("util");
29764
+ /**
29765
+ * This is the Node.js implementation of `debug()`.
29766
+ */
29606
29767
  exports.init = init;
29607
29768
  exports.log = log;
29608
29769
  exports.formatArgs = formatArgs;
@@ -29610,6 +29771,9 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29610
29771
  exports.load = load;
29611
29772
  exports.useColors = useColors;
29612
29773
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
29774
+ /**
29775
+ * Colors.
29776
+ */
29613
29777
  exports.colors = [
29614
29778
  6,
29615
29779
  2,
@@ -29699,6 +29863,11 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29699
29863
  221
29700
29864
  ];
29701
29865
  } catch (error) {}
29866
+ /**
29867
+ * Build up the default `inspectOpts` object from the environment variables.
29868
+ *
29869
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
29870
+ */
29702
29871
  exports.inspectOpts = Object.keys(process.env).filter((key) => {
29703
29872
  return /^debug_/i.test(key);
29704
29873
  }).reduce((obj, key) => {
@@ -29713,9 +29882,17 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29713
29882
  obj[prop] = val;
29714
29883
  return obj;
29715
29884
  }, {});
29885
+ /**
29886
+ * Is stdout a TTY? Colored output is enabled when `true`.
29887
+ */
29716
29888
  function useColors() {
29717
29889
  return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
29718
29890
  }
29891
+ /**
29892
+ * Adds ANSI color escape codes if enabled.
29893
+ *
29894
+ * @api public
29895
+ */
29719
29896
  function formatArgs(args) {
29720
29897
  const { namespace: name, useColors } = this;
29721
29898
  if (useColors) {
@@ -29730,16 +29907,37 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29730
29907
  if (exports.inspectOpts.hideDate) return "";
29731
29908
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
29732
29909
  }
29910
+ /**
29911
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
29912
+ */
29733
29913
  function log(...args) {
29734
29914
  return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
29735
29915
  }
29916
+ /**
29917
+ * Save `namespaces`.
29918
+ *
29919
+ * @param {String} namespaces
29920
+ * @api private
29921
+ */
29736
29922
  function save(namespaces) {
29737
29923
  if (namespaces) process.env.DEBUG = namespaces;
29738
29924
  else delete process.env.DEBUG;
29739
29925
  }
29926
+ /**
29927
+ * Load `namespaces`.
29928
+ *
29929
+ * @return {String} returns the previously persisted debug modes
29930
+ * @api private
29931
+ */
29740
29932
  function load() {
29741
29933
  return process.env.DEBUG;
29742
29934
  }
29935
+ /**
29936
+ * Init logic for `debug` instances.
29937
+ *
29938
+ * Create a new `inspectOpts` object in case `useColors` is set
29939
+ * differently for a particular `debug` instance.
29940
+ */
29743
29941
  function init(debug) {
29744
29942
  debug.inspectOpts = {};
29745
29943
  const keys = Object.keys(exports.inspectOpts);
@@ -29747,16 +29945,26 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29747
29945
  }
29748
29946
  module.exports = require_common()(exports);
29749
29947
  const { formatters } = module.exports;
29948
+ /**
29949
+ * Map %o to `util.inspect()`, all on a single line.
29950
+ */
29750
29951
  formatters.o = function(v) {
29751
29952
  this.inspectOpts.colors = this.useColors;
29752
29953
  return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
29753
29954
  };
29955
+ /**
29956
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
29957
+ */
29754
29958
  formatters.O = function(v) {
29755
29959
  this.inspectOpts.colors = this.useColors;
29756
29960
  return util.inspect(v, this.inspectOpts);
29757
29961
  };
29758
29962
  }));
29759
29963
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29964
+ /**
29965
+ * Detect Electron renderer / nwjs process, which is node, but we should
29966
+ * treat as a browser.
29967
+ */
29760
29968
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module.exports = require_browser();
29761
29969
  else module.exports = require_node$1();
29762
29970
  }));
@@ -31609,7 +31817,26 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJSMin(((exports, module) =
31609
31817
  })(exports, (function() {
31610
31818
  "use strict";
31611
31819
  const schemeRegex = /^[\w+.-]+:\/\//;
31820
+ /**
31821
+ * Matches the parts of a URL:
31822
+ * 1. Scheme, including ":", guaranteed.
31823
+ * 2. User/password, including "@", optional.
31824
+ * 3. Host, guaranteed.
31825
+ * 4. Port, including ":", optional.
31826
+ * 5. Path, including "/", optional.
31827
+ * 6. Query, including "?", optional.
31828
+ * 7. Hash, including "#", optional.
31829
+ */
31612
31830
  const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
31831
+ /**
31832
+ * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
31833
+ * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
31834
+ *
31835
+ * 1. Host, optional.
31836
+ * 2. Path, which may include "/", guaranteed.
31837
+ * 3. Query, including "?", optional.
31838
+ * 4. Hash, including "#", optional.
31839
+ */
31613
31840
  const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
31614
31841
  function isAbsoluteUrl(input) {
31615
31842
  return schemeRegex.test(input);
@@ -31679,6 +31906,10 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJSMin(((exports, module) =
31679
31906
  if (url.path === "/") url.path = base.path;
31680
31907
  else url.path = stripPathFilename(base.path) + url.path;
31681
31908
  }
31909
+ /**
31910
+ * The path can have empty directories "//", unneeded parents "foo/..", or current directory
31911
+ * "foo/.". We need to normalize to a standard representation.
31912
+ */
31682
31913
  function normalizePath(url, type) {
31683
31914
  const rel = type <= 4;
31684
31915
  const pieces = url.path.split("/");
@@ -31709,6 +31940,9 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJSMin(((exports, module) =
31709
31940
  if (!path || addTrailingSlash && !path.endsWith("/..")) path += "/";
31710
31941
  url.path = path;
31711
31942
  }
31943
+ /**
31944
+ * Attempts to resolve `input` URL/path relative to `base`.
31945
+ */
31712
31946
  function resolve(input, base) {
31713
31947
  if (!input && !base) return "";
31714
31948
  const url = parseUrl(input);
@@ -42861,6 +43095,10 @@ var require_gensync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42861
43095
  }
42862
43096
  })
42863
43097
  });
43098
+ /**
43099
+ * Given a generator function, return the standard API object that executes
43100
+ * the generator and calls the callbacks.
43101
+ */
42864
43102
  function makeFunctionAPI(genFn) {
42865
43103
  return {
42866
43104
  sync: function(...args) {
@@ -42895,6 +43133,10 @@ var require_gensync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42895
43133
  function makeError(msg, code) {
42896
43134
  return Object.assign(new Error(msg), { code });
42897
43135
  }
43136
+ /**
43137
+ * Given an options object, return a new generator that dispatches the
43138
+ * correct handler based on sync or async execution.
43139
+ */
42898
43140
  function newGenerator({ name, arity, sync, async, errback }) {
42899
43141
  assertTypeof("string", "name", name, true);
42900
43142
  assertTypeof("number", "arity", arity, true);
package/dist/babel.web.js CHANGED
@@ -29157,12 +29157,28 @@ var require_virtual_types = /* @__PURE__ */ __commonJSMin(((exports) => {
29157
29157
  exports.ForAwaitStatement = ["ForOfStatement"];
29158
29158
  }));
29159
29159
  var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29160
+ /**
29161
+ * Helpers.
29162
+ */
29160
29163
  var s = 1e3;
29161
29164
  var m = s * 60;
29162
29165
  var h = m * 60;
29163
29166
  var d = h * 24;
29164
29167
  var w = d * 7;
29165
29168
  var y = d * 365.25;
29169
+ /**
29170
+ * Parse or format the given `val`.
29171
+ *
29172
+ * Options:
29173
+ *
29174
+ * - `long` verbose formatting [false]
29175
+ *
29176
+ * @param {String|Number} val
29177
+ * @param {Object} [options]
29178
+ * @throws {Error} throw an error if val is not a non-empty string or a number
29179
+ * @return {String|Number}
29180
+ * @api public
29181
+ */
29166
29182
  module.exports = function(val, options) {
29167
29183
  options = options || {};
29168
29184
  var type = typeof val;
@@ -29170,6 +29186,13 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29170
29186
  else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
29171
29187
  throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
29172
29188
  };
29189
+ /**
29190
+ * Parse the given `str` and return milliseconds.
29191
+ *
29192
+ * @param {String} str
29193
+ * @return {Number}
29194
+ * @api private
29195
+ */
29173
29196
  function parse(str) {
29174
29197
  str = String(str);
29175
29198
  if (str.length > 100) return;
@@ -29211,6 +29234,13 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29211
29234
  default: return;
29212
29235
  }
29213
29236
  }
29237
+ /**
29238
+ * Short format for `ms`.
29239
+ *
29240
+ * @param {Number} ms
29241
+ * @return {String}
29242
+ * @api private
29243
+ */
29214
29244
  function fmtShort(ms) {
29215
29245
  var msAbs = Math.abs(ms);
29216
29246
  if (msAbs >= d) return Math.round(ms / d) + "d";
@@ -29219,6 +29249,13 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29219
29249
  if (msAbs >= s) return Math.round(ms / s) + "s";
29220
29250
  return ms + "ms";
29221
29251
  }
29252
+ /**
29253
+ * Long format for `ms`.
29254
+ *
29255
+ * @param {Number} ms
29256
+ * @return {String}
29257
+ * @api private
29258
+ */
29222
29259
  function fmtLong(ms) {
29223
29260
  var msAbs = Math.abs(ms);
29224
29261
  if (msAbs >= d) return plural(ms, msAbs, d, "day");
@@ -29227,12 +29264,19 @@ var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29227
29264
  if (msAbs >= s) return plural(ms, msAbs, s, "second");
29228
29265
  return ms + " ms";
29229
29266
  }
29267
+ /**
29268
+ * Pluralization helper.
29269
+ */
29230
29270
  function plural(ms, msAbs, n, name) {
29231
29271
  var isPlural = msAbs >= n * 1.5;
29232
29272
  return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
29233
29273
  }
29234
29274
  }));
29235
29275
  var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29276
+ /**
29277
+ * This is the common logic for both the Node.js and web browser
29278
+ * implementations of `debug()`.
29279
+ */
29236
29280
  function setup(env) {
29237
29281
  createDebug.debug = createDebug;
29238
29282
  createDebug.default = createDebug;
@@ -29245,9 +29289,23 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29245
29289
  Object.keys(env).forEach((key) => {
29246
29290
  createDebug[key] = env[key];
29247
29291
  });
29292
+ /**
29293
+ * The currently active debug mode names, and names to skip.
29294
+ */
29248
29295
  createDebug.names = [];
29249
29296
  createDebug.skips = [];
29297
+ /**
29298
+ * Map of special "%n" handling functions, for the debug "format" argument.
29299
+ *
29300
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
29301
+ */
29250
29302
  createDebug.formatters = {};
29303
+ /**
29304
+ * Selects a color for a debug namespace
29305
+ * @param {String} namespace The namespace string for the debug instance to be colored
29306
+ * @return {Number|String} An ANSI color code for the given namespace
29307
+ * @api private
29308
+ */
29251
29309
  function selectColor(namespace) {
29252
29310
  let hash = 0;
29253
29311
  for (let i = 0; i < namespace.length; i++) {
@@ -29257,6 +29315,13 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29257
29315
  return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
29258
29316
  }
29259
29317
  createDebug.selectColor = selectColor;
29318
+ /**
29319
+ * Create a debugger with the given `namespace`.
29320
+ *
29321
+ * @param {String} namespace
29322
+ * @return {Function}
29323
+ * @api public
29324
+ */
29260
29325
  function createDebug(namespace) {
29261
29326
  let prevTime;
29262
29327
  let enableOverride = null;
@@ -29316,6 +29381,13 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29316
29381
  newDebug.log = this.log;
29317
29382
  return newDebug;
29318
29383
  }
29384
+ /**
29385
+ * Enables a debug mode by namespaces. This can include modes
29386
+ * separated by a colon and wildcards.
29387
+ *
29388
+ * @param {String} namespaces
29389
+ * @api public
29390
+ */
29319
29391
  function enable(namespaces) {
29320
29392
  createDebug.save(namespaces);
29321
29393
  createDebug.namespaces = namespaces;
@@ -29325,6 +29397,14 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29325
29397
  for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1));
29326
29398
  else createDebug.names.push(ns);
29327
29399
  }
29400
+ /**
29401
+ * Checks if the given string matches a namespace template, honoring
29402
+ * asterisks as wildcards.
29403
+ *
29404
+ * @param {String} search
29405
+ * @param {String} template
29406
+ * @return {Boolean}
29407
+ */
29328
29408
  function matchesTemplate(search, template) {
29329
29409
  let searchIndex = 0;
29330
29410
  let templateIndex = 0;
@@ -29346,20 +29426,44 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29346
29426
  while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
29347
29427
  return templateIndex === template.length;
29348
29428
  }
29429
+ /**
29430
+ * Disable debug output.
29431
+ *
29432
+ * @return {String} namespaces
29433
+ * @api public
29434
+ */
29349
29435
  function disable() {
29350
29436
  const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(",");
29351
29437
  createDebug.enable("");
29352
29438
  return namespaces;
29353
29439
  }
29440
+ /**
29441
+ * Returns true if the given mode name is enabled, false otherwise.
29442
+ *
29443
+ * @param {String} name
29444
+ * @return {Boolean}
29445
+ * @api public
29446
+ */
29354
29447
  function enabled(name) {
29355
29448
  for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false;
29356
29449
  for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true;
29357
29450
  return false;
29358
29451
  }
29452
+ /**
29453
+ * Coerce `val`.
29454
+ *
29455
+ * @param {Mixed} val
29456
+ * @return {Mixed}
29457
+ * @api private
29458
+ */
29359
29459
  function coerce(val) {
29360
29460
  if (val instanceof Error) return val.stack || val.message;
29361
29461
  return val;
29362
29462
  }
29463
+ /**
29464
+ * XXX DO NOT USE. This is a temporary stub function.
29465
+ * XXX It WILL be removed in the next major release.
29466
+ */
29363
29467
  function destroy() {
29364
29468
  console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
29365
29469
  }
@@ -29369,6 +29473,9 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29369
29473
  module.exports = setup;
29370
29474
  }));
29371
29475
  var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29476
+ /**
29477
+ * This is the web browser implementation of `debug()`.
29478
+ */
29372
29479
  exports.formatArgs = formatArgs;
29373
29480
  exports.save = save;
29374
29481
  exports.load = load;
@@ -29383,6 +29490,9 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29383
29490
  }
29384
29491
  };
29385
29492
  })();
29493
+ /**
29494
+ * Colors.
29495
+ */
29386
29496
  exports.colors = [
29387
29497
  "#0000CC",
29388
29498
  "#0000FF",
@@ -29461,12 +29571,24 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29461
29571
  "#FFCC00",
29462
29572
  "#FFCC33"
29463
29573
  ];
29574
+ /**
29575
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
29576
+ * and the Firebug extension (any Firefox version) are known
29577
+ * to support "%c" CSS customizations.
29578
+ *
29579
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
29580
+ */
29464
29581
  function useColors() {
29465
29582
  if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true;
29466
29583
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
29467
29584
  let m;
29468
29585
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
29469
29586
  }
29587
+ /**
29588
+ * Colorize log arguments if enabled.
29589
+ *
29590
+ * @api public
29591
+ */
29470
29592
  function formatArgs(args) {
29471
29593
  args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
29472
29594
  if (!this.useColors) return;
@@ -29481,13 +29603,33 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29481
29603
  });
29482
29604
  args.splice(lastC, 0, c);
29483
29605
  }
29606
+ /**
29607
+ * Invokes `console.debug()` when available.
29608
+ * No-op when `console.debug` is not a "function".
29609
+ * If `console.debug` is not available, falls back
29610
+ * to `console.log`.
29611
+ *
29612
+ * @api public
29613
+ */
29484
29614
  exports.log = console.debug || console.log || (() => {});
29615
+ /**
29616
+ * Save `namespaces`.
29617
+ *
29618
+ * @param {String} namespaces
29619
+ * @api private
29620
+ */
29485
29621
  function save(namespaces) {
29486
29622
  try {
29487
29623
  if (namespaces) exports.storage.setItem("debug", namespaces);
29488
29624
  else exports.storage.removeItem("debug");
29489
29625
  } catch (error) {}
29490
29626
  }
29627
+ /**
29628
+ * Load `namespaces`.
29629
+ *
29630
+ * @return {String} returns the previously persisted debug modes
29631
+ * @api private
29632
+ */
29491
29633
  function load() {
29492
29634
  let r;
29493
29635
  try {
@@ -29496,6 +29638,16 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29496
29638
  if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG;
29497
29639
  return r;
29498
29640
  }
29641
+ /**
29642
+ * Localstorage attempts to return the localstorage.
29643
+ *
29644
+ * This is necessary because safari throws
29645
+ * when a user disables cookies/localstorage
29646
+ * and you attempt to access it.
29647
+ *
29648
+ * @return {LocalStorage}
29649
+ * @api private
29650
+ */
29499
29651
  function localstorage() {
29500
29652
  try {
29501
29653
  return localStorage;
@@ -29503,6 +29655,9 @@ var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29503
29655
  }
29504
29656
  module.exports = require_common()(exports);
29505
29657
  const { formatters } = module.exports;
29658
+ /**
29659
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
29660
+ */
29506
29661
  formatters.j = function(v) {
29507
29662
  try {
29508
29663
  return JSON.stringify(v);
@@ -31360,7 +31515,26 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJSMin(((exports, module) =
31360
31515
  })(exports, (function() {
31361
31516
  "use strict";
31362
31517
  const schemeRegex = /^[\w+.-]+:\/\//;
31518
+ /**
31519
+ * Matches the parts of a URL:
31520
+ * 1. Scheme, including ":", guaranteed.
31521
+ * 2. User/password, including "@", optional.
31522
+ * 3. Host, guaranteed.
31523
+ * 4. Port, including ":", optional.
31524
+ * 5. Path, including "/", optional.
31525
+ * 6. Query, including "?", optional.
31526
+ * 7. Hash, including "#", optional.
31527
+ */
31363
31528
  const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
31529
+ /**
31530
+ * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
31531
+ * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
31532
+ *
31533
+ * 1. Host, optional.
31534
+ * 2. Path, which may include "/", guaranteed.
31535
+ * 3. Query, including "?", optional.
31536
+ * 4. Hash, including "#", optional.
31537
+ */
31364
31538
  const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
31365
31539
  function isAbsoluteUrl(input) {
31366
31540
  return schemeRegex.test(input);
@@ -31430,6 +31604,10 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJSMin(((exports, module) =
31430
31604
  if (url.path === "/") url.path = base.path;
31431
31605
  else url.path = stripPathFilename(base.path) + url.path;
31432
31606
  }
31607
+ /**
31608
+ * The path can have empty directories "//", unneeded parents "foo/..", or current directory
31609
+ * "foo/.". We need to normalize to a standard representation.
31610
+ */
31433
31611
  function normalizePath(url, type) {
31434
31612
  const rel = type <= 4;
31435
31613
  const pieces = url.path.split("/");
@@ -31460,6 +31638,9 @@ var require_resolve_uri_umd = /* @__PURE__ */ __commonJSMin(((exports, module) =
31460
31638
  if (!path || addTrailingSlash && !path.endsWith("/..")) path += "/";
31461
31639
  url.path = path;
31462
31640
  }
31641
+ /**
31642
+ * Attempts to resolve `input` URL/path relative to `base`.
31643
+ */
31463
31644
  function resolve(input, base) {
31464
31645
  if (!input && !base) return "";
31465
31646
  const url = parseUrl(input);
@@ -42672,6 +42853,10 @@ var require_gensync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42672
42853
  }
42673
42854
  })
42674
42855
  });
42856
+ /**
42857
+ * Given a generator function, return the standard API object that executes
42858
+ * the generator and calls the callbacks.
42859
+ */
42675
42860
  function makeFunctionAPI(genFn) {
42676
42861
  return {
42677
42862
  sync: function(...args) {
@@ -42706,6 +42891,10 @@ var require_gensync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
42706
42891
  function makeError(msg, code) {
42707
42892
  return Object.assign(new Error(msg), { code });
42708
42893
  }
42894
+ /**
42895
+ * Given an options object, return a new generator that dispatches the
42896
+ * correct handler based on sync or async execution.
42897
+ */
42709
42898
  function newGenerator({ name, arity, sync, async, errback }) {
42710
42899
  assertTypeof("string", "name", name, true);
42711
42900
  assertTypeof("number", "arity", arity, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/compiler",
3
- "version": "5.39.55",
3
+ "version": "5.39.57",
4
4
  "description": "Marko template to JS compiler.",
5
5
  "keywords": [
6
6
  "babel",
@@ -70,7 +70,7 @@
70
70
  "@luxass/strip-json-comments": "^1.4.0",
71
71
  "complain": "^1.6.1",
72
72
  "he": "^1.2.0",
73
- "htmljs-parser": "^5.7.4",
73
+ "htmljs-parser": "^5.10.2",
74
74
  "jsesc": "^3.1.0",
75
75
  "kleur": "^4.1.5",
76
76
  "lasso-package-root": "^1.0.1",
@@ -82,7 +82,7 @@
82
82
  "source-map-support": "^0.5.21"
83
83
  },
84
84
  "devDependencies": {
85
- "marko": "^5.38.22"
85
+ "marko": "^5.38.26"
86
86
  },
87
87
  "engines": {
88
88
  "node": "18 || 20 || >=22"