@quanta-intellect/vessel-browser 0.1.115 → 0.1.118

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.
@@ -263,20 +263,23 @@ function readSignal() {
263
263
  }
264
264
  }
265
265
  if (Listener) {
266
- const sSlot = this.observers ? this.observers.length : 0;
267
- if (!Listener.sources) {
268
- Listener.sources = [this];
269
- Listener.sourceSlots = [sSlot];
270
- } else {
271
- Listener.sources.push(this);
272
- Listener.sourceSlots.push(sSlot);
273
- }
274
- if (!this.observers) {
275
- this.observers = [Listener];
276
- this.observerSlots = [Listener.sources.length - 1];
277
- } else {
278
- this.observers.push(Listener);
279
- this.observerSlots.push(Listener.sources.length - 1);
266
+ const observers = this.observers;
267
+ if (!observers || observers[observers.length - 1] !== Listener) {
268
+ const sSlot = observers ? observers.length : 0;
269
+ if (!Listener.sources) {
270
+ Listener.sources = [this];
271
+ Listener.sourceSlots = [sSlot];
272
+ } else {
273
+ Listener.sources.push(this);
274
+ Listener.sourceSlots.push(sSlot);
275
+ }
276
+ if (!observers) {
277
+ this.observers = [Listener];
278
+ this.observerSlots = [Listener.sources.length - 1];
279
+ } else {
280
+ observers.push(Listener);
281
+ this.observerSlots.push(Listener.sources.length - 1);
282
+ }
280
283
  }
281
284
  }
282
285
  return this.value;
@@ -491,7 +494,12 @@ function resolveChildren(children2) {
491
494
  const results = [];
492
495
  for (let i = 0; i < children2.length; i++) {
493
496
  const result = resolveChildren(children2[i]);
494
- Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
497
+ if (Array.isArray(result)) {
498
+ if (result.length < 32768) results.push.apply(results, result);
499
+ else for (let j = 0; j < result.length; j++) results.push(result[j]);
500
+ } else {
501
+ results.push(result);
502
+ }
495
503
  }
496
504
  return results;
497
505
  }
@@ -5260,22 +5268,49 @@ function buildAndRememberBookmarkContext(args) {
5260
5268
  rememberedSummary: remembered?.summary ?? null
5261
5269
  });
5262
5270
  }
5263
- const {
5264
- entries,
5265
- setPrototypeOf,
5266
- isFrozen,
5267
- getPrototypeOf,
5268
- getOwnPropertyDescriptor
5269
- } = Object;
5270
- let {
5271
- freeze,
5272
- seal,
5273
- create
5274
- } = Object;
5275
- let {
5276
- apply,
5277
- construct
5278
- } = typeof Reflect !== "undefined" && Reflect;
5271
+ function _arrayLikeToArray(r, a) {
5272
+ (null == a || a > r.length) && (a = r.length);
5273
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
5274
+ return n;
5275
+ }
5276
+ function _arrayWithHoles(r) {
5277
+ if (Array.isArray(r)) return r;
5278
+ }
5279
+ function _iterableToArrayLimit(r, l) {
5280
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
5281
+ if (null != t) {
5282
+ var e, n, i, u, a = [], f = true, o = false;
5283
+ try {
5284
+ if (i = (t = t.call(r)).next, 0 === l) ;
5285
+ else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
5286
+ } catch (r2) {
5287
+ o = true, n = r2;
5288
+ } finally {
5289
+ try {
5290
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
5291
+ } finally {
5292
+ if (o) throw n;
5293
+ }
5294
+ }
5295
+ return a;
5296
+ }
5297
+ }
5298
+ function _nonIterableRest() {
5299
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5300
+ }
5301
+ function _slicedToArray(r, e) {
5302
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
5303
+ }
5304
+ function _unsupportedIterableToArray(r, a) {
5305
+ if (r) {
5306
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
5307
+ var t = {}.toString.call(r).slice(8, -1);
5308
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
5309
+ }
5310
+ }
5311
+ const entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
5312
+ let freeze = Object.freeze, seal = Object.seal, create = Object.create;
5313
+ let _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
5279
5314
  if (!freeze) {
5280
5315
  freeze = function freeze2(x) {
5281
5316
  return x;
@@ -5376,7 +5411,10 @@ function cleanArray(array) {
5376
5411
  }
5377
5412
  function clone(object) {
5378
5413
  const newObject = create(null);
5379
- for (const [property, value] of entries(object)) {
5414
+ for (const _ref2 of entries(object)) {
5415
+ var _ref3 = _slicedToArray(_ref2, 2);
5416
+ const property = _ref3[0];
5417
+ const value = _ref3[1];
5380
5418
  const isPropertyExist = objectHasOwnProperty(object, property);
5381
5419
  if (isPropertyExist) {
5382
5420
  if (arrayIsArray(value)) {
@@ -5461,13 +5499,13 @@ const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "
5461
5499
  const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
5462
5500
  const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
5463
5501
  const text = freeze(["#text"]);
5464
- const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
5502
+ const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
5465
5503
  const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
5466
5504
  const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
5467
5505
  const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
5468
- const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
5469
- const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
5470
- const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
5506
+ const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
5507
+ const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
5508
+ const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
5471
5509
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
5472
5510
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
5473
5511
  const IS_ALLOWED_URI = seal(
@@ -5481,26 +5519,22 @@ const ATTR_WHITESPACE = seal(
5481
5519
  );
5482
5520
  const DOCTYPE_NAME = seal(/^html$/i);
5483
5521
  const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
5484
- var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
5485
- __proto__: null,
5486
- ARIA_ATTR,
5487
- ATTR_WHITESPACE,
5488
- CUSTOM_ELEMENT,
5489
- DATA_ATTR,
5490
- DOCTYPE_NAME,
5491
- ERB_EXPR,
5492
- IS_ALLOWED_URI,
5493
- IS_SCRIPT_OR_DATA,
5494
- MUSTACHE_EXPR,
5495
- TMPLIT_EXPR
5496
- });
5497
5522
  const NODE_TYPE = {
5498
5523
  element: 1,
5524
+ attribute: 2,
5499
5525
  text: 3,
5526
+ cdataSection: 4,
5527
+ entityReference: 5,
5528
+ // Deprecated
5529
+ entityNode: 6,
5500
5530
  // Deprecated
5501
5531
  progressingInstruction: 7,
5502
5532
  comment: 8,
5503
- document: 9
5533
+ document: 9,
5534
+ documentType: 10,
5535
+ documentFragment: 11,
5536
+ notation: 12
5537
+ // Deprecated
5504
5538
  };
5505
5539
  const getGlobal = function getGlobal2() {
5506
5540
  return typeof window === "undefined" ? null : window;
@@ -5545,34 +5579,30 @@ const _createHooksMap = function _createHooksMap2() {
5545
5579
  function createDOMPurify() {
5546
5580
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
5547
5581
  const DOMPurify = (root2) => createDOMPurify(root2);
5548
- DOMPurify.version = "3.4.2";
5582
+ DOMPurify.version = "3.4.7";
5549
5583
  DOMPurify.removed = [];
5550
5584
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
5551
5585
  DOMPurify.isSupported = false;
5552
5586
  return DOMPurify;
5553
5587
  }
5554
- let {
5555
- document: document2
5556
- } = window2;
5588
+ let document2 = window2.document;
5557
5589
  const originalDocument = document2;
5558
5590
  const currentScript = originalDocument.currentScript;
5559
- const {
5560
- DocumentFragment,
5561
- HTMLTemplateElement,
5562
- Node,
5563
- Element,
5564
- NodeFilter,
5565
- NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
5566
- HTMLFormElement,
5567
- DOMParser,
5568
- trustedTypes
5569
- } = window2;
5591
+ window2.DocumentFragment;
5592
+ const HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap;
5593
+ _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap;
5594
+ window2.HTMLFormElement;
5595
+ const DOMParser = window2.DOMParser, trustedTypes = window2.trustedTypes;
5570
5596
  const ElementPrototype = Element.prototype;
5571
5597
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
5572
5598
  const remove = lookupGetter(ElementPrototype, "remove");
5573
5599
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
5574
5600
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
5575
5601
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
5602
+ const getShadowRoot = lookupGetter(ElementPrototype, "shadowRoot");
5603
+ const getAttributes = lookupGetter(ElementPrototype, "attributes");
5604
+ const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
5605
+ const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeName") : null;
5576
5606
  if (typeof HTMLTemplateElement === "function") {
5577
5607
  const template2 = document2.createElement("template");
5578
5608
  if (template2.content && template2.content.ownerDocument) {
@@ -5581,30 +5611,12 @@ function createDOMPurify() {
5581
5611
  }
5582
5612
  let trustedTypesPolicy;
5583
5613
  let emptyHTML = "";
5584
- const {
5585
- implementation,
5586
- createNodeIterator,
5587
- createDocumentFragment,
5588
- getElementsByTagName
5589
- } = document2;
5590
- const {
5591
- importNode
5592
- } = originalDocument;
5614
+ const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
5615
+ const importNode = originalDocument.importNode;
5593
5616
  let hooks = _createHooksMap();
5594
5617
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
5595
- const {
5596
- MUSTACHE_EXPR: MUSTACHE_EXPR2,
5597
- ERB_EXPR: ERB_EXPR2,
5598
- TMPLIT_EXPR: TMPLIT_EXPR2,
5599
- DATA_ATTR: DATA_ATTR2,
5600
- ARIA_ATTR: ARIA_ATTR2,
5601
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
5602
- ATTR_WHITESPACE: ATTR_WHITESPACE2,
5603
- CUSTOM_ELEMENT: CUSTOM_ELEMENT2
5604
- } = EXPRESSIONS;
5605
- let {
5606
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
5607
- } = EXPRESSIONS;
5618
+ const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
5619
+ let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
5608
5620
  let ALLOWED_TAGS = null;
5609
5621
  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
5610
5622
  let ALLOWED_ATTR = null;
@@ -5832,6 +5844,12 @@ function createDOMPurify() {
5832
5844
  emptyHTML = trustedTypesPolicy.createHTML("");
5833
5845
  }
5834
5846
  }
5847
+ if ((hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) && ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
5848
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
5849
+ }
5850
+ if (hooks.uponSanitizeAttribute.length > 0 && ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
5851
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
5852
+ }
5835
5853
  if (freeze) {
5836
5854
  freeze(cfg);
5837
5855
  }
@@ -5965,11 +5983,77 @@ function createDOMPurify() {
5965
5983
  null
5966
5984
  );
5967
5985
  };
5986
+ const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node) {
5987
+ node.normalize();
5988
+ const walker = createNodeIterator.call(
5989
+ node.ownerDocument || node,
5990
+ node,
5991
+ // eslint-disable-next-line no-bitwise
5992
+ NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
5993
+ null
5994
+ );
5995
+ let currentNode = walker.nextNode();
5996
+ while (currentNode) {
5997
+ let data = currentNode.data;
5998
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
5999
+ data = stringReplace(data, expr, " ");
6000
+ });
6001
+ currentNode.data = data;
6002
+ currentNode = walker.nextNode();
6003
+ }
6004
+ };
5968
6005
  const _isClobbered = function _isClobbered2(element) {
5969
- return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
6006
+ const realTagName = getNodeName ? getNodeName(element) : null;
6007
+ if (typeof realTagName !== "string") {
6008
+ return false;
6009
+ }
6010
+ if (transformCaseFunc(realTagName) !== "form") {
6011
+ return false;
6012
+ }
6013
+ return typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || // Realm-safe NamedNodeMap detection: equality against the cached
6014
+ // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
6015
+ // makes the direct read diverge from the cached read; a clean form
6016
+ // (same-realm OR foreign-realm) has both reads pointing at the same
6017
+ // canonical NamedNodeMap.
6018
+ element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
6019
+ // returns the integer 1 for any Element regardless of realm; direct
6020
+ // read on a clobbered form (e.g. <input name="nodeType">) returns
6021
+ // the named child element. Cheap addition — nodeType is read from
6022
+ // an internal slot, no serialization cost — and removes a residual
6023
+ // clobbering surface used by several mXSS / PI / comment branches
6024
+ // in _sanitizeElements that compare currentNode.nodeType directly.
6025
+ element.nodeType !== getNodeType(element) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
6026
+ // "childNodes" shadows the prototype getter. Direct reads of
6027
+ // form.childNodes from a clobbered form return the named child
6028
+ // instead of the real NodeList, so any walk that reads it directly
6029
+ // skips the form's real children. Compare the direct read to the
6030
+ // cached Node.prototype getter — when the form's named-property
6031
+ // getter intercepts the read, the two values differ and we flag
6032
+ // the form. This catches every clobbering child type (input,
6033
+ // select, etc.) regardless of whether the named child happens to
6034
+ // carry a numeric .length, which a typeof-based probe would miss
6035
+ // (e.g. HTMLSelectElement.length is a defined unsigned-long).
6036
+ element.childNodes !== getChildNodes(element);
6037
+ };
6038
+ const _isDocumentFragment = function _isDocumentFragment2(value) {
6039
+ if (!getNodeType || typeof value !== "object" || value === null) {
6040
+ return false;
6041
+ }
6042
+ try {
6043
+ return getNodeType(value) === NODE_TYPE.documentFragment;
6044
+ } catch (_) {
6045
+ return false;
6046
+ }
5970
6047
  };
5971
6048
  const _isNode = function _isNode2(value) {
5972
- return typeof Node === "function" && value instanceof Node;
6049
+ if (!getNodeType || typeof value !== "object" || value === null) {
6050
+ return false;
6051
+ }
6052
+ try {
6053
+ return typeof getNodeType(value) === "number";
6054
+ } catch (_) {
6055
+ return false;
6056
+ }
5973
6057
  };
5974
6058
  function _executeHooks(hooks2, currentNode, data) {
5975
6059
  arrayForEach(hooks2, (hook) => {
@@ -6014,8 +6098,8 @@ function createDOMPurify() {
6014
6098
  }
6015
6099
  }
6016
6100
  if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
6017
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
6018
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
6101
+ const parentNode = getParentNode(currentNode);
6102
+ const childNodes = getChildNodes(currentNode);
6019
6103
  if (childNodes && parentNode) {
6020
6104
  const childCount = childNodes.length;
6021
6105
  for (let i = childCount - 1; i >= 0; --i) {
@@ -6027,7 +6111,8 @@ function createDOMPurify() {
6027
6111
  _forceRemove(currentNode);
6028
6112
  return true;
6029
6113
  }
6030
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
6114
+ const nt = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;
6115
+ if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
6031
6116
  _forceRemove(currentNode);
6032
6117
  return true;
6033
6118
  }
@@ -6037,7 +6122,7 @@ function createDOMPurify() {
6037
6122
  }
6038
6123
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
6039
6124
  content = currentNode.textContent;
6040
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6125
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
6041
6126
  content = stringReplace(content, expr, " ");
6042
6127
  });
6043
6128
  if (currentNode.textContent !== content) {
@@ -6058,8 +6143,8 @@ function createDOMPurify() {
6058
6143
  return false;
6059
6144
  }
6060
6145
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
6061
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
6062
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
6146
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
6147
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
6063
6148
  else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
6064
6149
  if (
6065
6150
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
@@ -6073,9 +6158,9 @@ function createDOMPurify() {
6073
6158
  return false;
6074
6159
  }
6075
6160
  } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
6076
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
6161
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
6077
6162
  else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
6078
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
6163
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) ;
6079
6164
  else if (value) {
6080
6165
  return false;
6081
6166
  } else ;
@@ -6083,13 +6168,11 @@ function createDOMPurify() {
6083
6168
  };
6084
6169
  const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
6085
6170
  const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
6086
- return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT2, tagName);
6171
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
6087
6172
  };
6088
6173
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
6089
6174
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
6090
- const {
6091
- attributes
6092
- } = currentNode;
6175
+ const attributes = currentNode.attributes;
6093
6176
  if (!attributes || _isClobbered(currentNode)) {
6094
6177
  return;
6095
6178
  }
@@ -6103,11 +6186,7 @@ function createDOMPurify() {
6103
6186
  let l = attributes.length;
6104
6187
  while (l--) {
6105
6188
  const attr = attributes[l];
6106
- const {
6107
- name,
6108
- namespaceURI,
6109
- value: attrValue
6110
- } = attr;
6189
+ const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
6111
6190
  const lcName = transformCaseFunc(name);
6112
6191
  const initValue = attrValue;
6113
6192
  let value = name === "value" ? initValue : stringTrim(initValue);
@@ -6141,7 +6220,7 @@ function createDOMPurify() {
6141
6220
  continue;
6142
6221
  }
6143
6222
  if (SAFE_FOR_TEMPLATES) {
6144
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6223
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
6145
6224
  value = stringReplace(value, expr, " ");
6146
6225
  });
6147
6226
  }
@@ -6192,12 +6271,50 @@ function createDOMPurify() {
6192
6271
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
6193
6272
  _sanitizeElements(shadowNode);
6194
6273
  _sanitizeAttributes(shadowNode);
6195
- if (shadowNode.content instanceof DocumentFragment) {
6274
+ if (_isDocumentFragment(shadowNode.content)) {
6196
6275
  _sanitizeShadowDOM2(shadowNode.content);
6197
6276
  }
6277
+ const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;
6278
+ if (shadowNodeType === NODE_TYPE.element) {
6279
+ const innerSr = getShadowRoot ? getShadowRoot(shadowNode) : shadowNode.shadowRoot;
6280
+ if (_isDocumentFragment(innerSr)) {
6281
+ _sanitizeAttachedShadowRoots2(innerSr);
6282
+ _sanitizeShadowDOM2(innerSr);
6283
+ }
6284
+ }
6198
6285
  }
6199
6286
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
6200
6287
  };
6288
+ const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root2) {
6289
+ const nodeType = getNodeType ? getNodeType(root2) : root2.nodeType;
6290
+ if (nodeType === NODE_TYPE.element) {
6291
+ const sr = getShadowRoot ? getShadowRoot(root2) : root2.shadowRoot;
6292
+ if (_isDocumentFragment(sr)) {
6293
+ _sanitizeAttachedShadowRoots2(sr);
6294
+ _sanitizeShadowDOM2(sr);
6295
+ }
6296
+ }
6297
+ const childNodes = getChildNodes ? getChildNodes(root2) : root2.childNodes;
6298
+ if (!childNodes) {
6299
+ return;
6300
+ }
6301
+ const snapshot = [];
6302
+ arrayForEach(childNodes, (child) => {
6303
+ arrayPush(snapshot, child);
6304
+ });
6305
+ for (const child of snapshot) {
6306
+ _sanitizeAttachedShadowRoots2(child);
6307
+ }
6308
+ if (nodeType === NODE_TYPE.element) {
6309
+ const rootName = getNodeName ? getNodeName(root2) : null;
6310
+ if (typeof rootName === "string" && transformCaseFunc(rootName) === "template") {
6311
+ const content = root2.content;
6312
+ if (_isDocumentFragment(content)) {
6313
+ _sanitizeAttachedShadowRoots2(content);
6314
+ }
6315
+ }
6316
+ }
6317
+ };
6201
6318
  DOMPurify.sanitize = function(dirty) {
6202
6319
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6203
6320
  let body = null;
@@ -6225,14 +6342,18 @@ function createDOMPurify() {
6225
6342
  IN_PLACE = false;
6226
6343
  }
6227
6344
  if (IN_PLACE) {
6228
- const nn = dirty.nodeName;
6345
+ const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
6229
6346
  if (typeof nn === "string") {
6230
6347
  const tagName = transformCaseFunc(nn);
6231
6348
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
6232
6349
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
6233
6350
  }
6234
6351
  }
6235
- } else if (dirty instanceof Node) {
6352
+ if (_isClobbered(dirty)) {
6353
+ throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
6354
+ }
6355
+ _sanitizeAttachedShadowRoots2(dirty);
6356
+ } else if (_isNode(dirty)) {
6236
6357
  body = _initDocument("<!---->");
6237
6358
  importedNode = body.ownerDocument.importNode(dirty, true);
6238
6359
  if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
@@ -6242,6 +6363,7 @@ function createDOMPurify() {
6242
6363
  } else {
6243
6364
  body.appendChild(importedNode);
6244
6365
  }
6366
+ _sanitizeAttachedShadowRoots2(importedNode);
6245
6367
  } else {
6246
6368
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
6247
6369
  dirty.indexOf("<") === -1) {
@@ -6259,21 +6381,19 @@ function createDOMPurify() {
6259
6381
  while (currentNode = nodeIterator.nextNode()) {
6260
6382
  _sanitizeElements(currentNode);
6261
6383
  _sanitizeAttributes(currentNode);
6262
- if (currentNode.content instanceof DocumentFragment) {
6384
+ if (_isDocumentFragment(currentNode.content)) {
6263
6385
  _sanitizeShadowDOM2(currentNode.content);
6264
6386
  }
6265
6387
  }
6266
6388
  if (IN_PLACE) {
6389
+ if (SAFE_FOR_TEMPLATES) {
6390
+ _scrubTemplateExpressions(dirty);
6391
+ }
6267
6392
  return dirty;
6268
6393
  }
6269
6394
  if (RETURN_DOM) {
6270
6395
  if (SAFE_FOR_TEMPLATES) {
6271
- body.normalize();
6272
- let html2 = body.innerHTML;
6273
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6274
- html2 = stringReplace(html2, expr, " ");
6275
- });
6276
- body.innerHTML = html2;
6396
+ _scrubTemplateExpressions(body);
6277
6397
  }
6278
6398
  if (RETURN_DOM_FRAGMENT) {
6279
6399
  returnNode = createDocumentFragment.call(body.ownerDocument);
@@ -6293,7 +6413,7 @@ function createDOMPurify() {
6293
6413
  serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
6294
6414
  }
6295
6415
  if (SAFE_FOR_TEMPLATES) {
6296
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
6416
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
6297
6417
  serializedHTML = stringReplace(serializedHTML, expr, " ");
6298
6418
  });
6299
6419
  }
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; base-uri 'none'; object-src 'none'; frame-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; font-src 'self' data:; form-action 'self';" />
7
7
  <title>Vessel</title>
8
- <script type="module" crossorigin src="./assets/index-CWiMuKTX.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-COyRPuS5.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-CFbT1_av.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quanta-intellect/vessel-browser",
3
3
  "mcpName": "io.github.unmodeled-tyler/vessel-browser",
4
- "version": "0.1.115",
4
+ "version": "0.1.118",
5
5
  "description": "AI-native web browser runtime for autonomous agents with human supervision",
6
6
  "main": "./out/main/index.js",
7
7
  "bin": {
@@ -16,7 +16,8 @@
16
16
  "README.md"
17
17
  ],
18
18
  "scripts": {
19
- "dev": "env -u ELECTRON_RUN_AS_NODE ELECTRON_DISABLE_SANDBOX=1 electron-vite dev",
19
+ "ensure:electron": "node -e \"require('electron')\"",
20
+ "dev": "npm run ensure:electron && env -u ELECTRON_RUN_AS_NODE ELECTRON_DISABLE_SANDBOX=1 electron-vite dev",
20
21
  "build": "electron-vite build",
21
22
  "build:icon:mac": "scripts/build-macos-icon.sh",
22
23
  "dist": "npm run build && electron-builder --config electron-builder.config.cjs --linux --publish never",
@@ -26,7 +27,7 @@
26
27
  "dist:mac:dir": "npm run build:icon:mac && npm run build && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --config electron-builder.config.cjs --mac dir --publish never",
27
28
  "dist:mac:signed": "npm run build:icon:mac && npm run build && electron-builder --config electron-builder.config.cjs --mac dmg zip --publish never",
28
29
  "dist:mac:dir:signed": "npm run build:icon:mac && npm run build && electron-builder --config electron-builder.config.cjs --mac dir --publish never",
29
- "preview": "env -u ELECTRON_RUN_AS_NODE electron-vite preview",
30
+ "preview": "npm run ensure:electron && env -u ELECTRON_RUN_AS_NODE electron-vite preview",
30
31
  "typecheck": "tsc --noEmit",
31
32
  "check:cleanup": "npm run typecheck && git diff --check && node scripts/check-cleanup.mjs && npm run deadcode:check",
32
33
  "deadcode:check": "knip --include files,dependencies,unlisted,binaries,unresolved --no-progress",
@@ -64,32 +65,38 @@
64
65
  },
65
66
  "engines": {
66
67
  "node": ">=22.12.0",
67
- "npm": ">=10.0.0"
68
+ "npm": ">=11.0.0"
68
69
  },
69
- "packageManager": "npm@10.9.7",
70
+ "packageManager": "npm@11.16.0",
70
71
  "peerDependencies": {
71
72
  "electron": ">=30.0.0"
72
73
  },
73
74
  "devDependencies": {
74
- "@types/node": "^25.6.2",
75
+ "@types/node": "^25.9.1",
75
76
  "c8": "^11.0.0",
76
- "electron": "^42.0.1",
77
+ "electron": "^42.3.0",
77
78
  "electron-builder": "^26.8.1",
78
79
  "electron-vite": "^5.0.0",
79
- "knip": "^6.12.2",
80
+ "knip": "^6.14.2",
80
81
  "linkedom": "^0.18.12",
81
- "lucide-solid": "^1.14.0",
82
- "solid-js": "^1.9.12",
83
- "tsx": "^4.21.0",
82
+ "lucide-solid": "^1.17.0",
83
+ "solid-js": "^1.9.13",
84
+ "tsx": "^4.22.3",
84
85
  "typescript": "^6.0.3",
85
86
  "vite-plugin-solid": "^2.11.12"
86
87
  },
87
88
  "dependencies": {
88
- "@anthropic-ai/sdk": "^0.95.1",
89
+ "@anthropic-ai/sdk": "^0.100.0",
89
90
  "@modelcontextprotocol/sdk": "^1.29.0",
90
91
  "@mozilla/readability": "^0.6.0",
91
- "dompurify": "^3.4.2",
92
- "openai": "^6.37.0",
92
+ "dompurify": "^3.4.7",
93
+ "openai": "^6.39.1",
93
94
  "zod": "^4.4.3"
95
+ },
96
+ "allowScripts": {
97
+ "electron-winstaller@5.4.0": true,
98
+ "esbuild@0.25.12": true,
99
+ "esbuild@0.28.0": true,
100
+ "esbuild@0.27.7": true
94
101
  }
95
102
  }