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/web
File: viewer.js
},
[4500] Fix | Delete
supportsDocumentFonts: {
[4501] Fix | Delete
value: true,
[4502] Fix | Delete
kind: OptionKind.BROWSER
[4503] Fix | Delete
},
[4504] Fix | Delete
supportsIntegratedFind: {
[4505] Fix | Delete
value: false,
[4506] Fix | Delete
kind: OptionKind.BROWSER
[4507] Fix | Delete
},
[4508] Fix | Delete
supportsMouseWheelZoomCtrlKey: {
[4509] Fix | Delete
value: true,
[4510] Fix | Delete
kind: OptionKind.BROWSER
[4511] Fix | Delete
},
[4512] Fix | Delete
supportsMouseWheelZoomMetaKey: {
[4513] Fix | Delete
value: true,
[4514] Fix | Delete
kind: OptionKind.BROWSER
[4515] Fix | Delete
},
[4516] Fix | Delete
supportsPinchToZoom: {
[4517] Fix | Delete
value: true,
[4518] Fix | Delete
kind: OptionKind.BROWSER
[4519] Fix | Delete
},
[4520] Fix | Delete
annotationEditorMode: {
[4521] Fix | Delete
value: 0,
[4522] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4523] Fix | Delete
},
[4524] Fix | Delete
annotationMode: {
[4525] Fix | Delete
value: 2,
[4526] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4527] Fix | Delete
},
[4528] Fix | Delete
cursorToolOnLoad: {
[4529] Fix | Delete
value: 0,
[4530] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4531] Fix | Delete
},
[4532] Fix | Delete
debuggerSrc: {
[4533] Fix | Delete
value: "./debugger.js",
[4534] Fix | Delete
kind: OptionKind.VIEWER
[4535] Fix | Delete
},
[4536] Fix | Delete
defaultZoomDelay: {
[4537] Fix | Delete
value: 400,
[4538] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4539] Fix | Delete
},
[4540] Fix | Delete
defaultZoomValue: {
[4541] Fix | Delete
value: "",
[4542] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4543] Fix | Delete
},
[4544] Fix | Delete
disableHistory: {
[4545] Fix | Delete
value: false,
[4546] Fix | Delete
kind: OptionKind.VIEWER
[4547] Fix | Delete
},
[4548] Fix | Delete
disablePageLabels: {
[4549] Fix | Delete
value: false,
[4550] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4551] Fix | Delete
},
[4552] Fix | Delete
enableHighlightEditor: {
[4553] Fix | Delete
value: false,
[4554] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4555] Fix | Delete
},
[4556] Fix | Delete
enableHighlightFloatingButton: {
[4557] Fix | Delete
value: false,
[4558] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4559] Fix | Delete
},
[4560] Fix | Delete
enableML: {
[4561] Fix | Delete
value: false,
[4562] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4563] Fix | Delete
},
[4564] Fix | Delete
enablePermissions: {
[4565] Fix | Delete
value: false,
[4566] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4567] Fix | Delete
},
[4568] Fix | Delete
enablePrintAutoRotate: {
[4569] Fix | Delete
value: true,
[4570] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4571] Fix | Delete
},
[4572] Fix | Delete
enableScripting: {
[4573] Fix | Delete
value: true,
[4574] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4575] Fix | Delete
},
[4576] Fix | Delete
enableStampEditor: {
[4577] Fix | Delete
value: true,
[4578] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4579] Fix | Delete
},
[4580] Fix | Delete
externalLinkRel: {
[4581] Fix | Delete
value: "noopener noreferrer nofollow",
[4582] Fix | Delete
kind: OptionKind.VIEWER
[4583] Fix | Delete
},
[4584] Fix | Delete
externalLinkTarget: {
[4585] Fix | Delete
value: 0,
[4586] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4587] Fix | Delete
},
[4588] Fix | Delete
highlightEditorColors: {
[4589] Fix | Delete
value: "yellow=#FFFF98,green=#53FFBC,blue=#80EBFF,pink=#FFCBE6,red=#FF4F5F",
[4590] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4591] Fix | Delete
},
[4592] Fix | Delete
historyUpdateUrl: {
[4593] Fix | Delete
value: false,
[4594] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4595] Fix | Delete
},
[4596] Fix | Delete
ignoreDestinationZoom: {
[4597] Fix | Delete
value: false,
[4598] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4599] Fix | Delete
},
[4600] Fix | Delete
imageResourcesPath: {
[4601] Fix | Delete
value: "./images/",
[4602] Fix | Delete
kind: OptionKind.VIEWER
[4603] Fix | Delete
},
[4604] Fix | Delete
maxCanvasPixels: {
[4605] Fix | Delete
value: 2 ** 25,
[4606] Fix | Delete
kind: OptionKind.VIEWER
[4607] Fix | Delete
},
[4608] Fix | Delete
forcePageColors: {
[4609] Fix | Delete
value: false,
[4610] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4611] Fix | Delete
},
[4612] Fix | Delete
pageColorsBackground: {
[4613] Fix | Delete
value: "Canvas",
[4614] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4615] Fix | Delete
},
[4616] Fix | Delete
pageColorsForeground: {
[4617] Fix | Delete
value: "CanvasText",
[4618] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4619] Fix | Delete
},
[4620] Fix | Delete
pdfBugEnabled: {
[4621] Fix | Delete
value: false,
[4622] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4623] Fix | Delete
},
[4624] Fix | Delete
printResolution: {
[4625] Fix | Delete
value: 150,
[4626] Fix | Delete
kind: OptionKind.VIEWER
[4627] Fix | Delete
},
[4628] Fix | Delete
sidebarViewOnLoad: {
[4629] Fix | Delete
value: -1,
[4630] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4631] Fix | Delete
},
[4632] Fix | Delete
scrollModeOnLoad: {
[4633] Fix | Delete
value: -1,
[4634] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4635] Fix | Delete
},
[4636] Fix | Delete
spreadModeOnLoad: {
[4637] Fix | Delete
value: -1,
[4638] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4639] Fix | Delete
},
[4640] Fix | Delete
textLayerMode: {
[4641] Fix | Delete
value: 1,
[4642] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4643] Fix | Delete
},
[4644] Fix | Delete
viewOnLoad: {
[4645] Fix | Delete
value: 0,
[4646] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4647] Fix | Delete
},
[4648] Fix | Delete
cMapPacked: {
[4649] Fix | Delete
value: true,
[4650] Fix | Delete
kind: OptionKind.API
[4651] Fix | Delete
},
[4652] Fix | Delete
cMapUrl: {
[4653] Fix | Delete
value: "../web/cmaps/",
[4654] Fix | Delete
kind: OptionKind.API
[4655] Fix | Delete
},
[4656] Fix | Delete
disableAutoFetch: {
[4657] Fix | Delete
value: false,
[4658] Fix | Delete
kind: OptionKind.API + OptionKind.PREFERENCE
[4659] Fix | Delete
},
[4660] Fix | Delete
disableFontFace: {
[4661] Fix | Delete
value: false,
[4662] Fix | Delete
kind: OptionKind.API + OptionKind.PREFERENCE
[4663] Fix | Delete
},
[4664] Fix | Delete
disableRange: {
[4665] Fix | Delete
value: false,
[4666] Fix | Delete
kind: OptionKind.API + OptionKind.PREFERENCE
[4667] Fix | Delete
},
[4668] Fix | Delete
disableStream: {
[4669] Fix | Delete
value: false,
[4670] Fix | Delete
kind: OptionKind.API + OptionKind.PREFERENCE
[4671] Fix | Delete
},
[4672] Fix | Delete
docBaseUrl: {
[4673] Fix | Delete
value: "",
[4674] Fix | Delete
kind: OptionKind.API
[4675] Fix | Delete
},
[4676] Fix | Delete
enableXfa: {
[4677] Fix | Delete
value: true,
[4678] Fix | Delete
kind: OptionKind.API + OptionKind.PREFERENCE
[4679] Fix | Delete
},
[4680] Fix | Delete
fontExtraProperties: {
[4681] Fix | Delete
value: false,
[4682] Fix | Delete
kind: OptionKind.API
[4683] Fix | Delete
},
[4684] Fix | Delete
isEvalSupported: {
[4685] Fix | Delete
value: true,
[4686] Fix | Delete
kind: OptionKind.API
[4687] Fix | Delete
},
[4688] Fix | Delete
isOffscreenCanvasSupported: {
[4689] Fix | Delete
value: true,
[4690] Fix | Delete
kind: OptionKind.API
[4691] Fix | Delete
},
[4692] Fix | Delete
maxImageSize: {
[4693] Fix | Delete
value: -1,
[4694] Fix | Delete
kind: OptionKind.API
[4695] Fix | Delete
},
[4696] Fix | Delete
pdfBug: {
[4697] Fix | Delete
value: false,
[4698] Fix | Delete
kind: OptionKind.API
[4699] Fix | Delete
},
[4700] Fix | Delete
standardFontDataUrl: {
[4701] Fix | Delete
value: "../web/standard_fonts/",
[4702] Fix | Delete
kind: OptionKind.API
[4703] Fix | Delete
},
[4704] Fix | Delete
verbosity: {
[4705] Fix | Delete
value: 1,
[4706] Fix | Delete
kind: OptionKind.API
[4707] Fix | Delete
},
[4708] Fix | Delete
workerPort: {
[4709] Fix | Delete
value: null,
[4710] Fix | Delete
kind: OptionKind.WORKER
[4711] Fix | Delete
},
[4712] Fix | Delete
workerSrc: {
[4713] Fix | Delete
value: "../build/pdf.worker.js",
[4714] Fix | Delete
kind: OptionKind.WORKER
[4715] Fix | Delete
}
[4716] Fix | Delete
};
[4717] Fix | Delete
{
[4718] Fix | Delete
defaultOptions.defaultUrl = {
[4719] Fix | Delete
value: "compressed.tracemonkey-pldi-09.pdf",
[4720] Fix | Delete
kind: OptionKind.VIEWER
[4721] Fix | Delete
};
[4722] Fix | Delete
defaultOptions.sandboxBundleSrc = {
[4723] Fix | Delete
value: "../build/pdf.sandbox.js",
[4724] Fix | Delete
kind: OptionKind.VIEWER
[4725] Fix | Delete
};
[4726] Fix | Delete
defaultOptions.viewerCssTheme = {
[4727] Fix | Delete
value: 0,
[4728] Fix | Delete
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
[4729] Fix | Delete
};
[4730] Fix | Delete
}
[4731] Fix | Delete
{
[4732] Fix | Delete
defaultOptions.disablePreferences = {
[4733] Fix | Delete
value: false,
[4734] Fix | Delete
kind: OptionKind.VIEWER
[4735] Fix | Delete
};
[4736] Fix | Delete
defaultOptions.locale = {
[4737] Fix | Delete
value: navigator.language || "en-US",
[4738] Fix | Delete
kind: OptionKind.VIEWER
[4739] Fix | Delete
};
[4740] Fix | Delete
}
[4741] Fix | Delete
const userOptions = Object.create(null);
[4742] Fix | Delete
{
[4743] Fix | Delete
for (const name in compatibilityParams) {
[4744] Fix | Delete
userOptions[name] = compatibilityParams[name];
[4745] Fix | Delete
}
[4746] Fix | Delete
}
[4747] Fix | Delete
class AppOptions {
[4748] Fix | Delete
constructor() {
[4749] Fix | Delete
throw new Error("Cannot initialize AppOptions.");
[4750] Fix | Delete
}
[4751] Fix | Delete
static get(name) {
[4752] Fix | Delete
return userOptions[name] ?? defaultOptions[name]?.value ?? undefined;
[4753] Fix | Delete
}
[4754] Fix | Delete
static getAll(kind = null, defaultOnly = false) {
[4755] Fix | Delete
const options = Object.create(null);
[4756] Fix | Delete
for (const name in defaultOptions) {
[4757] Fix | Delete
const defaultOption = defaultOptions[name];
[4758] Fix | Delete
if (kind && !(kind & defaultOption.kind)) {
[4759] Fix | Delete
continue;
[4760] Fix | Delete
}
[4761] Fix | Delete
options[name] = defaultOnly ? defaultOption.value : userOptions[name] ?? defaultOption.value;
[4762] Fix | Delete
}
[4763] Fix | Delete
return options;
[4764] Fix | Delete
}
[4765] Fix | Delete
static set(name, value) {
[4766] Fix | Delete
userOptions[name] = value;
[4767] Fix | Delete
}
[4768] Fix | Delete
static setAll(options, init = false) {
[4769] Fix | Delete
if (init) {
[4770] Fix | Delete
if (this.get("disablePreferences")) {
[4771] Fix | Delete
return;
[4772] Fix | Delete
}
[4773] Fix | Delete
for (const name in userOptions) {
[4774] Fix | Delete
if (compatibilityParams[name] !== undefined) {
[4775] Fix | Delete
continue;
[4776] Fix | Delete
}
[4777] Fix | Delete
console.warn("setAll: The Preferences may override manually set AppOptions; " + 'please use the "disablePreferences"-option in order to prevent that.');
[4778] Fix | Delete
break;
[4779] Fix | Delete
}
[4780] Fix | Delete
}
[4781] Fix | Delete
for (const name in options) {
[4782] Fix | Delete
userOptions[name] = options[name];
[4783] Fix | Delete
}
[4784] Fix | Delete
}
[4785] Fix | Delete
static remove(name) {
[4786] Fix | Delete
delete userOptions[name];
[4787] Fix | Delete
const val = compatibilityParams[name];
[4788] Fix | Delete
if (val !== undefined) {
[4789] Fix | Delete
userOptions[name] = val;
[4790] Fix | Delete
}
[4791] Fix | Delete
}
[4792] Fix | Delete
}
[4793] Fix | Delete
[4794] Fix | Delete
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.json.parse.js
[4795] Fix | Delete
var esnext_json_parse = __webpack_require__(8335);
[4796] Fix | Delete
;// CONCATENATED MODULE: ./web/pdf_link_service.js
[4797] Fix | Delete
[4798] Fix | Delete
[4799] Fix | Delete
[4800] Fix | Delete
const DEFAULT_LINK_REL = "noopener noreferrer nofollow";
[4801] Fix | Delete
const LinkTarget = {
[4802] Fix | Delete
NONE: 0,
[4803] Fix | Delete
SELF: 1,
[4804] Fix | Delete
BLANK: 2,
[4805] Fix | Delete
PARENT: 3,
[4806] Fix | Delete
TOP: 4
[4807] Fix | Delete
};
[4808] Fix | Delete
class PDFLinkService {
[4809] Fix | Delete
externalLinkEnabled = true;
[4810] Fix | Delete
constructor({
[4811] Fix | Delete
eventBus,
[4812] Fix | Delete
externalLinkTarget = null,
[4813] Fix | Delete
externalLinkRel = null,
[4814] Fix | Delete
ignoreDestinationZoom = false
[4815] Fix | Delete
} = {}) {
[4816] Fix | Delete
this.eventBus = eventBus;
[4817] Fix | Delete
this.externalLinkTarget = externalLinkTarget;
[4818] Fix | Delete
this.externalLinkRel = externalLinkRel;
[4819] Fix | Delete
this._ignoreDestinationZoom = ignoreDestinationZoom;
[4820] Fix | Delete
this.baseUrl = null;
[4821] Fix | Delete
this.pdfDocument = null;
[4822] Fix | Delete
this.pdfViewer = null;
[4823] Fix | Delete
this.pdfHistory = null;
[4824] Fix | Delete
}
[4825] Fix | Delete
setDocument(pdfDocument, baseUrl = null) {
[4826] Fix | Delete
this.baseUrl = baseUrl;
[4827] Fix | Delete
this.pdfDocument = pdfDocument;
[4828] Fix | Delete
}
[4829] Fix | Delete
setViewer(pdfViewer) {
[4830] Fix | Delete
this.pdfViewer = pdfViewer;
[4831] Fix | Delete
}
[4832] Fix | Delete
setHistory(pdfHistory) {
[4833] Fix | Delete
this.pdfHistory = pdfHistory;
[4834] Fix | Delete
}
[4835] Fix | Delete
get pagesCount() {
[4836] Fix | Delete
return this.pdfDocument ? this.pdfDocument.numPages : 0;
[4837] Fix | Delete
}
[4838] Fix | Delete
get page() {
[4839] Fix | Delete
return this.pdfDocument ? this.pdfViewer.currentPageNumber : 1;
[4840] Fix | Delete
}
[4841] Fix | Delete
set page(value) {
[4842] Fix | Delete
if (this.pdfDocument) {
[4843] Fix | Delete
this.pdfViewer.currentPageNumber = value;
[4844] Fix | Delete
}
[4845] Fix | Delete
}
[4846] Fix | Delete
get rotation() {
[4847] Fix | Delete
return this.pdfDocument ? this.pdfViewer.pagesRotation : 0;
[4848] Fix | Delete
}
[4849] Fix | Delete
set rotation(value) {
[4850] Fix | Delete
if (this.pdfDocument) {
[4851] Fix | Delete
this.pdfViewer.pagesRotation = value;
[4852] Fix | Delete
}
[4853] Fix | Delete
}
[4854] Fix | Delete
get isInPresentationMode() {
[4855] Fix | Delete
return this.pdfDocument ? this.pdfViewer.isInPresentationMode : false;
[4856] Fix | Delete
}
[4857] Fix | Delete
async goToDestination(dest) {
[4858] Fix | Delete
if (!this.pdfDocument) {
[4859] Fix | Delete
return;
[4860] Fix | Delete
}
[4861] Fix | Delete
let namedDest, explicitDest, pageNumber;
[4862] Fix | Delete
if (typeof dest === "string") {
[4863] Fix | Delete
namedDest = dest;
[4864] Fix | Delete
explicitDest = await this.pdfDocument.getDestination(dest);
[4865] Fix | Delete
} else {
[4866] Fix | Delete
namedDest = null;
[4867] Fix | Delete
explicitDest = await dest;
[4868] Fix | Delete
}
[4869] Fix | Delete
if (!Array.isArray(explicitDest)) {
[4870] Fix | Delete
console.error(`goToDestination: "${explicitDest}" is not a valid destination array, for dest="${dest}".`);
[4871] Fix | Delete
return;
[4872] Fix | Delete
}
[4873] Fix | Delete
const [destRef] = explicitDest;
[4874] Fix | Delete
if (destRef && typeof destRef === "object") {
[4875] Fix | Delete
pageNumber = this.pdfDocument.cachedPageNumber(destRef);
[4876] Fix | Delete
if (!pageNumber) {
[4877] Fix | Delete
try {
[4878] Fix | Delete
pageNumber = (await this.pdfDocument.getPageIndex(destRef)) + 1;
[4879] Fix | Delete
} catch {
[4880] Fix | Delete
console.error(`goToDestination: "${destRef}" is not a valid page reference, for dest="${dest}".`);
[4881] Fix | Delete
return;
[4882] Fix | Delete
}
[4883] Fix | Delete
}
[4884] Fix | Delete
} else if (Number.isInteger(destRef)) {
[4885] Fix | Delete
pageNumber = destRef + 1;
[4886] Fix | Delete
}
[4887] Fix | Delete
if (!pageNumber || pageNumber < 1 || pageNumber > this.pagesCount) {
[4888] Fix | Delete
console.error(`goToDestination: "${pageNumber}" is not a valid page number, for dest="${dest}".`);
[4889] Fix | Delete
return;
[4890] Fix | Delete
}
[4891] Fix | Delete
if (this.pdfHistory) {
[4892] Fix | Delete
this.pdfHistory.pushCurrentPosition();
[4893] Fix | Delete
this.pdfHistory.push({
[4894] Fix | Delete
namedDest,
[4895] Fix | Delete
explicitDest,
[4896] Fix | Delete
pageNumber
[4897] Fix | Delete
});
[4898] Fix | Delete
}
[4899] Fix | Delete
this.pdfViewer.scrollPageIntoView({
[4900] Fix | Delete
pageNumber,
[4901] Fix | Delete
destArray: explicitDest,
[4902] Fix | Delete
ignoreDestinationZoom: this._ignoreDestinationZoom
[4903] Fix | Delete
});
[4904] Fix | Delete
}
[4905] Fix | Delete
goToPage(val) {
[4906] Fix | Delete
if (!this.pdfDocument) {
[4907] Fix | Delete
return;
[4908] Fix | Delete
}
[4909] Fix | Delete
const pageNumber = typeof val === "string" && this.pdfViewer.pageLabelToPageNumber(val) || val | 0;
[4910] Fix | Delete
if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.pagesCount)) {
[4911] Fix | Delete
console.error(`PDFLinkService.goToPage: "${val}" is not a valid page.`);
[4912] Fix | Delete
return;
[4913] Fix | Delete
}
[4914] Fix | Delete
if (this.pdfHistory) {
[4915] Fix | Delete
this.pdfHistory.pushCurrentPosition();
[4916] Fix | Delete
this.pdfHistory.pushPage(pageNumber);
[4917] Fix | Delete
}
[4918] Fix | Delete
this.pdfViewer.scrollPageIntoView({
[4919] Fix | Delete
pageNumber
[4920] Fix | Delete
});
[4921] Fix | Delete
}
[4922] Fix | Delete
addLinkAttributes(link, url, newWindow = false) {
[4923] Fix | Delete
if (!url || typeof url !== "string") {
[4924] Fix | Delete
throw new Error('A valid "url" parameter must provided.');
[4925] Fix | Delete
}
[4926] Fix | Delete
const target = newWindow ? LinkTarget.BLANK : this.externalLinkTarget,
[4927] Fix | Delete
rel = this.externalLinkRel;
[4928] Fix | Delete
if (this.externalLinkEnabled) {
[4929] Fix | Delete
link.href = link.title = url;
[4930] Fix | Delete
} else {
[4931] Fix | Delete
link.href = "";
[4932] Fix | Delete
link.title = `Disabled: ${url}`;
[4933] Fix | Delete
link.onclick = () => false;
[4934] Fix | Delete
}
[4935] Fix | Delete
let targetStr = "";
[4936] Fix | Delete
switch (target) {
[4937] Fix | Delete
case LinkTarget.NONE:
[4938] Fix | Delete
break;
[4939] Fix | Delete
case LinkTarget.SELF:
[4940] Fix | Delete
targetStr = "_self";
[4941] Fix | Delete
break;
[4942] Fix | Delete
case LinkTarget.BLANK:
[4943] Fix | Delete
targetStr = "_blank";
[4944] Fix | Delete
break;
[4945] Fix | Delete
case LinkTarget.PARENT:
[4946] Fix | Delete
targetStr = "_parent";
[4947] Fix | Delete
break;
[4948] Fix | Delete
case LinkTarget.TOP:
[4949] Fix | Delete
targetStr = "_top";
[4950] Fix | Delete
break;
[4951] Fix | Delete
}
[4952] Fix | Delete
link.target = targetStr;
[4953] Fix | Delete
link.rel = typeof rel === "string" ? rel : DEFAULT_LINK_REL;
[4954] Fix | Delete
}
[4955] Fix | Delete
getDestinationHash(dest) {
[4956] Fix | Delete
if (typeof dest === "string") {
[4957] Fix | Delete
if (dest.length > 0) {
[4958] Fix | Delete
return this.getAnchorUrl("#" + escape(dest));
[4959] Fix | Delete
}
[4960] Fix | Delete
} else if (Array.isArray(dest)) {
[4961] Fix | Delete
const str = JSON.stringify(dest);
[4962] Fix | Delete
if (str.length > 0) {
[4963] Fix | Delete
return this.getAnchorUrl("#" + escape(str));
[4964] Fix | Delete
}
[4965] Fix | Delete
}
[4966] Fix | Delete
return this.getAnchorUrl("");
[4967] Fix | Delete
}
[4968] Fix | Delete
getAnchorUrl(anchor) {
[4969] Fix | Delete
return this.baseUrl ? this.baseUrl + anchor : anchor;
[4970] Fix | Delete
}
[4971] Fix | Delete
setHash(hash) {
[4972] Fix | Delete
if (!this.pdfDocument) {
[4973] Fix | Delete
return;
[4974] Fix | Delete
}
[4975] Fix | Delete
let pageNumber, dest;
[4976] Fix | Delete
if (hash.includes("=")) {
[4977] Fix | Delete
const params = parseQueryString(hash);
[4978] Fix | Delete
if (params.has("search")) {
[4979] Fix | Delete
const query = params.get("search").replaceAll('"', ""),
[4980] Fix | Delete
phrase = params.get("phrase") === "true";
[4981] Fix | Delete
this.eventBus.dispatch("findfromurlhash", {
[4982] Fix | Delete
source: this,
[4983] Fix | Delete
query: phrase ? query : query.match(/\S+/g)
[4984] Fix | Delete
});
[4985] Fix | Delete
}
[4986] Fix | Delete
if (params.has("page")) {
[4987] Fix | Delete
pageNumber = params.get("page") | 0 || 1;
[4988] Fix | Delete
}
[4989] Fix | Delete
if (params.has("zoom")) {
[4990] Fix | Delete
const zoomArgs = params.get("zoom").split(",");
[4991] Fix | Delete
const zoomArg = zoomArgs[0];
[4992] Fix | Delete
const zoomArgNumber = parseFloat(zoomArg);
[4993] Fix | Delete
if (!zoomArg.includes("Fit")) {
[4994] Fix | Delete
dest = [null, {
[4995] Fix | Delete
name: "XYZ"
[4996] Fix | Delete
}, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, zoomArgNumber ? zoomArgNumber / 100 : zoomArg];
[4997] Fix | Delete
} else if (zoomArg === "Fit" || zoomArg === "FitB") {
[4998] Fix | Delete
dest = [null, {
[4999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function