Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/embedpre.../assets/pdf/build
File: pdf.worker.js
marginV = this.margin.topInset + this.margin.bottomInset;
[48000] Fix | Delete
}
[48001] Fix | Delete
let borderDims = null;
[48002] Fix | Delete
if (this.w === "" || this.h === "") {
[48003] Fix | Delete
let width = null;
[48004] Fix | Delete
let height = null;
[48005] Fix | Delete
let uiW = 0;
[48006] Fix | Delete
let uiH = 0;
[48007] Fix | Delete
if (this.ui.checkButton) {
[48008] Fix | Delete
uiW = uiH = this.ui.checkButton.size;
[48009] Fix | Delete
} else {
[48010] Fix | Delete
const {
[48011] Fix | Delete
w,
[48012] Fix | Delete
h
[48013] Fix | Delete
} = layoutNode(this, availableSpace);
[48014] Fix | Delete
if (w !== null) {
[48015] Fix | Delete
uiW = w;
[48016] Fix | Delete
uiH = h;
[48017] Fix | Delete
} else {
[48018] Fix | Delete
uiH = fonts_getMetrics(this.font, true).lineNoGap;
[48019] Fix | Delete
}
[48020] Fix | Delete
}
[48021] Fix | Delete
borderDims = getBorderDims(this.ui[$getExtra]());
[48022] Fix | Delete
uiW += borderDims.w;
[48023] Fix | Delete
uiH += borderDims.h;
[48024] Fix | Delete
if (this.caption) {
[48025] Fix | Delete
const {
[48026] Fix | Delete
w,
[48027] Fix | Delete
h,
[48028] Fix | Delete
isBroken
[48029] Fix | Delete
} = this.caption[$getExtra](availableSpace);
[48030] Fix | Delete
if (isBroken && this[$getSubformParent]()[$isThereMoreWidth]()) {
[48031] Fix | Delete
this[$popPara]();
[48032] Fix | Delete
return HTMLResult.FAILURE;
[48033] Fix | Delete
}
[48034] Fix | Delete
width = w;
[48035] Fix | Delete
height = h;
[48036] Fix | Delete
switch (this.caption.placement) {
[48037] Fix | Delete
case "left":
[48038] Fix | Delete
case "right":
[48039] Fix | Delete
case "inline":
[48040] Fix | Delete
width += uiW;
[48041] Fix | Delete
break;
[48042] Fix | Delete
case "top":
[48043] Fix | Delete
case "bottom":
[48044] Fix | Delete
height += uiH;
[48045] Fix | Delete
break;
[48046] Fix | Delete
}
[48047] Fix | Delete
} else {
[48048] Fix | Delete
width = uiW;
[48049] Fix | Delete
height = uiH;
[48050] Fix | Delete
}
[48051] Fix | Delete
if (width && this.w === "") {
[48052] Fix | Delete
width += marginH;
[48053] Fix | Delete
this.w = Math.min(this.maxW <= 0 ? Infinity : this.maxW, this.minW + 1 < width ? width : this.minW);
[48054] Fix | Delete
}
[48055] Fix | Delete
if (height && this.h === "") {
[48056] Fix | Delete
height += marginV;
[48057] Fix | Delete
this.h = Math.min(this.maxH <= 0 ? Infinity : this.maxH, this.minH + 1 < height ? height : this.minH);
[48058] Fix | Delete
}
[48059] Fix | Delete
}
[48060] Fix | Delete
this[$popPara]();
[48061] Fix | Delete
fixDimensions(this);
[48062] Fix | Delete
setFirstUnsplittable(this);
[48063] Fix | Delete
if (!checkDimensions(this, availableSpace)) {
[48064] Fix | Delete
this.w = savedW;
[48065] Fix | Delete
this.h = savedH;
[48066] Fix | Delete
this[$popPara]();
[48067] Fix | Delete
return HTMLResult.FAILURE;
[48068] Fix | Delete
}
[48069] Fix | Delete
unsetFirstUnsplittable(this);
[48070] Fix | Delete
const style = toStyle(this, "font", "dimensions", "position", "rotate", "anchorType", "presence", "margin", "hAlign");
[48071] Fix | Delete
setMinMaxDimensions(this, style);
[48072] Fix | Delete
const classNames = ["xfaField"];
[48073] Fix | Delete
if (this.font) {
[48074] Fix | Delete
classNames.push("xfaFont");
[48075] Fix | Delete
}
[48076] Fix | Delete
if (isPrintOnly(this)) {
[48077] Fix | Delete
classNames.push("xfaPrintOnly");
[48078] Fix | Delete
}
[48079] Fix | Delete
const attributes = {
[48080] Fix | Delete
style,
[48081] Fix | Delete
id: this[$uid],
[48082] Fix | Delete
class: classNames
[48083] Fix | Delete
};
[48084] Fix | Delete
if (style.margin) {
[48085] Fix | Delete
style.padding = style.margin;
[48086] Fix | Delete
delete style.margin;
[48087] Fix | Delete
}
[48088] Fix | Delete
setAccess(this, classNames);
[48089] Fix | Delete
if (this.name) {
[48090] Fix | Delete
attributes.xfaName = this.name;
[48091] Fix | Delete
}
[48092] Fix | Delete
const children = [];
[48093] Fix | Delete
const html = {
[48094] Fix | Delete
name: "div",
[48095] Fix | Delete
attributes,
[48096] Fix | Delete
children
[48097] Fix | Delete
};
[48098] Fix | Delete
applyAssist(this, attributes);
[48099] Fix | Delete
const borderStyle = this.border ? this.border[$toStyle]() : null;
[48100] Fix | Delete
const bbox = computeBbox(this, html, availableSpace);
[48101] Fix | Delete
const ui = this.ui[$toHTML]().html;
[48102] Fix | Delete
if (!ui) {
[48103] Fix | Delete
Object.assign(style, borderStyle);
[48104] Fix | Delete
return HTMLResult.success(createWrapper(this, html), bbox);
[48105] Fix | Delete
}
[48106] Fix | Delete
if (this[$tabIndex]) {
[48107] Fix | Delete
if (ui.children?.[0]) {
[48108] Fix | Delete
ui.children[0].attributes.tabindex = this[$tabIndex];
[48109] Fix | Delete
} else {
[48110] Fix | Delete
ui.attributes.tabindex = this[$tabIndex];
[48111] Fix | Delete
}
[48112] Fix | Delete
}
[48113] Fix | Delete
if (!ui.attributes.style) {
[48114] Fix | Delete
ui.attributes.style = Object.create(null);
[48115] Fix | Delete
}
[48116] Fix | Delete
let aElement = null;
[48117] Fix | Delete
if (this.ui.button) {
[48118] Fix | Delete
if (ui.children.length === 1) {
[48119] Fix | Delete
[aElement] = ui.children.splice(0, 1);
[48120] Fix | Delete
}
[48121] Fix | Delete
Object.assign(ui.attributes.style, borderStyle);
[48122] Fix | Delete
} else {
[48123] Fix | Delete
Object.assign(style, borderStyle);
[48124] Fix | Delete
}
[48125] Fix | Delete
children.push(ui);
[48126] Fix | Delete
if (this.value) {
[48127] Fix | Delete
if (this.ui.imageEdit) {
[48128] Fix | Delete
ui.children.push(this.value[$toHTML]().html);
[48129] Fix | Delete
} else if (!this.ui.button) {
[48130] Fix | Delete
let value = "";
[48131] Fix | Delete
if (this.value.exData) {
[48132] Fix | Delete
value = this.value.exData[$text]();
[48133] Fix | Delete
} else if (this.value.text) {
[48134] Fix | Delete
value = this.value.text[$getExtra]();
[48135] Fix | Delete
} else {
[48136] Fix | Delete
const htmlValue = this.value[$toHTML]().html;
[48137] Fix | Delete
if (htmlValue !== null) {
[48138] Fix | Delete
value = htmlValue.children[0].value;
[48139] Fix | Delete
}
[48140] Fix | Delete
}
[48141] Fix | Delete
if (this.ui.textEdit && this.value.text?.maxChars) {
[48142] Fix | Delete
ui.children[0].attributes.maxLength = this.value.text.maxChars;
[48143] Fix | Delete
}
[48144] Fix | Delete
if (value) {
[48145] Fix | Delete
if (this.ui.numericEdit) {
[48146] Fix | Delete
value = parseFloat(value);
[48147] Fix | Delete
value = isNaN(value) ? "" : value.toString();
[48148] Fix | Delete
}
[48149] Fix | Delete
if (ui.children[0].name === "textarea") {
[48150] Fix | Delete
ui.children[0].attributes.textContent = value;
[48151] Fix | Delete
} else {
[48152] Fix | Delete
ui.children[0].attributes.value = value;
[48153] Fix | Delete
}
[48154] Fix | Delete
}
[48155] Fix | Delete
}
[48156] Fix | Delete
}
[48157] Fix | Delete
if (!this.ui.imageEdit && ui.children?.[0] && this.h) {
[48158] Fix | Delete
borderDims = borderDims || getBorderDims(this.ui[$getExtra]());
[48159] Fix | Delete
let captionHeight = 0;
[48160] Fix | Delete
if (this.caption && ["top", "bottom"].includes(this.caption.placement)) {
[48161] Fix | Delete
captionHeight = this.caption.reserve;
[48162] Fix | Delete
if (captionHeight <= 0) {
[48163] Fix | Delete
captionHeight = this.caption[$getExtra](availableSpace).h;
[48164] Fix | Delete
}
[48165] Fix | Delete
const inputHeight = this.h - captionHeight - marginV - borderDims.h;
[48166] Fix | Delete
ui.children[0].attributes.style.height = measureToString(inputHeight);
[48167] Fix | Delete
} else {
[48168] Fix | Delete
ui.children[0].attributes.style.height = "100%";
[48169] Fix | Delete
}
[48170] Fix | Delete
}
[48171] Fix | Delete
if (aElement) {
[48172] Fix | Delete
ui.children.push(aElement);
[48173] Fix | Delete
}
[48174] Fix | Delete
if (!caption) {
[48175] Fix | Delete
if (ui.attributes.class) {
[48176] Fix | Delete
ui.attributes.class.push("xfaLeft");
[48177] Fix | Delete
}
[48178] Fix | Delete
this.w = savedW;
[48179] Fix | Delete
this.h = savedH;
[48180] Fix | Delete
return HTMLResult.success(createWrapper(this, html), bbox);
[48181] Fix | Delete
}
[48182] Fix | Delete
if (this.ui.button) {
[48183] Fix | Delete
if (style.padding) {
[48184] Fix | Delete
delete style.padding;
[48185] Fix | Delete
}
[48186] Fix | Delete
if (caption.name === "div") {
[48187] Fix | Delete
caption.name = "span";
[48188] Fix | Delete
}
[48189] Fix | Delete
ui.children.push(caption);
[48190] Fix | Delete
return HTMLResult.success(html, bbox);
[48191] Fix | Delete
} else if (this.ui.checkButton) {
[48192] Fix | Delete
caption.attributes.class[0] = "xfaCaptionForCheckButton";
[48193] Fix | Delete
}
[48194] Fix | Delete
if (!ui.attributes.class) {
[48195] Fix | Delete
ui.attributes.class = [];
[48196] Fix | Delete
}
[48197] Fix | Delete
ui.children.splice(0, 0, caption);
[48198] Fix | Delete
switch (this.caption.placement) {
[48199] Fix | Delete
case "left":
[48200] Fix | Delete
ui.attributes.class.push("xfaLeft");
[48201] Fix | Delete
break;
[48202] Fix | Delete
case "right":
[48203] Fix | Delete
ui.attributes.class.push("xfaRight");
[48204] Fix | Delete
break;
[48205] Fix | Delete
case "top":
[48206] Fix | Delete
ui.attributes.class.push("xfaTop");
[48207] Fix | Delete
break;
[48208] Fix | Delete
case "bottom":
[48209] Fix | Delete
ui.attributes.class.push("xfaBottom");
[48210] Fix | Delete
break;
[48211] Fix | Delete
case "inline":
[48212] Fix | Delete
ui.attributes.class.push("xfaLeft");
[48213] Fix | Delete
break;
[48214] Fix | Delete
}
[48215] Fix | Delete
this.w = savedW;
[48216] Fix | Delete
this.h = savedH;
[48217] Fix | Delete
return HTMLResult.success(createWrapper(this, html), bbox);
[48218] Fix | Delete
}
[48219] Fix | Delete
}
[48220] Fix | Delete
class Fill extends XFAObject {
[48221] Fix | Delete
constructor(attributes) {
[48222] Fix | Delete
super(TEMPLATE_NS_ID, "fill", true);
[48223] Fix | Delete
this.id = attributes.id || "";
[48224] Fix | Delete
this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]);
[48225] Fix | Delete
this.use = attributes.use || "";
[48226] Fix | Delete
this.usehref = attributes.usehref || "";
[48227] Fix | Delete
this.color = null;
[48228] Fix | Delete
this.extras = null;
[48229] Fix | Delete
this.linear = null;
[48230] Fix | Delete
this.pattern = null;
[48231] Fix | Delete
this.radial = null;
[48232] Fix | Delete
this.solid = null;
[48233] Fix | Delete
this.stipple = null;
[48234] Fix | Delete
}
[48235] Fix | Delete
[$toStyle]() {
[48236] Fix | Delete
const parent = this[$getParent]();
[48237] Fix | Delete
const grandpa = parent[$getParent]();
[48238] Fix | Delete
const ggrandpa = grandpa[$getParent]();
[48239] Fix | Delete
const style = Object.create(null);
[48240] Fix | Delete
let propName = "color";
[48241] Fix | Delete
let altPropName = propName;
[48242] Fix | Delete
if (parent instanceof Border) {
[48243] Fix | Delete
propName = "background-color";
[48244] Fix | Delete
altPropName = "background";
[48245] Fix | Delete
if (ggrandpa instanceof Ui) {
[48246] Fix | Delete
style.backgroundColor = "white";
[48247] Fix | Delete
}
[48248] Fix | Delete
}
[48249] Fix | Delete
if (parent instanceof Rectangle || parent instanceof Arc) {
[48250] Fix | Delete
propName = altPropName = "fill";
[48251] Fix | Delete
style.fill = "white";
[48252] Fix | Delete
}
[48253] Fix | Delete
for (const name of Object.getOwnPropertyNames(this)) {
[48254] Fix | Delete
if (name === "extras" || name === "color") {
[48255] Fix | Delete
continue;
[48256] Fix | Delete
}
[48257] Fix | Delete
const obj = this[name];
[48258] Fix | Delete
if (!(obj instanceof XFAObject)) {
[48259] Fix | Delete
continue;
[48260] Fix | Delete
}
[48261] Fix | Delete
const color = obj[$toStyle](this.color);
[48262] Fix | Delete
if (color) {
[48263] Fix | Delete
style[color.startsWith("#") ? propName : altPropName] = color;
[48264] Fix | Delete
}
[48265] Fix | Delete
return style;
[48266] Fix | Delete
}
[48267] Fix | Delete
if (this.color?.value) {
[48268] Fix | Delete
const color = this.color[$toStyle]();
[48269] Fix | Delete
style[color.startsWith("#") ? propName : altPropName] = color;
[48270] Fix | Delete
}
[48271] Fix | Delete
return style;
[48272] Fix | Delete
}
[48273] Fix | Delete
}
[48274] Fix | Delete
class Filter extends XFAObject {
[48275] Fix | Delete
constructor(attributes) {
[48276] Fix | Delete
super(TEMPLATE_NS_ID, "filter", true);
[48277] Fix | Delete
this.addRevocationInfo = getStringOption(attributes.addRevocationInfo, ["", "required", "optional", "none"]);
[48278] Fix | Delete
this.id = attributes.id || "";
[48279] Fix | Delete
this.name = attributes.name || "";
[48280] Fix | Delete
this.use = attributes.use || "";
[48281] Fix | Delete
this.usehref = attributes.usehref || "";
[48282] Fix | Delete
this.version = getInteger({
[48283] Fix | Delete
data: this.version,
[48284] Fix | Delete
defaultValue: 5,
[48285] Fix | Delete
validate: x => x >= 1 && x <= 5
[48286] Fix | Delete
});
[48287] Fix | Delete
this.appearanceFilter = null;
[48288] Fix | Delete
this.certificates = null;
[48289] Fix | Delete
this.digestMethods = null;
[48290] Fix | Delete
this.encodings = null;
[48291] Fix | Delete
this.encryptionMethods = null;
[48292] Fix | Delete
this.handler = null;
[48293] Fix | Delete
this.lockDocument = null;
[48294] Fix | Delete
this.mdp = null;
[48295] Fix | Delete
this.reasons = null;
[48296] Fix | Delete
this.timeStamp = null;
[48297] Fix | Delete
}
[48298] Fix | Delete
}
[48299] Fix | Delete
class Float extends ContentObject {
[48300] Fix | Delete
constructor(attributes) {
[48301] Fix | Delete
super(TEMPLATE_NS_ID, "float");
[48302] Fix | Delete
this.id = attributes.id || "";
[48303] Fix | Delete
this.name = attributes.name || "";
[48304] Fix | Delete
this.use = attributes.use || "";
[48305] Fix | Delete
this.usehref = attributes.usehref || "";
[48306] Fix | Delete
}
[48307] Fix | Delete
[$finalize]() {
[48308] Fix | Delete
const number = parseFloat(this[$content].trim());
[48309] Fix | Delete
this[$content] = isNaN(number) ? null : number;
[48310] Fix | Delete
}
[48311] Fix | Delete
[$toHTML](availableSpace) {
[48312] Fix | Delete
return valueToHtml(this[$content] !== null ? this[$content].toString() : "");
[48313] Fix | Delete
}
[48314] Fix | Delete
}
[48315] Fix | Delete
class template_Font extends XFAObject {
[48316] Fix | Delete
constructor(attributes) {
[48317] Fix | Delete
super(TEMPLATE_NS_ID, "font", true);
[48318] Fix | Delete
this.baselineShift = getMeasurement(attributes.baselineShift);
[48319] Fix | Delete
this.fontHorizontalScale = getFloat({
[48320] Fix | Delete
data: attributes.fontHorizontalScale,
[48321] Fix | Delete
defaultValue: 100,
[48322] Fix | Delete
validate: x => x >= 0
[48323] Fix | Delete
});
[48324] Fix | Delete
this.fontVerticalScale = getFloat({
[48325] Fix | Delete
data: attributes.fontVerticalScale,
[48326] Fix | Delete
defaultValue: 100,
[48327] Fix | Delete
validate: x => x >= 0
[48328] Fix | Delete
});
[48329] Fix | Delete
this.id = attributes.id || "";
[48330] Fix | Delete
this.kerningMode = getStringOption(attributes.kerningMode, ["none", "pair"]);
[48331] Fix | Delete
this.letterSpacing = getMeasurement(attributes.letterSpacing, "0");
[48332] Fix | Delete
this.lineThrough = getInteger({
[48333] Fix | Delete
data: attributes.lineThrough,
[48334] Fix | Delete
defaultValue: 0,
[48335] Fix | Delete
validate: x => x === 1 || x === 2
[48336] Fix | Delete
});
[48337] Fix | Delete
this.lineThroughPeriod = getStringOption(attributes.lineThroughPeriod, ["all", "word"]);
[48338] Fix | Delete
this.overline = getInteger({
[48339] Fix | Delete
data: attributes.overline,
[48340] Fix | Delete
defaultValue: 0,
[48341] Fix | Delete
validate: x => x === 1 || x === 2
[48342] Fix | Delete
});
[48343] Fix | Delete
this.overlinePeriod = getStringOption(attributes.overlinePeriod, ["all", "word"]);
[48344] Fix | Delete
this.posture = getStringOption(attributes.posture, ["normal", "italic"]);
[48345] Fix | Delete
this.size = getMeasurement(attributes.size, "10pt");
[48346] Fix | Delete
this.typeface = attributes.typeface || "Courier";
[48347] Fix | Delete
this.underline = getInteger({
[48348] Fix | Delete
data: attributes.underline,
[48349] Fix | Delete
defaultValue: 0,
[48350] Fix | Delete
validate: x => x === 1 || x === 2
[48351] Fix | Delete
});
[48352] Fix | Delete
this.underlinePeriod = getStringOption(attributes.underlinePeriod, ["all", "word"]);
[48353] Fix | Delete
this.use = attributes.use || "";
[48354] Fix | Delete
this.usehref = attributes.usehref || "";
[48355] Fix | Delete
this.weight = getStringOption(attributes.weight, ["normal", "bold"]);
[48356] Fix | Delete
this.extras = null;
[48357] Fix | Delete
this.fill = null;
[48358] Fix | Delete
}
[48359] Fix | Delete
[$clean](builder) {
[48360] Fix | Delete
super[$clean](builder);
[48361] Fix | Delete
this[$globalData].usedTypefaces.add(this.typeface);
[48362] Fix | Delete
}
[48363] Fix | Delete
[$toStyle]() {
[48364] Fix | Delete
const style = toStyle(this, "fill");
[48365] Fix | Delete
const color = style.color;
[48366] Fix | Delete
if (color) {
[48367] Fix | Delete
if (color === "#000000") {
[48368] Fix | Delete
delete style.color;
[48369] Fix | Delete
} else if (!color.startsWith("#")) {
[48370] Fix | Delete
style.background = color;
[48371] Fix | Delete
style.backgroundClip = "text";
[48372] Fix | Delete
style.color = "transparent";
[48373] Fix | Delete
}
[48374] Fix | Delete
}
[48375] Fix | Delete
if (this.baselineShift) {
[48376] Fix | Delete
style.verticalAlign = measureToString(this.baselineShift);
[48377] Fix | Delete
}
[48378] Fix | Delete
style.fontKerning = this.kerningMode === "none" ? "none" : "normal";
[48379] Fix | Delete
style.letterSpacing = measureToString(this.letterSpacing);
[48380] Fix | Delete
if (this.lineThrough !== 0) {
[48381] Fix | Delete
style.textDecoration = "line-through";
[48382] Fix | Delete
if (this.lineThrough === 2) {
[48383] Fix | Delete
style.textDecorationStyle = "double";
[48384] Fix | Delete
}
[48385] Fix | Delete
}
[48386] Fix | Delete
if (this.overline !== 0) {
[48387] Fix | Delete
style.textDecoration = "overline";
[48388] Fix | Delete
if (this.overline === 2) {
[48389] Fix | Delete
style.textDecorationStyle = "double";
[48390] Fix | Delete
}
[48391] Fix | Delete
}
[48392] Fix | Delete
style.fontStyle = this.posture;
[48393] Fix | Delete
style.fontSize = measureToString(0.99 * this.size);
[48394] Fix | Delete
setFontFamily(this, this, this[$globalData].fontFinder, style);
[48395] Fix | Delete
if (this.underline !== 0) {
[48396] Fix | Delete
style.textDecoration = "underline";
[48397] Fix | Delete
if (this.underline === 2) {
[48398] Fix | Delete
style.textDecorationStyle = "double";
[48399] Fix | Delete
}
[48400] Fix | Delete
}
[48401] Fix | Delete
style.fontWeight = this.weight;
[48402] Fix | Delete
return style;
[48403] Fix | Delete
}
[48404] Fix | Delete
}
[48405] Fix | Delete
class Format extends XFAObject {
[48406] Fix | Delete
constructor(attributes) {
[48407] Fix | Delete
super(TEMPLATE_NS_ID, "format", true);
[48408] Fix | Delete
this.id = attributes.id || "";
[48409] Fix | Delete
this.use = attributes.use || "";
[48410] Fix | Delete
this.usehref = attributes.usehref || "";
[48411] Fix | Delete
this.extras = null;
[48412] Fix | Delete
this.picture = null;
[48413] Fix | Delete
}
[48414] Fix | Delete
}
[48415] Fix | Delete
class Handler extends StringObject {
[48416] Fix | Delete
constructor(attributes) {
[48417] Fix | Delete
super(TEMPLATE_NS_ID, "handler");
[48418] Fix | Delete
this.id = attributes.id || "";
[48419] Fix | Delete
this.type = getStringOption(attributes.type, ["optional", "required"]);
[48420] Fix | Delete
this.use = attributes.use || "";
[48421] Fix | Delete
this.usehref = attributes.usehref || "";
[48422] Fix | Delete
}
[48423] Fix | Delete
}
[48424] Fix | Delete
class Hyphenation extends XFAObject {
[48425] Fix | Delete
constructor(attributes) {
[48426] Fix | Delete
super(TEMPLATE_NS_ID, "hyphenation");
[48427] Fix | Delete
this.excludeAllCaps = getInteger({
[48428] Fix | Delete
data: attributes.excludeAllCaps,
[48429] Fix | Delete
defaultValue: 0,
[48430] Fix | Delete
validate: x => x === 1
[48431] Fix | Delete
});
[48432] Fix | Delete
this.excludeInitialCap = getInteger({
[48433] Fix | Delete
data: attributes.excludeInitialCap,
[48434] Fix | Delete
defaultValue: 0,
[48435] Fix | Delete
validate: x => x === 1
[48436] Fix | Delete
});
[48437] Fix | Delete
this.hyphenate = getInteger({
[48438] Fix | Delete
data: attributes.hyphenate,
[48439] Fix | Delete
defaultValue: 0,
[48440] Fix | Delete
validate: x => x === 1
[48441] Fix | Delete
});
[48442] Fix | Delete
this.id = attributes.id || "";
[48443] Fix | Delete
this.pushCharacterCount = getInteger({
[48444] Fix | Delete
data: attributes.pushCharacterCount,
[48445] Fix | Delete
defaultValue: 3,
[48446] Fix | Delete
validate: x => x >= 0
[48447] Fix | Delete
});
[48448] Fix | Delete
this.remainCharacterCount = getInteger({
[48449] Fix | Delete
data: attributes.remainCharacterCount,
[48450] Fix | Delete
defaultValue: 3,
[48451] Fix | Delete
validate: x => x >= 0
[48452] Fix | Delete
});
[48453] Fix | Delete
this.use = attributes.use || "";
[48454] Fix | Delete
this.usehref = attributes.usehref || "";
[48455] Fix | Delete
this.wordCharacterCount = getInteger({
[48456] Fix | Delete
data: attributes.wordCharacterCount,
[48457] Fix | Delete
defaultValue: 7,
[48458] Fix | Delete
validate: x => x >= 0
[48459] Fix | Delete
});
[48460] Fix | Delete
}
[48461] Fix | Delete
}
[48462] Fix | Delete
class Image extends StringObject {
[48463] Fix | Delete
constructor(attributes) {
[48464] Fix | Delete
super(TEMPLATE_NS_ID, "image");
[48465] Fix | Delete
this.aspect = getStringOption(attributes.aspect, ["fit", "actual", "height", "none", "width"]);
[48466] Fix | Delete
this.contentType = attributes.contentType || "";
[48467] Fix | Delete
this.href = attributes.href || "";
[48468] Fix | Delete
this.id = attributes.id || "";
[48469] Fix | Delete
this.name = attributes.name || "";
[48470] Fix | Delete
this.transferEncoding = getStringOption(attributes.transferEncoding, ["base64", "none", "package"]);
[48471] Fix | Delete
this.use = attributes.use || "";
[48472] Fix | Delete
this.usehref = attributes.usehref || "";
[48473] Fix | Delete
}
[48474] Fix | Delete
[$toHTML]() {
[48475] Fix | Delete
if (this.contentType && !MIMES.has(this.contentType.toLowerCase())) {
[48476] Fix | Delete
return HTMLResult.EMPTY;
[48477] Fix | Delete
}
[48478] Fix | Delete
let buffer = this[$globalData].images && this[$globalData].images.get(this.href);
[48479] Fix | Delete
if (!buffer && (this.href || !this[$content])) {
[48480] Fix | Delete
return HTMLResult.EMPTY;
[48481] Fix | Delete
}
[48482] Fix | Delete
if (!buffer && this.transferEncoding === "base64") {
[48483] Fix | Delete
buffer = stringToBytes(atob(this[$content]));
[48484] Fix | Delete
}
[48485] Fix | Delete
if (!buffer) {
[48486] Fix | Delete
return HTMLResult.EMPTY;
[48487] Fix | Delete
}
[48488] Fix | Delete
if (!this.contentType) {
[48489] Fix | Delete
for (const [header, type] of IMAGES_HEADERS) {
[48490] Fix | Delete
if (buffer.length > header.length && header.every((x, i) => x === buffer[i])) {
[48491] Fix | Delete
this.contentType = type;
[48492] Fix | Delete
break;
[48493] Fix | Delete
}
[48494] Fix | Delete
}
[48495] Fix | Delete
if (!this.contentType) {
[48496] Fix | Delete
return HTMLResult.EMPTY;
[48497] Fix | Delete
}
[48498] Fix | Delete
}
[48499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function