webdetector/.cache/ee/d5682d8eb3ef608948f04fcfadb08f.json

1 line
148 KiB
JSON
Raw Normal View History

2018-12-21 12:36:28 +00:00
{"id":"UBHQ","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/symbol-tree/package.json","includedInParent":true,"mtime":1545395355516},{"name":"./SymbolTreeNode","loc":{"line":8,"column":31},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/symbol-tree/lib/SymbolTree.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/symbol-tree/lib/SymbolTreeNode.js"},{"name":"./TreePosition","loc":{"line":9,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/symbol-tree/lib/SymbolTree.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/symbol-tree/lib/TreePosition.js"},{"name":"./TreeIterator","loc":{"line":10,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/symbol-tree/lib/SymbolTree.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/symbol-tree/lib/TreeIterator.js"}],"generated":{"js":"\"use strict\";const e=require(\"./SymbolTreeNode\"),i=require(\"./TreePosition\"),t=require(\"./TreeIterator\");function n(){return!0}function r(e,i){return e[e.length-1-i]}class s{constructor(e){this.symbol=Symbol(e||\"SymbolTree data\")}initialize(e){return this._node(e),e}_node(i){if(!i)return null;const t=i[this.symbol];return t||(i[this.symbol]=new e)}hasChildren(e){return this._node(e).hasChildren}firstChild(e){return this._node(e).firstChild}lastChild(e){return this._node(e).lastChild}previousSibling(e){return this._node(e).previousSibling}nextSibling(e){return this._node(e).nextSibling}parent(e){return this._node(e).parent}lastInclusiveDescendant(e){let i,t=e;for(;i=this._node(t).lastChild;)t=i;return t}preceding(e,i){if(e===(i&&i.root))return null;const t=this._node(e).previousSibling;return t?this.lastInclusiveDescendant(t):this._node(e).parent}following(e,i){const t=i&&i.root,n=!(i&&i.skipChildren)&&this._node(e).firstChild;if(n)return n;let r=e;do{if(r===t)return null;const e=this._node(r).nextSibling;if(e)return e;r=this._node(r).parent}while(r);return null}childrenToArray(e,i){const t=i&&i.array||[],r=i&&i.filter||n,s=i&&i.thisArg||void 0,o=this._node(e);let l=o.firstChild,h=0;for(;l;){const e=this._node(l);e.setCachedIndex(o,h),r.call(s,l)&&t.push(l),l=e.nextSibling,++h}return t}ancestorsToArray(e,i){const t=i&&i.array||[],r=i&&i.filter||n,s=i&&i.thisArg||void 0;let o=e;for(;o;)r.call(s,o)&&t.push(o),o=this._node(o).parent;return t}treeToArray(e,i){const t=i&&i.array||[],r=i&&i.filter||n,s=i&&i.thisArg||void 0;let o=e;for(;o;)r.call(s,o)&&t.push(o),o=this.following(o,{root:e});return t}childrenIterator(e,i){const n=i&&i.reverse,r=this._node(e);return new t(this,e,n?r.lastChild:r.firstChild,n?t.PREV:t.NEXT)}previousSiblingsIterator(e){return new t(this,e,this._node(e).previousSibling,t.PREV)}nextSiblingsIterator(e){return new t(this,e,this._node(e).nextSibling,t.NEXT)}ancestorsIterator(e){return new t(this,e,e,t.PARENT)}treeIterator(e,i){const n=i&&i.reverse;return new t(this,e,n?this.lastInclusiveDescendant(e):e,n?t.PRECEDING:t.FOLLOWING)}index(e){const i=this._node(e),t=this._node(i.parent);if(!t)return-1;let n=i.getCachedIndex(t);if(n>=0)return n;n=0;let r=t.firstChild;if(t.childIndexCachedUpTo){const e=this._node(t.childIndexCachedUpTo);r=e.nextSibling,n=e.getCachedIndex(t)+1}for(;r;){const i=this._node(r);if(i.setCachedIndex(t,n),r===e)break;++n,r=i.nextSibling}return t.childIndexCachedUpTo=e,n}childrenCount(e){const i=this._node(e);return i.lastChild?this.index(i.lastChild)+1:0}compareTreePosition(e,t){if(e===t)return 0;const n=[];{let r=e;for(;r;){if(r===t)return i.CONTAINS|i.PRECEDING;n.push(r),r=this.parent(r)}}const s=[];{let n=t;for(;n;){if(n===e)return i.CONTAINED_BY|i.FOLLOWING;s.push(n),n=this.parent(n)}}const o=r(n,0);if(!o||o!==r(s,0))return i.DISCONNECTED;let l=0;const h=Math.min(n.length,s.length);for(let i=0;i<h;++i){if(r(n,i)!==r(s,i))break;l=i}const d=this.index(r(n,l+1));return this.in