Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/rentals.picotech.app/public_html/node_modules/jsdom/lib/jsdom/living/svg/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
const DOMException = require("../generated/DOMException");
const alignmentStringsByIndex = [
"unknown", "none",
"xMinYMin", "xMidYMin", "xMaxYMin",
"xMinYMid", "xMidYMid", "xMaxYMid",
"xMinYMax", "xMidYMax", "xMaxYMax"
];
const alignmentIndicesByString = {
__proto__: null,
unknown: 0,
none: 1,
xMinYMin: 2,
xMidYMin: 3,
xMaxYMin: 4,
xMinYMid: 5,
xMidYMid: 6,
xMaxYMid: 7,
xMinYMax: 8,
xMidYMax: 9,
xMaxYMax: 10
};
const meetOrSliceStringsByIndex = ["unknown", "meet", "slice"];
const meetOrSliceIndicesByString = {
__proto__: null,
unknown: 0,
meet: 1,
slice: 2
};
// https://svgwg.org/svg2-draft/coords.html#PreserveAspectRatioAttribute
const preserveAspectRatioRegExp = /^(none|x(?:Min|Mid|Max)Y(?:Min|Mid|Max))(?: +(meet|slice))?$/;
class SVGPreserveAspectRatioImpl {
constructor(globalObject, args, privateData) {
this._globalObject = globalObject;
this._element = privateData.element;
this._readOnly = Boolean(privateData.readOnly);
}
_parse() {
const attrValue = this._element.getAttributeNS(null, "preserveAspectRatio");
if (attrValue) {
const value = preserveAspectRatioRegExp.exec(attrValue);
if (value) {
return {
align: value[1],
meetOrSlice: value[2] || "meet"
};
}
}
return {
align: "xMidYMid",
meetOrSlice: "meet"
};
}
get align() {
const { align } = this._parse();
return alignmentIndicesByString[align];
}
set align(value) {
if (this._readOnly) {
throw DOMException.create(this._globalObject, [
"Attempting to modify a read-only SVGPreserveAspectRatio",
"NoModificationAllowedError"
]);
}
const string = alignmentStringsByIndex[value];
if (string === "unknown" || string === undefined) {
throw new TypeError("Invalid alignment");
}
this._element.setAttributeNS(null, "preserveAspectRatio", `${string} ${this._parse().meetOrSlice}`);
}
get meetOrSlice() {
const { meetOrSlice } = this._parse();
return meetOrSliceIndicesByString[meetOrSlice];
}
set meetOrSlice(value) {
if (this._readOnly) {
throw DOMException.create(this._globalObject, [
"Attempting to modify a read-only SVGPreserveAspectRatio",
"NoModificationAllowedError"
]);
}
const string = meetOrSliceStringsByIndex[value];
if (string === "unknown" || string === undefined) {
throw new TypeError("Invalid meet-or-slice value");
}
this._element.setAttributeNS(null, "preserveAspectRatio", `${this._parse().align} ${string}`);
}
}
exports.implementation = SVGPreserveAspectRatioImpl;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0063 ]-- |