fedipod 1.50.2 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +2 -1
  2. package/gateway.md +25 -0
  3. package/gui.md +11 -3
  4. package/lib/client/masto/timelines.mjs +5 -0
  5. package/lib/connections/acctfeed.mjs +4 -1
  6. package/lib/connections/tagfeed.mjs +4 -1
  7. package/lib/core/intake/index.mjs +35 -2
  8. package/lib/core/intake/verify.mjs +3 -1
  9. package/lib/core/pod-only.mjs +4 -2
  10. package/lib/core/publisher/index.mjs +19 -5
  11. package/lib/gateway/account-agent.mjs +11 -5
  12. package/lib/gateway/check-letter.mjs +123 -0
  13. package/lib/gateway/connected-feeds.mjs +116 -0
  14. package/lib/gateway/copy.mjs +19 -0
  15. package/lib/gateway/forum-pages.mjs +59 -0
  16. package/lib/gateway/front-core.mjs +7 -4
  17. package/lib/gateway/held-mail.mjs +25 -1
  18. package/lib/gateway/keeper.mjs +2 -1
  19. package/lib/gateway/masto-gateway.mjs +47 -7
  20. package/lib/surface/routes/owner.mjs +7 -4
  21. package/package.json +3 -4
  22. package/scripts/build-app.mjs +3 -0
  23. package/scripts/check-netlify-bundles.mjs +3 -0
  24. package/scripts/forum-package.mjs +26 -0
  25. package/scripts/stage-site.mjs +34 -13
  26. package/vendor/sanitize-html.cjs +358 -171
  27. package/web/admin/bar.js +45 -0
  28. package/web/admin/group.js +17 -0
  29. package/web/admin/index.html +12 -8
  30. package/web/admin/record.js +19 -41
  31. package/web/admin/upkeep.js +3 -0
  32. package/web/app/README.md +3 -3
  33. package/web/app/admin-facade.mjs +19 -16
  34. package/web/app/agent.mjs +65 -2
  35. package/web/app/atproto-browser.mjs +28 -22
  36. package/web/app/deliver-relay.mjs +2 -1
  37. package/web/app/dist/boot.js +1 -0
  38. package/web/app/dist/boot.js.map +2 -2
  39. package/web/app/dist/sw.js +567 -265
  40. package/web/app/dist/sw.js.map +4 -4
  41. package/web/app/fediacct-browser.mjs +32 -30
  42. package/web/app/idb-kv.mjs +4 -4
  43. package/web/app/shims/prelude.js +1 -0
  44. package/web/app/sw-src.mjs +44 -3
@@ -1,4 +1,4 @@
1
- // sanitize-html 2.17.7 with its dependencies, packed by scripts/vendor-sanitize.mjs. Do not edit.
1
+ // sanitize-html 2.18.1 with its dependencies, packed by scripts/vendor-sanitize.mjs. Do not edit.
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -3392,7 +3392,6 @@ var require_escape_string_regexp = __commonJS({
3392
3392
  var require_is_plain_object = __commonJS({
3393
3393
  "node_modules/is-plain-object/dist/is-plain-object.js"(exports2) {
3394
3394
  "use strict";
3395
- Object.defineProperty(exports2, "__esModule", { value: true });
3396
3395
  /*!
3397
3396
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
3398
3397
  *
@@ -3418,109 +3417,6 @@ var require_is_plain_object = __commonJS({
3418
3417
  }
3419
3418
  });
3420
3419
 
3421
- // node_modules/deepmerge/dist/cjs.js
3422
- var require_cjs = __commonJS({
3423
- "node_modules/deepmerge/dist/cjs.js"(exports2, module2) {
3424
- "use strict";
3425
- var isMergeableObject = function isMergeableObject2(value) {
3426
- return isNonNullObject(value) && !isSpecial(value);
3427
- };
3428
- function isNonNullObject(value) {
3429
- return !!value && typeof value === "object";
3430
- }
3431
- function isSpecial(value) {
3432
- var stringValue = Object.prototype.toString.call(value);
3433
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
3434
- }
3435
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
3436
- var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
3437
- function isReactElement(value) {
3438
- return value.$$typeof === REACT_ELEMENT_TYPE;
3439
- }
3440
- function emptyTarget(val) {
3441
- return Array.isArray(val) ? [] : {};
3442
- }
3443
- function cloneUnlessOtherwiseSpecified(value, options) {
3444
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value;
3445
- }
3446
- function defaultArrayMerge(target, source, options) {
3447
- return target.concat(source).map(function(element) {
3448
- return cloneUnlessOtherwiseSpecified(element, options);
3449
- });
3450
- }
3451
- function getMergeFunction(key, options) {
3452
- if (!options.customMerge) {
3453
- return deepmerge2;
3454
- }
3455
- var customMerge = options.customMerge(key);
3456
- return typeof customMerge === "function" ? customMerge : deepmerge2;
3457
- }
3458
- function getEnumerableOwnPropertySymbols(target) {
3459
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
3460
- return Object.propertyIsEnumerable.call(target, symbol);
3461
- }) : [];
3462
- }
3463
- function getKeys(target) {
3464
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
3465
- }
3466
- function propertyIsOnObject(object, property) {
3467
- try {
3468
- return property in object;
3469
- } catch (_) {
3470
- return false;
3471
- }
3472
- }
3473
- function propertyIsUnsafe(target, key) {
3474
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
3475
- }
3476
- function mergeObject(target, source, options) {
3477
- var destination = {};
3478
- if (options.isMergeableObject(target)) {
3479
- getKeys(target).forEach(function(key) {
3480
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
3481
- });
3482
- }
3483
- getKeys(source).forEach(function(key) {
3484
- if (propertyIsUnsafe(target, key)) {
3485
- return;
3486
- }
3487
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
3488
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
3489
- } else {
3490
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
3491
- }
3492
- });
3493
- return destination;
3494
- }
3495
- function deepmerge2(target, source, options) {
3496
- options = options || {};
3497
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
3498
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
3499
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
3500
- var sourceIsArray = Array.isArray(source);
3501
- var targetIsArray = Array.isArray(target);
3502
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
3503
- if (!sourceAndTargetTypesMatch) {
3504
- return cloneUnlessOtherwiseSpecified(source, options);
3505
- } else if (sourceIsArray) {
3506
- return options.arrayMerge(target, source, options);
3507
- } else {
3508
- return mergeObject(target, source, options);
3509
- }
3510
- }
3511
- deepmerge2.all = function deepmergeAll(array, options) {
3512
- if (!Array.isArray(array)) {
3513
- throw new Error("first argument should be an array");
3514
- }
3515
- return array.reduce(function(prev, next) {
3516
- return deepmerge2(prev, next, options);
3517
- }, {});
3518
- };
3519
- var deepmerge_1 = deepmerge2;
3520
- module2.exports = deepmerge_1;
3521
- }
3522
- });
3523
-
3524
3420
  // node_modules/parse-srcset/src/parse-srcset.js
3525
3421
  var require_parse_srcset = __commonJS({
3526
3422
  "node_modules/parse-srcset/src/parse-srcset.js"(exports2, module2) {
@@ -4134,14 +4030,7 @@ var require_css_syntax_error = __commonJS({
4134
4030
  var require_stringifier = __commonJS({
4135
4031
  "node_modules/postcss/lib/stringifier.js"(exports2, module2) {
4136
4032
  "use strict";
4137
- var STYLE_TAG = /(<)(\/?style\b)/gi;
4138
- var COMMENT_OPEN = /(<)(!--)/g;
4139
4033
  var AT_NAME_END = /[\t\n\f\r "#'()/;[\\\]{}]/;
4140
- function escapeHTMLInCSS(str) {
4141
- if (typeof str !== "string") return str;
4142
- if (!str.includes("<")) return str;
4143
- return str.replace(STYLE_TAG, "\\3c $2").replace(COMMENT_OPEN, "\\3c $2");
4144
- }
4145
4034
  var DEFAULT_RAW = {
4146
4035
  after: "\n",
4147
4036
  beforeClose: "\n",
@@ -4170,6 +4059,11 @@ var require_stringifier = __commonJS({
4170
4059
  }
4171
4060
  return name + afterName + params;
4172
4061
  }
4062
+ function isCustomProperty(node) {
4063
+ if (!node.prop.startsWith("--")) return false;
4064
+ let before = node.raws.before;
4065
+ return typeof before === "undefined" || !/[^\s;]$/.test(before);
4066
+ }
4173
4067
  function pushBody(str, stack, node) {
4174
4068
  let nodes = node.nodes;
4175
4069
  let last = nodes.length - 1;
@@ -4182,7 +4076,7 @@ var require_stringifier = __commonJS({
4182
4076
  for (let i = nodes.length - 1; i >= 0; i--) {
4183
4077
  let child = nodes[i];
4184
4078
  let childSemicolon = last !== i || semicolon;
4185
- if (!childSemicolon && i < nodes.length - 1 && (child.type === "atrule" && !child.nodes || child.type === "decl" && child.prop.startsWith("--"))) {
4079
+ if (!childSemicolon && i < nodes.length - 1 && (child.type === "atrule" && !child.nodes || child.type === "decl" && isCustomProperty(child))) {
4186
4080
  childSemicolon = true;
4187
4081
  }
4188
4082
  stack.push({
@@ -4194,14 +4088,14 @@ var require_stringifier = __commonJS({
4194
4088
  }
4195
4089
  function pushBlock(str, stack, node, start) {
4196
4090
  let between = str.raw(node, "between", "beforeOpen");
4197
- str.builder(escapeHTMLInCSS(start + between) + "{", node, "start");
4091
+ str.builder(start + between + "{", node, "start");
4198
4092
  let hasNodes = node.nodes && node.nodes.length;
4199
4093
  let close = () => {
4200
4094
  let after = hasNodes ? str.raw(node, "after") : str.raw(node, "after", "emptyBody");
4201
- if (after) str.builder(escapeHTMLInCSS(after));
4095
+ if (after) str.builder(after);
4202
4096
  str.builder("}", node, "end");
4203
4097
  if (node.type === "rule" && node.raws.ownSemicolon) {
4204
- str.builder(escapeHTMLInCSS(node.raws.ownSemicolon), node, "end");
4098
+ str.builder(node.raws.ownSemicolon, node, "end");
4205
4099
  }
4206
4100
  };
4207
4101
  if (hasNodes) {
@@ -4221,7 +4115,7 @@ var require_stringifier = __commonJS({
4221
4115
  this.block(node, start);
4222
4116
  } else {
4223
4117
  let end = (node.raws.between || "") + (semicolon ? ";" : "");
4224
- this.builder(escapeHTMLInCSS(start + end), node);
4118
+ this.builder(start + end, node);
4225
4119
  }
4226
4120
  }
4227
4121
  beforeAfter(node, detect) {
@@ -4251,7 +4145,7 @@ var require_stringifier = __commonJS({
4251
4145
  }
4252
4146
  block(node, start) {
4253
4147
  let between = this.raw(node, "between", "beforeOpen");
4254
- this.builder(escapeHTMLInCSS(start + between) + "{", node, "start");
4148
+ this.builder(start + between + "{", node, "start");
4255
4149
  let after;
4256
4150
  if (node.nodes && node.nodes.length) {
4257
4151
  this.body(node);
@@ -4259,7 +4153,7 @@ var require_stringifier = __commonJS({
4259
4153
  } else {
4260
4154
  after = this.raw(node, "after", "emptyBody");
4261
4155
  }
4262
- if (after) this.builder(escapeHTMLInCSS(after));
4156
+ if (after) this.builder(after);
4263
4157
  this.builder("}", node, "end");
4264
4158
  }
4265
4159
  body(node) {
@@ -4278,7 +4172,7 @@ var require_stringifier = __commonJS({
4278
4172
  let child = entry.node;
4279
4173
  let before = this.raw(child, "before");
4280
4174
  if (before) {
4281
- this.builder(entry.document ? before : escapeHTMLInCSS(before));
4175
+ this.builder(before);
4282
4176
  }
4283
4177
  if (expandable && child.type === "rule") {
4284
4178
  pushBlock(this, stack, child, this.rawValue(child, "selector"));
@@ -4292,7 +4186,7 @@ var require_stringifier = __commonJS({
4292
4186
  comment(node) {
4293
4187
  let left = this.raw(node, "left", "commentLeft");
4294
4188
  let right = this.raw(node, "right", "commentRight");
4295
- this.builder(escapeHTMLInCSS("/*" + left + node.text + right + "*/"), node);
4189
+ this.builder("/*" + left + node.text + right + "*/", node);
4296
4190
  }
4297
4191
  decl(node, semicolon) {
4298
4192
  let raws = node.raws;
@@ -4302,7 +4196,7 @@ var require_stringifier = __commonJS({
4302
4196
  string += raws.important || " !important";
4303
4197
  }
4304
4198
  if (semicolon) string += ";";
4305
- this.builder(escapeHTMLInCSS(string), node);
4199
+ this.builder(string, node);
4306
4200
  }
4307
4201
  document(node) {
4308
4202
  this.body(node);
@@ -4479,20 +4373,19 @@ var require_stringifier = __commonJS({
4479
4373
  return value;
4480
4374
  }
4481
4375
  root(node) {
4482
- if (node.source && node.source.input.hasBOM) {
4376
+ let inDocument = node.parent && node.parent.type === "document";
4377
+ if (!inDocument && node.source && node.source.input.hasBOM) {
4483
4378
  this.builder("\uFEFF", node, "start");
4484
4379
  }
4485
4380
  this.body(node);
4486
4381
  if (node.raws.after) {
4487
- let after = node.raws.after;
4488
- let isDocument2 = node.parent && node.parent.type === "document";
4489
- this.builder(isDocument2 ? after : escapeHTMLInCSS(after));
4382
+ this.builder(node.raws.after);
4490
4383
  }
4491
4384
  }
4492
4385
  rule(node) {
4493
4386
  this.block(node, this.rawValue(node, "selector"));
4494
4387
  if (node.raws.ownSemicolon) {
4495
- this.builder(escapeHTMLInCSS(node.raws.ownSemicolon), node, "end");
4388
+ this.builder(node.raws.ownSemicolon, node, "end");
4496
4389
  }
4497
4390
  }
4498
4391
  stringify(node, semicolon) {
@@ -4514,9 +4407,78 @@ var require_stringify = __commonJS({
4514
4407
  "node_modules/postcss/lib/stringify.js"(exports2, module2) {
4515
4408
  "use strict";
4516
4409
  var Stringifier = require_stringifier();
4410
+ var STYLE_TAG = /(<)(\/?style\b)/gi;
4411
+ var COMMENT_OPEN = /(<)(!--)/g;
4412
+ function escapeHTMLInCSS(str) {
4413
+ if (!str.includes("<")) return str;
4414
+ return str.replace(STYLE_TAG, "\\3c $2").replace(COMMENT_OPEN, "\\3c $2");
4415
+ }
4416
+ function cutEscaped(chunks, css, escaped) {
4417
+ let parts = [];
4418
+ let at = 0;
4419
+ let into = 0;
4420
+ for (let i = 0; i < chunks.length; i += 3) {
4421
+ let from = into;
4422
+ let end = at + chunks[i].length;
4423
+ while (at < end) {
4424
+ if (css[at] === escaped[into]) {
4425
+ at += 1;
4426
+ into += 1;
4427
+ } else {
4428
+ at += 1;
4429
+ into += 4;
4430
+ }
4431
+ }
4432
+ parts.push(escaped.slice(from, into));
4433
+ }
4434
+ return parts;
4435
+ }
4436
+ var SafeStringifier = class extends Stringifier {
4437
+ escapeHTML(print) {
4438
+ let builder = this.builder;
4439
+ let chunks, css;
4440
+ this.builder = (str, child, type) => {
4441
+ if (chunks) {
4442
+ css += str;
4443
+ chunks.push(str, child, type);
4444
+ } else if (str.includes("<")) {
4445
+ css = str;
4446
+ chunks = [str, child, type];
4447
+ } else {
4448
+ builder(str, child, type);
4449
+ }
4450
+ };
4451
+ print();
4452
+ this.builder = builder;
4453
+ if (!chunks) return;
4454
+ let escaped = escapeHTMLInCSS(css);
4455
+ if (escaped === css) {
4456
+ for (let i = 0; i < chunks.length; i += 3) {
4457
+ builder(chunks[i], chunks[i + 1], chunks[i + 2]);
4458
+ }
4459
+ } else {
4460
+ let parts = cutEscaped(chunks, css, escaped);
4461
+ for (let i = 0; i < chunks.length; i += 3) {
4462
+ builder(parts[i / 3], chunks[i + 1], chunks[i + 2]);
4463
+ }
4464
+ }
4465
+ }
4466
+ root(node) {
4467
+ if (node.parent && node.parent.type === "document") {
4468
+ this.escapeHTML(() => this.body(node));
4469
+ if (node.raws.after) this.builder(node.raws.after);
4470
+ } else {
4471
+ this.escapeHTML(() => super.root(node));
4472
+ }
4473
+ }
4474
+ };
4517
4475
  function stringify(node, builder) {
4518
- let str = new Stringifier(builder);
4519
- str.stringify(node);
4476
+ let str = new SafeStringifier(builder);
4477
+ if (node.type === "root" || node.type === "document") {
4478
+ str.stringify(node);
4479
+ } else {
4480
+ str.escapeHTML(() => str.stringify(node));
4481
+ }
4520
4482
  }
4521
4483
  module2.exports = stringify;
4522
4484
  stringify.default = stringify;
@@ -6296,10 +6258,9 @@ var require_source_map_generator = __commonJS({
6296
6258
  next = "";
6297
6259
  if (mapping.generatedLine !== previousGeneratedLine) {
6298
6260
  previousGeneratedColumn = 0;
6299
- while (mapping.generatedLine !== previousGeneratedLine) {
6300
- next += ";";
6301
- previousGeneratedLine++;
6302
- }
6261
+ var lineDelta = mapping.generatedLine - previousGeneratedLine;
6262
+ next += lineDelta === 1 ? ";" : ";".repeat(lineDelta);
6263
+ previousGeneratedLine = mapping.generatedLine;
6303
6264
  } else {
6304
6265
  if (i > 0) {
6305
6266
  if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
@@ -6458,9 +6419,17 @@ var require_quick_sort = __commonJS({
6458
6419
  let templateFn = new Function(`return ${template}`)();
6459
6420
  return templateFn(comparator);
6460
6421
  }
6422
+ var isEvalAllowed = (function() {
6423
+ try {
6424
+ new Function("return 0")();
6425
+ return true;
6426
+ } catch {
6427
+ return false;
6428
+ }
6429
+ })();
6461
6430
  var sortCache = /* @__PURE__ */ new WeakMap();
6462
6431
  exports2.quickSort = function(ary, comparator, start = 0) {
6463
- let doQuickSort = sortCache.get(comparator);
6432
+ let doQuickSort = isEvalAllowed ? sortCache.get(comparator) : SortTemplate(comparator);
6464
6433
  if (doQuickSort === void 0) {
6465
6434
  doQuickSort = cloneSort(comparator);
6466
6435
  sortCache.set(comparator, doQuickSort);
@@ -6478,6 +6447,7 @@ var require_source_map_consumer = __commonJS({
6478
6447
  var ArraySet = require_array_set().ArraySet;
6479
6448
  var base64VLQ = require_base64_vlq();
6480
6449
  var quickSort = require_quick_sort().quickSort;
6450
+ var MAX_SECTION_OFFSET_LINE = 1e7;
6481
6451
  function SourceMapConsumer(aSourceMap, aSourceMapURL) {
6482
6452
  var sourceMap = aSourceMap;
6483
6453
  if (typeof aSourceMap === "string") {
@@ -6970,6 +6940,7 @@ var require_source_map_consumer = __commonJS({
6970
6940
  line: -1,
6971
6941
  column: 0
6972
6942
  };
6943
+ var maxOffsetLine = 0;
6973
6944
  this._sections = sections.map(function(s) {
6974
6945
  if (s.url) {
6975
6946
  throw new Error("Support for url field in sections not implemented.");
@@ -6977,10 +6948,24 @@ var require_source_map_consumer = __commonJS({
6977
6948
  var offset = util.getArg(s, "offset");
6978
6949
  var offsetLine = util.getArg(offset, "line");
6979
6950
  var offsetColumn = util.getArg(offset, "column");
6951
+ if (!isValidOffset(offsetLine) || !isValidOffset(offsetColumn)) {
6952
+ throw new Error("Section offset line and column must be non-negative integers.");
6953
+ }
6954
+ if (offsetLine > MAX_SECTION_OFFSET_LINE) {
6955
+ throw new Error("Section offset line must not exceed " + MAX_SECTION_OFFSET_LINE + ".");
6956
+ }
6980
6957
  if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
6981
6958
  throw new Error("Section offsets must be ordered and non-overlapping.");
6982
6959
  }
6983
6960
  lastOffset = offset;
6961
+ var consumer = new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL);
6962
+ var totalOffsetLine = offsetLine + (consumer._maxOffsetLine || 0);
6963
+ if (totalOffsetLine > MAX_SECTION_OFFSET_LINE) {
6964
+ throw new Error("Section offset line must not exceed " + MAX_SECTION_OFFSET_LINE + ", including offsets of nested sections.");
6965
+ }
6966
+ if (totalOffsetLine > maxOffsetLine) {
6967
+ maxOffsetLine = totalOffsetLine;
6968
+ }
6984
6969
  return {
6985
6970
  generatedOffset: {
6986
6971
  // The offset fields are 0-based, but we use 1-based indices when
@@ -6988,9 +6973,14 @@ var require_source_map_consumer = __commonJS({
6988
6973
  generatedLine: offsetLine + 1,
6989
6974
  generatedColumn: offsetColumn + 1
6990
6975
  },
6991
- consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
6976
+ consumer
6992
6977
  };
6993
6978
  });
6979
+ this._maxOffsetLine = maxOffsetLine;
6980
+ }
6981
+ function isValidOffset(aValue) {
6982
+ return typeof aValue === "number" && aValue >= 0 && aValue <= 9007199254740991 && // Number.MAX_SAFE_INTEGER
6983
+ Math.floor(aValue) === aValue;
6994
6984
  }
6995
6985
  IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
6996
6986
  IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
@@ -6999,8 +6989,9 @@ var require_source_map_consumer = __commonJS({
6999
6989
  get: function() {
7000
6990
  var sources = [];
7001
6991
  for (var i = 0; i < this._sections.length; i++) {
7002
- for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
7003
- sources.push(this._sections[i].consumer.sources[j]);
6992
+ var sectionSources = this._sections[i].consumer.sources;
6993
+ for (var j = 0; j < sectionSources.length; j++) {
6994
+ sources.push(sectionSources[j]);
7004
6995
  }
7005
6996
  }
7006
6997
  return sources;
@@ -7166,6 +7157,10 @@ var require_source_node = __commonJS({
7166
7157
  }
7167
7158
  }
7168
7159
  while (lastGeneratedLine < mapping.generatedLine) {
7160
+ if (remainingLinesIndex >= remainingLines.length) {
7161
+ lastGeneratedLine = mapping.generatedLine;
7162
+ break;
7163
+ }
7169
7164
  node.add(shiftNextLine());
7170
7165
  lastGeneratedLine++;
7171
7166
  }
@@ -7395,9 +7390,16 @@ var require_source_map = __commonJS({
7395
7390
  var require_previous_map = __commonJS({
7396
7391
  "node_modules/postcss/lib/previous-map.js"(exports2, module2) {
7397
7392
  "use strict";
7398
- var { existsSync, readFileSync } = require("fs");
7393
+ var { existsSync, readFileSync, realpathSync } = require("fs");
7399
7394
  var { dirname, isAbsolute, join, relative, sep } = require("path");
7400
7395
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
7396
+ function realPath(path) {
7397
+ try {
7398
+ return realpathSync(path);
7399
+ } catch {
7400
+ return path;
7401
+ }
7402
+ }
7401
7403
  function fromBase64(str) {
7402
7404
  if (Buffer) {
7403
7405
  return Buffer.from(str, "base64").toString();
@@ -7462,7 +7464,7 @@ var require_previous_map = __commonJS({
7462
7464
  if (!trusted && !this.unsafeMap) {
7463
7465
  if (!/\.map$/i.test(path)) return void 0;
7464
7466
  if (!cssFile) return void 0;
7465
- let rel = relative(dirname(cssFile), path);
7467
+ let rel = relative(realPath(dirname(cssFile)), realPath(path));
7466
7468
  if (rel === ".." || rel.startsWith(".." + sep) || isAbsolute(rel)) {
7467
7469
  return void 0;
7468
7470
  }
@@ -7838,6 +7840,7 @@ var require_list = __commonJS({
7838
7840
  return list.split(string, spaces);
7839
7841
  },
7840
7842
  split(string, separators, last) {
7843
+ if (typeof string !== "string") return [];
7841
7844
  let array = [];
7842
7845
  let current = "";
7843
7846
  let split = false;
@@ -7845,7 +7848,18 @@ var require_list = __commonJS({
7845
7848
  let inQuote = false;
7846
7849
  let prevQuote = "";
7847
7850
  let escape2 = false;
7848
- for (let letter of string) {
7851
+ let inComment = false;
7852
+ for (let i = 0; i < string.length; i++) {
7853
+ let letter = string[i];
7854
+ if (inComment) {
7855
+ current += letter;
7856
+ if (letter === "*" && string[i + 1] === "/") {
7857
+ current += "/";
7858
+ i += 1;
7859
+ inComment = false;
7860
+ }
7861
+ continue;
7862
+ }
7849
7863
  if (escape2) {
7850
7864
  escape2 = false;
7851
7865
  } else if (letter === "\\") {
@@ -7857,6 +7871,11 @@ var require_list = __commonJS({
7857
7871
  } else if (letter === '"' || letter === "'") {
7858
7872
  inQuote = true;
7859
7873
  prevQuote = letter;
7874
+ } else if (letter === "/" && string[i + 1] === "*") {
7875
+ current += "/*";
7876
+ i += 1;
7877
+ inComment = true;
7878
+ continue;
7860
7879
  } else if (letter === "(") {
7861
7880
  func += 1;
7862
7881
  } else if (letter === ")") {
@@ -7865,14 +7884,16 @@ var require_list = __commonJS({
7865
7884
  if (separators.includes(letter)) split = true;
7866
7885
  }
7867
7886
  if (split) {
7868
- if (current !== "") array.push(current.trim());
7887
+ let value2 = current.trim();
7888
+ if (last || value2 !== "") array.push(value2);
7869
7889
  current = "";
7870
7890
  split = false;
7871
7891
  } else {
7872
7892
  current += letter;
7873
7893
  }
7874
7894
  }
7875
- if (last || current !== "") array.push(current.trim());
7895
+ let value = current.trim();
7896
+ if (last || value !== "") array.push(value);
7876
7897
  return array;
7877
7898
  }
7878
7899
  };
@@ -8068,15 +8089,20 @@ var require_map_generator = __commonJS({
8068
8089
  }
8069
8090
  }
8070
8091
  } else if (this.css) {
8092
+ let annotation = "/*# sourceMappingURL=";
8093
+ let css = "";
8094
+ let cursor = 0;
8071
8095
  let startIndex;
8072
- while ((startIndex = this.css.lastIndexOf("/*#")) !== -1) {
8073
- let endIndex = this.css.indexOf("*/", startIndex + 3);
8096
+ while ((startIndex = this.css.indexOf(annotation, cursor)) !== -1) {
8097
+ let endIndex = this.css.indexOf("*/", startIndex + annotation.length);
8074
8098
  if (endIndex === -1) break;
8075
- while (startIndex > 0 && this.css[startIndex - 1] === "\n") {
8099
+ while (startIndex > cursor && this.css[startIndex - 1] === "\n") {
8076
8100
  startIndex--;
8077
8101
  }
8078
- this.css = this.css.slice(0, startIndex) + this.css.slice(endIndex + 2);
8102
+ css += this.css.slice(cursor, startIndex);
8103
+ cursor = endIndex + 2;
8079
8104
  }
8105
+ if (cursor > 0) this.css = css + this.css.slice(cursor);
8080
8106
  }
8081
8107
  }
8082
8108
  generate() {
@@ -8638,7 +8664,7 @@ var require_parser = __commonJS({
8638
8664
  prev.raws.ownSemicolon = this.spaces;
8639
8665
  this.spaces = "";
8640
8666
  prev.source.end = this.getPosition(token[2]);
8641
- prev.source.end.offset += prev.raws.ownSemicolon.length;
8667
+ prev.source.end.offset++;
8642
8668
  }
8643
8669
  }
8644
8670
  }
@@ -8754,6 +8780,7 @@ var require_parser = __commonJS({
8754
8780
  let token, type;
8755
8781
  let length = tokens.length;
8756
8782
  let value = "";
8783
+ let last = "";
8757
8784
  let clean = true;
8758
8785
  let next, prev;
8759
8786
  for (let i = 0; i < length; i += 1) {
@@ -8765,16 +8792,18 @@ var require_parser = __commonJS({
8765
8792
  prev = tokens[i - 1] ? tokens[i - 1][0] : "empty";
8766
8793
  next = tokens[i + 1] ? tokens[i + 1][0] : "empty";
8767
8794
  if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {
8768
- if (value.slice(-1) === ",") {
8795
+ if (last === ",") {
8769
8796
  clean = false;
8770
8797
  } else {
8771
8798
  value += token[1];
8799
+ last = token[1].slice(-1);
8772
8800
  }
8773
8801
  } else {
8774
8802
  clean = false;
8775
8803
  }
8776
8804
  } else {
8777
8805
  value += token[1];
8806
+ last = token[1].slice(-1);
8778
8807
  }
8779
8808
  }
8780
8809
  if (!clean) {
@@ -9424,14 +9453,19 @@ var require_lazy_result = __commonJS({
9424
9453
  }
9425
9454
  if (visit.iterator !== 0) {
9426
9455
  let iterator = visit.iterator;
9456
+ if (visit.descending) {
9457
+ visit.descending = false;
9458
+ node.indexes[iterator] += 1;
9459
+ }
9427
9460
  let child;
9428
9461
  while (child = node.nodes[node.indexes[iterator]]) {
9429
- node.indexes[iterator] += 1;
9430
9462
  if (!child[isClean]) {
9431
9463
  child[isClean] = true;
9464
+ visit.descending = true;
9432
9465
  stack.push(toStack(child));
9433
9466
  return;
9434
9467
  }
9468
+ node.indexes[iterator] += 1;
9435
9469
  }
9436
9470
  visit.iterator = 0;
9437
9471
  delete node.indexes[iterator];
@@ -9461,12 +9495,16 @@ var require_lazy_result = __commonJS({
9461
9495
  let visitNode = visit.node;
9462
9496
  if (visit.iterator !== 0) {
9463
9497
  let iterator = visit.iterator;
9498
+ if (visit.descending) {
9499
+ visit.descending = false;
9500
+ visitNode.indexes[iterator] += 1;
9501
+ }
9464
9502
  let child;
9465
9503
  let descended = false;
9466
9504
  while (child = visitNode.nodes[visitNode.indexes[iterator]]) {
9467
- visitNode.indexes[iterator] += 1;
9468
9505
  if (!child[isClean]) {
9469
9506
  child[isClean] = true;
9507
+ visit.descending = true;
9470
9508
  stack.push({
9471
9509
  eventIndex: 0,
9472
9510
  events: getEvents(child),
@@ -9476,6 +9514,7 @@ var require_lazy_result = __commonJS({
9476
9514
  descended = true;
9477
9515
  break;
9478
9516
  }
9517
+ visitNode.indexes[iterator] += 1;
9479
9518
  }
9480
9519
  if (descended) continue;
9481
9520
  visit.iterator = 0;
@@ -9638,7 +9677,7 @@ var require_processor = __commonJS({
9638
9677
  var Root2 = require_root();
9639
9678
  var Processor = class {
9640
9679
  constructor(plugins = []) {
9641
- this.version = "8.5.24";
9680
+ this.version = "8.5.31";
9642
9681
  this.plugins = this.normalize(plugins);
9643
9682
  }
9644
9683
  normalize(plugins) {
@@ -9722,7 +9761,7 @@ var require_postcss = __commonJS({
9722
9761
  console.warn(
9723
9762
  name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"
9724
9763
  );
9725
- if (process.env.LANG && process.env.LANG.startsWith("cn")) {
9764
+ if (process.env.LANG && process.env.LANG.startsWith("zh")) {
9726
9765
  console.warn(
9727
9766
  name + ": \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:\nhttps://www.w3ctech.com/topic/2226"
9728
9767
  );
@@ -10427,7 +10466,6 @@ var require_launder = __commonJS({
10427
10466
  var htmlparser = (init_dist6(), __toCommonJS(dist_exports3));
10428
10467
  var escapeStringRegexp = require_escape_string_regexp();
10429
10468
  var { isPlainObject } = require_is_plain_object();
10430
- var deepmerge = require_cjs();
10431
10469
  var parseSrcset = require_parse_srcset();
10432
10470
  var { parse: postcssParse } = require_postcss();
10433
10471
  var { naughtyHref: launderNaughtyHref } = require_launder();
@@ -10451,6 +10489,15 @@ var svgAnimationTags = [
10451
10489
  "set"
10452
10490
  ];
10453
10491
  var alwaysUrlAttributes = ["href"];
10492
+ var severities = ["debug", "info", "warn", "error"];
10493
+ function loggerFor(options) {
10494
+ const source = options && options.logger || console;
10495
+ const logger = {};
10496
+ for (const severity of severities) {
10497
+ logger[severity] = typeof source[severity] === "function" ? (...args) => source[severity](...args) : (...args) => console[severity](...args);
10498
+ }
10499
+ return logger;
10500
+ }
10454
10501
  function each(obj, cb) {
10455
10502
  if (obj) {
10456
10503
  Object.keys(obj).forEach(function(key) {
@@ -10461,6 +10508,21 @@ function each(obj, cb) {
10461
10508
  function has(obj, key) {
10462
10509
  return {}.hasOwnProperty.call(obj, key);
10463
10510
  }
10511
+ function mergeClasses(specific, wildcard) {
10512
+ if (!Array.isArray(specific) || !Array.isArray(wildcard)) {
10513
+ return wildcard;
10514
+ }
10515
+ return specific.concat(wildcard);
10516
+ }
10517
+ function mergeStyles(specific, wildcard) {
10518
+ const merged = /* @__PURE__ */ Object.create(null);
10519
+ for (const rules of [specific, wildcard]) {
10520
+ for (const prop of Object.keys(rules)) {
10521
+ merged[prop] = has(merged, prop) ? merged[prop].concat(rules[prop]) : rules[prop];
10522
+ }
10523
+ }
10524
+ return merged;
10525
+ }
10464
10526
  function filter2(a, cb) {
10465
10527
  const n = [];
10466
10528
  each(a, function(v) {
@@ -10488,10 +10550,13 @@ function stringifySrcset(parsedSrcset) {
10488
10550
  }
10489
10551
  module.exports = sanitizeHtml;
10490
10552
  var VALID_HTML_ATTRIBUTE_NAME = /^[^\0\t\n\f\r /<=>]+$/;
10491
- function sanitizeHtml(html, options, _recursing) {
10553
+ var MAX_IFRAME_FALLBACK_DEPTH = 8;
10554
+ function sanitizeHtml(html, options, _fallback) {
10492
10555
  if (html == null) {
10493
10556
  return "";
10494
10557
  }
10558
+ const baseDepth = _fallback && _fallback.depth || 0;
10559
+ const iframeFallbackDepth = _fallback && _fallback.iframeFallbackDepth || 0;
10495
10560
  if (typeof html === "number") {
10496
10561
  html = html.toString();
10497
10562
  }
@@ -10520,19 +10585,15 @@ function sanitizeHtml(html, options, _recursing) {
10520
10585
  }
10521
10586
  options = Object.assign({}, sanitizeHtml.defaults, options);
10522
10587
  options.parser = Object.assign({}, htmlParserDefaults, options.parser);
10588
+ const logger = loggerFor(options);
10523
10589
  const tagAllowed = function(name) {
10524
10590
  return options.allowedTags === false || (options.allowedTags || []).indexOf(name) > -1;
10525
10591
  };
10526
10592
  vulnerableTags.forEach(function(tag) {
10527
10593
  if (tagAllowed(tag) && !options.allowVulnerableTags) {
10528
- console.warn(`
10529
-
10530
- \u26A0\uFE0F Your \`allowedTags\` option includes, \`${tag}\`, which is inherently
10531
- vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
10532
- Or, to disable this warning, add the \`allowVulnerableTags\` option
10533
- and ensure you are accounting for this risk.
10534
-
10535
- `);
10594
+ logger.warn(
10595
+ `Your \`allowedTags\` option includes \`${tag}\`, which is inherently vulnerable to XSS attacks. Please remove it from \`allowedTags\`, or, to disable this warning, add the \`allowVulnerableTags\` option and ensure you are accounting for this risk.`
10596
+ );
10536
10597
  }
10537
10598
  });
10538
10599
  const nonTextTagsArray = options.nonTextTags || [
@@ -10612,6 +10673,8 @@ and ensure you are accounting for this risk.
10612
10673
  let transformMap;
10613
10674
  let skipText;
10614
10675
  let skipTextDepth;
10676
+ let rawTextEnd;
10677
+ let skipRawText;
10615
10678
  let addedText = false;
10616
10679
  initializeState();
10617
10680
  const parser = new htmlparser.Parser({
@@ -10619,9 +10682,13 @@ and ensure you are accounting for this risk.
10619
10682
  if (options.onOpenTag) {
10620
10683
  options.onOpenTag(name, attribs);
10621
10684
  }
10685
+ updateRawTextRegion();
10622
10686
  if (options.enforceHtmlBoundary && name === "html") {
10623
10687
  initializeState();
10624
10688
  }
10689
+ if (skipRawText) {
10690
+ return;
10691
+ }
10625
10692
  if (skipText) {
10626
10693
  skipTextDepth++;
10627
10694
  return;
@@ -10657,6 +10724,9 @@ and ensure you are accounting for this risk.
10657
10724
  if (nonTextTagsArray.indexOf(name) !== -1) {
10658
10725
  skipText = true;
10659
10726
  skipTextDepth = 1;
10727
+ if (frame.tag.toLowerCase() === "noscript") {
10728
+ rawTextEnd = findRawTextEnd("noscript", parser.endIndex + 1);
10729
+ }
10660
10730
  }
10661
10731
  }
10662
10732
  }
@@ -10732,6 +10802,10 @@ and ensure you are accounting for this risk.
10732
10802
  return;
10733
10803
  }
10734
10804
  }
10805
+ if (name === "meta" && a.toLowerCase() === "content" && isRefresh(attribs) && naughtyRefresh(value)) {
10806
+ delete frame.attribs[a];
10807
+ return;
10808
+ }
10735
10809
  if (name === "script" && a === "src") {
10736
10810
  let allowed = true;
10737
10811
  try {
@@ -10780,7 +10854,7 @@ and ensure you are accounting for this risk.
10780
10854
  try {
10781
10855
  let parsed = parseSrcset(value);
10782
10856
  parsed.forEach(function(value2) {
10783
- if (naughtyHref(a, value2.url)) {
10857
+ if (naughtyHref(name, value2.url)) {
10784
10858
  value2.evil = true;
10785
10859
  }
10786
10860
  });
@@ -10817,7 +10891,7 @@ and ensure you are accounting for this risk.
10817
10891
  if (allowedSpecificClasses && allowedWildcardClasses) {
10818
10892
  value = filterClasses(
10819
10893
  value,
10820
- deepmerge(allowedSpecificClasses, allowedWildcardClasses),
10894
+ mergeClasses(allowedSpecificClasses, allowedWildcardClasses),
10821
10895
  allowedClassesGlobs
10822
10896
  );
10823
10897
  } else {
@@ -10847,7 +10921,9 @@ and ensure you are accounting for this risk.
10847
10921
  }
10848
10922
  } catch (e) {
10849
10923
  if (typeof window !== "undefined") {
10850
- console.warn('Failed to parse "' + name + " {" + value + `}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`);
10924
+ logger.warn(
10925
+ `Failed to parse "${name} {${value}}". If you are running this in a browser, we recommend disabling style parsing with the parseStyleAttributes option, since it only works in a node environment due to a postcss dependency. More info: https://github.com/apostrophecms/sanitize-html/issues/547`
10926
+ );
10851
10927
  }
10852
10928
  delete frame.attribs[a];
10853
10929
  return;
@@ -10888,7 +10964,8 @@ and ensure you are accounting for this risk.
10888
10964
  frame.openingTagLength = result.length - frame.tagPosition;
10889
10965
  },
10890
10966
  ontext: function(text) {
10891
- if (skipText) {
10967
+ updateRawTextRegion();
10968
+ if (skipText || skipRawText) {
10892
10969
  return;
10893
10970
  }
10894
10971
  const lastFrame = stack[stack.length - 1];
@@ -10907,6 +10984,19 @@ and ensure you are accounting for this risk.
10907
10984
  } else {
10908
10985
  result += escapeHtml(text, false);
10909
10986
  }
10987
+ } else if (
10988
+ // htmlparser2 treats <iframe> as a raw-text element, so markup inside
10989
+ // (including after an unclosed <iframe>) arrives as a single text node.
10990
+ // When the iframe is discarded, re-sanitize that fallback markup as HTML
10991
+ // instead of escaping it as plain text (issue #5550).
10992
+ // The nested call continues from the current depth so that
10993
+ // `nestingLimit` applies to the whole output.
10994
+ tag === "iframe" && !tagAllowed(tag) && options.disallowedTagsMode === "discard" && iframeFallbackDepth < MAX_IFRAME_FALLBACK_DEPTH
10995
+ ) {
10996
+ result += sanitizeHtml(text, options, {
10997
+ depth,
10998
+ iframeFallbackDepth: iframeFallbackDepth + 1
10999
+ });
10910
11000
  } else if (!addedText) {
10911
11001
  const escaped = escapeHtml(text, false);
10912
11002
  if (options.textFilter) {
@@ -10924,10 +11014,19 @@ and ensure you are accounting for this risk.
10924
11014
  if (options.onCloseTag) {
10925
11015
  options.onCloseTag(name, isImplied);
10926
11016
  }
10927
- if (skipText) {
11017
+ updateRawTextRegion();
11018
+ if (skipRawText) {
11019
+ const lastFrame = stack[stack.length - 1];
11020
+ if (!lastFrame || lastFrame.tag !== name) {
11021
+ return;
11022
+ }
11023
+ } else if (skipText) {
10928
11024
  skipTextDepth--;
10929
11025
  if (!skipTextDepth) {
10930
11026
  skipText = false;
11027
+ if (rawTextEnd !== null) {
11028
+ skipRawText = true;
11029
+ }
10931
11030
  } else {
10932
11031
  return;
10933
11032
  }
@@ -11005,12 +11104,26 @@ and ensure you are accounting for this risk.
11005
11104
  return result;
11006
11105
  function initializeState() {
11007
11106
  result = "";
11008
- depth = 0;
11107
+ depth = baseDepth;
11009
11108
  stack = [];
11010
11109
  skipMap = {};
11011
11110
  transformMap = {};
11012
11111
  skipText = false;
11013
11112
  skipTextDepth = 0;
11113
+ rawTextEnd = null;
11114
+ skipRawText = false;
11115
+ }
11116
+ function updateRawTextRegion() {
11117
+ if (rawTextEnd !== null && parser.startIndex >= rawTextEnd) {
11118
+ rawTextEnd = null;
11119
+ skipRawText = false;
11120
+ }
11121
+ }
11122
+ function findRawTextEnd(tagName, from) {
11123
+ const re = new RegExp("</" + tagName + "[\\t\\n\\f\\r />]", "ig");
11124
+ re.lastIndex = from;
11125
+ const match = re.exec(html);
11126
+ return match ? match.index : Infinity;
11014
11127
  }
11015
11128
  function escapeHtml(s, quote) {
11016
11129
  if (typeof s !== "string") {
@@ -11035,13 +11148,83 @@ and ensure you are accounting for this risk.
11035
11148
  allowProtocolRelative: options.allowProtocolRelative
11036
11149
  });
11037
11150
  }
11151
+ function isRefresh(attribs) {
11152
+ return Object.keys(attribs).some(function(a) {
11153
+ return a.toLowerCase() === "http-equiv" && String(attribs[a]).trim().toLowerCase() === "refresh";
11154
+ });
11155
+ }
11156
+ function naughtyRefresh(content) {
11157
+ const input = String(content);
11158
+ const isWhitespace2 = function(c) {
11159
+ return c === " " || c === " " || c === "\n" || c === "\f" || c === "\r";
11160
+ };
11161
+ let position = 0;
11162
+ const skipWhitespace = function() {
11163
+ while (position < input.length && isWhitespace2(input[position])) {
11164
+ position++;
11165
+ }
11166
+ };
11167
+ const lowerAt = function(i) {
11168
+ return (input[i] || "").toLowerCase();
11169
+ };
11170
+ skipWhitespace();
11171
+ const timeStart = position;
11172
+ while (position < input.length && /[0-9.]/.test(input[position])) {
11173
+ position++;
11174
+ }
11175
+ if (position === timeStart) {
11176
+ return true;
11177
+ }
11178
+ if (position < input.length) {
11179
+ const c = input[position];
11180
+ if (c !== ";" && c !== "," && !isWhitespace2(c)) {
11181
+ return true;
11182
+ }
11183
+ skipWhitespace();
11184
+ if (input[position] === ";" || input[position] === ",") {
11185
+ position++;
11186
+ }
11187
+ skipWhitespace();
11188
+ }
11189
+ if (position >= input.length) {
11190
+ return false;
11191
+ }
11192
+ let url = input.slice(position);
11193
+ let quoted = true;
11194
+ if (lowerAt(position) === "u") {
11195
+ quoted = false;
11196
+ if (lowerAt(position + 1) === "r" && lowerAt(position + 2) === "l") {
11197
+ position += 3;
11198
+ skipWhitespace();
11199
+ if (input[position] === "=") {
11200
+ position++;
11201
+ skipWhitespace();
11202
+ quoted = true;
11203
+ }
11204
+ }
11205
+ }
11206
+ if (quoted) {
11207
+ const quote = input[position];
11208
+ if (quote === '"' || quote === "'") {
11209
+ position++;
11210
+ }
11211
+ url = input.slice(position);
11212
+ if (quote === '"' || quote === "'") {
11213
+ const end = url.indexOf(quote);
11214
+ if (end !== -1) {
11215
+ url = url.slice(0, end);
11216
+ }
11217
+ }
11218
+ }
11219
+ return naughtyHref("meta", url);
11220
+ }
11038
11221
  function animatesUrlAttribute(name, attribs) {
11039
- if (svgAnimationTags.indexOf(name.toLowerCase()) === -1) {
11222
+ if (svgAnimationTags.indexOf(localPart(name)) === -1) {
11040
11223
  return false;
11041
11224
  }
11042
11225
  const schemeCheckedAttributes = options.allowedSchemesAppliedToAttributes || [];
11043
11226
  return Object.keys(attribs || {}).some(function(attributeName) {
11044
- if (attributeName.toLowerCase() !== "attributename") {
11227
+ if (localPart(attributeName) !== "attributename") {
11045
11228
  return false;
11046
11229
  }
11047
11230
  const target = (attribs[attributeName] || "").trim().toLowerCase();
@@ -11049,6 +11232,10 @@ and ensure you are accounting for this risk.
11049
11232
  return alwaysUrlAttributes.indexOf(localName) !== -1 || schemeCheckedAttributes.indexOf(target) !== -1 || schemeCheckedAttributes.indexOf(localName) !== -1;
11050
11233
  });
11051
11234
  }
11235
+ function localPart(name) {
11236
+ const lower = name.toLowerCase();
11237
+ return lower.slice(lower.lastIndexOf(":") + 1);
11238
+ }
11052
11239
  function parseUrl(value) {
11053
11240
  value = value.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/, "$1//");
11054
11241
  if (value.startsWith("relative:")) {
@@ -11072,7 +11259,7 @@ and ensure you are accounting for this risk.
11072
11259
  const astRules = abstractSyntaxTree.nodes[0];
11073
11260
  let selectedRule;
11074
11261
  if (allowedStyles[astRules.selector] && allowedStyles["*"]) {
11075
- selectedRule = deepmerge(
11262
+ selectedRule = mergeStyles(
11076
11263
  allowedStyles[astRules.selector],
11077
11264
  allowedStyles["*"]
11078
11265
  );