Fix code quality violations and exclude Manifest from checks
Document application modes (development/debug/production) Add global file drop handler, order column normalization, SPA hash fix Serve CDN assets via /_vendor/ URLs instead of merging into bundles Add production minification with license preservation Improve JSON formatting for debugging and production optimization Add CDN asset caching with CSS URL inlining for production builds Add three-mode system (development, debug, production) Update Manifest CLAUDE.md to reflect helper class architecture Refactor Manifest.php into helper classes for better organization Pre-manifest-refactor checkpoint: Add app_mode documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
94
node_modules/css-select/lib/pseudo-selectors/subselects.js
generated
vendored
94
node_modules/css-select/lib/pseudo-selectors/subselects.js
generated
vendored
@@ -8,15 +8,18 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0;
|
||||
var boolbase_1 = require("boolbase");
|
||||
var procedure_1 = require("../procedure");
|
||||
var boolbase_1 = __importDefault(require("boolbase"));
|
||||
var sort_js_1 = require("../sort.js");
|
||||
/** Used as a placeholder for :has. Will be replaced with the actual element. */
|
||||
exports.PLACEHOLDER_ELEMENT = {};
|
||||
function ensureIsTag(next, adapter) {
|
||||
if (next === boolbase_1.falseFunc)
|
||||
return boolbase_1.falseFunc;
|
||||
if (next === boolbase_1.default.falseFunc)
|
||||
return boolbase_1.default.falseFunc;
|
||||
return function (elem) { return adapter.isTag(elem) && next(elem); };
|
||||
}
|
||||
exports.ensureIsTag = ensureIsTag;
|
||||
@@ -30,14 +33,26 @@ function getNextSiblings(elem, adapter) {
|
||||
return siblings.slice(elemIndex + 1).filter(adapter.isTag);
|
||||
}
|
||||
exports.getNextSiblings = getNextSiblings;
|
||||
var is = function (next, token, options, context, compileToken) {
|
||||
var opts = {
|
||||
function copyOptions(options) {
|
||||
// Not copied: context, rootFunc
|
||||
return {
|
||||
xmlMode: !!options.xmlMode,
|
||||
lowerCaseAttributeNames: !!options.lowerCaseAttributeNames,
|
||||
lowerCaseTags: !!options.lowerCaseTags,
|
||||
quirksMode: !!options.quirksMode,
|
||||
cacheResults: !!options.cacheResults,
|
||||
pseudos: options.pseudos,
|
||||
adapter: options.adapter,
|
||||
equals: options.equals,
|
||||
};
|
||||
var func = compileToken(token, opts, context);
|
||||
return function (elem) { return func(elem) && next(elem); };
|
||||
}
|
||||
var is = function (next, token, options, context, compileToken) {
|
||||
var func = compileToken(token, copyOptions(options), context);
|
||||
return func === boolbase_1.default.trueFunc
|
||||
? next
|
||||
: func === boolbase_1.default.falseFunc
|
||||
? boolbase_1.default.falseFunc
|
||||
: function (elem) { return func(elem) && next(elem); };
|
||||
};
|
||||
/*
|
||||
* :not, :has, :is, :matches and :where have to compile selectors
|
||||
@@ -52,54 +67,40 @@ exports.subselects = {
|
||||
matches: is,
|
||||
where: is,
|
||||
not: function (next, token, options, context, compileToken) {
|
||||
var opts = {
|
||||
xmlMode: !!options.xmlMode,
|
||||
adapter: options.adapter,
|
||||
equals: options.equals,
|
||||
};
|
||||
var func = compileToken(token, opts, context);
|
||||
if (func === boolbase_1.falseFunc)
|
||||
return next;
|
||||
if (func === boolbase_1.trueFunc)
|
||||
return boolbase_1.falseFunc;
|
||||
return function not(elem) {
|
||||
return !func(elem) && next(elem);
|
||||
};
|
||||
var func = compileToken(token, copyOptions(options), context);
|
||||
return func === boolbase_1.default.falseFunc
|
||||
? next
|
||||
: func === boolbase_1.default.trueFunc
|
||||
? boolbase_1.default.falseFunc
|
||||
: function (elem) { return !func(elem) && next(elem); };
|
||||
},
|
||||
has: function (next, subselect, options, _context, compileToken) {
|
||||
var adapter = options.adapter;
|
||||
var opts = {
|
||||
xmlMode: !!options.xmlMode,
|
||||
adapter: adapter,
|
||||
equals: options.equals,
|
||||
};
|
||||
// @ts-expect-error Uses an array as a pointer to the current element (side effects)
|
||||
var context = subselect.some(function (s) {
|
||||
return s.some(procedure_1.isTraversal);
|
||||
})
|
||||
? [exports.PLACEHOLDER_ELEMENT]
|
||||
var opts = copyOptions(options);
|
||||
opts.relativeSelector = true;
|
||||
var context = subselect.some(function (s) { return s.some(sort_js_1.isTraversal); })
|
||||
? // Used as a placeholder. Will be replaced with the actual element.
|
||||
[exports.PLACEHOLDER_ELEMENT]
|
||||
: undefined;
|
||||
var compiled = compileToken(subselect, opts, context);
|
||||
if (compiled === boolbase_1.falseFunc)
|
||||
return boolbase_1.falseFunc;
|
||||
if (compiled === boolbase_1.trueFunc) {
|
||||
return function (elem) {
|
||||
return adapter.getChildren(elem).some(adapter.isTag) && next(elem);
|
||||
};
|
||||
}
|
||||
if (compiled === boolbase_1.default.falseFunc)
|
||||
return boolbase_1.default.falseFunc;
|
||||
var hasElement = ensureIsTag(compiled, adapter);
|
||||
var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings = _a === void 0 ? false : _a;
|
||||
/*
|
||||
* `shouldTestNextSiblings` will only be true if the query starts with
|
||||
* a traversal (sibling or adjacent). That means we will always have a context.
|
||||
*/
|
||||
if (context) {
|
||||
// If `compiled` is `trueFunc`, we can skip this.
|
||||
if (context && compiled !== boolbase_1.default.trueFunc) {
|
||||
/*
|
||||
* `shouldTestNextSiblings` will only be true if the query starts with
|
||||
* a traversal (sibling or adjacent). That means we will always have a context.
|
||||
*/
|
||||
var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings_1 = _a === void 0 ? false : _a;
|
||||
return function (elem) {
|
||||
if (!next(elem))
|
||||
return false;
|
||||
context[0] = elem;
|
||||
var childs = adapter.getChildren(elem);
|
||||
var nextElements = shouldTestNextSiblings
|
||||
var nextElements = shouldTestNextSiblings_1
|
||||
? __spreadArray(__spreadArray([], childs, true), getNextSiblings(elem, adapter), true) : childs;
|
||||
return (next(elem) && adapter.existsOne(hasElement, nextElements));
|
||||
return adapter.existsOne(hasElement, nextElements);
|
||||
};
|
||||
}
|
||||
return function (elem) {
|
||||
@@ -108,3 +109,4 @@ exports.subselects = {
|
||||
};
|
||||
},
|
||||
};
|
||||
//# sourceMappingURL=subselects.js.map
|
||||
Reference in New Issue
Block a user