mystmd 1.3.11__py3-none-any.whl → 1.3.12__py3-none-any.whl

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.
mystmd_py/myst.cjs CHANGED
@@ -42959,47 +42959,71 @@ var require_parse_srcset = __commonJS({
42959
42959
  // ../../node_modules/picocolors/picocolors.js
42960
42960
  var require_picocolors = __commonJS({
42961
42961
  "../../node_modules/picocolors/picocolors.js"(exports2, module2) {
42962
- var tty7 = require("tty");
42963
- var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty7.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
42962
+ var argv = process.argv || [];
42963
+ var env7 = process.env;
42964
+ var isColorSupported = !("NO_COLOR" in env7 || argv.includes("--no-color")) && ("FORCE_COLOR" in env7 || argv.includes("--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && env7.TERM !== "dumb" || "CI" in env7);
42964
42965
  var formatter = (open2, close2, replace = open2) => (input3) => {
42965
42966
  let string2 = "" + input3;
42966
42967
  let index4 = string2.indexOf(close2, open2.length);
42967
42968
  return ~index4 ? open2 + replaceClose(string2, close2, replace, index4) + close2 : open2 + string2 + close2;
42968
42969
  };
42969
42970
  var replaceClose = (string2, close2, replace, index4) => {
42970
- let start = string2.substring(0, index4) + replace;
42971
- let end = string2.substring(index4 + close2.length);
42972
- let nextIndex = end.indexOf(close2);
42973
- return ~nextIndex ? start + replaceClose(end, close2, replace, nextIndex) : start + end;
42974
- };
42975
- var createColors = (enabled = isColorSupported) => ({
42976
- isColorSupported: enabled,
42977
- reset: enabled ? (s5) => `\x1B[0m${s5}\x1B[0m` : String,
42978
- bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
42979
- dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
42980
- italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
42981
- underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
42982
- inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
42983
- hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
42984
- strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
42985
- black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
42986
- red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
42987
- green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
42988
- yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
42989
- blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
42990
- magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
42991
- cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
42992
- white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
42993
- gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
42994
- bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
42995
- bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
42996
- bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
42997
- bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
42998
- bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
42999
- bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
43000
- bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
43001
- bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
43002
- });
42971
+ let result = "";
42972
+ let cursor = 0;
42973
+ do {
42974
+ result += string2.substring(cursor, index4) + replace;
42975
+ cursor = index4 + close2.length;
42976
+ index4 = string2.indexOf(close2, cursor);
42977
+ } while (~index4);
42978
+ return result + string2.substring(cursor);
42979
+ };
42980
+ var createColors = (enabled = isColorSupported) => {
42981
+ let init4 = enabled ? formatter : () => String;
42982
+ return {
42983
+ isColorSupported: enabled,
42984
+ reset: init4("\x1B[0m", "\x1B[0m"),
42985
+ bold: init4("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
42986
+ dim: init4("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
42987
+ italic: init4("\x1B[3m", "\x1B[23m"),
42988
+ underline: init4("\x1B[4m", "\x1B[24m"),
42989
+ inverse: init4("\x1B[7m", "\x1B[27m"),
42990
+ hidden: init4("\x1B[8m", "\x1B[28m"),
42991
+ strikethrough: init4("\x1B[9m", "\x1B[29m"),
42992
+ black: init4("\x1B[30m", "\x1B[39m"),
42993
+ red: init4("\x1B[31m", "\x1B[39m"),
42994
+ green: init4("\x1B[32m", "\x1B[39m"),
42995
+ yellow: init4("\x1B[33m", "\x1B[39m"),
42996
+ blue: init4("\x1B[34m", "\x1B[39m"),
42997
+ magenta: init4("\x1B[35m", "\x1B[39m"),
42998
+ cyan: init4("\x1B[36m", "\x1B[39m"),
42999
+ white: init4("\x1B[37m", "\x1B[39m"),
43000
+ gray: init4("\x1B[90m", "\x1B[39m"),
43001
+ bgBlack: init4("\x1B[40m", "\x1B[49m"),
43002
+ bgRed: init4("\x1B[41m", "\x1B[49m"),
43003
+ bgGreen: init4("\x1B[42m", "\x1B[49m"),
43004
+ bgYellow: init4("\x1B[43m", "\x1B[49m"),
43005
+ bgBlue: init4("\x1B[44m", "\x1B[49m"),
43006
+ bgMagenta: init4("\x1B[45m", "\x1B[49m"),
43007
+ bgCyan: init4("\x1B[46m", "\x1B[49m"),
43008
+ bgWhite: init4("\x1B[47m", "\x1B[49m"),
43009
+ blackBright: init4("\x1B[90m", "\x1B[39m"),
43010
+ redBright: init4("\x1B[91m", "\x1B[39m"),
43011
+ greenBright: init4("\x1B[92m", "\x1B[39m"),
43012
+ yellowBright: init4("\x1B[93m", "\x1B[39m"),
43013
+ blueBright: init4("\x1B[94m", "\x1B[39m"),
43014
+ magentaBright: init4("\x1B[95m", "\x1B[39m"),
43015
+ cyanBright: init4("\x1B[96m", "\x1B[39m"),
43016
+ whiteBright: init4("\x1B[97m", "\x1B[39m"),
43017
+ bgBlackBright: init4("\x1B[100m", "\x1B[49m"),
43018
+ bgRedBright: init4("\x1B[101m", "\x1B[49m"),
43019
+ bgGreenBright: init4("\x1B[102m", "\x1B[49m"),
43020
+ bgYellowBright: init4("\x1B[103m", "\x1B[49m"),
43021
+ bgBlueBright: init4("\x1B[104m", "\x1B[49m"),
43022
+ bgMagentaBright: init4("\x1B[105m", "\x1B[49m"),
43023
+ bgCyanBright: init4("\x1B[106m", "\x1B[49m"),
43024
+ bgWhiteBright: init4("\x1B[107m", "\x1B[49m")
43025
+ };
43026
+ };
43003
43027
  module2.exports = createColors();
43004
43028
  module2.exports.createColors = createColors;
43005
43029
  }
@@ -43035,8 +43059,8 @@ var require_tokenize = __commonJS({
43035
43059
  module2.exports = function tokenizer(input3, options = {}) {
43036
43060
  let css = input3.css.valueOf();
43037
43061
  let ignore3 = options.ignoreErrors;
43038
- let code7, next, quote, content3, escape5;
43039
- let escaped, escapePos, prev, n, currentToken;
43062
+ let code7, content3, escape5, next, quote;
43063
+ let currentToken, escaped, escapePos, n, prev;
43040
43064
  let length = css.length;
43041
43065
  let pos = 0;
43042
43066
  let buffer2 = [];
@@ -43335,30 +43359,40 @@ var require_css_syntax_error = __commonJS({
43335
43359
  let css = this.source;
43336
43360
  if (color2 == null)
43337
43361
  color2 = pico.isColorSupported;
43338
- if (terminalHighlight) {
43339
- if (color2)
43340
- css = terminalHighlight(css);
43341
- }
43342
- let lines = css.split(/\r?\n/);
43343
- let start = Math.max(this.line - 3, 0);
43344
- let end = Math.min(this.line + 2, lines.length);
43345
- let maxWidth = String(end).length;
43346
- let mark2, aside;
43362
+ let aside = (text7) => text7;
43363
+ let mark2 = (text7) => text7;
43364
+ let highlight = (text7) => text7;
43347
43365
  if (color2) {
43348
43366
  let { bold, gray, red } = pico.createColors(true);
43349
43367
  mark2 = (text7) => bold(red(text7));
43350
43368
  aside = (text7) => gray(text7);
43351
- } else {
43352
- mark2 = aside = (str2) => str2;
43369
+ if (terminalHighlight) {
43370
+ highlight = (text7) => terminalHighlight(text7);
43371
+ }
43353
43372
  }
43373
+ let lines = css.split(/\r?\n/);
43374
+ let start = Math.max(this.line - 3, 0);
43375
+ let end = Math.min(this.line + 2, lines.length);
43376
+ let maxWidth = String(end).length;
43354
43377
  return lines.slice(start, end).map((line2, index4) => {
43355
43378
  let number2 = start + 1 + index4;
43356
43379
  let gutter = " " + (" " + number2).slice(-maxWidth) + " | ";
43357
43380
  if (number2 === this.line) {
43381
+ if (line2.length > 160) {
43382
+ let padding2 = 20;
43383
+ let subLineStart = Math.max(0, this.column - padding2);
43384
+ let subLineEnd = Math.max(
43385
+ this.column + padding2,
43386
+ this.endColumn + padding2
43387
+ );
43388
+ let subLine = line2.slice(subLineStart, subLineEnd);
43389
+ let spacing3 = aside(gutter.replace(/\d/g, " ")) + line2.slice(0, Math.min(this.column - 1, padding2 - 1)).replace(/[^\t]/g, " ");
43390
+ return mark2(">") + aside(gutter) + highlight(subLine) + "\n " + spacing3 + mark2("^");
43391
+ }
43358
43392
  let spacing2 = aside(gutter.replace(/\d/g, " ")) + line2.slice(0, this.column - 1).replace(/[^\t]/g, " ");
43359
- return mark2(">") + aside(gutter) + line2 + "\n " + spacing2 + mark2("^");
43393
+ return mark2(">") + aside(gutter) + highlight(line2) + "\n " + spacing2 + mark2("^");
43360
43394
  }
43361
- return " " + aside(gutter) + line2;
43395
+ return " " + aside(gutter) + highlight(line2);
43362
43396
  }).join("\n");
43363
43397
  }
43364
43398
  toString() {
@@ -43374,15 +43408,6 @@ var require_css_syntax_error = __commonJS({
43374
43408
  }
43375
43409
  });
43376
43410
 
43377
- // ../../node_modules/postcss/lib/symbols.js
43378
- var require_symbols = __commonJS({
43379
- "../../node_modules/postcss/lib/symbols.js"(exports2, module2) {
43380
- "use strict";
43381
- module2.exports.isClean = Symbol("isClean");
43382
- module2.exports.my = Symbol("my");
43383
- }
43384
- });
43385
-
43386
43411
  // ../../node_modules/postcss/lib/stringifier.js
43387
43412
  var require_stringifier = __commonJS({
43388
43413
  "../../node_modules/postcss/lib/stringifier.js"(exports2, module2) {
@@ -43719,14 +43744,23 @@ var require_stringify2 = __commonJS({
43719
43744
  }
43720
43745
  });
43721
43746
 
43747
+ // ../../node_modules/postcss/lib/symbols.js
43748
+ var require_symbols = __commonJS({
43749
+ "../../node_modules/postcss/lib/symbols.js"(exports2, module2) {
43750
+ "use strict";
43751
+ module2.exports.isClean = Symbol("isClean");
43752
+ module2.exports.my = Symbol("my");
43753
+ }
43754
+ });
43755
+
43722
43756
  // ../../node_modules/postcss/lib/node.js
43723
43757
  var require_node2 = __commonJS({
43724
43758
  "../../node_modules/postcss/lib/node.js"(exports2, module2) {
43725
43759
  "use strict";
43726
- var { isClean, my } = require_symbols();
43727
43760
  var CssSyntaxError = require_css_syntax_error();
43728
43761
  var Stringifier = require_stringifier();
43729
43762
  var stringify4 = require_stringify2();
43763
+ var { isClean, my } = require_symbols();
43730
43764
  function cloneNode(obj, parent2) {
43731
43765
  let cloned = new obj.constructor();
43732
43766
  for (let i2 in obj) {
@@ -43855,6 +43889,10 @@ var require_node2 = __commonJS({
43855
43889
  }
43856
43890
  };
43857
43891
  }
43892
+ /* c8 ignore next 3 */
43893
+ markClean() {
43894
+ this[isClean] = true;
43895
+ }
43858
43896
  markDirty() {
43859
43897
  if (this[isClean]) {
43860
43898
  this[isClean] = false;
@@ -43919,7 +43957,10 @@ var require_node2 = __commonJS({
43919
43957
  let index4 = stringRepresentation.indexOf(opts.word);
43920
43958
  if (index4 !== -1) {
43921
43959
  start = this.positionInside(index4, stringRepresentation);
43922
- end = this.positionInside(index4 + opts.word.length, stringRepresentation);
43960
+ end = this.positionInside(
43961
+ index4 + opts.word.length,
43962
+ stringRepresentation
43963
+ );
43923
43964
  }
43924
43965
  } else {
43925
43966
  if (opts.start) {
@@ -44057,6 +44098,22 @@ var require_node2 = __commonJS({
44057
44098
  }
44058
44099
  });
44059
44100
 
44101
+ // ../../node_modules/postcss/lib/comment.js
44102
+ var require_comment = __commonJS({
44103
+ "../../node_modules/postcss/lib/comment.js"(exports2, module2) {
44104
+ "use strict";
44105
+ var Node = require_node2();
44106
+ var Comment = class extends Node {
44107
+ constructor(defaults4) {
44108
+ super(defaults4);
44109
+ this.type = "comment";
44110
+ }
44111
+ };
44112
+ module2.exports = Comment;
44113
+ Comment.default = Comment;
44114
+ }
44115
+ });
44116
+
44060
44117
  // ../../node_modules/postcss/lib/declaration.js
44061
44118
  var require_declaration = __commonJS({
44062
44119
  "../../node_modules/postcss/lib/declaration.js"(exports2, module2) {
@@ -44079,6 +44136,498 @@ var require_declaration = __commonJS({
44079
44136
  }
44080
44137
  });
44081
44138
 
44139
+ // ../../node_modules/postcss/lib/container.js
44140
+ var require_container = __commonJS({
44141
+ "../../node_modules/postcss/lib/container.js"(exports2, module2) {
44142
+ "use strict";
44143
+ var Comment = require_comment();
44144
+ var Declaration = require_declaration();
44145
+ var Node = require_node2();
44146
+ var { isClean, my } = require_symbols();
44147
+ var AtRule;
44148
+ var parse16;
44149
+ var Root;
44150
+ var Rule;
44151
+ function cleanSource(nodes) {
44152
+ return nodes.map((i2) => {
44153
+ if (i2.nodes)
44154
+ i2.nodes = cleanSource(i2.nodes);
44155
+ delete i2.source;
44156
+ return i2;
44157
+ });
44158
+ }
44159
+ function markTreeDirty(node3) {
44160
+ node3[isClean] = false;
44161
+ if (node3.proxyOf.nodes) {
44162
+ for (let i2 of node3.proxyOf.nodes) {
44163
+ markTreeDirty(i2);
44164
+ }
44165
+ }
44166
+ }
44167
+ var Container = class extends Node {
44168
+ append(...children) {
44169
+ for (let child of children) {
44170
+ let nodes = this.normalize(child, this.last);
44171
+ for (let node3 of nodes)
44172
+ this.proxyOf.nodes.push(node3);
44173
+ }
44174
+ this.markDirty();
44175
+ return this;
44176
+ }
44177
+ cleanRaws(keepBetween) {
44178
+ super.cleanRaws(keepBetween);
44179
+ if (this.nodes) {
44180
+ for (let node3 of this.nodes)
44181
+ node3.cleanRaws(keepBetween);
44182
+ }
44183
+ }
44184
+ each(callback) {
44185
+ if (!this.proxyOf.nodes)
44186
+ return void 0;
44187
+ let iterator = this.getIterator();
44188
+ let index4, result;
44189
+ while (this.indexes[iterator] < this.proxyOf.nodes.length) {
44190
+ index4 = this.indexes[iterator];
44191
+ result = callback(this.proxyOf.nodes[index4], index4);
44192
+ if (result === false)
44193
+ break;
44194
+ this.indexes[iterator] += 1;
44195
+ }
44196
+ delete this.indexes[iterator];
44197
+ return result;
44198
+ }
44199
+ every(condition) {
44200
+ return this.nodes.every(condition);
44201
+ }
44202
+ getIterator() {
44203
+ if (!this.lastEach)
44204
+ this.lastEach = 0;
44205
+ if (!this.indexes)
44206
+ this.indexes = {};
44207
+ this.lastEach += 1;
44208
+ let iterator = this.lastEach;
44209
+ this.indexes[iterator] = 0;
44210
+ return iterator;
44211
+ }
44212
+ getProxyProcessor() {
44213
+ return {
44214
+ get(node3, prop) {
44215
+ if (prop === "proxyOf") {
44216
+ return node3;
44217
+ } else if (!node3[prop]) {
44218
+ return node3[prop];
44219
+ } else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
44220
+ return (...args) => {
44221
+ return node3[prop](
44222
+ ...args.map((i2) => {
44223
+ if (typeof i2 === "function") {
44224
+ return (child, index4) => i2(child.toProxy(), index4);
44225
+ } else {
44226
+ return i2;
44227
+ }
44228
+ })
44229
+ );
44230
+ };
44231
+ } else if (prop === "every" || prop === "some") {
44232
+ return (cb) => {
44233
+ return node3[prop](
44234
+ (child, ...other) => cb(child.toProxy(), ...other)
44235
+ );
44236
+ };
44237
+ } else if (prop === "root") {
44238
+ return () => node3.root().toProxy();
44239
+ } else if (prop === "nodes") {
44240
+ return node3.nodes.map((i2) => i2.toProxy());
44241
+ } else if (prop === "first" || prop === "last") {
44242
+ return node3[prop].toProxy();
44243
+ } else {
44244
+ return node3[prop];
44245
+ }
44246
+ },
44247
+ set(node3, prop, value) {
44248
+ if (node3[prop] === value)
44249
+ return true;
44250
+ node3[prop] = value;
44251
+ if (prop === "name" || prop === "params" || prop === "selector") {
44252
+ node3.markDirty();
44253
+ }
44254
+ return true;
44255
+ }
44256
+ };
44257
+ }
44258
+ index(child) {
44259
+ if (typeof child === "number")
44260
+ return child;
44261
+ if (child.proxyOf)
44262
+ child = child.proxyOf;
44263
+ return this.proxyOf.nodes.indexOf(child);
44264
+ }
44265
+ insertAfter(exist, add2) {
44266
+ let existIndex = this.index(exist);
44267
+ let nodes = this.normalize(add2, this.proxyOf.nodes[existIndex]).reverse();
44268
+ existIndex = this.index(exist);
44269
+ for (let node3 of nodes)
44270
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node3);
44271
+ let index4;
44272
+ for (let id in this.indexes) {
44273
+ index4 = this.indexes[id];
44274
+ if (existIndex < index4) {
44275
+ this.indexes[id] = index4 + nodes.length;
44276
+ }
44277
+ }
44278
+ this.markDirty();
44279
+ return this;
44280
+ }
44281
+ insertBefore(exist, add2) {
44282
+ let existIndex = this.index(exist);
44283
+ let type2 = existIndex === 0 ? "prepend" : false;
44284
+ let nodes = this.normalize(
44285
+ add2,
44286
+ this.proxyOf.nodes[existIndex],
44287
+ type2
44288
+ ).reverse();
44289
+ existIndex = this.index(exist);
44290
+ for (let node3 of nodes)
44291
+ this.proxyOf.nodes.splice(existIndex, 0, node3);
44292
+ let index4;
44293
+ for (let id in this.indexes) {
44294
+ index4 = this.indexes[id];
44295
+ if (existIndex <= index4) {
44296
+ this.indexes[id] = index4 + nodes.length;
44297
+ }
44298
+ }
44299
+ this.markDirty();
44300
+ return this;
44301
+ }
44302
+ normalize(nodes, sample2) {
44303
+ if (typeof nodes === "string") {
44304
+ nodes = cleanSource(parse16(nodes).nodes);
44305
+ } else if (typeof nodes === "undefined") {
44306
+ nodes = [];
44307
+ } else if (Array.isArray(nodes)) {
44308
+ nodes = nodes.slice(0);
44309
+ for (let i2 of nodes) {
44310
+ if (i2.parent)
44311
+ i2.parent.removeChild(i2, "ignore");
44312
+ }
44313
+ } else if (nodes.type === "root" && this.type !== "document") {
44314
+ nodes = nodes.nodes.slice(0);
44315
+ for (let i2 of nodes) {
44316
+ if (i2.parent)
44317
+ i2.parent.removeChild(i2, "ignore");
44318
+ }
44319
+ } else if (nodes.type) {
44320
+ nodes = [nodes];
44321
+ } else if (nodes.prop) {
44322
+ if (typeof nodes.value === "undefined") {
44323
+ throw new Error("Value field is missed in node creation");
44324
+ } else if (typeof nodes.value !== "string") {
44325
+ nodes.value = String(nodes.value);
44326
+ }
44327
+ nodes = [new Declaration(nodes)];
44328
+ } else if (nodes.selector || nodes.selectors) {
44329
+ nodes = [new Rule(nodes)];
44330
+ } else if (nodes.name) {
44331
+ nodes = [new AtRule(nodes)];
44332
+ } else if (nodes.text) {
44333
+ nodes = [new Comment(nodes)];
44334
+ } else {
44335
+ throw new Error("Unknown node type in node creation");
44336
+ }
44337
+ let processed = nodes.map((i2) => {
44338
+ if (!i2[my])
44339
+ Container.rebuild(i2);
44340
+ i2 = i2.proxyOf;
44341
+ if (i2.parent)
44342
+ i2.parent.removeChild(i2);
44343
+ if (i2[isClean])
44344
+ markTreeDirty(i2);
44345
+ if (!i2.raws)
44346
+ i2.raws = {};
44347
+ if (typeof i2.raws.before === "undefined") {
44348
+ if (sample2 && typeof sample2.raws.before !== "undefined") {
44349
+ i2.raws.before = sample2.raws.before.replace(/\S/g, "");
44350
+ }
44351
+ }
44352
+ i2.parent = this.proxyOf;
44353
+ return i2;
44354
+ });
44355
+ return processed;
44356
+ }
44357
+ prepend(...children) {
44358
+ children = children.reverse();
44359
+ for (let child of children) {
44360
+ let nodes = this.normalize(child, this.first, "prepend").reverse();
44361
+ for (let node3 of nodes)
44362
+ this.proxyOf.nodes.unshift(node3);
44363
+ for (let id in this.indexes) {
44364
+ this.indexes[id] = this.indexes[id] + nodes.length;
44365
+ }
44366
+ }
44367
+ this.markDirty();
44368
+ return this;
44369
+ }
44370
+ push(child) {
44371
+ child.parent = this;
44372
+ this.proxyOf.nodes.push(child);
44373
+ return this;
44374
+ }
44375
+ removeAll() {
44376
+ for (let node3 of this.proxyOf.nodes)
44377
+ node3.parent = void 0;
44378
+ this.proxyOf.nodes = [];
44379
+ this.markDirty();
44380
+ return this;
44381
+ }
44382
+ removeChild(child) {
44383
+ child = this.index(child);
44384
+ this.proxyOf.nodes[child].parent = void 0;
44385
+ this.proxyOf.nodes.splice(child, 1);
44386
+ let index4;
44387
+ for (let id in this.indexes) {
44388
+ index4 = this.indexes[id];
44389
+ if (index4 >= child) {
44390
+ this.indexes[id] = index4 - 1;
44391
+ }
44392
+ }
44393
+ this.markDirty();
44394
+ return this;
44395
+ }
44396
+ replaceValues(pattern, opts, callback) {
44397
+ if (!callback) {
44398
+ callback = opts;
44399
+ opts = {};
44400
+ }
44401
+ this.walkDecls((decl) => {
44402
+ if (opts.props && !opts.props.includes(decl.prop))
44403
+ return;
44404
+ if (opts.fast && !decl.value.includes(opts.fast))
44405
+ return;
44406
+ decl.value = decl.value.replace(pattern, callback);
44407
+ });
44408
+ this.markDirty();
44409
+ return this;
44410
+ }
44411
+ some(condition) {
44412
+ return this.nodes.some(condition);
44413
+ }
44414
+ walk(callback) {
44415
+ return this.each((child, i2) => {
44416
+ let result;
44417
+ try {
44418
+ result = callback(child, i2);
44419
+ } catch (e2) {
44420
+ throw child.addToError(e2);
44421
+ }
44422
+ if (result !== false && child.walk) {
44423
+ result = child.walk(callback);
44424
+ }
44425
+ return result;
44426
+ });
44427
+ }
44428
+ walkAtRules(name3, callback) {
44429
+ if (!callback) {
44430
+ callback = name3;
44431
+ return this.walk((child, i2) => {
44432
+ if (child.type === "atrule") {
44433
+ return callback(child, i2);
44434
+ }
44435
+ });
44436
+ }
44437
+ if (name3 instanceof RegExp) {
44438
+ return this.walk((child, i2) => {
44439
+ if (child.type === "atrule" && name3.test(child.name)) {
44440
+ return callback(child, i2);
44441
+ }
44442
+ });
44443
+ }
44444
+ return this.walk((child, i2) => {
44445
+ if (child.type === "atrule" && child.name === name3) {
44446
+ return callback(child, i2);
44447
+ }
44448
+ });
44449
+ }
44450
+ walkComments(callback) {
44451
+ return this.walk((child, i2) => {
44452
+ if (child.type === "comment") {
44453
+ return callback(child, i2);
44454
+ }
44455
+ });
44456
+ }
44457
+ walkDecls(prop, callback) {
44458
+ if (!callback) {
44459
+ callback = prop;
44460
+ return this.walk((child, i2) => {
44461
+ if (child.type === "decl") {
44462
+ return callback(child, i2);
44463
+ }
44464
+ });
44465
+ }
44466
+ if (prop instanceof RegExp) {
44467
+ return this.walk((child, i2) => {
44468
+ if (child.type === "decl" && prop.test(child.prop)) {
44469
+ return callback(child, i2);
44470
+ }
44471
+ });
44472
+ }
44473
+ return this.walk((child, i2) => {
44474
+ if (child.type === "decl" && child.prop === prop) {
44475
+ return callback(child, i2);
44476
+ }
44477
+ });
44478
+ }
44479
+ walkRules(selector, callback) {
44480
+ if (!callback) {
44481
+ callback = selector;
44482
+ return this.walk((child, i2) => {
44483
+ if (child.type === "rule") {
44484
+ return callback(child, i2);
44485
+ }
44486
+ });
44487
+ }
44488
+ if (selector instanceof RegExp) {
44489
+ return this.walk((child, i2) => {
44490
+ if (child.type === "rule" && selector.test(child.selector)) {
44491
+ return callback(child, i2);
44492
+ }
44493
+ });
44494
+ }
44495
+ return this.walk((child, i2) => {
44496
+ if (child.type === "rule" && child.selector === selector) {
44497
+ return callback(child, i2);
44498
+ }
44499
+ });
44500
+ }
44501
+ get first() {
44502
+ if (!this.proxyOf.nodes)
44503
+ return void 0;
44504
+ return this.proxyOf.nodes[0];
44505
+ }
44506
+ get last() {
44507
+ if (!this.proxyOf.nodes)
44508
+ return void 0;
44509
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
44510
+ }
44511
+ };
44512
+ Container.registerParse = (dependant) => {
44513
+ parse16 = dependant;
44514
+ };
44515
+ Container.registerRule = (dependant) => {
44516
+ Rule = dependant;
44517
+ };
44518
+ Container.registerAtRule = (dependant) => {
44519
+ AtRule = dependant;
44520
+ };
44521
+ Container.registerRoot = (dependant) => {
44522
+ Root = dependant;
44523
+ };
44524
+ module2.exports = Container;
44525
+ Container.default = Container;
44526
+ Container.rebuild = (node3) => {
44527
+ if (node3.type === "atrule") {
44528
+ Object.setPrototypeOf(node3, AtRule.prototype);
44529
+ } else if (node3.type === "rule") {
44530
+ Object.setPrototypeOf(node3, Rule.prototype);
44531
+ } else if (node3.type === "decl") {
44532
+ Object.setPrototypeOf(node3, Declaration.prototype);
44533
+ } else if (node3.type === "comment") {
44534
+ Object.setPrototypeOf(node3, Comment.prototype);
44535
+ } else if (node3.type === "root") {
44536
+ Object.setPrototypeOf(node3, Root.prototype);
44537
+ }
44538
+ node3[my] = true;
44539
+ if (node3.nodes) {
44540
+ node3.nodes.forEach((child) => {
44541
+ Container.rebuild(child);
44542
+ });
44543
+ }
44544
+ };
44545
+ }
44546
+ });
44547
+
44548
+ // ../../node_modules/postcss/lib/at-rule.js
44549
+ var require_at_rule = __commonJS({
44550
+ "../../node_modules/postcss/lib/at-rule.js"(exports2, module2) {
44551
+ "use strict";
44552
+ var Container = require_container();
44553
+ var AtRule = class extends Container {
44554
+ constructor(defaults4) {
44555
+ super(defaults4);
44556
+ this.type = "atrule";
44557
+ }
44558
+ append(...children) {
44559
+ if (!this.proxyOf.nodes)
44560
+ this.nodes = [];
44561
+ return super.append(...children);
44562
+ }
44563
+ prepend(...children) {
44564
+ if (!this.proxyOf.nodes)
44565
+ this.nodes = [];
44566
+ return super.prepend(...children);
44567
+ }
44568
+ };
44569
+ module2.exports = AtRule;
44570
+ AtRule.default = AtRule;
44571
+ Container.registerAtRule(AtRule);
44572
+ }
44573
+ });
44574
+
44575
+ // ../../node_modules/postcss/lib/document.js
44576
+ var require_document = __commonJS({
44577
+ "../../node_modules/postcss/lib/document.js"(exports2, module2) {
44578
+ "use strict";
44579
+ var Container = require_container();
44580
+ var LazyResult;
44581
+ var Processor2;
44582
+ var Document2 = class extends Container {
44583
+ constructor(defaults4) {
44584
+ super({ type: "document", ...defaults4 });
44585
+ if (!this.nodes) {
44586
+ this.nodes = [];
44587
+ }
44588
+ }
44589
+ toResult(opts = {}) {
44590
+ let lazy = new LazyResult(new Processor2(), this, opts);
44591
+ return lazy.stringify();
44592
+ }
44593
+ };
44594
+ Document2.registerLazyResult = (dependant) => {
44595
+ LazyResult = dependant;
44596
+ };
44597
+ Document2.registerProcessor = (dependant) => {
44598
+ Processor2 = dependant;
44599
+ };
44600
+ module2.exports = Document2;
44601
+ Document2.default = Document2;
44602
+ }
44603
+ });
44604
+
44605
+ // ../../node_modules/postcss/node_modules/nanoid/non-secure/index.cjs
44606
+ var require_non_secure = __commonJS({
44607
+ "../../node_modules/postcss/node_modules/nanoid/non-secure/index.cjs"(exports2, module2) {
44608
+ var urlAlphabet3 = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
44609
+ var customAlphabet2 = (alphabet2, defaultSize = 21) => {
44610
+ return (size = defaultSize) => {
44611
+ let id = "";
44612
+ let i2 = size;
44613
+ while (i2--) {
44614
+ id += alphabet2[Math.random() * alphabet2.length | 0];
44615
+ }
44616
+ return id;
44617
+ };
44618
+ };
44619
+ var nanoid3 = (size = 21) => {
44620
+ let id = "";
44621
+ let i2 = size;
44622
+ while (i2--) {
44623
+ id += urlAlphabet3[Math.random() * 64 | 0];
44624
+ }
44625
+ return id;
44626
+ };
44627
+ module2.exports = { nanoid: nanoid3, customAlphabet: customAlphabet2 };
44628
+ }
44629
+ });
44630
+
44082
44631
  // ../../node_modules/source-map-js/lib/base64.js
44083
44632
  var require_base64 = __commonJS({
44084
44633
  "../../node_modules/source-map-js/lib/base64.js"(exports2) {
@@ -45135,7 +45684,9 @@ var require_source_map_consumer = __commonJS({
45135
45684
  for (var i2 = 0, n = mappings.length; i2 < n; i2++) {
45136
45685
  var mapping = mappings[i2];
45137
45686
  var source2 = mapping.source === null ? null : sources.at(mapping.source);
45138
- source2 = util4.computeSourceURL(sourceRoot, source2, sourceMapURL);
45687
+ if (source2 !== null) {
45688
+ source2 = util4.computeSourceURL(sourceRoot, source2, sourceMapURL);
45689
+ }
45139
45690
  boundCallback({
45140
45691
  source: source2,
45141
45692
  generatedLine: mapping.generatedLine,
@@ -45674,7 +46225,9 @@ var require_source_map_consumer = __commonJS({
45674
46225
  for (var j = 0; j < sectionMappings.length; j++) {
45675
46226
  var mapping = sectionMappings[j];
45676
46227
  var source2 = section.consumer._sources.at(mapping.source);
45677
- source2 = util4.computeSourceURL(section.consumer.sourceRoot, source2, this._sourceMapURL);
46228
+ if (source2 !== null) {
46229
+ source2 = util4.computeSourceURL(section.consumer.sourceRoot, source2, this._sourceMapURL);
46230
+ }
45678
46231
  this._sources.add(source2);
45679
46232
  source2 = this._sources.indexOf(source2);
45680
46233
  var name3 = null;
@@ -45979,39 +46532,13 @@ var require_source_map = __commonJS({
45979
46532
  }
45980
46533
  });
45981
46534
 
45982
- // ../../node_modules/postcss/node_modules/nanoid/non-secure/index.cjs
45983
- var require_non_secure = __commonJS({
45984
- "../../node_modules/postcss/node_modules/nanoid/non-secure/index.cjs"(exports2, module2) {
45985
- var urlAlphabet3 = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
45986
- var customAlphabet2 = (alphabet2, defaultSize = 21) => {
45987
- return (size = defaultSize) => {
45988
- let id = "";
45989
- let i2 = size;
45990
- while (i2--) {
45991
- id += alphabet2[Math.random() * alphabet2.length | 0];
45992
- }
45993
- return id;
45994
- };
45995
- };
45996
- var nanoid3 = (size = 21) => {
45997
- let id = "";
45998
- let i2 = size;
45999
- while (i2--) {
46000
- id += urlAlphabet3[Math.random() * 64 | 0];
46001
- }
46002
- return id;
46003
- };
46004
- module2.exports = { nanoid: nanoid3, customAlphabet: customAlphabet2 };
46005
- }
46006
- });
46007
-
46008
46535
  // ../../node_modules/postcss/lib/previous-map.js
46009
46536
  var require_previous_map = __commonJS({
46010
46537
  "../../node_modules/postcss/lib/previous-map.js"(exports2, module2) {
46011
46538
  "use strict";
46012
- var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
46013
46539
  var { existsSync: existsSync2, readFileSync: readFileSync2 } = require("fs");
46014
46540
  var { dirname: dirname8, join: join20 } = require("path");
46541
+ var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
46015
46542
  function fromBase64(str2) {
46016
46543
  if (Buffer) {
46017
46544
  return Buffer.from(str2, "base64").toString();
@@ -46046,11 +46573,13 @@ var require_previous_map = __commonJS({
46046
46573
  let baseUri = /^data:application\/json;base64,/;
46047
46574
  let charsetUri = /^data:application\/json;charset=utf-?8,/;
46048
46575
  let uri = /^data:application\/json,/;
46049
- if (charsetUri.test(text7) || uri.test(text7)) {
46050
- return decodeURIComponent(text7.substr(RegExp.lastMatch.length));
46576
+ let uriMatch = text7.match(charsetUri) || text7.match(uri);
46577
+ if (uriMatch) {
46578
+ return decodeURIComponent(text7.substr(uriMatch[0].length));
46051
46579
  }
46052
- if (baseCharsetUri.test(text7) || baseUri.test(text7)) {
46053
- return fromBase64(text7.substr(RegExp.lastMatch.length));
46580
+ let baseUriMatch = text7.match(baseCharsetUri) || text7.match(baseUri);
46581
+ if (baseUriMatch) {
46582
+ return fromBase64(text7.substr(baseUriMatch[0].length));
46054
46583
  }
46055
46584
  let encoding = text7.match(/data:application\/json;([^,]+),/)[1];
46056
46585
  throw new Error("Unsupported source map encoding " + encoding);
@@ -46064,7 +46593,7 @@ var require_previous_map = __commonJS({
46064
46593
  return typeof map14.mappings === "string" || typeof map14._mappings === "string" || Array.isArray(map14.sections);
46065
46594
  }
46066
46595
  loadAnnotation(css) {
46067
- let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
46596
+ let comments = css.match(/\/\*\s*# sourceMappingURL=/g);
46068
46597
  if (!comments)
46069
46598
  return;
46070
46599
  let start = css.lastIndexOf(comments.pop());
@@ -46135,13 +46664,13 @@ var require_previous_map = __commonJS({
46135
46664
  var require_input4 = __commonJS({
46136
46665
  "../../node_modules/postcss/lib/input.js"(exports2, module2) {
46137
46666
  "use strict";
46667
+ var { nanoid: nanoid3 } = require_non_secure();
46668
+ var { isAbsolute, resolve: resolve9 } = require("path");
46138
46669
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
46139
46670
  var { fileURLToPath: fileURLToPath5, pathToFileURL } = require("url");
46140
- var { isAbsolute, resolve: resolve9 } = require("path");
46141
- var { nanoid: nanoid3 } = require_non_secure();
46142
- var terminalHighlight = require_terminal_highlight();
46143
46671
  var CssSyntaxError = require_css_syntax_error();
46144
46672
  var PreviousMap = require_previous_map();
46673
+ var terminalHighlight = require_terminal_highlight();
46145
46674
  var fromOffsetCache = Symbol("fromOffsetCache");
46146
46675
  var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
46147
46676
  var pathAvailable = Boolean(resolve9 && isAbsolute);
@@ -46180,7 +46709,7 @@ var require_input4 = __commonJS({
46180
46709
  this.map.file = this.from;
46181
46710
  }
46182
46711
  error(message, line2, column, opts = {}) {
46183
- let result, endLine, endColumn;
46712
+ let endColumn, endLine, result;
46184
46713
  if (line2 && typeof line2 === "object") {
46185
46714
  let start = line2;
46186
46715
  let end = column;
@@ -46344,12 +46873,212 @@ var require_input4 = __commonJS({
46344
46873
  }
46345
46874
  });
46346
46875
 
46876
+ // ../../node_modules/postcss/lib/root.js
46877
+ var require_root = __commonJS({
46878
+ "../../node_modules/postcss/lib/root.js"(exports2, module2) {
46879
+ "use strict";
46880
+ var Container = require_container();
46881
+ var LazyResult;
46882
+ var Processor2;
46883
+ var Root = class extends Container {
46884
+ constructor(defaults4) {
46885
+ super(defaults4);
46886
+ this.type = "root";
46887
+ if (!this.nodes)
46888
+ this.nodes = [];
46889
+ }
46890
+ normalize(child, sample2, type2) {
46891
+ let nodes = super.normalize(child);
46892
+ if (sample2) {
46893
+ if (type2 === "prepend") {
46894
+ if (this.nodes.length > 1) {
46895
+ sample2.raws.before = this.nodes[1].raws.before;
46896
+ } else {
46897
+ delete sample2.raws.before;
46898
+ }
46899
+ } else if (this.first !== sample2) {
46900
+ for (let node3 of nodes) {
46901
+ node3.raws.before = sample2.raws.before;
46902
+ }
46903
+ }
46904
+ }
46905
+ return nodes;
46906
+ }
46907
+ removeChild(child, ignore3) {
46908
+ let index4 = this.index(child);
46909
+ if (!ignore3 && index4 === 0 && this.nodes.length > 1) {
46910
+ this.nodes[1].raws.before = this.nodes[index4].raws.before;
46911
+ }
46912
+ return super.removeChild(child);
46913
+ }
46914
+ toResult(opts = {}) {
46915
+ let lazy = new LazyResult(new Processor2(), this, opts);
46916
+ return lazy.stringify();
46917
+ }
46918
+ };
46919
+ Root.registerLazyResult = (dependant) => {
46920
+ LazyResult = dependant;
46921
+ };
46922
+ Root.registerProcessor = (dependant) => {
46923
+ Processor2 = dependant;
46924
+ };
46925
+ module2.exports = Root;
46926
+ Root.default = Root;
46927
+ Container.registerRoot(Root);
46928
+ }
46929
+ });
46930
+
46931
+ // ../../node_modules/postcss/lib/list.js
46932
+ var require_list = __commonJS({
46933
+ "../../node_modules/postcss/lib/list.js"(exports2, module2) {
46934
+ "use strict";
46935
+ var list6 = {
46936
+ comma(string2) {
46937
+ return list6.split(string2, [","], true);
46938
+ },
46939
+ space(string2) {
46940
+ let spaces = [" ", "\n", " "];
46941
+ return list6.split(string2, spaces);
46942
+ },
46943
+ split(string2, separators, last) {
46944
+ let array = [];
46945
+ let current2 = "";
46946
+ let split2 = false;
46947
+ let func = 0;
46948
+ let inQuote = false;
46949
+ let prevQuote = "";
46950
+ let escape5 = false;
46951
+ for (let letter of string2) {
46952
+ if (escape5) {
46953
+ escape5 = false;
46954
+ } else if (letter === "\\") {
46955
+ escape5 = true;
46956
+ } else if (inQuote) {
46957
+ if (letter === prevQuote) {
46958
+ inQuote = false;
46959
+ }
46960
+ } else if (letter === '"' || letter === "'") {
46961
+ inQuote = true;
46962
+ prevQuote = letter;
46963
+ } else if (letter === "(") {
46964
+ func += 1;
46965
+ } else if (letter === ")") {
46966
+ if (func > 0)
46967
+ func -= 1;
46968
+ } else if (func === 0) {
46969
+ if (separators.includes(letter))
46970
+ split2 = true;
46971
+ }
46972
+ if (split2) {
46973
+ if (current2 !== "")
46974
+ array.push(current2.trim());
46975
+ current2 = "";
46976
+ split2 = false;
46977
+ } else {
46978
+ current2 += letter;
46979
+ }
46980
+ }
46981
+ if (last || current2 !== "")
46982
+ array.push(current2.trim());
46983
+ return array;
46984
+ }
46985
+ };
46986
+ module2.exports = list6;
46987
+ list6.default = list6;
46988
+ }
46989
+ });
46990
+
46991
+ // ../../node_modules/postcss/lib/rule.js
46992
+ var require_rule = __commonJS({
46993
+ "../../node_modules/postcss/lib/rule.js"(exports2, module2) {
46994
+ "use strict";
46995
+ var Container = require_container();
46996
+ var list6 = require_list();
46997
+ var Rule = class extends Container {
46998
+ constructor(defaults4) {
46999
+ super(defaults4);
47000
+ this.type = "rule";
47001
+ if (!this.nodes)
47002
+ this.nodes = [];
47003
+ }
47004
+ get selectors() {
47005
+ return list6.comma(this.selector);
47006
+ }
47007
+ set selectors(values) {
47008
+ let match3 = this.selector ? this.selector.match(/,\s*/) : null;
47009
+ let sep5 = match3 ? match3[0] : "," + this.raw("between", "beforeOpen");
47010
+ this.selector = values.join(sep5);
47011
+ }
47012
+ };
47013
+ module2.exports = Rule;
47014
+ Rule.default = Rule;
47015
+ Container.registerRule(Rule);
47016
+ }
47017
+ });
47018
+
47019
+ // ../../node_modules/postcss/lib/fromJSON.js
47020
+ var require_fromJSON = __commonJS({
47021
+ "../../node_modules/postcss/lib/fromJSON.js"(exports2, module2) {
47022
+ "use strict";
47023
+ var AtRule = require_at_rule();
47024
+ var Comment = require_comment();
47025
+ var Declaration = require_declaration();
47026
+ var Input = require_input4();
47027
+ var PreviousMap = require_previous_map();
47028
+ var Root = require_root();
47029
+ var Rule = require_rule();
47030
+ function fromJSON(json2, inputs) {
47031
+ if (Array.isArray(json2))
47032
+ return json2.map((n) => fromJSON(n));
47033
+ let { inputs: ownInputs, ...defaults4 } = json2;
47034
+ if (ownInputs) {
47035
+ inputs = [];
47036
+ for (let input3 of ownInputs) {
47037
+ let inputHydrated = { ...input3, __proto__: Input.prototype };
47038
+ if (inputHydrated.map) {
47039
+ inputHydrated.map = {
47040
+ ...inputHydrated.map,
47041
+ __proto__: PreviousMap.prototype
47042
+ };
47043
+ }
47044
+ inputs.push(inputHydrated);
47045
+ }
47046
+ }
47047
+ if (defaults4.nodes) {
47048
+ defaults4.nodes = json2.nodes.map((n) => fromJSON(n, inputs));
47049
+ }
47050
+ if (defaults4.source) {
47051
+ let { inputId, ...source2 } = defaults4.source;
47052
+ defaults4.source = source2;
47053
+ if (inputId != null) {
47054
+ defaults4.source.input = inputs[inputId];
47055
+ }
47056
+ }
47057
+ if (defaults4.type === "root") {
47058
+ return new Root(defaults4);
47059
+ } else if (defaults4.type === "decl") {
47060
+ return new Declaration(defaults4);
47061
+ } else if (defaults4.type === "rule") {
47062
+ return new Rule(defaults4);
47063
+ } else if (defaults4.type === "comment") {
47064
+ return new Comment(defaults4);
47065
+ } else if (defaults4.type === "atrule") {
47066
+ return new AtRule(defaults4);
47067
+ } else {
47068
+ throw new Error("Unknown node type: " + json2.type);
47069
+ }
47070
+ }
47071
+ module2.exports = fromJSON;
47072
+ fromJSON.default = fromJSON;
47073
+ }
47074
+ });
47075
+
46347
47076
  // ../../node_modules/postcss/lib/map-generator.js
46348
47077
  var require_map_generator = __commonJS({
46349
47078
  "../../node_modules/postcss/lib/map-generator.js"(exports2, module2) {
46350
47079
  "use strict";
46351
- var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
46352
47080
  var { dirname: dirname8, relative: relative6, resolve: resolve9, sep: sep5 } = require("path");
47081
+ var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
46353
47082
  var { pathToFileURL } = require("url");
46354
47083
  var Input = require_input4();
46355
47084
  var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
@@ -46408,12 +47137,12 @@ var require_map_generator = __commonJS({
46408
47137
  node3 = this.root.nodes[i2];
46409
47138
  if (node3.type !== "comment")
46410
47139
  continue;
46411
- if (node3.text.indexOf("# sourceMappingURL=") === 0) {
47140
+ if (node3.text.startsWith("# sourceMappingURL=")) {
46412
47141
  this.root.removeChild(i2);
46413
47142
  }
46414
47143
  }
46415
47144
  } else if (this.css) {
46416
- this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, "");
47145
+ this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, "");
46417
47146
  }
46418
47147
  }
46419
47148
  generate() {
@@ -46474,7 +47203,7 @@ var require_map_generator = __commonJS({
46474
47203
  original: { column: 0, line: 0 },
46475
47204
  source: ""
46476
47205
  };
46477
- let lines, last;
47206
+ let last, lines;
46478
47207
  this.stringify(this.root, (str2, node3, type2) => {
46479
47208
  this.css += str2;
46480
47209
  if (node3 && type2 !== "end") {
@@ -46674,727 +47403,16 @@ var require_map_generator = __commonJS({
46674
47403
  }
46675
47404
  });
46676
47405
 
46677
- // ../../node_modules/postcss/lib/comment.js
46678
- var require_comment = __commonJS({
46679
- "../../node_modules/postcss/lib/comment.js"(exports2, module2) {
46680
- "use strict";
46681
- var Node = require_node2();
46682
- var Comment = class extends Node {
46683
- constructor(defaults4) {
46684
- super(defaults4);
46685
- this.type = "comment";
46686
- }
46687
- };
46688
- module2.exports = Comment;
46689
- Comment.default = Comment;
46690
- }
46691
- });
46692
-
46693
- // ../../node_modules/postcss/lib/container.js
46694
- var require_container = __commonJS({
46695
- "../../node_modules/postcss/lib/container.js"(exports2, module2) {
46696
- "use strict";
46697
- var { isClean, my } = require_symbols();
46698
- var Declaration = require_declaration();
46699
- var Comment = require_comment();
46700
- var Node = require_node2();
46701
- var parse16;
46702
- var Rule;
46703
- var AtRule;
46704
- var Root;
46705
- function cleanSource(nodes) {
46706
- return nodes.map((i2) => {
46707
- if (i2.nodes)
46708
- i2.nodes = cleanSource(i2.nodes);
46709
- delete i2.source;
46710
- return i2;
46711
- });
46712
- }
46713
- function markDirtyUp(node3) {
46714
- node3[isClean] = false;
46715
- if (node3.proxyOf.nodes) {
46716
- for (let i2 of node3.proxyOf.nodes) {
46717
- markDirtyUp(i2);
46718
- }
46719
- }
46720
- }
46721
- var Container = class extends Node {
46722
- append(...children) {
46723
- for (let child of children) {
46724
- let nodes = this.normalize(child, this.last);
46725
- for (let node3 of nodes)
46726
- this.proxyOf.nodes.push(node3);
46727
- }
46728
- this.markDirty();
46729
- return this;
46730
- }
46731
- cleanRaws(keepBetween) {
46732
- super.cleanRaws(keepBetween);
46733
- if (this.nodes) {
46734
- for (let node3 of this.nodes)
46735
- node3.cleanRaws(keepBetween);
46736
- }
46737
- }
46738
- each(callback) {
46739
- if (!this.proxyOf.nodes)
46740
- return void 0;
46741
- let iterator = this.getIterator();
46742
- let index4, result;
46743
- while (this.indexes[iterator] < this.proxyOf.nodes.length) {
46744
- index4 = this.indexes[iterator];
46745
- result = callback(this.proxyOf.nodes[index4], index4);
46746
- if (result === false)
46747
- break;
46748
- this.indexes[iterator] += 1;
46749
- }
46750
- delete this.indexes[iterator];
46751
- return result;
46752
- }
46753
- every(condition) {
46754
- return this.nodes.every(condition);
46755
- }
46756
- getIterator() {
46757
- if (!this.lastEach)
46758
- this.lastEach = 0;
46759
- if (!this.indexes)
46760
- this.indexes = {};
46761
- this.lastEach += 1;
46762
- let iterator = this.lastEach;
46763
- this.indexes[iterator] = 0;
46764
- return iterator;
46765
- }
46766
- getProxyProcessor() {
46767
- return {
46768
- get(node3, prop) {
46769
- if (prop === "proxyOf") {
46770
- return node3;
46771
- } else if (!node3[prop]) {
46772
- return node3[prop];
46773
- } else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
46774
- return (...args) => {
46775
- return node3[prop](
46776
- ...args.map((i2) => {
46777
- if (typeof i2 === "function") {
46778
- return (child, index4) => i2(child.toProxy(), index4);
46779
- } else {
46780
- return i2;
46781
- }
46782
- })
46783
- );
46784
- };
46785
- } else if (prop === "every" || prop === "some") {
46786
- return (cb) => {
46787
- return node3[prop](
46788
- (child, ...other) => cb(child.toProxy(), ...other)
46789
- );
46790
- };
46791
- } else if (prop === "root") {
46792
- return () => node3.root().toProxy();
46793
- } else if (prop === "nodes") {
46794
- return node3.nodes.map((i2) => i2.toProxy());
46795
- } else if (prop === "first" || prop === "last") {
46796
- return node3[prop].toProxy();
46797
- } else {
46798
- return node3[prop];
46799
- }
46800
- },
46801
- set(node3, prop, value) {
46802
- if (node3[prop] === value)
46803
- return true;
46804
- node3[prop] = value;
46805
- if (prop === "name" || prop === "params" || prop === "selector") {
46806
- node3.markDirty();
46807
- }
46808
- return true;
46809
- }
46810
- };
46811
- }
46812
- index(child) {
46813
- if (typeof child === "number")
46814
- return child;
46815
- if (child.proxyOf)
46816
- child = child.proxyOf;
46817
- return this.proxyOf.nodes.indexOf(child);
46818
- }
46819
- insertAfter(exist, add2) {
46820
- let existIndex = this.index(exist);
46821
- let nodes = this.normalize(add2, this.proxyOf.nodes[existIndex]).reverse();
46822
- existIndex = this.index(exist);
46823
- for (let node3 of nodes)
46824
- this.proxyOf.nodes.splice(existIndex + 1, 0, node3);
46825
- let index4;
46826
- for (let id in this.indexes) {
46827
- index4 = this.indexes[id];
46828
- if (existIndex < index4) {
46829
- this.indexes[id] = index4 + nodes.length;
46830
- }
46831
- }
46832
- this.markDirty();
46833
- return this;
46834
- }
46835
- insertBefore(exist, add2) {
46836
- let existIndex = this.index(exist);
46837
- let type2 = existIndex === 0 ? "prepend" : false;
46838
- let nodes = this.normalize(add2, this.proxyOf.nodes[existIndex], type2).reverse();
46839
- existIndex = this.index(exist);
46840
- for (let node3 of nodes)
46841
- this.proxyOf.nodes.splice(existIndex, 0, node3);
46842
- let index4;
46843
- for (let id in this.indexes) {
46844
- index4 = this.indexes[id];
46845
- if (existIndex <= index4) {
46846
- this.indexes[id] = index4 + nodes.length;
46847
- }
46848
- }
46849
- this.markDirty();
46850
- return this;
46851
- }
46852
- normalize(nodes, sample2) {
46853
- if (typeof nodes === "string") {
46854
- nodes = cleanSource(parse16(nodes).nodes);
46855
- } else if (typeof nodes === "undefined") {
46856
- nodes = [];
46857
- } else if (Array.isArray(nodes)) {
46858
- nodes = nodes.slice(0);
46859
- for (let i2 of nodes) {
46860
- if (i2.parent)
46861
- i2.parent.removeChild(i2, "ignore");
46862
- }
46863
- } else if (nodes.type === "root" && this.type !== "document") {
46864
- nodes = nodes.nodes.slice(0);
46865
- for (let i2 of nodes) {
46866
- if (i2.parent)
46867
- i2.parent.removeChild(i2, "ignore");
46868
- }
46869
- } else if (nodes.type) {
46870
- nodes = [nodes];
46871
- } else if (nodes.prop) {
46872
- if (typeof nodes.value === "undefined") {
46873
- throw new Error("Value field is missed in node creation");
46874
- } else if (typeof nodes.value !== "string") {
46875
- nodes.value = String(nodes.value);
46876
- }
46877
- nodes = [new Declaration(nodes)];
46878
- } else if (nodes.selector) {
46879
- nodes = [new Rule(nodes)];
46880
- } else if (nodes.name) {
46881
- nodes = [new AtRule(nodes)];
46882
- } else if (nodes.text) {
46883
- nodes = [new Comment(nodes)];
46884
- } else {
46885
- throw new Error("Unknown node type in node creation");
46886
- }
46887
- let processed = nodes.map((i2) => {
46888
- if (!i2[my])
46889
- Container.rebuild(i2);
46890
- i2 = i2.proxyOf;
46891
- if (i2.parent)
46892
- i2.parent.removeChild(i2);
46893
- if (i2[isClean])
46894
- markDirtyUp(i2);
46895
- if (typeof i2.raws.before === "undefined") {
46896
- if (sample2 && typeof sample2.raws.before !== "undefined") {
46897
- i2.raws.before = sample2.raws.before.replace(/\S/g, "");
46898
- }
46899
- }
46900
- i2.parent = this.proxyOf;
46901
- return i2;
46902
- });
46903
- return processed;
46904
- }
46905
- prepend(...children) {
46906
- children = children.reverse();
46907
- for (let child of children) {
46908
- let nodes = this.normalize(child, this.first, "prepend").reverse();
46909
- for (let node3 of nodes)
46910
- this.proxyOf.nodes.unshift(node3);
46911
- for (let id in this.indexes) {
46912
- this.indexes[id] = this.indexes[id] + nodes.length;
46913
- }
46914
- }
46915
- this.markDirty();
46916
- return this;
46917
- }
46918
- push(child) {
46919
- child.parent = this;
46920
- this.proxyOf.nodes.push(child);
46921
- return this;
46922
- }
46923
- removeAll() {
46924
- for (let node3 of this.proxyOf.nodes)
46925
- node3.parent = void 0;
46926
- this.proxyOf.nodes = [];
46927
- this.markDirty();
46928
- return this;
46929
- }
46930
- removeChild(child) {
46931
- child = this.index(child);
46932
- this.proxyOf.nodes[child].parent = void 0;
46933
- this.proxyOf.nodes.splice(child, 1);
46934
- let index4;
46935
- for (let id in this.indexes) {
46936
- index4 = this.indexes[id];
46937
- if (index4 >= child) {
46938
- this.indexes[id] = index4 - 1;
46939
- }
46940
- }
46941
- this.markDirty();
46942
- return this;
46943
- }
46944
- replaceValues(pattern, opts, callback) {
46945
- if (!callback) {
46946
- callback = opts;
46947
- opts = {};
46948
- }
46949
- this.walkDecls((decl) => {
46950
- if (opts.props && !opts.props.includes(decl.prop))
46951
- return;
46952
- if (opts.fast && !decl.value.includes(opts.fast))
46953
- return;
46954
- decl.value = decl.value.replace(pattern, callback);
46955
- });
46956
- this.markDirty();
46957
- return this;
46958
- }
46959
- some(condition) {
46960
- return this.nodes.some(condition);
46961
- }
46962
- walk(callback) {
46963
- return this.each((child, i2) => {
46964
- let result;
46965
- try {
46966
- result = callback(child, i2);
46967
- } catch (e2) {
46968
- throw child.addToError(e2);
46969
- }
46970
- if (result !== false && child.walk) {
46971
- result = child.walk(callback);
46972
- }
46973
- return result;
46974
- });
46975
- }
46976
- walkAtRules(name3, callback) {
46977
- if (!callback) {
46978
- callback = name3;
46979
- return this.walk((child, i2) => {
46980
- if (child.type === "atrule") {
46981
- return callback(child, i2);
46982
- }
46983
- });
46984
- }
46985
- if (name3 instanceof RegExp) {
46986
- return this.walk((child, i2) => {
46987
- if (child.type === "atrule" && name3.test(child.name)) {
46988
- return callback(child, i2);
46989
- }
46990
- });
46991
- }
46992
- return this.walk((child, i2) => {
46993
- if (child.type === "atrule" && child.name === name3) {
46994
- return callback(child, i2);
46995
- }
46996
- });
46997
- }
46998
- walkComments(callback) {
46999
- return this.walk((child, i2) => {
47000
- if (child.type === "comment") {
47001
- return callback(child, i2);
47002
- }
47003
- });
47004
- }
47005
- walkDecls(prop, callback) {
47006
- if (!callback) {
47007
- callback = prop;
47008
- return this.walk((child, i2) => {
47009
- if (child.type === "decl") {
47010
- return callback(child, i2);
47011
- }
47012
- });
47013
- }
47014
- if (prop instanceof RegExp) {
47015
- return this.walk((child, i2) => {
47016
- if (child.type === "decl" && prop.test(child.prop)) {
47017
- return callback(child, i2);
47018
- }
47019
- });
47020
- }
47021
- return this.walk((child, i2) => {
47022
- if (child.type === "decl" && child.prop === prop) {
47023
- return callback(child, i2);
47024
- }
47025
- });
47026
- }
47027
- walkRules(selector, callback) {
47028
- if (!callback) {
47029
- callback = selector;
47030
- return this.walk((child, i2) => {
47031
- if (child.type === "rule") {
47032
- return callback(child, i2);
47033
- }
47034
- });
47035
- }
47036
- if (selector instanceof RegExp) {
47037
- return this.walk((child, i2) => {
47038
- if (child.type === "rule" && selector.test(child.selector)) {
47039
- return callback(child, i2);
47040
- }
47041
- });
47042
- }
47043
- return this.walk((child, i2) => {
47044
- if (child.type === "rule" && child.selector === selector) {
47045
- return callback(child, i2);
47046
- }
47047
- });
47048
- }
47049
- get first() {
47050
- if (!this.proxyOf.nodes)
47051
- return void 0;
47052
- return this.proxyOf.nodes[0];
47053
- }
47054
- get last() {
47055
- if (!this.proxyOf.nodes)
47056
- return void 0;
47057
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
47058
- }
47059
- };
47060
- Container.registerParse = (dependant) => {
47061
- parse16 = dependant;
47062
- };
47063
- Container.registerRule = (dependant) => {
47064
- Rule = dependant;
47065
- };
47066
- Container.registerAtRule = (dependant) => {
47067
- AtRule = dependant;
47068
- };
47069
- Container.registerRoot = (dependant) => {
47070
- Root = dependant;
47071
- };
47072
- module2.exports = Container;
47073
- Container.default = Container;
47074
- Container.rebuild = (node3) => {
47075
- if (node3.type === "atrule") {
47076
- Object.setPrototypeOf(node3, AtRule.prototype);
47077
- } else if (node3.type === "rule") {
47078
- Object.setPrototypeOf(node3, Rule.prototype);
47079
- } else if (node3.type === "decl") {
47080
- Object.setPrototypeOf(node3, Declaration.prototype);
47081
- } else if (node3.type === "comment") {
47082
- Object.setPrototypeOf(node3, Comment.prototype);
47083
- } else if (node3.type === "root") {
47084
- Object.setPrototypeOf(node3, Root.prototype);
47085
- }
47086
- node3[my] = true;
47087
- if (node3.nodes) {
47088
- node3.nodes.forEach((child) => {
47089
- Container.rebuild(child);
47090
- });
47091
- }
47092
- };
47093
- }
47094
- });
47095
-
47096
- // ../../node_modules/postcss/lib/document.js
47097
- var require_document = __commonJS({
47098
- "../../node_modules/postcss/lib/document.js"(exports2, module2) {
47099
- "use strict";
47100
- var Container = require_container();
47101
- var LazyResult;
47102
- var Processor2;
47103
- var Document2 = class extends Container {
47104
- constructor(defaults4) {
47105
- super({ type: "document", ...defaults4 });
47106
- if (!this.nodes) {
47107
- this.nodes = [];
47108
- }
47109
- }
47110
- toResult(opts = {}) {
47111
- let lazy = new LazyResult(new Processor2(), this, opts);
47112
- return lazy.stringify();
47113
- }
47114
- };
47115
- Document2.registerLazyResult = (dependant) => {
47116
- LazyResult = dependant;
47117
- };
47118
- Document2.registerProcessor = (dependant) => {
47119
- Processor2 = dependant;
47120
- };
47121
- module2.exports = Document2;
47122
- Document2.default = Document2;
47123
- }
47124
- });
47125
-
47126
- // ../../node_modules/postcss/lib/warn-once.js
47127
- var require_warn_once = __commonJS({
47128
- "../../node_modules/postcss/lib/warn-once.js"(exports2, module2) {
47129
- "use strict";
47130
- var printed = {};
47131
- module2.exports = function warnOnce(message) {
47132
- if (printed[message])
47133
- return;
47134
- printed[message] = true;
47135
- if (typeof console !== "undefined" && console.warn) {
47136
- console.warn(message);
47137
- }
47138
- };
47139
- }
47140
- });
47141
-
47142
- // ../../node_modules/postcss/lib/warning.js
47143
- var require_warning = __commonJS({
47144
- "../../node_modules/postcss/lib/warning.js"(exports2, module2) {
47145
- "use strict";
47146
- var Warning = class {
47147
- constructor(text7, opts = {}) {
47148
- this.type = "warning";
47149
- this.text = text7;
47150
- if (opts.node && opts.node.source) {
47151
- let range = opts.node.rangeBy(opts);
47152
- this.line = range.start.line;
47153
- this.column = range.start.column;
47154
- this.endLine = range.end.line;
47155
- this.endColumn = range.end.column;
47156
- }
47157
- for (let opt in opts)
47158
- this[opt] = opts[opt];
47159
- }
47160
- toString() {
47161
- if (this.node) {
47162
- return this.node.error(this.text, {
47163
- index: this.index,
47164
- plugin: this.plugin,
47165
- word: this.word
47166
- }).message;
47167
- }
47168
- if (this.plugin) {
47169
- return this.plugin + ": " + this.text;
47170
- }
47171
- return this.text;
47172
- }
47173
- };
47174
- module2.exports = Warning;
47175
- Warning.default = Warning;
47176
- }
47177
- });
47178
-
47179
- // ../../node_modules/postcss/lib/result.js
47180
- var require_result = __commonJS({
47181
- "../../node_modules/postcss/lib/result.js"(exports2, module2) {
47182
- "use strict";
47183
- var Warning = require_warning();
47184
- var Result = class {
47185
- constructor(processor2, root6, opts) {
47186
- this.processor = processor2;
47187
- this.messages = [];
47188
- this.root = root6;
47189
- this.opts = opts;
47190
- this.css = void 0;
47191
- this.map = void 0;
47192
- }
47193
- toString() {
47194
- return this.css;
47195
- }
47196
- warn(text7, opts = {}) {
47197
- if (!opts.plugin) {
47198
- if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
47199
- opts.plugin = this.lastPlugin.postcssPlugin;
47200
- }
47201
- }
47202
- let warning2 = new Warning(text7, opts);
47203
- this.messages.push(warning2);
47204
- return warning2;
47205
- }
47206
- warnings() {
47207
- return this.messages.filter((i2) => i2.type === "warning");
47208
- }
47209
- get content() {
47210
- return this.css;
47211
- }
47212
- };
47213
- module2.exports = Result;
47214
- Result.default = Result;
47215
- }
47216
- });
47217
-
47218
- // ../../node_modules/postcss/lib/at-rule.js
47219
- var require_at_rule = __commonJS({
47220
- "../../node_modules/postcss/lib/at-rule.js"(exports2, module2) {
47221
- "use strict";
47222
- var Container = require_container();
47223
- var AtRule = class extends Container {
47224
- constructor(defaults4) {
47225
- super(defaults4);
47226
- this.type = "atrule";
47227
- }
47228
- append(...children) {
47229
- if (!this.proxyOf.nodes)
47230
- this.nodes = [];
47231
- return super.append(...children);
47232
- }
47233
- prepend(...children) {
47234
- if (!this.proxyOf.nodes)
47235
- this.nodes = [];
47236
- return super.prepend(...children);
47237
- }
47238
- };
47239
- module2.exports = AtRule;
47240
- AtRule.default = AtRule;
47241
- Container.registerAtRule(AtRule);
47242
- }
47243
- });
47244
-
47245
- // ../../node_modules/postcss/lib/root.js
47246
- var require_root = __commonJS({
47247
- "../../node_modules/postcss/lib/root.js"(exports2, module2) {
47248
- "use strict";
47249
- var Container = require_container();
47250
- var LazyResult;
47251
- var Processor2;
47252
- var Root = class extends Container {
47253
- constructor(defaults4) {
47254
- super(defaults4);
47255
- this.type = "root";
47256
- if (!this.nodes)
47257
- this.nodes = [];
47258
- }
47259
- normalize(child, sample2, type2) {
47260
- let nodes = super.normalize(child);
47261
- if (sample2) {
47262
- if (type2 === "prepend") {
47263
- if (this.nodes.length > 1) {
47264
- sample2.raws.before = this.nodes[1].raws.before;
47265
- } else {
47266
- delete sample2.raws.before;
47267
- }
47268
- } else if (this.first !== sample2) {
47269
- for (let node3 of nodes) {
47270
- node3.raws.before = sample2.raws.before;
47271
- }
47272
- }
47273
- }
47274
- return nodes;
47275
- }
47276
- removeChild(child, ignore3) {
47277
- let index4 = this.index(child);
47278
- if (!ignore3 && index4 === 0 && this.nodes.length > 1) {
47279
- this.nodes[1].raws.before = this.nodes[index4].raws.before;
47280
- }
47281
- return super.removeChild(child);
47282
- }
47283
- toResult(opts = {}) {
47284
- let lazy = new LazyResult(new Processor2(), this, opts);
47285
- return lazy.stringify();
47286
- }
47287
- };
47288
- Root.registerLazyResult = (dependant) => {
47289
- LazyResult = dependant;
47290
- };
47291
- Root.registerProcessor = (dependant) => {
47292
- Processor2 = dependant;
47293
- };
47294
- module2.exports = Root;
47295
- Root.default = Root;
47296
- Container.registerRoot(Root);
47297
- }
47298
- });
47299
-
47300
- // ../../node_modules/postcss/lib/list.js
47301
- var require_list = __commonJS({
47302
- "../../node_modules/postcss/lib/list.js"(exports2, module2) {
47303
- "use strict";
47304
- var list6 = {
47305
- comma(string2) {
47306
- return list6.split(string2, [","], true);
47307
- },
47308
- space(string2) {
47309
- let spaces = [" ", "\n", " "];
47310
- return list6.split(string2, spaces);
47311
- },
47312
- split(string2, separators, last) {
47313
- let array = [];
47314
- let current2 = "";
47315
- let split2 = false;
47316
- let func = 0;
47317
- let inQuote = false;
47318
- let prevQuote = "";
47319
- let escape5 = false;
47320
- for (let letter of string2) {
47321
- if (escape5) {
47322
- escape5 = false;
47323
- } else if (letter === "\\") {
47324
- escape5 = true;
47325
- } else if (inQuote) {
47326
- if (letter === prevQuote) {
47327
- inQuote = false;
47328
- }
47329
- } else if (letter === '"' || letter === "'") {
47330
- inQuote = true;
47331
- prevQuote = letter;
47332
- } else if (letter === "(") {
47333
- func += 1;
47334
- } else if (letter === ")") {
47335
- if (func > 0)
47336
- func -= 1;
47337
- } else if (func === 0) {
47338
- if (separators.includes(letter))
47339
- split2 = true;
47340
- }
47341
- if (split2) {
47342
- if (current2 !== "")
47343
- array.push(current2.trim());
47344
- current2 = "";
47345
- split2 = false;
47346
- } else {
47347
- current2 += letter;
47348
- }
47349
- }
47350
- if (last || current2 !== "")
47351
- array.push(current2.trim());
47352
- return array;
47353
- }
47354
- };
47355
- module2.exports = list6;
47356
- list6.default = list6;
47357
- }
47358
- });
47359
-
47360
- // ../../node_modules/postcss/lib/rule.js
47361
- var require_rule = __commonJS({
47362
- "../../node_modules/postcss/lib/rule.js"(exports2, module2) {
47363
- "use strict";
47364
- var Container = require_container();
47365
- var list6 = require_list();
47366
- var Rule = class extends Container {
47367
- constructor(defaults4) {
47368
- super(defaults4);
47369
- this.type = "rule";
47370
- if (!this.nodes)
47371
- this.nodes = [];
47372
- }
47373
- get selectors() {
47374
- return list6.comma(this.selector);
47375
- }
47376
- set selectors(values) {
47377
- let match3 = this.selector ? this.selector.match(/,\s*/) : null;
47378
- let sep5 = match3 ? match3[0] : "," + this.raw("between", "beforeOpen");
47379
- this.selector = values.join(sep5);
47380
- }
47381
- };
47382
- module2.exports = Rule;
47383
- Rule.default = Rule;
47384
- Container.registerRule(Rule);
47385
- }
47386
- });
47387
-
47388
47406
  // ../../node_modules/postcss/lib/parser.js
47389
47407
  var require_parser3 = __commonJS({
47390
47408
  "../../node_modules/postcss/lib/parser.js"(exports2, module2) {
47391
47409
  "use strict";
47392
- var Declaration = require_declaration();
47393
- var tokenizer = require_tokenize();
47394
- var Comment = require_comment();
47395
47410
  var AtRule = require_at_rule();
47411
+ var Comment = require_comment();
47412
+ var Declaration = require_declaration();
47396
47413
  var Root = require_root();
47397
47414
  var Rule = require_rule();
47415
+ var tokenizer = require_tokenize();
47398
47416
  var SAFE_COMMENT_NEIGHBOR = {
47399
47417
  empty: true,
47400
47418
  space: true
@@ -47516,7 +47534,7 @@ var require_parser3 = __commonJS({
47516
47534
  }
47517
47535
  colon(tokens) {
47518
47536
  let brackets = 0;
47519
- let token, type2, prev;
47537
+ let prev, token, type2;
47520
47538
  for (let [i2, element5] of tokens.entries()) {
47521
47539
  token = element5;
47522
47540
  type2 = token[0];
@@ -47626,12 +47644,12 @@ var require_parser3 = __commonJS({
47626
47644
  let str2 = "";
47627
47645
  for (let j = i2; j > 0; j--) {
47628
47646
  let type2 = cache[j][0];
47629
- if (str2.trim().indexOf("!") === 0 && type2 !== "space") {
47647
+ if (str2.trim().startsWith("!") && type2 !== "space") {
47630
47648
  break;
47631
47649
  }
47632
47650
  str2 = cache.pop()[1] + str2;
47633
47651
  }
47634
- if (str2.trim().indexOf("!") === 0) {
47652
+ if (str2.trim().startsWith("!")) {
47635
47653
  node3.important = true;
47636
47654
  node3.raws.important = str2;
47637
47655
  tokens = cache;
@@ -47939,8 +47957,8 @@ var require_parse3 = __commonJS({
47939
47957
  "../../node_modules/postcss/lib/parse.js"(exports2, module2) {
47940
47958
  "use strict";
47941
47959
  var Container = require_container();
47942
- var Parser3 = require_parser3();
47943
47960
  var Input = require_input4();
47961
+ var Parser3 = require_parser3();
47944
47962
  function parse16(css, opts) {
47945
47963
  let input3 = new Input(css, opts);
47946
47964
  let parser3 = new Parser3(input3);
@@ -47968,19 +47986,111 @@ var require_parse3 = __commonJS({
47968
47986
  }
47969
47987
  });
47970
47988
 
47989
+ // ../../node_modules/postcss/lib/warning.js
47990
+ var require_warning = __commonJS({
47991
+ "../../node_modules/postcss/lib/warning.js"(exports2, module2) {
47992
+ "use strict";
47993
+ var Warning = class {
47994
+ constructor(text7, opts = {}) {
47995
+ this.type = "warning";
47996
+ this.text = text7;
47997
+ if (opts.node && opts.node.source) {
47998
+ let range = opts.node.rangeBy(opts);
47999
+ this.line = range.start.line;
48000
+ this.column = range.start.column;
48001
+ this.endLine = range.end.line;
48002
+ this.endColumn = range.end.column;
48003
+ }
48004
+ for (let opt in opts)
48005
+ this[opt] = opts[opt];
48006
+ }
48007
+ toString() {
48008
+ if (this.node) {
48009
+ return this.node.error(this.text, {
48010
+ index: this.index,
48011
+ plugin: this.plugin,
48012
+ word: this.word
48013
+ }).message;
48014
+ }
48015
+ if (this.plugin) {
48016
+ return this.plugin + ": " + this.text;
48017
+ }
48018
+ return this.text;
48019
+ }
48020
+ };
48021
+ module2.exports = Warning;
48022
+ Warning.default = Warning;
48023
+ }
48024
+ });
48025
+
48026
+ // ../../node_modules/postcss/lib/result.js
48027
+ var require_result = __commonJS({
48028
+ "../../node_modules/postcss/lib/result.js"(exports2, module2) {
48029
+ "use strict";
48030
+ var Warning = require_warning();
48031
+ var Result = class {
48032
+ constructor(processor2, root6, opts) {
48033
+ this.processor = processor2;
48034
+ this.messages = [];
48035
+ this.root = root6;
48036
+ this.opts = opts;
48037
+ this.css = void 0;
48038
+ this.map = void 0;
48039
+ }
48040
+ toString() {
48041
+ return this.css;
48042
+ }
48043
+ warn(text7, opts = {}) {
48044
+ if (!opts.plugin) {
48045
+ if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
48046
+ opts.plugin = this.lastPlugin.postcssPlugin;
48047
+ }
48048
+ }
48049
+ let warning2 = new Warning(text7, opts);
48050
+ this.messages.push(warning2);
48051
+ return warning2;
48052
+ }
48053
+ warnings() {
48054
+ return this.messages.filter((i2) => i2.type === "warning");
48055
+ }
48056
+ get content() {
48057
+ return this.css;
48058
+ }
48059
+ };
48060
+ module2.exports = Result;
48061
+ Result.default = Result;
48062
+ }
48063
+ });
48064
+
48065
+ // ../../node_modules/postcss/lib/warn-once.js
48066
+ var require_warn_once = __commonJS({
48067
+ "../../node_modules/postcss/lib/warn-once.js"(exports2, module2) {
48068
+ "use strict";
48069
+ var printed = {};
48070
+ module2.exports = function warnOnce(message) {
48071
+ if (printed[message])
48072
+ return;
48073
+ printed[message] = true;
48074
+ if (typeof console !== "undefined" && console.warn) {
48075
+ console.warn(message);
48076
+ }
48077
+ };
48078
+ }
48079
+ });
48080
+
47971
48081
  // ../../node_modules/postcss/lib/lazy-result.js
47972
48082
  var require_lazy_result = __commonJS({
47973
48083
  "../../node_modules/postcss/lib/lazy-result.js"(exports2, module2) {
47974
48084
  "use strict";
47975
- var { isClean, my } = require_symbols();
47976
- var MapGenerator = require_map_generator();
47977
- var stringify4 = require_stringify2();
47978
48085
  var Container = require_container();
47979
48086
  var Document2 = require_document();
47980
- var warnOnce = require_warn_once();
47981
- var Result = require_result();
48087
+ var MapGenerator = require_map_generator();
47982
48088
  var parse16 = require_parse3();
48089
+ var Result = require_result();
47983
48090
  var Root = require_root();
48091
+ var stringify4 = require_stringify2();
48092
+ var { isClean, my } = require_symbols();
48093
+ var warnOnce = require_warn_once();
47984
48094
  var TYPE_TO_CLASS_NAME = {
47985
48095
  atrule: "AtRule",
47986
48096
  comment: "Comment",
@@ -48467,10 +48577,10 @@ var require_no_work_result = __commonJS({
48467
48577
  "../../node_modules/postcss/lib/no-work-result.js"(exports2, module2) {
48468
48578
  "use strict";
48469
48579
  var MapGenerator = require_map_generator();
48470
- var stringify4 = require_stringify2();
48471
- var warnOnce = require_warn_once();
48472
48580
  var parse16 = require_parse3();
48473
48581
  var Result = require_result();
48582
+ var stringify4 = require_stringify2();
48583
+ var warnOnce = require_warn_once();
48474
48584
  var NoWorkResult = class {
48475
48585
  constructor(processor2, css, opts) {
48476
48586
  css = css.toString();
@@ -48584,13 +48694,13 @@ var require_no_work_result = __commonJS({
48584
48694
  var require_processor = __commonJS({
48585
48695
  "../../node_modules/postcss/lib/processor.js"(exports2, module2) {
48586
48696
  "use strict";
48587
- var NoWorkResult = require_no_work_result();
48588
- var LazyResult = require_lazy_result();
48589
48697
  var Document2 = require_document();
48698
+ var LazyResult = require_lazy_result();
48699
+ var NoWorkResult = require_no_work_result();
48590
48700
  var Root = require_root();
48591
48701
  var Processor2 = class {
48592
48702
  constructor(plugins3 = []) {
48593
- this.version = "8.4.38";
48703
+ this.version = "8.4.47";
48594
48704
  this.plugins = this.normalize(plugins3);
48595
48705
  }
48596
48706
  normalize(plugins3) {
@@ -48638,85 +48748,28 @@ var require_processor = __commonJS({
48638
48748
  }
48639
48749
  });
48640
48750
 
48641
- // ../../node_modules/postcss/lib/fromJSON.js
48642
- var require_fromJSON = __commonJS({
48643
- "../../node_modules/postcss/lib/fromJSON.js"(exports2, module2) {
48644
- "use strict";
48645
- var Declaration = require_declaration();
48646
- var PreviousMap = require_previous_map();
48647
- var Comment = require_comment();
48648
- var AtRule = require_at_rule();
48649
- var Input = require_input4();
48650
- var Root = require_root();
48651
- var Rule = require_rule();
48652
- function fromJSON(json2, inputs) {
48653
- if (Array.isArray(json2))
48654
- return json2.map((n) => fromJSON(n));
48655
- let { inputs: ownInputs, ...defaults4 } = json2;
48656
- if (ownInputs) {
48657
- inputs = [];
48658
- for (let input3 of ownInputs) {
48659
- let inputHydrated = { ...input3, __proto__: Input.prototype };
48660
- if (inputHydrated.map) {
48661
- inputHydrated.map = {
48662
- ...inputHydrated.map,
48663
- __proto__: PreviousMap.prototype
48664
- };
48665
- }
48666
- inputs.push(inputHydrated);
48667
- }
48668
- }
48669
- if (defaults4.nodes) {
48670
- defaults4.nodes = json2.nodes.map((n) => fromJSON(n, inputs));
48671
- }
48672
- if (defaults4.source) {
48673
- let { inputId, ...source2 } = defaults4.source;
48674
- defaults4.source = source2;
48675
- if (inputId != null) {
48676
- defaults4.source.input = inputs[inputId];
48677
- }
48678
- }
48679
- if (defaults4.type === "root") {
48680
- return new Root(defaults4);
48681
- } else if (defaults4.type === "decl") {
48682
- return new Declaration(defaults4);
48683
- } else if (defaults4.type === "rule") {
48684
- return new Rule(defaults4);
48685
- } else if (defaults4.type === "comment") {
48686
- return new Comment(defaults4);
48687
- } else if (defaults4.type === "atrule") {
48688
- return new AtRule(defaults4);
48689
- } else {
48690
- throw new Error("Unknown node type: " + json2.type);
48691
- }
48692
- }
48693
- module2.exports = fromJSON;
48694
- fromJSON.default = fromJSON;
48695
- }
48696
- });
48697
-
48698
48751
  // ../../node_modules/postcss/lib/postcss.js
48699
48752
  var require_postcss = __commonJS({
48700
48753
  "../../node_modules/postcss/lib/postcss.js"(exports2, module2) {
48701
48754
  "use strict";
48755
+ var AtRule = require_at_rule();
48756
+ var Comment = require_comment();
48757
+ var Container = require_container();
48702
48758
  var CssSyntaxError = require_css_syntax_error();
48703
48759
  var Declaration = require_declaration();
48704
- var LazyResult = require_lazy_result();
48705
- var Container = require_container();
48706
- var Processor2 = require_processor();
48707
- var stringify4 = require_stringify2();
48708
- var fromJSON = require_fromJSON();
48709
48760
  var Document2 = require_document();
48710
- var Warning = require_warning();
48711
- var Comment = require_comment();
48712
- var AtRule = require_at_rule();
48713
- var Result = require_result();
48761
+ var fromJSON = require_fromJSON();
48714
48762
  var Input = require_input4();
48715
- var parse16 = require_parse3();
48763
+ var LazyResult = require_lazy_result();
48716
48764
  var list6 = require_list();
48717
- var Rule = require_rule();
48718
- var Root = require_root();
48719
48765
  var Node = require_node2();
48766
+ var parse16 = require_parse3();
48767
+ var Processor2 = require_processor();
48768
+ var Result = require_result();
48769
+ var Root = require_root();
48770
+ var Rule = require_rule();
48771
+ var stringify4 = require_stringify2();
48772
+ var Warning = require_warning();
48720
48773
  function postcss(...plugins3) {
48721
48774
  if (plugins3.length === 1 && Array.isArray(plugins3[0])) {
48722
48775
  plugins3 = plugins3[0];
@@ -135536,9 +135589,9 @@ var require_mime2 = __commonJS({
135536
135589
  }
135537
135590
  });
135538
135591
 
135539
- // ../../node_modules/send/node_modules/ms/index.js
135592
+ // ../../node_modules/ms/index.js
135540
135593
  var require_ms5 = __commonJS({
135541
- "../../node_modules/send/node_modules/ms/index.js"(exports2, module2) {
135594
+ "../../node_modules/ms/index.js"(exports2, module2) {
135542
135595
  var s5 = 1e3;
135543
135596
  var m2 = s5 * 60;
135544
135597
  var h4 = m2 * 60;
@@ -180773,122 +180826,6 @@ var require_ansi_align = __commonJS({
180773
180826
  }
180774
180827
  });
180775
180828
 
180776
- // ../../node_modules/ms/index.js
180777
- var require_ms6 = __commonJS({
180778
- "../../node_modules/ms/index.js"(exports2, module2) {
180779
- var s5 = 1e3;
180780
- var m2 = s5 * 60;
180781
- var h4 = m2 * 60;
180782
- var d = h4 * 24;
180783
- var w = d * 7;
180784
- var y = d * 365.25;
180785
- module2.exports = function(val, options) {
180786
- options = options || {};
180787
- var type2 = typeof val;
180788
- if (type2 === "string" && val.length > 0) {
180789
- return parse16(val);
180790
- } else if (type2 === "number" && isFinite(val)) {
180791
- return options.long ? fmtLong(val) : fmtShort(val);
180792
- }
180793
- throw new Error(
180794
- "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
180795
- );
180796
- };
180797
- function parse16(str2) {
180798
- str2 = String(str2);
180799
- if (str2.length > 100) {
180800
- return;
180801
- }
180802
- var match3 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
180803
- str2
180804
- );
180805
- if (!match3) {
180806
- return;
180807
- }
180808
- var n = parseFloat(match3[1]);
180809
- var type2 = (match3[2] || "ms").toLowerCase();
180810
- switch (type2) {
180811
- case "years":
180812
- case "year":
180813
- case "yrs":
180814
- case "yr":
180815
- case "y":
180816
- return n * y;
180817
- case "weeks":
180818
- case "week":
180819
- case "w":
180820
- return n * w;
180821
- case "days":
180822
- case "day":
180823
- case "d":
180824
- return n * d;
180825
- case "hours":
180826
- case "hour":
180827
- case "hrs":
180828
- case "hr":
180829
- case "h":
180830
- return n * h4;
180831
- case "minutes":
180832
- case "minute":
180833
- case "mins":
180834
- case "min":
180835
- case "m":
180836
- return n * m2;
180837
- case "seconds":
180838
- case "second":
180839
- case "secs":
180840
- case "sec":
180841
- case "s":
180842
- return n * s5;
180843
- case "milliseconds":
180844
- case "millisecond":
180845
- case "msecs":
180846
- case "msec":
180847
- case "ms":
180848
- return n;
180849
- default:
180850
- return void 0;
180851
- }
180852
- }
180853
- function fmtShort(ms) {
180854
- var msAbs = Math.abs(ms);
180855
- if (msAbs >= d) {
180856
- return Math.round(ms / d) + "d";
180857
- }
180858
- if (msAbs >= h4) {
180859
- return Math.round(ms / h4) + "h";
180860
- }
180861
- if (msAbs >= m2) {
180862
- return Math.round(ms / m2) + "m";
180863
- }
180864
- if (msAbs >= s5) {
180865
- return Math.round(ms / s5) + "s";
180866
- }
180867
- return ms + "ms";
180868
- }
180869
- function fmtLong(ms) {
180870
- var msAbs = Math.abs(ms);
180871
- if (msAbs >= d) {
180872
- return plural2(ms, msAbs, d, "day");
180873
- }
180874
- if (msAbs >= h4) {
180875
- return plural2(ms, msAbs, h4, "hour");
180876
- }
180877
- if (msAbs >= m2) {
180878
- return plural2(ms, msAbs, m2, "minute");
180879
- }
180880
- if (msAbs >= s5) {
180881
- return plural2(ms, msAbs, s5, "second");
180882
- }
180883
- return ms + " ms";
180884
- }
180885
- function plural2(ms, msAbs, n, name3) {
180886
- var isPlural = msAbs >= n * 1.5;
180887
- return Math.round(ms / n) + " " + name3 + (isPlural ? "s" : "");
180888
- }
180889
- }
180890
- });
180891
-
180892
180829
  // ../../node_modules/debug/src/common.js
180893
180830
  var require_common = __commonJS({
180894
180831
  "../../node_modules/debug/src/common.js"(exports2, module2) {
@@ -180899,7 +180836,7 @@ var require_common = __commonJS({
180899
180836
  createDebug.disable = disable;
180900
180837
  createDebug.enable = enable;
180901
180838
  createDebug.enabled = enabled;
180902
- createDebug.humanize = require_ms6();
180839
+ createDebug.humanize = require_ms5();
180903
180840
  createDebug.destroy = destroy;
180904
180841
  Object.keys(env7).forEach((key2) => {
180905
180842
  createDebug[key2] = env7[key2];
@@ -181154,10 +181091,11 @@ var require_browser5 = __commonJS({
181154
181091
  if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
181155
181092
  return false;
181156
181093
  }
181094
+ let m2;
181157
181095
  return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
181158
181096
  typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
181159
181097
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
181160
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
181098
+ typeof navigator !== "undefined" && navigator.userAgent && (m2 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m2[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
181161
181099
  typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
181162
181100
  }
181163
181101
  function formatArgs(args) {
@@ -181472,7 +181410,7 @@ var require_node8 = __commonJS({
181472
181410
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
181473
181411
  }
181474
181412
  function log(...args) {
181475
- return process.stderr.write(util4.format(...args) + "\n");
181413
+ return process.stderr.write(util4.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
181476
181414
  }
181477
181415
  function save(namespaces) {
181478
181416
  if (namespaces) {
@@ -193562,7 +193500,7 @@ var {
193562
193500
  } = import_index.default;
193563
193501
 
193564
193502
  // src/version.ts
193565
- var version = "1.3.11";
193503
+ var version = "1.3.12";
193566
193504
  var version_default = version;
193567
193505
 
193568
193506
  // ../myst-cli/dist/build/build.js
@@ -194682,27 +194620,29 @@ function validateAffiliation(input3, opts) {
194682
194620
  }
194683
194621
 
194684
194622
  // ../myst-frontmatter/dist/biblio/validators.js
194685
- var BIBLIO_KEYS = ["volume", "issue", "doi", "first_page", "last_page"];
194686
- function validateBiblio(input3, opts) {
194687
- const value = validateObjectKeys(input3, { optional: BIBLIO_KEYS }, opts);
194623
+ var PUBLICATION_META_KEYS = ["number", "doi", "title", "subject"];
194624
+ function validatePublicationMeta(input3, opts) {
194625
+ if (typeof input3 !== "object") {
194626
+ input3 = { number: input3 };
194627
+ }
194628
+ const value = validateObjectKeys(input3, { optional: PUBLICATION_META_KEYS, alias: { name: "number" } }, opts);
194688
194629
  if (value === void 0)
194689
194630
  return void 0;
194690
194631
  const output2 = {};
194691
- if (defined(value.volume)) {
194692
- output2.volume = validateStringOrNumber(value.volume, incrementOptions("volume", opts));
194693
- }
194694
- if (defined(value.issue)) {
194695
- output2.issue = validateStringOrNumber(value.issue, incrementOptions("issue", opts));
194632
+ if (defined(value.number)) {
194633
+ output2.number = validateStringOrNumber(value.number, incrementOptions("number", opts));
194696
194634
  }
194697
194635
  if (defined(value.doi)) {
194698
194636
  output2.doi = validateDoi(value.doi, incrementOptions("doi", opts));
194699
194637
  }
194700
- if (defined(value.first_page)) {
194701
- output2.first_page = validateStringOrNumber(value.first_page, incrementOptions("first_page", opts));
194638
+ if (defined(value.title)) {
194639
+ output2.title = validateString(value.title, incrementOptions("title", opts));
194702
194640
  }
194703
- if (defined(value.last_page)) {
194704
- output2.last_page = validateStringOrNumber(value.last_page, incrementOptions("last_page", opts));
194641
+ if (defined(value.subject)) {
194642
+ output2.subject = validateString(value.subject, incrementOptions("subject", opts));
194705
194643
  }
194644
+ if (Object.keys(output2).length === 0)
194645
+ return void 0;
194706
194646
  return output2;
194707
194647
  }
194708
194648
 
@@ -195228,7 +195168,10 @@ var PROJECT_AND_PAGE_FRONTMATTER_KEYS = [
195228
195168
  "binder",
195229
195169
  "source",
195230
195170
  "subject",
195231
- "biblio",
195171
+ "volume",
195172
+ "issue",
195173
+ "first_page",
195174
+ "last_page",
195232
195175
  "oxa",
195233
195176
  "numbering",
195234
195177
  "bibliography",
@@ -198075,10 +198018,10 @@ function correctLicense(license) {
198075
198018
  return "CC-BY-4.0";
198076
198019
  return void 0;
198077
198020
  }
198078
- function createURL(license) {
198021
+ function createURL(id, cc, osi) {
198079
198022
  var _a6, _b;
198080
- if (license.CC) {
198081
- const match3 = /^([CBYSAND0-]+)(?:(?:-)([0-9].[0-9]))?(?:(?:-)([A-Z]{2}))?$/.exec(license.id);
198023
+ if (cc) {
198024
+ const match3 = /^([CBYSAND0ZEROPD-]+)(?:(?:-)([0-9].[0-9]))?(?:(?:-)([A-Z]{2,3}))?$/.exec(id);
198082
198025
  if (!match3) {
198083
198026
  throw new Error("Creative Commons license not found");
198084
198027
  }
@@ -198120,47 +198063,131 @@ function createURL(license) {
198120
198063
  link4 += `${extra}/`;
198121
198064
  return `https://creativecommons.org/licenses${link4}`;
198122
198065
  }
198123
- if (license.osi) {
198124
- return `https://opensource.org/licenses/${license.id}`;
198066
+ if (osi) {
198067
+ return `https://opensource.org/licenses/${id.replace(/(-or-later)|(-only)$/, "")}`;
198068
+ }
198069
+ return `https://spdx.org/licenses/${id}`;
198070
+ }
198071
+ function cleanUrl(url) {
198072
+ return url.replace(/^http:/, "https:").replace(/\/$/, "");
198073
+ }
198074
+ function isUrl(url) {
198075
+ try {
198076
+ const parsed = new URL(url);
198077
+ return parsed.protocol.includes("http");
198078
+ } catch (error) {
198079
+ return false;
198125
198080
  }
198126
- return `https://spdx.org/licenses/${license.id}`;
198127
198081
  }
198082
+ var ID_LICENSE_LOOKUP = Object.fromEntries(Object.entries(licenses_default).map(([key2, value]) => {
198083
+ return [key2, { id: key2, ...value, url: createURL(key2, value.CC, value.osi) }];
198084
+ }));
198085
+ var URL_ID_LOOKUP = Object.fromEntries(Object.values(ID_LICENSE_LOOKUP).filter((value) => !!value.url && !!value.id).map((value) => {
198086
+ return [cleanUrl(value.url), value.id];
198087
+ }));
198128
198088
  function validateLicense(input3, opts) {
198129
- if (typeof input3 === "object") {
198130
- const revalidated = validateLicense(input3.id, {
198131
- ...opts,
198132
- suppressErrors: true,
198133
- suppressWarnings: true
198134
- });
198135
- let equal = Boolean(revalidated);
198136
- if (revalidated) {
198137
- Object.entries(revalidated).forEach(([key2, val]) => {
198138
- if (val !== input3[key2])
198139
- equal = false;
198140
- });
198141
- }
198142
- if (!equal) {
198143
- return validationError(`invalid license object - use a valid license ID string instead, see https://spdx.org/licenses/`, opts);
198089
+ if (typeof input3 === "string") {
198090
+ const value2 = validateString(input3, opts);
198091
+ if (value2 === void 0)
198092
+ return void 0;
198093
+ const valueSpdx = correctLicense(value2);
198094
+ if (URL_ID_LOOKUP[cleanUrl(value2)]) {
198095
+ input3 = { id: URL_ID_LOOKUP[cleanUrl(value2)] };
198096
+ } else if (isUrl(value2)) {
198097
+ input3 = { url: value2 };
198098
+ } else if (valueSpdx) {
198099
+ input3 = { id: value2 };
198100
+ } else if (value2.match(/^[^\s]*$/)) {
198101
+ input3 = { id: value2 };
198102
+ } else if (value2.length < 100) {
198103
+ input3 = { name: value2 };
198104
+ } else {
198105
+ input3 = { note: value2 };
198144
198106
  }
198145
- return revalidated;
198146
198107
  }
198147
- const valueUnvalidated = validateString(input3, opts);
198148
- if (valueUnvalidated === void 0)
198108
+ const value = validateObjectKeys(input3, {
198109
+ optional: ["id", "name", "url", "note", "free", "CC", "osi"],
198110
+ alias: { cc: "CC" }
198111
+ }, opts);
198112
+ if (!value)
198149
198113
  return void 0;
198150
- const value = correctLicense(valueUnvalidated);
198151
- if (!value) {
198152
- return validationError(`invalid value "${valueUnvalidated}" - must be a valid license ID, see https://spdx.org/licenses/`, opts);
198114
+ const output2 = {};
198115
+ if (value.id != null) {
198116
+ const id = validateString(value.id, incrementOptions("id", opts));
198117
+ const idSpdx = correctLicense(id);
198118
+ if (!idSpdx) {
198119
+ validationWarning(`unknown license ID "${id}" - using a SPDX license ID is recommended, see https://spdx.org/licenses/`, opts);
198120
+ } else if (idSpdx !== id) {
198121
+ validationWarning(`The SPDX ID for the license is "${idSpdx}". Corrected from "${id}".`, opts);
198122
+ }
198123
+ output2.id = idSpdx !== null && idSpdx !== void 0 ? idSpdx : id;
198124
+ } else {
198125
+ validationWarning(`no license ID - using a SPDX license ID is recommended, see https://spdx.org/licenses/`, opts);
198126
+ }
198127
+ const expected = output2.id ? ID_LICENSE_LOOKUP[output2.id] : void 0;
198128
+ if (value.url != null) {
198129
+ const urlOpts = incrementOptions("url", opts);
198130
+ const url = validateUrl(value.url, urlOpts);
198131
+ if (url && (expected === null || expected === void 0 ? void 0 : expected.url) && cleanUrl(url) !== cleanUrl(expected.url)) {
198132
+ validationWarning(`incorrect URL for SPDX license ${expected.id} - "${url}"`, urlOpts);
198133
+ }
198134
+ output2.url = url;
198135
+ } else if (expected === null || expected === void 0 ? void 0 : expected.url) {
198136
+ output2.url = expected.url;
198137
+ }
198138
+ if (value.name != null) {
198139
+ const nameOpts = incrementOptions("name", opts);
198140
+ const name3 = validateString(value.name, nameOpts);
198141
+ if (name3 && (expected === null || expected === void 0 ? void 0 : expected.name) && name3 !== expected.name) {
198142
+ validationWarning(`incorrect name for SPDX license ${expected.id} - "${name3}"`, nameOpts);
198143
+ }
198144
+ output2.name = name3;
198145
+ } else if (expected === null || expected === void 0 ? void 0 : expected.name) {
198146
+ output2.name = expected.name;
198147
+ }
198148
+ if (value.note != null) {
198149
+ output2.note = validateString(value.note, incrementOptions("note", opts));
198150
+ }
198151
+ if (value.free != null) {
198152
+ const freeOpts = incrementOptions("free", opts);
198153
+ const free = validateBoolean(value.free, freeOpts);
198154
+ if (free && !(expected === null || expected === void 0 ? void 0 : expected.free)) {
198155
+ validationWarning('only SPDX licenses may specify they are "free" as listed by the FSF', freeOpts);
198156
+ } else {
198157
+ output2.free = free;
198158
+ }
198159
+ } else if ((expected === null || expected === void 0 ? void 0 : expected.free) != null) {
198160
+ output2.free = expected.free;
198153
198161
  }
198154
- if (value !== valueUnvalidated) {
198155
- validationWarning(`The SPDX ID for the license is "${value}". Corrected from "${valueUnvalidated}".`, opts);
198162
+ if (value.CC != null) {
198163
+ const ccOpts = incrementOptions("CC", opts);
198164
+ const cc = validateBoolean(value.CC, ccOpts);
198165
+ if (cc && !((expected === null || expected === void 0 ? void 0 : expected.CC) || output2.url && new URL(output2.url).host === "creativecommons.org")) {
198166
+ validationWarning('only licenses that link to creativecommons.org may specify that they are "CC"', ccOpts);
198167
+ } else {
198168
+ output2.CC = cc;
198169
+ }
198170
+ } else if ((expected === null || expected === void 0 ? void 0 : expected.CC) != null) {
198171
+ output2.CC = expected.CC;
198156
198172
  }
198157
- const spdx = { id: value, ...licenses_default[value] };
198158
- const url = createURL(spdx);
198159
- return { ...spdx, url };
198173
+ if (value.osi != null) {
198174
+ const osiOpts = incrementOptions("osi", opts);
198175
+ const osi = validateBoolean(value.osi, osiOpts);
198176
+ if (osi && !(expected === null || expected === void 0 ? void 0 : expected.osi)) {
198177
+ validationWarning('only SPDX licenses may specify they are "OSI approved"', osiOpts);
198178
+ } else {
198179
+ output2.osi = osi;
198180
+ }
198181
+ } else if ((expected === null || expected === void 0 ? void 0 : expected.osi) != null) {
198182
+ output2.osi = expected.osi;
198183
+ }
198184
+ if (Object.keys(output2).length === 0)
198185
+ return void 0;
198186
+ return output2;
198160
198187
  }
198161
198188
  function validateLicenses(input3, opts) {
198162
198189
  let contentOpts;
198163
- if (typeof input3 === "string") {
198190
+ if (typeof input3 === "string" || typeof input3 === "object" && input3.content == null && input3.code == null) {
198164
198191
  input3 = { content: input3 };
198165
198192
  contentOpts = opts;
198166
198193
  } else {
@@ -198171,25 +198198,63 @@ function validateLicenses(input3, opts) {
198171
198198
  return void 0;
198172
198199
  const output2 = {};
198173
198200
  if (defined(value.content)) {
198174
- output2.content = validateLicense(value.content, contentOpts);
198201
+ const content3 = validateLicense(value.content, contentOpts);
198202
+ if (content3)
198203
+ output2.content = content3;
198175
198204
  }
198176
198205
  if (defined(value.code) && value.code !== value.content) {
198177
- output2.code = validateLicense(value.code, incrementOptions("code", opts));
198206
+ const code7 = validateLicense(value.code, incrementOptions("code", opts));
198207
+ if (code7)
198208
+ output2.code = code7;
198178
198209
  }
198210
+ if (Object.keys(output2).length === 0)
198211
+ return void 0;
198212
+ return output2;
198213
+ }
198214
+ function removeExpectedKeys(license, expected) {
198215
+ const output2 = {};
198216
+ Object.entries(license).forEach(([key2, val]) => {
198217
+ const licenseKey = key2;
198218
+ if (licenseKey === "id" || val !== expected[licenseKey]) {
198219
+ output2[licenseKey] = val;
198220
+ }
198221
+ });
198222
+ if (Object.keys(output2).length === 1 && output2.id)
198223
+ return output2.id;
198179
198224
  return output2;
198180
198225
  }
198181
- function licensesToString(licenses2) {
198182
- const stringLicenses = {};
198183
- if (licenses2.content) {
198184
- if (!licenses2.code || licenses2.content.id === licenses2.code.id) {
198185
- return licenses2.content.id;
198226
+ function objectsEqual(a2, b) {
198227
+ if (a2 == null || b == null)
198228
+ return false;
198229
+ const aAsString = typeof a2 === "string" ? a2 : JSON.stringify(Object.entries(a2).sort());
198230
+ const bAsString = typeof b === "string" ? b : JSON.stringify(Object.entries(b).sort());
198231
+ return aAsString === bAsString;
198232
+ }
198233
+ function simplifyLicenses(licenses2) {
198234
+ var _a6, _b;
198235
+ const { content: content3, code: code7 } = licenses2;
198236
+ const simplified = {};
198237
+ if (content3) {
198238
+ if (content3.id) {
198239
+ simplified.content = removeExpectedKeys(content3, (_a6 = ID_LICENSE_LOOKUP[content3.id]) !== null && _a6 !== void 0 ? _a6 : {});
198240
+ } else {
198241
+ simplified.content = { ...content3 };
198242
+ }
198243
+ }
198244
+ if (code7) {
198245
+ if (code7.id) {
198246
+ simplified.code = removeExpectedKeys(code7, (_b = ID_LICENSE_LOOKUP[code7.id]) !== null && _b !== void 0 ? _b : {});
198247
+ } else {
198248
+ simplified.code = { ...code7 };
198186
198249
  }
198187
- stringLicenses.content = licenses2.content.id;
198188
198250
  }
198189
- if (licenses2.code) {
198190
- stringLicenses.code = licenses2.code.id;
198251
+ if (objectsEqual(simplified.content, simplified.code)) {
198252
+ delete simplified.code;
198191
198253
  }
198192
- return stringLicenses;
198254
+ if (!simplified.code && typeof simplified.content === "string") {
198255
+ return simplified.content;
198256
+ }
198257
+ return simplified;
198193
198258
  }
198194
198259
 
198195
198260
  // ../myst-frontmatter/dist/numbering/validators.js
@@ -198397,7 +198462,20 @@ function validateVenue(input3, opts) {
198397
198462
  } else {
198398
198463
  titleOpts = incrementOptions("title", opts);
198399
198464
  }
198400
- const value = validateObjectKeys(input3, { optional: ["title", "short_title", "url", "doi"] }, opts);
198465
+ const value = validateObjectKeys(input3, {
198466
+ optional: [
198467
+ "title",
198468
+ "short_title",
198469
+ "url",
198470
+ "doi",
198471
+ "number",
198472
+ "location",
198473
+ "date",
198474
+ "series",
198475
+ "issn",
198476
+ "publisher"
198477
+ ]
198478
+ }, opts);
198401
198479
  if (value === void 0)
198402
198480
  return void 0;
198403
198481
  const output2 = {};
@@ -198413,6 +198491,24 @@ function validateVenue(input3, opts) {
198413
198491
  if (defined(value.doi)) {
198414
198492
  output2.doi = validateDoi(value.doi, incrementOptions("doi", opts));
198415
198493
  }
198494
+ if (defined(value.number)) {
198495
+ output2.number = validateStringOrNumber(value.number, incrementOptions("number", opts));
198496
+ }
198497
+ if (defined(value.location)) {
198498
+ output2.location = validateString(value.location, incrementOptions("location", opts));
198499
+ }
198500
+ if (defined(value.date)) {
198501
+ output2.date = validateString(value.date, incrementOptions("date", opts));
198502
+ }
198503
+ if (defined(value.series)) {
198504
+ output2.series = validateString(value.series, incrementOptions("series", opts));
198505
+ }
198506
+ if (defined(value.issn)) {
198507
+ output2.issn = validateString(value.issn, incrementOptions("issn", opts));
198508
+ }
198509
+ if (defined(value.publisher)) {
198510
+ output2.publisher = validateString(value.publisher, incrementOptions("publisher", opts));
198511
+ }
198416
198512
  return output2;
198417
198513
  }
198418
198514
 
@@ -198807,8 +198903,17 @@ function validateProjectAndPageFrontmatterKeys(value, opts) {
198807
198903
  return validateString(req, incrementOptions(`bibliography.${index4}`, opts));
198808
198904
  });
198809
198905
  }
198810
- if (defined(value.biblio)) {
198811
- output2.biblio = validateBiblio(value.biblio, incrementOptions("biblio", opts));
198906
+ if (defined(value.volume)) {
198907
+ output2.volume = validatePublicationMeta(value.volume, incrementOptions("volume", opts));
198908
+ }
198909
+ if (defined(value.issue)) {
198910
+ output2.issue = validatePublicationMeta(value.issue, incrementOptions("issue", opts));
198911
+ }
198912
+ if (defined(value.first_page)) {
198913
+ output2.first_page = validateStringOrNumber(value.first_page, incrementOptions("first_page", opts));
198914
+ }
198915
+ if (defined(value.last_page)) {
198916
+ output2.last_page = validateStringOrNumber(value.last_page, incrementOptions("last_page", opts));
198812
198917
  }
198813
198918
  if (defined(value.oxa)) {
198814
198919
  output2.oxa = validateString(value.oxa, incrementOptions("oxa", opts));
@@ -198952,7 +199057,10 @@ var USE_PROJECT_FALLBACK = [
198952
199057
  "source",
198953
199058
  "subject",
198954
199059
  "venue",
198955
- "biblio",
199060
+ "volume",
199061
+ "issue",
199062
+ "first_page",
199063
+ "last_page",
198956
199064
  "numbering",
198957
199065
  "keywords",
198958
199066
  "funding",
@@ -199114,7 +199222,7 @@ function fillSiteFrontmatter(base5, filler, opts, keys2, trimUnused) {
199114
199222
  return frontmatter;
199115
199223
  }
199116
199224
  function fillProjectFrontmatter(base5, filler, opts, keys2, trimUnused) {
199117
- var _a6, _b, _c, _d2, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x2, _y, _z, _0, _1;
199225
+ var _a6, _b, _c, _d2, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x2, _y, _z;
199118
199226
  const frontmatter = fillSiteFrontmatter(base5, filler, opts, keys2 !== null && keys2 !== void 0 ? keys2 : Object.keys(filler), trimUnused);
199119
199227
  if (filler.numbering || base5.numbering) {
199120
199228
  frontmatter.numbering = fillNumbering(base5.numbering, filler.numbering);
@@ -199134,44 +199242,38 @@ function fillProjectFrontmatter(base5, filler, opts, keys2, trimUnused) {
199134
199242
  ...(_f = base5.settings) !== null && _f !== void 0 ? _f : {}
199135
199243
  };
199136
199244
  }
199137
- if (filler.biblio || base5.biblio) {
199138
- frontmatter.biblio = {
199139
- ...(_g = filler.biblio) !== null && _g !== void 0 ? _g : {},
199140
- ...(_h = base5.biblio) !== null && _h !== void 0 ? _h : {}
199141
- };
199142
- }
199143
199245
  if (!trimUnused) {
199144
199246
  if (filler.bibliography || base5.bibliography) {
199145
199247
  frontmatter.bibliography = [
199146
- .../* @__PURE__ */ new Set([...(_j = filler.bibliography) !== null && _j !== void 0 ? _j : [], ...(_k = base5.bibliography) !== null && _k !== void 0 ? _k : []])
199248
+ .../* @__PURE__ */ new Set([...(_g = filler.bibliography) !== null && _g !== void 0 ? _g : [], ...(_h = base5.bibliography) !== null && _h !== void 0 ? _h : []])
199147
199249
  ];
199148
199250
  }
199149
199251
  if (filler.requirements || base5.requirements) {
199150
199252
  frontmatter.requirements = [
199151
- .../* @__PURE__ */ new Set([...(_l = filler.requirements) !== null && _l !== void 0 ? _l : [], ...(_m = base5.requirements) !== null && _m !== void 0 ? _m : []])
199253
+ .../* @__PURE__ */ new Set([...(_j = filler.requirements) !== null && _j !== void 0 ? _j : [], ...(_k = base5.requirements) !== null && _k !== void 0 ? _k : []])
199152
199254
  ];
199153
199255
  }
199154
199256
  if (filler.resources || base5.resources) {
199155
199257
  frontmatter.resources = [
199156
- .../* @__PURE__ */ new Set([...(_o = filler.resources) !== null && _o !== void 0 ? _o : [], ...(_p = base5.resources) !== null && _p !== void 0 ? _p : []])
199258
+ .../* @__PURE__ */ new Set([...(_l = filler.resources) !== null && _l !== void 0 ? _l : [], ...(_m = base5.resources) !== null && _m !== void 0 ? _m : []])
199157
199259
  ];
199158
199260
  }
199159
199261
  if (filler.exports || base5.exports) {
199160
199262
  frontmatter.exports = [];
199161
- const ids = (_r = (_q = base5.exports) === null || _q === void 0 ? void 0 : _q.map(({ id }) => id)) !== null && _r !== void 0 ? _r : [];
199162
- (_s = filler.exports) === null || _s === void 0 ? void 0 : _s.forEach((exp) => {
199263
+ const ids = (_p = (_o = base5.exports) === null || _o === void 0 ? void 0 : _o.map(({ id }) => id)) !== null && _p !== void 0 ? _p : [];
199264
+ (_q = filler.exports) === null || _q === void 0 ? void 0 : _q.forEach((exp) => {
199163
199265
  var _a7;
199164
199266
  if (!exp.id || !ids.includes(exp.id)) {
199165
199267
  (_a7 = frontmatter.exports) === null || _a7 === void 0 ? void 0 : _a7.push(exp);
199166
199268
  }
199167
199269
  });
199168
- (_t = frontmatter.exports) === null || _t === void 0 ? void 0 : _t.push(...(_u = base5.exports) !== null && _u !== void 0 ? _u : []);
199270
+ (_r = frontmatter.exports) === null || _r === void 0 ? void 0 : _r.push(...(_s = base5.exports) !== null && _s !== void 0 ? _s : []);
199169
199271
  }
199170
199272
  if (filler.downloads || base5.downloads) {
199171
199273
  frontmatter.downloads = [];
199172
- const ids = (_w = (_v = base5.downloads) === null || _v === void 0 ? void 0 : _v.map(({ id }) => id).filter(Boolean)) !== null && _w !== void 0 ? _w : [];
199173
- const urls = (_y = (_x2 = base5.downloads) === null || _x2 === void 0 ? void 0 : _x2.map(({ url }) => url).filter(Boolean)) !== null && _y !== void 0 ? _y : [];
199174
- (_z = filler.downloads) === null || _z === void 0 ? void 0 : _z.forEach((download) => {
199274
+ const ids = (_u = (_t = base5.downloads) === null || _t === void 0 ? void 0 : _t.map(({ id }) => id).filter(Boolean)) !== null && _u !== void 0 ? _u : [];
199275
+ const urls = (_w = (_v = base5.downloads) === null || _v === void 0 ? void 0 : _v.map(({ url }) => url).filter(Boolean)) !== null && _w !== void 0 ? _w : [];
199276
+ (_x2 = filler.downloads) === null || _x2 === void 0 ? void 0 : _x2.forEach((download) => {
199175
199277
  var _a7, _b2;
199176
199278
  if (download.id && !ids.includes(download.id)) {
199177
199279
  (_a7 = frontmatter.downloads) === null || _a7 === void 0 ? void 0 : _a7.push(download);
@@ -199180,7 +199282,7 @@ function fillProjectFrontmatter(base5, filler, opts, keys2, trimUnused) {
199180
199282
  (_b2 = frontmatter.downloads) === null || _b2 === void 0 ? void 0 : _b2.push(download);
199181
199283
  }
199182
199284
  });
199183
- (_0 = frontmatter.downloads) === null || _0 === void 0 ? void 0 : _0.push(...(_1 = base5.downloads) !== null && _1 !== void 0 ? _1 : []);
199285
+ (_y = frontmatter.downloads) === null || _y === void 0 ? void 0 : _y.push(...(_z = base5.downloads) !== null && _z !== void 0 ? _z : []);
199184
199286
  }
199185
199287
  }
199186
199288
  return frontmatter;
@@ -202508,7 +202610,7 @@ function tic() {
202508
202610
  }
202509
202611
 
202510
202612
  // ../myst-cli-utils/dist/isUrl.js
202511
- function isUrl(url) {
202613
+ function isUrl2(url) {
202512
202614
  if (!url)
202513
202615
  return false;
202514
202616
  try {
@@ -204404,7 +204506,7 @@ var import_process = __toESM(require("process"), 1);
204404
204506
  var import_url = require("url");
204405
204507
 
204406
204508
  // ../../node_modules/vfile/lib/minurl.shared.js
204407
- function isUrl2(fileUrlOrPath) {
204509
+ function isUrl3(fileUrlOrPath) {
204408
204510
  return fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && // @ts-expect-error: indexable.
204409
204511
  fileUrlOrPath.href && // @ts-expect-error: indexable.
204410
204512
  fileUrlOrPath.origin;
@@ -204441,7 +204543,7 @@ var VFile = class {
204441
204543
  options = {};
204442
204544
  } else if (typeof value === "string" || buffer(value)) {
204443
204545
  options = { value };
204444
- } else if (isUrl2(value)) {
204546
+ } else if (isUrl3(value)) {
204445
204547
  options = { path: value };
204446
204548
  } else {
204447
204549
  options = value;
@@ -204486,7 +204588,7 @@ var VFile = class {
204486
204588
  * @param {string | URL} path
204487
204589
  */
204488
204590
  set path(path41) {
204489
- if (isUrl2(path41)) {
204591
+ if (isUrl3(path41)) {
204490
204592
  path41 = (0, import_url.fileURLToPath)(path41);
204491
204593
  }
204492
204594
  assertNonEmpty(path41, "path");
@@ -220584,7 +220686,7 @@ var import_node_process3 = __toESM(require("process"), 1);
220584
220686
  var import_node_url = require("url");
220585
220687
 
220586
220688
  // ../../node_modules/hast-util-from-html/node_modules/vfile/lib/minurl.shared.js
220587
- function isUrl3(fileUrlOrPath) {
220689
+ function isUrl4(fileUrlOrPath) {
220588
220690
  return Boolean(
220589
220691
  fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && // @ts-expect-error: indexing is fine.
220590
220692
  fileUrlOrPath.auth === void 0
@@ -220630,7 +220732,7 @@ var VFile2 = class {
220630
220732
  let options;
220631
220733
  if (!value) {
220632
220734
  options = {};
220633
- } else if (isUrl3(value)) {
220735
+ } else if (isUrl4(value)) {
220634
220736
  options = { path: value };
220635
220737
  } else if (typeof value === "string" || isUint8Array(value)) {
220636
220738
  options = { value };
@@ -220764,7 +220866,7 @@ var VFile2 = class {
220764
220866
  * Nothing.
220765
220867
  */
220766
220868
  set path(path41) {
220767
- if (isUrl3(path41)) {
220869
+ if (isUrl4(path41)) {
220768
220870
  path41 = (0, import_node_url.fileURLToPath)(path41);
220769
220871
  }
220770
220872
  assertNonEmpty2(path41, "path");
@@ -238273,7 +238375,7 @@ function shouldEnumerate(node3, kind, numbering) {
238273
238375
  return (_d2 = (_c = numbering[`heading_${node3.depth}`]) === null || _c === void 0 ? void 0 : _c.enabled) !== null && _d2 !== void 0 ? _d2 : enabledDefault;
238274
238376
  }
238275
238377
  if (node3.subcontainer)
238276
- return (_f = !!((_e = numbering.subfigure) === null || _e === void 0 ? void 0 : _e.enabled)) !== null && _f !== void 0 ? _f : enabledDefault;
238378
+ return (_f = (_e = numbering.subfigure) === null || _e === void 0 ? void 0 : _e.enabled) !== null && _f !== void 0 ? _f : enabledDefault;
238277
238379
  return (_h = (_g = numbering[kind]) === null || _g === void 0 ? void 0 : _g.enabled) !== null && _h !== void 0 ? _h : enabledDefault;
238278
238380
  }
238279
238381
  function incrementHeadingCounts2(depth, counts) {
@@ -241412,7 +241514,7 @@ function processPageFrontmatter(session, pageFrontmatter, validationOpts, path41
241412
241514
  function prepareToWrite(frontmatter) {
241413
241515
  if (!frontmatter.license)
241414
241516
  return { ...frontmatter };
241415
- return { ...frontmatter, license: licensesToString(frontmatter.license) };
241517
+ return { ...frontmatter, license: simplifyLicenses(frontmatter.license) };
241416
241518
  }
241417
241519
  function getExportListFromRawFrontmatter(session, rawFrontmatter, file) {
241418
241520
  var _a6;
@@ -241494,8 +241596,33 @@ function configValidationOpts(vfile2, property, ruleId) {
241494
241596
  function fillSiteConfig(base5, filler, opts) {
241495
241597
  return fillSiteFrontmatter(base5, filler, opts, Object.keys(filler));
241496
241598
  }
241497
- async function getValidatedConfigsFromFile(session, file, vfile2, stack) {
241599
+ function handleDeprecatedFields(conf, file, vfile2) {
241498
241600
  var _a6, _b, _c, _d2;
241601
+ if ((_a6 = conf.site) === null || _a6 === void 0 ? void 0 : _a6.frontmatter) {
241602
+ fileWarn(vfile2, `Frontmatter fields should be defined directly on site, not nested under "${file}#site.frontmatter"`, { ruleId: RuleId.configHasNoDeprecatedFields });
241603
+ const { frontmatter, ...rest } = conf.site;
241604
+ conf.site = { ...frontmatter, ...rest };
241605
+ }
241606
+ if ((_b = conf.project) === null || _b === void 0 ? void 0 : _b.frontmatter) {
241607
+ fileWarn(vfile2, `Frontmatter fields should be defined directly on project, not nested under "${file}#project.frontmatter"`, { ruleId: RuleId.configHasNoDeprecatedFields });
241608
+ const { frontmatter, ...rest } = conf.project;
241609
+ conf.project = { ...frontmatter, ...rest };
241610
+ }
241611
+ if ((_c = conf.project) === null || _c === void 0 ? void 0 : _c.biblio) {
241612
+ fileWarn(vfile2, `biblio is deprecated, please use first_page/last_page/volume/issue fields "${file}#project"`, { ruleId: RuleId.configHasNoDeprecatedFields });
241613
+ const { biblio, ...rest } = conf.project;
241614
+ conf.project = { ...biblio, ...rest };
241615
+ }
241616
+ if ((_d2 = conf.site) === null || _d2 === void 0 ? void 0 : _d2.logoText) {
241617
+ fileWarn(vfile2, `logoText is deprecated, please use logo_text in "${file}#site"`, {
241618
+ ruleId: RuleId.configHasNoDeprecatedFields
241619
+ });
241620
+ const { logoText, ...rest } = conf.site;
241621
+ conf.site = { logo_text: logoText, ...rest };
241622
+ }
241623
+ }
241624
+ async function getValidatedConfigsFromFile(session, file, vfile2, stack) {
241625
+ var _a6;
241499
241626
  if (!vfile2) {
241500
241627
  vfile2 = new VFile();
241501
241628
  vfile2.path = file;
@@ -241513,31 +241640,15 @@ async function getValidatedConfigsFromFile(session, file, vfile2, stack) {
241513
241640
  if (!conf || opts.messages.errors) {
241514
241641
  throw Error(`Please address invalid config file ${file}`);
241515
241642
  }
241516
- if ((_a6 = conf.site) === null || _a6 === void 0 ? void 0 : _a6.frontmatter) {
241517
- fileWarn(vfile2, `Frontmatter fields should be defined directly on site, not nested under "${file}#site.frontmatter"`, { ruleId: RuleId.configHasNoDeprecatedFields });
241518
- const { frontmatter, ...rest } = conf.site;
241519
- conf.site = { ...frontmatter, ...rest };
241520
- }
241521
- if ((_b = conf.project) === null || _b === void 0 ? void 0 : _b.frontmatter) {
241522
- fileWarn(vfile2, `Frontmatter fields should be defined directly on project, not nested under "${file}#project.frontmatter"`, { ruleId: RuleId.configHasNoDeprecatedFields });
241523
- const { frontmatter, ...rest } = conf.project;
241524
- conf.project = { ...frontmatter, ...rest };
241525
- }
241526
- if ((_c = conf.site) === null || _c === void 0 ? void 0 : _c.logoText) {
241527
- fileWarn(vfile2, `logoText is deprecated, please use logo_text in "${file}#site"`, {
241528
- ruleId: RuleId.configHasNoDeprecatedFields
241529
- });
241530
- const { logoText, ...rest } = conf.site;
241531
- conf.site = { logo_text: logoText, ...rest };
241532
- }
241643
+ handleDeprecatedFields(conf, file, vfile2);
241533
241644
  let site;
241534
241645
  let project;
241535
241646
  const projectOpts = configValidationOpts(vfile2, "config.project", RuleId.validProjectConfig);
241536
241647
  let extend5;
241537
241648
  if (conf.extend) {
241538
- extend5 = await Promise.all(((_d2 = validateList(conf.extend, { coerce: true, ...incrementOptions("extend", opts) }, (item, index4) => {
241649
+ extend5 = await Promise.all(((_a6 = validateList(conf.extend, { coerce: true, ...incrementOptions("extend", opts) }, (item, index4) => {
241539
241650
  return validateString(item, incrementOptions(`extend.${index4}`, opts));
241540
- })) !== null && _d2 !== void 0 ? _d2 : []).map(async (extendFile) => {
241651
+ })) !== null && _a6 !== void 0 ? _a6 : []).map(async (extendFile) => {
241541
241652
  const resolvedFile = await resolveToAbsolute(session, (0, import_node_path8.dirname)(file), extendFile, {
241542
241653
  allowRemote: true
241543
241654
  });
@@ -241612,7 +241723,7 @@ async function loadConfig(session, path41, opts) {
241612
241723
  }
241613
241724
  async function resolveToAbsolute(session, basePath, relativePath, opts) {
241614
241725
  let message;
241615
- if ((opts === null || opts === void 0 ? void 0 : opts.allowRemote) && isUrl(relativePath)) {
241726
+ if ((opts === null || opts === void 0 ? void 0 : opts.allowRemote) && isUrl2(relativePath)) {
241616
241727
  const cacheFilename = `config-item-${computeHash(relativePath)}${(0, import_node_path8.extname)(new URL(relativePath).pathname)}`;
241617
241728
  if (!loadFromCache(session, cacheFilename, { maxAge: 30 })) {
241618
241729
  try {
@@ -242082,7 +242193,7 @@ function getCitationRenderers(data) {
242082
242193
  async function loadBibTeXCitationRenderers(session, path41) {
242083
242194
  const toc = tic();
242084
242195
  let data;
242085
- if (isUrl(path41)) {
242196
+ if (isUrl2(path41)) {
242086
242197
  session.log.debug(`Fetching citations at "${path41}"`);
242087
242198
  const res = await session.fetch(path41);
242088
242199
  if (!res.ok) {
@@ -242096,7 +242207,7 @@ async function loadBibTeXCitationRenderers(session, path41) {
242096
242207
  }
242097
242208
  const csl = parseBibTeX(data);
242098
242209
  const renderer = getCitationRenderers(csl);
242099
- session.log.debug(toc(`Read ${plural("%s citations(s)", renderer)} from ${path41} in %s.`));
242210
+ session.log.debug(toc(`Read ${plural("%s citation(s)", renderer)} from ${path41} in %s.`));
242100
242211
  return renderer;
242101
242212
  }
242102
242213
  function combineCitationRenderers(cache, ...files) {
@@ -289112,7 +289223,7 @@ var import_node_path15 = __toESM(require("path"), 1);
289112
289223
  var import_nbtx = __toESM(require_cjs2(), 1);
289113
289224
 
289114
289225
  // ../myst-cli/dist/version.js
289115
- var version2 = "1.3.11";
289226
+ var version2 = "1.3.12";
289116
289227
  var version_default2 = version2;
289117
289228
 
289118
289229
  // ../myst-cli/dist/utils/headers.js
@@ -289740,7 +289851,7 @@ async function saveImageInStaticFolder(session, urlSource, sourceFile, writeFold
289740
289851
  const sourceFileFolder = import_node_path15.default.dirname(sourceFile);
289741
289852
  const imageLocalFile = import_node_path15.default.join(sourceFileFolder, urlSource);
289742
289853
  let file;
289743
- if (isUrl(urlSource)) {
289854
+ if (isUrl2(urlSource)) {
289744
289855
  file = await downloadAndSaveImage(session, urlSource, computeHash(urlSource), writeFolder);
289745
289856
  } else if (import_node_fs11.default.existsSync(imageLocalFile)) {
289746
289857
  if (import_node_path15.default.resolve(import_node_path15.default.dirname(imageLocalFile)) === import_node_path15.default.resolve(writeFolder)) {
@@ -297417,7 +297528,7 @@ Consider running "${binaryName()} init --project" in that directory`, "warn", {
297417
297528
  bibliography2 = projectConfig.bibliography.filter((bib) => {
297418
297529
  if (allBibFiles.includes(bib))
297419
297530
  return true;
297420
- if (isUrl(bib))
297531
+ if (isUrl2(bib))
297421
297532
  return true;
297422
297533
  if (import_node_fs16.default.existsSync(bib)) {
297423
297534
  allBibFiles.push(bib);
@@ -298451,9 +298562,6 @@ var getNodeRequestOptions = (request) => {
298451
298562
  if (typeof agent === "function") {
298452
298563
  agent = agent(parsedURL);
298453
298564
  }
298454
- if (!headers.has("Connection") && !agent) {
298455
- headers.set("Connection", "close");
298456
- }
298457
298565
  const search4 = getSearch(parsedURL);
298458
298566
  const options = {
298459
298567
  // Overwrite search to retain trailing ? (issue #776)
@@ -298745,7 +298853,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
298745
298853
  }
298746
298854
 
298747
298855
  // ../../node_modules/intersphinx/node_modules/myst-cli-utils/dist/isUrl.js
298748
- function isUrl4(url) {
298856
+ function isUrl5(url) {
298749
298857
  if (!url)
298750
298858
  return false;
298751
298859
  try {
@@ -298772,7 +298880,7 @@ var Inventory = class {
298772
298880
  this.project = opts === null || opts === void 0 ? void 0 : opts.project;
298773
298881
  if (opts === null || opts === void 0 ? void 0 : opts.version)
298774
298882
  this.version = opts === null || opts === void 0 ? void 0 : opts.version;
298775
- if ((opts === null || opts === void 0 ? void 0 : opts.path) && isUrl4(opts === null || opts === void 0 ? void 0 : opts.path)) {
298883
+ if ((opts === null || opts === void 0 ? void 0 : opts.path) && isUrl5(opts === null || opts === void 0 ? void 0 : opts.path)) {
298776
298884
  this.path = opts === null || opts === void 0 ? void 0 : opts.path.replace(/\/$/, "");
298777
298885
  if (this.path.endsWith(".inv") && !(opts === null || opts === void 0 ? void 0 : opts.invName)) {
298778
298886
  const parts = this.path.split("/");
@@ -298814,7 +298922,7 @@ ${data.toString("binary")}`, { encoding: "binary" });
298814
298922
  if (!this.path) {
298815
298923
  throw new Error("Inventory path must be specified to load an object");
298816
298924
  }
298817
- if (isUrl4(this.path)) {
298925
+ if (isUrl5(this.path)) {
298818
298926
  const url = `${this.path}/${this.invName}`;
298819
298927
  const res = await fetch2(url);
298820
298928
  if (!res.ok) {
@@ -299235,7 +299343,7 @@ function validateFile(session, input3, opts) {
299235
299343
  const filename = validateString(input3, opts);
299236
299344
  if (!filename)
299237
299345
  return;
299238
- if (opts.allowRemote && isUrl(filename))
299346
+ if (opts.allowRemote && isUrl2(filename))
299239
299347
  return filename;
299240
299348
  let resolvedFile;
299241
299349
  if (opts.file) {
@@ -300445,7 +300553,7 @@ async function resolveTemplateFileOptions(session, mystTemplate, options) {
300445
300553
  function isInternalUrl(value) {
300446
300554
  return !!value.match("^(/[a-zA-Z0-9._-]+)+$");
300447
300555
  }
300448
- function isUrl5(value) {
300556
+ function isUrl6(value) {
300449
300557
  if (isInternalUrl(value))
300450
300558
  return true;
300451
300559
  try {
@@ -300478,7 +300586,7 @@ function resolveSiteAction(session, action, file, property) {
300478
300586
  addWarningForFile(session, file, `Could not find static resource at "${action.url}" in ${property}`, "error", { ruleId: RuleId.staticActionFileCopied });
300479
300587
  return void 0;
300480
300588
  }
300481
- if (!isUrl5(action.url)) {
300589
+ if (!isUrl6(action.url)) {
300482
300590
  addWarningForFile(session, file, `Resource "${action.url}" in ${property} should be a URL or path to static file`, "error");
300483
300591
  return void 0;
300484
300592
  }
@@ -300495,7 +300603,7 @@ function resolveSiteAction(session, action, file, property) {
300495
300603
  static: false
300496
300604
  };
300497
300605
  }
300498
- if (!action.static && isUrl5(action.url)) {
300606
+ if (!action.static && isUrl6(action.url)) {
300499
300607
  addWarningForFile(session, file, `Linking resource "${action.url}" in ${property} to static file; to mark this as a URL instead, use 'static: false'`);
300500
300608
  }
300501
300609
  const fileHash = hashAndCopyStaticFile(session, resolvedFile, session.publicPath(), (m2) => {
@@ -300902,7 +301010,7 @@ ${error === null || error === void 0 ? void 0 : error.stack}
300902
301010
  }
300903
301011
  reference.kind = "intersphinx";
300904
301012
  reference.value = inventory;
300905
- if (inventory.id && inventory.path && isUrl(inventory.path)) {
301013
+ if (inventory.id && inventory.path && isUrl2(inventory.path)) {
300906
301014
  const intersphinxPath = cachePath(session, inventoryCacheFilename("intersphinx", inventory.id, inventory.path));
300907
301015
  if (!import_node_fs25.default.existsSync(intersphinxPath)) {
300908
301016
  session.log.debug(`Saving remote inventory file to cache: ${inventory.path}`);
@@ -306916,6 +307024,12 @@ ${node3.value}
306916
307024
  legend: captionHandler2,
306917
307025
  captionNumber: () => void 0,
306918
307026
  crossReference(node3, state, parent2) {
307027
+ var _a6, _b;
307028
+ if (node3.remote) {
307029
+ const url = ((_a6 = node3.remoteBaseUrl) !== null && _a6 !== void 0 ? _a6 : "") + (node3.url === "/" ? "" : (_b = node3.url) !== null && _b !== void 0 ? _b : "") + (node3.html_id ? `#${node3.html_id}` : "");
307030
+ linkHandler({ ...node3, url }, state);
307031
+ return;
307032
+ }
306919
307033
  const id = node3.identifier;
306920
307034
  const next = nextCharacterIsText(parent2, node3);
306921
307035
  state.write(next ? `#[@${id}]` : `@${id}`);
@@ -309259,17 +309373,16 @@ function getFundingGroup(frontmatter) {
309259
309373
  }
309260
309374
  function getArticleVolume(frontmatter) {
309261
309375
  var _a6;
309262
- const text7 = (_a6 = frontmatter.biblio) === null || _a6 === void 0 ? void 0 : _a6.volume;
309376
+ const text7 = (_a6 = frontmatter.volume) === null || _a6 === void 0 ? void 0 : _a6.number;
309263
309377
  return text7 ? [{ type: "element", name: "volume", elements: [{ type: "text", text: `${text7}` }] }] : [];
309264
309378
  }
309265
309379
  function getArticleIssue(frontmatter) {
309266
309380
  var _a6;
309267
- const text7 = (_a6 = frontmatter.biblio) === null || _a6 === void 0 ? void 0 : _a6.issue;
309381
+ const text7 = (_a6 = frontmatter.issue) === null || _a6 === void 0 ? void 0 : _a6.number;
309268
309382
  return text7 ? [{ type: "element", name: "issue", elements: [{ type: "text", text: `${text7}` }] }] : [];
309269
309383
  }
309270
309384
  function getArticlePages(frontmatter) {
309271
- var _a6;
309272
- const { first_page, last_page } = (_a6 = frontmatter.biblio) !== null && _a6 !== void 0 ? _a6 : {};
309385
+ const { first_page, last_page } = frontmatter !== null && frontmatter !== void 0 ? frontmatter : {};
309273
309386
  const pages = [];
309274
309387
  if (first_page) {
309275
309388
  pages.push({
@@ -315052,7 +315165,7 @@ function runValidators(tree, validators, file) {
315052
315165
  function addFrontmatter(page, frontmatter) {
315053
315166
  if (!frontmatter || !Object.keys(frontmatter).length)
315054
315167
  return page;
315055
- const fm = frontmatter.license ? { ...frontmatter, license: licensesToString(frontmatter.license) } : { ...frontmatter };
315168
+ const fm = frontmatter.license ? { ...frontmatter, license: simplifyLicenses(frontmatter.license) } : { ...frontmatter };
315056
315169
  return `---
315057
315170
  ${js_yaml_default.dump(fm)}---
315058
315171
  ${page}`;